[FFmpeg-cvslog] deshake: fix off by 2 error

Michael Niedermayer git at videolan.org
Mon Apr 15 16:32:30 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Apr 15 16:23:28 2013 +0200| [aba678ab9dc650436d5c2c3535adce08aab8ceed] | committer: Michael Niedermayer

deshake: fix off by 2 error

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=aba678ab9dc650436d5c2c3535adce08aab8ceed
---

 libavfilter/vf_deshake.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavfilter/vf_deshake.c b/libavfilter/vf_deshake.c
index 01ef721..fd72132 100644
--- a/libavfilter/vf_deshake.c
+++ b/libavfilter/vf_deshake.c
@@ -150,8 +150,8 @@ static void find_block_motion(DeshakeContext *deshake, uint8_t *src1,
         }
     } else if (deshake->search == SMART_EXHAUSTIVE) {
         // Compare every other possible position and find the best match
-        for (y = -deshake->ry + 1; y < deshake->ry - 2; y += 2) {
-            for (x = -deshake->rx + 1; x < deshake->rx - 2; x += 2) {
+        for (y = -deshake->ry + 1; y < deshake->ry; y += 2) {
+            for (x = -deshake->rx + 1; x < deshake->rx; x += 2) {
                 diff = CMP(cx - x, cy - y);
                 if (diff < smallest) {
                     smallest = diff;



More information about the ffmpeg-cvslog mailing list