FFmpeg
Macros | Functions | Variables
aacps.c File Reference
#include <stdint.h>
#include "libavutil/common.h"
#include "libavutil/mathematics.h"
#include "libavutil/mem_internal.h"
#include "avcodec.h"
#include "aacps.h"
#include "libavutil/internal.h"
#include "aacps_tablegen.h"

Go to the source code of this file.

Macros

#define DECAY_SLOPE   Q30(0.05f)
 All-pass filter decay slope. More...
 

Functions

static void ipdopd_reset (int8_t *ipd_hist, int8_t *opd_hist)
 
static void hybrid2_re (INTFLOAT(*in)[2], INTFLOAT(*out)[32][2], const INTFLOAT filter[7], int len, int reverse)
 Split one subband into 2 subsubbands with a symmetric real filter. More...
 
static void hybrid6_cx (PSDSPContext *dsp, INTFLOAT(*in)[2], INTFLOAT(*out)[32][2], TABLE_CONST INTFLOAT(*filter)[8][2], int len)
 Split one subband into 6 subsubbands with a complex filter. More...
 
static void hybrid4_8_12_cx (PSDSPContext *dsp, INTFLOAT(*in)[2], INTFLOAT(*out)[32][2], TABLE_CONST INTFLOAT(*filter)[8][2], int N, int len)
 
static void hybrid_analysis (PSDSPContext *dsp, INTFLOAT out[91][32][2], INTFLOAT in[5][44][2], INTFLOAT L[2][38][64], int is34, int len)
 
static void hybrid_synthesis (PSDSPContext *dsp, INTFLOAT out[2][38][64], INTFLOAT in[91][32][2], int is34, int len)
 
static void map_idx_10_to_20 (int8_t *par_mapped, const int8_t *par, int full)
 Table 8.46. More...
 
static void map_idx_34_to_20 (int8_t *par_mapped, const int8_t *par, int full)
 
static void map_val_34_to_20 (INTFLOAT par[PS_MAX_NR_IIDICC])
 
static void map_idx_10_to_34 (int8_t *par_mapped, const int8_t *par, int full)
 
static void map_idx_20_to_34 (int8_t *par_mapped, const int8_t *par, int full)
 
static void map_val_20_to_34 (INTFLOAT par[PS_MAX_NR_IIDICC])
 
static void decorrelation (PSContext *ps, INTFLOAT(*out)[32][2], const INTFLOAT(*s)[32][2], int is34)
 
static void remap34 (int8_t(**p_par_mapped)[PS_MAX_NR_IIDICC], int8_t(*par)[PS_MAX_NR_IIDICC], int num_par, int num_env, int full)
 
static void remap20 (int8_t(**p_par_mapped)[PS_MAX_NR_IIDICC], int8_t(*par)[PS_MAX_NR_IIDICC], int num_par, int num_env, int full)
 
static void stereo_processing (PSContext *ps, INTFLOAT(*l)[32][2], INTFLOAT(*r)[32][2], int is34)
 
int AAC_RENAME() ff_ps_apply (AVCodecContext *avctx, PSContext *ps, INTFLOAT L[2][38][64], INTFLOAT R[2][38][64], int top)
 
av_cold void AAC_RENAME() ff_ps_init (void)
 
av_cold void AAC_RENAME() ff_ps_ctx_init (PSContext *ps)
 

Variables

static const INTFLOAT g1_Q2 []
 
static const int NR_PAR_BANDS [] = { 20, 34 }
 Number of frequency bands that can be addressed by the parameter index, b(k) More...
 
static const int NR_IPDOPD_BANDS [] = { 11, 17 }
 
static const int NR_BANDS [] = { 71, 91 }
 Number of frequency bands that can be addressed by the sub subband index, k. More...
 
static const int DECAY_CUTOFF [] = { 10, 32 }
 Start frequency band for the all-pass filter decay slope. More...
 
