Commit 67e15578 authored by David Barker's avatar David Barker Committed by Debargha Mukherjee

Fix bug in loop-restoration unit tests

The values 'offset_r' and 'offset_c', representing a random
offset into a large pre-generated block, were calculated the
wrong way around. This could cause problems when testing
rectangular convolutions.

Change-Id: Ide830f275c83492abe83b61216da0fbce669fb7e
parent b2c62bc7
......@@ -92,8 +92,8 @@ void AV1HiprecConvolveTest::RunCheckOutput(hiprec_convolve_func test_impl) {
for (i = 0; i < num_iters; ++i) {
// Choose random locations within the source block
int offset_r = 3 + rnd_.PseudoUniform(w - out_w - 7);
int offset_c = 3 + rnd_.PseudoUniform(h - out_h - 7);
int offset_r = 3 + rnd_.PseudoUniform(h - out_h - 7);
int offset_c = 3 + rnd_.PseudoUniform(w - out_w - 7);
aom_convolve8_add_src_hip_c(input + offset_r * w + offset_c, w, output,
out_w, hkernel, 16, vkernel, 16, out_w, out_h);
test_impl(input + offset_r * w + offset_c, w, output2, out_w, hkernel, 16,
......@@ -166,8 +166,8 @@ void AV1HighbdHiprecConvolveTest::RunCheckOutput(
for (i = 0; i < num_iters; ++i) {
// Choose random locations within the source block
int offset_r = 3 + rnd_.PseudoUniform(w - out_w - 7);
int offset_c = 3 + rnd_.PseudoUniform(h - out_h - 7);
int offset_r = 3 + rnd_.PseudoUniform(h - out_h - 7);
int offset_c = 3 + rnd_.PseudoUniform(w - out_w - 7);
aom_highbd_convolve8_add_src_hip_c(input_ptr + offset_r * w + offset_c, w,
output_ptr, out_w, hkernel, 16, vkernel,
16, out_w, out_h, bd);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment