24 #ifndef AVCODEC_OPUS_CELT_H 25 #define AVCODEC_OPUS_CELT_H 33 #include "libavutil/float_dsp.h" 36 #define CELT_VECTORS 11 37 #define CELT_ALLOC_STEPS 6 38 #define CELT_FINE_OFFSET 21 39 #define CELT_MAX_FINE_BITS 8 40 #define CELT_NORM_SCALE 16384 41 #define CELT_QTHETA_OFFSET 4 42 #define CELT_QTHETA_OFFSET_TWOPHASE 16 43 #define CELT_EMPH_COEFF 0.85000610f 44 #define CELT_POSTFILTER_MINPERIOD 15 45 #define CELT_ENERGY_SILENCE (-28.0f) 53 CELT_SPREAD_AGGRESSIVE
66 float energy[CELT_MAX_BANDS];
67 float lin_energy[CELT_MAX_BANDS];
68 float error_energy[CELT_MAX_BANDS];
69 float prev_energy[2][CELT_MAX_BANDS];
71 uint8_t collapse_masks[CELT_MAX_BANDS];
74 DECLARE_ALIGNED(32,
float, buf)[2048];
75 DECLARE_ALIGNED(32,
float, coeffs)[CELT_MAX_FRAME_SIZE];
78 DECLARE_ALIGNED(32,
float, overlap)[FFALIGN(CELT_OVERLAP, 16)];
79 DECLARE_ALIGNED(32,
float, samples)[FFALIGN(CELT_MAX_FRAME_SIZE, 16)];
83 float pf_gains_new[3];
87 float pf_gains_old[3];
103 enum CeltBlockSize size;
112 int alloc_boost[CELT_MAX_BANDS];
116 int anticollapse_needed;
118 int intensity_stereo;
122 enum CeltSpread spread;
134 int caps [CELT_MAX_BANDS];
135 int fine_bits [CELT_MAX_BANDS];
136 int fine_priority[CELT_MAX_BANDS];
137 int pulses [CELT_MAX_BANDS];
138 int tf_change [CELT_MAX_BANDS];
142 static av_always_inline uint32_t celt_rng(
CeltFrame *f)
144 f->seed = 1664525 * f->seed + 1013904223;
148 static av_always_inline
void celt_renormalize_vector(
float *X,
int N,
float gain)
152 for (i = 0; i < N; i++)
156 for (i = 0; i < N; i++)
161 int apply_phase_inv);
168 int coded_channels,
int frame_size,
int startband,
int endband);
Definition: opus_pvq.h:35
Definition: float_dsp.h:24
main external API structure.
Definition: avcodec.h:1518
Replacements for frequently missing libm functions.
Definition: opus_celt.h:92
Definition: opus_celt.h:65