Libvje / refactor : magicscratcher

* frame->w , frame->h, frame->len
This commit is contained in:
[d.j.a.y] Jerome Blanchi
2016-05-02 19:20:05 +02:00
parent 1473a4128b
commit ea4b98a06a
4 changed files with 7 additions and 12 deletions

View File

@@ -104,12 +104,11 @@ static void store_mframe(uint8_t * yuv1[3], int w, int h, int n, int no_reverse)
}
void magicscratcher_apply(VJFrame *frame,
int width, int height, int mode, int n,
int no_reverse)
void magicscratcher_apply(VJFrame *frame, int mode, int n, int no_reverse)
{
unsigned int x, len = width * height;
const int width = frame->width;
const int height = frame->height;
unsigned int x, len = frame->len;
uint8_t *Y = frame->data[0];
uint8_t *Cb= frame->data[1];
uint8_t *Cr= frame->data[2];

View File

@@ -28,7 +28,5 @@
vj_effect *magicscratcher_init(int w, int h);
int magicscratcher_malloc(int w, int h);
void magicscratcher_free();
void magicscratcher_apply( VJFrame *frame,
int width, int height, int type, int nframes,
int no_reverse);
void magicscratcher_apply( VJFrame *frame, int type, int nframes, int no_reverse);
#endif

View File

@@ -380,8 +380,7 @@ extern void scratcher_apply(VJFrame *frame, int o, int n, int r);
extern void colorshift_apply(VJFrame *frame, int type, int value);
extern void reflection_apply(VJFrame *frame, int n1, int n2, int n3);
extern void distortion_apply(VJFrame *frame, int i1, int i2, int i3, int i4, int i5, int i6 );
extern void magicscratcher_apply(VJFrame *frame, int w, int h, int mode,
int nframes, int r);
extern void magicscratcher_apply(VJFrame *frame, int mode, int nframes, int r);
extern void wipe_apply(VJFrame *frame, VJFrame *frame2, int w, int h,
int inc, int opacity);
/* begin API */

View File

@@ -178,8 +178,7 @@ static void vj_effman_apply_image_effect(
break;
case VJ_IMAGE_EFFECT_MAGICSCRATCHER:
magicscratcher_apply(frames[0], frames[0]->width, frames[0]->height, arg[0],
arg[1], arg[2]);
magicscratcher_apply(frames[0], arg[0], arg[1], arg[2]);
break;
case VJ_IMAGE_EFFECT_CHROMASCRATCHER:
chromascratcher_apply(frames[0], frames[0]->width, frames[0]->height,