]> git.sesse.net Git - ffmpeg/commitdiff
yadif: support 10bit YUV
authorLuca Barbato <lu_zero@gentoo.org>
Sun, 4 Dec 2011 14:56:41 +0000 (15:56 +0100)
committerLuca Barbato <lu_zero@gentoo.org>
Tue, 13 Dec 2011 16:02:55 +0000 (17:02 +0100)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
libavfilter/vf_yadif.c

index 64b25616ea74170c65620c5afdd3ad0ee8cd38a8..ca2adb290652b0714e7dcc45e1203ef9b3f0f567 100644 (file)
@@ -145,7 +145,7 @@ static void filter(AVFilterContext *ctx, AVFilterBufferRef *dstpic,
         int w = dstpic->video->w;
         int h = dstpic->video->h;
         int refs = yadif->cur->linesize[i];
-        int df = (yadif->csp->comp[i].depth_minus1+1) / 8;
+        int df = (yadif->csp->comp[i].depth_minus1 + 8) / 8;
 
         if (i == 1 || i == 2) {
         /* Why is this not part of the per-plane description thing? */
@@ -212,7 +212,7 @@ static void return_frame(AVFilterContext *ctx, int is_second)
 
     if (!yadif->csp)
         yadif->csp = &av_pix_fmt_descriptors[link->format];
-    if (yadif->csp->comp[0].depth_minus1 == 15)
+    if (yadif->csp->comp[0].depth_minus1 / 8 == 1)
         yadif->filter_line = filter_line_c_16bit;
 
     filter(ctx, yadif->out, tff ^ !is_second, tff);
@@ -354,6 +354,9 @@ static int query_formats(AVFilterContext *ctx)
         AV_NE( PIX_FMT_GRAY16BE, PIX_FMT_GRAY16LE ),
         PIX_FMT_YUV440P,
         PIX_FMT_YUVJ440P,
+        AV_NE( PIX_FMT_YUV420P10BE, PIX_FMT_YUV420P10LE ),
+        AV_NE( PIX_FMT_YUV422P10BE, PIX_FMT_YUV422P10LE ),
+        AV_NE( PIX_FMT_YUV444P10BE, PIX_FMT_YUV444P10LE ),
         AV_NE( PIX_FMT_YUV420P16BE, PIX_FMT_YUV420P16LE ),
         AV_NE( PIX_FMT_YUV422P16BE, PIX_FMT_YUV422P16LE ),
         AV_NE( PIX_FMT_YUV444P16BE, PIX_FMT_YUV444P16LE ),