#define AVCODEC_AACENC_H
#include "libavutil/float_dsp.h"
+#include "libavutil/lfg.h"
#include "avcodec.h"
#include "put_bits.h"
#include "lpc.h"
typedef enum AACCoder {
- AAC_CODER_FAAC = 0,
- AAC_CODER_ANMR,
+ AAC_CODER_ANMR = 0,
AAC_CODER_TWOLOOP,
AAC_CODER_FAST,
typedef struct AACQuantizeBandCostCacheEntry {
float rd;
float energy;
- int bits; ///< -1 means uninitialized entry
+ int bits;
char cb;
char rtz;
- char padding[2]; ///< Keeps the entry size a multiple of 32 bits
+ uint16_t generation;
} AACQuantizeBandCostCacheEntry;
/**
FFTContext mdct1024; ///< long (1024 samples) frame transform context
FFTContext mdct128; ///< short (128 samples) frame transform context
AVFloatDSPContext *fdsp;
+ AVLFG lfg; ///< PRNG needed for PNS
float *planar_samples[8]; ///< saved preprocessed input
int profile; ///< copied from avctx
int last_frame;
int random_state;
float lambda;
+ int last_frame_pb_count; ///< number of bits for the previous frame
float lambda_sum; ///< sum(lambda), for Qvg reporting
int lambda_count; ///< count(lambda), for Qvg reporting
enum RawDataBlockType cur_type; ///< channel group type cur_channel belongs to
DECLARE_ALIGNED(16, int, qcoefs)[96]; ///< quantized coefficients
DECLARE_ALIGNED(32, float, scoefs)[1024]; ///< scaled coefficients
+ uint16_t quantize_band_cost_cache_generation;
AACQuantizeBandCostCacheEntry quantize_band_cost_cache[256][128]; ///< memoization area for quantize_band_cost
struct {