diff mbox series

[FFmpeg-devel] lavc/mjpegdec: Support pixel format 0x41211100

Message ID CAB0OVGouY1QTbBUsHoyjGQpENMQSBXm=1qtf1o4gDTpfAofKdA@mail.gmail.com
State New
Headers show
Series [FFmpeg-devel] lavc/mjpegdec: Support pixel format 0x41211100
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Carl Eugen Hoyos March 27, 2021, 11:36 p.m. UTC
Hi!

Attached patch fixes decoding of a sample mentioned in ticket #8930.

Please comment, Carl Eugen
Subject: [PATCH] lavc/mjpegdec: Support pixel format 0x41211100.

Fixes decoding of Nene421-ycc.jpg
---
 libavcodec/mjpegdec.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 5583d2aa35..0731be7af9 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -624,6 +624,7 @@  int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
             break;
         case 0x22121100:
         case 0x22111200:
+        case 0x41211100:
             if (s->bits <= 8) s->avctx->pix_fmt = s->cs_itu601 ? AV_PIX_FMT_YUV422P : AV_PIX_FMT_YUVJ422P;
             else
                 goto unk_pixfmt;
@@ -2647,6 +2648,8 @@  the_end:
                    avctx->pix_fmt == AV_PIX_FMT_YUVJ440P ||
                    avctx->pix_fmt == AV_PIX_FMT_YUV440P  ||
                    avctx->pix_fmt == AV_PIX_FMT_YUVA444P ||
+                   avctx->pix_fmt == AV_PIX_FMT_YUVJ422P ||
+                   avctx->pix_fmt == AV_PIX_FMT_YUV422P  ||
                    avctx->pix_fmt == AV_PIX_FMT_YUVJ420P ||
                    avctx->pix_fmt == AV_PIX_FMT_YUV420P  ||
                    avctx->pix_fmt == AV_PIX_FMT_YUV420P16||