mirror of
https://github.com/game-stop/veejay.git
synced 2026-01-06 23:15:30 +01:00
Libvje / refactor : ripple
* f->w, f->h , f->len
This commit is contained in:
@@ -116,8 +116,11 @@ void ripple_free() {
|
||||
}
|
||||
|
||||
|
||||
void ripple_apply(VJFrame *frame, int width, int height, int _w, int _a , int _att ) {
|
||||
void ripple_apply(VJFrame *frame, int _w, int _a , int _att ) {
|
||||
|
||||
const int width = frame->width;
|
||||
const int height = frame->height;
|
||||
const uint32_t len = frame->len;
|
||||
double wp2 = width * 0.5;
|
||||
double hp2 = height * 0.5;
|
||||
int x,y,dx,dy,a=0,sx=0,sy=0,angle=0;
|
||||
@@ -149,7 +152,7 @@ void ripple_apply(VJFrame *frame, int width, int height, int _w, int _a , int _a
|
||||
have_calc_data = 0;
|
||||
}
|
||||
|
||||
int strides[4] = { width * height, width * height, width * height,0 };
|
||||
int strides[4] = { len, len, len,0 };
|
||||
vj_frame_copy( frame->data, ripple_data , strides );
|
||||
if (have_calc_data==0) {
|
||||
for(y=0; y < height-1;y++) {
|
||||
|
||||
@@ -28,5 +28,5 @@
|
||||
vj_effect *ripple_init(int w, int h);
|
||||
void ripple_free();
|
||||
int ripple_malloc(int w, int h);
|
||||
void ripple_apply(VJFrame *frame, int width, int height, int waves, int ampli,int atten);
|
||||
void ripple_apply(VJFrame *frame, int waves, int ampli,int atten);
|
||||
#endif
|
||||
|
||||
@@ -412,8 +412,7 @@ extern void bar_apply(VJFrame *frame, VJFrame *frame2, int d, int x1, int x2,
|
||||
extern void vbar_apply(VJFrame *frame, VJFrame *frame2, int d, int x1, int x2,
|
||||
int t1, int t2);
|
||||
extern void average_apply(VJFrame *frame, int val, int mode);
|
||||
|
||||
extern void ripple_apply(VJFrame *frame, int width, int height, int waves, int ampli,int atten);
|
||||
extern void ripple_apply(VJFrame *frame, int waves, int ampli,int atten);
|
||||
|
||||
extern void bathroom_apply(VJFrame *frame, int width, int height, int mode, int val, int x0, int x1);
|
||||
|
||||
|
||||
@@ -349,7 +349,7 @@ static void vj_effman_apply_image_effect(
|
||||
average_apply(frames[0], arg[0], arg[1]);
|
||||
break;
|
||||
case VJ_IMAGE_EFFECT_RIPPLE:
|
||||
ripple_apply(frames[0],frames[0]->width,frames[0]->height,arg[0],arg[1],arg[2]);
|
||||
ripple_apply(frames[0], arg[0], arg[1], arg[2]);
|
||||
break;
|
||||
case VJ_IMAGE_EFFECT_BGSUBTRACT:
|
||||
bgsubtract_apply( frames[0],frames[0]->width,frames[0]->height,arg[0],arg[1],arg[2],arg[3]);
|
||||
|
||||
Reference in New Issue
Block a user