summaryrefslogtreecommitdiff
path: root/libavcodec/tiff.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-04-30 17:41:31 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-04-30 17:41:31 +0200
commit1e25afc1811a279094ebc2bc6407715a439e09ee (patch)
treec94235e41da921d1e3670a5562a81f1021301595 /libavcodec/tiff.c
parent5e7d21c7ad02e37caa1bcb50ab8ad64e7d7fb86c (diff)
avcodec/tiff: Support 410 and 440 YCbCr
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/tiff.c')
-rw-r--r--libavcodec/tiff.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index 4d20b1cf0e..1caad84845 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -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;