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

#include "avcodec.h"
#include "mpegaudio.h"
#include <lame/lame.h>

Include dependency graph for mp3lameaudio.c:

Go to the source code of this file.

Data Structures

struct  Mp3AudioContext

Defines

#define BUFFER_SIZE   (2*MPA_FRAME_SIZE)

Functions

static int MP3lame_encode_init (AVCodecContext *avctx)
static int mp3len (void *data, int *samplesPerFrame, int *sampleRate)
int MP3lame_encode_frame (AVCodecContext *avctx, unsigned char *frame, int buf_size, void *data)
int MP3lame_encode_close (AVCodecContext *avctx)

Variables

static const int sSampleRates [3]
static const int sBitRates [2][3][15]
static const int sSamplesPerFrame [2][3]
static const int sBitsPerSlot [3]
AVCodec mp3lame_encoder


Detailed Description

Interface to libmp3lame for mp3 encoding.

Definition in file mp3lameaudio.c.


Define Documentation

#define BUFFER_SIZE   (2*MPA_FRAME_SIZE)

Definition at line 29 of file mp3lameaudio.c.


Function Documentation

int MP3lame_encode_close ( AVCodecContext avctx  ) 

Definition at line 194 of file mp3lameaudio.c.

References av_freep(), AVCodecContext::coded_frame, Mp3AudioContext::gfp, AVCodecContext::priv_data, and s.

Here is the call graph for this function:

int MP3lame_encode_frame ( AVCodecContext avctx,
unsigned char *  frame,
int  buf_size,
void *  data 
)

static int MP3lame_encode_init ( AVCodecContext avctx  )  [static]

static int mp3len ( void *  data,
int *  samplesPerFrame,
int *  sampleRate 
) [static]

Definition at line 100 of file mp3lameaudio.c.

References header, sBitRates, sBitsPerSlot, sSampleRates, and sSamplesPerFrame.

Referenced by MP3lame_encode_frame().


Variable Documentation

Initial value:

Definition at line 205 of file mp3lameaudio.c.

Referenced by avcodec_register_all().

const int sBitRates[2][3][15] [static]

Initial value:

 {
    {   {  0, 32, 64, 96,128,160,192,224,256,288,320,352,384,416,448},
        {  0, 32, 48, 56, 64, 80, 96,112,128,160,192,224,256,320,384},
        {  0, 32, 40, 48, 56, 64, 80, 96,112,128,160,192,224,256,320}
    },
    {   {  0, 32, 48, 56, 64, 80, 96,112,128,144,160,176,192,224,256},
        {  0,  8, 16, 24, 32, 40, 48, 56, 64, 80, 96,112,128,144,160},
        {  0,  8, 16, 24, 32, 40, 48, 56, 64, 80, 96,112,128,144,160}
    },
}

Definition at line 77 of file mp3lameaudio.c.

Referenced by mp3len().

const int sBitsPerSlot[3] [static]

Initial value:

 {
    32,
    8,
    8
}

Definition at line 94 of file mp3lameaudio.c.

Referenced by mp3len().

const int sSampleRates[3] [static]

Initial value:

 {
    44100, 48000,  32000
}

Definition at line 73 of file mp3lameaudio.c.

Referenced by mp3len().

const int sSamplesPerFrame[2][3] [static]

Initial value:

{
    {  384,     1152,    1152 },
    {  384,     1152,     576 }
}

Definition at line 88 of file mp3lameaudio.c.

Referenced by mp3len().


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