FFmpeg
Macros | Functions
aacenc_tns.c File Reference

AAC encoder temporal noise shaping. More...

#include "libavutil/libm.h"
#include "aacenc.h"
#include "aacenc_tns.h"
#include "aactab.h"
#include "aacenc_utils.h"
#include "aacenc_quantization.h"

Go to the source code of this file.

Macros

#define TNS_Q_BITS   4
 
#define TNS_Q_BITS_IS8   4
 
#define TNS_ENABLE_COEF_COMPRESSION
 
#define TNS_GAIN_THRESHOLD_LOW   1.4f
 
#define TNS_GAIN_THRESHOLD_HIGH   1.16f*TNS_GAIN_THRESHOLD_LOW
 

Functions

static int compress_coeffs (int *coef, int order, int c_bits)
 
void ff_aac_encode_tns_info (AACEncContext *s, SingleChannelElement *sce)
 Encode TNS data. More...
 
void ff_aac_apply_tns (AACEncContext *s, SingleChannelElement *sce)
 
static void quantize_coefs (double *coef, int *idx, float *lpc, int order, int c_bits)
 
void ff_aac_search_for_tns (AACEncContext *s, SingleChannelElement *sce)
 

Detailed Description

AAC encoder temporal noise shaping.

Author
Rostislav Pehlivanov ( atomnuker gmail com )

Definition in file aacenc_tns.c.

Macro Definition Documentation

#define TNS_Q_BITS   4

Definition at line 36 of file aacenc_tns.c.

Referenced by ff_aac_encode_tns_info(), and ff_aac_search_for_tns().

#define TNS_Q_BITS_IS8   4

Definition at line 39 of file aacenc_tns.c.

Referenced by ff_aac_encode_tns_info(), and ff_aac_search_for_tns().

#define TNS_ENABLE_COEF_COMPRESSION

Definition at line 42 of file aacenc_tns.c.

#define TNS_GAIN_THRESHOLD_LOW   1.4f

Definition at line 45 of file aacenc_tns.c.

#define TNS_GAIN_THRESHOLD_HIGH   1.16f*TNS_GAIN_THRESHOLD_LOW

Definition at line 46 of file aacenc_tns.c.

Referenced by ff_aac_search_for_tns().

Function Documentation

static int compress_coeffs ( int coef,
int  order,
int  c_bits 
)
inlinestatic

Definition at line 48 of file aacenc_tns.c.

Referenced by ff_aac_encode_tns_info().

void ff_aac_encode_tns_info ( AACEncContext s,
SingleChannelElement sce 
)

Encode TNS data.

Coefficient compression is simply not lossless as it should be on any decoder tested and as such is not active.

Definition at line 70 of file aacenc_tns.c.

void ff_aac_apply_tns ( AACEncContext s,
SingleChannelElement sce 
)

Definition at line 102 of file aacenc_tns.c.

static void quantize_coefs ( double *  coef,
int idx,
float *  lpc,
int  order,
int  c_bits 
)
inlinestatic

Definition at line 147 of file aacenc_tns.c.

Referenced by ff_aac_search_for_tns().

void ff_aac_search_for_tns ( AACEncContext s,
SingleChannelElement sce 
)

Definition at line 161 of file aacenc_tns.c.