libavcodec/g729data.h File Reference

#include <stdint.h>

Go to the source code of this file.

Defines

#define MA_NP   4
 Moving Average (MA) prediction order.
#define VQ_1ST_BITS   7
 first stage vector of quantizer (size in bits)
#define VQ_2ND_BITS   5
 second stage vector of quantizer (size in bits)
#define GC_1ST_IDX_BITS_8K   3
 gain codebook (first stage) index, 8k mode (size in bits)
#define GC_2ND_IDX_BITS_8K   4
 gain codebook (second stage) index, 8k mode (size in bits)
#define GC_1ST_IDX_BITS_6K4   3
 gain codebook (first stage) index, 6.4k mode (size in bits)
#define GC_2ND_IDX_BITS_6K4   3
 gain codebook (second stage) index, 6.4k mode (size in bits)

Variables

static const int16_t cb_lsp_1st [1<< VQ_1ST_BITS][10]
 first stage LSP codebook (10-dimensional, with 128 entries (3.24 of G.729)
static const int16_t cb_lsp_2nd [1<< VQ_2ND_BITS][10]
 second stage LSP codebook, high and low parts (both 5-dimensional, with 32 entries (3.2.4 of G.729)
static const int16_t cb_gain_1st_8k [1<< GC_1ST_IDX_BITS_8K][2]
 gain codebook (first stage), 8k mode (3.9.2 of G.729)
static const int16_t cb_gain_2nd_8k [1<< GC_2ND_IDX_BITS_8K][2]
 gain codebook (second stage), 8k mode (3.9.2 of G.729)
static const int16_t cb_gain_1st_6k4 [1<< GC_1ST_IDX_BITS_6K4][2]
 gain codebook (first stage), 6.4k mode (D.3.9.2 of G.729)
static const int16_t cb_gain_2nd_6k4 [1<< GC_2ND_IDX_BITS_6K4][2]
 gain codebook (second stage), 6.4k mode (D.3.9.2 of G.729)
static const int16_t cb_ma_predictor [2][MA_NP][10]
 4th order Moving Average (MA) Predictor codebook (3.2.4 of G.729)
static const int16_t cb_ma_predictor_sum [2][10]
 15 3 cb_ma_predictor_sum[j][i] = floor( 2 * (1.0 - sum ( cb_ma_predictor_float[j][k][i] ) ) ) k=0 j=0.
static const int16_t cb_ma_predictor_sum_inv [2][10]
 12 2 cb_ma_predictor_sum_inv[j][i] = floor(---------------------------------------------) 3 1.0 - sum ( cb_ma_predictor_float[j][k][i] ) k=0 j=0.
static const uint16_t ma_prediction_coeff [4]
 MA prediction coefficients (3.9.1 of G.729, near Equation 69).
static const int16_t lsp_init [10]
 initial LSP coefficients belongs to virtual frame preceding the first frame of the stream
static const int16_t phase_filter [3][40]
 additional "phase" post-processing filter impulse response (D.6.2 of G.729)


Define Documentation

#define GC_1ST_IDX_BITS_6K4   3

gain codebook (first stage) index, 6.4k mode (size in bits)

Definition at line 35 of file g729data.h.

#define GC_1ST_IDX_BITS_8K   3

gain codebook (first stage) index, 8k mode (size in bits)

Definition at line 32 of file g729data.h.

#define GC_2ND_IDX_BITS_6K4   3

gain codebook (second stage) index, 6.4k mode (size in bits)

Definition at line 36 of file g729data.h.

#define GC_2ND_IDX_BITS_8K   4

gain codebook (second stage) index, 8k mode (size in bits)

Definition at line 33 of file g729data.h.

#define MA_NP   4

Moving Average (MA) prediction order.

Definition at line 27 of file g729data.h.

Referenced by decode_frame(), decoder_init(), lsf_decode(), and lsf_restore_from_previous().

#define VQ_1ST_BITS   7

first stage vector of quantizer (size in bits)

Definition at line 29 of file g729data.h.

Referenced by decode_frame().

#define VQ_2ND_BITS   5

second stage vector of quantizer (size in bits)

Definition at line 30 of file g729data.h.

Referenced by decode_frame().


Variable Documentation

const int16_t cb_gain_1st_6k4[1<< GC_1ST_IDX_BITS_6K4][2] [static]

Initial value:

{ 
 { 5849,     0 },
 { 3171,  9280 },
 { 3617,  6747 },
 { 4987, 22294 },
 { 2929,  1078 },
 { 6068,  6093 },
 { 9425,  2731 },
 { 3915, 12872 },
}
gain codebook (first stage), 6.4k mode (D.3.9.2 of G.729)

Definition at line 251 of file g729data.h.

Referenced by decode_frame().

const int16_t cb_gain_1st_8k[1<< GC_1ST_IDX_BITS_8K][2] [static]

Initial value:

 { 
  { 3242 ,  9949 },
  { 1551 ,  2425 },
  { 2678 , 27162 },
  { 1921 ,  9291 },
  { 1831 ,  5022 },
  {    1 ,  1516 },
  {  356 , 14756 },
  {   57 ,  5404 },
}
gain codebook (first stage), 8k mode (3.9.2 of G.729)

Definition at line 215 of file g729data.h.

Referenced by decode_frame().

const int16_t cb_gain_2nd_6k4[1<< GC_2ND_IDX_BITS_6K4][2] [static]

Initial value:

{ 
 {    0,  4175 },
 {10828, 27602 },
 {16423, 15724 },
 { 4478,  7324 },
 { 3988,     0 },
 {10291, 11385 },
 {11956, 10735 },
 { 7876,  7821 },
}
gain codebook (second stage), 6.4k mode (D.3.9.2 of G.729)

Definition at line 266 of file g729data.h.

Referenced by decode_frame().

const int16_t cb_gain_2nd_8k[1<< GC_2ND_IDX_BITS_8K][2] [static]

Initial value:

 { 
  {  5142 ,   592 },
  { 17299 ,  1861 },
  {  6160 ,  2395 },
  { 16112 ,  3392 },
  {   826 ,  2005 },
  { 18973 ,  5935 },
  {  1994 ,     0 },
  { 15434 ,   237 },
  { 10573 ,  2966 },
  { 15132 ,  4914 },
  { 11569 ,  1196 },
  { 14194 ,  1630 },
  {  8091 ,  4861 },
  { 15161 , 14276 },
  {  9120 ,   525 },
  { 13260 ,  3256 },
}
gain codebook (second stage), 8k mode (3.9.2 of G.729)

Definition at line 229 of file g729data.h.

Referenced by decode_frame().

const int16_t cb_lsp_1st[1<< VQ_1ST_BITS][10] [static]

first stage LSP codebook (10-dimensional, with 128 entries (3.24 of G.729)

Definition at line 42 of file g729data.h.

Referenced by lsf_decode().

const int16_t cb_lsp_2nd[1<< VQ_2ND_BITS][10] [static]

second stage LSP codebook, high and low parts (both 5-dimensional, with 32 entries (3.2.4 of G.729)

Definition at line 177 of file g729data.h.

Referenced by lsf_decode().

const int16_t cb_ma_predictor[2][MA_NP][10] [static]

Initial value:

 { 
  {
    { 8421,  9109,  9175,  8965,  9034,  9057,  8765,  8775,  9106,  8673},
    { 7018,  7189,  7638,  7307,  7444,  7379,  7038,  6956,  6930,  6868},
    { 5472,  4990,  5134,  5177,  5246,  5141,  5206,  5095,  4830,  5147},
    { 4056,  3031,  2614,  3024,  2916,  2713,  3309,  3237,  2857,  3473}
  },
  {
    { 7733,  7880,  8188,  8175,  8247,  8490,  8637,  8601,  8359,  7569},
    { 4210,  3031,  2552,  3473,  3876,  3853,  4184,  4154,  3909,  3968},
    { 3214,  1930,  1313,  2143,  2493,  2385,  2755,  2706,  2542,  2919},
    { 3024,  1592,   940,  1631,  1723,  1579,  2034,  2084,  1913,  2601}
  }
}
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

Definition at line 300 of file g729data.h.

Referenced by lsf_decode(), and lsf_restore_from_previous().

const int16_t cb_ma_predictor_sum[2][10] [static]

Initial value:

 { 
  { 7798,  8447,  8205,  8293,  8126,  8477,  8447,  8703,  9043,  8604},
  {14585, 18333, 19772, 17344, 16426, 16459, 15155, 15220, 16043, 15708}
}
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

Definition at line 321 of file g729data.h.

Referenced by lsf_decode().

const int16_t cb_ma_predictor_sum_inv[2][10] [static]

Initial value:

 { 
  {17210, 15888, 16357, 16183, 16516, 15833, 15888, 15421, 14840, 15597},
  { 9202,  7320,  6788,  7738,  8170,  8154,  8856,  8818,  8366,  8544}
}
12 2 cb_ma_predictor_sum_inv[j][i] = floor(---------------------------------------------) 3 1.0 - sum ( cb_ma_predictor_float[j][k][i] ) k=0 j=0.

.1, i=0..9

Definition at line 335 of file g729data.h.

Referenced by lsf_restore_from_previous().

const int16_t lsp_init[10] [static]

Initial value:

 { 
   30000, 26000, 21000, 15000, 8000, 0, -8000,-15000,-21000,-26000
}
initial LSP coefficients belongs to virtual frame preceding the first frame of the stream

Definition at line 351 of file g729data.h.

Referenced by decoder_init().

const uint16_t ma_prediction_coeff[4] [static]

Initial value:

 { 
  5571, 4751, 2785, 1556
}
MA prediction coefficients (3.9.1 of G.729, near Equation 69).

Definition at line 343 of file g729data.h.

Referenced by decode_frame().

const int16_t phase_filter[3][40] [static]

Initial value:

{
  { 
    14690, 11518,  1268, -2762, -5672,  7514,  -36, -2808, -3041,  4823,
     2952, -8425,  3785,  1455,  2179, -8638, 8051, -2104, -1455,   777,
     1108, -2386,  2254,  -364,  -675, -2104, 6046, -5682,  1072,  3123,
    -5059,  5312, -2330, -3729,  6924, -3890,  675, -1776,    29, 10145,
  },
  { 
    30274,  3831, -4037,  2972, -1049, -1003,  2477, -3044,  2815, -2232,
     1753, -1612,  1714, -1776,  1543, -1009,   429,  -170,   472, -1265,
     2176, -2707,  2523, -1622,   344,   826, -1530,  1724, -1658,  1701,
    -2064,  2644, -3061,  2897, -1979,   557,   780, -1370,   842,   655,
  },
  { 
    32767, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  }
}
additional "phase" post-processing filter impulse response (D.6.2 of G.729)

Table contains three impulse responses, correspond to different amounts of spreading.

Definition at line 361 of file g729data.h.

Referenced by g729d_get_new_exc().


Generated on Fri Oct 26 02:43:47 2012 for FFmpeg by  doxygen 1.5.8