FFmpeg  4.0
Data Structures | Macros | Enumerations | Functions
opus_celt.h File Reference
#include <float.h>
#include "opus.h"
#include "opus_pvq.h"
#include "mdct15.h"
#include "libavutil/float_dsp.h"
#include "libavutil/libm.h"

Go to the source code of this file.

Data Structures

struct  CeltBlock
 
struct  CeltFrame
 

Macros

#define CELT_VECTORS   11
 
#define CELT_ALLOC_STEPS   6
 
#define CELT_FINE_OFFSET   21
 
#define CELT_MAX_FINE_BITS   8
 
#define CELT_NORM_SCALE   16384
 
#define CELT_QTHETA_OFFSET   4
 
#define CELT_QTHETA_OFFSET_TWOPHASE   16
 
#define CELT_EMPH_COEFF   0.85000610f
 
#define CELT_POSTFILTER_MINPERIOD   15
 
#define CELT_ENERGY_SILENCE   (-28.0f)
 

Enumerations

enum  CeltSpread { CELT_SPREAD_NONE, CELT_SPREAD_LIGHT, CELT_SPREAD_NORMAL, CELT_SPREAD_AGGRESSIVE }
 
enum  CeltBlockSize {
  CELT_BLOCK_120, CELT_BLOCK_240, CELT_BLOCK_480, CELT_BLOCK_960,
  CELT_BLOCK_NB
}
 

Functions

static av_always_inline uint32_t celt_rng (CeltFrame *f)
 
static av_always_inline void celt_renormalize_vector (float *X, int N, float gain)
 
int ff_celt_init (AVCodecContext *avctx, CeltFrame **f, int output_channels, int apply_phase_inv)
 
void ff_celt_free (CeltFrame **f)
 
void ff_celt_flush (CeltFrame *f)
 
int ff_celt_decode_frame (CeltFrame *f, OpusRangeCoder *rc, float **output, int coded_channels, int frame_size, int startband, int endband)
 

Macro Definition Documentation

◆ CELT_VECTORS

#define CELT_VECTORS   11

Definition at line 36 of file opus_celt.h.

Referenced by ff_celt_bitalloc().

◆ CELT_ALLOC_STEPS

#define CELT_ALLOC_STEPS   6

Definition at line 37 of file opus_celt.h.

Referenced by ff_celt_bitalloc().

◆ CELT_FINE_OFFSET

#define CELT_FINE_OFFSET   21

Definition at line 38 of file opus_celt.h.

Referenced by ff_celt_bitalloc().

◆ CELT_MAX_FINE_BITS

#define CELT_MAX_FINE_BITS   8

Definition at line 39 of file opus_celt.h.

Referenced by celt_decode_final_energy(), celt_quant_final(), and ff_celt_bitalloc().

◆ CELT_NORM_SCALE

#define CELT_NORM_SCALE   16384

Definition at line 40 of file opus_celt.h.

◆ CELT_QTHETA_OFFSET

#define CELT_QTHETA_OFFSET   4

Definition at line 41 of file opus_celt.h.

Referenced by quant_band_template().

◆ CELT_QTHETA_OFFSET_TWOPHASE

#define CELT_QTHETA_OFFSET_TWOPHASE   16

Definition at line 42 of file opus_celt.h.

Referenced by quant_band_template().

◆ CELT_EMPH_COEFF

#define CELT_EMPH_COEFF   0.85000610f

Definition at line 43 of file opus_celt.h.

Referenced by celt_apply_preemph_filter(), and ff_celt_decode_frame().

◆ CELT_POSTFILTER_MINPERIOD

#define CELT_POSTFILTER_MINPERIOD   15

Definition at line 44 of file opus_celt.h.

Referenced by celt_enc_quant_pfilter(), and parse_postfilter().

◆ CELT_ENERGY_SILENCE

#define CELT_ENERGY_SILENCE   (-28.0f)

Definition at line 45 of file opus_celt.h.

Referenced by celt_frame_mdct(), ff_celt_decode_frame(), and ff_celt_flush().

Enumeration Type Documentation

◆ CeltSpread

enum CeltSpread
Enumerator
CELT_SPREAD_NONE 
CELT_SPREAD_LIGHT 
CELT_SPREAD_NORMAL 
CELT_SPREAD_AGGRESSIVE 

Definition at line 49 of file opus_celt.h.

◆ CeltBlockSize

Enumerator
CELT_BLOCK_120 
CELT_BLOCK_240 
CELT_BLOCK_480 
CELT_BLOCK_960 
CELT_BLOCK_NB 

Definition at line 56 of file opus_celt.h.

Function Documentation

◆ celt_rng()

static av_always_inline uint32_t celt_rng ( CeltFrame f)
static

Definition at line 142 of file opus_celt.h.

Referenced by process_anticollapse(), and quant_band_template().

◆ celt_renormalize_vector()

static av_always_inline void celt_renormalize_vector ( float *  X,
int  N,
float  gain 
)
static

Definition at line 148 of file opus_celt.h.

Referenced by process_anticollapse(), and quant_band_template().

◆ ff_celt_init()

int ff_celt_init ( AVCodecContext avctx,
CeltFrame **  f,
int  output_channels,
int  apply_phase_inv 
)

Definition at line 566 of file opus_celt.c.

Referenced by celt_renormalize_vector(), and opus_decode_init().

◆ ff_celt_free()

void ff_celt_free ( CeltFrame **  f)

Definition at line 549 of file opus_celt.c.

Referenced by celt_renormalize_vector(), ff_celt_init(), and opus_decode_close().

◆ ff_celt_flush()

void ff_celt_flush ( CeltFrame f)

◆ ff_celt_decode_frame()

int ff_celt_decode_frame ( CeltFrame f,
OpusRangeCoder rc,
float **  output,
int  coded_channels,
int  frame_size,
int  startband,
int  endband 
)

Definition at line 347 of file opus_celt.c.

Referenced by celt_renormalize_vector(), opus_decode_frame(), and opus_decode_redundancy().