libavcodec/aacdec.c File Reference

AAC decoder. More...

#include "avcodec.h"
#include "internal.h"
#include "get_bits.h"
#include "dsputil.h"
#include "fft.h"
#include "fmtconvert.h"
#include "lpc.h"
#include "kbdwin.h"
#include "sinewin.h"
#include "aac.h"
#include "aactab.h"
#include "aacdectab.h"
#include "cbrt_tablegen.h"
#include "sbr.h"
#include "aacsbr.h"
#include "mpeg4audio.h"
#include "aacadtsdec.h"
#include <assert.h>
#include <errno.h>
#include <math.h>
#include <string.h>

Go to the source code of this file.

Data Structures

union  float754
struct  LATMContext

Defines

#define AAC_INIT_VLC_STATIC(num, size)
#define LOAS_SYNC_WORD   0x2b7
 11 bits LOAS sync word

Functions

static ChannelElementget_che (AACContext *ac, int type, int elem_id)
static av_cold int che_configure (AACContext *ac, enum ChannelPosition che_pos[4][MAX_ELEM_ID], int type, int id, int *channels)
 Check for the channel element in the current channel position configuration.
static av_cold int output_configure (AACContext *ac, enum ChannelPosition che_pos[4][MAX_ELEM_ID], enum ChannelPosition new_che_pos[4][MAX_ELEM_ID], int channel_config, enum OCStatus oc_type)
 Configure output channel order based on the current program configuration element.
static void decode_channel_map (enum ChannelPosition *cpe_map, enum ChannelPosition *sce_map, enum ChannelPosition type, GetBitContext *gb, int n)
 Decode an array of 4 bit element IDs, optionally interleaved with a stereo/mono switching bit.
static int decode_pce (AVCodecContext *avctx, MPEG4AudioConfig *m4ac, enum ChannelPosition new_che_pos[4][MAX_ELEM_ID], GetBitContext *gb)
 Decode program configuration element; reference: table 4.2.
static av_cold int set_default_channel_config (AVCodecContext *avctx, enum ChannelPosition new_che_pos[4][MAX_ELEM_ID], int channel_config)
 Set up channel positions based on a default channel configuration as specified in table 1.17.
static int decode_ga_specific_config (AACContext *ac, AVCodecContext *avctx, GetBitContext *gb, MPEG4AudioConfig *m4ac, int channel_config)
 Decode GA "General Audio" specific configuration; reference: table 4.1.
static int decode_audio_specific_config (AACContext *ac, AVCodecContext *avctx, MPEG4AudioConfig *m4ac, const uint8_t *data, int data_size)
 Decode audio specific configuration; reference: table 1.13.
static av_always_inline int lcg_random (int previous_val)
 linear congruential pseudorandom number generator
static av_always_inline void reset_predict_state (PredictorState *ps)
static void reset_all_predictors (PredictorState *ps)
static void reset_predictor_group (PredictorState *ps, int group_num)
static av_cold int aac_decode_init (AVCodecContext *avctx)
static int skip_data_stream_element (AACContext *ac, GetBitContext *gb)
 Skip data_stream_element; reference: table 4.10.
static int decode_prediction (AACContext *ac, IndividualChannelStream *ics, GetBitContext *gb)
static void decode_ltp (AACContext *ac, LongTermPrediction *ltp, GetBitContext *gb, uint8_t max_sfb)
 Decode Long Term Prediction data; reference: table 4.xx.
static int decode_ics_info (AACContext *ac, IndividualChannelStream *ics, GetBitContext *gb, int common_window)
 Decode Individual Channel Stream info; reference: table 4.6.
static int decode_band_types (AACContext *ac, enum BandType band_type[120], int band_type_run_end[120], GetBitContext *gb, IndividualChannelStream *ics)
 Decode band types (section_data payload); reference: table 4.46.
static int decode_scalefactors (AACContext *ac, float sf[120], GetBitContext *gb, unsigned int global_gain, IndividualChannelStream *ics, enum BandType band_type[120], int band_type_run_end[120])
 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.
static int decode_tns (AACContext *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 float * VMUL2 (float *dst, const float *v, unsigned idx, const float *scale)
static float * VMUL4 (float *dst, const float *v, unsigned idx, const float *scale)
static float * VMUL2S (float *dst, const float *v, unsigned idx, unsigned sign, const float *scale)
static float * VMUL4S (float *dst, const float *v, unsigned idx, unsigned sign, const float *scale)
static int decode_spectrum_and_dequant (AACContext *ac, float coef[1024], GetBitContext *gb, const float sf[120], int pulse_present, const Pulse *pulse, const IndividualChannelStream *ics, enum BandType band_type[120])
 Decode spectral data; reference: table 4.50.
static av_always_inline float flt16_round (float pf)
static av_always_inline float flt16_even (float pf)
static av_always_inline float flt16_trunc (float pf)
static av_always_inline void predict (PredictorState *ps, float *coef, int output_enable)
static void apply_prediction (AACContext *ac, SingleChannelElement *sce)
 Apply AAC-Main style frequency domain prediction.
static int decode_ics (AACContext *ac, SingleChannelElement *sce, GetBitContext *gb, int common_window, int scale_flag)
 Decode an individual_channel_stream payload; reference: table 4.44.
static void apply_mid_side_stereo (AACContext *ac, ChannelElement *cpe)
 Mid/Side stereo decoding; reference: 4.6.8.1.3.
static void apply_intensity_stereo (AACContext *ac, ChannelElement *cpe, int ms_present)
 intensity stereo decoding; reference: 4.6.8.2.3
static int decode_cpe (AACContext *ac, GetBitContext *gb, ChannelElement *cpe)
 Decode a channel_pair_element; reference: table 4.4.
static int decode_cce (AACContext *ac, GetBitContext *gb, ChannelElement *che)
 Decode coupling_channel_element; reference: table 4.8.
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, int cnt)
 Decode dynamic range information; reference: table 4.52.
static int decode_extension_payload (AACContext *ac, GetBitContext *gb, int cnt, ChannelElement *che, enum RawDataBlockType elem_type)
 Decode extension data (incomplete); reference: table 4.51.
static void apply_tns (float coef[1024], TemporalNoiseShaping *tns, IndividualChannelStream *ics, int decode)
 Decode Temporal Noise Shaping filter coefficients and apply all-pole filters; reference: 4.6.9.3.
static void windowing_and_mdct_ltp (AACContext *ac, float *out, float *in, IndividualChannelStream *ics)
 Apply windowing and MDCT to obtain the spectral coefficient from the predicted sample by LTP.
static void apply_ltp (AACContext *ac, SingleChannelElement *sce)
 Apply the long term prediction.
static void update_ltp (AACContext *ac, SingleChannelElement *sce)
 Update the LTP buffer for next frame.
static void imdct_and_windowing (AACContext *ac, SingleChannelElement *sce)
 Conduct IMDCT and windowing.
static void apply_dependent_coupling (AACContext *ac, SingleChannelElement *target, ChannelElement *cce, int index)
 Apply dependent channel coupling (applied before IMDCT).
static void apply_independent_coupling (AACContext *ac, SingleChannelElement *target, ChannelElement *cce, int index)
 Apply independent channel coupling (applied after IMDCT).
static void apply_channel_coupling (AACContext *ac, ChannelElement *cc, enum RawDataBlockType type, int elem_id, enum CouplingPoint coupling_point, void(*apply_coupling_method)(AACContext *ac, SingleChannelElement *target, ChannelElement *cce, int index))
 channel coupling transformation interface
static void spectral_to_sample (AACContext *ac)
 Convert spectral data to float samples, applying all supported tools as appropriate.
