blob: 9eb32147e14af784d927c258a8d79d0068c57a77 [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",
Niels Möller2edab4c2018-10-22 09:48:08 +020071 "//third_party/abseil-cpp/absl/strings",
Danil Chapovalov0bc58cf2018-06-21 13:32:56 +020072 "//third_party/abseil-cpp/absl/types:optional",
kwiberg327af332017-08-18 04:09:40 -070073 ]
74}
75
Mirko Bonadei86d053c2019-10-17 21:32:04 +020076rtc_library("audio_decoder_isac_fix") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000077 visibility = [ "*" ]
Karl Wibergbb23c832018-04-22 19:55:00 +020078 poisonous = [ "audio_codecs" ]
kwiberg327af332017-08-18 04:09:40 -070079 sources = [
80 "audio_decoder_isac_fix.cc",
81 "audio_decoder_isac_fix.h",
82 ]
83 deps = [
84 "..:audio_codecs_api",
kwiberg327af332017-08-18 04:09:40 -070085 "../../../modules/audio_coding:isac_fix",
86 "../../../rtc_base:rtc_base_approved",
Mirko Bonadeic66e0042019-10-18 09:52:22 +020087 "../../../rtc_base/system:rtc_export",
Niels Möller2edab4c2018-10-22 09:48:08 +020088 "//third_party/abseil-cpp/absl/strings",
Danil Chapovalov0bc58cf2018-06-21 13:32:56 +020089 "//third_party/abseil-cpp/absl/types:optional",
kwiberg327af332017-08-18 04:09:40 -070090 ]
91}
kwiberge57556c2017-08-21 06:11:18 -070092
Mirko Bonadei86d053c2019-10-17 21:32:04 +020093rtc_library("audio_encoder_isac_float") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000094 visibility = [ "*" ]
Karl Wibergbb23c832018-04-22 19:55:00 +020095 poisonous = [ "audio_codecs" ]
kwiberge57556c2017-08-21 06:11:18 -070096 sources = [
97 "audio_encoder_isac_float.cc",
98 "audio_encoder_isac_float.h",
99 ]
100 deps = [
101 "..:audio_codecs_api",
kwiberge57556c2017-08-21 06:11:18 -0700102 "../../../modules/audio_coding:isac",
103 "../../../rtc_base:rtc_base_approved",
Mirko Bonadei276827c2018-10-16 14:13:50 +0200104 "../../../rtc_base/system:rtc_export",
Niels Möller2edab4c2018-10-22 09:48:08 +0200105 "//third_party/abseil-cpp/absl/strings",
Danil Chapovalov0bc58cf2018-06-21 13:32:56 +0200106 "//third_party/abseil-cpp/absl/types:optional",
kwiberge57556c2017-08-21 06:11:18 -0700107 ]
108}
109
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200110rtc_library("audio_decoder_isac_float") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000111 visibility = [ "*" ]
Karl Wibergbb23c832018-04-22 19:55:00 +0200112 poisonous = [ "audio_codecs" ]
kwiberge57556c2017-08-21 06:11:18 -0700113 sources = [
114 "audio_decoder_isac_float.cc",
115 "audio_decoder_isac_float.h",
116 ]
117 deps = [
118 "..:audio_codecs_api",
kwiberge57556c2017-08-21 06:11:18 -0700119 "../../../modules/audio_coding:isac",
120 "../../../rtc_base:rtc_base_approved",
Mirko Bonadei3d255302018-10-11 10:50:45 +0200121 "../../../rtc_base/system:rtc_export",
Niels Möller2edab4c2018-10-22 09:48:08 +0200122 "//third_party/abseil-cpp/absl/strings",
Danil Chapovalov0bc58cf2018-06-21 13:32:56 +0200123 "//third_party/abseil-cpp/absl/types:optional",
kwiberge57556c2017-08-21 06:11:18 -0700124 ]
125}