summaryrefslogtreecommitdiff
path: root/libavfilter/vf_deshake.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-04-15 16:23:28 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-04-15 16:23:28 +0200
commitaba678ab9dc650436d5c2c3535adce08aab8ceed (patch)
tree8dd9654da53b3de2960b3871040979f0f2622f5a /libavfilter/vf_deshake.c
parent3d8afb23bc9a9e333c9348db89b766b00fcff52c (diff)
deshake: fix off by 2 error
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_deshake.c')
-rw-r--r--libavfilter/vf_deshake.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/vf_deshake.c b/libavfilter/vf_deshake.c
index 01ef721f53..fd7213274b 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;