
Data Structures | |
| struct | CoefVLCTable |
Defines | |
| #define | IBSS_ATTR |
| #define | ICONST_ATTR |
| #define | ICODE_ATTR |
| #define | VLCBITS 7 |
| #define | VLCMAX ((22+VLCBITS-1)/VLCBITS) |
| #define | EXPVLCBITS 7 |
| #define | EXPMAX ((19+EXPVLCBITS-1)/EXPVLCBITS) |
| #define | HGAINVLCBITS 9 |
| #define | HGAINMAX ((13+HGAINVLCBITS-1)/HGAINVLCBITS) |
| #define | VLCBUF1SIZE 4598 |
| #define | VLCBUF2SIZE 3574 |
| #define | VLCBUF3SIZE 360 |
| #define | VLCBUF4SIZE 540 |
Functions | |
| static void | wma_lsp_to_curve_init (WMADecodeContext *s, int frame_len) |
| static void | vector_fmul_add_add (int32_t *dst, const int32_t *src0, const int32_t *src1, int len) |
| static void | vector_fmul_reverse (int32_t *dst, const int32_t *src0, const int32_t *src1, int len) |
| static void | wma_window (WMADecodeContext *s, int32_t *in, int32_t *out) |
| Apply MDCT window and add into output. | |
| static void | init_coef_vlc (VLC *vlc, uint16_t **prun_table, uint16_t **plevel_table, const CoefVLCTable *vlc_table, int tab) |
| int | wma_decode_init (WMADecodeContext *s, asf_waveformatex_t *wfx) |
| static int32_t | pow_m1_4 (WMADecodeContext *s, int32_t x) |
| static void | wma_lsp_to_curve (WMADecodeContext *s, int32_t *out, int32_t *val_max_ptr, int n, int32_t *lsp) |
| static void | decode_exp_lsp (WMADecodeContext *s, int ch) |
| static int | decode_exp_vlc (WMADecodeContext *s, int ch) |
| static int | wma_decode_block (WMADecodeContext *s) |
| static int | wma_decode_frame (WMADecodeContext *s, int32_t *samples) |
| int | wma_decode_superframe_init (WMADecodeContext *s, uint8_t *buf, int buf_size) |
| int | wma_decode_superframe_frame (WMADecodeContext *s, int32_t *samples, uint8_t *buf, int buf_size) |
Variables | |
| int32_t | coefsarray [2][(1<< 11)] |
| int32_t | stat0 [2048] |
| int32_t | stat1 [1024] |
| int32_t | stat2 [512] |
| int32_t | stat3 [256] |
| int32_t | stat4 [128] |
| uint16_t * | runtabarray [2] |
| uint16_t * | levtabarray [2] |
| uint16_t | runtab0 [1336] |
| uint16_t | runtab1 [1336] |
| uint16_t | levtab0 [1336] |
| uint16_t | levtab1 [1336] |
| int16_t | vlcbuf1 [4598][2] |
| int16_t | vlcbuf2 [3574][2] |
| int16_t | vlcbuf3 [360][2] |
| int16_t | vlcbuf4 [540][2] |
| #define EXPMAX ((19+EXPVLCBITS-1)/EXPVLCBITS) |
Referenced by decode_exp_vlc().
| #define EXPVLCBITS 7 |
Referenced by decode_exp_vlc(), and wma_decode_init().
| #define HGAINMAX ((13+HGAINVLCBITS-1)/HGAINVLCBITS) |
Referenced by wma_decode_block().
| #define HGAINVLCBITS 9 |
Referenced by wma_decode_block(), and wma_decode_init().
| #define IBSS_ATTR |
| #define ICODE_ATTR |
| #define ICONST_ATTR |
| #define VLCBITS 7 |
Referenced by init_coef_vlc(), and wma_decode_block().
| #define VLCBUF1SIZE 4598 |
Referenced by wma_decode_init().
| #define VLCBUF2SIZE 3574 |
Referenced by wma_decode_init().
| #define VLCBUF3SIZE 360 |
Referenced by wma_decode_init().
| #define VLCBUF4SIZE 540 |
Referenced by wma_decode_init().
| #define VLCMAX ((22+VLCBITS-1)/VLCBITS) |
Referenced by wma_decode_block().
| static void decode_exp_lsp | ( | WMADecodeContext * | s, | |
| int | ch | |||
| ) | [static] |
References WMADecodeContext::block_len, WMADecodeContext::exponents, WMADecodeContext::gb, get_bits(), i, lsp_codebook, WMADecodeContext::max_exponent, NB_LSP_COEFS, and wma_lsp_to_curve().
Referenced by wma_decode_block().
| static int decode_exp_vlc | ( | WMADecodeContext * | s, | |
| int | ch | |||
| ) | [static] |
References WMADecodeContext::block_len, WMADecodeContext::block_len_bits, WMADecodeContext::exp_vlc, EXPMAX, WMADecodeContext::exponent_bands, WMADecodeContext::exponents, EXPVLCBITS, WMADecodeContext::frame_len_bits, WMADecodeContext::gb, get_bits(), get_vlc2(), WMADecodeContext::max_exponent, pow_10_to_yover16, VLC::table, and WMADecodeContext::version.
Referenced by wma_decode_block().
| static void init_coef_vlc | ( | VLC * | vlc, | |
| uint16_t ** | prun_table, | |||
| uint16_t ** | plevel_table, | |||
| const CoefVLCTable * | vlc_table, | |||
| int | tab | |||
| ) | [static] |
References CoefVLCTable::huffbits, CoefVLCTable::huffcodes, i, init_vlc(), CoefVLCTable::levels, levtabarray, CoefVLCTable::n, runtabarray, and VLCBITS.
Referenced by wma_decode_init().
| static int32_t pow_m1_4 | ( | WMADecodeContext * | s, | |
| int32_t | x | |||
| ) | [inline, static] |
References a, b, fixmul32(), fixtof64, ftofix32, LSP_POW_BITS, lsp_pow_e_table, WMADecodeContext::lsp_pow_m_table1, and WMADecodeContext::lsp_pow_m_table2.
Referenced by wma_lsp_to_curve().
| static void vector_fmul_add_add | ( | int32_t * | dst, | |
| const int32_t * | src0, | |||
| const int32_t * | src1, | |||
| int | len | |||
| ) | [inline, static] |
| static void vector_fmul_reverse | ( | int32_t * | dst, | |
| const int32_t * | src0, | |||
| const int32_t * | src1, | |||
| int | len | |||
| ) | [inline, static] |
| static int wma_decode_block | ( | WMADecodeContext * | s | ) | [static] |
References a, align_get_bits(), av_log2(), b, WMADecodeContext::block_len, WMADecodeContext::block_len_bits, BLOCK_MAX_SIZE, WMADecodeContext::block_num, WMADecodeContext::block_pos, WMADecodeContext::channel_coded, WMADecodeContext::coef_vlc, WMADecodeContext::coefs, WMADecodeContext::coefs1, WMADecodeContext::coefs_end, WMADecodeContext::coefs_start, decode_exp_lsp(), decode_exp_vlc(), WMADecodeContext::exponent_high_bands, WMADecodeContext::exponent_high_sizes, WMADecodeContext::exponents, WMADecodeContext::exponents_bsize, ff_imdct_calc(), fixdiv32(), fixdiv64(), Fixed32From64(), Fixed32To64(), fixmul32(), fixsqrt32(), fixtoi32, WMADecodeContext::frame_len, WMADecodeContext::frame_len_bits, WMADecodeContext::frame_out, WMADecodeContext::gb, get_bits(), get_vlc2(), WMADecodeContext::hgain_vlc, HGAINMAX, HGAINVLCBITS, WMADecodeContext::high_band_coded, HIGH_BAND_MAX_SIZE, WMADecodeContext::high_band_start, WMADecodeContext::high_band_values, i, IBSS_ATTR, index, itofix32, WMADecodeContext::level_table, MAX_CHANNELS, WMADecodeContext::max_exponent, WMADecodeContext::mdct_ctx, WMADecodeContext::ms_stereo, WMADecodeContext::nb_block_sizes, WMADecodeContext::nb_channels, next(), WMADecodeContext::next_block_len_bits, WMADecodeContext::noise_index, WMADecodeContext::noise_mult, NOISE_TAB_SIZE, WMADecodeContext::noise_table, pow_table, PRECISION, WMADecodeContext::prev_block_len_bits, WMADecodeContext::reset_block_lengths, run(), WMADecodeContext::run_table, VLC::table, WMADecodeContext::use_exp_vlc, WMADecodeContext::use_noise_coding, WMADecodeContext::use_variable_block_len, WMADecodeContext::version, VLCBITS, VLCMAX, and wma_window().
Referenced by wma_decode_frame().
| static int wma_decode_frame | ( | WMADecodeContext * | s, | |
| int32_t * | samples | |||
| ) | [static] |
| int wma_decode_init | ( | WMADecodeContext * | s, | |
| asf_waveformatex_t * | wfx | |||
| ) |
References a, ASF_CODEC_ID_WMAV1, ASF_CODEC_ID_WMAV2, av_log2(), b, WMADecodeContext::bit_rate, asf_waveformatex_s::bitrate, WMADecodeContext::block_align, BLOCK_MIN_BITS, asf_waveformatex_s::blockalign, WMADecodeContext::byte_offset_bits, asf_waveformatex_s::channels, asf_waveformatex_s::codec_id, WMADecodeContext::coef_vlc, coef_vlcs, WMADecodeContext::coefs, WMADecodeContext::coefs_end, WMADecodeContext::coefs_start, coefsarray, asf_waveformatex_s::data, asf_waveformatex_s::datalen, WMADecodeContext::exp_vlc, exponent_band_22050, exponent_band_32000, exponent_band_44100, WMADecodeContext::exponent_bands, WMADecodeContext::exponent_high_bands, WMADecodeContext::exponent_high_sizes, WMADecodeContext::exponent_sizes, EXPVLCBITS, ff_mdct_init(), fixdiv32(), fixdiv64(), fixmul32(), fixtoi32, fixtoi64, WMADecodeContext::frame_len, WMADecodeContext::frame_len_bits, fsincos(), hgain_huffbits, hgain_huffcodes, WMADecodeContext::hgain_vlc, HGAINVLCBITS, WMADecodeContext::high_band_start, i, init_coef_vlc(), init_vlc(), itofix32, itofix64, WMADecodeContext::last_bitoffset, WMADecodeContext::last_superframe_len, WMADecodeContext::level_table, levtab0, levtab1, levtabarray, WMADecodeContext::mdct_ctx, mdct_init_global(), WMADecodeContext::nb_block_sizes, WMADecodeContext::nb_channels, WMADecodeContext::noise_mult, NOISE_TAB_SIZE, WMADecodeContext::noise_table, noisetable_exp, asf_waveformatex_s::rate, WMADecodeContext::reset_block_lengths, WMADecodeContext::run_table, runtab0, runtab1, runtabarray, WMADecodeContext::sample_rate, scale_huffbits, scale_huffcodes, stat0, stat1, stat2, stat3, stat4, VLC::table, VLC::table_allocated, WMADecodeContext::use_bit_reservoir, WMADecodeContext::use_exp_vlc, WMADecodeContext::use_noise_coding, WMADecodeContext::use_variable_block_len, WMADecodeContext::version, vlcbuf1, VLCBUF1SIZE, vlcbuf2, VLCBUF2SIZE, vlcbuf3, VLCBUF3SIZE, vlcbuf4, VLCBUF4SIZE, WMADecodeContext::windows, wma_critical_freqs, and wma_lsp_to_curve_init().
Referenced by OpenDecoder().
| int wma_decode_superframe_frame | ( | WMADecodeContext * | s, | |
| int32_t * | samples, | |||
| uint8_t * | buf, | |||
| int | buf_size | |||
| ) |
References WMADecodeContext::bit_offset, WMADecodeContext::byte_offset_bits, WMADecodeContext::current_frame, WMADecodeContext::frame_len, WMADecodeContext::gb, get_bits(), get_bits_count(), init_get_bits(), WMADecodeContext::last_bitoffset, WMADecodeContext::last_superframe, WMADecodeContext::last_superframe_len, MAX_CODED_SUPERFRAME_SIZE, WMADecodeContext::nb_frames, WMADecodeContext::reset_block_lengths, skip_bits(), WMADecodeContext::use_bit_reservoir, and wma_decode_frame().
Referenced by DecodeFrame().
| int wma_decode_superframe_init | ( | WMADecodeContext * | s, | |
| uint8_t * | buf, | |||
| int | buf_size | |||
| ) |
| static void wma_lsp_to_curve | ( | WMADecodeContext * | s, | |
| int32_t * | out, | |||
| int32_t * | val_max_ptr, | |||
| int | n, | |||
| int32_t * | lsp | |||
| ) | [static] |
References fixmul32(), fixmul32b(), i, WMADecodeContext::lsp_cos_table, NB_LSP_COEFS, and pow_m1_4().
Referenced by decode_exp_lsp().
| static void wma_lsp_to_curve_init | ( | WMADecodeContext * | s, | |
| int | frame_len | |||
| ) | [static] |
References a, b, fixdiv32(), fsincos(), i, itofix32, WMADecodeContext::lsp_cos_table, LSP_POW_BITS, WMADecodeContext::lsp_pow_m_table1, WMADecodeContext::lsp_pow_m_table2, M_PI_F, and pow_a_table.
Referenced by wma_decode_init().
| static void wma_window | ( | WMADecodeContext * | s, | |
| int32_t * | in, | |||
| int32_t * | out | |||
| ) | [static] |
Apply MDCT window and add into output.
We ensure that when the windows overlap their squared sum is always 1 (MDCT reconstruction rule).
The Vorbis I spec has a great diagram explaining this process. See section 1.3.2.3 of http://xiph.org/vorbis/doc/Vorbis_I_spec.html
References WMADecodeContext::block_len, WMADecodeContext::block_len_bits, WMADecodeContext::frame_len_bits, WMADecodeContext::next_block_len_bits, WMADecodeContext::prev_block_len_bits, vector_fmul_add_add(), vector_fmul_reverse(), and WMADecodeContext::windows.
Referenced by wma_decode_block().
| int32_t coefsarray[2][(1<< 11)] |
Referenced by wma_decode_init().
| uint16_t levtab0[1336] |
Referenced by wma_decode_init().
| uint16_t levtab1[1336] |
Referenced by wma_decode_init().
| uint16_t * levtabarray[2] |
Referenced by init_coef_vlc(), and wma_decode_init().
| uint16_t runtab0[1336] |
Referenced by wma_decode_init().
| uint16_t runtab1[1336] |
Referenced by wma_decode_init().
| uint16_t* runtabarray[2] |
Referenced by init_coef_vlc(), and wma_decode_init().
| int32_t stat0[2048] |
Referenced by wma_decode_init().
| int32_t stat1[1024] |
Referenced by wma_decode_init().
| int32_t stat2[512] |
Referenced by wma_decode_init().
| int32_t stat3[256] |
Referenced by wma_decode_init().
| int32_t stat4[128] |
Referenced by wma_decode_init().
| int16_t vlcbuf1[4598][2] |
Referenced by wma_decode_init().
| int16_t vlcbuf2[3574][2] |
Referenced by wma_decode_init().
| int16_t vlcbuf3[360][2] |
Referenced by wma_decode_init().
| int16_t vlcbuf4[540][2] |
Referenced by wma_decode_init().
1.5.6