blob: bda315b95e1a67d85cea78f950cf769be2d6ae57 [file] [log] [blame]
kwiberg327af332017-08-18 04:09:40 -07001# Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
2#
3# Use of this source code is governed by a BSD-style license
4# that can be found in the LICENSE file in the root of the source
5# tree. An additional intellectual property rights grant can be found
6# in the file PATENTS. All contributing project authors may
7# be found in the AUTHORS file in the root of the source tree.
8
9import("../../../webrtc.gni")
10if (is_android) {
11 import("//build/config/android/config.gni")
12 import("//build/config/android/rules.gni")
13}
14
Karl Wiberg735a8382017-10-05 11:00:38 +020015# The targets with _fix and _float suffixes unconditionally use the
16# fixed-point and floating-point iSAC implementations, respectively.
17# The targets without suffixes pick one of the implementations based
18# on cleverly chosen criteria.
19
20rtc_source_set("audio_encoder_isac") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000021 visibility = [ "*" ]
Karl Wibergbb23c832018-04-22 19:55:00 +020022 poisonous = [ "audio_codecs" ]
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +010023 public = [ "audio_encoder_isac.h" ]
Karl Wiberg735a8382017-10-05 11:00:38 +020024 public_configs = [ ":isac_config" ]
25 if (current_cpu == "arm") {
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +010026 deps = [ ":audio_encoder_isac_fix" ]
Karl Wiberg735a8382017-10-05 11:00:38 +020027 } else {
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +010028 deps = [ ":audio_encoder_isac_float" ]
Karl Wiberg735a8382017-10-05 11:00:38 +020029 }
30}
31
32rtc_source_set("audio_decoder_isac") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000033 visibility = [ "*" ]
Karl Wibergbb23c832018-04-22 19:55:00 +020034 poisonous = [ "audio_codecs" ]
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +010035 public = [ "audio_decoder_isac.h" ]
Karl Wiberg735a8382017-10-05 11:00:38 +020036 public_configs = [ ":isac_config" ]
37 if (current_cpu == "arm") {
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +010038 deps = [ ":audio_decoder_isac_fix" ]
Karl Wiberg735a8382017-10-05 11:00:38 +020039 } else {
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +010040 deps = [ ":audio_decoder_isac_float" ]
Karl Wiberg735a8382017-10-05 11:00:38 +020041 }
42}
43
44config("isac_config") {
45 visibility = [ ":*" ]
46 if (current_cpu == "arm") {
47 defines = [
48 "WEBRTC_USE_BUILTIN_ISAC_FIX=1",
49 "WEBRTC_USE_BUILTIN_ISAC_FLOAT=0",
50 ]
51 } else {
52 defines = [
53 "WEBRTC_USE_BUILTIN_ISAC_FIX=0",
54 "WEBRTC_USE_BUILTIN_ISAC_FLOAT=1",
55 ]
56 }
57}
58
Mirko Bonadei86d053c2019-10-17 21:32:04 +020059rtc_library("audio_encoder_isac_fix") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000060 visibility = [ "*" ]
Karl Wibergbb23c832018-04-22 19:55:00 +020061 poisonous = [ "audio_codecs" ]
kwiberg327af332017-08-18 04:09:40 -070062 sources = [
63 "audio_encoder_isac_fix.cc",
64 "audio_encoder_isac_fix.h",
65 ]
66 deps = [
67 "..:audio_codecs_api",
Jonas Orelande62c2f22022-03-29 11:04:48 +020068 "../../../api:field_trials_view",
kwiberg327af332017-08-18 04:09:40 -070069 "../../../modules/audio_coding:isac_fix",
70 "../../../rtc_base:rtc_base_approved",
Florent Castelli57aa81b2022-04-04 17:14:02 +020071 "../../../rtc_base:stringutils",
Mirko Bonadeic66e0042019-10-18 09:52:22 +020072 "../../../rtc_base/system:rtc_export",
Mirko Bonadei2dcf3482020-06-05 14:30:41 +020073 ]
74 absl_deps = [
Niels Möller2edab4c2018-10-22 09:48:08 +020075 "//third_party/abseil-cpp/absl/strings",
Danil Chapovalov0bc58cf2018-06-21 13:32:56 +020076 "//third_party/abseil-cpp/absl/types:optional",
kwiberg327af332017-08-18 04:09:40 -070077 ]
78}
79
Mirko Bonadei86d053c2019-10-17 21:32:04 +020080rtc_library("audio_decoder_isac_fix") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000081 visibility = [ "*" ]
Karl Wibergbb23c832018-04-22 19:55:00 +020082 poisonous = [ "audio_codecs" ]
kwiberg327af332017-08-18 04:09:40 -070083 sources = [
84 "audio_decoder_isac_fix.cc",
85 "audio_decoder_isac_fix.h",
86 ]
87 deps = [
88 "..:audio_codecs_api",
Jonas Orelande62c2f22022-03-29 11:04:48 +020089 "../../../api:field_trials_view",
kwiberg327af332017-08-18 04:09:40 -070090 "../../../modules/audio_coding:isac_fix",
91 "../../../rtc_base:rtc_base_approved",
Mirko Bonadeic66e0042019-10-18 09:52:22 +020092 "../../../rtc_base/system:rtc_export",
Mirko Bonadei2dcf3482020-06-05 14:30:41 +020093 ]
94 absl_deps = [
Niels Möller2edab4c2018-10-22 09:48:08 +020095 "//third_party/abseil-cpp/absl/strings",
Danil Chapovalov0bc58cf2018-06-21 13:32:56 +020096 "//third_party/abseil-cpp/absl/types:optional",
kwiberg327af332017-08-18 04:09:40 -070097 ]
98}
kwiberge57556c2017-08-21 06:11:18 -070099
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200100rtc_library("audio_encoder_isac_float") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000101 visibility = [ "*" ]
Karl Wibergbb23c832018-04-22 19:55:00 +0200102 poisonous = [ "audio_codecs" ]
kwiberge57556c2017-08-21 06:11:18 -0700103 sources = [
104 "audio_encoder_isac_float.cc",
105 "audio_encoder_isac_float.h",
106 ]
107 deps = [
108 "..:audio_codecs_api",
Jonas Orelande62c2f22022-03-29 11:04:48 +0200109 "../../../api:field_trials_view",
kwiberge57556c2017-08-21 06:11:18 -0700110 "../../../modules/audio_coding:isac",
111 "../../../rtc_base:rtc_base_approved",
Florent Castelli57aa81b2022-04-04 17:14:02 +0200112 "../../../rtc_base:stringutils",
Mirko Bonadei276827c2018-10-16 14:13:50 +0200113 "../../../rtc_base/system:rtc_export",
Mirko Bonadei2dcf3482020-06-05 14:30:41 +0200114 ]
115 absl_deps = [
Niels Möller2edab4c2018-10-22 09:48:08 +0200116 "//third_party/abseil-cpp/absl/strings",
Danil Chapovalov0bc58cf2018-06-21 13:32:56 +0200117 "//third_party/abseil-cpp/absl/types:optional",
kwiberge57556c2017-08-21 06:11:18 -0700118 ]
119}
120
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200121rtc_library("audio_decoder_isac_float") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000122 visibility = [ "*" ]
Karl Wibergbb23c832018-04-22 19:55:00 +0200123 poisonous = [ "audio_codecs" ]
kwiberge57556c2017-08-21 06:11:18 -0700124 sources = [
125 "audio_decoder_isac_float.cc",
126 "audio_decoder_isac_float.h",
127 ]
128 deps = [
129 "..:audio_codecs_api",
Jonas Orelande62c2f22022-03-29 11:04:48 +0200130 "../../../api:field_trials_view",
kwiberge57556c2017-08-21 06:11:18 -0700131 "../../../modules/audio_coding:isac",
132 "../../../rtc_base:rtc_base_approved",
Mirko Bonadei3d255302018-10-11 10:50:45 +0200133 "../../../rtc_base/system:rtc_export",
Mirko Bonadei2dcf3482020-06-05 14:30:41 +0200134 ]
135 absl_deps = [
Niels Möller2edab4c2018-10-22 09:48:08 +0200136 "//third_party/abseil-cpp/absl/strings",
Danil Chapovalov0bc58cf2018-06-21 13:32:56 +0200137 "//third_party/abseil-cpp/absl/types:optional",
kwiberge57556c2017-08-21 06:11:18 -0700138 ]
139}