[vlc-commits] video_filter: extract: use C99 loop declarations
Tristan Matthews
git at videolan.org
Mon Aug 31 20:11:04 CEST 2015
vlc | branch: master | Tristan Matthews <tmatth at videolan.org> | Mon Aug 31 13:30:54 2015 -0400| [5009e5bff0788e67bd9d44c207caf8cead35009c] | committer: Tristan Matthews
video_filter: extract: use C99 loop declarations
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5009e5bff0788e67bd9d44c207caf8cead35009c
---
modules/video_filter/extract.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/modules/video_filter/extract.c b/modules/video_filter/extract.c
index 4295315..9c0bbeb 100644
--- a/modules/video_filter/extract.c
+++ b/modules/video_filter/extract.c
@@ -257,13 +257,12 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
static void mmult( double *res, double *a, double *b )
{
- int i, j, k;
- for( i = 0; i < 3; i++ )
+ for( int i = 0; i < 3; i++ )
{
- for( j = 0; j < 3; j++ )
+ for( int j = 0; j < 3; j++ )
{
res[ i*3 + j ] = 0.;
- for( k = 0; k < 3; k++ )
+ for( int k = 0; k < 3; k++ )
{
res[ i*3 + j ] += a[ i*3 + k ] * b[ k*3 + j ];
}
@@ -297,13 +296,12 @@ static void make_projection_matrix( filter_t *p_filter, int color, int *matrix )
red*blue, green*blue, blue*blue };
double result1[9];
double result[9];
- int i;
msg_Dbg( p_filter, "red: %f", red );
msg_Dbg( p_filter, "green: %f", green );
msg_Dbg( p_filter, "blue: %f", blue );
mmult( result1, rgb_matrix, right_matrix );
mmult( result, left_matrix, result1 );
- for( i = 0; i < 9; i++ )
+ for( int i = 0; i < 9; i++ )
{
matrix[i] = (int)result[i];
}
More information about the vlc-commits
mailing list