Fix no_global_constructors in audio_processing/agc2/rnn_vad.
Bug: webrtc:9693 Change-Id: Ica997d5cbe28288720325a51058a40a37c612665 Reviewed-on: https://webrtc-review.googlesource.com/98583 Reviewed-by: Alessio Bazzica <alessiob@webrtc.org> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24617}
This commit is contained in:

committed by
Commit Bot

parent
7cd2a95148
commit
5e2e66d8a0
@ -9,7 +9,6 @@
|
||||
import("../../../../webrtc.gni")
|
||||
|
||||
rtc_source_set("rnn_vad") {
|
||||
configs += [ "../../../..:no_global_constructors" ]
|
||||
sources = [
|
||||
"common.h",
|
||||
"features_extraction.cc",
|
||||
|
@ -17,12 +17,6 @@
|
||||
|
||||
namespace webrtc {
|
||||
namespace rnn_vad {
|
||||
namespace {
|
||||
|
||||
// DCT scaling factor.
|
||||
const float kDctScalingFactor = std::sqrt(2.f / kNumBands);
|
||||
|
||||
} // namespace
|
||||
|
||||
std::array<size_t, kNumBands> ComputeBandBoundaryIndexes(
|
||||
size_t sample_rate_hz,
|
||||
@ -116,6 +110,8 @@ void ComputeDct(rtc::ArrayView<const float, kNumBands> in,
|
||||
RTC_DCHECK_LE(1, out.size());
|
||||
RTC_DCHECK_LE(out.size(), in.size());
|
||||
std::fill(out.begin(), out.end(), 0.f);
|
||||
// DCT scaling factor.
|
||||
const float kDctScalingFactor = std::sqrt(2.f / kNumBands);
|
||||
for (size_t i = 0; i < out.size(); ++i) {
|
||||
for (size_t j = 0; j < in.size(); ++j) {
|
||||
out[i] += in[j] * dct_table[j * in.size() + i];
|
||||
|
Reference in New Issue
Block a user