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

AAC coefficients encoder. More...

#include "libavutil/libm.h"
#include <float.h>
#include "libavutil/mathematics.h"
#include "mathops.h"
#include "avcodec.h"
#include "put_bits.h"
#include "aac.h"
#include "aacenc.h"
#include "aactab.h"
#include "aacenctab.h"
#include "aacenc_utils.h"
#include "aacenc_quantization.h"
#include "aacenc_is.h"
#include "aacenc_tns.h"
#include "aacenc_ltp.h"
#include "aacenc_pred.h"
#include "libavcodec/aaccoder_twoloop.h"
#include "libavcodec/aaccoder_trellis.h"

Go to the source code of this file.

Data Structures

struct  BandCodingPath
 structure used in optimal codebook search More...
 
struct  TrellisPath
 

Macros

#define NOISE_SPREAD_THRESHOLD   0.9f
 
#define NOISE_LAMBDA_REPLACE   1.948f
 
#define TRELLIS_STAGES   121
 
#define TRELLIS_STATES   (SCALE_MAX_DIFF+1)
 

Functions

static void encode_window_bands_info (AACEncContext *s, SingleChannelElement *sce, int win, int group_len, const float lambda)
 Encode band info for single window group bands. More...
 
static void set_special_band_scalefactors (AACEncContext *s, SingleChannelElement *sce)
 
static void search_for_quantizers_anmr (AVCodecContext *avctx, AACEncContext *s, SingleChannelElement *sce, const float lambda)
 
static void search_for_quantizers_fast (AVCodecContext *avctx, AACEncContext *s, SingleChannelElement *sce, const float lambda)
 
static void search_for_pns (AACEncContext *s, AVCodecContext *avctx, SingleChannelElement *sce)
 
static void mark_pns (AACEncContext *s, AVCodecContext *avctx, SingleChannelElement *sce)
 
static void search_for_ms (AACEncContext *s, ChannelElement *cpe)
 

Variables

const AACCoefficientsEncoder ff_aac_coders [AAC_CODER_NB]
 

Detailed Description

AAC coefficients encoder.

Definition in file aaccoder.c.

Macro Definition Documentation

#define NOISE_SPREAD_THRESHOLD   0.9f

Definition at line 57 of file aaccoder.c.

Referenced by mark_pns(), and search_for_pns().

#define NOISE_LAMBDA_REPLACE   1.948f

Definition at line 61 of file aaccoder.c.

Referenced by search_for_pns().

#define TRELLIS_STAGES   121

Definition at line 193 of file aaccoder.c.

Referenced by search_for_quantizers_anmr().

#define TRELLIS_STATES   (SCALE_MAX_DIFF+1)

Definition at line 194 of file aaccoder.c.

Referenced by search_for_quantizers_anmr().

Function Documentation

static void encode_window_bands_info ( AACEncContext s,
SingleChannelElement sce,
int  win,
int  group_len,
const float  lambda 
)
static

Encode band info for single window group bands.

Definition at line 77 of file aaccoder.c.

static void set_special_band_scalefactors ( AACEncContext s,
SingleChannelElement sce 
)
static

Definition at line 196 of file aaccoder.c.

static void search_for_quantizers_anmr ( AVCodecContext avctx,
AACEncContext s,
SingleChannelElement sce,
const float  lambda 
)
static

Definition at line 235 of file aaccoder.c.

static void search_for_quantizers_fast ( AVCodecContext avctx,
AACEncContext s,
SingleChannelElement sce,
const float  lambda 
)
static

Definition at line 395 of file aaccoder.c.

static void search_for_pns ( AACEncContext s,
AVCodecContext avctx,
SingleChannelElement sce 
)
static

Keep this in sync with twoloop's cutoff selection

Definition at line 543 of file aaccoder.c.

static void mark_pns ( AACEncContext s,
AVCodecContext avctx,
SingleChannelElement sce 
)
static

Keep this in sync with twoloop's cutoff selection

Definition at line 685 of file aaccoder.c.

static void search_for_ms ( AACEncContext s,
ChannelElement cpe 
)
static

Scout out next nonzero bands

Definition at line 756 of file aaccoder.c.

Variable Documentation

const AACCoefficientsEncoder ff_aac_coders[AAC_CODER_NB]

Definition at line 897 of file aaccoder.c.

Referenced by aac_encode_init().