[MPlayer-cvslog] r35137 - trunk/libmpcodecs/vf_decimate.c

reimar subversion at mplayerhq.hu
Sat Sep 1 16:47:50 CEST 2012


Author: reimar
Date: Sat Sep  1 16:47:50 2012
New Revision: 35137

Log:
Fix off-by-one error.

Patch by Stefano Sabatini [stefasab gmail com],
originally committed for FFmpeg's libmpcodecs copy.

Modified:
   trunk/libmpcodecs/vf_decimate.c

Modified: trunk/libmpcodecs/vf_decimate.c
==============================================================================
--- trunk/libmpcodecs/vf_decimate.c	Sat Sep  1 16:38:45 2012	(r35136)
+++ trunk/libmpcodecs/vf_decimate.c	Sat Sep  1 16:47:50 2012	(r35137)
@@ -82,8 +82,8 @@ static int diff_MMX(unsigned char *old, 
 static int diff_C(unsigned char *old, unsigned char *new, int os, int ns)
 {
     int x, y, d=0;
-    for (y = 8; y; y--) {
-        for (x = 8; x; x--) {
+    for (y = 0; y < 8; y++) {
+        for (x = 0; x < 8; x++) {
             d += abs(new[x] - old[x]);
         }
         new += ns;


More information about the MPlayer-cvslog mailing list