[Commits] SDL: yuv: fixed variable declaration shadowing warnings.

libsdl.org revision control commits-owner at libsdl.org
Sat Feb 17 17:10:55 PST 2018


details:   https://hg.libsdl.org/SDL/rev/c3a05f3b1f8b
changeset: 11879:c3a05f3b1f8b
user:      Ryan C. Gordon <icculus at icculus.org>
date:      Sat Feb 17 20:10:13 2018 -0500
description:
yuv: fixed variable declaration shadowing warnings.

Fixes Bugzilla #4062.

diffstat:

 src/video/yuv2rgb/yuv_rgb.c          |  12 ++++++------
 src/video/yuv2rgb/yuv_rgb_sse_func.h |   8 ++++----
 2 files changed, 10 insertions(+), 10 deletions(-)

diffs (75 lines):

diff -r 625cdd85edfe -r c3a05f3b1f8b src/video/yuv2rgb/yuv_rgb.c
--- a/src/video/yuv2rgb/yuv_rgb.c	Sat Feb 17 18:30:21 2018 -0500
+++ b/src/video/yuv2rgb/yuv_rgb.c	Sat Feb 17 20:10:13 2018 -0500
@@ -619,8 +619,8 @@
 	#define SAVE_SI128 _mm_stream_si128
 	const RGB2YUVParam *const param = &(RGB2YUV[yuv_type]);
 	
-	uint32_t x, y;
-	for(y=0; y<(height-1); y+=2)
+	uint32_t xpos, ypos;
+	for(ypos=0; ypos<(height-1); ypos+=2)
 	{
 		const uint8_t *rgb_ptr1=RGB+y*RGB_stride,
 			*rgb_ptr2=RGB+(y+1)*RGB_stride;
@@ -630,7 +630,7 @@
 			*u_ptr=U+(y/2)*UV_stride,
 			*v_ptr=V+(y/2)*UV_stride;
 		
-		for(x=0; x<(width-31); x+=32)
+		for(xpos=0; xpos<(width-31); xpos+=32)
 		{
 			RGB2YUV_32
 			
@@ -655,8 +655,8 @@
 	#define SAVE_SI128 _mm_storeu_si128
 	const RGB2YUVParam *const param = &(RGB2YUV[yuv_type]);
 	
-	uint32_t x, y;
-	for(y=0; y<(height-1); y+=2)
+	uint32_t xpos, ypos;
+	for(ypos=0; ypos<(height-1); ypos+=2)
 	{
 		const uint8_t *rgb_ptr1=RGB+y*RGB_stride,
 			*rgb_ptr2=RGB+(y+1)*RGB_stride;
@@ -666,7 +666,7 @@
 			*u_ptr=U+(y/2)*UV_stride,
 			*v_ptr=V+(y/2)*UV_stride;
 		
-		for(x=0; x<(width-31); x+=32)
+		for(xpos=0; xpos<(width-31); xpos+=32)
 		{
 			RGB2YUV_32
 			
diff -r 625cdd85edfe -r c3a05f3b1f8b src/video/yuv2rgb/yuv_rgb_sse_func.h
--- a/src/video/yuv2rgb/yuv_rgb_sse_func.h	Sat Feb 17 18:30:21 2018 -0500
+++ b/src/video/yuv2rgb/yuv_rgb_sse_func.h	Sat Feb 17 20:10:13 2018 -0500
@@ -416,8 +416,8 @@
 #endif
 
 	if (width >= 32) {
-		uint32_t x, y;
-		for(y=0; y<(height-(uv_y_sample_interval-1)); y+=uv_y_sample_interval)
+		uint32_t xpos, ypos;
+		for(ypos=0; ypos<(height-(uv_y_sample_interval-1)); ypos+=uv_y_sample_interval)
 		{
 			const uint8_t *y_ptr1=Y+y*Y_stride,
 				*y_ptr2=Y+(y+1)*Y_stride,
@@ -427,7 +427,7 @@
 			uint8_t *rgb_ptr1=RGB+y*RGB_stride,
 				*rgb_ptr2=RGB+(y+1)*RGB_stride;
 			
-			for(x=0; x<(width-31); x+=32)
+			for(xpos=0; xpos<(width-31); xpos+=32)
 			{
 				YUV2RGB_32
 				{
@@ -449,7 +449,7 @@
 		}
 
 		/* Catch the last line, if needed */
-		if (uv_y_sample_interval == 2 && y == (height-1))
+		if (uv_y_sample_interval == 2 && ypos == (height-1))
 		{
 			const uint8_t *y_ptr=Y+y*Y_stride,
 				*u_ptr=U+(y/uv_y_sample_interval)*UV_stride,


More information about the commits mailing list