Eliminate the loop when decoding the split angle.
authorTimothy B. Terriberry <tterribe@xiph.org>
Tue, 27 Jul 2010 22:09:51 +0000 (15:09 -0700)
committerJean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Tue, 27 Jul 2010 22:20:16 +0000 (00:20 +0200)
commit68242ac58cca3d09b55d57f33d22144e701c923b
tree9c48651d517a6e4d10b36fb7a3f5e78e7e8836af
parent5bdb7dbafc1b07d0dcea2715f84b8096f4a95112
Eliminate the loop when decoding the split angle.

Use a closed-form formula for the search instead.
This requires an integer sqrt, so it is not actually closed-form,
 but the number of iterations is O(qb) instead of O(2**qb).
libcelt/bands.c
libcelt/cwrs.c
libcelt/mathops.c
libcelt/mathops.h