hvirtual/quicktime/ffmpeg/libavcodec/mpegaudiodec.c File Reference

#include "avcodec.h"
#include "bitstream.h"
#include "mpegaudio.h"
#include "dsputil.h"
#include "mpegaudiodectab.h"

Include dependency graph for mpegaudiodec.c:

Go to the source code of this file.

Data Structures

struct  MPADecodeContext
struct  MP3On4DecodeContext
struct  GranuleDef
struct  HuffTable

Defines

#define FRAC_BITS   15
#define WFRAC_BITS   14
#define OUT_MAX   INT16_MAX
#define OUT_MIN   INT16_MIN
#define OUT_SHIFT   (WFRAC_BITS + FRAC_BITS - 15)
#define FRAC_ONE   (1 << FRAC_BITS)
#define MULL(a, b)   (((int64_t)(a) * (int64_t)(b)) >> FRAC_BITS)
#define MUL64(a, b)   ((int64_t)(a) * (int64_t)(b))
#define FIX(a)   ((int)((a) * FRAC_ONE))
#define FIXR(a)   ((int)((a) * FRAC_ONE + 0.5))
#define FRAC_RND(a)   (((a) + (FRAC_ONE/2)) >> FRAC_BITS)
#define FIXHR(a)   ((int)((a) * (1LL<<32) + 0.5))
#define HEADER_SIZE   4
#define BACKSTEP_SIZE   512
#define MODE_EXT_MS_STEREO   2
#define MODE_EXT_I_STEREO   1
#define TABLE_4_3_SIZE   (8191 + 16)*4
#define SCALE_GEN(v)   { FIXR(1.0 * (v)), FIXR(0.7937005259 * (v)), FIXR(0.6299605249 * (v)) }
#define DEV_ORDER   13
#define POW_FRAC_BITS   24
#define POW_FRAC_ONE   (1 << POW_FRAC_BITS)
#define POW_FIX(a)   ((int)((a) * POW_FRAC_ONE))
#define POW_MULL(a, b)   (((int64_t)(a) * (int64_t)(b)) >> POW_FRAC_BITS)
#define COS0_0   FIXR(0.50060299823519630134)
#define COS0_1   FIXR(0.50547095989754365998)
#define COS0_2   FIXR(0.51544730992262454697)
#define COS0_3   FIXR(0.53104259108978417447)
#define COS0_4   FIXR(0.55310389603444452782)
#define COS0_5   FIXR(0.58293496820613387367)
#define COS0_6   FIXR(0.62250412303566481615)
#define COS0_7   FIXR(0.67480834145500574602)
#define COS0_8   FIXR(0.74453627100229844977)
#define COS0_9   FIXR(0.83934964541552703873)
#define COS0_10   FIXR(0.97256823786196069369)
#define COS0_11   FIXR(1.16943993343288495515)
#define COS0_12   FIXR(1.48416461631416627724)
#define COS0_13   FIXR(2.05778100995341155085)
#define COS0_14   FIXR(3.40760841846871878570)
#define COS0_15   FIXR(10.19000812354805681150)
#define COS1_0   FIXR(0.50241928618815570551)
#define COS1_1   FIXR(0.52249861493968888062)
#define COS1_2   FIXR(0.56694403481635770368)
#define COS1_3   FIXR(0.64682178335999012954)
#define COS1_4   FIXR(0.78815462345125022473)
#define COS1_5   FIXR(1.06067768599034747134)
#define COS1_6   FIXR(1.72244709823833392782)
#define COS1_7   FIXR(5.10114861868916385802)
#define COS2_0   FIXR(0.50979557910415916894)
#define COS2_1   FIXR(0.60134488693504528054)
#define COS2_2   FIXR(0.89997622313641570463)
#define COS2_3   FIXR(2.56291544774150617881)
#define COS3_0   FIXR(0.54119610014619698439)
#define COS3_1   FIXR(1.30656296487637652785)
#define COS4_0   FIXR(0.70710678118654752439)
#define BF(a, b, c)
#define BF1(a, b, c, d)
#define BF2(a, b, c, d)
#define ADD(a, b)   tab[a] += tab[b]
#define MACS(rt, ra, rb)   rt += (ra) * (rb)
#define MULS(ra, rb)   ((ra) * (rb))
#define SUM8(sum, op, w, p)
#define SUM8P2(sum1, op1, sum2, op2, w1, w2, p)
#define C3   FIXHR(0.86602540378443864676/2)
#define C1   FIXHR(0.98480775301220805936/2)
#define C2   FIXHR(0.93969262078590838405/2)
#define C3   FIXHR(0.86602540378443864676/2)
#define C4   FIXHR(0.76604444311897803520/2)
#define C5   FIXHR(0.64278760968653932632/2)
#define C6   FIXHR(0.5/2)
#define C7   FIXHR(0.34202014332566873304/2)
#define C8   FIXHR(0.17364817766693034885/2)
#define ISQRT2   FIXR(0.70710678118654752440)
#define INT_AA(j)
#define FLOAT_AA(j)