static const int NR_ALLPASS_BANDS [] = { 30, 50 }
 Number of all-pass filer bands. More...
 
static const int SHORT_DELAY_BAND [] = { 42, 62 }
 First stereo band using the short one sample delay. More...
 

Macro Definition Documentation

◆ DECAY_SLOPE

#define DECAY_SLOPE   Q30(0.05f)

All-pass filter decay slope.

Definition at line 188 of file aacps.c.

Function Documentation

◆ ipdopd_reset()

static void ipdopd_reset ( int8_t *  ipd_hist,
int8_t *  opd_hist 
)
static

Definition at line 43 of file aacps.c.

Referenced by stereo_processing().

◆ hybrid2_re()

static void hybrid2_re ( INTFLOAT(*)  in[2],
INTFLOAT(*)  out[32][2],
const INTFLOAT  filter[7],
int  len,
int  reverse 
)
static

Split one subband into 2 subsubbands with a symmetric real filter.

The filter must have its non-center even coefficients equal to zero.

Definition at line 54 of file aacps.c.

Referenced by hybrid_analysis().

◆ hybrid6_cx()

static void hybrid6_cx ( PSDSPContext dsp,
INTFLOAT(*)  in[2],
INTFLOAT(*)  out[32][2],
TABLE_CONST INTFLOAT(*)  filter[8][2],
int  len 
)
static

Split one subband into 6 subsubbands with a complex filter.

Definition at line 81 of file aacps.c.

Referenced by hybrid_analysis().

◆ hybrid4_8_12_cx()

static void hybrid4_8_12_cx ( PSDSPContext dsp,
INTFLOAT(*)  in[2],
INTFLOAT(*)  out[32][2],
TABLE_CONST INTFLOAT(*)  filter[8][2],
int  N,
int  len 
)
static

Definition at line 105 of file aacps.c.

Referenced by hybrid_analysis().

◆ hybrid_analysis()

static void hybrid_analysis ( PSDSPContext dsp,
INTFLOAT  out[91][32][2],
INTFLOAT  in[5][44][2],
INTFLOAT  L[2][38][64],
int  is34,
int  len 
)
static

Definition at line 116 of file aacps.c.

Referenced by ff_ps_apply().

◆ hybrid_synthesis()

static void hybrid_synthesis ( PSDSPContext dsp,
INTFLOAT  out[2][38][64],
INTFLOAT  in[91][32][2],
int  is34,
int  len 
)
static

Definition at line 146 of file aacps.c.

Referenced by ff_ps_apply().

◆ map_idx_10_to_20()

static void map_idx_10_to_20 ( int8_t *  par_mapped,
const int8_t *  par,
int  full 
)
static

Table 8.46.

Definition at line 202 of file aacps.c.

Referenced by remap20().

◆ map_idx_34_to_20()

static void map_idx_34_to_20 ( int8_t *  par_mapped,
const int8_t *  par,
int  full 
)
static

Definition at line 216 of file aacps.c.

Referenced by remap20().

◆ map_val_34_to_20()

static void map_val_34_to_20 ( INTFLOAT  par[PS_MAX_NR_IIDICC])
static

Definition at line 242 of file aacps.c.

Referenced by stereo_processing().

◆ map_idx_10_to_34()

static void map_idx_10_to_34 ( int8_t *  par_mapped,
const int8_t *  par,
int  full 
)
static

Definition at line 281 of file aacps.c.

Referenced by remap34().

◆ map_idx_20_to_34()

static void map_idx_20_to_34 ( int8_t *  par_mapped,
const int8_t *  par,
int  full 
)
static

Definition at line 323 of file aacps.c.

Referenced by remap34().

◆ map_val_20_to_34()

static void map_val_20_to_34 ( INTFLOAT  par[PS_MAX_NR_IIDICC])
static

Definition at line 363 of file aacps.c.

Referenced by stereo_processing().

◆ decorrelation()

static void decorrelation ( PSContext ps,
INTFLOAT(*)  out[32][2],
const INTFLOAT(*)  s[32][2],
int  is34 
)
static

< Smoothing coefficient

Definition at line 400 of file aacps.c.

Referenced by ff_ps_apply().

◆ remap34()

static void remap34 ( int8_t(**)  p_par_mapped[PS_MAX_NR_IIDICC],
int8_t(*)  par[PS_MAX_NR_IIDICC],
int  num_par,
int  num_env,
int  full 
)
static

Definition at line 520 of file aacps.c.

Referenced by stereo_processing().

◆ remap20()

static void remap20 ( int8_t(**)  p_par_mapped[PS_MAX_NR_IIDICC],
int8_t(*)  par[PS_MAX_NR_IIDICC],
int  num_par,
int  num_env,
int  full 
)
static

Definition at line 539 of file aacps.c.

Referenced by stereo_processing().

◆ stereo_processing()

static void stereo_processing ( PSContext ps,
INTFLOAT(*)  l[32][2],
INTFLOAT(*)  r[32][2],
int  is34 
)
static

Definition at line 558 of file aacps.c.

Referenced by ff_ps_apply().

◆ ff_ps_apply()

int AAC_RENAME() ff_ps_apply ( AVCodecContext avctx,
PSContext ps,
INTFLOAT  L[2][38][64],
INTFLOAT  R[2][38][64],
int  top 
)

Definition at line 720 of file aacps.c.

Referenced by ff_sbr_apply().

◆ ff_ps_init()

av_cold void AAC_RENAME() ff_ps_init ( void  )

Definition at line 741 of file aacps.c.

Referenced by ff_aac_sbr_init().

◆ ff_ps_ctx_init()

av_cold void AAC_RENAME() ff_ps_ctx_init ( PSContext ps)

Definition at line 746 of file aacps.c.

Referenced by ff_aac_sbr_ctx_init().

Variable Documentation

◆ g1_Q2

const INTFLOAT g1_Q2[]
static
Initial value:
= {
Q31(0.0f), Q31(0.01899487526049f), Q31(0.0f), Q31(-0.07293139167538f),
Q31(0.0f), Q31(0.30596630545168f), Q31(0.5f)
}

Definition at line 38 of file aacps.c.

Referenced by hybrid_analysis().

◆ NR_PAR_BANDS

const int NR_PAR_BANDS[] = { 20, 34 }
static

Number of frequency bands that can be addressed by the parameter index, b(k)

Definition at line 190 of file aacps.c.

Referenced by decorrelation(), and stereo_processing().

◆ NR_IPDOPD_BANDS

const int NR_IPDOPD_BANDS[] = { 11, 17 }
static

Definition at line 191 of file aacps.c.

Referenced by stereo_processing().

◆ NR_BANDS

const int NR_BANDS[] = { 71, 91 }
static

Number of frequency bands that can be addressed by the sub subband index, k.

Definition at line 193 of file aacps.c.

Referenced by decorrelation(), ff_ps_apply(), and stereo_processing().

◆ DECAY_CUTOFF

const int DECAY_CUTOFF[] = { 10, 32 }
static

Start frequency band for the all-pass filter decay slope.

Definition at line 195 of file aacps.c.

Referenced by decorrelation().

◆ NR_ALLPASS_BANDS

const int NR_ALLPASS_BANDS[] = { 30, 50 }
static

Number of all-pass filer bands.

Definition at line 197 of file aacps.c.

Referenced by decorrelation(), and ff_ps_apply().

◆ SHORT_DELAY_BAND

const int SHORT_DELAY_BAND[] = { 42, 62 }
static

First stereo band using the short one sample delay.

Definition at line 199 of file aacps.c.

Referenced by decorrelation().

f
f
Definition: af_crystalizer.c:122
Q31
#define Q31(x)
Definition: aac_defines.h:92