libavcodec/ac3enc_template.c File Reference

AC-3 encoder float/fixed template. More...

#include <stdint.h>
#include "ac3enc.h"

Go to the source code of this file.

Functions

int AC3_NAME() allocate_sample_buffers (AC3EncodeContext *s)
void AC3_NAME() deinterleave_input_samples (AC3EncodeContext *s, const SampleType *samples)
 Deinterleave input samples.
void AC3_NAME() apply_mdct (AC3EncodeContext *s)
 Apply the MDCT to input samples to generate frequency coefficients.
static float calc_cpl_coord (float energy_ch, float energy_cpl)
 Calculate a single coupling coordinate.
void AC3_NAME() apply_channel_coupling (AC3EncodeContext *s)
 Calculate coupling channel and coupling coordinates.
void AC3_NAME() compute_rematrixing_strategy (AC3EncodeContext *s)
 Determine rematrixing flags for each block and band.


Detailed Description

AC-3 encoder float/fixed template.

Definition in file ac3enc_template.c.


Function Documentation

int AC3_NAME() allocate_sample_buffers ( AC3EncodeContext s  ) 

Definition at line 34 of file ac3enc_template.c.

void AC3_NAME() apply_channel_coupling ( AC3EncodeContext s  ) 

Calculate coupling channel and coupling coordinates.

TODO: Currently this is only used for the floating-point encoder. I was able to make it work for the fixed-point encoder, but quality was generally lower in most cases than not using coupling. If a more adaptive coupling strategy were to be implemented it might be useful at that time to use coupling for the fixed-point encoder as well.

Definition at line 130 of file ac3enc_template.c.

void AC3_NAME() apply_mdct ( AC3EncodeContext s  ) 

Apply the MDCT to input samples to generate frequency coefficients.

This applies the KBD window and normalizes the input to reduce precision loss due to fixed-point calculations.

Definition at line 88 of file ac3enc_template.c.

Referenced by encode_block().

static float calc_cpl_coord ( float  energy_ch,
float  energy_cpl 
) [inline, static]

Calculate a single coupling coordinate.

Definition at line 113 of file ac3enc_template.c.

Referenced by apply_channel_coupling().

void AC3_NAME() compute_rematrixing_strategy ( AC3EncodeContext s  ) 

Determine rematrixing flags for each block and band.

Definition at line 342 of file ac3enc_template.c.

void AC3_NAME() deinterleave_input_samples ( AC3EncodeContext s,
const SampleType samples 
)

Deinterleave input samples.

Channels are reordered from Libav's default order to AC-3 order.

Definition at line 58 of file ac3enc_template.c.


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