diff --git a/veejay-current/veejay-client/src/vj-api.c b/veejay-current/veejay-client/src/vj-api.c index c06ffdbc..a586f377 100644 --- a/veejay-current/veejay-client/src/vj-api.c +++ b/veejay-current/veejay-client/src/vj-api.c @@ -1388,6 +1388,7 @@ effect_constr* _effect_new( char *effect_line ) ec = vj_calloc( sizeof(effect_constr)); strncpy( ec->description, effect_line+3, descr_len ); + sscanf(effect_line+(descr_len+3), "%03d%1d%1d%02d", &(ec->id),&(ec->is_video),&(ec->has_rgb), &(ec->num_arg)); offset = descr_len + 10; for(p=0; p < ec->num_arg; p++) @@ -1423,7 +1424,7 @@ effect_constr* _effect_new( char *effect_line ) continue; ec->hints[p] = (value_hint*) vj_calloc(sizeof(value_hint)); - ec->hints[p]->description = (char**) vj_malloc(sizeof(char*) * ec->max[p] ); + ec->hints[p]->description = (char**) vj_calloc(sizeof(char*) * (ec->max[p]+1) ); for(q = 0; q <= ec->max[p]; q ++ ) { int value_hint = 0; n = sscanf( effect_line + offset, "%03d", &value_hint ); @@ -4277,6 +4278,7 @@ void load_effectlist_info() effect_constr *ec; veejay_memset( line,0,sizeof(line)); strncpy( line, fxtext + offset, len ); + ec = _effect_new(line); if(ec) info->effect_info = g_list_append( info->effect_info, ec ); } diff --git a/veejay-current/veejay-server/libvje/effects/average.c b/veejay-current/veejay-server/libvje/effects/average.c index afb458ea..814ddef2 100644 --- a/veejay-current/veejay-server/libvje/effects/average.c +++ b/veejay-current/veejay-server/libvje/effects/average.c @@ -51,7 +51,7 @@ vj_effect *average_init(int w, int h) ve->hints = vje_init_value_hint_list( ve->num_params ); - vje_build_value_hint_list( ve->hints, 1, ve->limits[1][1], "Running Average", "Average" ); + vje_build_value_hint_list( ve->hints, ve->limits[1][1], 1, "Running Average", "Average" ); diff --git a/veejay-current/veejay-server/libvje/effects/baltantv.c b/veejay-current/veejay-server/libvje/effects/baltantv.c index c99dc045..08b76130 100644 --- a/veejay-current/veejay-server/libvje/effects/baltantv.c +++ b/veejay-current/veejay-server/libvje/effects/baltantv.c @@ -47,6 +47,13 @@ vj_effect *baltantv_init(int w, int h) ve->extra_frame = 0; ve->has_user = 0; ve->param_description = vje_build_param_list( ve->num_params, "Stride", "Mode" ); + + + ve->hints = vje_init_value_hint_list( ve->num_params ); + + vje_build_value_hint_list( ve->hints, ve->limits[1][1], 1, "Decaying", "Normal" ); + + return ve; } diff --git a/veejay-current/veejay-server/libvje/effects/bgsubtract.c b/veejay-current/veejay-server/libvje/effects/bgsubtract.c index 40e6e875..7f36786b 100644 --- a/veejay-current/veejay-server/libvje/effects/bgsubtract.c +++ b/veejay-current/veejay-server/libvje/effects/bgsubtract.c @@ -52,6 +52,12 @@ vj_effect *bgsubtract_init(int width, int height) ve->has_user = 1; ve->user_data = NULL; ve->param_description = vje_build_param_list( ve->num_params, "Threshold", "Mode", "To Alpha"); + + ve->hints = vje_init_value_hint_list( ve->num_params ); + + vje_build_value_hint_list( ve->hints, ve->limits[1][1], 1,"Preview", "Inverted preview", "Normal" ); + + return ve; } diff --git a/veejay-current/veejay-server/libvje/effects/binaryoverlays.c b/veejay-current/veejay-server/libvje/effects/binaryoverlays.c index 99cf4daf..cb9c6745 100644 --- a/veejay-current/veejay-server/libvje/effects/binaryoverlays.c +++ b/veejay-current/veejay-server/libvje/effects/binaryoverlays.c @@ -40,6 +40,14 @@ vj_effect *binaryoverlay_init(int w, int h) ve->sub_format = 0; ve->has_user = 0; ve->param_description = vje_build_param_list( ve->num_params, "Mode"); + + ve->hints = vje_init_value_hint_list( ve->num_params ); + + vje_build_value_hint_list( ve->hints, ve->limits[1][0], 0,"Not A and not B", + "Not A or not B", "Not A xor not B", "A and not B", "A or not B", + "A xor not B", "A and not B", "A or not B", "A or B" , "A and B", "A xor B" ); + + return ve; } @@ -315,4 +323,3 @@ void binaryoverlay_apply( VJFrame *frame, VJFrame *frame2, int w, int h, int mod } } -void binaryoverlay_free() {} diff --git a/veejay-current/veejay-server/libvje/effects/cali.c b/veejay-current/veejay-server/libvje/effects/cali.c index 969cb6e3..c0d8e5e9 100644 --- a/veejay-current/veejay-server/libvje/effects/cali.c +++ b/veejay-current/veejay-server/libvje/effects/cali.c @@ -61,17 +61,13 @@ vj_effect *cali_init(int width, int height) ve->param_description = vje_build_param_list( ve->num_params, "Mode", "Subtract Dark Current Only" ); + ve->hints = vje_init_value_hint_list( ve->num_params ); + + vje_build_value_hint_list( ve->hints, ve->limits[1][0],0, "Dark Frame", "Light Frame", "Calibrated Frame", "Normal" ); + return ve; } - - -void cali_destroy(void) -{ - -} - - #define ru8(num)(((num)+8)&~8) int cali_prepare( void *ed, double meanY, double meanU, double meanV, uint8_t *data, int len, int uv_len ) diff --git a/veejay-current/veejay-server/libvje/effects/cali.h b/veejay-current/veejay-server/libvje/effects/cali.h index 568761f0..f03fc51a 100644 --- a/veejay-current/veejay-server/libvje/effects/cali.h +++ b/veejay-current/veejay-server/libvje/effects/cali.h @@ -28,8 +28,5 @@ vj_effect *cali_init(int width, int height); void cali_free(void *d); int cali_malloc(void **c, int w, int h); int cali_prepare(void *userd, double *a, double *b, double *c, uint8_t *d, int e , int f); -void cali_apply(void *d , VJFrame *frame, - int width, int height, - int mode, int full); -void cali_destroy(); +void cali_apply(void *d , VJFrame *frame,int width, int height, int mode, int full); #endif diff --git a/veejay-current/veejay-server/libvje/effects/chameleonblend.c b/veejay-current/veejay-server/libvje/effects/chameleonblend.c index 66d20944..2fe3de00 100644 --- a/veejay-current/veejay-server/libvje/effects/chameleonblend.c +++ b/veejay-current/veejay-server/libvje/effects/chameleonblend.c @@ -46,6 +46,10 @@ vj_effect *chameleonblend_init(int w, int h) ve->extra_frame = 1; ve->has_user = 0; ve->param_description = vje_build_param_list( ve->num_params, "Mode (Appear,Dissapear)" ); + + ve->hints = vje_init_value_hint_list( ve->num_params ); + + vje_build_value_hint_list( ve->hints, ve->limits[1][0], 0,"Appearing", "Dissapearing" ); return ve; } @@ -53,12 +57,12 @@ static int last_mode_ = -1; static int N__ = 0; static int n__ = 0; -static int has_bg = 0; -static int32_t *sum = NULL; -static uint8_t *timebuffer = NULL; -static uint8_t *tmpimage[4] = { NULL,NULL,NULL, NULL}; -static int plane = 0; -static uint8_t *bgimage[4] = { NULL,NULL,NULL, NULL}; +static int has_bg = 0; +static int32_t *sum = NULL; +static uint8_t *timebuffer = NULL; +static uint8_t *tmpimage[4] = { NULL,NULL,NULL, NULL}; +static int plane = 0; +static uint8_t *bgimage[4] = { NULL,NULL,NULL, NULL}; #define PLANES_DEPTH 6 #define PLANES (1<< PLANES_DEPTH) @@ -150,15 +154,17 @@ static void drawAppearing(VJFrame *src, VJFrame *dest) uint8_t *U1 = dest->data[1]; uint8_t *V1 = dest->data[2]; - s = sum; + s = sum; uint8_t a,b,c; - for(i=0; i>PLANES_DEPTH; - if(Y>255) Y = 255; + + for(i=0; i>PLANES_DEPTH; + if(Y>255) Y = 255; + a = lum[i]; b = u0[i]; c = v0[i]; @@ -168,19 +174,19 @@ static void drawAppearing(VJFrame *src, VJFrame *dest) U1[i] = b; c += (( qv[i] - c ) * Y )>>8; V1[i] = c; - p++; - s++; - } - plane++; - plane = plane & (PLANES-1); + p++; + s++; + } + plane++; + plane = plane & (PLANES-1); } static void drawDisappearing(VJFrame *src, VJFrame *dest) { - int i; - unsigned int Y; - uint8_t *p, *qu, *qv, *qy; + unsigned int i; + unsigned int Y; + uint8_t *p, *qu, *qv, *qy; int32_t *s; const int video_area = src->len; @@ -191,11 +197,11 @@ static void drawDisappearing(VJFrame *src, VJFrame *dest) uint8_t *u0 = src->data[1]; uint8_t *v0 = src->data[2]; - p = timebuffer + (plane * video_area); - qy = bgimage[0]; - qu= bgimage[1]; - qv= bgimage[2]; - s = sum; + p = timebuffer + (plane * video_area); + qy = bgimage[0]; + qu = bgimage[1]; + qv = bgimage[2]; + s = sum; uint8_t a,b,c,A,B,C; diff --git a/veejay-current/veejay-server/libvje/effects/chromamagick.c b/veejay-current/veejay-server/libvje/effects/chromamagick.c index e066bb96..2ac96980 100644 --- a/veejay-current/veejay-server/libvje/effects/chromamagick.c +++ b/veejay-current/veejay-server/libvje/effects/chromamagick.c @@ -43,7 +43,7 @@ vj_effect *chromamagick_init(int w, int h) ve->parallel = 1; ve->description = "Chroma Magic"; ve->limits[0][0] = 0; - ve->limits[1][0] = 25; + ve->limits[1][0] = 26; ve->limits[0][1] = 0; ve->limits[1][1] = 255; ve->parallel = 1; @@ -51,7 +51,20 @@ vj_effect *chromamagick_init(int w, int h) ve->sub_format = 1; ve->has_user = 0; ve->param_description = vje_build_param_list( ve->num_params, "Mode", "Value" ); - return ve; + + ve->hints = vje_init_value_hint_list( ve->num_params ); + + vje_build_value_hint_list( ve->hints, ve->limits[1][0], 0, + "Add Subselect Luma", "Select Min", "Select Max", "Select Difference", + "Select Difference Negate", "Add Luma", "Select Unfreeze", "Exclusive", + "Difference Negate", "Additive", "Basecolor", "Freeze", "Unfreeze", + "Hardlight", "Multiply", "Divide", "Subtract", "Add", "Screen", + "Difference", "Softlight", "Dodge", "Reflect", "Difference Replace", + "Darken", "Lighten", "Modulo Add" + ); + + + return ve; } void chromamagic_selectmin(VJFrame *frame, VJFrame *frame2, int width, diff --git a/veejay-current/veejay-server/libvje/effects/chromamagickalpha.c b/veejay-current/veejay-server/libvje/effects/chromamagickalpha.c index 8e3e328e..74fc222a 100644 --- a/veejay-current/veejay-server/libvje/effects/chromamagickalpha.c +++ b/veejay-current/veejay-server/libvje/effects/chromamagickalpha.c @@ -51,7 +51,18 @@ vj_effect *chromamagickalpha_init(int w, int h) ve->sub_format = 1; ve->has_user = 0; ve->param_description = vje_build_param_list( ve->num_params, "Mode", "Value" ); - return ve; + + ve->hints = vje_init_value_hint_list( ve->num_params ); + + vje_build_value_hint_list( ve->hints, ve->limits[1][0],0, + "Add Subselect Luma", "Select Min", "Select Max", "Select Difference", + "Select Difference Negate", "Add Luma", "Select Unfreeze", "Exclusive", + "Difference Negate", "Additive", "Basecolor", "Freeze", "Unfreeze", + "Hardlight", "Multiply", "Divide", "Subtract", "Add", "Screen", + "Difference", "Softlight", "Dodge", "Reflect", "Difference Replace", + "Darken", "Lighten", "Modulo Add" + ); + return ve; } void chromamagicalpha_selectmin(VJFrame *frame, VJFrame *frame2, int width, diff --git a/veejay-current/veejay-server/libvje/effects/chromapalette.c b/veejay-current/veejay-server/libvje/effects/chromapalette.c index 89ec9f2b..a0c13173 100644 --- a/veejay-current/veejay-server/libvje/effects/chromapalette.c +++ b/veejay-current/veejay-server/libvje/effects/chromapalette.c @@ -118,7 +118,7 @@ void chromapalette_apply(VJFrame *frame, int width, int height, int angle, int r float tmp = sqrt(((aa * aa) + (bb * bb))); const int colorKeycb = 127 * (aa / tmp); const int colorKeycr = 127 * (bb / tmp); - float angle_f = ((float)angle*0.01f); + //float angle_f = ((float)angle*0.01f); const int accept_angle = (int)( 15.0f * tanf(M_PI * angle / 180.0f)); /* diff --git a/veejay-current/veejay-server/libvje/effects/chromascratcher.c b/veejay-current/veejay-server/libvje/effects/chromascratcher.c index fa89166c..8ef6ea03 100644 --- a/veejay-current/veejay-server/libvje/effects/chromascratcher.c +++ b/veejay-current/veejay-server/libvje/effects/chromascratcher.c @@ -44,7 +44,7 @@ vj_effect *chromascratcher_init(int w, int h) ve->limits[0][1] = 0; ve->limits[1][1] = 255; ve->limits[0][2] = 0; - ve->limits[1][2] = 25; + ve->limits[1][2] = 26; ve->limits[0][3] = 0; ve->limits[1][3] = 1; @@ -56,9 +56,20 @@ vj_effect *chromascratcher_init(int w, int h) ve->sub_format = 1; ve->extra_frame = 0; ve->has_user =0; - ve->param_description = vje_build_param_list(ve->num_params, "Mode", "Value", "Length", "Pingpong" ); + ve->param_description = vje_build_param_list(ve->num_params, "Length", "Value", "Mode", "Pingpong" ); - return ve; + ve->hints = vje_init_value_hint_list( ve->num_params ); + + vje_build_value_hint_list( ve->hints, ve->limits[1][2],2, + "Add Subselect Luma", "Select Min", "Select Max", "Select Difference", + "Select Difference Negate", "Add Luma", "Select Unfreeze", "Exclusive", + "Difference Negate", "Additive", "Basecolor", "Freeze", "Unfreeze", + "Hardlight", "Multiply", "Divide", "Subtract", "Add", "Screen", + "Difference", "Softlight", "Dodge", "Reflect", "Difference Replace", + "Darken", "Lighten", "Modulo Add" + ); + + return ve; } int chromascratcher_malloc(int w, int h) diff --git a/veejay-current/veejay-server/libvje/effects/chromium.c b/veejay-current/veejay-server/libvje/effects/chromium.c index 1e409695..ac5f8958 100644 --- a/veejay-current/veejay-server/libvje/effects/chromium.c +++ b/veejay-current/veejay-server/libvje/effects/chromium.c @@ -42,6 +42,13 @@ vj_effect *chromium_init(int w, int h) ve->extra_frame = 0; ve->has_user = 0; ve->param_description = vje_build_param_list( ve->num_params, "Mode" ); + + ve->hints = vje_init_value_hint_list( ve->num_params ); + + vje_build_value_hint_list( ve->hints, ve->limits[1][0], 0, + "Chroma Blue", "Chroma Red", "Chroma Red and Blue", "Chroma Swap" + ); + return ve; } diff --git a/veejay-current/veejay-server/libvje/effects/colorhis.c b/veejay-current/veejay-server/libvje/effects/colorhis.c index 101daea1..d29e110a 100644 --- a/veejay-current/veejay-server/libvje/effects/colorhis.c +++ b/veejay-current/veejay-server/libvje/effects/colorhis.c @@ -52,14 +52,20 @@ vj_effect *colorhis_init(int w, int h) ve->sub_format = 0; ve->extra_frame = 0; ve->has_user = 0; + + ve->hints = vje_init_value_hint_list( ve->num_params ); + + vje_build_value_hint_list( ve->hints, ve->limits[1][0], 0, + "Red Channel", "Green Channel", "Blue Channel", "All Channels" + ); return ve; } static void *histogram_ = NULL; -static VJFrame *rgb_frame_ = NULL; -static uint8_t *rgb_ = NULL; -static void *convert_yuv = NULL; -static void *convert_rgb = NULL; +static VJFrame *rgb_frame_ = NULL; +static uint8_t *rgb_ = NULL; +static void *convert_yuv = NULL; +static void *convert_rgb = NULL; int colorhis_malloc(int w, int h) { @@ -69,8 +75,11 @@ int colorhis_malloc(int w, int h) free(rgb_); histogram_ = veejay_histogram_new(); rgb_ = vj_malloc(sizeof(uint8_t) * w * h * 3 ); + if(rgb_ == NULL ) + return 0; rgb_frame_ = yuv_rgb_template( rgb_, w, h, PIX_FMT_RGB24 ); - + if(rgb_frame_ == NULL) + return 0; return 1; } @@ -94,7 +103,6 @@ void colorhis_free() convert_rgb = NULL; convert_yuv = NULL; - } @@ -107,8 +115,6 @@ void colorhis_apply( VJFrame *frame, int width, int height,int mode, int val, in yuv_fx_context_process( convert_yuv, frame, rgb_frame_ ); - //yuv_convert_any_ac( frame, rgb_frame_, src_fmt, PIX_FMT_RGB24 ); - if( val == 0 ) { veejay_histogram_draw_rgb( histogram_, frame, rgb_, intensity, strength, mode ); @@ -121,8 +127,6 @@ void colorhis_apply( VJFrame *frame, int width, int height,int mode, int val, in if(!convert_rgb ) convert_rgb = yuv_fx_context_create( rgb_frame_, frame, PIX_FMT_RGB24, src_fmt ); yuv_fx_context_process( convert_rgb, rgb_frame_, frame ); - -// yuv_convert_any_ac( rgb_frame_, frame, PIX_FMT_RGB24, src_fmt ); } } diff --git a/veejay-current/veejay-server/libvje/effects/colorshift.c b/veejay-current/veejay-server/libvje/effects/colorshift.c index d3568fbf..6ef1d2f6 100644 --- a/veejay-current/veejay-server/libvje/effects/colorshift.c +++ b/veejay-current/veejay-server/libvje/effects/colorshift.c @@ -22,6 +22,7 @@ #include #include #include "colorshift.h" +#include "common.h" vj_effect *colorshift_init(int w, int h) { @@ -43,6 +44,15 @@ vj_effect *colorshift_init(int w, int h) ve->has_user = 0; ve->param_description = vje_build_param_list( ve->num_params, "Mode", "Value" ); ve->parallel = 1; + + ve->hints = vje_init_value_hint_list( ve->num_params ); + + vje_build_value_hint_list( ve->hints, ve->limits[1][0], 0, + "Luma (OR)", "Chroma Blue (OR)", "Chroma Red (OR)", "Chroma Blue and Red (OR)", + "All Channels (OR)", "All Channels (AND)", "Luma (AND)", "Chroma Blue (AND)", + "Chroma Red (AND)", "Chroma Blue and Red (AND)" + ); + return ve; } @@ -217,4 +227,3 @@ void colorshift_apply(VJFrame *frame, int width, int height, int type, break; } } -void colorshift_free(){} diff --git a/veejay-current/veejay-server/libvje/effects/colorshift.h b/veejay-current/veejay-server/libvje/effects/colorshift.h index f48ec689..d5cb92a1 100644 --- a/veejay-current/veejay-server/libvje/effects/colorshift.h +++ b/veejay-current/veejay-server/libvje/effects/colorshift.h @@ -28,7 +28,5 @@ in a frame. with this you can create distorted colours. */ vj_effect *colorshift_init(); -void colorshift_apply( VJFrame *frame, int width, int height, int n, - int type); -void colorshift_free(); +void colorshift_apply( VJFrame *frame, int width, int height, int n, int type); #endif diff --git a/veejay-current/veejay-server/libvje/effects/common.c b/veejay-current/veejay-server/libvje/effects/common.c index 78002568..d61bddea 100644 --- a/veejay-current/veejay-server/libvje/effects/common.c +++ b/veejay-current/veejay-server/libvje/effects/common.c @@ -45,7 +45,7 @@ char **vje_build_param_list( int num, ... ) return list; } -void vje_build_value_hint_list( vj_value_hint_t **hints, int num, int limit, ... ) +void vje_build_value_hint_list( vj_value_hint_t **hints, int limit, int num, ... ) { va_list args; char *tmp = NULL; diff --git a/veejay-current/veejay-server/libvje/effects/common.h b/veejay-current/veejay-server/libvje/effects/common.h index 6029df0b..3eb8584e 100644 --- a/veejay-current/veejay-server/libvje/effects/common.h +++ b/veejay-current/veejay-server/libvje/effects/common.h @@ -315,7 +315,7 @@ extern void motionmap_store_frame(VJFrame *fx); extern void motionmap_interpolate_frame(VJFrame *fx, int N, int n); extern uint8_t *motionmap_bgmap(); extern uint32_t motionmap_activity(); - +extern int yuv_use_auto_ccir_jpeg(); void veejay_histogram_analyze( void *his, VJFrame *f , int t); void veejay_histogram_del(void *his); void *veejay_histogram_new(); @@ -339,4 +339,6 @@ void binarify( uint8_t *bm, uint8_t *bg, uint8_t *src,int threshold,int reverse, void vje_load_mask(uint8_t val); void vje_mmx_negate_frame(uint8_t *dst, uint8_t *in, uint8_t val, int len ); void vje_mmx_negate( uint8_t *dst, uint8_t *in ); +void vje_build_value_hint_list( vj_value_hint_t **hints, int num, int limit, ... ); +vj_value_hint_t **vje_init_value_hint_list(int n_params); #endif diff --git a/veejay-current/veejay-server/libvje/effects/contrast.c b/veejay-current/veejay-server/libvje/effects/contrast.c index 557ba6b7..5f4e2ccb 100644 --- a/veejay-current/veejay-server/libvje/effects/contrast.c +++ b/veejay-current/veejay-server/libvje/effects/contrast.c @@ -46,6 +46,12 @@ vj_effect *contrast_init(int w, int h) ve->extra_frame = 0; ve->sub_format = -1; ve->param_description = vje_build_param_list( ve->num_params, "Mode", "Luma", "Chroma" ); + + ve->hints = vje_init_value_hint_list( ve->num_params ); + + vje_build_value_hint_list( ve->hints, ve->limits[1][0], 0, + "Luma Only", "Chroma Only" ,"All Channels" ); + return ve; } diff --git a/veejay-current/veejay-server/libvje/effects/crosspixel.c b/veejay-current/veejay-server/libvje/effects/crosspixel.c index 79dc5bd1..c71a38ca 100644 --- a/veejay-current/veejay-server/libvje/effects/crosspixel.c +++ b/veejay-current/veejay-server/libvje/effects/crosspixel.c @@ -45,6 +45,11 @@ vj_effect *crosspixel_init(int w, int h) ve->extra_frame = 0; ve->has_user = 0; ve->param_description = vje_build_param_list( ve->num_params, "Mode", "Size" ); + + ve->hints = vje_init_value_hint_list( ve->num_params ); + + vje_build_value_hint_list( ve->hints, ve->limits[1][0], 0,"Black", "White" ); + return ve; } diff --git a/veejay-current/veejay-server/libvje/effects/diff.c b/veejay-current/veejay-server/libvje/effects/diff.c index 8d69f973..3ee1784e 100644 --- a/veejay-current/veejay-server/libvje/effects/diff.c +++ b/veejay-current/veejay-server/libvje/effects/diff.c @@ -66,8 +66,11 @@ vj_effect *diff_init(int width, int height) ve->has_user = 1; ve->user_data = NULL; - ve->param_description = vje_build_param_list( ve->num_params, "Threshold", "Mode", "Show mask/image", "Thinning" ); + ve->hints = vje_init_value_hint_list( ve->num_params ); + + vje_build_value_hint_list( ve->hints, ve->limits[1][2],2, + "Show Difference", "Show Distance Map", "Normal" ); return ve; } diff --git a/veejay-current/veejay-server/libvje/effects/diffimg.c b/veejay-current/veejay-server/libvje/effects/diffimg.c index 12809bd6..c98f46dc 100644 --- a/veejay-current/veejay-server/libvje/effects/diffimg.c +++ b/veejay-current/veejay-server/libvje/effects/diffimg.c @@ -30,7 +30,7 @@ vj_effect *diffimg_init(int width, int height) ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); ve->defaults = (int *) vj_calloc(sizeof(int) * ve->num_params); - ve->defaults[0] = 6;/* type */ + ve->defaults[0] = 6; /* type */ ve->defaults[1] = 15; /* min */ ve->defaults[2] = 240; /* max */ @@ -47,6 +47,7 @@ vj_effect *diffimg_init(int width, int height) ve->sub_format = -1; ve->has_user = 0; ve->parallel = 0; + return ve; } diff --git a/veejay-current/veejay-server/libvje/effects/dither.c b/veejay-current/veejay-server/libvje/effects/dither.c index 9bb925a8..144e7df8 100644 --- a/veejay-current/veejay-server/libvje/effects/dither.c +++ b/veejay-current/veejay-server/libvje/effects/dither.c @@ -22,6 +22,8 @@ #include #include #include "dither.h" +#include "common.h" + vj_effect *dither_init(int w, int h) { vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); @@ -42,9 +44,13 @@ vj_effect *dither_init(int w, int h) ve->extra_frame = 0; ve->has_user = 0; - ve->param_description = vje_build_param_list( ve->num_params, "Mode", "Value" ); + ve->param_description = vje_build_param_list( ve->num_params, "Value", "Mode" ); + + ve->hints = vje_init_value_hint_list( ve->num_params ); - return ve; + vje_build_value_hint_list( ve->hints, ve->limits[1][1], 1, "Static", "Random" ); + + return ve; } static int last_size = 0; @@ -75,4 +81,3 @@ void dither_apply(VJFrame *frame, int width, int height, int size, int random_on } } } -void dither_free(){} diff --git a/veejay-current/veejay-server/libvje/effects/dither.h b/veejay-current/veejay-server/libvje/effects/dither.h index 91968fba..7640cced 100644 --- a/veejay-current/veejay-server/libvje/effects/dither.h +++ b/veejay-current/veejay-server/libvje/effects/dither.h @@ -25,7 +25,5 @@ #include vj_effect *dither_init(); -void dither_apply( VJFrame *frame, int width, int height, int size, - int n); -void dither_free(); +void dither_apply( VJFrame *frame, int width, int height, int size, int n); #endif diff --git a/veejay-current/veejay-server/libvje/effects/emboss.c b/veejay-current/veejay-server/libvje/effects/emboss.c index ed623e94..01dc4b09 100644 --- a/veejay-current/veejay-server/libvje/effects/emboss.c +++ b/veejay-current/veejay-server/libvje/effects/emboss.c @@ -39,6 +39,14 @@ vj_effect *emboss_init(int w, int h) ve->extra_frame = 0; ve->has_user = 0; ve->param_description = vje_build_param_list( ve->num_params,"Mode" ); + + + ve->hints = vje_init_value_hint_list( ve->num_params ); + + vje_build_value_hint_list( ve->hints, ve->limits[1][0], 0, + "Blurry Dark", "Xtreme Emboss", "Lines White Balance", "Gray Emboss", + "Aggressive Emboss", "Dark Emboss", "Grayish Emboss", "Edged", "Emboss Expi", "Another Expi" ); + return ve; } diff --git a/veejay-current/veejay-server/libvje/effects/fibdownscale.c b/veejay-current/veejay-server/libvje/effects/fibdownscale.c index 85fa94d2..e694ba28 100644 --- a/veejay-current/veejay-server/libvje/effects/fibdownscale.c +++ b/veejay-current/veejay-server/libvje/effects/fibdownscale.c @@ -22,6 +22,7 @@ #include #include #include "fibdownscale.h" +#include "common.h" vj_effect *fibdownscale_init(int w, int h) { @@ -38,10 +39,15 @@ vj_effect *fibdownscale_init(int w, int h) ve->limits[0][1] = 1; ve->limits[1][0] = 1; ve->limits[1][1] = 8; - ve->sub_format = 0; + ve->sub_format = -1; ve->extra_frame = 0; ve->param_description = vje_build_param_list( ve->num_params, "Mode", "Fib" ); - ve->has_user =0; + ve->has_user = 0; + + ve->hints = vje_init_value_hint_list( ve->num_params ); + + vje_build_value_hint_list( ve->hints,ve->limits[0][1],0, "Down", "Rectangle" ); + return ve; } @@ -57,10 +63,9 @@ void fibdownscale_apply(VJFrame *frame, VJFrame *frame2, int width, void _fibdownscale_apply(VJFrame *frame, VJFrame *frame2, int width, int height) { - unsigned i, f1; unsigned int len = frame->len / 2; - unsigned int uv_len = frame->uv_len / 2; + unsigned int uv_len = (frame->ssm ? frame->len : frame->uv_len) / 2; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; @@ -70,9 +75,6 @@ void _fibdownscale_apply(VJFrame *frame, VJFrame *frame2, int width, uint8_t *Cb2 = frame2->data[1]; uint8_t *Cr2 = frame2->data[2]; - - - /* do fib over half of image. (now we have 2 squares in upper half) */ for (i = 2; i < len; i++) { f1 = (i + 1) + (i - 1); @@ -80,17 +82,13 @@ void _fibdownscale_apply(VJFrame *frame, VJFrame *frame2, int width, } /* copy over first half (we could use veejay_memcpy) */ -// for (i = len; i < (width * height); i++) { -// Y[i] = Y[i - len]; - // } veejay_memcpy( Y + len, Y, len ); /* do the same thing for UV to get correct image */ - for (i = 2; i < uv_len; i++) { - f1 = (i + 1) + (i - 1); - Cb[i] = Cb2[f1]; - Cr[i] = Cr2[f1]; + f1 = (i + 1) + (i - 1); + Cb[i] = Cb2[f1]; + Cr[i] = Cr2[f1]; } veejay_memcpy( Cb + uv_len, Cb , uv_len ); @@ -102,7 +100,7 @@ void _fibrectangle_apply(VJFrame *frame, VJFrame *frame2, int width, { unsigned int i, f1; const uint32_t len = frame->len /2; - const uint32_t uv_len = frame->uv_len/2; + const uint32_t uv_len = (frame->ssm ? frame->len: frame->uv_len)/2; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -112,22 +110,13 @@ void _fibrectangle_apply(VJFrame *frame, VJFrame *frame2, int width, for (i = 2; i < len; i++) { f1 = (i - 1) + (i - 2); -// if (f1 < len) - Y[i] = Y2[f1]; -// else -// Y[i] = Y[(f1 - len)]; + Y[i] = Y2[f1]; } - for (i = 2; i < uv_len; i++) { - - f1 = (i - 1) + (i - 2); -// if (f1 < len) { - Cb[i] = Cb2[f1]; - Cr[i] = Cr2[f1]; -// } else { -// Cb[i] = Cb2[f1 - len]; -// Cr[i] = Cr2[f1 - len]; -// } - } + for (i = 2; i < uv_len; i++) { + f1 = (i - 1) + (i - 2); + Cb[i] = Cb2[f1]; + Cr[i] = Cr2[f1]; + } } void fibdownscale_free(){} diff --git a/veejay-current/veejay-server/libvje/effects/flare.c b/veejay-current/veejay-server/libvje/effects/flare.c index 13086f96..f3791971 100644 --- a/veejay-current/veejay-server/libvje/effects/flare.c +++ b/veejay-current/veejay-server/libvje/effects/flare.c @@ -28,8 +28,8 @@ #include "common.h" /* blend by blurred mask. - derived from radial blur and chromamagick effect. - + derived from radial blur and chromamagick effect. + FIXME: add remaining blend modes from chromamagick effect */ vj_effect *flare_init(int w, int h) @@ -53,6 +53,12 @@ vj_effect *flare_init(int w, int h) ve->sub_format = 1; ve->has_user = 0; ve->param_description = vje_build_param_list( ve->num_params , "Mode", "Opacity", "Radius" ); + + ve->hints = vje_init_value_hint_list( ve->num_params ); + + vje_build_value_hint_list( ve->hints,ve->limits[1][0],0, "Simple", "Exclusive", "Additive", "Unfreeze", + "Darken", "Lighten" ); + return ve; } @@ -282,13 +288,16 @@ void flare_apply(VJFrame *A, { for( y = 0; y < height; y ++ ) blur2( A->data[plane] + (y * width), - B.data[plane] + (y * width), + B.data[plane] + (y * width), width, radius, 2, 1, 1 ); + } + for( plane = 0; plane <2; plane ++ ) + { for( x = 0; x < width; x ++ ) blur2( A->data[plane] + x , B.data[plane] + x, @@ -302,21 +311,21 @@ void flare_apply(VJFrame *A, /* overlay original on top of blurred image */ switch( type ) { - case 1: + case 1: flare_exclusive(A,&B,width,height,op_a); - break; + break; case 2: flare_additive(A,&B,width,height,op_a); - break; + break; case 3: flare_unfreeze(A,&B,width,height,op_a); - break; + break; case 4: flare_darken(A,&B,width,height,op_a); - break; + break; case 5: flare_lighten( A, &B, width, height, op_a ); - break; + break; default: flare_simple( A, &B, width,height, op_a ); diff --git a/veejay-current/veejay-server/libvje/effects/killchroma.c b/veejay-current/veejay-server/libvje/effects/killchroma.c index 8ddd3fa9..f037ef80 100644 --- a/veejay-current/veejay-server/libvje/effects/killchroma.c +++ b/veejay-current/veejay-server/libvje/effects/killchroma.c @@ -43,6 +43,12 @@ vj_effect *killchroma_init(int w, int h) ve->extra_frame = 0; ve->param_description = vje_build_param_list(ve->num_params, "Mode" ); ve->parallel = 1; + + ve->hints = vje_init_value_hint_list( ve->num_params ); + + vje_build_value_hint_list( ve->hints, ve->limits[1][0], 0, + "All Channels", "Chroma Blue", "Chroma Red" ); + return ve; } @@ -59,4 +65,3 @@ void killchroma_apply(VJFrame *frame, int width, int height, int n) veejay_memset( frame->data[n], 128, (frame->ssm ? frame->len : frame->uv_len ) ); } } -void killchroma_free(){} diff --git a/veejay-current/veejay-server/libvje/effects/killchroma.h b/veejay-current/veejay-server/libvje/effects/killchroma.h index daef44b0..47c6993e 100644 --- a/veejay-current/veejay-server/libvje/effects/killchroma.h +++ b/veejay-current/veejay-server/libvje/effects/killchroma.h @@ -25,8 +25,5 @@ #include vj_effect *killchroma_init(); - void killchroma_apply( VJFrame *v, int width, int height, int n); - -void killchroma_free(); #endif diff --git a/veejay-current/veejay-server/libvje/effects/lumablend.c b/veejay-current/veejay-server/libvje/effects/lumablend.c index 6c31f1a3..58120059 100644 --- a/veejay-current/veejay-server/libvje/effects/lumablend.c +++ b/veejay-current/veejay-server/libvje/effects/lumablend.c @@ -21,8 +21,10 @@ #include #include #include -#include "lumablend.h" +#include #include +#include "common.h" +#include "lumablend.h" vj_effect *lumablend_init(int w, int h) { @@ -53,6 +55,11 @@ vj_effect *lumablend_init(int w, int h) ve->has_user = 0; ve->param_description = vje_build_param_list(ve->num_params, "Mode", "Threshold A", "Threshold B", "Opacity" ); + ve->hints = vje_init_value_hint_list( ve->num_params ); + + vje_build_value_hint_list( ve->hints, ve->limits[1][0], 0, + "Inclusive", "Exclusive","Blurred" ); + return ve; } diff --git a/veejay-current/veejay-server/libvje/effects/lumakey.c b/veejay-current/veejay-server/libvje/effects/lumakey.c index 5f9ddba5..d835ea9b 100644 --- a/veejay-current/veejay-server/libvje/effects/lumakey.c +++ b/veejay-current/veejay-server/libvje/effects/lumakey.c @@ -52,7 +52,7 @@ vj_effect *lumakey_init(int width, int height) ve->param_description = vje_build_param_list(ve->num_params, "Feather", "Min Threshold","Max Threshold","Distance", "Mode" ); ve->hints = vje_init_value_hint_list( ve->num_params ); - vje_build_value_hint_list( ve->hints, 4, ve->limits[1][4], "Simple", "White", "Smooth" ); + vje_build_value_hint_list( ve->hints, ve->limits[1][4], 4,"Simple", "White", "Smooth" ); diff --git a/veejay-current/veejay-server/libvje/effects/lumakeyalpha.c b/veejay-current/veejay-server/libvje/effects/lumakeyalpha.c index d251b486..1de79087 100644 --- a/veejay-current/veejay-server/libvje/effects/lumakeyalpha.c +++ b/veejay-current/veejay-server/libvje/effects/lumakeyalpha.c @@ -43,6 +43,12 @@ vj_effect *lumakeyalpha_init(int width, int height) ve->has_user = 0; ve->param_description = vje_build_param_list(ve->num_params, "Selector Mode", "Opacity" ); + ve->hints = vje_init_value_hint_list( ve->num_params ); + + vje_build_value_hint_list( ve->hints, ve->limits[1][0],0, + "Alpha-IN (premul B)", "Alpha-IN A (premul B)", "Alpha-IN A or B (premul B)", "Alpha-IN A and B (premul B)", + "Alpha-IN B (premul A)","Alpha-IN A (premul A)", "Alpha-IN A or B (premul A)", "Alpha-IN A and B (premul B)" ); + return ve; } diff --git a/veejay-current/veejay-server/libvje/effects/lumamagick.c b/veejay-current/veejay-server/libvje/effects/lumamagick.c index dfe9c452..798e106c 100644 --- a/veejay-current/veejay-server/libvje/effects/lumamagick.c +++ b/veejay-current/veejay-server/libvje/effects/lumamagick.c @@ -53,7 +53,7 @@ vj_effect *lumamagick_init(int width, int height) ve->param_description = vje_build_param_list( ve->num_params, "Mode", "Opacity A", "Opacity B" ); ve->hints = vje_init_value_hint_list( ve->num_params ); - vje_build_value_hint_list( ve->hints, 0, ve->limits[1][0], + vje_build_value_hint_list( ve->hints, ve->limits[1][0], 0, "Additive", "Subtractive","Multiply","Divide","Lighten","Hardlight", "Difference","Difference Negate","Exclusive","Base","Freeze", "Unfreeze","Relative Add","Relative Subtract","Max select", "Min select", diff --git a/veejay-current/veejay-server/libvje/effects/magicalphaoverlays.c b/veejay-current/veejay-server/libvje/effects/magicalphaoverlays.c index 9391aff8..482e9f7c 100644 --- a/veejay-current/veejay-server/libvje/effects/magicalphaoverlays.c +++ b/veejay-current/veejay-server/libvje/effects/magicalphaoverlays.c @@ -49,7 +49,7 @@ vj_effect *overlayalphamagic_init(int w, int h) ve->hints = vje_init_value_hint_list( ve->num_params ); - vje_build_value_hint_list( ve->hints, 0, ve->limits[1][0], + vje_build_value_hint_list( ve->hints, ve->limits[1][0],0, "Additive", "Subtractive","Multiply","Divide","Lighten","Hardlight", "Difference","Difference Negate","Exclusive","Base","Freeze", "Unfreeze","Relative Add","Relative Subtract","Max select", "Min select", @@ -87,7 +87,6 @@ void _overlayalphamagic_add_distorted(VJFrame *frame, VJFrame *frame2,int width, unsigned int i; uint8_t y1, y2; unsigned int len = width * height; - int uv_len = frame->uv_len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; diff --git a/veejay-current/veejay-server/libvje/effects/magicoverlays.c b/veejay-current/veejay-server/libvje/effects/magicoverlays.c index 505eaefc..d30c8fb8 100644 --- a/veejay-current/veejay-server/libvje/effects/magicoverlays.c +++ b/veejay-current/veejay-server/libvje/effects/magicoverlays.c @@ -47,7 +47,7 @@ vj_effect *overlaymagic_init(int w, int h) ve->hints = vje_init_value_hint_list( ve->num_params ); - vje_build_value_hint_list( ve->hints, 0, ve->limits[1][0], + vje_build_value_hint_list( ve->hints, ve->limits[1][0], 0, "Additive", "Subtractive","Multiply","Divide","Lighten","Hardlight", "Difference","Difference Negate","Exclusive","Base","Freeze", "Unfreeze","Relative Add","Relative Subtract","Max select", "Min select", @@ -87,14 +87,13 @@ void _overlaymagic_add_distorted(VJFrame *frame, VJFrame *frame2, unsigned int i; uint8_t y1, y2; unsigned int len = width * height; - int uv_len = frame->uv_len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; for (i = 0; i < len; i++) { - y1 = Y[i]; - y2 = Y2[i]; - Y[i] = CLAMP_Y(y1 + y2); + y1 = Y[i]; + y2 = Y2[i]; + Y[i] = CLAMP_Y(y1 + y2); } } diff --git a/veejay-current/veejay-server/libvje/effects/magicoverlaysalpha.c b/veejay-current/veejay-server/libvje/effects/magicoverlaysalpha.c index 9eacf155..510d6a56 100644 --- a/veejay-current/veejay-server/libvje/effects/magicoverlaysalpha.c +++ b/veejay-current/veejay-server/libvje/effects/magicoverlaysalpha.c @@ -46,7 +46,7 @@ vj_effect *overlaymagicalpha_init(int w, int h) ve->param_description = vje_build_param_list( ve->num_params, "Mode", "Keep or clear chroma" ); ve->hints = vje_init_value_hint_list( ve->num_params ); - vje_build_value_hint_list( ve->hints, 0, ve->limits[1][0], + vje_build_value_hint_list( ve->hints, ve->limits[1][0], 0, "Additive", "Subtractive","Multiply","Divide","Lighten","Hardlight", "Difference","Difference Negate","Exclusive","Base","Freeze", "Unfreeze","Relative Add","Relative Subtract","Max select", "Min select", @@ -92,7 +92,6 @@ void _overlaymagicalpha_add_distorted(VJFrame *frame, VJFrame *frame2, unsigned int i; uint8_t y1, y2; unsigned int len = width * height; - int uv_len = frame->uv_len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; diff --git a/veejay-current/veejay-server/libvje/effects/magicphotos.c b/veejay-current/veejay-server/libvje/effects/magicphotos.c index 2ee7e9c0..6fbb5006 100644 --- a/veejay-current/veejay-server/libvje/effects/magicphotos.c +++ b/veejay-current/veejay-server/libvje/effects/magicphotos.c @@ -43,6 +43,13 @@ vj_effect *photoplay_init(int w, int h) ve->extra_frame = 0; ve->has_user = 0; ve->param_description = vje_build_param_list( ve->num_params, "Photos", "Waterfall", "Mode" ); + + ve->hints = vje_init_value_hint_list( ve->num_params ); + + vje_build_value_hint_list( ve->hints, ve->limits[1][2], 2, + "Random", "LR TB", "LB TR", "BL TR", "BR TL", "LB RT", "TL BR", "TL RB", "BL RT" ); // FIXME naming or can we use arrow symbols? + + return ve; } @@ -200,7 +207,6 @@ void photoplay_apply( VJFrame *frame, int width, int height, int size, int delay } } - if(frame_counter < num_photos) { for( i = 0; i < 3 ; i ++ ) @@ -222,7 +228,6 @@ void photoplay_apply( VJFrame *frame, int width, int height, int size, int delay put_photo( dstV, photo_list[i]->data[2],width,height,i, m); } - frame_counter ++; } diff --git a/veejay-current/veejay-server/libvje/effects/magicscratcher.c b/veejay-current/veejay-server/libvje/effects/magicscratcher.c index eabbec62..06c2c410 100644 --- a/veejay-current/veejay-server/libvje/effects/magicscratcher.c +++ b/veejay-current/veejay-server/libvje/effects/magicscratcher.c @@ -52,6 +52,9 @@ vj_effect *magicscratcher_init(int w, int h) ve->extra_frame = 0; ve->has_user = 0; ve->param_description = vje_build_param_list( ve->num_params, "Mode", "Scratch frames", "PingPong"); + + //FIXME parameter mode refactor + return ve; } int magicscratcher_malloc(int w, int h) diff --git a/veejay-current/veejay-server/libvje/effects/mask.c b/veejay-current/veejay-server/libvje/effects/mask.c index 0a2bb139..dce44e1f 100644 --- a/veejay-current/veejay-server/libvje/effects/mask.c +++ b/veejay-current/veejay-server/libvje/effects/mask.c @@ -22,7 +22,7 @@ #include #include #include "mask.h" - +#include "common.h" vj_effect *simplemask_init(int w, int h ) { @@ -42,7 +42,14 @@ vj_effect *simplemask_init(int w, int h ) ve->extra_frame = 1; ve->has_user =0; ve->param_description = vje_build_param_list( ve->num_params, "Threshold", "Mode" ); - return ve; + + + ve->hints = vje_init_value_hint_list( ve->num_params ); + + vje_build_value_hint_list( ve->hints, ve->limits[1][1], 1, + "Normal", "Preview" ); + + return ve; } diff --git a/veejay-current/veejay-server/libvje/effects/mixtoalpha.c b/veejay-current/veejay-server/libvje/effects/mixtoalpha.c index ff08670c..e1ee3e28 100644 --- a/veejay-current/veejay-server/libvje/effects/mixtoalpha.c +++ b/veejay-current/veejay-server/libvje/effects/mixtoalpha.c @@ -51,7 +51,7 @@ vj_effect *mixtoalpha_init(int w, int h) ve->hints = vje_init_value_hint_list( ve->num_params ); - vje_build_value_hint_list( ve->hints, 0, ve->limits[1][0], "Verbatim", "Full range" ); + vje_build_value_hint_list( ve->hints, ve->limits[1][0],0, "Verbatim", "Full range" ); return ve; } diff --git a/veejay-current/veejay-server/libvje/effects/mtracer.c b/veejay-current/veejay-server/libvje/effects/mtracer.c index 144c4fc9..b8ebbaa2 100644 --- a/veejay-current/veejay-server/libvje/effects/mtracer.c +++ b/veejay-current/veejay-server/libvje/effects/mtracer.c @@ -37,7 +37,7 @@ vj_effect *mtracer_init(int w, int h) ve->limits[0] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* min */ ve->limits[1] = (int *) vj_calloc(sizeof(int) * ve->num_params); /* max */ ve->limits[0][0] = 0; - ve->limits[1][0] = 30; + ve->limits[1][0] = 32; ve->limits[0][1] = 1; ve->limits[1][1] = 25; ve->defaults[0] = 150; @@ -47,6 +47,18 @@ vj_effect *mtracer_init(int w, int h) ve->extra_frame = 1; ve->has_user = 0; ve->param_description = vje_build_param_list( ve->num_params, "Mode", "Length"); + + ve->hints = vje_init_value_hint_list( ve->num_params ); + + vje_build_value_hint_list( ve->hints, ve->limits[1][0], 0, + "Additive", "Subtractive","Multiply","Divide","Lighten","Hardlight", + "Difference","Difference Negate","Exclusive","Base","Freeze", + "Unfreeze","Relative Add","Relative Subtract","Max select", "Min select", + "Relative Luma Add", "Relative Luma Subtract", "Min Subselect", "Max Subselect", + "Add Subselect", "Add Average", "Experimental 1","Experimental 2", "Experimental 3", + "Multisub", "Softburn", "Inverse Burn", "Dodge", "Distorted Add", "Distorted Subtract", "Experimental 4", "Negation Divide"); + + return ve; } void mtracer_free() { diff --git a/veejay-current/veejay-server/libvje/effects/noiseadd.c b/veejay-current/veejay-server/libvje/effects/noiseadd.c index a04acc82..696d639b 100644 --- a/veejay-current/veejay-server/libvje/effects/noiseadd.c +++ b/veejay-current/veejay-server/libvje/effects/noiseadd.c @@ -23,6 +23,7 @@ #include #include #include "noiseadd.h" +#include "common.h" static uint8_t *Yb_frame; @@ -45,6 +46,13 @@ vj_effect *noiseadd_init(int width , int height) ve->sub_format = -1; ve->has_user = 0; ve->param_description = vje_build_param_list( ve->num_params, "Mode", "Amplification"); + + + ve->hints = vje_init_value_hint_list( ve->num_params ); + + vje_build_value_hint_list( ve->hints, ve->limits[1][0], 0, + "1x3 Mask", "3x3 Mask" ,"3x3 Inverted Mask" ); + return ve; } diff --git a/veejay-current/veejay-server/libvje/effects/porterduff.c b/veejay-current/veejay-server/libvje/effects/porterduff.c index 8bf5cb15..cab4eb2c 100644 --- a/veejay-current/veejay-server/libvje/effects/porterduff.c +++ b/veejay-current/veejay-server/libvje/effects/porterduff.c @@ -54,7 +54,7 @@ vj_effect *porterduff_init(int w,int h) ve->rgba_only = 1; ve->hints = vje_init_value_hint_list( ve->num_params ); - vje_build_value_hint_list( ve->hints, 0, ve->limits[1][0], + vje_build_value_hint_list( ve->hints, ve->limits[1][0], 0, "Dest", "Dest Atop", "Dest In", "Dest Over", "Dest Out", "Src Over", "Src Atop", "Src In", "Src Out", "SVG Multiply", "XOR", "ADD", "SUBTRACT", "DIVIDE" ); return ve; diff --git a/veejay-current/veejay-server/libvje/effects/rawman.c b/veejay-current/veejay-server/libvje/effects/rawman.c index fcfce299..8dd437ab 100644 --- a/veejay-current/veejay-server/libvje/effects/rawman.c +++ b/veejay-current/veejay-server/libvje/effects/rawman.c @@ -20,8 +20,8 @@ #include #include #include +#include "common.h" #include "rawman.h" -#include vj_effect *rawman_init(int w,int h) { vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); @@ -42,6 +42,12 @@ vj_effect *rawman_init(int w,int h) ve->has_user = 0; ve->extra_frame = 0; ve->param_description = vje_build_param_list( ve->num_params, "Mode", "Value"); + + ve->hints = vje_init_value_hint_list( ve->num_params ); + + vje_build_value_hint_list( ve->hints, ve->limits[1][0],0, + "Additive", "Subtractive","Multiply","Divide","Lighten","Hardlight"); + return ve; } diff --git a/veejay-current/veejay-server/libvje/effects/reflection.c b/veejay-current/veejay-server/libvje/effects/reflection.c index a728ffc7..930745dc 100644 --- a/veejay-current/veejay-server/libvje/effects/reflection.c +++ b/veejay-current/veejay-server/libvje/effects/reflection.c @@ -75,7 +75,7 @@ vj_effect *reflection_init(int width,int height) ve->extra_frame = 0; ve->has_user = 0; ve->param_description = vje_build_param_list( ve->num_params, "Value 1", "Value 2", "Mode"); - return ve; + return ve; } int reflection_malloc(int width, int height) diff --git a/veejay-current/veejay-server/libvje/effects/rgbkey.c b/veejay-current/veejay-server/libvje/effects/rgbkey.c index 34a314cc..3372fc58 100644 --- a/veejay-current/veejay-server/libvje/effects/rgbkey.c +++ b/veejay-current/veejay-server/libvje/effects/rgbkey.c @@ -84,7 +84,7 @@ vj_effect *rgbkey_init(int w,int h) ve->rgb_conv = 1; ve->parallel = 0; - vje_build_value_hint_list( ve->hints, 7, ve->limits[1][7], "Ignore Alpha-IN", "Alpha-IN A", "Alpha-IN A or B", "Alpha-In A and B", "Alpha-IN B" ); + vje_build_value_hint_list( ve->hints, ve->limits[1][7],7, "Ignore Alpha-IN", "Alpha-IN A", "Alpha-IN A or B", "Alpha-In A and B", "Alpha-IN B" ); return ve; } diff --git a/veejay-current/veejay-server/libvje/effects/toalpha.c b/veejay-current/veejay-server/libvje/effects/toalpha.c index 49eb3ed0..7756ead5 100644 --- a/veejay-current/veejay-server/libvje/effects/toalpha.c +++ b/veejay-current/veejay-server/libvje/effects/toalpha.c @@ -48,7 +48,7 @@ vj_effect *toalpha_init(int w, int h) ve->hints = vje_init_value_hint_list( ve->num_params ); - vje_build_value_hint_list( ve->hints, 0, ve->limits[1][0], "Verbatim", "Full range" ); + vje_build_value_hint_list( ve->hints, ve->limits[1][0], 0, "Verbatim", "Full range" ); return ve; } diff --git a/veejay-current/veejay-server/libvje/effects/zoom.c b/veejay-current/veejay-server/libvje/effects/zoom.c index 2d8df0f5..c39bb042 100644 --- a/veejay-current/veejay-server/libvje/effects/zoom.c +++ b/veejay-current/veejay-server/libvje/effects/zoom.c @@ -60,7 +60,7 @@ vj_effect *zoom_init(int width , int height) ve->hints = vje_init_value_hint_list( ve->num_params ); - vje_build_value_hint_list( ve->hints, 3, ve->limits[1][3], "Forward", "Reverse" ); + vje_build_value_hint_list( ve->hints, ve->limits[1][3], 3, "Forward", "Reverse" ); return ve; diff --git a/veejay-current/veejay-server/libvje/vj-effect.c b/veejay-current/veejay-server/libvje/vj-effect.c index 4f3af2c1..71bd67d7 100644 --- a/veejay-current/veejay-server/libvje/vj-effect.c +++ b/veejay-current/veejay-server/libvje/vj-effect.c @@ -727,7 +727,6 @@ void vj_effect_shutdown() { // contourextract_destroy(); rotozoom_destroy(); distortion_destroy(); - cali_destroy(); plug_sys_free(); } @@ -989,7 +988,7 @@ int vj_effect_get_summary(int entry, char *dst) for( j = 0; j <= limit; j ++ ) { snprintf(tmp,sizeof(tmp), - "%03d%s", + "%03zu%s", strlen( vj_effects[entry]->hints[i]->description[j] ), vj_effects[entry]->hints[i]->description[j] ); strncat( dst,tmp,strlen(tmp));