Updated high-band codebook...
authorjmvalin <jmvalin@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Wed, 24 Apr 2002 07:26:08 +0000 (07:26 +0000)
committerjmvalin <jmvalin@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Wed, 24 Apr 2002 07:26:08 +0000 (07:26 +0000)
git-svn-id: http://svn.xiph.org/trunk/speex@3256 0101bb08-14d6-0310-b084-bc0e0c8e3800

libspeex/hexc_table.c
libspeex/sb_celp.c
libspeex/speex.c
libspeex/speex.h

index e4ae5df..8459eea 100644 (file)
-float hexc_table[256][8]={
-{0,0,0,0,0,0,0,0},
-{-0.124633,0.709134,-0.353292,-0.100011,-4.75254,-1.19492,1.91261,3.17703},
-{7.65722,-5.45083,2.63568,-6.4316,-1.89175,-0.466831,-2.62109,1.40504},
-{-0.196422,3.42049,0.110829,2.61755,0.400882,4.91734,-2.27958,-8.22836},
-{2.89899,0.0536774,-2.33267,-2.22652,0.0327518,0.658552,0.677934,-0.108797},
-{3.91754,0.0948733,3.8366,-3.0895,-0.897586,1.40209,-0.0906191,-2.04542},
-{-0.187855,1.00529,0.698786,1.23539,-0.590565,-0.109911,-2.77967,-1.71522},
-{16.4003,13.6469,12.0238,12.0247,8.99906,6.76874,4.56455,2.57654},
-{-0.677238,-1.43921,-1.51191,-2.87916,4.22053,1.78013,3.3326,-0.52691},
-{-1.23192,4.25223,-2.11896,-2.09635,4.56563,-1.64065,-4.1804,3.06229},
-{2.09639,-1.23159,0.996652,-0.291257,0.503392,-0.263715,0.441603,-0.601744},
-{1.61943,0.259319,3.38506,0.477903,0.211131,-4.09897,-6.17992,0.0711276},
-{0.56057,-7.74415,9.78828,-1.98022,2.16269,4.58076,-3.22997,-0.0438142},
-{-7.7953,2.75296,-1.60745,2.3559,3.03604,-2.70062,-1.08142,1.03708},
-{-0.327143,0.508118,-0.284136,0.436241,-0.362498,0.452651,-0.474024,0.0398583},
-{0.395506,0.0990582,0.0973287,-1.03393,-1.13884,3.93053,2.63491,-3.21285},
-{-0.130276,-1.72332,-8.74412,2.16437,-5.05812,4.47607,4.27328,0.105277},
-{-6.89905,-4.37346,-19.6116,-0.803085,-24.817,37.3571,-4.92721,165.926},
-{2.60235,-7.67724,-2.17454,-3.13947,-0.871546,1.46517,3.00854,0.750017},
-{1.38834,2.16419,4.47336,0.396819,1.61154,-0.488036,-2.91986,-3.62602},
-{-0.267722,-1.27928,-1.54815,1.01517,-1.30285,6.2907,-2.37984,1.59779},
-{10.3643,6.58345,10.6146,3.05141,-10.3102,-12.0823,-5.76653,-2.23303},
-{-1.72908,4.27992,-1.23605,3.39782,-1.81781,-0.497225,0.0958252,1.02646},
-{0.465316,1.31008,2.3038,3.39667,4.14734,3.63285,3.41452,3.47548},
-{-0.332034,-1.74162,-8.09007,5.89303,3.739,1.06648,-1.28181,-0.0749382},
-{-0.378037,-0.496624,-0.655122,-0.811612,-0.750057,-0.803675,-0.691355,-0.609482},
-{-1.31898,-1.1015,0.447721,-0.0264966,1.64705,0.545,1.16122,0.890655},
-{1.00374,1.19226,-0.316613,0.205922,-1.52392,-3.18519,1.46116,-0.719755},
-{-0.82755,-5.35645,-2.32557,2.05192,2.1559,2.8016,1.73048,0.579947},
-{-5.74695,1.91548,4.27113,0.170372,-2.87978,-0.575378,4.00891,-0.242333},
-{-1.46014,-2.04408,0.618623,1.04639,2.25926,0.620763,0.0223016,-1.20626},
-{7.85841,7.2316,-4.59772,-13.0927,-2.07305,-5.35862,1.02443,2.91374},
-{-28.9738,-29.9479,-21.1514,-19.3304,-18.753,-15.2387,-13.0793,-6.39139},
-{2.24238,-1.55293,-6.74978,2.10057,-4.79248,-3.31379,3.14321,6.92445},
-{5.46397,-3.92148,-4.93206,4.43525,-1.53189,-0.519818,-2.62037,0.74977},
-{0.751644,0.005855,1.67575,-0.0104025,1.67935,0.245031,3.88256,-9.57539},
-{4.16921,0.233669,-3.91408,-1.47007,1.61097,4.64495,0.233817,-4.06308},
-{0.178042,0.0717345,1.43858,-4.2214,0.109823,1.79668,-1.30346,1.73824},
-{-0.208089,-0.943459,1.74093,1.36887,1.47514,-2.36995,-1.72045,-0.567021},
-{94.9082,72.6546,19.9534,20.8298,20.2464,12.9592,19.406,11.3202},
-{0.211787,-1.00195,1.53093,-0.986428,6.9982,-2.51765,-1.05592,-0.52969},
-{-0.412027,-0.0416657,-0.552586,0.188989,-0.315958,0.319828,-0.782269,4.10457},
-{2.19893,0.627193,0.0905311,2.02512,-3.91528,-10.1151,8.11845,1.90391},
-{8.53607,4.03524,0.444378,9.69537,8.72491,-3.15194,-17.8371,-12.9478},
-{-0.905081,-18.5757,2.73093,4.64838,0.675854,1.76229,3.92953,4.29863},
-{-3.05504,2.51569,2.60605,3.22993,1.89622,-1.24479,-1.89252,-1.05785},
-{0.189815,0.347461,0.583004,0.192732,-0.144563,-0.221409,-0.392779,-0.240286},
-{0.222396,0.725501,1.20206,-3.53847,-9.23962,4.16548,-2.65207,5.82031},
-{-0.0977143,-0.729665,-7.44131,0.868409,3.79825,-1.37507,7.56879,0.358514},
-{0.239891,0.975243,-0.207124,0.245905,-1.64001,-0.4278,-4.42181,3.31454},
-{3.81297,1.15309,-0.615272,0.393898,-0.102674,-0.232687,-1.14651,-2.05614},
-{0.0761315,-0.272116,-0.866704,0.161933,1.52894,1.48026,0.706022,-2.39579},
-{4.09957,-6.64283,3.85977,0.536794,-4.21348,5.37178,-0.953069,-2.16333},
-{-1.372,1.33928,3.53997,0.884164,-1.78364,-1.75854,-0.76074,-0.0875155},
-{2.36904,2.4113,-5.05789,2.00201,-1.79323,-0.192766,-0.00386853,0.715435},
-{6.97471,8.5061,0.133323,-1.20679,-4.4193,0.802588,1.17402,-6.34665},
-{0.0142825,2.68136,-2.30019,0.945289,2.45734,0.25891,-2.05026,-0.992398},
-{0.305972,0.0952337,-0.0896897,0.0121289,0.502184,-1.39021,-0.362368,0.96016},
-{0.0491968,-0.0293672,0.0329259,-0.490325,-0.323103,-0.839378,1.86117,1.13785},
-{-0.350797,-2.32743,6.89907,7.88932,-3.97595,-1.52524,2.0538,-7.85158},
-{-4.65036,-7.01617,4.80323,-0.28348,10.694,-2.75345,5.27919,0.829943},
-{-6.18875,5.15951,-2.62489,-5.14746,2.49968,-5.08069,3.54648,6.4851},
-{0.35778,-0.746433,-1.06582,-0.484774,0.266932,0.572277,0.734908,0.120138},
-{5.54284,1.62255,-1.00522,-4.70178,0.118753,-3.5652,2.23952,-1.86555},
-{-8.61091,-6.08946,-5.65072,-5.46432,-4.59801,-3.56913,-2.30351,-1.59635},
-{-0.304533,0.0443325,-1.02952,-1.48296,0.677945,-2.31357,4.62297,3.86147},
-{16.4093,-3.29112,-4.13596,4.1949,-6.77296,1.33971,0.356506,-5.9223},
-{9.75046,8.33574,10.1556,3.94866,11.9924,2.43735,-6.48726,-45.5453},
-{1.35713,0.226259,-2.40778,-4.63494,-2.24869,2.81727,4.3285,2.31185},
-{2.14669,-0.829122,2.39036,1.71696,-1.7243,0.201098,-0.337368,-2.21057},
-{-0.379367,-1.3162,0.385318,2.49085,-0.588362,1.43544,0.266819,-0.762972},
-{20.1128,12.5953,29.6717,25.7954,17.6684,13.4463,8.80977,5.98823},
-{3.90611,4.13562,-8.27716,-13.7767,7.08054,7.40331,-2.53986,1.35251},
-{-1.62264,1.6546,3.77908,-1.99865,0.738225,2.50548,-5.94721,1.10919},
-{0.0477677,-0.0425041,0.366971,-0.875714,2.04819,-1.27543,0.872946,-0.856728},
-{2.41722,4.13586,2.01805,-0.292185,-3.02575,-1.67243,-2.1895,-1.15785},
-{-3.60578,-1.70102,1.69283,1.97525,-0.284958,-0.100427,0.425959,0.888488},
-{-1.5129,2.82814,1.76809,-2.6816,-0.180332,0.491737,1.63089,-0.763955},
-{-0.0143589,0.399285,-0.0994942,-0.502938,-0.333592,-0.104954,0.233167,0.392239},
-{1.67405,1.73466,1.49446,2.47518,-8.32141,-1.1105,2.44097,-2.20398},
-{-3.61704,-4.57834,-1.02428,-3.68364,-1.85282,2.17452,9.55899,7.43489},
-{0.298172,0.9963,1.04169,-3.52328,-1.45634,-0.639949,-4.20383,32.3458},
-{0.454027,-1.32234,-0.275284,1.59237,-0.2019,-0.992402,0.734051,0.22433},
-{0.0870788,-0.0409921,0.453492,0.186622,0.0253391,0.0125788,0.0514432,-1.93421},
-{0.0949132,-0.279746,0.00773279,2.48065,2.23413,9.7595,-10.9672,-2.69571},
-{-0.42108,1.96556,8.9301,-4.8952,-0.281521,-2.47129,-0.402138,-1.83134},
-{-0.306824,0.254839,-1.25146,0.568873,-1.38831,0.789644,0.976548,0.0492205},
-{0.423627,0.618305,0.612155,0.637545,0.782411,0.769886,0.607862,0.411707},
-{-1.43537,-1.30235,-5.92011,-1.99894,9.87538,-2.4618,1.90621,1.8659},
-{-0.947278,2.56979,1.55118,-0.194945,1.49244,-5.06596,0.170384,-0.249401},
-{-1.36498,-1.99714,-1.13416,-0.22359,-0.104795,0.249995,0.0901003,0.981652},
-{-1.95965,5.37343,-5.07107,4.11164,0.652106,-4.34714,2.8756,-1.56539},
-{-6.22321,-3.27259,-3.38364,-0.188568,2.39983,2.24778,2.68626,2.83561},
-{-2.54959,0.682998,1.09015,-0.612539,-0.98431,1.41871,-0.349726,1.23296},
-{-0.29605,-0.590653,-1.25288,-1.17515,2.94077,0.341683,-0.965384,0.926922},
-{-3.8208,6.64341,2.66736,-8.92415,3.48916,6.72564,-0.203787,-5.66214},
-{-58.0733,-109.568,-120.071,-95.438,-57.8918,-28.9008,-12.8107,-3.5557},
-{-5.66526,-5.14158,3.86487,0.560814,-1.06906,-2.87972,-0.21149,5.99357},
-{3.81596,-2.78815,-1.86367,2.54713,-2.37254,1.91097,1.99671,-2.28994},
-{0.0539667,3.91687,0.449347,3.79675,3.34144,-6.88731,3.66869,-14.6544},
-{1.12497,2.74561,-0.3938,-4.25215,2.84085,0.362278,-1.82594,-2.45511},
-{0.0211127,-1.72793,1.62255,0.105806,-0.283394,0.876935,-0.650737,0.295708},
-{-1.76437,-1.07731,-0.348999,5.69704,0.101825,0.844051,-2.96391,0.760176},
-{88.7141,112.743,89.0107,65.028,57.7858,53.7961,43.3063,22.7663},
-{-0.528845,2.113,2.3194,2.14449,1.86506,-13.362,-3.00807,3.67712},
-{0.838452,-2.53742,-4.28145,-0.437028,-0.609153,0.102954,0.535033,3.00112},
-{0.28854,-0.410248,0.690436,-1.23695,3.64209,-4.82857,5.2072,-2.25672},
-{-0.314126,-0.769524,0.131029,4.24101,3.48463,0.248342,-2.74577,-4.48021},
-{0.555925,-4.62015,0.387454,-0.330363,3.20152,1.70546,-3.81424,4.62474},
-{-3.4213,15.9757,2.73522,0.194243,0.257501,3.12679,-2.41229,-2.04571},
-{0.00165975,0.0244441,-0.00167063,-0.0114329,0.0458509,0.0194235,0.00796441,-0.0137953},
-{0.911365,-1.34234,2.13987,3.29676,-3.64597,0.0999147,-1.81664,2.28563},
-{4.47113,0.559615,-5.53125,-12.234,-11.3373,9.5302,16.0957,3.5127},
-{0.300706,-0.120382,0.670355,2.22102,1.70121,-0.938085,-10.587,6.05266},
-{1.20243,-0.0263491,-0.167586,-0.0951263,-0.208164,-0.0804163,-0.151097,-0.21795},
-{-0.0842739,0.208618,-0.131425,0.2206,0.109082,-0.472402,0.824921,-0.583573},
-{-2.99785,-4.42416,-1.86328,-4.4312,4.51356,15.2835,-2.06858,0.676297},
-{-1.66033,4.95833,3.74878,-0.290086,-7.17661,-5.45601,0.119688,3.60161},
-{2.79034,7.7291,-10.7567,-1.92117,0.0118825,0.920566,-0.236087,-0.402009},
-{7.75002,-2.23395,1.52487,1.78453,1.69059,0.307544,-0.785332,-1.11899},
-{-0.609985,0.889939,-4.84241,-0.818176,1.27978,1.77655,0.829194,0.406604},
-{1.46036,0.779691,0.73605,-1.61776,-0.332832,-5.93634,-1.0418,3.75032},
-{0.481613,-0.146268,0.558567,-1.25947,-1.35794,1.14697,0.539569,-0.0815973},
-{-3.96012,-5.20521,-1.40374,8.51505,1.90713,-5.24493,-1.62459,2.34314},
-{-4.84121,-4.0844,2.31582,2.18638,5.28302,0.714339,-2.19018,-0.429647},
-{-22.8252,-2.32658,-7.38579,0.22799,8.03754,3.36877,5.36252,6.18499},
-{-1.13653,-0.195917,0.969309,0.666294,-0.353006,-0.553089,-0.0866454,0.439218},
-{3.53106,3.47066,-0.880209,-3.06279,-2.98238,-0.871701,0.627605,3.23931},
-{-5.19707,-1.52359,-0.864088,-1.2368,-1.38742,-0.427472,-0.491785,-0.592172},
-{0.198913,1.2229,0.0697973,-1.64807,-2.93506,-2.73168,5.9653,-0.172975},
-{3.75328,0.116182,-2.64952,-3.1486,0.468066,1.72553,-4.66912,1.80205},
-{0.0617427,-3.95373,4.15663,5.77165,-13.7333,13.6662,1.9058,-18.3167},
-{0.803773,-1.72723,-0.391257,-2.33851,1.02508,2.65897,0.364772,0.323266},
-{0.811483,-3.07522,3.14185,-2.6032,2.25004,-0.444016,0.148008,-0.651473},
-{-0.772831,2.65199,-0.032664,0.62535,-0.432513,0.347632,-0.00717036,-1.39254},
-{20.5472,4.83106,4.95877,6.3597,3.27828,4.383,1.58179,1.71363},
-{-0.102586,-0.949736,-0.672078,-7.44841,4.13724,-0.122848,0.970153,2.54162},
-{-0.482255,2.90589,-0.322505,-0.413532,-0.416462,-1.05482,-1.44329,1.27294},
-{0.216043,-0.631032,0.621151,-0.681611,0.372445,-0.255996,0.272085,-0.0369481},
-{1.29719,1.22662,-0.757092,3.65015,-0.641968,-3.70358,-2.10176,0.251901},
-{-0.987225,-2.73038,6.42124,1.57463,0.585071,-0.181883,-0.128151,-0.163688},
-{-4.06935,3.61756,-2.01217,-1.86789,0.657186,0.712952,-0.0182699,1.52881},
-{-1.03555,0.511431,-1.16694,0.233248,0.46962,-0.0405056,0.227786,0.82183},
-{-1.41986,0.211741,-1.43041,-0.247476,-3.51242,2.92859,3.09243,-0.0380268},
-{-1.63231,-1.87559,-2.72054,0.115409,-3.70595,9.96328,3.42132,1.21836},
-{-4.79079,3.68284,-8.09519,9.13098,-13.2031,28.1024,-26.3338,100.784},
-{1.70282,-3.21702,-1.20921,-0.652983,0.933787,-0.643258,1.66499,0.184771},
-{0.863766,0.507668,0.456694,-0.281845,-0.2008,-1.38984,-3.64332,-7.98858},
-{0.285095,-0.297741,-0.305613,0.388166,-0.429425,2.85422,-1.15849,-1.21032},
-{0.217996,3.55512,12.1684,3.06927,-3.11083,-5.75629,-3.04623,2.50726},
-{-2.60503,0.576449,-2.56158,6.55611,-6.59388,3.21817,-1.10895,0.302273},
-{6.65619,5.33674,5.6218,4.76786,3.96142,2.95088,1.95973,0.707597},
-{-5.401,-10.3647,-20.6209,15.6539,6.1057,0.537674,10.0364,-0.469702},
-{1.62284,0.242311,1.0784,-0.554592,-1.38022,-1.59271,-1.5614,-0.148781},
-{-0.323606,-0.794087,-0.48751,0.0514974,0.107547,1.91929,2.47284,2.36645},
-{-0.389985,-0.0747641,0.940271,4.7949,-0.668243,-2.4003,0.963513,-2.26186},
-{-5.30214,-2.66262,0.90595,5.06168,0.167943,4.45965,1.82353,-2.28554},
-{-15.2868,-2.88433,17.3311,-4.69775,-6.38507,2.32581,1.78902,5.02255},
-{-2.45955,0.384635,2.14552,-0.208571,1.18552,1.84719,-0.298183,-2.5892},
-{1.68438,14.4461,-1.91254,-8.25743,-10.7753,-9.27382,9.75762,6.05605},
-{-37.2676,-15.8881,-7.32543,-13.1854,-10.5795,-7.80677,-4.76706,-6.0121},
-{2.32499,-2.1412,-1.13345,-3.01872,-2.38307,-4.11756,-0.80428,11.3435},
-{5.98836,-4.52868,-1.4419,2.06118,-1.0053,-4.54096,1.31057,0.936292},
-{-1.45647,-2.42695,0.874431,1.13838,2.6115,1.45619,5.1732,-3.86706},
-{0.468279,-2.54611,-6.41498,-0.501039,8.16362,8.14442,-0.267457,-7.67813},
-{0.661843,-0.662204,4.04344,-2.32716,-3.35996,-0.362568,-0.204895,1.58793},
-{-0.90881,0.240288,-0.101023,1.84391,0.907318,-0.179726,-0.834737,-0.258053},
-{63.8951,43.0059,24.6095,32.1787,37.6453,26.5148,16.7264,16.7989},
-{-3.40992,0.915236,2.23379,-1.72307,2.4518,-1.41713,-0.750831,2.23796},
-{0.192647,-0.0613659,-0.0900871,-0.119244,-0.359946,0.653171,-1.06137,1.31772},
-{2.49081,-4.2797,5.02398,-0.647238,-1.72162,-5.32287,5.32772,-0.700779},
-{-0.228042,0.62236,1.77143,0.472478,8.83029,-0.396976,-9.51358,-3.43262},
-{3.0112,-11.952,-3.60736,6.29123,4.2449,3.32801,-2.30609,-0.0357611},
-{-3.61862,3.34871,-1.60253,0.161435,5.00982,0.339521,2.046,-3.23407},
-{0.0205111,-0.384494,-0.1446,0.297178,0.82016,0.0744092,-0.379702,-0.236443},
-{5.83001,-0.0348266,5.59311,-0.74714,-7.15472,2.89986,-7.095,1.63435},
-{-1.2942,-0.579663,-2.48986,2.539,-0.869076,-0.549802,4.10337,0.301529},
-{-0.648904,0.378769,-0.968117,0.772411,-1.13077,0.775235,-3.21542,8.34237},
-{3.58267,-0.0915582,-1.0484,0.0884655,1.29556,-1.83501,-0.185002,1.08254},
-{-0.209366,0.69812,-2.16731,3.41955,-1.52321,0.826082,1.01373,-3.39097},
-{-2.26066,-1.40958,5.32075,-0.276717,-2.78494,4.33579,-0.168931,-3.54584},
-{-0.665222,0.665878,1.68574,0.576886,-1.90399,0.00146961,1.48097,-0.63346},
-{3.65043,-0.4308,-1.1678,0.0607685,-2.98668,-0.103246,0.756657,0.380301},
-{7.99375,2.53517,-0.497777,0.770466,-5.04935,-5.17215,-3.43236,0.904961},
-{0.435016,-0.113796,-1.57557,2.18127,2.98135,-2.09224,0.892665,-1.20039},
-{0.871804,-0.447763,1.3428,-0.724864,1.6856,-1.35567,-2.22119,2.29067},
-{0.422004,0.259276,-1.02522,-1.738,-1.21942,-0.313969,0.168196,1.97473},
-{0.79007,2.68486,3.87648,7.03482,-4.62735,-0.455793,-5.21429,-3.62786},
-{-5.87799,-3.98783,-1.28793,10.597,9.6449,3.30147,1.57558,-4.43165},
-{-17.0874,19.9496,-5.57932,4.28525,9.02458,-13.5845,0.710407,0.953128},
-{-0.924992,-0.2889,0.115995,-0.0578672,0.161932,0.731155,0.305014,-0.160134},
-{8.94831,2.87189,-3.85971,-1.09456,3.01356,-2.81641,-3.61115,-2.37473},
-{-16.866,-13.207,-12.2628,-8.86788,-7.27316,-6.35138,-4.16926,-1.30505},
-{0.204318,-1.18495,1.69611,-5.87154,-1.09162,-3.17763,3.81016,5.46422},
-{32.3196,-26.4305,-15.3083,13.389,5.29654,1.3497,-4.56716,-3.0803},
-{1.75226,-2.95783,0.0391654,1.43998,4.32347,4.63445,12.0214,-24.3157},
-{5.73897,1.50275,-2.59347,-9.41519,-2.96615,6.11175,0.653714,-0.566137},
-{2.98372,-2.72632,0.749759,-1.00422,-1.43957,1.27977,-1.67646,0.877245},
-{0.548712,0.597705,0.0164013,1.39439,-1.68985,-0.39492,-0.406022,0.299087},
-{45.7234,23.3769,4.62083,7.01499,9.78483,13.3994,9.72012,5.72552},
-{-2.09919,1.06592,1.32802,-20.703,10.3256,3.93026,-2.9109,9.97675},
-{-0.865733,-0.363424,0.614046,0.788532,1.07512,2.0567,-3.31456,0.769445},
-{1.16772,0.29314,1.08944,-3.30867,0.437565,-1.73196,0.469983,-0.020718},
-{0.804264,8.93642,0.298777,1.65058,-0.278129,-6.2409,-4.30878,-2.51514},
-{1.45749,-5.4972,1.59904,2.36218,0.62901,-0.398502,-0.37127,-0.128095},
-{-1.15142,1.15667,0.533943,-0.638291,0.748438,-0.236054,-0.371887,0.0551342},
-{-0.0134577,0.917125,-0.692473,-1.38295,0.651743,1.16129,-0.16168,-0.353701},
-{3.09101,1.25459,3.52712,-4.66651,-8.30614,1.94741,3.66175,-2.53572},
-{-3.79474,-1.2712,1.5456,-5.77896,-2.15106,5.52802,5.16584,-0.824595},
-{-1.29917,-0.152905,-1.49112,-0.957469,-1.15177,5.20993,-1.30904,16.5467},
-{1.6654,-1.494,-1.42496,1.55172,0.307429,0.349257,-1.20406,0.389077},
-{0.429784,0.608935,0.751754,-0.0494915,0.731098,-1.55255,0.911601,-4.40677},
-{2.00906,1.05476,-0.327177,2.06333,-0.814492,2.24618,-6.00176,-1.77531},
-{4.66946,4.38809,5.58569,-7.918,-0.289225,-3.45762,-4.3845,3.00876},
-{-1.17988,1.13447,-1.68267,1.46021,-1.27858,1.60578,-1.19326,1.0592},
-{2.26378,1.9471,2.2834,2.20481,1.28164,1.31936,0.723912,0.264843},
-{2.59296,-1.12518,-7.86353,-3.44897,3.48369,4.15248,0.678701,3.28794},
-{1.02773,1.39452,1.05653,0.687331,0.512416,-1.20686,-0.451067,-0.726915},
-{-2.20508,-0.946671,-0.383217,-2.59423,-0.127601,0.181709,2.13321,1.07847},
-{5.11053,0.787867,-5.00871,9.78689,-0.698865,-2.33587,4.06018,-6.26019},
-{-3.08775,0.00788429,-1.37288,0.830455,1.50064,3.72122,0.519269,-0.174458},
-{-8.65087,0.420658,4.19734,-2.53148,2.00787,3.44438,0.479103,1.88357},
-{0.670846,0.175748,0.388663,-0.392712,1.34099,0.27084,-2.14573,-0.817875},
-{-3.82491,10.8946,-0.724208,-7.25032,-0.906455,-0.968595,3.10847,-0.953001},
-{-60.2306,-66.0493,-52.769,-28.5048,-18.995,-24.6236,-14.8306,-4.60763},
-{-1.28833,-3.36615,-1.12593,1.72623,2.03918,-3.13427,1.83378,3.2688},
-{-1.41746,-5.77968,2.05356,4.39273,-4.71032,0.525318,4.17257,0.33712},
-{0.489101,0.986629,2.88171,3.26994,4.87412,-7.68866,-0.255392,-5.86123},
-{-0.486568,3.64866,-1.18497,-2.56582,-1.86345,3.97503,-1.60875,-1.51483},
-{0.0224374,0.447103,2.57407,-1.17341,0.0103403,0.097923,-0.588402,-0.3276},
-{-1.50035,-0.588047,-2.79878,2.95604,1.49174,-0.281278,-0.104843,0.95529},
-{43.8765,68.9196,53.5544,18.5602,-7.28795,-6.17145,11.5068,11.8125},
-{1.93415,-0.764005,-3.39096,1.811,5.07884,-5.5778,-3.31742,4.42688},
-{-0.844518,-1.0928,-1.23793,-1.94435,-0.671152,3.08139,1.31817,6.51686},
-{-1.15335,-1.41424,2.53316,-0.165687,0.285124,-2.28472,2.47299,-0.78268},
-{2.00046,-3.08138,-3.03712,0.584362,4.23179,0.551653,-2.76306,-2.11327},
-{-2.29126,-4.45644,2.27253,-1.606,0.427992,2.66471,0.116678,1.07283},
-{-5.0359,6.43669,3.4784,-0.091146,-1.32296,0.266394,-1.44734,-0.928342},
-{0.0439666,-0.483358,-0.0579151,0.242941,-0.230237,0.116684,0.153393,0.37601},
-{0.507153,1.08043,0.560109,0.292706,-3.98339,2.15313,-1.38018,0.420253},
-{-0.13139,-0.382544,-2.22085,-1.24414,-0.845732,1.22189,11.8253,-3.55114},
-{-1.02419,2.41956,1.70631,-0.921757,-1.97945,-8.94564,-21.8953,7.22507},
-{0.959283,0.968234,-1.83562,0.419404,0.0721482,-0.314022,-0.0424927,-0.102174},
-{0.248888,-0.164755,-0.300158,-0.369368,0.229399,-0.207267,3.28298,-1.61728},
-{-1.24941,-0.21401,0.769815,-2.09711,4.46625,5.15347,-2.03265,-1.19599},
-{-3.15887,0.00237708,2.5495,4.70987,-2.47164,-3.74927,2.03071,4.01164},
-{0.525486,4.87947,-3.32576,-1.7101,-1.90991,-0.0993742,1.96111,-1.32008},
-{3.02228,5.57303,0.0510654,-0.70773,1.60367,-0.535712,-0.100697,-0.543199},
-{-0.627222,2.10949,-2.63038,-1.13644,1.7397,-2.35395,1.30674,0.715664},
-{0.657966,-0.930129,1.1111,0.196496,-0.821329,-2.62898,0.905887,2.76431},
-{0.158239,-2.62874,0.887907,-0.0719686,-2.34732,0.274504,1.60437,-0.333946},
-{-0.41052,-4.0426,4.87021,13.4334,-3.81333,-8.63686,-4.28218,-0.323974},
-{-9.14699,-2.17646,7.44449,7.06822,2.33518,1.29543,-4.89149,0.13786},
-{-11.7021,5.09057,1.69011,7.30886,1.32423,0.0720759,3.78273,-0.839777},
-{-3.29212,1.23263,-0.453421,0.690821,0.467484,-0.463127,1.26455,-0.327746},
-{1.33427,1.86117,0.160804,-1.15946,-1.11658,-0.125074,-0.0105876,-0.194273}};
+float hexc_table[256][8]={{0.00596334,0.961802,-1.17836,-3.01893,0.498393,-1.77481,0.933678,0.707556},
+{-1.09273,0.779159,3.35175,8.96719,9.20773,-5.48121,-10.3742,-6.00719},
+{-6.63724,-0.431913,1.22604,4.36403,0.315399,-1.74806,1.18705,1.3023},
+{-0.34432,-0.291574,-0.676932,-0.693059,-0.7169,-0.664636,-0.479618,-0.499353},
+{-0.289628,-0.69633,-0.420114,-0.550872,-0.194063,0.406592,0.129426,0.638474},
+{1.55285,5.18598,-4.07314,-0.57972,1.41307,-3.34088,-1.75373,0.836238},
+{9.64848,5.49757,2.71352,-0.774738,-5.77379,-11.3207,-6.64266,8.36487},
+{5.35712,2.3447,0.611676,-3.20016,-0.573763,-0.633532,-3.71085,-0.11144},
+{1.55562,-3.0477,-0.443413,-2.66988,1.62136,1.25092,-0.598591,1.3126},
+{0.107545,-0.229729,2.97792,-0.0144502,-0.467264,-1.0848,0.459428,-1.23135},
+{-1.31507,-1.83314,-1.68476,0.838043,1.36763,1.84906,1.59447,-0.581666},
+{-1.84137,-1.61001,0.212489,-1.57008,1.15597,-0.186575,0.104659,0.534858},
+{1.3404,-2.36834,0.652265,0.144586,1.38806,0.0279121,0.0943678,-1.38542},
+{1.80025,1.93867,2.00891,0.685305,0.462605,-9.82099,-1.43226,-1.02076},
+{1.06998,0.460049,1.99375,-3.45493,-2.93745,1.12063,0.883749,0.0620846},
+{-0.421529,1.10504,-7.0891,-0.115913,3.5515,0.749357,2.06642,0.302182},
+{-4.9891,-4.97802,3.03304,-0.545989,-5.1588,1.47589,4.97565,1.61485},
+{10.6517,6.05228,7.04337,5.2549,4.60269,4.3744,1.75997,0.923521},
+{-7.65203,5.27239,-4.24031,-1.84605,2.09177,0.721852,1.14006,2.23425},
+{-0.767754,0.334586,0.809721,0.580797,-0.480078,-0.629865,-0.0528265,0.211446},
+{-0.579945,-1.66864,5.09098,-0.45305,3.4849,2.62679,-3.21053,-2.14739},
+{0.240911,12.8432,-8.82027,-1.6974,-6.1177,-8.82078,3.68925,-0.0674868},
+{1.85091,-0.942606,0.473398,-0.591,-1.94523,1.96216,-2.48735,-0.454837},
+{5.09157,-9.95944,1.32533,7.88265,1.75663,-1.93783,-1.24923,-0.293239},
+{-1.22145,-5.98452,3.7634,-0.705553,3.38743,-0.413326,-1.65825,2.90272},
+{1.2211,-1.75124,3.31627,1.23058,-3.09041,1.4764,0.354087,-0.887407},
+{2.51455,-1.35068,-1.29518,2.8944,-2.37898,1.2081,1.24154,-3.28068},
+{-0.319508,-0.252012,-0.133097,-0.305965,-0.562591,-0.759897,2.05952,0.299892},
+{-0.800117,0.0891911,0.299706,2.16995,3.36063,-0.111935,-0.646773,-3.46147},
+{3.00977,1.33377,8.45317,-3.46033,4.25616,-6.27074,-6.8382,-0.565441},
+{-1.11805,-0.977105,0.09164,6.71365,1.30803,10.4462,-9.19217,-8.67702},
+{3.54213,6.58884,-3.49584,1.99994,-8.29993,0.640732,-2.04007,-1.86263},
+{0.994519,0.128403,-1.17005,1.30192,-5.75131,-5.0784,8.31152,-2.85104},
+{-1.60038,5.54056,1.85563,6.81351,-2.48191,0.468508,-1.57252,-2.08778},
+{-0.971087,-3.78474,-3.88213,-3.01418,-4.89943,-3.35667,-1.89404,-2.25134},
+{2.18713,0.162262,-0.794402,-0.894054,0.301279,-0.367108,-0.16506,-0.325218},
+{3.54902,-1.02119,-2.61702,-0.433606,4.35146,-0.148326,-3.46654,2.14477},
+{3.56186,4.39716,-12.5599,-4.90088,1.10731,3.61826,1.3884,2.58328},
+{1.7457,0.499283,-1.11856,-3.02534,-9.0291,1.82454,2.67053,4.79438},
+{6.33564,1.3493,-2.90245,4.9839,-2.07942,-2.99799,-1.37353,0.194392},
+{0.59306,-0.667111,-1.63125,-1.94958,-0.273168,1.86502,2.00237,0.635809},
+{0.162288,0.0477809,0.397164,-0.0260089,0.0535681,-0.783583,-1.75111,-1.94167},
+{0.911535,-4.70564,-2.89805,-2.72332,8.24786,5.59401,-1.56173,-1.95495},
+{0.517353,-0.525953,-3.41303,3.64218,-0.911369,1.06019,-1.16563,1.05369},
+{-0.161767,-0.0456504,0.418959,0.160653,0.480297,-0.206741,0.636733,-1.81423},
+{-0.11519,-0.0362332,-1.05077,0.102514,-0.021697,-6.09927,1.80389,5.41577},
+{0.0991684,-0.682428,0.259715,-0.134647,0.416149,1.29069,-0.370203,-0.775089},
+{-4.50775,-0.00100952,-4.76029,4.93879,3.12663,1.40609,-2.15292,1.06787},
+{-2.78658,-2.41158,-1.97123,0.482207,2.33509,-3.01037,8.20183,0.841873},
+{0.287164,1.86315,7.77262,11.2794,-12.9211,-7.09667,-1.35359,-6.19793},
+{-6.79787,-1.34923,6.98219,0.0379624,-1.31655,-0.496518,-0.84944,1.89517},
+{0.245815,-1.10537,0.826552,0.0871601,-0.368666,-0.238575,-0.318147,0.0367272},
+{-4.26892,-1.14217,-1.47639,-6.52443,6.09884,1.01617,-1.62314,7.8186},
+{1.54392,5.37571,0.977919,-0.847368,-2.70392,-1.01109,-0.922396,-1.28249},
+{-0.495491,-0.256343,-2.23996,1.32637,0.479325,2.8504,0.512101,6.20605},
+{5.69122,-0.488377,-1.46671,0.681471,0.868299,1.68511,0.838676,-0.825714},
+{-2.31738,-2.1621,0.522756,0.900326,-0.470159,1.05873,-1.0559,-0.210936},
+{-0.459554,-1.06285,0.573956,1.98694,-0.65771,-1.34037,-0.0553681,1.62538},
+{-2.72696,-1.52834,-0.593637,5.75016,-3.12266,4.86092,0.413699,0.359828},
+{0.0808353,0.193152,0.0389671,0.175378,-0.211664,0.327569,-1.21192,0.0455147},
+{-0.882134,-1.33219,-1.5698,-0.629834,6.19642,0.60124,4.43049,-4.09649},
+{3.84539,-0.45681,1.76585,0.421058,0.929836,-1.3123,0.0920509,-0.565889},
+{0.204747,2.37451,-0.0402808,1.797,-2.46898,-1.09955,-5.20885,1.3839},
+{-0.189646,1.62857,-0.833329,-0.0364312,-2.83753,0.378956,0.39833,0.980087},
+{1.40852,1.19171,2.7495,-5.64983,1.96283,-3.27398,0.199364,1.38964},
+{-1.09869,1.3949,0.759887,0.687602,-1.42357,-2.77522,-3.61392,-4.87194},
+{-8.17908,-2.77667,-0.327769,-0.23556,4.90227,2.59569,-0.200477,-0.707252},
+{-1.7181,-1.89374,-1.89098,-2.34294,-1.41945,-1.285,-0.821974,0.250006},
+{0.57952,-2.18138,-1.63374,0.37941,0.450371,-0.115038,0.438043,0.546956},
+{0.0783844,2.43611,-1.9918,-0.547415,0.366085,-0.915101,0.498379,-0.843595},
+{-0.388358,1.27791,-1.16751,0.609873,-5.74965,2.55315,-10.591,14.4464},
+{6.1754,3.11497,1.50675,-5.21698,-0.804491,-1.65617,2.34825,-2.34182},
+{-1.98947,-2.5542,-0.827056,-2.67255,2.4294,1.31308,3.25936,1.28217},
+{2.0815,2.90298,1.029,-0.162884,1.25637,0.52683,0.122897,-0.25819},
+{-1.36184,-4.72108,-6.19039,0.875934,2.2871,3.55011,3.12527,1.12481},
+{-4.24993,1.57179,-0.643034,0.0488152,-0.855254,0.319326,-0.670514,1.94472},
+{0.392787,-0.572109,0.330958,-0.574133,0.489689,-0.233161,0.539798,-0.153841},
+{-0.151992,1.05461,1.59571,-1.14266,-0.775412,-4.78044,1.85783,-0.375044},
+{-1.37613,-1.17214,1.15579,-2.18811,0.0144438,3.36288,-0.559745,0.266116},
+{-1.90271,0.133615,-3.72728,5.39488,0.389955,-1.14554,2.92875,-1.07409},
+{-1.13268,-1.16504,-0.803357,-1.26185,-0.995426,2.98762,11.6034,-1.55409},
+{1.58461,3.43271,3.15758,3.61008,4.19841,2.95134,2.02262,1.21991},
+{-3.16395,1.76306,2.06703,1.88901,0.179146,1.37067,-1.19422,-0.984654},
+{0.0414621,-0.00391642,-0.0213088,-0.0476843,-0.0975031,0.017092,-0.014006,-0.00491766},
+{-1.2966,-3.69977,-0.196889,-1.74452,10.1355,-1.55321,1.81829,0.659723},
+{0.378435,13.6983,2.15336,-3.18556,-0.798485,0.863881,-0.15097,-0.732861},
+{-0.855569,0.24939,3.83951,-1.22131,-3.45346,0.658904,-3.41821,1.70097},
+{3.33813,-3.7548,-2.07261,-2.04664,0.0186421,-1.50429,1.8991,0.258947},
+{-1.4418,-3.00819,0.541237,4.31623,3.25692,1.92429,-0.401486,0.123254},
+{-2.61994,-3.4407,6.94121,2.97651,-0.864004,0.612121,1.20001,-3.97684},
+{-1.01072,-1.01778,-1.46718,0.962642,0.139496,6.4504,0.58795,-2.77344},
+{0.0683276,0.242321,-0.332268,-0.167348,0.0588223,-0.561949,0.0128769,0.692257},
+{-3.70373,3.53353,1.36103,-1.28587,4.6419,5.95083,0.463164,-4.46743},
+{4.73618,-2.4861,2.62966,-7.29803,-4.98566,-2.26953,-2.30375,3.06739},
+{-0.494718,0.718938,-0.304026,1.24893,-0.278192,4.10163,-6.95281,2.14885},
+{-0.472974,3.22649,-6.07153,1.07686,-3.75601,-1.10709,3.21006,0.312003},
+{0.170852,-0.556819,-5.61366,-10.0139,-5.71126,-2.51742,13.3491,11.8559},
+{-0.594016,1.23359,0.0658363,3.54037,-0.155034,-1.52533,0.0236745,-1.75594},
+{-15.9805,-7.17243,-13.2139,-10.7127,-7.74589,-7.88822,-2.35093,-1.36059},
+{-0.839397,-5.89704e-05,1.0169,-0.124808,-1.23702,1.07154,0.112274,-0.437035},
+{-0.498523,1.84575,-1.76887,-0.467115,2.6392,-0.207664,-1.27903,0.778147},
+{-0.894377,2.73574,-1.91608,-3.84077,0.645348,1.09503,0.102773,2.86183},
+{-1.16055,-3.20939,-3.60614,-8.21962,3.97539,12.4943,2.7547,10.0854},
+{15.0031,9.64887,-13.4129,3.18632,6.62155,0.941796,-8.23323,-8.32332},
+{-0.543627,-0.442222,-0.654387,-0.360416,-3.47404,-1.51365,3.9665,3.00349},
+{0.203788,1.75743,-0.0272479,0.617584,0.391623,0.884434,-2.73177,-1.05421},
+{1.26367,-12.8384,-1.06154,-1.10927,-0.234052,4.10143,3.1193,2.77169},
+{-0.507726,0.243182,-0.870555,0.644998,-0.567712,0.669043,-0.255913,0.462607},
+{-1.75066,3.07852,2.09557,-1.43375,1.54424,-0.999114,0.849652,-3.49942},
+{0.651646,-0.608241,0.548973,-0.48609,1.13023,-1.09611,-1.04516,1.27515},
+{-0.558097,0.401336,-0.948848,0.915317,-0.297274,3.34695,-1.907,0.354723},
+{-0.00229686,-0.41602,-0.641986,1.46701,1.20854,-0.559052,-0.817557,-0.262575},
+{-0.28695,-0.784754,0.4309,-0.00134333,0.474683,1.639,4.43773,-3.56919},
+{0.689816,2.2718,5.07713,-0.261499,0.422245,-1.12882,-2.44818,-1.98737},
+{-0.683059,0.46414,1.07219,-0.832315,1.01921,-0.012251,-0.468265,-0.0879798},
+{0.593875,-0.333936,-0.348577,0.902744,-0.471702,-0.148596,0.430625,-0.369835},
+{-7.15968,7.69222,-1.20884,-2.51399,9.04829,-8.10114,-3.45027,5.60251},
+{-3.12493,5.07696,1.41182,-3.44671,-3.56646,-1.87571,1.44955,1.77522},
+{-0.285136,-0.255548,-0.615051,0.346838,-1.27277,0.356668,-2.43423,5.33611},
+{0.512416,-2.74434,0.546467,2.83784,-0.533482,-0.817829,1.83944,-0.731159},
+{-0.528217,-5.85344,1.99714,-2.2978,0.098025,2.85496,1.09226,-1.43392},
+{-1.14276,1.48479,2.45777,2.07843,-3.71661,-0.741793,2.22734,-1.37552},
+{-7.3812,-4.55657,10.8417,10.8648,-1.20119,-1.15897,-3.46763,2.56275},
+{-0.316369,-0.0895606,-0.509939,-0.171779,-0.624263,0.654241,1.05006,2.63367},
+{-1.59816,0.335927,2.00651,3.53271,4.00066,1.59781,2.14921,-13.6871},
+{1.29544,-0.998222,1.64711,-2.71804,0.37388,-0.777328,0.648924,-0.758115},
+{0.123894,0.0498136,0.973389,0.587381,1.71504,-0.375171,-4.65329,0.85261},
+{3.10734,0.338142,-0.0128751,-0.864252,-1.49979,-2.89216,1.18564,1.80511},
+{-0.0904794,-0.538784,0.082841,-1.0526,1.32898,-1.73746,1.91643,2.8206},
+{-0.656568,0.848891,2.71889,1.47392,6.31869,-4.70759,-2.1531,-3.02864},
+{-3.19259,-4.22885,-1.97228,1.00988,-0.506759,0.192971,1.32023,2.91531},
+{0.408182,-1.64363,-1.30707,0.384958,-2.621,-0.650188,0.350918,-0.0830882},
+{0.22472,0.14646,-1.11336,-0.331597,0.982495,0.27725,-0.0547889,-0.0909637},
+{-1.69001,5.3349,-0.366215,2.32444,0.676152,-1.63652,-0.496699,0.990876},
+{-1.01343,2.02632,3.75093,-1.48647,-5.80882,-8.40272,-2.27878,10.2562},
+{3.8378,2.05113,-2.59689,-2.39786,-2.69032,0.0530386,0.26899,0.972373},
+{0.49211,0.0821152,-1.2347,-2.92653,2.16986,1.5811,0.59131,-1.51669},
+{0.467823,0.150847,1.88578,1.80124,0.0210955,0.103743,-1.30309,-0.624813},
+{-3.24128,0.153595,0.394586,1.34867,2.18227,2.90401,2.97036,1.87611},
+{-1.85919,0.571944,-0.334621,-0.769427,0.31506,0.493431,0.441428,0.315109},
+{-0.271593,-0.470292,0.489023,-0.56287,2.15425,-0.313037,2.40481,-0.930909},
+{1.0053,1.67489,1.8417,5.49286,2.59641,-9.01027,1.00317,-7.85156},
+{0.192674,1.23763,-0.2898,-0.821004,-1.89117,1.01075,1.95767,-2.19794},
+{2.12767,-0.14419,-4.98615,-0.415483,-0.621716,-1.12736,1.07307,2.17722},
+{-10.0525,-1.37945,12.0511,-8.52086,-12.1122,4.01575,7.7583,4.85601},
+{17.7165,16.2218,15.2097,16.8817,18.1844,16.7123,12.2521,9.76576},
+{-6.85617,7.56277,-3.45185,6.8115,4.55666,-1.9991,1.78707,-1.73036},
+{-0.499327,-0.0698337,-0.0373869,0.200028,0.329592,-0.0486077,0.0663931,-0.219115},
+{-2.27881,-2.05002,2.67206,1.03504,1.92792,0.121717,0.562062,-0.835895},
+{0.99975,11.1524,1.06566,1.68586,-0.504727,-5.86336,-3.12448,-4.47146},
+{0.285341,0.755941,0.0583213,2.3038,-2.79715,0.933629,-1.48385,0.0677943},
+{7.66993,-10.4982,-9.97698,6.17148,0.167368,-2.61863,-2.28408,4.39419},
+{-8.53897,-13.7514,0.266647,4.65467,3.68827,-4.83792,5.20001,10.7581},
+{1.03452,-3.55737,2.1642,1.52748,-0.342402,2.28709,-1.64957,1.22567},
+{-1.0491,1.7385,1.34901,0.655908,-6.00214,5.13727,1.03022,-4.067},
+{1.47236,0.335302,-0.69815,1.23935,1.03984,0.212929,1.88324,1.36407},
+{1.59779,0.719427,-4.42698,2.39738,5.85166,1.55233,-1.7612,-6.04771},
+{-2.0815,3.45684,10.8921,-8.82219,4.29542,1.09212,-2.85653,0.495975},
+{-1.04604,3.60327,2.37328,2.24126,4.81999,5.53379,-13.2484,-1.413},
+{0.488281,2.15665,0.747949,1.81346,-7.05606,-1.65903,0.150788,2.36166},
+{1.25837,-0.720683,1.14494,-3.89918,-0.920351,-10.1479,9.42865,3.23743},
+{0.470473,-0.457707,0.70375,8.20134,-1.67875,-0.674016,-2.50759,-3.23649},
+{-8.45883,-4.82219,-5.41379,-4.18737,-3.69233,-3.11833,-1.47025,-0.0576363},
+{0.152079,1.29853,-0.206948,-2.06923,-0.237207,1.04946,-0.84165,-0.377527},
+{-0.211852,-0.00916021,0.914064,-4.63152,1.14687,1.25372,-3.83941,2.45133},
+{1.81849,4.29555,-2.98607,-6.09764,5.12727,1.66926,-1.61484,-1.91625},
+{-1.874,0.549654,-2.78619,-2.47448,-6.14046,8.90464,0.0288635,6.82601},
+{4.6217,2.7517,1.04102,1.74871,1.00226,-1.02518,-2.89941,-2.91679},
+{-0.263811,-0.67306,-2.09165,0.0961835,-2.75083,3.57406,1.60871,1.06315},
+{0.600714,0.441095,0.417873,0.0629572,0.0999319,-0.344547,-0.272613,-0.516114},
+{-3.89916,-12.2242,3.70331,5.16777,9.65396,9.09547,-4.37104,-1.57708},
+{-1.84074,1.29088,-2.02276,2.04776,-0.887496,0.801188,0.383502,-0.368345},
+{0.656491,0.143978,0.624393,-0.158679,0.427109,-1.56755,0.619428,-4.2152},
+{0.609344,0.0732138,0.873515,-0.617669,1.05644,-4.91967,-3.81445,3.99232},
+{-0.409582,0.16064,-0.0131707,1.03396,0.361093,2.09456,-0.354058,-2.99418},
+{0.809913,-1.76251,-2.44662,3.11799,2.88003,-3.4845,-0.188212,0.652149},
+{0.406978,-0.0842555,-0.349887,-1.77173,-0.50055,-1.06198,5.77243,0.0498347},
+{3.18269,1.12462,6.41939,4.60169,-5.97689,-1.26831,-5.5743,-1.79626},
+{-2.53636,0.0317959,2.79664,-0.353874,-0.112605,-1.60821,-0.133658,1.60668},
+{1.91824,-1.02026,0.159537,0.0412503,-0.85463,0.832986,0.0705105,0.279141},
+{-5.02989,1.85044,1.82933,-2.36279,3.71654,-1.09433,-1.57432,1.25383},
+{0.99047,1.45704,1.37992,-0.589451,-1.24788,-1.50652,-1.19568,0.39856},
+{0.00706045,-0.599155,2.22793,-2.16684,-1.27906,0.0548773,2.21572,6.60851},
+{2.2303,0.0380174,-3.36751,0.0567251,0.580353,1.31216,-0.878314,-1.62739},
+{-0.929961,-0.980825,0.109624,0.733087,0.48422,0.601498,0.860915,0.343296},
+{-0.895637,-3.87482,3.13111,4.75071,-3.33122,-3.58624,1.14427,2.81316},
+{3.45503,-7.73637,1.48223,9.10071,-7.08029,6.03079,2.97385,-7.47854},
+{-0.437426,0.244051,0.123814,0.125134,-0.704714,0.403038,-1.45737,1.76556},
+{-0.776061,-2.66567,-2.13818,-0.301486,2.19431,9.31766,11.6326,-12.9785},
+{5.32131,-3.93852,3.25484,-1.54489,-1.04619,0.357715,-1.25165,-1.42639},
+{0.393764,1.25782,1.8604,1.92865,0.637688,-1.72167,-12.2475,4.44725},
+{1.32603,1.2719,-0.799616,1.0445,-0.472987,-0.572721,-0.388705,0.0559285},
+{2.13059,4.79752,-3.01884,-11.9279,3.68476,-7.27929,2.36094,1.79636},
+{2.01085,3.33588,3.45415,0.707843,-1.88576,-1.93373,-5.90498,-12.0753},
+{-13.1358,-0.0722972,1.1759,-0.233742,-0.469496,4.38377,2.22281,1.5721},
+{1.44864,0.484473,-1.04305,-1.91033,-1.7157,-3.04247,-2.18691,-1.66752},
+{-1.89339,-0.656363,-3.56054,-0.157522,0.597456,0.181031,0.305276,1.17847},
+{-2.99884,2.18798,-1.60484,-0.120089,2.16557,-2.16618,2.11124,-0.19639},
+{0.639774,-0.139229,-2.33318,-1.39971,-2.31862,0.139156,-2.04763,11.8003},
+{8.72324,0.0659868,2.72419,0.407081,-5.44599,-1.47224,0.605711,-2.40505},
+{0.0521982,-1.62578,-0.653986,-8.16205,3.39202,0.744154,3.70636,0.841041},
+{0.219746,0.918197,1.4789,1.54168,1.08978,1.11674,0.929919,0.169255},
+{-10.0517,-4.4404,-13.512,-0.762768,7.76414,6.38467,5.95964,-1.69592},
+{-4.8178,-0.237022,-1.62624,-1.58952,-1.77048,1.70292,0.255762,-1.4344},
+{0.492779,-0.0236254,0.23246,-0.255688,0.559473,-1.94112,0.820715,-0.546517},
+{0.923056,-0.517965,0.592486,-1.11193,2.87061,-5.2177,3.94727,-2.44346},
+{-2.39633,2.94591,2.56805,-3.08263,-0.500908,2.79285,1.94271,-0.54145},
+{-0.322366,-2.03661,-9.94176,7.36866,-5.18107,1.64396,4.91411,-1.37354},
+{2.39178,2.2664,-3.19701,-6.74048,-4.5786,2.73158,7.68536,-2.16476},
+{5.03591,1.12068,3.87863,3.70015,-0.119696,-0.347596,0.416848,2.02736},
+{-6.64054,6.49094,4.84356,1.34578,0.554388,0.97534,-1.63704,-1.95429},
+{0.189083,0.253443,0.351171,0.330216,0.341852,0.47609,0.172018,0.40755},
+{0.0613737,-4.35191,5.36635,-0.253103,2.42636,-2.32654,2.31745,-0.0704671},
+{-1.93029,9.65932,2.30469,-12.7983,-5.15272,5.96595,-3.53528,-3.19886},
+{1.41572,0.286996,0.244565,0.130537,-6.55088,3.56512,-4.17733,2.66477},
+{5.81587,-4.98287,-1.32456,0.73151,-4.39559,1.45896,1.66452,0.335995},
+{1.66357,-7.16468,-2.14436,2.00926,1.21921,0.952822,-0.505583,-0.591253},
+{1.6658,-8.68521,10.3974,-2.57838,0.666186,6.00717,-2.46826,0.550397},
+{0.363529,-1.92985,-5.13981,-0.583374,-4.53813,9.68008,4.04232,-1.13259},
+{-0.621135,1.05921,-1.10351,0.422243,-0.154673,-1.85978,0.127122,1.38249},
+{1.90018,1.47782,1.0164,-3.71849,-0.253692,4.9619,-1.32665,-4.14597},
+{14.2059,-3.19643,6.07712,-7.06154,-5.59924,2.66166,-6.71292,1.60592},
+{-1.14988,-2.11124,-0.822718,0.427132,1.18521,9.47297,-4.22216,0.995913},
+{1.63825,3.91994,-2.24553,1.74886,-0.910052,-2.6372,2.55721,-1.43779},
+{-0.187612,-1.12707,-3.21935,-2.53696,0.444087,0.250754,6.32012,6.84569},
+{0.402972,1.10826,0.537091,2.65937,-2.35776,-3.67383,-0.411338,0.00468015},
+{-17.4953,-19.3723,-14.7056,-16.8843,-18.4026,-16.6708,-12.4375,-11.2071},
+{0.571586,0.621064,0.399659,-0.879283,-0.81783,-0.11569,0.346091,0.370155},
+{0.26496,-0.612374,0.656908,-1.40373,4.63243,-1.55518,-0.146315,-0.211709},
+{-0.221528,4.37888,-4.90966,-0.826994,-1.15318,2.45195,-0.999603,-0.885087},
+{0.0774179,-2.35438,-0.615972,-3.95522,-0.489508,5.37933,0.83192,3.97895},
+{11.8538,0.280897,-6.25442,-0.413919,0.177485,-2.81457,-0.187652,-1.32068},
+{0.849645,-0.777109,0.132662,-2.32685,-1.7465,-0.299211,-0.353344,2.7832},
+{0.360023,-0.0221648,0.182637,2.04186,0.437422,2.16491,-5.59429,-4.20462},
+{6.58371,-3.06165,-5.46584,-7.15424,1.15371,4.55279,-0.676023,-0.814275},
+{-0.662566,1.60954,-0.151962,0.439522,-0.119091,0.0794726,-0.154145,-0.439802},
+{0.690386,-0.213604,1.24216,0.0327462,1.01089,-0.331969,1.77089,-8.32465},
+{0.25844,0.71889,1.28564,0.484911,1.81275,-3.26167,-1.30672,-0.543728},
+{-0.874365,-0.847797,-0.0344846,-0.364135,3.38751,1.92608,-1.60058,-0.364437},
+{-2.47908,0.0358242,-0.416142,1.25336,1.61083,-0.405303,-0.200643,0.153088},
+{0.0676664,0.0732605,-1.70212,1.13502,0.178007,-1.04099,2.46956,-1.61058},
+{2.04816,1.49183,8.84348,-3.07608,-4.29935,-2.43361,0.184449,-0.966081},
+{-1.62614,3.1635,1.08861,-1.21798,0.171358,-0.17998,-1.12656,0.282562},
+{0.0912846,0.176816,-0.546831,-0.205794,-0.295235,0.878923,1.00537,-0.490185},
+{1.60419,1.08165,-7.39422,4.18227,9.66378,-4.6794,-6.23252,3.40852},
+{-7.56484,8.28081,6.27843,-3.72213,-0.614124,-5.09631,6.06978,-3.43011},
+{1.21491,0.697695,-1.62641,-0.529543,-0.617756,-0.414999,-2.13013,1.85773},
+{3.04352,-2.20158,-0.810965,1.49209,-0.184109,-1.33921,-1.8366,0.410804},
+{-0.105488,-2.76789,1.55884,-0.490935,-1.1862,0.247893,1.58913,0.842581},
+{-3.49846,0.159163,1.8186,-0.177431,-1.27182,0.0968679,2.14015,-0.368962},
+{-6.03981,-4.30762,-4.10649,11.161,7.31562,-0.27644,2.69345,-3.42264},
+{-0.313663,-0.421797,-0.390626,-0.0718103,1.16765,1.89664,-0.542448,2.32168},
+{1.34793,-1.60852,0.960585,-0.842856,2.52615,-4.00664,9.11328,-10.994},
+{0.614699,-0.444924,3.50166,-1.70597,0.372752,0.735592,-1.0934,0.745709},
+{-2.5638,-2.06912,1.59051,3.69104,0.513344,-2.79309,-4.0566,0.0711823},
+{2.02001,0.693771,0.597655,0.346926,-1.89079,-0.533733,-0.214125,-1.53317}};
index 3ab5614..15ed4d6 100644 (file)
@@ -441,7 +441,8 @@ void sb_encode(SBEncState *st, float *in, FrameBits *bits)
             eh+=sqr(exc[i]);
          for (i=0;i<st->subframeSize;i++)
             el+=sqr(st->st_low.exc[offset+i]);
