mirror of
https://github.com/game-stop/veejay.git
synced 2025-12-15 20:30:00 +01:00
issue #42, loop forever in pixelate
This commit is contained in:
@@ -54,6 +54,7 @@ vj_effect *pixelate_init(int width, int height)
|
|||||||
ve->has_user =0;
|
ve->has_user =0;
|
||||||
ve->parallel = 1;
|
ve->parallel = 1;
|
||||||
ve->param_description = vje_build_param_list( ve->num_params, "Pixels");
|
ve->param_description = vje_build_param_list( ve->num_params, "Pixels");
|
||||||
|
|
||||||
return ve;
|
return ve;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,7 +64,10 @@ void pixelate_apply( VJFrame *frame, int w, int h , int vv )
|
|||||||
unsigned int len = frame->len;
|
unsigned int len = frame->len;
|
||||||
const unsigned int v = values[vv];
|
const unsigned int v = values[vv];
|
||||||
const unsigned int uv_len = (frame->ssm ? frame->len : frame->uv_len);
|
const unsigned int uv_len = (frame->ssm ? frame->len : frame->uv_len);
|
||||||
const unsigned int u_v = v >> (frame->ssm ? frame->shift_h: 1 );
|
unsigned int u_v = v >> (frame->ssm ? frame->shift_h: 1 );
|
||||||
|
if( u_v == 0 )
|
||||||
|
u_v = 1;
|
||||||
|
|
||||||
uint8_t *Y = frame->data[0];
|
uint8_t *Y = frame->data[0];
|
||||||
uint8_t *Cb= frame->data[1];
|
uint8_t *Cb= frame->data[1];
|
||||||
uint8_t *Cr= frame->data[2];
|
uint8_t *Cr= frame->data[2];
|
||||||
|
|||||||
Reference in New Issue
Block a user