Go to the documentation of this file.
24 #ifndef AVCODEC_OPUS_CELT_H
25 #define AVCODEC_OPUS_CELT_H
39 #define CELT_SHORT_BLOCKSIZE 120
40 #define CELT_OVERLAP CELT_SHORT_BLOCKSIZE
41 #define CELT_MAX_LOG_BLOCKS 3
42 #define CELT_MAX_FRAME_SIZE (CELT_SHORT_BLOCKSIZE * (1 << CELT_MAX_LOG_BLOCKS))
43 #define CELT_MAX_BANDS 21
45 #define CELT_VECTORS 11
46 #define CELT_ALLOC_STEPS 6
47 #define CELT_FINE_OFFSET 21
48 #define CELT_MAX_FINE_BITS 8
49 #define CELT_NORM_SCALE 16384
50 #define CELT_QTHETA_OFFSET 4
51 #define CELT_QTHETA_OFFSET_TWOPHASE 16
52 #define CELT_POSTFILTER_MINPERIOD 15
53 #define CELT_ENERGY_SILENCE (-28.0f)
152 f->seed = 1664525 *
f->seed + 1013904223;
160 for (
i = 0;
i <
N;
i++)
164 for (
i = 0;
i <
N;
i++)
169 int apply_phase_inv);
176 int coded_channels,
int frame_size,
int startband,
int endband);
int ff_celt_decode_frame(CeltFrame *f, OpusRangeCoder *rc, float **output, int coded_channels, int frame_size, int startband, int endband)
filter_frame For filters that do not use the this method is called when a frame is pushed to the filter s input It can be called at any time except in a reentrant way If the input frame is enough to produce output
static av_always_inline void celt_renormalize_vector(float *X, int N, float gain)
float overlap[FFALIGN(CELT_OVERLAP, 16)]
float lin_energy[CELT_MAX_BANDS]
float coeffs[CELT_MAX_FRAME_SIZE]
static av_always_inline uint32_t celt_rng(CeltFrame *f)
float samples[FFALIGN(CELT_MAX_FRAME_SIZE, 16)]
void(* av_tx_fn)(AVTXContext *s, void *out, void *in, ptrdiff_t stride)
Function pointer to a function to perform the transform.
float energy[CELT_MAX_BANDS]
int alloc_boost[CELT_MAX_BANDS]
float error_energy[CELT_MAX_BANDS]
int ff_celt_init(AVCodecContext *avctx, CeltFrame **f, int output_channels, int apply_phase_inv)
void ff_celt_flush(CeltFrame *f)
int tf_change[CELT_MAX_BANDS]
int fine_bits[CELT_MAX_BANDS]
static __device__ float sqrtf(float a)
float prev_energy[2][CELT_MAX_BANDS]
void ff_celt_free(CeltFrame **f)
int fine_priority[CELT_MAX_BANDS]
#define DECLARE_ALIGNED(n, t, v)
#define CELT_MAX_FRAME_SIZE
static void encode(AVCodecContext *ctx, AVFrame *frame, AVPacket *pkt, FILE *output)
#define i(width, name, range_min, range_max)
void ff_celt_quant_bands(CeltFrame *f, OpusRangeCoder *rc)
int pulses[CELT_MAX_BANDS]
void ff_celt_bitalloc(CeltFrame *f, OpusRangeCoder *rc, int encode)
main external API structure.
uint8_t collapse_masks[CELT_MAX_BANDS]