Fix test suites for av1_calc_proj_params
Speed and Extreme test suites were testing for only one set of
parameters, as a result only one helper function used by
av1_calc_proj_params out of the three was tested. Set suitable
parameters to test all three helper functions, and remove the setting of
r.s as it is unused.
Change-Id: I317d29e1ae0759286f07edb1fec25ff63a21deb3
diff --git a/test/pickrst_test.cc b/test/pickrst_test.cc
index c2b2a83..534d9b1 100644
--- a/test/pickrst_test.cc
+++ b/test/pickrst_test.cc
@@ -492,6 +492,8 @@
const int flt1_stride = MAX_DATA_BLOCK;
sgr_params_type params;
const int iters = kIterations;
+ static constexpr int kR0[3] = { 1, 1, 0 };
+ static constexpr int kR1[3] = { 1, 0, 1 };
for (int iter = 0; iter < iters && !HasFatalFailure(); ++iter) {
int64_t C_ref[2] = { 0 }, C_test[2] = { 0 };
int64_t H_ref[2][2] = { { 0, 0 }, { 0, 0 } };
@@ -502,10 +504,8 @@
flt0_[i] = rng_.Rand15Signed();
flt1_[i] = rng_.Rand15Signed();
}
- params.r[0] = 1;
- params.r[1] = 1;
- params.s[0] = rng_.Rand8() % MAX_RADIUS;
- params.s[1] = rng_.Rand8() % MAX_RADIUS;
+ params.r[0] = kR0[iter % 3];
+ params.r[1] = kR1[iter % 3];
uint8_t *dgd = dgd_;
uint8_t *src = src_;
@@ -617,7 +617,9 @@
const int flt0_stride = MAX_DATA_BLOCK;
const int flt1_stride = MAX_DATA_BLOCK;
sgr_params_type params;
- const int iters = run_times == 1 ? kIterations : 4;
+ const int iters = run_times == 1 ? kIterations : 3;
+ static constexpr int kR0[3] = { 1, 1, 0 };
+ static constexpr int kR1[3] = { 1, 0, 1 };
for (int iter = 0; iter < iters && !HasFatalFailure(); ++iter) {
int64_t C_ref[2] = { 0 }, C_test[2] = { 0 };
int64_t H_ref[2][2] = { { 0, 0 }, { 0, 0 } };
@@ -629,10 +631,8 @@
flt1_[i] = rng_.Rand15Signed();
}
- params.r[0] = run_times == 1 ? (rng_.Rand8() % MAX_RADIUS) : 1;
- params.r[1] = run_times == 1 ? (rng_.Rand8() % MAX_RADIUS) : 1;
- params.s[0] = run_times == 1 ? (rng_.Rand8() % MAX_RADIUS) : (iter % 2);
- params.s[1] = run_times == 1 ? (rng_.Rand8() % MAX_RADIUS) : (iter / 2);
+ params.r[0] = run_times == 1 ? (rng_.Rand8() % MAX_RADIUS) : kR0[iter];
+ params.r[1] = run_times == 1 ? (rng_.Rand8() % MAX_RADIUS) : kR1[iter];
uint8_t *dgd = CONVERT_TO_BYTEPTR(dgd_);
uint8_t *src = CONVERT_TO_BYTEPTR(src_);
@@ -677,6 +677,8 @@
const int flt1_stride = MAX_DATA_BLOCK;
sgr_params_type params;
const int iters = kIterations;
+ static constexpr int kR0[3] = { 1, 1, 0 };
+ static constexpr int kR1[3] = { 1, 0, 1 };
for (int iter = 0; iter < iters && !HasFatalFailure(); ++iter) {
int64_t C_ref[2] = { 0 }, C_test[2] = { 0 };
int64_t H_ref[2][2] = { { 0, 0 }, { 0, 0 } };
@@ -687,10 +689,8 @@
flt0_[i] = rng_.Rand15Signed();
flt1_[i] = rng_.Rand15Signed();
}
- params.r[0] = 1;
- params.r[1] = 1;
- params.s[0] = rng_.Rand8() % MAX_RADIUS;
- params.s[1] = rng_.Rand8() % MAX_RADIUS;
+ params.r[0] = kR0[iter % 3];
+ params.r[1] = kR1[iter % 3];
uint8_t *dgd = CONVERT_TO_BYTEPTR(dgd_);
uint8_t *src = CONVERT_TO_BYTEPTR(src_);