libavcodec/aacpsy.c File Reference

AAC encoder psychoacoustic model. More...

#include "avcodec.h"
#include "aactab.h"
#include "psymodel.h"

Go to the source code of this file.

Data Structures

struct  Psy3gppBand
 information for single band used by 3GPP TS26.403-inspired psychoacoustic model More...
struct  Psy3gppChannel
 single/pair channel context for psychoacoustic model More...
struct  Psy3gppCoeffs
 psychoacoustic model frame type-dependent coefficients More...
struct  Psy3gppContext
 3GPP TS26.403-inspired psychoacoustic model specific data More...

Defines

#define ATH_ADD   4
#define PSY_3GPP_SPREAD_LOW   1.5f
 constants for 3GPP AAC psychoacoustic model
#define PSY_3GPP_SPREAD_HI   3.0f
#define PSY_3GPP_RPEMIN   0.01f
#define PSY_3GPP_RPELEV   2.0f

Functions

static av_cold float calc_bark (float f)
 Calculate Bark value for given line.
static av_cold float ath (float f, float add)
 Calculate ATH value for given frequency.
static av_cold int psy_3gpp_init (FFPsyContext *ctx)
static float iir_filter (int in, float state[2])
 IIR filter used in block switching decision.
static FFPsyWindowInfo psy_3gpp_window (FFPsyContext *ctx, const int16_t *audio, const int16_t *la, int channel, int prev_type)
 Tell encoder which window types to use.
static void psy_3gpp_analyze (FFPsyContext *ctx, int channel, const float *coefs, FFPsyWindowInfo *wi)
 Calculate band thresholds as suggested in 3GPP TS26.403.
static av_cold void psy_3gpp_end (FFPsyContext *apc)

Variables

static const uint8_t window_grouping [9]
 window grouping information stored as bits (0 - new group, 1 - group continues)
const FFPsyModel ff_aac_psy_model


Detailed Description

AAC encoder psychoacoustic model.

Definition in file aacpsy.c.


Define Documentation

#define ATH_ADD   4

Definition at line 101 of file aacpsy.c.

Referenced by psy_3gpp_init().

#define PSY_3GPP_RPELEV   2.0f

Definition at line 46 of file aacpsy.c.

Referenced by psy_3gpp_analyze().

#define PSY_3GPP_RPEMIN   0.01f

Definition at line 45 of file aacpsy.c.

Referenced by psy_3gpp_analyze().

#define PSY_3GPP_SPREAD_HI   3.0f

Definition at line 43 of file aacpsy.c.

Referenced by psy_3gpp_init().

#define PSY_3GPP_SPREAD_LOW   1.5f

constants for 3GPP AAC psychoacoustic model

Definition at line 42 of file aacpsy.c.

Referenced by psy_3gpp_init().


Function Documentation

static av_cold float ath ( float  f,
float  add 
) [static]

Calculate ATH value for given frequency.

Borrowed from Lame.

Definition at line 106 of file aacpsy.c.

Referenced by psy_3gpp_init().

static av_cold float calc_bark ( float  f  )  [static]

Calculate Bark value for given line.

Definition at line 96 of file aacpsy.c.

Referenced by psy_3gpp_init().

static float iir_filter ( int  in,
float  state[2] 
) [static]

IIR filter used in block switching decision.

Definition at line 157 of file aacpsy.c.

Referenced by psy_3gpp_window().

static void psy_3gpp_analyze ( FFPsyContext ctx,
int  channel,
const float *  coefs,
FFPsyWindowInfo wi 
) [static]

Calculate band thresholds as suggested in 3GPP TS26.403.

Definition at line 257 of file aacpsy.c.

static av_cold void psy_3gpp_end ( FFPsyContext apc  )  [static]

Definition at line 303 of file aacpsy.c.

static av_cold int psy_3gpp_init ( FFPsyContext ctx  )  [static]

Definition at line 115 of file aacpsy.c.

static FFPsyWindowInfo psy_3gpp_window ( FFPsyContext ctx,
const int16_t *  audio,
const int16_t *  la,
int  channel,
int  prev_type 
) [static]

Tell encoder which window types to use.

See also:
3GPP TS26.403 5.4.1 "Blockswitching"

Definition at line 178 of file aacpsy.c.


Variable Documentation

Initial value:

{
    .name    = "3GPP TS 26.403-inspired model",
    .init    = psy_3gpp_init,
    .window  = psy_3gpp_window,
    .analyze = psy_3gpp_analyze,
    .end     = psy_3gpp_end,
}

Definition at line 311 of file aacpsy.c.

const uint8_t window_grouping[9] [static]

Initial value:

 {
    0xB6, 0x6C, 0xD8, 0xB2, 0x66, 0xC6, 0x96, 0x36, 0x36
}
window grouping information stored as bits (0 - new group, 1 - group continues)

Definition at line 170 of file aacpsy.c.

Referenced by psy_3gpp_window().


Generated on Fri Oct 26 02:36:50 2012 for FFmpeg by  doxygen 1.5.8