shithub: aacenc

Download patch

ref: e4cc727df49de3c8157abd559377bf47d16261ac
parent: bc807920e3d52f57993e1dc34f9c0f23bb6847c0
author: lenox <lenox>
date: Mon Jan 3 13:51:58 EST 2000

Added 2048 FFT

--- a/fastfft.c
+++ b/fastfft.c
@@ -2,7 +2,9 @@
 #include "fastfft.h"
 
 int unscambled64[64];
+int unscambled256[256];
 int unscambled512[512];
+int unscambled2048[2048];
 
 static fftw_real K831469612[1] =
 {FFTW_KONST(+0.831469612302545237078788377617905756738560812)};
@@ -117,6 +119,135 @@
 { -0.995184726672197, 0.0980171403295608 },
 };
 
+fftw_complex PFFTW(W_256)[126] = {
+{ 0.999698818696204, 0.0245412285229123 },
+{ 0.998795456205172, 0.049067674327418 },
+{ 0.998795456205172, 0.049067674327418 },
+{ 0.995184726672197, 0.0980171403295606 },
+{ 0.99729045667869, 0.0735645635996674 },
+{ 0.989176509964781, 0.146730474455362 },
+{ 0.995184726672197, 0.0980171403295606 },
+{ 0.98078528040323, 0.195090322016128 },
+{ 0.99247953459871, 0.122410675199216 },
+{ 0.970031253194544, 0.242980179903264 },
+{ 0.989176509964781, 0.146730474455362 },
+{ 0.956940335732209, 0.290284677254462 },
+{ 0.985277642388941, 0.170961888760301 },
+{ 0.941544065183021, 0.33688985339222 },
+{ 0.98078528040323, 0.195090322016128 },
+{ 0.923879532511287, 0.38268343236509 },
+{ 0.975702130038529, 0.21910124015687 },
+{ 0.903989293123443, 0.427555093430282 },
+{ 0.970031253194544, 0.242980179903264 },
+{ 0.881921264348355, 0.471396736825998 },
+{ 0.96377606579544, 0.266712757474898 },
+{ 0.857728610000272, 0.514102744193222 },
+{ 0.956940335732209, 0.290284677254462 },
+{ 0.831469612302545, 0.555570233019602 },
+{ 0.949528180593037, 0.313681740398892 },
+{ 0.803207531480645, 0.595699304492433 },
+{ 0.941544065183021, 0.33688985339222 },
+{ 0.773010453362737, 0.634393284163645 },
+{ 0.932992798834739, 0.359895036534988 },
+{ 0.740951125354959, 0.671558954847018 },
+{ 0.923879532511287, 0.38268343236509 },
+{ 0.707106781186548, 0.707106781186547 },
+{ 0.914209755703531, 0.40524131400499 },
+{ 0.671558954847018, 0.740951125354959 },
+{ 0.903989293123443, 0.427555093430282 },
+{ 0.634393284163645, 0.773010453362737 },
+{ 0.893224301195515, 0.449611329654607 },
+{ 0.595699304492433, 0.803207531480645 },
+{ 0.881921264348355, 0.471396736825998 },
+{ 0.555570233019602, 0.831469612302545 },
+{ 0.870086991108711, 0.492898192229784 },
+{ 0.514102744193222, 0.857728610000272 },
+{ 0.857728610000272, 0.514102744193222 },
+{ 0.471396736825998, 0.881921264348355 },
+{ 0.844853565249707, 0.534997619887097 },
+{ 0.427555093430282, 0.903989293123443 },
+{ 0.831469612302545, 0.555570233019602 },
+{ 0.38268343236509, 0.923879532511287 },
+{ 0.817584813151584, 0.575808191417845 },
+{ 0.33688985339222, 0.941544065183021 },
+{ 0.803207531480645, 0.595699304492433 },
+{ 0.290284677254462, 0.956940335732209 },
+{ 0.788346427626606, 0.615231590580627 },
+{ 0.242980179903264, 0.970031253194544 },
+{ 0.773010453362737, 0.634393284163645 },
+{ 0.195090322016128, 0.98078528040323 },
+{ 0.757208846506485, 0.653172842953777 },
+{ 0.146730474455362, 0.989176509964781 },
+{ 0.740951125354959, 0.671558954847018 },
+{ 0.0980171403295608, 0.995184726672197 },
+{ 0.724247082951467, 0.689540544737067 },
+{ 0.0490676743274181, 0.998795456205172 },
+{ 0.707106781186548, 0.707106781186547 },
+{ 6.12303176911189e-17, 1 },
+{ 0.689540544737067, 0.724247082951467 },
+{ -0.049067674327418, 0.998795456205172 },
+{ 0.671558954847018, 0.740951125354959 },
+{ -0.0980171403295606, 0.995184726672197 },
+{ 0.653172842953777, 0.757208846506484 },
+{ -0.146730474455362, 0.989176509964781 },
+{ 0.634393284163645, 0.773010453362737 },
+{ -0.195090322016128, 0.98078528040323 },
+{ 0.615231590580627, 0.788346427626606 },
+{ -0.242980179903264, 0.970031253194544 },
+{ 0.595699304492433, 0.803207531480645 },
+{ -0.290284677254462, 0.956940335732209 },
+{ 0.575808191417845, 0.817584813151584 },
+{ -0.33688985339222, 0.941544065183021 },
+{ 0.555570233019602, 0.831469612302545 },
+{ -0.38268343236509, 0.923879532511287 },
+{ 0.534997619887097, 0.844853565249707 },
+{ -0.427555093430282, 0.903989293123443 },
+{ 0.514102744193222, 0.857728610000272 },
+{ -0.471396736825998, 0.881921264348355 },
+{ 0.492898192229784, 0.870086991108711 },
+{ -0.514102744193222, 0.857728610000272 },
+{ 0.471396736825998, 0.881921264348355 },
+{ -0.555570233019602, 0.831469612302545 },
+{ 0.449611329654607, 0.893224301195515 },
+{ -0.595699304492433, 0.803207531480645 },
+{ 0.427555093430282, 0.903989293123443 },
+{ -0.634393284163645, 0.773010453362737 },
+{ 0.40524131400499, 0.914209755703531 },
+{ -0.671558954847018, 0.740951125354959 },
+{ 0.38268343236509, 0.923879532511287 },
+{ -0.707106781186547, 0.707106781186548 },
+{ 0.359895036534988, 0.932992798834739 },
+{ -0.740951125354959, 0.671558954847019 },
+{ 0.33688985339222, 0.941544065183021 },
+{ -0.773010453362737, 0.634393284163645 },
+{ 0.313681740398892, 0.949528180593037 },
+{ -0.803207531480645, 0.595699304492433 },
+{ 0.290284677254462, 0.956940335732209 },
+{ -0.831469612302545, 0.555570233019602 },
+{ 0.266712757474898, 0.96377606579544 },
+{ -0.857728610000272, 0.514102744193222 },
+{ 0.242980179903264, 0.970031253194544 },
+{ -0.881921264348355, 0.471396736825998 },
+{ 0.21910124015687, 0.975702130038529 },
+{ -0.903989293123443, 0.427555093430282 },
+{ 0.195090322016128, 0.98078528040323 },
+{ -0.923879532511287, 0.38268343236509 },
+{ 0.170961888760301, 0.985277642388941 },
+{ -0.941544065183021, 0.33688985339222 },
+{ 0.146730474455362, 0.989176509964781 },
+{ -0.956940335732209, 0.290284677254462 },
+{ 0.122410675199216, 0.99247953459871 },
+{ -0.970031253194544, 0.242980179903264 },
+{ 0.0980171403295608, 0.995184726672197 },
+{ -0.98078528040323, 0.195090322016129 },
+{ 0.0735645635996675, 0.99729045667869 },
+{ -0.989176509964781, 0.146730474455362 },
+{ 0.0490676743274181, 0.998795456205172 },
+{ -0.995184726672197, 0.0980171403295608 },
+{ 0.0245412285229123, 0.999698818696204 },
+{ -0.998795456205172, 0.049067674327418 },
+};
+
 fftw_complex PFFTW(W_512)[254] = {
 { 0.999924701839145, 0.0122715382857199 },
 { 0.999698818696204, 0.0245412285229123 },
@@ -374,6 +505,1031 @@
 { -0.999698818696204, 0.0245412285229123 },
 };
 
+fftw_complex PFFTW(W_2048)[1022] = {
+{ 0.999995293809576, 0.00306795676296598 },
+{ 0.999981175282601, 0.00613588464915448 },
+{ 0.999981175282601, 0.00613588464915448 },
+{ 0.999924701839145, 0.0122715382857199 },
+{ 0.999957644551964, 0.00920375478205982 },
+{ 0.999830581795823, 0.0184067299058048 },
+{ 0.999924701839145, 0.0122715382857199 },
+{ 0.999698818696204, 0.0245412285229123 },
+{ 0.999882347454213, 0.0153392062849881 },
+{ 0.999529417501093, 0.0306748031766366 },
+{ 0.999830581795823, 0.0184067299058048 },
+{ 0.99932238458835, 0.0368072229413588 },
+{ 0.999769405351215, 0.0214740802754695 },
+{ 0.999077727752645, 0.0429382569349408 },
+{ 0.999698818696204, 0.0245412285229123 },
+{ 0.998795456205172, 0.049067674327418 },
+{ 0.999618822495179, 0.0276081457789657 },
+{ 0.998475580573295, 0.0551952443496899 },
+{ 0.999529417501093, 0.0306748031766366 },
+{ 0.998118112900149, 0.0613207363022086 },
+{ 0.999430604555462, 0.0337411718513776 },
+{ 0.997723066644192, 0.0674439195636641 },
+{ 0.99932238458835, 0.0368072229413588 },
+{ 0.99729045667869, 0.0735645635996674 },
+{ 0.999204758618364, 0.0398729275877398 },
+{ 0.996820299291166, 0.0796824379714301 },
+{ 0.999077727752645, 0.0429382569349408 },
+{ 0.996312612182778, 0.0857973123444399 },
+{ 0.998941293186857, 0.0460031821309146 },
+{ 0.99576741446766, 0.0919089564971327 },
+{ 0.998795456205172, 0.049067674327418 },
+{ 0.995184726672197, 0.0980171403295606 },
+{ 0.998640218180265, 0.0521317046802833 },
+{ 0.994564570734255, 0.104121633872055 },
+{ 0.998475580573295, 0.0551952443496899 },
+{ 0.993906970002356, 0.110222207293883 },
+{ 0.998301544933893, 0.0582582645004358 },
+{ 0.993211949234794, 0.116318630911905 },
+{ 0.998118112900149, 0.0613207363022086 },
+{ 0.99247953459871, 0.122410675199216 },
+{ 0.997925286198596, 0.0643826309298575 },
+{ 0.9917097536691, 0.128498110793793 },
+{ 0.997723066644192, 0.0674439195636641 },
+{ 0.99090263542778, 0.134580708507126 },
+{ 0.997511456140303, 0.0705045733896139 },
+{ 0.990058210262297, 0.140658239332849 },
+{ 0.99729045667869, 0.0735645635996674 },
+{ 0.989176509964781, 0.146730474455362 },
+{ 0.997060070339483, 0.0766238613920315 },
+{ 0.988257567730749, 0.152797185258443 },
+{ 0.996820299291166, 0.0796824379714301 },
+{ 0.987301418157858, 0.158858143333861 },
+{ 0.996571145790555, 0.0827402645493757 },
+{ 0.986308097244599, 0.16491312048997 },
+{ 0.996312612182778, 0.0857973123444399 },
+{ 0.985277642388941, 0.170961888760301 },
+{ 0.996044700901252, 0.0888535525825246 },
+{ 0.984210092386929, 0.177004220412149 },
+{ 0.99576741446766, 0.0919089564971327 },
+{ 0.983105487431216, 0.183039887955141 },
+{ 0.995480755491927, 0.094963495329639 },
+{ 0.981963869109555, 0.189068664149806 },
+{ 0.995184726672197, 0.0980171403295606 },
+{ 0.98078528040323, 0.195090322016128 },
+{ 0.994879330794806, 0.101069862754828 },
+{ 0.979569765685441, 0.201104634842092 },
+{ 0.994564570734255, 0.104121633872055 },
+{ 0.978317370719628, 0.207111376192219 },
+{ 0.994240449453188, 0.107172424956809 },
+{ 0.977028142657754, 0.213110319916091 },
+{ 0.993906970002356, 0.110222207293883 },
+{ 0.975702130038529, 0.21910124015687 },
+{ 0.993564135520595, 0.113270952177564 },
+{ 0.974339382785576, 0.225083911359793 },
+{ 0.993211949234794, 0.116318630911905 },
+{ 0.97293995220556, 0.231058108280671 },
+{ 0.992850414459865, 0.119365214810991 },
+{ 0.971503890986252, 0.237023605994367 },
+{ 0.99247953459871, 0.122410675199216 },
+{ 0.970031253194544, 0.242980179903264 },
+{ 0.992099313142192, 0.125454983411546 },
+{ 0.968522094274417, 0.24892760574572 },
+{ 0.9917097536691, 0.128498110793793 },
+{ 0.966976471044852, 0.254865659604515 },
+{ 0.991310859846115, 0.131540028702883 },
+{ 0.965394441697689, 0.260794117915276 },
+{ 0.99090263542778, 0.134580708507126 },
+{ 0.96377606579544, 0.266712757474898 },
+{ 0.990485084256457, 0.137620121586486 },
+{ 0.962121404269042, 0.272621355449949 },
+{ 0.990058210262297, 0.140658239332849 },
+{ 0.960430519415566, 0.278519689385053 },
+{ 0.989622017463201, 0.143695033150294 },
+{ 0.958703474895872, 0.284407537211272 },
+{ 0.989176509964781, 0.146730474455362 },
+{ 0.956940335732209, 0.290284677254462 },
+{ 0.988721691960324, 0.149764534677322 },
+{ 0.955141168305771, 0.296150888243624 },
+{ 0.988257567730749, 0.152797185258443 },
+{ 0.953306040354194, 0.302005949319228 },
+{ 0.987784141644572, 0.155828397654265 },
+{ 0.951435020969008, 0.307849640041535 },
+{ 0.987301418157858, 0.158858143333861 },
+{ 0.949528180593037, 0.313681740398892 },
+{ 0.986809401814186, 0.161886393780112 },
+{ 0.947585591017741, 0.319502030816016 },
+{ 0.986308097244599, 0.16491312048997 },
+{ 0.945607325380521, 0.325310292162263 },
+{ 0.985797509167567, 0.167938294974731 },
+{ 0.94359345816196, 0.331106305759876 },
+{ 0.985277642388941, 0.170961888760301 },
+{ 0.941544065183021, 0.33688985339222 },
+{ 0.984748501801904, 0.173983873387464 },
+{ 0.93945922360219, 0.342660717311994 },
+{ 0.984210092386929, 0.177004220412149 },
+{ 0.937339011912575, 0.348418680249435 },
+{ 0.98366241921173, 0.1800229014057 },
+{ 0.935183509938948, 0.35416352542049 },
+{ 0.983105487431216, 0.183039887955141 },
+{ 0.932992798834739, 0.359895036534988 },
+{ 0.982539302287441, 0.186055151663447 },
+{ 0.930766961078984, 0.365612997804774 },
+{ 0.981963869109555, 0.189068664149806 },
+{ 0.928506080473216, 0.371317193951838 },
+{ 0.981379193313755, 0.192080397049892 },
+{ 0.926210242138311, 0.377007410216418 },
+{ 0.98078528040323, 0.195090322016128 },
+{ 0.923879532511287, 0.38268343236509 },
+{ 0.980182135968117, 0.198098410717954 },
+{ 0.921514039342042, 0.388345046698826 },
+{ 0.979569765685441, 0.201104634842092 },
+{ 0.919113851690058, 0.393992040061048 },
+{ 0.978948175319062, 0.204108966092817 },
+{ 0.916679059921043, 0.399624199845647 },
+{ 0.978317370719628, 0.207111376192219 },
+{ 0.914209755703531, 0.40524131400499 },
+{ 0.97767735782451, 0.21011183688047 },
+{ 0.91170603200543, 0.410843171057904 },
+{ 0.977028142657754, 0.213110319916091 },
+{ 0.909167983090522, 0.416429560097637 },
+{ 0.976369731330021, 0.21610679707622 },
+{ 0.906595704514915, 0.4220002707998 },
+{ 0.975702130038529, 0.21910124015687 },
+{ 0.903989293123443, 0.427555093430282 },
+{ 0.975025345066994, 0.222093620973204 },
+{ 0.901348847046022, 0.433093818853152 },
+{ 0.974339382785576, 0.225083911359793 },
+{ 0.898674465693954, 0.438616238538528 },
+{ 0.973644249650812, 0.228072083170886 },
+{ 0.895966249756185, 0.444122144570429 },
+{ 0.97293995220556, 0.231058108280671 },
+{ 0.893224301195515, 0.449611329654607 },
+{ 0.972226497078936, 0.234041958583543 },
+{ 0.890448723244758, 0.455083587126344 },
+{ 0.971503890986252, 0.237023605994367 },
+{ 0.887639620402854, 0.46053871095824 },
+{ 0.97077214072895, 0.240003022448741 },
+{ 0.884797098430938, 0.465976495767966 },
+{ 0.970031253194544, 0.242980179903264 },
+{ 0.881921264348355, 0.471396736825998 },
+{ 0.969281235356549, 0.245955050335795 },
+{ 0.879012226428634, 0.476799230063322 },
+{ 0.968522094274417, 0.24892760574572 },
+{ 0.876070094195407, 0.482183772079123 },
+{ 0.967753837093476, 0.251897818154217 },
+{ 0.87309497841829, 0.487550160148436 },
+{ 0.966976471044852, 0.254865659604515 },
+{ 0.870086991108711, 0.492898192229784 },
+{ 0.966190003445413, 0.257831102162159 },
+{ 0.867046245515693, 0.498227666972782 },
+{ 0.965394441697689, 0.260794117915276 },
+{ 0.863972856121587, 0.503538383725718 },
+{ 0.964589793289813, 0.263754678974831 },
+{ 0.860866938637767, 0.508830142543107 },
+{ 0.96377606579544, 0.266712757474898 },
+{ 0.857728610000272, 0.514102744193222 },
+{ 0.962953266873684, 0.269668325572915 },
+{ 0.854557988365401, 0.51935599016559 },
+{ 0.962121404269042, 0.272621355449949 },
+{ 0.851355193105265, 0.524589682678469 },
+{ 0.961280485811321, 0.275571819310958 },
+{ 0.848120344803297, 0.529803624686295 },
+{ 0.960430519415566, 0.278519689385053 },
+{ 0.844853565249707, 0.534997619887097 },
+{ 0.959571513081985, 0.281464937925758 },
+{ 0.841554977436898, 0.540171472729893 },
+{ 0.958703474895872, 0.284407537211272 },
+{ 0.838224705554838, 0.545324988422046 },
+{ 0.957826413027533, 0.28734745954473 },
+{ 0.83486287498638, 0.550457972936605 },
+{ 0.956940335732209, 0.290284677254462 },
+{ 0.831469612302545, 0.555570233019602 },
+{ 0.956045251349996, 0.293219162694259 },
+{ 0.828045045257756, 0.560661576197336 },
+{ 0.955141168305771, 0.296150888243624 },
+{ 0.824589302785025, 0.565731810783613 },
+{ 0.954228095109106, 0.29907982630804 },
+{ 0.821102514991105, 0.570780745886967 },
+{ 0.953306040354194, 0.302005949319228 },
+{ 0.817584813151584, 0.575808191417845 },
+{ 0.952375012719766, 0.304929229735402 },
+{ 0.814036329705948, 0.580813958095765 },
+{ 0.951435020969008, 0.307849640041535 },
+{ 0.810457198252595, 0.585797857456439 },
+{ 0.950486073949482, 0.310767152749611 },
+{ 0.806847553543799, 0.590759701858874 },
+{ 0.949528180593037, 0.313681740398892 },
+{ 0.803207531480645, 0.595699304492433 },
+{ 0.94856134991573, 0.316593375556166 },
+{ 0.799537269107905, 0.600616479383869 },
+{ 0.947585591017741, 0.319502030816016 },
+{ 0.795836904608884, 0.605511041404326 },
+{ 0.946600913083284, 0.32240767880107 },
+{ 0.792106577300212, 0.610382806276309 },
+{ 0.945607325380521, 0.325310292162263 },
+{ 0.788346427626606, 0.615231590580627 },
+{ 0.94460483726148, 0.328209843579092 },
+{ 0.784556597155575, 0.620057211763289 },
+{ 0.94359345816196, 0.331106305759876 },
+{ 0.780737228572094, 0.624859488142386 },
+{ 0.942573197601447, 0.333999651442009 },
+{ 0.776888465673232, 0.629638238914927 },
+{ 0.941544065183021, 0.33688985339222 },
+{ 0.773010453362737, 0.634393284163645 },
+{ 0.940506070593268, 0.339776884406827 },
+{ 0.76910333764558, 0.639124444863776 },
+{ 0.93945922360219, 0.342660717311994 },
+{ 0.765167265622459, 0.643831542889791 },
+{ 0.938403534063108, 0.345541324963989 },
+{ 0.761202385484262, 0.648514401022112 },
+{ 0.937339011912575, 0.348418680249435 },
+{ 0.757208846506485, 0.653172842953777 },
+{ 0.936265667170278, 0.351292756085567 },
+{ 0.753186799043613, 0.657806693297079 },
+{ 0.935183509938948, 0.35416352542049 },
+{ 0.749136394523459, 0.662415777590172 },
+{ 0.934092550404259, 0.35703096123343 },
+{ 0.745057785441466, 0.666999922303637 },
+{ 0.932992798834739, 0.359895036534988 },
+{ 0.740951125354959, 0.671558954847018 },
+{ 0.931884265581668, 0.362755724367397 },
+{ 0.73681656887737, 0.676092703575316 },
+{ 0.930766961078984, 0.365612997804774 },
+{ 0.732654271672413, 0.680600997795453 },
+{ 0.929640895843181, 0.368466829953372 },
+{ 0.728464390448225, 0.6850836677727 },
+{ 0.928506080473216, 0.371317193951838 },
+{ 0.724247082951467, 0.689540544737067 },
+{ 0.927362525650401, 0.374164062971458 },
+{ 0.720002507961382, 0.693971460889654 },
+{ 0.926210242138311, 0.377007410216418 },
+{ 0.715730825283819, 0.698376249408973 },
+{ 0.925049240782678, 0.379847208924051 },
+{ 0.711432195745216, 0.702754744457225 },
+{ 0.923879532511287, 0.38268343236509 },
+{ 0.707106781186548, 0.707106781186547 },
+{ 0.922701128333879, 0.385516053843919 },
+{ 0.702754744457225, 0.711432195745216 },
+{ 0.921514039342042, 0.388345046698826 },
+{ 0.698376249408973, 0.715730825283819 },
+{ 0.920318276709111, 0.391170384302254 },
+{ 0.693971460889654, 0.720002507961382 },
+{ 0.919113851690058, 0.393992040061048 },
+{ 0.689540544737067, 0.724247082951467 },
+{ 0.91790077562139, 0.39680998741671 },
+{ 0.6850836677727, 0.728464390448225 },
+{ 0.916679059921043, 0.399624199845647 },
+{ 0.680600997795453, 0.732654271672413 },
+{ 0.915448716088268, 0.402434650859418 },
+{ 0.676092703575316, 0.73681656887737 },
+{ 0.914209755703531, 0.40524131400499 },
+{ 0.671558954847018, 0.740951125354959 },
+{ 0.912962190428398, 0.408044162864979 },
+{ 0.666999922303637, 0.745057785441466 },
+{ 0.91170603200543, 0.410843171057904 },
+{ 0.662415777590172, 0.749136394523459 },
+{ 0.910441292258067, 0.413638312238435 },
+{ 0.657806693297079, 0.753186799043612 },
+{ 0.909167983090522, 0.416429560097637 },
+{ 0.653172842953777, 0.757208846506484 },
+{ 0.907886116487666, 0.419216888363224 },
+{ 0.648514401022113, 0.761202385484262 },
+{ 0.906595704514915, 0.4220002707998 },
+{ 0.643831542889791, 0.765167265622459 },
+{ 0.905296759318119, 0.424779681209109 },
+{ 0.639124444863776, 0.76910333764558 },
+{ 0.903989293123443, 0.427555093430282 },
+{ 0.634393284163645, 0.773010453362737 },
+{ 0.902673318237259, 0.430326481340083 },
+{ 0.629638238914927, 0.776888465673232 },
+{ 0.901348847046022, 0.433093818853152 },
+{ 0.624859488142386, 0.780737228572094 },
+{ 0.90001589201616, 0.435857079922255 },
+{ 0.620057211763289, 0.784556597155575 },
+{ 0.898674465693954, 0.438616238538528 },
+{ 0.615231590580627, 0.788346427626606 },
+{ 0.897324580705418, 0.441371268731717 },
+{ 0.610382806276309, 0.792106577300212 },
+{ 0.895966249756185, 0.444122144570429 },
+{ 0.605511041404326, 0.795836904608883 },
+{ 0.894599485631383, 0.446868840162374 },
+{ 0.600616479383869, 0.799537269107905 },
+{ 0.893224301195515, 0.449611329654607 },
+{ 0.595699304492433, 0.803207531480645 },
+{ 0.891840709392343, 0.452349587233771 },
+{ 0.590759701858874, 0.806847553543799 },
+{ 0.890448723244758, 0.455083587126344 },
+{ 0.585797857456439, 0.810457198252595 },
+{ 0.889048355854665, 0.457813303598877 },
+{ 0.580813958095765, 0.814036329705948 },
+{ 0.887639620402854, 0.46053871095824 },
+{ 0.575808191417845, 0.817584813151584 },
+{ 0.886222530148881, 0.46325978355186 },
+{ 0.570780745886967, 0.821102514991105 },
+{ 0.884797098430938, 0.465976495767966 },
+{ 0.565731810783613, 0.824589302785025 },
+{ 0.883363338665732, 0.468688822035828 },
+{ 0.560661576197336, 0.828045045257756 },
+{ 0.881921264348355, 0.471396736825998 },
+{ 0.555570233019602, 0.831469612302545 },
+{ 0.880470889052161, 0.47410021465055 },
+{ 0.550457972936605, 0.83486287498638 },
+{ 0.879012226428634, 0.476799230063322 },
+{ 0.545324988422046, 0.838224705554838 },
+{ 0.877545290207261, 0.479493757660153 },
+{ 0.540171472729893, 0.841554977436898 },
+{ 0.876070094195407, 0.482183772079123 },
+{ 0.534997619887097, 0.844853565249707 },
+{ 0.874586652278176, 0.484869248000791 },
+{ 0.529803624686295, 0.848120344803297 },
+{ 0.87309497841829, 0.487550160148436 },
+{ 0.524589682678469, 0.851355193105265 },
+{ 0.871595086655951, 0.490226483288291 },
+{ 0.51935599016559, 0.854557988365401 },
+{ 0.870086991108711, 0.492898192229784 },
+{ 0.514102744193222, 0.857728610000272 },
+{ 0.868570705971341, 0.495565261825773 },
+{ 0.508830142543107, 0.860866938637767 },
+{ 0.867046245515693, 0.498227666972782 },
+{ 0.503538383725718, 0.863972856121587 },
+{ 0.865513624090569, 0.500885382611241 },
+{ 0.498227666972782, 0.867046245515693 },
+{ 0.863972856121587, 0.503538383725718 },
+{ 0.492898192229784, 0.870086991108711 },
+{ 0.862423956111041, 0.506186645345155 },
+{ 0.487550160148436, 0.87309497841829 },
+{ 0.860866938637767, 0.508830142543107 },
+{ 0.482183772079123, 0.876070094195407 },
+{ 0.859301818357008, 0.51146885043797 },
+{ 0.476799230063322, 0.879012226428633 },
+{ 0.857728610000272, 0.514102744193222 },
+{ 0.471396736825998, 0.881921264348355 },
+{ 0.856147328375194, 0.51673179901765 },
+{ 0.465976495767966, 0.884797098430938 },
+{ 0.854557988365401, 0.51935599016559 },
+{ 0.46053871095824, 0.887639620402854 },
+{ 0.852960604930364, 0.521975292937154 },
+{ 0.455083587126344, 0.890448723244758 },
+{ 0.851355193105265, 0.524589682678469 },
+{ 0.449611329654607, 0.893224301195515 },
+{ 0.849741768000853, 0.527199134781901 },
+{ 0.444122144570429, 0.895966249756185 },
+{ 0.848120344803297, 0.529803624686295 },
+{ 0.438616238538528, 0.898674465693954 },
+{ 0.846490938774052, 0.532403127877198 },
+{ 0.433093818853152, 0.901348847046022 },
+{ 0.844853565249707, 0.534997619887097 },
+{ 0.427555093430282, 0.903989293123443 },
+{ 0.843208239641845, 0.537587076295645 },
+{ 0.4220002707998, 0.906595704514915 },
+{ 0.841554977436898, 0.540171472729893 },
+{ 0.416429560097637, 0.909167983090522 },
+{ 0.839893794196, 0.542750784864516 },
+{ 0.410843171057904, 0.91170603200543 },
+{ 0.838224705554838, 0.545324988422046 },
+{ 0.40524131400499, 0.914209755703531 },
+{ 0.836547727223512, 0.5478940591731 },
+{ 0.399624199845647, 0.916679059921043 },
+{ 0.83486287498638, 0.550457972936605 },
+{ 0.393992040061048, 0.919113851690058 },
+{ 0.833170164701913, 0.553016705580027 },
+{ 0.388345046698826, 0.921514039342042 },
+{ 0.831469612302545, 0.555570233019602 },
+{ 0.38268343236509, 0.923879532511287 },
+{ 0.829761233794523, 0.558118531220556 },
+{ 0.377007410216418, 0.926210242138311 },
+{ 0.828045045257756, 0.560661576197336 },
+{ 0.371317193951838, 0.928506080473215 },
+{ 0.826321062845664, 0.563199344013834 },
+{ 0.365612997804774, 0.930766961078984 },
+{ 0.824589302785025, 0.565731810783613 },
+{ 0.359895036534988, 0.932992798834739 },
+{ 0.822849781375826, 0.568258952670131 },
+{ 0.354163525420491, 0.935183509938947 },
+{ 0.821102514991105, 0.570780745886967 },
+{ 0.348418680249435, 0.937339011912575 },
+{ 0.819347520076797, 0.573297166698042 },
+{ 0.342660717311994, 0.93945922360219 },
+{ 0.817584813151584, 0.575808191417845 },
+{ 0.33688985339222, 0.941544065183021 },
+{ 0.815814410806734, 0.578313796411656 },
+{ 0.331106305759876, 0.94359345816196 },
+{ 0.814036329705948, 0.580813958095765 },
+{ 0.325310292162263, 0.945607325380521 },
+{ 0.812250586585204, 0.583308652937698 },
+{ 0.319502030816016, 0.947585591017741 },
+{ 0.810457198252595, 0.585797857456439 },
+{ 0.313681740398892, 0.949528180593037 },
+{ 0.808656181588175, 0.588281548222645 },
+{ 0.307849640041535, 0.951435020969008 },
+{ 0.806847553543799, 0.590759701858874 },
+{ 0.302005949319228, 0.953306040354194 },
+{ 0.805031331142964, 0.5932322950398 },
+{ 0.296150888243624, 0.955141168305771 },
+{ 0.803207531480645, 0.595699304492433 },
+{ 0.290284677254462, 0.956940335732209 },
+{ 0.80137617172314, 0.598160706996342 },
+{ 0.284407537211272, 0.958703474895872 },
+{ 0.799537269107905, 0.600616479383869 },
+{ 0.278519689385053, 0.960430519415566 },
+{ 0.797690840943391, 0.603066598540348 },
+{ 0.272621355449949, 0.962121404269042 },
+{ 0.795836904608884, 0.605511041404326 },
+{ 0.266712757474898, 0.96377606579544 },
+{ 0.793975477554337, 0.607949784967774 },
+{ 0.260794117915276, 0.965394441697689 },
+{ 0.792106577300212, 0.610382806276309 },
+{ 0.254865659604515, 0.966976471044852 },
+{ 0.79023022143731, 0.61281008242941 },
+{ 0.24892760574572, 0.968522094274417 },
+{ 0.788346427626606, 0.615231590580627 },
+{ 0.242980179903264, 0.970031253194544 },
+{ 0.786455213599086, 0.617647307937804 },
+{ 0.237023605994367, 0.971503890986252 },
+{ 0.784556597155575, 0.620057211763289 },
+{ 0.231058108280671, 0.97293995220556 },
+{ 0.782650596166576, 0.62246127937415 },
+{ 0.225083911359793, 0.974339382785576 },
+{ 0.780737228572094, 0.624859488142386 },
+{ 0.21910124015687, 0.975702130038529 },
+{ 0.778816512381476, 0.627251815495144 },
+{ 0.213110319916091, 0.977028142657754 },
+{ 0.776888465673232, 0.629638238914927 },
+{ 0.207111376192219, 0.978317370719628 },
+{ 0.774953106594874, 0.632018735939809 },
+{ 0.201104634842092, 0.979569765685441 },
+{ 0.773010453362737, 0.634393284163645 },
+{ 0.195090322016128, 0.98078528040323 },
+{ 0.771060524261814, 0.636761861236284 },
+{ 0.189068664149806, 0.981963869109555 },
+{ 0.76910333764558, 0.639124444863776 },
+{ 0.183039887955141, 0.983105487431216 },
+{ 0.76713891193582, 0.641481012808583 },
+{ 0.177004220412149, 0.984210092386929 },
+{ 0.765167265622459, 0.643831542889791 },
+{ 0.170961888760301, 0.985277642388941 },
+{ 0.763188417263381, 0.646176012983316 },
+{ 0.16491312048997, 0.986308097244599 },
+{ 0.761202385484262, 0.648514401022112 },
+{ 0.158858143333861, 0.987301418157858 },
+{ 0.759209188978388, 0.650846684996381 },
+{ 0.152797185258443, 0.988257567730749 },
+{ 0.757208846506485, 0.653172842953777 },
+{ 0.146730474455362, 0.989176509964781 },
+{ 0.755201376896537, 0.655492852999615 },
+{ 0.140658239332849, 0.990058210262297 },
+{ 0.753186799043613, 0.657806693297079 },
+{ 0.134580708507126, 0.99090263542778 },
+{ 0.751165131909686, 0.66011434206742 },
+{ 0.128498110793793, 0.9917097536691 },
+{ 0.749136394523459, 0.662415777590172 },
+{ 0.122410675199216, 0.99247953459871 },
+{ 0.74710060598018, 0.664710978203345 },
+{ 0.116318630911905, 0.993211949234794 },
+{ 0.745057785441466, 0.666999922303637 },
+{ 0.110222207293883, 0.993906970002356 },
+{ 0.743007952135122, 0.669282588346636 },
+{ 0.104121633872055, 0.994564570734255 },
+{ 0.740951125354959, 0.671558954847018 },
+{ 0.0980171403295608, 0.995184726672197 },
+{ 0.738887324460615, 0.673829000378756 },
+{ 0.0919089564971327, 0.99576741446766 },
+{ 0.73681656887737, 0.676092703575316 },
+{ 0.0857973123444399, 0.996312612182778 },
+{ 0.734738878095963, 0.678350043129861 },
+{ 0.0796824379714301, 0.996820299291166 },
+{ 0.732654271672413, 0.680600997795453 },
+{ 0.0735645635996675, 0.99729045667869 },
+{ 0.730562769227828, 0.682845546385248 },
+{ 0.0674439195636641, 0.997723066644192 },
+{ 0.728464390448225, 0.6850836677727 },
+{ 0.0613207363022086, 0.998118112900149 },
+{ 0.726359155084346, 0.687315340891759 },
+{ 0.05519524434969, 0.998475580573295 },
+{ 0.724247082951467, 0.689540544737067 },
+{ 0.0490676743274181, 0.998795456205172 },
+{ 0.722128193929215, 0.691759258364158 },
+{ 0.042938256934941, 0.999077727752645 },
+{ 0.720002507961382, 0.693971460889654 },
+{ 0.036807222941359, 0.99932238458835 },
+{ 0.717870045055732, 0.696177131491463 },
+{ 0.0306748031766366, 0.999529417501093 },
+{ 0.715730825283819, 0.698376249408973 },
+{ 0.0245412285229123, 0.999698818696204 },
+{ 0.713584868780794, 0.700568793943248 },
+{ 0.0184067299058048, 0.999830581795823 },
+{ 0.711432195745216, 0.702754744457225 },
+{ 0.0122715382857199, 0.999924701839145 },
+{ 0.709272826438866, 0.704934080375905 },
+{ 0.00613588464915452, 0.999981175282601 },
+{ 0.707106781186548, 0.707106781186547 },
+{ 6.1257422745431e-17, 1 },
+{ 0.704934080375905, 0.709272826438866 },
+{ -0.00613588464915439, 0.999981175282601 },
+{ 0.702754744457225, 0.711432195745216 },
+{ -0.0122715382857198, 0.999924701839145 },
+{ 0.700568793943248, 0.713584868780794 },
+{ -0.0184067299058047, 0.999830581795823 },
+{ 0.698376249408973, 0.715730825283819 },
+{ -0.0245412285229121, 0.999698818696204 },
+{ 0.696177131491463, 0.717870045055732 },
+{ -0.0306748031766365, 0.999529417501093 },
+{ 0.693971460889654, 0.720002507961382 },
+{ -0.0368072229413589, 0.99932238458835 },
+{ 0.691759258364158, 0.722128193929215 },
+{ -0.0429382569349408, 0.999077727752645 },
+{ 0.689540544737067, 0.724247082951467 },
+{ -0.049067674327418, 0.998795456205172 },
+{ 0.687315340891759, 0.726359155084346 },
+{ -0.0551952443496899, 0.998475580573295 },
+{ 0.6850836677727, 0.728464390448225 },
+{ -0.0613207363022085, 0.998118112900149 },
+{ 0.682845546385248, 0.730562769227828 },
+{ -0.067443919563664, 0.997723066644192 },
+{ 0.680600997795453, 0.732654271672413 },
+{ -0.0735645635996673, 0.99729045667869 },
+{ 0.678350043129862, 0.734738878095963 },
+{ -0.07968243797143, 0.996820299291166 },
+{ 0.676092703575316, 0.73681656887737 },
+{ -0.0857973123444398, 0.996312612182778 },
+{ 0.673829000378756, 0.738887324460615 },
+{ -0.0919089564971326, 0.99576741446766 },
+{ 0.671558954847018, 0.740951125354959 },
+{ -0.0980171403295606, 0.995184726672197 },
+{ 0.669282588346636, 0.743007952135122 },
+{ -0.104121633872055, 0.994564570734255 },
+{ 0.666999922303637, 0.745057785441466 },
+{ -0.110222207293883, 0.993906970002356 },
+{ 0.664710978203345, 0.74710060598018 },
+{ -0.116318630911905, 0.993211949234794 },
+{ 0.662415777590172, 0.749136394523459 },
+{ -0.122410675199216, 0.99247953459871 },
+{ 0.66011434206742, 0.751165131909686 },
+{ -0.128498110793793, 0.9917097536691 },
+{ 0.657806693297079, 0.753186799043612 },
+{ -0.134580708507126, 0.99090263542778 },
+{ 0.655492852999615, 0.755201376896537 },
+{ -0.140658239332849, 0.990058210262297 },
+{ 0.653172842953777, 0.757208846506484 },
+{ -0.146730474455362, 0.989176509964781 },
+{ 0.650846684996381, 0.759209188978388 },
+{ -0.152797185258443, 0.988257567730749 },
+{ 0.648514401022113, 0.761202385484262 },
+{ -0.158858143333861, 0.987301418157858 },
+{ 0.646176012983316, 0.763188417263381 },
+{ -0.16491312048997, 0.986308097244599 },
+{ 0.643831542889791, 0.765167265622459 },
+{ -0.170961888760301, 0.985277642388941 },
+{ 0.641481012808583, 0.76713891193582 },
+{ -0.177004220412149, 0.984210092386929 },
+{ 0.639124444863776, 0.76910333764558 },
+{ -0.183039887955141, 0.983105487431216 },
+{ 0.636761861236284, 0.771060524261814 },
+{ -0.189068664149806, 0.981963869109555 },
+{ 0.634393284163645, 0.773010453362737 },
+{ -0.195090322016128, 0.98078528040323 },
+{ 0.632018735939809, 0.774953106594874 },
+{ -0.201104634842092, 0.979569765685441 },
+{ 0.629638238914927, 0.776888465673232 },
+{ -0.207111376192218, 0.978317370719628 },
+{ 0.627251815495144, 0.778816512381476 },
+{ -0.213110319916091, 0.977028142657754 },
+{ 0.624859488142386, 0.780737228572094 },
+{ -0.21910124015687, 0.975702130038529 },
+{ 0.62246127937415, 0.782650596166576 },
+{ -0.225083911359793, 0.974339382785576 },
+{ 0.620057211763289, 0.784556597155575 },
+{ -0.231058108280671, 0.97293995220556 },
+{ 0.617647307937804, 0.786455213599086 },
+{ -0.237023605994367, 0.971503890986252 },
+{ 0.615231590580627, 0.788346427626606 },
+{ -0.242980179903264, 0.970031253194544 },
+{ 0.61281008242941, 0.79023022143731 },
+{ -0.24892760574572, 0.968522094274417 },
+{ 0.610382806276309, 0.792106577300212 },
+{ -0.254865659604515, 0.966976471044852 },
+{ 0.607949784967774, 0.793975477554337 },
+{ -0.260794117915275, 0.965394441697689 },
+{ 0.605511041404326, 0.795836904608883 },
+{ -0.266712757474898, 0.96377606579544 },
+{ 0.603066598540348, 0.797690840943391 },
+{ -0.272621355449949, 0.962121404269042 },
+{ 0.600616479383869, 0.799537269107905 },
+{ -0.278519689385053, 0.960430519415566 },
+{ 0.598160706996342, 0.80137617172314 },
+{ -0.284407537211272, 0.958703474895872 },
+{ 0.595699304492433, 0.803207531480645 },
+{ -0.290284677254462, 0.956940335732209 },
+{ 0.5932322950398, 0.805031331142964 },
+{ -0.296150888243624, 0.955141168305771 },
+{ 0.590759701858874, 0.806847553543799 },
+{ -0.302005949319228, 0.953306040354194 },
+{ 0.588281548222645, 0.808656181588175 },
+{ -0.307849640041535, 0.951435020969008 },
+{ 0.585797857456439, 0.810457198252595 },
+{ -0.313681740398891, 0.949528180593037 },
+{ 0.583308652937698, 0.812250586585204 },
+{ -0.319502030816016, 0.947585591017741 },
+{ 0.580813958095765, 0.814036329705948 },
+{ -0.325310292162263, 0.945607325380521 },
+{ 0.578313796411656, 0.815814410806734 },
+{ -0.331106305759876, 0.94359345816196 },
+{ 0.575808191417845, 0.817584813151584 },
+{ -0.33688985339222, 0.941544065183021 },
+{ 0.573297166698042, 0.819347520076797 },
+{ -0.342660717311994, 0.93945922360219 },
+{ 0.570780745886967, 0.821102514991105 },
+{ -0.348418680249434, 0.937339011912575 },
+{ 0.568258952670131, 0.822849781375826 },
+{ -0.35416352542049, 0.935183509938948 },
+{ 0.565731810783613, 0.824589302785025 },
+{ -0.359895036534988, 0.932992798834739 },
+{ 0.563199344013834, 0.826321062845663 },
+{ -0.365612997804774, 0.930766961078984 },
+{ 0.560661576197336, 0.828045045257756 },
+{ -0.371317193951837, 0.928506080473216 },
+{ 0.558118531220556, 0.829761233794523 },
+{ -0.377007410216418, 0.926210242138311 },
+{ 0.555570233019602, 0.831469612302545 },
+{ -0.38268343236509, 0.923879532511287 },
+{ 0.553016705580028, 0.833170164701913 },
+{ -0.388345046698826, 0.921514039342042 },
+{ 0.550457972936605, 0.83486287498638 },
+{ -0.393992040061048, 0.919113851690058 },
+{ 0.5478940591731, 0.836547727223512 },
+{ -0.399624199845647, 0.916679059921043 },
+{ 0.545324988422046, 0.838224705554838 },
+{ -0.40524131400499, 0.914209755703531 },
+{ 0.542750784864516, 0.839893794195999 },
+{ -0.410843171057904, 0.91170603200543 },
+{ 0.540171472729893, 0.841554977436898 },
+{ -0.416429560097637, 0.909167983090522 },
+{ 0.537587076295646, 0.843208239641845 },
+{ -0.4220002707998, 0.906595704514915 },
+{ 0.534997619887097, 0.844853565249707 },
+{ -0.427555093430282, 0.903989293123443 },
+{ 0.532403127877198, 0.846490938774052 },
+{ -0.433093818853152, 0.901348847046022 },
+{ 0.529803624686295, 0.848120344803297 },
+{ -0.438616238538527, 0.898674465693954 },
+{ 0.527199134781901, 0.849741768000852 },
+{ -0.444122144570429, 0.895966249756185 },
+{ 0.524589682678469, 0.851355193105265 },
+{ -0.449611329654607, 0.893224301195515 },
+{ 0.521975292937154, 0.852960604930364 },
+{ -0.455083587126344, 0.890448723244758 },
+{ 0.51935599016559, 0.854557988365401 },
+{ -0.46053871095824, 0.887639620402854 },
+{ 0.51673179901765, 0.856147328375194 },
+{ -0.465976495767966, 0.884797098430938 },
+{ 0.514102744193222, 0.857728610000272 },
+{ -0.471396736825998, 0.881921264348355 },
+{ 0.511468850437971, 0.859301818357008 },
+{ -0.476799230063322, 0.879012226428634 },
+{ 0.508830142543107, 0.860866938637767 },
+{ -0.482183772079123, 0.876070094195407 },
+{ 0.506186645345155, 0.862423956111041 },
+{ -0.487550160148436, 0.87309497841829 },
+{ 0.503538383725718, 0.863972856121587 },
+{ -0.492898192229784, 0.870086991108711 },
+{ 0.500885382611241, 0.865513624090569 },
+{ -0.498227666972782, 0.867046245515693 },
+{ 0.498227666972782, 0.867046245515693 },
+{ -0.503538383725717, 0.863972856121587 },
+{ 0.495565261825772, 0.868570705971341 },
+{ -0.508830142543107, 0.860866938637767 },
+{ 0.492898192229784, 0.870086991108711 },
+{ -0.514102744193222, 0.857728610000272 },
+{ 0.490226483288291, 0.871595086655951 },
+{ -0.51935599016559, 0.854557988365401 },
+{ 0.487550160148436, 0.87309497841829 },
+{ -0.524589682678469, 0.851355193105265 },
+{ 0.484869248000791, 0.874586652278176 },
+{ -0.529803624686295, 0.848120344803297 },
+{ 0.482183772079123, 0.876070094195407 },
+{ -0.534997619887097, 0.844853565249707 },
+{ 0.479493757660153, 0.877545290207261 },
+{ -0.540171472729893, 0.841554977436898 },
+{ 0.476799230063322, 0.879012226428633 },
+{ -0.545324988422046, 0.838224705554838 },
+{ 0.47410021465055, 0.880470889052161 },
+{ -0.550457972936605, 0.83486287498638 },
+{ 0.471396736825998, 0.881921264348355 },
+{ -0.555570233019602, 0.831469612302545 },
+{ 0.468688822035828, 0.883363338665732 },
+{ -0.560661576197336, 0.828045045257756 },
+{ 0.465976495767966, 0.884797098430938 },
+{ -0.565731810783613, 0.824589302785025 },
+{ 0.46325978355186, 0.886222530148881 },
+{ -0.570780745886967, 0.821102514991105 },
+{ 0.46053871095824, 0.887639620402854 },
+{ -0.575808191417845, 0.817584813151584 },
+{ 0.457813303598877, 0.889048355854665 },
+{ -0.580813958095764, 0.814036329705949 },
+{ 0.455083587126344, 0.890448723244758 },
+{ -0.585797857456439, 0.810457198252595 },
+{ 0.452349587233771, 0.891840709392343 },
+{ -0.590759701858874, 0.806847553543799 },
+{ 0.449611329654607, 0.893224301195515 },
+{ -0.595699304492433, 0.803207531480645 },
+{ 0.446868840162374, 0.894599485631383 },
+{ -0.600616479383869, 0.799537269107905 },
+{ 0.444122144570429, 0.895966249756185 },
+{ -0.605511041404325, 0.795836904608884 },
+{ 0.441371268731717, 0.897324580705418 },
+{ -0.61038280627631, 0.792106577300212 },
+{ 0.438616238538528, 0.898674465693954 },
+{ -0.615231590580627, 0.788346427626606 },
+{ 0.435857079922255, 0.90001589201616 },
+{ -0.620057211763289, 0.784556597155575 },
+{ 0.433093818853152, 0.901348847046022 },
+{ -0.624859488142386, 0.780737228572095 },
+{ 0.430326481340083, 0.902673318237259 },
+{ -0.629638238914927, 0.776888465673232 },
+{ 0.427555093430282, 0.903989293123443 },
+{ -0.634393284163645, 0.773010453362737 },
+{ 0.424779681209109, 0.905296759318119 },
+{ -0.639124444863776, 0.76910333764558 },
+{ 0.4220002707998, 0.906595704514915 },
+{ -0.643831542889791, 0.765167265622459 },
+{ 0.419216888363224, 0.907886116487666 },
+{ -0.648514401022112, 0.761202385484262 },
+{ 0.416429560097637, 0.909167983090522 },
+{ -0.653172842953777, 0.757208846506485 },
+{ 0.413638312238435, 0.910441292258067 },
+{ -0.657806693297079, 0.753186799043613 },
+{ 0.410843171057904, 0.91170603200543 },
+{ -0.662415777590172, 0.749136394523459 },
+{ 0.408044162864979, 0.912962190428398 },
+{ -0.666999922303637, 0.745057785441466 },
+{ 0.40524131400499, 0.914209755703531 },
+{ -0.671558954847018, 0.740951125354959 },
+{ 0.402434650859419, 0.915448716088268 },
+{ -0.676092703575316, 0.73681656887737 },
+{ 0.399624199845647, 0.916679059921043 },
+{ -0.680600997795453, 0.732654271672413 },
+{ 0.39680998741671, 0.91790077562139 },
+{ -0.6850836677727, 0.728464390448225 },
+{ 0.393992040061048, 0.919113851690058 },
+{ -0.689540544737067, 0.724247082951467 },
+{ 0.391170384302254, 0.92031827670911 },
+{ -0.693971460889654, 0.720002507961382 },
+{ 0.388345046698826, 0.921514039342042 },
+{ -0.698376249408973, 0.715730825283819 },
+{ 0.385516053843919, 0.922701128333879 },
+{ -0.702754744457225, 0.711432195745217 },
+{ 0.38268343236509, 0.923879532511287 },
+{ -0.707106781186547, 0.707106781186548 },
+{ 0.379847208924051, 0.925049240782678 },
+{ -0.711432195745217, 0.702754744457225 },
+{ 0.377007410216418, 0.926210242138311 },
+{ -0.715730825283819, 0.698376249408973 },
+{ 0.374164062971458, 0.927362525650401 },
+{ -0.720002507961382, 0.693971460889654 },
+{ 0.371317193951838, 0.928506080473215 },
+{ -0.724247082951467, 0.689540544737067 },
+{ 0.368466829953372, 0.929640895843181 },
+{ -0.728464390448225, 0.6850836677727 },
+{ 0.365612997804774, 0.930766961078984 },
+{ -0.732654271672413, 0.680600997795453 },
+{ 0.362755724367397, 0.931884265581668 },
+{ -0.73681656887737, 0.676092703575316 },
+{ 0.359895036534988, 0.932992798834739 },
+{ -0.740951125354959, 0.671558954847019 },
+{ 0.35703096123343, 0.934092550404259 },
+{ -0.745057785441466, 0.666999922303638 },
+{ 0.354163525420491, 0.935183509938947 },
+{ -0.749136394523459, 0.662415777590172 },
+{ 0.351292756085567, 0.936265667170278 },
+{ -0.753186799043612, 0.657806693297079 },
+{ 0.348418680249435, 0.937339011912575 },
+{ -0.757208846506485, 0.653172842953777 },
+{ 0.345541324963989, 0.938403534063108 },
+{ -0.761202385484262, 0.648514401022113 },
+{ 0.342660717311994, 0.93945922360219 },
+{ -0.765167265622459, 0.643831542889791 },
+{ 0.339776884406827, 0.940506070593268 },
+{ -0.769103337645579, 0.639124444863776 },
+{ 0.33688985339222, 0.941544065183021 },
+{ -0.773010453362737, 0.634393284163645 },
+{ 0.333999651442009, 0.942573197601447 },
+{ -0.776888465673232, 0.629638238914927 },
+{ 0.331106305759876, 0.94359345816196 },
+{ -0.780737228572094, 0.624859488142386 },
+{ 0.328209843579093, 0.94460483726148 },
+{ -0.784556597155575, 0.620057211763289 },
+{ 0.325310292162263, 0.945607325380521 },
+{ -0.788346427626606, 0.615231590580627 },
+{ 0.32240767880107, 0.946600913083284 },
+{ -0.792106577300212, 0.61038280627631 },
+{ 0.319502030816016, 0.947585591017741 },
+{ -0.795836904608883, 0.605511041404326 },
+{ 0.316593375556166, 0.94856134991573 },
+{ -0.799537269107905, 0.600616479383869 },
+{ 0.313681740398892, 0.949528180593037 },
+{ -0.803207531480645, 0.595699304492433 },
+{ 0.310767152749611, 0.950486073949482 },
+{ -0.806847553543799, 0.590759701858874 },
+{ 0.307849640041535, 0.951435020969008 },
+{ -0.810457198252595, 0.585797857456439 },
+{ 0.304929229735402, 0.952375012719766 },
+{ -0.814036329705948, 0.580813958095765 },
+{ 0.302005949319228, 0.953306040354194 },
+{ -0.817584813151584, 0.575808191417845 },
+{ 0.29907982630804, 0.954228095109106 },
+{ -0.821102514991105, 0.570780745886967 },
+{ 0.296150888243624, 0.955141168305771 },
+{ -0.824589302785025, 0.565731810783613 },
+{ 0.293219162694259, 0.956045251349996 },
+{ -0.828045045257756, 0.560661576197336 },
+{ 0.290284677254462, 0.956940335732209 },
+{ -0.831469612302545, 0.555570233019602 },
+{ 0.28734745954473, 0.957826413027533 },
+{ -0.83486287498638, 0.550457972936605 },
+{ 0.284407537211272, 0.958703474895872 },
+{ -0.838224705554838, 0.545324988422046 },
+{ 0.281464937925758, 0.959571513081985 },
+{ -0.841554977436898, 0.540171472729893 },
+{ 0.278519689385053, 0.960430519415566 },
+{ -0.844853565249707, 0.534997619887097 },
+{ 0.275571819310958, 0.961280485811321 },
+{ -0.848120344803297, 0.529803624686295 },
+{ 0.272621355449949, 0.962121404269042 },
+{ -0.851355193105265, 0.524589682678469 },
+{ 0.269668325572915, 0.962953266873684 },
+{ -0.8545579883654, 0.51935599016559 },
+{ 0.266712757474898, 0.96377606579544 },
+{ -0.857728610000272, 0.514102744193222 },
+{ 0.263754678974832, 0.964589793289813 },
+{ -0.860866938637767, 0.508830142543107 },
+{ 0.260794117915276, 0.965394441697689 },
+{ -0.863972856121587, 0.503538383725718 },
+{ 0.257831102162159, 0.966190003445413 },
+{ -0.867046245515693, 0.498227666972782 },
+{ 0.254865659604515, 0.966976471044852 },
+{ -0.870086991108711, 0.492898192229784 },
+{ 0.251897818154217, 0.967753837093476 },
+{ -0.87309497841829, 0.487550160148436 },
+{ 0.24892760574572, 0.968522094274417 },
+{ -0.876070094195406, 0.482183772079123 },
+{ 0.245955050335795, 0.969281235356549 },
+{ -0.879012226428634, 0.476799230063322 },
+{ 0.242980179903264, 0.970031253194544 },
+{ -0.881921264348355, 0.471396736825998 },
+{ 0.240003022448741, 0.97077214072895 },
+{ -0.884797098430938, 0.465976495767966 },
+{ 0.237023605994367, 0.971503890986252 },
+{ -0.887639620402854, 0.46053871095824 },
+{ 0.234041958583543, 0.972226497078936 },
+{ -0.890448723244758, 0.455083587126344 },
+{ 0.231058108280671, 0.97293995220556 },
+{ -0.893224301195515, 0.449611329654607 },
+{ 0.228072083170886, 0.973644249650812 },
+{ -0.895966249756185, 0.444122144570429 },
+{ 0.225083911359793, 0.974339382785576 },
+{ -0.898674465693954, 0.438616238538528 },
+{ 0.222093620973204, 0.975025345066994 },
+{ -0.901348847046022, 0.433093818853152 },
+{ 0.21910124015687, 0.975702130038529 },
+{ -0.903989293123443, 0.427555093430282 },
+{ 0.21610679707622, 0.976369731330021 },
+{ -0.906595704514915, 0.4220002707998 },
+{ 0.213110319916091, 0.977028142657754 },
+{ -0.909167983090522, 0.416429560097637 },
+{ 0.21011183688047, 0.97767735782451 },
+{ -0.91170603200543, 0.410843171057904 },
+{ 0.207111376192219, 0.978317370719628 },
+{ -0.914209755703531, 0.40524131400499 },
+{ 0.204108966092817, 0.978948175319062 },
+{ -0.916679059921043, 0.399624199845647 },
+{ 0.201104634842092, 0.979569765685441 },
+{ -0.919113851690058, 0.393992040061048 },
+{ 0.198098410717954, 0.980182135968117 },
+{ -0.921514039342042, 0.388345046698827 },
+{ 0.195090322016128, 0.98078528040323 },
+{ -0.923879532511287, 0.38268343236509 },
+{ 0.192080397049892, 0.981379193313755 },
+{ -0.926210242138311, 0.377007410216418 },
+{ 0.189068664149806, 0.981963869109555 },
+{ -0.928506080473215, 0.371317193951838 },
+{ 0.186055151663447, 0.982539302287441 },
+{ -0.930766961078984, 0.365612997804774 },
+{ 0.183039887955141, 0.983105487431216 },
+{ -0.932992798834739, 0.359895036534988 },
+{ 0.1800229014057, 0.98366241921173 },
+{ -0.935183509938948, 0.35416352542049 },
+{ 0.177004220412149, 0.984210092386929 },
+{ -0.937339011912575, 0.348418680249435 },
+{ 0.173983873387464, 0.984748501801904 },
+{ -0.93945922360219, 0.342660717311994 },
+{ 0.170961888760301, 0.985277642388941 },
+{ -0.941544065183021, 0.33688985339222 },
+{ 0.167938294974731, 0.985797509167567 },
+{ -0.94359345816196, 0.331106305759876 },
+{ 0.16491312048997, 0.986308097244599 },
+{ -0.945607325380521, 0.325310292162263 },
+{ 0.161886393780112, 0.986809401814185 },
+{ -0.947585591017741, 0.319502030816016 },
+{ 0.158858143333861, 0.987301418157858 },
+{ -0.949528180593037, 0.313681740398891 },
+{ 0.155828397654265, 0.987784141644572 },
+{ -0.951435020969008, 0.307849640041535 },
+{ 0.152797185258443, 0.988257567730749 },
+{ -0.953306040354194, 0.302005949319228 },
+{ 0.149764534677322, 0.988721691960324 },
+{ -0.955141168305771, 0.296150888243624 },
+{ 0.146730474455362, 0.989176509964781 },
+{ -0.956940335732209, 0.290284677254462 },
+{ 0.143695033150295, 0.989622017463201 },
+{ -0.958703474895871, 0.284407537211272 },
+{ 0.140658239332849, 0.990058210262297 },
+{ -0.960430519415566, 0.278519689385053 },
+{ 0.137620121586486, 0.990485084256457 },
+{ -0.962121404269041, 0.272621355449949 },
+{ 0.134580708507126, 0.99090263542778 },
+{ -0.96377606579544, 0.266712757474898 },
+{ 0.131540028702883, 0.991310859846115 },
+{ -0.965394441697689, 0.260794117915276 },
+{ 0.128498110793793, 0.9917097536691 },
+{ -0.966976471044852, 0.254865659604515 },
+{ 0.125454983411546, 0.992099313142192 },
+{ -0.968522094274417, 0.24892760574572 },
+{ 0.122410675199216, 0.99247953459871 },
+{ -0.970031253194544, 0.242980179903264 },
+{ 0.119365214810991, 0.992850414459865 },
+{ -0.971503890986252, 0.237023605994367 },
+{ 0.116318630911905, 0.993211949234794 },
+{ -0.97293995220556, 0.231058108280671 },
+{ 0.113270952177564, 0.993564135520595 },
+{ -0.974339382785576, 0.225083911359793 },
+{ 0.110222207293883, 0.993906970002356 },
+{ -0.975702130038528, 0.21910124015687 },
+{ 0.107172424956809, 0.994240449453188 },
+{ -0.977028142657754, 0.213110319916091 },
+{ 0.104121633872055, 0.994564570734255 },
+{ -0.978317370719628, 0.207111376192219 },
+{ 0.101069862754828, 0.994879330794806 },
+{ -0.979569765685441, 0.201104634842092 },
+{ 0.0980171403295608, 0.995184726672197 },
+{ -0.98078528040323, 0.195090322016129 },
+{ 0.0949634953296391, 0.995480755491927 },
+{ -0.981963869109555, 0.189068664149806 },
+{ 0.0919089564971327, 0.99576741446766 },
+{ -0.983105487431216, 0.183039887955141 },
+{ 0.0888535525825247, 0.996044700901252 },
+{ -0.984210092386929, 0.177004220412149 },
+{ 0.0857973123444399, 0.996312612182778 },
+{ -0.985277642388941, 0.170961888760301 },
+{ 0.0827402645493758, 0.996571145790555 },
+{ -0.986308097244599, 0.16491312048997 },
+{ 0.0796824379714301, 0.996820299291166 },
+{ -0.987301418157858, 0.158858143333861 },
+{ 0.0766238613920316, 0.997060070339483 },
+{ -0.988257567730749, 0.152797185258444 },
+{ 0.0735645635996675, 0.99729045667869 },
+{ -0.989176509964781, 0.146730474455362 },
+{ 0.070504573389614, 0.997511456140303 },
+{ -0.990058210262297, 0.14065823933285 },
+{ 0.0674439195636641, 0.997723066644192 },
+{ -0.99090263542778, 0.134580708507126 },
+{ 0.0643826309298574, 0.997925286198596 },
+{ -0.9917097536691, 0.128498110793793 },
+{ 0.0613207363022086, 0.998118112900149 },
+{ -0.99247953459871, 0.122410675199216 },
+{ 0.0582582645004357, 0.998301544933893 },
+{ -0.993211949234794, 0.116318630911905 },
+{ 0.05519524434969, 0.998475580573295 },
+{ -0.993906970002356, 0.110222207293883 },
+{ 0.0521317046802833, 0.998640218180265 },
+{ -0.994564570734255, 0.104121633872055 },
+{ 0.0490676743274181, 0.998795456205172 },
+{ -0.995184726672197, 0.0980171403295608 },
+{ 0.0460031821309146, 0.998941293186857 },
+{ -0.99576741446766, 0.0919089564971328 },
+{ 0.042938256934941, 0.999077727752645 },
+{ -0.996312612182778, 0.0857973123444402 },
+{ 0.0398729275877398, 0.999204758618364 },
+{ -0.996820299291166, 0.0796824379714302 },
+{ 0.036807222941359, 0.99932238458835 },
+{ -0.99729045667869, 0.0735645635996677 },
+{ 0.0337411718513776, 0.999430604555462 },
+{ -0.997723066644192, 0.0674439195636642 },
+{ 0.0306748031766366, 0.999529417501093 },
+{ -0.998118112900149, 0.0613207363022085 },
+{ 0.0276081457789658, 0.999618822495179 },
+{ -0.998475580573295, 0.0551952443496901 },
+{ 0.0245412285229123, 0.999698818696204 },
+{ -0.998795456205172, 0.049067674327418 },
+{ 0.0214740802754696, 0.999769405351215 },
+{ -0.999077727752645, 0.042938256934941 },
+{ 0.0184067299058048, 0.999830581795823 },
+{ -0.99932238458835, 0.0368072229413588 },
+{ 0.0153392062849882, 0.999882347454213 },
+{ -0.999529417501093, 0.0306748031766369 },
+{ 0.0122715382857199, 0.999924701839145 },
+{ -0.999698818696204, 0.0245412285229123 },
+{ 0.00920375478205996, 0.999957644551964 },
+{ -0.999830581795823, 0.0184067299058051 },
+{ 0.00613588464915452, 0.999981175282601 },
+{ -0.999924701839145, 0.01227153828572 },
+{ 0.00306795676296614, 0.999995293809576 },
+{ -0.999981175282601, 0.0061358846491548 },
+};
+
 void PFFTW(16) (fftw_complex * input) {
      fftw_real tmp332;
      fftw_real tmp331;
@@ -1464,8 +2620,8 @@
      c_im(input[1]) = st1;
 }
 
