#include "modules/audio_processing/vad/vad_audio_proc.h"
#include <math.h>
#include <stdio.h>
#include <string.h>
#include "common_audio/third_party/ooura/fft_size_256/fft4g.h"
#include "modules/audio_processing/vad/pitch_internal.h"
#include "modules/audio_processing/vad/pole_zero_filter.h"
#include "modules/audio_processing/vad/vad_audio_proc_internal.h"
#include "rtc_base/checks.h"
extern "C" {
#include "modules/audio_coding/codecs/isac/main/source/filter_functions.h"
#include "modules/audio_coding/codecs/isac/main/source/isac_vad.h"
#include "modules/audio_coding/codecs/isac/main/source/pitch_estimator.h"
#include "modules/audio_coding/codecs/isac/main/source/structs.h"
}
namespace webrtc {
struct VadAudioProc::PitchAnalysisStruct : public ::PitchAnalysisStruct { … };
struct VadAudioProc::PreFiltBankstr : public ::PreFiltBankstr { … };
static constexpr float kFrequencyResolution = …;
static constexpr int kSilenceRms = …;
VadAudioProc::VadAudioProc()
: … { … }
VadAudioProc::~VadAudioProc() { … }
void VadAudioProc::ResetBuffer() { … }
int VadAudioProc::ExtractFeatures(const int16_t* frame,
size_t length,
AudioFeatures* features) { … }
void VadAudioProc::SubframeCorrelation(double* corr,
size_t length_corr,
size_t subframe_index) { … }
void VadAudioProc::GetLpcPolynomials(double* lpc, size_t length_lpc) { … }
static float QuadraticInterpolation(float prev_val,
float curr_val,
float next_val) { … }
void VadAudioProc::FindFirstSpectralPeaks(double* f_peak,
size_t length_f_peak) { … }
void VadAudioProc::PitchAnalysis(double* log_pitch_gains,
double* pitch_lags_hz,
size_t length) { … }
void VadAudioProc::Rms(double* rms, size_t length_rms) { … }
}