iSAC: Untangle some cyclic dependencies

BUG=webrtc:6828, webrtc:7042

Review-Url: https://codereview.webrtc.org/2656823005
Cr-Commit-Position: refs/heads/master@{#16358}
This commit is contained in:
kwiberg 2017-01-30 05:28:54 -08:00 committed by Commit bot
parent 4fb97462a8
commit a6ca518dd5
4 changed files with 24 additions and 28 deletions

View File

@ -77,10 +77,6 @@ rtc_source_set("audio_decoder_factory_interface") {
}
rtc_static_library("builtin_audio_decoder_factory") {
# TODO(kjellander): Remove (bugs.webrtc.org/6828)
# Errors on cyclic dependency with :isac_fix if enabled.
check_includes = false
sources = [
"codecs/builtin_audio_decoder_factory.cc",
"codecs/builtin_audio_decoder_factory.h",
@ -500,10 +496,6 @@ rtc_source_set("ilbc_c") {
}
rtc_static_library("isac_common") {
# TODO(kjellander): Remove (bugs.webrtc.org/6828)
# Has a cyclic dependency with :isac if checks are enabled.
check_includes = false
sources = [
"codecs/isac/audio_encoder_isac_t.h",
"codecs/isac/audio_encoder_isac_t_impl.h",
@ -512,6 +504,7 @@ rtc_static_library("isac_common") {
]
deps = [
":audio_encoder_interface",
"../..:webrtc_common",
"../../base:rtc_base_approved",
]
}
@ -525,6 +518,8 @@ config("isac_config") {
rtc_static_library("isac") {
sources = [
"codecs/isac/main/include/audio_decoder_isac.h",
"codecs/isac/main/include/audio_encoder_isac.h",
"codecs/isac/main/source/audio_decoder_isac.cc",
"codecs/isac/main/source/audio_encoder_isac.cc",
]
@ -542,8 +537,6 @@ rtc_static_library("isac") {
rtc_static_library("isac_c") {
visibility = [ ":*" ] # Only targets in this file can depend on this.
sources = [
"codecs/isac/main/include/audio_decoder_isac.h",
"codecs/isac/main/include/audio_encoder_isac.h",
"codecs/isac/main/include/isac.h",
"codecs/isac/main/source/arith_routines.c",
"codecs/isac/main/source/arith_routines.h",
@ -641,11 +634,18 @@ rtc_static_library("isac_fix") {
}
}
rtc_source_set("isac_fix_c") {
# TODO(kjellander): Remove (bugs.webrtc.org/6828)
# Errors on cyclic dependency with :builtin_audio_decoder_factory if enabled.
check_includes = false
rtc_source_set("isac_fix_common") {
visibility = [ ":*" ] # Only targets in this file can depend on this.
sources = [
"codecs/isac/fix/source/codec.h",
"codecs/isac/fix/source/fft.c",
"codecs/isac/fix/source/fft.h",
"codecs/isac/fix/source/settings.h",
]
public_configs = [ ":isac_fix_config" ]
}
rtc_source_set("isac_fix_c") {
visibility = [ ":*" ] # Only targets in this file can depend on this.
sources = [
"codecs/isac/fix/include/audio_decoder_isacfix.h",
@ -657,15 +657,12 @@ rtc_source_set("isac_fix_c") {
"codecs/isac/fix/source/arith_routins.h",
"codecs/isac/fix/source/bandwidth_estimator.c",
"codecs/isac/fix/source/bandwidth_estimator.h",
"codecs/isac/fix/source/codec.h",
"codecs/isac/fix/source/decode.c",
"codecs/isac/fix/source/decode_bwe.c",
"codecs/isac/fix/source/decode_plc.c",
"codecs/isac/fix/source/encode.c",
"codecs/isac/fix/source/entropy_coding.c",
"codecs/isac/fix/source/entropy_coding.h",
"codecs/isac/fix/source/fft.c",
"codecs/isac/fix/source/fft.h",
"codecs/isac/fix/source/filterbank_tables.c",
"codecs/isac/fix/source/filterbank_tables.h",
"codecs/isac/fix/source/filterbanks.c",
@ -688,7 +685,6 @@ rtc_source_set("isac_fix_c") {
"codecs/isac/fix/source/pitch_gain_tables.h",
"codecs/isac/fix/source/pitch_lag_tables.c",
"codecs/isac/fix/source/pitch_lag_tables.h",
"codecs/isac/fix/source/settings.h",
"codecs/isac/fix/source/spectrum_ar_model_tables.c",
"codecs/isac/fix/source/spectrum_ar_model_tables.h",
"codecs/isac/fix/source/structs.h",
@ -708,6 +704,10 @@ rtc_source_set("isac_fix_c") {
"../../system_wrappers",
]
public_deps = [
":isac_fix_common",
]
if (rtc_build_with_neon) {
deps += [ ":isac_neon" ]
}
@ -750,10 +750,6 @@ rtc_source_set("isac_fix_c") {
if (rtc_build_with_neon) {
rtc_static_library("isac_neon") {
# TODO(mbonadei): Remove (bugs.webrtc.org/6828)
# Errors on cyclic dependency with :isac_fix_c if enabled.
check_includes = false
sources = [
"codecs/isac/fix/source/entropy_coding_neon.c",
"codecs/isac/fix/source/filterbanks_neon.c",
@ -780,6 +776,7 @@ if (rtc_build_with_neon) {
}
deps = [
":isac_fix_common",
"../../base:rtc_base_approved",
"../../common_audio",
]
@ -2071,6 +2068,7 @@ if (rtc_include_tests) {
":cng",
":g711",
":ilbc",
":isac",
":isac_c",
":isac_fix",
":neteq",

View File

@ -24,10 +24,10 @@
#include "webrtc/modules/audio_coding/codecs/ilbc/audio_decoder_ilbc.h"
#endif
#ifdef WEBRTC_CODEC_ISACFX
#include "webrtc/modules/audio_coding/codecs/isac/fix/include/audio_decoder_isacfix.h"
#include "webrtc/modules/audio_coding/codecs/isac/fix/include/audio_decoder_isacfix.h" // nogncheck
#endif
#ifdef WEBRTC_CODEC_ISAC
#include "webrtc/modules/audio_coding/codecs/isac/main/include/audio_decoder_isac.h"
#include "webrtc/modules/audio_coding/codecs/isac/main/include/audio_decoder_isac.h" // nogncheck
#endif
#ifdef WEBRTC_CODEC_OPUS
#include "webrtc/modules/audio_coding/codecs/opus/audio_decoder_opus.h"

View File

@ -11,8 +11,6 @@
#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_AUDIO_ENCODER_ISAC_T_IMPL_H_
#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_AUDIO_ENCODER_ISAC_T_IMPL_H_
#include "webrtc/modules/audio_coding/codecs/isac/main/include/audio_encoder_isac.h"
#include "webrtc/base/checks.h"
#include "webrtc/common_types.h"

View File

@ -18,7 +18,7 @@
#include "fft.h"
const int16_t kSortTabFft[240] = {
static const int16_t kSortTabFft[240] = {
0, 60, 120, 180, 20, 80, 140, 200, 40, 100, 160, 220,
4, 64, 124, 184, 24, 84, 144, 204, 44, 104, 164, 224,
8, 68, 128, 188, 28, 88, 148, 208, 48, 108, 168, 228,
@ -42,7 +42,7 @@ const int16_t kSortTabFft[240] = {
};
/* Cosine table in Q14 */
const int16_t kCosTabFfftQ14[240] = {
static const int16_t kCosTabFfftQ14[240] = {
16384, 16378, 16362, 16333, 16294, 16244, 16182, 16110, 16026, 15931, 15826, 15709,
15582, 15444, 15296, 15137, 14968, 14788, 14598, 14399, 14189, 13970, 13741, 13502,
13255, 12998, 12733, 12458, 12176, 11885, 11585, 11278, 10963, 10641, 10311, 9974,