FFmpeg
|
Opus CELT decoder. More...
#include <stdint.h>
#include "libavutil/float_dsp.h"
#include "libavutil/libm.h"
#include "imdct15.h"
#include "opus.h"
Go to the source code of this file.
Data Structures | |
struct | CeltFrame |
struct | CeltContext |
Macros | |
#define | CELT_PVQ_U(n, k) (celt_pvq_u_row[FFMIN(n, k)][FFMAX(n, k)]) |
#define | CELT_PVQ_V(n, k) (CELT_PVQ_U(n, k) + CELT_PVQ_U(n, (k) + 1)) |
Enumerations | |
enum | CeltSpread { CELT_SPREAD_NONE, CELT_SPREAD_LIGHT, CELT_SPREAD_NORMAL, CELT_SPREAD_AGGRESSIVE } |
Functions | |
static int16_t | celt_cos (int16_t x) |
static int | celt_log2tan (int isin, int icos) |
static uint32_t | celt_rng (CeltContext *s) |
static void | celt_decode_coarse_energy (CeltContext *s, OpusRangeCoder *rc) |
static void | celt_decode_fine_energy (CeltContext *s, OpusRangeCoder *rc) |
static void | celt_decode_final_energy (CeltContext *s, OpusRangeCoder *rc, int bits_left) |
static void | celt_decode_tf_changes (CeltContext *s, OpusRangeCoder *rc, int transient) |
static void | celt_decode_allocation (CeltContext *s, OpusRangeCoder *rc) |
static int | celt_bits2pulses (const uint8_t *cache, int bits) |
static int | celt_pulses2bits (const uint8_t *cache, int pulses) |
static void | celt_normalize_residual (const int *av_restrict iy, float *av_restrict X, int N, float g) |
static void | celt_exp_rotation1 (float *X, unsigned int len, unsigned int stride, float c, float s) |
static void | celt_exp_rotation (float *X, unsigned int len, unsigned int stride, unsigned int K, enum CeltSpread spread) |
static unsigned int | celt_extract_collapse_mask (const int *iy, unsigned int N, unsigned int B) |
static void | celt_renormalize_vector (float *X, int N, float gain) |
static void | celt_stereo_merge (float *X, float *Y, float mid, int N) |
static void | celt_interleave_hadamard (float *tmp, float *X, int N0, int stride, int hadamard) |
static void | celt_deinterleave_hadamard (float *tmp, float *X, int N0, int stride, int hadamard) |
static void | celt_haar1 (float *X, int N0, int stride) |
static int | celt_compute_qn (int N, int b, int offset, int pulse_cap, int dualstereo) |
static uint64_t | celt_cwrsi (unsigned int N, unsigned int K, unsigned int i, int *y) |
static float | celt_decode_pulses (OpusRangeCoder *rc, int *y, unsigned int N, unsigned int K) |
static unsigned int | celt_alg_unquant (OpusRangeCoder *rc, float *X, unsigned int N, unsigned int K, enum CeltSpread spread, unsigned int blocks, float gain) |
Decode pulse vector and combine the result with the pitch vector to produce the final normalised signal in the current band. More... | |
static unsigned int | celt_decode_band (CeltContext *s, OpusRangeCoder *rc, const int band, float *X, float *Y, int N, int b, unsigned int blocks, float *lowband, int duration, float *lowband_out, int level, float gain, float *lowband_scratch, int fill) |
static void | celt_denormalize (CeltContext *s, CeltFrame *frame, float *data) |
static void | celt_postfilter_apply_transition (CeltFrame *frame, float *data) |
static void | celt_postfilter_apply (CeltFrame *frame, float *data, int len) |
static void | celt_postfilter (CeltContext *s, CeltFrame *frame) |
static int | parse_postfilter (CeltContext *s, OpusRangeCoder *rc, int consumed) |
static void | process_anticollapse (CeltContext *s, CeltFrame *frame, float *X) |
static void | celt_decode_bands (CeltContext *s, OpusRangeCoder *rc) |
int | ff_celt_decode_frame (CeltContext *s, OpusRangeCoder *rc, float **output, int coded_channels, int frame_size, int startband, int endband) |
void | ff_celt_flush (CeltContext *s) |
void | ff_celt_free (CeltContext **ps) |
int | ff_celt_init (AVCodecContext *avctx, CeltContext **ps, int output_channels) |
Variables | |
static const uint16_t | celt_model_tapset [] = { 4, 2, 3, 4 } |
static const uint16_t | celt_model_spread [] = { 32, 7, 9, 30, 32 } |
static const uint16_t | celt_model_alloc_trim [] |
static const uint16_t | celt_model_energy_small [] = { 4, 2, 3, 4 } |
static const uint8_t | celt_freq_bands [] |
static const uint8_t | celt_freq_range [] |
static const uint8_t | celt_log_freq_range [] |
static const int8_t | celt_tf_select [4][2][2][2] |
static const float | celt_mean_energy [] |
static const float | celt_alpha_coef [] |
static const float | celt_beta_coef [] |
static const uint8_t | celt_coarse_energy_dist [4][2][42] |
static const uint8_t | celt_static_alloc [11][21] |
static const uint8_t | celt_static_caps [4][2][21] |
static const uint8_t | celt_cache_bits [392] |
static const int16_t | celt_cache_index [105] |
static const uint8_t | celt_log2_frac [] |
static const uint8_t | celt_bit_interleave [] |
static const uint8_t | celt_bit_deinterleave [] |
static const uint8_t | celt_hadamard_ordery [] |
static const uint16_t | celt_qn_exp2 [] |
static const uint32_t | celt_pvq_u [1272] |
static const float | celt_window [120] |
const float | ff_celt_window2 [120] |
static const uint32_t *const | celt_pvq_u_row [15] |
Opus CELT decoder.
Definition in file opus_celt.c.
#define CELT_PVQ_V | ( | n, | |
k | |||
) | (CELT_PVQ_U(n, k) + CELT_PVQ_U(n, (k) + 1)) |
Referenced by celt_decode_pulses().
enum CeltSpread |
Enumerator | |
---|---|
CELT_SPREAD_NONE | |
CELT_SPREAD_LIGHT | |
CELT_SPREAD_NORMAL | |
CELT_SPREAD_AGGRESSIVE |
Definition at line 35 of file opus_celt.c.
|
inlinestatic |
Definition at line 494 of file opus_celt.c.
Referenced by celt_decode_band().
|
inlinestatic |
Definition at line 501 of file opus_celt.c.
Referenced by celt_decode_band().
|
inlinestatic |
Definition at line 513 of file opus_celt.c.
Referenced by celt_decode_band(), and process_anticollapse().
|
static |
Definition at line 519 of file opus_celt.c.
Referenced by ff_celt_decode_frame().
|
static |
Definition at line 569 of file opus_celt.c.
Referenced by ff_celt_decode_frame().
|
static |
Definition at line 588 of file opus_celt.c.
Referenced by ff_celt_decode_frame().
|
static |
Definition at line 610 of file opus_celt.c.
Referenced by ff_celt_decode_frame().
|
static |
Definition at line 638 of file opus_celt.c.
Referenced by ff_celt_decode_frame().
|
inlinestatic |
Definition at line 970 of file opus_celt.c.
Referenced by celt_decode_band().
|
inlinestatic |
Definition at line 989 of file opus_celt.c.
Referenced by celt_decode_band().
|
inlinestatic |
Definition at line 995 of file opus_celt.c.
Referenced by celt_alg_unquant().
|
static |
Definition at line 1003 of file opus_celt.c.
Referenced by celt_exp_rotation().
|
inlinestatic |
Definition at line 1028 of file opus_celt.c.
Referenced by celt_alg_unquant().
|
inlinestatic |
Definition at line 1064 of file opus_celt.c.
Referenced by celt_alg_unquant().
|
inlinestatic |
Definition at line 1085 of file opus_celt.c.
Referenced by celt_decode_band(), and process_anticollapse().
|
inlinestatic |
Definition at line 1097 of file opus_celt.c.
Referenced by celt_decode_band().
|
static |
Definition at line 1137 of file opus_celt.c.
Referenced by celt_decode_band().
|
static |
Definition at line 1158 of file opus_celt.c.
Referenced by celt_decode_band().
|
static |
Definition at line 1179 of file opus_celt.c.
Referenced by celt_decode_band().
|
inlinestatic |
Definition at line 1193 of file opus_celt.c.
Referenced by celt_decode_band().
|
inlinestatic |
Definition at line 1210 of file opus_celt.c.
Referenced by celt_decode_pulses().
|
inlinestatic |
Definition at line 1295 of file opus_celt.c.
Referenced by celt_alg_unquant().
|
inlinestatic |
Decode pulse vector and combine the result with the pitch vector to produce the final normalised signal in the current band.
Definition at line 1306 of file opus_celt.c.
Referenced by celt_decode_band().
|
static |
Definition at line 1319 of file opus_celt.c.
Referenced by celt_decode_bands().
|
static |
Definition at line 1675 of file opus_celt.c.
Referenced by ff_celt_decode_frame().
Definition at line 1688 of file opus_celt.c.
Referenced by celt_postfilter().
Definition at line 1733 of file opus_celt.c.
Referenced by celt_postfilter().
|
static |
Definition at line 1765 of file opus_celt.c.
Referenced by ff_celt_decode_frame().
|
static |
Definition at line 1789 of file opus_celt.c.
Referenced by ff_celt_decode_frame().
|
static |
Definition at line 1829 of file opus_celt.c.
Referenced by ff_celt_decode_frame().
|
static |
Definition at line 1881 of file opus_celt.c.
Referenced by ff_celt_decode_frame().
int ff_celt_decode_frame | ( | CeltContext * | s, |
OpusRangeCoder * | rc, | ||
float ** | output, | ||
int | coded_channels, | ||
int | frame_size, | ||
int | startband, | ||
int | endband | ||
) |
Definition at line 1977 of file opus_celt.c.
Referenced by opus_decode_frame(), and opus_decode_redundancy().
void ff_celt_flush | ( | CeltContext * | s | ) |
Definition at line 2147 of file opus_celt.c.
Referenced by ff_celt_init(), opus_decode_flush(), and opus_decode_frame().
void ff_celt_free | ( | CeltContext ** | ps | ) |
Definition at line 2174 of file opus_celt.c.
Referenced by ff_celt_init(), and opus_decode_close().
int ff_celt_init | ( | AVCodecContext * | avctx, |
CeltContext ** | ps, | ||
int | output_channels | ||
) |
Definition at line 2189 of file opus_celt.c.
Referenced by opus_decode_init().
|
static |
Definition at line 105 of file opus_celt.c.
Referenced by parse_postfilter().
|
static |
Definition at line 107 of file opus_celt.c.
Referenced by celt_decode_allocation().
|
static |
Definition at line 109 of file opus_celt.c.
Referenced by celt_decode_allocation().
|
static |
Definition at line 113 of file opus_celt.c.
Referenced by celt_decode_coarse_energy().
|
static |
Definition at line 115 of file opus_celt.c.
Referenced by celt_decode_allocation(), celt_decode_bands(), celt_denormalize(), and process_anticollapse().
|
static |
Definition at line 119 of file opus_celt.c.
Referenced by celt_decode_allocation(), celt_decode_bands(), celt_denormalize(), and process_anticollapse().
|
static |
Definition at line 123 of file opus_celt.c.
Referenced by celt_decode_allocation(), and celt_decode_band().
|
static |
Definition at line 127 of file opus_celt.c.
Referenced by celt_decode_tf_changes().
|
static |
Definition at line 134 of file opus_celt.c.
Referenced by celt_denormalize().
|
static |
Definition at line 142 of file opus_celt.c.
Referenced by celt_decode_coarse_energy().
|
static |
Definition at line 146 of file opus_celt.c.
Referenced by celt_decode_coarse_energy().
|
static |
Definition at line 150 of file opus_celt.c.
Referenced by celt_decode_coarse_energy().
|
static |
Definition at line 194 of file opus_celt.c.
Referenced by celt_decode_allocation().
|
static |
Definition at line 208 of file opus_celt.c.
Referenced by celt_decode_allocation().
|
static |
Definition at line 232 of file opus_celt.c.
Referenced by celt_decode_band().
|
static |
Definition at line 262 of file opus_celt.c.
Referenced by celt_decode_band().
|
static |
Definition at line 272 of file opus_celt.c.
Referenced by celt_decode_allocation().
|
static |
Definition at line 276 of file opus_celt.c.
Referenced by celt_decode_band().
|
static |
Definition at line 280 of file opus_celt.c.
Referenced by celt_decode_band().
|
static |
Definition at line 285 of file opus_celt.c.
Referenced by celt_deinterleave_hadamard(), and celt_interleave_hadamard().
|
static |
Definition at line 292 of file opus_celt.c.
Referenced by celt_compute_qn().
|
static |
Definition at line 296 of file opus_celt.c.
|
static |
Definition at line 439 of file opus_celt.c.
Referenced by ff_celt_decode_frame().
const float ff_celt_window2[120] |
Definition at line 467 of file opus_celt.c.
Referenced by celt_postfilter_apply_transition(), opus_decode_frame(), and opus_flush_resample().
|
static |
Definition at line 486 of file opus_celt.c.
Referenced by celt_cwrsi().