FFmpeg
Loading...
Searching...
No Matches
aacdec.c File Reference
#include "config_components.h"
#include <limits.h>
#include <stddef.h>
#include "aacdec.h"
#include "aacdec_tab.h"
#include "aacdec_usac.h"
#include "libavcodec/aac.h"
#include "libavcodec/aac_defines.h"
#include "libavcodec/aacsbr.h"
#include "libavcodec/aactab.h"
#include "libavcodec/adts_header.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/internal.h"
#include "libavcodec/codec_internal.h"
#include "libavcodec/decode.h"
#include "libavcodec/profiles.h"
#include "libavutil/attributes.h"
#include "libavutil/error.h"
#include "libavutil/log.h"
#include "libavutil/macros.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "libavutil/tx.h"
#include "libavutil/version.h"
#include "libavutil/refstruct.h"

Go to the source code of this file.

Data Structures

struct  elem_to_channel
 

Macros

#define USE_FIXED   1
 
#define overread_err   "Input buffer exhausted before END element found\n"
 
#define MDCT_INIT(s, fn, len, sval)
 
#define AACDEC_FLAGS   AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_AUDIO_PARAM
 
#define OFF(field)
 

Functions

static int count_channels (uint8_t(*layout)[3], int tags)
 
static av_cold int che_configure (AACDecContext *ac, enum ChannelPosition che_pos, int type, int id, int *channels)
 Check for the channel element in the current channel position configuration.
 
static int frame_configure_elements (AVCodecContext *avctx)
 
static int assign_pair (struct elem_to_channel e2c_vec[MAX_ELEM_ID], uint8_t(*layout_map)[3], int offset, uint64_t left, uint64_t right, int pos, uint64_t *layout)
 
static int count_paired_channels (uint8_t(*layout_map)[3], int tags, int pos, int current)
 
static int assign_channels (struct elem_to_channel e2c_vec[MAX_ELEM_ID], uint8_t(*layout_map)[3], uint64_t *layout, int tags, int layer, int pos, int *current)
 
static uint64_t sniff_channel_order (uint8_t(*layout_map)[3], int tags)
 
static void copy_oc (OutputConfiguration *dst, OutputConfiguration *src)
 
static int push_output_configuration (AACDecContext *ac)
 Save current output configuration if and only if it has been locked.
 
static void pop_output_configuration (AACDecContext *ac)
 Restore the previous output configuration if and only if the current configuration is unlocked.
 
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.
 
static av_cold void flush (AVCodecContext *avctx)
 
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.
 
ChannelElementff_aac_get_che (AACDecContext *ac, int type, int elem_id)
 
static void decode_channel_map (uint8_t layout_map[][3], enum ChannelPosition type, GetBitContext *gb, int n)
 Decode an array of 4 bit element IDs, optionally interleaved with a stereo/mono switching bit.
 
static void relative_align_get_bits (GetBitContext *gb, int reference_position)
 
static int decode_pce (AVCodecContext *avctx, MPEG4AudioConfig *m4ac, uint8_t(*layout_map)[3], GetBitContext *gb, int byte_align_ref)
 Decode program configuration element; reference: table 4.2.
 
static int decode_ga_specific_config (AACDecContext *ac, AVCodecContext *avctx, GetBitContext *gb, int get_bit_alignment, MPEG4AudioConfig *m4ac, int channel_config)
 Decode GA "General Audio" specific configuration; reference: table 4.1.
 
static int decode_eld_specific_config (AACDecContext *ac, AVCodecContext *avctx, GetBitContext *gb, MPEG4AudioConfig *m4ac, int channel_config)
 
static int decode_audio_specific_config_gb (AACDecContext *ac, AVCodecContext *avctx, OutputConfiguration *oc, GetBitContext *gb, int get_bit_alignment, int sync_extension)
 Decode audio specific configuration; reference: table 1.13.
 
static int decode_audio_specific_config (AACDecContext *ac, AVCodecContext *avctx, OutputConfiguration *oc, const uint8_t *data, int64_t bit_size, int sync_extension)
 
static av_cold int decode_close (AVCodecContext *avctx)
 
static av_cold int init_dsp (AVCodecContext *avctx)
 
av_cold int ff_aac_decode_init (AVCodecContext *avctx)
 
static int skip_data_stream_element (AACDecContext *ac, GetBitContext *gb)
 Skip data_stream_element; reference: table 4.10.
 
