33 #define BLOCK_MIN_BITS 7 34 #define BLOCK_MAX_BITS 11 35 #define BLOCK_MAX_SIZE (1 << BLOCK_MAX_BITS) 37 #define BLOCK_NB_SIZES (BLOCK_MAX_BITS - BLOCK_MIN_BITS + 1) 40 #define HIGH_BAND_MAX_SIZE 16 42 #define NB_LSP_COEFS 10 45 #define MAX_CODED_SUPERFRAME_SIZE 32768 47 #define MAX_CHANNELS 2 49 #define NOISE_TAB_SIZE 8192 51 #define LSP_POW_BITS 7 55 #define VLCMAX ((22 + VLCBITS - 1) / VLCBITS) 94 uint16_t *run_table[2];
95 float *level_table[2];
96 uint16_t *int_table[2];
131 float lsp_pow_e_table[256];
154 VLC *vlc,
const float *level_table,
155 const uint16_t *run_table,
int version,
157 int block_len,
int frame_len_bits,
int next_block_len_bits
log2 of next block length
unsigned int ff_wma_get_large_val(GetBitContext *gb)
Decode an uncompressed coefficient.
int block_len
block length in samples
int ff_wma_run_level_decode(AVCodecContext *avctx, GetBitContext *gb, VLC *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.
const uint8_t * huffbits
VLC bit size.
int n
total number of codes
float WMACoef
type for decoded coefficients, int16_t would be enough for wma 1/2
int block_pos
current position in frame
const uint32_t * huffcodes
VLC bit values.
#define DECLARE_ALIGNED(n, t, v)
Declare a variable that is aligned in memory.
bitstream reader API header.
int nb_block_sizes
number of block sizes
int ff_wma_total_gain_to_bits(int total_gain)
const uint8_t ff_wma_hgain_huffbits[37]
static const uint8_t offset[127][2]
#define MAX_CODED_SUPERFRAME_SIZE
const uint16_t ff_wma_hgain_huffcodes[37]
int version
1 = 0x160 (WMAV1), 2 = 0x161 (WMAV2)
static const int8_t noise_table[256]
Data table used for TrueHD noise generation function.
int frame_len
frame length in samples
int frame_len_bits
frame_len = 1 << frame_len_bits
Libavcodec external API header.
#define HIGH_BAND_MAX_SIZE
int use_exp_vlc
exponent coding: 0 = lsp, 1 = vlc + delta
main external API structure.
static VLC coef_vlc[2]
coefficient run length vlc codes
int block_num
block number in current frame
int use_noise_coding
true if perceptual noise is added
int use_variable_block_len
uint8_t ms_stereo
true if mid/side stereo mode
#define av_warn_unused_result
int prev_block_len_bits
log2 of prev block length
const float ff_wma_lsp_codebook[NB_LSP_COEFS][16]
av_warn_unused_result int ff_wma_init(AVCodecContext *avctx, int flags2)
#define AV_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding...
const uint8_t ff_aac_scalefactor_bits[121]
static const CoefVLCTable coef_vlcs[6]
const uint32_t ff_aac_scalefactor_code[121]
int ff_wma_end(AVCodecContext *avctx)
int coefs_start
first coded coef
int block_len_bits
log2 of current block length
const uint16_t * levels
table to build run/level tables