You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-07-11 14:30:22 +02:00
png: support reading gray+alpha at 16 bits
This commit is contained in:
@ -500,6 +500,9 @@ static int decode_frame(AVCodecContext *avctx,
|
|||||||
} else if (s->bit_depth == 8 &&
|
} else if (s->bit_depth == 8 &&
|
||||||
s->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) {
|
s->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) {
|
||||||
avctx->pix_fmt = AV_PIX_FMT_YA8;
|
avctx->pix_fmt = AV_PIX_FMT_YA8;
|
||||||
|
} else if (s->bit_depth == 16 &&
|
||||||
|
s->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) {
|
||||||
|
avctx->pix_fmt = AV_PIX_FMT_YA16BE;
|
||||||
} else {
|
} else {
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user