Doing multiple rotation passes instead of one produces better pulse spreading.
authorJean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Sat, 29 Dec 2007 13:17:44 +0000 (00:17 +1100)
committerJean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Sat, 29 Dec 2007 13:17:44 +0000 (00:17 +1100)
libcelt/bands.c

index 9f41aa4..10411f5 100644 (file)
@@ -266,8 +266,8 @@ void band_rotation(const CELTMode *m, float *X, int dir)
    for (i=0;i<m->nbEBands;i++)
    {
       float theta;
-      theta = pow(.1f,1.f*abs(m->nbPulses[i])/(B*(eBands[i+1]-eBands[i])));
-      exp_rotation(X+B*eBands[i], B*(eBands[i+1]-eBands[i]), theta, dir, 2, 1);
+      theta = .007*(B*(eBands[i+1]-eBands[i]))/(.1f+abs(m->nbPulses[i]));
+      exp_rotation(X+B*eBands[i], B*(eBands[i+1]-eBands[i]), theta, dir, B, 8);
    }
    //printf ("\n");
 }