aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2016-03-29 21:00:43 +0200
committerVittorio Giovara <vittorio.giovara@gmail.com>2016-04-06 12:13:47 -0400
commit9a9fb710bcf4657e030467cfe2556cb0e2c01afc (patch)
treeb03a75c79c30206745a488c73668d09d9dca5021
parent8dde92b95a197eb809d798aacb34dbe52a0689a8 (diff)
downloadffmpeg-9a9fb710bcf4657e030467cfe2556cb0e2c01afc.tar.gz
dds: Add support for rgb555 files
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
-rw-r--r--libavcodec/dds.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/dds.c b/libavcodec/dds.c
index 3b7e7f67e9..0e9d9b94f9 100644
--- a/libavcodec/dds.c
+++ b/libavcodec/dds.c
@@ -357,6 +357,10 @@ static int parse_pixel_format(AVCodecContext *avctx)
avctx->pix_fmt = AV_PIX_FMT_YA8;
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 */