FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
ac3dec.h File Reference

Common code between the AC-3 and E-AC-3 decoders. More...

#include "libavutil/float_dsp.h"
#include "libavutil/fixed_dsp.h"
#include "libavutil/lfg.h"
#include "ac3.h"
#include "ac3dsp.h"
#include "bswapdsp.h"
#include "get_bits.h"
#include "fft.h"
#include "fmtconvert.h"

Go to the source code of this file.

Data Structures

struct  AC3DecodeContext
 

Macros

#define AC3_OUTPUT_LFEON   8
 
#define SPX_MAX_BANDS   17
 
#define AC3_FRAME_BUFFER_SIZE   32768
 Large enough for maximum possible frame size when the specification limit is ignored. More...
 

Functions

static int ff_eac3_parse_header (AC3DecodeContext *s)
 Parse the E-AC-3 frame header. More...
 
static void ff_eac3_decode_transform_coeffs_aht_ch (AC3DecodeContext *s, int ch)
 Decode mantissas in a single channel for the entire frame. More...
 
static void ff_eac3_apply_spectral_extension (AC3DecodeContext *s)
 Apply spectral extension to each channel by copying lower frequency coefficients to higher frequency bins and applying side information to approximate the original high frequency signal. More...
 

Detailed Description

Common code between the AC-3 and E-AC-3 decoders.

Summary of MDCT Coefficient Grouping: The individual MDCT coefficient indices are often referred to in the (E-)AC-3 specification as frequency bins. These bins are grouped together into subbands of 12 coefficients each. The subbands are grouped together into bands as defined in the bitstream by the band structures, which determine the number of bands and the size of each band. The full spectrum of 256 frequency bins is divided into 1 DC bin + 21 subbands = 253 bins. This system of grouping coefficients is used for channel bandwidth, stereo rematrixing, channel coupling, enhanced coupling, and spectral extension.

+-+–+–+–+–+–+–+–+–+–+–+–+–+–+–+–+–+–+–+–+–+–+-+ |1| |12| | [12|12|12|12] | | | | | | | | | | | | |3| +-+–+–+–+–+–+–+–+–+–+–+–+–+–+–+–+–+–+–+–+–+–+-+ ~~~ ~~~~ ~~~~~~~~~~~~~ ~~~ | | | | | | | 3 unused frequency bins–+ | | | | | +–1 band containing 4 subbands | | | +–1 subband of 12 frequency bins | +–DC frequency bin

Definition in file ac3dec.h.

Macro Definition Documentation

#define AC3_OUTPUT_LFEON   8

Definition at line 63 of file ac3dec.h.

Referenced by ac3_decode_frame(), and decode_audio_block().

#define SPX_MAX_BANDS   17

Definition at line 65 of file ac3dec.h.

Referenced by ff_eac3_apply_spectral_extension().

#define AC3_FRAME_BUFFER_SIZE   32768

Large enough for maximum possible frame size when the specification limit is ignored.

Definition at line 68 of file ac3dec.h.

Referenced by ac3_decode_frame().

Function Documentation

static int ff_eac3_parse_header ( AC3DecodeContext s)
static

Parse the E-AC-3 frame header.

This parses both the bit stream info and audio frame header.

Referenced by parse_frame_header().

static void ff_eac3_decode_transform_coeffs_aht_ch ( AC3DecodeContext s,
int  ch 
)
static

Decode mantissas in a single channel for the entire frame.

This is used when AHT mode is enabled.

Referenced by decode_transform_coeffs_ch().

static void ff_eac3_apply_spectral_extension ( AC3DecodeContext s)
static

Apply spectral extension to each channel by copying lower frequency coefficients to higher frequency bins and applying side information to approximate the original high frequency signal.

Referenced by decode_audio_block().