yuv: fixed variable declaration shadowing warnings.
authorRyan C. Gordon <icculus@icculus.org>
Sat, 17 Feb 2018 20:10:13 -0500
changeset 11879c3a05f3b1f8b
parent 11878 625cdd85edfe
child 11880 65634e8189f0
yuv: fixed variable declaration shadowing warnings.

Fixes Bugzilla #4062.
src/video/yuv2rgb/yuv_rgb.c
src/video/yuv2rgb/yuv_rgb_sse_func.h
     1.1 --- a/src/video/yuv2rgb/yuv_rgb.c	Sat Feb 17 18:30:21 2018 -0500
     1.2 +++ b/src/video/yuv2rgb/yuv_rgb.c	Sat Feb 17 20:10:13 2018 -0500
     1.3 @@ -619,8 +619,8 @@
     1.4  	#define SAVE_SI128 _mm_stream_si128
     1.5  	const RGB2YUVParam *const param = &(RGB2YUV[yuv_type]);
     1.6  	
     1.7 -	uint32_t x, y;
     1.8 -	for(y=0; y<(height-1); y+=2)
     1.9 +	uint32_t xpos, ypos;
    1.10 +	for(ypos=0; ypos<(height-1); ypos+=2)
    1.11  	{
    1.12  		const uint8_t *rgb_ptr1=RGB+y*RGB_stride,
    1.13  			*rgb_ptr2=RGB+(y+1)*RGB_stride;
    1.14 @@ -630,7 +630,7 @@
    1.15  			*u_ptr=U+(y/2)*UV_stride,
    1.16  			*v_ptr=V+(y/2)*UV_stride;
    1.17  		
    1.18 -		for(x=0; x<(width-31); x+=32)
    1.19 +		for(xpos=0; xpos<(width-31); xpos+=32)
    1.20  		{
    1.21  			RGB2YUV_32
    1.22  			
    1.23 @@ -655,8 +655,8 @@
    1.24  	#define SAVE_SI128 _mm_storeu_si128
    1.25  	const RGB2YUVParam *const param = &(RGB2YUV[yuv_type]);
    1.26  	
    1.27 -	uint32_t x, y;
    1.28 -	for(y=0; y<(height-1); y+=2)
    1.29 +	uint32_t xpos, ypos;
    1.30 +	for(ypos=0; ypos<(height-1); ypos+=2)
    1.31  	{
    1.32  		const uint8_t *rgb_ptr1=RGB+y*RGB_stride,
    1.33  			*rgb_ptr2=RGB+(y+1)*RGB_stride;
    1.34 @@ -666,7 +666,7 @@
    1.35  			*u_ptr=U+(y/2)*UV_stride,
    1.36  			*v_ptr=V+(y/2)*UV_stride;
    1.37  		
    1.38 -		for(x=0; x<(width-31); x+=32)
    1.39 +		for(xpos=0; xpos<(width-31); xpos+=32)
    1.40  		{
    1.41  			RGB2YUV_32
    1.42  			
     2.1 --- a/src/video/yuv2rgb/yuv_rgb_sse_func.h	Sat Feb 17 18:30:21 2018 -0500
     2.2 +++ b/src/video/yuv2rgb/yuv_rgb_sse_func.h	Sat Feb 17 20:10:13 2018 -0500
     2.3 @@ -416,8 +416,8 @@
     2.4  #endif
     2.5  
     2.6  	if (width >= 32) {
     2.7 -		uint32_t x, y;
     2.8 -		for(y=0; y<(height-(uv_y_sample_interval-1)); y+=uv_y_sample_interval)
     2.9 +		uint32_t xpos, ypos;
    2.10 +		for(ypos=0; ypos<(height-(uv_y_sample_interval-1)); ypos+=uv_y_sample_interval)
    2.11  		{
    2.12  			const uint8_t *y_ptr1=Y+y*Y_stride,
    2.13  				*y_ptr2=Y+(y+1)*Y_stride,
    2.14 @@ -427,7 +427,7 @@
    2.15  			uint8_t *rgb_ptr1=RGB+y*RGB_stride,
    2.16  				*rgb_ptr2=RGB+(y+1)*RGB_stride;
    2.17  			
    2.18 -			for(x=0; x<(width-31); x+=32)
    2.19 +			for(xpos=0; xpos<(width-31); xpos+=32)
    2.20  			{
    2.21  				YUV2RGB_32
    2.22  				{
    2.23 @@ -449,7 +449,7 @@
    2.24  		}
    2.25  
    2.26  		/* Catch the last line, if needed */
    2.27 -		if (uv_y_sample_interval == 2 && y == (height-1))
    2.28 +		if (uv_y_sample_interval == 2 && ypos == (height-1))
    2.29  		{
    2.30  			const uint8_t *y_ptr=Y+y*Y_stride,
    2.31  				*u_ptr=U+(y/uv_y_sample_interval)*UV_stride,