test.mk 11.1 KB
Newer Older
Yi Luo's avatar
Yi Luo committed
1 2 3 4 5 6 7 8 9 10 11
##
## Copyright (c) 2017, 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.
##

12 13 14 15 16 17
LIBAOM_TEST_SRCS-yes += acm_random.h
LIBAOM_TEST_SRCS-yes += clear_system_state.h
LIBAOM_TEST_SRCS-yes += codec_factory.h
LIBAOM_TEST_SRCS-yes += md5_helper.h
LIBAOM_TEST_SRCS-yes += register_state_check.h
LIBAOM_TEST_SRCS-yes += test.mk
Yaowu Xu's avatar
Yaowu Xu committed
18
LIBAOM_TEST_SRCS-yes += test_libaom.cc
19 20 21 22
LIBAOM_TEST_SRCS-yes += util.h
LIBAOM_TEST_SRCS-yes += video_source.h
LIBAOM_TEST_SRCS-yes += transform_test_base.h
LIBAOM_TEST_SRCS-yes += function_equivalence_test.h
Jim Bankoski's avatar
Jim Bankoski committed
23

24 25 26 27 28
##
## BLACK BOX TESTS
##
## Black box tests only use the public API.
##
29
LIBAOM_TEST_SRCS-yes                   += ../md5_utils.h ../md5_utils.c
30 31 32 33 34 35
LIBAOM_TEST_SRCS-$(CONFIG_AV1_DECODER)    += ivf_video_source.h
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER)    += ../y4minput.h ../y4minput.c
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER)    += altref_test.cc
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER)    += aq_segment_test.cc
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER)    += datarate_test.cc
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER)    += encode_api_test.cc
Sebastien Alaiwan's avatar
Sebastien Alaiwan committed
36
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER)    += coding_path_sync.cc
37 38 39 40 41 42
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER)    += error_resilience_test.cc
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER)    += i420_video_source.h
#LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER)    += realtime_test.cc
#LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER)    += resize_test.cc
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER)    += y4m_video_source.h
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER)    += yuv_video_source.h
43

Yaowu Xu's avatar
Yaowu Xu committed
44 45 46 47 48 49 50
#LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += level_test.cc
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += active_map_refresh_test.cc
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += active_map_test.cc
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += borders_test.cc
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += cpu_speed_test.cc
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += frame_size_tests.cc
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += lossless_test.cc
51 52 53

LIBAOM_TEST_SRCS-yes                   += decode_test_driver.cc
LIBAOM_TEST_SRCS-yes                   += decode_test_driver.h
54
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER)    += encode_test_driver.cc
55
LIBAOM_TEST_SRCS-yes                   += encode_test_driver.h
56

57
## IVF writing.
58
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER)    += ../ivfenc.c ../ivfenc.h
59

60
## Y4m parsing.
61
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER)    += y4m_test.cc ../y4menc.c ../y4menc.h
62

John Koleszar's avatar
John Koleszar committed
63
## WebM Parsing
64
ifeq ($(CONFIG_WEBM_IO), yes)
65 66 67 68
LIBWEBM_PARSER_SRCS += ../third_party/libwebm/mkvparser/mkvparser.cc
LIBWEBM_PARSER_SRCS += ../third_party/libwebm/mkvparser/mkvreader.cc
LIBWEBM_PARSER_SRCS += ../third_party/libwebm/mkvparser/mkvparser.h
LIBWEBM_PARSER_SRCS += ../third_party/libwebm/mkvparser/mkvreader.h
69 70 71 72 73
LIBAOM_TEST_SRCS-$(CONFIG_AV1_DECODER) += $(LIBWEBM_PARSER_SRCS)
LIBAOM_TEST_SRCS-$(CONFIG_AV1_DECODER) += ../tools_common.h
LIBAOM_TEST_SRCS-$(CONFIG_AV1_DECODER) += ../webmdec.cc
LIBAOM_TEST_SRCS-$(CONFIG_AV1_DECODER) += ../webmdec.h
LIBAOM_TEST_SRCS-$(CONFIG_AV1_DECODER) += webm_video_source.h
74
endif
75

76
LIBAOM_TEST_SRCS-$(CONFIG_AV1_DECODER) += decode_api_test.cc
77

Yaowu Xu's avatar
Yaowu Xu committed
78
# Currently we only support decoder perf tests for av1. Also they read from WebM
79
# files, so WebM IO is required.
Yaowu Xu's avatar
Yaowu Xu committed
80
ifeq ($(CONFIG_DECODE_PERF_TESTS)$(CONFIG_AV1_DECODER)$(CONFIG_WEBM_IO), \
81
      yesyesyes)
82
LIBAOM_TEST_SRCS-yes                   += decode_perf_test.cc
83
endif
84

Yaowu Xu's avatar
Yaowu Xu committed
85
ifeq ($(CONFIG_ENCODE_PERF_TESTS)$(CONFIG_AV1_ENCODER), yesyes)
86
LIBAOM_TEST_SRCS-yes += encode_perf_test.cc
Joshua Litt's avatar
Joshua Litt committed
87 88
endif

James Zern's avatar
James Zern committed
89
## Multi-codec / unconditional black box tests.
Yaowu Xu's avatar
Yaowu Xu committed
90
ifeq ($(findstring yes,$(CONFIG_AV1_ENCODER)),yes)
91 92 93
LIBAOM_TEST_SRCS-yes += active_map_refresh_test.cc
LIBAOM_TEST_SRCS-yes += active_map_test.cc
LIBAOM_TEST_SRCS-yes += end_to_end_test.cc
94 95
endif

96 97 98 99 100 101 102 103
##
## WHITE BOX TESTS
##
## Whitebox tests invoke functions not exposed via the public API. Certain
## shared library builds don't make these functions accessible.
##
ifeq ($(CONFIG_SHARED),)

Yaowu Xu's avatar
Yaowu Xu committed
104 105
## AV1
ifeq ($(CONFIG_AV1),yes)
106 107

# These tests require both the encoder and decoder to be built.
Yaowu Xu's avatar
Yaowu Xu committed
108
ifeq ($(CONFIG_AV1_ENCODER)$(CONFIG_AV1_DECODER),yesyes)
109
# IDCT test currently depends on FDCT function
110 111 112 113
LIBAOM_TEST_SRCS-yes                   += idct8x8_test.cc
LIBAOM_TEST_SRCS-yes                   += partial_idct_test.cc
LIBAOM_TEST_SRCS-yes                   += superframe_test.cc
LIBAOM_TEST_SRCS-yes                   += tile_independence_test.cc
Yunqing Wang's avatar
Yunqing Wang committed
114
LIBAOM_TEST_SRCS-yes                   += ethread_test.cc
Yunqing Wang's avatar
Yunqing Wang committed
115
LIBAOM_TEST_SRCS-yes                   += motion_vector_test.cc
116
ifneq ($(CONFIG_ANS),yes)
117
LIBAOM_TEST_SRCS-yes                   += binary_codes_test.cc
118
endif
Yunqing Wang's avatar
Yunqing Wang committed
119 120 121
ifeq ($(CONFIG_EXT_TILE),yes)
LIBAOM_TEST_SRCS-yes                   += av1_ext_tile_test.cc
endif
122
ifeq ($(CONFIG_ANS),yes)
123
LIBAOM_TEST_SRCS-yes                   += ans_test.cc
124
LIBAOM_TEST_SRCS-yes                   += ans_codec_test.cc
125
else
126
LIBAOM_TEST_SRCS-yes                   += boolcoder_test.cc
Michael Bebenita's avatar
Michael Bebenita committed
127 128 129
ifeq ($(CONFIG_ACCOUNTING),yes)
LIBAOM_TEST_SRCS-yes                   += accounting_test.cc
endif
130
endif
131 132
LIBAOM_TEST_SRCS-yes                   += divu_small_test.cc
#LIBAOM_TEST_SRCS-yes                   += encoder_parms_get_to_decoder.cc
133
endif
134

