diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-03-04 00:31:13 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-03-04 00:31:13 +0000 |
commit | 23bf3b2c97909329e5265d459d56bc22f391d1fe (patch) | |
tree | 9ea54a4f0f424e35c1cb9b4783a15c13697c6fe7 /libswscale | |
parent | 3fec44c640ea0c8fd1944e9a41da50a3d7251274 (diff) | |
download | ffmpeg-23bf3b2c97909329e5265d459d56bc22f391d1fe.tar.gz |
Fill the r, g, b values used for computing the c->pal_yuv table in the
case where the source format is PIX_FMT_GRAY8.
This is required as PIX_FMT_GRAY8 has been declared as a paletted
format in FFmpeg r22191, fix GRAY8 -> RGB conversion.
Originally committed as revision 30826 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
Diffstat (limited to 'libswscale')
-rw-r--r-- | libswscale/swscale.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 689233c07b..83607d2b77 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -1849,6 +1849,8 @@ int sws_scale(SwsContext *c, const uint8_t* const src[], const int srcStride[], r= (i>>3 )*255; g= ((i>>1)&3)*85; b= (i&1 )*255; + } else if(c->srcFormat == PIX_FMT_GRAY8) { + r = g = b = i; } else { assert(c->srcFormat == PIX_FMT_BGR4_BYTE); b= (i>>3 )*255; |