# HG changeset patch # User michael # Date 1014310655 0 # Node ID 7fcffc537252be004bbb5dd538fcf050df3ff405 # Parent 50288f9f6b15829a066602bf5c9566495c46059c unscaled yuv2rgb fix for big-endian systems diff -r 50288f9f6b15 -r 7fcffc537252 libvo/vo_x11.c --- a/libvo/vo_x11.c Thu Feb 21 16:17:15 2002 +0000 +++ b/libvo/vo_x11.c Thu Feb 21 16:57:35 2002 +0000 @@ -427,7 +427,7 @@ // return -1; } - if(mode==MODE_BGR) + if((mode==MODE_BGR) == (myximage->byte_order == LSBFirst) ) { printf("hmm, arpi said that isnt used, contact the developers, thats weird\n" ); return -1; diff -r 50288f9f6b15 -r 7fcffc537252 postproc/swscale.c --- a/postproc/swscale.c Thu Feb 21 16:17:15 2002 +0000 +++ b/postproc/swscale.c Thu Feb 21 16:57:35 2002 +0000 @@ -35,11 +35,12 @@ YV12/I420 -> BGR16 YV12 -> YV12 BGR15 -> BGR16 + BGR16 -> BGR16 untested special converters - YV12/I420/IYUV -> BGR15/BGR24/BGR32 (its the yuv2rgb stuff, so it should be ok) - YV12/I420/IYUV -> YV12/I420/IYUV - YUY2/BGR15/BGR16/BGR24/BGR32/RGB24/RGB32 -> same format + YV12/I420 -> BGR15/BGR24/BGR32 (its the yuv2rgb stuff, so it should be ok) + YV12/I420 -> YV12/I420 + YUY2/BGR15/BGR24/BGR32/RGB24/RGB32 -> same format BGR24 -> BGR32 & RGB24 -> RGB32 BGR32 -> BGR24 & RGB32 -> RGB24 BGR24 -> YV12 @@ -1408,7 +1409,11 @@ if(isPlanarYUV(srcFormat) && isBGR(dstFormat)) { // FIXME multiple yuv2rgb converters wont work that way cuz that thing is full of globals&statics +#ifdef WORDS_BIGENDIAN + yuv2rgb_init( dstFormat&0xFF /* =bpp */, MODE_BGR); +#else yuv2rgb_init( dstFormat&0xFF /* =bpp */, MODE_RGB); +#endif c->swScale= planarYuvToBgr; if(flags&SWS_PRINT_INFO)