Fix av1_calc_proj_params speed tests The speed tests were running av1_calc_proj_params 4 times with the exact same parameters. There are only three valid combination of parameters, so change that number to three, and set the parameters accordingly. Also remove the setting of params.s as it is unused. Change-Id: Ib86b65056c5e55879d7eafb2108da32b97d10073
diff --git a/test/pickrst_test.cc b/test/pickrst_test.cc index 0c04fcd..98208e2 100644 --- a/test/pickrst_test.cc +++ b/test/pickrst_test.cc
@@ -432,7 +432,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 } }; @@ -444,10 +446,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 = dgd_; uint8_t *src = src_;