You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
dds: Add support for alpha-only files
Due to how pixel format conversion is done, they behave the same way as gray files. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
This commit is contained in:
@@ -352,6 +352,8 @@ static int parse_pixel_format(AVCodecContext *avctx)
|
|||||||
/* 8 bpp */
|
/* 8 bpp */
|
||||||
if (bpp == 8 && r == 0xff && g == 0 && b == 0 && a == 0)
|
if (bpp == 8 && r == 0xff && g == 0 && b == 0 && a == 0)
|
||||||
avctx->pix_fmt = AV_PIX_FMT_GRAY8;
|
avctx->pix_fmt = AV_PIX_FMT_GRAY8;
|
||||||
|
else if (bpp == 8 && r == 0 && g == 0 && b == 0 && a == 0xff)
|
||||||
|
avctx->pix_fmt = AV_PIX_FMT_GRAY8;
|
||||||
/* 16 bpp */
|
/* 16 bpp */
|
||||||
else if (bpp == 16 && r == 0xff && g == 0 && b == 0 && a == 0xff00)
|
else if (bpp == 16 && r == 0xff && g == 0 && b == 0 && a == 0xff00)
|
||||||
avctx->pix_fmt = AV_PIX_FMT_YA8;
|
avctx->pix_fmt = AV_PIX_FMT_YA8;
|
||||||
|
Reference in New Issue
Block a user