diff options
author | Jia Jia <jia.jia@linaro.org> | 2014-09-13 22:22:17 +0800 |
---|---|---|
committer | Jia Jia <jia.jia@linaro.org> | 2014-09-14 01:04:05 +0800 |
commit | f265dde3051bd7fb29c0d2b7429d036e99f59e38 (patch) | |
tree | f82e7c6c54ea93d3d4781d175f2a363bb24c2957 /vp8 | |
parent | 282fac96ca8c6b5e21346606a6f95f4a28bd3bfa (diff) | |
download | libvpx-f265dde3051bd7fb29c0d2b7429d036e99f59e38.tar libvpx-f265dde3051bd7fb29c0d2b7429d036e99f59e38.tar.gz libvpx-f265dde3051bd7fb29c0d2b7429d036e99f59e38.tar.bz2 libvpx-f265dde3051bd7fb29c0d2b7429d036e99f59e38.zip |
vp8: common: postproc: fix signed overflow of statement of (X +c) >= X when '-Werror=strict-overflow' is set.
Change-Id: I2f78417cc100973c732426f7b6bd10d7304a1a5f
Diffstat (limited to 'vp8')
-rw-r--r-- | vp8/common/postproc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/vp8/common/postproc.c b/vp8/common/postproc.c index e50d3935f..769c2de6b 100644 --- a/vp8/common/postproc.c +++ b/vp8/common/postproc.c @@ -214,6 +214,7 @@ static int q2mbl(int x) x = 50 + (x - 50) * 10 / 8; return x * x / 3; } + void vp8_mbpost_proc_across_ip_c(unsigned char *src, int pitch, int rows, int cols, int flimit) { int r, c, i; @@ -226,14 +227,14 @@ void vp8_mbpost_proc_across_ip_c(unsigned char *src, int pitch, int rows, int co int sumsq = 0; int sum = 0; - for (i = -8; i<0; i++) + for (i = -8; i < 0; i++) s[i]=s[0]; /* 17 avoids valgrind warning - we buffer values in c in d * and only write them when we've read 8 ahead... */ - for (i = cols; i<cols+17; i++) - s[i]=s[cols-1]; + for (i = 0; i < 17; i++) + s[i+cols]=s[cols-1]; for (i = -8; i <= 6; i++) { @@ -264,7 +265,6 @@ void vp8_mbpost_proc_across_ip_c(unsigned char *src, int pitch, int rows, int co } } - void vp8_mbpost_proc_down_c(unsigned char *dst, int pitch, int rows, int cols, int flimit) { int r, c, i; @@ -284,8 +284,8 @@ void vp8_mbpost_proc_down_c(unsigned char *dst, int pitch, int rows, int cols, i /* 17 avoids valgrind warning - we buffer values in c in d * and only write them when we've read 8 ahead... */ - for (i = rows; i < rows+17; i++) - s[i*pitch]=s[(rows-1)*pitch]; + for (i = 0; i < 17; i++) + s[(i+rows)*pitch]=s[(rows-1)*pitch]; for (i = -8; i <= 6; i++) { |