Libvje / refactor : colorfadergb

* frame->width, frame->height
* const int len = frame->len;
This commit is contained in:
[d.j.a.y] Jerome Blanchi
2016-05-01 12:45:45 +02:00
parent 801c5e2a44
commit cf20c4ff10
4 changed files with 5 additions and 9 deletions

View File

@@ -370,8 +370,7 @@ extern void contourextract_apply(void *ed, VJFrame *frame, int threshold,
extern void diff_apply(void *dd, VJFrame *frame, VJFrame *frame2, int threshold,
int reverse, int mode, int feather);
extern void chromamagick_apply(VJFrame *frame, VJFrame *frame2, int type, int op0);
extern void colorfadergb_apply(VJFrame *frame, int width, int height,
int opacity, int r, int g, int b);
extern void colorfadergb_apply(VJFrame *frame, int opacity, int r, int g, int b);
void lumablend_apply(VJFrame *frame, VJFrame *frame2, int width,
int height, int type, int t1, int t2, int op);

View File

@@ -61,11 +61,10 @@ vj_effect *fadecolorrgb_init(int w,int h)
return ve;
}
void colorfadergb_apply( VJFrame *frame, int width, int height,
int opacity, int r, int g, int b)
void colorfadergb_apply( VJFrame *frame, int opacity, int r, int g, int b)
{
unsigned int i, op0, op1;
unsigned int len = width * height;
const int len = frame->len;
unsigned int colorCb = 128, colorCr = 128;
unsigned int colorY;
const int uv_len = frame->uv_len;

View File

@@ -25,7 +25,6 @@
#include <stdint.h>
vj_effect *fadecolorrgb_init();
void colorfadergb_apply(VJFrame *frame, int width, int height,
int opacity, int r, int g, int b);
void colorfadergb_apply(VJFrame *frame, int opacity, int r, int g, int b);
#endif

View File

@@ -579,8 +579,7 @@ static void vj_effman_apply_video_effect( VJFrame **frames, vjp_kf *todo_info,in
todo_info->tmp[0] -= (arg[0] / arg[5]);
}
colorfadergb_apply(frames[0], frames[0]->width, frames[0]->height,
todo_info->tmp[0], arg[1], arg[2], arg[3]);
colorfadergb_apply(frames[0], todo_info->tmp[0], arg[1], arg[2], arg[3]);
break;
case VJ_VIDEO_EFFECT_FADECOLOR:
if (arg[3] == 0) {