webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Macros | Functions
analog_agc.c File Reference
#include "webrtc/modules/audio_processing/agc/legacy/analog_agc.h"
#include <stdlib.h>
#include "webrtc/base/checks.h"

Macros

#define AGC_DEFAULT_TARGET_LEVEL   3
 
#define AGC_DEFAULT_COMP_GAIN   9
 
#define ANALOG_TARGET_LEVEL   11
 
#define ANALOG_TARGET_LEVEL_2   5
 
#define OFFSET_ENV_TO_RMS   9
 
#define DIGITAL_REF_AT_0_COMP_GAIN   4
 
#define DIFF_REF_TO_ANALOG   5
 
#define GAIN_TBL_LEN   32
 

Functions

int WebRtcAgc_AddMic (void *state, int16_t *const *in_mic, size_t num_bands, size_t samples)
 
int WebRtcAgc_AddFarend (void *state, const int16_t *in_far, size_t samples)
 
int WebRtcAgc_GetAddFarendError (void *state, size_t samples)
 
int WebRtcAgc_VirtualMic (void *agcInst, int16_t *const *in_near, size_t num_bands, size_t samples, int32_t micLevelIn, int32_t *micLevelOut)
 
void WebRtcAgc_UpdateAgcThresholds (LegacyAgc *stt)
 
void WebRtcAgc_SaturationCtrl (LegacyAgc *stt, uint8_t *saturated, int32_t *env)
 
void WebRtcAgc_ZeroCtrl (LegacyAgc *stt, int32_t *inMicLevel, int32_t *env)
 
void WebRtcAgc_SpeakerInactiveCtrl (LegacyAgc *stt)
 
void WebRtcAgc_ExpCurve (int16_t volume, int16_t *index)
 
int32_t WebRtcAgc_ProcessAnalog (void *state, int32_t inMicLevel, int32_t *outMicLevel, int16_t vadLogRatio, int16_t echo, uint8_t *saturationWarning)
 
int WebRtcAgc_Process (void *agcInst, const int16_t *const *in_near, size_t num_bands, size_t samples, int16_t *const *out, int32_t inMicLevel, int32_t *outMicLevel, int16_t echo, uint8_t *saturationWarning)
 
int WebRtcAgc_set_config (void *agcInst, WebRtcAgcConfig agcConfig)
 
int WebRtcAgc_get_config (void *agcInst, WebRtcAgcConfig *config)
 
voidWebRtcAgc_Create ()
 
void WebRtcAgc_Free (void *state)
 
int WebRtcAgc_Init (void *agcInst, int32_t minLevel, int32_t maxLevel, int16_t agcMode, uint32_t fs)
 

Macro Definition Documentation

◆ AGC_DEFAULT_COMP_GAIN

#define AGC_DEFAULT_COMP_GAIN   9

◆ AGC_DEFAULT_TARGET_LEVEL

#define AGC_DEFAULT_TARGET_LEVEL   3

◆ ANALOG_TARGET_LEVEL

#define ANALOG_TARGET_LEVEL   11

◆ ANALOG_TARGET_LEVEL_2

#define ANALOG_TARGET_LEVEL_2   5

◆ DIFF_REF_TO_ANALOG

#define DIFF_REF_TO_ANALOG   5

◆ DIGITAL_REF_AT_0_COMP_GAIN

#define DIGITAL_REF_AT_0_COMP_GAIN   4

◆ GAIN_TBL_LEN

#define GAIN_TBL_LEN   32

◆ OFFSET_ENV_TO_RMS

#define OFFSET_ENV_TO_RMS   9

Function Documentation

◆ WebRtcAgc_AddFarend()

int WebRtcAgc_AddFarend ( void state,
const int16_t in_far,
size_t  samples 
)

◆ WebRtcAgc_AddMic()

int WebRtcAgc_AddMic ( void state,
int16_t *const *  in_mic,
size_t  num_bands,
size_t  samples 
)

◆ WebRtcAgc_Create()

void* WebRtcAgc_Create ( )

◆ WebRtcAgc_ExpCurve()

void WebRtcAgc_ExpCurve ( int16_t  volume,
int16_t index 
)

◆ WebRtcAgc_Free()

void WebRtcAgc_Free ( void state)

◆ WebRtcAgc_get_config()

int WebRtcAgc_get_config ( void agcInst,
WebRtcAgcConfig config 
)

◆ WebRtcAgc_GetAddFarendError()

int WebRtcAgc_GetAddFarendError ( void state,
size_t  samples 
)

◆ WebRtcAgc_Init()

int WebRtcAgc_Init ( void agcInst,
int32_t  minLevel,
int32_t  maxLevel,
int16_t  agcMode,
uint32_t  fs 
)

◆ WebRtcAgc_Process()

int WebRtcAgc_Process ( void agcInst,
const int16_t *const *  in_near,
size_t  num_bands,
size_t  samples,
int16_t *const *  out,
int32_t  inMicLevel,
int32_t outMicLevel,
int16_t  echo,
uint8_t saturationWarning 
)

◆ WebRtcAgc_ProcessAnalog()

int32_t WebRtcAgc_ProcessAnalog ( void state,
int32_t  inMicLevel,
int32_t outMicLevel,
int16_t  vadLogRatio,
int16_t  echo,
uint8_t saturationWarning 
)

◆ WebRtcAgc_SaturationCtrl()

void WebRtcAgc_SaturationCtrl ( LegacyAgc stt,
uint8_t saturated,
int32_t env 
)

◆ WebRtcAgc_set_config()

int WebRtcAgc_set_config ( void agcInst,
WebRtcAgcConfig  agcConfig 
)

◆ WebRtcAgc_SpeakerInactiveCtrl()

void WebRtcAgc_SpeakerInactiveCtrl ( LegacyAgc stt)

◆ WebRtcAgc_UpdateAgcThresholds()

void WebRtcAgc_UpdateAgcThresholds ( LegacyAgc stt)

◆ WebRtcAgc_VirtualMic()

int WebRtcAgc_VirtualMic ( void agcInst,
int16_t *const *  in_near,
size_t  num_bands,
size_t  samples,
int32_t  micLevelIn,
int32_t micLevelOut 
)

◆ WebRtcAgc_ZeroCtrl()

void WebRtcAgc_ZeroCtrl ( LegacyAgc stt,
int32_t inMicLevel,
int32_t env 
)