From 0da438d902bc7db63deaeaf4262b010fe7bb5068 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Fri, 29 Jul 2016 20:09:18 +0200 Subject: [PATCH] Libvje / refactor : rgbchannel * w,h * clean headers --- .../veejay-server/libvje/effects/rgbchannel.c | 11 +++++------ .../veejay-server/libvje/effects/rgbchannel.h | 6 +----- veejay-current/veejay-server/libvje/internal.h | 2 +- veejay-current/veejay-server/libvje/vj-effman.c | 2 +- 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/rgbchannel.c b/veejay-current/veejay-server/libvje/effects/rgbchannel.c index 9917c40e..ed1ff39a 100644 --- a/veejay-current/veejay-server/libvje/effects/rgbchannel.c +++ b/veejay-current/veejay-server/libvje/effects/rgbchannel.c @@ -17,12 +17,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include + +#include "common.h" #include -#include #include #include #include "rgbchannel.h" @@ -55,8 +52,10 @@ vj_effect *rgbchannel_init(int w, int h) return ve; } -void rgbchannel_apply( VJFrame *frame, int width, int height, int chr, int chg , int chb) +void rgbchannel_apply( VJFrame *frame, int chr, int chg , int chb) { + const unsigned int width = frame->width; + const unsigned int height = frame->height; int row_stride = width * 4; int x,y; uint8_t *rgba = frame->data[0]; diff --git a/veejay-current/veejay-server/libvje/effects/rgbchannel.h b/veejay-current/veejay-server/libvje/effects/rgbchannel.h index 1a82ea92..04b10293 100644 --- a/veejay-current/veejay-server/libvje/effects/rgbchannel.h +++ b/veejay-current/veejay-server/libvje/effects/rgbchannel.h @@ -20,10 +20,6 @@ #ifndef RGBCHANNEL_H #define RGBCHANNEL_H -#include -#include -#include - vj_effect *rgbchannel_init(int w, int h); -void rgbchannel_apply( VJFrame *frame, int width, int height, int r, int g, int b); +void rgbchannel_apply( VJFrame *frame, int r, int g, int b); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index 2c06284a..c678897c 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -480,7 +480,7 @@ extern void picinpic_apply( void *user_data, VJFrame *frame, VJFrame *frame2, int x1, int y1, int width, int height); extern void threshold_apply( VJFrame *frame, VJFrame *frame2, int threshold, int reverse ); extern void motionmap_apply( VJFrame *frame, int threshold, int reverse, int draw, int his, int op, int ip, int la, int ad ); -extern void rgbchannel_apply( VJFrame *frame, int width, int height, int chr, int chg , int chb); +extern void rgbchannel_apply( VJFrame *frame, int chr, int chg , int chb); extern void differencemap_apply( VJFrame *f, VJFrame *f2, int w, int h, int t1, int rev, int show ); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index 48f48367..ea98068c 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -349,7 +349,7 @@ static void vj_effman_apply_image_effect( bathroom_apply(frames[0], arg[0], arg[1], arg[2], arg[3]); break; case VJ_IMAGE_EFFECT_RGBCHANNEL: - rgbchannel_apply(frames[0],frames[0]->width,frames[0]->height,arg[0],arg[1],arg[2]); + rgbchannel_apply(frames[0],arg[0],arg[1],arg[2]); break; case VJ_IMAGE_EFFECT_ZOOM: zoom_apply(frames[0], arg[0], arg[1], arg[2], arg[3], arg[4]);