On 04/12/11 16:28, Ronald S. Bultje wrote:
Hi,

On Sun, Dec 4, 2011 at 6:56 AM, Luca Barbato<[email protected]>  wrote:

---
  libavfilter/vf_yadif.c |    7 +++++--
  1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c
index 64b2561..e1f6b42 100644
--- a/libavfilter/vf_yadif.c
+++ b/libavfilter/vf_yadif.c
@@ -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>  7)
         yadif->filter_line = filter_line_c_16bit;


How is the clipping in this function? Does it guarantee that values are in
the proper range?

From a cursory look and an actual test it looked like, keep this on hold till we are 100% sure.

lu

--

Luca Barbato
Gentoo/linux
http://dev.gentoo.org/~lu_zero

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to