static int decode_prediction (AACDecContext *ac, IndividualChannelStream *ics, GetBitContext *gb)
 
static void decode_ltp (AACDecContext *ac, LongTermPrediction *ltp, GetBitContext *gb, uint8_t max_sfb)
 Decode Long Term Prediction data; reference: table 4.xx.
 
static int decode_ics_info (AACDecContext *ac, IndividualChannelStream *ics, GetBitContext *gb)
 Decode Individual Channel Stream info; reference: table 4.6.
 
static int decode_band_types (AACDecContext *ac, SingleChannelElement *sce, GetBitContext *gb)
 Decode band types (section_data payload); reference: table 4.46.
 
static int decode_scalefactors (AACDecContext *ac, SingleChannelElement *sce, GetBitContext *gb, unsigned int global_gain)
 Decode scalefactors; reference: table 4.47.
 
static int decode_pulses (Pulse *pulse, GetBitContext *gb, const uint16_t *swb_offset, int num_swb)
 Decode pulse data; reference: table 4.7.
 
int ff_aac_decode_tns (AACDecContext *ac, TemporalNoiseShaping *tns, GetBitContext *gb, const IndividualChannelStream *ics)
 Decode Temporal Noise Shaping data; reference: table 4.48.
 
static void decode_mid_side_stereo (ChannelElement *cpe, GetBitContext *gb, int ms_present)
 Decode Mid/Side data; reference: table 4.54.
 
static void decode_gain_control (SingleChannelElement *sce, GetBitContext *gb)
 
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.
 
static int decode_cpe (AACDecContext *ac, GetBitContext *gb, ChannelElement *cpe)
 Decode a channel_pair_element; reference: table 4.4.
 
static int decode_drc_channel_exclusions (DynamicRangeControl *che_drc, GetBitContext *gb)
 Parse whether channels are to be excluded from Dynamic Range Compression; reference: table 4.53.
 
static int decode_dynamic_range (DynamicRangeControl *che_drc, GetBitContext *gb)
 Decode dynamic range information; reference: table 4.52.
 
static int decode_fill (AACDecContext *ac, GetBitContext *gb, int len)
 
static int decode_extension_payload (AACDecContext *ac, GetBitContext *gb, int cnt, ChannelElement *che, enum RawDataBlockType elem_type)
 Decode extension data (incomplete); reference: table 4.51.
 
static void apply_channel_coupling (AACDecContext *ac, ChannelElement *cc, enum RawDataBlockType type, int elem_id, enum CouplingPoint coupling_point, void(*apply_coupling_method)(AACDecContext *ac, SingleChannelElement *target, ChannelElement *cce, int index))
 channel coupling transformation interface
 
static void spectral_to_sample (AACDecContext *ac, int samples)
 Convert spectral data to samples, applying all supported tools as appropriate.
 
static int parse_adts_frame_header (AACDecContext *ac, GetBitContext *gb)
 
static int aac_decode_er_frame (AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, GetBitContext *gb)
 
static int decode_frame_ga (AVCodecContext *avctx, AACDecContext *ac, GetBitContext *gb, int *got_frame_ptr)
 
static int aac_decode_frame_int (AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, GetBitContext *gb, const AVPacket *avpkt)
 
static int aac_decode_frame (AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *avpkt)
 

Variables

static const AVOption options []
 
static const AVClass decoder_class
 

Macro Definition Documentation

◆ USE_FIXED

◆ overread_err

#define overread_err   "Input buffer exhausted before END element found\n"

◆ MDCT_INIT

#define MDCT_INIT ( s,
fn,
len,
sval )
Value:
scale_fixed = (sval) * 128.0f; \
scale_float = (sval) / 32768.0f; \
ret = av_tx_init(&s, &fn, tx_type, 1, len, scalep, 0); \
if (ret < 0) \
return ret
#define fn(a)
#define s(width, name)
Definition cbs_vp9.c:198
av_cold int av_tx_init(AVTXContext **ctx, av_tx_fn *tx, enum AVTXType type, int inv, int len, const void *scale, uint64_t flags)
Initialize a transform context with the given configuration (i)MDCTs with an odd length are currently...
Definition tx.c:903
int len

Referenced by init_dsp().

◆ AACDEC_FLAGS

Definition at line 2628 of file aacdec.c.

◆ OFF

