[FFmpeg-cvslog] avcodec/tiff: support 4:2:2 and 4:1:1 YCbCr

Michael Niedermayer git at videolan.org
Tue Apr 29 18:47:47 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Apr 29 18:39:24 2014 +0200| [f694ca7ca7a6a7067f612b30e495b7cf4df61a7d] | committer: Michael Niedermayer

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

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

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

 libavcodec/tiff.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index d4fba0d..4d20b1c 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -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 {



More information about the ffmpeg-cvslog mailing list