Module: libav
Branch: master
Commit: 02538636261fdec9c70f4185b23147c636f269b4

Author:    Vittorio Giovara <[email protected]>
Committer: Vittorio Giovara <[email protected]>
Date:      Fri Apr  1 15:11:50 2016 +0200

dds: Add support for alpha-only files

Due to how pixel format conversion is done, they behave the same way
as gray files.

Signed-off-by: Vittorio Giovara <[email protected]>

---

 libavcodec/dds.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/dds.c b/libavcodec/dds.c
index 0e9d9b9..caa629a 100644
--- a/libavcodec/dds.c
+++ b/libavcodec/dds.c
@@ -352,6 +352,8 @@ static int parse_pixel_format(AVCodecContext *avctx)
         /*  8 bpp */
         if (bpp == 8 && r == 0xff && g == 0 && b == 0 && a == 0)
             avctx->pix_fmt = AV_PIX_FMT_GRAY8;
+        else if (bpp == 8 && r == 0 && g == 0 && b == 0 && a == 0xff)
+            avctx->pix_fmt = AV_PIX_FMT_GRAY8;
         /* 16 bpp */
         else if (bpp == 16 && r == 0xff && g == 0 && b == 0 && a == 0xff00)
             avctx->pix_fmt = AV_PIX_FMT_YA8;

_______________________________________________
libav-commits mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-commits

Reply via email to