Angie Chiang's avatar
Angie Chiang committed
135
LIBAOM_TEST_SRCS-$(CONFIG_ADAPT_SCAN)  += scan_test.cc
Angie Chiang's avatar
Angie Chiang committed
136
LIBAOM_TEST_SRCS-yes                   += convolve_test.cc
137
LIBAOM_TEST_SRCS-yes                   += lpf_8_test.cc
138
LIBAOM_TEST_SRCS-$(CONFIG_CDEF)        += dering_test.cc
139
LIBAOM_TEST_SRCS-$(CONFIG_CDEF)        += clpf_test.cc
140 141 142 143
LIBAOM_TEST_SRCS-yes                   += simd_cmp_impl.h
LIBAOM_TEST_SRCS-$(HAVE_SSE2)          += simd_cmp_sse2.cc
LIBAOM_TEST_SRCS-$(HAVE_SSSE3)         += simd_cmp_ssse3.cc
LIBAOM_TEST_SRCS-$(HAVE_SSE4_1)        += simd_cmp_sse4.cc
144
LIBAOM_TEST_SRCS-$(HAVE_AVX2)          += simd_cmp_avx2.cc
145
LIBAOM_TEST_SRCS-$(HAVE_NEON)          += simd_cmp_neon.cc
146 147 148 149
LIBAOM_TEST_SRCS-yes                   += simd_impl.h
LIBAOM_TEST_SRCS-$(HAVE_SSE2)          += simd_sse2_test.cc
LIBAOM_TEST_SRCS-$(HAVE_SSSE3)         += simd_ssse3_test.cc
LIBAOM_TEST_SRCS-$(HAVE_SSE4_1)        += simd_sse4_test.cc
150
LIBAOM_TEST_SRCS-$(HAVE_AVX2)          += simd_avx2_test.cc
151
LIBAOM_TEST_SRCS-$(HAVE_NEON)          += simd_neon_test.cc
152
LIBAOM_TEST_SRCS-yes                   += intrapred_test.cc
Alex Converse's avatar
Alex Converse committed
153
LIBAOM_TEST_SRCS-$(CONFIG_INTRABC)     += intrabc_test.cc
Yaowu Xu's avatar
Yaowu Xu committed
154 155 156 157 158 159 160 161 162 163 164 165
#LIBAOM_TEST_SRCS-$(CONFIG_AV1_DECODER) += av1_thread_test.cc
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += dct16x16_test.cc
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += dct32x32_test.cc
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += fdct4x4_test.cc
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += fdct8x8_test.cc
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += hadamard_test.cc
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += minmax_test.cc
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += variance_test.cc
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += error_block_test.cc
#LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_quantize_test.cc
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += subtract_test.cc
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += arf_freq_test.cc
166 167 168
ifneq ($(CONFIG_NEW_QUANT), yes)
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += quantize_func_test.cc
endif
169
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += block_error_test.cc
170

Yaowu Xu's avatar
Yaowu Xu committed
171 172 173 174 175
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_inv_txfm_test.cc
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_dct_test.cc
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_fht4x4_test.cc
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_fht8x8_test.cc
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_fht16x16_test.cc
176
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_fht32x32_test.cc
Urvang Joshi's avatar
Urvang Joshi committed
177 178 179
ifeq ($(CONFIG_TX64X64),yes)
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_fht64x64_test.cc
endif
180
ifeq ($(CONFIG_EXT_TX),yes)
181 182
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_fht4x8_test.cc
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_fht8x4_test.cc
183 184
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_fht8x16_test.cc
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_fht16x8_test.cc
185 186
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_fht16x32_test.cc
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_fht32x16_test.cc
187
endif
James Zern's avatar
James Zern committed
188

Yaowu Xu's avatar
Yaowu Xu committed
189 190 191 192
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += sum_squares_test.cc
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += subtract_test.cc
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += blend_a64_mask_test.cc
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += blend_a64_mask_1d_test.cc
193 194

ifeq ($(CONFIG_EXT_INTER),yes)
195 196
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += masked_variance_test.cc
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += masked_sad_test.cc
Yaowu Xu's avatar
Yaowu Xu committed
197
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_wedge_utils_test.cc
198
endif
199

200 201 202 203 204
## Skip the unit test written for 4-tap filter intra predictor, because we
## revert to 3-tap filter.
## ifeq ($(CONFIG_FILTER_INTRA),yes)
## LIBAOM_TEST_SRCS-$(HAVE_SSE4_1) += filterintra_predictors_test.cc
## endif
205

Yue Chen's avatar
Yue Chen committed
206
ifeq ($(CONFIG_MOTION_VAR),yes)
Yaowu Xu's avatar
Yaowu Xu committed
207 208
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += obmc_sad_test.cc
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += obmc_variance_test.cc
209 210
endif