Typedefs

typedef int16_t OUT_INT
typedef int16_t MPA_INT

Functions

static always_inline int MULH (int a, int b)
static void compute_antialias_integer (MPADecodeContext *s, GranuleDef *g)
static void compute_antialias_float (MPADecodeContext *s, GranuleDef *g)
void ff_mpa_synth_init (MPA_INT *window)
static MPA_INT window[512] __attribute__ ((aligned(16)))
static int l1_unscale (int n, int mant, int scale_factor)
static int l2_unscale_group (int steps, int mant, int scale_factor)
static int l3_unscale (int value, int exponent)
static void int_pow_init (void)
static int decode_init (AVCodecContext *avctx)
static void dct32 (int32_t *out, int32_t *tab)
static int round_sample (int *sum)
void ff_mpa_synth_filter (MPA_INT *synth_buf_ptr, int *synth_buf_offset, MPA_INT *window, int *dither_state, OUT_INT *samples, int incr, int32_t sb_samples[SBLIMIT])
static void imdct12 (int *out, int *in)
static void imdct36 (int *out, int *buf, int *in, int *win)
static int decode_header (MPADecodeContext *s, uint32_t header)
int mpa_decode_header (AVCodecContext *avctx, uint32_t head)
static int mp_decode_layer1 (MPADecodeContext *s)
int l2_select_table (int bitrate, int nb_channels, int freq, int lsf)
static int mp_decode_layer2 (MPADecodeContext *s)
static void seek_to_maindata (MPADecodeContext *s, unsigned int backstep)
static void lsf_sf_expand (int *slen, int sf, int n1, int n2, int n3)
static void exponents_from_scale_factors (MPADecodeContext *s, GranuleDef *g, int16_t *exponents)
static int get_bitsz (GetBitContext *s, int n)
static int huffman_decode (MPADecodeContext *s, GranuleDef *g, int16_t *exponents, int end_pos)
static void reorder_block (MPADecodeContext *s, GranuleDef *g)
static void compute_stereo (MPADecodeContext *s, GranuleDef *g0, GranuleDef *g1)
static void compute_imdct (MPADecodeContext *s, GranuleDef *g, int32_t *sb_samples, int32_t *mdct_buf)
static int mp_decode_layer3 (MPADecodeContext *s)
static int mp_decode_frame (MPADecodeContext *s, OUT_INT *samples)
static int decode_frame (AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size)
static int decode_frame_adu (AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size)
static int decode_init_mp3on4 (AVCodecContext *avctx)
static int decode_close_mp3on4 (AVCodecContext *avctx)
static int decode_frame_mp3on4 (AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size)

Variables

