Mercurial > mplayer.hg
changeset 35043:35fe96aedad5
Fix off-by-one error.
Patch by Stefano Sabatini [stefasab gmail com],
originally committed for FFmpeg's libmpcodecs copy.
author | reimar |
---|---|
date | Sat, 01 Sep 2012 14:47:50 +0000 |
parents | d89db56bc91b |
children | 99ac85950277 |
files | libmpcodecs/vf_decimate.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/vf_decimate.c Sat Sep 01 14:38:45 2012 +0000 +++ b/libmpcodecs/vf_decimate.c Sat Sep 01 14:47:50 2012 +0000 @@ -82,8 +82,8 @@ 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;