FFmpeg
Macros | Functions | Variables
aacdec_usac.c File Reference
#include "aacdec_usac.h"
#include "aacdec_tab.h"
#include "aacdec_lpd.h"
#include "aacdec_ac.h"
#include "libavcodec/aacsbr.h"
#include "libavcodec/aactab.h"
#include "libavutil/mem.h"
#include "libavcodec/mpeg4audio.h"
#include "libavcodec/unary.h"

Go to the source code of this file.

Macros

#define SFB_PER_PRED_BAND   2
 

Functions

static uint32_t get_escaped_value (GetBitContext *gb, int nb1, int nb2, int nb3)
 
static int decode_loudness_info (AACDecContext *ac, AACUSACLoudnessInfo *info, GetBitContext *gb)
 
static int decode_loudness_set (AACDecContext *ac, AACUSACConfig *usac, GetBitContext *gb)
 
static int decode_usac_sbr_data (AACDecContext *ac, AACUsacElemConfig *e, GetBitContext *gb)
 
static void decode_usac_element_core (AACUsacElemConfig *e, GetBitContext *gb, int sbr_ratio)
 
static int decode_usac_element_pair (AACDecContext *ac, AACUsacElemConfig *e, GetBitContext *gb)
 
static int decode_usac_extension (AACDecContext *ac, AACUsacElemConfig *e, GetBitContext *gb)
 
int ff_aac_usac_reset_state (AACDecContext *ac, OutputConfiguration *oc)
 
int ff_aac_usac_config_decode (AACDecContext *ac, AVCodecContext *avctx, GetBitContext *gb, OutputConfiguration *oc, int channel_config)
 
static int decode_usac_scale_factors (AACDecContext *ac, SingleChannelElement *sce, GetBitContext *gb, uint8_t global_gain)
 
static int decode_spectrum_ac (AACDecContext *s, float coef[1024], GetBitContext *gb, AACArithState *state, int reset, uint16_t len, uint16_t N)
 Decode and dequantize arithmetically coded, uniformly quantized value. More...
 
static int decode_usac_stereo_cplx (AACDecContext *ac, AACUsacStereo *us, ChannelElement *cpe, GetBitContext *gb, int num_window_groups, int prev_num_window_groups, int indep_flag)
 
static int setup_sce (AACDecContext *ac, SingleChannelElement *sce, AACUSACConfig *usac)
 
static int decode_usac_stereo_info (AACDecContext *ac, AACUSACConfig *usac, AACUsacElemConfig *ec, ChannelElement *cpe, GetBitContext *gb, int indep_flag)
 
static float noise_random_sign (unsigned int *seed)
 
static void apply_noise_fill (AACDecContext *ac, SingleChannelElement *sce, AACUsacElemData *ue)
 
static void spectrum_scale (AACDecContext *ac, SingleChannelElement *sce, AACUsacElemData *ue)
 
static void complex_stereo_downmix_prev (AACDecContext *ac, ChannelElement *cpe, float *dmix_re)
 
static void complex_stereo_downmix_cur (AACDecContext *ac, ChannelElement *cpe, float *dmix_re)
 
static void complex_stereo_interpolate_imag (float *im, float *re, const float f[6], int len, int factor_even, int factor_odd)
 
static void apply_complex_stereo (AACDecContext *ac, ChannelElement *cpe)
 
static const floatcomplex_stereo_get_filter (ChannelElement *cpe, int is_prev)
 
static void spectrum_decode (AACDecContext *ac, AACUSACConfig *usac, ChannelElement *cpe, int nb_channels)
 
static int decode_usac_core_coder (AACDecContext *ac, AACUSACConfig *usac, AACUsacElemConfig *ec, ChannelElement *che, GetBitContext *gb, int indep_flag, int nb_channels)
 
static int parse_audio_preroll (AACDecContext *ac, GetBitContext *gb)
 
static int parse_ext_ele (AACDecContext *ac, AACUsacElemConfig *e, GetBitContext *gb)
 
int ff_aac_usac_decode_frame (AVCodecContext *avctx, AACDecContext *ac, GetBitContext *gb, int *got_frame_ptr)
 

