X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=plugins%2Fdfxvideo%2Fdraw.c;fp=plugins%2Fdfxvideo%2Fdraw.c;h=e68f1a19ed23597fd352ee407406cc7861467091;hp=ad3f3a196ff0c4525a4144b29190b2e940ffdc31;hb=04bd10b132d06eff2a803125dc8da640be2454db;hpb=d9e2b173fb11fea4976fb0a6c5feda6b654b4b46 diff --git a/plugins/dfxvideo/draw.c b/plugins/dfxvideo/draw.c index ad3f3a19..e68f1a19 100644 --- a/plugins/dfxvideo/draw.c +++ b/plugins/dfxvideo/draw.c @@ -1053,7 +1053,7 @@ void CreateDisplay(void) //backup YUV mode //hmm, should I bother check guid == 55595659-0000-0010-8000-00aa00389b71? //and check byte order? fo[j].byte_order == LSBFirst -#ifdef __BIG_ENDIAN__ +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ if ( fo[j].type == XvYUV && fo[j].bits_per_pixel == 16 && fo[j].format == XvPacked && strncmp("YUYV", fo[j].component_order, 5) == 0 ) #else if ( fo[j].type == XvYUV && fo[j].bits_per_pixel == 16 && fo[j].format == XvPacked && strncmp("UYVY", fo[j].component_order, 5) == 0 ) @@ -1473,7 +1473,7 @@ void BlitToYUV(unsigned char * surf,int32_t x,int32_t y) U = min(abs(R * -1214 + G * -2384 + B * 3598 + 4096 + 1048576) >> 13, 240); V = min(abs(R * 3598 + G * -3013 + B * -585 + 4096 + 1048576) >> 13, 240); -#ifdef __BIG_ENDIAN__ +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ destpix[row] = Y << 24 | U << 16 | Y << 8 | V; #else destpix[row] = Y << 24 | V << 16 | Y << 8 | U; @@ -1500,7 +1500,7 @@ void BlitToYUV(unsigned char * surf,int32_t x,int32_t y) U = min(abs(R * -1214 + G * -2384 + B * 3598 + 4096 + 1048576) >> 13, 240); V = min(abs(R * 3598 + G * -3013 + B * -585 + 4096 + 1048576) >> 13, 240); -#ifdef __BIG_ENDIAN__ +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ destpix[row] = Y << 24 | U << 16 | Y << 8 | V; #else destpix[row] = Y << 24 | V << 16 | Y << 8 | U; @@ -1534,7 +1534,7 @@ void RGB2YUV(uint32_t *s, int width, int height, uint32_t *d) Y2 = min(abs(R * 2104 + G * 4130 + B * 802 + 4096 + 131072) >> 13, 235); -#ifdef __BIG_ENDIAN__ +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ *d = V | Y2 << 8 | U << 16 | Y1 << 24; #else *d = U | Y1 << 8 | V << 16 | Y2 << 24;