]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/vf_deshake.c
avcodec/cbs_av1: add support for Scalability Metadata
[ffmpeg] / libavfilter / vf_deshake.c
index 55ce5e18a1cdca1ab016cff860b18a1ccf450d6e..c8480e74dd028bcbc2820b66b657ccc96c4110d3 100644 (file)
@@ -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) {