Libvje / refactor : noisepencil

* frame->width, frame->height
This commit is contained in:
[d.j.a.y] Jerome Blanchi
2016-04-20 21:27:45 +02:00
parent cbc20275ac
commit 202dd42d14
4 changed files with 15 additions and 13 deletions

View File

@@ -311,19 +311,23 @@ static void noisepencil_5_apply(uint8_t *src[3], int width, int height, int coee
/* with min_t -> max_t select the threshold to 'noise ' */
void noisepencil_apply(VJFrame *frame, int width, int height, int type, int coeef, int min_t,
int max_t) {
void noisepencil_apply(VJFrame *frame, int type, int coeef, int min_t, int max_t)
{
switch(type) {
case 0:
noisepencil_1_apply(frame->data,width,height,coeef,min_t,max_t); break;
noisepencil_1_apply(frame->data,frame->width,frame->height,coeef,min_t,max_t);
break;
case 1:
noisepencil_2_apply(frame->data,width,height,coeef,min_t,max_t); break;
noisepencil_2_apply(frame->data,frame->width,frame->height,coeef,min_t,max_t);
break;
case 2:
noisepencil_3_apply(frame->data,width,height,coeef,min_t,max_t); break;
noisepencil_3_apply(frame->data,frame->width,frame->height,coeef,min_t,max_t);
break;
case 3:
noisepencil_4_apply(frame->data,width,height,coeef,min_t,max_t); break;
noisepencil_4_apply(frame->data,frame->width,frame->height,coeef,min_t,max_t);
break;
case 4:
noisepencil_5_apply(frame->data,width,height,coeef,min_t,max_t); break;
noisepencil_5_apply(frame->data,frame->width,frame->height,coeef,min_t,max_t);
break;
}
}

View File

@@ -27,6 +27,6 @@
vj_effect *noisepencil_init (int w, int h);
void noisepencil_free();
int noisepencil_malloc(int w, int h);
void noisepencil_apply( VJFrame *frame, int w, int h, int t, int n, int a, int b);
void noisepencil_apply( VJFrame *frame, int t, int n, int a, int b);
#endif

View File

@@ -332,8 +332,7 @@ extern void transblend_apply(VJFrame *frame, VJFrame *frame2, int mode,
int x1, int y1, int x2, int y2);
extern void borders_apply(VJFrame *frame, int size, int color);
extern void frameborder_apply(VJFrame *frame, VJFrame *frame2, int size);
extern void noisepencil_apply(VJFrame *frame, int width, int height,
int a, int b, int c , int d );
extern void noisepencil_apply(VJFrame *frame, int a, int b, int c , int d );
extern void rawman_apply(VJFrame *frame, unsigned int width,
unsigned int height, unsigned int mode,

View File

@@ -129,8 +129,7 @@ static void vj_effman_apply_image_effect(
pencilsketch_apply(frames[0],frames[0]->width,frames[0]->height,arg[0],arg[1],arg[2],arg[3]);
break;
case VJ_IMAGE_EFFECT_NOISEPENCIL:
noisepencil_apply(frames[0],frames[0]->width,frames[0]->height,
arg[0],arg[1],arg[2],arg[3]);
noisepencil_apply(frames[0], arg[0], arg[1], arg[2], arg[3]);
break;
case VJ_IMAGE_EFFECT_CALI:
cali_apply( vj_effects[entry]->user_data,frames[0], frames[0]->width,frames[0]->height,arg[0], arg[1] );