diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2023-04-08 00:25:43 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2023-04-14 18:59:48 +0200 |
commit | c66e13cbac72bf26be28d5dcff451e89f882a2c2 (patch) | |
tree | 2540a6947ee1ff2bfbf1c7a9f170eaaf20768178 /libavcodec | |
parent | fa618f5f492f94d19dd8d32bcea084523fb4e2d8 (diff) | |
download | ffmpeg-c66e13cbac72bf26be28d5dcff451e89f882a2c2.tar.gz |
avcodec/jpeg2000dec: Add YA16 support
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/jpeg2000dec.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c index c2b81ec103..da7152646b 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; |