hedgewars/avwrapper/avwrapper.c
changeset 11807 93621207563b
parent 11629 c2e6df2cfac7
child 13537 ecdf6ce2301e
--- a/hedgewars/avwrapper/avwrapper.c	Tue May 10 13:28:37 2016 -0400
+++ b/hedgewars/avwrapper/avwrapper.c	Sun May 15 10:43:18 2016 +0200
@@ -447,11 +447,11 @@
 
             if (!(x & 1) && !(y & 1)) {
                 int r = (buf[x * 4 + 0]          + buf[(x + 1) * 4 + 0] +
-                         buf[x * 4 + 0 + stride] + buf[(x + 1) * 4 + 0 + stride]) / 4;
+                         buf[x * 4 + 0 - stride] + buf[(x + 1) * 4 + 0 - stride]) / 4;
                 int g = (buf[x * 4 + 1]          + buf[(x + 1) * 4 + 1] +
-                         buf[x * 4 + 1 + stride] + buf[(x + 1) * 4 + 1 + stride]) / 4;
+                         buf[x * 4 + 1 - stride] + buf[(x + 1) * 4 + 1 - stride]) / 4;
                 int b = (buf[x * 4 + 2]          + buf[(x + 1) * 4 + 2] +
-                         buf[x * 4 + 2 + stride] + buf[(x + 1) * 4 + 2 + stride]) / 4;
+                         buf[x * 4 + 2 - stride] + buf[(x + 1) * 4 + 2 - stride]) / 4;
 
                 int cr = (int)(-0.14713f * r - 0.28886f * g + 0.436f   * b);
                 int cb = (int)( 0.615f   * r - 0.51499f * g - 0.10001f * b);