-void  PFFTW(64)(fftw_complex *input) 
-{ 
+void  PFFTW(64)(fftw_complex *input)
+{
      PFFTW(twiddle_4)(input, PFFTW(W_64), 16);
      PFFTW(16)(input );
      PFFTW(16)(input + 16);
@@ -1473,8 +2629,8 @@
      PFFTW(16)(input + 48);
 }
 
-void PFFTW(128)(fftw_complex *input) 
-{ 
+void PFFTW(128)(fftw_complex *input)
+{
      PFFTW(twiddle_4)(input, PFFTW(W_128), 32);
      PFFTW(32)(input );
      PFFTW(32)(input + 32);
@@ -1482,8 +2638,17 @@
      PFFTW(32)(input + 96);
 }
 
-void PFFTW(512)(fftw_complex *input) 
-{ 
+void PFFTW(256)(fftw_complex *input)
+{
+     PFFTW(twiddle_4)(input, PFFTW(W_256), 64);
+     PFFTW(64)(input );
+     PFFTW(64)(input + 64);
+     PFFTW(64)(input + 128);
+     PFFTW(64)(input + 192);
+}
+
+void PFFTW(512)(fftw_complex *input)
+{
      PFFTW(twiddle_4)(input, PFFTW(W_512), 128);
      PFFTW(128)(input );
      PFFTW(128)(input + 128);
@@ -1491,6 +2656,15 @@
      PFFTW(128)(input + 384);
 }
 
+void PFFTW(2048)(fftw_complex *input)
+{
+     PFFTW(twiddle_4)(input, PFFTW(W_2048), 512);
+     PFFTW(512)(input );
+     PFFTW(512)(input + 512);
+     PFFTW(512)(input + 1024);
+     PFFTW(512)(input + 1536);
+}
+
 void  PFFTW(twiddle_4) (fftw_complex * A, const fftw_complex * W, int iostride) {
      int i;
      fftw_complex *inout;
@@ -1624,6 +2798,16 @@
        return (i1 * 32 + ((i2 + 1) % 32));
 }
 
+int PFFTW(permutation_256)(int i)
+{
+    int i1 = i % 4;
+    int i2 = i / 4;
+    if (i1 <= 2)
+       return (i1 * 64 + PFFTW(permutation_64)(i2));
+    else
+       return (i1 * 64 + PFFTW(permutation_64)((i2 + 1) % 64));
+}
+
 int PFFTW(permutation_512)(int i)
 {
     int i1 = i % 4;
@@ -1634,11 +2818,23 @@
        return (i1 * 128 + PFFTW(permutation_128)((i2 + 1) % 128));
 }
 
+int PFFTW(permutation_2048)(int i)
+{
+    int i1 = i % 4;
+    int i2 = i / 4;
+    if (i1 <= 2)
+       return (i1 * 512 + PFFTW(permutation_512)(i2));
+    else
+       return (i1 * 512 + PFFTW(permutation_512)((i2 + 1) % 512));
+}
+
 void MakeFFTOrder(void)
 {
 int i;
-for (i=0 ; i < 512 ; i++){
+for (i=0 ; i < 2048 ; i++){
      if (i < 64) unscambled64[i]=PFFTW(permutation_64)(i);
-     unscambled512[i]=PFFTW(permutation_512)(i);
+     if (i < 256) unscambled256[i]=PFFTW(permutation_256)(i);
+     if (i < 512) unscambled512[i]=PFFTW(permutation_512)(i);
+     unscambled2048[i]=PFFTW(permutation_2048)(i);
      }
 }
--- a/psych.c
+++ b/psych.c
@@ -50,11 +50,11 @@
 Copyright (c) 1997.
 
 
-Source file: 
+Source file:
 
-$Id: psych.c,v 1.12 1999/12/30 13:52:54 menno Exp $
-$Id: psych.c,v 1.12 1999/12/30 13:52:54 menno Exp $
-$Id: psych.c,v 1.12 1999/12/30 13:52:54 menno Exp $
+$Id: psych.c,v 1.13 2000/01/03 18:51:58 lenox Exp $
+$Id: psych.c,v 1.13 2000/01/03 18:51:58 lenox Exp $
+$Id: psych.c,v 1.13 2000/01/03 18:51:58 lenox Exp $
 
 **********************************************************************/
 
@@ -64,6 +64,7 @@
 #include <memory.h>
 #include "tf_main.h"
 #include "psych.h"
+#include "transfo.h"
 
 
 SR_INFO sr_info_aac[MAX_SAMPLING_RATES+1] =
@@ -106,7 +107,7 @@
      { /*  cb_width_long[NSFB_LONG] */
       4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  8,  8,  8,  8,  8,  8,  8, 
       12, 12, 12, 12, 16, 16, 20, 20, 24, 24, 28, 28, 32, 32, 32, 32, 32, 32,
-      32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 96 
+      32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 96
      }, 
      { /* cb_width_short[NSFB_SHORT] */
       4,  4,  4,  4,  4,  8,  8,  8, 12, 12, 12, 16, 16, 16 
@@ -295,97 +296,20 @@
 }
 
 /* added by T. Okada (1997.07.10) */
-void psy_fft_table_init(FFT_TABLE_LONG *fft_tbl_long, 
+void psy_fft_table_init(FFT_TABLE_LONG *fft_tbl_long,
 			FFT_TABLE_SHORT *fft_tbl_short
 			)
-{    
+{
 
-	int i,j,k,n,n2,n4,n8;
-	double c,s,dc,ds,t;
+int i;
 
-	/* generating Hann window */
-	for(i = 0; i < BLOCK_LEN_LONG*2; i++)
-		fft_tbl_long->hw[i] = 0.5 * (1-cos(2.0*M_PI*(i+0.5)/(BLOCK_LEN_LONG*2)));
-	for(i = 0; i < BLOCK_LEN_SHORT*2; i++)
-		fft_tbl_short->hw[i] = 0.5 * (1-cos(2.0*M_PI*(i+0.5)/(BLOCK_LEN_SHORT*2)));
+/* generating Hann window */
+for(i = 0; i < BLOCK_LEN_LONG*2; i++)
+	fft_tbl_long->hw[i] = 0.5 * (1-cos(2.0*M_PI*(i+0.5)/(BLOCK_LEN_LONG*2)));
+for(i = 0; i < BLOCK_LEN_SHORT*2; i++)
+	fft_tbl_short->hw[i] = 0.5 * (1-cos(2.0*M_PI*(i+0.5)/(BLOCK_LEN_SHORT*2)));
 
-	/* generating sin table (long) */
-    n = BLOCK_LEN_LONG * 2;
-    n2 = n/2;  
-    n4 = n2/2;  
-    n8 = n4/2;
-
-    t = sin(M_PI / (double)n);
-    dc = 2.0*t*t;
-    ds = sqrt(dc * (2.0 - dc));
-    t = 2*dc;
-    c = fft_tbl_long->st[n4] = 1.0;
-    s = fft_tbl_long->st[0] = 0;
-
-    for(i = 1; i < n8; i++){
-	c -= dc;  dc += t * c;
-	s += ds;  ds -= t * s;
-	fft_tbl_long->st[i] = s;  fft_tbl_long->st[n4 - i] = c;
-    }
-    if (n8 != 0) fft_tbl_long->st[n8] = sqrt(0.5);
-    for (i = 0; i < n4; i++)
-	fft_tbl_long->st[n2 - i] = fft_tbl_long->st[i];
-    for (i = 0; i < n2 + n4; i++)
-	fft_tbl_long->st[i + n2] = -fft_tbl_long->st[i];
-
-    /* generating sin table (short) */
-    n = BLOCK_LEN_SHORT * 2;
-    n2 = n/2;  
-    n4 = n2/2;  
-    n8 = n4/2;
-
-    t = sin(M_PI / (double)n);
-    dc = 2*t*t;
-    ds = sqrt(dc * (2.0 - dc));
-    t = 2*dc;
-    c = fft_tbl_short->st[n4] = 1.0;
-    s = fft_tbl_short->st[0] = 0;
-
-    for(i = 1; i < n8; i++){
-		c -= dc;  dc += t * c;
-		s += ds;  ds -= t * s;
-		fft_tbl_short->st[i] = s;  fft_tbl_short->st[n4 - i] = c;
-    }
-    if (n8 != 0) fft_tbl_short->st[n8] = sqrt(0.5);
-    for (i = 0; i < n4; i++)
-		fft_tbl_short->st[n2 - i] = fft_tbl_short->st[i];
-    for (i = 0; i < n2 + n4; i++)
-		fft_tbl_short->st[i + n2] = - fft_tbl_short->st[i];
-
-    /* generating bit inverse table (long) */
-    n = BLOCK_LEN_LONG * 2;
-    n2 = n/2; i = j = 0;
-
-    for(;;){
-		fft_tbl_long->brt[i] = j;
-		if( ++i >= n ) break;
-		k = n2;
-		while(k <= j){
-			j -= k;
-			k /= 2;
-		}
-		j += k;
-    }
-
-    /* generating bit inverse table (short) */
-    n = BLOCK_LEN_SHORT * 2;
-    n2 = n/2; i = j = 0;
-
-    for(;;){
-	fft_tbl_short->brt[i] = j;
-	if( ++i >= n ) break;
-	k = n2;
-	while(k <= j){
-	    j -= k;
-	    k /= 2;
-	}
-	j += k;
-    }
+MakeFFTOrder();
 }
 /* added by T. Okada (1997.07.10) end */
 
@@ -683,7 +607,7 @@
 
 		psy_step11andahalf(part_tbl_long, part_tbl_short, psy_stvar_long, psy_stvar_short, no_of_chan);
 
-		psy_step12(part_tbl_long, part_tbl_short, &psy_stvar_long[no_of_chan], &psy_stvar_short[no_of_chan], 
+		psy_step12(part_tbl_long, part_tbl_short, &psy_stvar_long[no_of_chan], &psy_stvar_short[no_of_chan],
 			&psy_var_long, &psy_var_short, ch);
 		psy_step13(&psy_var_long, block_type, ch);
 		psy_step14(p_sri, part_tbl_long, part_tbl_short, &psy_stvar_long[no_of_chan], 
@@ -714,7 +638,7 @@
 
 void psy_step1(double* p_time_signal[], 
 	       double sample[][BLOCK_LEN_LONG*2], 
-	       int ch) 
+	       int ch)
 {
 	int i;
 
@@ -724,8 +648,8 @@
 	}
 }
 
-void psy_step2(double sample[][BLOCK_LEN_LONG*2], 
-               PSY_STATVARIABLE_LONG *psy_stvar_long, 
+void psy_step2(double sample[][BLOCK_LEN_LONG*2],
+               PSY_STATVARIABLE_LONG *psy_stvar_long,
                PSY_STATVARIABLE_SHORT *psy_stvar_short,
 	       FFT_TABLE_LONG *fft_tbl_long,
 	       FFT_TABLE_SHORT *fft_tbl_short,
@@ -732,66 +656,41 @@
 	       int ch
 	       )
 {
-    int w,i,j,k,l,h,n,d,ik,k2,n4;
-    double t,s,c,dx,dy;
-	double *xl,*yl;
+    int w,i,l,unscambled;
+    double t_re,t_im;
 
     /* FFT for long */
-	xl = (double *)malloc( sizeof(double) * BLOCK_LEN_LONG * 2 );
-	yl = (double *)malloc( sizeof(double) * BLOCK_LEN_LONG * 2 );
-
     psy_stvar_long->p_fft += BLOCK_LEN_LONG;
 
     if(psy_stvar_long->p_fft == BLOCK_LEN_LONG * 3)
 		psy_stvar_long->p_fft = 0;
 
-    /* window *//* static int it = 0; */
+    /* windowing */
     for(i = 0; i < BLOCK_LEN_LONG*2; i++){
-		xl[i] = fft_tbl_long->hw[i] * sample[ch][i];
-		yl[i] = 0.0;
+		FFTarray[i].re = fft_tbl_long->hw[i] * sample[ch][i];
+		FFTarray[i].im = 0.0;
     }
 
-    n = BLOCK_LEN_LONG*2;
-    n4 = n/4;
+    pfftw_d_2048(FFTarray);
 
-    for (i = 0; i < n; i++) {    /* bit inverse */
-		j = fft_tbl_long->brt[i];
-		if (i < j) {
-			t = xl[i];  xl[i] = xl[j];  xl[j] = t;
-			t = yl[i];  yl[i] = yl[j];  yl[j] = t;
-		}
-    }
-    for (k = 1; k < n; k = k2) {    /* translation */
-		h = 0;  k2 = k + k;  d = n / k2;
-		for (j = 0; j < k; j++) {
-			c = fft_tbl_long->st[h + n4];
-			s = fft_tbl_long->st[h];
-			for (i = j; i < n; i += k2) {
-				ik = i + k;
-				dx = s * yl[ik] + c * xl[ik];
-				dy = c * yl[ik] - s * xl[ik];
-				xl[ik] = xl[i] - dx;  xl[i] += dx;
-				yl[ik] = yl[i] - dy;  yl[i] += dy;
-			}
-			h += d;
-		}
-    }
+        for(w = 0; w < BLOCK_LEN_LONG; w++){
+ 		unscambled = unscambled2048[w];
+                t_re = FFTarray[unscambled].re;
+                t_im = FFTarray[unscambled].im;
+		psy_stvar_long->fft_r[w+psy_stvar_long->p_fft]
+			= sqrt(t_re*t_re + t_im*t_im);
 
-    for(w = 0; w < BLOCK_LEN_LONG; w++){
-		psy_stvar_long->fft_r[w+psy_stvar_long->p_fft] 
-			= sqrt(xl[w]*xl[w] + yl[w]*yl[w]);
-
-		if( xl[w] > 0.0 ){
-			if( yl[w] >= 0.0 )
-				psy_stvar_long->fft_f[w+psy_stvar_long->p_fft] = atan( yl[w] / xl[w] );
+		if( t_re > 0.0 ){
+			if( t_im >= 0.0 )
+				psy_stvar_long->fft_f[w+psy_stvar_long->p_fft] = atan( t_im / t_re );
 			else
-				psy_stvar_long->fft_f[w+psy_stvar_long->p_fft] = atan( yl[w] / xl[w] )+ M_PI * 2.0;
-		} else if( xl[w] < 0.0 ) {
-			psy_stvar_long->fft_f[w+psy_stvar_long->p_fft] = atan( yl[w] / xl[w] ) + M_PI;
+				psy_stvar_long->fft_f[w+psy_stvar_long->p_fft] = atan( t_im / t_re )+ M_PI * 2.0;
+		} else if( t_re < 0.0 ) {
+			psy_stvar_long->fft_f[w+psy_stvar_long->p_fft] = atan( t_im / t_re ) + M_PI;
 		} else {
-			if( yl[w] > 0.0 )
+			if( t_im > 0.0 )
 				psy_stvar_long->fft_f[w+psy_stvar_long->p_fft] = M_PI * 0.5;
-			else if( yl[w] < 0.0 )
+			else if( t_im < 0.0 )
 				psy_stvar_long->fft_f[w+psy_stvar_long->p_fft] = M_PI * 1.5;
 			else
 				psy_stvar_long->fft_f[w+psy_stvar_long->p_fft] = 0.0; /* tmp */
@@ -798,64 +697,36 @@
 		}
     }
 
-	if (xl) free(xl);
-	if (yl) free(yl);
-
-
-	/* added by T. Araki (1997.10.16) */
 	/* FFT for short */
-	xl = (double *)malloc( sizeof(double) * BLOCK_LEN_SHORT * 2 );
-	yl = (double *)malloc( sizeof(double) * BLOCK_LEN_SHORT * 2 );
 
 	for(l = 0; l < MAX_SHORT_WINDOWS; l++){
 
-        /* window */        
+        /* windowing */
         for(i = 0; i < BLOCK_LEN_SHORT*2; i++){
-			xl[i] = fft_tbl_short->hw[i] * sample[ch][/*OFFSET_FOR_SHORT +*/ BLOCK_LEN_SHORT * l + i];
-			yl[i] = 0.0;
+			FFTarray[i].re = fft_tbl_short->hw[i] * sample[ch][/*OFFSET_FOR_SHORT +*/ BLOCK_LEN_SHORT * l + i];
+			FFTarray[i].im = 0.0;
 		}
 
-		n = BLOCK_LEN_SHORT*2;
-		n4 = n/4;
+                pfftw_d_256(FFTarray);
 
-		for (i = 0; i < n; i++) {    /* bit inverse */
-			j = fft_tbl_short->brt[i];
-			if (i < j) {
-				t = xl[i];  xl[i] = xl[j];  xl[j] = t;
-				t = yl[i];  yl[i] = yl[j];  yl[j] = t;
-			}
-		}
-		for (k = 1; k < n; k = k2) {    /* translation */
-			h = 0;  k2 = k + k;  d = n / k2;
-			for (j = 0; j < k; j++) {
-				c = fft_tbl_short->st[h + n4];
-				s = fft_tbl_short->st[h];
-				for (i = j; i < n; i += k2) {
-					ik = i + k;
-					dx = s * yl[ik] + c * xl[ik];
-					dy = c * yl[ik] - s * xl[ik];
-					xl[ik] = xl[i] - dx;  xl[i] += dx;
-					yl[ik] = yl[i] - dy;  yl[i] += dy;
-				}
-				h += d;
-			}
-		}
-
 		for(w = 0; w < BLOCK_LEN_SHORT; w++){
-			psy_stvar_short->fft_r[l][w] 
-				= sqrt(xl[w]*xl[w] + yl[w]*yl[w]);
+         		unscambled = unscambled256[w];
+                        t_re = FFTarray[unscambled].re;
+                        t_im = FFTarray[unscambled].im;
+			psy_stvar_short->fft_r[l][w]
+				= sqrt(t_re*t_re + t_im*t_im);
 
-			if( xl[w] > 0.0 ){
-				if( yl[w] >= 0.0 )
-					psy_stvar_short->fft_f[l][w] = atan( yl[w] / xl[w] );
+			if( t_re > 0.0 ){
+				if( t_im >= 0.0 )
+					psy_stvar_short->fft_f[l][w] = atan( t_im / t_re );
 				else
-					psy_stvar_short->fft_f[l][w] = atan( yl[w] / xl[w] )+ M_PI * 2.0;
-			} else if( xl[w] < 0.0 ) {
-				psy_stvar_short->fft_f[l][w] = atan( yl[w] / xl[w] ) + M_PI;
+					psy_stvar_short->fft_f[l][w] = atan( t_im / t_re )+ M_PI * 2.0;
+			} else if( t_re < 0.0 ) {
+				psy_stvar_short->fft_f[l][w] = atan( t_im / t_re ) + M_PI;
 			} else {
-				if( yl[w] > 0.0 )
+				if( t_im > 0.0 )
 					psy_stvar_short->fft_f[l][w] = M_PI * 0.5;
-				else if( yl[w] < 0.0 )
+				else if( t_im < 0.0 )
 					psy_stvar_short->fft_f[l][w] = M_PI * 1.5;
 				else
 					psy_stvar_short->fft_f[l][w] = 0.0; /* tmp */
@@ -862,16 +733,12 @@
 			}
 		}
     }
-
-	if (xl) free(xl);
-	if (yl) free(yl);
-	/* added by T. Araki (1997.10.16) end */
 }
 
-void psy_step3(PSY_STATVARIABLE_LONG *psy_stvar_long, 
-               PSY_STATVARIABLE_SHORT *psy_stvar_short, 
-               PSY_VARIABLE_LONG *psy_var_long, 
-               PSY_VARIABLE_SHORT *psy_var_short, 
+void psy_step3(PSY_STATVARIABLE_LONG *psy_stvar_long,
+               PSY_STATVARIABLE_SHORT *psy_stvar_short,
+               PSY_VARIABLE_LONG *psy_var_long,
+               PSY_VARIABLE_SHORT *psy_var_short,
                int ch
 	       )
 {
@@ -916,7 +783,7 @@
 
 void psy_step4(PSY_STATVARIABLE_LONG *psy_stvar_long,
                PSY_STATVARIABLE_SHORT *psy_stvar_short,
-	       PSY_VARIABLE_LONG *psy_var_long, 
+	       PSY_VARIABLE_LONG *psy_var_long,
 	       PSY_VARIABLE_SHORT *psy_var_short,
 	       int ch
 	       )
@@ -929,7 +796,7 @@
 		f = psy_stvar_long->fft_f[psy_stvar_long->p_fft+w];
 		rp = psy_var_long->r_pred[w];
 		fp = psy_var_long->f_pred[w];
-		
+
 		if( r + fabs(rp) != 0.0 )
 			psy_var_long->c[w] = sqrt( psy_sqr(r*cos(f) - rp*cos(fp))
 				+psy_sqr(r*sin(f) - rp*sin(fp)) )/ ( r + fabs(rp) ) ;
@@ -944,7 +811,7 @@
 			f = psy_stvar_short->fft_f[i][w];
 			rp = psy_var_short->r_pred[i][w];
 			fp = psy_var_short->f_pred[i][w];
-			
+
 			if( r + fabs(rp) != 0.0 )
 				psy_var_short->c[i][w] = sqrt( psy_sqr(r*cos(f) - rp*cos(fp))
 					+psy_sqr(r*sin(f) - rp*sin(fp)) )/ ( r + fabs(rp) ) ;
--- a/transfo.c
+++ b/transfo.c
@@ -1,10 +1,7 @@
 #include <math.h>
 #include "transfo.h"
 
-fftw_complex_d FFTarray[512];    /* the array for in-place FFT */
-extern int unscambled64[64];    /* the permutation array for FFT64*/
-extern int unscambled512[512];  /* the permutation array for FFT512*/
-
+fftw_complex_d FFTarray[2048];    /* the array for in-place FFT */
 #ifndef M_PI
 #define M_PI        3.14159265358979323846
 #endif
@@ -19,26 +16,20 @@
 
 void MDCT (double *data, int N) {
 
-    static int init = 1;
     double tempr, tempi, c, s, cold, cfreq, sfreq; /* temps for pre and post twiddle */
     double freq = 2.0 * M_PI / N;
     double fac,cosfreq8,sinfreq8;
     int i, n;
-	int isign = 1;
-	int b = N >> 1;
-	int N4 = N >> 2;
-	int N2 = N >> 1;
+    int isign = 1;
+    int b = N >> 1;
+    int N4 = N >> 2;
+    int N2 = N >> 1;
     int a = N - b;
-	int a2 = a >> 1;
-	int a4 = a >> 2;
-	int b4 = b >> 2;
-	int unscambled;
-
-	if (init) {
-		init = 0;
-		MakeFFTOrder();
-	}
-
+    int a2 = a >> 1;
+    int a4 = a >> 2;
+    int b4 = b >> 2;
+    int unscambled;
+    
     /* Choosing to allocate 2/N factor to Inverse Xform! */
     fac = 2.; /* 2 from MDCT inverse  to forward */
 
@@ -45,14 +36,14 @@
     /* prepare for recurrence relation in pre-twiddle */
     cfreq = cos (freq);
     sfreq = sin (freq);
-	cosfreq8 = cos (freq * 0.125);
-	sinfreq8 = sin (freq * 0.125);
+    cosfreq8 = cos (freq * 0.125);
+    sinfreq8 = sin (freq * 0.125);
     c = cosfreq8;
     s = sinfreq8;
 
     for (i = 0; i < N4; i++) {
 		/* calculate real and imaginary parts of g(n) or G(p) */
-		
+
 		n = N / 2 - 1 - 2 * i;
 		if (i < b4) {
 			tempr = data [a2 + n] + data [N + a2 - 1 - n]; /* use second form of e(n) for n = N / 2 - 1 - 2i */
@@ -69,13 +60,13 @@
 		/* calculate pre-twiddled FFT input */
 		FFTarray [i].re = tempr * c + tempi * s;
 		FFTarray [i].im = tempi * c - tempr * s;
-		
+
 		/* use recurrence to prepare cosine and sine for next value of i */
 		cold = c;
 		c = c * cfreq - s * sfreq;
 		s = s * cfreq + cold * sfreq;
     }
-    
+
     /* Perform in-place complex FFT of length N/4 */
     switch (N) {
 	case 256: pfftw_d_64(FFTarray);
@@ -86,28 +77,29 @@
     /* prepare for recurrence relations in post-twiddle */
     c = cosfreq8;
     s = sinfreq8;
-    
+
     /* post-twiddle FFT output and then get output data */
     for (i = 0; i < N4; i++) {
-		
+
 		/* get post-twiddled FFT output  */
 		/* Note: fac allocates 4/N factor from IFFT to forward and inverse */
 	switch (N) {
-	case 256: 
+	case 256:
 		unscambled = unscambled64[i];
 		break;
-	case 2048: 
+	case 2048:
 		unscambled = unscambled512[i];
 	}
 	tempr = fac * (FFTarray [unscambled].re * c + FFTarray [unscambled].im * s);
 	tempi = fac * (FFTarray [unscambled].im * c - FFTarray [unscambled].re * s);
 
+
 		/* fill in output values */
 		data [2 * i] = -tempr;   /* first half even */
 		data [N2 - 1 - 2 * i] = tempi;  /* first half odd */
 		data [N2 + 2 * i] = -tempi;  /* second half even */
 		data [N - 1 - 2 * i] = tempr;  /* second half odd */
-		
+
 		/* use recurrence to prepare cosine and sine for next value of i */
 		cold = c;
 		c = c * cfreq - s * sfreq;
@@ -114,3 +106,4 @@
 		s = s * cfreq + cold * sfreq;
     }
 }
+
--- a/transfo.h
+++ b/transfo.h
@@ -19,9 +19,16 @@
 DEFINE_PFFTW(32)
 DEFINE_PFFTW(64)
 DEFINE_PFFTW(128)
+DEFINE_PFFTW(256)
 DEFINE_PFFTW(512)
+DEFINE_PFFTW(2048)
 
 void MakeFFTOrder(void);
+void MakeFFT2Order(void);
+extern int unscambled64[64];    /* the permutation array for FFT64*/
+extern int unscambled256[256];    /* the permutation array for FFT256*/
+extern int unscambled512[512];  /* the permutation array for FFT512*/
+extern int unscambled2048[2048];    /* the permutation array for FFT2048*/
+extern fftw_complex_d FFTarray[2048];    /* the array for in-place FFT */
 
 #endif
-