FFmpeg
|
#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 | QUANTIZE_AND_ENCODE_BAND_COST_FUNC(NAME, BT_ZERO, BT_UNSIGNED, BT_PAIR, BT_ESC, BT_NOISE, BT_STEREO, ROUNDING) |
#define | TRELLIS_STAGES 121 |
#define | TRELLIS_STATES (SCALE_MAX_DIFF+1) |
Typedefs | |
typedef float(* | quantize_and_encode_band_func) (struct AACEncContext *s, PutBitContext *pb, const float *in, float *quant, const float *scaled, int size, int scale_idx, int cb, const float lambda, const float uplim, int *bits, float *energy) |
Functions | |
static av_always_inline float | quantize_and_encode_band_cost_template (struct AACEncContext *s, PutBitContext *pb, const float *in, float *out, const float *scaled, int size, int scale_idx, int cb, const float lambda, const float uplim, int *bits, float *energy, int BT_ZERO, int BT_UNSIGNED, int BT_PAIR, int BT_ESC, int BT_NOISE, int BT_STEREO, const float ROUNDING) |
Calculate rate distortion cost for quantizing with given codebook. More... | |
static float | quantize_and_encode_band_cost_NONE (struct AACEncContext *s, PutBitContext *pb, const float *in, float *quant, const float *scaled, int size, int scale_idx, int cb, const float lambda, const float uplim, int *bits, float *energy) |
float | ff_quantize_and_encode_band_cost (struct AACEncContext *s, PutBitContext *pb, const float *in, float *quant, const float *scaled, int size, int scale_idx, int cb, const float lambda, const float uplim, int *bits, float *energy) |
static void | quantize_and_encode_band (struct AACEncContext *s, PutBitContext *pb, const float *in, float *out, int size, int scale_idx, int cb, const float lambda, int rtz) |
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 | |
static const quantize_and_encode_band_func | quantize_and_encode_band_cost_arr [] |
static const quantize_and_encode_band_func | quantize_and_encode_band_cost_rtz_arr [] |
const AACCoefficientsEncoder | ff_aac_coders [AAC_CODER_NB] |
AAC coefficients encoder
Definition in file aaccoder.c.
#define NOISE_SPREAD_THRESHOLD 0.9f |
Definition at line 57 of file aaccoder.c.
#define NOISE_LAMBDA_REPLACE 1.948f |
Definition at line 61 of file aaccoder.c.
#define QUANTIZE_AND_ENCODE_BAND_COST_FUNC | ( | NAME, | |
BT_ZERO, | |||
BT_UNSIGNED, | |||
BT_PAIR, | |||
BT_ESC, | |||
BT_NOISE, | |||
BT_STEREO, | |||
ROUNDING | |||
) |
Definition at line 205 of file aaccoder.c.
#define TRELLIS_STAGES 121 |
Definition at line 416 of file aaccoder.c.
#define TRELLIS_STATES (SCALE_MAX_DIFF+1) |
Definition at line 417 of file aaccoder.c.
typedef float(* quantize_and_encode_band_func) (struct AACEncContext *s, PutBitContext *pb, const float *in, float *quant, const float *scaled, int size, int scale_idx, int cb, const float lambda, const float uplim, int *bits, float *energy) |
Definition at line 65 of file aaccoder.c.
|
static |
Calculate rate distortion cost for quantizing with given codebook.
Definition at line 76 of file aaccoder.c.
|
inlinestatic |
Definition at line 196 of file aaccoder.c.
float ff_quantize_and_encode_band_cost | ( | struct AACEncContext * | s, |
PutBitContext * | pb, | ||
const float * | in, | ||
float * | quant, | ||
const float * | scaled, | ||
int | size, | ||
int | scale_idx, | ||
int | cb, | ||
const float | lambda, | ||
const float | uplim, | ||
int * | bits, | ||
float * | energy | ||
) |
Definition at line 269 of file aaccoder.c.
Referenced by ff_aac_search_for_pred(), quantize_band_cost(), and quantize_band_cost_bits().
|
inlinestatic |
Definition at line 280 of file aaccoder.c.
|
static |
Encode band info for single window group bands.
Definition at line 300 of file aaccoder.c.
|
static |
Definition at line 419 of file aaccoder.c.
|
static |
Definition at line 458 of file aaccoder.c.
|
static |
Definition at line 618 of file aaccoder.c.
|
static |
Keep this in sync with twoloop's cutoff selection
Definition at line 765 of file aaccoder.c.
|
static |
Keep this in sync with twoloop's cutoff selection
Definition at line 907 of file aaccoder.c.
|
static |
Scout out next nonzero bands
Definition at line 978 of file aaccoder.c.
|
static |
Definition at line 229 of file aaccoder.c.
Referenced by ff_quantize_and_encode_band_cost(), and quantize_and_encode_band().
|
static |
Definition at line 249 of file aaccoder.c.
Referenced by quantize_and_encode_band().
const AACCoefficientsEncoder ff_aac_coders[AAC_CODER_NB] |
Definition at line 1119 of file aaccoder.c.
Referenced by aac_encode_init().