[FFmpeg-soc] [soc]: r4681 - libavfilter/vf_hflip.c

stefano subversion at mplayerhq.hu
Sun Jul 12 16:16:45 CEST 2009


Author: stefano
Date: Sun Jul 12 16:16:45 2009
New Revision: 4681

Log:
Fix off-by-one boundary condition logic, make the filter correctly
display the leftmost column.

Modified:
   libavfilter/vf_hflip.c

Modified: libavfilter/vf_hflip.c
==============================================================================
--- libavfilter/vf_hflip.c	Sun Jul 12 13:27:36 2009	(r4680)
+++ libavfilter/vf_hflip.c	Sun Jul 12 16:16:45 2009	(r4681)
@@ -57,7 +57,7 @@ static void draw_slice(AVFilterLink *lin
 
     /* luma plane */
     outrow = out->data[0] + y * out->linesize[0];
-    inrow  = in-> data[0] + y * in-> linesize[0] + in->w;
+    inrow  = in-> data[0] + y * in-> linesize[0] + in->w -1;
     for(i = 0; i < h; i++) {
         for(j = 0; j < link->w; j++)
             outrow[j] = inrow[-j];
@@ -70,7 +70,7 @@ static void draw_slice(AVFilterLink *lin
         if (in->data[plane]) {
             outrow = out->data[plane] + (y>>flip->vsub) * out->linesize[plane];
             inrow  = in-> data[plane] + (y>>flip->vsub) * in-> linesize[plane] +
-                     (link->w >> flip->hsub);
+                     (link->w >> flip->hsub) -1;
 
             for(i = 0; i < h >> flip->vsub; i++) {
                 for(j = 0; j < link->w >> flip->hsub; j++)


More information about the FFmpeg-soc mailing list