-
+         if (st->st_low.pitch[sub]>8 || (rand()%5)==0)
+         {
          for (i=0;i<st->subframeSize;i++)
          {
             float p=(.1+exc[i])*filter_ratio/(1+sqrt(el/st->subframeSize));
@@ -450,7 +451,7 @@ void sb_encode(SBEncState *st, float *in, FrameBits *bits)
             printf ("%f ", p);
          }
          printf ("\n");
-
+         }
          /* Gain to use if we want to use the low-band excitation for high-band */
          g=eh/(.01+el);
          g=sqrt(g);
index f6bf1c2..67e3d6d 100644 (file)
@@ -135,6 +135,7 @@ void encoder_init(EncState *st, SpeexMode *mode)
 
    st->pi_gain = calloc(st->nbSubframes, sizeof(float));
 
+   st->pitch = calloc(st->nbSubframes, sizeof(int));
 }
 
 void encoder_destroy(EncState *st)
@@ -168,6 +169,7 @@ void encoder_destroy(EncState *st)
    free(st->mem_sp);
    free(st->mem_sw);
    free(st->pi_gain);
+   free(st->pitch);
 }
 
 
@@ -347,17 +349,10 @@ void encode(EncState *st, float *in, FrameBits *bits)
          exc[i]=0;
 
       /* Long-term prediction */
