[FFmpeg-cvslog] Merge commit '9a9fb710bcf4657e030467cfe2556cb0e2c01afc'

Derek Buitenhuis git at videolan.org
Mon May 9 00:55:51 CEST 2016


ffmpeg | branch: master | Derek Buitenhuis <derek.buitenhuis at gmail.com> | Sun May  8 23:48:55 2016 +0100| [6c007036850c573a7db3c82fc5f184374b8b16b1] | committer: Derek Buitenhuis

Merge commit '9a9fb710bcf4657e030467cfe2556cb0e2c01afc'

* commit '9a9fb710bcf4657e030467cfe2556cb0e2c01afc':
  dds: Add support for rgb555 files

Merged-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>

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

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

diff --git a/libavcodec/dds.c b/libavcodec/dds.c
index feaaba5..50350f1 100644
--- a/libavcodec/dds.c
+++ b/libavcodec/dds.c
@@ -362,6 +362,10 @@ static int parse_pixel_format(AVCodecContext *avctx)
         }
         else if (bpp == 16 && r == 0xffff && g == 0 && b == 0 && a == 0)
             avctx->pix_fmt = AV_PIX_FMT_GRAY16LE;
+        else if (bpp == 16 && r == 0x7c00 && g == 0x3e0 && b == 0x1f && a == 0)
+            avctx->pix_fmt = AV_PIX_FMT_RGB555LE;
+        else if (bpp == 16 && r == 0x7c00 && g == 0x3e0 && b == 0x1f && a == 0x8000)
+            avctx->pix_fmt = AV_PIX_FMT_RGB555LE; // alpha ignored
         else if (bpp == 16 && r == 0xf800 && g == 0x7e0 && b == 0x1f && a == 0)
             avctx->pix_fmt = AV_PIX_FMT_RGB565LE;
         /* 24 bpp */


======================================================================

diff --cc libavcodec/dds.c
index feaaba5,0e9d9b9..50350f1
--- a/libavcodec/dds.c
+++ b/libavcodec/dds.c
@@@ -356,12 -355,12 +356,16 @@@ static int parse_pixel_format(AVCodecCo
          /* 16 bpp */
          else if (bpp == 16 && r == 0xff && g == 0 && b == 0 && a == 0xff00)
              avctx->pix_fmt = AV_PIX_FMT_YA8;
 +        else if (bpp == 16 && r == 0xff00 && g == 0 && b == 0 && a == 0xff) {
 +            avctx->pix_fmt = AV_PIX_FMT_YA8;
 +            ctx->postproc = DDS_SWAP_ALPHA;
 +        }
          else if (bpp == 16 && r == 0xffff && g == 0 && b == 0 && a == 0)
              avctx->pix_fmt = AV_PIX_FMT_GRAY16LE;
+         else if (bpp == 16 && r == 0x7c00 && g == 0x3e0 && b == 0x1f && a == 0)
+             avctx->pix_fmt = AV_PIX_FMT_RGB555LE;
+         else if (bpp == 16 && r == 0x7c00 && g == 0x3e0 && b == 0x1f && a == 0x8000)
+             avctx->pix_fmt = AV_PIX_FMT_RGB555LE; // alpha ignored
          else if (bpp == 16 && r == 0xf800 && g == 0x7e0 && b == 0x1f && a == 0)
              avctx->pix_fmt = AV_PIX_FMT_RGB565LE;
          /* 24 bpp */



More information about the ffmpeg-cvslog mailing list