[xiph-cvs] cvs commit: vorbis/lib floor1.c

Monty xiphmont at xiph.org
Tue Jun 5 16:54:27 PDT 2001



xiphmont    01/06/05 16:54:26

  Modified:    lib      floor1.c
  Log:
  Fixed a serious algorithmic bug in unpack that was spotted by routine
  testing during a training run.

Revision  Changes    Path
1.3       +2117 -5   vorbis/lib/floor1.c

Index: floor1.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/floor1.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- floor1.c	2001/05/27 06:44:00	1.2
+++ floor1.c	2001/06/05 23:54:25	1.3
@@ -11,7 +11,7 @@
  ********************************************************************
 
  function: floor backend 1 implementation
- last mod: $Id: floor1.c,v 1.2 2001/05/27 06:44:00 xiphmont Exp $
+ last mod: $Id: floor1.c,v 1.3 2001/06/05 23:54:25 xiphmont Exp $
 
  ********************************************************************/
 
@@ -636,10 +636,10 @@
   /* quantize the relevant floor points and collect them into line fit
      structures (one per minimal division) at the same time */
   if(posts==0){
-    nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
+    nonzero+=accumulate_fit(logmask,logmax,0,n,fits,n,info);
   }else{
     for(i=0;i<posts-1;i++)
-      nonzero+=accumulate_fit(logmask,logmdct,look->sorted_index[i],
+      nonzero+=accumulate_fit(logmask,logmax,look->sorted_index[i],
                               look->sorted_index[i+1],fits+i,
                               n,info);
   }
@@ -854,6 +854,12 @@
         fit_valueA[i]=predicted;
         fit_valueB[i]=0;
       }
+      if(fit_valueB[i]==0)
+	fit_valueA[i]|=0x8000;
+      else{
+	fit_valueA[look->loneighbor[i-2]]&=0x7fff;
+	fit_valueA[look->hineighbor[i-2]]&=0x7fff;
+      }
     }
 
     /* we have everything we need. pack it out */
@@ -954,8 +960,8 @@
       int ly=fit_valueA[0]*info->mult;
       for(j=1;j<posts;j++){
         int current=look->forward_index[j];
-	if(fit_valueB[current]>0){
-	  int hy=fit_valueA[current]*info->mult;
+	if(!(fit_valueA[current]&0x8000)){
+	  int hy=(fit_valueA[current]&0x7fff)*info->mult;
           hx=info->postlist[current];
           
           render_line(lx,hx,ly,hy,codedflr);
@@ -1063,6 +1069,9 @@
         }
 
         fit_value[i]=val+predicted;
+	fit_value[look->loneighbor[i-2]]&=0x7fff;
+	fit_value[look->hineighbor[i-2]]&=0x7fff;
+
       }else{
         fit_value[i]=predicted|0x8000;
       }
@@ -1105,3 +1114,2106 @@
   &floor1_free_look,&floor1_forward,&floor1_inverse
 };
 
