FFmpeg
 All Data Structures 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/lfg.h"
#include "ac3.h"
#include "ac3dsp.h"
#include "get_bits.h"
#include "dsputil.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.
 

Functions

int ff_eac3_parse_header (AC3DecodeContext *s)
 Parse the E-AC-3 frame header.
 
void ff_eac3_decode_transform_coeffs_aht_ch (AC3DecodeContext *s, int ch)
 Decode mantissas in a single channel for the entire frame.
 
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.
 

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 62 of file ac3dec.h.

Referenced by ac3_decode_frame(), and decode_audio_block().

#define SPX_MAX_BANDS   17

Definition at line 64 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 67 of file ac3dec.h.

Referenced by ac3_decode_frame().

Function Documentation

int ff_eac3_parse_header ( AC3DecodeContext s)

Parse the E-AC-3 frame header.

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

Definition at line 291 of file eac3dec.c.

Referenced by parse_frame_header().

void ff_eac3_decode_transform_coeffs_aht_ch ( AC3DecodeContext s,
int  ch 
)

Decode mantissas in a single channel for the entire frame.

This is used when AHT mode is enabled.

Definition at line 198 of file eac3dec.c.

Referenced by decode_transform_coeffs_ch().

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.

Definition at line 66 of file eac3dec.c.

Referenced by decode_audio_block().