summaryrefslogtreecommitdiffstats
path: root/postproc
diff options
context:
space:
mode:
authormichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-02-21 16:57:35 +0000
committermichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-02-21 16:57:35 +0000
commit50657061a84c1d3081d6306b06e90a5bd8c29701 (patch)
treebe51b09bdf933620bdef22d4b3b43ee178a678bc /postproc
parent2423d041c28b37900e8e56084578fb2b2d45cdfa (diff)
downloadmpv-50657061a84c1d3081d6306b06e90a5bd8c29701.tar.bz2
mpv-50657061a84c1d3081d6306b06e90a5bd8c29701.tar.xz
unscaled yuv2rgb fix for big-endian systems
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4792 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'postproc')
-rw-r--r--postproc/swscale.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/postproc/swscale.c b/postproc/swscale.c
index 4be341d9dc..74797f94dc 100644
--- a/postproc/swscale.c
+++ b/postproc/swscale.c
@@ -35,11 +35,12 @@ tested special converters
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 @@ SwsContext *getSwsContext(int srcW, int srcH, int srcFormat, int dstW, int dstH,
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)