yuv: patched to compile.
authorRyan C. Gordon <icculus@icculus.org>
Sat, 17 Feb 2018 20:18:48 -0500
changeset 1188065634e8189f0
parent 11879 c3a05f3b1f8b
child 11881 ecddbd9fe6b5
yuv: patched to compile.
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 20:10:13 2018 -0500
     1.2 +++ b/src/video/yuv2rgb/yuv_rgb.c	Sat Feb 17 20:18:48 2018 -0500
     1.3 @@ -622,13 +622,13 @@
     1.4  	uint32_t xpos, ypos;
     1.5  	for(ypos=0; ypos<(height-1); ypos+=2)
     1.6  	{
     1.7 -		const uint8_t *rgb_ptr1=RGB+y*RGB_stride,
     1.8 -			*rgb_ptr2=RGB+(y+1)*RGB_stride;
     1.9 +		const uint8_t *rgb_ptr1=RGB+ypos*RGB_stride,
    1.10 +			*rgb_ptr2=RGB+(ypos+1)*RGB_stride;
    1.11  		
    1.12 -		uint8_t *y_ptr1=Y+y*Y_stride,
    1.13 -			*y_ptr2=Y+(y+1)*Y_stride,
    1.14 -			*u_ptr=U+(y/2)*UV_stride,
    1.15 -			*v_ptr=V+(y/2)*UV_stride;
    1.16 +		uint8_t *y_ptr1=Y+ypos*Y_stride,
    1.17 +			*y_ptr2=Y+(ypos+1)*Y_stride,
    1.18 +			*u_ptr=U+(ypos/2)*UV_stride,
    1.19 +			*v_ptr=V+(ypos/2)*UV_stride;
    1.20  		
    1.21  		for(xpos=0; xpos<(width-31); xpos+=32)
    1.22  		{
    1.23 @@ -658,13 +658,13 @@
    1.24  	uint32_t xpos, ypos;
    1.25  	for(ypos=0; ypos<(height-1); ypos+=2)
    1.26  	{
    1.27 -		const uint8_t *rgb_ptr1=RGB+y*RGB_stride,
    1.28 -			*rgb_ptr2=RGB+(y+1)*RGB_stride;
    1.29 +		const uint8_t *rgb_ptr1=RGB+ypos*RGB_stride,
    1.30 +			*rgb_ptr2=RGB+(ypos+1)*RGB_stride;
    1.31  		
    1.32 -		uint8_t *y_ptr1=Y+y*Y_stride,
    1.33 -			*y_ptr2=Y+(y+1)*Y_stride,
    1.34 -			*u_ptr=U+(y/2)*UV_stride,
    1.35 -			*v_ptr=V+(y/2)*UV_stride;
    1.36 +		uint8_t *y_ptr1=Y+ypos*Y_stride,
    1.37 +			*y_ptr2=Y+(ypos+1)*Y_stride,
    1.38 +			*u_ptr=U+(ypos/2)*UV_stride,
    1.39 +			*v_ptr=V+(ypos/2)*UV_stride;
    1.40  		
    1.41  		for(xpos=0; xpos<(width-31); xpos+=32)
    1.42  		{
     2.1 --- a/src/video/yuv2rgb/yuv_rgb_sse_func.h	Sat Feb 17 20:10:13 2018 -0500
     2.2 +++ b/src/video/yuv2rgb/yuv_rgb_sse_func.h	Sat Feb 17 20:18:48 2018 -0500
     2.3 @@ -419,13 +419,13 @@
     2.4  		uint32_t xpos, ypos;
     2.5  		for(ypos=0; ypos<(height-(uv_y_sample_interval-1)); ypos+=uv_y_sample_interval)
     2.6  		{
     2.7 -			const uint8_t *y_ptr1=Y+y*Y_stride,
     2.8 -				*y_ptr2=Y+(y+1)*Y_stride,
     2.9 -				*u_ptr=U+(y/uv_y_sample_interval)*UV_stride,
    2.10 -				*v_ptr=V+(y/uv_y_sample_interval)*UV_stride;
    2.11 +			const uint8_t *y_ptr1=Y+ypos*Y_stride,
    2.12 +				*y_ptr2=Y+(ypos+1)*Y_stride,
    2.13 +				*u_ptr=U+(ypos/uv_y_sample_interval)*UV_stride,
    2.14 +				*v_ptr=V+(ypos/uv_y_sample_interval)*UV_stride;
    2.15  			
    2.16 -			uint8_t *rgb_ptr1=RGB+y*RGB_stride,
    2.17 -				*rgb_ptr2=RGB+(y+1)*RGB_stride;
    2.18 +			uint8_t *rgb_ptr1=RGB+ypos*RGB_stride,
    2.19 +				*rgb_ptr2=RGB+(ypos+1)*RGB_stride;
    2.20  			
    2.21  			for(xpos=0; xpos<(width-31); xpos+=32)
    2.22  			{
    2.23 @@ -451,11 +451,11 @@
    2.24  		/* Catch the last line, if needed */
    2.25  		if (uv_y_sample_interval == 2 && ypos == (height-1))
    2.26  		{
    2.27 -			const uint8_t *y_ptr=Y+y*Y_stride,
    2.28 -				*u_ptr=U+(y/uv_y_sample_interval)*UV_stride,
    2.29 -				*v_ptr=V+(y/uv_y_sample_interval)*UV_stride;
    2.30 +			const uint8_t *y_ptr=Y+ypos*Y_stride,
    2.31 +				*u_ptr=U+(ypos/uv_y_sample_interval)*UV_stride,
    2.32 +				*v_ptr=V+(ypos/uv_y_sample_interval)*UV_stride;
    2.33  			
    2.34 -			uint8_t *rgb_ptr=RGB+y*RGB_stride;
    2.35 +			uint8_t *rgb_ptr=RGB+ypos*RGB_stride;
    2.36  
    2.37  			STD_FUNCTION_NAME(width, 1, y_ptr, u_ptr, v_ptr, Y_stride, UV_stride, rgb_ptr, RGB_stride, yuv_type);
    2.38  		}