mjpegdec: Support pix_fmt_id == 0x22112200
[ffmpeg.git] / libavcodec / mjpegdec.c
index 76a338f4c4b93dd233636cd7ca7e3054566c03ab..bcdfad7cac1ba92c78216f189df831069e9127c8 100644 (file)
@@ -456,12 +456,13 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
         s->chroma_height = s->height;
         break;
     case 0x22221100:
+    case 0x22112200:
         if (s->bits <= 8) s->avctx->pix_fmt = s->cs_itu601 ? AV_PIX_FMT_YUV444P : AV_PIX_FMT_YUVJ444P;
         else
             goto unk_pixfmt;
         s->avctx->color_range = s->cs_itu601 ? AVCOL_RANGE_MPEG : AVCOL_RANGE_JPEG;
-        s->upscale_v = 4;
-        s->upscale_h = 4;
+        s->upscale_v = 2<<(pix_fmt_id == 0x22221100);
+        s->upscale_h = 2<<(pix_fmt_id == 0x22221100);
         s->chroma_height = s->height / 2;
         break;
     case 0x11000000: