low bit-rate codebooks optimized
authorjmvalin <jmvalin@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Tue, 11 Jun 2002 08:27:08 +0000 (08:27 +0000)
committerjmvalin <jmvalin@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Tue, 11 Jun 2002 08:27:08 +0000 (08:27 +0000)
git-svn-id: http://svn.xiph.org/trunk/speex@3374 0101bb08-14d6-0310-b084-bc0e0c8e3800

libspeex/exc_10_32_table.c
libspeex/gain_table_lbr.c [new file with mode: 0644]
libspeex/modes.c

index 357c2de..71942ca 100644 (file)
@@ -1,32 +1,33 @@
-float exc_10_32_table[32][10]={{-0.0650833,-0.0127175,0.15243,0.412487,0.70276,0.648247,0.239389,-0.481389,-0.971266,-0.782175},
-{0.823255,-1.38751,1.46535,-0.74324,-0.0729989,0.310202,-0.346112,0.364435,-0.304743,0.208398},
-{0.925485,-1.02196,0.269,0.67272,-0.984351,0.76207,-0.315047,-0.121744,0.192334,-0.135836},
-{-0.629032,0.849876,-0.951448,0.75439,-0.0329939,-0.700964,0.876844,-0.690453,0.564513,-0.394044},
-{-0.0417819,0.0446498,-0.0210186,-0.0319054,0.0492155,0.1814,-0.984497,1.96363,-1.62843,0.480187},
-{0.159291,-0.155808,0.0397108,-0.287783,1.25157,-1.71232,0.555061,0.704883,-0.61184,0.117399},
-{-1.01205,1.80694,-1.64157,0.683777,-0.2295,0.290442,-0.276946,0.204107,-0.201362,0.218884},
-{0.112654,-0.132651,0.129492,-0.152157,0.204945,-0.22453,0.357274,-1.04578,1.98288,-1.84874},
-{0.184115,0.246724,0.0753163,-0.120653,-0.487387,-0.594183,-0.528711,0.138581,0.767295,1.22995},
-{1.29268,0.594388,-0.236972,-0.532,-0.266004,-0.106981,0.0568159,-0.0222551,-0.0831287,-0.190151},
-{-0.805679,0.964487,-1.1675,1.3281,-1.24135,0.999758,-0.941164,0.922136,-0.852255,0.737061},
-{0.842752,-1.21308,1.49299,-1.42549,1.18894,-0.959532,0.85528,-0.747771,0.658172,-0.60694},
-{-0.0532811,0.0787138,-0.122763,0.0329663,0.0427411,0.62878,-1.74116,1.22109,0.365764,-0.678148},
-{-0.750448,0.1252,1.27873,-0.747464,-0.640997,0.404841,0.321208,-0.277069,0.00380886,0.0361227},
-{-0.13398,0.245071,-0.162342,0.107937,-0.156469,0.127712,-0.155854,0.195145,-0.279554,0.167991},
-{-0.685915,-0.434041,0.461219,0.814491,0.437365,-0.364736,-0.672887,-0.323771,0.129575,0.252148},
-{-0.0659221,-0.517433,0.366341,0.833583,-0.913421,-0.695998,0.86603,0.531177,-0.508925,-0.271964},
-{1.82897,-1.59782,0.343249,-0.138259,0.449941,-0.40065,0.239173,-0.244677,0.276439,-0.223304},
-{0.694612,0.0273125,-1.50751,1.27622,0.0148847,-0.186515,-0.237778,0.238604,-0.105283,0.086892},
-{0.120101,-0.100098,0.0237457,0.117561,-0.298729,0.0549176,1.04098,-2.00316,1.27185,-0.112897},
-{-0.0732836,0.0706076,-0.115325,0.116897,-0.150037,0.2285,-0.2878,0.602568,-1.58479,2.02217},
-{-0.624569,0.9511,-0.225748,-1.10234,1.34359,-0.63785,0.280883,-0.271444,0.297317,-0.208585},
-{-1.78726,1.12847,-0.0442747,0.113599,-0.219116,0.180292,-0.164597,0.294796,-0.309492,0.168715},
-{-0.0954666,0.0746028,-0.0196098,0.0594211,-0.132036,0.0351186,-0.063248,0.438139,0.525251,-1.87477},
-{0.101718,-0.0828372,0.0866638,-0.183715,0.168252,-0.419872,1.08406,-0.856321,-0.747,1.31035},
-{0.351146,-0.394581,0.404593,-0.339666,0.374607,-0.414098,0.334761,-0.347885,0.425438,-0.3967},
-{-0.313345,0.482818,-0.688464,1.27194,-1.67114,1.07701,-0.103382,-0.330088,0.33062,-0.195219},
-{0.0849411,-0.132119,0.249548,-0.495836,1.01882,-1.67923,1.85051,-1.34076,0.829642,-0.600037},
-{0.0469392,-0.046845,-0.00332371,0.376391,-1.20727,1.81952,-1.56888,0.962301,-0.75061,0.623107},
-{0.0976541,-0.35783,1.01755,-1.62301,1.29225,-0.187937,-0.467274,0.421445,-0.350532,0.296101},
-{0.0348442,0.380331,-0.245299,-0.615952,0.252616,1.18765,-0.809042,-0.743674,0.575318,0.253249},
-{-0.592265,-0.797179,-0.715578,-0.374579,0.0758649,0.412432,0.568196,0.618405,0.448291,0.250063}};
+float exc_10_32_table[32][10]={
+{0.222614,0.519906,0.537807,0.834900,0.768574,0.698440,0.362245,0.125146,-0.104380,0.003991},
+{0.867091,-1.114772,1.210990,-0.744193,-0.478554,0.081265,-0.273419,0.480983,-0.147815,0.319687},
+{0.983006,-0.881476,0.343687,0.965425,-0.641360,0.280279,-0.339666,-0.349123,-0.070611,-0.220298},
+{-0.795489,0.441574,-0.674492,0.977338,0.118829,-0.449269,0.601377,-0.363410,0.431172,-0.171828},
+{0.132466,-0.222414,0.121165,-0.156902,0.282957,0.015570,-0.074355,1.327889,-1.478003,-0.502083},
+{0.025235,0.248915,-0.011890,0.286748,0.713845,-1.782006,-0.008702,0.881211,-0.329416,0.198051},
+{-0.958368,1.733103,-1.402455,0.080580,-0.170500,0.118395,0.049854,-0.051642,0.129305,-0.227595},
+{-0.094473,0.183241,-0.070073,0.225667,-0.079733,0.373938,0.168234,0.265017,1.679037,-0.325572},
+{0.254587,-0.206706,-0.263872,-0.761719,-0.786256,-0.845135,-0.446708,-0.143573,0.244240,0.164994},
+{1.366623,0.725273,0.149911,-0.291234,-0.332664,-0.329218,-0.395677,-0.288548,-0.375476,-0.249523},
+{-0.907199,-0.261195,-0.679940,0.191020,-0.481865,0.096753,-0.362971,-0.024393,-0.161747,-0.108619},
+{1.057318,-0.027304,0.915603,-0.509152,0.519639,-0.110496,0.388927,0.051398,0.033018,0.132582},
+{-0.049141,-0.137637,0.061384,-0.022765,0.340992,-0.106803,-1.631081,0.865349,0.950185,-0.268698},
+{-1.004759,0.780442,1.366369,-0.614946,-0.754159,0.127529,0.188085,-0.040931,0.008123,0.012819},
+{-0.079061,0.215337,-0.137278,-0.123618,-0.218604,-0.191322,-0.276231,-0.066509,-0.321451,-0.213928},
+{-0.768461,-0.327320,0.701414,0.896780,0.409488,-0.410814,-0.675160,-0.420661,-0.119706,-0.012850},
+{-0.120626,-0.498542,0.318433,0.453289,-1.135028,-0.760364,0.877979,0.772727,-0.033744,-0.085209},
+{2.061536,-1.026406,-0.351049,-0.474214,0.200347,0.004968,0.105561,0.113149,-0.071619,0.147569},
+{0.741957,-0.619200,-1.478054,0.901890,0.595183,-0.050624,-0.139683,-0.044306,0.011491,-0.043994},
+{-0.063578,0.094618,0.021315,0.255759,-0.355425,0.158380,0.168131,-1.776015,0.859523,0.889441},
+{0.000153,-0.498223,0.137631,-0.113421,0.383822,-0.178743,-0.020550,0.053229,-0.629225,1.892103},
+{-0.275320,0.753062,-0.693922,-1.327873,0.911359,0.184806,0.517060,0.247931,0.139503,0.048961},
+{-2.039659,0.456796,0.264935,0.316707,0.156900,0.181944,0.152528,0.099029,0.053452,-0.076584},
+{-0.103893,0.167002,-0.266384,0.123452,-0.148573,0.707334,0.409610,0.732516,-0.092144,-1.972234},
+{0.085041,-0.153236,-0.134474,-0.175246,0.012377,-0.079804,0.705222,-1.122601,-1.439888,0.288656},
+{0.150406,0.157781,0.257320,0.137059,0.274465,-0.162830,0.026549,-0.084041,0.298488,0.027517},
+{-0.182249,0.319635,-0.350370,0.739379,-1.474439,0.969650,0.693391,-0.361626,0.443915,-0.321488},
+{0.176029,0.347990,-0.206128,-0.228386,0.224059,-0.973617,1.600652,-0.388001,-0.179744,0.217642},
+{0.179759,-0.518558,0.272426,-0.335904,-0.610544,1.624513,-0.601024,0.086539,-0.174046,-0.186019},
+{-0.236881,-0.167430,0.729064,-1.279726,1.152136,0.031319,-0.669390,0.326712,-0.429779,0.251144},
+{0.230600,0.147018,-0.468695,-0.482089,0.709099,1.209565,-0.802651,-1.024772,0.210781,0.047537},
+{-1.007410,-0.923338,-0.662811,-0.258064,0.110833,0.362967,0.519989,0.469280,0.442281,0.340309}};
diff --git a/libspeex/gain_table_lbr.c b/libspeex/gain_table_lbr.c
new file mode 100644 (file)
index 0000000..5438dd8
--- /dev/null
@@ -0,0 +1,34 @@
+float gain_cdbk_lbr[] = {
+-0.076653,  -0.400029,  0.248728,  -0.153306,  -0.800058,  0.497456,  -0.0613268,  0.198997,  0.0381315,  -0.00587568,  -0.160023,  -0.0618656,
+-0.077132,  0.091150,  -0.146274,  -0.154264,  0.1823,  -0.292548,  0.0140612,  0.0266658,  -0.0225648,  -0.00594935,  -0.00830832,  -0.0213961,
+-0.312034,  -0.001073,  -0.317999,  -0.624068,  -0.002146,  -0.635998,  -0.000669625,  -0.000682426,  -0.198453,  -0.0973652,  -1.15133e-06,  -0.101123,
+0.292708,  0.924924,  -0.112980,  0.585416,  1.84985,  -0.22596,  -0.541465,  0.208996,  0.0661403,  -0.085678,  -0.855484,  -0.0127645,
+0.437305,  -0.181913,  0.263852,  0.87461,  -0.363826,  0.527704,  0.159103,  0.0959962,  -0.230768,  -0.191236,  -0.0330923,  -0.0696179,
+-0.130010,  0.684455,  0.300845,  -0.26002,  1.36891,  0.60169,  0.177972,  -0.41183,  0.0782257,  -0.0169026,  -0.468479,  -0.0905077,
+0.398347,  0.176107,  0.353970,  0.796694,  0.352214,  0.70794,  -0.140303,  -0.124673,  -0.282006,  -0.15868,  -0.0310137,  -0.125295,
+0.424364,  0.564410,  -0.211682,  0.848728,  1.12882,  -0.423364,  -0.479031,  0.238951,  0.17966,  -0.180085,  -0.318559,  -0.0448093,
+0.185387,  -0.485193,  -0.307452,  0.370774,  -0.970386,  -0.614904,  0.179897,  -0.298347,  0.113995,  -0.0343683,  -0.235412,  -0.0945267,
+-0.074192,  0.917143,  0.124575,  -0.148384,  1.83429,  0.24915,  0.136089,  -0.228506,  0.0184849,  -0.00550445,  -0.841151,  -0.0155189,
+0.174834,  0.650922,  -0.065446,  0.349668,  1.30184,  -0.130892,  -0.227607,  0.0852005,  0.0228844,  -0.0305669,  -0.423699,  -0.00428318,
+0.429503,  0.798689,  -0.228999,  0.859006,  1.59738,  -0.457998,  -0.686079,  0.365798,  0.196712,  -0.184473,  -0.637904,  -0.0524405,
+-0.389157,  -0.448296,  0.019225,  -0.778314,  -0.896592,  0.03845,  -0.348915,  0.017237,  0.0149631,  -0.151443,  -0.200969,  -0.000369601,
+-0.152244,  0.474537,  0.146533,  -0.304488,  0.949074,  0.293066,  0.144491,  -0.139071,  0.0446175,  -0.0231782,  -0.225185,  -0.0214719,
+0.229525,  0.319147,  0.069499,  0.45905,  0.638294,  0.138998,  -0.146504,  -0.0443608,  -0.0319035,  -0.0526817,  -0.101855,  -0.00483011,
+0.726268,  0.870713,  0.024152,  1.45254,  1.74143,  0.048304,  -1.26474,  -0.0420589,  -0.0350816,  -0.527465,  -0.758141,  -0.000583319,
+0.015489,  -0.249006,  -0.033405,  0.030978,  -0.498012,  -0.06681,  0.00771371,  -0.0166361,  0.00103482,  -0.000239909,  -0.062004,  -0.00111589,
+0.132693,  0.995311,  0.475460,  0.265386,  1.99062,  0.95092,  -0.264142,  -0.946461,  -0.12618,  -0.0176074,  -0.990644,  -0.226062,
+0.132404,  0.513322,  -0.211400,  0.264808,  1.02664,  -0.4228,  -0.135932,  0.217033,  0.0559804,  -0.0175308,  -0.263499,  -0.04469,
+0.036374,  1.077233,  -0.015546,  0.072748,  2.15447,  -0.031092,  -0.0783665,  0.0334933,  0.00113094,  -0.00132307,  -1.16043,  -0.000241678,
+0.132328,  0.905322,  -0.147946,  0.264656,  1.81064,  -0.295892,  -0.239599,  0.267878,  0.0391548,  -0.0175107,  -0.819608,  -0.021888,
+-0.156682,  0.900903,  0.309452,  -0.313364,  1.80181,  0.618904,  0.282311,  -0.557572,  0.0969711,  -0.0245492,  -0.811626,  -0.0957605,
+0.013532,  0.508207,  0.202289,  0.027064,  1.01641,  0.404578,  -0.0137541,  -0.205609,  -0.00547475,  -0.000183115,  -0.258274,  -0.0409208,
+0.295740,  0.681799,  0.095068,  0.59148,  1.3636,  0.190136,  -0.40327,  -0.129635,  -0.0562308,  -0.0874621,  -0.46485,  -0.00903792,
+0.061578,  -0.738769,  0.092635,  0.123156,  -1.47754,  0.18527,  0.0909838,  0.136872,  -0.0114086,  -0.00379185,  -0.54578,  -0.00858124,
+0.027081,  0.834940,  0.020501,  0.054162,  1.66988,  0.041002,  -0.045222,  -0.0342342,  -0.00111038,  -0.000733381,  -0.697125,  -0.000420291,
+0.033178,  0.016104,  0.054589,  0.066356,  0.032208,  0.109178,  -0.0010686,  -0.0017582,  -0.00362231,  -0.00110078,  -0.000259339,  -0.00297996,
+0.174359,  0.527415,  0.383481,  0.348718,  1.05483,  0.766962,  -0.183919,  -0.404507,  -0.133727,  -0.0304011,  -0.278167,  -0.147058,
+-0.247531,  -0.458807,  -0.314316,  -0.495062,  -0.917614,  -0.628632,  -0.227138,  -0.288421,  -0.155606,  -0.0612716,  -0.210504,  -0.0987945,
+-0.148492,  0.636958,  0.562524,  -0.296984,  1.27392,  1.12505,  0.189166,  -0.716608,  0.167061,  -0.0220499,  -0.405715,  -0.316433,
+0.044877,  0.204425,  0.071699,  0.089754,  0.40885,  0.143398,  -0.018348,  -0.0293141,  -0.00643527,  -0.00201395,  -0.0417896,  -0.00514075,
+0.443971,  0.563942,  -0.029569,  0.887942,  1.12788,  -0.059138,  -0.500748,  0.0333504,  0.0262556,  -0.19711,  -0.318031,  -0.000874326,
+};
index e2bf358..9e4708f 100644 (file)
@@ -30,6 +30,7 @@
 
 /* Extern declarations for all codebooks we use here */
 extern float gain_cdbk_nb[];
+extern float gain_cdbk_lbr[];
 extern float hexc_table[];
 extern float exc_5_256_table[];
 extern float exc_5_64_table[];
@@ -58,7 +59,7 @@ ltp_params ltp_params_nb = {
 
 /* Parameters for Long-Term Prediction (LTP)*/
 ltp_params ltp_params_lbr = {
-   gain_cdbk_nb,
+   gain_cdbk_lbr,
    5,
    4
 };