]> git.sesse.net Git - ffmpeg/commitdiff
dds: Add support for monochrome images
authorVittorio Giovara <vittorio.giovara@gmail.com>
Fri, 22 Apr 2016 21:28:04 +0000 (17:28 -0400)
committerVittorio Giovara <vittorio.giovara@gmail.com>
Tue, 26 Apr 2016 20:30:18 +0000 (16:30 -0400)
libavcodec/dds.c
tests/fate/image.mak
tests/ref/fate/dds-monob [new file with mode: 0644]

index f549cadf57276ebd65c7cfe6e4fad9291c6c3688..91e0c242265797d18b168aa748d7f5c79966ca45 100644 (file)
@@ -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);
index 22e0a3311854c0fcc1b299478526d31aa4b6c3e1..e58291ba1db073451f8c8db4d4e2d2a6272eb2c1 100644 (file)
@@ -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 (file)
index 0000000..370a431
--- /dev/null
@@ -0,0 +1,2 @@
+#tb 0: 1/25
+0,          0,          0,        1,     1952, 0x716498a1