You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
dds: Add support for rgb555 files
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
This commit is contained in:
@@ -357,6 +357,10 @@ static int parse_pixel_format(AVCodecContext *avctx)
|
|||||||
avctx->pix_fmt = AV_PIX_FMT_YA8;
|
avctx->pix_fmt = AV_PIX_FMT_YA8;
|
||||||
else if (bpp == 16 && r == 0xffff && g == 0 && b == 0 && a == 0)
|
else if (bpp == 16 && r == 0xffff && g == 0 && b == 0 && a == 0)
|
||||||
avctx->pix_fmt = AV_PIX_FMT_GRAY16LE;
|
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)
|
else if (bpp == 16 && r == 0xf800 && g == 0x7e0 && b == 0x1f && a == 0)
|
||||||
avctx->pix_fmt = AV_PIX_FMT_RGB565LE;
|
avctx->pix_fmt = AV_PIX_FMT_RGB565LE;
|
||||||
/* 24 bpp */
|
/* 24 bpp */
|
||||||
|
Reference in New Issue
Block a user