Logo Search packages:      
Sourcecode: blender version File versions

wmadec.c File Reference

Detailed Description

WMA compatible decoder. This decoder handles Microsoft Windows Media Audio data, versions 1 & 2. WMA v1 is identified by audio format 0x160 in Microsoft media files (ASF/AVI/WAV). WMA v2 is identified by audio format 0x161.

To use this decoder, a calling application must supply the extra data bytes provided with the WMA data. These are the extra, codec-specific bytes at the end of a WAVEFORMATEX data structure. Transmit these bytes to the decoder using the extradata[_size] fields in AVCodecContext. There should be 4 extra bytes for v1 data and 6 extra bytes for v2 data.

Definition in file wmadec.c.

#include "avcodec.h"
#include "bitstream.h"
#include "dsputil.h"
#include "wmadata.h"

Go to the source code of this file.


struct  CoefVLCTable
struct  WMADecodeContext


#define BLOCK_MAX_BITS   11
#define BLOCK_MIN_BITS   7
#define EXPVLCBITS   8
#define HGAINVLCBITS   9
#define HIGH_BAND_MAX_SIZE   16
#define LSP_POW_BITS   7
#define MAX_CHANNELS   2
#define NB_LSP_COEFS   10
#define NOISE_TAB_SIZE   8192
#define VLCBITS   9
#define VLCMAX   ((22+VLCBITS-1)/VLCBITS)


static void decode_exp_lsp (WMADecodeContext *s, int ch)
static int decode_exp_vlc (WMADecodeContext *s, int ch)
static void init_coef_vlc (VLC *vlc, uint16_t **prun_table, uint16_t **plevel_table, const CoefVLCTable *vlc_table)
static void interpolate_array (float *scale, int old_size, int new_size)
static float pow_m1_4 (WMADecodeContext *s, float x)
static int wma_decode_block (WMADecodeContext *s)
static int wma_decode_end (AVCodecContext *avctx)
static int wma_decode_frame (WMADecodeContext *s, int16_t *samples)
static int wma_decode_init (AVCodecContext *avctx)
static int wma_decode_superframe (AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size)
static void wma_lsp_to_curve (WMADecodeContext *s, float *out, float *val_max_ptr, int n, float *lsp)
static void wma_lsp_to_curve_init (WMADecodeContext *s, int frame_len)


AVCodec wmav1_decoder
AVCodec wmav2_decoder

Generated by  Doxygen 1.6.0   Back to index