static VLC huff_vlc [16]
static uint8_t * huff_code_table [16]
static VLC huff_quad_vlc [2]
static uint16_t band_index_long [9][23]
static int8_t * table_4_3_exp
static uint32_t * table_4_3_value
static int32_t is_table [2][16]
static int32_t is_table_lsf [2][2][16]
static int32_t csa_table [8][4]
static float csa_table_float [8][4]
static int32_t mdct_win [8][36]
static uint16_t scale_factor_modshift [64]
static int32_t scale_factor_mult [15][3]
static const int32_t scale_factor_mult2 [3][3]
static int dev_4_3_coefs [DEV_ORDER]
static const int icos36 [9]
static int mp3Frames [16] = {0,1,1,2,3,3,4,5,2}
static int mp3Channels [16] = {0,1,2,3,4,5,6,8,4}
static int chan_offset [9][5]
AVCodec mp2_decoder
AVCodec mp3_decoder
AVCodec mp3adu_decoder
AVCodec mp3on4_decoder


Detailed Description

MPEG Audio decoder.

Definition in file mpegaudiodec.c.


Define Documentation

#define ADD ( a,
b   )     tab[a] += tab[b]

Definition at line 603 of file mpegaudiodec.c.

Referenced by dct32(), and idct_add_altivec().

#define BACKSTEP_SIZE   512

Definition at line 87 of file mpegaudiodec.c.

Referenced by decode_init(), decode_init_mp3on4(), and seek_to_maindata().

#define BF ( a,
b,
c   ) 

Value:

{\
    tmp0 = tab[a] + tab[b];\
    tmp1 = tab[a] - tab[b];\
    tab[a] = tmp0;\
    tab[b] = MULL(tmp1, c);\
}

Definition at line 578 of file mpegaudiodec.c.

#define BF1 ( a,
b,
c,
 ) 

Value:

{\
    BF(a, b, COS4_0);\
    BF(c, d, -COS4_0);\
    tab[c] += tab[d];\
}

Definition at line 586 of file mpegaudiodec.c.

Referenced by dct32().

#define BF2 ( a,
b,
c,
 ) 

Value:

{\
    BF(a, b, COS4_0);\
    BF(c, d, -COS4_0);\
    tab[c] += tab[d];\
    tab[a] += tab[c];\
    tab[c] += tab[b];\
    tab[b] += tab[d];\
}

Definition at line 593 of file mpegaudiodec.c.

Referenced by dct32().

#define C1   FIXHR(0.98480775301220805936/2)

Definition at line 1006 of file mpegaudiodec.c.

#define C2   FIXHR(0.93969262078590838405/2)

Definition at line 1007 of file mpegaudiodec.c.

#define C3   FIXHR(0.86602540378443864676/2)

Definition at line 1008 of file mpegaudiodec.c.

#define C3   FIXHR(0.86602540378443864676/2)

Definition at line 1008 of file mpegaudiodec.c.

#define C4   FIXHR(0.76604444311897803520/2)

Definition at line 1009 of file mpegaudiodec.c.

#define C5   FIXHR(0.64278760968653932632/2)

Definition at line 1010 of file mpegaudiodec.c.

#define C6   FIXHR(0.5/2)

Definition at line 1011 of file mpegaudiodec.c.

#define C7   FIXHR(0.34202014332566873304/2)

Definition at line 1012 of file mpegaudiodec.c.

#define C8   FIXHR(0.17364817766693034885/2)

Definition at line 1013 of file mpegaudiodec.c.

Referenced by imdct36().

#define COS0_0   FIXR(0.50060299823519630134)

Definition at line 541 of file mpegaudiodec.c.

Referenced by dct32().

#define COS0_1   FIXR(0.50547095989754365998)

Definition at line 542 of file mpegaudiodec.c.

Referenced by dct32().

#define COS0_10   FIXR(0.97256823786196069369)

Definition at line 551 of file mpegaudiodec.c.

Referenced by dct32().

#define COS0_11   FIXR(1.16943993343288495515)

Definition at line 552 of file mpegaudiodec.c.

Referenced by dct32().

#define COS0_12   FIXR(1.48416461631416627724)

Definition at line 553 of file mpegaudiodec.c.

Referenced by dct32().

#define COS0_13   FIXR(2.05778100995341155085)

Definition at line 554 of file mpegaudiodec.c.

Referenced by dct32().

#define COS0_14   FIXR(3.40760841846871878570)

Definition at line 555 of file mpegaudiodec.c.

Referenced by dct32().

#define COS0_15   FIXR(10.19000812354805681150)

Definition at line 556 of file mpegaudiodec.c.

Referenced by dct32().

#define COS0_2   FIXR(0.51544730992262454697)

Definition at line 543 of file mpegaudiodec.c.

Referenced by dct32().

#define COS0_3   FIXR(0.53104259108978417447)

Definition at line 544 of file mpegaudiodec.c.

Referenced by dct32().

#define COS0_4   FIXR(0.55310389603444452782)

Definition at line 545 of file mpegaudiodec.c.

Referenced by dct32().

#define COS0_5   FIXR(0.58293496820613387367)

Definition at line 546 of file mpegaudiodec.c.

Referenced by dct32().

#define COS0_6   FIXR(0.62250412303566481615)

Definition at line 547 of file mpegaudiodec.c.

Referenced by dct32().

#define COS0_7   FIXR(0.67480834145500574602)

Definition at line 548 of file mpegaudiodec.c.

Referenced by dct32().

#define COS0_8   FIXR(0.74453627100229844977)

Definition at line 549 of file mpegaudiodec.c.

Referenced by dct32().

#define COS0_9   FIXR(0.83934964541552703873)

Definition at line 550 of file mpegaudiodec.c.

Referenced by dct32().

#define COS1_0   FIXR(0.50241928618815570551)

Definition at line 558 of file mpegaudiodec.c.

Referenced by dct32().

#define COS1_1   FIXR(0.52249861493968888062)

Definition at line 559 of file mpegaudiodec.c.

Referenced by dct32().

#define COS1_2   FIXR(0.56694403481635770368)

Definition at line 560 of file mpegaudiodec.c.

Referenced by dct32().

#define COS1_3   FIXR(0.64682178335999012954)

Definition at line 561 of file mpegaudiodec.c.

Referenced by dct32().

#define COS1_4   FIXR(0.78815462345125022473)

Definition at line 562 of file mpegaudiodec.c.

Referenced by dct32().

#define COS1_5   FIXR(1.06067768599034747134)

Definition at line 563 of file mpegaudiodec.c.

Referenced by dct32().

#define COS1_6   FIXR(1.72244709823833392782)

Definition at line 564 of file mpegaudiodec.c.

Referenced by dct32().

#define COS1_7   FIXR(5.10114861868916385802)

Definition at line 565 of file mpegaudiodec.c.

Referenced by dct32().

#define COS2_0   FIXR(0.50979557910415916894)

Definition at line 567 of file mpegaudiodec.c.

Referenced by dct32().

#define COS2_1   FIXR(0.60134488693504528054)

Definition at line 568 of file mpegaudiodec.c.

Referenced by dct32().

#define COS2_2   FIXR(0.89997622313641570463)

Definition at line 569 of file mpegaudiodec.c.

Referenced by dct32().

#define COS2_3   FIXR(2.56291544774150617881)

Definition at line 570 of file mpegaudiodec.c.

Referenced by dct32().

#define COS3_0   FIXR(0.54119610014619698439)

Definition at line 572 of file mpegaudiodec.c.

Referenced by dct32().

#define COS3_1   FIXR(1.30656296487637652785)

Definition at line 573 of file mpegaudiodec.c.

Referenced by dct32().

#define COS4_0   FIXR(0.70710678118654752439)

Definition at line 575 of file mpegaudiodec.c.

#define DEV_ORDER   13

Definition at line 251 of file mpegaudiodec.c.

Referenced by int_pow_init().

#define FIX ( a   )     ((int)((a) * FRAC_ONE))

Definition at line 67 of file mpegaudiodec.c.

#define FIXHR ( a   )     ((int)((a) * (1LL<<32) + 0.5))

Definition at line 72 of file mpegaudiodec.c.

Referenced by decode_init().

#define FIXR ( a   )     ((int)((a) * FRAC_ONE + 0.5))

Definition at line 69 of file mpegaudiodec.c.

Referenced by decode_init().

#define FLOAT_AA (  ) 

Value:

tmp0= ptr[-1-j];\
        tmp1= ptr[   j];\
        ptr[-1-j] = lrintf(tmp0 * csa[0+4*j] - tmp1 * csa[1+4*j]);\
        ptr[   j] = lrintf(tmp0 * csa[1+4*j] + tmp1 * csa[0+4*j]);

Referenced by compute_antialias_float().

#define FRAC_BITS   15

Definition at line 47 of file mpegaudiodec.c.

#define FRAC_ONE   (1 << FRAC_BITS)

Definition at line 63 of file mpegaudiodec.c.

Referenced by decode_init(), and mp_decode_frame().

#define FRAC_RND ( a   )     (((a) + (FRAC_ONE/2)) >> FRAC_BITS)

Definition at line 70 of file mpegaudiodec.c.

#define HEADER_SIZE   4

Definition at line 86 of file mpegaudiodec.c.

#define INT_AA (  ) 

Value:

tmp0 = ptr[-1-j];\
            tmp1 = ptr[   j];\
            tmp2= MULH(tmp0 + tmp1, csa[0+4*j]);\
            ptr[-1-j] = 4*(tmp2 - MULH(tmp1, csa[2+4*j]));\
            ptr[   j] = 4*(tmp2 + MULH(tmp0, csa[3+4*j]));

Referenced by compute_antialias_integer().

#define ISQRT2   FIXR(0.70710678118654752440)

Definition at line 1787 of file mpegaudiodec.c.

Referenced by compute_stereo().

#define MACS ( rt,
ra,
rb   )     rt += (ra) * (rb)

Definition at line 783 of file mpegaudiodec.c.

#define MODE_EXT_I_STEREO   1

Definition at line 153 of file mpegaudiodec.c.

Referenced by compute_stereo(), decode_header(), and mp_decode_layer3().

#define MODE_EXT_MS_STEREO   2

Definition at line 152 of file mpegaudiodec.c.

Referenced by compute_stereo(), decode_header(), and mp_decode_layer3().

#define MUL64 ( a,
b   )     ((int64_t)(a) * (int64_t)(b))

Definition at line 66 of file mpegaudiodec.c.

Referenced by imdct36(), and l1_unscale().

#define MULL ( a,
b   )     (((int64_t)(a) * (int64_t)(b)) >> FRAC_BITS)

Definition at line 65 of file mpegaudiodec.c.

Referenced by compute_stereo(), decode_init(), imdct12(), and imdct36().

#define MULS ( ra,
rb   )     ((ra) * (rb))

Definition at line 786 of file mpegaudiodec.c.

#define OUT_MAX   INT16_MAX

Definition at line 58 of file mpegaudiodec.c.

Referenced by round_sample().

#define OUT_MIN   INT16_MIN

Definition at line 59 of file mpegaudiodec.c.

Referenced by round_sample().

#define OUT_SHIFT   (WFRAC_BITS + FRAC_BITS - 15)

Definition at line 60 of file mpegaudiodec.c.

Referenced by round_sample().

#define POW_FIX ( a   )     ((int)((a) * POW_FRAC_ONE))

Definition at line 255 of file mpegaudiodec.c.

Referenced by int_pow_init().

#define POW_FRAC_BITS   24

Definition at line 253 of file mpegaudiodec.c.

#define POW_FRAC_ONE   (1 << POW_FRAC_BITS)

Definition at line 254 of file mpegaudiodec.c.

#define POW_MULL ( a,
b   )     (((int64_t)(a) * (int64_t)(b)) >> POW_FRAC_BITS)

Definition at line 256 of file mpegaudiodec.c.

Referenced by int_pow_init().

#define SCALE_GEN (  )     { FIXR(1.0 * (v)), FIXR(0.7937005259 * (v)), FIXR(0.6299605249 * (v)) }

Definition at line 190 of file mpegaudiodec.c.

#define SUM8 ( sum,
op,
w,
 ) 

Value:

