#include "modules/audio_coding/neteq/dsp_helper.h"
#include <string.h>
#include <algorithm>
#include "common_audio/signal_processing/include/signal_processing_library.h"
namespace webrtc {
const int16_t DspHelper::kParabolaCoefficients[17][3] = …;
const int16_t DspHelper::kDownsample8kHzTbl[3] = …;
const int16_t DspHelper::kDownsample16kHzTbl[5] = …;
const int16_t DspHelper::kDownsample32kHzTbl[7] = …;
const int16_t DspHelper::kDownsample48kHzTbl[7] = …;
int DspHelper::RampSignal(const int16_t* input,
size_t length,
int factor,
int increment,
int16_t* output) { … }
int DspHelper::RampSignal(int16_t* signal,
size_t length,
int factor,
int increment) { … }
int DspHelper::RampSignal(AudioVector* signal,
size_t start_index,
size_t length,
int factor,
int increment) { … }
int DspHelper::RampSignal(AudioMultiVector* signal,
size_t start_index,
size_t length,
int factor,
int increment) { … }
void DspHelper::PeakDetection(int16_t* data,
size_t data_length,
size_t num_peaks,
int fs_mult,
size_t* peak_index,
int16_t* peak_value) { … }
void DspHelper::ParabolicFit(int16_t* signal_points,
int fs_mult,
size_t* peak_index,
int16_t* peak_value) { … }
size_t DspHelper::MinDistortion(const int16_t* signal,
size_t min_lag,
size_t max_lag,
size_t length,
int32_t* distortion_value) { … }
void DspHelper::CrossFade(const int16_t* input1,
const int16_t* input2,
size_t length,
int16_t* mix_factor,
int16_t factor_decrement,
int16_t* output) { … }
void DspHelper::UnmuteSignal(const int16_t* input,
size_t length,
int16_t* factor,
int increment,
int16_t* output) { … }
void DspHelper::MuteSignal(int16_t* signal, int mute_slope, size_t length) { … }
int DspHelper::DownsampleTo4kHz(const int16_t* input,
size_t input_length,
size_t output_length,
int input_rate_hz,
bool compensate_delay,
int16_t* output) { … }
}