libavcodec/ac3enc_fixed.c File Reference

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

#include "ac3enc.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 (AC3MDCTContext *mdct)
 Finalize MDCT and free allocated memory.
av_cold int AC3_NAME() mdct_init (AVCodecContext *avctx, AC3MDCTContext *mdct, int nbits)
 Initialize MDCT tables.
void AC3_NAME() apply_window (DSPContext *dsp, int16_t *output, const int16_t *input, const int16_t *window, unsigned int len)
 Apply KBD window to input samples prior to MDCT.
static int log2_tab (AC3EncodeContext *s, int16_t *src, int len)
 Calculate the log2() of the maximum absolute value in an array.
int AC3_NAME() normalize_samples (AC3EncodeContext *s)
 Normalize the input samples to use the maximum available precision.
void AC3_NAME() scale_coefficients (AC3EncodeContext *s)
 Scale MDCT coefficients to 25-bit signed fixed-point.
static av_cold int ac3_fixed_encode_init (AVCodecContext *avctx)

Variables

static 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 33 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 120 of file ac3enc_fixed.c.

void AC3_NAME() apply_window ( DSPContext dsp,
int16_t *  output,
const int16_t *  input,
const int16_t *  window,
unsigned int  len 
)

Apply KBD window to input samples prior to MDCT.

Definition at line 66 of file ac3enc_fixed.c.

Referenced by apply_window_mp3(), backward_filter(), do_hybrid_window(), and ff_mpa_synth_filter_TMPL().

static int log2_tab ( AC3EncodeContext s,
int16_t *  src,
int  len 
) [static]

Calculate the log2() of the maximum absolute value in an array.

Parameters:
tab input array
n number of values in the array
Returns:
log2(max(abs(tab[])))

Definition at line 80 of file ac3enc_fixed.c.

Referenced by normalize_samples().

av_cold void AC3_NAME() mdct_end ( AC3MDCTContext mdct  ) 

Finalize MDCT and free allocated memory.

Definition at line 44 of file ac3enc_fixed.c.

av_cold int AC3_NAME() mdct_init ( AVCodecContext avctx,
AC3MDCTContext mdct,
int  nbits 
)

Initialize MDCT tables.

Parameters:
nbits log2(MDCT size)

Definition at line 54 of file ac3enc_fixed.c.

int AC3_NAME() normalize_samples ( AC3EncodeContext s  ) 

Normalize the input samples to use the maximum available precision.

This assumes signed 16-bit input samples.

Returns:
exponent shift

Definition at line 93 of file ac3enc_fixed.c.

void AC3_NAME() scale_coefficients ( AC3EncodeContext s  ) 

Scale MDCT coefficients to 25-bit signed fixed-point.

Definition at line 106 of file ac3enc_fixed.c.


Variable Documentation

Initial value:

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

Definition at line 35 of file ac3enc_fixed.c.

Initial value:

 {
    "ac3_fixed",
    AVMEDIA_TYPE_AUDIO,
    CODEC_ID_AC3,
    sizeof(AC3EncodeContext),
    ac3_fixed_encode_init,
    ff_ac3_encode_frame,
    ff_ac3_encode_close,
    NULL,
    .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 128 of file ac3enc_fixed.c.

Referenced by get_codec().


Generated on Fri Oct 26 02:39:43 2012 for FFmpeg by  doxygen 1.5.8