[FFmpeg-cvslog] avcodec/mjpegdec: factorize some parts of the pix_fmt_id switch()

Michael Niedermayer git at videolan.org
Tue Jul 1 23:55:40 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Jul  1 23:28:18 2014 +0200| [ef7e8425e839d50d0d99958e027db0c1f5021a1d] | committer: Michael Niedermayer

avcodec/mjpegdec: factorize some parts of the pix_fmt_id switch()

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ef7e8425e839d50d0d99958e027db0c1f5021a1d
---

 libavcodec/mjpegdec.c |   12 ------------
 1 file changed, 12 deletions(-)

diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 2e26223..1a774dd 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -453,12 +453,6 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
         break;
     case 0x12121100:
     case 0x22122100:
-        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->chroma_height = s->height;
-        break;
     case 0x21211100:
     case 0x22211200:
         if (s->bits <= 8) s->avctx->pix_fmt = s->cs_itu601 ? AV_PIX_FMT_YUV444P : AV_PIX_FMT_YUVJ444P;
@@ -469,12 +463,6 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
         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->chroma_height = s->height / 2;
-        break;
     case 0x11222200:
         if (s->bits <= 8) s->avctx->pix_fmt = s->cs_itu601 ? AV_PIX_FMT_YUV444P : AV_PIX_FMT_YUVJ444P;
         else



More information about the ffmpeg-cvslog mailing list