static int parse_adts_frame_header (AACContext *ac, GetBitContext *gb)
static int aac_decode_frame_int (AVCodecContext *avctx, void *data, int *data_size, GetBitContext *gb)
static int aac_decode_frame (AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
static av_cold int aac_decode_close (AVCodecContext *avctx)
static uint32_t latm_get_value (GetBitContext *b)
static int latm_decode_audio_specific_config (struct LATMContext *latmctx, GetBitContext *gb)
static int read_stream_mux_config (struct LATMContext *latmctx, GetBitContext *gb)
static int read_payload_length_info (struct LATMContext *ctx, GetBitContext *gb)
static int read_audio_mux_element (struct LATMContext *latmctx, GetBitContext *gb)
static int latm_decode_frame (AVCodecContext *avctx, void *out, int *out_size, AVPacket *avpkt)
static av_cold int latm_decode_init (AVCodecContext *avctx)

Variables

static VLC vlc_scalefactors
static VLC vlc_spectral [11]
static const char overread_err [] = "Input buffer exhausted before END element found\n"
static const float cce_scale []
AVCodec ff_aac_decoder
AVCodec ff_aac_latm_decoder


Detailed Description

AAC decoder.

Author:
Oded Shimon ( ods15 ods15 dyndns org )

Maxim Gavrilov ( maxim.gavrilov gmail com )

Definition in file aacdec.c.


Define Documentation

#define AAC_INIT_VLC_STATIC ( num,
size   ) 

Value:

Definition at line 542 of file aacdec.c.

Referenced by aac_decode_init().

#define LOAS_SYNC_WORD   0x2b7

11 bits LOAS sync word

Definition at line 2251 of file aacdec.c.

Referenced by latm_decode_frame().


Function Documentation

static av_cold int aac_decode_close ( AVCodecContext avctx  )  [static]

Definition at line 2231 of file aacdec.c.

Referenced by latm_decode_frame().

static int aac_decode_frame ( AVCodecContext avctx,
void *  data,
int *  data_size,
AVPacket avpkt 
) [static]

Definition at line 2208 of file aacdec.c.

static int aac_decode_frame_int ( AVCodecContext avctx,
void *  data,
int *  data_size,
GetBitContext gb 
) [static]

Definition at line 2073 of file aacdec.c.

Referenced by aac_decode_frame(), and latm_decode_frame().

static av_cold int aac_decode_init ( AVCodecContext avctx  )  [static]

Definition at line 548 of file aacdec.c.

Referenced by latm_decode_frame(), and latm_decode_init().

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

channel coupling transformation interface

Parameters:
apply_coupling_method pointer to (in)dependent coupling function

Definition at line 1959 of file aacdec.c.

Referenced by spectral_to_sample().

static void apply_dependent_coupling ( AACContext ac,
SingleChannelElement target,
ChannelElement cce,
int  index 
) [static]

Apply dependent channel coupling (applied before IMDCT).

Parameters:
index index into coupling gain array

Definition at line 1904 of file aacdec.c.

Referenced by spectral_to_sample().

static void apply_independent_coupling ( AACContext ac,
SingleChannelElement target,
ChannelElement cce,
int  index 
) [static]

Apply independent channel coupling (applied after IMDCT).

Parameters:
index index into coupling gain array

Definition at line 1940 of file aacdec.c.

Referenced by spectral_to_sample().

static void apply_intensity_stereo ( AACContext ac,
ChannelElement cpe,
int  ms_present 
) [static]

intensity stereo decoding; reference: 4.6.8.2.3

Parameters:
ms_present Indicates 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 1404 of file aacdec.c.

Referenced by decode_cpe().

static void apply_ltp ( AACContext ac,
SingleChannelElement sce 
) [static]

Apply the long term prediction.

Definition at line 1772 of file aacdec.c.

Referenced by spectral_to_sample().

static void apply_mid_side_stereo ( AACContext ac,
ChannelElement cpe 
) [static]

Mid/Side stereo decoding; reference: 4.6.8.1.3.

