Commit f694ca7c authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/tiff: support 4:2:2 and 4:1:1 YCbCr

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 217f6c53
......@@ -590,6 +590,10 @@ static int init_image(TiffContext *s, ThreadFrame *frame)
if (s->photometric == TIFF_PHOTOMETRIC_YCBCR) {
if (s->subsampling[0] == 1 && s->subsampling[1] == 1) {
s->avctx->pix_fmt = AV_PIX_FMT_YUV444P;
} else if (s->subsampling[0] == 2 && s->subsampling[1] == 1) {
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] == 2 && s->subsampling[1] == 2) {
s->avctx->pix_fmt = AV_PIX_FMT_YUV420P;
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment