FFmpeg
Data Structures | Macros | Enumerations | Functions
aacdec.h File Reference
#include <stdint.h>
#include "libavutil/channel_layout.h"
#include "libavutil/float_dsp.h"
#include "libavutil/fixed_dsp.h"
#include "libavutil/mem_internal.h"
#include "libavutil/tx.h"
#include "libavcodec/aac.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/mpeg4audio.h"
#include "aacdec_ac.h"

Go to the source code of this file.

Data Structures

struct  LongTermPrediction
 Long Term Prediction. More...
 
struct  AACUsacElemData
 
struct  IndividualChannelStream
 Individual Channel Stream. More...
 
struct  TemporalNoiseShaping
 Temporal Noise Shaping. More...
 
struct  ChannelCoupling
 coupling parameters More...
 
struct  SingleChannelElement
 Single Channel Element - used for both SCE and LFE elements. More...
 
struct  AACUsacStereo
 
struct  ChannelElement
 channel element - generic struct for SCE/CPE/CCE/LFE More...
 
struct  AACUSACLoudnessInfo
 
struct  AACUsacElemConfig
 
struct  AACUSACConfig
 
struct  OutputConfiguration
 
struct  DynamicRangeControl
 Dynamic Range Control - decoded from the bitstream but not processed further. More...
 
struct  AACDecProc
 Decode-specific primitives. More...
 
struct  AACDecDSP
 DSP-specific primitives. More...
 
struct  AACDecContext
 main AAC decoding context More...
 

Macros

#define RENAME_FIXED(name)   name ## _fixed
 
#define INTFLOAT_UNION(name, elems)
 
#define INTFLOAT_ALIGNED_UNION(alignment, name, nb_elems)
 
#define NUM_TW_NODES   16
 

Enumerations

enum  OCStatus {
  OC_NONE, OC_TRIAL_PCE, OC_TRIAL_FRAME, OC_GLOBAL_HDR,
  OC_LOCKED
}
 Output configuration status. More...
 
enum  AACOutputChannelOrder { CHANNEL_ORDER_DEFAULT, CHANNEL_ORDER_CODED }
 
enum  CouplingPoint { BEFORE_TNS, BETWEEN_TNS_AND_IMDCT, AFTER_IMDCT = 3 }
 The point during decoding at which channel coupling is applied. More...
 
enum  AACUsacElem { ID_USAC_SCE = 0, ID_USAC_CPE = 1, ID_USAC_LFE = 2, ID_USAC_EXT = 3 }
 
enum  ExtensionHeaderType { ID_CONFIG_EXT_FILL = 0, ID_CONFIG_EXT_LOUDNESS_INFO = 2, ID_CONFIG_EXT_STREAM_ID = 7 }
 
enum  AACUsacExtension {
  ID_EXT_ELE_FILL, ID_EXT_ELE_MPEGS, ID_EXT_ELE_SAOC, ID_EXT_ELE_AUDIOPREROLL,
  ID_EXT_ELE_UNI_DRC
}
 
enum  AACUSACLoudnessExt { UNIDRCLOUDEXT_TERM = 0x0, UNIDRCLOUDEXT_EQ = 0x1 }
 

Functions

int ff_aac_decode_init (AVCodecContext *avctx)
 
int ff_aac_decode_init_float (AVCodecContext *avctx)
 
int ff_aac_decode_init_fixed (AVCodecContext *avctx)
 Dequantization-related. More...
 
int ff_aac_decode_ics (AACDecContext *ac, SingleChannelElement *sce, GetBitContext *gb, int common_window, int scale_flag)
 Decode an individual_channel_stream payload; reference: table 4.44. More...
 
int ff_aac_decode_tns (AACDecContext *ac, TemporalNoiseShaping *tns, GetBitContext *gb, const IndividualChannelStream *ics)
 Decode Temporal Noise Shaping data; reference: table 4.48. More...
 
int ff_aac_set_default_channel_config (AACDecContext *ac, AVCodecContext *avctx, uint8_t(*layout_map)[3], int *tags, int channel_config)
 Set up channel positions based on a default channel configuration as specified in table 1.17. More...
 
int ff_aac_output_configure (AACDecContext *ac, uint8_t layout_map[MAX_ELEM_ID *4][3], int tags, enum OCStatus oc_type, int get_new_frame)
 Configure output channel order based on the current program configuration element. More...
 
ChannelElementff_aac_get_che (AACDecContext *ac, int type, int elem_id)
 

Detailed Description

AAC decoder definitions and structures

Author
Oded Shimon ( ods15 ods15 dyndns org )
Maxim Gavrilov ( maxim.gavrilov gmail com )

Definition in file aacdec.h.

Macro Definition Documentation

◆ RENAME_FIXED

#define RENAME_FIXED (   name)    name ## _fixed

Definition at line 101 of file aacdec.h.

◆ INTFLOAT_UNION

#define INTFLOAT_UNION (   name,
  elems 
)
Value:
union { \
int RENAME_FIXED(name) elems; \
float name elems; \
}

Definition at line 103 of file aacdec.h.

◆ INTFLOAT_ALIGNED_UNION

#define INTFLOAT_ALIGNED_UNION (   alignment,
  name,
  nb_elems 
)
Value:
union { \
DECLARE_ALIGNED(alignment, int, RENAME_FIXED(name))[nb_elems]; \
DECLARE_ALIGNED(alignment, float, name)[nb_elems]; \
}

Definition at line 109 of file aacdec.h.

◆ NUM_TW_NODES

#define NUM_TW_NODES   16

Definition at line 131 of file aacdec.h.

Enumeration Type Documentation

◆ OCStatus

enum OCStatus

Output configuration status.

Enumerator
OC_NONE 

Output unconfigured.

OC_TRIAL_PCE 

Output configuration under trial specified by an inband PCE.

OC_TRIAL_FRAME 

Output configuration under trial specified by a frame header.

OC_GLOBAL_HDR 

Output configuration set in a global header but not yet locked.

OC_LOCKED 

Output configuration locked in place.

Definition at line 52 of file aacdec.h.

◆ AACOutputChannelOrder

Enumerator
CHANNEL_ORDER_DEFAULT 
CHANNEL_ORDER_CODED 

Definition at line 60 of file aacdec.h.

◆ CouplingPoint

The point during decoding at which channel coupling is applied.

Enumerator
BEFORE_TNS 
BETWEEN_TNS_AND_IMDCT 
AFTER_IMDCT 

Definition at line 68 of file aacdec.h.

◆ AACUsacElem

Enumerator
ID_USAC_SCE 
ID_USAC_CPE 
ID_USAC_LFE 
ID_USAC_EXT 

Definition at line 74 of file aacdec.h.

◆ ExtensionHeaderType

Enumerator
ID_CONFIG_EXT_FILL 
ID_CONFIG_EXT_LOUDNESS_INFO 
ID_CONFIG_EXT_STREAM_ID 

Definition at line 81 of file aacdec.h.

◆ AACUsacExtension

Enumerator
ID_EXT_ELE_FILL 
ID_EXT_ELE_MPEGS 
ID_EXT_ELE_SAOC 
ID_EXT_ELE_AUDIOPREROLL 
ID_EXT_ELE_UNI_DRC 

Definition at line 87 of file aacdec.h.

◆ AACUSACLoudnessExt

Enumerator
UNIDRCLOUDEXT_TERM 
UNIDRCLOUDEXT_EQ 

Definition at line 95 of file aacdec.h.

Function Documentation

◆ ff_aac_decode_init()

int ff_aac_decode_init ( AVCodecContext avctx)

Definition at line 1174 of file aacdec.c.

Referenced by ff_aac_decode_init_fixed(), and ff_aac_decode_init_float().

◆ ff_aac_decode_init_float()

int ff_aac_decode_init_float ( AVCodecContext avctx)

Definition at line 164 of file aacdec_float.c.

Referenced by latm_decode_init().

◆ ff_aac_decode_init_fixed()

int ff_aac_decode_init_fixed ( AVCodecContext avctx)

Dequantization-related.

Definition at line 87 of file aacdec_fixed.c.

◆ ff_aac_decode_ics()

int ff_aac_decode_ics ( AACDecContext ac,
SingleChannelElement sce,
GetBitContext gb,
int  common_window,
int  scale_flag 
)

Decode an individual_channel_stream payload; reference: table 4.44.

Parameters
common_windowChannels have independent [0], or shared [1], Individual Channel Stream information.
scale_flagscalable [1] or non-scalable [0] AAC (Unused until scalable AAC is implemented.)
Returns
Returns error status. 0 - OK, !0 - error

Definition at line 1661 of file aacdec.c.

Referenced by aac_decode_er_frame(), decode_cce(), decode_cpe(), and decode_frame_ga().

◆ ff_aac_decode_tns()

int ff_aac_decode_tns ( AACDecContext ac,
TemporalNoiseShaping tns,
GetBitContext gb,
const IndividualChannelStream ics 
)

Decode Temporal Noise Shaping data; reference: table 4.48.

Returns
Returns error status. 0 - OK, !0 - error

Definition at line 1554 of file aacdec.c.

Referenced by decode_usac_core_coder(), decode_usac_stereo_info(), and ff_aac_decode_ics().

◆ ff_aac_set_default_channel_config()

int ff_aac_set_default_channel_config ( AACDecContext ac,
AVCodecContext avctx,
uint8_t(*)  layout_map[3],
int tags,
int  channel_config 
)

Set up channel positions based on a default channel configuration as specified in table 1.17.

Returns
Returns error status. 0 - OK, !0 - error

Definition at line 549 of file aacdec.c.

Referenced by decode_eld_specific_config(), decode_ga_specific_config(), ff_aac_decode_init(), ff_aac_get_che(), ff_aac_usac_config_decode(), and parse_adts_frame_header().

◆ ff_aac_output_configure()

int ff_aac_output_configure ( AACDecContext ac,
uint8_t  layout_map[MAX_ELEM_ID *4][3],
int  tags,
enum OCStatus  oc_type,
int  get_new_frame 
)

Configure output channel order based on the current program configuration element.

Returns
Returns error status. 0 - OK, !0 - error

Definition at line 458 of file aacdec.c.

Referenced by decode_eld_specific_config(), decode_extension_payload(), decode_frame_ga(), decode_ga_specific_config(), ff_aac_decode_init(), ff_aac_get_che(), ff_aac_usac_config_decode(), ff_aac_usac_decode_frame(), parse_adts_frame_header(), and pop_output_configuration().

◆ ff_aac_get_che()

ChannelElement* ff_aac_get_che ( AACDecContext ac,
int  type,
int  elem_id 
)
name
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option name
Definition: writing_filters.txt:88
RENAME_FIXED
#define RENAME_FIXED(name)
Definition: aacdec.h:101