issue #42, loop forever in pixelate

This commit is contained in:
c0ntrol
2016-03-25 10:07:56 +01:00
parent 217f406c63
commit 29f5d4a29c

View File

@@ -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];