mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
xwddec: support 8bpp grayscale
(cherry picked from commit b9c94e826e
)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
This commit is contained in:
parent
d34a133b78
commit
a05c6e8c11
@ -155,10 +155,12 @@ static int xwd_decode_frame(AVCodecContext *avctx, void *data,
|
||||
switch (vclass) {
|
||||
case XWD_STATIC_GRAY:
|
||||
case XWD_GRAY_SCALE:
|
||||
if (bpp != 1)
|
||||
if (bpp != 1 && bpp != 8 || bpp != pixdepth)
|
||||
return AVERROR_INVALIDDATA;
|
||||
if (pixdepth == 1)
|
||||
avctx->pix_fmt = AV_PIX_FMT_MONOWHITE;
|
||||
else if (pixdepth == 8)
|
||||
avctx->pix_fmt = AV_PIX_FMT_GRAY8;
|
||||
break;
|
||||
case XWD_STATIC_COLOR:
|
||||
case XWD_PSEUDO_COLOR:
|
||||
|
Loading…
Reference in New Issue
Block a user