#define OFF ( field)
Value:
offsetof(AACDecContext, field)
main AAC decoding context
Definition aacdec.h:500

Definition at line 2629 of file aacdec.c.

Referenced by config_output().

Function Documentation

◆ count_channels()

static int count_channels ( uint8_t(*) layout[3],
int tags )
static

Definition at line 118 of file aacdec.c.

Referenced by decode_ga_specific_config().

◆ che_configure()

static av_cold int che_configure ( AACDecContext * ac,
enum ChannelPosition che_pos,
int type,
int id,
int * channels )
static

Check for the channel element in the current channel position configuration.

If it exists, make sure the appropriate element is allocated and map the channel order to match the internal FFmpeg channel layout.

Parameters
che_poscurrent channel position configuration
typechannel element type
idchannel element id
channelscount of the number of channels in the configuration
Returns
Returns error status. 0 - OK, !0 - error

Definition at line 142 of file aacdec.c.

Referenced by ff_aac_output_configure().

◆ frame_configure_elements()

static int frame_configure_elements ( AVCodecContext * avctx)
static

Definition at line 181 of file aacdec.c.

Referenced by aac_decode_er_frame(), aac_decode_frame_int(), and ff_aac_output_configure().

◆ assign_pair()

static int assign_pair ( struct elem_to_channel e2c_vec[MAX_ELEM_ID],
uint8_t(*) layout_map[3],
int offset,
uint64_t left,
uint64_t right,
int pos,
uint64_t * layout )
static

Definition at line 222 of file aacdec.c.

Referenced by assign_channels().

◆ count_paired_channels()

static int count_paired_channels ( uint8_t(*) layout_map[3],
int tags,
int pos,
int current )
static

Definition at line 260 of file aacdec.c.

Referenced by assign_channels().

◆ assign_channels()

static int assign_channels ( struct elem_to_channel e2c_vec[MAX_ELEM_ID],
uint8_t(*) layout_map[3],
uint64_t * layout,
int tags,
int layer,
int pos,
int * current )
static

Definition at line 292 of file aacdec.c.

Referenced by sniff_channel_order().

◆ sniff_channel_order()

static uint64_t sniff_channel_order ( uint8_t(*) layout_map[3],
int tags )
static

Definition at line 370 of file aacdec.c.

Referenced by ff_aac_output_configure().

◆ copy_oc()

static void copy_oc ( OutputConfiguration * dst,
OutputConfiguration * src )
static

Definition at line 431 of file aacdec.c.

Referenced by pop_output_configuration(), and push_output_configuration().

◆ push_output_configuration()

static int push_output_configuration ( AACDecContext * ac)
static

Save current output configuration if and only if it has been locked.

Definition at line 454 of file aacdec.c.

Referenced by decode_frame_ga(), ff_aac_get_che(), latm_decode_frame(), and parse_adts_frame_header().

◆ pop_output_configuration()

static void pop_output_configuration ( AACDecContext * ac)
static

Restore the previous output configuration if and only if the current configuration is unlocked.

Definition at line 470 of file aacdec.c.

Referenced by aac_decode_frame_int(), decode_frame_ga(), and latm_decode_frame().

◆ 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 487 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().

◆ flush()

static av_cold void flush ( AVCodecContext * avctx)
static

Definition at line 556 of file aacdec.c.

◆ 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 583 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_get_che()

ChannelElement * ff_aac_get_che ( AACDecContext * ac,
int type,
int elem_id )

◆ decode_channel_map()

static void decode_channel_map ( uint8_t layout_map[][3],
enum ChannelPosition type,
GetBitContext * gb,
int n )
static

Decode an array of 4 bit element IDs, optionally interleaved with a stereo/mono switching bit.

Parameters
typespeaker type/position for these channels

Definition at line 778 of file aacdec.c.

Referenced by decode_pce().

◆ relative_align_get_bits()

static void relative_align_get_bits ( GetBitContext * gb,
int reference_position )
inlinestatic

Definition at line 808 of file aacdec.c.

Referenced by decode_pce().

◆ decode_pce()

static int decode_pce ( AVCodecContext * avctx,
MPEG4AudioConfig * m4ac,
uint8_t(*) layout_map[3],
GetBitContext * gb,
int byte_align_ref )
static

Decode program configuration element; reference: table 4.2.

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

Definition at line 820 of file aacdec.c.

Referenced by decode_frame_ga(), and decode_ga_specific_config().

◆ decode_ga_specific_config()

static int decode_ga_specific_config ( AACDecContext * ac,
AVCodecContext * avctx,
GetBitContext * gb,
int get_bit_alignment,
MPEG4AudioConfig * m4ac,
int channel_config )
static

Decode GA "General Audio" specific configuration; reference: table 4.1.

Parameters
acpointer to AACDecContext, may be null
avctxpointer to AVCCodecContext, used for logging
Returns
Returns error status. 0 - OK, !0 - error

Definition at line 975 of file aacdec.c.

Referenced by decode_audio_specific_config_gb().

◆ decode_eld_specific_config()

static int decode_eld_specific_config ( AACDecContext * ac,
AVCodecContext * avctx,
GetBitContext * gb,
MPEG4AudioConfig * m4ac,
int channel_config )
static

Definition at line 1050 of file aacdec.c.

Referenced by decode_audio_specific_config_gb().

◆ decode_audio_specific_config_gb()

static int decode_audio_specific_config_gb ( AACDecContext * ac,
AVCodecContext * avctx,
OutputConfiguration * oc,
GetBitContext * gb,
int get_bit_alignment,
int sync_extension )
static

Decode audio specific configuration; reference: table 1.13.

Parameters
acpointer to AACDecContext, may be null
avctxpointer to AVCCodecContext, used for logging
m4acpointer to MPEG4AudioConfig, used for parsing
gbbuffer holding an audio specific config
get_bit_alignmentrelative alignment for byte align operations
sync_extensionlook for an appended sync extension
Returns
Returns error status or number of consumed bits. <0 - error

Definition at line 1119 of file aacdec.c.

Referenced by decode_audio_specific_config(), and latm_decode_audio_specific_config().

◆ decode_audio_specific_config()

static int decode_audio_specific_config ( AACDecContext * ac,
AVCodecContext * avctx,
OutputConfiguration * oc,
const uint8_t * data,
int64_t bit_size,
int sync_extension )
static

Definition at line 1194 of file aacdec.c.

Referenced by aac_decode_frame(), ff_aac_decode_init(), and latm_decode_frame().

◆ decode_close()

static av_cold int decode_close ( AVCodecContext * avctx)
static

Definition at line 1220 of file aacdec.c.

◆ init_dsp()

static av_cold int init_dsp ( AVCodecContext * avctx)
static

Definition at line 1263 of file aacdec.c.

Referenced by ff_aac_decode_init().

◆ ff_aac_decode_init()

av_cold int ff_aac_decode_init ( AVCodecContext * avctx)

Definition at line 1298 of file aacdec.c.

Referenced by ff_aac_decode_init_fixed(), and ff_aac_decode_init_float().

◆ skip_data_stream_element()

static int skip_data_stream_element ( AACDecContext * ac,
GetBitContext * gb )
static

Skip data_stream_element; reference: table 4.10.

Definition at line 1361 of file aacdec.c.

Referenced by decode_frame_ga().

◆ decode_prediction()

static int decode_prediction ( AACDecContext * ac,
IndividualChannelStream * ics,
GetBitContext * gb )
static

Definition at line 1378 of file aacdec.c.

Referenced by decode_ics_info().

◆ decode_ltp()

static void decode_ltp ( AACDecContext * ac,
LongTermPrediction * ltp,
GetBitContext * gb,
uint8_t max_sfb )
static

Decode Long Term Prediction data; reference: table 4.xx.

Definition at line 1400 of file aacdec.c.

Referenced by decode_cpe(), and decode_ics_info().

◆ decode_ics_info()

static int decode_ics_info ( AACDecContext * ac,
IndividualChannelStream * ics,
GetBitContext * gb )
static

Decode Individual Channel Stream info; reference: table 4.6.

Definition at line 1418 of file aacdec.c.

Referenced by decode_cpe(), and ff_aac_decode_ics().

◆ decode_band_types()

static int decode_band_types ( AACDecContext * ac,
SingleChannelElement * sce,
GetBitContext * gb )
static

Decode band types (section_data payload); reference: table 4.46.

Parameters
band_typearray of the used band type
band_type_run_endarray of the last scalefactor band of a band type run
Returns
Returns error status. 0 - OK, !0 - error

Definition at line 1545 of file aacdec.c.

