[FFmpeg-cvslog] doxy comments for LSF array

Vladimir Voroshilov git at videolan.org
Sat Sep 24 21:17:01 CEST 2011


ffmpeg | branch: master | Vladimir Voroshilov <voroshil at gmail.com> | Tue Jun 23 12:39:33 2009 +0700| [b29e5a6780737f8a11c47714bf1a697a98966a51] | committer: Michael Niedermayer

doxy comments for LSF array

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b29e5a6780737f8a11c47714bf1a697a98966a51
---

 libavcodec/g729data.h |   25 +++++++++++++++++++++++++
 libavcodec/g729dec.c  |    9 +++++++++
 2 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/libavcodec/g729data.h b/libavcodec/g729data.h
index 02d0b93..05b4041 100644
--- a/libavcodec/g729data.h
+++ b/libavcodec/g729data.h
@@ -247,6 +247,25 @@ static const int16_t cb_gain_2nd_8k[1<<GC_2ND_IDX_BITS_8K][2] = { /*(1.14) (1.13
 
 /**
  * 4th order Moving Average (MA) Predictor codebook (3.2.4 of G.729)
+ *
+ * float cb_ma_predictor_float[2][MA_NP][10] = {
+ *   {
+ *     {0.2570, 0.2780, 0.2800, 0.2736, 0.2757, 0.2764, 0.2675, 0.2678, 0.2779, 0.2647},
+ *     {0.2142, 0.2194, 0.2331, 0.2230, 0.2272, 0.2252, 0.2148, 0.2123, 0.2115, 0.2096},
+ *     {0.1670, 0.1523, 0.1567, 0.1580, 0.1601, 0.1569, 0.1589, 0.1555, 0.1474, 0.1571},
+ *     {0.1238, 0.0925, 0.0798, 0.0923, 0.0890, 0.0828, 0.1010, 0.0988, 0.0872, 0.1060},
+ *   },
+ *   {
+ *     {0.2360, 0.2405, 0.2499, 0.2495, 0.2517, 0.2591, 0.2636, 0.2625, 0.2551, 0.2310},
+ *     {0.1285, 0.0925, 0.0779, 0.1060, 0.1183, 0.1176, 0.1277, 0.1268, 0.1193, 0.1211},
+ *     {0.0981, 0.0589, 0.0401, 0.0654, 0.0761, 0.0728, 0.0841, 0.0826, 0.0776, 0.0891},
+ *     {0.0923, 0.0486, 0.0287, 0.0498, 0.0526, 0.0482, 0.0621, 0.0636, 0.0584, 0.0794},
+ *   },
+ * };
+ *                                    15
+ * cb_ma_predictor[j][k][i] = floor( 2 * cb_ma_predictor_float[j][k][i] )
+ *
+ * j=0..1, i=0..9, k=0..MA_NP-1
  */
 static const int16_t cb_ma_predictor[2][MA_NP][10] = { /* (0.15) */
   {
@@ -263,6 +282,12 @@ static const int16_t cb_ma_predictor[2][MA_NP][10] = { /* (0.15) */
   }
 };
 
+/**
+ *                                     15         3
+ * cb_ma_predictor_sum[j][i] = floor( 2 * (1.0 - sum ( cb_ma_predictor_float[j][k][i] ) ) )
+ *                                               k=0
+ * j=0..1, i=0..9
+ */
 static const int16_t cb_ma_predictor_sum[2][10] = { /* (0.15) */
   { 7798,  8447,  8205,  8293,  8126,  8477,  8447,  8703,  9043,  8604},
   {14585, 18333, 19772, 17344, 16426, 16459, 15155, 15220, 16043, 15708}
diff --git a/libavcodec/g729dec.c b/libavcodec/g729dec.c
index 7305ebb..b8dba42 100644
--- a/libavcodec/g729dec.c
+++ b/libavcodec/g729dec.c
@@ -128,6 +128,15 @@ static inline int get_parity(uint8_t value)
    return (0x6996966996696996ULL >> (value >> 2)) & 1;
 }
 
+/*
+ * Decodes LSF (Line Spectral Frequencies) from L0-L3 (3.2.4).
+ * @param lsfq [out] (2.13) quantized LSF coefficients
+ * @param past_quantizer_outputs [in/out] (2.13) quantizer outputs from previous frames
+ * @param ma_predictor switched MA predictor of LSP quantizer
+ * @param vq_1st first stage vector of quantizer
+ * @param vq_2nd_low second stage lower vector of LSP quantizer
+ * @param vq_2nd_high second stage higher vector of LSP quantizer
+ */
 static void lsf_decode(int16_t* lsfq, int16_t* past_quantizer_outputs[MA_NP + 1],
                        int16_t ma_predictor,
                        int16_t vq_1st, int16_t vq_2nd_low, int16_t vq_2nd_high)



More information about the ffmpeg-cvslog mailing list