FFmpeg
Macros | Functions | Variables
aacsbr_fixed.c File Reference
#include "aac.h"
#include "sbr.h"
#include "aacsbr.h"
#include "aacsbrdata.h"
#include "aacps.h"
#include "sbrdsp.h"
#include "libavutil/internal.h"
#include "libavutil/libm.h"
#include "libavutil/avassert.h"
#include <stdint.h>
#include <float.h>
#include <math.h>
#include "aacsbr_template.c"

Go to the source code of this file.

Macros

#define USE_FIXED   1
 

Functions

static void aacsbr_func_ptr_init (AACSBRContext *c)
 
static int fixed_log (int x)
 
static int fixed_exp (int x)
 
static void make_bands (int16_t *bands, int start, int stop, int num_bands)
 
static void sbr_dequant (SpectralBandReplication *sbr, int id_aac)
 Dequantization and stereo decoding (14496-3 sp04 p203) More...
 
static void sbr_hf_inverse_filter (SBRDSPContext *dsp, int(*alpha0)[2], int(*alpha1)[2], const int X_low[32][40][2], int k0)
 High Frequency Generation (14496-3 sp04 p214+) and Inverse Filtering (14496-3 sp04 p214) Warning: This routine does not seem numerically stable. More...
 
static void sbr_chirp (SpectralBandReplication *sbr, SBRData *ch_data)
 Chirp Factors (14496-3 sp04 p214) More...
 
static void sbr_gain_calc (SpectralBandReplication *sbr, SBRData *ch_data, const int e_a[2])
 Calculation of levels of additional HF signal components (14496-3 sp04 p219) and Calculation of gain (14496-3 sp04 p219) More...
 
static void sbr_hf_assemble (int Y1[38][64][2], const int X_high[64][40][2], SpectralBandReplication *sbr, SBRData *ch_data, const int e_a[2])
 Assembling HF Signals (14496-3 sp04 p220) More...
 

Variables

static const int CONST_LN2 = Q31(0.6931471806/256)
 
static const int CONST_RECIP_LN2 = Q31(0.7213475204)
 
static const int CONST_076923 = Q31(0.76923076923076923077f)
 
static const int fixed_log_table [10]
 
static const int fixed_exp_table [7]
 

Detailed Description

AAC Spectral Band Replication decoding functions (fixed-point) Note: Rounding-to-nearest used unless otherwise stated

Author
Robert Swain ( rob opendot cl )
Stanislav Ocovaj ( stanislav.ocovaj imgtec com )

Definition in file aacsbr_fixed.c.

Macro Definition Documentation

◆ USE_FIXED

#define USE_FIXED   1

Definition at line 57 of file aacsbr_fixed.c.

Function Documentation

◆ aacsbr_func_ptr_init()

static void aacsbr_func_ptr_init ( AACSBRContext c)
static

◆ fixed_log()

static int fixed_log ( int  x)
static

Definition at line 84 of file aacsbr_fixed.c.

Referenced by make_bands(), sbr_make_f_derived(), and sbr_make_f_master().

◆ fixed_exp()

static int fixed_exp ( int  x)
static

Definition at line 109 of file aacsbr_fixed.c.

Referenced by encode_block(), and make_bands().

◆ make_bands()

static void make_bands ( int16_t *  bands,
int  start,
int  stop,
int  num_bands 
)
static

Definition at line 124 of file aacsbr_fixed.c.

◆ sbr_dequant()

static void sbr_dequant ( SpectralBandReplication sbr,
int  id_aac 
)
static

Dequantization and stereo decoding (14496-3 sp04 p203)

Definition at line 151 of file aacsbr_fixed.c.

◆ sbr_hf_inverse_filter()

static void sbr_hf_inverse_filter ( SBRDSPContext dsp,
int(*)  alpha0[2],
int(*)  alpha1[2],
const int  X_low[32][40][2],
int  k0 
)
static

High Frequency Generation (14496-3 sp04 p214+) and Inverse Filtering (14496-3 sp04 p214) Warning: This routine does not seem numerically stable.

Definition at line 233 of file aacsbr_fixed.c.

◆ sbr_chirp()

static void sbr_chirp ( SpectralBandReplication sbr,
SBRData ch_data 
)
static

Chirp Factors (14496-3 sp04 p214)

Definition at line 367 of file aacsbr_fixed.c.

◆ sbr_gain_calc()

static void sbr_gain_calc ( SpectralBandReplication sbr,
SBRData ch_data,
const int  e_a[2] 
)
static

Calculation of levels of additional HF signal components (14496-3 sp04 p219) and Calculation of gain (14496-3 sp04 p219)

Definition at line 397 of file aacsbr_fixed.c.

◆ sbr_hf_assemble()

static void sbr_hf_assemble ( int  Y1[38][64][2],
const int  X_high[64][40][2],
SpectralBandReplication sbr,
SBRData ch_data,
const int  e_a[2] 
)
static

Assembling HF Signals (14496-3 sp04 p220)

Definition at line 486 of file aacsbr_fixed.c.

Variable Documentation

◆ CONST_LN2

const int CONST_LN2 = Q31(0.6931471806/256)
static

Definition at line 74 of file aacsbr_fixed.c.

Referenced by make_bands().

◆ CONST_RECIP_LN2

const int CONST_RECIP_LN2 = Q31(0.7213475204)
static

Definition at line 75 of file aacsbr_fixed.c.

Referenced by sbr_make_f_derived(), and sbr_make_f_master().

◆ CONST_076923

const int CONST_076923 = Q31(0.76923076923076923077f)
static

Definition at line 76 of file aacsbr_fixed.c.

Referenced by sbr_make_f_master().

◆ fixed_log_table

const int fixed_log_table[10]
static
Initial value:
=
{
Q31(1.0/2), Q31(1.0/3), Q31(1.0/4), Q31(1.0/5), Q31(1.0/6),
Q31(1.0/7), Q31(1.0/8), Q31(1.0/9), Q31(1.0/10), Q31(1.0/11)
}

Definition at line 78 of file aacsbr_fixed.c.

Referenced by fixed_log().

◆ fixed_exp_table

const int fixed_exp_table[7]
static
Initial value:
=
{
Q31(1.0/2), Q31(1.0/6), Q31(1.0/24), Q31(1.0/120),
Q31(1.0/720), Q31(1.0/5040), Q31(1.0/40320)
}

Definition at line 103 of file aacsbr_fixed.c.

Referenced by fixed_exp().

Q31
#define Q31(x)
Definition: aac_defines.h:111