[vlc-commits] video_filter: ball: use C99 loop declarations
Tristan Matthews
git at videolan.org
Mon Aug 31 20:11:05 CEST 2015
vlc | branch: master | Tristan Matthews <tmatth at videolan.org> | Mon Aug 31 13:51:12 2015 -0400| [31a9797f316c9f85693bbd4cd4688fa873f6a10f] | committer: Tristan Matthews
video_filter: ball: use C99 loop declarations
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=31a9797f316c9f85693bbd4cd4688fa873f6a10f
---
modules/video_filter/ball.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/modules/video_filter/ball.c b/modules/video_filter/ball.c
index c5584e7..e057ae8 100644
--- a/modules/video_filter/ball.c
+++ b/modules/video_filter/ball.c
@@ -484,10 +484,9 @@ static void GaussianConvolution( picture_t *p_inpic, uint32_t *p_smooth )
const int i_src_visible = p_inpic->p[Y_PLANE].i_visible_pitch;
const int i_numLines = p_inpic->p[Y_PLANE].i_visible_lines;
- int x,y;
- for( y = 2; y < i_numLines - 2; y++ )
+ for( int y = 2; y < i_numLines - 2; y++ )
{
- for( x = 2; x < i_src_visible - 2; x++ )
+ for( int x = 2; x < i_src_visible - 2; x++ )
{
p_smooth[y*i_src_visible+x] = (uint32_t)(
/* 2 rows up */
@@ -609,9 +608,9 @@ static void FilterBall( filter_t *p_filter, picture_t *p_inpic,
| -2 0 2 | and | 0 0 0 |
| -1 0 1 | | -1 -2 -1 | */
- for( y = 1; y < i_numLines - 1; y++ )
+ for( int y = 1; y < i_numLines - 1; y++ )
{
- for( x = 1; x < i_numCols - 1; x++ )
+ for( int x = 1; x < i_numCols - 1; x++ )
{
p_grad_x[ y * i_numCols + x ] =
@@ -634,9 +633,9 @@ static void FilterBall( filter_t *p_filter, picture_t *p_inpic,
if( p_sys->b_edgeVisible )
{
/* Display the edges. */
- for( y = 1; y < i_numLines - 1; y++ )
+ for( int y = 1; y < i_numLines - 1; y++ )
{
- for( x = 1; x < i_numCols - 1; x++ )
+ for( int x = 1; x < i_numCols - 1; x++ )
{
if( abs( p_grad_x[ y * i_numCols + x ] )
+ abs( p_grad_y[ y * i_numCols + x ] )
More information about the vlc-commits
mailing list