-#if 1
       pitch = st->ltp_quant(target, sw, st->interp_qlpc, st->bw_lpc1, st->bw_lpc2,
                     exc, st->ltp_params, st->min_pitch, st->max_pitch, 
                     st->lpcSize, st->subframeSize, bits, st->stack, exc2);
-#else
-      {
-         float gain[3];
-         int pitch;
-         closed_loop_fractional_pitch(target, st->interp_qlpc, st->bw_lpc1, st->bw_lpc2,                                      exc, st->os_filt, st->os_filt_ord2, st->os_fact, 35, 290,                                      &gain[0], &pitch, st->lpcSize,                                      st->subframeSize, st->stack);
-      }
-#endif
+      st->pitch[sub]=pitch;
 
       /* Update target for adaptive codebook contribution */
       residue_zero(exc, st->bw_lpc1, res, st->subframeSize, st->lpcSize);
@@ -371,6 +366,7 @@ void encode(EncState *st, float *in, FrameBits *bits)
       for (i=0;i<st->subframeSize;i++)
          enoise += target[i]*target[i];
       snr = 10*log10((esig+1)/(enoise+1));
+      /*st->pitch[sub]=(int)snr;*/
 #ifdef DEBUG
       printf ("pitch SNR = %f\n", snr);
 #endif
index 50e66a9..f35b0ae 100644 (file)
@@ -36,6 +36,7 @@ typedef struct EncState {
    int    max_pitch;      /* Maximum pitch value allowed */
    int    ol_pitch;       /* Open-loop pitch */
    int    ol_voiced;      /* Open-loop voiced/non-voiced decision */
+   int   *pitch;
    float  gamma1;         /* Perceptual filter: A(z/gamma1) */
    float  gamma2;         /* Perceptual filter: A(z/gamma2) */
    float  lag_factor;     /* Lag windowing gaussian width */