Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Mark Harris
Opus
Commits
276de721
Commit
276de721
authored
Feb 20, 2008
by
Jean-Marc Valin
Browse files
Mode doc
parent
879fbfd5
Changes
5
Hide whitespace changes
Inline
Side-by-side
libcelt/bands.h
View file @
276de721
...
...
@@ -78,6 +78,7 @@ void pitch_quant_bands(const CELTMode *m, float *X, float *P, float *gains);
* @param X Residual (normalised)
* @param P Pitch vector (normalised)
* @param W Perceptual weighting
* @param total_bits Total number of bits that can be used for the frame (including the ones already spent)
* @param enc Entropy encoder
*/
void
quant_bands
(
const
CELTMode
*
m
,
float
*
X
,
float
*
P
,
float
*
W
,
int
total_bits
,
ec_enc
*
enc
);
...
...
@@ -86,6 +87,7 @@ void quant_bands(const CELTMode *m, float *X, float *P, float *W, int total_bits
* @param m Mode data
* @param X Residual (normalised)
* @param P Pitch vector (normalised)
* @param total_bits Total number of bits that can be used for the frame (including the ones already spent)
* @param dec Entropy decoder
*/
void
unquant_bands
(
const
CELTMode
*
m
,
float
*
X
,
float
*
P
,
int
total_bits
,
ec_dec
*
dec
);
...
...
libcelt/celt.c
View file @
276de721
...
...
@@ -53,8 +53,11 @@
#define M_PI 3.14159263
#endif
/** Encoder state
@brief Encoder state
*/
struct
CELTEncoder
{
const
CELTMode
*
mode
;
const
CELTMode
*
mode
;
/**< Mode used by the encoder */
int
frame_size
;
int
block_size
;
int
nb_blocks
;
...
...
@@ -417,7 +420,9 @@ int celt_encode(CELTEncoder *st, celt_int16_t *pcm, unsigned char *compressed, i
/****************************************************************************/
/** Decoder state
@brief Decoder state
*/
struct
CELTDecoder
{
const
CELTMode
*
mode
;
int
frame_size
;
...
...
libcelt/celt.h
View file @
276de721
...
...
@@ -56,8 +56,11 @@ extern "C" {
#define CELT_CORRUPTED_DATA -4
/* Requests */
/** GET the frame size used in the current mode */
#define CELT_GET_FRAME_SIZE 1000
/** GET the lookahead used in the current mode */
#define CELT_GET_LOOKAHEAD 1001
/** GET the number of channels used in the current mode */
#define CELT_GET_NB_CHANNELS 1002
...
...
libcelt/modes.h
View file @
276de721
...
...
@@ -35,6 +35,9 @@
#include "celt_types.h"
#include "celt.h"
/** Mode definition (opaque)
@brief Mode definition
*/
struct
CELTMode
{
int
overlap
;
int
mdctSize
;
...
...
@@ -45,15 +48,15 @@ struct CELTMode {
int
nbPBands
;
int
pitchEnd
;
const
int
*
eBands
;
const
int
*
pBands
;
const
int
*
eBands
;
/**< Definition for each "pseudo-critical band" */
const
int
*
pBands
;
/**< Definition of the bands used for the pitch */
float
ePredCoef
;
float
ePredCoef
;
/**< Prediction coefficient for the energy encoding */
int
nbAllocVectors
;
const
int
*
allocVectors
;
int
nbAllocVectors
;
/**< Number of lines in the matrix below */
const
int
*
allocVectors
;
/**< Number of bits in each band for several rates */
const
int
*
const
*
bits
;
const
int
*
const
*
bits
;
/**< Cache for pulses->bits mapping in each band */
};
...
...
libcelt/vq.h
View file @
276de721
/* (C) 2007 Jean-Marc Valin, CSIRO
*/
/**
@file vq.h
@brief Vector quantisation of the residual
*/
/*
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
...
...
@@ -66,7 +70,7 @@ void alg_unquant(float *x, int N, int K, float *p, float alpha, ec_dec *dec);
* @param N Number of samples to encode
* @param K Number of pulses to use
* @param Y Lower frequency spectrum to use, normalised to the same standard deviation
* @param
p
Pitch vector (it is assumed that p+x is a unit vector)
* @param
P
Pitch vector (it is assumed that p+x is a unit vector)
* @param B Stride (number of channels multiplied by the number of MDCTs per frame)
* @param N0 Number of valid offsets
* @param enc Entropy encoder state
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment