changeset 30784:7e887f9d634d

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.
author stefano
date Thu, 04 Mar 2010 00:31:13 +0000
parents 1bd54aea2896
children 2c9cfd354ca0
files libswscale/swscale.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libswscale/swscale.c	Thu Mar 04 00:31:10 2010 +0000
+++ b/libswscale/swscale.c	Thu Mar 04 00:31:13 2010 +0000
@@ -1849,6 +1849,8 @@
                 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;