From 83d5b02f47038055482691e7f22d84dd6f114f68 Mon Sep 17 00:00:00 2001 From: Tristan Matthews Date: Mon, 31 Aug 2015 11:08:57 -0400 Subject: [PATCH] video_filter: psychedelic: use C99 loop declarations --- modules/video_filter/psychedelic.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/modules/video_filter/psychedelic.c b/modules/video_filter/psychedelic.c index cbca378583..ac8bfdabc4 100644 --- a/modules/video_filter/psychedelic.c +++ b/modules/video_filter/psychedelic.c @@ -139,7 +139,6 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic ) picture_t *p_outpic; unsigned int w, h; - int x,y; uint8_t u,v; picture_t *p_converted; @@ -162,7 +161,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic ) /* chrominance */ u = p_filter->p_sys->u; v = p_filter->p_sys->v; - for( y = 0; yp[U_PLANE].i_lines; y++) + for( int y = 0; y < p_outpic->p[U_PLANE].i_lines; y++ ) { memset( p_outpic->p[U_PLANE].p_pixels+y*p_outpic->p[U_PLANE].i_pitch, @@ -195,8 +194,8 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic ) if( p_converted ) { #define copyimage( plane, b ) \ - for( y=0; yp[plane].i_visible_lines; y++) { \ - for( x=0; xp[plane].i_visible_pitch; x++) { \ + for( int y = 0; yp[plane].i_visible_lines; y++ ) { \ + for( int x = 0; xp[plane].i_visible_pitch; x++ ) { \ int nx, ny; \ if( p_filter->p_sys->yinc == 1 ) \ ny= y; \ @@ -244,7 +243,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic ) if( p_filter->p_sys->y <= 0 ) p_filter->p_sys->yinc = 1; - for( y = 0; y< 16; y++ ) + for( int y = 0; y < 16; y++ ) { if( p_filter->p_sys->v == 0 && p_filter->p_sys->u != 0 ) p_filter->p_sys->u -= 1; -- 2.11.4.GIT