ref: 276de7211d5d954c2b81f699e7c9f05b84cb2cbc
parent: 879fbfd528c21124dc6a224ebbf8020659ac4160
author: Jean-Marc Valin <[email protected]>
date: Wed Feb 20 12:45:51 EST 2008
Mode doc
--- a/libcelt/bands.h
+++ b/libcelt/bands.h
@@ -78,6 +78,7 @@
* @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 @@
* @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);
--- a/libcelt/celt.c
+++ b/libcelt/celt.c
@@ -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 @@
/****************************************************************************/
-
+/** Decoder state
+ @brief Decoder state
+ */
struct CELTDecoder {
const CELTMode *mode;
int frame_size;
--- a/libcelt/celt.h
+++ b/libcelt/celt.h
@@ -56,8 +56,11 @@
#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
--- a/libcelt/modes.h
+++ b/libcelt/modes.h
@@ -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 @@
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 */
};
--- a/libcelt/vq.h
+++ b/libcelt/vq.h
@@ -1,5 +1,9 @@
/* (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 @@
* @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