libavcodec/ac3enc_fixed.c File Reference

fixed-point AC-3 encoder. More...

#include "ac3enc.h"
#include "eac3enc.h"
#include "ac3enc_opts_template.c"
#include "ac3enc_template.c"

Go to the source code of this file.

Defines

#define CONFIG_FFT_FLOAT   0
#define AC3ENC_TYPE   AC3ENC_TYPE_AC3_FIXED

Functions

av_cold void AC3_NAME() mdct_end (AC3EncodeContext *s)
 Finalize MDCT and free allocated memory.
av_cold int AC3_NAME() mdct_init (AC3EncodeContext *s)
 Initialize MDCT tables.
static void apply_window (DSPContext *dsp, int16_t *output, const int16_t *input, const int16_t *window, unsigned int len)
static int normalize_samples (AC3EncodeContext *s)
static void scale_coefficients (AC3EncodeContext *s)
static void sum_square_butterfly (AC3EncodeContext *s, int64_t sum[4], const int32_t *coef0, const int32_t *coef1, int len)
static void clip_coefficients (DSPContext *dsp, int32_t *coef, unsigned int len)
static CoefType calc_cpl_coord (CoefSumType energy_ch, CoefSumType energy_cpl)
static av_cold int ac3_fixed_encode_init (AVCodecContext *avctx)

Variables

static const AVClass ac3enc_class
AVCodec ff_ac3_fixed_encoder


Detailed Description

fixed-point AC-3 encoder.

Definition in file ac3enc_fixed.c.


Define Documentation

#define AC3ENC_TYPE   AC3ENC_TYPE_AC3_FIXED

Definition at line 34 of file ac3enc_fixed.c.

#define CONFIG_FFT_FLOAT   0

Definition at line 29 of file ac3enc_fixed.c.


Function Documentation

static av_cold int ac3_fixed_encode_init ( AVCodecContext avctx  )  [static]

Definition at line 140 of file ac3enc_fixed.c.

static void apply_window ( DSPContext dsp,
int16_t output,
const int16_t input,
const int16_t window,
unsigned int  len 
) [static]

Definition at line 70 of file ac3enc_fixed.c.

static CoefType calc_cpl_coord ( CoefSumType  energy_ch,
CoefSumType  energy_cpl 
) [static]

Definition at line 127 of file ac3enc_fixed.c.

Referenced by apply_channel_coupling().

static void clip_coefficients ( DSPContext dsp,
int32_t *  coef,
unsigned int  len 
) [static]

Definition at line 118 of file ac3enc_fixed.c.

Referenced by apply_channel_coupling(), and encode_frame().

av_cold void AC3_NAME() mdct_end ( AC3EncodeContext s  ) 

Finalize MDCT and free allocated memory.

Parameters:
s AC-3 encoder private context

Definition at line 47 of file ac3enc_fixed.c.

av_cold int AC3_NAME() mdct_init ( AC3EncodeContext s  ) 

Initialize MDCT tables.

Parameters:
s AC-3 encoder private context
Returns:
0 on success, negative error code on failure

Definition at line 59 of file ac3enc_fixed.c.

static int normalize_samples ( AC3EncodeContext s  )  [static]

Definition at line 81 of file ac3enc_fixed.c.

Referenced by apply_mdct().

static void scale_coefficients ( AC3EncodeContext s  )  [static]

Definition at line 95 of file ac3enc_fixed.c.

Referenced by encode_frame().

static void sum_square_butterfly ( AC3EncodeContext s,
int64_t  sum[4],
const int32_t *  coef0,
const int32_t *  coef1,
int  len 
) [static]

Definition at line 108 of file ac3enc_fixed.c.

Referenced by compute_rematrixing_strategy().


Variable Documentation

const AVClass ac3enc_class [static]

Initial value:

 { "Fixed-Point AC-3 Encoder", av_default_item_name,
                                      ac3fixed_options, LIBAVUTIL_VERSION_INT }

Definition at line 36 of file ac3enc_fixed.c.

Initial value:

 {
    .name           = "ac3_fixed",
    .type           = AVMEDIA_TYPE_AUDIO,
    .id             = CODEC_ID_AC3,
    .priv_data_size = sizeof(AC3EncodeContext),
    .init           = ac3_fixed_encode_init,
    .encode         = ff_ac3_fixed_encode_frame,
    .close          = ff_ac3_encode_close,
    .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE},
    .long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
    .priv_class = &ac3enc_class,
    .channel_layouts = ff_ac3_channel_layouts,
}

Definition at line 148 of file ac3enc_fixed.c.


Generated on Fri Oct 26 02:46:06 2012 for FFmpeg by  doxygen 1.5.8