Commit 2e54e833 authored by Sam Lantinga's avatar Sam Lantinga

Fixed compiling GS YUV conversion code

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401799
parent 467c8a81
...@@ -325,7 +325,7 @@ int GS_DisplayYUVOverlay(_THIS, SDL_Overlay *overlay, SDL_Rect *src, SDL_Rect *d ...@@ -325,7 +325,7 @@ int GS_DisplayYUVOverlay(_THIS, SDL_Overlay *overlay, SDL_Rect *src, SDL_Rect *d
int lum_pitch; int lum_pitch;
int crb_pitch; int crb_pitch;
Uint32 *lum_src, *Cr_src, *Cb_src; Uint32 *lum_src, *Cr_src, *Cb_src;
Uint32 *src, *dst; Uint32 *srcp, *dstp;
unsigned int x, y; unsigned int x, y;
SDL_Surface *screen; SDL_Surface *screen;
...@@ -345,7 +345,7 @@ int GS_DisplayYUVOverlay(_THIS, SDL_Overlay *overlay, SDL_Rect *src, SDL_Rect *d ...@@ -345,7 +345,7 @@ int GS_DisplayYUVOverlay(_THIS, SDL_Overlay *overlay, SDL_Rect *src, SDL_Rect *d
SDL_SetError("Unsupported YUV format in blit (?)"); SDL_SetError("Unsupported YUV format in blit (?)");
return(-1); return(-1);
} }
dst = (Uint32 *)hwdata->ipu_imem; dstp = (Uint32 *)hwdata->ipu_imem;
lum_pitch = overlay->w/4; lum_pitch = overlay->w/4;
crb_pitch = (overlay->w/2)/4; crb_pitch = (overlay->w/2)/4;
...@@ -355,28 +355,28 @@ int GS_DisplayYUVOverlay(_THIS, SDL_Overlay *overlay, SDL_Rect *src, SDL_Rect *d ...@@ -355,28 +355,28 @@ int GS_DisplayYUVOverlay(_THIS, SDL_Overlay *overlay, SDL_Rect *src, SDL_Rect *d
Cr_src = Cr; Cr_src = Cr;
Cb_src = Cb; Cb_src = Cb;
for ( w=overlay->w/16; w; --w ) { for ( w=overlay->w/16; w; --w ) {
src = lum_src; srcp = lum_src;
for ( i=0; i<16; ++i ) { for ( i=0; i<16; ++i ) {
dst[0] = src[0]; dstp[0] = srcp[0];
dst[1] = src[1]; dstp[1] = srcp[1];
dst[2] = src[2]; dstp[2] = srcp[2];
dst[3] = src[3]; dstp[3] = srcp[3];
src += lum_pitch; srcp += lum_pitch;
dst += 4; dstp += 4;
} }
src = Cb_src; srcp = Cb_src;
for ( i=0; i<8; ++i ) { for ( i=0; i<8; ++i ) {
dst[0] = src[0]; dstp[0] = srcp[0];
dst[1] = src[1]; dstp[1] = srcp[1];
src += crb_pitch; srcp += crb_pitch;
dst += 2; dstp += 2;
} }
src = Cr_src; srcp = Cr_src;
for ( i=0; i<8; ++i ) { for ( i=0; i<8; ++i ) {
dst[0] = src[0]; dstp[0] = srcp[0];
dst[1] = src[1]; dstp[1] = srcp[1];
src += crb_pitch; srcp += crb_pitch;
dst += 2; dstp += 2;
} }
lum_src += 16 / 4; lum_src += 16 / 4;
Cb_src += 8 / 4; Cb_src += 8 / 4;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment