Commit 3c0acdd9 authored by jm's avatar jm
Browse files

Transformed all excitation codebooks into sighed short arrays, reducing

their size (in the final binary) by a factor of 4.


git-svn-id: http://svn.xiph.org/trunk/speex@4295 0101bb08-14d6-0310-b084-bc0e0c8e3800
parent 4d67bc7b
......@@ -36,6 +36,8 @@
#include "vq.h"
#include "misc.h"
#include <math.h>
void split_cb_search_shape_sign(
float target[], /* target vector */
float ak[], /* LPCs for this subframe */
......@@ -60,7 +62,7 @@ int complexity
float **ot, **nt;
int **nind, **oind;
int *ind;
float *shape_cb;
signed char *shape_cb;
int shape_cb_size, subvect_size, nb_subvect;
split_cb_params *params;
int N=2;
......@@ -126,7 +128,7 @@ int complexity
for (i=0;i<shape_cb_size;i++)
{
float *res;
float *shape;
signed char *shape;
res = resp+i*subvect_size;
shape = shape_cb+i*subvect_size;
......@@ -136,7 +138,7 @@ int complexity
{
res[j]=0;
for (k=0;k<=j;k++)
res[j] += shape[k]*r[j-k];
res[j] += 0.03125*shape[k]*r[j-k];
}
/* Compute codeword energy */
......@@ -220,7 +222,7 @@ int complexity
rind-=shape_cb_size;
}
g=sign*shape_cb[rind*subvect_size+m];
g=sign*0.03125*shape_cb[rind*subvect_size+m];
q=subvect_size-m;
for (n=subvect_size*(i+1);n<nsf;n++,q++)
t[n] -= g*r[q];
......@@ -289,7 +291,7 @@ int complexity
}
for (j=0;j<subvect_size;j++)
e[subvect_size*i+j]=sign*shape_cb[rind*subvect_size+j];
e[subvect_size*i+j]=sign*0.03125*shape_cb[rind*subvect_size+j];
}
/* Update excitation */
for (j=0;j<nsf;j++)
......@@ -313,7 +315,7 @@ char *stack
{
int i,j;
int *ind, *signs;
float *shape_cb;
signed char *shape_cb;
int shape_cb_size, subvect_size, nb_subvect;
split_cb_params *params;
int have_sign;
......@@ -344,7 +346,7 @@ char *stack
if (signs[i])
s=-1;
for (j=0;j<subvect_size;j++)
exc[subvect_size*i+j]+=s*shape_cb[ind[i]*subvect_size+j];
exc[subvect_size*i+j]+=s*0.03125*shape_cb[ind[i]*subvect_size+j];
}
}
......
......@@ -38,7 +38,7 @@
typedef struct split_cb_params {
int subvect_size;
int nb_subvect;
float *shape_cb;
signed char *shape_cb;
int shape_bits;
int have_sign;
} split_cb_params;
......
/* Copyright (C) 2002 Jean-Marc Valin
File: exc_10_16_table.c
Codebook for excitation in narrowband CELP mode (3200 bps)
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
- Neither the name of the Xiph.org Foundation nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
float exc_10_16_table[16][10]={
{0.672920,1.231544,0.429817,1.384486,0.338981,1.107532,-0.060037,0.714487,-0.120983,0.178255},
{1.447673,-0.875039,0.412456,-0.856655,-0.731211,0.387585,0.137510,0.631255,-0.152618,0.274417},
{1.167214,-0.552696,-0.722937,0.719901,-0.002841,0.287706,-0.196612,-0.636736,0.109596,-0.034344},
{-0.544655,-0.150252,-0.118561,0.522666,0.009056,0.023425,0.286494,-0.061322,0.018127,0.076392},
{0.070470,-0.360622,0.253374,-0.774034,1.226684,0.460159,0.287595,0.487105,-1.724375,-0.354565},
{0.273119,0.358771,0.155824,0.321754,-0.052317,-1.864035,0.245028,0.391091,-0.195698,0.335194},
{-0.512702,0.852019,-1.458236,-0.380709,0.339188,0.036204,0.504249,-0.216133,0.265968,-0.079673},
{-0.897480,0.276487,-0.422062,0.796802,-0.580294,1.062758,1.130878,0.376637,1.254328,-0.327360},
{-0.083722,-0.761485,-0.423256,-1.163996,-0.668986,-1.080118,-0.051286,-1.112546,0.104534,-0.176028},
{2.097711,0.861951,0.184816,-0.527173,-0.092463,-0.389416,-0.486964,-0.483164,-0.525122,-0.233066},
{-1.831345,-1.111528,-0.411369,0.033902,0.224034,0.017868,0.073562,0.315528,0.069976,0.343412},
{0.414476,0.308949,0.256880,-0.046960,0.227517,0.086626,0.149760,0.115483,0.073386,0.062901},
{-0.081650,-0.250841,0.124951,-0.163551,0.183490,0.208921,-1.298954,0.472797,1.101948,-0.060043},
{-1.438355,1.183894,0.863996,-0.609935,-0.292002,0.018439,0.206740,-0.082611,-0.005861,-0.062936},
{-0.142826,-0.119908,-0.076033,-0.140005,-0.239610,-0.081487,-0.235004,-0.164567,-0.230740,-0.138510},
{-0.475186,-0.873378,1.637971,0.993813,0.147026,-0.162624,-0.522283,-0.627300,-0.326108,-0.022353}};
signed char exc_10_16_table[16][10] = {
{22,39,14,44,11,35,-2,23,-4,6},
{46,-28,13,-27,-23,12,4,20,-5,9},
{37,-18,-23,23,0,9,-6,-20,4,-1},
{-17,-5,-4,17,0,1,9,-2,1,2},
{2,-12,8,-25,39,15,9,16,-55,-11},
{9,11,5,10,-2,-60,8,13,-6,11},
{-16,27,-47,-12,11,1,16,-7,9,-3},
{-29,9,-14,25,-19,34,36,12,40,-10},
{-3,-24,-14,-37,-21,-35,-2,-36,3,-6},
{67,28,6,-17,-3,-12,-16,-15,-17,-7},
{-59,-36,-13,1,7,1,2,10,2,11},
{13,10,8,-2,7,3,5,4,2,2},
{-3,-8,4,-5,6,7,-42,15,35,-2},
{-46,38,28,-20,-9,1,7,-3,0,-2},
{-5,-4,-2,-4,-8,-3,-8,-5,-7,-4},
{-15,-28,52,32,5,-5,-17,-20,-10,-1}};
/* Copyright (C) 2002 Jean-Marc Valin
File: exc_10_32_table.c
Codebook for excitation in narrowband CELP mode (4000 bps)
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
- Neither the name of the Xiph.org Foundation nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
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}};
signed char exc_10_32_table[32][10] = {
{7,17,17,27,25,22,12,4,-3,0},
{28,-36,39,-24,-15,3,-9,15,-5,10},
{31,-28,11,31,-21,9,-11,-11,-2,-7},
{-25,14,-22,31,4,-14,19,-12,14,-5},
{4,-7,4,-5,9,0,-2,42,-47,-16},
{1,8,0,9,23,-57,0,28,-11,6},
{-31,55,-45,3,-5,4,2,-2,4,-7},
{-3,6,-2,7,-3,12,5,8,54,-10},
{8,-7,-8,-24,-25,-27,-14,-5,8,5},
{44,23,5,-9,-11,-11,-13,-9,-12,-8},
{-29,-8,-22,6,-15,3,-12,-1,-5,-3},
{34,-1,29,-16,17,-4,12,2,1,4},
{-2,-4,2,-1,11,-3,-52,28,30,-9},
{-32,25,44,-20,-24,4,6,-1,0,0},
{-3,7,-4,-4,-7,-6,-9,-2,-10,-7},
{-25,-10,22,29,13,-13,-22,-13,-4,0},
{-4,-16,10,15,-36,-24,28,25,-1,-3},
{66,-33,-11,-15,6,0,3,4,-2,5},
{24,-20,-47,29,19,-2,-4,-1,0,-1},
{-2,3,1,8,-11,5,5,-57,28,28},
{0,-16,4,-4,12,-6,-1,2,-20,61},
{-9,24,-22,-42,29,6,17,8,4,2},
{-65,15,8,10,5,6,5,3,2,-2},
{-3,5,-9,4,-5,23,13,23,-3,-63},
{3,-5,-4,-6,0,-3,23,-36,-46,9},
{5,5,8,4,9,-5,1,-3,10,1},
{-6,10,-11,24,-47,31,22,-12,14,-10},
{6,11,-7,-7,7,-31,51,-12,-6,7},
{6,-17,9,-11,-20,52,-19,3,-6,-6},
{-8,-5,23,-41,37,1,-21,10,-14,8},
{7,5,-15,-15,23,39,-26,-33,7,2},
{-32,-30,-21,-8,4,12,17,15,14,11}};
float exc_20_32_table[32][20] = {
{0.385835,0.992346,0.796313,1.446102,1.139713,1.017143,0.279276,0.425243,-0.106878,0.184183,0.038228,-0.245123,0.012730,-0.324168,-0.163760,-0.217982,-0.213392,-0.227542,-0.170264,-0.151936},
{0.971193,-0.838796,0.761915,-1.001168,-0.131621,0.314058,-0.358956,0.668808,-0.087411,0.585429,0.717812,-0.296646,0.700731,0.762464,-0.310948,-0.016843,-0.320548,-0.421614,-0.209698,-0.336131},
{1.300680,-1.036860,0.959123,0.599127,-0.249762,-0.007131,-0.309187,-0.496772,0.043369,-0.668863,-0.518291,0.316086,-0.242373,0.438656,0.249137,0.122018,0.355125,-0.057376,0.161573,-0.067216},
{-1.025148,0.359204,-0.507815,1.032122,0.345914,-0.127016,0.284016,-0.138467,0.331290,0.054365,0.199766,-0.165487,0.242338,-0.142125,0.356631,-0.127905,-0.188290,0.811983,-1.129505,-0.496041},
{0.011671,0.129687,-0.053924,-0.240914,0.372778,0.181264,-0.046397,1.065158,-1.452582,-0.696987,0.270583,0.289095,0.658603,0.288260,0.164672,-2.048077,-0.141369,0.821359,0.058932,0.323760},
{0.408075,0.077340,0.588409,0.293135,0.375968,-2.516703,0.104592,0.393360,0.403192,-0.002328,-0.422742,0.690342,-1.106197,0.187115,-0.225966,-0.122861,0.190001,-0.194680,0.306107,-0.172453},
{-0.955610,1.183418,-1.024461,0.010252,-0.318900,-0.342537,0.170888,-0.383625,0.381676,-0.530637,0.157411,0.013592,-0.186269,0.404311,-0.292379,0.296958,0.237922,0.794205,1.018358,0.077626},
{-0.384395,0.259387,-0.201207,0.318145,-0.077994,0.669112,0.215683,0.537019,1.358154,0.151841,0.330280,-0.216059,-0.278106,-0.626328,-1.118496,-0.616814,-0.733059,-0.117618,-0.129731,-0.103909},
{0.849610,-0.290472,-0.272329,-1.517342,-1.229773,-1.173713,-0.351210,-0.283009,0.172041,0.171681,0.703925,0.781676,0.159396,0.091620,0.083648,0.137389,0.032849,0.052800,-0.107164,-0.029171},
{2.713863,1.207143,0.544065,-0.666989,-0.278257,-0.583533,-0.294948,-0.460758,-0.406373,-0.448269,-0.521434,-0.358012,-0.313450,-0.335205,-0.263591,-0.189493,-0.040122,-0.103973,-0.099783,-0.029992},
{-1.691674,-1.066625,-0.831425,-0.256805,-0.343753,-0.123115,-0.156514,0.000917,-0.001975,0.117673,0.246964,0.201293,0.280475,0.217209,0.276448,0.231693,0.196328,0.167198,0.143119,0.153387},
{1.514880,0.303884,0.603754,-0.310767,0.365980,-0.021511,0.284034,-0.088431,0.066848,0.164088,-0.081589,0.064552,-0.064324,-0.074085,-0.008105,-0.069918,-0.808197,0.190970,0.282203,-0.204342},
{-0.502056,-0.275469,0.066395,0.205878,0.207856,-0.149065,-1.353599,0.348577,0.699642,-0.329322,-0.271779,1.061478,1.152068,-0.462842,-0.399558,-0.190709,0.037886,-0.030227,0.032629,0.029476},
{-1.985638,1.765144,1.631739,-0.349145,-0.830419,0.143945,0.119901,0.081185,0.019313,0.064743,0.040646,0.078267,-0.018597,-0.131681,-0.140082,-0.296924,-0.231042,-0.129048,-0.131543,0.051739},
{-0.030559,-0.231545,-0.221884,-0.377203,-0.323813,-0.460783,-0.295142,-0.157309,-0.148739,-0.333705,-0.505932,-0.393362,0.194903,0.495250,0.129282,-0.420668,-0.495023,-0.307201,-0.109728,0.065070},
{-1.474353,-0.392089,0.779041,1.474723,0.590693,-0.429642,-0.617767,-0.239793,-0.537290,0.003881,-0.078881,-0.400310,0.046188,0.176495,-0.541946,-0.422946,0.461712,0.037270,0.303429,0.184004},
{-0.759844,0.012397,-0.320760,0.585986,-2.140632,-0.242911,0.427647,1.524819,0.525373,-0.162524,1.027569,-0.894868,0.108914,-0.118797,-0.012699,0.050330,-0.237233,0.145058,-0.178383,0.074577},
{3.759964,-1.736372,-0.361864,-1.456705,0.712682,-0.268598,0.198618,-0.143019,0.036373,0.066447,-0.145022,0.035130,-0.313634,0.113027,-0.030529,-0.029092,0.125707,-0.038351,0.013620,-0.081670},
{0.940485,-1.623113,-2.090365,0.949771,0.689662,0.350968,-0.017770,-0.135986,0.106887,0.015180,0.216693,0.053881,0.014546,0.042327,-0.303911,-0.130736,-0.251271,-0.397434,0.146890,0.020686},
{0.029633,-0.044113,0.159388,0.417427,-0.278814,-0.083593,-0.319607,-1.946398,0.698646,1.501474,-0.134252,-0.183153,0.077333,0.091292,0.160409,0.046381,0.037752,0.124384,0.020741,0.409460},
{0.090864,-0.616610,0.306949,-0.284595,0.393090,-0.073778,-0.122314,0.294586,-0.621735,1.383154,-0.026121,0.627200,-1.008127,-2.091311,0.588945,0.007938,0.870969,0.335745,0.254418,0.059720},
{-0.348770,0.455005,-0.604507,-1.657717,0.959462,0.064076,1.054576,0.297955,0.196952,-0.110019,-1.827442,0.264742,0.303143,0.404530,0.436989,0.044981,0.376071,0.074242,0.009656,-0.014408},
{-4.262995,1.147041,-0.260538,1.370506,-0.277051,0.799494,-0.078401,0.550266,0.054289,0.190935,0.345641,-0.024946,0.266418,0.022031,0.142033,0.079121,0.007883,0.035092,0.041595,0.073067},
{0.382906,0.099986,-0.074785,-0.107647,0.204940,0.768958,0.270952,0.555063,-0.184521,-1.169576,0.107498,-0.236252,-0.502023,0.097978,-0.302950,-0.215380,0.541929,-1.065573,-1.367053,0.349255},
{0.521566,-0.462151,-0.085519,-0.494477,-0.042172,-0.398518,0.346581,-1.449019,-2.034899,-0.047868,0.255850,0.418121,0.049987,0.133044,0.133524,0.163043,0.472510,0.166609,0.274186,0.175704},
{0.256274,0.072129,0.251612,0.092785,0.319909,-0.024228,0.097667,-0.092256,0.182805,-0.067163,0.097233,0.086064,-0.151065,0.297435,-0.358582,0.213001,0.194301,-0.072778,0.197981,-0.071450},
{-0.269718,0.603940,-0.379499,0.375257,-0.886130,1.200993,0.910549,-0.028665,0.374531,0.071952,0.160101,0.719147,-0.297580,0.100560,0.113843,-0.481381,0.664543,-0.130710,0.103240,0.103560},
{0.191717,0.535866,-0.280262,-0.113455,-0.262102,-0.633476,0.817274,0.161083,-0.314874,0.198765,0.023377,-0.582393,0.566044,-0.478782,-0.383030,1.471533,-0.172203,-0.053126,-0.204375,-0.265743},
{-0.024458,-0.517485,-0.047456,-0.048482,-0.441589,0.928241,-0.433317,0.051121,-0.213779,-0.109931,-0.024182,-0.374648,0.349026,-0.785762,0.494592,-0.083353,-0.371568,0.359167,-0.228303,0.220736},
{-0.521106,0.025764,0.596348,-0.876477,0.958118,-0.209415,-0.300574,0.227734,-0.322891,0.094214,0.382447,0.140715,-0.510845,0.179149,0.743704,1.285724,-0.909848,-1.685125,0.015615,0.028941},
{0.228998,-0.020179,0.148300,-0.177826,0.414240,0.308158,-0.137401,-0.248048,0.237154,-0.280059,-0.853601,-1.668661,-1.183038,-0.023576,0.316119,0.599634,0.516425,0.503233,0.378773,0.361508},
{-0.010699,0.102772,-0.217199,-0.118139,0.392144,0.377085,-0.955779,-0.434499,0.181432,-0.150895,0.105105,0.158355,0.523786,1.346176,1.571707,0.768078,0.301679,0.037410,-0.175212,-0.065956}};
/* Copyright (C) 2002 Jean-Marc Valin
File: exc_20_32_table.c
Codebook for excitation in narrowband CELP mode (2000 bps)
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of the Xiph.org Foundation nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
signed char exc_20_32_table[32][20] = {
{12,32,25,46,36,33,9,14,-3,6,1,-8,0,-10,-5,-7,-7,-7,-5,-5},
{31,-27,24,-32,-4,10,-11,21,-3,19,23,-9,22,24,-10,-1,-10,-13,-7,-11},
{42,-33,31,19,-8,0,-10,-16,1,-21,-17,10,-8,14,8,4,11,-2,5,-2},
{-33,11,-16,33,11,-4,9,-4,11,2,6,-5,8,-5,11,-4,-6,26,-36,-16},
{0,4,-2,-8,12,6,-1,34,-46,-22,9,9,21,9,5,-66,-5,26,2,10},
{13,2,19,9,12,-81,3,13,13,0,-14,22,-35,6,-7,-4,6,-6,10,-6},
{-31,38,-33,0,-10,-11,5,-12,12,-17,5,0,-6,13,-9,10,8,25,33,2},
{-12,8,-6,10,-2,21,7,17,43,5,11,-7,-9,-20,-36,-20,-23,-4,-4,-3},
{27,-9,-9,-49,-39,-38,-11,-9,6,5,23,25,5,3,3,4,1,2,-3,-1},
{87,39,17,-21,-9,-19,-9,-15,-13,-14,-17,-11,-10,-11,-8,-6,-1,-3,-3,-1},
{-54,-34,-27,-8,-11,-4,-5,0,0,4,8,6,9,7,9,7,6,5,5,5},
{48,10,19,-10,12,-1,9,-3,2,5,-3,2,-2,-2,0,-2,-26,6,9,-7},
{-16,-9,2,7,7,-5,-43,11,22,-11,-9,34,37,-15,-13,-6,1,-1,1,1},
{-64,56,52,-11,-27,5,4,3,1,2,1,3,-1,-4,-4,-10,-7,-4,-4,2},
{-1,-7,-7,-12,-10,-15,-9,-5,-5,-11,-16,-13,6,16,4,-13,-16,-10,-4,2},
{-47,-13,25,47,19,-14,-20,-8,-17,0,-3,-13,1,6,-17,-14,15,1,10,6},
{-24,0,-10,19,-69,-8,14,49,17,-5,33,-29,3,-4,0,2,-8,5,-6,2},
{120,-56,-12,-47,23,-9,6,-5,1,2,-5,1,-10,4,-1,-1,4,-1,0,-3},
{30,-52,-67,30,22,11,-1,-4,3,0,7,2,0,1,-10,-4,-8,-13,5,1},
{1,-1,5,13,-9,-3,-10,-62,22,48,-4,-6,2,3,5,1,1,4,1,13},
{3,-20,10,-9,13,-2,-4,9,-20,44,-1,20,-32,-67,19,0,28,11,8,2},
{-11,15,-19,-53,31,2,34,10,6,-4,-58,8,10,13,14,1,12,2,0,0},
{-128,37,-8,44,-9,26,-3,18,2,6,11,-1,9,1,5,3,0,1,1,2},
{12,3,-2,-3,7,25,9,18,-6,-37,3,-8,-16,3,-10,-7,17,-34,-44,11},
{17,-15,-3,-16,-1,-13,11,-46,-65,-2,8,13,2,4,4,5,15,5,9,6},
{8,2,8,3,10,-1,3,-3,6,-2,3,3,-5,10,-11,7,6,-2,6,-2},
{-9,19,-12,12,-28,38,29,-1,12,2,5,23,-10,3,4,-15,21,-4,3,3},
{6,17,-9,-4,-8,-20,26,5,-10,6,1,-19,18,-15,-12,47,-6,-2,-7,-9},
{-1,-17,-2,-2,-14,30,-14,2,-7,-4,-1,-12,11,-25,16,-3,-12,11,-7,7},
{-17,1,19,-28,31,-7,-10,7,-10,3,12,5,-16,6,24,41,-29,-54,0,1},
{7,-1,5,-6,13,10,-4,-8,8,-9,-27,-53,-38,-1,10,19,17,16,12,12},
{0,3,-7,-4,13,12,-31,-14,6,-5,3,5,17,43,50,25,10,1,-6,-2}};
This diff is collapsed.
/* Copyright (C) 2002 Jean-Marc Valin
File: exc_5_64_table.c
Codebook for excitation in narrowband CELP mode (9600 bps)
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
- Neither the name of the Xiph.org Foundation nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
float exc_5_64_table[64][5]={
{0.016425,0.164821,-0.455056,1.521999,-2.059523},
{-1.497349,-0.115601,1.570538,-1.361093,0.205962},
{1.151146,0.508757,-0.557767,0.772791,-0.799325},
{-0.810097,-0.481152,0.603676,0.600439,-0.853233},
{-1.458905,0.890366,1.770542,0.159820,-0.542156},
{-1.006928,-1.284240,2.129538,0.655228,-0.073966},
{1.992338,1.747207,0.256161,-0.506332,-0.391711},
{-0.819146,-0.294833,-0.512275,0.352284,0.178854},
{-1.227813,0.796305,-0.607210,0.702680,-0.969435},
{0.623384,-1.411248,1.722776,-1.336201,0.322234},
{-0.488714,1.474460,-1.236522,1.238058,-0.629270},
{-1.586113,0.101721,-0.536277,-0.426806,-0.462127},
{-0.762491,1.670345,-0.617061,-1.448912,1.442240},
{0.859321,-2.138098,1.003799,0.094170,-0.552824},
{-0.151130,0.268730,-0.975037,0.506791,-0.287829},
{-0.312000,-0.046558,-0.703808,1.484750,2.980198},
{1.455910,0.793829,-1.284661,-0.997638,-0.079170},
{0.454090,-0.794912,-1.714429,1.138468,1.286793},
{-0.831814,0.636744,0.148971,0.407093,0.450897},
{-0.682911,0.157601,0.049977,-0.730020,0.560741},
{1.428390,-0.462806,0.516030,-0.573858,-1.071932},
{-0.150569,-0.236990,0.852551,-1.718521,2.285548},
{0.509981,0.058892,-0.038486,-0.540349,1.239104},
{-2.427606,1.016775,0.000204,0.062276,0.604466},
{0.112731,1.655656,-0.497184,-0.469912,-0.514272},
{-0.871593,-0.080876,-0.400744,1.546034,0.254059},
{-0.214401,-0.918700,0.848037,-0.391396,0.985990},
{0.637319,0.987229,-1.912017,0.510648,0.452777},
{1.289286,1.361489,1.243136,0.745559,0.629101},
{0.221755,0.110369,1.497499,-1.866076,-2.412023},
{0.521552,-0.177768,-1.502221,2.043690,-0.457538},
{0.990912,-0.941359,-2.224753,-0.306236,-0.084343},
{-0.189443,0.324083,-0.057534,-0.211584,-0.912040},
{-1.742935,2.108264,-0.926809,0.221314,-0.141621},
{2.699771,-0.196509,-0.315119,-0.002794,0.162299},
{-0.954093,1.883489,1.057448,-1.192817,-0.083695},
{0.758001,0.311436,-0.067548,0.947225,0.729640},
{0.761101,-1.269708,0.368809,2.191157,-1.350343},
{0.482979,-0.516259,0.186630,0.421651,0.499098},
{-0.419075,0.249524,0.930801,-0.480737,-0.250079},
{0.144482,0.706673,-1.061049,-3.064299,-0.119050},
{-0.407456,0.397080,-1.487227,-0.972597,2.180493},