Update to current webrtc library
This is from the upstream library commit id 3326535126e435f1ba647885ce43a8f0f3d317eb, corresponding to Chromium 88.0.4290.1.
This commit is contained in:
@ -8,29 +8,30 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "webrtc/modules/audio_processing/transient/wpd_node.h"
|
||||
#include "modules/audio_processing/transient/wpd_node.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
#include "webrtc/common_audio/fir_filter.h"
|
||||
#include "webrtc/modules/audio_processing/transient/dyadic_decimator.h"
|
||||
#include "common_audio/fir_filter.h"
|
||||
#include "common_audio/fir_filter_factory.h"
|
||||
#include "modules/audio_processing/transient/dyadic_decimator.h"
|
||||
#include "rtc_base/checks.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
WPDNode::WPDNode(size_t length,
|
||||
const float* coefficients,
|
||||
size_t coefficients_length)
|
||||
: // The data buffer has parent data length to be able to contain and filter
|
||||
// it.
|
||||
: // The data buffer has parent data length to be able to contain and
|
||||
// filter it.
|
||||
data_(new float[2 * length + 1]),
|
||||
length_(length),
|
||||
filter_(FIRFilter::Create(coefficients,
|
||||
coefficients_length,
|
||||
2 * length + 1)) {
|
||||
assert(length > 0 && coefficients && coefficients_length > 0);
|
||||
filter_(
|
||||
CreateFirFilter(coefficients, coefficients_length, 2 * length + 1)) {
|
||||
RTC_DCHECK_GT(length, 0);
|
||||
RTC_DCHECK(coefficients);
|
||||
RTC_DCHECK_GT(coefficients_length, 0);
|
||||
memset(data_.get(), 0.f, (2 * length + 1) * sizeof(data_[0]));
|
||||
}
|
||||
|
||||
@ -46,8 +47,8 @@ int WPDNode::Update(const float* parent_data, size_t parent_data_length) {
|
||||
|
||||
// Decimate data.
|
||||
const bool kOddSequence = true;
|
||||
size_t output_samples = DyadicDecimate(
|
||||
data_.get(), parent_data_length, kOddSequence, data_.get(), length_);
|
||||
size_t output_samples = DyadicDecimate(data_.get(), parent_data_length,
|
||||
kOddSequence, data_.get(), length_);
|
||||
if (output_samples != length_) {
|
||||
return -1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user