webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Classes | Macros | Functions | Variables
celt.h File Reference

Contains all the functions for encoding and decoding audio. More...

#include "opus_types.h"
#include "opus_defines.h"
#include "opus_custom.h"
#include "entenc.h"
#include "entdec.h"
#include "arch.h"

Go to the source code of this file.

Classes

struct  AnalysisInfo
 

Macros

#define CELTEncoder   OpusCustomEncoder
 
#define CELTDecoder   OpusCustomDecoder
 
#define CELTMode   OpusCustomMode
 
#define __celt_check_mode_ptr_ptr(ptr)   ((ptr) + ((ptr) - (const CELTMode**)(ptr)))
 
#define __celt_check_analysis_ptr(ptr)   ((ptr) + ((ptr) - (const AnalysisInfo*)(ptr)))
 
#define OPUS_FRAMESIZE_VARIABLE   5010
 
#define CELT_SET_PREDICTION_REQUEST   10002
 
#define CELT_SET_PREDICTION(x)   CELT_SET_PREDICTION_REQUEST, __opus_check_int(x)
 
#define CELT_SET_INPUT_CLIPPING_REQUEST   10004
 
#define CELT_SET_INPUT_CLIPPING(x)   CELT_SET_INPUT_CLIPPING_REQUEST, __opus_check_int(x)
 
#define CELT_GET_AND_CLEAR_ERROR_REQUEST   10007
 
#define CELT_GET_AND_CLEAR_ERROR(x)   CELT_GET_AND_CLEAR_ERROR_REQUEST, __opus_check_int_ptr(x)
 
#define CELT_SET_CHANNELS_REQUEST   10008
 
#define CELT_SET_CHANNELS(x)   CELT_SET_CHANNELS_REQUEST, __opus_check_int(x)
 
#define CELT_SET_START_BAND_REQUEST   10010
 
#define CELT_SET_START_BAND(x)   CELT_SET_START_BAND_REQUEST, __opus_check_int(x)
 
#define CELT_SET_END_BAND_REQUEST   10012
 
#define CELT_SET_END_BAND(x)   CELT_SET_END_BAND_REQUEST, __opus_check_int(x)
 
#define CELT_GET_MODE_REQUEST   10015
 
#define CELT_GET_MODE(x)   CELT_GET_MODE_REQUEST, __celt_check_mode_ptr_ptr(x)
 
#define CELT_SET_SIGNALLING_REQUEST   10016
 
#define CELT_SET_SIGNALLING(x)   CELT_SET_SIGNALLING_REQUEST, __opus_check_int(x)
 
#define CELT_SET_TONALITY_REQUEST   10018
 
#define CELT_SET_TONALITY(x)   CELT_SET_TONALITY_REQUEST, __opus_check_int(x)
 
#define CELT_SET_TONALITY_SLOPE_REQUEST   10020
 
#define CELT_SET_TONALITY_SLOPE(x)   CELT_SET_TONALITY_SLOPE_REQUEST, __opus_check_int(x)
 
#define CELT_SET_ANALYSIS_REQUEST   10022
 
#define CELT_SET_ANALYSIS(x)   CELT_SET_ANALYSIS_REQUEST, __celt_check_analysis_ptr(x)
 
#define OPUS_SET_LFE_REQUEST   10024
 
#define OPUS_SET_LFE(x)   OPUS_SET_LFE_REQUEST, __opus_check_int(x)
 
#define OPUS_SET_ENERGY_MASK_REQUEST   10026
 
#define OPUS_SET_ENERGY_MASK(x)   OPUS_SET_ENERGY_MASK_REQUEST, __opus_check_val16_ptr(x)
 
#define celt_encoder_ctl   opus_custom_encoder_ctl
 
#define celt_decoder_ctl   opus_custom_decoder_ctl
 
#define OPUS_CUSTOM_NOSTATIC   static OPUS_INLINE
 
#define COMBFILTER_MAXPERIOD   1024
 
#define COMBFILTER_MINPERIOD   15
 
#define comb_filter_const(y, x, T, N, g10, g11, g12, arch)   ((void)(arch),comb_filter_const_c(y, x, T, N, g10, g11, g12))
 

Functions

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)
 
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)
 
void init_caps (const CELTMode *m, int *cap, int LM, int C)
 

Variables

const signed char tf_select_table [4][8]
 

Detailed Description

Contains all the functions for encoding and decoding audio.

Macro Definition Documentation

◆ __celt_check_analysis_ptr

#define __celt_check_analysis_ptr (   ptr)    ((ptr) + ((ptr) - (const AnalysisInfo*)(ptr)))

◆ __celt_check_mode_ptr_ptr

#define __celt_check_mode_ptr_ptr (   ptr)    ((ptr) + ((ptr) - (const CELTMode**)(ptr)))

◆ celt_decoder_ctl

#define celt_decoder_ctl   opus_custom_decoder_ctl

◆ celt_encoder_ctl

#define celt_encoder_ctl   opus_custom_encoder_ctl

◆ CELT_GET_AND_CLEAR_ERROR

#define CELT_GET_AND_CLEAR_ERROR (   x)    CELT_GET_AND_CLEAR_ERROR_REQUEST, __opus_check_int_ptr(x)

◆ CELT_GET_AND_CLEAR_ERROR_REQUEST

#define CELT_GET_AND_CLEAR_ERROR_REQUEST   10007

◆ CELT_GET_MODE

#define CELT_GET_MODE (   x)    CELT_GET_MODE_REQUEST, __celt_check_mode_ptr_ptr(x)

Get the CELTMode used by an encoder or decoder

◆ CELT_GET_MODE_REQUEST

