From db946a8960bb2b99f68b6ea41417a45f1b30f40e Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Fri, 29 Jul 2016 09:36:43 +0200 Subject: [PATCH] Libvje / refactor : color_apply --- veejay-current/veejay-server/libvje/effects/color.c | 6 ++---- veejay-current/veejay-server/libvje/effects/color.h | 4 ++-- veejay-current/veejay-server/libvje/internal.h | 3 +-- veejay-current/veejay-server/libvje/vj-effman.c | 2 +- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/color.c b/veejay-current/veejay-server/libvje/effects/color.c index 2c73a74d..61ab4c33 100644 --- a/veejay-current/veejay-server/libvje/effects/color.c +++ b/veejay-current/veejay-server/libvje/effects/color.c @@ -48,9 +48,7 @@ vj_effect *color_init(int w, int h) } -void color_apply(VJFrame *frame, int width, int height, - int opacity_a, int opacity_b, - int opacity_c) +void color_apply(VJFrame *frame, int opacity_a, int opacity_b, int opacity_c) { unsigned int i; const unsigned int op_a0 = 255 - opacity_a; @@ -93,7 +91,7 @@ void color_apply(VJFrame *frame, int width, int height, Cb[i] = q1; Cr[i] = q2; - } + } } void color_free(){} diff --git a/veejay-current/veejay-server/libvje/effects/color.h b/veejay-current/veejay-server/libvje/effects/color.h index 4ddf57f7..0c0aac4b 100644 --- a/veejay-current/veejay-server/libvje/effects/color.h +++ b/veejay-current/veejay-server/libvje/effects/color.h @@ -25,7 +25,7 @@ #include vj_effect *color_init(); -void color_apply( VJFrame *frame , int width, int height, int a, int b, int c); - +void color_apply( VJFrame *frame, int a, int b, int c); + void color_free(); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index 49aa94a9..025fe7e2 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -421,8 +421,7 @@ extern void perspective_apply( VJFrame *frame, int x1, int y1, int x2, int y2, extern void deinterlace_apply(VJFrame *frame, int val); //extern void simplematte_apply(VJFrame *frame, int threshold, int invert); extern void crosspixel_apply(VJFrame *frame,int type, int val); - -extern void color_apply(VJFrame *frame, int w, int h, int a,int b, int c); +extern void color_apply(VJFrame *frame, int a, int b, int c); //extern void water_apply(VJFrame *frame, int w, int h, int val, int l, int d); extern void water_apply(void *user_data, VJFrame *frame, VJFrame *frame2, int width, int height, int fresh,int loopnum, int decay, int mode, int threshold); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index 10219091..29075bdb 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -313,7 +313,7 @@ static void vj_effman_apply_image_effect( dices_apply(vj_effects[entry], frames[0], arg[0]); break; case VJ_IMAGE_EFFECT_COLORTEST: - color_apply(frames[0],frames[0]->width,frames[0]->height,arg[0],arg[1],arg[2]); + color_apply(frames[0], arg[0], arg[1], arg[2]); break; case VJ_IMAGE_EFFECT_RAWMAN: rawman_apply(frames[0], arg[0], arg[1]);