Mercurial > mplayer.hg
changeset 4791:7fcffc537252
unscaled yuv2rgb fix for big-endian systems
author | michael |
---|---|
date | Thu, 21 Feb 2002 16:57:35 +0000 |
parents | 50288f9f6b15 |
children | c85ee559fc3d |
files | libvo/vo_x11.c postproc/swscale.c |
diffstat | 2 files changed, 9 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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;
--- 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)