[Commits] SDL: yuv: patched to compile.

libsdl.org revision control commits-owner at libsdl.org
Sat Feb 17 17:18:53 PST 2018


details:   https://hg.libsdl.org/SDL/rev/65634e8189f0
changeset: 11880:65634e8189f0
user:      Ryan C. Gordon <icculus at icculus.org>
date:      Sat Feb 17 20:18:48 2018 -0500
description:
yuv: patched to compile.

diffstat:

 src/video/yuv2rgb/yuv_rgb.c          |  24 ++++++++++++------------
 src/video/yuv2rgb/yuv_rgb_sse_func.h |  20 ++++++++++----------
 2 files changed, 22 insertions(+), 22 deletions(-)

diffs (82 lines):

diff -r c3a05f3b1f8b -r 65634e8189f0 src/video/yuv2rgb/yuv_rgb.c
--- a/src/video/yuv2rgb/yuv_rgb.c	Sat Feb 17 20:10:13 2018 -0500
+++ b/src/video/yuv2rgb/yuv_rgb.c	Sat Feb 17 20:18:48 2018 -0500
@@ -622,13 +622,13 @@
 	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;
+		const uint8_t *rgb_ptr1=RGB+ypos*RGB_stride,
+			*rgb_ptr2=RGB+(ypos+1)*RGB_stride;
 		
-		uint8_t *y_ptr1=Y+y*Y_stride,
-			*y_ptr2=Y+(y+1)*Y_stride,
-			*u_ptr=U+(y/2)*UV_stride,
-			*v_ptr=V+(y/2)*UV_stride;
+		uint8_t *y_ptr1=Y+ypos*Y_stride,
+			*y_ptr2=Y+(ypos+1)*Y_stride,
+			*u_ptr=U+(ypos/2)*UV_stride,
+			*v_ptr=V+(ypos/2)*UV_stride;
 		
 		for(xpos=0; xpos<(width-31); xpos+=32)
 		{
@@ -658,13 +658,13 @@
 	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;
+		const uint8_t *rgb_ptr1=RGB+ypos*RGB_stride,
+			*rgb_ptr2=RGB+(ypos+1)*RGB_stride;
 		
-		uint8_t *y_ptr1=Y+y*Y_stride,
-			*y_ptr2=Y+(y+1)*Y_stride,
-			*u_ptr=U+(y/2)*UV_stride,
-			*v_ptr=V+(y/2)*UV_stride;
+		uint8_t *y_ptr1=Y+ypos*Y_stride,
+			*y_ptr2=Y+(ypos+1)*Y_stride,
+			*u_ptr=U+(ypos/2)*UV_stride,
+			*v_ptr=V+(ypos/2)*UV_stride;
 		
 		for(xpos=0; xpos<(width-31); xpos+=32)
 		{
diff -r c3a05f3b1f8b -r 65634e8189f0 src/video/yuv2rgb/yuv_rgb_sse_func.h
--- a/src/video/yuv2rgb/yuv_rgb_sse_func.h	Sat Feb 17 20:10:13 2018 -0500
+++ b/src/video/yuv2rgb/yuv_rgb_sse_func.h	Sat Feb 17 20:18:48 2018 -0500
@@ -419,13 +419,13 @@
 		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,
-				*u_ptr=U+(y/uv_y_sample_interval)*UV_stride,
-				*v_ptr=V+(y/uv_y_sample_interval)*UV_stride;
+			const uint8_t *y_ptr1=Y+ypos*Y_stride,
+				*y_ptr2=Y+(ypos+1)*Y_stride,
+				*u_ptr=U+(ypos/uv_y_sample_interval)*UV_stride,
+				*v_ptr=V+(ypos/uv_y_sample_interval)*UV_stride;
 			
-			uint8_t *rgb_ptr1=RGB+y*RGB_stride,
-				*rgb_ptr2=RGB+(y+1)*RGB_stride;
+			uint8_t *rgb_ptr1=RGB+ypos*RGB_stride,
+				*rgb_ptr2=RGB+(ypos+1)*RGB_stride;
 			
 			for(xpos=0; xpos<(width-31); xpos+=32)
 			{
@@ -451,11 +451,11 @@
 		/* Catch the last line, if needed */
 		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,
-				*v_ptr=V+(y/uv_y_sample_interval)*UV_stride;
+			const uint8_t *y_ptr=Y+ypos*Y_stride,
+				*u_ptr=U+(ypos/uv_y_sample_interval)*UV_stride,
+				*v_ptr=V+(ypos/uv_y_sample_interval)*UV_stride;
 			
-			uint8_t *rgb_ptr=RGB+y*RGB_stride;
+			uint8_t *rgb_ptr=RGB+ypos*RGB_stride;
 
 			STD_FUNCTION_NAME(width, 1, y_ptr, u_ptr, v_ptr, Y_stride, UV_stride, rgb_ptr, RGB_stride, yuv_type);
 		}


More information about the commits mailing list