ref: 077144d2064edbd5dcd13ac677bfef87e807da6a
parent: 94103308937ec7118cce82bbd776f282b0eca584
author: Yaowu Xu <[email protected]>
date: Fri May 23 08:23:29 EDT 2014
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
--- a/test/convolve_test.cc
+++ b/test/convolve_test.cc
@@ -221,8 +221,12 @@
}
::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) {