{                                               \
    sum op MULS((w)[0 * 64], p[0 * 64]);\
    sum op MULS((w)[1 * 64], p[1 * 64]);\
    sum op MULS((w)[2 * 64], p[2 * 64]);\
    sum op MULS((w)[3 * 64], p[3 * 64]);\
    sum op MULS((w)[4 * 64], p[4 * 64]);\
    sum op MULS((w)[5 * 64], p[5 * 64]);\
    sum op MULS((w)[6 * 64], p[6 * 64]);\
    sum op MULS((w)[7 * 64], p[7 * 64]);\
}

Definition at line 808 of file mpegaudiodec.c.

Referenced by ff_mpa_synth_filter().

#define SUM8P2 ( sum1,
op1,
sum2,
op2,
w1,
w2,
 ) 

Value:

{                                               \
    int tmp;\
    tmp = p[0 * 64];\
    sum1 op1 MULS((w1)[0 * 64], tmp);\
    sum2 op2 MULS((w2)[0 * 64], tmp);\
    tmp = p[1 * 64];\
    sum1 op1 MULS((w1)[1 * 64], tmp);\
    sum2 op2 MULS((w2)[1 * 64], tmp);\
    tmp = p[2 * 64];\
    sum1 op1 MULS((w1)[2 * 64], tmp);\
    sum2 op2 MULS((w2)[2 * 64], tmp);\
    tmp = p[3 * 64];\
    sum1 op1 MULS((w1)[3 * 64], tmp);\
    sum2 op2 MULS((w2)[3 * 64], tmp);\
    tmp = p[4 * 64];\
    sum1 op1 MULS((w1)[4 * 64], tmp);\
    sum2 op2 MULS((w2)[4 * 64], tmp);\
    tmp = p[5 * 64];\
    sum1 op1 MULS((w1)[5 * 64], tmp);\
    sum2 op2 MULS((w2)[5 * 64], tmp);\
    tmp = p[6 * 64];\
    sum1 op1 MULS((w1)[6 * 64], tmp);\
    sum2 op2 MULS((w2)[6 * 64], tmp);\
    tmp = p[7 * 64];\
    sum1 op1 MULS((w1)[7 * 64], tmp);\
    sum2 op2 MULS((w2)[7 * 64], tmp);\
}

Definition at line 820 of file mpegaudiodec.c.

Referenced by ff_mpa_synth_filter().

#define TABLE_4_3_SIZE   (8191 + 16)*4

Definition at line 174 of file mpegaudiodec.c.

Referenced by decode_init().

#define WFRAC_BITS   14

Definition at line 48 of file mpegaudiodec.c.


Typedef Documentation

typedef int16_t MPA_INT

Definition at line 79 of file mpegaudiodec.c.

typedef int16_t OUT_INT

Definition at line 57 of file mpegaudiodec.c.


Function Documentation

static MPA_INT window [512] __attribute__ ( (aligned(16))   )  [static]

static void compute_antialias_float ( MPADecodeContext s,
GranuleDef g 
) [static]

static void compute_antialias_integer ( MPADecodeContext s,
GranuleDef g 
) [static]

static void compute_imdct ( MPADecodeContext s,
GranuleDef g,
int32_t *  sb_samples,
int32_t *  mdct_buf 
) [static]

Definition at line 1995 of file mpegaudiodec.c.

References GranuleDef::block_type, buf, imdct12(), imdct36(), MULH(), GranuleDef::sb_hybrid, SBLIMIT, and GranuleDef::switch_point.

Referenced by mp_decode_layer3().

Here is the call graph for this function:

static void compute_stereo ( MPADecodeContext s,
GranuleDef g0,
GranuleDef g1 
) [static]

static void dct32 ( int32_t *  out,
int32_t *  tab 
) [static]

static int decode_close_mp3on4 ( AVCodecContext avctx  )  [static]

Definition at line 2761 of file mpegaudiodec.c.

References av_free(), MP3On4DecodeContext::frames, MP3On4DecodeContext::mp3decctx, AVCodecContext::priv_data, and s.

Here is the call graph for this function:

static int decode_frame ( AVCodecContext avctx,
void *  data,
int *  data_size,
uint8_t *  buf,
int  buf_size 
) [static]

