[FFmpeg-cvslog] xwddec: support 8bpp grayscale

Piotr Bandurski git at videolan.org
Sun Jun 24 23:59:42 CEST 2012


ffmpeg | branch: master | Piotr Bandurski <ami_stuff at o2.pl> | Sun Jun 24 11:34:02 2012 +0000| [b9c94e826e7551027754ecfa60e3e487e0c28fcb] | committer: Paul B Mahol

xwddec: support 8bpp grayscale

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b9c94e826e7551027754ecfa60e3e487e0c28fcb
---

 libavcodec/xwddec.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/libavcodec/xwddec.c b/libavcodec/xwddec.c
index 2879358..e6d4df4 100644
--- a/libavcodec/xwddec.c
+++ b/libavcodec/xwddec.c
@@ -157,10 +157,13 @@ static int xwd_decode_frame(AVCodecContext *avctx, void *data,
     switch (vclass) {
     case XWD_STATIC_GRAY:
     case XWD_GRAY_SCALE:
-        if (bpp != 1)
+        if (bpp != 1 && bpp != 8)
             return AVERROR_INVALIDDATA;
-        if (pixdepth == 1)
+        if (pixdepth == 1) {
             avctx->pix_fmt = PIX_FMT_MONOWHITE;
+        } else if (pixdepth == 8) {
+            avctx->pix_fmt = PIX_FMT_GRAY8;
+        }
         break;
     case XWD_STATIC_COLOR:
     case XWD_PSEUDO_COLOR:



More information about the ffmpeg-cvslog mailing list