Module: libav
Branch: master
Commit: 4b2e69397b84d1c1a29ffae6e9f106f2c32b1869

Author:    Vittorio Giovara <[email protected]>
Committer: Vittorio Giovara <[email protected]>
Date:      Fri Apr 22 17:28:04 2016 -0400

dds: Add support for monochrome images

---

 libavcodec/dds.c         |    4 ++++
 tests/fate/image.mak     |    1 +
 tests/ref/fate/dds-monob |    2 ++
 3 files changed, 7 insertions(+)

diff --git a/libavcodec/dds.c b/libavcodec/dds.c
index f549cad..91e0c24 100644
--- a/libavcodec/dds.c
+++ b/libavcodec/dds.c
@@ -240,6 +240,10 @@ static int parse_pixel_format(AVCodecContext *avctx)
             ctx->paletted   = 1;
             avctx->pix_fmt  = AV_PIX_FMT_PAL8;
             break;
+        case MKTAG('G', '1', ' ', ' '):
+            ctx->compressed = 0;
+            avctx->pix_fmt  = AV_PIX_FMT_MONOBLACK;
+            break;
         case MKTAG('D', 'X', '1', '0'):
             /* DirectX 10 extra header */
             dxgi = bytestream2_get_le32(gbc);
diff --git a/tests/fate/image.mak b/tests/fate/image.mak
index 22e0a33..e58291b 100644
--- a/tests/fate/image.mak
+++ b/tests/fate/image.mak
@@ -65,6 +65,7 @@ DDS_FMT          = alpha8                                     
          \
                    dxt5-xrbg                                            \
                    dxt5-ycocg                                           \
                    dxt5-ycocg-scaled                                    \
+                   monob                                                \
                    pal                                                  \
                    pal-ati                                              \
                    rgb1555                                              \
diff --git a/tests/ref/fate/dds-monob b/tests/ref/fate/dds-monob
new file mode 100644
index 0000000..370a431
--- /dev/null
+++ b/tests/ref/fate/dds-monob
@@ -0,0 +1,2 @@
+#tb 0: 1/25
+0,          0,          0,        1,     1952, 0x716498a1

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

Reply via email to