blob: 469176ffa2f77e81ab0d3544eb9bb26d8cb0c9ad [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" ]
Karl Wiberg735a8382017-10-05 11:00:38 +020023 public = [
24 "audio_encoder_isac.h",
25 ]
26 public_configs = [ ":isac_config" ]
27 if (current_cpu == "arm") {
28 deps = [
29 ":audio_encoder_isac_fix",
30 ]
31 } else {
32 deps = [
33 ":audio_encoder_isac_float",
34 ]
35 }
36}
37
38rtc_source_set("audio_decoder_isac") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000039 visibility = [ "*" ]
Karl Wibergbb23c832018-04-22 19:55:00 +020040 poisonous = [ "audio_codecs" ]
Karl Wiberg735a8382017-10-05 11:00:38 +020041 public = [
42 "audio_decoder_isac.h",
43 ]
44 public_configs = [ ":isac_config" ]
45 if (current_cpu == "arm") {
46 deps = [
47 ":audio_decoder_isac_fix",
48 ]
49 } else {
50 deps = [
51 ":audio_decoder_isac_float",
52 ]
53 }
54}
55
56config("isac_config") {
57 visibility = [ ":*" ]
58 if (current_cpu == "arm") {
59 defines = [
60 "WEBRTC_USE_BUILTIN_ISAC_FIX=1",
61 "WEBRTC_USE_BUILTIN_ISAC_FLOAT=0",
62 ]
63 } else {
64 defines = [
65 "WEBRTC_USE_BUILTIN_ISAC_FIX=0",
66 "WEBRTC_USE_BUILTIN_ISAC_FLOAT=1",
67 ]
68 }
69}
70
Mirko Bonadei86d053c2019-10-17 21:32:04 +020071rtc_library("audio_encoder_isac_fix") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000072 visibility = [ "*" ]
Karl Wibergbb23c832018-04-22 19:55:00 +020073 poisonous = [ "audio_codecs" ]
kwiberg327af332017-08-18 04:09:40 -070074 sources = [
75 "audio_encoder_isac_fix.cc",
76 "audio_encoder_isac_fix.h",
77 ]
78 deps = [
79 "..:audio_codecs_api",
kwiberg327af332017-08-18 04:09:40 -070080 "../../../modules/audio_coding:isac_fix",
81 "../../../rtc_base:rtc_base_approved",
Mirko Bonadeic66e0042019-10-18 09:52:22 +020082 "../../../rtc_base/system:rtc_export",
Niels Möller2edab4c2018-10-22 09:48:08 +020083 "//third_party/abseil-cpp/absl/strings",
Danil Chapovalov0bc58cf2018-06-21 13:32:56 +020084 "//third_party/abseil-cpp/absl/types:optional",
kwiberg327af332017-08-18 04:09:40 -070085 ]
86}
87
Mirko Bonadei86d053c2019-10-17 21:32:04 +020088rtc_library("audio_decoder_isac_fix") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000089 visibility = [ "*" ]
Karl Wibergbb23c832018-04-22 19:55:00 +020090 poisonous = [ "audio_codecs" ]
kwiberg327af332017-08-18 04:09:40 -070091 sources = [
92 "audio_decoder_isac_fix.cc",
93 "audio_decoder_isac_fix.h",
94 ]
95 deps = [
96 "..:audio_codecs_api",
kwiberg327af332017-08-18 04:09:40 -070097 "../../../modules/audio_coding:isac_fix",
98 "../../../rtc_base:rtc_base_approved",
Mirko Bonadeic66e0042019-10-18 09:52:22 +020099 "../../../rtc_base/system:rtc_export",
Niels Möller2edab4c2018-10-22 09:48:08 +0200100 "//third_party/abseil-cpp/absl/strings",
Danil Chapovalov0bc58cf2018-06-21 13:32:56 +0200101 "//third_party/abseil-cpp/absl/types:optional",
kwiberg327af332017-08-18 04:09:40 -0700102 ]
103}
kwiberge57556c2017-08-21 06:11:18 -0700104
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200105rtc_library("audio_encoder_isac_float") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000106 visibility = [ "*" ]
Karl Wibergbb23c832018-04-22 19:55:00 +0200107 poisonous = [ "audio_codecs" ]
kwiberge57556c2017-08-21 06:11:18 -0700108 sources = [
109 "audio_encoder_isac_float.cc",
110 "audio_encoder_isac_float.h",
111 ]
112 deps = [
113 "..:audio_codecs_api",
kwiberge57556c2017-08-21 06:11:18 -0700114 "../../../modules/audio_coding:isac",
115 "../../../rtc_base:rtc_base_approved",
Mirko Bonadei276827c2018-10-16 14:13:50 +0200116 "../../../rtc_base/system:rtc_export",
Niels Möller2edab4c2018-10-22 09:48:08 +0200117 "//third_party/abseil-cpp/absl/strings",
Danil Chapovalov0bc58cf2018-06-21 13:32:56 +0200118 "//third_party/abseil-cpp/absl/types:optional",
kwiberge57556c2017-08-21 06:11:18 -0700119 ]
120}
121
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200122rtc_library("audio_decoder_isac_float") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000123 visibility = [ "*" ]
Karl Wibergbb23c832018-04-22 19:55:00 +0200124 poisonous = [ "audio_codecs" ]
kwiberge57556c2017-08-21 06:11:18 -0700125 sources = [
126 "audio_decoder_isac_float.cc",
127 "audio_decoder_isac_float.h",
128 ]
129 deps = [
130 "..:audio_codecs_api",
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",
Niels Möller2edab4c2018-10-22 09:48:08 +0200134 "//third_party/abseil-cpp/absl/strings",
Danil Chapovalov0bc58cf2018-06-21 13:32:56 +0200135 "//third_party/abseil-cpp/absl/types:optional",
kwiberge57556c2017-08-21 06:11:18 -0700136 ]
137}