+#if 0
+static float test_mask[]={
+  -44.5606,
+  -52.1648,
+  -64.1442,
+  -81.206,
+  -92.407,
+  -92.5,
+  -92.5,
+  -88.7254,
+  -84.746,
+  -80.643,
+  -67.643,
+  -63.643,
+  -56.1236,
+  -48.643,
+  -48.643,
+-48.643,
+-51.643,
+-50.643,
+-51.643,
+-51.643,
+-51.643,
+-51.643,
+-50.643,
+-50.643,
+-49.643,
+-51.643,
+-51.643,
+-50.1648,
+-49.3369,
+-49.3369,
+-49.3369,
+-49.3369,
+-55.1005,
+-56.3369,
+-56.3369,
+-56.3369,
+-57.143,
+-57.143,
+-57.143,
+-58.3369,
+-56.1236,
+-55.1005,
+-55.1005,
+-55.1005,
+-55.1005,
+-55.1005,
+-60.643,
+-62.6005,
+-62.6005,
+-63.143,
+-63.143,
+-64.643,
+-64.643,
+-64.643,
+-64.643,
+-64.643,
+-65.643,
+-65.643,
+-65.643,
+-65.643,
+-65.643,
+-67.143,
+-67.143,
+-67.143,
+-67.143,
+-67.143,
+-69.5167,
+-69.5167,
+-69.1624,
+-69.1624,
+-69.1624,
+-69.1624,
+-69.1624,
+-69.1624,
+-69.1624,
+-69.1624,
+-69.1624,
+-69.3452,
+-71,
+-71,
+-71,
+-69.9889,
+-68.1854,
+-68.1854,
+-68.1854,
+-68.1854,
+-68,
+-67.5,
+-66.5,
+-66.5,
+-65,
+-64,
+-64,
+-65,
+-64,
+-64,
+-64,
+-64,
+-64,
+-64,
+-64,
+-64,
+-64,
+-63,
+-62,
+-63,
+-63,
+-63,
+-63,
+-63,
+-63,
+-63,
+-61.5,
+-61.5,
+-61.5,
+-60.5,
+-60.5,
+-60.5,
+-60.5,
+-60.5,
+-60.5,
+-59.5,
+-59.5,
+-59,
+-59,
+-59,
+-59,
+-59,
+-59,
+-59,
+-59,
+-58,
+-58,
+-58,
+-58,
+-58,
+-58,
+-58,
+-58,
+-58,
+-58,
+-58,
+-58,
+-58,
+-58,
+-58,
+-58,
+-58,
+-58,
+-58,
+-58,
+-58,
+-58,
+-58,
+-58,
+-58,
+-58,
+-58,
+-59,
+-59,
+-59,
+-59.5,
+-59.5,
+-60.5,
+-60.5,
+-61.5,
+-61.5,
+-60.5,
+-60.5,
+-60.5,
+-61.5,
+-61.5,
+-61.5,
+-60.5,
+-60.5,
+-60.5,
+-60.5,
+-60.5,
+-60.5,
+-60.5,
+-60.5,
+-60.5,
+-60.5,
+-60.5,
+-60.5,
+-60.5,
+-60.5,
+-60.5,
+-60.5,
+-60.5,
+-60.5,
+-60.5,
+-61.5,
+-61.5,
+-61.5,
+-61.5,
+-61.5,
+-62.5,
+-62.5,
+-62.5,
+-62.5,
+-62.5,
+-63,
+-63,
+-65,
+-65,
+-66.5,
+-66.5,
+-66.5,
+-71.5,
+-71.5,
+-71.5,
+-71.5,
+-71.5,
+-71.5,
+-71.5,
+-79,
+-79,
+-79.5,
+-79,
+-79,
+-79,
+-79,
+-79,
+-79.5,
+-79.5,
+-79.5,
+-79.5,
+-79.5,
+-79.5,
+-79.5,
+-79.5,
+-79.5,
+-79,
+-79,
+-79,
+-77.5,
+-77.5,
+-77.5,
+-77.5,
+-77.5,
+-77.5,
+-77,
+-77,
+-77,
+-77,
+-77,
+-77,
+-77,
+-77,
+-77,
+-77,
+-77,
+-77,
+-77,
+-77,
+-77,
+-77,
+-77,
+-77,
+-77,
+-77,
+-77,
+-76.9913,
+-76.9803,
+-76.9695,
+-76.9586,
+-76.9478,
+-76.937,
+-76.9263,
+-76.9156,
+-76.905,
+-76.8944,
+-77.3838,
+-77.3733,
+-77.3628,
+-77.3523,
+-77.3419,
+-77.3315,
+-79.3212,
+-79.3109,
+-79.3006,
+-79.2904,
+-79.2802,
+-79.27,
+-79.2599,
+-79.2498,
+-79.2397,
+-79.2297,
+-79.2197,
+-79.2098,
+-79.1999,
+-78.69,
+-76.6802,
+-76.6703,
+-76.6606,
+-76.6508,
+-76.6411,
+-74.6314,
+-74.6218,
+-74.6122,
+-74.6026,
+-74.593,
+-74.5835,
+-74.074,
+-74.0645,
+-73.5551,
+-72.0457,
+-71.0363,
+-71.027,
+-71.0177,
+-71.0084,
+-70.9992,
+-70.9899,
+-70.9808,
+-70.9716,
+-70.9625,
+-70.9534,
+-70.9443,
+-70.9352,
+-70.9262,
+-70.9172,
+-70.9083,
+-70.8993,
+-70.8904,
+-70.8816,
+-70.8727,
+-70.8639,
+-70.8551,
+-70.8463,
+-70.8376,
+-70.8289,
+-70.8202,
+-70.8115,
+-70.8029,
+-70.7943,
+-70.7857,
+-70.7771,
+-70.7686,
+-70.7601,
+-70.7516,
+-70.7431,
+-70.7347,
+-70.7263,
+-70.7179,
+-70.7095,
+-70.7012,
+-70.6928,
+-74.1846,
+-74.1763,
+-74.168,
+-74.1598,
+-74.1516,
+-75.1434,
+-75.1353,
+-75.1272,
+-76.1191,
+-76.111,
+-76.1029,
+-76.0949,
+-76.0869,
+-76.5789,
+-76.5709,
+-76.563,
+-76.555,
+-76.5471,
+-78.0392,
+-78.0314,
+-78.0235,
+-78.0157,
+-78.0079,
+-78.0002,
+-78,
+-78,
+-79,
+-79,
+-79,
+-79,
+-79,
+-79,
+-80.5,
+-80.5,
+-80.5,
+-80.5,
+-80.5,
+-80.5,
+-81,
+-81,
+-81,
+-81,
+-81,
+-81,
+-81,
+-81,
+-83,
+-83,
+-83,
+-83,
+-83,
+-83,
+-83,
+-83,
+-83,
+-83,
+-83,
+-83,
+-85.5,
+-85.5,
+-85.5,
+-84,
+-84,
+-85.5,
+-85.5,
+-84,
+-85.5,
+-84,
+-84,
+-84,
+-84,
+-84,
+-84,
+-84,
+-84,
+-84,
+-84,
+-84,
+-84,
+-84,
+-84,
+-84,
+-84,
+-84,
+-84,
+-84,
+-84,
+-84.5,
+-84.5,
+-84.5,
+-84.5,
+-84,
+-84,
+-84,
+-84,
+-84,
+-84,
+-84,
+-84,
+-84,
+-84,
+-84,
+-84,
+-84,
+-84,
+-84.5,
+-84.5,
+-84.5,
+-84.5,
+-84.5,
+-84.5,
+-85,
+-85,
+-85,
+-85,
+-85,
+-85,
+-85,
+-85,
+-85,
+-85,
+-85,
+-85,
+-85,
+-85,
+-85,
+-85,
+-85,
+-85,
+-85,
+-85,
+-85,
+-85,
+-85.5,
+-85.5,
+-85.5,
+-85.5,
+-85.5,
+-85.5,
+-85.5,
+-85.5,
+-85.5,
+-85.5,
+-86.5,
+-86.5,
+-86.5,
+-86.5,
+-86.5,
+-86.5,
+-86.5,
+-86.5,
+-86.5,
+-86.5,
+-86.5,
+-86.5,
+-86.5,
+-87,
+-87,
+-87,
+-87,
+-87,
+-88.4276,
+-88.4276,
+-88.4276,
+-88.4276,
+-88.4276,
+-88.4276,
+-88.4276,
+-88.4276,
+-89.4276,
+-89.4276,
+-89.4276,
+-89.4276,
+-89.4276,
+-89.4276,
+-91.5,
+-91.5,
+-91.5,
+-91.5,
+-91,
+-91,
+-90.5,
+-90.5,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-89,
+-89,
+-89,
+-89,
+-89,
+-89,
+-89,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-89,
+-89,
+-89,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-89,
+-89,
+-89,
+-89,
+-89,
+-89,
+-89,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90.5,
+-90.5,
+-90.5,
+-90.5,
+-90.5,
+-90.5,
+-90.5,
+-90.5,
+-90.5,
+-90.5,
+-90.5,
+-90.5,
+-90.5,
+-90.5,
+-90.5,
+-90.5,
+-90.5223,
+-90.5223,
+-90.5223,
+-90.5223,
+-90.5223,
+-90.5,
+-90.5,
+-90.5,
+-90.5,
+-90.5,
+-90.5,
+-90.5,
+-90.5,
+-90.5,
+-90.5,
+-90.5,
+-90.5,
+-90.5,
+-90.5,
+-90.5,
+-90.5,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-89,
+-89,
+-89,
+-89,
+-89,
+-89,
+-90,
+-90,
+-90,
+-90,
+-90,
+-90,
+-89,
+-87.5429,
+-87.5429,
+-87.5429,
+-87.5429,
+-87.5429,
+-87.5429,
+-87.5429,
+-87.5429,
+-87.5429,
+-87.5429,
+-87.5429,
+-87.5429,
+-87.5429,
+-87.5429,
+-87.5429,
+-87.5429,
+-87.5429,
+-87.5429,
+-87.5429,
+-87.5429,
+-87.5429,
+-87.5429,
+-87.5429,
+-87.5429,
+-87.5429,
+-87.5429,
+-87.5429,
+-87.5429,
+-87.5429,
+-87.5429,
+-87.5429,
+-87.5429,
+-87.5429,
+-87.5429,
+-87.4384,
+-87.3027,
+-87.1669,
+-87.0312,
+-86.8954,
+-86.7597,
+-86.6239,
+-86.4882,
+-86.3524,
+-86.2167,
+-86.081,
+-85.9452,
+-85.8095,
+-85.6737,
+-85.538,
+-85.4022,
+-85.2665,
+-85.1307,
+-84.995,
+-84.8592,
+-84.7235,
+-84.5878,
+-84.452,
+-84.3163,
+-84.1805,
+-84.0448,
+-83.909,
+-83.7733,
+-83.6375,
+-83.5018,
+-83.366,
+-83.2303,
+-83.0945,
+-82.9588,
+-82.8231,
+-82.6873,
+-82.5516,
+-82.4158,
+-82.2801,
+-82.1443,
+-82.0086,
+-81.8728,
+-81.7371,
+-81.6013,
+-81.4656,
+-81.3298,
+-81.1941,
+-81.0584,
+-76.3296,
+-76.3296,
+-76.3296,
+-76.3296,
+-76.3296,
+-76.3296,
+-76.3296,
+-76.3296,
+-76.3296,
+-76.3296,
+-76.3296,
+-76.3296,
+-76.3296,
+-76.3296,
+-76.3296,
+-76.3296,
+-76.3296,
+-76.3296,
+-76.3296,
+-76.3296,
+-76.3296,
+-76.3296,
+-76.3296,
+-76.3296,
+-76.3296,
+-76.3296,
+-76.3296,
+-76.3296,
+-76.3296,
+-76.3296,
+-76.3296,
+-76.3296,
+-76.3296,
+-76.3296,
+-76.3073,
+-76.1715,
+-76.0358,
+-75.9,
+-75.7643,
+-75.6285,
+-75.4928,
+-75.357,
+-75.2213,
+-75.0855,
+-74.9498,
+-74.814,
+-74.6783,
+-74.5425,
+-74.4068,
+-74.2711,
+-74.1353,
+-73.9996,
+-73.8638,
+-73.7281,
+-73.5923,
+-73.4566,
+-73.3208,
+-73.1851,
+-73.0493,
+-72.9136,
+-72.7778,
+-72.6421,
+-72.5064,
+-72.3706,
+-72.2349,
+-72.0991,
+-71.9634,
+-71.8276,
+-71.6919,
+-71.5561,
+-71.4204,
+-71.2846,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-56.3296,
+-61.5223,
+-61.5223,
+-61.5109,
+-61.3752,
+-61.2394,
+-61.1037,
+-60.9679,
+-60.8322,
+-60.6965,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.5606,
+-60.0713,
+-60.0713,
+-60.0713,
+-60.0713,
+-60.0713,
+-60.0713,
+-60.0713,
+-60.0713,
+-60.0713,
+-60.0713,
+-60.0713,
+-58.8284,
+-58.8284,
+-58.8284,
+-58.8284,
+-58.8284,
+-58.8284,
+-58.8284,
+-58.8284,
+-58.8284,
+-58.8284,
+-58.8284,
+  -41.3296};
+
+static float test_mdct[]={
+-25.2422,
+-47.1418,
+-47.1418,
+-64.2884,
+-72.2472,
+-75.5017,
+-70.309,
+-78.2678,
+-92.1125,
+-74.0507,
+-61.3658,
+-55.9889,
+-50.6636,
+-31.2628,
+-27.3369,
+-42.7048,
+-49.9683,
+-77.2448,
+-64.2884,
+-79.4276,
+-76.3296,
+-83.2654,
+-87.5429,
+-86.7872,
+-81.5223,
+-65.2035,
+-60.206,
+-58.2678,
+-25.8859,
+-36.6842,
+-52.2472,
+-52.2472,
+-58.2678,
+-74.0507,
+-77.2448,
+-77.2448,
+-68.7254,
+-70.309,
+-65.2035,
+-60.206,
+-54.1854,
+-43.9477,
+-35.1005,
+-41.1211,
+-48.7254,
+-66.2266,
+-71.2242,
+-62.0095,
+-74.0507,
+-82.3502,
+-79.4276,
+-84.2884,
+-86.7872,
+-88.3708,
+-77.2448,
+-66.2266,
+-50.6636,
+-71.2242,
+-78.2678,
+-74.0507,
+-77.2448,
+-89.2859,
+-70.309,
+-96.8902,
+-94.3914,
+-80.7666,
+-90.8696,
+-92.1125,
+-75.5017,
+-66.2266,
+-54.746,
+-100.412,
+-60.206,
+-60.206,
+-68.7254,
+-80.7666,
+-89.2859,
+-70.309,
+-74.746,
+-75.5017,
+-86.7872,
+-74.0507,
+-72.2472,
+-77.2448,
+-64.2884,
+-56.6842,
+-54.1854,
+-56.6842,
+-55.9889,
+-61.3658,
+-67.3864,
+-66.2266,
+-78.2678,
+-76.3296,
+-73.407,
+-78.2678,
+-70.309,
+-63.4605,
+-60.206,
+-98.8284,
+-59.1829,
+-60.206,
+-63.4605,
+-72.8078,
+-77.2448,
+-88.3708,
+-83.2654,
+-80.7666,
+-78.8284,
+-106.433,
+-71.2242,
+-66.7872,
+-62.7048,
+-72.2472,
+-60.7666,
+-59.1829,
+-63.4605,
+-67.3864,
+-77.2448,
+-72.2472,
+-84.2884,
+-80.7666,
+-90.309,
+-74.746,
+-84.2884,
+-71.2242,
+-60.7666,
+-64.2884,
+-57.4399,
+-59.1829,
+-63.4605,
+-62.7048,
+-60.7666,
+-57.4399,
+-62.0095,
+-60.206,
+-80.0713,
+-67.3864,
+-56.6842,
+-58.2678,
+-60.206,
+-58.2678,
+-55.9889,
+-53.1623,
+-54.746,
+-57.4399,
+-61.3658,
+-62.7048,
+-63.4605,
+-66.2266,
+-74.746,
+-75.5017,
+-88.3708,
+-71.2242,
+-63.4605,
+-68.0301,
+-61.3658,
+-118.474,
+-66.7872,
+-64.2884,
+-66.2266,
+-70.309,
+-76.3296,
+-70.309,
+-83.2654,
+-69.4811,
+-68.0301,
+-70.309,
+-74.0507,
+-63.4605,
+-82.3502,
+-59.1829,
+-59.1829,
+-64.2884,
+-64.2884,
+-73.407,
+-71.2242,
+-78.2678,
+-72.2472,
+-68.7254,
+-68.0301,
+-60.206,
+-60.7666,
+-74.746,
+-60.206,
+-84.2884,
+-62.7048,
+-60.206,
+-62.0095,
+-66.2266,
+-75.5017,
+-74.0507,
+-76.3296,
+-66.2266,
+-81.5223,
+-64.2884,
+-66.2266,
+-71.2242,
+-71.2242,
+-86.7872,
+-89.2859,
+-79.4276,
+-96.3296,
+-78.2678,
+-71.2242,
+-78.2678,
+-86.0919,
+-95.3065,
+-79.4276,
+-86.7872,
+-78.8284,
+-86.7872,
+-82.3502,
+-125.41,
+-87.5429,
+-91.4688,
+-93.5635,
+-89.2859,
+-107.348,
+-85.4482,
+-102.35,
+-99.5841,
+-100.412,
+-92.8078,
+-102.911,
+-93.5635,
+-89.2859,
+-84.849,
+-86.7872,
+-108.371,
+-86.7872,
+-79.4276,
+-86.7872,
+-92.1125,
+-106.433,
+-86.0919,
+-83.2654,
+-83.2654,
+-80.7666,
+-78.2678,
+-102.911,
+-78.8284,
+-105.605,
+-77.2448,
+-84.849,
+-84.849,
+-72.8078,
+-83.2654,
+-80.7666,
+-91.4688,
+-79.4276,
+-80.7666,
+-96.3296,
+-74.0507,
+-81.5223,
+-79.4276,
+-76.3296,
+-96.8902,
+-94.3914,
+-75.5017,
+-77.2448,
+-83.2654,
+-86.0919,
+-84.2884,
+-94.3914,
+-83.2654,
+-101.327,
+-75.5017,
+-95.3065,
+-78.8284,
+-86.7872,
+-84.2884,
+-83.2654,
+-78.8284,
+-85.4482,
+-89.2859,
+-84.2884,
+-88.3708,
+-86.0919,
+-99.5841,
+-98.1331,
+-83.2654,
+-90.8696,
+-119.389,
+-89.2859,
+-92.8078,
+-84.849,
+-90.309,
+-81.5223,
+-92.1125,
+-108.371,
+-92.1125,
+-87.5429,
+-84.2884,
+-86.7872,
+-92.1125,
+-76.3296,
+-79.4276,
+-96.8902,
+-89.2859,
+-78.8284,
+-82.3502,
+-80.7666,
+-78.8284,
+-86.0919,
+-82.3502,
+-80.0713,
+-80.7666,
+-76.3296,
+-82.3502,
+-80.0713,
+-73.407,
+-78.2678,
+-74.746,
+-76.3296,
+-87.5429,
+-74.746,
+-77.2448,
+-72.2472,
+-91.4688,
+-75.5017,
+-71.2242,
+-80.0713,
+-96.3296,
+-74.0507,
+-82.3502,
+-71.2242,
+-70.309,
+-70.309,
+-78.2678,
+-76.3296,
+-81.5223,
+-70.309,
+-69.4811,
+-80.7666,
+-75.5017,
+-74.746,
+-80.7666,
+-82.3502,
+-77.2448,
+-83.2654,
+-76.3296,
+-84.2884,
+-80.7666,
+-78.8284,
+-80.7666,
+-70.309,
+-78.8284,
+-81.5223,
+-81.5223,
+-86.7872,
+-86.7872,
+-77.2448,
+-88.3708,
+-75.5017,
+-102.35,
+-81.5223,
+-82.3502,
+-80.7666,
+-88.3708,
+-78.2678,
+-88.3708,
+-84.2884,
+-89.2859,
+-96.3296,
+-101.327,
+-78.2678,
+-88.3708,
+-74.746,
+-104.154,
+-84.2884,
+-94.3914,
+-88.3708,
+-102.35,
+-79.4276,
+-88.3708,
+-87.5429,
+-92.1125,
+-83.2654,
+-106.433,
+-91.4688,
+-81.5223,
+-102.911,
+-89.2859,
+-80.7666,
+-92.1125,
+-83.2654,
+-91.4688,
+-95.3065,
+-87.5429,
+-400,
+-83.2654,
+-90.309,
+-92.1125,
+-81.5223,
+-89.2859,
+-109.531,
+-90.8696,
+-89.2859,
+-91.4688,
+-87.5429,
+-88.3708,
+-91.4688,
+-106.433,
+-92.8078,
+-90.8696,
+-92.1125,
+-92.1125,
+-90.309,
+-98.1331,
+-112.453,
+-86.0919,
+-97.4894,
+-92.1125,
+-98.1331,
+-83.2654,
+-118.474,
+-91.4688,
+-109.531,
+-88.3708,
+-104.849,
+-91.4688,
+-94.3914,
+-109.531,
+-90.309,
+-113.368,
+-92.1125,
+-87.5429,
+-102.35,
+-84.2884,
+-86.7872,
+-90.8696,
+-87.5429,
+-84.2884,
+-86.7872,
+-84.2884,
+-400,
+-89.2859,
+-119.389,
+-88.3708,
+-81.5223,
+-108.931,
+-80.7666,
+-104.154,
+-115.551,
+-89.2859,
+-111.625,
+-93.5635,
+-104.154,
+-89.2859,
+-92.8078,
+-98.1331,
+-102.35,
+-85.4482,
+-86.0919,
+-90.8696,
+-83.2654,
+-96.8902,
+-89.2859,
+-89.2859,
+-100.412,
+-84.2884,
+-88.3708,
+-119.389,
+-92.8078,
+-84.849,
+-96.8902,
+-98.1331,
+-91.4688,
+-88.3708,
+-105.605,
+-89.2859,
+-99.5841,
+-126.993,
+-90.309,
+-95.3065,
+-130.515,
+-106.433,
+-123.667,
+-87.5429,
+-85.4482,
+-107.348,
+-85.4482,
+-91.4688,
+-86.7872,
+-95.3065,
+-90.8696,
+-102.35,
+-88.3708,
+-81.5223,
+-86.0919,
+-86.0919,
+-94.3914,
+-96.3296,
+-87.5429,
+-106.433,
+-94.3914,
+-120.412,
+-96.3296,
+-95.3065,
+-91.4688,
+-108.371,
+-98.8284,
+-95.3065,
+-108.931,
+-90.8696,
+-99.5841,
+-102.35,
+-110.174,
+-114.391,
+-98.8284,
+-107.348,
+-94.3914,
+-108.931,
+-94.3914,
+-93.5635,
+-103.51,
+-96.3296,
+-96.3296,
+-98.8284,
+-95.3065,
+-116.89,
+-95.3065,
+-102.911,
+-96.3296,
+-104.154,
+-106.433,
+-98.8284,
+-100.412,
+-97.4894,
+-92.8078,
+-92.8078,
+-95.3065,
+-97.4894,
+-102.35,
+-110.174,
+-92.8078,
+-109.531,
+-92.1125,
+-94.3914,
+-91.4688,
+-97.4894,
+-94.3914,
+-92.1125,
+-87.5429,
+-89.2859,
+-114.391,
+-90.309,
+-103.51,
+-90.8696,
+-94.3914,
+-90.309,
+-90.309,
+-98.8284,
+-100.412,
+-95.3065,
+-112.453,
+-92.1125,
+-107.348,
+-90.8696,
+-95.3065,
+-104.154,
+-103.51,
+-90.309,
+-90.8696,
+-101.327,
+-88.3708,
+-94.3914,
+-98.8284,
+-103.51,
+-96.3296,
+-90.309,
+-90.8696,
+-89.2859,
+-85.4482,
+-101.327,
+-98.8284,
+-96.3296,
+-95.3065,
+-134.952,
+-83.2654,
+-99.5841,
+-90.309,
+-103.51,
+-102.35,
+-105.605,
+-112.453,
+-94.3914,
+-98.1331,
+-92.1125,
+-98.8284,
+-94.3914,
+-92.8078,
+-112.453,
+-102.911,
+-86.0919,
+-90.309,
+-118.474,
+-94.3914,
+-104.154,
+-92.1125,
+-134.257,
+-95.3065,
+-89.2859,
+-93.5635,
+-101.327,
+-102.35,
+-113.368,
+-93.5635,
+-101.327,
+-93.5635,
+-94.3914,
+-99.5841,
+-110.174,
+-116.195,
+-91.4688,
+-87.5429,
+-93.5635,
+-92.1125,
+-87.5429,
+-107.348,
+-91.4688,
+-87.5429,
+-92.1125,
+-90.8696,
+-98.8284,
+-104.849,
+-90.309,
+-105.605,
+-120.412,
+-105.605,
+-100.412,
+-90.309,
+-99.5841,
+-92.1125,
+-89.2859,
+-98.1331,
+-94.3914,
+-102.35,
+-96.3296,
+-96.3296,
+-110.174,
+-91.4688,
+-101.327,
+-108.931,
+-96.8902,
+-93.5635,
+-97.4894,
+-90.8696,
+-85.4482,
+-108.371,
+-90.309,
+-99.5841,
+-92.1125,
+-94.3914,
+-93.5635,
+-400,
+-96.8902,
+-100.412,
+-97.4894,
+-92.1125,
+-86.0919,
+-102.35,
+-103.51,
+-101.327,
+-97.4894,
+-96.8902,
+-102.35,
+-92.8078,
+-99.5841,
+-120.412,
+-92.8078,
+-96.3296,
+-107.348,
+-101.327,
+-98.8284,
+-102.35,
+-96.3296,
+-106.433,
+-91.4688,
+-91.4688,
+-90.8696,
+-92.1125,
+-99.5841,
+-105.605,
+-90.8696,
+-114.952,
+-102.35,
+-92.8078,
+-98.1331,
+-99.5841,
+-96.3296,
+-96.3296,
+-98.8284,
+-107.348,
+-101.327,
+-86.7872,
+-86.7872,
+-90.8696,
+-98.8284,
+-102.35,
+-107.348,
+-113.368,
+-95.3065,
+-100.412,
+-96.3296,
+-95.3065,
+-90.309,
+-95.3065,
+-94.3914,
+-110.87,
+-93.5635,
+-90.309,
+-110.87,
+-97.4894,
+-120.412,
+-101.327,
+-95.3065,
+-93.5635,
+-89.2859,
+-92.1125,
+-95.3065,
+-87.5429,
+-89.2859,
+-90.8696,
+-98.1331,
+-99.5841,
+-109.531,
+-102.35,
+-102.35,
+-104.849,
+-96.3296,
+-107.348,
+-100.412,
+-91.4688,
+-109.531,
+-87.5429,
+-93.5635,
+-104.849,
+-95.3065,
+-118.474,
+-119.389,
+-96.3296,
+-92.1125,
+-90.309,
+-89.2859,
+-100.412,
+-92.1125,
+-123.667,
+-88.3708,
+-94.3914,
+-107.348,
+-122.216,
+-107.348,
+-108.371,
+-124.494,
+-96.3296,
+-107.348,
+-115.551,
+-96.3296,
+-97.4894,
+-90.8696,
+-98.8284,
+-96.8902,
+-89.2859,
+-104.154,
+-89.2859,
+-85.4482,
+-102.35,
+-96.3296,
+-112.453,
+-95.3065,
+-106.433,
+-92.1125,
+-108.931,
+-86.7872,
+-139.034,
+-95.3065,
+-108.371,
+-98.8284,
+-86.7872,
+-92.1125,
+-105.605,
+-90.309,
+-100.412,
+-93.5635,
+-108.371,
+-108.931,
+-105.605,
+-96.8902,
+-91.4688,
+-94.3914,
+-90.309,
+-96.8902,
+-101.327,
+-90.309,
+-100.412,
+-103.51,
+-128.236,
+-100.412,
+-90.309,
+-92.8078,
+-95.3065,
+-102.35,
+-93.5635,
+-84.2884,
+-96.8902,
+-103.51,
+-98.8284,
+-90.309,
+-86.7872,
+-93.5635,
+-93.5635,
+-103.51,
+-98.1331,
+-91.4688,
+-90.8696,
+-98.8284,
+-94.3914,
+-100.412,
+-96.8902,
+-85.4482,
+-100.412,
+-100.412,
+-96.3296,
+-82.3502,
+-83.2654,
+-79.4276,
+-86.7872,
+-92.8078,
+-85.4482,
+-100.412,
+-91.4688,
+-125.41,
+-90.309,
+-87.5429,
+-82.3502,
+-117.646,
+-92.1125,
+-83.2654,
+-104.849,
+-94.3914,
+-97.4894,
+-82.3502,
+-97.4894,
+-90.309,
+-86.7872,
+-114.952,
+-97.4894,
+-120.412,
+-115.551,
+-97.4894,
+-92.1125,
+-92.8078,
+-113.368,
+-109.531,
+-102.35,
+-107.348,
+-86.7872,
+-86.7872,
+-92.8078,
+-94.3914,
+-98.8284,
+-92.1125,
+-90.8696,
+-111.625,
+-92.8078,
+-100.412,
+-102.35,
+-89.2859,
+-93.5635,
+-96.3296,
+-86.0919,
+-96.8902,
+-111.625,
+-107.348,
+-131.43,
+-94.3914,
+-100.412,
+-92.1125,
+-91.4688,
+-93.5635,
+-120.412,
+-95.3065,
+-88.3708,
+-102.911,
+-90.309,
+-94.3914,
+-90.309,
+-89.2859,
+-90.309,
+-91.4688,
+-86.7872,
+-108.931,
+-98.1331,
+-107.348,
+-92.1125,
+-90.8696,
+-87.5429,
+-100.412,
+-96.8902,
+-101.327,
+-95.3065,
+-86.7872,
+-92.1125,
+-98.1331,
+-103.51,
+-98.8284,
+-95.3065,
+-94.3914,
+-102.35,
+-96.3296,
+-111.625,
+-91.4688,
+-103.51,
+-107.348,
+-98.1331,
+-90.309,
+-105.605,
+-95.3065,
+-92.1125,
+-90.309,
+-114.952,
+-102.35,
+-101.327,
+-97.4894,
+-104.849,
+-86.7872,
+-88.3708,
+-89.2859,
+-90.309,
+-92.1125,
+-99.5841,
+-98.8284,
+-91.4688,
+-100.412,
+-102.35,
+-94.3914,
+-96.8902,
+-94.3914,
+-102.35,
+-93.5635,
+-97.4894,
+-98.8284,
+-96.8902,
+-89.2859,
+-96.8902,
+-99.5841,
+-99.5841,
+-95.3065,
+-97.4894,
+-105.605,
+-112.453,
+-89.2859,
+-92.1125,
+-104.849,
+-91.4688,
+-104.849,
+-102.911,
+-101.327,
+-99.5841,
+-96.3296,
+-96.3296,
+-100.412,
+-94.3914,
+-107.348,
+-100.412,
+-102.35,
+-105.605,
+-98.8284,
+-95.3065,
+-104.849,
+-96.3296,
+-94.3914,
+-114.952,
+-96.3296,
+-103.51,
+-101.327,
+-96.3296,
+-97.4894,
+-95.3065,
+-93.5635,
+-102.911,
+-125.41,
+-110.174,
+-104.154,
+-100.412,
+-108.371,
+-91.4688,
+-106.433,
+-129.687,
+-121.572,
+-121.572,
+-98.8284,
+-101.327,
+-99.5841,
+-101.327,
+-95.3065,
+-97.4894,
+-105.605,
+-104.154,
+-97.4894,
+-92.8078,
+-102.35,
+-101.327,
+-106.433,
+-99.5841,
+-94.3914,
+-99.5841,
+-94.3914,
+-104.849,
+-92.1125,
+-100.412,
+-116.89,
+-123.667,
+-132.453,
+-97.4894,
+-99.5841,
+-94.3914,
+-105.605,
+-94.3914,
+-98.1331,
+-103.51,
+-109.531};
+
+#include "../include/vorbis/vorbisenc.h"
+typedef struct {
+  drft_lookup fft_look;
+  vorbis_info_mode *mode;
+  vorbis_info_mapping0 *map;
+
+  vorbis_look_time **time_look;
+  vorbis_look_floor **floor_look;
+
+  vorbis_look_residue **residue_look;
+  vorbis_look_psy *psy_look;
+
+  vorbis_func_time **time_func;
+  vorbis_func_floor **floor_func;
+  vorbis_func_residue **residue_func;
+
+  int ch;
+  long lastframe; /* if a different mode is called, we need to 
+                     invalidate decay */
+} vorbis_look_mapping0;
+
+int main(){
+  vorbis_info      vi; /* struct that stores all the static vorbis bitstream
+                          settings */
+  vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */
+  vorbis_block     vb; /* local working space for packet->PCM decode */
+  backend_lookup_state *b;
+  vorbis_look_mapping0  *m;
+  float out[1024];
+
+  /* choose an encoding mode */
+  /* (mode 0: 44kHz stereo uncoupled, roughly 128kbps VBR) */
+  vorbis_info_init(&vi);
+  vorbis_encode_init(&vi,2,44100, -1, 128000, -1);
+
+  /* set up the analysis state and auxiliary encoding storage */
+  vorbis_analysis_init(&vd,&vi);
+  vorbis_block_init(&vd,&vb);
+  b=vd.backend_state;
+  m=(vorbis_look_mapping0 *)(b->mode[1]);
+
+  floor1_forward(&vb,m->floor_look[0],
+		 test_mdct, test_mdct,
+		 test_mask, test_mdct,
+		 test_mdct, out);
+    
+  _analysis_output("testout",0,out,1024,0,1);
+}
+
+#endif

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list