libavcodec/mpegaudio.h File Reference

mpeg audio declarations for both encoder and decoder. More...

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

Go to the source code of this file.

Data Structures

struct  MPADecodeHeader
struct  MPADecodeContext
struct  HuffTable

Defines

#define CONFIG_AUDIO_NONSHORT   0
#define MPA_FRAME_SIZE   1152
#define MPA_MAX_CODED_FRAME_SIZE   1792
#define MPA_MAX_CHANNELS   2
#define SBLIMIT   32
#define MPA_STEREO   0
#define MPA_JSTEREO   1
#define MPA_DUAL   2
#define MPA_MONO   3
#define SAME_HEADER_MASK   (0xffe00000 | (3 << 17) | (0xf << 12) | (3 << 10) | (3 << 19))
#define MP3_MASK   0xFFFE0CCF
#define FRAC_BITS   15
#define WFRAC_BITS   14
#define FRAC_ONE   (1 << FRAC_BITS)
#define FIX(a)   ((int)((a) * FRAC_ONE))
#define OUT_MAX   INT16_MAX
#define OUT_MIN   INT16_MIN
#define OUT_SHIFT   (WFRAC_BITS + FRAC_BITS - 15)
#define OUT_FMT   SAMPLE_FMT_S16
#define BACKSTEP_SIZE   512
#define EXTRABYTES   24
#define MPA_DECODE_HEADER

Typedefs

typedef int16_t OUT_INT
typedef int16_t MPA_INT

Functions

int ff_mpa_l2_select_table (int bitrate, int nb_channels, int freq, int lsf)
int ff_mpa_decode_header (AVCodecContext *avctx, uint32_t head, int *sample_rate, int *channels, int *frame_size, int *bitrate)
void ff_mpa_synth_init (MPA_INT *window)
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 int ff_mpa_check_header (uint32_t header)


Detailed Description

mpeg audio declarations for both encoder and decoder.

Definition in file mpegaudio.h.


Define Documentation

#define BACKSTEP_SIZE   512

Definition at line 88 of file mpegaudio.h.

Referenced by mp_decode_frame().

#define CONFIG_AUDIO_NONSHORT   0

Definition at line 33 of file mpegaudio.h.

#define EXTRABYTES   24

Definition at line 89 of file mpegaudio.h.

Referenced by mp_decode_layer3().

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

Definition at line 66 of file mpegaudio.h.

#define FRAC_BITS   15

Definition at line 60 of file mpegaudio.h.

#define FRAC_ONE   (1 << FRAC_BITS)

Definition at line 64 of file mpegaudio.h.

Referenced by decode_init(), gen_image(), int_cos(), and main().

#define MP3_MASK   0xFFFE0CCF

Definition at line 54 of file mpegaudio.h.

Referenced by mp3_header_compress(), and mp3_header_decompress().

#define MPA_DECODE_HEADER

Value:

int frame_size; \
    int error_protection; \
    int layer; \
    int sample_rate; \
    int sample_rate_index; /* between 0 and 8 */ \
    int bit_rate; \
    int nb_channels; \
    int mode; \
    int mode_ext; \
    int lsf;

Definition at line 93 of file mpegaudio.h.

#define MPA_DUAL   2

Definition at line 47 of file mpegaudio.h.

#define MPA_FRAME_SIZE   1152

#define MPA_JSTEREO   1

Definition at line 46 of file mpegaudio.h.

Referenced by mp_decode_layer1(), and mp_decode_layer2().

#define MPA_MAX_CHANNELS   2

#define MPA_MAX_CODED_FRAME_SIZE   1792

Definition at line 39 of file mpegaudio.h.

Referenced by MPA_encode_frame(), and mpegaudio_parse().

#define MPA_MONO   3

Definition at line 48 of file mpegaudio.h.

Referenced by encode_frame(), and ff_mpegaudio_decode_header().

#define MPA_STEREO   0

Definition at line 45 of file mpegaudio.h.

Referenced by encode_frame().

#define OUT_FMT   SAMPLE_FMT_S16

Definition at line 79 of file mpegaudio.h.

Referenced by decode_init().

#define OUT_MAX   INT16_MAX

Definition at line 76 of file mpegaudio.h.

Referenced by round_sample().

#define OUT_MIN   INT16_MIN

Definition at line 77 of file mpegaudio.h.

Referenced by round_sample().

#define OUT_SHIFT   (WFRAC_BITS + FRAC_BITS - 15)

Definition at line 78 of file mpegaudio.h.

Referenced by round_sample().

#define SAME_HEADER_MASK   (0xffe00000 | (3 << 17) | (0xf << 12) | (3 << 10) | (3 << 19))

Definition at line 51 of file mpegaudio.h.

Referenced by mpegaudio_parse().

#define SBLIMIT   32

#define WFRAC_BITS   14

Definition at line 61 of file mpegaudio.h.

Referenced by ff_mpa_synth_init(), and MPA_encode_init().


Typedef Documentation

typedef int16_t MPA_INT

Definition at line 83 of file mpegaudio.h.

typedef int16_t OUT_INT

Definition at line 75 of file mpegaudio.h.


Function Documentation

static int ff_mpa_check_header ( uint32_t  header  )  [inline, static]

int ff_mpa_decode_header ( AVCodecContext avctx,
uint32_t  head,
int *  sample_rate,
int *  channels,
int *  frame_size,
int *  bitrate 
)

Definition at line 47 of file mpegaudio_parser.c.

Referenced by mp3_read_probe(), and mpegaudio_parse().

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

Definition at line 31 of file mpegaudio.c.

Referenced by mp_decode_layer2(), and MPA_encode_init().

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 854 of file mpegaudiodec.c.

Referenced by mp_decode_frame(), mpc_synth(), and qdm2_synthesis_filter().

void ff_mpa_synth_init ( MPA_INT window  ) 

Definition at line 832 of file mpegaudiodec.c.

Referenced by decode_init(), ff_mpc_init(), and qdm2_init().


Generated on Fri Oct 26 02:35:44 2012 for FFmpeg by  doxygen 1.5.8