211
ifeq ($(CONFIG_HIGHBITDEPTH),yes)
212
ifeq ($(CONFIG_AV1_ENCODER),yes)
Yaowu Xu's avatar
Yaowu Xu committed
213 214
LIBAOM_TEST_SRCS-$(HAVE_SSE4_1) += av1_quantize_test.cc
LIBAOM_TEST_SRCS-$(HAVE_SSE4_1) += av1_highbd_iht_test.cc
215
endif
216
endif # CONFIG_HIGHBITDEPTH
Yaowu Xu's avatar
Yaowu Xu committed
217
endif # AV1
James Zern's avatar
James Zern committed
218 219

## Multi-codec / unconditional whitebox tests.
Yaowu Xu's avatar
Yaowu Xu committed
220

Yaowu Xu's avatar
Yaowu Xu committed
221
ifeq ($(CONFIG_AV1_ENCODER),yes)
222
LIBAOM_TEST_SRCS-yes += avg_test.cc
James Zern's avatar
James Zern committed
223
endif
224
ifeq ($(CONFIG_INTERNAL_STATS),yes)
225
LIBAOM_TEST_SRCS-$(CONFIG_HIGHBITDEPTH) += hbd_metrics_test.cc
226
endif
227
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += sad_test.cc
Yaowu Xu's avatar
Yaowu Xu committed
228 229
LIBAOM_TEST_SRCS-$(CONFIG_AV1) += av1_txfm_test.h
LIBAOM_TEST_SRCS-$(CONFIG_AV1) += av1_txfm_test.cc
230 231 232 233
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_fwd_txfm1d_test.cc
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_inv_txfm1d_test.cc
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_fwd_txfm2d_test.cc
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_inv_txfm2d_test.cc
Yaowu Xu's avatar
Yaowu Xu committed
234 235
LIBAOM_TEST_SRCS-$(CONFIG_AV1) += av1_convolve_test.cc
LIBAOM_TEST_SRCS-$(CONFIG_AV1) += av1_convolve_optimz_test.cc
236 237
ifneq ($(findstring yes,$(CONFIG_GLOBAL_MOTION)$(CONFIG_WARPED_MOTION)),)
LIBAOM_TEST_SRCS-$(HAVE_SSE2) += warp_filter_test_util.h
238
LIBAOM_TEST_SRCS-$(HAVE_SSE2) += warp_filter_test.cc warp_filter_test_util.cc
239
endif
David Barker's avatar
David Barker committed
240
ifeq ($(CONFIG_LOOP_RESTORATION),yes)
241 242 243
LIBAOM_TEST_SRCS-$(HAVE_SSE2) += hiprec_convolve_test_util.h
LIBAOM_TEST_SRCS-$(HAVE_SSE2) += hiprec_convolve_test.cc
LIBAOM_TEST_SRCS-$(HAVE_SSE2) += hiprec_convolve_test_util.cc
David Barker's avatar
David Barker committed
244 245
LIBAOM_TEST_SRCS-$(HAVE_SSE4_1) += selfguided_filter_test.cc
endif
David Barker's avatar
David Barker committed
246 247 248 249
ifeq ($(CONFIG_CONVOLVE_ROUND),yes)
LIBAOM_TEST_SRCS-$(HAVE_SSE2) += av1_convolve_2d_test_util.h
LIBAOM_TEST_SRCS-$(HAVE_SSE2) += av1_convolve_2d_test.cc
LIBAOM_TEST_SRCS-$(HAVE_SSE2) += av1_convolve_2d_test_util.cc
250
LIBAOM_TEST_SRCS-yes          += convolve_round_test.cc
David Barker's avatar
David Barker committed
251
endif
252

253 254 255 256
ifeq ($(CONFIG_GLOBAL_MOTION)$(CONFIG_AV1_ENCODER),yesyes)
LIBAOM_TEST_SRCS-$(HAVE_SSE4_1) += corner_match_test.cc
endif

257 258
TEST_INTRA_PRED_SPEED_SRCS-yes := test_intra_pred_speed.cc
TEST_INTRA_PRED_SPEED_SRCS-yes += ../md5_utils.h ../md5_utils.c
James Zern's avatar
James Zern committed
259

James Zern's avatar
James Zern committed
260
endif # CONFIG_SHARED
261

James Zern's avatar
James Zern committed
262
include $(SRC_PATH_BARE)/test/test-data.mk