#ifndef CELT_H
#define CELT_H
#include "opus_types.h"
#include "opus_defines.h"
#include "opus_custom.h"
#include "entenc.h"
#include "entdec.h"
#include "arch.h"
#ifdef __cplusplus
extern "C" {
#endif
#define CELTEncoder …
#define CELTDecoder …
#define CELTMode …
#define LEAK_BANDS …
AnalysisInfo;
SILKInfo;
#define __celt_check_mode_ptr_ptr(ptr) …
#define __celt_check_analysis_ptr(ptr) …
#define __celt_check_silkinfo_ptr(ptr) …
#define CELT_SET_PREDICTION_REQUEST …
#define CELT_SET_PREDICTION(x) …
#define CELT_SET_INPUT_CLIPPING_REQUEST …
#define CELT_SET_INPUT_CLIPPING(x) …
#define CELT_GET_AND_CLEAR_ERROR_REQUEST …
#define CELT_GET_AND_CLEAR_ERROR(x) …
#define CELT_SET_CHANNELS_REQUEST …
#define CELT_SET_CHANNELS(x) …
#define CELT_SET_START_BAND_REQUEST …
#define CELT_SET_START_BAND(x) …
#define CELT_SET_END_BAND_REQUEST …
#define CELT_SET_END_BAND(x) …
#define CELT_GET_MODE_REQUEST …
#define CELT_GET_MODE(x) …
#define CELT_SET_SIGNALLING_REQUEST …
#define CELT_SET_SIGNALLING(x) …
#define CELT_SET_TONALITY_REQUEST …
#define CELT_SET_TONALITY(x) …
#define CELT_SET_TONALITY_SLOPE_REQUEST …
#define CELT_SET_TONALITY_SLOPE(x) …
#define CELT_SET_ANALYSIS_REQUEST …
#define CELT_SET_ANALYSIS(x) …
#define OPUS_SET_LFE_REQUEST …
#define OPUS_SET_LFE(x) …
#define OPUS_SET_ENERGY_MASK_REQUEST …
#define OPUS_SET_ENERGY_MASK(x) …
#define CELT_SET_SILK_INFO_REQUEST …
#define CELT_SET_SILK_INFO(x) …
int celt_encoder_get_size(int channels);
int celt_encode_with_ec(OpusCustomEncoder * OPUS_RESTRICT st, const opus_val16 * pcm, int frame_size, unsigned char *compressed, int nbCompressedBytes, ec_enc *enc);
int celt_encoder_init(CELTEncoder *st, opus_int32 sampling_rate, int channels,
int arch);
int celt_decoder_get_size(int channels);
int celt_decoder_init(CELTDecoder *st, opus_int32 sampling_rate, int channels);
int celt_decode_with_ec(OpusCustomDecoder * OPUS_RESTRICT st, const unsigned char *data,
int len, opus_val16 * OPUS_RESTRICT pcm, int frame_size, ec_dec *dec, int accum);
#define celt_encoder_ctl …
#define celt_decoder_ctl …
#ifdef CUSTOM_MODES
#define OPUS_CUSTOM_NOSTATIC
#else
#define OPUS_CUSTOM_NOSTATIC …
#endif
static const unsigned char trim_icdf[11] = …;
static const unsigned char spread_icdf[4] = …;
static const unsigned char tapset_icdf[3]= …;
#ifdef CUSTOM_MODES
static const unsigned char toOpusTable[20] = {
0xE0, 0xE8, 0xF0, 0xF8,
0xC0, 0xC8, 0xD0, 0xD8,
0xA0, 0xA8, 0xB0, 0xB8,
0x00, 0x00, 0x00, 0x00,
0x80, 0x88, 0x90, 0x98,
};
static const unsigned char fromOpusTable[16] = {
0x80, 0x88, 0x90, 0x98,
0x40, 0x48, 0x50, 0x58,
0x20, 0x28, 0x30, 0x38,
0x00, 0x08, 0x10, 0x18
};
static OPUS_INLINE int toOpus(unsigned char c)
{
int ret=0;
if (c<0xA0)
ret = toOpusTable[c>>3];
if (ret == 0)
return -1;
else
return ret|(c&0x7);
}
static OPUS_INLINE int fromOpus(unsigned char c)
{
if (c<0x80)
return -1;
else
return fromOpusTable[(c>>3)-16] | (c&0x7);
}
#endif
#define COMBFILTER_MAXPERIOD …
#define COMBFILTER_MINPERIOD …
extern const signed char tf_select_table[4][8];
#if defined(ENABLE_HARDENING) || defined(ENABLE_ASSERTIONS)
void validate_celt_decoder(CELTDecoder *st);
#define VALIDATE_CELT_DECODER(st) …
#else
#define VALIDATE_CELT_DECODER …
#endif
int resampling_factor(opus_int32 rate);
void celt_preemphasis(const opus_val16 * OPUS_RESTRICT pcmp, celt_sig * OPUS_RESTRICT inp,
int N, int CC, int upsample, const opus_val16 *coef, celt_sig *mem, int clip);
void comb_filter(opus_val32 *y, opus_val32 *x, int T0, int T1, int N,
opus_val16 g0, opus_val16 g1, int tapset0, int tapset1,
const opus_val16 *window, int overlap, int arch);
#ifdef NON_STATIC_COMB_FILTER_CONST_C
void comb_filter_const_c(opus_val32 *y, opus_val32 *x, int T, int N,
opus_val16 g10, opus_val16 g11, opus_val16 g12);
#endif
#ifndef OVERRIDE_COMB_FILTER_CONST
#define comb_filter_const(y, x, T, N, g10, g11, g12, arch) …
#endif
void init_caps(const CELTMode *m,int *cap,int LM,int C);
#ifdef RESYNTH
void deemphasis(celt_sig *in[], opus_val16 *pcm, int N, int C, int downsample, const opus_val16 *coef, celt_sig *mem);
void celt_synthesis(const CELTMode *mode, celt_norm *X, celt_sig * out_syn[],
opus_val16 *oldBandE, int start, int effEnd, int C, int CC, int isTransient,
int LM, int downsample, int silence);
#endif
#ifdef __cplusplus
}
#endif
#endif