libavcodec/ac3enc.h File Reference

AC-3 encoder & E-AC-3 encoder common header. More...

#include <stdint.h>
#include "ac3.h"
#include "ac3dsp.h"
#include "avcodec.h"
#include "dsputil.h"
#include "put_bits.h"
#include "fft.h"

Go to the source code of this file.

Data Structures

struct  AC3MDCTContext
struct  AC3Block
 Data for a single audio block. More...
struct  AC3EncodeContext
 AC-3 encoder private context. More...

Defines

#define CONFIG_AC3ENC_FLOAT   0
#define OFFSET(param)   offsetof(AC3EncodeContext, options.param)
#define AC3ENC_PARAM   (AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM)
#define AC3ENC_TYPE_AC3_FIXED   0
#define AC3ENC_TYPE_AC3   1
#define AC3ENC_TYPE_EAC3   2
#define AC3_NAME(x)   ff_ac3_fixed_ ## x
#define MAC_COEF(d, a, b)   MAC64(d,a,b)

Typedefs

typedef int16_t SampleType
typedef int32_t CoefType
typedef int64_t CoefSumType

Functions

int ff_ac3_encode_init (AVCodecContext *avctx)
 Initialize the encoder.
int ff_ac3_encode_frame (AVCodecContext *avctx, unsigned char *frame, int buf_size, void *data)
 Encode a single AC-3 frame.
int ff_ac3_encode_close (AVCodecContext *avctx)
 Finalize encoding and free any memory allocated by the encoder.
void ff_ac3_fixed_mdct_end (AC3MDCTContext *mdct)
void ff_ac3_float_mdct_end (AC3MDCTContext *mdct)
 Finalize MDCT and free allocated memory.
int ff_ac3_fixed_mdct_init (AVCodecContext *avctx, AC3MDCTContext *mdct, int nbits)
int ff_ac3_float_mdct_init (AVCodecContext *avctx, AC3MDCTContext *mdct, int nbits)
 Initialize MDCT tables.
void ff_ac3_fixed_apply_window (DSPContext *dsp, SampleType *output, const SampleType *input, const SampleType *window, unsigned int len)
void ff_ac3_float_apply_window (DSPContext *dsp, SampleType *output, const SampleType *input, const SampleType *window, unsigned int len)
int ff_ac3_fixed_normalize_samples (AC3EncodeContext *s)
void ff_ac3_fixed_scale_coefficients (AC3EncodeContext *s)
void ff_ac3_float_scale_coefficients (AC3EncodeContext *s)
 Scale MDCT coefficients from float to 24-bit fixed-point.
int ff_ac3_fixed_allocate_sample_buffers (AC3EncodeContext *s)
int ff_ac3_float_allocate_sample_buffers (AC3EncodeContext *s)
void ff_ac3_fixed_deinterleave_input_samples (AC3EncodeContext *s, const SampleType *samples)
void ff_ac3_float_deinterleave_input_samples (AC3EncodeContext *s, const SampleType *samples)
void ff_ac3_fixed_apply_mdct (AC3EncodeContext *s)
void ff_ac3_float_apply_mdct (AC3EncodeContext *s)
void ff_ac3_fixed_apply_channel_coupling (AC3EncodeContext *s)
void ff_ac3_float_apply_channel_coupling (AC3EncodeContext *s)
void ff_ac3_fixed_compute_rematrixing_strategy (AC3EncodeContext *s)
void ff_ac3_float_compute_rematrixing_strategy (AC3EncodeContext *s)


Detailed Description

AC-3 encoder & E-AC-3 encoder common header.

Definition in file ac3enc.h.


Define Documentation

#define AC3_NAME (  )     ff_ac3_fixed_ ## x

Definition at line 57 of file ac3enc.h.

#define AC3ENC_PARAM   (AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM)

Definition at line 44 of file ac3enc.h.

#define AC3ENC_TYPE_AC3   1

Definition at line 47 of file ac3enc.h.

#define AC3ENC_TYPE_AC3_FIXED   0

Definition at line 46 of file ac3enc.h.

#define AC3ENC_TYPE_EAC3   2

Definition at line 48 of file ac3enc.h.

#define CONFIG_AC3ENC_FLOAT   0

Definition at line 40 of file ac3enc.h.

#define MAC_COEF ( d,
a,
 )     MAC64(d,a,b)

Definition at line 58 of file ac3enc.h.

Referenced by apply_channel_coupling(), and compute_rematrixing_strategy().

#define OFFSET ( param   )     offsetof(AC3EncodeContext, options.param)

Definition at line 43 of file ac3enc.h.


Typedef Documentation

typedef int64_t CoefSumType

Definition at line 61 of file ac3enc.h.

typedef int32_t CoefType

Definition at line 60 of file ac3enc.h.

typedef int16_t SampleType

Definition at line 59 of file ac3enc.h.


Function Documentation

int ff_ac3_encode_close ( AVCodecContext avctx  ) 

Finalize encoding and free any memory allocated by the encoder.

Definition at line 1932 of file ac3enc.c.

Referenced by ff_ac3_encode_init().

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

Encode a single AC-3 frame.

Definition at line 1881 of file ac3enc.c.

int ff_ac3_encode_init ( AVCodecContext avctx  ) 

Initialize the encoder.

Definition at line 2315 of file ac3enc.c.

Referenced by ac3_fixed_encode_init().

int ff_ac3_fixed_allocate_sample_buffers ( AC3EncodeContext s  ) 

Referenced by ff_ac3_encode_init().

void ff_ac3_fixed_apply_channel_coupling ( AC3EncodeContext s  ) 

Referenced by ff_ac3_encode_init().

void ff_ac3_fixed_apply_mdct ( AC3EncodeContext s  ) 

Referenced by ff_ac3_encode_init().

void ff_ac3_fixed_apply_window ( DSPContext dsp,
SampleType output,
const SampleType input,
const SampleType window,
unsigned int  len 
)

Referenced by ff_ac3_encode_init().

void ff_ac3_fixed_compute_rematrixing_strategy ( AC3EncodeContext s  ) 

Referenced by ff_ac3_encode_init().

void ff_ac3_fixed_deinterleave_input_samples ( AC3EncodeContext s,
const SampleType samples 
)

Referenced by ff_ac3_encode_init().

void ff_ac3_fixed_mdct_end ( AC3MDCTContext mdct  ) 

Referenced by ff_ac3_encode_init().

int ff_ac3_fixed_mdct_init ( AVCodecContext avctx,
AC3MDCTContext mdct,
int  nbits 
)

Referenced by ff_ac3_encode_init().

int ff_ac3_fixed_normalize_samples ( AC3EncodeContext s  ) 

Referenced by ff_ac3_encode_init().

void ff_ac3_fixed_scale_coefficients ( AC3EncodeContext s  ) 

Referenced by ff_ac3_encode_init().

int ff_ac3_float_allocate_sample_buffers ( AC3EncodeContext s  ) 

Referenced by ff_ac3_encode_init().

void ff_ac3_float_apply_channel_coupling ( AC3EncodeContext s  ) 

Referenced by ff_ac3_encode_init().

void ff_ac3_float_apply_mdct ( AC3EncodeContext s  ) 

Referenced by ff_ac3_encode_init().

void ff_ac3_float_apply_window ( DSPContext dsp,
SampleType output,
const SampleType input,
const SampleType window,
unsigned int  len 
)

Referenced by ff_ac3_encode_init().

void ff_ac3_float_compute_rematrixing_strategy ( AC3EncodeContext s  ) 

Referenced by ff_ac3_encode_init().

void ff_ac3_float_deinterleave_input_samples ( AC3EncodeContext s,
const SampleType samples 
)

Referenced by ff_ac3_encode_init().

void ff_ac3_float_mdct_end ( AC3MDCTContext mdct  ) 

Finalize MDCT and free allocated memory.

Definition at line 48 of file ac3enc_float.c.

Referenced by ff_ac3_encode_init().

int ff_ac3_float_mdct_init ( AVCodecContext avctx,
AC3MDCTContext mdct,
int  nbits 
)

Initialize MDCT tables.

Parameters:
nbits log2(MDCT size)

Definition at line 59 of file ac3enc_float.c.

Referenced by ff_ac3_encode_init().

void ff_ac3_float_scale_coefficients ( AC3EncodeContext s  ) 

Scale MDCT coefficients from float to 24-bit fixed-point.

Definition at line 96 of file ac3enc_float.c.

Referenced by ff_ac3_encode_init().


Generated on Fri Oct 26 02:38:15 2012 for FFmpeg by  doxygen 1.5.8