34#define BLOCK_MIN_BITS 7
35#define BLOCK_MAX_BITS 11
36#define BLOCK_MAX_SIZE (1 << BLOCK_MAX_BITS)
38#define BLOCK_NB_SIZES (BLOCK_MAX_BITS - BLOCK_MIN_BITS + 1)
41#define HIGH_BAND_MAX_SIZE 16
43#define NB_LSP_COEFS 10
46#define MAX_CODED_SUPERFRAME_SIZE 32768
50#define NOISE_TAB_SIZE 8192
56#define VLCMAX ((22 + VLCBITS - 1) / VLCBITS)
158 const VLCElem *vlc,
const float *level_table,
159 const uint16_t *run_table,
int version,
161 int block_len,
int frame_len_bits,
const uint32_t ff_aac_scalefactor_code[121]
const uint8_t ff_aac_scalefactor_bits[121]
Libavcodec external API header.
bitstream reader API header.
#define AV_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding.
#define av_warn_unused_result
#define DECLARE_ALIGNED(n, t, v)
Declare a variable that is aligned in memory.
main external API structure.
const uint32_t * huffcodes
VLC bit values.
const uint8_t * huffbits
VLC bit size.
int n
total number of codes
const uint16_t * levels
table to build run/level tables
int frame_len
frame length in samples
float noise_table[NOISE_TAB_SIZE]
int block_len
block length in samples
uint16_t exponent_bands[BLOCK_NB_SIZES][25]
int coefs_start
first coded coef
int block_pos
current position in frame
int coefs_end[BLOCK_NB_SIZES]
max number of coded coefficients
int next_block_len_bits
log2 of next block length
int prev_block_len_bits
log2 of prev block length
float output[BLOCK_MAX_SIZE *2]
int exponent_sizes[BLOCK_NB_SIZES]
int nb_block_sizes
number of block sizes
uint8_t last_superframe[MAX_CODED_SUPERFRAME_SIZE+AV_INPUT_BUFFER_PADDING_SIZE]
WMACoef coefs1[MAX_CHANNELS][BLOCK_MAX_SIZE]
uint8_t ms_stereo
true if mid/side stereo mode
AVTXContext * mdct_ctx[BLOCK_NB_SIZES]
int high_band_values[MAX_CHANNELS][HIGH_BAND_MAX_SIZE]
int high_band_coded[MAX_CHANNELS][HIGH_BAND_MAX_SIZE]
const CoefVLCTable * coef_vlcs[2]
const float * windows[BLOCK_NB_SIZES]
float lsp_pow_m_table1[(1<< LSP_POW_BITS)]
int use_exp_vlc
exponent coding: 0 = lsp, 1 = vlc + delta
int version
1 = 0x160 (WMAV1), 2 = 0x161 (WMAV2)
av_tx_fn mdct_fn[BLOCK_NB_SIZES]
int exponent_high_bands[BLOCK_NB_SIZES][HIGH_BAND_MAX_SIZE]
int use_noise_coding
true if perceptual noise is added
int high_band_start[BLOCK_NB_SIZES]
index of first coef in high band
float exponents[MAX_CHANNELS][BLOCK_MAX_SIZE]
float max_exponent[MAX_CHANNELS]
int exponent_high_sizes[BLOCK_NB_SIZES]
float lsp_pow_e_table[256]
float coefs[MAX_CHANNELS][BLOCK_MAX_SIZE]
uint8_t channel_coded[MAX_CHANNELS]
true if channel is coded
int frame_len_bits
frame_len = 1 << frame_len_bits
int block_num
block number in current frame
float lsp_pow_m_table2[(1<< LSP_POW_BITS)]
float frame_out[MAX_CHANNELS][BLOCK_MAX_SIZE *2]
float lsp_cos_table[BLOCK_MAX_SIZE]
int exponents_initialized[MAX_CHANNELS]
int block_len_bits
log2 of current block length
int use_variable_block_len
int exponents_bsize[MAX_CHANNELS]
log2 ratio frame/exp. length
void(* av_tx_fn)(AVTXContext *s, void *out, void *in, ptrdiff_t stride)
Function pointer to a function to perform the transform.
av_warn_unused_result int ff_wma_init(AVCodecContext *avctx, int flags2)
int ff_wma_total_gain_to_bits(int total_gain)
#define MAX_CODED_SUPERFRAME_SIZE
const uint8_t ff_wma_hgain_hufftab[37][2]
const float ff_wma_lsp_codebook[NB_LSP_COEFS][16]
float WMACoef
type for decoded coefficients, int16_t would be enough for wma 1/2
unsigned int ff_wma_get_large_val(GetBitContext *gb)
Decode an uncompressed coefficient.
int ff_wma_end(AVCodecContext *avctx)
int ff_wma_run_level_decode(AVCodecContext *avctx, GetBitContext *gb, const VLCElem *vlc, const float *level_table, const uint16_t *run_table, int version, WMACoef *ptr, int offset, int num_coefs, int block_len, int frame_len_bits, int coef_nb_bits)
Decode run level compressed coefficients.
#define HIGH_BAND_MAX_SIZE