FFmpeg
Classes | Macros | Typedefs | Variables
aacpsy.c File Reference

AAC encoder psychoacoustic model. More...

#include "libavutil/attributes.h"
#include "libavutil/ffmath.h"
#include "avcodec.h"
#include "aactab.h"
#include "psymodel.h"

Classes

struct  AacPsyBand
 information for single band used by 3GPP TS26.403-inspired psychoacoustic model More...
 
struct  AacPsyChannel
 single/pair channel context for psychoacoustic model More...
 
struct  AacPsyCoeffs
 psychoacoustic model frame type-dependent coefficients More...
 
struct  AacPsyContext
 3GPP TS26.403-inspired psychoacoustic model specific data More...
 
struct  PsyLamePreset
 LAME psy model preset struct. More...
 

Macros

#define ATH_ADD   4
 

Typedefs

typedef struct AacPsyBand AacPsyBand
 information for single band used by 3GPP TS26.403-inspired psychoacoustic model
 
typedef struct AacPsyChannel AacPsyChannel
 single/pair channel context for psychoacoustic model
 
typedef struct AacPsyCoeffs AacPsyCoeffs
 psychoacoustic model frame type-dependent coefficients
 
typedef struct AacPsyContext AacPsyContext
 3GPP TS26.403-inspired psychoacoustic model specific data
 
typedef struct PsyLamePreset PsyLamePreset
 LAME psy model preset struct.
 

Variables

const FFPsyModel ff_aac_psy_model
 
#define PSY_3GPP_THR_SPREAD_HI   1.5f
 constants for 3GPP AAC psychoacoustic model
 
#define PSY_3GPP_THR_SPREAD_LOW   3.0f
 
#define PSY_3GPP_EN_SPREAD_HI_L1   2.0f
 
#define PSY_3GPP_EN_SPREAD_HI_L2   1.5f
 
#define PSY_3GPP_EN_SPREAD_HI_S   1.5f
 
#define PSY_3GPP_EN_SPREAD_LOW_L   3.0f
 
#define PSY_3GPP_EN_SPREAD_LOW_S   2.0f
 
#define PSY_3GPP_RPEMIN   0.01f
 
#define PSY_3GPP_RPELEV   2.0f
 
#define PSY_3GPP_C1   3.0f /* log2(8) */
 
#define PSY_3GPP_C2   1.3219281f /* log2(2.5) */
 
#define PSY_3GPP_C3   0.55935729f /* 1 - C2 / C1 */
 
#define PSY_SNR_1DB   7.9432821e-1f /* -1dB */
 
#define PSY_SNR_25DB   3.1622776e-3f /* -25dB */
 
#define PSY_3GPP_SAVE_SLOPE_L   -0.46666667f
 
#define PSY_3GPP_SAVE_SLOPE_S   -0.36363637f
 
#define PSY_3GPP_SAVE_ADD_L   -0.84285712f
 
#define PSY_3GPP_SAVE_ADD_S   -0.75f
 
#define PSY_3GPP_SPEND_SLOPE_L   0.66666669f
 
#define PSY_3GPP_SPEND_SLOPE_S   0.81818181f
 
#define PSY_3GPP_SPEND_ADD_L   -0.35f
 
#define PSY_3GPP_SPEND_ADD_S   -0.26111111f
 
#define PSY_3GPP_CLIP_LO_L   0.2f
 
#define PSY_3GPP_CLIP_LO_S   0.2f
 
#define PSY_3GPP_CLIP_HI_L   0.95f
 
#define PSY_3GPP_CLIP_HI_S   0.75f
 
#define PSY_3GPP_AH_THR_LONG   0.5f
 
#define PSY_3GPP_AH_THR_SHORT   0.63f
 
#define PSY_PE_FORGET_SLOPE   511
 
#define PSY_3GPP_BITS_TO_PE(bits)   ((bits) * 1.18f)
 
#define PSY_3GPP_PE_TO_BITS(bits)   ((bits) / 1.18f)
 
#define PSY_LAME_FIR_LEN   21
 LAME psy model FIR order.
 
#define AAC_BLOCK_SIZE_LONG   1024
 long block size
 
#define AAC_BLOCK_SIZE_SHORT   128
 short block size
 
#define AAC_NUM_BLOCKS_SHORT   8
 number of blocks in a short sequence
 
#define PSY_LAME_NUM_SUBBLOCKS   3
 Number of sub-blocks in each short block.
 
enum  { PSY_3GPP_AH_NONE, PSY_3GPP_AH_INACTIVE, PSY_3GPP_AH_ACTIVE }
 

Detailed Description

AAC encoder psychoacoustic model.

Variable Documentation

§ ff_aac_psy_model

const FFPsyModel ff_aac_psy_model
Initial value:
=
{
.name = "3GPP TS 26.403-inspired model",
.init = psy_3gpp_init,
.window = psy_lame_window,
.analyze = psy_3gpp_analyze,
.end = psy_3gpp_end,
}