Remove CONFIG_{DE,EN}CODERS from the CMake build.

Use CONFIG_AV1_{DE,EN}CODER to control decoder and
encoder support inclusion instead.

BUG=aomedia:76,aomedia:508

Change-Id: Ib150ae382b301885589f30d9b6e98d3bfdd1afce
This commit is contained in:
Tom Finegan 2017-05-16 15:01:54 -07:00
Родитель fea5f401ab
Коммит ba02c24cfe
9 изменённых файлов: 171 добавлений и 145 удалений

Просмотреть файл

@ -121,15 +121,15 @@ set(AOM_COMMON_APP_UTIL_SOURCES
"${AOM_ROOT}/md5_utils.h"
"${AOM_ROOT}/tools_common.c"
"${AOM_ROOT}/tools_common.h"
"${AOM_ROOT}/video_common.h")
"${AOM_ROOT}/video_common.h"
"${AOM_ROOT}/y4menc.c"
"${AOM_ROOT}/y4menc.h")
set(AOM_DECODER_APP_UTIL_SOURCES
"${AOM_ROOT}/ivfdec.c"
"${AOM_ROOT}/ivfdec.h"
"${AOM_ROOT}/video_reader.c"
"${AOM_ROOT}/video_reader.h"
"${AOM_ROOT}/y4menc.c"
"${AOM_ROOT}/y4menc.h")
"${AOM_ROOT}/video_reader.h")
set(AOM_ENCODER_APP_UTIL_SOURCES
"${AOM_ROOT}/ivfenc.c"
@ -197,98 +197,105 @@ foreach (aom_lib ${AOM_LIB_TARGETS})
add_dependencies(${aom_lib} aom_rtcd)
endif ()
endforeach ()
#
# Application and application support targets.
#
add_library(aom_common_app_util OBJECT ${AOM_COMMON_APP_UTIL_SOURCES})
add_library(aom_decoder_app_util OBJECT ${AOM_DECODER_APP_UTIL_SOURCES})
add_library(aom_encoder_app_util OBJECT ${AOM_ENCODER_APP_UTIL_SOURCES})
add_executable(aom_cx_set_ref
"${AOM_ROOT}/examples/aom_cx_set_ref.c"
$<TARGET_OBJECTS:aom_common_app_util>
$<TARGET_OBJECTS:aom_encoder_app_util>)
add_executable(aomdec
if (CONFIG_AV1_DECODER)
add_library(aom_decoder_app_util OBJECT ${AOM_DECODER_APP_UTIL_SOURCES})
add_executable(aomdec
"${AOM_ROOT}/aomdec.c"
$<TARGET_OBJECTS:aom_common_app_util>
$<TARGET_OBJECTS:aom_decoder_app_util>)
add_executable(aomenc
"${AOM_ROOT}/aomenc.c"
$<TARGET_OBJECTS:aom_common_app_util>
$<TARGET_OBJECTS:aom_encoder_app_util>
$<TARGET_OBJECTS:aom_encoder_stats>)
if (CONFIG_ANALYZER)
add_executable(analyzer
"${AOM_ROOT}/examples/analyzer.cc"
$<TARGET_OBJECTS:aom_common_app_util>
$<TARGET_OBJECTS:aom_decoder_app_util>)
target_link_libraries(analyzer ${AOM_LIB_LINK_TYPE} ${wxWidgets_LIBRARIES})
set(AOM_APP_TARGETS ${AOM_APP_TARGETS} analyzer)
endif ()
add_executable(decode_to_md5
"${AOM_ROOT}/examples/decode_to_md5.c"
$<TARGET_OBJECTS:aom_common_app_util>
$<TARGET_OBJECTS:aom_decoder_app_util>)
add_executable(decode_with_drops
"${AOM_ROOT}/examples/decode_with_drops.c"
$<TARGET_OBJECTS:aom_common_app_util>
$<TARGET_OBJECTS:aom_decoder_app_util>)
add_executable(lossless_encoder
"${AOM_ROOT}/examples/lossless_encoder.c"
$<TARGET_OBJECTS:aom_common_app_util>
$<TARGET_OBJECTS:aom_encoder_app_util>)
add_executable(set_maps
"${AOM_ROOT}/examples/set_maps.c"
$<TARGET_OBJECTS:aom_common_app_util>
$<TARGET_OBJECTS:aom_encoder_app_util>)
add_executable(simple_decoder
"${AOM_ROOT}/examples/simple_decoder.c"
$<TARGET_OBJECTS:aom_common_app_util>
$<TARGET_OBJECTS:aom_decoder_app_util>)
if (CONFIG_INSPECTION)
add_executable(inspect
"${AOM_ROOT}/examples/inspect.c"
$<TARGET_OBJECTS:aom_common_app_util>
$<TARGET_OBJECTS:aom_decoder_app_util>)
set(AOM_APP_TARGETS ${AOM_APP_TARGETS} inspect)
if (EMSCRIPTEN)
add_preproc_definition(_POSIX_SOURCE)
add_compiler_flag_if_supported("-s TOTAL_MEMORY=134217728")
add_compiler_flag_if_supported("-s MODULARIZE=1")
add_compiler_flag_if_supported("-s EXPORT_NAME=\"\'DecoderModule\'\"")
add_compiler_flag_if_supported("--memory-init-file 0")
if ("${CMAKE_BUILD_TYPE}" STREQUAL "")
# Default to -O3 when no build type specified.
add_compiler_flag_if_supported("-O3")
endif ()
em_link_post_js(inspect "${AOM_ROOT}/tools/inspect-post.js")
if (CONFIG_ANALYZER)
add_executable(analyzer
"${AOM_ROOT}/examples/analyzer.cc"
$<TARGET_OBJECTS:aom_common_app_util>
$<TARGET_OBJECTS:aom_decoder_app_util>)
target_link_libraries(analyzer ${AOM_LIB_LINK_TYPE} ${wxWidgets_LIBRARIES})
set(AOM_APP_TARGETS ${AOM_APP_TARGETS} analyzer)
endif ()
add_executable(decode_to_md5
"${AOM_ROOT}/examples/decode_to_md5.c"
$<TARGET_OBJECTS:aom_common_app_util>
$<TARGET_OBJECTS:aom_decoder_app_util>)
add_executable(decode_with_drops
"${AOM_ROOT}/examples/decode_with_drops.c"
$<TARGET_OBJECTS:aom_common_app_util>
$<TARGET_OBJECTS:aom_decoder_app_util>)
add_executable(simple_decoder
"${AOM_ROOT}/examples/simple_decoder.c"
$<TARGET_OBJECTS:aom_common_app_util>
$<TARGET_OBJECTS:aom_decoder_app_util>)
if (CONFIG_INSPECTION)
add_executable(inspect
"${AOM_ROOT}/examples/inspect.c"
$<TARGET_OBJECTS:aom_common_app_util>
$<TARGET_OBJECTS:aom_decoder_app_util>)
set(AOM_APP_TARGETS ${AOM_APP_TARGETS} inspect)
if (EMSCRIPTEN)
add_preproc_definition(_POSIX_SOURCE)
add_compiler_flag_if_supported("-s TOTAL_MEMORY=134217728")
add_compiler_flag_if_supported("-s MODULARIZE=1")
add_compiler_flag_if_supported("-s EXPORT_NAME=\"\'DecoderModule\'\"")
add_compiler_flag_if_supported("--memory-init-file 0")
if ("${CMAKE_BUILD_TYPE}" STREQUAL "")
# Default to -O3 when no build type specified.
add_compiler_flag_if_supported("-O3")
endif ()
em_link_post_js(inspect "${AOM_ROOT}/tools/inspect-post.js")
endif ()
endif ()
# Add decoder apps to app target list.
set(AOM_APP_TARGETS ${AOM_APP_TARGETS} aomdec decode_to_md5 decode_with_drops
simple_decoder)
endif ()
add_executable(simple_encoder
"${AOM_ROOT}/examples/simple_encoder.c"
$<TARGET_OBJECTS:aom_common_app_util>
$<TARGET_OBJECTS:aom_encoder_app_util>)
add_executable(twopass_encoder
"${AOM_ROOT}/examples/twopass_encoder.c"
$<TARGET_OBJECTS:aom_common_app_util>
$<TARGET_OBJECTS:aom_encoder_app_util>)
if (CONFIG_AV1_ENCODER)
add_library(aom_encoder_app_util OBJECT ${AOM_ENCODER_APP_UTIL_SOURCES})
add_executable(aomenc
"${AOM_ROOT}/aomenc.c"
$<TARGET_OBJECTS:aom_common_app_util>
$<TARGET_OBJECTS:aom_encoder_app_util>
$<TARGET_OBJECTS:aom_encoder_stats>)
add_executable(lossless_encoder
"${AOM_ROOT}/examples/lossless_encoder.c"
$<TARGET_OBJECTS:aom_common_app_util>
$<TARGET_OBJECTS:aom_encoder_app_util>)
add_executable(set_maps
"${AOM_ROOT}/examples/set_maps.c"
$<TARGET_OBJECTS:aom_common_app_util>
$<TARGET_OBJECTS:aom_encoder_app_util>)
add_executable(simple_encoder
"${AOM_ROOT}/examples/simple_encoder.c"
$<TARGET_OBJECTS:aom_common_app_util>
$<TARGET_OBJECTS:aom_encoder_app_util>)
add_executable(twopass_encoder
"${AOM_ROOT}/examples/twopass_encoder.c"
$<TARGET_OBJECTS:aom_common_app_util>
$<TARGET_OBJECTS:aom_encoder_app_util>)
# List of app targets.
set(AOM_APP_TARGETS ${AOM_APP_TARGETS} aom_cx_set_ref aomdec aomenc
decode_to_md5 decode_with_drops lossless_encoder set_maps simple_decoder
simple_encoder twopass_encoder)
# Add encoder apps to app target list.
set(AOM_APP_TARGETS ${AOM_APP_TARGETS} aomenc lossless_encoder set_maps
simple_encoder twopass_encoder)
endif ()
if (CONFIG_AV1_DECODER AND CONFIG_AV1_ENCODER)
add_executable(aom_cx_set_ref
"${AOM_ROOT}/examples/aom_cx_set_ref.c"
$<TARGET_OBJECTS:aom_common_app_util>
$<TARGET_OBJECTS:aom_encoder_app_util>)
set(AOM_APP_TARGETS ${AOM_APP_TARGETS} aom_cx_set_ref)
endif ()
foreach (aom_app ${AOM_APP_TARGETS})
target_link_libraries(${aom_app} ${AOM_LIB_LINK_TYPE} aom)
@ -317,8 +324,13 @@ if (CONFIG_WEBM_IO)
endif ()
# Add to existing targets.
target_sources(aom_decoder_app_util PUBLIC ${AOM_WEBM_DECODER_SOURCES})
target_sources(aom_encoder_app_util PUBLIC ${AOM_WEBM_ENCODER_SOURCES})
if (CONFIG_AV1_DECODER)
target_sources(aom_decoder_app_util PUBLIC ${AOM_WEBM_DECODER_SOURCES})
endif ()
if (CONFIG_AV1_ENCODER)
target_sources(aom_encoder_app_util PUBLIC ${AOM_WEBM_ENCODER_SOURCES})
endif ()
foreach (aom_app ${AOM_APP_TARGETS})
target_sources(${aom_app} PUBLIC $<TARGET_OBJECTS:webm>)
@ -360,16 +372,28 @@ endif ()
# Aomedia install rule.
set(AOM_INSTALL_INCS
"${AOM_ROOT}/aom/aom.h"
"${AOM_ROOT}/aom/aomcx.h"
"${AOM_ROOT}/aom/aomdx.h"
"${AOM_ROOT}/aom/aom_codec.h"
"${AOM_ROOT}/aom/aom_frame_buffer.h"
"${AOM_ROOT}/aom/aom_image.h"
"${AOM_ROOT}/aom/aom_integer.h"
"${AOM_ROOT}/aom/aom_decoder.h"
"${AOM_ROOT}/aom/aom_encoder.h"
"${AOM_ROOT}/aom/aom.h")
set(AOM_INSTALL_BINS aomdec aomenc)
if (CONFIG_AV1_DECODER)
set(AOM_INSTALL_BINS ${AOM_INSTALL_BINS} aomdec)
set(AOM_INSTALL_INCS
${AOM_INSTALL_INCS}
"${AOM_ROOT}/aom/aom_decoder.h"
"${AOM_ROOT}/aom/aomdx.h")
endif ()
if (CONFIG_AV1_ENCODER)
set(AOM_INSTALL_INCS
${AOM_INSTALL_INCS}
"${AOM_ROOT}/aom/aomcx.h"
"${AOM_ROOT}/aom/aom_encoder.h")
set(AOM_INSTALL_BINS ${AOM_INSTALL_BINS} aomenc)
endif ()
set(AOM_INSTALL_LIBS aom)
install(FILES ${AOM_INSTALL_INCS}

Просмотреть файл

@ -23,7 +23,6 @@ set(AOM_DSP_COMMON_SOURCES
"${AOM_ROOT}/aom_dsp/loopfilter.c"
"${AOM_ROOT}/aom_dsp/prob.c"
"${AOM_ROOT}/aom_dsp/prob.h"
"${AOM_ROOT}/aom_dsp/sad.c"
"${AOM_ROOT}/aom_dsp/simd/v128_intrinsics.h"
"${AOM_ROOT}/aom_dsp/simd/v128_intrinsics_c.h"
"${AOM_ROOT}/aom_dsp/simd/v256_intrinsics.h"
@ -177,6 +176,8 @@ set(AOM_DSP_COMMON_INTRIN_MSA
if (CONFIG_HIGHBITDEPTH)
set(AOM_DSP_COMMON_ASM_SSE2
${AOM_DSP_COMMON_ASM_SSE2}
"${AOM_ROOT}/aom_dsp/x86/aom_high_subpixel_8t_sse2.asm"
"${AOM_ROOT}/aom_dsp/x86/aom_high_subpixel_bilinear_sse2.asm"
"${AOM_ROOT}/aom_dsp/x86/highbd_intrapred_sse2.asm")
set(AOM_DSP_COMMON_INTRIN_SSE2
@ -223,7 +224,7 @@ if (CONFIG_AV1)
"${AOM_ROOT}/aom_dsp/x86/inv_txfm_sse2.h")
endif ()
if (CONFIG_DECODERS)
if (CONFIG_AV1_DECODER)
set(AOM_DSP_DECODER_SOURCES
"${AOM_ROOT}/aom_dsp/binary_codes_reader.c"
"${AOM_ROOT}/aom_dsp/binary_codes_reader.h"
@ -250,7 +251,7 @@ if (CONFIG_DECODERS)
endif ()
endif ()
if (CONFIG_ENCODERS)
if (CONFIG_AV1_ENCODER)
set(AOM_DSP_ENCODER_SOURCES
"${AOM_ROOT}/aom_dsp/binary_codes_writer.c"
"${AOM_ROOT}/aom_dsp/binary_codes_writer.h"
@ -259,6 +260,7 @@ if (CONFIG_ENCODERS)
"${AOM_ROOT}/aom_dsp/bitwriter_buffer.h"
"${AOM_ROOT}/aom_dsp/psnr.c"
"${AOM_ROOT}/aom_dsp/psnr.h"
"${AOM_ROOT}/aom_dsp/sad.c"
"${AOM_ROOT}/aom_dsp/variance.c"
"${AOM_ROOT}/aom_dsp/variance.h")
@ -350,9 +352,7 @@ if (CONFIG_ENCODERS)
"${AOM_ROOT}/aom_dsp/x86/highbd_sad4d_sse2.asm"
"${AOM_ROOT}/aom_dsp/x86/highbd_sad_sse2.asm"
"${AOM_ROOT}/aom_dsp/x86/highbd_subpel_variance_impl_sse2.asm"
"${AOM_ROOT}/aom_dsp/x86/highbd_variance_impl_sse2.asm"
"${AOM_ROOT}/aom_dsp/x86/aom_high_subpixel_8t_sse2.asm"
"${AOM_ROOT}/aom_dsp/x86/aom_high_subpixel_bilinear_sse2.asm")
"${AOM_ROOT}/aom_dsp/x86/highbd_variance_impl_sse2.asm")
set(AOM_DSP_ENCODER_INTRIN_SSE2
${AOM_DSP_ENCODER_INTRIN_SSE2}
@ -411,13 +411,13 @@ function (setup_aom_dsp_targets)
set(AOM_LIB_TARGETS ${AOM_LIB_TARGETS} aom_dsp_common)
target_sources(aom PUBLIC $<TARGET_OBJECTS:aom_dsp_common>)
if (CONFIG_DECODERS)
if (CONFIG_AV1_DECODER)
add_library(aom_dsp_decoder OBJECT ${AOM_DSP_DECODER_SOURCES})
set(AOM_LIB_TARGETS ${AOM_LIB_TARGETS} aom_dsp_decoder)
target_sources(aom PUBLIC $<TARGET_OBJECTS:aom_dsp_decoder>)
endif ()
if (CONFIG_ENCODERS)
if (CONFIG_AV1_ENCODER)
add_library(aom_dsp_encoder OBJECT ${AOM_DSP_ENCODER_SOURCES})
set(AOM_LIB_TARGETS ${AOM_LIB_TARGETS} aom_dsp_encoder)
target_sources(aom PUBLIC $<TARGET_OBJECTS:aom_dsp_encoder>)
@ -427,14 +427,14 @@ function (setup_aom_dsp_targets)
add_asm_library("aom_dsp_common_sse2" "AOM_DSP_COMMON_ASM_SSE2" "aom")
add_intrinsics_object_library("-msse2" "sse2" "aom_dsp_common"
"AOM_DSP_COMMON_INTRIN_SSE2")
if (CONFIG_ENCODERS)
if (CONFIG_AV1_ENCODER)
add_asm_library("aom_dsp_encoder_sse2" "AOM_DSP_ENCODER_ASM_SSE2" "aom")
add_intrinsics_object_library("-msse2" "sse2" "aom_dsp_encoder"
"AOM_DSP_ENCODER_INTRIN_SSE2")
endif()
endif ()
if (HAVE_SSE3 AND CONFIG_ENCODERS)
if (HAVE_SSE3 AND CONFIG_AV1_ENCODER)
add_asm_library("aom_dsp_encoder_sse3" "AOM_DSP_ENCODER_INTRIN_SSE3" "aom")
endif ()
@ -443,7 +443,7 @@ function (setup_aom_dsp_targets)
add_intrinsics_object_library("-mssse3" "ssse3" "aom_dsp_common"
"AOM_DSP_COMMON_INTRIN_SSSE3")
if (CONFIG_ENCODERS)
if (CONFIG_AV1_ENCODER)
if ("${AOM_TARGET_CPU}" STREQUAL "x86_64")
list(APPEND AOM_DSP_ENCODER_ASM_SSSE3
${AOM_DSP_ENCODER_ASM_SSSE3_X86_64})
@ -457,7 +457,7 @@ function (setup_aom_dsp_targets)
if (HAVE_SSE4_1)
add_intrinsics_object_library("-msse4.1" "sse4_1" "aom_dsp_common"
"AOM_DSP_COMMON_INTRIN_SSE4_1")
if (CONFIG_ENCODERS)
if (CONFIG_AV1_ENCODER)
if (AOM_DSP_ENCODER_INTRIN_SSE4_1)
add_intrinsics_object_library("-msse4.1" "sse4_1" "aom_dsp_encoder"
"AOM_DSP_ENCODER_INTRIN_SSE4_1")
@ -468,14 +468,16 @@ function (setup_aom_dsp_targets)
endif ()
if (HAVE_AVX AND "${AOM_TARGET_CPU}" STREQUAL "x86_64")
add_asm_library("aom_dsp_encoder_avx" "AOM_DSP_ENCODER_AVX_ASM_X86_64"
"aom")
if (CONFIG_AV1_ENCODER)
add_asm_library("aom_dsp_encoder_avx" "AOM_DSP_ENCODER_AVX_ASM_X86_64"
"aom")
endif ()
endif ()
if (HAVE_AVX2)
add_intrinsics_object_library("-mavx2" "avx2" "aom_dsp_common"
"AOM_DSP_COMMON_INTRIN_AVX2")
if (CONFIG_ENCODERS)
if (CONFIG_AV1_ENCODER)
add_intrinsics_object_library("-mavx2" "avx2" "aom_dsp_encoder"
"AOM_DSP_ENCODER_INTRIN_AVX2")
endif ()
@ -502,7 +504,7 @@ function (setup_aom_dsp_targets)
if (HAVE_MSA)
add_intrinsics_object_library("" "msa" "aom_dsp_common"
"AOM_DSP_COMMON_INTRIN_MSA")
if (CONFIG_ENCODERS)
if (CONFIG_AV1_ENCODER)
add_intrinsics_object_library("" "msa" "aom_dsp_encoder"
"AOM_DSP_ENCODER_INTRIN_MSA")
endif ()

Просмотреть файл

@ -589,7 +589,7 @@ if (aom_config("CONFIG_AV1") eq "yes") {
}
} # CONFIG_AV1
if (aom_config("CONFIG_ENCODERS") eq "yes") {
if (aom_config("CONFIG_AV1_ENCODER") eq "yes") {
#
# Block subtraction
#
@ -890,9 +890,9 @@ if (aom_config("CONFIG_INTERNAL_STATS") eq "yes") {
add_proto qw/void aom_highbd_ssim_parms_8x8/, "const uint16_t *s, int sp, const uint16_t *r, int rp, uint32_t *sum_s, uint32_t *sum_r, uint32_t *sum_sq_s, uint32_t *sum_sq_r, uint32_t *sum_sxr";
}
}
} # CONFIG_ENCODERS
} # CONFIG_AV1_ENCODER
if (aom_config("CONFIG_ENCODERS") eq "yes") {
if (aom_config("CONFIG_AV1_ENCODER") eq "yes") {
#
# Specialty Variance
@ -1519,6 +1519,6 @@ if (aom_config("CONFIG_EXT_INTER") eq "yes") {
}
}
} # CONFIG_ENCODERS
} # CONFIG_AV1_ENCODER
1;

Просмотреть файл

@ -25,7 +25,7 @@
#endif
#include "aom/aom_encoder.h"
#if CONFIG_DECODERS
#if CONFIG_AV1_DECODER
#include "aom/aom_decoder.h"
#endif
@ -1337,13 +1337,13 @@ static void initialize_encoder(struct stream_state *stream,
ctx_exit_on_error(&stream->encoder, "Failed to control codec");
}
#if CONFIG_DECODERS
#if CONFIG_AV1_DECODER
if (global->test_decode != TEST_DECODE_OFF) {
const AvxInterface *decoder = get_aom_decoder_by_name(global->codec->name);
aom_codec_dec_cfg_t cfg = { 0, 0, 0 };
aom_codec_dec_init(&stream->decoder, decoder->codec_interface(), &cfg, 0);
#if CONFIG_AV1_DECODER && CONFIG_EXT_TILE
#if CONFIG_EXT_TILE
if (strcmp(global->codec->name, "av1") == 0) {
aom_codec_control(&stream->decoder, AV1_SET_DECODE_TILE_ROW, -1);
ctx_exit_on_error(&stream->decoder, "Failed to set decode_tile_row");
@ -1503,7 +1503,7 @@ static void get_cx_data(struct stream_state *stream,
stream->nbytes += pkt->data.raw.sz;
*got_data = 1;
#if CONFIG_DECODERS
#if CONFIG_AV1_DECODER
if (global->test_decode != TEST_DECODE_OFF && !stream->mismatch_seen) {
aom_codec_decode(&stream->decoder, pkt->data.frame.buf,
(unsigned int)pkt->data.frame.sz, NULL, 0);

Просмотреть файл

@ -62,8 +62,6 @@ set(CONFIG_INTERNAL_STATS 0 CACHE BOOL "Internal flag.")
set(CONFIG_AV1_ENCODER 1 CACHE BOOL "Enable AV1 encoder.")
set(CONFIG_AV1_DECODER 1 CACHE BOOL "Enable AV1 decoder.")
set(CONFIG_AV1 1 CACHE BOOL "Internal flag.")
set(CONFIG_ENCODERS 1 CACHE BOOL "Enable encoding.")
set(CONFIG_DECODERS 1 CACHE BOOL "Enable decoding.")
set(CONFIG_STATIC_MSVCRT 0 CACHE BOOL "Internal flag.")
set(CONFIG_SPATIAL_RESAMPLING 1 CACHE BOOL "Internal flag.")
set(CONFIG_REALTIME_ONLY 0 CACHE BOOL "Internal flag.")

Просмотреть файл

@ -138,6 +138,10 @@ if (ENABLE_DISTCC)
endif ()
endif ()
if (NOT CONFIG_AV1_DECODER AND NOT CONFIG_AV1_ENCODER)
message(FATAL_ERROR "Decoder and encoder disabled, nothing to build.")
endif ()
# Test compiler flags.
if (MSVC)
add_compiler_flag_if_supported("/W3")

Просмотреть файл

@ -23,6 +23,8 @@ set(AOM_UNIT_TEST_COMMON_SOURCES
"${AOM_ROOT}/test/clear_system_state.h"
"${AOM_ROOT}/test/codec_factory.h"
"${AOM_ROOT}/test/convolve_test.cc"
"${AOM_ROOT}/test/decode_test_driver.cc"
"${AOM_ROOT}/test/decode_test_driver.h"
"${AOM_ROOT}/test/function_equivalence_test.h"
"${AOM_ROOT}/test/md5_helper.h"
"${AOM_ROOT}/test/register_state_check.h"
@ -54,8 +56,6 @@ endif ()
set(AOM_UNIT_TEST_DECODER_SOURCES
"${AOM_ROOT}/test/decode_api_test.cc"
"${AOM_ROOT}/test/decode_test_driver.cc"
"${AOM_ROOT}/test/decode_test_driver.h"
"${AOM_ROOT}/test/ivf_video_source.h")
set(AOM_UNIT_TEST_ENCODER_SOURCES
@ -87,10 +87,6 @@ if (CONFIG_AV1)
${AOM_UNIT_TEST_COMMON_SOURCES}
"${AOM_ROOT}/test/av1_convolve_optimz_test.cc"
"${AOM_ROOT}/test/av1_convolve_test.cc"
"${AOM_ROOT}/test/av1_fwd_txfm1d_test.cc"
"${AOM_ROOT}/test/av1_fwd_txfm2d_test.cc"
"${AOM_ROOT}/test/av1_inv_txfm1d_test.cc"
"${AOM_ROOT}/test/av1_inv_txfm2d_test.cc"
"${AOM_ROOT}/test/av1_txfm_test.cc"
"${AOM_ROOT}/test/av1_txfm_test.h"
"${AOM_ROOT}/test/intrapred_test.cc"
@ -136,6 +132,10 @@ if (CONFIG_AV1_ENCODER)
"${AOM_ROOT}/test/av1_fht32x32_test.cc"
"${AOM_ROOT}/test/av1_fht8x8_test.cc"
"${AOM_ROOT}/test/av1_inv_txfm_test.cc"
"${AOM_ROOT}/test/av1_fwd_txfm1d_test.cc"
"${AOM_ROOT}/test/av1_fwd_txfm2d_test.cc"
"${AOM_ROOT}/test/av1_inv_txfm1d_test.cc"
"${AOM_ROOT}/test/av1_inv_txfm2d_test.cc"
"${AOM_ROOT}/test/avg_test.cc"
"${AOM_ROOT}/test/blend_a64_mask_1d_test.cc"
"${AOM_ROOT}/test/blend_a64_mask_test.cc"
@ -224,7 +224,7 @@ if (CONFIG_AV1_DECODER AND CONFIG_AV1_ENCODER)
endif ()
if (CONFIG_HIGHBITDEPTH)
if (CONFIG_AV1)
if (CONFIG_AV1_ENCODER)
set(AOM_UNIT_TEST_COMMON_INTRIN_SSE4_1
${AOM_UNIT_TEST_COMMON_INTRIN_SSE4_1}
"${AOM_ROOT}/test/av1_highbd_iht_test.cc"
@ -260,8 +260,14 @@ endif ()
# exist before this function is called.
function (setup_aom_test_targets)
add_library(test_aom_common OBJECT ${AOM_UNIT_TEST_COMMON_SOURCES})
add_library(test_aom_decoder OBJECT ${AOM_UNIT_TEST_DECODER_SOURCES})
add_library(test_aom_encoder OBJECT ${AOM_UNIT_TEST_ENCODER_SOURCES})
if (CONFIG_AV1_DECODER)
add_library(test_aom_decoder OBJECT ${AOM_UNIT_TEST_DECODER_SOURCES})
endif ()
if (CONFIG_AV1_ENCODER)
add_library(test_aom_encoder OBJECT ${AOM_UNIT_TEST_ENCODER_SOURCES})
endif ()
set(AOM_LIB_TARGETS ${AOM_LIB_TARGETS} test_aom_common test_aom_decoder
test_aom_encoder PARENT_SCOPE)
@ -270,7 +276,7 @@ function (setup_aom_test_targets)
$<TARGET_OBJECTS:aom_common_app_util>
$<TARGET_OBJECTS:test_aom_common>)
if (CONFIG_DECODERS)
if (CONFIG_AV1_DECODER)
target_sources(test_libaom PUBLIC
$<TARGET_OBJECTS:aom_decoder_app_util>
$<TARGET_OBJECTS:test_aom_decoder>)
@ -280,7 +286,7 @@ function (setup_aom_test_targets)
endif ()
endif ()
if (CONFIG_ENCODERS)
if (CONFIG_AV1_ENCODER)
target_sources(test_libaom PUBLIC
$<TARGET_OBJECTS:test_aom_encoder>
$<TARGET_OBJECTS:aom_encoder_app_util>)
@ -288,15 +294,15 @@ function (setup_aom_test_targets)
if (CONFIG_ENCODE_PERF_TESTS)
target_sources(test_libaom PUBLIC ${AOM_ENCODE_PERF_TEST_SOURCES})
endif ()
add_executable(test_intra_pred_speed
${AOM_TEST_INTRA_PRED_SPEED_SOURCES}
$<TARGET_OBJECTS:aom_common_app_util>)
target_link_libraries(test_intra_pred_speed ${AOM_LIB_LINK_TYPE} aom gtest)
endif ()
target_link_libraries(test_libaom ${AOM_LIB_LINK_TYPE} aom gtest)
add_executable(test_intra_pred_speed
${AOM_TEST_INTRA_PRED_SPEED_SOURCES}
$<TARGET_OBJECTS:aom_common_app_util>)
target_link_libraries(test_intra_pred_speed ${AOM_LIB_LINK_TYPE} aom gtest)
if (CONFIG_LIBYUV)
target_sources(test_libaom PUBLIC $<TARGET_OBJECTS:yuv>)
endif ()
@ -315,7 +321,7 @@ function (setup_aom_test_targets)
if (HAVE_SSE4_1)
add_intrinsics_source_to_target("-msse4.1" "test_libaom"
"AOM_UNIT_TEST_COMMON_INTRIN_SSE4_1")
if (CONFIG_ENCODERS)
if (CONFIG_AV1_ENCODER)
if (AOM_UNIT_TEST_ENCODER_INTRIN_SSE4_1)
add_intrinsics_source_to_target("-msse4.1" "test_libaom"
"AOM_UNIT_TEST_ENCODER_INTRIN_SSE4_1")

Просмотреть файл

@ -128,12 +128,9 @@ int read_yuv_frame(struct AvxInputContext *input_ctx, aom_image_t *yuv_frame) {
return shortread;
}
#if CONFIG_ENCODERS
static const AvxInterface aom_encoders[] = {
#if CONFIG_AV1_ENCODER
static const AvxInterface aom_encoders[] = {
{ "av1", AV1_FOURCC, &aom_codec_av1_cx },
#endif
};
int get_aom_encoder_count(void) {
@ -152,15 +149,11 @@ const AvxInterface *get_aom_encoder_by_name(const char *name) {
return NULL;
}
#endif // CONFIG_AV1_ENCODER
#endif // CONFIG_ENCODERS
#if CONFIG_DECODERS
static const AvxInterface aom_decoders[] = {
#if CONFIG_AV1_DECODER
static const AvxInterface aom_decoders[] = {
{ "av1", AV1_FOURCC, &aom_codec_av1_dx },
#endif
};
int get_aom_decoder_count(void) {
@ -190,8 +183,7 @@ const AvxInterface *get_aom_decoder_by_fourcc(uint32_t fourcc) {
return NULL;
}
#endif // CONFIG_DECODERS
#endif // CONFIG_AV1_DECODER
// TODO(dkovalev): move this function to aom_image.{c, h}, so it will be part
// of aom_image_t support

Просмотреть файл

@ -19,7 +19,7 @@
#include "aom/aom_integer.h"
#include "aom_ports/msvc.h"
#if CONFIG_ENCODERS
#if CONFIG_AV1_ENCODER
#include "./y4minput.h"
#endif
@ -100,7 +100,7 @@ struct AvxInputContext {
int only_i420;
uint32_t fourcc;
struct AvxRational framerate;
#if CONFIG_ENCODERS
#if CONFIG_AV1_ENCODER
y4m_input y4m;
#endif
};