summaryrefslogtreecommitdiff
path: root/test/convolve_test.cc
diff options
context:
space:
mode:
authorYaowu Xu <yaowu@google.com>2014-05-23 12:23:29 -0700
committerYaowu Xu <yaowu@google.com>2014-05-23 13:32:54 -0700
commit077144d2064edbd5dcd13ac677bfef87e807da6a (patch)
treefe2428d2b5550aabca7e750bdbf466df71aa527b /test/convolve_test.cc
parent94103308937ec7118cce82bbd776f282b0eca584 (diff)
downloadlibvpx-077144d2064edbd5dcd13ac677bfef87e807da6a.tar
libvpx-077144d2064edbd5dcd13ac677bfef87e807da6a.tar.gz
libvpx-077144d2064edbd5dcd13ac677bfef87e807da6a.tar.bz2
libvpx-077144d2064edbd5dcd13ac677bfef87e807da6a.zip
Use extreme values for input in convovle tests
The intepolation filter functions can be better tested withe extreme values, especially given the optimization functions are prone to overflow signed 16 bit intermediate value when operation order is wrong. Change-Id: I712142b0bc1e5969c692c0486a57ffa37c9742b5
Diffstat (limited to 'test/convolve_test.cc')
-rw-r--r--test/convolve_test.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/convolve_test.cc b/test/convolve_test.cc
index a6dcc9875..2d89429a1 100644
--- a/test/convolve_test.cc
+++ b/test/convolve_test.cc
@@ -221,8 +221,12 @@ class ConvolveTest : public ::testing::TestWithParam<convolve_param_t> {
}
::libvpx_test::ACMRandom prng;
- for (int i = 0; i < kInputBufferSize; ++i)
- input_[i] = prng.Rand8Extremes();
+ for (int i = 0; i < kInputBufferSize; ++i) {
+ if (i & 1)
+ input_[i] = 255;
+ else
+ input_[i] = prng.Rand8Extremes();
+ }
}
void SetConstantInput(int value) {