static int decode_frame_adu ( AVCodecContext avctx,
void *  data,
int *  data_size,
uint8_t *  buf,
int  buf_size 
) [static]

static int decode_frame_mp3on4 ( AVCodecContext avctx,
void *  data,
int *  data_size,
uint8_t *  buf,
int  buf_size 
) [static]

static int decode_header ( MPADecodeContext s,
uint32_t  header 
) [static]

static int decode_init ( AVCodecContext avctx  )  [static]

static int decode_init_mp3on4 ( AVCodecContext avctx  )  [static]

static void exponents_from_scale_factors ( MPADecodeContext s,
GranuleDef g,
int16_t *  exponents 
) [static]

void ff_mpa_synth_filter ( MPA_INT synth_buf_ptr,
int *  synth_buf_offset,
MPA_INT window,
int *  dither_state,
OUT_INT samples,
int  incr,
int32_t  sb_samples[SBLIMIT] 
)

Definition at line 871 of file mpegaudiodec.c.

References dct32(), memcpy, offset, round_sample(), SUM8, and SUM8P2.

Referenced by mp_decode_frame().

Here is the call graph for this function:

void ff_mpa_synth_init ( MPA_INT window  ) 

Definition at line 849 of file mpegaudiodec.c.

References mpa_enwindow, and WFRAC_BITS.

Referenced by decode_init().

static int get_bitsz ( GetBitContext s,
int  n 
) [inline, static]

Definition at line 1643 of file mpegaudiodec.c.

References get_bits().

Referenced by huffman_decode(), and mp_decode_layer3().

Here is the call graph for this function:

static int huffman_decode ( MPADecodeContext s,
GranuleDef g,
int16_t *  exponents,
int  end_pos 
) [static]

static void imdct12 ( int *  out,
int *  in 
) [static]

Definition at line 964 of file mpegaudiodec.c.

References C3, MULH(), MULL, t1, and t2.

Referenced by compute_imdct().

Here is the call graph for this function:

static void imdct36 ( int *  out,
int *  buf,
int *  in,
int *  win 
) [static]

Definition at line 1017 of file mpegaudiodec.c.

References C1, C2, C3, C4, C5, C7, C8, MUL64, MULH(), MULL, s0, s1, s2, s3, SBLIMIT, t0, t1, t2, and t3.

Referenced by compute_imdct().

Here is the call graph for this function:

static void int_pow_init ( void   )  [static]

Definition at line 268 of file mpegaudiodec.c.

References a, DEV_ORDER, POW_FIX, and POW_MULL.

Referenced by decode_init().

static int l1_unscale ( int  n,
int  mant,
int  scale_factor 
) [inline, static]

Definition at line 204 of file mpegaudiodec.c.

References LL, mod(), MUL64, and shift().

Referenced by mp_decode_layer1(), and mp_decode_layer2().

Here is the call graph for this function:

int l2_select_table ( int  bitrate,
int  nb_channels,
int  freq,
int  lsf 
)

Definition at line 1330 of file mpegaudiodec.c.

Referenced by mp_decode_layer2(), and MPA_encode_init().

static int l2_unscale_group ( int  steps,
int  mant,
int  scale_factor 
) [inline, static]

Definition at line 218 of file mpegaudiodec.c.

References mod(), and shift().

Referenced by mp_decode_layer2().

Here is the call graph for this function:

static int l3_unscale ( int  value,
int  exponent 
) [inline, static]

Definition at line 234 of file mpegaudiodec.c.

References e.

Referenced by huffman_decode().

static void lsf_sf_expand ( int *  slen,
int  sf,
int  n1,
int  n2,
int  n3 
) [inline, static]

Definition at line 1584 of file mpegaudiodec.c.

Referenced by mp_decode_layer3().

static int mp_decode_frame ( MPADecodeContext s,
OUT_INT samples 
) [static]

static int mp_decode_layer1 ( MPADecodeContext s  )  [static]

static int mp_decode_layer2 ( MPADecodeContext s  )  [static]

static int mp_decode_layer3 ( MPADecodeContext s  )  [static]