Referenced by ff_aac_decode_ics().

◆ decode_scalefactors()

static int decode_scalefactors ( AACDecContext * ac,
SingleChannelElement * sce,
GetBitContext * gb,
unsigned int global_gain )
static

Decode scalefactors; reference: table 4.47.

Parameters
global_gainfirst scalefactor value as scalefactors are differentially coded
band_typearray of the used band type
band_type_run_endarray of the last scalefactor band of a band type run
sfarray of scalefactors or intensity stereo positions
Returns
Returns error status. 0 - OK, !0 - error

Definition at line 1592 of file aacdec.c.

Referenced by ff_aac_decode_ics().

◆ decode_pulses()

static int decode_pulses ( Pulse * pulse,
GetBitContext * gb,
const uint16_t * swb_offset,
int num_swb )
static

Decode pulse data; reference: table 4.7.

Definition at line 1651 of file aacdec.c.

Referenced by ff_aac_decode_ics().

◆ 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 1678 of file aacdec.c.

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

◆ decode_mid_side_stereo()

static void decode_mid_side_stereo ( ChannelElement * cpe,
GetBitContext * gb,
int ms_present )
static

Decode Mid/Side data; reference: table 4.54.

Parameters
ms_presentIndicates mid/side stereo presence. [0] mask is all 0s; [1] mask is decoded from bitstream; [2] mask is all 1s; [3] reserved for scalable AAC

Definition at line 1736 of file aacdec.c.

Referenced by decode_cpe().

◆ decode_gain_control()

static void decode_gain_control ( SingleChannelElement * sce,
GetBitContext * gb )
static

Definition at line 1750 of file aacdec.c.

Referenced by ff_aac_decode_ics().

◆ 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 1785 of file aacdec.c.

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

◆ decode_cpe()

static int decode_cpe ( AACDecContext * ac,
GetBitContext * gb,
ChannelElement * cpe )
static

Decode a channel_pair_element; reference: table 4.4.

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

Definition at line 1879 of file aacdec.c.

Referenced by aac_decode_er_frame(), and decode_frame_ga().

◆ decode_drc_channel_exclusions()

static int decode_drc_channel_exclusions ( DynamicRangeControl * che_drc,
GetBitContext * gb )
static

Parse whether channels are to be excluded from Dynamic Range Compression; reference: table 4.53.

Returns
Returns number of bytes consumed.

Definition at line 1925 of file aacdec.c.

Referenced by decode_dynamic_range().

◆ decode_dynamic_range()

static int decode_dynamic_range ( DynamicRangeControl * che_drc,
GetBitContext * gb )
static

Decode dynamic range information; reference: table 4.52.

Returns
Returns number of bytes consumed.

Definition at line 1944 of file aacdec.c.

Referenced by decode_extension_payload().

◆ decode_fill()

static int decode_fill ( AACDecContext * ac,
GetBitContext * gb,
int len )
static

Definition at line 1991 of file aacdec.c.

Referenced by decode_extension_payload().

◆ decode_extension_payload()

static int decode_extension_payload ( AACDecContext * ac,
GetBitContext * gb,
int cnt,
ChannelElement * che,
enum RawDataBlockType elem_type )
static

Decode extension data (incomplete); reference: table 4.51.

Parameters
cntlength of TYPE_FIL syntactic element in bytes
Returns
Returns number of bytes consumed

Definition at line 2024 of file aacdec.c.

Referenced by decode_frame_ga().

◆ apply_channel_coupling()

static void apply_channel_coupling ( AACDecContext * ac,
ChannelElement * cc,
enum RawDataBlockType type,
int elem_id,
enum CouplingPoint coupling_point,
void(* apply_coupling_method )(AACDecContext *ac, SingleChannelElement *target, ChannelElement *cce, int index) )
static

channel coupling transformation interface

Parameters
apply_coupling_methodpointer to (in)dependent coupling function

Definition at line 2090 of file aacdec.c.

Referenced by spectral_to_sample().

◆ spectral_to_sample()

static void spectral_to_sample ( AACDecContext * ac,
int samples )
static

Convert spectral data to samples, applying all supported tools as appropriate.

Definition at line 2123 of file aacdec.c.

Referenced by aac_decode_er_frame(), and decode_frame_ga().

◆ parse_adts_frame_header()

static int parse_adts_frame_header ( AACDecContext * ac,
GetBitContext * gb )
static

