summaryrefslogtreecommitdiffstats
path: root/third_party/aom/test
diff options
context:
space:
mode:
authortrav90 <travawine@palemoon.org>2018-10-19 23:00:02 -0500
committertrav90 <travawine@palemoon.org>2018-10-19 23:00:02 -0500
commitb8df135c97a854c2ff9b4394b016649c601177fa (patch)
tree802b7de5ad245f1a12adbcef835ab0d0687c1bf8 /third_party/aom/test
parenta4d3c59dcac642f6b9557dc09b60eda40b517630 (diff)
downloadUXP-b8df135c97a854c2ff9b4394b016649c601177fa.tar
UXP-b8df135c97a854c2ff9b4394b016649c601177fa.tar.gz
UXP-b8df135c97a854c2ff9b4394b016649c601177fa.tar.lz
UXP-b8df135c97a854c2ff9b4394b016649c601177fa.tar.xz
UXP-b8df135c97a854c2ff9b4394b016649c601177fa.zip
Update libaom to rev b25610052a1398032320008d69b51d2da94f5928
Diffstat (limited to 'third_party/aom/test')
-rwxr-xr-xthird_party/aom/test/aomdec.sh20
-rwxr-xr-xthird_party/aom/test/aomenc.sh24
-rw-r--r--third_party/aom/test/av1_convolve_2d_test_util.cc88
-rw-r--r--third_party/aom/test/av1_convolve_2d_test_util.h8
-rw-r--r--third_party/aom/test/av1_convolve_scale_test.cc8
-rw-r--r--third_party/aom/test/av1_ext_tile_test.cc12
-rw-r--r--third_party/aom/test/av1_fwd_txfm2d_test.cc18
-rw-r--r--third_party/aom/test/av1_inv_txfm2d_test.cc11
-rw-r--r--third_party/aom/test/av1_wedge_utils_test.cc44
-rw-r--r--third_party/aom/test/codec_factory.h5
-rw-r--r--third_party/aom/test/comp_mask_variance_test.cc271
-rw-r--r--third_party/aom/test/convolve_test.cc47
-rw-r--r--third_party/aom/test/decode_multithreaded_test.cc22
-rw-r--r--third_party/aom/test/decode_test_driver.cc2
-rw-r--r--third_party/aom/test/dr_prediction_test.cc52
-rwxr-xr-xthird_party/aom/test/dump_obu.sh2
-rw-r--r--third_party/aom/test/encode_test_driver.cc1
-rw-r--r--third_party/aom/test/ethread_test.cc37
-rw-r--r--third_party/aom/test/fft_test.cc11
-rw-r--r--third_party/aom/test/film_grain_table_test.cc11
-rw-r--r--third_party/aom/test/intrapred_test.cc11
-rwxr-xr-xthird_party/aom/test/lightfield_test.sh98
-rw-r--r--third_party/aom/test/lpf_test.cc6
-rw-r--r--third_party/aom/test/masked_sad_test.cc252
-rw-r--r--third_party/aom/test/noise_model_test.cc11
-rw-r--r--third_party/aom/test/obmc_sad_test.cc47
-rw-r--r--third_party/aom/test/reconinter_test.cc40
-rw-r--r--third_party/aom/test/resize_test.cc49
-rw-r--r--third_party/aom/test/selfguided_filter_test.cc13
-rw-r--r--third_party/aom/test/test-data.sha1132
-rw-r--r--third_party/aom/test/test.cmake2
-rw-r--r--third_party/aom/test/test_data_util.cmake132
-rw-r--r--third_party/aom/test/test_vector_test.cc50
-rw-r--r--third_party/aom/test/test_vectors.cc197
-rw-r--r--third_party/aom/test/tile_independence_test.cc17
-rwxr-xr-xthird_party/aom/test/tools_common.sh42
-rw-r--r--third_party/aom/test/variance_test.cc364
37 files changed, 1752 insertions, 405 deletions
diff --git a/third_party/aom/test/aomdec.sh b/third_party/aom/test/aomdec.sh
index 5f54ae0af..927142287 100755
--- a/third_party/aom/test/aomdec.sh
+++ b/third_party/aom/test/aomdec.sh
@@ -37,7 +37,7 @@ aomdec_verify_environment() {
# input file path and shifted away. All remaining parameters are passed through
# to aomdec.
aomdec_pipe() {
- local readonly input="$1"
+ local input="$1"
shift
if [ ! -e "${input}" ]; then
elog "Input file ($input) missing in aomdec_pipe()"
@@ -51,8 +51,8 @@ aomdec_pipe() {
# the directory containing aomdec. $1 one is used as the input file path and
# shifted away. All remaining parameters are passed through to aomdec.
aomdec() {
- local readonly decoder="$(aom_tool_path aomdec)"
- local readonly input="$1"
+ local decoder="$(aom_tool_path aomdec)"
+ local input="$1"
shift
eval "${AOM_TEST_PREFIX}" "${decoder}" "$input" "$@" ${devnull}
}
@@ -65,7 +65,7 @@ aomdec_can_decode_av1() {
aomdec_av1_ivf() {
if [ "$(aomdec_can_decode_av1)" = "yes" ]; then
- local readonly file="${AV1_IVF_FILE}"
+ local file="${AV1_IVF_FILE}"
if [ ! -e "${file}" ]; then
encode_yuv_raw_input_av1 "${file}" --ivf
fi
@@ -75,7 +75,7 @@ aomdec_av1_ivf() {
aomdec_av1_ivf_error_resilient() {
if [ "$(aomdec_can_decode_av1)" = "yes" ]; then
- local readonly file="av1.error-resilient.ivf"
+ local file="av1.error-resilient.ivf"
if [ ! -e "${file}" ]; then
encode_yuv_raw_input_av1 "${file}" --ivf --error-resilient=1
fi
@@ -85,7 +85,7 @@ aomdec_av1_ivf_error_resilient() {
aomdec_av1_ivf_multithread() {
if [ "$(aomdec_can_decode_av1)" = "yes" ]; then
- local readonly file="${AV1_IVF_FILE}"
+ local file="${AV1_IVF_FILE}"
if [ ! -e "${file}" ]; then
encode_yuv_raw_input_av1 "${file}" --ivf
fi
@@ -97,7 +97,7 @@ aomdec_av1_ivf_multithread() {
aomdec_aom_ivf_pipe_input() {
if [ "$(aomdec_can_decode_av1)" = "yes" ]; then
- local readonly file="${AV1_IVF_FILE}"
+ local file="${AV1_IVF_FILE}"
if [ ! -e "${file}" ]; then
encode_yuv_raw_input_av1 "${file}" --ivf
fi
@@ -107,7 +107,7 @@ aomdec_aom_ivf_pipe_input() {
aomdec_av1_obu_annexb() {
if [ "$(aomdec_can_decode_av1)" = "yes" ]; then
- local readonly file="${AV1_OBU_ANNEXB_FILE}"
+ local file="${AV1_OBU_ANNEXB_FILE}"
if [ ! -e "${file}" ]; then
encode_yuv_raw_input_av1 "${file}" --obu --annexb=1
fi
@@ -117,7 +117,7 @@ aomdec_av1_obu_annexb() {
aomdec_av1_obu_section5() {
if [ "$(aomdec_can_decode_av1)" = "yes" ]; then
- local readonly file="${AV1_OBU_SEC5_FILE}"
+ local file="${AV1_OBU_SEC5_FILE}"
if [ ! -e "${file}" ]; then
encode_yuv_raw_input_av1 "${file}" --obu
fi
@@ -128,7 +128,7 @@ aomdec_av1_obu_section5() {
aomdec_av1_webm() {
if [ "$(aomdec_can_decode_av1)" = "yes" ] && \
[ "$(webm_io_available)" = "yes" ]; then
- local readonly file="${AV1_WEBM_FILE}"
+ local file="${AV1_WEBM_FILE}"
if [ ! -e "${file}" ]; then
encode_yuv_raw_input_av1 "${file}"
fi
diff --git a/third_party/aom/test/aomenc.sh b/third_party/aom/test/aomenc.sh
index a0ab8c8aa..b030397a3 100755
--- a/third_party/aom/test/aomenc.sh
+++ b/third_party/aom/test/aomenc.sh
@@ -60,8 +60,8 @@ y4m_input_720p() {
# input file path and shifted away. All remaining parameters are passed through
# to aomenc.
aomenc_pipe() {
- local readonly encoder="$(aom_tool_path aomenc)"
- local readonly input="$1"
+ local encoder="$(aom_tool_path aomenc)"
+ local input="$1"
shift
cat "${input}" | eval "${AOM_TEST_PREFIX}" "${encoder}" - \
--test-decode=fatal \
@@ -72,8 +72,8 @@ aomenc_pipe() {
# the directory containing aomenc. $1 one is used as the input file path and
# shifted away. All remaining parameters are passed through to aomenc.
aomenc() {
- local readonly encoder="$(aom_tool_path aomenc)"
- local readonly input="$1"
+ local encoder="$(aom_tool_path aomenc)"
+ local input="$1"
shift
eval "${AOM_TEST_PREFIX}" "${encoder}" "${input}" \
--test-decode=fatal \
@@ -156,7 +156,7 @@ aomenc_av1_webm() {
aomenc_av1_webm_1pass() {
if [ "$(aomenc_can_encode_av1)" = "yes" ] && \
[ "$(webm_io_available)" = "yes" ]; then
- local readonly output="${AOM_TEST_OUTPUT_DIR}/av1_test.webm"
+ local output="${AOM_TEST_OUTPUT_DIR}/av1_test.webm"
aomenc $(yuv_raw_input) \
$(aomenc_encode_test_fast_params) \
--passes=1 \
@@ -171,7 +171,7 @@ aomenc_av1_webm_1pass() {
aomenc_av1_ivf_lossless() {
if [ "$(aomenc_can_encode_av1)" = "yes" ]; then
- local readonly output="${AOM_TEST_OUTPUT_DIR}/av1_lossless.ivf"
+ local output="${AOM_TEST_OUTPUT_DIR}/av1_lossless.ivf"
aomenc $(yuv_raw_input) \
$(aomenc_encode_test_fast_params) \
--ivf \
@@ -187,7 +187,7 @@ aomenc_av1_ivf_lossless() {
aomenc_av1_ivf_minq0_maxq0() {
if [ "$(aomenc_can_encode_av1)" = "yes" ]; then
- local readonly output="${AOM_TEST_OUTPUT_DIR}/av1_lossless_minq0_maxq0.ivf"
+ local output="${AOM_TEST_OUTPUT_DIR}/av1_lossless_minq0_maxq0.ivf"
aomenc $(yuv_raw_input) \
$(aomenc_encode_test_fast_params) \
--ivf \
@@ -205,9 +205,9 @@ aomenc_av1_ivf_minq0_maxq0() {
aomenc_av1_webm_lag5_frames10() {
if [ "$(aomenc_can_encode_av1)" = "yes" ] && \
[ "$(webm_io_available)" = "yes" ]; then
- local readonly lag_total_frames=10
- local readonly lag_frames=5
- local readonly output="${AOM_TEST_OUTPUT_DIR}/av1_lag5_frames10.webm"
+ local lag_total_frames=10
+ local lag_frames=5
+ local output="${AOM_TEST_OUTPUT_DIR}/av1_lag5_frames10.webm"
aomenc $(yuv_raw_input) \
$(aomenc_encode_test_fast_params) \
--limit=${lag_total_frames} \
@@ -225,7 +225,7 @@ aomenc_av1_webm_lag5_frames10() {
aomenc_av1_webm_non_square_par() {
if [ "$(aomenc_can_encode_av1)" = "yes" ] && \
[ "$(webm_io_available)" = "yes" ]; then
- local readonly output="${AOM_TEST_OUTPUT_DIR}/av1_non_square_par.webm"
+ local output="${AOM_TEST_OUTPUT_DIR}/av1_non_square_par.webm"
aomenc $(y4m_input_non_square_par) \
$(aomenc_encode_test_fast_params) \
--output="${output}"
@@ -241,7 +241,7 @@ aomenc_av1_webm_cdf_update_mode() {
if [ "$(aomenc_can_encode_av1)" = "yes" ] && \
[ "$(webm_io_available)" = "yes" ]; then
for mode in 0 1 2; do
- local readonly output="${AOM_TEST_OUTPUT_DIR}/cdf_mode_${mode}.webm"
+ local output="${AOM_TEST_OUTPUT_DIR}/cdf_mode_${mode}.webm"
aomenc $(yuv_raw_input) \
$(aomenc_encode_test_fast_params) \
--cdf-update-mode=${mode} \
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<int>(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<int>(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) {
diff --git a/third_party/aom/test/av1_convolve_2d_test_util.h b/third_party/aom/test/av1_convolve_2d_test_util.h
index 3a53dbdfe..cd4607d68 100644
--- a/third_party/aom/test/av1_convolve_2d_test_util.h
+++ b/third_party/aom/test/av1_convolve_2d_test_util.h
@@ -28,8 +28,8 @@ namespace AV1Convolve2D {
typedef void (*convolve_2d_func)(const uint8_t *src, int src_stride,
uint8_t *dst, int dst_stride, int w, int h,
- InterpFilterParams *filter_params_x,
- InterpFilterParams *filter_params_y,
+ const InterpFilterParams *filter_params_x,
+ const InterpFilterParams *filter_params_y,
const int subpel_x_q4, const int subpel_y_q4,
ConvolveParams *conv_params);
@@ -71,8 +71,8 @@ class AV1JntConvolve2DTest : public ::testing::TestWithParam<Convolve2DParam> {
namespace AV1HighbdConvolve2D {
typedef void (*highbd_convolve_2d_func)(
const uint16_t *src, int src_stride, uint16_t *dst, int dst_stride, int w,
- int h, InterpFilterParams *filter_params_x,
- InterpFilterParams *filter_params_y, const int subpel_x_q4,
+ int h, const InterpFilterParams *filter_params_x,
+ const InterpFilterParams *filter_params_y, const int subpel_x_q4,
const int subpel_y_q4, ConvolveParams *conv_params, int bd);
typedef ::testing::tuple<int, highbd_convolve_2d_func, int, int, BLOCK_SIZE>
diff --git a/third_party/aom/test/av1_convolve_scale_test.cc b/third_party/aom/test/av1_convolve_scale_test.cc
index e0571423c..b99caaeeb 100644
--- a/third_party/aom/test/av1_convolve_scale_test.cc
+++ b/third_party/aom/test/av1_convolve_scale_test.cc
@@ -390,8 +390,8 @@ typedef tuple<int, int> BlockDimension;
typedef void (*LowbdConvolveFunc)(const uint8_t *src, int src_stride,
uint8_t *dst, int dst_stride, int w, int h,
- InterpFilterParams *filter_params_x,
- InterpFilterParams *filter_params_y,
+ const InterpFilterParams *filter_params_x,
+ const InterpFilterParams *filter_params_y,
const int subpel_x_qn, const int x_step_qn,
const int subpel_y_qn, const int y_step_qn,
ConvolveParams *conv_params);
@@ -463,8 +463,8 @@ INSTANTIATE_TEST_CASE_P(
typedef void (*HighbdConvolveFunc)(const uint16_t *src, int src_stride,
uint16_t *dst, int dst_stride, int w, int h,
- InterpFilterParams *filter_params_x,
- InterpFilterParams *filter_params_y,
+ const InterpFilterParams *filter_params_x,
+ const InterpFilterParams *filter_params_y,
const int subpel_x_qn, const int x_step_qn,
const int subpel_y_qn, const int y_step_qn,
ConvolveParams *conv_params, int bd);
diff --git a/third_party/aom/test/av1_ext_tile_test.cc b/third_party/aom/test/av1_ext_tile_test.cc
index d2abbab7f..424d2f065 100644
--- a/third_party/aom/test/av1_ext_tile_test.cc
+++ b/third_party/aom/test/av1_ext_tile_test.cc
@@ -47,6 +47,7 @@ class AV1ExtTileTest
decoder_ = codec_->CreateDecoder(cfg, 0);
decoder_->Control(AV1_SET_TILE_MODE, 1);
+ decoder_->Control(AV1D_EXT_TILE_DEBUG, 1);
decoder_->Control(AV1_SET_DECODE_TILE_ROW, -1);
decoder_->Control(AV1_SET_DECODE_TILE_COL, -1);
@@ -82,13 +83,14 @@ class AV1ExtTileTest
encoder->Control(AOME_SET_ENABLEAUTOALTREF, 0);
encoder->Control(AV1E_SET_FRAME_PARALLEL_DECODING, 1);
- // The tile size is 64x64.
- encoder->Control(AV1E_SET_TILE_COLUMNS, kTileSize);
- encoder->Control(AV1E_SET_TILE_ROWS, kTileSize);
// TODO(yunqingwang): test single_tile_decoding = 0.
encoder->Control(AV1E_SET_SINGLE_TILE_DECODING, 1);
// Always use 64x64 max partition.
encoder->Control(AV1E_SET_SUPERBLOCK_SIZE, AOM_SUPERBLOCK_SIZE_64X64);
+ // Set tile_columns and tile_rows to MAX values, which guarantees the tile
+ // size of 64 x 64 pixels(i.e. 1 SB) for <= 4k resolution.
+ encoder->Control(AV1E_SET_TILE_COLUMNS, 6);
+ encoder->Control(AV1E_SET_TILE_ROWS, 6);
}
if (video->frame() == 1) {
@@ -195,7 +197,7 @@ class AV1ExtTileTest
std::vector<std::string> tile_md5_;
};
-TEST_P(AV1ExtTileTest, DISABLED_DecoderResultTest) { TestRoundTrip(); }
+TEST_P(AV1ExtTileTest, DecoderResultTest) { TestRoundTrip(); }
AV1_INSTANTIATE_TEST_CASE(
// Now only test 2-pass mode.
@@ -204,7 +206,7 @@ AV1_INSTANTIATE_TEST_CASE(
class AV1ExtTileTestLarge : public AV1ExtTileTest {};
-TEST_P(AV1ExtTileTestLarge, DISABLED_DecoderResultTest) { TestRoundTrip(); }
+TEST_P(AV1ExtTileTestLarge, DecoderResultTest) { TestRoundTrip(); }
AV1_INSTANTIATE_TEST_CASE(
// Now only test 2-pass mode.
diff --git a/third_party/aom/test/av1_fwd_txfm2d_test.cc b/third_party/aom/test/av1_fwd_txfm2d_test.cc
index e0294be4e..6577e33b8 100644
--- a/third_party/aom/test/av1_fwd_txfm2d_test.cc
+++ b/third_party/aom/test/av1_fwd_txfm2d_test.cc
@@ -247,9 +247,9 @@ void AV1FwdTxfm2dMatchTest(TX_SIZE tx_size, lowbd_fwd_txfm_func target_func) {
FwdTxfm2dFunc ref_func = libaom_test::fwd_txfm_func_ls[tx_size];
if (ref_func != NULL) {
- DECLARE_ALIGNED(16, int16_t, input[64 * 64]) = { 0 };
- DECLARE_ALIGNED(16, int32_t, output[64 * 64]);
- DECLARE_ALIGNED(16, int32_t, ref_output[64 * 64]);
+ DECLARE_ALIGNED(32, int16_t, input[64 * 64]) = { 0 };
+ DECLARE_ALIGNED(32, int32_t, output[64 * 64]);
+ DECLARE_ALIGNED(32, int32_t, ref_output[64 * 64]);
int input_stride = 64;
ACMRandom rnd(ACMRandom::DeterministicSeed());
for (int cnt = 0; cnt < 500; ++cnt) {
@@ -339,4 +339,16 @@ INSTANTIATE_TEST_CASE_P(SSE4_1, AV1FwdTxfm2dTest,
Combine(ValuesIn(fwd_txfm_for_sse41),
Values(av1_lowbd_fwd_txfm_sse4_1)));
#endif // HAVE_SSE4_1
+
+#if HAVE_AVX2
+static TX_SIZE fwd_txfm_for_avx2[] = {
+ TX_4X4, TX_8X8, TX_16X16, TX_32X32, TX_64X64, TX_4X8, TX_8X4,
+ TX_8X16, TX_16X8, TX_16X32, TX_32X16, TX_32X64, TX_64X32, TX_4X16,
+ TX_16X4, TX_8X32, TX_32X8, TX_16X64, TX_64X16,
+};
+
+INSTANTIATE_TEST_CASE_P(AVX2, AV1FwdTxfm2dTest,
+ Combine(ValuesIn(fwd_txfm_for_avx2),
+ Values(av1_lowbd_fwd_txfm_avx2)));
+#endif // HAVE_AVX2
} // namespace
diff --git a/third_party/aom/test/av1_inv_txfm2d_test.cc b/third_party/aom/test/av1_inv_txfm2d_test.cc
index 461e7ebcd..11e231ba6 100644
--- a/third_party/aom/test/av1_inv_txfm2d_test.cc
+++ b/third_party/aom/test/av1_inv_txfm2d_test.cc
@@ -364,4 +364,15 @@ INSTANTIATE_TEST_CASE_P(AVX2, AV1LbdInvTxfm2d,
::testing::Values(av1_lowbd_inv_txfm2d_add_avx2));
#endif // HAVE_AVX2
+#if HAVE_NEON
+
+extern "C" void av1_lowbd_inv_txfm2d_add_neon(const int32_t *input,
+ uint8_t *output, int stride,
+ TX_TYPE tx_type, TX_SIZE tx_size,
+ int eob);
+
+INSTANTIATE_TEST_CASE_P(NEON, AV1LbdInvTxfm2d,
+ ::testing::Values(av1_lowbd_inv_txfm2d_add_neon));
+#endif // HAVE_NEON
+
} // namespace
diff --git a/third_party/aom/test/av1_wedge_utils_test.cc b/third_party/aom/test/av1_wedge_utils_test.cc
index cfdf2d36c..e8fbe69a4 100644
--- a/third_party/aom/test/av1_wedge_utils_test.cc
+++ b/third_party/aom/test/av1_wedge_utils_test.cc
@@ -217,14 +217,6 @@ TEST_P(WedgeUtilsSSEOptTest, ExtremeValues) {
}
}
-#if HAVE_SSE2
-INSTANTIATE_TEST_CASE_P(
- SSE2, WedgeUtilsSSEOptTest,
- ::testing::Values(TestFuncsFSSE(av1_wedge_sse_from_residuals_c,
- av1_wedge_sse_from_residuals_sse2)));
-
-#endif // HAVE_SSE2
-
//////////////////////////////////////////////////////////////////////////////
// av1_wedge_sign_from_residuals
//////////////////////////////////////////////////////////////////////////////
@@ -325,15 +317,6 @@ TEST_P(WedgeUtilsSignOptTest, ExtremeValues) {
}
}
-#if HAVE_SSE2
-
-INSTANTIATE_TEST_CASE_P(
- SSE2, WedgeUtilsSignOptTest,
- ::testing::Values(TestFuncsFSign(av1_wedge_sign_from_residuals_c,
- av1_wedge_sign_from_residuals_sse2)));
-
-#endif // HAVE_SSE2
-
//////////////////////////////////////////////////////////////////////////////
// av1_wedge_compute_delta_squares
//////////////////////////////////////////////////////////////////////////////
@@ -371,12 +354,37 @@ TEST_P(WedgeUtilsDeltaSquaresOptTest, RandomValues) {
}
#if HAVE_SSE2
+INSTANTIATE_TEST_CASE_P(
+ SSE2, WedgeUtilsSSEOptTest,
+ ::testing::Values(TestFuncsFSSE(av1_wedge_sse_from_residuals_c,
+ av1_wedge_sse_from_residuals_sse2)));
+
+INSTANTIATE_TEST_CASE_P(
+ SSE2, WedgeUtilsSignOptTest,
+ ::testing::Values(TestFuncsFSign(av1_wedge_sign_from_residuals_c,
+ av1_wedge_sign_from_residuals_sse2)));
INSTANTIATE_TEST_CASE_P(
SSE2, WedgeUtilsDeltaSquaresOptTest,
::testing::Values(TestFuncsFDS(av1_wedge_compute_delta_squares_c,
av1_wedge_compute_delta_squares_sse2)));
-
#endif // HAVE_SSE2
+#if HAVE_AVX2
+INSTANTIATE_TEST_CASE_P(
+ AVX2, WedgeUtilsSSEOptTest,
+ ::testing::Values(TestFuncsFSSE(av1_wedge_sse_from_residuals_sse2,
+ av1_wedge_sse_from_residuals_avx2)));
+
+INSTANTIATE_TEST_CASE_P(
+ AVX2, WedgeUtilsSignOptTest,
+ ::testing::Values(TestFuncsFSign(av1_wedge_sign_from_residuals_sse2,
+ av1_wedge_sign_from_residuals_avx2)));
+
+INSTANTIATE_TEST_CASE_P(
+ AVX2, WedgeUtilsDeltaSquaresOptTest,
+ ::testing::Values(TestFuncsFDS(av1_wedge_compute_delta_squares_sse2,
+ av1_wedge_compute_delta_squares_avx2)));
+#endif // HAVE_AVX2
+
} // namespace
diff --git a/third_party/aom/test/codec_factory.h b/third_party/aom/test/codec_factory.h
index 65b76094c..e6ae7f8c3 100644
--- a/third_party/aom/test/codec_factory.h
+++ b/third_party/aom/test/codec_factory.h
@@ -71,6 +71,11 @@ class CodecTestWith4Params
: public ::testing::TestWithParam< ::testing::tuple<
const libaom_test::CodecFactory *, T1, T2, T3, T4> > {};
+template <class T1, class T2, class T3, class T4, class T5>
+class CodecTestWith5Params
+ : public ::testing::TestWithParam< ::testing::tuple<
+ const libaom_test::CodecFactory *, T1, T2, T3, T4, T5> > {};
+
/*
* AV1 Codec Definitions
*/
diff --git a/third_party/aom/test/comp_mask_variance_test.cc b/third_party/aom/test/comp_mask_variance_test.cc
index a5e3f3411..0016ddd59 100644
--- a/third_party/aom/test/comp_mask_variance_test.cc
+++ b/third_party/aom/test/comp_mask_variance_test.cc
@@ -33,6 +33,7 @@ typedef void (*comp_mask_pred_func)(uint8_t *comp_pred, const uint8_t *pred,
int width, int height, const uint8_t *ref,
int ref_stride, const uint8_t *mask,
int mask_stride, int invert_mask);
+
#if HAVE_SSSE3 || HAVE_AV2
const BLOCK_SIZE kValidBlockSize[] = {
BLOCK_8X8, BLOCK_8X16, BLOCK_8X32, BLOCK_16X8, BLOCK_16X16,
@@ -270,4 +271,274 @@ INSTANTIATE_TEST_CASE_P(
#endif
#endif // ifndef aom_comp_mask_pred
+
+typedef void (*highbd_comp_mask_pred_func)(uint16_t *comp_pred,
+ const uint8_t *pred8, int width,
+ int height, const uint8_t *ref8,
+ int ref_stride, const uint8_t *mask,
+ int mask_stride, int invert_mask);
+
+typedef ::testing::tuple<highbd_comp_mask_pred_func, BLOCK_SIZE, int>
+ HighbdCompMaskPredParam;
+
+class AV1HighbdCompMaskVarianceTest
+ : public ::testing::TestWithParam<HighbdCompMaskPredParam> {
+ public:
+ ~AV1HighbdCompMaskVarianceTest();
+ void SetUp();
+
+ void TearDown();
+
+ protected:
+ void RunCheckOutput(highbd_comp_mask_pred_func test_impl, BLOCK_SIZE bsize,
+ int inv);
+ void RunSpeedTest(highbd_comp_mask_pred_func test_impl, BLOCK_SIZE bsize);
+ bool CheckResult(int width, int height) {
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ const int idx = y * width + x;
+ if (comp_pred1_[idx] != comp_pred2_[idx]) {
+ printf("%dx%d mismatch @%d(%d,%d) ", width, height, idx, y, x);
+ printf("%d != %d ", comp_pred1_[idx], comp_pred2_[idx]);
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+ libaom_test::ACMRandom rnd_;
+ uint16_t *comp_pred1_;
+ uint16_t *comp_pred2_;
+ uint16_t *pred_;
+ uint16_t *ref_buffer_;
+ uint16_t *ref_;
+};
+
+AV1HighbdCompMaskVarianceTest::~AV1HighbdCompMaskVarianceTest() { ; }
+
+void AV1HighbdCompMaskVarianceTest::SetUp() {
+ rnd_.Reset(libaom_test::ACMRandom::DeterministicSeed());
+ av1_init_wedge_masks();
+
+ comp_pred1_ =
+ (uint16_t *)aom_memalign(16, MAX_SB_SQUARE * sizeof(*comp_pred1_));
+ comp_pred2_ =
+ (uint16_t *)aom_memalign(16, MAX_SB_SQUARE * sizeof(*comp_pred2_));
+ pred_ = (uint16_t *)aom_memalign(16, MAX_SB_SQUARE * sizeof(*pred_));
+ ref_buffer_ = (uint16_t *)aom_memalign(
+ 16, (MAX_SB_SQUARE + (8 * MAX_SB_SIZE)) * sizeof(*ref_buffer_));
+ ref_ = ref_buffer_ + (8 * MAX_SB_SIZE);
+}
+
+void AV1HighbdCompMaskVarianceTest::TearDown() {
+ aom_free(comp_pred1_);
+ aom_free(comp_pred2_);
+ aom_free(pred_);
+ aom_free(ref_buffer_);
+ libaom_test::ClearSystemState();
+}
+
+void AV1HighbdCompMaskVarianceTest::RunCheckOutput(
+ highbd_comp_mask_pred_func test_impl, BLOCK_SIZE bsize, int inv) {
+ int bd_ = GET_PARAM(2);
+
+ const int w = block_size_wide[bsize];
+ const int h = block_size_high[bsize];
+
+ int wedge_types = (1 << get_wedge_bits_lookup(bsize));
+
+ for (int i = 0; i < MAX_SB_SQUARE; ++i) {
+ pred_[i] = rnd_.Rand16() & ((1 << bd_) - 1);
+ }
+ for (int i = 0; i < MAX_SB_SQUARE + (8 * MAX_SB_SIZE); ++i) {
+ ref_buffer_[i] = rnd_.Rand16() & ((1 << bd_) - 1);
+ }
+
+ for (int wedge_index = 0; wedge_index < wedge_types; ++wedge_index) {
+ const uint8_t *mask = av1_get_contiguous_soft_mask(wedge_index, 1, bsize);
+
+ aom_highbd_comp_mask_pred_c(comp_pred1_, CONVERT_TO_BYTEPTR(pred_), w, h,
+ CONVERT_TO_BYTEPTR(ref_), MAX_SB_SIZE, mask, w,
+ inv);
+
+ test_impl(comp_pred2_, CONVERT_TO_BYTEPTR(pred_), w, h,
+ CONVERT_TO_BYTEPTR(ref_), MAX_SB_SIZE, mask, w, inv);
+
+ ASSERT_EQ(CheckResult(w, h), true)
+ << " wedge " << wedge_index << " inv " << inv;
+ }
+}
+
+void AV1HighbdCompMaskVarianceTest::RunSpeedTest(
+ highbd_comp_mask_pred_func test_impl, BLOCK_SIZE bsize) {
+ int bd_ = GET_PARAM(2);
+
+ const int w = block_size_wide[bsize];
+ const int h = block_size_high[bsize];
+
+ int wedge_types = (1 << get_wedge_bits_lookup(bsize));
+ int wedge_index = wedge_types / 2;
+
+ for (int i = 0; i < MAX_SB_SQUARE; ++i) {
+ pred_[i] = rnd_.Rand16() & ((1 << bd_) - 1);
+ }
+ for (int i = 0; i < MAX_SB_SQUARE + (8 * MAX_SB_SIZE); ++i) {
+ ref_buffer_[i] = rnd_.Rand16() & ((1 << bd_) - 1);
+ }
+
+ const uint8_t *mask = av1_get_contiguous_soft_mask(wedge_index, 1, bsize);
+ const int num_loops = 1000000000 / (w + h);
+
+ highbd_comp_mask_pred_func funcs[2] = { aom_highbd_comp_mask_pred_c,
+ test_impl };
+ double elapsed_time[2] = { 0 };
+ for (int i = 0; i < 2; ++i) {
+ aom_usec_timer timer;
+ aom_usec_timer_start(&timer);
+ highbd_comp_mask_pred_func func = funcs[i];
+ for (int j = 0; j < num_loops; ++j) {
+ func(comp_pred1_, CONVERT_TO_BYTEPTR(pred_), w, h,
+ CONVERT_TO_BYTEPTR(ref_), MAX_SB_SIZE, mask, w, 0);
+ }
+ aom_usec_timer_mark(&timer);
+ double time = static_cast<double>(aom_usec_timer_elapsed(&timer));
+ elapsed_time[i] = 1000.0 * time / num_loops;
+ }
+ printf("compMask %3dx%-3d: %7.2f/%7.2fns", w, h, elapsed_time[0],
+ elapsed_time[1]);
+ printf("(%3.2f)\n", elapsed_time[0] / elapsed_time[1]);
+}
+
+TEST_P(AV1HighbdCompMaskVarianceTest, CheckOutput) {
+ // inv = 0, 1
+ RunCheckOutput(GET_PARAM(0), GET_PARAM(1), 0);
+ RunCheckOutput(GET_PARAM(0), GET_PARAM(1), 1);
+}
+
+TEST_P(AV1HighbdCompMaskVarianceTest, DISABLED_Speed) {
+ RunSpeedTest(GET_PARAM(0), GET_PARAM(1));
+}
+
+#if HAVE_AVX2
+INSTANTIATE_TEST_CASE_P(
+ AVX2, AV1HighbdCompMaskVarianceTest,
+ ::testing::Combine(::testing::Values(&aom_highbd_comp_mask_pred_avx2),
+ ::testing::ValuesIn(kValidBlockSize),
+ ::testing::Range(8, 13, 2)));
+#endif
+
+#ifndef aom_highbd_comp_mask_pred
+// can't run this test if aom_highbd_comp_mask_pred is defined to
+// aom_highbd_comp_mask_pred_c
+class AV1HighbdCompMaskUpVarianceTest : public AV1HighbdCompMaskVarianceTest {
+ public:
+ ~AV1HighbdCompMaskUpVarianceTest();
+
+ protected:
+ void RunCheckOutput(highbd_comp_mask_pred_func test_impl, BLOCK_SIZE bsize,
+ int inv);
+ void RunSpeedTest(highbd_comp_mask_pred_func test_impl, BLOCK_SIZE bsize,
+ int havSub);
+};
+
+AV1HighbdCompMaskUpVarianceTest::~AV1HighbdCompMaskUpVarianceTest() { ; }
+
+void AV1HighbdCompMaskUpVarianceTest::RunCheckOutput(
+ highbd_comp_mask_pred_func test_impl, BLOCK_SIZE bsize, int inv) {
+ int bd_ = GET_PARAM(2);
+ const int w = block_size_wide[bsize];
+ const int h = block_size_high[bsize];
+ int wedge_types = (1 << get_wedge_bits_lookup(bsize));
+
+ for (int i = 0; i < MAX_SB_SQUARE; ++i) {
+ pred_[i] = rnd_.Rand16() & ((1 << bd_) - 1);
+ }
+ for (int i = 0; i < MAX_SB_SQUARE + (8 * MAX_SB_SIZE); ++i) {
+ ref_buffer_[i] = rnd_.Rand16() & ((1 << bd_) - 1);
+ }
+
+ // loop through subx and suby
+ for (int sub = 0; sub < 8 * 8; ++sub) {
+ int subx = sub & 0x7;
+ int suby = (sub >> 3);
+ for (int wedge_index = 0; wedge_index < wedge_types; ++wedge_index) {
+ const uint8_t *mask = av1_get_contiguous_soft_mask(wedge_index, 1, bsize);
+
+ aom_highbd_comp_mask_pred = aom_highbd_comp_mask_pred_c; // ref
+ aom_highbd_comp_mask_upsampled_pred(
+ NULL, NULL, 0, 0, NULL, comp_pred1_, CONVERT_TO_BYTEPTR(pred_), w, h,
+ subx, suby, CONVERT_TO_BYTEPTR(ref_), MAX_SB_SIZE, mask, w, inv, bd_);
+
+ aom_highbd_comp_mask_pred = test_impl; // test
+ aom_highbd_comp_mask_upsampled_pred(
+ NULL, NULL, 0, 0, NULL, comp_pred2_, CONVERT_TO_BYTEPTR(pred_), w, h,
+ subx, suby, CONVERT_TO_BYTEPTR(ref_), MAX_SB_SIZE, mask, w, inv, bd_);
+ ASSERT_EQ(CheckResult(w, h), true)
+ << " wedge " << wedge_index << " inv " << inv << "sub (" << subx
+ << "," << suby << ")";
+ }
+ }
+}
+
+void AV1HighbdCompMaskUpVarianceTest::RunSpeedTest(
+ highbd_comp_mask_pred_func test_impl, BLOCK_SIZE bsize, int havSub) {
+ int bd_ = GET_PARAM(2);
+ const int w = block_size_wide[bsize];
+ const int h = block_size_high[bsize];
+ const int subx = havSub ? 3 : 0;
+ const int suby = havSub ? 4 : 0;
+
+ int wedge_types = (1 << get_wedge_bits_lookup(bsize));
+ int wedge_index = wedge_types / 2;
+ const uint8_t *mask = av1_get_contiguous_soft_mask(wedge_index, 1, bsize);
+
+ for (int i = 0; i < MAX_SB_SQUARE; ++i) {
+ pred_[i] = rnd_.Rand16() & ((1 << bd_) - 1);
+ }
+ for (int i = 0; i < MAX_SB_SQUARE + (8 * MAX_SB_SIZE); ++i) {
+ ref_buffer_[i] = rnd_.Rand16() & ((1 << bd_) - 1);
+ }
+
+ const int num_loops = 1000000000 / (w + h);
+ highbd_comp_mask_pred_func funcs[2] = { &aom_highbd_comp_mask_pred_c,
+ test_impl };
+ double elapsed_time[2] = { 0 };
+ for (int i = 0; i < 2; ++i) {
+ aom_usec_timer timer;
+ aom_usec_timer_start(&timer);
+ aom_highbd_comp_mask_pred = funcs[i];
+ for (int j = 0; j < num_loops; ++j) {
+ aom_highbd_comp_mask_upsampled_pred(
+ NULL, NULL, 0, 0, NULL, comp_pred1_, CONVERT_TO_BYTEPTR(pred_), w, h,
+ subx, suby, CONVERT_TO_BYTEPTR(ref_), MAX_SB_SIZE, mask, w, 0, bd_);
+ }
+ aom_usec_timer_mark(&timer);
+ double time = static_cast<double>(aom_usec_timer_elapsed(&timer));
+ elapsed_time[i] = 1000.0 * time / num_loops;
+ }
+ printf("CompMaskUp[%d] %3dx%-3d:%7.2f/%7.2fns", havSub, w, h, elapsed_time[0],
+ elapsed_time[1]);
+ printf("(%3.2f)\n", elapsed_time[0] / elapsed_time[1]);
+}
+
+TEST_P(AV1HighbdCompMaskUpVarianceTest, CheckOutput) {
+ // inv mask = 0, 1
+ RunCheckOutput(GET_PARAM(0), GET_PARAM(1), 0);
+ RunCheckOutput(GET_PARAM(0), GET_PARAM(1), 1);
+}
+
+TEST_P(AV1HighbdCompMaskUpVarianceTest, DISABLED_Speed) {
+ RunSpeedTest(GET_PARAM(0), GET_PARAM(1), 1);
+}
+
+#if HAVE_AVX2
+INSTANTIATE_TEST_CASE_P(
+ AVX2, AV1HighbdCompMaskUpVarianceTest,
+ ::testing::Combine(::testing::Values(&aom_highbd_comp_mask_pred_avx2),
+ ::testing::ValuesIn(kValidBlockSize),
+ ::testing::Range(8, 13, 2)));
+#endif
+
+#endif // ifndef aom_highbd_comp_mask_pred
} // namespace AV1CompMaskVariance
diff --git a/third_party/aom/test/convolve_test.cc b/third_party/aom/test/convolve_test.cc
index 7098e8af6..de3f47628 100644
--- a/third_party/aom/test/convolve_test.cc
+++ b/third_party/aom/test/convolve_test.cc
@@ -490,9 +490,9 @@ TEST(ConvolveTest, FiltersWontSaturateWhenAddedPairwise) {
const InterpFilter filter = (InterpFilter)filter_bank;
const InterpKernel *filters =
(const InterpKernel *)av1_get_interp_filter_kernel(filter);
- const InterpFilterParams filter_params =
+ const InterpFilterParams *filter_params =
av1_get_interp_filter_params_with_block_size(filter, 8);
- if (filter_params.taps != SUBPEL_TAPS) continue;
+ if (filter_params->taps != SUBPEL_TAPS) continue;
for (int i = 0; i < kNumFilters; i++) {
const int p0 = filters[i][0] + filters[i][1];
const int p1 = filters[i][2] + filters[i][3];
@@ -528,9 +528,9 @@ TEST_P(ConvolveTest, MatchesReferenceSubpixelFilter) {
const InterpFilter filter = (InterpFilter)filter_bank;
const InterpKernel *filters =
(const InterpKernel *)av1_get_interp_filter_kernel(filter);
- const InterpFilterParams filter_params =
+ const InterpFilterParams *filter_params =
av1_get_interp_filter_params_with_block_size(filter, 8);
- if (filter_params.taps != SUBPEL_TAPS) continue;
+ if (filter_params->taps != SUBPEL_TAPS) continue;
for (int filter_x = 0; filter_x < kNumFilters; ++filter_x) {
for (int filter_y = 0; filter_y < kNumFilters; ++filter_y) {
@@ -614,9 +614,9 @@ TEST_P(ConvolveTest, FilterExtremes) {
const InterpFilter filter = (InterpFilter)filter_bank;
const InterpKernel *filters =
(const InterpKernel *)av1_get_interp_filter_kernel(filter);
- const InterpFilterParams filter_params =
+ const InterpFilterParams *filter_params =
av1_get_interp_filter_params_with_block_size(filter, 8);
- if (filter_params.taps != SUBPEL_TAPS) continue;
+ if (filter_params->taps != SUBPEL_TAPS) continue;
for (int filter_x = 0; filter_x < kNumFilters; ++filter_x) {
for (int filter_y = 0; filter_y < kNumFilters; ++filter_y) {
wrapper_filter_block2d_8_c(in, kInputStride, filters[filter_x],
@@ -713,9 +713,9 @@ TEST_P(ConvolveTest, DISABLED_Speed) {
const InterpFilter filter = (InterpFilter)filter_bank;
const InterpKernel *filters =
(const InterpKernel *)av1_get_interp_filter_kernel(filter);
- const InterpFilterParams filter_params =
+ const InterpFilterParams *filter_params =
av1_get_interp_filter_params_with_block_size(filter, 8);
- if (filter_params.taps != SUBPEL_TAPS) continue;
+ if (filter_params->taps != SUBPEL_TAPS) continue;
for (int filter_x = 0; filter_x < kNumFilters; ++filter_x) {
for (int filter_y = 0; filter_y < kNumFilters; ++filter_y) {
@@ -832,20 +832,25 @@ INSTANTIATE_TEST_CASE_P(SSSE3, ConvolveTest,
#endif
#if HAVE_AVX2
-const ConvolveFunctions convolve8_avx2(wrap_convolve_copy_avx2_8,
- wrap_convolve8_horiz_avx2_8,
- wrap_convolve8_vert_avx2_8, 8);
-const ConvolveFunctions convolve10_avx2(wrap_convolve_copy_avx2_10,
- wrap_convolve8_horiz_avx2_10,
- wrap_convolve8_vert_avx2_10, 10);
-const ConvolveFunctions convolve12_avx2(wrap_convolve_copy_avx2_12,
- wrap_convolve8_horiz_avx2_12,
- wrap_convolve8_vert_avx2_12, 12);
-const ConvolveParam kArrayConvolve8_avx2[] = { ALL_SIZES_64(convolve8_avx2),
- ALL_SIZES_64(convolve10_avx2),
- ALL_SIZES_64(convolve12_avx2) };
+const ConvolveFunctions convolve8_avx2(aom_convolve_copy_c,
+ aom_convolve8_horiz_avx2,
+ aom_convolve8_vert_avx2, 0);
+
+const ConvolveFunctions wrap_convolve8_avx2(wrap_convolve_copy_avx2_8,
+ wrap_convolve8_horiz_avx2_8,
+ wrap_convolve8_vert_avx2_8, 8);
+const ConvolveFunctions wrap_convolve10_avx2(wrap_convolve_copy_avx2_10,
+ wrap_convolve8_horiz_avx2_10,
+ wrap_convolve8_vert_avx2_10, 10);
+const ConvolveFunctions wrap_convolve12_avx2(wrap_convolve_copy_avx2_12,
+ wrap_convolve8_horiz_avx2_12,
+ wrap_convolve8_vert_avx2_12, 12);
+const ConvolveParam kArray_Convolve8_avx2[] = {
+ ALL_SIZES_64(wrap_convolve8_avx2), ALL_SIZES_64(wrap_convolve10_avx2),
+ ALL_SIZES_64(wrap_convolve12_avx2), ALL_SIZES(convolve8_avx2)
+};
INSTANTIATE_TEST_CASE_P(AVX2, ConvolveTest,
- ::testing::ValuesIn(kArrayConvolve8_avx2));
+ ::testing::ValuesIn(kArray_Convolve8_avx2));
#endif // HAVE_AVX2
} // namespace
diff --git a/third_party/aom/test/decode_multithreaded_test.cc b/third_party/aom/test/decode_multithreaded_test.cc
index ed9a9ceef..cea1d144f 100644
--- a/third_party/aom/test/decode_multithreaded_test.cc
+++ b/third_party/aom/test/decode_multithreaded_test.cc
@@ -26,13 +26,14 @@ namespace {
static const int kNumMultiThreadDecoders = 3;
class AV1DecodeMultiThreadedTest
- : public ::libaom_test::CodecTestWith4Params<int, int, int, int>,
+ : public ::libaom_test::CodecTestWith5Params<int, int, int, int, int>,
public ::libaom_test::EncoderTest {
protected:
AV1DecodeMultiThreadedTest()
: EncoderTest(GET_PARAM(0)), md5_single_thread_(), md5_multi_thread_(),
n_tile_cols_(GET_PARAM(1)), n_tile_rows_(GET_PARAM(2)),
- n_tile_groups_(GET_PARAM(3)), set_cpu_used_(GET_PARAM(4)) {
+ n_tile_groups_(GET_PARAM(3)), set_cpu_used_(GET_PARAM(4)),
+ row_mt_(GET_PARAM(5)) {
init_flags_ = AOM_CODEC_USE_PSNR;
aom_codec_dec_cfg_t cfg = aom_codec_dec_cfg_t();
cfg.w = 704;
@@ -45,14 +46,17 @@ class AV1DecodeMultiThreadedTest
for (int i = 0; i < kNumMultiThreadDecoders; ++i) {
cfg.threads <<= 1;
multi_thread_dec_[i] = codec_->CreateDecoder(cfg, 0);
+ multi_thread_dec_[i]->Control(AV1D_SET_ROW_MT, row_mt_);
}
if (single_thread_dec_->IsAV1()) {
+ single_thread_dec_->Control(AV1D_EXT_TILE_DEBUG, 1);
single_thread_dec_->Control(AV1_SET_DECODE_TILE_ROW, -1);
single_thread_dec_->Control(AV1_SET_DECODE_TILE_COL, -1);
}
for (int i = 0; i < kNumMultiThreadDecoders; ++i) {
if (multi_thread_dec_[i]->IsAV1()) {
+ multi_thread_dec_[i]->Control(AV1D_EXT_TILE_DEBUG, 1);
multi_thread_dec_[i]->Control(AV1_SET_DECODE_TILE_ROW, -1);
multi_thread_dec_[i]->Control(AV1_SET_DECODE_TILE_COL, -1);
}
@@ -128,6 +132,7 @@ class AV1DecodeMultiThreadedTest
int n_tile_rows_;
int n_tile_groups_;
int set_cpu_used_;
+ int row_mt_;
};
// run an encode and do the decode both in single thread
@@ -154,16 +159,17 @@ TEST_P(AV1DecodeMultiThreadedTestLarge, MD5Match) {
// TODO(ranjit): More tests have to be added using pre-generated MD5.
AV1_INSTANTIATE_TEST_CASE(AV1DecodeMultiThreadedTest, ::testing::Values(1, 2),
::testing::Values(1, 2), ::testing::Values(1),
- ::testing::Values(3));
+ ::testing::Values(3), ::testing::Values(0, 1));
AV1_INSTANTIATE_TEST_CASE(AV1DecodeMultiThreadedTestLarge,
::testing::Values(0, 1, 2, 6),
::testing::Values(0, 1, 2, 6),
- ::testing::Values(1, 4), ::testing::Values(0));
+ ::testing::Values(1, 4), ::testing::Values(0),
+ ::testing::Values(0, 1));
class AV1DecodeMultiThreadedLSTestLarge
: public AV1DecodeMultiThreadedTestLarge {};
-TEST_P(AV1DecodeMultiThreadedLSTestLarge, DISABLED_MD5Match) {
+TEST_P(AV1DecodeMultiThreadedLSTestLarge, MD5Match) {
cfg_.large_scale_tile = 1;
single_thread_dec_->Control(AV1_SET_TILE_MODE, 1);
for (int i = 0; i < kNumMultiThreadDecoders; ++i)
@@ -172,8 +178,8 @@ TEST_P(AV1DecodeMultiThreadedLSTestLarge, DISABLED_MD5Match) {
}
AV1_INSTANTIATE_TEST_CASE(AV1DecodeMultiThreadedLSTestLarge,
- ::testing::Values(1, 2, 32),
- ::testing::Values(1, 2, 32), ::testing::Values(1),
- ::testing::Values(0, 3));
+ ::testing::Values(6), ::testing::Values(6),
+ ::testing::Values(1), ::testing::Values(0, 3),
+ ::testing::Values(0, 1));
} // namespace
diff --git a/third_party/aom/test/decode_test_driver.cc b/third_party/aom/test/decode_test_driver.cc
index ed261b527..70de0cff6 100644
--- a/third_party/aom/test/decode_test_driver.cc
+++ b/third_party/aom/test/decode_test_driver.cc
@@ -94,7 +94,7 @@ void DecoderTest::RunLoop(CompressedVideoSource *video,
const aom_image_t *img = NULL;
// Get decompressed data
- while ((img = dec_iter.Next()))
+ while (!::testing::Test::HasFailure() && (img = dec_iter.Next()))
DecompressedFrameHook(*img, video->frame_number());
}
delete decoder;
diff --git a/third_party/aom/test/dr_prediction_test.cc b/third_party/aom/test/dr_prediction_test.cc
index 22b9832a1..ff2c1de4e 100644
--- a/third_party/aom/test/dr_prediction_test.cc
+++ b/third_party/aom/test/dr_prediction_test.cc
@@ -143,8 +143,8 @@ class DrPredTest : public ::testing::TestWithParam<DrPredFunc<FuncType> > {
static const int kBufSize = ((2 * MAX_TX_SIZE) << 1) + 16;
DrPredTest()
- : upsample_above_(0), upsample_left_(0), bw_(0), bh_(0), dx_(1), dy_(1),
- bd_(8), txsize_(TX_4X4) {
+ : enable_upsample_(0), upsample_above_(0), upsample_left_(0), bw_(0),
+ bh_(0), dx_(1), dy_(1), bd_(8), txsize_(TX_4X4) {
params_ = this->GetParam();
start_angle_ = params_.start_angle;
stop_angle_ = start_angle_ + 90;
@@ -193,7 +193,7 @@ class DrPredTest : public ::testing::TestWithParam<DrPredFunc<FuncType> > {
OutputTimes(kNumTests, ref_time, tst_time, tx);
}
- void RunTest(bool speedtest) {
+ void RunTest(bool speedtest, int p_angle) {
for (int i = 0; i < kBufSize; ++i) {
above_data_[i] = left_data_[i] = (1 << bd_) - 1;
}
@@ -212,6 +212,15 @@ class DrPredTest : public ::testing::TestWithParam<DrPredFunc<FuncType> > {
bw_ = tx_size_wide[kTxSize[tx]];
bh_ = tx_size_high[kTxSize[tx]];
+ if (enable_upsample_) {
+ upsample_above_ =
+ av1_use_intra_edge_upsample(bw_, bh_, p_angle - 90, 0);
+ upsample_left_ =
+ av1_use_intra_edge_upsample(bw_, bh_, p_angle - 180, 0);
+ } else {
+ upsample_above_ = upsample_left_ = 0;
+ }
+
Predict(speedtest, tx);
for (int r = 0; r < bh_; ++r) {
@@ -252,6 +261,7 @@ class DrPredTest : public ::testing::TestWithParam<DrPredFunc<FuncType> > {
Pixel *left_;
int dst_stride_;
+ int enable_upsample_;
int upsample_above_;
int upsample_left_;
int bw_;
@@ -273,25 +283,25 @@ class LowbdDrPredTest : public DrPredTest<uint8_t, DrPred> {};
TEST_P(LowbdDrPredTest, SaturatedValues) {
for (int iter = 0; iter < kIterations && !HasFatalFailure(); ++iter) {
- upsample_above_ = iter & 1;
+ enable_upsample_ = iter & 1;
for (int angle = start_angle_; angle < stop_angle_; ++angle) {
dx_ = av1_get_dx(angle);
dy_ = av1_get_dy(angle);
- if (dx_ && dy_) RunTest(false);
+ if (dx_ && dy_) RunTest(false, angle);
}
}
}
TEST_P(LowbdDrPredTest, DISABLED_Speed) {
const int angles[] = { 3, 45, 87 };
- for (upsample_above_ = 0; upsample_above_ < 2; ++upsample_above_) {
- upsample_left_ = upsample_above_;
+ for (enable_upsample_ = 0; enable_upsample_ < 2; ++enable_upsample_) {
for (int i = 0; i < 3; ++i) {
- dx_ = av1_get_dx(angles[i] + start_angle_);
- dy_ = av1_get_dy(angles[i] + start_angle_);
- printf("upsample_above: %d upsample_left: %d angle: %d ~~~~~~~~~~~~~~~\n",
- upsample_above_, upsample_left_, angles[i] + start_angle_);
- if (dx_ && dy_) RunTest(true);
+ const int angle = angles[i] + start_angle_;
+ dx_ = av1_get_dx(angle);
+ dy_ = av1_get_dy(angle);
+ printf("enable_upsample: %d angle: %d ~~~~~~~~~~~~~~~\n",
+ enable_upsample_, angle);
+ if (dx_ && dy_) RunTest(true, angle);
}
}
}
@@ -311,25 +321,25 @@ class HighbdDrPredTest : public DrPredTest<uint16_t, DrPred_Hbd> {};
TEST_P(HighbdDrPredTest, SaturatedValues) {
for (int iter = 0; iter < kIterations && !HasFatalFailure(); ++iter) {
- upsample_above_ = iter & 1;
+ enable_upsample_ = iter & 1;
for (int angle = start_angle_; angle < stop_angle_; ++angle) {
dx_ = av1_get_dx(angle);
dy_ = av1_get_dy(angle);
- if (dx_ && dy_) RunTest(false);
+ if (dx_ && dy_) RunTest(false, angle);
}
}
}
TEST_P(HighbdDrPredTest, DISABLED_Speed) {
const int angles[] = { 3, 45, 87 };
- for (upsample_above_ = 0; upsample_above_ < 2; ++upsample_above_) {
- upsample_left_ = upsample_above_;
+ for (enable_upsample_ = 0; enable_upsample_ < 2; ++enable_upsample_) {
for (int i = 0; i < 3; ++i) {
- dx_ = av1_get_dx(angles[i] + start_angle_);
- dy_ = av1_get_dy(angles[i] + start_angle_);
- printf("upsample_above: %d upsample_left: %d angle: %d ~~~~~~~~~~~~~~~\n",
- upsample_above_, upsample_left_, angles[i] + start_angle_);
- if (dx_ && dy_) RunTest(true);
+ const int angle = angles[i] + start_angle_;
+ dx_ = av1_get_dx(angle);
+ dy_ = av1_get_dy(angle);
+ printf("enable_upsample: %d angle: %d ~~~~~~~~~~~~~~~\n",
+ enable_upsample_, angle);
+ if (dx_ && dy_) RunTest(true, angle);
}
}
}
diff --git a/third_party/aom/test/dump_obu.sh b/third_party/aom/test/dump_obu.sh
index 182e894f5..da44dd7e6 100755
--- a/third_party/aom/test/dump_obu.sh
+++ b/third_party/aom/test/dump_obu.sh
@@ -44,7 +44,7 @@ aomenc_available() {
encode_test_file() {
if [ "$(aomenc_available)" = "yes" ]; then
- local readonly encoder="$(aom_tool_path aomenc)"
+ local encoder="$(aom_tool_path aomenc)"
eval "${encoder}" \
$(aomenc_encode_test_fast_params) \
diff --git a/third_party/aom/test/encode_test_driver.cc b/third_party/aom/test/encode_test_driver.cc
index b75d7be16..35908430d 100644
--- a/third_party/aom/test/encode_test_driver.cc
+++ b/third_party/aom/test/encode_test_driver.cc
@@ -217,6 +217,7 @@ void EncoderTest::RunLoop(VideoSource *video) {
// Set dec_cfg.tile_row = -1 and dec_cfg.tile_col = -1 so that the whole
// frame is decoded.
decoder->Control(AV1_SET_TILE_MODE, cfg_.large_scale_tile);
+ decoder->Control(AV1D_EXT_TILE_DEBUG, 1);
decoder->Control(AV1_SET_DECODE_TILE_ROW, -1);
decoder->Control(AV1_SET_DECODE_TILE_COL, -1);
}
diff --git a/third_party/aom/test/ethread_test.cc b/third_party/aom/test/ethread_test.cc
index 3dcc2a707..dd9fc2f8d 100644
--- a/third_party/aom/test/ethread_test.cc
+++ b/third_party/aom/test/ethread_test.cc
@@ -20,12 +20,14 @@
namespace {
class AVxEncoderThreadTest
- : public ::libaom_test::CodecTestWith2Params<libaom_test::TestMode, int>,
+ : public ::libaom_test::CodecTestWith4Params<libaom_test::TestMode, int,
+ int, int>,
public ::libaom_test::EncoderTest {
protected:
AVxEncoderThreadTest()
: EncoderTest(GET_PARAM(0)), encoder_initialized_(false),
- encoding_mode_(GET_PARAM(1)), set_cpu_used_(GET_PARAM(2)) {
+ encoding_mode_(GET_PARAM(1)), set_cpu_used_(GET_PARAM(2)),
+ tile_cols_(GET_PARAM(3)), tile_rows_(GET_PARAM(4)) {
init_flags_ = AOM_CODEC_USE_PSNR;
aom_codec_dec_cfg_t cfg = aom_codec_dec_cfg_t();
cfg.w = 1280;
@@ -84,9 +86,8 @@ class AVxEncoderThreadTest
}
virtual void SetTileSize(libaom_test::Encoder *encoder) {
- // Encode 4 tile columns.
- encoder->Control(AV1E_SET_TILE_COLUMNS, 2);
- encoder->Control(AV1E_SET_TILE_ROWS, 0);
+ encoder->Control(AV1E_SET_TILE_COLUMNS, tile_cols_);
+ encoder->Control(AV1E_SET_TILE_ROWS, tile_rows_);
}
virtual void FramePktHook(const aom_codec_cx_pkt_t *pkt) {
@@ -153,6 +154,8 @@ class AVxEncoderThreadTest
bool encoder_initialized_;
::libaom_test::TestMode encoding_mode_;
int set_cpu_used_;
+ int tile_cols_;
+ int tile_rows_;
::libaom_test::Decoder *decoder_;
std::vector<size_t> size_enc_;
std::vector<std::string> md5_enc_;
@@ -177,42 +180,46 @@ TEST_P(AVxEncoderThreadTestLarge, EncoderResultTest) {
AV1_INSTANTIATE_TEST_CASE(AVxEncoderThreadTest,
::testing::Values(::libaom_test::kTwoPassGood,
::libaom_test::kOnePassGood),
- ::testing::Range(2, 4));
+ ::testing::Range(2, 4), ::testing::Values(1, 2),
+ ::testing::Values(0, 1));
AV1_INSTANTIATE_TEST_CASE(AVxEncoderThreadTestLarge,
::testing::Values(::libaom_test::kTwoPassGood,
::libaom_test::kOnePassGood),
- ::testing::Range(0, 2));
+ ::testing::Range(0, 2), ::testing::Values(0, 1, 2, 6),
+ ::testing::Values(0, 1, 2, 6));
class AVxEncoderThreadLSTest : public AVxEncoderThreadTest {
virtual void SetTileSize(libaom_test::Encoder *encoder) {
- encoder->Control(AV1E_SET_TILE_COLUMNS, 1);
- // TODO(geza): Start using multiple tile rows when the multi-threaded
- // encoder can handle them
- encoder->Control(AV1E_SET_TILE_ROWS, 32);
+ encoder->Control(AV1E_SET_TILE_COLUMNS, tile_cols_);
+ encoder->Control(AV1E_SET_TILE_ROWS, tile_rows_);
}
};
-TEST_P(AVxEncoderThreadLSTest, DISABLED_EncoderResultTest) {
+TEST_P(AVxEncoderThreadLSTest, EncoderResultTest) {
cfg_.large_scale_tile = 1;
decoder_->Control(AV1_SET_TILE_MODE, 1);
+ decoder_->Control(AV1D_EXT_TILE_DEBUG, 1);
DoTest();
}
class AVxEncoderThreadLSTestLarge : public AVxEncoderThreadLSTest {};
-TEST_P(AVxEncoderThreadLSTestLarge, DISABLED_EncoderResultTest) {
+TEST_P(AVxEncoderThreadLSTestLarge, EncoderResultTest) {
cfg_.large_scale_tile = 1;
decoder_->Control(AV1_SET_TILE_MODE, 1);
+ decoder_->Control(AV1D_EXT_TILE_DEBUG, 1);
DoTest();
}
AV1_INSTANTIATE_TEST_CASE(AVxEncoderThreadLSTest,
::testing::Values(::libaom_test::kTwoPassGood,
::libaom_test::kOnePassGood),
- ::testing::Range(2, 4));
+ ::testing::Range(2, 4), ::testing::Values(6),
+ ::testing::Values(0, 6));
AV1_INSTANTIATE_TEST_CASE(AVxEncoderThreadLSTestLarge,
::testing::Values(::libaom_test::kTwoPassGood,
::libaom_test::kOnePassGood),
- ::testing::Range(0, 2));
+ ::testing::Range(0, 2), ::testing::Values(6),
+ ::testing::Values(0, 6));
} // namespace
diff --git a/third_party/aom/test/fft_test.cc b/third_party/aom/test/fft_test.cc
index 56187cdbb..5c8ec069c 100644
--- a/third_party/aom/test/fft_test.cc
+++ b/third_party/aom/test/fft_test.cc
@@ -1,3 +1,14 @@
+/*
+ * Copyright (c) 2018, 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 <math.h>
#include <algorithm>
diff --git a/third_party/aom/test/film_grain_table_test.cc b/third_party/aom/test/film_grain_table_test.cc
index 068814635..524d67d7b 100644
--- a/third_party/aom/test/film_grain_table_test.cc
+++ b/third_party/aom/test/film_grain_table_test.cc
@@ -1,3 +1,14 @@
+/*
+ * Copyright (c) 2018, 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 <string>
#include "third_party/googletest/src/googletest/include/gtest/gtest.h"
#include "aom_dsp/grain_table.h"
diff --git a/third_party/aom/test/intrapred_test.cc b/third_party/aom/test/intrapred_test.cc
index 82f191449..1a1c0fc42 100644
--- a/third_party/aom/test/intrapred_test.cc
+++ b/third_party/aom/test/intrapred_test.cc
@@ -37,6 +37,15 @@ typedef void (*HighbdIntraPred)(uint16_t *dst, ptrdiff_t stride,
typedef void (*IntraPred)(uint8_t *dst, ptrdiff_t stride, const uint8_t *above,
const uint8_t *left);
+} // namespace
+
+// NOTE: Under gcc version 7.3.0 (Debian 7.3.0-5), if this template is in the
+// anonymous namespace, then we get a strange compiler warning in
+// the begin() and end() methods of the ParamGenerator template class in
+// gtest/internal/gtest-param-util.h:
+// warning: ‘<anonymous>’ is used uninitialized in this function
+// As a workaround, put this template outside the anonymous namespace.
+// See bug aomedia:2003.
template <typename FuncType>
struct IntraPredFunc {
IntraPredFunc(FuncType pred = NULL, FuncType ref = NULL,
@@ -52,6 +61,8 @@ struct IntraPredFunc {
int bit_depth;
};
+namespace {
+
template <typename FuncType, typename Pixel>
class AV1IntraPredTest
: public ::testing::TestWithParam<IntraPredFunc<FuncType> > {
diff --git a/third_party/aom/test/lightfield_test.sh b/third_party/aom/test/lightfield_test.sh
new file mode 100755
index 000000000..b957a6b79
--- /dev/null
+++ b/third_party/aom/test/lightfield_test.sh
@@ -0,0 +1,98 @@
+#!/bin/sh
+## Copyright (c) 2018, 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.
+##
+## This file tests the lightfield example.
+##
+. $(dirname $0)/tools_common.sh
+
+# Environment check: $infile is required.
+lightfield_test_verify_environment() {
+ local infile="${LIBAOM_TEST_DATA_PATH}/vase10x10.yuv"
+ if [ ! -e "${infile}" ]; then
+ echo "Libaom test data must exist in LIBAOM_TEST_DATA_PATH."
+ return 1
+ fi
+}
+
+# Run the lightfield example
+lightfield_test() {
+ local img_width=1024
+ local img_height=1024
+ local lf_width=10
+ local lf_height=10
+ local lf_blocksize=5
+ local num_references=4
+ local num_tile_lists=2
+
+ # Encode the lightfield.
+ local encoder="${LIBAOM_BIN_PATH}/lightfield_encoder${AOM_TEST_EXE_SUFFIX}"
+ local yuv_file="${LIBAOM_TEST_DATA_PATH}/vase10x10.yuv"
+ local lf_file="${AOM_TEST_OUTPUT_DIR}/vase10x10.ivf"
+ if [ ! -x "${encoder}" ]; then
+ elog "${encoder} does not exist or is not executable."
+ return 1
+ fi
+
+ eval "${AOM_TEST_PREFIX}" "${encoder}" "${img_width}" "${img_height}" \
+ "${yuv_file}" "${lf_file}" "${lf_width}" \
+ "${lf_height}" "${lf_blocksize}" ${devnull}
+
+ [ -e "${lf_file}" ] || return 1
+
+ # Parse lightfield bitstream to construct and output a new bitstream that can
+ # be decoded by an AV1 decoder.
+ local bs_decoder="${LIBAOM_BIN_PATH}/lightfield_bitstream_parsing${AOM_TEST_EXE_SUFFIX}"
+ local tl_file="${AOM_TEST_OUTPUT_DIR}/vase_tile_list.ivf"
+ if [ ! -x "${bs_decoder}" ]; then
+ elog "${bs_decoder} does not exist or is not executable."
+ return 1
+ fi
+
+ eval "${AOM_TEST_PREFIX}" "${bs_decoder}" "${lf_file}" "${tl_file}" \
+ "${num_references}" ${devnull}
+
+ [ -e "${tl_file}" ] || return 1
+
+ # Run lightfield tile list decoder
+ local tl_decoder="${LIBAOM_BIN_PATH}/lightfield_tile_list_decoder${AOM_TEST_EXE_SUFFIX}"
+ local tl_outfile="${AOM_TEST_OUTPUT_DIR}/vase_tile_list.yuv"
+ if [ ! -x "${tl_decoder}" ]; then
+ elog "${tl_decoder} does not exist or is not executable."
+ return 1
+ fi
+
+ eval "${AOM_TEST_PREFIX}" "${tl_decoder}" "${tl_file}" "${tl_outfile}" \
+ "${num_references}" "${num_tile_lists}" ${devnull}
+
+ [ -e "${tl_outfile}" ] || return 1
+
+ # Run reference lightfield decoder
+ local ref_decoder="${LIBAOM_BIN_PATH}/lightfield_decoder${AOM_TEST_EXE_SUFFIX}"
+ local tl_reffile="${AOM_TEST_OUTPUT_DIR}/vase_reference.yuv"
+ if [ ! -x "${ref_decoder}" ]; then
+ elog "${ref_decoder} does not exist or is not executable."
+ return 1
+ fi
+
+ eval "${AOM_TEST_PREFIX}" "${ref_decoder}" "${lf_file}" "${tl_reffile}" \
+ "${num_references}" ${devnull}
+
+ [ -e "${tl_reffile}" ] || return 1
+
+ # Check if tl_outfile and tl_reffile are identical. If not identical, this test fails.
+ diff ${tl_outfile} ${tl_reffile} > /dev/null
+ if [ $? -eq 1 ]; then
+ return 1
+ fi
+}
+
+lightfield_test_tests="lightfield_test"
+
+run_tests lightfield_test_verify_environment "${lightfield_test_tests}"
diff --git a/third_party/aom/test/lpf_test.cc b/third_party/aom/test/lpf_test.cc
index 1e2862ac8..451bffd2a 100644
--- a/third_party/aom/test/lpf_test.cc
+++ b/third_party/aom/test/lpf_test.cc
@@ -581,8 +581,12 @@ INSTANTIATE_TEST_CASE_P(SSE2, Loop8Test9Param_hbd,
const loop_param_t kLoop8Test6[] = {
make_tuple(&aom_lpf_vertical_14_neon, &aom_lpf_vertical_14_c, 8),
make_tuple(&aom_lpf_vertical_8_neon, &aom_lpf_vertical_8_c, 8),
+ make_tuple(&aom_lpf_vertical_6_neon, &aom_lpf_vertical_6_c, 8),
+ make_tuple(&aom_lpf_vertical_4_neon, &aom_lpf_vertical_4_c, 8),
+ make_tuple(&aom_lpf_horizontal_14_neon, &aom_lpf_horizontal_14_c, 8),
make_tuple(&aom_lpf_horizontal_8_neon, &aom_lpf_horizontal_8_c, 8),
- make_tuple(&aom_lpf_horizontal_6_neon, &aom_lpf_horizontal_6_c, 8)
+ make_tuple(&aom_lpf_horizontal_6_neon, &aom_lpf_horizontal_6_c, 8),
+ make_tuple(&aom_lpf_horizontal_4_neon, &aom_lpf_horizontal_4_c, 8)
};
INSTANTIATE_TEST_CASE_P(NEON, Loop8Test6Param_lbd,
diff --git a/third_party/aom/test/masked_sad_test.cc b/third_party/aom/test/masked_sad_test.cc
index 1a393a001..311f1877d 100644
--- a/third_party/aom/test/masked_sad_test.cc
+++ b/third_party/aom/test/masked_sad_test.cc
@@ -44,14 +44,14 @@ class MaskedSADTest : public ::testing::TestWithParam<MaskedSADParam> {
}
virtual void TearDown() { libaom_test::ClearSystemState(); }
+ void runMaskedSADTest(int run_times);
protected:
MaskedSADFunc maskedSAD_op_;
MaskedSADFunc ref_maskedSAD_op_;
};
-
-TEST_P(MaskedSADTest, OperationCheck) {
- unsigned int ref_ret, ret;
+void MaskedSADTest::runMaskedSADTest(int run_times) {
+ unsigned int ref_ret = 0, ret = 1;
ACMRandom rnd(ACMRandom::DeterministicSeed());
DECLARE_ALIGNED(16, uint8_t, src_ptr[MAX_SB_SIZE * MAX_SB_SIZE]);
DECLARE_ALIGNED(16, uint8_t, ref_ptr[MAX_SB_SIZE * MAX_SB_SIZE]);
@@ -62,7 +62,8 @@ TEST_P(MaskedSADTest, OperationCheck) {
int src_stride = MAX_SB_SIZE;
int ref_stride = MAX_SB_SIZE;
int msk_stride = MAX_SB_SIZE;
- for (int i = 0; i < number_of_iterations; ++i) {
+ const int iters = run_times == 1 ? number_of_iterations : 1;
+ for (int i = 0; i < iters; ++i) {
for (int j = 0; j < MAX_SB_SIZE * MAX_SB_SIZE; j++) {
src_ptr[j] = rnd.Rand8();
ref_ptr[j] = rnd.Rand8();
@@ -72,24 +73,48 @@ TEST_P(MaskedSADTest, OperationCheck) {
}
for (int invert_mask = 0; invert_mask < 2; ++invert_mask) {
- ref_ret =
- ref_maskedSAD_op_(src_ptr, src_stride, ref_ptr, ref_stride,
+ aom_usec_timer timer;
+ aom_usec_timer_start(&timer);
+ for (int repeat = 0; repeat < run_times; ++repeat) {
+ ref_ret = ref_maskedSAD_op_(src_ptr, src_stride, ref_ptr, ref_stride,
+ second_pred_ptr, msk_ptr, msk_stride,
+ invert_mask);
+ }
+ aom_usec_timer_mark(&timer);
+ const double time1 = static_cast<double>(aom_usec_timer_elapsed(&timer));
+ aom_usec_timer_start(&timer);
+ if (run_times == 1) {
+ ASM_REGISTER_STATE_CHECK(ret = maskedSAD_op_(src_ptr, src_stride,
+ ref_ptr, ref_stride,
+ second_pred_ptr, msk_ptr,
+ msk_stride, invert_mask));
+ } else {
+ for (int repeat = 0; repeat < run_times; ++repeat) {
+ ret =
+ maskedSAD_op_(src_ptr, src_stride, ref_ptr, ref_stride,
second_pred_ptr, msk_ptr, msk_stride, invert_mask);
- ASM_REGISTER_STATE_CHECK(ret = maskedSAD_op_(src_ptr, src_stride, ref_ptr,
- ref_stride, second_pred_ptr,
- msk_ptr, msk_stride,
- invert_mask));
+ }
+ }
+ aom_usec_timer_mark(&timer);
+ const double time2 = static_cast<double>(aom_usec_timer_elapsed(&timer));
+ if (run_times > 10) {
+ printf("%7.2f/%7.2fns", time1, time2);
+ printf("(%3.2f)\n", time1 / time2);
+ }
if (ret != ref_ret) {
err_count++;
if (first_failure == -1) first_failure = i;
}
}
}
- EXPECT_EQ(0, err_count)
- << "Error: Masked SAD Test, C output doesn't match SSSE3 output. "
- << "First failed at test case " << first_failure;
+ EXPECT_EQ(0, err_count) << "Error: Masked SAD Test, output doesn't match. "
+ << "First failed at test case " << first_failure;
}
+TEST_P(MaskedSADTest, OperationCheck) { runMaskedSADTest(1); }
+
+TEST_P(MaskedSADTest, DISABLED_Speed) { runMaskedSADTest(2000000); }
+
typedef unsigned int (*HighbdMaskedSADFunc)(const uint8_t *src, int src_stride,
const uint8_t *ref, int ref_stride,
const uint8_t *second_pred,
@@ -108,14 +133,14 @@ class HighbdMaskedSADTest
}
virtual void TearDown() { libaom_test::ClearSystemState(); }
+ void runHighbdMaskedSADTest(int run_times);
protected:
HighbdMaskedSADFunc maskedSAD_op_;
HighbdMaskedSADFunc ref_maskedSAD_op_;
};
-
-TEST_P(HighbdMaskedSADTest, OperationCheck) {
- unsigned int ref_ret, ret;
+void HighbdMaskedSADTest::runHighbdMaskedSADTest(int run_times) {
+ unsigned int ref_ret = 0, ret = 1;
ACMRandom rnd(ACMRandom::DeterministicSeed());
DECLARE_ALIGNED(16, uint16_t, src_ptr[MAX_SB_SIZE * MAX_SB_SIZE]);
DECLARE_ALIGNED(16, uint16_t, ref_ptr[MAX_SB_SIZE * MAX_SB_SIZE]);
@@ -129,7 +154,8 @@ TEST_P(HighbdMaskedSADTest, OperationCheck) {
int src_stride = MAX_SB_SIZE;
int ref_stride = MAX_SB_SIZE;
int msk_stride = MAX_SB_SIZE;
- for (int i = 0; i < number_of_iterations; ++i) {
+ const int iters = run_times == 1 ? number_of_iterations : 1;
+ for (int i = 0; i < iters; ++i) {
for (int j = 0; j < MAX_SB_SIZE * MAX_SB_SIZE; j++) {
src_ptr[j] = rnd.Rand16() & 0xfff;
ref_ptr[j] = rnd.Rand16() & 0xfff;
@@ -138,13 +164,34 @@ TEST_P(HighbdMaskedSADTest, OperationCheck) {
}
for (int invert_mask = 0; invert_mask < 2; ++invert_mask) {
- ref_ret =
- ref_maskedSAD_op_(src8_ptr, src_stride, ref8_ptr, ref_stride,
+ aom_usec_timer timer;
+ aom_usec_timer_start(&timer);
+ for (int repeat = 0; repeat < run_times; ++repeat) {
+ ref_ret = ref_maskedSAD_op_(src8_ptr, src_stride, ref8_ptr, ref_stride,
+ second_pred8_ptr, msk_ptr, msk_stride,
+ invert_mask);
+ }
+ aom_usec_timer_mark(&timer);
+ const double time1 = static_cast<double>(aom_usec_timer_elapsed(&timer));
+ aom_usec_timer_start(&timer);
+ if (run_times == 1) {
+ ASM_REGISTER_STATE_CHECK(ret = maskedSAD_op_(src8_ptr, src_stride,
+ ref8_ptr, ref_stride,
+ second_pred8_ptr, msk_ptr,
+ msk_stride, invert_mask));
+ } else {
+ for (int repeat = 0; repeat < run_times; ++repeat) {
+ ret =
+ maskedSAD_op_(src8_ptr, src_stride, ref8_ptr, ref_stride,
second_pred8_ptr, msk_ptr, msk_stride, invert_mask);
- ASM_REGISTER_STATE_CHECK(ret = maskedSAD_op_(src8_ptr, src_stride,
- ref8_ptr, ref_stride,
- second_pred8_ptr, msk_ptr,
- msk_stride, invert_mask));
+ }
+ }
+ aom_usec_timer_mark(&timer);
+ const double time2 = static_cast<double>(aom_usec_timer_elapsed(&timer));
+ if (run_times > 10) {
+ printf("%7.2f/%7.2fns", time1, time2);
+ printf("(%3.2f)\n", time1 / time2);
+ }
if (ret != ref_ret) {
err_count++;
if (first_failure == -1) first_failure = i;
@@ -152,57 +199,144 @@ TEST_P(HighbdMaskedSADTest, OperationCheck) {
}
}
EXPECT_EQ(0, err_count)
- << "Error: High BD Masked SAD Test, C output doesn't match SSSE3 output. "
+ << "Error: High BD Masked SAD Test, output doesn't match. "
<< "First failed at test case " << first_failure;
}
+TEST_P(HighbdMaskedSADTest, OperationCheck) { runHighbdMaskedSADTest(1); }
+
+TEST_P(HighbdMaskedSADTest, DISABLED_Speed) { runHighbdMaskedSADTest(1000000); }
+
using ::testing::make_tuple;
#if HAVE_SSSE3
const MaskedSADParam msad_test[] = {
- make_tuple(&aom_masked_sad128x128_ssse3, &aom_masked_sad128x128_c),
- make_tuple(&aom_masked_sad128x64_ssse3, &aom_masked_sad128x64_c),
- make_tuple(&aom_masked_sad64x128_ssse3, &aom_masked_sad64x128_c),
- make_tuple(&aom_masked_sad64x64_ssse3, &aom_masked_sad64x64_c),
- make_tuple(&aom_masked_sad64x32_ssse3, &aom_masked_sad64x32_c),
- make_tuple(&aom_masked_sad32x64_ssse3, &aom_masked_sad32x64_c),
- make_tuple(&aom_masked_sad32x32_ssse3, &aom_masked_sad32x32_c),
- make_tuple(&aom_masked_sad32x16_ssse3, &aom_masked_sad32x16_c),
- make_tuple(&aom_masked_sad16x32_ssse3, &aom_masked_sad16x32_c),
- make_tuple(&aom_masked_sad16x16_ssse3, &aom_masked_sad16x16_c),
- make_tuple(&aom_masked_sad16x8_ssse3, &aom_masked_sad16x8_c),
- make_tuple(&aom_masked_sad8x16_ssse3, &aom_masked_sad8x16_c),
- make_tuple(&aom_masked_sad8x8_ssse3, &aom_masked_sad8x8_c),
- make_tuple(&aom_masked_sad8x4_ssse3, &aom_masked_sad8x4_c),
+ make_tuple(&aom_masked_sad4x4_ssse3, &aom_masked_sad4x4_c),
make_tuple(&aom_masked_sad4x8_ssse3, &aom_masked_sad4x8_c),
- make_tuple(&aom_masked_sad4x4_ssse3, &aom_masked_sad4x4_c)
+ make_tuple(&aom_masked_sad8x4_ssse3, &aom_masked_sad8x4_c),
+ make_tuple(&aom_masked_sad8x8_ssse3, &aom_masked_sad8x8_c),
+ make_tuple(&aom_masked_sad8x16_ssse3, &aom_masked_sad8x16_c),
+ make_tuple(&aom_masked_sad16x8_ssse3, &aom_masked_sad16x8_c),
+ make_tuple(&aom_masked_sad16x16_ssse3, &aom_masked_sad16x16_c),
+ make_tuple(&aom_masked_sad16x32_ssse3, &aom_masked_sad16x32_c),
+ make_tuple(&aom_masked_sad32x16_ssse3, &aom_masked_sad32x16_c),
+ make_tuple(&aom_masked_sad32x32_ssse3, &aom_masked_sad32x32_c),
+ make_tuple(&aom_masked_sad32x64_ssse3, &aom_masked_sad32x64_c),
+ make_tuple(&aom_masked_sad64x32_ssse3, &aom_masked_sad64x32_c),
+ make_tuple(&aom_masked_sad64x64_ssse3, &aom_masked_sad64x64_c),
+ make_tuple(&aom_masked_sad64x128_ssse3, &aom_masked_sad64x128_c),
+ make_tuple(&aom_masked_sad128x64_ssse3, &aom_masked_sad128x64_c),
+ make_tuple(&aom_masked_sad128x128_ssse3, &aom_masked_sad128x128_c),
+ make_tuple(&aom_masked_sad4x16_ssse3, &aom_masked_sad4x16_c),
+ make_tuple(&aom_masked_sad16x4_ssse3, &aom_masked_sad16x4_c),
+ make_tuple(&aom_masked_sad8x32_ssse3, &aom_masked_sad8x32_c),
+ make_tuple(&aom_masked_sad32x8_ssse3, &aom_masked_sad32x8_c),
+ make_tuple(&aom_masked_sad16x64_ssse3, &aom_masked_sad16x64_c),
+ make_tuple(&aom_masked_sad64x16_ssse3, &aom_masked_sad64x16_c),
};
-INSTANTIATE_TEST_CASE_P(SSSE3_C_COMPARE, MaskedSADTest,
- ::testing::ValuesIn(msad_test));
+INSTANTIATE_TEST_CASE_P(SSSE3, MaskedSADTest, ::testing::ValuesIn(msad_test));
+
const HighbdMaskedSADParam hbd_msad_test[] = {
- make_tuple(&aom_highbd_masked_sad128x128_ssse3,
- &aom_highbd_masked_sad128x128_c),
- make_tuple(&aom_highbd_masked_sad128x64_ssse3,
- &aom_highbd_masked_sad128x64_c),
+ make_tuple(&aom_highbd_masked_sad4x4_ssse3, &aom_highbd_masked_sad4x4_c),
+ make_tuple(&aom_highbd_masked_sad4x8_ssse3, &aom_highbd_masked_sad4x8_c),
+ make_tuple(&aom_highbd_masked_sad8x4_ssse3, &aom_highbd_masked_sad8x4_c),
+ make_tuple(&aom_highbd_masked_sad8x8_ssse3, &aom_highbd_masked_sad8x8_c),
+ make_tuple(&aom_highbd_masked_sad8x16_ssse3, &aom_highbd_masked_sad8x16_c),
+ make_tuple(&aom_highbd_masked_sad16x8_ssse3, &aom_highbd_masked_sad16x8_c),
+ make_tuple(&aom_highbd_masked_sad16x16_ssse3, &aom_highbd_masked_sad16x16_c),
+ make_tuple(&aom_highbd_masked_sad16x32_ssse3, &aom_highbd_masked_sad16x32_c),
+ make_tuple(&aom_highbd_masked_sad32x16_ssse3, &aom_highbd_masked_sad32x16_c),
+ make_tuple(&aom_highbd_masked_sad32x32_ssse3, &aom_highbd_masked_sad32x32_c),
+ make_tuple(&aom_highbd_masked_sad32x64_ssse3, &aom_highbd_masked_sad32x64_c),
+ make_tuple(&aom_highbd_masked_sad64x32_ssse3, &aom_highbd_masked_sad64x32_c),
+ make_tuple(&aom_highbd_masked_sad64x64_ssse3, &aom_highbd_masked_sad64x64_c),
make_tuple(&aom_highbd_masked_sad64x128_ssse3,
&aom_highbd_masked_sad64x128_c),
- make_tuple(&aom_highbd_masked_sad64x64_ssse3, &aom_highbd_masked_sad64x64_c),
- make_tuple(&aom_highbd_masked_sad64x32_ssse3, &aom_highbd_masked_sad64x32_c),
- make_tuple(&aom_highbd_masked_sad32x64_ssse3, &aom_highbd_masked_sad32x64_c),
- make_tuple(&aom_highbd_masked_sad32x32_ssse3, &aom_highbd_masked_sad32x32_c),
- make_tuple(&aom_highbd_masked_sad32x16_ssse3, &aom_highbd_masked_sad32x16_c),
- make_tuple(&aom_highbd_masked_sad16x32_ssse3, &aom_highbd_masked_sad16x32_c),
- make_tuple(&aom_highbd_masked_sad16x16_ssse3, &aom_highbd_masked_sad16x16_c),
- make_tuple(&aom_highbd_masked_sad16x8_ssse3, &aom_highbd_masked_sad16x8_c),
- make_tuple(&aom_highbd_masked_sad8x16_ssse3, &aom_highbd_masked_sad8x16_c),
- make_tuple(&aom_highbd_masked_sad8x8_ssse3, &aom_highbd_masked_sad8x8_c),
- make_tuple(&aom_highbd_masked_sad8x4_ssse3, &aom_highbd_masked_sad8x4_c),
- make_tuple(&aom_highbd_masked_sad4x8_ssse3, &aom_highbd_masked_sad4x8_c),
- make_tuple(&aom_highbd_masked_sad4x4_ssse3, &aom_highbd_masked_sad4x4_c)
+ make_tuple(&aom_highbd_masked_sad128x64_ssse3,
+ &aom_highbd_masked_sad128x64_c),
+ make_tuple(&aom_highbd_masked_sad128x128_ssse3,
+ &aom_highbd_masked_sad128x128_c),
+ make_tuple(&aom_highbd_masked_sad4x16_ssse3, &aom_highbd_masked_sad4x16_c),
+ make_tuple(&aom_highbd_masked_sad16x4_ssse3, &aom_highbd_masked_sad16x4_c),
+ make_tuple(&aom_highbd_masked_sad8x32_ssse3, &aom_highbd_masked_sad8x32_c),
+ make_tuple(&aom_highbd_masked_sad32x8_ssse3, &aom_highbd_masked_sad32x8_c),
+ make_tuple(&aom_highbd_masked_sad16x64_ssse3, &aom_highbd_masked_sad16x64_c),
+ make_tuple(&aom_highbd_masked_sad64x16_ssse3, &aom_highbd_masked_sad64x16_c),
};
-INSTANTIATE_TEST_CASE_P(SSSE3_C_COMPARE, HighbdMaskedSADTest,
+INSTANTIATE_TEST_CASE_P(SSSE3, HighbdMaskedSADTest,
::testing::ValuesIn(hbd_msad_test));
#endif // HAVE_SSSE3
+
+#if HAVE_AVX2
+const MaskedSADParam msad_avx2_test[] = {
+ make_tuple(&aom_masked_sad4x4_avx2, &aom_masked_sad4x4_ssse3),
+ make_tuple(&aom_masked_sad4x8_avx2, &aom_masked_sad4x8_ssse3),
+ make_tuple(&aom_masked_sad8x4_avx2, &aom_masked_sad8x4_ssse3),
+ make_tuple(&aom_masked_sad8x8_avx2, &aom_masked_sad8x8_ssse3),
+ make_tuple(&aom_masked_sad8x16_avx2, &aom_masked_sad8x16_ssse3),
+ make_tuple(&aom_masked_sad16x8_avx2, &aom_masked_sad16x8_ssse3),
+ make_tuple(&aom_masked_sad16x16_avx2, &aom_masked_sad16x16_ssse3),
+ make_tuple(&aom_masked_sad16x32_avx2, &aom_masked_sad16x32_ssse3),
+ make_tuple(&aom_masked_sad32x16_avx2, &aom_masked_sad32x16_ssse3),
+ make_tuple(&aom_masked_sad32x32_avx2, &aom_masked_sad32x32_ssse3),
+ make_tuple(&aom_masked_sad32x64_avx2, &aom_masked_sad32x64_ssse3),
+ make_tuple(&aom_masked_sad64x32_avx2, &aom_masked_sad64x32_ssse3),
+ make_tuple(&aom_masked_sad64x64_avx2, &aom_masked_sad64x64_ssse3),
+ make_tuple(&aom_masked_sad64x128_avx2, &aom_masked_sad64x128_ssse3),
+ make_tuple(&aom_masked_sad128x64_avx2, &aom_masked_sad128x64_ssse3),
+ make_tuple(&aom_masked_sad128x128_avx2, &aom_masked_sad128x128_ssse3),
+ make_tuple(&aom_masked_sad4x16_avx2, &aom_masked_sad4x16_ssse3),
+ make_tuple(&aom_masked_sad16x4_avx2, &aom_masked_sad16x4_ssse3),
+ make_tuple(&aom_masked_sad8x32_avx2, &aom_masked_sad8x32_ssse3),
+ make_tuple(&aom_masked_sad32x8_avx2, &aom_masked_sad32x8_ssse3),
+ make_tuple(&aom_masked_sad16x64_avx2, &aom_masked_sad16x64_ssse3),
+ make_tuple(&aom_masked_sad64x16_avx2, &aom_masked_sad64x16_ssse3)
+};
+
+INSTANTIATE_TEST_CASE_P(AVX2, MaskedSADTest,
+ ::testing::ValuesIn(msad_avx2_test));
+
+const HighbdMaskedSADParam hbd_msad_avx2_test[] = {
+ make_tuple(&aom_highbd_masked_sad4x4_avx2, &aom_highbd_masked_sad4x4_ssse3),
+ make_tuple(&aom_highbd_masked_sad4x8_avx2, &aom_highbd_masked_sad4x8_ssse3),
+ make_tuple(&aom_highbd_masked_sad8x4_avx2, &aom_highbd_masked_sad8x4_ssse3),
+ make_tuple(&aom_highbd_masked_sad8x8_avx2, &aom_highbd_masked_sad8x8_ssse3),
+ make_tuple(&aom_highbd_masked_sad8x16_avx2, &aom_highbd_masked_sad8x16_ssse3),
+ make_tuple(&aom_highbd_masked_sad16x8_avx2, &aom_highbd_masked_sad16x8_ssse3),
+ make_tuple(&aom_highbd_masked_sad16x16_avx2,
+ &aom_highbd_masked_sad16x16_ssse3),
+ make_tuple(&aom_highbd_masked_sad16x32_avx2,
+ &aom_highbd_masked_sad16x32_ssse3),
+ make_tuple(&aom_highbd_masked_sad32x16_avx2,
+ &aom_highbd_masked_sad32x16_ssse3),
+ make_tuple(&aom_highbd_masked_sad32x32_avx2,
+ &aom_highbd_masked_sad32x32_ssse3),
+ make_tuple(&aom_highbd_masked_sad32x64_avx2,
+ &aom_highbd_masked_sad32x64_ssse3),
+ make_tuple(&aom_highbd_masked_sad64x32_avx2,
+ &aom_highbd_masked_sad64x32_ssse3),
+ make_tuple(&aom_highbd_masked_sad64x64_avx2,
+ &aom_highbd_masked_sad64x64_ssse3),
+ make_tuple(&aom_highbd_masked_sad64x128_avx2,
+ &aom_highbd_masked_sad64x128_ssse3),
+ make_tuple(&aom_highbd_masked_sad128x64_avx2,
+ &aom_highbd_masked_sad128x64_ssse3),
+ make_tuple(&aom_highbd_masked_sad128x128_avx2,
+ &aom_highbd_masked_sad128x128_ssse3),
+ make_tuple(&aom_highbd_masked_sad4x16_avx2, &aom_highbd_masked_sad4x16_ssse3),
+ make_tuple(&aom_highbd_masked_sad16x4_avx2, &aom_highbd_masked_sad16x4_ssse3),
+ make_tuple(&aom_highbd_masked_sad8x32_avx2, &aom_highbd_masked_sad8x32_ssse3),
+ make_tuple(&aom_highbd_masked_sad32x8_avx2, &aom_highbd_masked_sad32x8_ssse3),
+ make_tuple(&aom_highbd_masked_sad16x64_avx2,
+ &aom_highbd_masked_sad16x64_ssse3),
+ make_tuple(&aom_highbd_masked_sad64x16_avx2,
+ &aom_highbd_masked_sad64x16_ssse3)
+};
+
+INSTANTIATE_TEST_CASE_P(AVX2, HighbdMaskedSADTest,
+ ::testing::ValuesIn(hbd_msad_avx2_test));
+#endif // HAVE_AVX2
+
} // namespace
diff --git a/third_party/aom/test/noise_model_test.cc b/third_party/aom/test/noise_model_test.cc
index 9b7fff8a2..b5b387e31 100644
--- a/third_party/aom/test/noise_model_test.cc
+++ b/third_party/aom/test/noise_model_test.cc
@@ -1,3 +1,14 @@
+/*
+ * Copyright (c) 2018, 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 <math.h>
#include <algorithm>
#include <vector>
diff --git a/third_party/aom/test/obmc_sad_test.cc b/third_party/aom/test/obmc_sad_test.cc
index 1820da266..6cef86961 100644
--- a/third_party/aom/test/obmc_sad_test.cc
+++ b/third_party/aom/test/obmc_sad_test.cc
@@ -108,6 +108,29 @@ INSTANTIATE_TEST_CASE_P(SSE4_1, ObmcSadTest,
::testing::ValuesIn(sse4_functions));
#endif // HAVE_SSE4_1
+#if HAVE_AVX2
+const ObmcSadTest::ParamType avx2_functions[] = {
+ TestFuncs(aom_obmc_sad128x128_c, aom_obmc_sad128x128_avx2),
+ TestFuncs(aom_obmc_sad128x64_c, aom_obmc_sad128x64_avx2),
+ TestFuncs(aom_obmc_sad64x128_c, aom_obmc_sad64x128_avx2),
+ TestFuncs(aom_obmc_sad64x64_c, aom_obmc_sad64x64_avx2),
+ TestFuncs(aom_obmc_sad64x32_c, aom_obmc_sad64x32_avx2),
+ TestFuncs(aom_obmc_sad32x64_c, aom_obmc_sad32x64_avx2),
+ TestFuncs(aom_obmc_sad32x32_c, aom_obmc_sad32x32_avx2),
+ TestFuncs(aom_obmc_sad32x16_c, aom_obmc_sad32x16_avx2),
+ TestFuncs(aom_obmc_sad16x32_c, aom_obmc_sad16x32_avx2),
+ TestFuncs(aom_obmc_sad16x16_c, aom_obmc_sad16x16_avx2),
+ TestFuncs(aom_obmc_sad16x8_c, aom_obmc_sad16x8_avx2),
+ TestFuncs(aom_obmc_sad8x16_c, aom_obmc_sad8x16_avx2),
+ TestFuncs(aom_obmc_sad8x8_c, aom_obmc_sad8x8_avx2),
+ TestFuncs(aom_obmc_sad8x4_c, aom_obmc_sad8x4_avx2),
+ TestFuncs(aom_obmc_sad4x8_c, aom_obmc_sad4x8_avx2),
+ TestFuncs(aom_obmc_sad4x4_c, aom_obmc_sad4x4_avx2)
+};
+
+INSTANTIATE_TEST_CASE_P(AVX2, ObmcSadTest, ::testing::ValuesIn(avx2_functions));
+#endif // HAVE_AVX2
+
////////////////////////////////////////////////////////////////////////////////
// High bit-depth
////////////////////////////////////////////////////////////////////////////////
@@ -187,4 +210,28 @@ ObmcSadHBDTest::ParamType sse4_functions_hbd[] = {
INSTANTIATE_TEST_CASE_P(SSE4_1, ObmcSadHBDTest,
::testing::ValuesIn(sse4_functions_hbd));
#endif // HAVE_SSE4_1
+
+#if HAVE_AVX2
+ObmcSadHBDTest::ParamType avx2_functions_hbd[] = {
+ TestFuncs(aom_highbd_obmc_sad128x128_c, aom_highbd_obmc_sad128x128_avx2),
+ TestFuncs(aom_highbd_obmc_sad128x64_c, aom_highbd_obmc_sad128x64_avx2),
+ TestFuncs(aom_highbd_obmc_sad64x128_c, aom_highbd_obmc_sad64x128_avx2),
+ TestFuncs(aom_highbd_obmc_sad64x64_c, aom_highbd_obmc_sad64x64_avx2),
+ TestFuncs(aom_highbd_obmc_sad64x32_c, aom_highbd_obmc_sad64x32_avx2),
+ TestFuncs(aom_highbd_obmc_sad32x64_c, aom_highbd_obmc_sad32x64_avx2),
+ TestFuncs(aom_highbd_obmc_sad32x32_c, aom_highbd_obmc_sad32x32_avx2),
+ TestFuncs(aom_highbd_obmc_sad32x16_c, aom_highbd_obmc_sad32x16_avx2),
+ TestFuncs(aom_highbd_obmc_sad16x32_c, aom_highbd_obmc_sad16x32_avx2),
+ TestFuncs(aom_highbd_obmc_sad16x16_c, aom_highbd_obmc_sad16x16_avx2),
+ TestFuncs(aom_highbd_obmc_sad16x8_c, aom_highbd_obmc_sad16x8_avx2),
+ TestFuncs(aom_highbd_obmc_sad8x16_c, aom_highbd_obmc_sad8x16_avx2),
+ TestFuncs(aom_highbd_obmc_sad8x8_c, aom_highbd_obmc_sad8x8_avx2),
+ TestFuncs(aom_highbd_obmc_sad8x4_c, aom_highbd_obmc_sad8x4_avx2),
+ TestFuncs(aom_highbd_obmc_sad4x8_c, aom_highbd_obmc_sad4x8_avx2),
+ TestFuncs(aom_highbd_obmc_sad4x4_c, aom_highbd_obmc_sad4x4_avx2)
+};
+
+INSTANTIATE_TEST_CASE_P(AVX2, ObmcSadHBDTest,
+ ::testing::ValuesIn(avx2_functions_hbd));
+#endif // HAVE_AVX2
} // namespace
diff --git a/third_party/aom/test/reconinter_test.cc b/third_party/aom/test/reconinter_test.cc
index 4f74c817e..9b849404c 100644
--- a/third_party/aom/test/reconinter_test.cc
+++ b/third_party/aom/test/reconinter_test.cc
@@ -28,12 +28,30 @@
namespace {
using libaom_test::ACMRandom;
-class BuildCompDiffwtdMaskTest : public ::testing::TestWithParam<int> {
+typedef void (*buildcompdiffwtdmaskd_func)(uint8_t *mask,
+ DIFFWTD_MASK_TYPE mask_type,
+ const uint8_t *src0, int src0_stride,
+ const uint8_t *src1, int src1_stride,
+ int h, int w);
+
+typedef ::testing::tuple<BLOCK_SIZE, buildcompdiffwtdmaskd_func>
+ BuildCompDiffwtdMaskDParam;
+
+#if HAVE_SSE4_1
+::testing::internal::ParamGenerator<BuildCompDiffwtdMaskDParam> BuildParams(
+ buildcompdiffwtdmaskd_func filter) {
+ return ::testing::Combine(::testing::Range(BLOCK_4X4, BLOCK_SIZES_ALL),
+ ::testing::Values(filter));
+}
+#endif
+
+class BuildCompDiffwtdMaskTest
+ : public ::testing::TestWithParam<BuildCompDiffwtdMaskDParam> {
public:
virtual ~BuildCompDiffwtdMaskTest() {}
virtual void TearDown() { libaom_test::ClearSystemState(); }
- void RunTest(const int sb_type, const int is_speed,
+ void RunTest(buildcompdiffwtdmaskd_func test_impl, const int is_speed,
const DIFFWTD_MASK_TYPE type);
private:
@@ -159,8 +177,10 @@ void BuildCompDiffwtdMaskD16Test::RunSpeedTest(
width, height, 1000.0 * elapsed_time1 / num_loops);
}
#if HAVE_SSE4_1
-void BuildCompDiffwtdMaskTest::RunTest(const int sb_type, const int is_speed,
+void BuildCompDiffwtdMaskTest::RunTest(buildcompdiffwtdmaskd_func test_impl,
+ const int is_speed,
const DIFFWTD_MASK_TYPE type) {
+ const int sb_type = GET_PARAM(0);
const int width = block_size_wide[sb_type];
const int height = block_size_high[sb_type];
DECLARE_ALIGNED(16, uint8_t, mask_ref[MAX_SB_SQUARE]);
@@ -182,8 +202,7 @@ void BuildCompDiffwtdMaskTest::RunTest(const int sb_type, const int is_speed,
const double t1 = get_time_mark(&timer);
aom_usec_timer_start(&timer);
for (int i = 0; i < run_times; ++i) {
- av1_build_compound_diffwtd_mask_sse4_1(mask_test, type, src0, width, src1,
- width, height, width);
+ test_impl(mask_test, type, src0, width, src1, width, height, width);
}
const double t2 = get_time_mark(&timer);
if (is_speed) {
@@ -200,12 +219,12 @@ void BuildCompDiffwtdMaskTest::RunTest(const int sb_type, const int is_speed,
}
TEST_P(BuildCompDiffwtdMaskTest, match) {
- RunTest(GetParam(), 0, DIFFWTD_38);
- RunTest(GetParam(), 0, DIFFWTD_38_INV);
+ RunTest(GET_PARAM(1), 0, DIFFWTD_38);
+ RunTest(GET_PARAM(1), 0, DIFFWTD_38_INV);
}
TEST_P(BuildCompDiffwtdMaskTest, DISABLED_Speed) {
- RunTest(GetParam(), 1, DIFFWTD_38);
- RunTest(GetParam(), 1, DIFFWTD_38_INV);
+ RunTest(GET_PARAM(1), 1, DIFFWTD_38);
+ RunTest(GET_PARAM(1), 1, DIFFWTD_38_INV);
}
#endif
TEST_P(BuildCompDiffwtdMaskD16Test, CheckOutput) {
@@ -218,8 +237,7 @@ TEST_P(BuildCompDiffwtdMaskD16Test, DISABLED_Speed) {
#if HAVE_SSE4_1
INSTANTIATE_TEST_CASE_P(SSE4_1, BuildCompDiffwtdMaskTest,
- ::testing::Range(0, static_cast<int>(BLOCK_SIZES_ALL),
- 1));
+ BuildParams(av1_build_compound_diffwtd_mask_sse4_1));
INSTANTIATE_TEST_CASE_P(
SSE4_1, BuildCompDiffwtdMaskD16Test,
diff --git a/third_party/aom/test/resize_test.cc b/third_party/aom/test/resize_test.cc
index e1c4e9fa5..b270b8362 100644
--- a/third_party/aom/test/resize_test.cc
+++ b/third_party/aom/test/resize_test.cc
@@ -546,12 +546,6 @@ TEST_P(ResizeRealtimeTest, DISABLED_TestInternalResizeDownUpChangeBitRate) {
#endif
}
-aom_img_fmt_t CspForFrameNumber(int frame) {
- if (frame < 10) return AOM_IMG_FMT_I420;
- if (frame < 20) return AOM_IMG_FMT_I444;
- return AOM_IMG_FMT_I420;
-}
-
class ResizeCspTest : public ResizeTest {
protected:
#if WRITE_COMPRESSED_STREAM
@@ -580,20 +574,6 @@ class ResizeCspTest : public ResizeTest {
#endif
}
- virtual void PreEncodeFrameHook(libaom_test::VideoSource *video,
- libaom_test::Encoder *encoder) {
- if (CspForFrameNumber(video->frame()) != AOM_IMG_FMT_I420 &&
- cfg_.g_profile != 1) {
- cfg_.g_profile = 1;
- encoder->Config(&cfg_);
- }
- if (CspForFrameNumber(video->frame()) == AOM_IMG_FMT_I420 &&
- cfg_.g_profile != 0) {
- cfg_.g_profile = 0;
- encoder->Config(&cfg_);
- }
- }
-
virtual void PSNRPktHook(const aom_codec_cx_pkt_t *pkt) {
if (frame0_psnr_ == 0.) frame0_psnr_ = pkt->data.psnr.psnr[0];
EXPECT_NEAR(pkt->data.psnr.psnr[0], frame0_psnr_, 2.0);
@@ -621,19 +601,13 @@ class ResizeCspTest : public ResizeTest {
class ResizingCspVideoSource : public ::libaom_test::DummyVideoSource {
public:
- ResizingCspVideoSource() {
+ explicit ResizingCspVideoSource(aom_img_fmt_t image_format) {
SetSize(kInitialWidth, kInitialHeight);
+ SetImageFormat(image_format);
limit_ = 30;
}
virtual ~ResizingCspVideoSource() {}
-
- protected:
- virtual void Next() {
- ++frame_;
- SetImageFormat(CspForFrameNumber(frame_));
- FillFrame();
- }
};
#if (defined(DISABLE_TRELLISQ_SEARCH) && DISABLE_TRELLISQ_SEARCH)
@@ -641,14 +615,19 @@ TEST_P(ResizeCspTest, DISABLED_TestResizeCspWorks) {
#else
TEST_P(ResizeCspTest, TestResizeCspWorks) {
#endif
- ResizingCspVideoSource video;
- init_flags_ = AOM_CODEC_USE_PSNR;
- cfg_.rc_min_quantizer = cfg_.rc_max_quantizer = 48;
- cfg_.g_lag_in_frames = 0;
- ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
+ const aom_img_fmt_t image_formats[] = { AOM_IMG_FMT_I420, AOM_IMG_FMT_I444 };
+ for (size_t i = 0; i < GTEST_ARRAY_SIZE_(image_formats); ++i) {
+ ResizingCspVideoSource video(image_formats[i]);
+ init_flags_ = AOM_CODEC_USE_PSNR;
+ cfg_.rc_min_quantizer = cfg_.rc_max_quantizer = 48;
+ cfg_.g_lag_in_frames = 0;
+ cfg_.g_profile = (image_formats[i] == AOM_IMG_FMT_I420) ? 0 : 1;
+ ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
- // Check we decoded the same number of frames as we attempted to encode
- ASSERT_EQ(frame_info_list_.size(), video.limit());
+ // Check we decoded the same number of frames as we attempted to encode
+ ASSERT_EQ(frame_info_list_.size(), video.limit());
+ frame_info_list_.clear();
+ }
}
AV1_INSTANTIATE_TEST_CASE(ResizeTest,
diff --git a/third_party/aom/test/selfguided_filter_test.cc b/third_party/aom/test/selfguided_filter_test.cc
index 4506a90db..d2d5c6105 100644
--- a/third_party/aom/test/selfguided_filter_test.cc
+++ b/third_party/aom/test/selfguided_filter_test.cc
@@ -208,6 +208,11 @@ INSTANTIATE_TEST_CASE_P(AVX2, AV1SelfguidedFilterTest,
::testing::Values(apply_selfguided_restoration_avx2));
#endif
+#if HAVE_NEON
+INSTANTIATE_TEST_CASE_P(NEON, AV1SelfguidedFilterTest,
+ ::testing::Values(apply_selfguided_restoration_neon));
+#endif
+
// Test parameter list:
// <tst_fun_, bit_depth>
typedef tuple<SgrFunc, int> HighbdFilterTestParam;
@@ -395,5 +400,11 @@ INSTANTIATE_TEST_CASE_P(
::testing::Combine(::testing::Values(apply_selfguided_restoration_avx2),
::testing::ValuesIn(highbd_params_avx2)));
#endif
-
+#if HAVE_NEON
+const int highbd_params_neon[] = { 8, 10, 12 };
+INSTANTIATE_TEST_CASE_P(
+ NEON, AV1HighbdSelfguidedFilterTest,
+ ::testing::Combine(::testing::Values(apply_selfguided_restoration_neon),
+ ::testing::ValuesIn(highbd_params_neon)));
+#endif
} // namespace
diff --git a/third_party/aom/test/test-data.sha1 b/third_party/aom/test/test-data.sha1
index 67aeb5208..723e06104 100644
--- a/third_party/aom/test/test-data.sha1
+++ b/third_party/aom/test/test-data.sha1
@@ -356,4 +356,134 @@ c8baedb48fd5d4c956aa8d73fd957370f718f047 *av1-1-b8-01-size-208x226.ivf.md5
25a4940922761239809d82c45c2be1c5e4f48785 *av1-1-b8-01-size-224x226.ivf
87ae7e7558241bf3575a333f56fbad4dfdade8ff *av1-1-b8-01-size-224x226.ivf.md5
40dd208eb525cd90d7c0674cf787097fb909afae *av1-1-b8-01-size-226x226.ivf
-34bdef682a4eae0e0a05e4486a968af1df8b220a *av1-1-b8-01-size-226x226.ivf.md5 \ No newline at end of file
+34bdef682a4eae0e0a05e4486a968af1df8b220a *av1-1-b8-01-size-226x226.ivf.md5
+9bbe8499796aa588ff02e313fb0d4349940d2fea *av1-1-b10-00-quantizer-00.ivf
+36b402eedad2bacee8ac09acce44e2fc356dd80b *av1-1-b10-00-quantizer-00.ivf.md5
+1d5e1d2827624f328020bf123df213bb175577e0 *av1-1-b10-00-quantizer-01.ivf
+16c529be5502369e43ce9c6fe99a9709968e3daf *av1-1-b10-00-quantizer-01.ivf.md5
+39abc20739242a8f05efd4b35d7603c8ad7ff45d *av1-1-b10-00-quantizer-02.ivf
+81faa72c3d43b003966fe09ffaae51b07b1059be *av1-1-b10-00-quantizer-02.ivf.md5
+92ebf349b803333a43824a83d997b8cf76f656f9 *av1-1-b10-00-quantizer-03.ivf
+5e7556dc998cb8b506a43cc078e30802d7e600e6 *av1-1-b10-00-quantizer-03.ivf.md5
+1c496177c66e49f2e3556af87ec67afb5060170b *av1-1-b10-00-quantizer-04.ivf
+560fea4800a44fe19ed8d3e74f425bdbf1fb8abd *av1-1-b10-00-quantizer-04.ivf.md5
+7de864b8475ce0acd0ecb01827f2c9add815352b *av1-1-b10-00-quantizer-05.ivf
+1c1aea3db3f54a91866d89fd3b1a0d285ca10310 *av1-1-b10-00-quantizer-05.ivf.md5
+b6501c165619b036d0f7864fd4739973d2d18970 *av1-1-b10-00-quantizer-06.ivf
+d758c8eff275651006c41e7dd447cac13b489ad7 *av1-1-b10-00-quantizer-06.ivf.md5
+e4df6f588f156dffaafd9517b64f753cfc9ccf05 *av1-1-b10-00-quantizer-07.ivf
+3c577f67dade4537de642fd457ea2b367424f336 *av1-1-b10-00-quantizer-07.ivf.md5
+07e9c4c18abb36c8699c1c12bebcc727f090b525 *av1-1-b10-00-quantizer-08.ivf
+4981568ade3170f311cb114fa2689edc4bc35e67 *av1-1-b10-00-quantizer-08.ivf.md5
+2268ecd2899f1b41ae9898925b1d62cfefa30282 *av1-1-b10-00-quantizer-09.ivf
+029b03029b65b7c4c208961f0820467ad42fd3d6 *av1-1-b10-00-quantizer-09.ivf.md5
+3d2adaf6441cfa9585dcbf7d19d65bf6992a29a3 *av1-1-b10-00-quantizer-10.ivf
+017b7fb4c3ba0747c2d5688d493da33ef993d110 *av1-1-b10-00-quantizer-10.ivf.md5
+006535760bd7dc1cfc95e648b05215954a2e76c2 *av1-1-b10-00-quantizer-11.ivf
+c0ae083deb8e820aa49034af4d100944dd977018 *av1-1-b10-00-quantizer-11.ivf.md5
+840e0cbfe1acc8a7a45c823dc55ab44a0b6b553e *av1-1-b10-00-quantizer-12.ivf
+49232ea38bdef650c94808f53834f1137cd4bf39 *av1-1-b10-00-quantizer-12.ivf.md5
+04b0e5a7387e07474f51be4b2c3e05211b40f0d0 *av1-1-b10-00-quantizer-13.ivf
+a51b5ec4b890df3a64f9f0d866b8c41296c9e081 *av1-1-b10-00-quantizer-13.ivf.md5
+5dc47a140fbcbf08bf91481ee3585e9e067561ab *av1-1-b10-00-quantizer-14.ivf
+2625319eef69d6225e6ab6e5ce7790491406cb5d *av1-1-b10-00-quantizer-14.ivf.md5
+f866be86d8d8aa08ded30e42988b0936c1a16064 *av1-1-b10-00-quantizer-15.ivf
+03b7c1eefb54d99e30051c7123c0453f04a6579d *av1-1-b10-00-quantizer-15.ivf.md5
+548df2371dfb485419ed9baf28e3f495c64f364a *av1-1-b10-00-quantizer-16.ivf
+8a0d6bf1626b05b65c77331305414fe9be54e8c6 *av1-1-b10-00-quantizer-16.ivf.md5
+0077c82f96a2e095a3cb8de9bfa63715e3c9f438 *av1-1-b10-00-quantizer-17.ivf
+5d85f77f3087f4b206930722a945c60039262be4 *av1-1-b10-00-quantizer-17.ivf.md5
+1e0f1245ecb4c903b5dc7072d959fc43a7bba381 *av1-1-b10-00-quantizer-18.ivf
+06316ae2b45f2359a70cc3855ffd6ab81048b41a *av1-1-b10-00-quantizer-18.ivf.md5
+f197198f7ec058110185fda5297a1a43993654df *av1-1-b10-00-quantizer-19.ivf
+bac522c7f234d506c75b5495d74b3fa57c83a4df *av1-1-b10-00-quantizer-19.ivf.md5
+c2f57324d000b349323f37d5ebebde8c2b861f30 *av1-1-b10-00-quantizer-20.ivf
+999c6110786cbc25e67792234a5a02f2cb4553c7 *av1-1-b10-00-quantizer-20.ivf.md5
+2ffad9adfd19286fe2166ba877289d201c9a634f *av1-1-b10-00-quantizer-21.ivf
+d55713eaa791cfd7bf69b6c26d5032029d9a0f06 *av1-1-b10-00-quantizer-21.ivf.md5
+382528db53328c1a38976f5d9b579eef35d839f4 *av1-1-b10-00-quantizer-22.ivf
+cb5bd459e1a90126da9264cff4281515f95755b2 *av1-1-b10-00-quantizer-22.ivf.md5
+b52cc6160fc66f72ad66c198d275a1c73f925022 *av1-1-b10-00-quantizer-23.ivf
+c0f9d6659e1f283e9356fd7b4ac9f7cc5544cdc2 *av1-1-b10-00-quantizer-23.ivf.md5
+e11f15e3b63e7606b1122bb3670ee77c09c04840 *av1-1-b10-00-quantizer-24.ivf
+e9f141b924440e044270c81a68458fe498599a8e *av1-1-b10-00-quantizer-24.ivf.md5
+fb91793b69824c99b0218788dcea0a74ebd7e84e *av1-1-b10-00-quantizer-25.ivf
+434e33d609b2683c3cfbcc3a2cdfc26339590fb6 *av1-1-b10-00-quantizer-25.ivf.md5
+d82e38f31cdcf8b43479e6ddaa83373de38f70a2 *av1-1-b10-00-quantizer-26.ivf
+183943b851ba383a536f13c83b93f61ac8961ad5 *av1-1-b10-00-quantizer-26.ivf.md5
+6bf5e4e8e0aca699e493b9eb3672d2117494d74d *av1-1-b10-00-quantizer-27.ivf
+f0fb7e0a99180828b0e38b2cfe0622eecc2d26b8 *av1-1-b10-00-quantizer-27.ivf.md5
+d5adee2567544c3ae4223b3f3528a770377878d2 *av1-1-b10-00-quantizer-28.ivf
+14edf588efc67570e529b0ff8aeb8e7a0c69238b *av1-1-b10-00-quantizer-28.ivf.md5
+e6dcdc106847956035e3f00aabf4470f97e1887e *av1-1-b10-00-quantizer-29.ivf
+413c5cb778611c7c1a810b53861b9ab1fb391f17 *av1-1-b10-00-quantizer-29.ivf.md5
+b5e98b3f6b1db04d46bf43064c6ac64f797aff00 *av1-1-b10-00-quantizer-30.ivf
+d1a603661d76c28658c7cd2892b408e91d77893e *av1-1-b10-00-quantizer-30.ivf.md5
+80168371d1150e82e3f46bcbbcabba458b835b19 *av1-1-b10-00-quantizer-31.ivf
+904ecd033d4af5239c4d5b3f86e51ed5c3c2e3fb *av1-1-b10-00-quantizer-31.ivf.md5
+96291f6ace85980892d135a5b74188cd629c325f *av1-1-b10-00-quantizer-32.ivf
+a5ceace390d4a75d48281fe29060c21557e4f5ae *av1-1-b10-00-quantizer-32.ivf.md5
+0f80495de34eae07c4905b72573a315a879390ec *av1-1-b10-00-quantizer-33.ivf
+72b8f662973a660412946687dff878b276ae518e *av1-1-b10-00-quantizer-33.ivf.md5
+24905e3be7db320994b7fb8311dfd50a7c9e54da *av1-1-b10-00-quantizer-34.ivf
+cea514bb1b7b064c4d31914a2cb266611c278577 *av1-1-b10-00-quantizer-34.ivf.md5
+083012960dd7c17d3b00fa0e807759c98faded8f *av1-1-b10-00-quantizer-35.ivf
+de5fdb9e1e581484af1cc7d2dd3c3e84c90cebb2 *av1-1-b10-00-quantizer-35.ivf.md5
+f725f179aeee5b413620c0dd81b007b245c2a7ed *av1-1-b10-00-quantizer-36.ivf
+246b1931c04c02df1f168090e2650827cd5dbabd *av1-1-b10-00-quantizer-36.ivf.md5
+f6aa824156e9848f237481889a8103eb6130f31d *av1-1-b10-00-quantizer-37.ivf
+a8f78dd15fc2994369a08c2ddddcd0760c62ea5b *av1-1-b10-00-quantizer-37.ivf.md5
+a8dd662338c493aea266b99203e70af25982633f *av1-1-b10-00-quantizer-38.ivf
+09f36d998e85d0450060f540e50b075ae1432fc6 *av1-1-b10-00-quantizer-38.ivf.md5
+d97428871720ed658da6ed0e3f7c15da83387e4c *av1-1-b10-00-quantizer-39.ivf
+8c5230048909ee8f86f87c116f153cd910d0141f *av1-1-b10-00-quantizer-39.ivf.md5
+86e754e55e9b63c6e0a4fef01761414f8a6b61ca *av1-1-b10-00-quantizer-40.ivf
+99a71accf6457264e45ca80d3b1f082ee5acdecc *av1-1-b10-00-quantizer-40.ivf.md5
+9d18b7236506ab7e107c062620b64096ec0cf423 *av1-1-b10-00-quantizer-41.ivf
+5771159a9a7c7b66c9e13bb13ec3d53b37860208 *av1-1-b10-00-quantizer-41.ivf.md5
+54b72bc879a80e66613f421e67db62bba1c0041b *av1-1-b10-00-quantizer-42.ivf
+bf958236883ee7209ef4cb0b7503b430634a291e *av1-1-b10-00-quantizer-42.ivf.md5
+a06d5321a51d90404dd7085ae511d7df5d5e1e05 *av1-1-b10-00-quantizer-43.ivf
+ddb25723d976043d863634b9dc3b5fb84a245803 *av1-1-b10-00-quantizer-43.ivf.md5
+2ea0b64c170d7299dae1c14a8a49349aee8e0d08 *av1-1-b10-00-quantizer-44.ivf
+d18bde1b4893792173fa2014665e9364395ad5e9 *av1-1-b10-00-quantizer-44.ivf.md5
+73e506a32d3518e23424f231c7b5323d7a34a3d6 *av1-1-b10-00-quantizer-45.ivf
+be6224ebc77a3e5fb9c1645b876007e584a09d89 *av1-1-b10-00-quantizer-45.ivf.md5
+841223871374464194edc739c48dc7cefd1ff255 *av1-1-b10-00-quantizer-46.ivf
+4766d616f923496a8dc113c9b7f875f0c0735f9a *av1-1-b10-00-quantizer-46.ivf.md5
+8bbbbea130aaea453f7b826956a5520d10a0eccf *av1-1-b10-00-quantizer-47.ivf
+3ea21fac0c492b03d8ec25e4ee0971cd57e5f71a *av1-1-b10-00-quantizer-47.ivf.md5
+3ce83e0f1e1835b9a6c10fe502a16fd3650839e0 *av1-1-b10-00-quantizer-48.ivf
+b468de2c09fca5a6b2bb7a20bab4afd8d192c31d *av1-1-b10-00-quantizer-48.ivf.md5
+f3a757c678aa00f9a9c4c4658d37733fd935925a *av1-1-b10-00-quantizer-49.ivf
+f888dc88db576122695d4eb41c486aacd28a2d1d *av1-1-b10-00-quantizer-49.ivf.md5
+a9d78aaef105cc5a95b7ebb54783f37e75673123 *av1-1-b10-00-quantizer-50.ivf
+06d0c5e79cc794030c4be022089b1d12c1383f71 *av1-1-b10-00-quantizer-50.ivf.md5
+165c20ee372f83682d094541097e375227353239 *av1-1-b10-00-quantizer-51.ivf
+b3d90214b8c6e6f6d9357bb5784d10081325c356 *av1-1-b10-00-quantizer-51.ivf.md5
+5b3ea7a18654d943065f5c176974c3960b56664e *av1-1-b10-00-quantizer-52.ivf
+dc61a6e4e2549074130023b14b137fb4fe442ce3 *av1-1-b10-00-quantizer-52.ivf.md5
+74c3b5851b6a94d33b575a689eb8d34592e95d5f *av1-1-b10-00-quantizer-53.ivf
+a80e43a0fb2b852426bd941b8d4b8f56690e9bc9 *av1-1-b10-00-quantizer-53.ivf.md5
+d05b8dea2cddd4f0d9e792f42f71afbd29f7811c *av1-1-b10-00-quantizer-54.ivf
+432937893321f4bd25fa400b8988c5788cb06ecf *av1-1-b10-00-quantizer-54.ivf.md5
+4eaee0f1970426be0bbeb7d4fccdc7e804e9bea4 *av1-1-b10-00-quantizer-55.ivf
+710ab95ce1dcd2540db4477ff4ee6ab771fe0759 *av1-1-b10-00-quantizer-55.ivf.md5
+fe637930c9faa8744cba37effc4cb5510315d1c0 *av1-1-b10-00-quantizer-56.ivf
+2f9431b30523fb6a3e4122f22c6c3ff7b96a7987 *av1-1-b10-00-quantizer-56.ivf.md5
+ed54fc7fcec194eef1f50adbbe12a6a36ab6836b *av1-1-b10-00-quantizer-57.ivf
+43bccac7800b399210cf15520a83739c23a5d9c7 *av1-1-b10-00-quantizer-57.ivf.md5
+a7b8d628ba3e4c5f37aa6a3d7b82afda73ac89dc *av1-1-b10-00-quantizer-58.ivf
+b26638272b787df54f45a46629b852acbcb73e3d *av1-1-b10-00-quantizer-58.ivf.md5
+c077f22ff547fb5ffd020e8dac91d05942fb52df *av1-1-b10-00-quantizer-59.ivf
+4efd99cc0891bf345b8cd2ae8e21709d61be497b *av1-1-b10-00-quantizer-59.ivf.md5
+301ab53039d75e1ffa8cc6a0874d9ea94e4a6a0d *av1-1-b10-00-quantizer-60.ivf
+4729bd734a6edd2d8d0432a3f66b3d91d565050e *av1-1-b10-00-quantizer-60.ivf.md5
+c78640d3211034df9fcb273bdfc18625819652f2 *av1-1-b10-00-quantizer-61.ivf
+3d823eb2b33ccfea68db506626bcbecf49b0f167 *av1-1-b10-00-quantizer-61.ivf.md5
+bf241a449a28773b93e6e529a06dfc28109577e4 *av1-1-b10-00-quantizer-62.ivf
+75457d8476f1927f737d089dcf3d0f7f99f3c4fb *av1-1-b10-00-quantizer-62.ivf.md5
+8b6eb3fff2e0db7eac775b08c745250ca591e2d9 *av1-1-b10-00-quantizer-63.ivf
+63ea689d025593e5d91760785b8e446d04d4671e *av1-1-b10-00-quantizer-63.ivf.md5
+a9f7ea6312a533cc6426a6145edd190d45813c37 *av1-1-b8-02-allintra.ivf
+8fd8f789cfee1069d20f3e2c241f5cad7292239e *av1-1-b8-02-allintra.ivf.md5 \ No newline at end of file
diff --git a/third_party/aom/test/test.cmake b/third_party/aom/test/test.cmake
index 8594d059c..7b584880f 100644
--- a/third_party/aom/test/test.cmake
+++ b/third_party/aom/test/test.cmake
@@ -405,7 +405,7 @@ function(setup_aom_test_targets)
OR (CONFIG_AV1_DECODER AND "${var}" MATCHES "_TEST_DECODER_"))
list(APPEND aom_test_source_vars ${var})
endif()
- # cmake-format:on
+ # cmake-format: on
endforeach()
# Libaom_test_srcs.txt generation.
diff --git a/third_party/aom/test/test_data_util.cmake b/third_party/aom/test/test_data_util.cmake
index bbdd5f4a2..9fe00a07d 100644
--- a/third_party/aom/test/test_data_util.cmake
+++ b/third_party/aom/test/test_data_util.cmake
@@ -165,6 +165,134 @@ if(CONFIG_AV1_DECODER)
"av1-1-b8-00-quantizer-62.ivf.md5"
"av1-1-b8-00-quantizer-63.ivf"
"av1-1-b8-00-quantizer-63.ivf.md5"
+ "av1-1-b10-00-quantizer-00.ivf"
+ "av1-1-b10-00-quantizer-00.ivf.md5"
+ "av1-1-b10-00-quantizer-01.ivf"
+ "av1-1-b10-00-quantizer-01.ivf.md5"
+ "av1-1-b10-00-quantizer-02.ivf"
+ "av1-1-b10-00-quantizer-02.ivf.md5"
+ "av1-1-b10-00-quantizer-03.ivf"
+ "av1-1-b10-00-quantizer-03.ivf.md5"
+ "av1-1-b10-00-quantizer-04.ivf"
+ "av1-1-b10-00-quantizer-04.ivf.md5"
+ "av1-1-b10-00-quantizer-05.ivf"
+ "av1-1-b10-00-quantizer-05.ivf.md5"
+ "av1-1-b10-00-quantizer-06.ivf"
+ "av1-1-b10-00-quantizer-06.ivf.md5"
+ "av1-1-b10-00-quantizer-07.ivf"
+ "av1-1-b10-00-quantizer-07.ivf.md5"
+ "av1-1-b10-00-quantizer-08.ivf"
+ "av1-1-b10-00-quantizer-08.ivf.md5"
+ "av1-1-b10-00-quantizer-09.ivf"
+ "av1-1-b10-00-quantizer-09.ivf.md5"
+ "av1-1-b10-00-quantizer-10.ivf"
+ "av1-1-b10-00-quantizer-10.ivf.md5"
+ "av1-1-b10-00-quantizer-11.ivf"
+ "av1-1-b10-00-quantizer-11.ivf.md5"
+ "av1-1-b10-00-quantizer-12.ivf"
+ "av1-1-b10-00-quantizer-12.ivf.md5"
+ "av1-1-b10-00-quantizer-13.ivf"
+ "av1-1-b10-00-quantizer-13.ivf.md5"
+ "av1-1-b10-00-quantizer-14.ivf"
+ "av1-1-b10-00-quantizer-14.ivf.md5"
+ "av1-1-b10-00-quantizer-15.ivf"
+ "av1-1-b10-00-quantizer-15.ivf.md5"
+ "av1-1-b10-00-quantizer-16.ivf"
+ "av1-1-b10-00-quantizer-16.ivf.md5"
+ "av1-1-b10-00-quantizer-17.ivf"
+ "av1-1-b10-00-quantizer-17.ivf.md5"
+ "av1-1-b10-00-quantizer-18.ivf"
+ "av1-1-b10-00-quantizer-18.ivf.md5"
+ "av1-1-b10-00-quantizer-19.ivf"
+ "av1-1-b10-00-quantizer-19.ivf.md5"
+ "av1-1-b10-00-quantizer-20.ivf"
+ "av1-1-b10-00-quantizer-20.ivf.md5"
+ "av1-1-b10-00-quantizer-21.ivf"
+ "av1-1-b10-00-quantizer-21.ivf.md5"
+ "av1-1-b10-00-quantizer-22.ivf"
+ "av1-1-b10-00-quantizer-22.ivf.md5"
+ "av1-1-b10-00-quantizer-23.ivf"
+ "av1-1-b10-00-quantizer-23.ivf.md5"
+ "av1-1-b10-00-quantizer-24.ivf"
+ "av1-1-b10-00-quantizer-24.ivf.md5"
+ "av1-1-b10-00-quantizer-25.ivf"
+ "av1-1-b10-00-quantizer-25.ivf.md5"
+ "av1-1-b10-00-quantizer-26.ivf"
+ "av1-1-b10-00-quantizer-26.ivf.md5"
+ "av1-1-b10-00-quantizer-27.ivf"
+ "av1-1-b10-00-quantizer-27.ivf.md5"
+ "av1-1-b10-00-quantizer-28.ivf"
+ "av1-1-b10-00-quantizer-28.ivf.md5"
+ "av1-1-b10-00-quantizer-29.ivf"
+ "av1-1-b10-00-quantizer-29.ivf.md5"
+ "av1-1-b10-00-quantizer-30.ivf"
+ "av1-1-b10-00-quantizer-30.ivf.md5"
+ "av1-1-b10-00-quantizer-31.ivf"
+ "av1-1-b10-00-quantizer-31.ivf.md5"
+ "av1-1-b10-00-quantizer-32.ivf"
+ "av1-1-b10-00-quantizer-32.ivf.md5"
+ "av1-1-b10-00-quantizer-33.ivf"
+ "av1-1-b10-00-quantizer-33.ivf.md5"
+ "av1-1-b10-00-quantizer-34.ivf"
+ "av1-1-b10-00-quantizer-34.ivf.md5"
+ "av1-1-b10-00-quantizer-35.ivf"
+ "av1-1-b10-00-quantizer-35.ivf.md5"
+ "av1-1-b10-00-quantizer-36.ivf"
+ "av1-1-b10-00-quantizer-36.ivf.md5"
+ "av1-1-b10-00-quantizer-37.ivf"
+ "av1-1-b10-00-quantizer-37.ivf.md5"
+ "av1-1-b10-00-quantizer-38.ivf"
+ "av1-1-b10-00-quantizer-38.ivf.md5"
+ "av1-1-b10-00-quantizer-39.ivf"
+ "av1-1-b10-00-quantizer-39.ivf.md5"
+ "av1-1-b10-00-quantizer-40.ivf"
+ "av1-1-b10-00-quantizer-40.ivf.md5"
+ "av1-1-b10-00-quantizer-41.ivf"
+ "av1-1-b10-00-quantizer-41.ivf.md5"
+ "av1-1-b10-00-quantizer-42.ivf"
+ "av1-1-b10-00-quantizer-42.ivf.md5"
+ "av1-1-b10-00-quantizer-43.ivf"
+ "av1-1-b10-00-quantizer-43.ivf.md5"
+ "av1-1-b10-00-quantizer-44.ivf"
+ "av1-1-b10-00-quantizer-44.ivf.md5"
+ "av1-1-b10-00-quantizer-45.ivf"
+ "av1-1-b10-00-quantizer-45.ivf.md5"
+ "av1-1-b10-00-quantizer-46.ivf"
+ "av1-1-b10-00-quantizer-46.ivf.md5"
+ "av1-1-b10-00-quantizer-47.ivf"
+ "av1-1-b10-00-quantizer-47.ivf.md5"
+ "av1-1-b10-00-quantizer-48.ivf"
+ "av1-1-b10-00-quantizer-48.ivf.md5"
+ "av1-1-b10-00-quantizer-49.ivf"
+ "av1-1-b10-00-quantizer-49.ivf.md5"
+ "av1-1-b10-00-quantizer-50.ivf"
+ "av1-1-b10-00-quantizer-50.ivf.md5"
+ "av1-1-b10-00-quantizer-51.ivf"
+ "av1-1-b10-00-quantizer-51.ivf.md5"
+ "av1-1-b10-00-quantizer-52.ivf"
+ "av1-1-b10-00-quantizer-52.ivf.md5"
+ "av1-1-b10-00-quantizer-53.ivf"
+ "av1-1-b10-00-quantizer-53.ivf.md5"
+ "av1-1-b10-00-quantizer-54.ivf"
+ "av1-1-b10-00-quantizer-54.ivf.md5"
+ "av1-1-b10-00-quantizer-55.ivf"
+ "av1-1-b10-00-quantizer-55.ivf.md5"
+ "av1-1-b10-00-quantizer-56.ivf"
+ "av1-1-b10-00-quantizer-56.ivf.md5"
+ "av1-1-b10-00-quantizer-57.ivf"
+ "av1-1-b10-00-quantizer-57.ivf.md5"
+ "av1-1-b10-00-quantizer-58.ivf"
+ "av1-1-b10-00-quantizer-58.ivf.md5"
+ "av1-1-b10-00-quantizer-59.ivf"
+ "av1-1-b10-00-quantizer-59.ivf.md5"
+ "av1-1-b10-00-quantizer-60.ivf"
+ "av1-1-b10-00-quantizer-60.ivf.md5"
+ "av1-1-b10-00-quantizer-61.ivf"
+ "av1-1-b10-00-quantizer-61.ivf.md5"
+ "av1-1-b10-00-quantizer-62.ivf"
+ "av1-1-b10-00-quantizer-62.ivf.md5"
+ "av1-1-b10-00-quantizer-63.ivf"
+ "av1-1-b10-00-quantizer-63.ivf.md5"
"av1-1-b8-01-size-16x16.ivf"
"av1-1-b8-01-size-16x16.ivf.md5"
"av1-1-b8-01-size-16x18.ivf"
@@ -364,7 +492,9 @@ if(CONFIG_AV1_DECODER)
"av1-1-b8-01-size-66x64.ivf"
"av1-1-b8-01-size-66x64.ivf.md5"
"av1-1-b8-01-size-66x66.ivf"
- "av1-1-b8-01-size-66x66.ivf.md5")
+ "av1-1-b8-01-size-66x66.ivf.md5"
+ "av1-1-b8-02-allintra.ivf"
+ "av1-1-b8-02-allintra.ivf.md5")
endif()
if(ENABLE_ENCODE_PERF_TESTS AND CONFIG_AV1_ENCODER)
diff --git a/third_party/aom/test/test_vector_test.cc b/third_party/aom/test/test_vector_test.cc
index 85223177c..1bfeacba1 100644
--- a/third_party/aom/test/test_vector_test.cc
+++ b/third_party/aom/test/test_vector_test.cc
@@ -30,8 +30,9 @@ namespace {
const int kThreads = 0;
const int kFileName = 1;
+const int kRowMT = 2;
-typedef ::testing::tuple<int, const char *> DecodeParam;
+typedef ::testing::tuple<int, const char *, int> DecodeParam;
class TestVectorTest : public ::libaom_test::DecoderTest,
public ::libaom_test::CodecTestWithParam<DecodeParam> {
@@ -48,6 +49,12 @@ class TestVectorTest : public ::libaom_test::DecoderTest,
<< "Md5 file open failed. Filename: " << md5_file_name_;
}
+ virtual void PreDecodeFrameHook(
+ const libaom_test::CompressedVideoSource &video,
+ libaom_test::Decoder *decoder) {
+ if (video.frame_number() == 0) decoder->Control(AV1D_SET_ROW_MT, row_mt_);
+ }
+
virtual void DecompressedFrameHook(const aom_image_t &img,
const unsigned int frame_number) {
ASSERT_TRUE(md5_file_ != NULL);
@@ -60,14 +67,32 @@ class TestVectorTest : public ::libaom_test::DecoderTest,
expected_md5[32] = '\0';
::libaom_test::MD5 md5_res;
- md5_res.Add(&img);
- const char *actual_md5 = md5_res.Get();
+#if !CONFIG_LOWBITDEPTH
+ const aom_img_fmt_t shifted_fmt =
+ (aom_img_fmt)(img.fmt & ~AOM_IMG_FMT_HIGHBITDEPTH);
+ if (img.bit_depth == 8 && shifted_fmt != img.fmt) {
+ aom_image_t *img_shifted =
+ aom_img_alloc(NULL, shifted_fmt, img.d_w, img.d_h, 16);
+ img_shifted->bit_depth = img.bit_depth;
+ img_shifted->monochrome = img.monochrome;
+ aom_img_downshift(img_shifted, &img, 0);
+ md5_res.Add(img_shifted);
+ aom_img_free(img_shifted);
+ } else {
+#endif
+ md5_res.Add(&img);
+#if !CONFIG_LOWBITDEPTH
+ }
+#endif
+ const char *actual_md5 = md5_res.Get();
// Check md5 match.
ASSERT_STREQ(expected_md5, actual_md5)
<< "Md5 checksums don't match: frame number = " << frame_number;
}
+ unsigned int row_mt_;
+
private:
FILE *md5_file_;
};
@@ -84,6 +109,7 @@ TEST_P(TestVectorTest, MD5Match) {
char str[256];
cfg.threads = ::testing::get<kThreads>(input);
+ row_mt_ = ::testing::get<kRowMT>(input);
snprintf(str, sizeof(str) / sizeof(str[0]) - 1, "file: %s threads: %d",
filename.c_str(), cfg.threads);
@@ -118,17 +144,14 @@ TEST_P(TestVectorTest, MD5Match) {
ASSERT_NO_FATAL_FAILURE(RunLoop(video.get(), cfg));
}
-// TODO(yaowu): Current md5 check works only when CONFIG_LOWBITDEPTH is enabled,
-// remove CONFIG_LOWBITDEPTH when md5 check is reworked to be compatible with
-// CONFIG_LOWBITDEPTH = 0
-#if CONFIG_AV1_DECODER && CONFIG_LOWBITDEPTH
+#if CONFIG_AV1_DECODER
AV1_INSTANTIATE_TEST_CASE(
TestVectorTest,
- ::testing::Combine(
- ::testing::Values(1), // Single thread.
- ::testing::ValuesIn(libaom_test::kAV1TestVectors,
- libaom_test::kAV1TestVectors +
- libaom_test::kNumAV1TestVectors)));
+ ::testing::Combine(::testing::Values(1), // Single thread.
+ ::testing::ValuesIn(libaom_test::kAV1TestVectors,
+ libaom_test::kAV1TestVectors +
+ libaom_test::kNumAV1TestVectors),
+ ::testing::Values(0)));
// Test AV1 decode in with different numbers of threads.
INSTANTIATE_TEST_CASE_P(
@@ -140,7 +163,8 @@ INSTANTIATE_TEST_CASE_P(
::testing::Range(2, 9), // With 2 ~ 8 threads.
::testing::ValuesIn(libaom_test::kAV1TestVectors,
libaom_test::kAV1TestVectors +
- libaom_test::kNumAV1TestVectors))));
+ libaom_test::kNumAV1TestVectors),
+ ::testing::Range(0, 2))));
#endif // CONFIG_AV1_DECODER
diff --git a/third_party/aom/test/test_vectors.cc b/third_party/aom/test/test_vectors.cc
index a9edf7520..f478c0183 100644
--- a/third_party/aom/test/test_vectors.cc
+++ b/third_party/aom/test/test_vectors.cc
@@ -17,88 +17,121 @@ namespace libaom_test {
#if CONFIG_AV1_DECODER
const char *const kAV1TestVectors[] = {
- "av1-1-b8-00-quantizer-00.ivf", "av1-1-b8-00-quantizer-01.ivf",
- "av1-1-b8-00-quantizer-02.ivf", "av1-1-b8-00-quantizer-03.ivf",
- "av1-1-b8-00-quantizer-04.ivf", "av1-1-b8-00-quantizer-05.ivf",
- "av1-1-b8-00-quantizer-06.ivf", "av1-1-b8-00-quantizer-07.ivf",
- "av1-1-b8-00-quantizer-08.ivf", "av1-1-b8-00-quantizer-09.ivf",
- "av1-1-b8-00-quantizer-10.ivf", "av1-1-b8-00-quantizer-11.ivf",
- "av1-1-b8-00-quantizer-12.ivf", "av1-1-b8-00-quantizer-13.ivf",
- "av1-1-b8-00-quantizer-14.ivf", "av1-1-b8-00-quantizer-15.ivf",
- "av1-1-b8-00-quantizer-16.ivf", "av1-1-b8-00-quantizer-17.ivf",
- "av1-1-b8-00-quantizer-18.ivf", "av1-1-b8-00-quantizer-19.ivf",
- "av1-1-b8-00-quantizer-20.ivf", "av1-1-b8-00-quantizer-21.ivf",
- "av1-1-b8-00-quantizer-22.ivf", "av1-1-b8-00-quantizer-23.ivf",
- "av1-1-b8-00-quantizer-24.ivf", "av1-1-b8-00-quantizer-25.ivf",
- "av1-1-b8-00-quantizer-26.ivf", "av1-1-b8-00-quantizer-27.ivf",
- "av1-1-b8-00-quantizer-28.ivf", "av1-1-b8-00-quantizer-29.ivf",
- "av1-1-b8-00-quantizer-30.ivf", "av1-1-b8-00-quantizer-31.ivf",
- "av1-1-b8-00-quantizer-32.ivf", "av1-1-b8-00-quantizer-33.ivf",
- "av1-1-b8-00-quantizer-34.ivf", "av1-1-b8-00-quantizer-35.ivf",
- "av1-1-b8-00-quantizer-36.ivf", "av1-1-b8-00-quantizer-37.ivf",
- "av1-1-b8-00-quantizer-38.ivf", "av1-1-b8-00-quantizer-39.ivf",
- "av1-1-b8-00-quantizer-40.ivf", "av1-1-b8-00-quantizer-41.ivf",
- "av1-1-b8-00-quantizer-42.ivf", "av1-1-b8-00-quantizer-43.ivf",
- "av1-1-b8-00-quantizer-44.ivf", "av1-1-b8-00-quantizer-45.ivf",
- "av1-1-b8-00-quantizer-46.ivf", "av1-1-b8-00-quantizer-47.ivf",
- "av1-1-b8-00-quantizer-48.ivf", "av1-1-b8-00-quantizer-49.ivf",
- "av1-1-b8-00-quantizer-50.ivf", "av1-1-b8-00-quantizer-51.ivf",
- "av1-1-b8-00-quantizer-52.ivf", "av1-1-b8-00-quantizer-53.ivf",
- "av1-1-b8-00-quantizer-54.ivf", "av1-1-b8-00-quantizer-55.ivf",
- "av1-1-b8-00-quantizer-56.ivf", "av1-1-b8-00-quantizer-57.ivf",
- "av1-1-b8-00-quantizer-58.ivf", "av1-1-b8-00-quantizer-59.ivf",
- "av1-1-b8-00-quantizer-60.ivf", "av1-1-b8-00-quantizer-61.ivf",
- "av1-1-b8-00-quantizer-62.ivf", "av1-1-b8-00-quantizer-63.ivf",
- "av1-1-b8-01-size-16x16.ivf", "av1-1-b8-01-size-16x18.ivf",
- "av1-1-b8-01-size-16x32.ivf", "av1-1-b8-01-size-16x34.ivf",
- "av1-1-b8-01-size-16x64.ivf", "av1-1-b8-01-size-16x66.ivf",
- "av1-1-b8-01-size-18x16.ivf", "av1-1-b8-01-size-18x18.ivf",
- "av1-1-b8-01-size-18x32.ivf", "av1-1-b8-01-size-18x34.ivf",
- "av1-1-b8-01-size-18x64.ivf", "av1-1-b8-01-size-18x66.ivf",
- "av1-1-b8-01-size-196x196.ivf", "av1-1-b8-01-size-196x198.ivf",
- "av1-1-b8-01-size-196x200.ivf", "av1-1-b8-01-size-196x202.ivf",
- "av1-1-b8-01-size-196x208.ivf", "av1-1-b8-01-size-196x210.ivf",
- "av1-1-b8-01-size-196x224.ivf", "av1-1-b8-01-size-196x226.ivf",
- "av1-1-b8-01-size-198x196.ivf", "av1-1-b8-01-size-198x198.ivf",
- "av1-1-b8-01-size-198x200.ivf", "av1-1-b8-01-size-198x202.ivf",
- "av1-1-b8-01-size-198x208.ivf", "av1-1-b8-01-size-198x210.ivf",
- "av1-1-b8-01-size-198x224.ivf", "av1-1-b8-01-size-198x226.ivf",
- "av1-1-b8-01-size-200x196.ivf", "av1-1-b8-01-size-200x198.ivf",
- "av1-1-b8-01-size-200x200.ivf", "av1-1-b8-01-size-200x202.ivf",
- "av1-1-b8-01-size-200x208.ivf", "av1-1-b8-01-size-200x210.ivf",
- "av1-1-b8-01-size-200x224.ivf", "av1-1-b8-01-size-200x226.ivf",
- "av1-1-b8-01-size-202x196.ivf", "av1-1-b8-01-size-202x198.ivf",
- "av1-1-b8-01-size-202x200.ivf", "av1-1-b8-01-size-202x202.ivf",
- "av1-1-b8-01-size-202x208.ivf", "av1-1-b8-01-size-202x210.ivf",
- "av1-1-b8-01-size-202x224.ivf", "av1-1-b8-01-size-202x226.ivf",
- "av1-1-b8-01-size-208x196.ivf", "av1-1-b8-01-size-208x198.ivf",
- "av1-1-b8-01-size-208x200.ivf", "av1-1-b8-01-size-208x202.ivf",
- "av1-1-b8-01-size-208x208.ivf", "av1-1-b8-01-size-208x210.ivf",
- "av1-1-b8-01-size-208x224.ivf", "av1-1-b8-01-size-208x226.ivf",
- "av1-1-b8-01-size-210x196.ivf", "av1-1-b8-01-size-210x198.ivf",
- "av1-1-b8-01-size-210x200.ivf", "av1-1-b8-01-size-210x202.ivf",
- "av1-1-b8-01-size-210x208.ivf", "av1-1-b8-01-size-210x210.ivf",
- "av1-1-b8-01-size-210x224.ivf", "av1-1-b8-01-size-210x226.ivf",
- "av1-1-b8-01-size-224x196.ivf", "av1-1-b8-01-size-224x198.ivf",
- "av1-1-b8-01-size-224x200.ivf", "av1-1-b8-01-size-224x202.ivf",
- "av1-1-b8-01-size-224x208.ivf", "av1-1-b8-01-size-224x210.ivf",
- "av1-1-b8-01-size-224x224.ivf", "av1-1-b8-01-size-224x226.ivf",
- "av1-1-b8-01-size-226x196.ivf", "av1-1-b8-01-size-226x198.ivf",
- "av1-1-b8-01-size-226x200.ivf", "av1-1-b8-01-size-226x202.ivf",
- "av1-1-b8-01-size-226x208.ivf", "av1-1-b8-01-size-226x210.ivf",
- "av1-1-b8-01-size-226x224.ivf", "av1-1-b8-01-size-226x226.ivf",
- "av1-1-b8-01-size-32x16.ivf", "av1-1-b8-01-size-32x18.ivf",
- "av1-1-b8-01-size-32x32.ivf", "av1-1-b8-01-size-32x34.ivf",
- "av1-1-b8-01-size-32x64.ivf", "av1-1-b8-01-size-32x66.ivf",
- "av1-1-b8-01-size-34x16.ivf", "av1-1-b8-01-size-34x18.ivf",
- "av1-1-b8-01-size-34x32.ivf", "av1-1-b8-01-size-34x34.ivf",
- "av1-1-b8-01-size-34x64.ivf", "av1-1-b8-01-size-34x66.ivf",
- "av1-1-b8-01-size-64x16.ivf", "av1-1-b8-01-size-64x18.ivf",
- "av1-1-b8-01-size-64x32.ivf", "av1-1-b8-01-size-64x34.ivf",
- "av1-1-b8-01-size-64x64.ivf", "av1-1-b8-01-size-64x66.ivf",
- "av1-1-b8-01-size-66x16.ivf", "av1-1-b8-01-size-66x18.ivf",
- "av1-1-b8-01-size-66x32.ivf", "av1-1-b8-01-size-66x34.ivf",
- "av1-1-b8-01-size-66x64.ivf", "av1-1-b8-01-size-66x66.ivf",
+ "av1-1-b8-00-quantizer-00.ivf", "av1-1-b8-00-quantizer-01.ivf",
+ "av1-1-b8-00-quantizer-02.ivf", "av1-1-b8-00-quantizer-03.ivf",
+ "av1-1-b8-00-quantizer-04.ivf", "av1-1-b8-00-quantizer-05.ivf",
+ "av1-1-b8-00-quantizer-06.ivf", "av1-1-b8-00-quantizer-07.ivf",
+ "av1-1-b8-00-quantizer-08.ivf", "av1-1-b8-00-quantizer-09.ivf",
+ "av1-1-b8-00-quantizer-10.ivf", "av1-1-b8-00-quantizer-11.ivf",
+ "av1-1-b8-00-quantizer-12.ivf", "av1-1-b8-00-quantizer-13.ivf",
+ "av1-1-b8-00-quantizer-14.ivf", "av1-1-b8-00-quantizer-15.ivf",
+ "av1-1-b8-00-quantizer-16.ivf", "av1-1-b8-00-quantizer-17.ivf",
+ "av1-1-b8-00-quantizer-18.ivf", "av1-1-b8-00-quantizer-19.ivf",
+ "av1-1-b8-00-quantizer-20.ivf", "av1-1-b8-00-quantizer-21.ivf",
+ "av1-1-b8-00-quantizer-22.ivf", "av1-1-b8-00-quantizer-23.ivf",
+ "av1-1-b8-00-quantizer-24.ivf", "av1-1-b8-00-quantizer-25.ivf",
+ "av1-1-b8-00-quantizer-26.ivf", "av1-1-b8-00-quantizer-27.ivf",
+ "av1-1-b8-00-quantizer-28.ivf", "av1-1-b8-00-quantizer-29.ivf",
+ "av1-1-b8-00-quantizer-30.ivf", "av1-1-b8-00-quantizer-31.ivf",
+ "av1-1-b8-00-quantizer-32.ivf", "av1-1-b8-00-quantizer-33.ivf",
+ "av1-1-b8-00-quantizer-34.ivf", "av1-1-b8-00-quantizer-35.ivf",
+ "av1-1-b8-00-quantizer-36.ivf", "av1-1-b8-00-quantizer-37.ivf",
+ "av1-1-b8-00-quantizer-38.ivf", "av1-1-b8-00-quantizer-39.ivf",
+ "av1-1-b8-00-quantizer-40.ivf", "av1-1-b8-00-quantizer-41.ivf",
+ "av1-1-b8-00-quantizer-42.ivf", "av1-1-b8-00-quantizer-43.ivf",
+ "av1-1-b8-00-quantizer-44.ivf", "av1-1-b8-00-quantizer-45.ivf",
+ "av1-1-b8-00-quantizer-46.ivf", "av1-1-b8-00-quantizer-47.ivf",
+ "av1-1-b8-00-quantizer-48.ivf", "av1-1-b8-00-quantizer-49.ivf",
+ "av1-1-b8-00-quantizer-50.ivf", "av1-1-b8-00-quantizer-51.ivf",
+ "av1-1-b8-00-quantizer-52.ivf", "av1-1-b8-00-quantizer-53.ivf",
+ "av1-1-b8-00-quantizer-54.ivf", "av1-1-b8-00-quantizer-55.ivf",
+ "av1-1-b8-00-quantizer-56.ivf", "av1-1-b8-00-quantizer-57.ivf",
+ "av1-1-b8-00-quantizer-58.ivf", "av1-1-b8-00-quantizer-59.ivf",
+ "av1-1-b8-00-quantizer-60.ivf", "av1-1-b8-00-quantizer-61.ivf",
+ "av1-1-b8-00-quantizer-62.ivf", "av1-1-b8-00-quantizer-63.ivf",
+ "av1-1-b10-00-quantizer-00.ivf", "av1-1-b10-00-quantizer-01.ivf",
+ "av1-1-b10-00-quantizer-02.ivf", "av1-1-b10-00-quantizer-03.ivf",
+ "av1-1-b10-00-quantizer-04.ivf", "av1-1-b10-00-quantizer-05.ivf",
+ "av1-1-b10-00-quantizer-06.ivf", "av1-1-b10-00-quantizer-07.ivf",
+ "av1-1-b10-00-quantizer-08.ivf", "av1-1-b10-00-quantizer-09.ivf",
+ "av1-1-b10-00-quantizer-10.ivf", "av1-1-b10-00-quantizer-11.ivf",
+ "av1-1-b10-00-quantizer-12.ivf", "av1-1-b10-00-quantizer-13.ivf",
+ "av1-1-b10-00-quantizer-14.ivf", "av1-1-b10-00-quantizer-15.ivf",
+ "av1-1-b10-00-quantizer-16.ivf", "av1-1-b10-00-quantizer-17.ivf",
+ "av1-1-b10-00-quantizer-18.ivf", "av1-1-b10-00-quantizer-19.ivf",
+ "av1-1-b10-00-quantizer-20.ivf", "av1-1-b10-00-quantizer-21.ivf",
+ "av1-1-b10-00-quantizer-22.ivf", "av1-1-b10-00-quantizer-23.ivf",
+ "av1-1-b10-00-quantizer-24.ivf", "av1-1-b10-00-quantizer-25.ivf",
+ "av1-1-b10-00-quantizer-26.ivf", "av1-1-b10-00-quantizer-27.ivf",
+ "av1-1-b10-00-quantizer-28.ivf", "av1-1-b10-00-quantizer-29.ivf",
+ "av1-1-b10-00-quantizer-30.ivf", "av1-1-b10-00-quantizer-31.ivf",
+ "av1-1-b10-00-quantizer-32.ivf", "av1-1-b10-00-quantizer-33.ivf",
+ "av1-1-b10-00-quantizer-34.ivf", "av1-1-b10-00-quantizer-35.ivf",
+ "av1-1-b10-00-quantizer-36.ivf", "av1-1-b10-00-quantizer-37.ivf",
+ "av1-1-b10-00-quantizer-38.ivf", "av1-1-b10-00-quantizer-39.ivf",
+ "av1-1-b10-00-quantizer-40.ivf", "av1-1-b10-00-quantizer-41.ivf",
+ "av1-1-b10-00-quantizer-42.ivf", "av1-1-b10-00-quantizer-43.ivf",
+ "av1-1-b10-00-quantizer-44.ivf", "av1-1-b10-00-quantizer-45.ivf",
+ "av1-1-b10-00-quantizer-46.ivf", "av1-1-b10-00-quantizer-47.ivf",
+ "av1-1-b10-00-quantizer-48.ivf", "av1-1-b10-00-quantizer-49.ivf",
+ "av1-1-b10-00-quantizer-50.ivf", "av1-1-b10-00-quantizer-51.ivf",
+ "av1-1-b10-00-quantizer-52.ivf", "av1-1-b10-00-quantizer-53.ivf",
+ "av1-1-b10-00-quantizer-54.ivf", "av1-1-b10-00-quantizer-55.ivf",
+ "av1-1-b10-00-quantizer-56.ivf", "av1-1-b10-00-quantizer-57.ivf",
+ "av1-1-b10-00-quantizer-58.ivf", "av1-1-b10-00-quantizer-59.ivf",
+ "av1-1-b10-00-quantizer-60.ivf", "av1-1-b10-00-quantizer-61.ivf",
+ "av1-1-b10-00-quantizer-62.ivf", "av1-1-b10-00-quantizer-63.ivf",
+ "av1-1-b8-01-size-16x16.ivf", "av1-1-b8-01-size-16x18.ivf",
+ "av1-1-b8-01-size-16x32.ivf", "av1-1-b8-01-size-16x34.ivf",
+ "av1-1-b8-01-size-16x64.ivf", "av1-1-b8-01-size-16x66.ivf",
+ "av1-1-b8-01-size-18x16.ivf", "av1-1-b8-01-size-18x18.ivf",
+ "av1-1-b8-01-size-18x32.ivf", "av1-1-b8-01-size-18x34.ivf",
+ "av1-1-b8-01-size-18x64.ivf", "av1-1-b8-01-size-18x66.ivf",
+ "av1-1-b8-01-size-196x196.ivf", "av1-1-b8-01-size-196x198.ivf",
+ "av1-1-b8-01-size-196x200.ivf", "av1-1-b8-01-size-196x202.ivf",
+ "av1-1-b8-01-size-196x208.ivf", "av1-1-b8-01-size-196x210.ivf",
+ "av1-1-b8-01-size-196x224.ivf", "av1-1-b8-01-size-196x226.ivf",
+ "av1-1-b8-01-size-198x196.ivf", "av1-1-b8-01-size-198x198.ivf",
+ "av1-1-b8-01-size-198x200.ivf", "av1-1-b8-01-size-198x202.ivf",
+ "av1-1-b8-01-size-198x208.ivf", "av1-1-b8-01-size-198x210.ivf",
+ "av1-1-b8-01-size-198x224.ivf", "av1-1-b8-01-size-198x226.ivf",
+ "av1-1-b8-01-size-200x196.ivf", "av1-1-b8-01-size-200x198.ivf",
+ "av1-1-b8-01-size-200x200.ivf", "av1-1-b8-01-size-200x202.ivf",
+ "av1-1-b8-01-size-200x208.ivf", "av1-1-b8-01-size-200x210.ivf",
+ "av1-1-b8-01-size-200x224.ivf", "av1-1-b8-01-size-200x226.ivf",
+ "av1-1-b8-01-size-202x196.ivf", "av1-1-b8-01-size-202x198.ivf",
+ "av1-1-b8-01-size-202x200.ivf", "av1-1-b8-01-size-202x202.ivf",
+ "av1-1-b8-01-size-202x208.ivf", "av1-1-b8-01-size-202x210.ivf",
+ "av1-1-b8-01-size-202x224.ivf", "av1-1-b8-01-size-202x226.ivf",
+ "av1-1-b8-01-size-208x196.ivf", "av1-1-b8-01-size-208x198.ivf",
+ "av1-1-b8-01-size-208x200.ivf", "av1-1-b8-01-size-208x202.ivf",
+ "av1-1-b8-01-size-208x208.ivf", "av1-1-b8-01-size-208x210.ivf",
+ "av1-1-b8-01-size-208x224.ivf", "av1-1-b8-01-size-208x226.ivf",
+ "av1-1-b8-01-size-210x196.ivf", "av1-1-b8-01-size-210x198.ivf",
+ "av1-1-b8-01-size-210x200.ivf", "av1-1-b8-01-size-210x202.ivf",
+ "av1-1-b8-01-size-210x208.ivf", "av1-1-b8-01-size-210x210.ivf",
+ "av1-1-b8-01-size-210x224.ivf", "av1-1-b8-01-size-210x226.ivf",
+ "av1-1-b8-01-size-224x196.ivf", "av1-1-b8-01-size-224x198.ivf",
+ "av1-1-b8-01-size-224x200.ivf", "av1-1-b8-01-size-224x202.ivf",
+ "av1-1-b8-01-size-224x208.ivf", "av1-1-b8-01-size-224x210.ivf",
+ "av1-1-b8-01-size-224x224.ivf", "av1-1-b8-01-size-224x226.ivf",
+ "av1-1-b8-01-size-226x196.ivf", "av1-1-b8-01-size-226x198.ivf",
+ "av1-1-b8-01-size-226x200.ivf", "av1-1-b8-01-size-226x202.ivf",
+ "av1-1-b8-01-size-226x208.ivf", "av1-1-b8-01-size-226x210.ivf",
+ "av1-1-b8-01-size-226x224.ivf", "av1-1-b8-01-size-226x226.ivf",
+ "av1-1-b8-01-size-32x16.ivf", "av1-1-b8-01-size-32x18.ivf",
+ "av1-1-b8-01-size-32x32.ivf", "av1-1-b8-01-size-32x34.ivf",
+ "av1-1-b8-01-size-32x64.ivf", "av1-1-b8-01-size-32x66.ivf",
+ "av1-1-b8-01-size-34x16.ivf", "av1-1-b8-01-size-34x18.ivf",
+ "av1-1-b8-01-size-34x32.ivf", "av1-1-b8-01-size-34x34.ivf",
+ "av1-1-b8-01-size-34x64.ivf", "av1-1-b8-01-size-34x66.ivf",
+ "av1-1-b8-01-size-64x16.ivf", "av1-1-b8-01-size-64x18.ivf",
+ "av1-1-b8-01-size-64x32.ivf", "av1-1-b8-01-size-64x34.ivf",
+ "av1-1-b8-01-size-64x64.ivf", "av1-1-b8-01-size-64x66.ivf",
+ "av1-1-b8-01-size-66x16.ivf", "av1-1-b8-01-size-66x18.ivf",
+ "av1-1-b8-01-size-66x32.ivf", "av1-1-b8-01-size-66x34.ivf",
+ "av1-1-b8-01-size-66x64.ivf", "av1-1-b8-01-size-66x66.ivf",
+ "av1-1-b8-02-allintra.ivf",
};
const int kNumAV1TestVectors = NELEMENTS(kAV1TestVectors);
#endif // CONFIG_AV1_DECODER
diff --git a/third_party/aom/test/tile_independence_test.cc b/third_party/aom/test/tile_independence_test.cc
index e8b2e1fe4..cf534c0c5 100644
--- a/third_party/aom/test/tile_independence_test.cc
+++ b/third_party/aom/test/tile_independence_test.cc
@@ -146,25 +146,28 @@ AV1_INSTANTIATE_TEST_CASE(TileIndependenceTestLarge, ::testing::Values(0, 1),
class TileIndependenceLSTest : public TileIndependenceTest {};
-TEST_P(TileIndependenceLSTest, DISABLED_MD5Match) {
+TEST_P(TileIndependenceLSTest, MD5Match) {
cfg_.large_scale_tile = 1;
fw_dec_->Control(AV1_SET_TILE_MODE, 1);
+ fw_dec_->Control(AV1D_EXT_TILE_DEBUG, 1);
inv_dec_->Control(AV1_SET_TILE_MODE, 1);
+ inv_dec_->Control(AV1D_EXT_TILE_DEBUG, 1);
DoTest();
}
class TileIndependenceLSTestLarge : public TileIndependenceTestLarge {};
-TEST_P(TileIndependenceLSTestLarge, DISABLED_MD5Match) {
+TEST_P(TileIndependenceLSTestLarge, MD5Match) {
cfg_.large_scale_tile = 1;
fw_dec_->Control(AV1_SET_TILE_MODE, 1);
+ fw_dec_->Control(AV1D_EXT_TILE_DEBUG, 1);
inv_dec_->Control(AV1_SET_TILE_MODE, 1);
+ inv_dec_->Control(AV1D_EXT_TILE_DEBUG, 1);
DoTest();
}
-AV1_INSTANTIATE_TEST_CASE(TileIndependenceLSTest, ::testing::Values(1, 2, 32),
- ::testing::Values(1, 2, 32), ::testing::Values(1));
-AV1_INSTANTIATE_TEST_CASE(TileIndependenceLSTestLarge,
- ::testing::Values(1, 2, 32),
- ::testing::Values(1, 2, 32), ::testing::Values(1));
+AV1_INSTANTIATE_TEST_CASE(TileIndependenceLSTest, ::testing::Values(6),
+ ::testing::Values(6), ::testing::Values(1));
+AV1_INSTANTIATE_TEST_CASE(TileIndependenceLSTestLarge, ::testing::Values(6),
+ ::testing::Values(6), ::testing::Values(1));
} // namespace
diff --git a/third_party/aom/test/tools_common.sh b/third_party/aom/test/tools_common.sh
index 21a6b9b8e..c08710606 100755
--- a/third_party/aom/test/tools_common.sh
+++ b/third_party/aom/test/tools_common.sh
@@ -47,26 +47,16 @@ test_end() {
# Echoes the target configuration being tested.
test_configuration_target() {
- aom_config_mk="${LIBAOM_CONFIG_PATH}/config.mk"
- # TODO(tomfinegan): Remove the parts requiring config.mk when the configure
- # script is removed from the repository.
- if [ ! -f "${aom_config_mk}" ]; then
- aom_config_c="${LIBAOM_CONFIG_PATH}/aom_config.c"
- # Clean up the cfg pointer line from aom_config.c for easier re-use by
- # someone examining a failure in the example tests.
- # 1. Run grep on aom_config.c for cfg and limit the results to 1.
- # 2. Split the line using ' = ' as separator.
- # 3. Abuse sed to consume the leading " and trailing "; from the assignment
- # to the cfg pointer.
- cmake_config=$(awk -F ' = ' '/cfg/ { print $NF; exit }' "${aom_config_c}" \
- | sed -e s/\"// -e s/\"\;//)
- echo cmake generated via command: cmake path/to/aom ${cmake_config}
- return
- fi
- # Find the TOOLCHAIN line, split it using ':=' as the field separator, and
- # print the last field to get the value. Then pipe the value to tr to consume
- # any leading/trailing spaces while allowing tr to echo the output to stdout.
- awk -F ':=' '/TOOLCHAIN/ { print $NF }' "${aom_config_mk}" | tr -d ' '
+ aom_config_c="${LIBAOM_CONFIG_PATH}/config/aom_config.c"
+ # Clean up the cfg pointer line from aom_config.c for easier re-use by
+ # someone examining a failure in the example tests.
+ # 1. Run grep on aom_config.c for cfg and limit the results to 1.
+ # 2. Split the line using ' = ' as separator.
+ # 3. Abuse sed to consume the leading " and trailing "; from the assignment
+ # to the cfg pointer.
+ cmake_config=$(awk -F ' = ' '/cfg/ { print $NF; exit }' "${aom_config_c}" \
+ | sed -e s/\"// -e s/\"\;//)
+ echo cmake generated via command: cmake path/to/aom ${cmake_config}
}
# Trap function used for failure reports and tool output directory removal.
@@ -163,10 +153,10 @@ is_windows_target() {
# included in $tool_paths, or an empty string. Caller is responsible for testing
# the string once the function returns.
aom_tool_path() {
- local readonly tool_name="$1"
- local readonly root_path="${LIBAOM_BIN_PATH}"
- local readonly suffix="${AOM_TEST_EXE_SUFFIX}"
- local readonly tool_paths="\
+ local tool_name="$1"
+ local root_path="${LIBAOM_BIN_PATH}"
+ local suffix="${AOM_TEST_EXE_SUFFIX}"
+ local tool_paths="\
${root_path}/${tool_name}${suffix} \
${root_path}/../${tool_name}${suffix} \
${root_path}/tools/${tool_name}${suffix} \
@@ -348,8 +338,8 @@ yuv_raw_input() {
# Do a small encode for testing decoders.
encode_yuv_raw_input_av1() {
if [ "$(av1_encode_available)" = "yes" ]; then
- local readonly output="$1"
- local readonly encoder="$(aom_tool_path aomenc)"
+ local output="$1"
+ local encoder="$(aom_tool_path aomenc)"
shift
eval "${encoder}" $(yuv_raw_input) \
$(aomenc_encode_test_fast_params) \
diff --git a/third_party/aom/test/variance_test.cc b/third_party/aom/test/variance_test.cc
index eb801b442..2f1b1fc5a 100644
--- a/third_party/aom/test/variance_test.cc
+++ b/third_party/aom/test/variance_test.cc
@@ -23,6 +23,7 @@
#include "aom/aom_codec.h"
#include "aom/aom_integer.h"
#include "aom_mem/aom_mem.h"
+#include "aom_ports/aom_timer.h"
#include "aom_ports/mem.h"
namespace {
@@ -46,6 +47,10 @@ typedef unsigned int (*JntSubpixAvgVarMxNFunc)(
const uint8_t *a, int a_stride, int xoffset, int yoffset, const uint8_t *b,
int b_stride, uint32_t *sse, const uint8_t *second_pred,
const JNT_COMP_PARAMS *jcp_param);
+typedef uint32_t (*ObmcSubpelVarFunc)(const uint8_t *pre, int pre_stride,
+ int xoffset, int yoffset,
+ const int32_t *wsrc, const int32_t *mask,
+ unsigned int *sse);
using libaom_test::ACMRandom;
@@ -269,6 +274,56 @@ static uint32_t jnt_subpel_avg_variance_ref(
return static_cast<uint32_t>(sse - ((se * se) >> (l2w + l2h)));
}
+static uint32_t obmc_subpel_variance_ref(const uint8_t *pre, int l2w, int l2h,
+ int xoff, int yoff,
+ const int32_t *wsrc,
+ const int32_t *mask, uint32_t *sse_ptr,
+ bool use_high_bit_depth_,
+ aom_bit_depth_t bit_depth) {
+ int64_t se = 0;
+ uint64_t sse = 0;
+ const int w = 1 << l2w;
+ const int h = 1 << l2h;
+
+ xoff <<= 1;
+ yoff <<= 1;
+
+ for (int y = 0; y < h; y++) {
+ for (int x = 0; x < w; x++) {
+ // Bilinear interpolation at a 16th pel step.
+ if (!use_high_bit_depth_) {
+ const int a1 = pre[(w + 1) * (y + 0) + x + 0];
+ const int a2 = pre[(w + 1) * (y + 0) + x + 1];
+ const int b1 = pre[(w + 1) * (y + 1) + x + 0];
+ const int b2 = pre[(w + 1) * (y + 1) + x + 1];
+ const int a = a1 + (((a2 - a1) * xoff + 8) >> 4);
+ const int b = b1 + (((b2 - b1) * xoff + 8) >> 4);
+ const int r = a + (((b - a) * yoff + 8) >> 4);
+ const int diff = ROUND_POWER_OF_TWO_SIGNED(
+ wsrc[w * y + x] - r * mask[w * y + x], 12);
+ se += diff;
+ sse += diff * diff;
+ } else {
+ uint16_t *pre16 = CONVERT_TO_SHORTPTR(pre);
+ const int a1 = pre16[(w + 1) * (y + 0) + x + 0];
+ const int a2 = pre16[(w + 1) * (y + 0) + x + 1];
+ const int b1 = pre16[(w + 1) * (y + 1) + x + 0];
+ const int b2 = pre16[(w + 1) * (y + 1) + x + 1];
+ const int a = a1 + (((a2 - a1) * xoff + 8) >> 4);
+ const int b = b1 + (((b2 - b1) * xoff + 8) >> 4);
+ const int r = a + (((b - a) * yoff + 8) >> 4);
+ const int diff = ROUND_POWER_OF_TWO_SIGNED(
+ wsrc[w * y + x] - r * mask[w * y + x], 12);
+ se += diff;
+ sse += diff * diff;
+ }
+ }
+ }
+ RoundHighBitDepth(bit_depth, &se, &sse);
+ *sse_ptr = static_cast<uint32_t>(sse);
+ return static_cast<uint32_t>(sse - ((se * se) >> (l2w + l2h)));
+}
+
////////////////////////////////////////////////////////////////////////////////
class SumOfSquaresTest : public ::testing::TestWithParam<SumOfSquaresFunction> {
@@ -803,12 +858,170 @@ void SubpelVarianceTest<JntSubpixAvgVarMxNFunc>::RefTest() {
}
}
+////////////////////////////////////////////////////////////////////////////////
+
+static const int kMaskMax = 64;
+
+typedef TestParams<ObmcSubpelVarFunc> ObmcSubpelVarianceParams;
+
+template <typename FunctionType>
+class ObmcVarianceTest
+ : public ::testing::TestWithParam<TestParams<FunctionType> > {
+ public:
+ virtual void SetUp() {
+ params_ = this->GetParam();
+
+ rnd_.Reset(ACMRandom::DeterministicSeed());
+ if (!use_high_bit_depth()) {
+ pre_ = reinterpret_cast<uint8_t *>(
+ aom_memalign(32, block_size() + width() + height() + 1));
+ } else {
+ pre_ = CONVERT_TO_BYTEPTR(reinterpret_cast<uint16_t *>(aom_memalign(
+ 32, block_size() + width() + height() + 1 * sizeof(uint16_t))));
+ }
+ wsrc_ = reinterpret_cast<int32_t *>(
+ aom_memalign(32, block_size() * sizeof(uint32_t)));
+ mask_ = reinterpret_cast<int32_t *>(
+ aom_memalign(32, block_size() * sizeof(uint32_t)));
+ ASSERT_TRUE(pre_ != NULL);
+ ASSERT_TRUE(wsrc_ != NULL);
+ ASSERT_TRUE(mask_ != NULL);
+ }
+
+ virtual void TearDown() {
+ if (!use_high_bit_depth()) {
+ aom_free(pre_);
+ } else {
+ aom_free(CONVERT_TO_SHORTPTR(pre_));
+ }
+ aom_free(wsrc_);
+ aom_free(mask_);
+ libaom_test::ClearSystemState();
+ }
+
+ protected:
+ void RefTest();
+ void ExtremeRefTest();
+ void SpeedTest();
+
+ ACMRandom rnd_;
+ uint8_t *pre_;
+ int32_t *wsrc_;
+ int32_t *mask_;
+ TestParams<FunctionType> params_;
+
+ // some relay helpers
+ bool use_high_bit_depth() const { return params_.use_high_bit_depth; }
+ int byte_shift() const { return params_.bit_depth - 8; }
+ int block_size() const { return params_.block_size; }
+ int width() const { return params_.width; }
+ int height() const { return params_.height; }
+ uint32_t bd_mask() const { return params_.mask; }
+};
+
+template <>
+void ObmcVarianceTest<ObmcSubpelVarFunc>::RefTest() {
+ for (int x = 0; x < 8; ++x) {
+ for (int y = 0; y < 8; ++y) {
+ if (!use_high_bit_depth())
+ for (int j = 0; j < block_size() + width() + height() + 1; j++)
+ pre_[j] = rnd_.Rand8();
+ else
+ for (int j = 0; j < block_size() + width() + height() + 1; j++)
+ CONVERT_TO_SHORTPTR(pre_)[j] = rnd_.Rand16() & bd_mask();
+ for (int j = 0; j < block_size(); j++) {
+ wsrc_[j] = (rnd_.Rand16() & bd_mask()) * rnd_(kMaskMax * kMaskMax + 1);
+ mask_[j] = rnd_(kMaskMax * kMaskMax + 1);
+ }
+
+ uint32_t sse1, sse2;
+ uint32_t var1, var2;
+ ASM_REGISTER_STATE_CHECK(
+ var1 = params_.func(pre_, width() + 1, x, y, wsrc_, mask_, &sse1));
+ var2 = obmc_subpel_variance_ref(
+ pre_, params_.log2width, params_.log2height, x, y, wsrc_, mask_,
+ &sse2, use_high_bit_depth(), params_.bit_depth);
+ EXPECT_EQ(sse1, sse2) << "for xoffset " << x << " and yoffset " << y;
+ EXPECT_EQ(var1, var2) << "for xoffset " << x << " and yoffset " << y;
+ }
+ }
+}
+
+template <>
+void ObmcVarianceTest<ObmcSubpelVarFunc>::ExtremeRefTest() {
+ // Pre: Set the first half of values to the maximum, the second half to 0.
+ // Mask: same as above
+ // WSrc: Set the first half of values to 0, the second half to the maximum.
+ for (int x = 0; x < 8; ++x) {
+ for (int y = 0; y < 8; ++y) {
+ const int half = block_size() / 2;
+ if (!use_high_bit_depth()) {
+ memset(pre_, 255, half);
+ memset(pre_ + half, 0, half + width() + height() + 1);
+ } else {
+ aom_memset16(CONVERT_TO_SHORTPTR(pre_), bd_mask(), half);
+ aom_memset16(CONVERT_TO_SHORTPTR(pre_) + half, 0, half);
+ }
+ for (int j = 0; j < half; j++) {
+ wsrc_[j] = bd_mask() * kMaskMax * kMaskMax;
+ mask_[j] = 0;
+ }
+ for (int j = half; j < block_size(); j++) {
+ wsrc_[j] = 0;
+ mask_[j] = kMaskMax * kMaskMax;
+ }
+
+ uint32_t sse1, sse2;
+ uint32_t var1, var2;
+ ASM_REGISTER_STATE_CHECK(
+ var1 = params_.func(pre_, width() + 1, x, y, wsrc_, mask_, &sse1));
+ var2 = obmc_subpel_variance_ref(
+ pre_, params_.log2width, params_.log2height, x, y, wsrc_, mask_,
+ &sse2, use_high_bit_depth(), params_.bit_depth);
+ EXPECT_EQ(sse1, sse2) << "for xoffset " << x << " and yoffset " << y;
+ EXPECT_EQ(var1, var2) << "for xoffset " << x << " and yoffset " << y;
+ }
+ }
+}
+
+template <>
+void ObmcVarianceTest<ObmcSubpelVarFunc>::SpeedTest() {
+ if (!use_high_bit_depth())
+ for (int j = 0; j < block_size() + width() + height() + 1; j++)
+ pre_[j] = rnd_.Rand8();
+ else
+ for (int j = 0; j < block_size() + width() + height() + 1; j++)
+ CONVERT_TO_SHORTPTR(pre_)[j] = rnd_.Rand16() & bd_mask();
+ for (int j = 0; j < block_size(); j++) {
+ wsrc_[j] = (rnd_.Rand16() & bd_mask()) * rnd_(kMaskMax * kMaskMax + 1);
+ mask_[j] = rnd_(kMaskMax * kMaskMax + 1);
+ }
+ unsigned int sse1;
+ const int stride = width() + 1;
+ int run_time = 1000000000 / block_size();
+ aom_usec_timer timer;
+
+ aom_usec_timer_start(&timer);
+ for (int i = 0; i < run_time; ++i) {
+ int x = rnd_(8);
+ int y = rnd_(8);
+ ASM_REGISTER_STATE_CHECK(
+ params_.func(pre_, stride, x, y, wsrc_, mask_, &sse1));
+ }
+ aom_usec_timer_mark(&timer);
+
+ const int elapsed_time = static_cast<int>(aom_usec_timer_elapsed(&timer));
+ printf("obmc_sub_pixel_variance_%dx%d_%d: %d us\n", width(), height(),
+ params_.bit_depth, elapsed_time);
+}
+
typedef MainTestClass<Get4x4SseFunc> AvxSseTest;
typedef MainTestClass<VarianceMxNFunc> AvxMseTest;
typedef MainTestClass<VarianceMxNFunc> AvxVarianceTest;
typedef SubpelVarianceTest<SubpixVarMxNFunc> AvxSubpelVarianceTest;
typedef SubpelVarianceTest<SubpixAvgVarMxNFunc> AvxSubpelAvgVarianceTest;
typedef SubpelVarianceTest<JntSubpixAvgVarMxNFunc> AvxJntSubpelAvgVarianceTest;
+typedef ObmcVarianceTest<ObmcSubpelVarFunc> AvxObmcSubpelVarianceTest;
TEST_P(AvxSseTest, RefSse) { RefTestSse(); }
TEST_P(AvxSseTest, MaxSse) { MaxTestSse(); }
@@ -825,6 +1038,9 @@ TEST_P(AvxSubpelVarianceTest, Ref) { RefTest(); }
TEST_P(AvxSubpelVarianceTest, ExtremeRef) { ExtremeRefTest(); }
TEST_P(AvxSubpelAvgVarianceTest, Ref) { RefTest(); }
TEST_P(AvxJntSubpelAvgVarianceTest, Ref) { RefTest(); }
+TEST_P(AvxObmcSubpelVarianceTest, Ref) { RefTest(); }
+TEST_P(AvxObmcSubpelVarianceTest, ExtremeRef) { ExtremeRefTest(); }
+TEST_P(AvxObmcSubpelVarianceTest, DISABLED_Speed) { SpeedTest(); }
INSTANTIATE_TEST_CASE_P(C, SumOfSquaresTest,
::testing::Values(aom_get_mb_ss_c));
@@ -934,10 +1150,32 @@ INSTANTIATE_TEST_CASE_P(
JntSubpelAvgVarianceParams(2, 2, &aom_jnt_sub_pixel_avg_variance4x4_c,
0)));
+INSTANTIATE_TEST_CASE_P(
+ C, AvxObmcSubpelVarianceTest,
+ ::testing::Values(
+ ObmcSubpelVarianceParams(7, 7, &aom_obmc_sub_pixel_variance128x128_c,
+ 0),
+ ObmcSubpelVarianceParams(7, 6, &aom_obmc_sub_pixel_variance128x64_c, 0),
+ ObmcSubpelVarianceParams(6, 7, &aom_obmc_sub_pixel_variance64x128_c, 0),
+ ObmcSubpelVarianceParams(6, 6, &aom_obmc_sub_pixel_variance64x64_c, 0),
+ ObmcSubpelVarianceParams(6, 5, &aom_obmc_sub_pixel_variance64x32_c, 0),
+ ObmcSubpelVarianceParams(5, 6, &aom_obmc_sub_pixel_variance32x64_c, 0),
+ ObmcSubpelVarianceParams(5, 5, &aom_obmc_sub_pixel_variance32x32_c, 0),
+ ObmcSubpelVarianceParams(5, 4, &aom_obmc_sub_pixel_variance32x16_c, 0),
+ ObmcSubpelVarianceParams(4, 5, &aom_obmc_sub_pixel_variance16x32_c, 0),
+ ObmcSubpelVarianceParams(4, 4, &aom_obmc_sub_pixel_variance16x16_c, 0),
+ ObmcSubpelVarianceParams(4, 3, &aom_obmc_sub_pixel_variance16x8_c, 0),
+ ObmcSubpelVarianceParams(3, 4, &aom_obmc_sub_pixel_variance8x16_c, 0),
+ ObmcSubpelVarianceParams(3, 3, &aom_obmc_sub_pixel_variance8x8_c, 0),
+ ObmcSubpelVarianceParams(3, 2, &aom_obmc_sub_pixel_variance8x4_c, 0),
+ ObmcSubpelVarianceParams(2, 3, &aom_obmc_sub_pixel_variance4x8_c, 0),
+ ObmcSubpelVarianceParams(2, 2, &aom_obmc_sub_pixel_variance4x4_c, 0)));
+
typedef MainTestClass<VarianceMxNFunc> AvxHBDMseTest;
typedef MainTestClass<VarianceMxNFunc> AvxHBDVarianceTest;
typedef SubpelVarianceTest<SubpixVarMxNFunc> AvxHBDSubpelVarianceTest;
typedef SubpelVarianceTest<SubpixAvgVarMxNFunc> AvxHBDSubpelAvgVarianceTest;
+typedef ObmcVarianceTest<ObmcSubpelVarFunc> AvxHBDObmcSubpelVarianceTest;
TEST_P(AvxHBDMseTest, RefMse) { RefTestMse(); }
TEST_P(AvxHBDMseTest, MaxMse) { MaxTestMse(); }
@@ -1161,6 +1399,94 @@ const SubpelAvgVarianceParams kArrayHBDSubpelAvgVariance_c[] = {
INSTANTIATE_TEST_CASE_P(C, AvxHBDSubpelAvgVarianceTest,
::testing::ValuesIn(kArrayHBDSubpelAvgVariance_c));
+const ObmcSubpelVarianceParams kArrayHBDObmcSubpelVariance_c[] = {
+ ObmcSubpelVarianceParams(7, 7, &aom_highbd_obmc_sub_pixel_variance128x128_c,
+ 8),
+ ObmcSubpelVarianceParams(7, 6, &aom_highbd_obmc_sub_pixel_variance128x64_c,
+ 8),
+ ObmcSubpelVarianceParams(6, 7, &aom_highbd_obmc_sub_pixel_variance64x128_c,
+ 8),
+ ObmcSubpelVarianceParams(6, 6, &aom_highbd_obmc_sub_pixel_variance64x64_c, 8),
+ ObmcSubpelVarianceParams(6, 5, &aom_highbd_obmc_sub_pixel_variance64x32_c, 8),
+ ObmcSubpelVarianceParams(5, 6, &aom_highbd_obmc_sub_pixel_variance32x64_c, 8),
+ ObmcSubpelVarianceParams(5, 5, &aom_highbd_obmc_sub_pixel_variance32x32_c, 8),
+ ObmcSubpelVarianceParams(5, 4, &aom_highbd_obmc_sub_pixel_variance32x16_c, 8),
+ ObmcSubpelVarianceParams(4, 5, &aom_highbd_obmc_sub_pixel_variance16x32_c, 8),
+ ObmcSubpelVarianceParams(4, 4, &aom_highbd_obmc_sub_pixel_variance16x16_c, 8),
+ ObmcSubpelVarianceParams(4, 3, &aom_highbd_obmc_sub_pixel_variance16x8_c, 8),
+ ObmcSubpelVarianceParams(3, 4, &aom_highbd_obmc_sub_pixel_variance8x16_c, 8),
+ ObmcSubpelVarianceParams(3, 3, &aom_highbd_obmc_sub_pixel_variance8x8_c, 8),
+ ObmcSubpelVarianceParams(3, 2, &aom_highbd_obmc_sub_pixel_variance8x4_c, 8),
+ ObmcSubpelVarianceParams(2, 3, &aom_highbd_obmc_sub_pixel_variance4x8_c, 8),
+ ObmcSubpelVarianceParams(2, 2, &aom_highbd_obmc_sub_pixel_variance4x4_c, 8),
+ ObmcSubpelVarianceParams(7, 7,
+ &aom_highbd_10_obmc_sub_pixel_variance128x128_c, 10),
+ ObmcSubpelVarianceParams(7, 6, &aom_highbd_10_obmc_sub_pixel_variance128x64_c,
+ 10),
+ ObmcSubpelVarianceParams(6, 7, &aom_highbd_10_obmc_sub_pixel_variance64x128_c,
+ 10),
+ ObmcSubpelVarianceParams(6, 6, &aom_highbd_10_obmc_sub_pixel_variance64x64_c,
+ 10),
+ ObmcSubpelVarianceParams(6, 5, &aom_highbd_10_obmc_sub_pixel_variance64x32_c,
+ 10),
+ ObmcSubpelVarianceParams(5, 6, &aom_highbd_10_obmc_sub_pixel_variance32x64_c,
+ 10),
+ ObmcSubpelVarianceParams(5, 5, &aom_highbd_10_obmc_sub_pixel_variance32x32_c,
+ 10),
+ ObmcSubpelVarianceParams(5, 4, &aom_highbd_10_obmc_sub_pixel_variance32x16_c,
+ 10),
+ ObmcSubpelVarianceParams(4, 5, &aom_highbd_10_obmc_sub_pixel_variance16x32_c,
+ 10),
+ ObmcSubpelVarianceParams(4, 4, &aom_highbd_10_obmc_sub_pixel_variance16x16_c,
+ 10),
+ ObmcSubpelVarianceParams(4, 3, &aom_highbd_10_obmc_sub_pixel_variance16x8_c,
+ 10),
+ ObmcSubpelVarianceParams(3, 4, &aom_highbd_10_obmc_sub_pixel_variance8x16_c,
+ 10),
+ ObmcSubpelVarianceParams(3, 3, &aom_highbd_10_obmc_sub_pixel_variance8x8_c,
+ 10),
+ ObmcSubpelVarianceParams(3, 2, &aom_highbd_10_obmc_sub_pixel_variance8x4_c,
+ 10),
+ ObmcSubpelVarianceParams(2, 3, &aom_highbd_10_obmc_sub_pixel_variance4x8_c,
+ 10),
+ ObmcSubpelVarianceParams(2, 2, &aom_highbd_10_obmc_sub_pixel_variance4x4_c,
+ 10),
+ ObmcSubpelVarianceParams(7, 7,
+ &aom_highbd_12_obmc_sub_pixel_variance128x128_c, 12),
+ ObmcSubpelVarianceParams(7, 6, &aom_highbd_12_obmc_sub_pixel_variance128x64_c,
+ 12),
+ ObmcSubpelVarianceParams(6, 7, &aom_highbd_12_obmc_sub_pixel_variance64x128_c,
+ 12),
+ ObmcSubpelVarianceParams(6, 6, &aom_highbd_12_obmc_sub_pixel_variance64x64_c,
+ 12),
+ ObmcSubpelVarianceParams(6, 5, &aom_highbd_12_obmc_sub_pixel_variance64x32_c,
+ 12),
+ ObmcSubpelVarianceParams(5, 6, &aom_highbd_12_obmc_sub_pixel_variance32x64_c,
+ 12),
+ ObmcSubpelVarianceParams(5, 5, &aom_highbd_12_obmc_sub_pixel_variance32x32_c,
+ 12),
+ ObmcSubpelVarianceParams(5, 4, &aom_highbd_12_obmc_sub_pixel_variance32x16_c,
+ 12),
+ ObmcSubpelVarianceParams(4, 5, &aom_highbd_12_obmc_sub_pixel_variance16x32_c,
+ 12),
+ ObmcSubpelVarianceParams(4, 4, &aom_highbd_12_obmc_sub_pixel_variance16x16_c,
+ 12),
+ ObmcSubpelVarianceParams(4, 3, &aom_highbd_12_obmc_sub_pixel_variance16x8_c,
+ 12),
+ ObmcSubpelVarianceParams(3, 4, &aom_highbd_12_obmc_sub_pixel_variance8x16_c,
+ 12),
+ ObmcSubpelVarianceParams(3, 3, &aom_highbd_12_obmc_sub_pixel_variance8x8_c,
+ 12),
+ ObmcSubpelVarianceParams(3, 2, &aom_highbd_12_obmc_sub_pixel_variance8x4_c,
+ 12),
+ ObmcSubpelVarianceParams(2, 3, &aom_highbd_12_obmc_sub_pixel_variance4x8_c,
+ 12),
+ ObmcSubpelVarianceParams(2, 2, &aom_highbd_12_obmc_sub_pixel_variance4x4_c,
+ 12)
+};
+INSTANTIATE_TEST_CASE_P(C, AvxHBDObmcSubpelVarianceTest,
+ ::testing::ValuesIn(kArrayHBDObmcSubpelVariance_c));
+
#if HAVE_SSE2
INSTANTIATE_TEST_CASE_P(SSE2, SumOfSquaresTest,
::testing::Values(aom_get_mb_ss_sse2));
@@ -1519,6 +1845,44 @@ INSTANTIATE_TEST_CASE_P(
0)));
#endif // HAVE_SSSE3
+#if HAVE_SSE4_1
+INSTANTIATE_TEST_CASE_P(
+ SSE4_1, AvxObmcSubpelVarianceTest,
+ ::testing::Values(
+ ObmcSubpelVarianceParams(7, 7,
+ &aom_obmc_sub_pixel_variance128x128_sse4_1, 0),
+ ObmcSubpelVarianceParams(7, 6,
+ &aom_obmc_sub_pixel_variance128x64_sse4_1, 0),
+ ObmcSubpelVarianceParams(6, 7,
+ &aom_obmc_sub_pixel_variance64x128_sse4_1, 0),
+ ObmcSubpelVarianceParams(6, 6, &aom_obmc_sub_pixel_variance64x64_sse4_1,
+ 0),
+ ObmcSubpelVarianceParams(6, 5, &aom_obmc_sub_pixel_variance64x32_sse4_1,
+ 0),
+ ObmcSubpelVarianceParams(5, 6, &aom_obmc_sub_pixel_variance32x64_sse4_1,
+ 0),
+ ObmcSubpelVarianceParams(5, 5, &aom_obmc_sub_pixel_variance32x32_sse4_1,
+ 0),
+ ObmcSubpelVarianceParams(5, 4, &aom_obmc_sub_pixel_variance32x16_sse4_1,
+ 0),
+ ObmcSubpelVarianceParams(4, 5, &aom_obmc_sub_pixel_variance16x32_sse4_1,
+ 0),
+ ObmcSubpelVarianceParams(4, 4, &aom_obmc_sub_pixel_variance16x16_sse4_1,
+ 0),
+ ObmcSubpelVarianceParams(4, 3, &aom_obmc_sub_pixel_variance16x8_sse4_1,
+ 0),
+ ObmcSubpelVarianceParams(3, 4, &aom_obmc_sub_pixel_variance8x16_sse4_1,
+ 0),
+ ObmcSubpelVarianceParams(3, 3, &aom_obmc_sub_pixel_variance8x8_sse4_1,
+ 0),
+ ObmcSubpelVarianceParams(3, 2, &aom_obmc_sub_pixel_variance8x4_sse4_1,
+ 0),
+ ObmcSubpelVarianceParams(2, 3, &aom_obmc_sub_pixel_variance4x8_sse4_1,
+ 0),
+ ObmcSubpelVarianceParams(2, 2, &aom_obmc_sub_pixel_variance4x4_sse4_1,
+ 0)));
+#endif // HAVE_SSE4_1
+
#if HAVE_AVX2
INSTANTIATE_TEST_CASE_P(AVX2, AvxMseTest,
::testing::Values(MseParams(4, 4, &aom_mse16x16_avx2)));