avcodec/tiff: Support 410 and 440 YCbCr
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 30 Apr 2014 15:41:31 +0000 (17:41 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 30 Apr 2014 15:41:31 +0000 (17:41 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/tiff.c

index 4d20b1c..1caad84 100644 (file)
@@ -594,8 +594,12 @@ static int init_image(TiffContext *s, ThreadFrame *frame)
                 s->avctx->pix_fmt = AV_PIX_FMT_YUV422P;
             } else if (s->subsampling[0] == 4 && s->subsampling[1] == 1) {
                 s->avctx->pix_fmt = AV_PIX_FMT_YUV411P;
+            } else if (s->subsampling[0] == 1 && s->subsampling[1] == 2) {
+                s->avctx->pix_fmt = AV_PIX_FMT_YUV440P;
             } else if (s->subsampling[0] == 2 && s->subsampling[1] == 2) {
                 s->avctx->pix_fmt = AV_PIX_FMT_YUV420P;
+            } else if (s->subsampling[0] == 4 && s->subsampling[1] == 4) {
+                s->avctx->pix_fmt = AV_PIX_FMT_YUV410P;
             } else {
                 av_log(s->avctx, AV_LOG_ERROR, "Unsupported YCbCr subsampling\n");
                 return AVERROR_PATCHWELCOME;