From 7369c7d7a5eed32963d8af37658286617919f91c Mon Sep 17 00:00:00 2001 From: trav90 Date: Thu, 18 Oct 2018 06:04:57 -0500 Subject: Update aom to commit id f5bdeac22930ff4c6b219be49c843db35970b918 --- third_party/aom/test/av1_convolve_2d_test_util.cc | 188 ++++++++++++++++++++++ 1 file changed, 188 insertions(+) create mode 100644 third_party/aom/test/av1_convolve_2d_test_util.cc (limited to 'third_party/aom/test/av1_convolve_2d_test_util.cc') diff --git a/third_party/aom/test/av1_convolve_2d_test_util.cc b/third_party/aom/test/av1_convolve_2d_test_util.cc new file mode 100644 index 000000000..8cec216af --- /dev/null +++ b/third_party/aom/test/av1_convolve_2d_test_util.cc @@ -0,0 +1,188 @@ +/* + * Copyright (c) 2016, Alliance for Open Media. All rights reserved + * + * This source code is subject to the terms of the BSD 2 Clause License and + * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License + * was not distributed with this source code in the LICENSE file, you can + * obtain it at www.aomedia.org/license/software. If the Alliance for Open + * Media Patent License 1.0 was not distributed with this source code in the + * PATENTS file, you can obtain it at www.aomedia.org/license/patent. + */ + +#include "test/av1_convolve_2d_test_util.h" + +#include "av1/common/convolve.h" + +using std::tr1::tuple; +using std::tr1::make_tuple; + +namespace libaom_test { + +namespace AV1Convolve2D { + +::testing::internal::ParamGenerator BuildParams( + convolve_2d_func filter) { + const Convolve2DParam params[] = { + make_tuple(4, 4, 20, filter), make_tuple(8, 8, 10, filter), + make_tuple(64, 64, 1, filter), make_tuple(4, 16, 10, filter), + make_tuple(32, 8, 5, filter), + }; + return ::testing::ValuesIn(params); +} + +AV1Convolve2DTest::~AV1Convolve2DTest() {} +void AV1Convolve2DTest::SetUp() { rnd_.Reset(ACMRandom::DeterministicSeed()); } + +void AV1Convolve2DTest::TearDown() { libaom_test::ClearSystemState(); } + +void AV1Convolve2DTest::RunCheckOutput(convolve_2d_func test_impl) { + const int w = 128, h = 128; + const int out_w = GET_PARAM(0), out_h = GET_PARAM(1); + const int num_iters = GET_PARAM(2); + int i, j, k; + + uint8_t *input = new uint8_t[h * w]; + + int output_n = out_h * MAX_SB_SIZE; + CONV_BUF_TYPE *output = new CONV_BUF_TYPE[output_n]; + CONV_BUF_TYPE *output2 = new CONV_BUF_TYPE[output_n]; + + for (i = 0; i < h; ++i) + for (j = 0; j < w; ++j) input[i * w + j] = rnd_.Rand8(); + + memset(output, 0, output_n * sizeof(CONV_BUF_TYPE)); + memset(output2, 0, output_n * sizeof(CONV_BUF_TYPE)); + + int hfilter, vfilter, subx, suby; + for (hfilter = EIGHTTAP_REGULAR; hfilter < INTERP_FILTERS_ALL; ++hfilter) { + for (vfilter = EIGHTTAP_REGULAR; vfilter < INTERP_FILTERS_ALL; ++vfilter) { + InterpFilterParams filter_params_x = + av1_get_interp_filter_params((InterpFilter)hfilter); + InterpFilterParams filter_params_y = + av1_get_interp_filter_params((InterpFilter)vfilter); + ConvolveParams conv_params1 = + get_conv_params_no_round(0, 0, 0, output, MAX_SB_SIZE); + ConvolveParams conv_params2 = + get_conv_params_no_round(0, 0, 0, output2, MAX_SB_SIZE); + + for (subx = 0; subx < 16; ++subx) + for (suby = 0; suby < 16; ++suby) { + for (i = 0; i < num_iters; ++i) { + // Choose random locations within the source block + int offset_r = 3 + rnd_.PseudoUniform(h - out_h - 7); + int offset_c = 3 + rnd_.PseudoUniform(w - out_w - 7); + av1_convolve_2d_c(input + offset_r * w + offset_c, w, output, + MAX_SB_SIZE, out_w, out_h, &filter_params_x, + &filter_params_y, subx, suby, &conv_params1); + test_impl(input + offset_r * w + offset_c, w, output2, MAX_SB_SIZE, + out_w, out_h, &filter_params_x, &filter_params_y, subx, + suby, &conv_params2); + + for (j = 0; j < out_h; ++j) + for (k = 0; k < out_w; ++k) { + int idx = j * MAX_SB_SIZE + k; + ASSERT_EQ(output[idx], output2[idx]) + << "Pixel mismatch at index " << idx << " = (" << j << ", " + << k << "), sub pixel offset = (" << suby << ", " << subx + << ")"; + } + } + } + } + } + delete[] input; + delete[] output; + delete[] output2; +} +} // namespace AV1Convolve2D + +#if CONFIG_HIGHBITDEPTH +namespace AV1HighbdConvolve2D { + +::testing::internal::ParamGenerator BuildParams( + highbd_convolve_2d_func filter) { + const HighbdConvolve2DParam params[] = { + make_tuple(4, 4, 20, 8, filter), make_tuple(8, 8, 10, 8, filter), + make_tuple(64, 64, 1, 8, filter), make_tuple(4, 16, 10, 8, filter), + make_tuple(32, 8, 10, 8, filter), make_tuple(4, 4, 20, 10, filter), + make_tuple(8, 8, 10, 10, filter), make_tuple(64, 64, 1, 10, filter), + make_tuple(4, 16, 10, 10, filter), make_tuple(32, 8, 10, 10, filter), + make_tuple(4, 4, 20, 12, filter), make_tuple(8, 8, 10, 12, filter), + make_tuple(64, 64, 1, 12, filter), make_tuple(4, 16, 10, 12, filter), + make_tuple(32, 8, 10, 12, filter), + }; + return ::testing::ValuesIn(params); +} + +AV1HighbdConvolve2DTest::~AV1HighbdConvolve2DTest() {} +void AV1HighbdConvolve2DTest::SetUp() { + rnd_.Reset(ACMRandom::DeterministicSeed()); +} + +void AV1HighbdConvolve2DTest::TearDown() { libaom_test::ClearSystemState(); } + +void AV1HighbdConvolve2DTest::RunCheckOutput( + highbd_convolve_2d_func test_impl) { + const int w = 128, h = 128; + const int out_w = GET_PARAM(0), out_h = GET_PARAM(1); + const int num_iters = GET_PARAM(2); + const int bd = GET_PARAM(3); + int i, j, k; + + uint16_t *input = new uint16_t[h * w]; + + int output_n = out_h * MAX_SB_SIZE; + CONV_BUF_TYPE *output = new CONV_BUF_TYPE[output_n]; + CONV_BUF_TYPE *output2 = new CONV_BUF_TYPE[output_n]; + + for (i = 0; i < h; ++i) + for (j = 0; j < w; ++j) input[i * w + j] = rnd_.Rand16() & ((1 << bd) - 1); + + memset(output, 0, output_n * sizeof(CONV_BUF_TYPE)); + memset(output2, 0, output_n * sizeof(CONV_BUF_TYPE)); + + int hfilter, vfilter, subx, suby; + for (hfilter = EIGHTTAP_REGULAR; hfilter < INTERP_FILTERS_ALL; ++hfilter) { + for (vfilter = EIGHTTAP_REGULAR; vfilter < INTERP_FILTERS_ALL; ++vfilter) { + InterpFilterParams filter_params_x = + av1_get_interp_filter_params((InterpFilter)hfilter); + InterpFilterParams filter_params_y = + av1_get_interp_filter_params((InterpFilter)vfilter); + ConvolveParams conv_params1 = + get_conv_params_no_round(0, 0, 0, output, MAX_SB_SIZE); + ConvolveParams conv_params2 = + get_conv_params_no_round(0, 0, 0, output2, MAX_SB_SIZE); + + for (subx = 0; subx < 16; ++subx) + for (suby = 0; suby < 16; ++suby) { + for (i = 0; i < num_iters; ++i) { + // Choose random locations within the source block + int offset_r = 3 + rnd_.PseudoUniform(h - out_h - 7); + int offset_c = 3 + rnd_.PseudoUniform(w - out_w - 7); + av1_highbd_convolve_2d_c(input + offset_r * w + offset_c, w, output, + MAX_SB_SIZE, out_w, out_h, + &filter_params_x, &filter_params_y, subx, + suby, &conv_params1, bd); + test_impl(input + offset_r * w + offset_c, w, output2, MAX_SB_SIZE, + out_w, out_h, &filter_params_x, &filter_params_y, subx, + suby, &conv_params2, bd); + + for (j = 0; j < out_h; ++j) + for (k = 0; k < out_w; ++k) { + int idx = j * MAX_SB_SIZE + k; + ASSERT_EQ(output[idx], output2[idx]) + << "Pixel mismatch at index " << idx << " = (" << j << ", " + << k << "), sub pixel offset = (" << suby << ", " << subx + << ")"; + } + } + } + } + } + delete[] input; + delete[] output; + delete[] output2; +} +} // namespace AV1HighbdConvolve2D +#endif // CONFIG_HIGHBITDEPTH +} // namespace libaom_test -- cgit v1.2.3 From ec910d81405c736a4490383a250299a7837c2e64 Mon Sep 17 00:00:00 2001 From: trav90 Date: Thu, 18 Oct 2018 21:53:44 -0500 Subject: Update aom to commit id e87fb2378f01103d5d6e477a4ef6892dc714e614 --- third_party/aom/test/av1_convolve_2d_test_util.cc | 49 +++++++++++++---------- 1 file changed, 27 insertions(+), 22 deletions(-) (limited to 'third_party/aom/test/av1_convolve_2d_test_util.cc') diff --git a/third_party/aom/test/av1_convolve_2d_test_util.cc b/third_party/aom/test/av1_convolve_2d_test_util.cc index 8cec216af..3b61f6bb7 100644 --- a/third_party/aom/test/av1_convolve_2d_test_util.cc +++ b/third_party/aom/test/av1_convolve_2d_test_util.cc @@ -23,9 +23,9 @@ namespace AV1Convolve2D { ::testing::internal::ParamGenerator BuildParams( convolve_2d_func filter) { const Convolve2DParam params[] = { - make_tuple(4, 4, 20, filter), make_tuple(8, 8, 10, filter), - make_tuple(64, 64, 1, filter), make_tuple(4, 16, 10, filter), - make_tuple(32, 8, 5, filter), + make_tuple(4, 4, filter), make_tuple(8, 8, filter), + make_tuple(64, 64, filter), make_tuple(4, 16, filter), + make_tuple(32, 8, filter), }; return ::testing::ValuesIn(params); } @@ -38,7 +38,6 @@ void AV1Convolve2DTest::TearDown() { libaom_test::ClearSystemState(); } void AV1Convolve2DTest::RunCheckOutput(convolve_2d_func test_impl) { const int w = 128, h = 128; const int out_w = GET_PARAM(0), out_h = GET_PARAM(1); - const int num_iters = GET_PARAM(2); int i, j, k; uint8_t *input = new uint8_t[h * w]; @@ -50,9 +49,6 @@ void AV1Convolve2DTest::RunCheckOutput(convolve_2d_func test_impl) { for (i = 0; i < h; ++i) for (j = 0; j < w; ++j) input[i * w + j] = rnd_.Rand8(); - memset(output, 0, output_n * sizeof(CONV_BUF_TYPE)); - memset(output2, 0, output_n * sizeof(CONV_BUF_TYPE)); - int hfilter, vfilter, subx, suby; for (hfilter = EIGHTTAP_REGULAR; hfilter < INTERP_FILTERS_ALL; ++hfilter) { for (vfilter = EIGHTTAP_REGULAR; vfilter < INTERP_FILTERS_ALL; ++vfilter) { @@ -60,13 +56,20 @@ void AV1Convolve2DTest::RunCheckOutput(convolve_2d_func test_impl) { av1_get_interp_filter_params((InterpFilter)hfilter); InterpFilterParams filter_params_y = av1_get_interp_filter_params((InterpFilter)vfilter); + const int do_average = rnd_.Rand8() & 1; ConvolveParams conv_params1 = - get_conv_params_no_round(0, 0, 0, output, MAX_SB_SIZE); + get_conv_params_no_round(0, do_average, 0, output, MAX_SB_SIZE); ConvolveParams conv_params2 = - get_conv_params_no_round(0, 0, 0, output2, MAX_SB_SIZE); + get_conv_params_no_round(0, do_average, 0, output2, MAX_SB_SIZE); for (subx = 0; subx < 16; ++subx) for (suby = 0; suby < 16; ++suby) { + // av1_convolve_2d is designed for accumulate two predicted blocks for + // compound mode, so we set num_iter to two here. + // A larger number may introduce overflow + const int num_iters = 2; + memset(output, 0, output_n * sizeof(*output)); + memset(output2, 0, output_n * sizeof(*output2)); for (i = 0; i < num_iters; ++i) { // Choose random locations within the source block int offset_r = 3 + rnd_.PseudoUniform(h - out_h - 7); @@ -102,14 +105,14 @@ namespace AV1HighbdConvolve2D { ::testing::internal::ParamGenerator BuildParams( highbd_convolve_2d_func filter) { const HighbdConvolve2DParam params[] = { - make_tuple(4, 4, 20, 8, filter), make_tuple(8, 8, 10, 8, filter), - make_tuple(64, 64, 1, 8, filter), make_tuple(4, 16, 10, 8, filter), - make_tuple(32, 8, 10, 8, filter), make_tuple(4, 4, 20, 10, filter), - make_tuple(8, 8, 10, 10, filter), make_tuple(64, 64, 1, 10, filter), - make_tuple(4, 16, 10, 10, filter), make_tuple(32, 8, 10, 10, filter), - make_tuple(4, 4, 20, 12, filter), make_tuple(8, 8, 10, 12, filter), - make_tuple(64, 64, 1, 12, filter), make_tuple(4, 16, 10, 12, filter), - make_tuple(32, 8, 10, 12, filter), + make_tuple(4, 4, 8, filter), make_tuple(8, 8, 8, filter), + make_tuple(64, 64, 8, filter), make_tuple(4, 16, 8, filter), + make_tuple(32, 8, 8, filter), make_tuple(4, 4, 10, filter), + make_tuple(8, 8, 10, filter), make_tuple(64, 64, 10, filter), + make_tuple(4, 16, 10, filter), make_tuple(32, 8, 10, filter), + make_tuple(4, 4, 12, filter), make_tuple(8, 8, 12, filter), + make_tuple(64, 64, 12, filter), make_tuple(4, 16, 12, filter), + make_tuple(32, 8, 12, filter), }; return ::testing::ValuesIn(params); } @@ -125,8 +128,7 @@ void AV1HighbdConvolve2DTest::RunCheckOutput( highbd_convolve_2d_func test_impl) { const int w = 128, h = 128; const int out_w = GET_PARAM(0), out_h = GET_PARAM(1); - const int num_iters = GET_PARAM(2); - const int bd = GET_PARAM(3); + const int bd = GET_PARAM(2); int i, j, k; uint16_t *input = new uint16_t[h * w]; @@ -138,9 +140,6 @@ void AV1HighbdConvolve2DTest::RunCheckOutput( for (i = 0; i < h; ++i) for (j = 0; j < w; ++j) input[i * w + j] = rnd_.Rand16() & ((1 << bd) - 1); - memset(output, 0, output_n * sizeof(CONV_BUF_TYPE)); - memset(output2, 0, output_n * sizeof(CONV_BUF_TYPE)); - int hfilter, vfilter, subx, suby; for (hfilter = EIGHTTAP_REGULAR; hfilter < INTERP_FILTERS_ALL; ++hfilter) { for (vfilter = EIGHTTAP_REGULAR; vfilter < INTERP_FILTERS_ALL; ++vfilter) { @@ -155,6 +154,12 @@ void AV1HighbdConvolve2DTest::RunCheckOutput( for (subx = 0; subx < 16; ++subx) for (suby = 0; suby < 16; ++suby) { + // av1_convolve_2d is designed for accumulate two predicted blocks for + // compound mode, so we set num_iter to two here. + // A larger number may introduce overflow + const int num_iters = 2; + memset(output, 0, output_n * sizeof(*output)); + memset(output2, 0, output_n * sizeof(*output2)); for (i = 0; i < num_iters; ++i) { // Choose random locations within the source block int offset_r = 3 + rnd_.PseudoUniform(h - out_h - 7); -- cgit v1.2.3 From bbcc64772580c8a979288791afa02d30bc476d2e Mon Sep 17 00:00:00 2001 From: trav90 Date: Fri, 19 Oct 2018 21:52:15 -0500 Subject: Update aom to v1.0.0 Update aom to commit id d14c5bb4f336ef1842046089849dee4a301fbbf0. --- third_party/aom/test/av1_convolve_2d_test_util.cc | 758 ++++++++++++++++++---- 1 file changed, 635 insertions(+), 123 deletions(-) (limited to 'third_party/aom/test/av1_convolve_2d_test_util.cc') diff --git a/third_party/aom/test/av1_convolve_2d_test_util.cc b/third_party/aom/test/av1_convolve_2d_test_util.cc index 3b61f6bb7..cbe3f8c9f 100644 --- a/third_party/aom/test/av1_convolve_2d_test_util.cc +++ b/third_party/aom/test/av1_convolve_2d_test_util.cc @@ -11,183 +11,695 @@ #include "test/av1_convolve_2d_test_util.h" +#include "aom_ports/aom_timer.h" +#include "av1/common/common_data.h" #include "av1/common/convolve.h" -using std::tr1::tuple; -using std::tr1::make_tuple; +using ::testing::make_tuple; +using ::testing::tuple; namespace libaom_test { +const int kMaxSize = 128 + 32; // padding namespace AV1Convolve2D { ::testing::internal::ParamGenerator BuildParams( - convolve_2d_func filter) { - const Convolve2DParam params[] = { - make_tuple(4, 4, filter), make_tuple(8, 8, filter), - make_tuple(64, 64, filter), make_tuple(4, 16, filter), - make_tuple(32, 8, filter), - }; - return ::testing::ValuesIn(params); + convolve_2d_func filter, int has_subx, int has_suby) { + return ::testing::Combine(::testing::Values(filter), + ::testing::Values(has_subx), + ::testing::Values(has_suby), + ::testing::Range(BLOCK_4X4, BLOCK_SIZES_ALL)); } -AV1Convolve2DTest::~AV1Convolve2DTest() {} -void AV1Convolve2DTest::SetUp() { rnd_.Reset(ACMRandom::DeterministicSeed()); } +AV1Convolve2DSrTest::~AV1Convolve2DSrTest() {} +void AV1Convolve2DSrTest::SetUp() { + rnd_.Reset(ACMRandom::DeterministicSeed()); +} + +void AV1Convolve2DSrTest::TearDown() { libaom_test::ClearSystemState(); } + +void AV1Convolve2DSrTest::RunCheckOutput(convolve_2d_func test_impl) { + const int w = kMaxSize, h = kMaxSize; + const int has_subx = GET_PARAM(1); + const int has_suby = GET_PARAM(2); + const int block_idx = GET_PARAM(3); + int hfilter, vfilter, subx, suby; + uint8_t input[kMaxSize * kMaxSize]; + DECLARE_ALIGNED(32, uint8_t, output[MAX_SB_SQUARE]); + DECLARE_ALIGNED(32, uint8_t, output2[MAX_SB_SQUARE]); + + for (int i = 0; i < h; ++i) + for (int j = 0; j < w; ++j) input[i * w + j] = rnd_.Rand8(); + for (int i = 0; i < MAX_SB_SQUARE; ++i) + output[i] = output2[i] = rnd_.Rand31(); + + // Make sure that sizes 2xN and Nx2 are also tested for chroma. + const int num_sizes = + (block_size_wide[block_idx] == 4 || block_size_high[block_idx] == 4) ? 2 + : 1; + for (int shift = 0; shift < num_sizes; ++shift) { // luma and chroma + const int out_w = block_size_wide[block_idx] >> shift; + const int out_h = block_size_high[block_idx] >> shift; + for (hfilter = EIGHTTAP_REGULAR; hfilter < INTERP_FILTERS_ALL; ++hfilter) { + for (vfilter = EIGHTTAP_REGULAR; vfilter < INTERP_FILTERS_ALL; + ++vfilter) { + InterpFilterParams filter_params_x = + av1_get_interp_filter_params_with_block_size((InterpFilter)hfilter, + out_w); + InterpFilterParams filter_params_y = + av1_get_interp_filter_params_with_block_size((InterpFilter)vfilter, + out_h); + for (int do_average = 0; do_average < 1; ++do_average) { + ConvolveParams conv_params1 = + get_conv_params_no_round(0, do_average, 0, NULL, 0, 0, 8); + ConvolveParams conv_params2 = + get_conv_params_no_round(0, do_average, 0, NULL, 0, 0, 8); -void AV1Convolve2DTest::TearDown() { libaom_test::ClearSystemState(); } + const int subx_range = has_subx ? 16 : 1; + const int suby_range = has_suby ? 16 : 1; + for (subx = 0; subx < subx_range; ++subx) { + for (suby = 0; suby < suby_range; ++suby) { + // Choose random locations within the source block + const int offset_r = 3 + rnd_.PseudoUniform(h - out_h - 7); + const int offset_c = 3 + rnd_.PseudoUniform(w - out_w - 7); + av1_convolve_2d_sr_c(input + offset_r * w + offset_c, w, output, + MAX_SB_SIZE, out_w, out_h, &filter_params_x, + &filter_params_y, subx, suby, &conv_params1); + test_impl(input + offset_r * w + offset_c, w, output2, + MAX_SB_SIZE, out_w, out_h, &filter_params_x, + &filter_params_y, subx, suby, &conv_params2); + + if (memcmp(output, output2, sizeof(output))) { + for (int i = 0; i < MAX_SB_SIZE; ++i) { + for (int j = 0; j < MAX_SB_SIZE; ++j) { + int idx = i * MAX_SB_SIZE + j; + ASSERT_EQ(output[idx], output2[idx]) + << out_w << "x" << out_h << " Pixel mismatch at index " + << idx << " = (" << i << ", " << j + << "), sub pixel offset = (" << suby << ", " << subx + << ")"; + } + } + } + } + } + } + } + } + } +} -void AV1Convolve2DTest::RunCheckOutput(convolve_2d_func test_impl) { - const int w = 128, h = 128; - const int out_w = GET_PARAM(0), out_h = GET_PARAM(1); - int i, j, k; +void AV1Convolve2DSrTest::RunSpeedTest(convolve_2d_func test_impl) { + const int w = kMaxSize, h = kMaxSize; + const int has_subx = GET_PARAM(1); + const int has_suby = GET_PARAM(2); + const int block_idx = GET_PARAM(3); - uint8_t *input = new uint8_t[h * w]; + uint8_t input[kMaxSize * kMaxSize]; + DECLARE_ALIGNED(32, uint8_t, output[MAX_SB_SQUARE]); - int output_n = out_h * MAX_SB_SIZE; - CONV_BUF_TYPE *output = new CONV_BUF_TYPE[output_n]; - CONV_BUF_TYPE *output2 = new CONV_BUF_TYPE[output_n]; + for (int i = 0; i < h; ++i) + for (int j = 0; j < w; ++j) input[i * w + j] = rnd_.Rand8(); - for (i = 0; i < h; ++i) - for (j = 0; j < w; ++j) input[i * w + j] = rnd_.Rand8(); + int hfilter = EIGHTTAP_REGULAR, vfilter = EIGHTTAP_REGULAR; + int subx = 0, suby = 0; + const int do_average = 0; + ConvolveParams conv_params2 = + get_conv_params_no_round(0, do_average, 0, NULL, 0, 0, 8); + + // Make sure that sizes 2xN and Nx2 are also tested for chroma. + const int num_sizes = + (block_size_wide[block_idx] == 4 || block_size_high[block_idx] == 4) ? 2 + : 1; + for (int shift = 0; shift < num_sizes; ++shift) { // luma and chroma + const int out_w = block_size_wide[block_idx] >> shift; + const int out_h = block_size_high[block_idx] >> shift; + const int num_loops = 1000000000 / (out_w + out_h); + + InterpFilterParams filter_params_x = + av1_get_interp_filter_params_with_block_size((InterpFilter)hfilter, + out_w); + InterpFilterParams filter_params_y = + av1_get_interp_filter_params_with_block_size((InterpFilter)vfilter, + out_h); + + aom_usec_timer timer; + aom_usec_timer_start(&timer); + + for (int i = 0; i < num_loops; ++i) + test_impl(input, w, output, MAX_SB_SIZE, out_w, out_h, &filter_params_x, + &filter_params_y, subx, suby, &conv_params2); + + aom_usec_timer_mark(&timer); + const int elapsed_time = static_cast(aom_usec_timer_elapsed(&timer)); + printf("%d,%d convolve %3dx%-3d: %7.2f us\n", has_subx, has_suby, out_w, + out_h, 1000.0 * elapsed_time / num_loops); + } +} + +AV1JntConvolve2DTest::~AV1JntConvolve2DTest() {} +void AV1JntConvolve2DTest::SetUp() { + rnd_.Reset(ACMRandom::DeterministicSeed()); +} + +void AV1JntConvolve2DTest::TearDown() { libaom_test::ClearSystemState(); } + +void AV1JntConvolve2DTest::RunCheckOutput(convolve_2d_func test_impl) { + const int w = kMaxSize, h = kMaxSize; + const int has_subx = GET_PARAM(1); + const int has_suby = GET_PARAM(2); + const int block_idx = GET_PARAM(3); int hfilter, vfilter, subx, suby; + uint8_t input[kMaxSize * kMaxSize]; + DECLARE_ALIGNED(32, CONV_BUF_TYPE, output1[MAX_SB_SQUARE]); + DECLARE_ALIGNED(32, CONV_BUF_TYPE, output2[MAX_SB_SQUARE]); + DECLARE_ALIGNED(16, uint8_t, output8_1[MAX_SB_SQUARE]); + DECLARE_ALIGNED(16, uint8_t, output8_2[MAX_SB_SQUARE]); + + for (int i = 0; i < h; ++i) + for (int j = 0; j < w; ++j) input[i * w + j] = rnd_.Rand8(); + for (int i = 0; i < MAX_SB_SQUARE; ++i) { + output1[i] = output2[i] = rnd_.Rand16(); + output8_1[i] = output8_2[i] = rnd_.Rand8(); + } + + const int out_w = block_size_wide[block_idx]; + const int out_h = block_size_high[block_idx]; for (hfilter = EIGHTTAP_REGULAR; hfilter < INTERP_FILTERS_ALL; ++hfilter) { for (vfilter = EIGHTTAP_REGULAR; vfilter < INTERP_FILTERS_ALL; ++vfilter) { InterpFilterParams filter_params_x = - av1_get_interp_filter_params((InterpFilter)hfilter); + av1_get_interp_filter_params_with_block_size((InterpFilter)hfilter, + out_w); InterpFilterParams filter_params_y = - av1_get_interp_filter_params((InterpFilter)vfilter); - const int do_average = rnd_.Rand8() & 1; - ConvolveParams conv_params1 = - get_conv_params_no_round(0, do_average, 0, output, MAX_SB_SIZE); - ConvolveParams conv_params2 = - get_conv_params_no_round(0, do_average, 0, output2, MAX_SB_SIZE); - - for (subx = 0; subx < 16; ++subx) - for (suby = 0; suby < 16; ++suby) { - // av1_convolve_2d is designed for accumulate two predicted blocks for - // compound mode, so we set num_iter to two here. - // A larger number may introduce overflow - const int num_iters = 2; - memset(output, 0, output_n * sizeof(*output)); - memset(output2, 0, output_n * sizeof(*output2)); - for (i = 0; i < num_iters; ++i) { + av1_get_interp_filter_params_with_block_size((InterpFilter)vfilter, + out_h); + for (int do_average = 0; do_average <= 1; ++do_average) { + ConvolveParams conv_params1 = get_conv_params_no_round( + 0, do_average, 0, output1, MAX_SB_SIZE, 1, 8); + ConvolveParams conv_params2 = get_conv_params_no_round( + 0, do_average, 0, output2, MAX_SB_SIZE, 1, 8); + + // Test special case where jnt_comp_avg is not used + conv_params1.use_jnt_comp_avg = 0; + conv_params2.use_jnt_comp_avg = 0; + + const int subx_range = has_subx ? 16 : 1; + const int suby_range = has_suby ? 16 : 1; + for (subx = 0; subx < subx_range; ++subx) { + for (suby = 0; suby < suby_range; ++suby) { // Choose random locations within the source block - int offset_r = 3 + rnd_.PseudoUniform(h - out_h - 7); - int offset_c = 3 + rnd_.PseudoUniform(w - out_w - 7); - av1_convolve_2d_c(input + offset_r * w + offset_c, w, output, - MAX_SB_SIZE, out_w, out_h, &filter_params_x, - &filter_params_y, subx, suby, &conv_params1); - test_impl(input + offset_r * w + offset_c, w, output2, MAX_SB_SIZE, - out_w, out_h, &filter_params_x, &filter_params_y, subx, - suby, &conv_params2); - - for (j = 0; j < out_h; ++j) - for (k = 0; k < out_w; ++k) { - int idx = j * MAX_SB_SIZE + k; - ASSERT_EQ(output[idx], output2[idx]) - << "Pixel mismatch at index " << idx << " = (" << j << ", " - << k << "), sub pixel offset = (" << suby << ", " << subx - << ")"; + const int offset_r = 3 + rnd_.PseudoUniform(h - out_h - 7); + const int offset_c = 3 + rnd_.PseudoUniform(w - out_w - 7); + av1_jnt_convolve_2d_c(input + offset_r * w + offset_c, w, output8_1, + MAX_SB_SIZE, out_w, out_h, &filter_params_x, + &filter_params_y, subx, suby, &conv_params1); + test_impl(input + offset_r * w + offset_c, w, output8_2, + MAX_SB_SIZE, out_w, out_h, &filter_params_x, + &filter_params_y, subx, suby, &conv_params2); + + for (int i = 0; i < out_h; ++i) { + for (int j = 0; j < out_w; ++j) { + int idx = i * MAX_SB_SIZE + j; + ASSERT_EQ(output1[idx], output2[idx]) + << "Mismatch at unit tests for av1_jnt_convolve_2d\n" + << out_w << "x" << out_h << " Pixel mismatch at index " + << idx << " = (" << i << ", " << j + << "), sub pixel offset = (" << suby << ", " << subx << ")"; + } + } + + if (memcmp(output8_1, output8_2, sizeof(output8_1))) { + for (int i = 0; i < MAX_SB_SIZE; ++i) { + for (int j = 0; j < MAX_SB_SIZE; ++j) { + int idx = i * MAX_SB_SIZE + j; + ASSERT_EQ(output8_1[idx], output8_2[idx]) + << out_w << "x" << out_h << " Pixel mismatch at index " + << idx << " = (" << i << ", " << j + << "), sub pixel offset = (" << suby << ", " << subx + << ")"; + } + } + } + } + } + + // Test different combination of fwd and bck offset weights + for (int k = 0; k < 2; ++k) { + for (int l = 0; l < 4; ++l) { + conv_params1.use_jnt_comp_avg = 1; + conv_params2.use_jnt_comp_avg = 1; + conv_params1.fwd_offset = quant_dist_lookup_table[k][l][0]; + conv_params1.bck_offset = quant_dist_lookup_table[k][l][1]; + conv_params2.fwd_offset = quant_dist_lookup_table[k][l][0]; + conv_params2.bck_offset = quant_dist_lookup_table[k][l][1]; + + for (subx = 0; subx < subx_range; ++subx) { + for (suby = 0; suby < suby_range; ++suby) { + // Choose random locations within the source block + const int offset_r = 3 + rnd_.PseudoUniform(h - out_h - 7); + const int offset_c = 3 + rnd_.PseudoUniform(w - out_w - 7); + av1_jnt_convolve_2d_c(input + offset_r * w + offset_c, w, + output8_1, MAX_SB_SIZE, out_w, out_h, + &filter_params_x, &filter_params_y, subx, + suby, &conv_params1); + test_impl(input + offset_r * w + offset_c, w, output8_2, + MAX_SB_SIZE, out_w, out_h, &filter_params_x, + &filter_params_y, subx, suby, &conv_params2); + + for (int i = 0; i < out_h; ++i) { + for (int j = 0; j < out_w; ++j) { + int idx = i * MAX_SB_SIZE + j; + ASSERT_EQ(output1[idx], output2[idx]) + << "Mismatch at unit tests for " + "av1_jnt_convolve_2d\n" + << out_w << "x" << out_h << " Pixel mismatch at index " + << idx << " = (" << i << ", " << j + << "), sub pixel offset = (" << suby << ", " << subx + << ")"; + } + } + if (memcmp(output8_1, output8_2, sizeof(output8_1))) { + for (int i = 0; i < MAX_SB_SIZE; ++i) { + for (int j = 0; j < MAX_SB_SIZE; ++j) { + int idx = i * MAX_SB_SIZE + j; + ASSERT_EQ(output8_1[idx], output8_2[idx]) + << out_w << "x" << out_h + << " Pixel mismatch at index " << idx << " = (" << i + << ", " << j << "), sub pixel offset = (" << suby + << ", " << subx << ")"; + } + } + } } + } } } + } } } - delete[] input; - delete[] output; - delete[] output2; +} + +void AV1JntConvolve2DTest::RunSpeedTest(convolve_2d_func test_impl) { + const int w = kMaxSize, h = kMaxSize; + const int has_subx = GET_PARAM(1); + const int has_suby = GET_PARAM(2); + const int block_idx = GET_PARAM(3); + + int subx = 0, suby = 0; + uint8_t input[kMaxSize * kMaxSize]; + DECLARE_ALIGNED(32, CONV_BUF_TYPE, output[MAX_SB_SQUARE]); + DECLARE_ALIGNED(16, uint8_t, output8[MAX_SB_SQUARE]); + int hfilter = EIGHTTAP_REGULAR, vfilter = EIGHTTAP_REGULAR; + for (int i = 0; i < h; ++i) + for (int j = 0; j < w; ++j) input[i * w + j] = rnd_.Rand8(); + for (int i = 0; i < MAX_SB_SQUARE; ++i) { + output[i] = rnd_.Rand16(); + output8[i] = rnd_.Rand8(); + } + + const int out_w = block_size_wide[block_idx]; + const int out_h = block_size_high[block_idx]; + const int num_loops = 1000000000 / (out_w + out_h); + const int do_average = 0; + + InterpFilterParams filter_params_x = + av1_get_interp_filter_params_with_block_size((InterpFilter)hfilter, + out_w); + InterpFilterParams filter_params_y = + av1_get_interp_filter_params_with_block_size((InterpFilter)vfilter, + out_h); + + ConvolveParams conv_params = + get_conv_params_no_round(0, do_average, 0, output, MAX_SB_SIZE, 1, 8); + + conv_params.use_jnt_comp_avg = 0; + + // Choose random locations within the source block + const int offset_r = 3 + rnd_.PseudoUniform(h - out_h - 7); + const int offset_c = 3 + rnd_.PseudoUniform(w - out_w - 7); + + aom_usec_timer timer; + aom_usec_timer_start(&timer); + + for (int i = 0; i < num_loops; ++i) + test_impl(input + offset_r * w + offset_c, w, output8, MAX_SB_SIZE, out_w, + out_h, &filter_params_x, &filter_params_y, subx, suby, + &conv_params); + + aom_usec_timer_mark(&timer); + const int elapsed_time = static_cast(aom_usec_timer_elapsed(&timer)); + printf("%d,%d convolve %3dx%-3d: %7.2f us\n", has_subx, has_suby, out_w, + out_h, 1000.0 * elapsed_time / num_loops); } } // namespace AV1Convolve2D -#if CONFIG_HIGHBITDEPTH namespace AV1HighbdConvolve2D { - ::testing::internal::ParamGenerator BuildParams( - highbd_convolve_2d_func filter) { - const HighbdConvolve2DParam params[] = { - make_tuple(4, 4, 8, filter), make_tuple(8, 8, 8, filter), - make_tuple(64, 64, 8, filter), make_tuple(4, 16, 8, filter), - make_tuple(32, 8, 8, filter), make_tuple(4, 4, 10, filter), - make_tuple(8, 8, 10, filter), make_tuple(64, 64, 10, filter), - make_tuple(4, 16, 10, filter), make_tuple(32, 8, 10, filter), - make_tuple(4, 4, 12, filter), make_tuple(8, 8, 12, filter), - make_tuple(64, 64, 12, filter), make_tuple(4, 16, 12, filter), - make_tuple(32, 8, 12, filter), - }; - return ::testing::ValuesIn(params); + highbd_convolve_2d_func filter, int has_subx, int has_suby) { + return ::testing::Combine( + ::testing::Range(8, 13, 2), ::testing::Values(filter), + ::testing::Values(has_subx), ::testing::Values(has_suby), + ::testing::Range(BLOCK_4X4, BLOCK_SIZES_ALL)); } -AV1HighbdConvolve2DTest::~AV1HighbdConvolve2DTest() {} -void AV1HighbdConvolve2DTest::SetUp() { +AV1HighbdConvolve2DSrTest::~AV1HighbdConvolve2DSrTest() {} +void AV1HighbdConvolve2DSrTest::SetUp() { rnd_.Reset(ACMRandom::DeterministicSeed()); } -void AV1HighbdConvolve2DTest::TearDown() { libaom_test::ClearSystemState(); } +void AV1HighbdConvolve2DSrTest::TearDown() { libaom_test::ClearSystemState(); } -void AV1HighbdConvolve2DTest::RunCheckOutput( +void AV1HighbdConvolve2DSrTest::RunSpeedTest( highbd_convolve_2d_func test_impl) { - const int w = 128, h = 128; - const int out_w = GET_PARAM(0), out_h = GET_PARAM(1); - const int bd = GET_PARAM(2); - int i, j, k; + const int w = kMaxSize, h = kMaxSize; + const int bd = GET_PARAM(0); + const int has_subx = GET_PARAM(2); + const int has_suby = GET_PARAM(3); + const int block_idx = GET_PARAM(4); + int hfilter, vfilter, subx, suby; + uint16_t input[kMaxSize * kMaxSize]; + DECLARE_ALIGNED(32, uint16_t, output[MAX_SB_SQUARE]); + + for (int i = 0; i < h; ++i) + for (int j = 0; j < w; ++j) + input[i * w + j] = rnd_.Rand16() & ((1 << bd) - 1); + + hfilter = EIGHTTAP_REGULAR; + vfilter = EIGHTTAP_REGULAR; + int do_average = 0; + + const int offset_r = 3; + const int offset_c = 3; + subx = 0; + suby = 0; + + ConvolveParams conv_params = + get_conv_params_no_round(0, do_average, 0, NULL, 0, 0, bd); + + // Make sure that sizes 2xN and Nx2 are also tested for chroma. + const int num_sizes = + (block_size_wide[block_idx] == 4 || block_size_high[block_idx] == 4) ? 2 + : 1; + + for (int shift = 0; shift < num_sizes; ++shift) { // luma and chroma + const int out_w = block_size_wide[block_idx] >> shift; + const int out_h = block_size_high[block_idx] >> shift; + const int num_loops = 1000000000 / (out_w + out_h); - uint16_t *input = new uint16_t[h * w]; + InterpFilterParams filter_params_x = + av1_get_interp_filter_params_with_block_size((InterpFilter)hfilter, + out_w); + InterpFilterParams filter_params_y = + av1_get_interp_filter_params_with_block_size((InterpFilter)vfilter, + out_h); + + aom_usec_timer timer; + aom_usec_timer_start(&timer); + for (int i = 0; i < num_loops; ++i) + test_impl(input + offset_r * w + offset_c, w, output, MAX_SB_SIZE, out_w, + out_h, &filter_params_x, &filter_params_y, subx, suby, + &conv_params, bd); + + aom_usec_timer_mark(&timer); + const int elapsed_time = static_cast(aom_usec_timer_elapsed(&timer)); + printf("%d,%d convolve %3dx%-3d: %7.2f us\n", has_subx, has_suby, out_w, + out_h, 1000.0 * elapsed_time / num_loops); + } +} + +void AV1HighbdConvolve2DSrTest::RunCheckOutput( + highbd_convolve_2d_func test_impl) { + const int w = kMaxSize, h = kMaxSize; + const int bd = GET_PARAM(0); + const int has_subx = GET_PARAM(2); + const int has_suby = GET_PARAM(3); + const int block_idx = GET_PARAM(4); + int hfilter, vfilter, subx, suby; + uint16_t input[kMaxSize * kMaxSize]; + DECLARE_ALIGNED(32, uint16_t, output[MAX_SB_SQUARE]); + DECLARE_ALIGNED(32, uint16_t, output2[MAX_SB_SQUARE]); - int output_n = out_h * MAX_SB_SIZE; - CONV_BUF_TYPE *output = new CONV_BUF_TYPE[output_n]; - CONV_BUF_TYPE *output2 = new CONV_BUF_TYPE[output_n]; + for (int i = 0; i < h; ++i) + for (int j = 0; j < w; ++j) + input[i * w + j] = rnd_.Rand16() & ((1 << bd) - 1); + for (int i = 0; i < MAX_SB_SQUARE; ++i) + output[i] = output2[i] = rnd_.Rand31(); - for (i = 0; i < h; ++i) - for (j = 0; j < w; ++j) input[i * w + j] = rnd_.Rand16() & ((1 << bd) - 1); + // Make sure that sizes 2xN and Nx2 are also tested for chroma. + const int num_sizes = + (block_size_wide[block_idx] == 4 || block_size_high[block_idx] == 4) ? 2 + : 1; + for (int shift = 0; shift < num_sizes; ++shift) { // luma and chroma + const int out_w = block_size_wide[block_idx] >> shift; + const int out_h = block_size_high[block_idx] >> shift; + for (hfilter = EIGHTTAP_REGULAR; hfilter < INTERP_FILTERS_ALL; ++hfilter) { + for (vfilter = EIGHTTAP_REGULAR; vfilter < INTERP_FILTERS_ALL; + ++vfilter) { + InterpFilterParams filter_params_x = + av1_get_interp_filter_params_with_block_size((InterpFilter)hfilter, + out_w); + InterpFilterParams filter_params_y = + av1_get_interp_filter_params_with_block_size((InterpFilter)vfilter, + out_h); + for (int do_average = 0; do_average < 1; ++do_average) { + ConvolveParams conv_params1 = + get_conv_params_no_round(0, do_average, 0, NULL, 0, 0, bd); + ConvolveParams conv_params2 = + get_conv_params_no_round(0, do_average, 0, NULL, 0, 0, bd); + const int subx_range = has_subx ? 16 : 1; + const int suby_range = has_suby ? 16 : 1; + for (subx = 0; subx < subx_range; ++subx) { + for (suby = 0; suby < suby_range; ++suby) { + // Choose random locations within the source block + const int offset_r = 3 + rnd_.PseudoUniform(h - out_h - 7); + const int offset_c = 3 + rnd_.PseudoUniform(w - out_w - 7); + av1_highbd_convolve_2d_sr_c(input + offset_r * w + offset_c, w, + output, MAX_SB_SIZE, out_w, out_h, + &filter_params_x, &filter_params_y, + subx, suby, &conv_params1, bd); + test_impl(input + offset_r * w + offset_c, w, output2, + MAX_SB_SIZE, out_w, out_h, &filter_params_x, + &filter_params_y, subx, suby, &conv_params2, bd); + + if (memcmp(output, output2, sizeof(output))) { + for (int i = 0; i < MAX_SB_SIZE; ++i) { + for (int j = 0; j < MAX_SB_SIZE; ++j) { + int idx = i * MAX_SB_SIZE + j; + ASSERT_EQ(output[idx], output2[idx]) + << out_w << "x" << out_h << " Pixel mismatch at index " + << idx << " = (" << i << ", " << j + << "), sub pixel offset = (" << suby << ", " << subx + << ")"; + } + } + } + } + } + } + } + } + } +} + +AV1HighbdJntConvolve2DTest::~AV1HighbdJntConvolve2DTest() {} +void AV1HighbdJntConvolve2DTest::SetUp() { + rnd_.Reset(ACMRandom::DeterministicSeed()); +} + +void AV1HighbdJntConvolve2DTest::TearDown() { libaom_test::ClearSystemState(); } + +void AV1HighbdJntConvolve2DTest::RunSpeedTest( + highbd_convolve_2d_func test_impl) { + const int w = kMaxSize, h = kMaxSize; + const int bd = GET_PARAM(0); + const int block_idx = GET_PARAM(4); int hfilter, vfilter, subx, suby; + uint16_t input[kMaxSize * kMaxSize]; + DECLARE_ALIGNED(32, CONV_BUF_TYPE, output[MAX_SB_SQUARE]); + DECLARE_ALIGNED(32, uint16_t, output16[MAX_SB_SQUARE]); + + for (int i = 0; i < h; ++i) + for (int j = 0; j < w; ++j) + input[i * w + j] = rnd_.Rand16() & ((1 << bd) - 1); + for (int i = 0; i < MAX_SB_SQUARE; ++i) output[i] = rnd_.Rand16(); + hfilter = EIGHTTAP_REGULAR; + vfilter = EIGHTTAP_REGULAR; + int do_average = 0; + const int out_w = block_size_wide[block_idx]; + const int out_h = block_size_high[block_idx]; + + InterpFilterParams filter_params_x = + av1_get_interp_filter_params_with_block_size((InterpFilter)hfilter, + out_w); + InterpFilterParams filter_params_y = + av1_get_interp_filter_params_with_block_size((InterpFilter)vfilter, + out_h); + + ConvolveParams conv_params = + get_conv_params_no_round(0, do_average, 0, output, MAX_SB_SIZE, 1, bd); + + // Test special case where jnt_comp_avg is not used + conv_params.use_jnt_comp_avg = 0; + + subx = 0; + suby = 0; + // Choose random locations within the source block + const int offset_r = 3; + const int offset_c = 3; + + const int num_loops = 1000000000 / (out_w + out_h); + aom_usec_timer timer; + aom_usec_timer_start(&timer); + for (int i = 0; i < num_loops; ++i) + test_impl(input + offset_r * w + offset_c, w, output16, MAX_SB_SIZE, out_w, + out_h, &filter_params_x, &filter_params_y, subx, suby, + &conv_params, bd); + + aom_usec_timer_mark(&timer); + const int elapsed_time = static_cast(aom_usec_timer_elapsed(&timer)); + printf("convolve %3dx%-3d: %7.2f us\n", out_w, out_h, + 1000.0 * elapsed_time / num_loops); +} + +void AV1HighbdJntConvolve2DTest::RunCheckOutput( + highbd_convolve_2d_func test_impl) { + const int w = kMaxSize, h = kMaxSize; + const int bd = GET_PARAM(0); + const int has_subx = GET_PARAM(2); + const int has_suby = GET_PARAM(3); + const int block_idx = GET_PARAM(4); + int hfilter, vfilter, subx, suby; + uint16_t input[kMaxSize * kMaxSize]; + DECLARE_ALIGNED(32, CONV_BUF_TYPE, output1[MAX_SB_SQUARE]); + DECLARE_ALIGNED(32, CONV_BUF_TYPE, output2[MAX_SB_SQUARE]); + DECLARE_ALIGNED(32, uint16_t, output16_1[MAX_SB_SQUARE]); + DECLARE_ALIGNED(32, uint16_t, output16_2[MAX_SB_SQUARE]); + + for (int i = 0; i < h; ++i) + for (int j = 0; j < w; ++j) + input[i * w + j] = rnd_.Rand16() & ((1 << bd) - 1); + for (int i = 0; i < MAX_SB_SQUARE; ++i) { + output1[i] = output2[i] = rnd_.Rand16(); + output16_1[i] = output16_2[i] = rnd_.Rand16(); + } + + const int out_w = block_size_wide[block_idx]; + const int out_h = block_size_high[block_idx]; for (hfilter = EIGHTTAP_REGULAR; hfilter < INTERP_FILTERS_ALL; ++hfilter) { for (vfilter = EIGHTTAP_REGULAR; vfilter < INTERP_FILTERS_ALL; ++vfilter) { InterpFilterParams filter_params_x = - av1_get_interp_filter_params((InterpFilter)hfilter); + av1_get_interp_filter_params_with_block_size((InterpFilter)hfilter, + out_w); InterpFilterParams filter_params_y = - av1_get_interp_filter_params((InterpFilter)vfilter); - ConvolveParams conv_params1 = - get_conv_params_no_round(0, 0, 0, output, MAX_SB_SIZE); - ConvolveParams conv_params2 = - get_conv_params_no_round(0, 0, 0, output2, MAX_SB_SIZE); - - for (subx = 0; subx < 16; ++subx) - for (suby = 0; suby < 16; ++suby) { - // av1_convolve_2d is designed for accumulate two predicted blocks for - // compound mode, so we set num_iter to two here. - // A larger number may introduce overflow - const int num_iters = 2; - memset(output, 0, output_n * sizeof(*output)); - memset(output2, 0, output_n * sizeof(*output2)); - for (i = 0; i < num_iters; ++i) { + av1_get_interp_filter_params_with_block_size((InterpFilter)vfilter, + out_h); + for (int do_average = 0; do_average <= 1; ++do_average) { + ConvolveParams conv_params1 = get_conv_params_no_round( + 0, do_average, 0, output1, MAX_SB_SIZE, 1, bd); + ConvolveParams conv_params2 = get_conv_params_no_round( + 0, do_average, 0, output2, MAX_SB_SIZE, 1, bd); + + // Test special case where jnt_comp_avg is not used + conv_params1.use_jnt_comp_avg = 0; + conv_params2.use_jnt_comp_avg = 0; + + const int subx_range = has_subx ? 16 : 1; + const int suby_range = has_suby ? 16 : 1; + for (subx = 0; subx < subx_range; ++subx) { + for (suby = 0; suby < suby_range; ++suby) { // Choose random locations within the source block - int offset_r = 3 + rnd_.PseudoUniform(h - out_h - 7); - int offset_c = 3 + rnd_.PseudoUniform(w - out_w - 7); - av1_highbd_convolve_2d_c(input + offset_r * w + offset_c, w, output, - MAX_SB_SIZE, out_w, out_h, - &filter_params_x, &filter_params_y, subx, - suby, &conv_params1, bd); - test_impl(input + offset_r * w + offset_c, w, output2, MAX_SB_SIZE, - out_w, out_h, &filter_params_x, &filter_params_y, subx, - suby, &conv_params2, bd); - - for (j = 0; j < out_h; ++j) - for (k = 0; k < out_w; ++k) { - int idx = j * MAX_SB_SIZE + k; - ASSERT_EQ(output[idx], output2[idx]) - << "Pixel mismatch at index " << idx << " = (" << j << ", " - << k << "), sub pixel offset = (" << suby << ", " << subx - << ")"; + const int offset_r = 3 + rnd_.PseudoUniform(h - out_h - 7); + const int offset_c = 3 + rnd_.PseudoUniform(w - out_w - 7); + av1_highbd_jnt_convolve_2d_c(input + offset_r * w + offset_c, w, + output16_1, MAX_SB_SIZE, out_w, out_h, + &filter_params_x, &filter_params_y, + subx, suby, &conv_params1, bd); + test_impl(input + offset_r * w + offset_c, w, output16_2, + MAX_SB_SIZE, out_w, out_h, &filter_params_x, + &filter_params_y, subx, suby, &conv_params2, bd); + + for (int i = 0; i < out_h; ++i) { + for (int j = 0; j < out_w; ++j) { + int idx = i * MAX_SB_SIZE + j; + ASSERT_EQ(output1[idx], output2[idx]) + << out_w << "x" << out_h << " Pixel mismatch at index " + << idx << " = (" << i << ", " << j + << "), sub pixel offset = (" << suby << ", " << subx << ")"; + } + } + + if (memcmp(output16_1, output16_2, sizeof(output16_1))) { + for (int i = 0; i < MAX_SB_SIZE; ++i) { + for (int j = 0; j < MAX_SB_SIZE; ++j) { + int idx = i * MAX_SB_SIZE + j; + ASSERT_EQ(output16_1[idx], output16_2[idx]) + << out_w << "x" << out_h << " Pixel mismatch at index " + << idx << " = (" << i << ", " << j + << "), sub pixel offset = (" << suby << ", " << subx + << ")"; + } + } + } + } + } + + // Test different combination of fwd and bck offset weights + for (int k = 0; k < 2; ++k) { + for (int l = 0; l < 4; ++l) { + conv_params1.use_jnt_comp_avg = 1; + conv_params2.use_jnt_comp_avg = 1; + conv_params1.fwd_offset = quant_dist_lookup_table[k][l][0]; + conv_params1.bck_offset = quant_dist_lookup_table[k][l][1]; + conv_params2.fwd_offset = quant_dist_lookup_table[k][l][0]; + conv_params2.bck_offset = quant_dist_lookup_table[k][l][1]; + + const int subx_range = has_subx ? 16 : 1; + const int suby_range = has_suby ? 16 : 1; + for (subx = 0; subx < subx_range; ++subx) { + for (suby = 0; suby < suby_range; ++suby) { + // Choose random locations within the source block + const int offset_r = 3 + rnd_.PseudoUniform(h - out_h - 7); + const int offset_c = 3 + rnd_.PseudoUniform(w - out_w - 7); + av1_highbd_jnt_convolve_2d_c( + input + offset_r * w + offset_c, w, output16_1, MAX_SB_SIZE, + out_w, out_h, &filter_params_x, &filter_params_y, subx, + suby, &conv_params1, bd); + test_impl(input + offset_r * w + offset_c, w, output16_2, + MAX_SB_SIZE, out_w, out_h, &filter_params_x, + &filter_params_y, subx, suby, &conv_params2, bd); + + for (int i = 0; i < out_h; ++i) { + for (int j = 0; j < out_w; ++j) { + int idx = i * MAX_SB_SIZE + j; + ASSERT_EQ(output1[idx], output2[idx]) + << out_w << "x" << out_h << " Pixel mismatch at index " + << idx << " = (" << i << ", " << j + << "), sub pixel offset = (" << suby << ", " << subx + << ")"; + } + } + + if (memcmp(output16_1, output16_2, sizeof(output16_1))) { + for (int i = 0; i < MAX_SB_SIZE; ++i) { + for (int j = 0; j < MAX_SB_SIZE; ++j) { + int idx = i * MAX_SB_SIZE + j; + ASSERT_EQ(output16_1[idx], output16_2[idx]) + << out_w << "x" << out_h + << " Pixel mismatch at index " << idx << " = (" << i + << ", " << j << "), sub pixel offset = (" << suby + << ", " << subx << ")"; + } + } + } } + } } } + } } } - delete[] input; - delete[] output; - delete[] output2; } } // namespace AV1HighbdConvolve2D -#endif // CONFIG_HIGHBITDEPTH } // namespace libaom_test -- cgit v1.2.3 From b8df135c97a854c2ff9b4394b016649c601177fa Mon Sep 17 00:00:00 2001 From: trav90 Date: Fri, 19 Oct 2018 23:00:02 -0500 Subject: Update libaom to rev b25610052a1398032320008d69b51d2da94f5928 --- third_party/aom/test/av1_convolve_2d_test_util.cc | 88 +++++++++++------------ 1 file changed, 44 insertions(+), 44 deletions(-) (limited to 'third_party/aom/test/av1_convolve_2d_test_util.cc') diff --git a/third_party/aom/test/av1_convolve_2d_test_util.cc b/third_party/aom/test/av1_convolve_2d_test_util.cc index cbe3f8c9f..1aa08044e 100644 --- a/third_party/aom/test/av1_convolve_2d_test_util.cc +++ b/third_party/aom/test/av1_convolve_2d_test_util.cc @@ -63,10 +63,10 @@ void AV1Convolve2DSrTest::RunCheckOutput(convolve_2d_func test_impl) { for (hfilter = EIGHTTAP_REGULAR; hfilter < INTERP_FILTERS_ALL; ++hfilter) { for (vfilter = EIGHTTAP_REGULAR; vfilter < INTERP_FILTERS_ALL; ++vfilter) { - InterpFilterParams filter_params_x = + const InterpFilterParams *filter_params_x = av1_get_interp_filter_params_with_block_size((InterpFilter)hfilter, out_w); - InterpFilterParams filter_params_y = + const InterpFilterParams *filter_params_y = av1_get_interp_filter_params_with_block_size((InterpFilter)vfilter, out_h); for (int do_average = 0; do_average < 1; ++do_average) { @@ -83,11 +83,11 @@ void AV1Convolve2DSrTest::RunCheckOutput(convolve_2d_func test_impl) { const int offset_r = 3 + rnd_.PseudoUniform(h - out_h - 7); const int offset_c = 3 + rnd_.PseudoUniform(w - out_w - 7); av1_convolve_2d_sr_c(input + offset_r * w + offset_c, w, output, - MAX_SB_SIZE, out_w, out_h, &filter_params_x, - &filter_params_y, subx, suby, &conv_params1); + MAX_SB_SIZE, out_w, out_h, filter_params_x, + filter_params_y, subx, suby, &conv_params1); test_impl(input + offset_r * w + offset_c, w, output2, - MAX_SB_SIZE, out_w, out_h, &filter_params_x, - &filter_params_y, subx, suby, &conv_params2); + MAX_SB_SIZE, out_w, out_h, filter_params_x, + filter_params_y, subx, suby, &conv_params2); if (memcmp(output, output2, sizeof(output))) { for (int i = 0; i < MAX_SB_SIZE; ++i) { @@ -137,10 +137,10 @@ void AV1Convolve2DSrTest::RunSpeedTest(convolve_2d_func test_impl) { const int out_h = block_size_high[block_idx] >> shift; const int num_loops = 1000000000 / (out_w + out_h); - InterpFilterParams filter_params_x = + const InterpFilterParams *filter_params_x = av1_get_interp_filter_params_with_block_size((InterpFilter)hfilter, out_w); - InterpFilterParams filter_params_y = + const InterpFilterParams *filter_params_y = av1_get_interp_filter_params_with_block_size((InterpFilter)vfilter, out_h); @@ -148,8 +148,8 @@ void AV1Convolve2DSrTest::RunSpeedTest(convolve_2d_func test_impl) { aom_usec_timer_start(&timer); for (int i = 0; i < num_loops; ++i) - test_impl(input, w, output, MAX_SB_SIZE, out_w, out_h, &filter_params_x, - &filter_params_y, subx, suby, &conv_params2); + test_impl(input, w, output, MAX_SB_SIZE, out_w, out_h, filter_params_x, + filter_params_y, subx, suby, &conv_params2); aom_usec_timer_mark(&timer); const int elapsed_time = static_cast(aom_usec_timer_elapsed(&timer)); @@ -188,10 +188,10 @@ void AV1JntConvolve2DTest::RunCheckOutput(convolve_2d_func test_impl) { const int out_h = block_size_high[block_idx]; for (hfilter = EIGHTTAP_REGULAR; hfilter < INTERP_FILTERS_ALL; ++hfilter) { for (vfilter = EIGHTTAP_REGULAR; vfilter < INTERP_FILTERS_ALL; ++vfilter) { - InterpFilterParams filter_params_x = + const InterpFilterParams *filter_params_x = av1_get_interp_filter_params_with_block_size((InterpFilter)hfilter, out_w); - InterpFilterParams filter_params_y = + const InterpFilterParams *filter_params_y = av1_get_interp_filter_params_with_block_size((InterpFilter)vfilter, out_h); for (int do_average = 0; do_average <= 1; ++do_average) { @@ -212,11 +212,11 @@ void AV1JntConvolve2DTest::RunCheckOutput(convolve_2d_func test_impl) { const int offset_r = 3 + rnd_.PseudoUniform(h - out_h - 7); const int offset_c = 3 + rnd_.PseudoUniform(w - out_w - 7); av1_jnt_convolve_2d_c(input + offset_r * w + offset_c, w, output8_1, - MAX_SB_SIZE, out_w, out_h, &filter_params_x, - &filter_params_y, subx, suby, &conv_params1); + MAX_SB_SIZE, out_w, out_h, filter_params_x, + filter_params_y, subx, suby, &conv_params1); test_impl(input + offset_r * w + offset_c, w, output8_2, - MAX_SB_SIZE, out_w, out_h, &filter_params_x, - &filter_params_y, subx, suby, &conv_params2); + MAX_SB_SIZE, out_w, out_h, filter_params_x, + filter_params_y, subx, suby, &conv_params2); for (int i = 0; i < out_h; ++i) { for (int j = 0; j < out_w; ++j) { @@ -261,11 +261,11 @@ void AV1JntConvolve2DTest::RunCheckOutput(convolve_2d_func test_impl) { const int offset_c = 3 + rnd_.PseudoUniform(w - out_w - 7); av1_jnt_convolve_2d_c(input + offset_r * w + offset_c, w, output8_1, MAX_SB_SIZE, out_w, out_h, - &filter_params_x, &filter_params_y, subx, + filter_params_x, filter_params_y, subx, suby, &conv_params1); test_impl(input + offset_r * w + offset_c, w, output8_2, - MAX_SB_SIZE, out_w, out_h, &filter_params_x, - &filter_params_y, subx, suby, &conv_params2); + MAX_SB_SIZE, out_w, out_h, filter_params_x, + filter_params_y, subx, suby, &conv_params2); for (int i = 0; i < out_h; ++i) { for (int j = 0; j < out_w; ++j) { @@ -323,10 +323,10 @@ void AV1JntConvolve2DTest::RunSpeedTest(convolve_2d_func test_impl) { const int num_loops = 1000000000 / (out_w + out_h); const int do_average = 0; - InterpFilterParams filter_params_x = + const InterpFilterParams *filter_params_x = av1_get_interp_filter_params_with_block_size((InterpFilter)hfilter, out_w); - InterpFilterParams filter_params_y = + const InterpFilterParams *filter_params_y = av1_get_interp_filter_params_with_block_size((InterpFilter)vfilter, out_h); @@ -344,7 +344,7 @@ void AV1JntConvolve2DTest::RunSpeedTest(convolve_2d_func test_impl) { for (int i = 0; i < num_loops; ++i) test_impl(input + offset_r * w + offset_c, w, output8, MAX_SB_SIZE, out_w, - out_h, &filter_params_x, &filter_params_y, subx, suby, + out_h, filter_params_x, filter_params_y, subx, suby, &conv_params); aom_usec_timer_mark(&timer); @@ -407,10 +407,10 @@ void AV1HighbdConvolve2DSrTest::RunSpeedTest( const int out_h = block_size_high[block_idx] >> shift; const int num_loops = 1000000000 / (out_w + out_h); - InterpFilterParams filter_params_x = + const InterpFilterParams *filter_params_x = av1_get_interp_filter_params_with_block_size((InterpFilter)hfilter, out_w); - InterpFilterParams filter_params_y = + const InterpFilterParams *filter_params_y = av1_get_interp_filter_params_with_block_size((InterpFilter)vfilter, out_h); @@ -418,7 +418,7 @@ void AV1HighbdConvolve2DSrTest::RunSpeedTest( aom_usec_timer_start(&timer); for (int i = 0; i < num_loops; ++i) test_impl(input + offset_r * w + offset_c, w, output, MAX_SB_SIZE, out_w, - out_h, &filter_params_x, &filter_params_y, subx, suby, + out_h, filter_params_x, filter_params_y, subx, suby, &conv_params, bd); aom_usec_timer_mark(&timer); @@ -456,10 +456,10 @@ void AV1HighbdConvolve2DSrTest::RunCheckOutput( for (hfilter = EIGHTTAP_REGULAR; hfilter < INTERP_FILTERS_ALL; ++hfilter) { for (vfilter = EIGHTTAP_REGULAR; vfilter < INTERP_FILTERS_ALL; ++vfilter) { - InterpFilterParams filter_params_x = + const InterpFilterParams *filter_params_x = av1_get_interp_filter_params_with_block_size((InterpFilter)hfilter, out_w); - InterpFilterParams filter_params_y = + const InterpFilterParams *filter_params_y = av1_get_interp_filter_params_with_block_size((InterpFilter)vfilter, out_h); for (int do_average = 0; do_average < 1; ++do_average) { @@ -477,11 +477,11 @@ void AV1HighbdConvolve2DSrTest::RunCheckOutput( const int offset_c = 3 + rnd_.PseudoUniform(w - out_w - 7); av1_highbd_convolve_2d_sr_c(input + offset_r * w + offset_c, w, output, MAX_SB_SIZE, out_w, out_h, - &filter_params_x, &filter_params_y, + filter_params_x, filter_params_y, subx, suby, &conv_params1, bd); test_impl(input + offset_r * w + offset_c, w, output2, - MAX_SB_SIZE, out_w, out_h, &filter_params_x, - &filter_params_y, subx, suby, &conv_params2, bd); + MAX_SB_SIZE, out_w, out_h, filter_params_x, + filter_params_y, subx, suby, &conv_params2, bd); if (memcmp(output, output2, sizeof(output))) { for (int i = 0; i < MAX_SB_SIZE; ++i) { @@ -530,10 +530,10 @@ void AV1HighbdJntConvolve2DTest::RunSpeedTest( const int out_w = block_size_wide[block_idx]; const int out_h = block_size_high[block_idx]; - InterpFilterParams filter_params_x = + const InterpFilterParams *filter_params_x = av1_get_interp_filter_params_with_block_size((InterpFilter)hfilter, out_w); - InterpFilterParams filter_params_y = + const InterpFilterParams *filter_params_y = av1_get_interp_filter_params_with_block_size((InterpFilter)vfilter, out_h); @@ -554,8 +554,8 @@ void AV1HighbdJntConvolve2DTest::RunSpeedTest( aom_usec_timer_start(&timer); for (int i = 0; i < num_loops; ++i) test_impl(input + offset_r * w + offset_c, w, output16, MAX_SB_SIZE, out_w, - out_h, &filter_params_x, &filter_params_y, subx, suby, - &conv_params, bd); + out_h, filter_params_x, filter_params_y, subx, suby, &conv_params, + bd); aom_usec_timer_mark(&timer); const int elapsed_time = static_cast(aom_usec_timer_elapsed(&timer)); @@ -589,10 +589,10 @@ void AV1HighbdJntConvolve2DTest::RunCheckOutput( const int out_h = block_size_high[block_idx]; for (hfilter = EIGHTTAP_REGULAR; hfilter < INTERP_FILTERS_ALL; ++hfilter) { for (vfilter = EIGHTTAP_REGULAR; vfilter < INTERP_FILTERS_ALL; ++vfilter) { - InterpFilterParams filter_params_x = + const InterpFilterParams *filter_params_x = av1_get_interp_filter_params_with_block_size((InterpFilter)hfilter, out_w); - InterpFilterParams filter_params_y = + const InterpFilterParams *filter_params_y = av1_get_interp_filter_params_with_block_size((InterpFilter)vfilter, out_h); for (int do_average = 0; do_average <= 1; ++do_average) { @@ -614,11 +614,11 @@ void AV1HighbdJntConvolve2DTest::RunCheckOutput( const int offset_c = 3 + rnd_.PseudoUniform(w - out_w - 7); av1_highbd_jnt_convolve_2d_c(input + offset_r * w + offset_c, w, output16_1, MAX_SB_SIZE, out_w, out_h, - &filter_params_x, &filter_params_y, - subx, suby, &conv_params1, bd); + filter_params_x, filter_params_y, subx, + suby, &conv_params1, bd); test_impl(input + offset_r * w + offset_c, w, output16_2, - MAX_SB_SIZE, out_w, out_h, &filter_params_x, - &filter_params_y, subx, suby, &conv_params2, bd); + MAX_SB_SIZE, out_w, out_h, filter_params_x, + filter_params_y, subx, suby, &conv_params2, bd); for (int i = 0; i < out_h; ++i) { for (int j = 0; j < out_w; ++j) { @@ -664,11 +664,11 @@ void AV1HighbdJntConvolve2DTest::RunCheckOutput( const int offset_c = 3 + rnd_.PseudoUniform(w - out_w - 7); av1_highbd_jnt_convolve_2d_c( input + offset_r * w + offset_c, w, output16_1, MAX_SB_SIZE, - out_w, out_h, &filter_params_x, &filter_params_y, subx, - suby, &conv_params1, bd); + out_w, out_h, filter_params_x, filter_params_y, subx, suby, + &conv_params1, bd); test_impl(input + offset_r * w + offset_c, w, output16_2, - MAX_SB_SIZE, out_w, out_h, &filter_params_x, - &filter_params_y, subx, suby, &conv_params2, bd); + MAX_SB_SIZE, out_w, out_h, filter_params_x, + filter_params_y, subx, suby, &conv_params2, bd); for (int i = 0; i < out_h; ++i) { for (int j = 0; j < out_w; ++j) { -- cgit v1.2.3 From d2499ead93dc4298c0882fe98902acb1b5209f99 Mon Sep 17 00:00:00 2001 From: trav90 Date: Fri, 19 Oct 2018 23:05:00 -0500 Subject: Update libaom to commit ID 1e227d41f0616de9548a673a83a21ef990b62591 --- third_party/aom/test/av1_convolve_2d_test_util.cc | 28 +++++++++++------------ 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'third_party/aom/test/av1_convolve_2d_test_util.cc') diff --git a/third_party/aom/test/av1_convolve_2d_test_util.cc b/third_party/aom/test/av1_convolve_2d_test_util.cc index 1aa08044e..409fd23e1 100644 --- a/third_party/aom/test/av1_convolve_2d_test_util.cc +++ b/third_party/aom/test/av1_convolve_2d_test_util.cc @@ -71,9 +71,9 @@ void AV1Convolve2DSrTest::RunCheckOutput(convolve_2d_func test_impl) { out_h); for (int do_average = 0; do_average < 1; ++do_average) { ConvolveParams conv_params1 = - get_conv_params_no_round(0, do_average, 0, NULL, 0, 0, 8); + get_conv_params_no_round(do_average, 0, NULL, 0, 0, 8); ConvolveParams conv_params2 = - get_conv_params_no_round(0, do_average, 0, NULL, 0, 0, 8); + get_conv_params_no_round(do_average, 0, NULL, 0, 0, 8); const int subx_range = has_subx ? 16 : 1; const int suby_range = has_suby ? 16 : 1; @@ -126,7 +126,7 @@ void AV1Convolve2DSrTest::RunSpeedTest(convolve_2d_func test_impl) { const int do_average = 0; ConvolveParams conv_params2 = - get_conv_params_no_round(0, do_average, 0, NULL, 0, 0, 8); + get_conv_params_no_round(do_average, 0, NULL, 0, 0, 8); // Make sure that sizes 2xN and Nx2 are also tested for chroma. const int num_sizes = @@ -195,10 +195,10 @@ void AV1JntConvolve2DTest::RunCheckOutput(convolve_2d_func test_impl) { av1_get_interp_filter_params_with_block_size((InterpFilter)vfilter, out_h); for (int do_average = 0; do_average <= 1; ++do_average) { - ConvolveParams conv_params1 = get_conv_params_no_round( - 0, do_average, 0, output1, MAX_SB_SIZE, 1, 8); - ConvolveParams conv_params2 = get_conv_params_no_round( - 0, do_average, 0, output2, MAX_SB_SIZE, 1, 8); + ConvolveParams conv_params1 = + get_conv_params_no_round(do_average, 0, output1, MAX_SB_SIZE, 1, 8); + ConvolveParams conv_params2 = + get_conv_params_no_round(do_average, 0, output2, MAX_SB_SIZE, 1, 8); // Test special case where jnt_comp_avg is not used conv_params1.use_jnt_comp_avg = 0; @@ -331,7 +331,7 @@ void AV1JntConvolve2DTest::RunSpeedTest(convolve_2d_func test_impl) { out_h); ConvolveParams conv_params = - get_conv_params_no_round(0, do_average, 0, output, MAX_SB_SIZE, 1, 8); + get_conv_params_no_round(do_average, 0, output, MAX_SB_SIZE, 1, 8); conv_params.use_jnt_comp_avg = 0; @@ -395,7 +395,7 @@ void AV1HighbdConvolve2DSrTest::RunSpeedTest( suby = 0; ConvolveParams conv_params = - get_conv_params_no_round(0, do_average, 0, NULL, 0, 0, bd); + get_conv_params_no_round(do_average, 0, NULL, 0, 0, bd); // Make sure that sizes 2xN and Nx2 are also tested for chroma. const int num_sizes = @@ -464,9 +464,9 @@ void AV1HighbdConvolve2DSrTest::RunCheckOutput( out_h); for (int do_average = 0; do_average < 1; ++do_average) { ConvolveParams conv_params1 = - get_conv_params_no_round(0, do_average, 0, NULL, 0, 0, bd); + get_conv_params_no_round(do_average, 0, NULL, 0, 0, bd); ConvolveParams conv_params2 = - get_conv_params_no_round(0, do_average, 0, NULL, 0, 0, bd); + get_conv_params_no_round(do_average, 0, NULL, 0, 0, bd); const int subx_range = has_subx ? 16 : 1; const int suby_range = has_suby ? 16 : 1; @@ -538,7 +538,7 @@ void AV1HighbdJntConvolve2DTest::RunSpeedTest( out_h); ConvolveParams conv_params = - get_conv_params_no_round(0, do_average, 0, output, MAX_SB_SIZE, 1, bd); + get_conv_params_no_round(do_average, 0, output, MAX_SB_SIZE, 1, bd); // Test special case where jnt_comp_avg is not used conv_params.use_jnt_comp_avg = 0; @@ -597,9 +597,9 @@ void AV1HighbdJntConvolve2DTest::RunCheckOutput( out_h); for (int do_average = 0; do_average <= 1; ++do_average) { ConvolveParams conv_params1 = get_conv_params_no_round( - 0, do_average, 0, output1, MAX_SB_SIZE, 1, bd); + do_average, 0, output1, MAX_SB_SIZE, 1, bd); ConvolveParams conv_params2 = get_conv_params_no_round( - 0, do_average, 0, output2, MAX_SB_SIZE, 1, bd); + do_average, 0, output2, MAX_SB_SIZE, 1, bd); // Test special case where jnt_comp_avg is not used conv_params1.use_jnt_comp_avg = 0; -- cgit v1.2.3