#define CELT_GET_MODE_REQUEST   10015

◆ CELT_SET_ANALYSIS

#define CELT_SET_ANALYSIS (   x)    CELT_SET_ANALYSIS_REQUEST, __celt_check_analysis_ptr(x)

◆ CELT_SET_ANALYSIS_REQUEST

#define CELT_SET_ANALYSIS_REQUEST   10022

◆ CELT_SET_CHANNELS

#define CELT_SET_CHANNELS (   x)    CELT_SET_CHANNELS_REQUEST, __opus_check_int(x)

◆ CELT_SET_CHANNELS_REQUEST

#define CELT_SET_CHANNELS_REQUEST   10008

◆ CELT_SET_END_BAND

#define CELT_SET_END_BAND (   x)    CELT_SET_END_BAND_REQUEST, __opus_check_int(x)

◆ CELT_SET_END_BAND_REQUEST

#define CELT_SET_END_BAND_REQUEST   10012

◆ CELT_SET_INPUT_CLIPPING

#define CELT_SET_INPUT_CLIPPING (   x)    CELT_SET_INPUT_CLIPPING_REQUEST, __opus_check_int(x)

◆ CELT_SET_INPUT_CLIPPING_REQUEST

#define CELT_SET_INPUT_CLIPPING_REQUEST   10004

◆ CELT_SET_PREDICTION

#define CELT_SET_PREDICTION (   x)    CELT_SET_PREDICTION_REQUEST, __opus_check_int(x)

Controls the use of interframe prediction. 0=Independent frames 1=Short term interframe prediction allowed 2=Long term prediction allowed

◆ CELT_SET_PREDICTION_REQUEST

#define CELT_SET_PREDICTION_REQUEST   10002

◆ CELT_SET_SIGNALLING

#define CELT_SET_SIGNALLING (   x)    CELT_SET_SIGNALLING_REQUEST, __opus_check_int(x)

◆ CELT_SET_SIGNALLING_REQUEST

#define CELT_SET_SIGNALLING_REQUEST   10016

◆ CELT_SET_START_BAND

#define CELT_SET_START_BAND (   x)    CELT_SET_START_BAND_REQUEST, __opus_check_int(x)

◆ CELT_SET_START_BAND_REQUEST

#define CELT_SET_START_BAND_REQUEST   10010

◆ CELT_SET_TONALITY

#define CELT_SET_TONALITY (   x)    CELT_SET_TONALITY_REQUEST, __opus_check_int(x)

◆ CELT_SET_TONALITY_REQUEST

#define CELT_SET_TONALITY_REQUEST   10018

◆ CELT_SET_TONALITY_SLOPE

#define CELT_SET_TONALITY_SLOPE (   x)    CELT_SET_TONALITY_SLOPE_REQUEST, __opus_check_int(x)

◆ CELT_SET_TONALITY_SLOPE_REQUEST

#define CELT_SET_TONALITY_SLOPE_REQUEST   10020

◆ CELTDecoder

#define CELTDecoder   OpusCustomDecoder

◆ CELTEncoder

#define CELTEncoder   OpusCustomEncoder

◆ CELTMode

#define CELTMode   OpusCustomMode

◆ comb_filter_const

#define comb_filter_const (   y,
  x,
  T,
  N,
  g10,
  g11,
  g12,
  arch 
)    ((void)(arch),comb_filter_const_c(y, x, T, N, g10, g11, g12))

◆ COMBFILTER_MAXPERIOD

#define COMBFILTER_MAXPERIOD   1024

◆ COMBFILTER_MINPERIOD

#define COMBFILTER_MINPERIOD   15

◆ OPUS_CUSTOM_NOSTATIC

#define OPUS_CUSTOM_NOSTATIC   static OPUS_INLINE

◆ OPUS_FRAMESIZE_VARIABLE

#define OPUS_FRAMESIZE_VARIABLE   5010

Optimize the frame size dynamically

◆ OPUS_SET_ENERGY_MASK

#define OPUS_SET_ENERGY_MASK (   x)    OPUS_SET_ENERGY_MASK_REQUEST, __opus_check_val16_ptr(x)

◆ OPUS_SET_ENERGY_MASK_REQUEST

#define OPUS_SET_ENERGY_MASK_REQUEST   10026

◆ OPUS_SET_LFE

#define OPUS_SET_LFE (   x)    OPUS_SET_LFE_REQUEST, __opus_check_int(x)

◆ OPUS_SET_LFE_REQUEST

#define OPUS_SET_LFE_REQUEST   10024

Function Documentation

◆ celt_decode_with_ec()

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 
)

◆ celt_decoder_get_size()

int celt_decoder_get_size ( int  channels)

◆ celt_decoder_init()

int celt_decoder_init ( CELTDecoder st,
opus_int32  sampling_rate,
int  channels 
)

◆ celt_encode_with_ec()

int celt_encode_with_ec ( OpusCustomEncoder *OPUS_RESTRICT  st,
const opus_val16 pcm,
int  frame_size,
unsigned char *  compressed,
int  nbCompressedBytes,
ec_enc enc 
)

◆ celt_encoder_get_size()

int celt_encoder_get_size ( int  channels)

◆ celt_encoder_init()

int celt_encoder_init ( CELTEncoder st,
opus_int32  sampling_rate,
int  channels,
int  arch 
)

◆ celt_preemphasis()

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 
)

◆ comb_filter()

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 
)

◆ init_caps()

void init_caps ( const CELTMode m,
int *  cap,
int  LM,
int  C 
)

◆ resampling_factor()

int resampling_factor ( opus_int32  rate)

Variable Documentation

◆ tf_select_table

const signed char tf_select_table[4][8]