Variables

static enum AVChannel usac_ch_pos_to_av [64]
 

Macro Definition Documentation

◆ SFB_PER_PRED_BAND

#define SFB_PER_PRED_BAND   2

Definition at line 34 of file aacdec_usac.c.

Function Documentation

◆ get_escaped_value()

static uint32_t get_escaped_value ( GetBitContext gb,
int  nb1,
int  nb2,
int  nb3 
)
inlinestatic

◆ decode_loudness_info()

static int decode_loudness_info ( AACDecContext ac,
AACUSACLoudnessInfo info,
GetBitContext gb 
)
static

Definition at line 85 of file aacdec_usac.c.

Referenced by decode_loudness_set().

◆ decode_loudness_set()

static int decode_loudness_set ( AACDecContext ac,
AACUSACConfig usac,
GetBitContext gb 
)
static

Definition at line 111 of file aacdec_usac.c.

Referenced by ff_aac_usac_config_decode().

◆ decode_usac_sbr_data()

static int decode_usac_sbr_data ( AACDecContext ac,
AACUsacElemConfig e,
GetBitContext gb 
)
static

Definition at line 150 of file aacdec_usac.c.

Referenced by decode_usac_element_pair(), and ff_aac_usac_config_decode().

◆ decode_usac_element_core()

static void decode_usac_element_core ( AACUsacElemConfig e,
GetBitContext gb,
int  sbr_ratio 
)
static

Definition at line 193 of file aacdec_usac.c.

Referenced by ff_aac_usac_config_decode().

◆ decode_usac_element_pair()

static int decode_usac_element_pair ( AACDecContext ac,
AACUsacElemConfig e,
GetBitContext gb 
)
static

Definition at line 202 of file aacdec_usac.c.

Referenced by ff_aac_usac_config_decode().

◆ decode_usac_extension()

static int decode_usac_extension ( AACDecContext ac,
AACUsacElemConfig e,
GetBitContext gb 
)
static

Definition at line 236 of file aacdec_usac.c.

Referenced by ff_aac_usac_config_decode().

◆ ff_aac_usac_reset_state()

int ff_aac_usac_reset_state ( AACDecContext ac,
OutputConfiguration oc 
)

Definition at line 274 of file aacdec_usac.c.

Referenced by ff_aac_usac_config_decode(), and flush().

◆ ff_aac_usac_config_decode()

int ff_aac_usac_config_decode ( AACDecContext ac,
AVCodecContext avctx,
GetBitContext gb,
OutputConfiguration oc,
int  channel_config 
)

Definition at line 333 of file aacdec_usac.c.

Referenced by decode_audio_specific_config_gb(), and parse_audio_preroll().

◆ decode_usac_scale_factors()

static int decode_usac_scale_factors ( AACDecContext ac,
SingleChannelElement sce,
GetBitContext gb,
uint8_t  global_gain 
)
static

Definition at line 556 of file aacdec_usac.c.

Referenced by decode_usac_core_coder().

◆ decode_spectrum_ac()

static int decode_spectrum_ac ( AACDecContext s,
float  coef[1024],
GetBitContext gb,
AACArithState state,
int  reset,
uint16_t  len,
uint16_t  N 
)
static

Decode and dequantize arithmetically coded, uniformly quantized value.

Parameters
coefarray of dequantized, scaled spectral data
sfarray of scalefactors or intensity stereo positions
Returns
Returns error status. 0 - OK, !0 - error

Definition at line 596 of file aacdec_usac.c.

Referenced by decode_usac_core_coder().

◆ decode_usac_stereo_cplx()

static int decode_usac_stereo_cplx ( AACDecContext ac,
AACUsacStereo us,
ChannelElement cpe,
GetBitContext gb,
int  num_window_groups,
int  prev_num_window_groups,
int  indep_flag 
)
static

Definition at line 691 of file aacdec_usac.c.

Referenced by decode_usac_stereo_info().

◆ setup_sce()

static int setup_sce ( AACDecContext ac,
SingleChannelElement sce,
AACUSACConfig usac 
)
static

Definition at line 782 of file aacdec_usac.c.

Referenced by decode_usac_core_coder(), and decode_usac_stereo_info().

◆ decode_usac_stereo_info()

static int decode_usac_stereo_info ( AACDecContext ac,
AACUSACConfig usac,
AACUsacElemConfig ec,
ChannelElement cpe,
GetBitContext gb,
int  indep_flag 
)
static

Definition at line 844 of file aacdec_usac.c.

Referenced by decode_usac_core_coder().

◆ noise_random_sign()

static float noise_random_sign ( unsigned int seed)
inlinestatic

Definition at line 984 of file aacdec_usac.c.

Referenced by apply_noise_fill().

◆ apply_noise_fill()

static void apply_noise_fill ( AACDecContext ac,
SingleChannelElement sce,
AACUsacElemData ue 
)
static

Definition at line 992 of file aacdec_usac.c.

Referenced by spectrum_scale().

◆ spectrum_scale()

static void spectrum_scale ( AACDecContext ac,
SingleChannelElement sce,
AACUsacElemData ue 
)
static

Definition at line 1033 of file aacdec_usac.c.

Referenced by spectrum_decode().

◆ complex_stereo_downmix_prev()

static void complex_stereo_downmix_prev ( AACDecContext ac,
ChannelElement cpe,
float dmix_re 
)
static

Definition at line 1063 of file aacdec_usac.c.

Referenced by spectrum_decode().

◆ complex_stereo_downmix_cur()

static void complex_stereo_downmix_cur ( AACDecContext ac,
ChannelElement cpe,
float dmix_re 
)
static

Definition at line 1094 of file aacdec_usac.c.

Referenced by spectrum_decode().

◆ complex_stereo_interpolate_imag()

static void complex_stereo_interpolate_imag ( float im,
float re,
const float  f[6],
int  len,
int  factor_even,
int  factor_odd 
)
static

Definition at line 1134 of file aacdec_usac.c.

Referenced by spectrum_decode().

◆ apply_complex_stereo()

static void apply_complex_stereo ( AACDecContext ac,
ChannelElement cpe 
)
static

Definition at line 1188 of file aacdec_usac.c.

Referenced by spectrum_decode().

◆ complex_stereo_get_filter()

static const float* complex_stereo_get_filter ( ChannelElement cpe,
int  is_prev 
)
static

Definition at line 1240 of file aacdec_usac.c.

Referenced by spectrum_decode().

◆ spectrum_decode()

static void spectrum_decode ( AACDecContext ac,
AACUSACConfig usac,
ChannelElement cpe,
int  nb_channels 
)
static

Definition at line 1280 of file aacdec_usac.c.

Referenced by decode_usac_core_coder().

◆ decode_usac_core_coder()

static int decode_usac_core_coder ( AACDecContext ac,
AACUSACConfig usac,
AACUsacElemConfig ec,
ChannelElement che,
GetBitContext gb,
int  indep_flag,
int  nb_channels 
)
static

Definition at line 1344 of file aacdec_usac.c.

Referenced by ff_aac_usac_decode_frame().

◆ parse_audio_preroll()

static int parse_audio_preroll ( AACDecContext ac,
GetBitContext gb 
)
static

Definition at line 1499 of file aacdec_usac.c.

Referenced by parse_ext_ele().

◆ parse_ext_ele()

static int parse_ext_ele ( AACDecContext ac,
AACUsacElemConfig e,
GetBitContext gb 
)
static

Definition at line 1573 of file aacdec_usac.c.

Referenced by ff_aac_usac_decode_frame().

◆ ff_aac_usac_decode_frame()

int ff_aac_usac_decode_frame ( AVCodecContext avctx,
AACDecContext ac,
GetBitContext gb,
int got_frame_ptr 
)

Definition at line 1654 of file aacdec_usac.c.

Referenced by aac_decode_frame_int(), and parse_audio_preroll().

Variable Documentation

◆ usac_ch_pos_to_av

enum AVChannel usac_ch_pos_to_av[64]
static

Definition at line 50 of file aacdec_usac.c.

Referenced by ff_aac_usac_config_decode().