dual mono frames in Japanese DTV can have chan_config 0 WITHOUT specifying PCE. thus, set dual mono as default.

Definition at line 2189 of file aacdec.c.

Referenced by aac_decode_frame_int().

◆ aac_decode_er_frame()

static int aac_decode_er_frame ( AVCodecContext * avctx,
AVFrame * frame,
int * got_frame_ptr,
GetBitContext * gb )
static

Definition at line 2251 of file aacdec.c.

Referenced by aac_decode_frame(), and latm_decode_frame().

◆ decode_frame_ga()

static int decode_frame_ga ( AVCodecContext * avctx,
AACDecContext * ac,
GetBitContext * gb,
int * got_frame_ptr )
static

Definition at line 2324 of file aacdec.c.

Referenced by aac_decode_frame_int().

◆ aac_decode_frame_int()

static int aac_decode_frame_int ( AVCodecContext * avctx,
AVFrame * frame,
int * got_frame_ptr,
GetBitContext * gb,
const AVPacket * avpkt )
static

Definition at line 2505 of file aacdec.c.

Referenced by aac_decode_frame(), and latm_decode_frame().

◆ aac_decode_frame()

static int aac_decode_frame ( AVCodecContext * avctx,
AVFrame * frame,
int * got_frame_ptr,
AVPacket * avpkt )
static

Definition at line 2561 of file aacdec.c.

Variable Documentation

◆ options

const AVOption options[]
static
Initial value:
= {
{"dual_mono_mode", "Select the channel to decode for dual mono",
OFF(force_dmono_mode), AV_OPT_TYPE_INT, {.i64=-1}, -1, 2,
AACDEC_FLAGS, .unit = "dual_mono_mode"},
{"auto", "autoselection", 0, AV_OPT_TYPE_CONST, {.i64=-1}, INT_MIN, INT_MAX, AACDEC_FLAGS, .unit = "dual_mono_mode"},
{"main", "Select Main/Left channel", 0, AV_OPT_TYPE_CONST, {.i64= 1}, INT_MIN, INT_MAX, AACDEC_FLAGS, .unit = "dual_mono_mode"},
{"sub" , "Select Sub/Right channel", 0, AV_OPT_TYPE_CONST, {.i64= 2}, INT_MIN, INT_MAX, AACDEC_FLAGS, .unit = "dual_mono_mode"},
{"both", "Select both channels", 0, AV_OPT_TYPE_CONST, {.i64= 0}, INT_MIN, INT_MAX, AACDEC_FLAGS, .unit = "dual_mono_mode"},
{ "channel_order", "Order in which the channels are to be exported",
OFF(output_channel_order), AV_OPT_TYPE_INT,
{ .i64 = CHANNEL_ORDER_DEFAULT }, 0, 1, AACDEC_FLAGS, .unit = "channel_order" },
{ "default", "normal libavcodec channel order", 0, AV_OPT_TYPE_CONST,
{ .i64 = CHANNEL_ORDER_DEFAULT }, .flags = AACDEC_FLAGS, .unit = "channel_order" },
{ "coded", "order in which the channels are coded in the bitstream",
0, AV_OPT_TYPE_CONST, { .i64 = CHANNEL_ORDER_CODED }, .flags = AACDEC_FLAGS, .unit = "channel_order" },
{ "target_level", "Target output loudness in dBFS for xHE-AAC normalization (0 = disabled)",
OFF(target_level), AV_OPT_TYPE_INT, { .i64 = 0 }, -70, 0, AACDEC_FLAGS },
{NULL},
}
@ CHANNEL_ORDER_DEFAULT
Definition aacdec.h:62
@ CHANNEL_ORDER_CODED
Definition aacdec.h:63
#define NULL
Definition coverity.c:32
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.
Definition opt.h:298
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition opt.h:258
#define AACDEC_FLAGS
Definition aacdec.c:2628
#define OFF(field)
Definition aacdec.c:2629

Definition at line 2630 of file aacdec.c.

◆ decoder_class

const AVClass decoder_class
static
Initial value:
= {
.class_name = "AAC decoder",
.item_name = av_default_item_name,
.option = options,
}
const char * av_default_item_name(void *ptr)
Return the context name.
Definition log.c:241
#define LIBAVUTIL_VERSION_INT
Definition version.h:85

Definition at line 2657 of file aacdec.c.