You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
xwddec: support 8bpp grayscale
This commit is contained in:
committed by
Paul B Mahol
parent
244682dd08
commit
b9c94e826e
@@ -157,10 +157,13 @@ 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)
|
||||
return AVERROR_INVALIDDATA;
|
||||
if (pixdepth == 1)
|
||||
if (pixdepth == 1) {
|
||||
avctx->pix_fmt = PIX_FMT_MONOWHITE;
|
||||
} else if (pixdepth == 8) {
|
||||
avctx->pix_fmt = PIX_FMT_GRAY8;
|
||||
}
|
||||
break;
|
||||
case XWD_STATIC_COLOR:
|
||||
case XWD_PSEUDO_COLOR:
|
||||
|
Reference in New Issue
Block a user