libavcodec/mpegaudioenc.c File Reference

#include "avcodec.h"
#include "bitstream.h"
#include "mpegaudio.h"
#include "mpegaudiodata.h"
#include "mpegaudiotab.h"

Go to the source code of this file.

Data Structures

struct  MpegAudioContext

Defines

#define MUL(a, b)   (((int64_t)(a) * (int64_t)(b)) >> FRAC_BITS)
#define SAMPLES_BUF_SIZE   4096
#define P   15
#define WSHIFT   (WFRAC_BITS + 15 - FRAC_BITS)
#define SB_NOTALLOCATED   0
#define SB_ALLOCATED   1
#define SB_NOMORE   2

Functions

static int MPA_encode_init (AVCodecContext *avctx)
static void idct32 (int *out, int *tab)
static void filter (MpegAudioContext *s, int ch, short *samples, int incr)
static void compute_scale_factors (unsigned char scale_code[SBLIMIT], unsigned char scale_factors[SBLIMIT][3], int sb_samples[3][12][SBLIMIT], int sblimit)
static void psycho_acoustic_model (MpegAudioContext *s, short smr[SBLIMIT])
static void compute_bit_allocation (MpegAudioContext *s, short smr1[MPA_MAX_CHANNELS][SBLIMIT], unsigned char bit_alloc[MPA_MAX_CHANNELS][SBLIMIT], int *padding)
static void encode_frame (MpegAudioContext *s, unsigned char bit_alloc[MPA_MAX_CHANNELS][SBLIMIT], int padding)
static int MPA_encode_frame (AVCodecContext *avctx, unsigned char *frame, int buf_size, void *data)
static int MPA_encode_close (AVCodecContext *avctx)

Variables

AVCodec mp2_encoder


Define Documentation

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

Definition at line 33 of file mpegaudioenc.c.

Referenced by idct32().

#define P   15

#define SAMPLES_BUF_SIZE   4096

Definition at line 35 of file mpegaudioenc.c.

Referenced by filter().

#define SB_ALLOCATED   1

Definition at line 499 of file mpegaudioenc.c.

Referenced by compute_bit_allocation().

#define SB_NOMORE   2

Definition at line 500 of file mpegaudioenc.c.

Referenced by compute_bit_allocation().

#define SB_NOTALLOCATED   0

Definition at line 498 of file mpegaudioenc.c.

Referenced by compute_bit_allocation().

#define WSHIFT   (WFRAC_BITS + 15 - FRAC_BITS)

Definition at line 310 of file mpegaudioenc.c.

Referenced by filter().


Function Documentation

static void compute_bit_allocation ( MpegAudioContext s,
short  smr1[MPA_MAX_CHANNELS][SBLIMIT],
unsigned char  bit_alloc[MPA_MAX_CHANNELS][SBLIMIT],
int *  padding 
) [static]

Definition at line 505 of file mpegaudioenc.c.

static void compute_scale_factors ( unsigned char  scale_code[SBLIMIT],
unsigned char  scale_factors[SBLIMIT][3],
int  sb_samples[3][12][SBLIMIT],
int  sblimit 
) [static]

Definition at line 369 of file mpegaudioenc.c.

Referenced by MPA_encode_frame().

static void encode_frame ( MpegAudioContext s,
unsigned char  bit_alloc[MPA_MAX_CHANNELS][SBLIMIT],
int  padding 
) [static]

Definition at line 610 of file mpegaudioenc.c.

static void filter ( MpegAudioContext s,
int  ch,
short *  samples,
int  incr 
) [static]

static void idct32 ( int *  out,
int *  tab 
) [static]

Definition at line 191 of file mpegaudioenc.c.

Referenced by filter().

static int MPA_encode_close ( AVCodecContext avctx  )  [static]

Definition at line 784 of file mpegaudioenc.c.

static int MPA_encode_frame ( AVCodecContext avctx,
unsigned char *  frame,
int  buf_size,
void *  data 
) [static]

Definition at line 754 of file mpegaudioenc.c.

static int MPA_encode_init ( AVCodecContext avctx  )  [static]

Definition at line 64 of file mpegaudioenc.c.

static void psycho_acoustic_model ( MpegAudioContext s,
short  smr[SBLIMIT] 
) [static]

Definition at line 488 of file mpegaudioenc.c.

Referenced by MPA_encode_frame().


Variable Documentation

Initial value:

Definition at line 790 of file mpegaudioenc.c.


Generated on Wed Feb 9 19:10:12 2011 for ffmpeg by  doxygen 1.5.6