1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-28 20:53:54 +02:00

Merge commit '02538636261fdec9c70f4185b23147c636f269b4'

* commit '02538636261fdec9c70f4185b23147c636f269b4':
  dds: Add support for alpha-only files

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
This commit is contained in:
Derek Buitenhuis 2016-05-08 23:49:20 +01:00
commit 6ebec1049e

View File

@ -353,6 +353,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;