X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavfilter%2Fvf_deshake.c;h=c8480e74dd028bcbc2820b66b657ccc96c4110d3;hb=1eb54323c82ff6eff18553fd3f2788a695bdf812;hp=55ce5e18a1cdca1ab016cff860b18a1ccf450d6e;hpb=7167ac33a8f2c7d063384c267f984f23d2b73854;p=ffmpeg diff --git a/libavfilter/vf_deshake.c b/libavfilter/vf_deshake.c index 55ce5e18a1c..c8480e74dd0 100644 --- a/libavfilter/vf_deshake.c +++ b/libavfilter/vf_deshake.c @@ -196,7 +196,7 @@ static int block_contrast(uint8_t *src, int x, int y, int stride, int blocksize) for (i = 0; i <= blocksize * 2; i++) { // We use a width of 16 here to match the sad function for (j = 0; j <= 15; j++) { - pos = (y - i) * stride + (x - j); + pos = (y + i) * stride + (x + j); if (src[pos] < lowest) lowest = src[pos]; else if (src[pos] > highest) {