#include "avcodec.h"
#include "wma.h"
#include "wmadata.h"
#include <assert.h>
Go to the source code of this file.
Functions | |
static void | init_coef_vlc (VLC *vlc, uint16_t **prun_table, float **plevel_table, uint16_t **pint_table, const CoefVLCTable *vlc_table) |
int av_cold | ff_wma_get_frame_len_bits (int sample_rate, int version, unsigned int decode_flags) |
Get the samples per frame for this stream. | |
int | ff_wma_init (AVCodecContext *avctx, int flags2) |
int | ff_wma_total_gain_to_bits (int total_gain) |
int | ff_wma_end (AVCodecContext *avctx) |
unsigned int | ff_wma_get_large_val (GetBitContext *gb) |
Decode an uncompressed coefficient. | |
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. |
int ff_wma_end | ( | AVCodecContext * | avctx | ) |
int av_cold ff_wma_get_frame_len_bits | ( | int | sample_rate, | |
int | version, | |||
unsigned int | decode_flags | |||
) |
Get the samples per frame for this stream.
sample_rate | output sample_rate | |
version | wma version | |
decode_flags | codec compression features |
Definition at line 76 of file wma.c.
Referenced by decode_init(), and ff_wma_init().
unsigned int ff_wma_get_large_val | ( | GetBitContext * | gb | ) |
Decode an uncompressed coefficient.
s | codec context |
consumes up to 34 bits
decode length
Definition at line 438 of file wma.c.
Referenced by decode_coeffs(), and ff_wma_run_level_decode().
int ff_wma_init | ( | AVCodecContext * | avctx, | |
int | flags2 | |||
) |
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.
avctx | codec context | |
gb | bitstream reader context | |
vlc | vlc table for get_vlc2 | |
level_table | level codes | |
run_table | run codes | |
version | 0 for wma1,2 1 for wmapro | |
ptr | output buffer | |
offset | offset in the output buffer | |
num_coefs | number of input coefficents | |
block_len | input buffer length (2^n) | |
frame_len_bits | number of bits for escaped run codes | |
coef_nb_bits | number of bits for escaped level codes |
normal code
EOB
escape
NOTE: this is rather suboptimal. reading block_len_bits would be better
escape decode
NOTE: EOB can be omitted
Definition at line 471 of file wma.c.
Referenced by decode_coeffs(), and wma_decode_block().
int ff_wma_total_gain_to_bits | ( | int | total_gain | ) |
static void init_coef_vlc | ( | VLC * | vlc, | |
uint16_t ** | prun_table, | |||
float ** | plevel_table, | |||
uint16_t ** | pint_table, | |||
const CoefVLCTable * | vlc_table | |||
) | [static] |