Commit 276de721 authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

Mode doc

parent 879fbfd5
......@@ -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);
......
......@@ -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;
......
......@@ -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
......
......@@ -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 */
};
......
/* (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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment