diff options
Diffstat (limited to 'games-emulation/xmame/files/0.78.1-big_endian.patch')
-rw-r--r-- | games-emulation/xmame/files/0.78.1-big_endian.patch | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/games-emulation/xmame/files/0.78.1-big_endian.patch b/games-emulation/xmame/files/0.78.1-big_endian.patch new file mode 100644 index 000000000000..3314d3ef4900 --- /dev/null +++ b/games-emulation/xmame/files/0.78.1-big_endian.patch @@ -0,0 +1,102 @@ +--- src/unix/video-drivers/x11_window.c 2003-12-27 00:29:16.000000000 +0100 ++++ src/unix/video-drivers/x11_window.c 2004-02-03 23:04:22.000000000 +0100 +@@ -1463,7 +1463,11 @@ + + /* Storing this data in YUYV order simplifies using the data for + YUY2, both with and without smoothing... */ ++#ifdef LSB_FIRST + hwscale_yuvlookup[i]=(y<<0) | (u<<8) | (y<<16) | (v<<24); ++#else ++ hwscale_yuvlookup[i]=(y<<24) | (u<<16) | (y<<8) | (v<<0); ++#endif + } + } + } +--- src/unix/video-drivers/blit.h 2003-12-27 00:29:16.000000000 +0100 ++++ src/unix/video-drivers/blit.h 2004-02-04 01:17:56.000000000 +0100 +@@ -72,6 +72,7 @@ + }\ + } + #elif defined BLIT_HWSCALE_YUY2 ++#ifdef LSB_FIRST /* x86 etc */ + #define COPY_LINE2(SRC, END, DST) \ + {\ + SRC_PIXEL *src = SRC; \ +@@ -89,6 +90,25 @@ + *dst++=y|y2|((uv1+uv2)&0xff00ff00);\ + } \ + } ++#else /* ppc etc */ ++#define COPY_LINE2(SRC, END, DST) \ ++ {\ ++ SRC_PIXEL *src = SRC; \ ++ SRC_PIXEL *end = END; \ ++ unsigned long *dst = (unsigned long *)DST; \ ++ unsigned int r,y,y2,uv1,uv2; \ ++ for(;src<end;) \ ++ { \ ++ r=INDIRECT[*src++]; \ ++ y=r&0xff000000 ; \ ++ uv1=(r&0x00ff00ff); \ ++ r=INDIRECT[*src++]; \ ++ uv2=(uv1+(r&0x00ff00ff))>>1; \ ++ y2=r&0xff00; \ ++ *dst++=y|y2|(uv2&0x00ff00ff); \ ++ } \ ++ } ++#endif + #else /* normal indirect */ + #define COPY_LINE2(SRC, END, DST) \ + {\ +@@ -428,24 +448,43 @@ + *(dst+2) = (INDIRECT[*(src+2)]>>16) | (INDIRECT[*(src+3)]<< 8); \ + } + #elif defined BLIT_HWSCALE_YUY2 ++#ifdef LSB_FIRST /* x86 etc */ + #define COPY_LINE2(SRC, END, DST) \ + {\ + SRC_PIXEL *src = SRC; \ + SRC_PIXEL *end = END; \ + unsigned long *dst = (unsigned long *)DST; \ +- unsigned int r,r2,y,y2,uv1,uv2; \ ++ unsigned int r,y,y2,uv1,uv2; \ + for(;src<end;) \ + { \ + r=INDIRECT[*src++]; \ +- r2=INDIRECT[*src++]; \ +- y=r&0xff; \ +- y2=r2&0xff0000; \ ++ y=r&255; \ + uv1=(r&0xff00ff00)>>1; \ +- uv2=(r2&0xff00ff00)>>1; \ +- uv1=(uv1+uv2)&0xff00ff00; \ +- *dst++=y|y2|uv1; \ ++ r=INDIRECT[*src++]; \ ++ uv2=(r&0xff00ff00)>>1; \ ++ y2=r&0xff0000; \ ++ *dst++=y|y2|((uv1+uv2)&0xff00ff00);\ ++ } \ ++ } ++#else /* ppc etc */ ++#define COPY_LINE2(SRC, END, DST) \ ++ {\ ++ SRC_PIXEL *src = SRC; \ ++ SRC_PIXEL *end = END; \ ++ unsigned long *dst = (unsigned long *)DST; \ ++ unsigned int r,y,y2,uv1,uv2; \ ++ for(;src<end;) \ ++ { \ ++ r=INDIRECT[*src++]; \ ++ y=r&0xff000000 ; \ ++ uv1=(r&0x00ff00ff); \ ++ r=INDIRECT[*src++]; \ ++ uv2=(uv1+(r&0x00ff00ff))>>1; \ ++ y2=r&0xff00; \ ++ *dst++=y|y2|(uv2&0x00ff00ff); \ + } \ + } ++#endif + #else /* normal indirect */ + #define COPY_LINE2(SRC, END, DST) \ + SRC_PIXEL *src = SRC; \ + |