blob: 6ff6e5f0923c9119be137a36f2d67f3ec156e4d9 [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",
kwiberg327af332017-08-18 04:09:40 -070068 "../../../modules/audio_coding:isac_fix",
69 "../../../rtc_base:rtc_base_approved",
Mirko Bonadeic66e0042019-10-18 09:52:22 +020070 "../../../rtc_base/system:rtc_export",
Mirko Bonadei2dcf3482020-06-05 14:30:41 +020071 ]
72 absl_deps = [
Niels Möller2edab4c2018-10-22 09:48:08 +020073 "//third_party/abseil-cpp/absl/strings",
Danil Chapovalov0bc58cf2018-06-21 13:32:56 +020074 "//third_party/abseil-cpp/absl/types:optional",
kwiberg327af332017-08-18 04:09:40 -070075 ]
76}
77
Mirko Bonadei86d053c2019-10-17 21:32:04 +020078rtc_library("audio_decoder_isac_fix") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000079 visibility = [ "*" ]
Karl Wibergbb23c832018-04-22 19:55:00 +020080 poisonous = [ "audio_codecs" ]
kwiberg327af332017-08-18 04:09:40 -070081 sources = [
82 "audio_decoder_isac_fix.cc",
83 "audio_decoder_isac_fix.h",
84 ]
85 deps = [
86 "..:audio_codecs_api",
kwiberg327af332017-08-18 04:09:40 -070087 "../../../modules/audio_coding:isac_fix",
88 "../../../rtc_base:rtc_base_approved",
Mirko Bonadeic66e0042019-10-18 09:52:22 +020089 "../../../rtc_base/system:rtc_export",
Mirko Bonadei2dcf3482020-06-05 14:30:41 +020090 ]
91 absl_deps = [
Niels Möller2edab4c2018-10-22 09:48:08 +020092 "//third_party/abseil-cpp/absl/strings",
Danil Chapovalov0bc58cf2018-06-21 13:32:56 +020093 "//third_party/abseil-cpp/absl/types:optional",
kwiberg327af332017-08-18 04:09:40 -070094 ]
95}
kwiberge57556c2017-08-21 06:11:18 -070096
Mirko Bonadei86d053c2019-10-17 21:32:04 +020097rtc_library("audio_encoder_isac_float") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000098 visibility = [ "*" ]
Karl Wibergbb23c832018-04-22 19:55:00 +020099 poisonous = [ "audio_codecs" ]
kwiberge57556c2017-08-21 06:11:18 -0700100 sources = [
101 "audio_encoder_isac_float.cc",
102 "audio_encoder_isac_float.h",
103 ]
104 deps = [
105 "..:audio_codecs_api",
kwiberge57556c2017-08-21 06:11:18 -0700106 "../../../modules/audio_coding:isac",
107 "../../../rtc_base:rtc_base_approved",
Mirko Bonadei276827c2018-10-16 14:13:50 +0200108 "../../../rtc_base/system:rtc_export",
Mirko Bonadei2dcf3482020-06-05 14:30:41 +0200109 ]
110 absl_deps = [
Niels Möller2edab4c2018-10-22 09:48:08 +0200111 "//third_party/abseil-cpp/absl/strings",
Danil Chapovalov0bc58cf2018-06-21 13:32:56 +0200112 "//third_party/abseil-cpp/absl/types:optional",
kwiberge57556c2017-08-21 06:11:18 -0700113 ]
114}
115
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200116rtc_library("audio_decoder_isac_float") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000117 visibility = [ "*" ]
Karl Wibergbb23c832018-04-22 19:55:00 +0200118 poisonous = [ "audio_codecs" ]
kwiberge57556c2017-08-21 06:11:18 -0700119 sources = [
120 "audio_decoder_isac_float.cc",
121 "audio_decoder_isac_float.h",
122 ]
123 deps = [
124 "..:audio_codecs_api",
kwiberge57556c2017-08-21 06:11:18 -0700125 "../../../modules/audio_coding:isac",
126 "../../../rtc_base:rtc_base_approved",
Mirko Bonadei3d255302018-10-11 10:50:45 +0200127 "../../../rtc_base/system:rtc_export",
Mirko Bonadei2dcf3482020-06-05 14:30:41 +0200128 ]
129 absl_deps = [
Niels Möller2edab4c2018-10-22 09:48:08 +0200130 "//third_party/abseil-cpp/absl/strings",
Danil Chapovalov0bc58cf2018-06-21 13:32:56 +0200131 "//third_party/abseil-cpp/absl/types:optional",
kwiberge57556c2017-08-21 06:11:18 -0700132 ]
133}