Moving LappedTransform, Blocker and AudioRingBuffer.
LappedTransform is only used in BandwidthAdaptationTest and therefore it should not be anymore a visible target under common_audio. This CL moves LappedTransform and other two classes it depends on (and which are not used elsewhere) to modules/audio_coding/codecs/opus/test. Bug: webrtc:9577, webrtc:5298 Change-Id: I1aa8052c2df2b2b150c279c0c9b1001474aed47a Reviewed-on: https://webrtc-review.googlesource.com/96440 Commit-Queue: Alessio Bazzica <alessiob@webrtc.org> Reviewed-by: Alex Loiko <aleloi@webrtc.org> Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24509}
This commit is contained in:

committed by
Commit Bot

parent
8a3c166fff
commit
d4161a3c9d
@ -15,16 +15,10 @@ rtc_static_library("common_audio") {
|
|||||||
sources = [
|
sources = [
|
||||||
"audio_converter.cc",
|
"audio_converter.cc",
|
||||||
"audio_converter.h",
|
"audio_converter.h",
|
||||||
"audio_ring_buffer.cc",
|
|
||||||
"audio_ring_buffer.h",
|
|
||||||
"audio_util.cc",
|
"audio_util.cc",
|
||||||
"blocker.cc",
|
|
||||||
"blocker.h",
|
|
||||||
"channel_buffer.cc",
|
"channel_buffer.cc",
|
||||||
"channel_buffer.h",
|
"channel_buffer.h",
|
||||||
"include/audio_util.h",
|
"include/audio_util.h",
|
||||||
"lapped_transform.cc",
|
|
||||||
"lapped_transform.h",
|
|
||||||
"real_fourier.cc",
|
"real_fourier.cc",
|
||||||
"real_fourier.h",
|
"real_fourier.h",
|
||||||
"real_fourier_ooura.cc",
|
"real_fourier_ooura.cc",
|
||||||
@ -349,12 +343,9 @@ if (rtc_include_tests) {
|
|||||||
|
|
||||||
sources = [
|
sources = [
|
||||||
"audio_converter_unittest.cc",
|
"audio_converter_unittest.cc",
|
||||||
"audio_ring_buffer_unittest.cc",
|
|
||||||
"audio_util_unittest.cc",
|
"audio_util_unittest.cc",
|
||||||
"blocker_unittest.cc",
|
|
||||||
"channel_buffer_unittest.cc",
|
"channel_buffer_unittest.cc",
|
||||||
"fir_filter_unittest.cc",
|
"fir_filter_unittest.cc",
|
||||||
"lapped_transform_unittest.cc",
|
|
||||||
"real_fourier_unittest.cc",
|
"real_fourier_unittest.cc",
|
||||||
"resampler/push_resampler_unittest.cc",
|
"resampler/push_resampler_unittest.cc",
|
||||||
"resampler/push_sinc_resampler_unittest.cc",
|
"resampler/push_sinc_resampler_unittest.cc",
|
||||||
|
@ -14,6 +14,8 @@
|
|||||||
#ifndef COMMON_AUDIO_RING_BUFFER_H_
|
#ifndef COMMON_AUDIO_RING_BUFFER_H_
|
||||||
#define COMMON_AUDIO_RING_BUFFER_H_
|
#define COMMON_AUDIO_RING_BUFFER_H_
|
||||||
|
|
||||||
|
// TODO(alessiob): Used by AEC, AECm and AudioRingBuffer. Remove when possible.
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
@ -2093,6 +2093,8 @@ if (rtc_include_tests) {
|
|||||||
"../../test:rtp_test_utils",
|
"../../test:rtp_test_utils",
|
||||||
"../../test:test_common",
|
"../../test:test_common",
|
||||||
"../../test:test_support",
|
"../../test:test_support",
|
||||||
|
"codecs/opus/test",
|
||||||
|
"codecs/opus/test:test_unittest",
|
||||||
"//testing/gtest",
|
"//testing/gtest",
|
||||||
"//third_party/abseil-cpp/absl/memory",
|
"//third_party/abseil-cpp/absl/memory",
|
||||||
]
|
]
|
||||||
|
@ -11,8 +11,8 @@
|
|||||||
#include "api/audio_codecs/opus/audio_decoder_opus.h"
|
#include "api/audio_codecs/opus/audio_decoder_opus.h"
|
||||||
#include "api/audio_codecs/opus/audio_encoder_opus.h"
|
#include "api/audio_codecs/opus/audio_encoder_opus.h"
|
||||||
#include "common_audio/include/audio_util.h"
|
#include "common_audio/include/audio_util.h"
|
||||||
#include "common_audio/lapped_transform.h"
|
|
||||||
#include "common_audio/window_generator.h"
|
#include "common_audio/window_generator.h"
|
||||||
|
#include "modules/audio_coding/codecs/opus/test/lapped_transform.h"
|
||||||
#include "modules/audio_coding/neteq/tools/audio_loop.h"
|
#include "modules/audio_coding/neteq/tools/audio_loop.h"
|
||||||
#include "test/field_trial.h"
|
#include "test/field_trial.h"
|
||||||
#include "test/gtest.h"
|
#include "test/gtest.h"
|
||||||
|
55
modules/audio_coding/codecs/opus/test/BUILD.gn
Normal file
55
modules/audio_coding/codecs/opus/test/BUILD.gn
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
# Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
|
||||||
|
#
|
||||||
|
# Use of this source code is governed by a BSD-style license
|
||||||
|
# that can be found in the LICENSE file in the root of the source
|
||||||
|
# tree. An additional intellectual property rights grant can be found
|
||||||
|
# in the file PATENTS. All contributing project authors may
|
||||||
|
# be found in the AUTHORS file in the root of the source tree.
|
||||||
|
|
||||||
|
import("../../../../../webrtc.gni")
|
||||||
|
|
||||||
|
visibility = [
|
||||||
|
":*",
|
||||||
|
"../../../:*",
|
||||||
|
]
|
||||||
|
|
||||||
|
if (rtc_include_tests) {
|
||||||
|
rtc_static_library("test") {
|
||||||
|
testonly = true
|
||||||
|
|
||||||
|
sources = [
|
||||||
|
"audio_ring_buffer.cc",
|
||||||
|
"audio_ring_buffer.h",
|
||||||
|
"blocker.cc",
|
||||||
|
"blocker.h",
|
||||||
|
"lapped_transform.cc",
|
||||||
|
"lapped_transform.h",
|
||||||
|
]
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
"../../../../../common_audio:common_audio",
|
||||||
|
"../../../../../common_audio:common_audio_c",
|
||||||
|
"../../../../../rtc_base:checks",
|
||||||
|
"../../../../../rtc_base/memory:aligned_array",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
rtc_source_set("test_unittest") {
|
||||||
|
testonly = true
|
||||||
|
|
||||||
|
sources = [
|
||||||
|
"audio_ring_buffer_unittest.cc",
|
||||||
|
"blocker_unittest.cc",
|
||||||
|
"lapped_transform_unittest.cc",
|
||||||
|
]
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
":test",
|
||||||
|
"../../../../../common_audio:common_audio",
|
||||||
|
"../../../../../common_audio:common_audio_c",
|
||||||
|
"../../../../../rtc_base:rtc_base_approved",
|
||||||
|
"../../../../../test:test_support",
|
||||||
|
"//testing/gtest",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
@ -8,7 +8,7 @@
|
|||||||
* be found in the AUTHORS file in the root of the source tree.
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "common_audio/audio_ring_buffer.h"
|
#include "modules/audio_coding/codecs/opus/test/audio_ring_buffer.h"
|
||||||
|
|
||||||
#include "common_audio/ring_buffer.h"
|
#include "common_audio/ring_buffer.h"
|
||||||
#include "rtc_base/checks.h"
|
#include "rtc_base/checks.h"
|
@ -7,8 +7,8 @@
|
|||||||
* in the file PATENTS. All contributing project authors may
|
* in the file PATENTS. All contributing project authors may
|
||||||
* be found in the AUTHORS file in the root of the source tree.
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
*/
|
*/
|
||||||
#ifndef COMMON_AUDIO_AUDIO_RING_BUFFER_H_
|
#ifndef MODULES_AUDIO_CODING_CODECS_OPUS_TEST_AUDIO_RING_BUFFER_H_
|
||||||
#define COMMON_AUDIO_AUDIO_RING_BUFFER_H_
|
#define MODULES_AUDIO_CODING_CODECS_OPUS_TEST_AUDIO_RING_BUFFER_H_
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
@ -54,4 +54,4 @@ class AudioRingBuffer final {
|
|||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
|
||||||
#endif // COMMON_AUDIO_AUDIO_RING_BUFFER_H_
|
#endif // MODULES_AUDIO_CODING_CODECS_OPUS_TEST_AUDIO_RING_BUFFER_H_
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "common_audio/audio_ring_buffer.h"
|
#include "modules/audio_coding/codecs/opus/test/audio_ring_buffer.h"
|
||||||
|
|
||||||
#include "common_audio/channel_buffer.h"
|
#include "common_audio/channel_buffer.h"
|
||||||
#include "test/gtest.h"
|
#include "test/gtest.h"
|
@ -8,7 +8,7 @@
|
|||||||
* be found in the AUTHORS file in the root of the source tree.
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "common_audio/blocker.h"
|
#include "modules/audio_coding/codecs/opus/test/blocker.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
@ -8,13 +8,13 @@
|
|||||||
* be found in the AUTHORS file in the root of the source tree.
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef COMMON_AUDIO_BLOCKER_H_
|
#ifndef MODULES_AUDIO_CODING_CODECS_OPUS_TEST_BLOCKER_H_
|
||||||
#define COMMON_AUDIO_BLOCKER_H_
|
#define MODULES_AUDIO_CODING_CODECS_OPUS_TEST_BLOCKER_H_
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "common_audio/audio_ring_buffer.h"
|
|
||||||
#include "common_audio/channel_buffer.h"
|
#include "common_audio/channel_buffer.h"
|
||||||
|
#include "modules/audio_coding/codecs/opus/test/audio_ring_buffer.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -124,4 +124,4 @@ class Blocker {
|
|||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
|
||||||
#endif // COMMON_AUDIO_BLOCKER_H_
|
#endif // MODULES_AUDIO_CODING_CODECS_OPUS_TEST_BLOCKER_H_
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "common_audio/blocker.h"
|
#include "modules/audio_coding/codecs/opus/test/blocker.h"
|
||||||
|
|
||||||
#include "rtc_base/arraysize.h"
|
#include "rtc_base/arraysize.h"
|
||||||
#include "test/gtest.h"
|
#include "test/gtest.h"
|
@ -8,7 +8,7 @@
|
|||||||
* be found in the AUTHORS file in the root of the source tree.
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "common_audio/lapped_transform.h"
|
#include "modules/audio_coding/codecs/opus/test/lapped_transform.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
@ -8,14 +8,14 @@
|
|||||||
* be found in the AUTHORS file in the root of the source tree.
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef COMMON_AUDIO_LAPPED_TRANSFORM_H_
|
#ifndef MODULES_AUDIO_CODING_CODECS_OPUS_TEST_LAPPED_TRANSFORM_H_
|
||||||
#define COMMON_AUDIO_LAPPED_TRANSFORM_H_
|
#define MODULES_AUDIO_CODING_CODECS_OPUS_TEST_LAPPED_TRANSFORM_H_
|
||||||
|
|
||||||
#include <complex>
|
#include <complex>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "common_audio/blocker.h"
|
|
||||||
#include "common_audio/real_fourier.h"
|
#include "common_audio/real_fourier.h"
|
||||||
|
#include "modules/audio_coding/codecs/opus/test/blocker.h"
|
||||||
#include "rtc_base/memory/aligned_array.h"
|
#include "rtc_base/memory/aligned_array.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
@ -119,6 +119,7 @@ class LappedTransform {
|
|||||||
Callback* const block_processor_;
|
Callback* const block_processor_;
|
||||||
Blocker blocker_;
|
Blocker blocker_;
|
||||||
|
|
||||||
|
// TODO(alessiob): Replace RealFourier with a different FFT library.
|
||||||
std::unique_ptr<RealFourier> fft_;
|
std::unique_ptr<RealFourier> fft_;
|
||||||
const size_t cplx_length_;
|
const size_t cplx_length_;
|
||||||
AlignedArray<float> real_buf_;
|
AlignedArray<float> real_buf_;
|
||||||
@ -128,4 +129,4 @@ class LappedTransform {
|
|||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
|
||||||
#endif // COMMON_AUDIO_LAPPED_TRANSFORM_H_
|
#endif // MODULES_AUDIO_CODING_CODECS_OPUS_TEST_LAPPED_TRANSFORM_H_
|
@ -8,7 +8,7 @@
|
|||||||
* be found in the AUTHORS file in the root of the source tree.
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "common_audio/lapped_transform.h"
|
#include "modules/audio_coding/codecs/opus/test/lapped_transform.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cmath>
|
#include <cmath>
|
Reference in New Issue
Block a user