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, extern void diff_apply(void *dd, VJFrame *frame, VJFrame *frame2, int threshold,
int reverse, int mode, int feather); int reverse, int mode, int feather);
extern void chromamagick_apply(VJFrame *frame, VJFrame *frame2, int type, int op0); extern void chromamagick_apply(VJFrame *frame, VJFrame *frame2, int type, int op0);
extern void colorfadergb_apply(VJFrame *frame, int width, int height, extern void colorfadergb_apply(VJFrame *frame, int opacity, int r, int g, int b);
int opacity, int r, int g, int b);
void lumablend_apply(VJFrame *frame, VJFrame *frame2, int width, void lumablend_apply(VJFrame *frame, VJFrame *frame2, int width,
int height, int type, int t1, int t2, int op); 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; return ve;
} }
void colorfadergb_apply( VJFrame *frame, int width, int height, void colorfadergb_apply( VJFrame *frame, int opacity, int r, int g, int b)
int opacity, int r, int g, int b)
{ {
unsigned int i, op0, op1; unsigned int i, op0, op1;
unsigned int len = width * height; const int len = frame->len;
unsigned int colorCb = 128, colorCr = 128; unsigned int colorCb = 128, colorCr = 128;
unsigned int colorY; unsigned int colorY;
const int uv_len = frame->uv_len; const int uv_len = frame->uv_len;

View File

@@ -25,7 +25,6 @@
#include <stdint.h> #include <stdint.h>
vj_effect *fadecolorrgb_init(); vj_effect *fadecolorrgb_init();
void colorfadergb_apply(VJFrame *frame, int width, int height, void colorfadergb_apply(VJFrame *frame, int opacity, int r, int g, int b);
int opacity, int r, int g, int b);
#endif #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]); todo_info->tmp[0] -= (arg[0] / arg[5]);
} }
colorfadergb_apply(frames[0], frames[0]->width, frames[0]->height, colorfadergb_apply(frames[0], todo_info->tmp[0], arg[1], arg[2], arg[3]);
todo_info->tmp[0], arg[1], arg[2], arg[3]);
break; break;
case VJ_VIDEO_EFFECT_FADECOLOR: case VJ_VIDEO_EFFECT_FADECOLOR:
if (arg[3] == 0) { if (arg[3] == 0) {