25 #include "libavutil/float_dsp.h" 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) 57 typedef float WMACoef;
72 int use_bit_reservoir;
73 int use_variable_block_len;
78 int exponent_sizes[BLOCK_NB_SIZES];
79 uint16_t exponent_bands[BLOCK_NB_SIZES][25];
80 int high_band_start[BLOCK_NB_SIZES];
82 int coefs_end[BLOCK_NB_SIZES];
83 int exponent_high_sizes[BLOCK_NB_SIZES];
84 int exponent_high_bands[BLOCK_NB_SIZES][HIGH_BAND_MAX_SIZE];
88 int high_band_coded[MAX_CHANNELS][HIGH_BAND_MAX_SIZE];
89 int high_band_values[MAX_CHANNELS][HIGH_BAND_MAX_SIZE];
94 uint16_t *run_table[2];
95 float *level_table[2];
96 uint16_t *int_table[2];
103 int reset_block_lengths;
111 uint8_t channel_coded[MAX_CHANNELS];
112 int exponents_bsize[MAX_CHANNELS];
114 float max_exponent[MAX_CHANNELS];
115 WMACoef coefs1[MAX_CHANNELS][BLOCK_MAX_SIZE];
119 const float *windows[BLOCK_NB_SIZES];
121 DECLARE_ALIGNED(32,
float, frame_out)[MAX_CHANNELS][BLOCK_MAX_SIZE * 2];
125 int last_superframe_len;
126 float noise_table[NOISE_TAB_SIZE];
130 float lsp_cos_table[BLOCK_MAX_SIZE];
131 float lsp_pow_e_table[256];
132 float lsp_pow_m_table1[(1 << LSP_POW_BITS)];
133 float lsp_pow_m_table2[(1 << LSP_POW_BITS)];
141 extern const uint16_t ff_wma_hgain_huffcodes[37];
142 extern const uint8_t ff_wma_hgain_huffbits[37];
143 extern const float ff_wma_lsp_codebook[NB_LSP_COEFS][16];
144 extern const uint32_t ff_aac_scalefactor_code[121];
145 extern const uint8_t ff_aac_scalefactor_bits[121];
147 av_warn_unused_result
150 int ff_wma_total_gain_to_bits(
int total_gain);
154 VLC *vlc,
const float *level_table,
155 const uint16_t *run_table,
int version,
156 WMACoef *ptr,
int offset,
int num_coefs,
157 int block_len,
int frame_len_bits,
Definition: put_bits.h:35
int next_block_len_bits
log2 of next block length
Definition: wma.h:105
int block_len
block length in samples
Definition: wma.h:107
const uint8_t * huffbits
VLC bit size.
Definition: wma.h:63
int n
total number of codes
Definition: wma.h:60
int block_pos
current position in frame
Definition: wma.h:109
const uint32_t * huffcodes
VLC bit values.
Definition: wma.h:62
#define DECLARE_ALIGNED(n, t, v)
Declare a variable that is aligned in memory.
Definition: mem.h:120
bitstream reader API header.
int nb_block_sizes
number of block sizes
Definition: wma.h:101
int version
1 = 0x160 (WMAV1), 2 = 0x161 (WMAV2)
Definition: wma.h:71
Definition: float_dsp.h:24
int frame_len
frame length in samples
Definition: wma.h:99
int frame_len_bits
frame_len = 1 << frame_len_bits
Definition: wma.h:100
Libavcodec external API header.
int use_exp_vlc
exponent coding: 0 = lsp, 1 = vlc + delta
Definition: wma.h:74
main external API structure.
Definition: avcodec.h:1518
int block_num
block number in current frame
Definition: wma.h:108
int use_noise_coding
true if perceptual noise is added
Definition: wma.h:75
uint8_t ms_stereo
true if mid/side stereo mode
Definition: wma.h:110
int prev_block_len_bits
log2 of prev block length
Definition: wma.h:106
Definition: get_bits.h:56
#define AV_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding...
Definition: avcodec.h:773
int coefs_start
first coded coef
Definition: wma.h:81
int block_len_bits
log2 of current block length
Definition: wma.h:104
const uint16_t * levels
table to build run/level tables
Definition: wma.h:64