diff options
author | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-05-09 01:48:55 +0300 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-05-09 01:49:04 +0300 |
commit | 6c007036850c573a7db3c82fc5f184374b8b16b1 (patch) | |
tree | 1c34a0557c51b357377f6fe40295f90c73e53b33 /libavcodec/dds.c | |
parent | 486776d06f6e0ee9d2bc0c56471260291ba56737 (diff) | |
parent | 9a9fb710bcf4657e030467cfe2556cb0e2c01afc (diff) |
Merge commit '9a9fb710bcf4657e030467cfe2556cb0e2c01afc'
* commit '9a9fb710bcf4657e030467cfe2556cb0e2c01afc':
dds: Add support for rgb555 files
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavcodec/dds.c')
-rw-r--r-- | libavcodec/dds.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/dds.c b/libavcodec/dds.c index feaaba5a24..50350f1fbb 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 */ |