int mpa_decode_header ( AVCodecContext avctx,
uint32_t  head 
)

static always_inline int MULH ( int  a,
int  b 
) [static]

Definition at line 74 of file mpegaudiodec.c.

Referenced by compute_imdct(), imdct12(), and imdct36().

static void reorder_block ( MPADecodeContext s,
GranuleDef g 
) [static]

static int round_sample ( int *  sum  )  [inline, static]

Definition at line 758 of file mpegaudiodec.c.

References OUT_MAX, OUT_MIN, and OUT_SHIFT.

Referenced by ff_mpa_synth_filter().

static void seek_to_maindata ( MPADecodeContext s,
unsigned int  backstep 
) [static]


Variable Documentation

uint16_t band_index_long[9][23] [static]

Definition at line 172 of file mpegaudiodec.c.

int chan_offset[9][5] [static]

Initial value:

 {
    {0},
    {0},            
    {0},            
    {2,0},          
    {2,0,3},        
    {4,0,2},        
    {4,0,2,5},      
    {4,0,2,6,5},    
    {0,2}           
}

Definition at line 2701 of file mpegaudiodec.c.

int32_t csa_table[8][4] [static]

Definition at line 180 of file mpegaudiodec.c.

float csa_table_float[8][4] [static]

Definition at line 181 of file mpegaudiodec.c.

int dev_4_3_coefs[DEV_ORDER] [static]

Definition at line 258 of file mpegaudiodec.c.

uint8_t* huff_code_table[16] [static]

Definition at line 169 of file mpegaudiodec.c.

VLC huff_quad_vlc[2] [static]

Definition at line 170 of file mpegaudiodec.c.

VLC huff_vlc[16] [static]

Definition at line 168 of file mpegaudiodec.c.

const int icos36[9] [static]

Initial value:

 {
    FIXR(0.50190991877167369479),
    FIXR(0.51763809020504152469), 
    FIXR(0.55168895948124587824),
    FIXR(0.61038729438072803416),
    FIXR(0.70710678118654752439), 
    FIXR(0.87172339781054900991),
    FIXR(1.18310079157624925896),
    FIXR(1.93185165257813657349), 
    FIXR(5.73685662283492756461),
}

Definition at line 950 of file mpegaudiodec.c.

int32_t is_table[2][16] [static]

Definition at line 178 of file mpegaudiodec.c.

int32_t is_table_lsf[2][2][16] [static]

Definition at line 179 of file mpegaudiodec.c.

int32_t mdct_win[8][36] [static]

Definition at line 182 of file mpegaudiodec.c.

Initial value:

Definition at line 2861 of file mpegaudiodec.c.

Referenced by avcodec_register_all().

Initial value:

Definition at line 2874 of file mpegaudiodec.c.

Referenced by avcodec_register_all().

Initial value:

Definition at line 2887 of file mpegaudiodec.c.

Referenced by avcodec_register_all().

int mp3Channels[16] = {0,1,2,3,4,5,6,8,4} [static]

Definition at line 2699 of file mpegaudiodec.c.

int mp3Frames[16] = {0,1,1,2,3,3,4,5,2} [static]

Definition at line 2698 of file mpegaudiodec.c.

uint16_t scale_factor_modshift[64] [static]

Definition at line 185 of file mpegaudiodec.c.

int32_t scale_factor_mult[15][3] [static]

Definition at line 187 of file mpegaudiodec.c.

Referenced by encode_frame(), and MPA_encode_init().

const int32_t scale_factor_mult2[3][3] [static]

Initial value:

 {
    SCALE_GEN(4.0 / 3.0), 
    SCALE_GEN(4.0 / 5.0), 
    SCALE_GEN(4.0 / 9.0), 
}

Definition at line 193 of file mpegaudiodec.c.

int8_t* table_4_3_exp [static]

Definition at line 175 of file mpegaudiodec.c.

uint32_t* table_4_3_value [static]

Definition at line 176 of file mpegaudiodec.c.


Generated on Mon Apr 28 14:05:20 2008 for Cinelerra by  doxygen 1.5.5