Definition at line 1374 of file aacdec.c.

Referenced by decode_cpe().

static void apply_prediction ( AACContext ac,
SingleChannelElement sce 
) [static]

Apply AAC-Main style frequency domain prediction.

Definition at line 1286 of file aacdec.c.

Referenced by decode_cpe(), and decode_ics().

static void apply_tns ( float  coef[1024],
TemporalNoiseShaping tns,
IndividualChannelStream ics,
int  decode 
) [static]

Decode Temporal Noise Shaping filter coefficients and apply all-pole filters; reference: 4.6.9.3.

Parameters:
decode 1 if tool is used normally, 0 if tool is used in LTP.
coef spectral coefficients

Definition at line 1690 of file aacdec.c.

Referenced by apply_ltp(), and spectral_to_sample().

static av_cold int che_configure ( AACContext ac,
enum ChannelPosition  che_pos[4][MAX_ELEM_ID],
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_pos current channel position configuration
type channel element type
id channel element id
channels count of the number of channels in the configuration
Returns:
Returns error status. 0 - OK, !0 - error

Definition at line 182 of file aacdec.c.

Referenced by output_configure().

static int decode_audio_specific_config ( AACContext ac,
AVCodecContext avctx,
MPEG4AudioConfig m4ac,
const uint8_t *  data,
int  data_size 
) [static]

Decode audio specific configuration; reference: table 1.13.

Parameters:
ac pointer to AACContext, may be null
avctx pointer to AVCCodecContext, used for logging
m4ac pointer to MPEG4AudioConfig, used for parsing
data pointer to AVCodecContext extradata
data_size size of AVCCodecContext extradata
Returns:
Returns error status or number of consumed bits. <0 - error

Definition at line 460 of file aacdec.c.

Referenced by aac_decode_init(), and latm_decode_audio_specific_config().

static int decode_band_types ( AACContext ac,
enum BandType  band_type[120],
int  band_type_run_end[120],
GetBitContext gb,
IndividualChannelStream ics 
) [static]

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

Parameters:
band_type array of the used band type
band_type_run_end array of the last scalefactor band of a band type run
Returns:
Returns error status. 0 - OK, !0 - error

Definition at line 741 of file aacdec.c.

Referenced by decode_ics().

static int decode_cce ( AACContext ac,
GetBitContext gb,
ChannelElement che 
) [static]

Decode coupling_channel_element; reference: table 4.8.

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

Definition at line 1495 of file aacdec.c.

Referenced by aac_decode_frame_int().

static void decode_channel_map ( enum ChannelPosition cpe_map,
enum ChannelPosition sce_map,
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:
cpe_map Stereo (Channel Pair Element) map, NULL if stereo bit is not present.
sce_map mono (Single Channel Element) map
type speaker type/position for these channels

Definition at line 270 of file aacdec.c.

Referenced by decode_pce().

static int decode_cpe ( AACContext 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 1444 of file aacdec.c.

Referenced by aac_decode_frame_int().

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

Referenced by decode_dynamic_range().

static int decode_dynamic_range ( DynamicRangeControl che_drc,
GetBitContext gb,
int  cnt 
) [static]

Decode dynamic range information; reference: table 4.52.

Parameters:
cnt length of TYPE_FIL syntactic element in bytes
Returns:
Returns number of bytes consumed.

Definition at line 1588 of file aacdec.c.

Referenced by decode_extension_payload().

static int decode_extension_payload ( AACContext ac,
GetBitContext gb,
int  cnt,
ChannelElement che,
enum RawDataBlockType  elem_type 
) [static]

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

Parameters:
cnt length of TYPE_FIL syntactic element in bytes
Returns:
Returns number of bytes consumed

Definition at line 1642 of file aacdec.c.

Referenced by aac_decode_frame_int().

static int decode_ga_specific_config ( AACContext ac,
AVCodecContext avctx,
GetBitContext gb,
MPEG4AudioConfig m4ac,
int  channel_config 
) [static]

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

Parameters:
ac pointer to AACContext, may be null
avctx pointer to AVCCodecContext, used for logging
Returns:
Returns error status. 0 - OK, !0 - error

Definition at line 395 of file aacdec.c.

Referenced by decode_audio_specific_config().

static int decode_ics ( AACContext ac,
SingleChannelElement sce,
GetBitContext gb,
int  common_window,
int  scale_flag 
) [static]

Decode an individual_channel_stream payload; reference: table 4.44.

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

Definition at line 1316 of file aacdec.c.

Referenced by aac_decode_frame_int(), decode_cce(), and decode_cpe().

static int decode_ics_info ( AACContext ac,
IndividualChannelStream ics,
GetBitContext gb,
int  common_window 
) [static]

Decode Individual Channel Stream info; reference: table 4.6.

Parameters:
common_window Channels have independent [0], or shared [1], Individual Channel Stream information.

Definition at line 667 of file aacdec.c.

Referenced by decode_cpe(), and decode_ics().

static void decode_ltp ( AACContext ac,
LongTermPrediction ltp,
GetBitContext gb,
uint8_t  max_sfb 
) [static]

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

Definition at line 651 of file aacdec.c.

Referenced by decode_cpe(), and decode_ics_info().

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

Decode Mid/Side data; reference: table 4.54.

Parameters:
ms_present Indicates 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 922 of file aacdec.c.

Referenced by decode_cpe().

static int decode_pce ( AVCodecContext avctx,
MPEG4AudioConfig m4ac,
enum ChannelPosition  new_che_pos[4][MAX_ELEM_ID],
GetBitContext gb 
) [static]

Decode program configuration element; reference: table 4.2.

Parameters:
new_che_pos New channel position configuration - we only do something if it differs from the current one.
Returns:
Returns error status. 0 - OK, !0 - error

Definition at line 288 of file aacdec.c.

Referenced by aac_decode_frame_int(), and decode_ga_specific_config().

static int decode_prediction ( AACContext ac,
IndividualChannelStream ics,
GetBitContext gb 
) [static]

Definition at line 631 of file aacdec.c.

Referenced by decode_ics_info().

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

Referenced by decode_ics().

static int decode_scalefactors ( AACContext ac,
float  sf[120],
GetBitContext gb,
unsigned int  global_gain,
IndividualChannelStream ics,
enum BandType  band_type[120],
int  band_type_run_end[120] 
) [static]

Decode scalefactors; reference: table 4.47.

Parameters:
global_gain first scalefactor value as scalefactors are differentially coded
band_type array of the used band type
band_type_run_end array of the last scalefactor band of a band type run
sf array of scalefactors or intensity stereo positions
Returns:
Returns error status. 0 - OK, !0 - error

Definition at line 790 of file aacdec.c.

Referenced by decode_ics().

static int decode_spectrum_and_dequant ( AACContext ac,
float  coef[1024],
GetBitContext gb,
const float  sf[120],
int  pulse_present,
const Pulse pulse,
const IndividualChannelStream ics,
enum BandType  band_type[120] 
) [static]

Decode spectral data; reference: table 4.50.

Dequantize and scale spectral data; reference: 4.6.3.3.

Parameters:
coef array of dequantized, scaled spectral data
sf array of scalefactors or intensity stereo positions
pulse_present set if pulses are present
pulse pointer to pulse data struct
band_type array of the used band type
Returns:
Returns error status. 0 - OK, !0 - error

Definition at line 1014 of file aacdec.c.

Referenced by decode_ics().

static int decode_tns ( AACContext ac,
TemporalNoiseShaping tns,
GetBitContext gb,
const IndividualChannelStream ics 
) [static]

Decode Temporal Noise Shaping data; reference: table 4.48.

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

Definition at line 880 of file aacdec.c.

Referenced by decode_ics().

static av_always_inline float flt16_even ( float  pf  )  [static]

Definition at line 1236 of file aacdec.c.

Referenced by predict().

static av_always_inline float flt16_round ( float  pf  )  [static]

Definition at line 1228 of file aacdec.c.

Referenced by predict().

static av_always_inline float flt16_trunc ( float  pf  )  [static]

Definition at line 1244 of file aacdec.c.

Referenced by predict().

static ChannelElement* get_che ( AACContext ac,
int  type,
int  elem_id 
) [static]

Definition at line 121 of file aacdec.c.

Referenced by aac_decode_frame_int().

static void imdct_and_windowing ( AACContext ac,
SingleChannelElement sce 
) [static]

Conduct IMDCT and windowing.

Definition at line 1839 of file aacdec.c.

Referenced by spectral_to_sample().

static int latm_decode_audio_specific_config ( struct LATMContext latmctx,
GetBitContext gb 
) [static]

Definition at line 2270 of file aacdec.c.

Referenced by read_stream_mux_config().

static int latm_decode_frame ( AVCodecContext avctx,
void *  out,
int *  out_size,
AVPacket avpkt 
) [static]

Definition at line 2442 of file aacdec.c.

static av_cold int latm_decode_init ( AVCodecContext avctx  )  [static]

Definition at line 2491 of file aacdec.c.

static uint32_t latm_get_value ( GetBitContext b  )  [inline, static]

Definition at line 2263 of file aacdec.c.

Referenced by read_stream_mux_config().

static av_always_inline int lcg_random ( int  previous_val  )  [static]

linear congruential pseudorandom number generator

Parameters:
previous_val pointer to the current state of the generator
Returns:
Returns a 32-bit pseudorandom integer

Definition at line 513 of file aacdec.c.

Referenced by decode_spectrum_and_dequant().

static av_cold int output_configure ( AACContext ac,
enum ChannelPosition  che_pos[4][MAX_ELEM_ID],
enum ChannelPosition  new_che_pos[4][MAX_ELEM_ID],
int  channel_config,
enum OCStatus  oc_type 
) [static]

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

Parameters:
che_pos current channel position configuration
new_che_pos New channel position configuration - we only do something if it differs from the current one.
Returns:
Returns error status. 0 - OK, !0 - error

Definition at line 213 of file aacdec.c.

Referenced by aac_decode_frame_int(), decode_extension_payload(), decode_ga_specific_config(), and parse_adts_frame_header().

static int parse_adts_frame_header ( AACContext ac,
GetBitContext gb 
) [static]

Definition at line 2035 of file aacdec.c.

Referenced by aac_decode_frame_int().

static av_always_inline void predict ( PredictorState ps,
float *  coef,
int  output_enable 
) [static]

Definition at line 1252 of file aacdec.c.

Referenced by apply_prediction(), and decode_line().

static int read_audio_mux_element ( struct LATMContext latmctx,
GetBitContext gb 
) [static]

Definition at line 2413 of file aacdec.c.

Referenced by latm_decode_frame().

static int read_payload_length_info ( struct LATMContext ctx,
GetBitContext gb 
) [static]

Definition at line 2392 of file aacdec.c.

Referenced by read_audio_mux_element().

static int read_stream_mux_config ( struct LATMContext latmctx,
GetBitContext gb 
) [static]

Definition at line 2310 of file aacdec.c.

Referenced by read_audio_mux_element().

static void reset_all_predictors ( PredictorState ps  )  [static]

Definition at line 528 of file aacdec.c.

Referenced by apply_prediction().

static av_always_inline void reset_predict_state ( PredictorState ps  )  [static]

Definition at line 518 of file aacdec.c.

Referenced by reset_all_predictors(), and reset_predictor_group().

static void reset_predictor_group ( PredictorState ps,
int  group_num 
) [static]

Definition at line 535 of file aacdec.c.

Referenced by apply_prediction().

static av_cold int set_default_channel_config ( AVCodecContext avctx,
enum ChannelPosition  new_che_pos[4][MAX_ELEM_ID],
int  channel_config 
) [static]

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

Parameters:
new_che_pos New channel position configuration - we only do something if it differs from the current one.
Returns:
Returns error status. 0 - OK, !0 - error

Definition at line 349 of file aacdec.c.

Referenced by decode_ga_specific_config(), and parse_adts_frame_header().

static int skip_data_stream_element ( AACContext ac,
GetBitContext gb 
) [static]

Skip data_stream_element; reference: table 4.10.

Definition at line 614 of file aacdec.c.

Referenced by aac_decode_frame_int().

static void spectral_to_sample ( AACContext ac  )  [static]

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

Definition at line 1992 of file aacdec.c.

Referenced by aac_decode_frame_int().

static void update_ltp ( AACContext ac,
SingleChannelElement sce 
) [static]

Update the LTP buffer for next frame.

Definition at line 1804 of file aacdec.c.

Referenced by spectral_to_sample().

static float* VMUL2 ( float *  dst,
const float *  v,
unsigned  idx,
const float *  scale 
) [inline, static]

Definition at line 935 of file aacdec.c.

Referenced by decode_spectrum_and_dequant().

static float* VMUL2S ( float *  dst,
const float *  v,
unsigned  idx,
unsigned  sign,
const float *  scale 
) [inline, static]

Definition at line 959 of file aacdec.c.

Referenced by decode_spectrum_and_dequant().

static float* VMUL4 ( float *  dst,
const float *  v,
unsigned  idx,
const float *  scale 
) [inline, static]

Definition at line 946 of file aacdec.c.

Referenced by decode_spectrum_and_dequant().

static float* VMUL4S ( float *  dst,
const float *  v,
unsigned  idx,
unsigned  sign,
const float *  scale 
) [inline, static]

Definition at line 976 of file aacdec.c.

Referenced by decode_spectrum_and_dequant().

static void windowing_and_mdct_ltp ( AACContext ac,
float *  out,
float *  in,
IndividualChannelStream ics 
) [static]

Apply windowing and MDCT to obtain the spectral coefficient from the predicted sample by LTP.

Definition at line 1746 of file aacdec.c.

Referenced by apply_ltp().


Variable Documentation

const float cce_scale[] [static]

Initial value:

 {
    1.09050773266525765921, 
    1.18920711500272106672, 
    M_SQRT2,
    2,
}

Definition at line 1483 of file aacdec.c.

Referenced by decode_cce().

Initial value:

 {
    "aac",
    AVMEDIA_TYPE_AUDIO,
    CODEC_ID_AAC,
    sizeof(AACContext),
    aac_decode_init,
    NULL,
    aac_decode_close,
    aac_decode_frame,
    .long_name = NULL_IF_CONFIG_SMALL("Advanced Audio Coding"),
    .sample_fmts = (const enum AVSampleFormat[]) {
        AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE
    },
    .channel_layouts = aac_channel_layout,
}

Definition at line 2508 of file aacdec.c.

Initial value:

 {
    .name = "aac_latm",
    .type = AVMEDIA_TYPE_AUDIO,
    .id   = CODEC_ID_AAC_LATM,
    .priv_data_size = sizeof(struct LATMContext),
    .init   = latm_decode_init,
    .close  = aac_decode_close,
    .decode = latm_decode_frame,
    .long_name = NULL_IF_CONFIG_SMALL("AAC LATM (Advanced Audio Codec LATM syntax)"),
    .sample_fmts = (const enum AVSampleFormat[]) {
        AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE
    },
    .channel_layouts = aac_channel_layout,
}

Definition at line 2529 of file aacdec.c.

const char overread_err[] = "Input buffer exhausted before END element found\n" [static]

Definition at line 116 of file aacdec.c.

VLC vlc_spectral[11] [static]

Definition at line 117 of file aacdec.c.


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