[FFmpeg-devel] [PATCH 1/2] avcodec/jpeg2000dec: Add YA16 support
Michael Niedermayer
michael at niedermayer.cc
Sat Apr 8 02:15:11 EEST 2023
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
libavcodec/jpeg2000dec.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index c2b81ec103d..da7152646b4 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -449,6 +449,10 @@ static int get_siz(Jpeg2000DecoderContext *s)
s->cdx[0] == s->cdx[1] && s->cdy[0] == s->cdy[1]) {
s->avctx->pix_fmt = AV_PIX_FMT_YA8;
i = 0;
+ } else if (ncomponents == 2 && s->precision == 16 &&
+ s->cdx[0] == s->cdx[1] && s->cdy[0] == s->cdy[1]) {
+ s->avctx->pix_fmt = AV_PIX_FMT_YA16;
+ i = 0;
} else if (ncomponents == 1 && s->precision == 8) {
s->avctx->pix_fmt = AV_PIX_FMT_GRAY8;
i = 0;
--
2.17.1
More information about the ffmpeg-devel
mailing list