webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Public Member Functions | Protected Member Functions | List of all members
webrtc::PreemptiveExpand Class Reference

#include <preemptive_expand.h>

Inheritance diagram for webrtc::PreemptiveExpand:
webrtc::TimeStretch webrtc::TimeStretch

Public Member Functions

 PreemptiveExpand (int sample_rate_hz, size_t num_channels, const BackgroundNoise &background_noise, size_t overlap_samples)
 
ReturnCodes Process (const int16_t *pw16_decoded, size_t len, size_t old_data_len, AudioMultiVector *output, size_t *length_change_samples)
 
 PreemptiveExpand (int sample_rate_hz, size_t num_channels, const BackgroundNoise &background_noise, size_t overlap_samples)
 
ReturnCodes Process (const int16_t *pw16_decoded, size_t len, size_t old_data_len, AudioMultiVector *output, size_t *length_change_samples)
 
- Public Member Functions inherited from webrtc::TimeStretch
 TimeStretch (int sample_rate_hz, size_t num_channels, const BackgroundNoise &background_noise)
 
virtual ~TimeStretch ()
 
ReturnCodes Process (const int16_t *input, size_t input_len, bool fast_mode, AudioMultiVector *output, size_t *length_change_samples)
 
 TimeStretch (int sample_rate_hz, size_t num_channels, const BackgroundNoise &background_noise)
 
virtual ~TimeStretch ()
 
ReturnCodes Process (const int16_t *input, size_t input_len, bool fast_mode, AudioMultiVector *output, size_t *length_change_samples)
 

Protected Member Functions

void SetParametersForPassiveSpeech (size_t input_length, int16_t *best_correlation, size_t *peak_index) const override
 
ReturnCodes CheckCriteriaAndStretch (const int16_t *input, size_t input_length, size_t peak_index, int16_t best_correlation, bool active_speech, bool, AudioMultiVector *output) const override
 
void SetParametersForPassiveSpeech (size_t input_length, int16_t *best_correlation, size_t *peak_index) const override
 
ReturnCodes CheckCriteriaAndStretch (const int16_t *input, size_t input_length, size_t peak_index, int16_t best_correlation, bool active_speech, bool, AudioMultiVector *output) const override
 

Additional Inherited Members

- Public Types inherited from webrtc::TimeStretch
enum  ReturnCodes {
  kSuccess = 0, kSuccessLowEnergy = 1, kNoStretch = 2, kError = -1,
  kSuccess = 0, kSuccessLowEnergy = 1, kNoStretch = 2, kError = -1
}
 
enum  ReturnCodes {
  kSuccess = 0, kSuccessLowEnergy = 1, kNoStretch = 2, kError = -1,
  kSuccess = 0, kSuccessLowEnergy = 1, kNoStretch = 2, kError = -1
}
 
- Protected Attributes inherited from webrtc::TimeStretch
const int sample_rate_hz_
 
const int fs_mult_
 
const size_t num_channels_
 
const size_t master_channel_
 
const BackgroundNoisebackground_noise_
 
int16_t max_input_value_
 
int16_t downsampled_input_ [kDownsampledLen]
 
int16_t auto_correlation_ [kCorrelationLen+1]
 
- Static Protected Attributes inherited from webrtc::TimeStretch
static const size_t kCorrelationLen = 50
 
static const size_t kLogCorrelationLen = 6
 
static const size_t kMinLag = 10
 
static const size_t kMaxLag = 60
 
static const size_t kDownsampledLen = kCorrelationLen + kMaxLag
 
static const int kCorrelationThreshold = 14746
 

Constructor & Destructor Documentation

◆ PreemptiveExpand() [1/2]

webrtc::PreemptiveExpand::PreemptiveExpand ( int  sample_rate_hz,
size_t  num_channels,
const BackgroundNoise background_noise,
size_t  overlap_samples 
)
inline

◆ PreemptiveExpand() [2/2]

webrtc::PreemptiveExpand::PreemptiveExpand ( int  sample_rate_hz,
size_t  num_channels,
const BackgroundNoise background_noise,
size_t  overlap_samples 
)
inline

Member Function Documentation

◆ CheckCriteriaAndStretch() [1/2]

PreemptiveExpand::ReturnCodes webrtc::PreemptiveExpand::CheckCriteriaAndStretch ( const int16_t input,
size_t  input_length,
size_t  peak_index,
int16_t  best_correlation,
bool  active_speech,
bool  ,
AudioMultiVector output 
) const
overrideprotectedvirtual

Implements webrtc::TimeStretch.

◆ CheckCriteriaAndStretch() [2/2]

ReturnCodes webrtc::PreemptiveExpand::CheckCriteriaAndStretch ( const int16_t input,
size_t  input_length,
size_t  peak_index,
int16_t  best_correlation,
bool  active_speech,
bool  ,
AudioMultiVector output 
) const
overrideprotectedvirtual

Implements webrtc::TimeStretch.

◆ Process() [1/2]

ReturnCodes webrtc::PreemptiveExpand::Process ( const int16_t pw16_decoded,
size_t  len,
size_t  old_data_len,
AudioMultiVector output,
size_t length_change_samples 
)

◆ Process() [2/2]

PreemptiveExpand::ReturnCodes webrtc::PreemptiveExpand::Process ( const int16_t pw16_decoded,
size_t  len,
size_t  old_data_len,
AudioMultiVector output,
size_t length_change_samples 
)

◆ SetParametersForPassiveSpeech() [1/2]

void webrtc::PreemptiveExpand::SetParametersForPassiveSpeech ( size_t  input_length,
int16_t best_correlation,
size_t peak_index 
) const
overrideprotectedvirtual

Implements webrtc::TimeStretch.

◆ SetParametersForPassiveSpeech() [2/2]

void webrtc::PreemptiveExpand::SetParametersForPassiveSpeech ( size_t  input_length,
int16_t best_correlation,
size_t peak_index 
) const
overrideprotectedvirtual

Implements webrtc::TimeStretch.


The documentation for this class was generated from the following files: