FFmpeg
WMAVoiceContext Struct Reference

WMA Voice decoding context. More...

Data Fields

Global values specified in the stream header / extradata or used all over.
GetBitContext gb
 packet bitreader. More...
 
int8_t vbm_tree [25]
 converts VLC codes to frame type More...
 
int spillover_bitsize
 number of bits used to specify spillover_nbits in the packet header = ceil(log2(ctx->block_align << 3)) More...
 
int history_nsamples
 number of samples in history for signal prediction (through ACB) More...
 
int do_apf
 whether to apply the averaged projection filter (APF) More...
 
int denoise_strength
 strength of denoising in Wiener filter [0-11] More...
 
int denoise_tilt_corr
 Whether to apply tilt correction to the Wiener filter coefficients (postfilter) More...
 
int dc_level
 Predicted amount of DC noise, based on which a DC removal filter is used. More...
 
int lsps
 number of LSPs per frame [10 or 16] More...
 
int lsp_q_mode
 defines quantizer defaults [0, 1] More...
 
int lsp_def_mode
 defines different sets of LSP defaults [0, 1] More...
 
int min_pitch_val
 base value for pitch parsing code More...
 
int max_pitch_val
 max value + 1 for pitch parsing More...
 
int pitch_nbits
 number of bits used to specify the pitch value in the frame header More...
 
int block_pitch_nbits
 number of bits used to specify the first block's pitch value More...
 
int block_pitch_range
 range of the block pitch More...
 
int block_delta_pitch_nbits
 number of bits used to specify the delta pitch between this and the last block's pitch value, used in all but first block More...
 
int block_delta_pitch_hrange
 1/2 range of the delta (full range is from -this to +this-1) More...
 
uint16_t block_conv_table [4]
 boundaries for block pitch unit/scale conversion More...
 
Packet values specified in the packet header or related to a packet.

A packet is considered to be a single unit of data provided to this decoder by the demuxer.

int spillover_nbits
 number of bits of the previous packet's last superframe preceding this packet's first full superframe (useful for re-synchronization also) More...
 
int has_residual_lsps
 if set, superframes contain one set of LSPs that cover all frames, encoded as independent and residual LSPs; if not set, each frame contains its own, fully independent, LSPs More...
 
