You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

290 lines
6.4 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. # 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. import("../../../webrtc.gni")
  9. group("agc2") {
  10. deps = [
  11. ":adaptive_digital",
  12. ":fixed_digital",
  13. ]
  14. }
  15. rtc_library("level_estimation_agc") {
  16. sources = [
  17. "adaptive_mode_level_estimator_agc.cc",
  18. "adaptive_mode_level_estimator_agc.h",
  19. ]
  20. configs += [ "..:apm_debug_dump" ]
  21. deps = [
  22. ":adaptive_digital",
  23. ":common",
  24. ":gain_applier",
  25. ":noise_level_estimator",
  26. ":rnn_vad_with_level",
  27. "..:api",
  28. "..:apm_logging",
  29. "..:audio_frame_view",
  30. "../../../api:array_view",
  31. "../../../common_audio",
  32. "../../../rtc_base:checks",
  33. "../../../rtc_base:rtc_base_approved",
  34. "../../../rtc_base:safe_minmax",
  35. "../agc:level_estimation",
  36. "../vad",
  37. ]
  38. }
  39. rtc_library("adaptive_digital") {
  40. sources = [
  41. "adaptive_agc.cc",
  42. "adaptive_agc.h",
  43. "adaptive_digital_gain_applier.cc",
  44. "adaptive_digital_gain_applier.h",
  45. "adaptive_mode_level_estimator.cc",
  46. "adaptive_mode_level_estimator.h",
  47. "saturation_protector.cc",
  48. "saturation_protector.h",
  49. ]
  50. configs += [ "..:apm_debug_dump" ]
  51. deps = [
  52. ":common",
  53. ":gain_applier",
  54. ":noise_level_estimator",
  55. ":rnn_vad_with_level",
  56. "..:api",
  57. "..:apm_logging",
  58. "..:audio_frame_view",
  59. "../../../api:array_view",
  60. "../../../common_audio",
  61. "../../../rtc_base:checks",
  62. "../../../rtc_base:rtc_base_approved",
  63. "../../../rtc_base:safe_minmax",
  64. "../../../system_wrappers:metrics",
  65. ]
  66. }
  67. rtc_library("biquad_filter") {
  68. visibility = [ "./*" ]
  69. sources = [
  70. "biquad_filter.cc",
  71. "biquad_filter.h",
  72. ]
  73. deps = [
  74. "../../../api:array_view",
  75. "../../../rtc_base:rtc_base_approved",
  76. ]
  77. }
  78. rtc_library("common") {
  79. sources = [
  80. "agc2_common.cc",
  81. "agc2_common.h",
  82. ]
  83. deps = [
  84. "../../../rtc_base:rtc_base_approved",
  85. "../../../system_wrappers:field_trial",
  86. ]
  87. }
  88. rtc_library("fixed_digital") {
  89. sources = [
  90. "fixed_digital_level_estimator.cc",
  91. "fixed_digital_level_estimator.h",
  92. "interpolated_gain_curve.cc",
  93. "interpolated_gain_curve.h",
  94. "limiter.cc",
  95. "limiter.h",
  96. ]
  97. configs += [ "..:apm_debug_dump" ]
  98. deps = [
  99. ":common",
  100. "..:apm_logging",
  101. "..:audio_frame_view",
  102. "../../../api:array_view",
  103. "../../../common_audio",
  104. "../../../rtc_base:checks",
  105. "../../../rtc_base:gtest_prod",
  106. "../../../rtc_base:rtc_base_approved",
  107. "../../../rtc_base:safe_minmax",
  108. "../../../system_wrappers:metrics",
  109. ]
  110. }
  111. rtc_library("gain_applier") {
  112. sources = [
  113. "gain_applier.cc",
  114. "gain_applier.h",
  115. ]
  116. deps = [
  117. ":common",
  118. "..:audio_frame_view",
  119. "../../../api:array_view",
  120. "../../../rtc_base:safe_minmax",
  121. ]
  122. }
  123. rtc_library("noise_level_estimator") {
  124. sources = [
  125. "down_sampler.cc",
  126. "down_sampler.h",
  127. "noise_level_estimator.cc",
  128. "noise_level_estimator.h",
  129. "noise_spectrum_estimator.cc",
  130. "noise_spectrum_estimator.h",
  131. "signal_classifier.cc",
  132. "signal_classifier.h",
  133. ]
  134. deps = [
  135. ":biquad_filter",
  136. "..:apm_logging",
  137. "..:audio_frame_view",
  138. "../../../api:array_view",
  139. "../../../common_audio",
  140. "../../../rtc_base:checks",
  141. "../../../rtc_base:macromagic",
  142. "../utility:ooura_fft",
  143. ]
  144. configs += [ "..:apm_debug_dump" ]
  145. }
  146. rtc_library("rnn_vad_with_level") {
  147. sources = [
  148. "vad_with_level.cc",
  149. "vad_with_level.h",
  150. ]
  151. deps = [
  152. "..:audio_frame_view",
  153. "../../../api:array_view",
  154. "../../../common_audio",
  155. "../../../rtc_base:checks",
  156. "rnn_vad",
  157. ]
  158. }
  159. rtc_library("adaptive_digital_unittests") {
  160. testonly = true
  161. configs += [ "..:apm_debug_dump" ]
  162. sources = [
  163. "adaptive_digital_gain_applier_unittest.cc",
  164. "adaptive_mode_level_estimator_unittest.cc",
  165. "gain_applier_unittest.cc",
  166. "saturation_protector_unittest.cc",
  167. ]
  168. deps = [
  169. ":adaptive_digital",
  170. ":common",
  171. ":gain_applier",
  172. ":test_utils",
  173. "..:apm_logging",
  174. "..:audio_frame_view",
  175. "../../../api:array_view",
  176. "../../../common_audio",
  177. "../../../rtc_base:checks",
  178. "../../../rtc_base:gunit_helpers",
  179. "../../../rtc_base:rtc_base_approved",
  180. ]
  181. }
  182. rtc_library("biquad_filter_unittests") {
  183. testonly = true
  184. sources = [
  185. "biquad_filter_unittest.cc",
  186. ]
  187. deps = [
  188. ":biquad_filter",
  189. "../../../rtc_base:gunit_helpers",
  190. ]
  191. }
  192. rtc_library("fixed_digital_unittests") {
  193. testonly = true
  194. configs += [ "..:apm_debug_dump" ]
  195. sources = [
  196. "agc2_testing_common_unittest.cc",
  197. "compute_interpolated_gain_curve.cc",
  198. "compute_interpolated_gain_curve.h",
  199. "fixed_digital_level_estimator_unittest.cc",
  200. "interpolated_gain_curve_unittest.cc",
  201. "limiter_db_gain_curve.cc",
  202. "limiter_db_gain_curve.h",
  203. "limiter_db_gain_curve_unittest.cc",
  204. "limiter_unittest.cc",
  205. ]
  206. deps = [
  207. ":common",
  208. ":fixed_digital",
  209. ":test_utils",
  210. "..:apm_logging",
  211. "..:audio_frame_view",
  212. "../../../api:array_view",
  213. "../../../common_audio",
  214. "../../../rtc_base:checks",
  215. "../../../rtc_base:gunit_helpers",
  216. "../../../rtc_base:rtc_base_approved",
  217. "../../../system_wrappers:metrics",
  218. ]
  219. }
  220. rtc_library("noise_estimator_unittests") {
  221. testonly = true
  222. configs += [ "..:apm_debug_dump" ]
  223. sources = [
  224. "noise_level_estimator_unittest.cc",
  225. "signal_classifier_unittest.cc",
  226. ]
  227. deps = [
  228. ":noise_level_estimator",
  229. ":test_utils",
  230. "..:apm_logging",
  231. "..:audio_frame_view",
  232. "../../../api:array_view",
  233. "../../../rtc_base:checks",
  234. "../../../rtc_base:gunit_helpers",
  235. "../../../rtc_base:rtc_base_approved",
  236. ]
  237. }
  238. rtc_library("rnn_vad_with_level_unittests") {
  239. testonly = true
  240. sources = [
  241. "vad_with_level_unittest.cc",
  242. ]
  243. deps = [
  244. ":rnn_vad_with_level",
  245. "..:audio_frame_view",
  246. "../../../rtc_base:gunit_helpers",
  247. ]
  248. }
  249. rtc_library("test_utils") {
  250. testonly = true
  251. visibility = [
  252. ":*",
  253. "..:audio_processing_unittests",
  254. ]
  255. sources = [
  256. "agc2_testing_common.cc",
  257. "agc2_testing_common.h",
  258. "vector_float_frame.cc",
  259. "vector_float_frame.h",
  260. ]
  261. deps = [
  262. "..:audio_frame_view",
  263. "../../../rtc_base:checks",
  264. "../../../rtc_base:rtc_base_approved",
  265. ]
  266. }