FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
aacsbr_fixed.c File Reference

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

#include "aac.h"
#include "sbr.h"
#include "aacsbr.h"
#include "aacsbrdata.h"
#include "aacsbr_fixed_tablegen.h"
#include "fft.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 (AACContext *ac, 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 VLC vlc_sbr [10]
 
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

#define USE_FIXED   1

Definition at line 57 of file aacsbr_fixed.c.

Function Documentation

static void aacsbr_func_ptr_init ( AACSBRContext c)
static
static int fixed_log ( int  x)
static

Definition at line 87 of file aacsbr_fixed.c.

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

static int fixed_exp ( int  x)
static

Definition at line 112 of file aacsbr_fixed.c.

Referenced by encode_block(), and make_bands().

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

Definition at line 127 of file aacsbr_fixed.c.

static void sbr_dequant ( SpectralBandReplication sbr,
int  id_aac 
)
static

Dequantization and stereo decoding (14496-3 sp04 p203)

Definition at line 154 of file aacsbr_fixed.c.

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 236 of file aacsbr_fixed.c.

static void sbr_chirp ( SpectralBandReplication sbr,
SBRData ch_data 
)
static

Chirp Factors (14496-3 sp04 p214)

Definition at line 370 of file aacsbr_fixed.c.

static void sbr_gain_calc ( AACContext ac,
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 400 of file aacsbr_fixed.c.

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 489 of file aacsbr_fixed.c.

Variable Documentation

VLC vlc_sbr[10]
static

Definition at line 75 of file aacsbr_fixed.c.

const int CONST_LN2 = Q31(0.6931471806/256)
static

Definition at line 77 of file aacsbr_fixed.c.

Referenced by make_bands().

const int CONST_RECIP_LN2 = Q31(0.7213475204)
static

Definition at line 78 of file aacsbr_fixed.c.

Referenced by sbr_make_f_derived(), and sbr_make_f_master().

const int CONST_076923 = Q31(0.76923076923076923077f)
static

Definition at line 79 of file aacsbr_fixed.c.

Referenced by sbr_make_f_master().

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)
}
#define Q31(x)
Definition: aac_defines.h:96

Definition at line 81 of file aacsbr_fixed.c.

Referenced by fixed_log().

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)
}
#define Q31(x)
Definition: aac_defines.h:96

Definition at line 106 of file aacsbr_fixed.c.

Referenced by fixed_exp().