int skip_bits_next
 number of bits to skip at the next call to wmavoice_decode_packet() (since they're part of the previous superframe) More...
 
uint8_t sframe_cache [SFRAME_CACHE_MAXSIZE+AV_INPUT_BUFFER_PADDING_SIZE]
 cache for superframe data split over multiple packets More...
 
int sframe_cache_size
 set to >0 if we have data from an (incomplete) superframe from a previous packet that spilled over in the current packet; specifies the amount of bits in sframe_cache More...
 
PutBitContext pb
 bitstream writer for sframe_cache More...
 
Frame and superframe values

Superframe and frame data - these can change from frame to frame, although some of them do in that case serve as a cache / history for the next frame or superframe.

double prev_lsps [MAX_LSPS]
 LSPs of the last frame of the previous superframe. More...
 
int last_pitch_val
 pitch value of the previous frame More...
 
int last_acb_type
 frame type [0-2] of the previous frame More...
 
int pitch_diff_sh16
 ((cur_pitch_val - last_pitch_val) << 16) / MAX_FRAMESIZE More...
 
float silence_gain
 set for use in blocks if ACB_TYPE_NONE More...
 
int aw_idx_is_ext
 whether the AW index was encoded in 8 bits (instead of 6) More...
 
int aw_pulse_range
 the range over which aw_pulse_set1() can apply the pulse, relative to the value in aw_first_pulse_off. More...
 
int aw_n_pulses [2]
 number of AW-pulses in each block; note that this number can be negative (in which case it basically means "zero") More...
 
int aw_first_pulse_off [2]
 index of first sample to which to apply AW-pulses, or -0xff if unset More...
 
int aw_next_pulse_off_cache
 the position (relative to start of the second block) at which pulses should start to be positioned, serves as a cache for pitch-adaptive window pulses between blocks More...
 
int frame_cntr
 current frame index [0 - 0xFFFE]; is only used for comfort noise in pRNG() More...
 
int nb_superframes
 number of superframes in current packet More...
 
float gain_pred_err [6]
 cache for gain prediction More...
 
float excitation_history [MAX_SIGNAL_HISTORY]
 cache of the signal of previous superframes, used as a history for signal generation More...
 
float synth_history [MAX_LSPS]
 see excitation_history More...
 
Postfilter values

Variables used for postfilter implementation, mostly history for smoothing and so on, and context variables for FFT/iFFT.

AVTXContextrdft
 
AVTXContextirdft
 contexts for FFT-calculation in the More...
 
av_tx_fn rdft_fn
 
av_tx_fn irdft_fn
 postfilter (for denoise filter) More...
 
AVTXContextdct
 
AVTXContextdst
 contexts for phase shift (in Hilbert More...
 
av_tx_fn dct_fn
 
av_tx_fn dst_fn
 transform, part of postfilter) More...
 
float sin [511]
 
float cos [511]
 8-bit cosine/sine windows over [-pi,pi] range More...
 
float postfilter_agc
 gain control memory, used in adaptive_gain_control() More...
 
float dcf_mem [2]
 DC filter history. More...
 
float zero_exc_pf [MAX_SIGNAL_HISTORY+MAX_SFRAMESIZE]
 zero filter output (i.e. More...
 
float denoise_filter_cache [MAX_FRAMESIZE]
 
int denoise_filter_cache_size
 samples in denoise_filter_cache More...
 
float tilted_lpcs_pf [0x82]
 aligned buffer for LPC tilting More...
 
float denoise_coeffs_pf [0x82]
 aligned buffer for denoise coefficients More...
 
float synth_filter_out_buf [0x80+MAX_LSPS_ALIGN16]
 aligned buffer for postfilter speech synthesis More...
 

Detailed Description

WMA Voice decoding context.

Definition at line 132 of file wmavoice.c.

Field Documentation

◆ gb

GetBitContext WMAVoiceContext::gb

packet bitreader.

During decoder init, it contains the extradata from the demuxer. During decoding, it contains packet data.

Definition at line 137 of file wmavoice.c.

◆ vbm_tree

int8_t WMAVoiceContext::vbm_tree[25]

converts VLC codes to frame type

Definition at line 141 of file wmavoice.c.

◆ spillover_bitsize

int WMAVoiceContext::spillover_bitsize

number of bits used to specify spillover_nbits in the packet header = ceil(log2(ctx->block_align << 3))

Definition at line 143 of file wmavoice.c.

◆ history_nsamples

int WMAVoiceContext::history_nsamples

number of samples in history for signal prediction (through ACB)

Definition at line 146 of file wmavoice.c.

◆ do_apf

int WMAVoiceContext::do_apf

whether to apply the averaged projection filter (APF)

Definition at line 150 of file wmavoice.c.

◆ denoise_strength

int WMAVoiceContext::denoise_strength

strength of denoising in Wiener filter [0-11]

Definition at line 152 of file wmavoice.c.

◆ denoise_tilt_corr

int WMAVoiceContext::denoise_tilt_corr

Whether to apply tilt correction to the Wiener filter coefficients (postfilter)

Definition at line 154 of file wmavoice.c.

◆ dc_level

int WMAVoiceContext::dc_level

Predicted amount of DC noise, based on which a DC removal filter is used.

Definition at line 156 of file wmavoice.c.

◆ lsps

int WMAVoiceContext::lsps

number of LSPs per frame [10 or 16]

Definition at line 159 of file wmavoice.c.

◆ lsp_q_mode

int WMAVoiceContext::lsp_q_mode

defines quantizer defaults [0, 1]

Definition at line 160 of file wmavoice.c.

◆ lsp_def_mode

int WMAVoiceContext::lsp_def_mode

defines different sets of LSP defaults [0, 1]

Definition at line 161 of file wmavoice.c.

◆ min_pitch_val

int WMAVoiceContext::min_pitch_val

base value for pitch parsing code

Definition at line 164 of file wmavoice.c.

◆ max_pitch_val

int WMAVoiceContext::max_pitch_val

max value + 1 for pitch parsing

Definition at line 165 of file wmavoice.c.

◆ pitch_nbits

int WMAVoiceContext::pitch_nbits

number of bits used to specify the pitch value in the frame header

Definition at line 166 of file wmavoice.c.

◆ block_pitch_nbits

int WMAVoiceContext::block_pitch_nbits

number of bits used to specify the first block's pitch value

Definition at line 168 of file wmavoice.c.

◆ block_pitch_range

int WMAVoiceContext::block_pitch_range

range of the block pitch

Definition at line 170 of file wmavoice.c.

◆ block_delta_pitch_nbits

int WMAVoiceContext::block_delta_pitch_nbits

number of bits used to specify the delta pitch between this and the last block's pitch value, used in all but first block

Definition at line 171 of file wmavoice.c.

◆ block_delta_pitch_hrange

int WMAVoiceContext::block_delta_pitch_hrange

1/2 range of the delta (full range is from -this to +this-1)

Definition at line 175 of file wmavoice.c.

◆ block_conv_table

uint16_t WMAVoiceContext::block_conv_table[4]

boundaries for block pitch unit/scale conversion

Definition at line 177 of file wmavoice.c.

◆ spillover_nbits

int WMAVoiceContext::spillover_nbits

number of bits of the previous packet's last superframe preceding this packet's first full superframe (useful for re-synchronization also)

Definition at line 189 of file wmavoice.c.

◆ has_residual_lsps

int WMAVoiceContext::has_residual_lsps

if set, superframes contain one set of LSPs that cover all frames, encoded as independent and residual LSPs; if not set, each frame contains its own, fully independent, LSPs

Definition at line 193 of file wmavoice.c.

◆ skip_bits_next

int WMAVoiceContext::skip_bits_next

number of bits to skip at the next call to wmavoice_decode_packet() (since they're part of the previous superframe)

Definition at line 198 of file wmavoice.c.

◆ sframe_cache

uint8_t WMAVoiceContext::sframe_cache[SFRAME_CACHE_MAXSIZE+AV_INPUT_BUFFER_PADDING_SIZE]

cache for superframe data split over multiple packets

Definition at line 202 of file wmavoice.c.

◆ sframe_cache_size

int WMAVoiceContext::sframe_cache_size

set to >0 if we have data from an (incomplete) superframe from a previous packet that spilled over in the current packet; specifies the amount of bits in sframe_cache

Definition at line 205 of file wmavoice.c.

◆ pb

PutBitContext WMAVoiceContext::pb

bitstream writer for sframe_cache

Definition at line 210 of file wmavoice.c.

◆ prev_lsps

double WMAVoiceContext::prev_lsps[MAX_LSPS]

LSPs of the last frame of the previous superframe.

Definition at line 221 of file wmavoice.c.

◆ last_pitch_val

int WMAVoiceContext::last_pitch_val

pitch value of the previous frame

Definition at line 223 of file wmavoice.c.

◆ last_acb_type

int WMAVoiceContext::last_acb_type

frame type [0-2] of the previous frame

Definition at line 224 of file wmavoice.c.

◆ pitch_diff_sh16

int WMAVoiceContext::pitch_diff_sh16

((cur_pitch_val - last_pitch_val) << 16) / MAX_FRAMESIZE

Definition at line 225 of file wmavoice.c.

◆ silence_gain

float WMAVoiceContext::silence_gain

set for use in blocks if ACB_TYPE_NONE

Definition at line 227 of file wmavoice.c.

◆ aw_idx_is_ext

int WMAVoiceContext::aw_idx_is_ext

whether the AW index was encoded in 8 bits (instead of 6)

Definition at line 229 of file wmavoice.c.

◆ aw_pulse_range

int WMAVoiceContext::aw_pulse_range

the range over which aw_pulse_set1() can apply the pulse, relative to the value in aw_first_pulse_off.

The exact position of the first AW-pulse is within [pulse_off, pulse_off + this], and depends on bitstream values; [16 or 24]

Definition at line 231 of file wmavoice.c.

◆ aw_n_pulses

int WMAVoiceContext::aw_n_pulses[2]

number of AW-pulses in each block; note that this number can be negative (in which case it basically means "zero")

Definition at line 237 of file wmavoice.c.

◆ aw_first_pulse_off

int WMAVoiceContext::aw_first_pulse_off[2]

index of first sample to which to apply AW-pulses, or -0xff if unset

Definition at line 240 of file wmavoice.c.

◆ aw_next_pulse_off_cache

int WMAVoiceContext::aw_next_pulse_off_cache

the position (relative to start of the second block) at which pulses should start to be positioned, serves as a cache for pitch-adaptive window pulses between blocks

Definition at line 242 of file wmavoice.c.

◆ frame_cntr

int WMAVoiceContext::frame_cntr

current frame index [0 - 0xFFFE]; is only used for comfort noise in pRNG()

Definition at line 248 of file wmavoice.c.

◆ nb_superframes

int WMAVoiceContext::nb_superframes

number of superframes in current packet

Definition at line 250 of file wmavoice.c.

◆ gain_pred_err

float WMAVoiceContext::gain_pred_err[6]

cache for gain prediction

Definition at line 251 of file wmavoice.c.

◆ excitation_history

float WMAVoiceContext::excitation_history[MAX_SIGNAL_HISTORY]

cache of the signal of previous superframes, used as a history for signal generation

Definition at line 252 of file wmavoice.c.

◆ synth_history

float WMAVoiceContext::synth_history[MAX_LSPS]

see excitation_history

Definition at line 256 of file wmavoice.c.

◆ rdft

AVTXContext* WMAVoiceContext::rdft

Definition at line 266 of file wmavoice.c.

◆ irdft

AVTXContext * WMAVoiceContext::irdft

contexts for FFT-calculation in the

Definition at line 266 of file wmavoice.c.

◆ rdft_fn

av_tx_fn WMAVoiceContext::rdft_fn

Definition at line 267 of file wmavoice.c.

◆ irdft_fn

av_tx_fn WMAVoiceContext::irdft_fn

postfilter (for denoise filter)

Definition at line 267 of file wmavoice.c.

◆ dct

AVTXContext* WMAVoiceContext::dct

Definition at line 268 of file wmavoice.c.

◆ dst

AVTXContext * WMAVoiceContext::dst

contexts for phase shift (in Hilbert

Definition at line 268 of file wmavoice.c.

◆ dct_fn

av_tx_fn WMAVoiceContext::dct_fn

Definition at line 269 of file wmavoice.c.

◆ dst_fn

av_tx_fn WMAVoiceContext::dst_fn

transform, part of postfilter)

Definition at line 269 of file wmavoice.c.

◆ sin

float WMAVoiceContext::sin[511]

Definition at line 270 of file wmavoice.c.

◆ cos

float WMAVoiceContext::cos[511]

8-bit cosine/sine windows over [-pi,pi] range

Definition at line 270 of file wmavoice.c.

◆ postfilter_agc

float WMAVoiceContext::postfilter_agc

gain control memory, used in adaptive_gain_control()

Definition at line 272 of file wmavoice.c.

◆ dcf_mem

float WMAVoiceContext::dcf_mem[2]

DC filter history.

Definition at line 274 of file wmavoice.c.

◆ zero_exc_pf

float WMAVoiceContext::zero_exc_pf[MAX_SIGNAL_HISTORY+MAX_SFRAMESIZE]

zero filter output (i.e.

excitation) by postfilter

Definition at line 275 of file wmavoice.c.

◆ denoise_filter_cache

float WMAVoiceContext::denoise_filter_cache[MAX_FRAMESIZE]

Definition at line 278 of file wmavoice.c.

◆ denoise_filter_cache_size

int WMAVoiceContext::denoise_filter_cache_size

samples in denoise_filter_cache

Definition at line 279 of file wmavoice.c.

◆ tilted_lpcs_pf

float WMAVoiceContext::tilted_lpcs_pf[0x82]

aligned buffer for LPC tilting

Definition at line 280 of file wmavoice.c.

◆ denoise_coeffs_pf

float WMAVoiceContext::denoise_coeffs_pf[0x82]

aligned buffer for denoise coefficients

Definition at line 282 of file wmavoice.c.

◆ synth_filter_out_buf

float WMAVoiceContext::synth_filter_out_buf[0x80+MAX_LSPS_ALIGN16]

aligned buffer for postfilter speech synthesis

Definition at line 284 of file wmavoice.c.


The documentation for this struct was generated from the following file: