Skip to content

Commit

Permalink
yuv: fixed variable declaration shadowing warnings.
Browse files Browse the repository at this point in the history
Fixes Bugzilla #4062.
  • Loading branch information
icculus committed Feb 18, 2018
1 parent 97494f5 commit 7c0c2c2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions src/video/yuv2rgb/yuv_rgb.c
Expand Up @@ -619,8 +619,8 @@ void rgb24_yuv420_sse(uint32_t width, uint32_t height,
#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;
Expand All @@ -630,7 +630,7 @@ void rgb24_yuv420_sse(uint32_t width, uint32_t height,
*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

Expand All @@ -655,8 +655,8 @@ void rgb24_yuv420_sseu(uint32_t width, uint32_t height,
#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;
Expand All @@ -666,7 +666,7 @@ void rgb24_yuv420_sseu(uint32_t width, uint32_t height,
*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

Expand Down
8 changes: 4 additions & 4 deletions src/video/yuv2rgb/yuv_rgb_sse_func.h
Expand Up @@ -416,8 +416,8 @@ void SSE_FUNCTION_NAME(uint32_t width, uint32_t height,
#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,
Expand All @@ -427,7 +427,7 @@ void SSE_FUNCTION_NAME(uint32_t width, uint32_t height,
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
{
Expand All @@ -449,7 +449,7 @@ void SSE_FUNCTION_NAME(uint32_t width, uint32_t height,
}

/* 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,
Expand Down

0 comments on commit 7c0c2c2

Please sign in to comment.