From 416bd737074a287ea47106c73ea6bcfde40a75a8 Mon Sep 17 00:00:00 2001 From: John Glover Date: Fri, 24 Jun 2011 18:17:23 +0100 Subject: Change to using distutils. Currently only builds the simplsndobj module --- src/mq/mq.cpp | 473 ++++++ src/mq/mq.h | 67 + src/sms/OOURA.c | 638 ++++++++ src/sms/OOURA.h | 23 + src/sms/SFMT.c | 621 ++++++++ src/sms/SFMT.h | 157 ++ src/sms/SFMT/SFMT-params.h | 97 ++ src/sms/SFMT/SFMT-params11213.h | 46 + src/sms/SFMT/SFMT-params1279.h | 46 + src/sms/SFMT/SFMT-params132049.h | 46 + src/sms/SFMT/SFMT-params19937.h | 46 + src/sms/SFMT/SFMT-params216091.h | 46 + src/sms/SFMT/SFMT-params2281.h | 46 + src/sms/SFMT/SFMT-params4253.h | 46 + src/sms/SFMT/SFMT-params44497.h | 46 + src/sms/SFMT/SFMT-params607.h | 46 + src/sms/SFMT/SFMT-params86243.h | 46 + src/sms/analysis.c | 563 +++++++ src/sms/cepstrum.c | 259 ++++ src/sms/fileIO.c | 559 +++++++ src/sms/filters.c | 190 +++ src/sms/fixTracks.c | 259 ++++ src/sms/harmDetection.c | 390 +++++ src/sms/modify.c | 215 +++ src/sms/peakContinuation.c | 481 ++++++ src/sms/peakDetection.c | 202 +++ src/sms/residual.c | 76 + src/sms/sineSynth.c | 190 +++ src/sms/sms.c | 1132 ++++++++++++++ src/sms/sms.h | 723 +++++++++ src/sms/sms.i | 540 +++++++ src/sms/soundIO.c | 54 + src/sms/spectralApprox.c | 152 ++ src/sms/spectrum.c | 264 ++++ src/sms/stocAnalysis.c | 55 + src/sms/synthesis.c | 260 ++++ src/sms/tables.c | 162 ++ src/sms/transforms.c | 57 + src/sms/windows.c | 280 ++++ src/sndobj/AdSyn.cpp | 126 ++ src/sndobj/AdSyn.h | 40 + src/sndobj/FFT.cpp | 265 ++++ src/sndobj/FFT.h | 93 ++ src/sndobj/HammingTable.cpp | 99 ++ src/sndobj/HammingTable.h | 49 + src/sndobj/HarmTable.cpp | 160 ++ src/sndobj/HarmTable.h | 64 + src/sndobj/IFAdd.cpp | 116 ++ src/sndobj/IFAdd.h | 46 + src/sndobj/IFFT.cpp | 262 ++++ src/sndobj/IFFT.h | 88 ++ src/sndobj/IFGram.cpp | 212 +++ src/sndobj/IFGram.h | 68 + src/sndobj/PVA.cpp | 165 ++ src/sndobj/PVA.h | 66 + src/sndobj/PVS.cpp | 168 ++ src/sndobj/PVS.h | 67 + src/sndobj/ReSyn.cpp | 179 +++ src/sndobj/ReSyn.h | 50 + src/sndobj/SinAnal.cpp | 878 +++++++++++ src/sndobj/SinAnal.h | 98 ++ src/sndobj/SinSyn.cpp | 268 ++++ src/sndobj/SinSyn.h | 69 + src/sndobj/SndIO.cpp | 154 ++ src/sndobj/SndIO.h | 139 ++ src/sndobj/SndObj.cpp | 254 +++ src/sndobj/SndObj.h | 285 ++++ src/sndobj/Table.h | 62 + src/sndobj/rfftw/cfft.c | 939 ++++++++++++ src/sndobj/rfftw/config.c | 164 ++ src/sndobj/rfftw/config.h | 170 ++ src/sndobj/rfftw/executor.c | 465 ++++++ src/sndobj/rfftw/f77_func.h | 61 + src/sndobj/rfftw/fcr_1.c | 59 + src/sndobj/rfftw/fcr_10.c | 154 ++ src/sndobj/rfftw/fcr_11.c | 123 ++ src/sndobj/rfftw/fcr_12.c | 168 ++ src/sndobj/rfftw/fcr_128.c | 2564 +++++++++++++++++++++++++++++++ src/sndobj/rfftw/fcr_13.c | 273 ++++ src/sndobj/rfftw/fcr_14.c | 175 +++ src/sndobj/rfftw/fcr_15.c | 226 +++ src/sndobj/rfftw/fcr_16.c | 226 +++ src/sndobj/rfftw/fcr_2.c | 62 + src/sndobj/rfftw/fcr_3.c | 71 + src/sndobj/rfftw/fcr_32.c | 490 ++++++ src/sndobj/rfftw/fcr_4.c | 80 + src/sndobj/rfftw/fcr_5.c | 93 ++ src/sndobj/rfftw/fcr_6.c | 95 ++ src/sndobj/rfftw/fcr_64.c | 1111 ++++++++++++++ src/sndobj/rfftw/fcr_7.c | 96 ++ src/sndobj/rfftw/fcr_8.c | 119 ++ src/sndobj/rfftw/fcr_9.c | 155 ++ src/sndobj/rfftw/fftw-int.h | 500 ++++++ src/sndobj/rfftw/fftw.h | 425 +++++ src/sndobj/rfftw/fftwnd.c | 780 ++++++++++ src/sndobj/rfftw/fhb_10.c | 581 +++++++ src/sndobj/rfftw/fhb_16.c | 976 ++++++++++++ src/sndobj/rfftw/fhb_2.c | 106 ++ src/sndobj/rfftw/fhb_3.c | 158 ++ src/sndobj/rfftw/fhb_32.c | 2303 ++++++++++++++++++++++++++++ src/sndobj/rfftw/fhb_4.c | 193 +++ src/sndobj/rfftw/fhb_5.c | 276 ++++ src/sndobj/rfftw/fhb_6.c | 301 ++++ src/sndobj/rfftw/fhb_7.c | 320 ++++ src/sndobj/rfftw/fhb_8.c | 415 +++++ src/sndobj/rfftw/fhb_9.c | 564 +++++++ src/sndobj/rfftw/fhf_10.c | 561 +++++++ src/sndobj/rfftw/fhf_16.c | 975 ++++++++++++ src/sndobj/rfftw/fhf_2.c | 108 ++ src/sndobj/rfftw/fhf_3.c | 150 ++ src/sndobj/rfftw/fhf_32.c | 2312 ++++++++++++++++++++++++++++ src/sndobj/rfftw/fhf_4.c | 185 +++ src/sndobj/rfftw/fhf_5.c | 268 ++++ src/sndobj/rfftw/fhf_6.c | 299 ++++ src/sndobj/rfftw/fhf_7.c | 325 ++++ src/sndobj/rfftw/fhf_8.c | 415 +++++ src/sndobj/rfftw/fhf_9.c | 525 +++++++ src/sndobj/rfftw/fn_1.c | 62 + src/sndobj/rfftw/fn_10.c | 281 ++++ src/sndobj/rfftw/fn_11.c | 242 +++ src/sndobj/rfftw/fn_12.c | 322 ++++ src/sndobj/rfftw/fn_13.c | 526 +++++++ src/sndobj/rfftw/fn_14.c | 355 +++++ src/sndobj/rfftw/fn_15.c | 446 ++++++ src/sndobj/rfftw/fn_16.c | 439 ++++++ src/sndobj/rfftw/fn_2.c | 68 + src/sndobj/rfftw/fn_3.c | 91 ++ src/sndobj/rfftw/fn_32.c | 1042 +++++++++++++ src/sndobj/rfftw/fn_4.c | 102 ++ src/sndobj/rfftw/fn_5.c | 146 ++ src/sndobj/rfftw/fn_6.c | 157 ++ src/sndobj/rfftw/fn_64.c | 2449 +++++++++++++++++++++++++++++ src/sndobj/rfftw/fn_7.c | 170 ++ src/sndobj/rfftw/fn_8.c | 201 +++ src/sndobj/rfftw/fn_9.c | 275 ++++ src/sndobj/rfftw/fni_1.c | 62 + src/sndobj/rfftw/fni_10.c | 281 ++++ src/sndobj/rfftw/fni_11.c | 242 +++ src/sndobj/rfftw/fni_12.c | 322 ++++ src/sndobj/rfftw/fni_13.c | 526 +++++++ src/sndobj/rfftw/fni_14.c | 355 +++++ src/sndobj/rfftw/fni_15.c | 446 ++++++ src/sndobj/rfftw/fni_16.c | 439 ++++++ src/sndobj/rfftw/fni_2.c | 68 + src/sndobj/rfftw/fni_3.c | 91 ++ src/sndobj/rfftw/fni_32.c | 1042 +++++++++++++ src/sndobj/rfftw/fni_4.c | 102 ++ src/sndobj/rfftw/fni_5.c | 146 ++ src/sndobj/rfftw/fni_6.c | 157 ++ src/sndobj/rfftw/fni_64.c | 2449 +++++++++++++++++++++++++++++ src/sndobj/rfftw/fni_7.c | 170 ++ src/sndobj/rfftw/fni_8.c | 201 +++ src/sndobj/rfftw/fni_9.c | 275 ++++ src/sndobj/rfftw/frc_1.c | 59 + src/sndobj/rfftw/frc_10.c | 150 ++ src/sndobj/rfftw/frc_11.c | 125 ++ src/sndobj/rfftw/frc_12.c | 164 ++ src/sndobj/rfftw/frc_128.c | 2574 +++++++++++++++++++++++++++++++ src/sndobj/rfftw/frc_13.c | 271 ++++ src/sndobj/rfftw/frc_14.c | 171 +++ src/sndobj/rfftw/frc_15.c | 233 +++ src/sndobj/rfftw/frc_16.c | 218 +++ src/sndobj/rfftw/frc_2.c | 62 + src/sndobj/rfftw/frc_3.c | 69 + src/sndobj/rfftw/frc_32.c | 476 ++++++ src/sndobj/rfftw/frc_4.c | 72 + src/sndobj/rfftw/frc_5.c | 92 ++ src/sndobj/rfftw/frc_6.c | 95 ++ src/sndobj/rfftw/frc_64.c | 1109 ++++++++++++++ src/sndobj/rfftw/frc_7.c | 98 ++ src/sndobj/rfftw/frc_8.c | 114 ++ src/sndobj/rfftw/frc_9.c | 146 ++ src/sndobj/rfftw/ftw_10.c | 375 +++++ src/sndobj/rfftw/ftw_16.c | 611 ++++++++ src/sndobj/rfftw/ftw_2.c | 86 ++ src/sndobj/rfftw/ftw_3.c | 120 ++ src/sndobj/rfftw/ftw_32.c | 1384 +++++++++++++++++ src/sndobj/rfftw/ftw_4.c | 142 ++ src/sndobj/rfftw/ftw_5.c | 194 +++ src/sndobj/rfftw/ftw_6.c | 219 +++ src/sndobj/rfftw/ftw_64.c | 3146 ++++++++++++++++++++++++++++++++++++++ src/sndobj/rfftw/ftw_7.c | 243 +++ src/sndobj/rfftw/ftw_8.c | 285 ++++ src/sndobj/rfftw/ftw_9.c | 370 +++++ src/sndobj/rfftw/ftwi_10.c | 375 +++++ src/sndobj/rfftw/ftwi_16.c | 611 ++++++++ src/sndobj/rfftw/ftwi_2.c | 86 ++ src/sndobj/rfftw/ftwi_3.c | 120 ++ src/sndobj/rfftw/ftwi_32.c | 1384 +++++++++++++++++ src/sndobj/rfftw/ftwi_4.c | 142 ++ src/sndobj/rfftw/ftwi_5.c | 194 +++ src/sndobj/rfftw/ftwi_6.c | 219 +++ src/sndobj/rfftw/ftwi_64.c | 3146 ++++++++++++++++++++++++++++++++++++++ src/sndobj/rfftw/ftwi_7.c | 243 +++ src/sndobj/rfftw/ftwi_8.c | 285 ++++ src/sndobj/rfftw/ftwi_9.c | 370 +++++ src/sndobj/rfftw/generic.c | 102 ++ src/sndobj/rfftw/malloc.c | 245 +++ src/sndobj/rfftw/planner.c | 480 ++++++ src/sndobj/rfftw/putils.c | 560 +++++++ src/sndobj/rfftw/rader.c | 370 +++++ src/sndobj/rfftw/rconfig.c | 181 +++ src/sndobj/rfftw/rexec.c | 535 +++++++ src/sndobj/rfftw/rexec2.c | 232 +++ src/sndobj/rfftw/rfftw.h | 99 ++ src/sndobj/rfftw/rfftwf77.c | 130 ++ src/sndobj/rfftw/rfftwnd.c | 570 +++++++ src/sndobj/rfftw/rgeneric.c | 188 +++ src/sndobj/rfftw/rplanner.c | 471 ++++++ src/sndobj/rfftw/timer.c | 164 ++ src/sndobj/rfftw/twiddle.c | 223 +++ src/sndobj/rfftw/wisdom.c | 317 ++++ src/sndobj/rfftw/wisdomio.c | 104 ++ 213 files changed, 76716 insertions(+) create mode 100644 src/mq/mq.cpp create mode 100644 src/mq/mq.h create mode 100644 src/sms/OOURA.c create mode 100644 src/sms/OOURA.h create mode 100644 src/sms/SFMT.c create mode 100644 src/sms/SFMT.h create mode 100644 src/sms/SFMT/SFMT-params.h create mode 100644 src/sms/SFMT/SFMT-params11213.h create mode 100644 src/sms/SFMT/SFMT-params1279.h create mode 100644 src/sms/SFMT/SFMT-params132049.h create mode 100644 src/sms/SFMT/SFMT-params19937.h create mode 100644 src/sms/SFMT/SFMT-params216091.h create mode 100644 src/sms/SFMT/SFMT-params2281.h create mode 100644 src/sms/SFMT/SFMT-params4253.h create mode 100644 src/sms/SFMT/SFMT-params44497.h create mode 100644 src/sms/SFMT/SFMT-params607.h create mode 100644 src/sms/SFMT/SFMT-params86243.h create mode 100644 src/sms/analysis.c create mode 100644 src/sms/cepstrum.c create mode 100644 src/sms/fileIO.c create mode 100644 src/sms/filters.c create mode 100644 src/sms/fixTracks.c create mode 100644 src/sms/harmDetection.c create mode 100644 src/sms/modify.c create mode 100644 src/sms/peakContinuation.c create mode 100644 src/sms/peakDetection.c create mode 100644 src/sms/residual.c create mode 100644 src/sms/sineSynth.c create mode 100644 src/sms/sms.c create mode 100644 src/sms/sms.h create mode 100644 src/sms/sms.i create mode 100644 src/sms/soundIO.c create mode 100644 src/sms/spectralApprox.c create mode 100644 src/sms/spectrum.c create mode 100644 src/sms/stocAnalysis.c create mode 100644 src/sms/synthesis.c create mode 100644 src/sms/tables.c create mode 100644 src/sms/transforms.c create mode 100644 src/sms/windows.c create mode 100644 src/sndobj/AdSyn.cpp create mode 100644 src/sndobj/AdSyn.h create mode 100644 src/sndobj/FFT.cpp create mode 100644 src/sndobj/FFT.h create mode 100644 src/sndobj/HammingTable.cpp create mode 100644 src/sndobj/HammingTable.h create mode 100644 src/sndobj/HarmTable.cpp create mode 100644 src/sndobj/HarmTable.h create mode 100644 src/sndobj/IFAdd.cpp create mode 100644 src/sndobj/IFAdd.h create mode 100644 src/sndobj/IFFT.cpp create mode 100644 src/sndobj/IFFT.h create mode 100644 src/sndobj/IFGram.cpp create mode 100644 src/sndobj/IFGram.h create mode 100644 src/sndobj/PVA.cpp create mode 100644 src/sndobj/PVA.h create mode 100644 src/sndobj/PVS.cpp create mode 100644 src/sndobj/PVS.h create mode 100644 src/sndobj/ReSyn.cpp create mode 100644 src/sndobj/ReSyn.h create mode 100644 src/sndobj/SinAnal.cpp create mode 100644 src/sndobj/SinAnal.h create mode 100644 src/sndobj/SinSyn.cpp create mode 100644 src/sndobj/SinSyn.h create mode 100644 src/sndobj/SndIO.cpp create mode 100644 src/sndobj/SndIO.h create mode 100644 src/sndobj/SndObj.cpp create mode 100644 src/sndobj/SndObj.h create mode 100644 src/sndobj/Table.h create mode 100644 src/sndobj/rfftw/cfft.c create mode 100644 src/sndobj/rfftw/config.c create mode 100644 src/sndobj/rfftw/config.h create mode 100644 src/sndobj/rfftw/executor.c create mode 100644 src/sndobj/rfftw/f77_func.h create mode 100644 src/sndobj/rfftw/fcr_1.c create mode 100644 src/sndobj/rfftw/fcr_10.c create mode 100644 src/sndobj/rfftw/fcr_11.c create mode 100644 src/sndobj/rfftw/fcr_12.c create mode 100644 src/sndobj/rfftw/fcr_128.c create mode 100644 src/sndobj/rfftw/fcr_13.c create mode 100644 src/sndobj/rfftw/fcr_14.c create mode 100644 src/sndobj/rfftw/fcr_15.c create mode 100644 src/sndobj/rfftw/fcr_16.c create mode 100644 src/sndobj/rfftw/fcr_2.c create mode 100644 src/sndobj/rfftw/fcr_3.c create mode 100644 src/sndobj/rfftw/fcr_32.c create mode 100644 src/sndobj/rfftw/fcr_4.c create mode 100644 src/sndobj/rfftw/fcr_5.c create mode 100644 src/sndobj/rfftw/fcr_6.c create mode 100644 src/sndobj/rfftw/fcr_64.c create mode 100644 src/sndobj/rfftw/fcr_7.c create mode 100644 src/sndobj/rfftw/fcr_8.c create mode 100644 src/sndobj/rfftw/fcr_9.c create mode 100644 src/sndobj/rfftw/fftw-int.h create mode 100644 src/sndobj/rfftw/fftw.h create mode 100644 src/sndobj/rfftw/fftwnd.c create mode 100644 src/sndobj/rfftw/fhb_10.c create mode 100644 src/sndobj/rfftw/fhb_16.c create mode 100644 src/sndobj/rfftw/fhb_2.c create mode 100644 src/sndobj/rfftw/fhb_3.c create mode 100644 src/sndobj/rfftw/fhb_32.c create mode 100644 src/sndobj/rfftw/fhb_4.c create mode 100644 src/sndobj/rfftw/fhb_5.c create mode 100644 src/sndobj/rfftw/fhb_6.c create mode 100644 src/sndobj/rfftw/fhb_7.c create mode 100644 src/sndobj/rfftw/fhb_8.c create mode 100644 src/sndobj/rfftw/fhb_9.c create mode 100644 src/sndobj/rfftw/fhf_10.c create mode 100644 src/sndobj/rfftw/fhf_16.c create mode 100644 src/sndobj/rfftw/fhf_2.c create mode 100644 src/sndobj/rfftw/fhf_3.c create mode 100644 src/sndobj/rfftw/fhf_32.c create mode 100644 src/sndobj/rfftw/fhf_4.c create mode 100644 src/sndobj/rfftw/fhf_5.c create mode 100644 src/sndobj/rfftw/fhf_6.c create mode 100644 src/sndobj/rfftw/fhf_7.c create mode 100644 src/sndobj/rfftw/fhf_8.c create mode 100644 src/sndobj/rfftw/fhf_9.c create mode 100644 src/sndobj/rfftw/fn_1.c create mode 100644 src/sndobj/rfftw/fn_10.c create mode 100644 src/sndobj/rfftw/fn_11.c create mode 100644 src/sndobj/rfftw/fn_12.c create mode 100644 src/sndobj/rfftw/fn_13.c create mode 100644 src/sndobj/rfftw/fn_14.c create mode 100644 src/sndobj/rfftw/fn_15.c create mode 100644 src/sndobj/rfftw/fn_16.c create mode 100644 src/sndobj/rfftw/fn_2.c create mode 100644 src/sndobj/rfftw/fn_3.c create mode 100644 src/sndobj/rfftw/fn_32.c create mode 100644 src/sndobj/rfftw/fn_4.c create mode 100644 src/sndobj/rfftw/fn_5.c create mode 100644 src/sndobj/rfftw/fn_6.c create mode 100644 src/sndobj/rfftw/fn_64.c create mode 100644 src/sndobj/rfftw/fn_7.c create mode 100644 src/sndobj/rfftw/fn_8.c create mode 100644 src/sndobj/rfftw/fn_9.c create mode 100644 src/sndobj/rfftw/fni_1.c create mode 100644 src/sndobj/rfftw/fni_10.c create mode 100644 src/sndobj/rfftw/fni_11.c create mode 100644 src/sndobj/rfftw/fni_12.c create mode 100644 src/sndobj/rfftw/fni_13.c create mode 100644 src/sndobj/rfftw/fni_14.c create mode 100644 src/sndobj/rfftw/fni_15.c create mode 100644 src/sndobj/rfftw/fni_16.c create mode 100644 src/sndobj/rfftw/fni_2.c create mode 100644 src/sndobj/rfftw/fni_3.c create mode 100644 src/sndobj/rfftw/fni_32.c create mode 100644 src/sndobj/rfftw/fni_4.c create mode 100644 src/sndobj/rfftw/fni_5.c create mode 100644 src/sndobj/rfftw/fni_6.c create mode 100644 src/sndobj/rfftw/fni_64.c create mode 100644 src/sndobj/rfftw/fni_7.c create mode 100644 src/sndobj/rfftw/fni_8.c create mode 100644 src/sndobj/rfftw/fni_9.c create mode 100644 src/sndobj/rfftw/frc_1.c create mode 100644 src/sndobj/rfftw/frc_10.c create mode 100644 src/sndobj/rfftw/frc_11.c create mode 100644 src/sndobj/rfftw/frc_12.c create mode 100644 src/sndobj/rfftw/frc_128.c create mode 100644 src/sndobj/rfftw/frc_13.c create mode 100644 src/sndobj/rfftw/frc_14.c create mode 100644 src/sndobj/rfftw/frc_15.c create mode 100644 src/sndobj/rfftw/frc_16.c create mode 100644 src/sndobj/rfftw/frc_2.c create mode 100644 src/sndobj/rfftw/frc_3.c create mode 100644 src/sndobj/rfftw/frc_32.c create mode 100644 src/sndobj/rfftw/frc_4.c create mode 100644 src/sndobj/rfftw/frc_5.c create mode 100644 src/sndobj/rfftw/frc_6.c create mode 100644 src/sndobj/rfftw/frc_64.c create mode 100644 src/sndobj/rfftw/frc_7.c create mode 100644 src/sndobj/rfftw/frc_8.c create mode 100644 src/sndobj/rfftw/frc_9.c create mode 100644 src/sndobj/rfftw/ftw_10.c create mode 100644 src/sndobj/rfftw/ftw_16.c create mode 100644 src/sndobj/rfftw/ftw_2.c create mode 100644 src/sndobj/rfftw/ftw_3.c create mode 100644 src/sndobj/rfftw/ftw_32.c create mode 100644 src/sndobj/rfftw/ftw_4.c create mode 100644 src/sndobj/rfftw/ftw_5.c create mode 100644 src/sndobj/rfftw/ftw_6.c create mode 100644 src/sndobj/rfftw/ftw_64.c create mode 100644 src/sndobj/rfftw/ftw_7.c create mode 100644 src/sndobj/rfftw/ftw_8.c create mode 100644 src/sndobj/rfftw/ftw_9.c create mode 100644 src/sndobj/rfftw/ftwi_10.c create mode 100644 src/sndobj/rfftw/ftwi_16.c create mode 100644 src/sndobj/rfftw/ftwi_2.c create mode 100644 src/sndobj/rfftw/ftwi_3.c create mode 100644 src/sndobj/rfftw/ftwi_32.c create mode 100644 src/sndobj/rfftw/ftwi_4.c create mode 100644 src/sndobj/rfftw/ftwi_5.c create mode 100644 src/sndobj/rfftw/ftwi_6.c create mode 100644 src/sndobj/rfftw/ftwi_64.c create mode 100644 src/sndobj/rfftw/ftwi_7.c create mode 100644 src/sndobj/rfftw/ftwi_8.c create mode 100644 src/sndobj/rfftw/ftwi_9.c create mode 100644 src/sndobj/rfftw/generic.c create mode 100644 src/sndobj/rfftw/malloc.c create mode 100644 src/sndobj/rfftw/planner.c create mode 100644 src/sndobj/rfftw/putils.c create mode 100644 src/sndobj/rfftw/rader.c create mode 100644 src/sndobj/rfftw/rconfig.c create mode 100644 src/sndobj/rfftw/rexec.c create mode 100644 src/sndobj/rfftw/rexec2.c create mode 100644 src/sndobj/rfftw/rfftw.h create mode 100644 src/sndobj/rfftw/rfftwf77.c create mode 100644 src/sndobj/rfftw/rfftwnd.c create mode 100644 src/sndobj/rfftw/rgeneric.c create mode 100644 src/sndobj/rfftw/rplanner.c create mode 100644 src/sndobj/rfftw/timer.c create mode 100644 src/sndobj/rfftw/twiddle.c create mode 100644 src/sndobj/rfftw/wisdom.c create mode 100644 src/sndobj/rfftw/wisdomio.c (limited to 'src') diff --git a/src/mq/mq.cpp b/src/mq/mq.cpp new file mode 100644 index 0000000..6ecba92 --- /dev/null +++ b/src/mq/mq.cpp @@ -0,0 +1,473 @@ +/* Copyright (c) 2010 John Glover, National University of Ireland, Maynooth + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "mq.h" + + +/* ------------------------------------------------------------------------- + * Initialisation and destruction + */ + +int init_mq(MQParameters* params) +{ + /* allocate memory for FFT */ + params->fft_in = (sample*) fftw_malloc(sizeof(sample) * params->frame_size); + params->fft_out = (fftw_complex*) fftw_malloc(sizeof(fftw_complex) * params->num_bins); + params->fft_plan = fftw_plan_dft_r2c_1d(params->frame_size, params->fft_in, + params->fft_out, FFTW_ESTIMATE); + /* set other variables to defaults */ + reset_mq(params); + return 0; +} + +void reset_mq(MQParameters* params) +{ + params->prev_peaks = NULL; +} + +int destroy_mq(MQParameters* params) +{ + if(params) + { + if(params->fft_in) free(params->fft_in); + if(params->fft_out) free(params->fft_out); + fftw_destroy_plan(params->fft_plan); + } + return 0; +} + +/* ------------------------------------------------------------------------- + * Peak Detection + */ + +/* Add new_peak to the doubly linked list of peaks, keeping peaks sorted + * with the largest amplitude peaks at the start of the list + */ +void add_peak(Peak* new_peak, PeakList* peak_list) +{ + do + { + if(peak_list->peak) + { + if(peak_list->peak->amplitude > new_peak->amplitude) + { + if(peak_list->next) + { + peak_list = peak_list->next; + } + else + { + PeakList* new_node = (PeakList*)malloc(sizeof(PeakList)); + new_node->peak = new_peak; + new_node->prev = peak_list; + new_node->next = NULL; + new_node->prev->next = new_node; + return; + } + } + else + { + PeakList* new_node = (PeakList*)malloc(sizeof(PeakList)); + new_node->peak = peak_list->peak; + new_node->prev = peak_list; + new_node->next = peak_list->next; + peak_list->next = new_node; + peak_list->peak = new_peak; + return; + } + } + else + { + /* should only happen for the first peak */ + peak_list->peak = new_peak; + return; + } + } + while(1); +} + +/* delete the given PeakList */ +void delete_peak_list(PeakList* peak_list) +{ + /* destroy list of peaks */ + while(peak_list && peak_list->next) + { + if(peak_list->peak) + { + free(peak_list->peak); + } + PeakList* temp = peak_list->next; + free(peak_list); + peak_list = temp; + } + free(peak_list); +} + +sample get_magnitude(sample x, sample y) +{ + return sqrt((x*x) + (y*y)); +} + +sample get_phase(sample x, sample y) +{ + return atan2(y, x); +} + +PeakList* find_peaks(int signal_size, sample* signal, MQParameters* params) +{ + int i; + int num_peaks = 0; + sample prev_amp, current_amp, next_amp; + PeakList* peak_list = (PeakList*)malloc(sizeof(PeakList)); + peak_list->next = NULL; + peak_list->prev = NULL; + peak_list->peak = NULL; + + /* take fft of the signal */ + memcpy(params->fft_in, signal, sizeof(sample)*params->frame_size); + hann_window(params->frame_size, params->fft_in); + fftw_execute(params->fft_plan); + + /* get initial magnitudes */ + prev_amp = get_magnitude(params->fft_out[0][0], params->fft_out[0][1]); + current_amp = get_magnitude(params->fft_out[1][0], params->fft_out[1][1]); + + /* find all peaks in the amplitude spectrum */ + for(i = 1; i < params->num_bins-1; i++) + { + next_amp = get_magnitude(params->fft_out[i+1][0], params->fft_out[i+1][1]); + + if((current_amp > prev_amp) && + (current_amp > next_amp) && + (current_amp > params->peak_threshold)) + { + /* create a new Peak */ + Peak* p = (Peak*)malloc(sizeof(Peak)); + p->amplitude = current_amp; + p->frequency = i * params->fundamental; + p->phase = get_phase(params->fft_out[i][0], params->fft_out[i][1]); + p->bin = i; + p->next = NULL; + p->prev = NULL; + + /* add it to the appropriate position in the list of Peaks */ + add_peak(p, peak_list); + num_peaks++; + } + prev_amp = current_amp; + current_amp = next_amp; + } + + /* limit peaks to a maximum of max_peaks + */ + if(num_peaks > params->max_peaks) + { + PeakList* current = peak_list; + for(i = 0; i < params->max_peaks-1; i++) + { + current = current->next; + } + + delete_peak_list(current->next); + current->next = NULL; + num_peaks = params->max_peaks; + } + + return sort_peaks_by_frequency(peak_list, num_peaks); +} + +/* ------------------------------------------------------------------------- + * Sorting + */ + +PeakList* merge(PeakList* list1, PeakList* list2) +{ + PeakList* merged_head = NULL; + PeakList* merged_tail; + + while(list1 || list2) + { + if(list1 && list2) + { + if(list1->peak->frequency <= list2->peak->frequency) + { + if(!merged_head) + { + merged_head = list1; + merged_tail = merged_head; + } + else + { + merged_tail->next = list1; + merged_tail = merged_tail->next; + } + list1 = list1->next; + merged_tail->next = NULL; + } + else + { + if(!merged_head) + { + merged_head = list2; + merged_tail = merged_head; + } + else + { + merged_tail->next = list2; + merged_tail = merged_tail->next; + } + list2 = list2->next; + merged_tail->next = NULL; + } + } + else if(list1) + { + if(!merged_head) + { + merged_head = list1; + merged_tail = merged_head; + } + else + { + merged_tail->next = list1; + merged_tail = merged_tail->next; + } + list1 = list1->next; + merged_tail->next = NULL; + } + else if(list2) + { + if(!merged_head) + { + merged_head = list2; + merged_tail = merged_head; + } + else + { + merged_tail->next = list2; + merged_tail = merged_tail->next; + } + list2 = list2->next; + merged_tail->next = NULL; + } + } + + return merged_head; +} + +PeakList* merge_sort(PeakList* peak_list, int num_peaks) +{ + if(num_peaks <= 1) + { + return peak_list; + } + + PeakList* left; + PeakList* right; + PeakList* current = peak_list; + int n = 0; + + /* find the index of the middle peak. If we have an odd number, + * give the extra peak to the left */ + int middle; + if(num_peaks % 2 == 0) + { + middle = num_peaks/2; + } + else + { + middle = (num_peaks/2) + 1; + } + + /* split the peak list into left and right at the middle value */ + left = peak_list; + while(current) + { + if(n == middle-1) + { + right = current->next; + current->next = NULL; + break; + } + + n++; + current = current->next; + } + + /* recursively sort and merge */ + left = merge_sort(left, middle); + right = merge_sort(right, num_peaks-middle); + return merge(left, right); +} + +/* + * Sort peak_list into a list order from smaller to largest frequency. + */ +PeakList* sort_peaks_by_frequency(PeakList* peak_list, int num_peaks) +{ + if(!peak_list || num_peaks == 0) + { + return NULL; + } + else + { + return merge_sort(peak_list, num_peaks); + } +} + +/* ------------------------------------------------------------------------- + * Partial Tracking + */ + +/* + * Find a candidate match for peak in frame if one exists. This is the closest + * (in frequency) match that is within the matching interval. + */ +Peak* find_closest_match(Peak* p, PeakList* peak_list, MQParameters* params, int backwards) +{ + PeakList* current = peak_list; + Peak* match = NULL; + sample best_distance = 44100.0; /* TODO: set this to params->sampling_rate */ + sample distance; + + while(current && current->peak) + { + if(backwards) + { + if(current->peak->prev) + { + current = current->next; + continue; + } + } + else + { + if(current->peak->next) + { + current = current->next; + continue; + } + } + + distance = fabs(current->peak->frequency - p->frequency); + if((distance < params->matching_interval) && + (distance < best_distance)) + { + best_distance = distance; + match = current->peak; + } + current = current->next; + } + + return match; +} + +/* + * Returns the closest unmatched peak in frame with a frequency less than p.frequency. + */ +Peak* free_peak_below(Peak* p, PeakList* peak_list) +{ + PeakList* current = peak_list; + Peak* free_peak = NULL; + sample closest_frequency = 44100; /* TODO: set this to params->sampling_rate */ + + while(current && current->peak) + { + if(current->peak != p) + { + /* if current peak is unmatched, and it is closer to p than the last + * unmatched peak that we saw, save it */ + if(!current->peak->prev && (current->peak->frequency < p->frequency) && + (fabs(current->peak->frequency - p->frequency) < closest_frequency)) + { + closest_frequency = fabs(current->peak->frequency - p->frequency); + free_peak = current->peak; + } + } + current = current->next; + } + return free_peak; +} + +/* + * A simplified version of MQ Partial Tracking. + */ +PeakList* track_peaks(PeakList* peak_list, MQParameters* params) +{ + PeakList* current = peak_list; + + /* MQ algorithm needs 2 frames of data, so return if this is the first frame */ + if(params->prev_peaks) + { + /* find all matches for previous peaks in the current frame */ + current = params->prev_peaks; + while(current && current->peak) + { + Peak* match = find_closest_match(current->peak, peak_list, params, 1); + /*printf("peak: %f\n", current->peak->frequency);*/ + if(match) + { + Peak* closest_to_cand = find_closest_match(match, params->prev_peaks, params, 0); + if(closest_to_cand != current->peak) + { + /*printf("%f closer to %f\n", match->frequency, closest_to_cand->frequency);*/ + /* see if the closest peak with lower frequency to the candidate is within + * the matching interval + */ + Peak* lower = free_peak_below(match, peak_list); + if(lower) + { + if(fabs(lower->frequency - current->peak->frequency) < params->matching_interval) + { + lower->prev = current->peak; + current->peak->next = lower; + } + } + } + /* if closest_peak == peak, it is a definitive match */ + else + { + match->prev = current->peak; + current->peak->next = match; + } + } + current = current->next; + } + } + + params->prev_peaks = peak_list; + return peak_list; +} + +/* ------------------------------------------------------------------------- + * Testing + */ + +/* + * Prints the frequency values of all peaks in p. + */ +void print_list(PeakList* p) +{ + int i = 0; + while(p) + { + printf("%d: freq=%f\n", i, p->peak->frequency); + p = p->next; + i++; + } +} + diff --git a/src/mq/mq.h b/src/mq/mq.h new file mode 100644 index 0000000..6819a80 --- /dev/null +++ b/src/mq/mq.h @@ -0,0 +1,67 @@ +/* Copyright (c) 2010 John Glover, National University of Ireland, Maynooth + + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef _MQ_H +#define _MQ_H + +#include +#include +#include "detectionfunctions.h" + +typedef double sample; + +typedef struct Peak +{ + float amplitude; + float frequency; + float phase; + int bin; + struct Peak* next; + struct Peak* prev; +} Peak; + +typedef struct PeakList +{ + struct PeakList* next; + struct PeakList* prev; + struct Peak* peak; +} PeakList; + +typedef struct MQParameters +{ + int frame_size; + int max_peaks; + int num_bins; + sample peak_threshold; + sample fundamental; + sample matching_interval; + sample* fft_in; + fftw_complex* fft_out; + fftw_plan fft_plan; + PeakList* prev_peaks; +} MQParameters; + +int init_mq(MQParameters* params); +void reset_mq(MQParameters* params); +int destroy_mq(MQParameters* params); +void delete_peak_list(PeakList* peak_list); + +PeakList* sort_peaks_by_frequency(PeakList* peak_list, int num_peaks); + +PeakList* find_peaks(int signal_size, sample* signal, MQParameters* params); +PeakList* track_peaks(PeakList* peak_list, MQParameters* params); + +#endif diff --git a/src/sms/OOURA.c b/src/sms/OOURA.c new file mode 100644 index 0000000..d88d20d --- /dev/null +++ b/src/sms/OOURA.c @@ -0,0 +1,638 @@ +/* -_-_-_-_-_-_-_-_-_-_-_-_-_-_- Ooura Real DFT -_-_-_-_-_-_-_-_-_-_-_-_-_-_ */ +/* Copyright notice: + This code comes from the "General Purpose FFT Package" that I obtained at + the following website http://www.kurims.kyoto-u.ac.jp/~ooura/fft.html + It is exactly copied from the file fft4g.c, but I have changed the doubles to sfloats. + Here is the copyright notice included in the package: + + Copyright(C) 1996-2001 Takuya OOURA + email: ooura@mmm.t.u-tokyo.ac.jp + download: http://momonga.t.u-tokyo.ac.jp/~ooura/fft.html + You may use, copy, modify this code for any purpose and + without fee. You may distribute this ORIGINAL package. + + The following is documentation of the algorithm included with the source code: + + -------- Real DFT / Inverse of Real DFT -------- + [definition] + RDFT + R[k] = sum_j=0^n-1 a[j]*cos(2*pi*j*k/n), 0<=k<=n/2 + I[k] = sum_j=0^n-1 a[j]*sin(2*pi*j*k/n), 0 IRDFT (excluding scale) + a[k] = (R[0] + R[n/2]*cos(pi*k))/2 + + sum_j=1^n/2-1 R[j]*cos(2*pi*j*k/n) + + sum_j=1^n/2-1 I[j]*sin(2*pi*j*k/n), 0<=k + ip[0] = 0; // first time only + rdft(n, 1, a, ip, w); + + ip[0] = 0; // first time only + rdft(n, -1, a, ip, w); + [parameters] + n :data length (int) + n >= 2, n = power of 2 + a[0...n-1] :input/output data (sfloat *) + + output data + a[2*k] = R[k], 0<=k + input data + a[2*j] = R[j], 0<=j= 2+sqrt(n/2) + strictly, + length of ip >= + 2+(1<<(int)(log(n/2+0.5)/log(2))/2). + ip[0],ip[1] are pointers of the cos/sin table. + w[0...n/2-1] :cos/sin table (sfloat *) + w[],ip[] are initialized if ip[0] == 0. + [remark] + Inverse of + rdft(n, 1, a, ip, w); + is + rdft(n, -1, a, ip, w); + for (j = 0; j <= n - 1; j++) { + a[j] *= 2.0 / n; + } + . +*/ + +#include "OOURA.h" +#include "math.h" /*! \todo (optimize) replace math.h trig functions (table lookup?) */ + +/* ! \brief OOURA Real / Inverse DFT algoriithm + * + * The source code contains documentation from + * the original author. + */ +void rdft(int n, int isgn, sfloat *a, int *ip, sfloat *w) +{ + int nw, nc; + sfloat xi; + + nw = ip[0]; + if (n > (nw << 2)) { + nw = n >> 2; + makewt(nw, ip, w); + } + nc = ip[1]; + if (n > (nc << 2)) { + nc = n >> 2; + makect(nc, ip, w + nw); + } + if (isgn >= 0) { + if (n > 4) { + bitrv2(n, ip + 2, a); + cftfsub(n, a, w); + rftfsub(n, a, nc, w + nw); + } else if (n == 4) { + cftfsub(n, a, w); + } + xi = a[0] - a[1]; + a[0] += a[1]; + a[1] = xi; + } else { + a[1] = 0.5 * (a[0] - a[1]); + a[0] -= a[1]; + if (n > 4) { + rftbsub(n, a, nc, w + nw); + bitrv2(n, ip + 2, a); + cftbsub(n, a, w); + } else if (n == 4) { + cftfsub(n, a, w); + } + } +} + + +void makewt(int nw, int *ip, sfloat *w) +{ + int j, nwh; + sfloat delta, x, y; + + ip[0] = nw; + ip[1] = 1; + if (nw > 2) { + nwh = nw >> 1; + delta = atan(1.0) / nwh; + w[0] = 1; + w[1] = 0; + w[nwh] = cos(delta * nwh); + w[nwh + 1] = w[nwh]; + if (nwh > 2) { + for (j = 2; j < nwh; j += 2) { + x = cos(delta * j); + y = sin(delta * j); + w[j] = x; + w[j + 1] = y; + w[nw - j] = y; + w[nw - j + 1] = x; + } + bitrv2(nw, ip + 2, w); + } + } +} + +void makect(int nc, int *ip, sfloat *c) +{ + int j, nch; + sfloat delta; + + ip[1] = nc; + if (nc > 1) { + nch = nc >> 1; + delta = atan(1.0) / nch; + c[0] = cos(delta * nch); + c[nch] = 0.5 * c[0]; + for (j = 1; j < nch; j++) { + c[j] = 0.5 * cos(delta * j); + c[nc - j] = 0.5 * sin(delta * j); + } + } +} + +void bitrv2(int n, int *ip, sfloat *a) +{ + int j, j1, k, k1, l, m, m2; + sfloat xr, xi, yr, yi; + + ip[0] = 0; + l = n; + m = 1; + while ((m << 3) < l) { + l >>= 1; + for (j = 0; j < m; j++) { + ip[m + j] = ip[j] + l; + } + m <<= 1; + } + m2 = 2 * m; + if ((m << 3) == l) { + for (k = 0; k < m; k++) { + for (j = 0; j < k; j++) { + j1 = 2 * j + ip[k]; + k1 = 2 * k + ip[j]; + xr = a[j1]; + xi = a[j1 + 1]; + yr = a[k1]; + yi = a[k1 + 1]; + a[j1] = yr; + a[j1 + 1] = yi; + a[k1] = xr; + a[k1 + 1] = xi; + j1 += m2; + k1 += 2 * m2; + xr = a[j1]; + xi = a[j1 + 1]; + yr = a[k1]; + yi = a[k1 + 1]; + a[j1] = yr; + a[j1 + 1] = yi; + a[k1] = xr; + a[k1 + 1] = xi; + j1 += m2; + k1 -= m2; + xr = a[j1]; + xi = a[j1 + 1]; + yr = a[k1]; + yi = a[k1 + 1]; + a[j1] = yr; + a[j1 + 1] = yi; + a[k1] = xr; + a[k1 + 1] = xi; + j1 += m2; + k1 += 2 * m2; + xr = a[j1]; + xi = a[j1 + 1]; + yr = a[k1]; + yi = a[k1 + 1]; + a[j1] = yr; + a[j1 + 1] = yi; + a[k1] = xr; + a[k1 + 1] = xi; + } + j1 = 2 * k + m2 + ip[k]; + k1 = j1 + m2; + xr = a[j1]; + xi = a[j1 + 1]; + yr = a[k1]; + yi = a[k1 + 1]; + a[j1] = yr; + a[j1 + 1] = yi; + a[k1] = xr; + a[k1 + 1] = xi; + } + } else { + for (k = 1; k < m; k++) { + for (j = 0; j < k; j++) { + j1 = 2 * j + ip[k]; + k1 = 2 * k + ip[j]; + xr = a[j1]; + xi = a[j1 + 1]; + yr = a[k1]; + yi = a[k1 + 1]; + a[j1] = yr; + a[j1 + 1] = yi; + a[k1] = xr; + a[k1 + 1] = xi; + j1 += m2; + k1 += m2; + xr = a[j1]; + xi = a[j1 + 1]; + yr = a[k1]; + yi = a[k1 + 1]; + a[j1] = yr; + a[j1 + 1] = yi; + a[k1] = xr; + a[k1 + 1] = xi; + } + } + } +} + +void cftfsub(int n, sfloat *a, sfloat *w) +{ + int j, j1, j2, j3, l; + sfloat x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i; + + l = 2; + if (n > 8) { + cft1st(n, a, w); + l = 8; + while ((l << 2) < n) { + cftmdl(n, l, a, w); + l <<= 2; + } + } + if ((l << 2) == n) { + for (j = 0; j < l; j += 2) { + j1 = j + l; + j2 = j1 + l; + j3 = j2 + l; + x0r = a[j] + a[j1]; + x0i = a[j + 1] + a[j1 + 1]; + x1r = a[j] - a[j1]; + x1i = a[j + 1] - a[j1 + 1]; + x2r = a[j2] + a[j3]; + x2i = a[j2 + 1] + a[j3 + 1]; + x3r = a[j2] - a[j3]; + x3i = a[j2 + 1] - a[j3 + 1]; + a[j] = x0r + x2r; + a[j + 1] = x0i + x2i; + a[j2] = x0r - x2r; + a[j2 + 1] = x0i - x2i; + a[j1] = x1r - x3i; + a[j1 + 1] = x1i + x3r; + a[j3] = x1r + x3i; + a[j3 + 1] = x1i - x3r; + } + } else { + for (j = 0; j < l; j += 2) { + j1 = j + l; + x0r = a[j] - a[j1]; + x0i = a[j + 1] - a[j1 + 1]; + a[j] += a[j1]; + a[j + 1] += a[j1 + 1]; + a[j1] = x0r; + a[j1 + 1] = x0i; + } + } +} + + +void cftbsub(int n, sfloat *a, sfloat *w) +{ + int j, j1, j2, j3, l; + sfloat x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i; + + l = 2; + if (n > 8) { + cft1st(n, a, w); + l = 8; + while ((l << 2) < n) { + cftmdl(n, l, a, w); + l <<= 2; + } + } + if ((l << 2) == n) { + for (j = 0; j < l; j += 2) { + j1 = j + l; + j2 = j1 + l; + j3 = j2 + l; + x0r = a[j] + a[j1]; + x0i = -a[j + 1] - a[j1 + 1]; + x1r = a[j] - a[j1]; + x1i = -a[j + 1] + a[j1 + 1]; + x2r = a[j2] + a[j3]; + x2i = a[j2 + 1] + a[j3 + 1]; + x3r = a[j2] - a[j3]; + x3i = a[j2 + 1] - a[j3 + 1]; + a[j] = x0r + x2r; + a[j + 1] = x0i - x2i; + a[j2] = x0r - x2r; + a[j2 + 1] = x0i + x2i; + a[j1] = x1r - x3i; + a[j1 + 1] = x1i - x3r; + a[j3] = x1r + x3i; + a[j3 + 1] = x1i + x3r; + } + } else { + for (j = 0; j < l; j += 2) { + j1 = j + l; + x0r = a[j] - a[j1]; + x0i = -a[j + 1] + a[j1 + 1]; + a[j] += a[j1]; + a[j + 1] = -a[j + 1] - a[j1 + 1]; + a[j1] = x0r; + a[j1 + 1] = x0i; + } + } +} + + +void cft1st(int n, sfloat *a, sfloat *w) +{ + int j, k1, k2; + sfloat wk1r, wk1i, wk2r, wk2i, wk3r, wk3i; + sfloat x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i; + + x0r = a[0] + a[2]; + x0i = a[1] + a[3]; + x1r = a[0] - a[2]; + x1i = a[1] - a[3]; + x2r = a[4] + a[6]; + x2i = a[5] + a[7]; + x3r = a[4] - a[6]; + x3i = a[5] - a[7]; + a[0] = x0r + x2r; + a[1] = x0i + x2i; + a[4] = x0r - x2r; + a[5] = x0i - x2i; + a[2] = x1r - x3i; + a[3] = x1i + x3r; + a[6] = x1r + x3i; + a[7] = x1i - x3r; + wk1r = w[2]; + x0r = a[8] + a[10]; + x0i = a[9] + a[11]; + x1r = a[8] - a[10]; + x1i = a[9] - a[11]; + x2r = a[12] + a[14]; + x2i = a[13] + a[15]; + x3r = a[12] - a[14]; + x3i = a[13] - a[15]; + a[8] = x0r + x2r; + a[9] = x0i + x2i; + a[12] = x2i - x0i; + a[13] = x0r - x2r; + x0r = x1r - x3i; + x0i = x1i + x3r; + a[10] = wk1r * (x0r - x0i); + a[11] = wk1r * (x0r + x0i); + x0r = x3i + x1r; + x0i = x3r - x1i; + a[14] = wk1r * (x0i - x0r); + a[15] = wk1r * (x0i + x0r); + k1 = 0; + for (j = 16; j < n; j += 16) { + k1 += 2; + k2 = 2 * k1; + wk2r = w[k1]; + wk2i = w[k1 + 1]; + wk1r = w[k2]; + wk1i = w[k2 + 1]; + wk3r = wk1r - 2 * wk2i * wk1i; + wk3i = 2 * wk2i * wk1r - wk1i; + x0r = a[j] + a[j + 2]; + x0i = a[j + 1] + a[j + 3]; + x1r = a[j] - a[j + 2]; + x1i = a[j + 1] - a[j + 3]; + x2r = a[j + 4] + a[j + 6]; + x2i = a[j + 5] + a[j + 7]; + x3r = a[j + 4] - a[j + 6]; + x3i = a[j + 5] - a[j + 7]; + a[j] = x0r + x2r; + a[j + 1] = x0i + x2i; + x0r -= x2r; + x0i -= x2i; + a[j + 4] = wk2r * x0r - wk2i * x0i; + a[j + 5] = wk2r * x0i + wk2i * x0r; + x0r = x1r - x3i; + x0i = x1i + x3r; + a[j + 2] = wk1r * x0r - wk1i * x0i; + a[j + 3] = wk1r * x0i + wk1i * x0r; + x0r = x1r + x3i; + x0i = x1i - x3r; + a[j + 6] = wk3r * x0r - wk3i * x0i; + a[j + 7] = wk3r * x0i + wk3i * x0r; + wk1r = w[k2 + 2]; + wk1i = w[k2 + 3]; + wk3r = wk1r - 2 * wk2r * wk1i; + wk3i = 2 * wk2r * wk1r - wk1i; + x0r = a[j + 8] + a[j + 10]; + x0i = a[j + 9] + a[j + 11]; + x1r = a[j + 8] - a[j + 10]; + x1i = a[j + 9] - a[j + 11]; + x2r = a[j + 12] + a[j + 14]; + x2i = a[j + 13] + a[j + 15]; + x3r = a[j + 12] - a[j + 14]; + x3i = a[j + 13] - a[j + 15]; + a[j + 8] = x0r + x2r; + a[j + 9] = x0i + x2i; + x0r -= x2r; + x0i -= x2i; + a[j + 12] = -wk2i * x0r - wk2r * x0i; + a[j + 13] = -wk2i * x0i + wk2r * x0r; + x0r = x1r - x3i; + x0i = x1i + x3r; + a[j + 10] = wk1r * x0r - wk1i * x0i; + a[j + 11] = wk1r * x0i + wk1i * x0r; + x0r = x1r + x3i; + x0i = x1i - x3r; + a[j + 14] = wk3r * x0r - wk3i * x0i; + a[j + 15] = wk3r * x0i + wk3i * x0r; + } +} + + +void cftmdl(int n, int l, sfloat *a, sfloat *w) +{ + int j, j1, j2, j3, k, k1, k2, m, m2; + sfloat wk1r, wk1i, wk2r, wk2i, wk3r, wk3i; + sfloat x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i; + + m = l << 2; + for (j = 0; j < l; j += 2) { + j1 = j + l; + j2 = j1 + l; + j3 = j2 + l; + x0r = a[j] + a[j1]; + x0i = a[j + 1] + a[j1 + 1]; + x1r = a[j] - a[j1]; + x1i = a[j + 1] - a[j1 + 1]; + x2r = a[j2] + a[j3]; + x2i = a[j2 + 1] + a[j3 + 1]; + x3r = a[j2] - a[j3]; + x3i = a[j2 + 1] - a[j3 + 1]; + a[j] = x0r + x2r; + a[j + 1] = x0i + x2i; + a[j2] = x0r - x2r; + a[j2 + 1] = x0i - x2i; + a[j1] = x1r - x3i; + a[j1 + 1] = x1i + x3r; + a[j3] = x1r + x3i; + a[j3 + 1] = x1i - x3r; + } + wk1r = w[2]; + for (j = m; j < l + m; j += 2) { + j1 = j + l; + j2 = j1 + l; + j3 = j2 + l; + x0r = a[j] + a[j1]; + x0i = a[j + 1] + a[j1 + 1]; + x1r = a[j] - a[j1]; + x1i = a[j + 1] - a[j1 + 1]; + x2r = a[j2] + a[j3]; + x2i = a[j2 + 1] + a[j3 + 1]; + x3r = a[j2] - a[j3]; + x3i = a[j2 + 1] - a[j3 + 1]; + a[j] = x0r + x2r; + a[j + 1] = x0i + x2i; + a[j2] = x2i - x0i; + a[j2 + 1] = x0r - x2r; + x0r = x1r - x3i; + x0i = x1i + x3r; + a[j1] = wk1r * (x0r - x0i); + a[j1 + 1] = wk1r * (x0r + x0i); + x0r = x3i + x1r; + x0i = x3r - x1i; + a[j3] = wk1r * (x0i - x0r); + a[j3 + 1] = wk1r * (x0i + x0r); + } + k1 = 0; + m2 = 2 * m; + for (k = m2; k < n; k += m2) { + k1 += 2; + k2 = 2 * k1; + wk2r = w[k1]; + wk2i = w[k1 + 1]; + wk1r = w[k2]; + wk1i = w[k2 + 1]; + wk3r = wk1r - 2 * wk2i * wk1i; + wk3i = 2 * wk2i * wk1r - wk1i; + for (j = k; j < l + k; j += 2) { + j1 = j + l; + j2 = j1 + l; + j3 = j2 + l; + x0r = a[j] + a[j1]; + x0i = a[j + 1] + a[j1 + 1]; + x1r = a[j] - a[j1]; + x1i = a[j + 1] - a[j1 + 1]; + x2r = a[j2] + a[j3]; + x2i = a[j2 + 1] + a[j3 + 1]; + x3r = a[j2] - a[j3]; + x3i = a[j2 + 1] - a[j3 + 1]; + a[j] = x0r + x2r; + a[j + 1] = x0i + x2i; + x0r -= x2r; + x0i -= x2i; + a[j2] = wk2r * x0r - wk2i * x0i; + a[j2 + 1] = wk2r * x0i + wk2i * x0r; + x0r = x1r - x3i; + x0i = x1i + x3r; + a[j1] = wk1r * x0r - wk1i * x0i; + a[j1 + 1] = wk1r * x0i + wk1i * x0r; + x0r = x1r + x3i; + x0i = x1i - x3r; + a[j3] = wk3r * x0r - wk3i * x0i; + a[j3 + 1] = wk3r * x0i + wk3i * x0r; + } + wk1r = w[k2 + 2]; + wk1i = w[k2 + 3]; + wk3r = wk1r - 2 * wk2r * wk1i; + wk3i = 2 * wk2r * wk1r - wk1i; + for (j = k + m; j < l + (k + m); j += 2) { + j1 = j + l; + j2 = j1 + l; + j3 = j2 + l; + x0r = a[j] + a[j1]; + x0i = a[j + 1] + a[j1 + 1]; + x1r = a[j] - a[j1]; + x1i = a[j + 1] - a[j1 + 1]; + x2r = a[j2] + a[j3]; + x2i = a[j2 + 1] + a[j3 + 1]; + x3r = a[j2] - a[j3]; + x3i = a[j2 + 1] - a[j3 + 1]; + a[j] = x0r + x2r; + a[j + 1] = x0i + x2i; + x0r -= x2r; + x0i -= x2i; + a[j2] = -wk2i * x0r - wk2r * x0i; + a[j2 + 1] = -wk2i * x0i + wk2r * x0r; + x0r = x1r - x3i; + x0i = x1i + x3r; + a[j1] = wk1r * x0r - wk1i * x0i; + a[j1 + 1] = wk1r * x0i + wk1i * x0r; + x0r = x1r + x3i; + x0i = x1i - x3r; + a[j3] = wk3r * x0r - wk3i * x0i; + a[j3 + 1] = wk3r * x0i + wk3i * x0r; + } + } +} + + +void rftfsub(int n, sfloat *a, int nc, sfloat *c) +{ + int j, k, kk, ks, m; + sfloat wkr, wki, xr, xi, yr, yi; + + m = n >> 1; + ks = 2 * nc / m; + kk = 0; + for (j = 2; j < m; j += 2) { + k = n - j; + kk += ks; + wkr = 0.5 - c[nc - kk]; + wki = c[kk]; + xr = a[j] - a[k]; + xi = a[j + 1] + a[k + 1]; + yr = wkr * xr - wki * xi; + yi = wkr * xi + wki * xr; + a[j] -= yr; + a[j + 1] -= yi; + a[k] += yr; + a[k + 1] -= yi; + } +} + +void rftbsub(int n, sfloat *a, int nc, sfloat *c) +{ + int j, k, kk, ks, m; + sfloat wkr, wki, xr, xi, yr, yi; + + a[1] = -a[1]; + m = n >> 1; + ks = 2 * nc / m; + kk = 0; + for (j = 2; j < m; j += 2) { + k = n - j; + kk += ks; + wkr = 0.5 - c[nc - kk]; + wki = c[kk]; + xr = a[j] - a[k]; + xi = a[j + 1] + a[k + 1]; + yr = wkr * xr + wki * xi; + yi = wkr * xi - wki * xr; + a[j] -= yr; + a[j + 1] = yi - a[j + 1]; + a[k] += yr; + a[k + 1] = yi - a[k + 1]; + } + a[m + 1] = -a[m + 1]; +} diff --git a/src/sms/OOURA.h b/src/sms/OOURA.h new file mode 100644 index 0000000..d7c60ad --- /dev/null +++ b/src/sms/OOURA.h @@ -0,0 +1,23 @@ +#ifndef _OOURA_H +#define _OOURA_H + +#define sfloat double +/*#define sfloat float*/ + +#define NMAX 8192 +#define NMAXSQRT 64 + +void rdft(int n, int isgn, sfloat *a, int *ip, sfloat *w); + +void makewt(int nw, int *ip, sfloat *w); +void makect(int nc, int *ip, sfloat *c); +void bitrv2(int n, int *ip, sfloat *a); +void cftfsub(int n, sfloat *a, sfloat *w); +void cftbsub(int n, sfloat *a, sfloat *w); +void rftfsub(int n, sfloat *a, int nc, sfloat *c); +void rftbsub(int n, sfloat *a, int nc, sfloat *c); + +void cft1st(int n, sfloat *a, sfloat *w); +void cftmdl(int n, int l, sfloat *a, sfloat *w); + +#endif /* _OURA_H */ diff --git a/src/sms/SFMT.c b/src/sms/SFMT.c new file mode 100644 index 0000000..7b84db7 --- /dev/null +++ b/src/sms/SFMT.c @@ -0,0 +1,621 @@ +/* + * @file SFMT.c + * @brief SIMD oriented Fast Mersenne Twister(SFMT) + * + * @author Mutsuo Saito (Hiroshima University) + * @author Makoto Matsumoto (Hiroshima University) + * + * Copyright (C) 2006,2007 Mutsuo Saito, Makoto Matsumoto and Hiroshima + * University. All rights reserved. + * + * The new BSD License is applied to this software, see LICENSE.txt + */ + +#include +#include +#include "SFMT.h" +#include "SFMT/SFMT-params.h" + +#if defined(__BIG_ENDIAN__) && !defined(__amd64) && !defined(BIG_ENDIAN64) +#define BIG_ENDIAN64 1 +#endif +#if defined(HAVE_ALTIVEC) && !defined(BIG_ENDIAN64) +#define BIG_ENDIAN64 1 +#endif +#if defined(ONLY64) && !defined(BIG_ENDIAN64) + #if defined(__GNUC__) + #error "-DONLY64 must be specified with -DBIG_ENDIAN64" + #endif +#undef ONLY64 +#endif +/*------------------------------------------------------ + 128-bit SIMD data type for Altivec, SSE2 or standard C + ------------------------------------------------------*/ +#if defined(HAVE_ALTIVEC) + #if !defined(__APPLE__) + #include + #endif +/** 128-bit data structure */ +union W128_T { + vector unsigned int s; + uint32_t u[4]; +}; +/** 128-bit data type */ +typedef union W128_T w128_t; + +#elif defined(HAVE_SSE2) + #include + +/** 128-bit data structure */ +union W128_T { + __m128i si; + uint32_t u[4]; +}; +/** 128-bit data type */ +typedef union W128_T w128_t; + +#else + +/** 128-bit data structure */ +struct W128_T { + uint32_t u[4]; +}; +/** 128-bit data type */ +typedef struct W128_T w128_t; + +#endif + +/*-------------------------------------- + FILE GLOBAL VARIABLES + internal state, index counter and flag + --------------------------------------*/ +/** the 128-bit internal state array */ +static w128_t sfmt[N]; +/** the 32bit integer pointer to the 128-bit internal state array */ +static uint32_t *psfmt32 = &sfmt[0].u[0]; +#if !defined(BIG_ENDIAN64) || defined(ONLY64) +/** the 64bit integer pointer to the 128-bit internal state array */ +static uint64_t *psfmt64 = (uint64_t *)&sfmt[0].u[0]; +#endif +/** index counter to the 32-bit internal state array */ +static int idx; +/** a flag: it is 0 if and only if the internal state is not yet + * initialized. */ +static int initialized = 0; +/** a parity check vector which certificate the period of 2^{MEXP} */ +static uint32_t parity[4] = {PARITY1, PARITY2, PARITY3, PARITY4}; + +/*---------------- + STATIC FUNCTIONS + ----------------*/ +inline static int idxof(int i); +inline static void rshift128(w128_t *out, w128_t const *in, int shift); +inline static void lshift128(w128_t *out, w128_t const *in, int shift); +inline static void gen_rand_all(void); +inline static void gen_rand_array(w128_t *array, int size); +inline static uint32_t func1(uint32_t x); +inline static uint32_t func2(uint32_t x); +static void period_certification(void); +#if defined(BIG_ENDIAN64) && !defined(ONLY64) +inline static void swap(w128_t *array, int size); +#endif + +#if defined(HAVE_ALTIVEC) + #include "SFMT-alti.h" +#elif defined(HAVE_SSE2) + #include "SFMT-sse2.h" +#endif + +/** + * This function simulate a 64-bit index of LITTLE ENDIAN + * in BIG ENDIAN machine. + */ +#ifdef ONLY64 +inline static int idxof(int i) { + return i ^ 1; +} +#else +inline static int idxof(int i) { + return i; +} +#endif +/** + * This function simulates SIMD 128-bit right shift by the standard C. + * The 128-bit integer given in in is shifted by (shift * 8) bits. + * This function simulates the LITTLE ENDIAN SIMD. + * @param out the output of this function + * @param in the 128-bit data to be shifted + * @param shift the shift value + */ +#ifdef ONLY64 +inline static void rshift128(w128_t *out, w128_t const *in, int shift) { + uint64_t th, tl, oh, ol; + + th = ((uint64_t)in->u[2] << 32) | ((uint64_t)in->u[3]); + tl = ((uint64_t)in->u[0] << 32) | ((uint64_t)in->u[1]); + + oh = th >> (shift * 8); + ol = tl >> (shift * 8); + ol |= th << (64 - shift * 8); + out->u[0] = (uint32_t)(ol >> 32); + out->u[1] = (uint32_t)ol; + out->u[2] = (uint32_t)(oh >> 32); + out->u[3] = (uint32_t)oh; +} +#else +inline static void rshift128(w128_t *out, w128_t const *in, int shift) { + uint64_t th, tl, oh, ol; + + th = ((uint64_t)in->u[3] << 32) | ((uint64_t)in->u[2]); + tl = ((uint64_t)in->u[1] << 32) | ((uint64_t)in->u[0]); + + oh = th >> (shift * 8); + ol = tl >> (shift * 8); + ol |= th << (64 - shift * 8); + out->u[1] = (uint32_t)(ol >> 32); + out->u[0] = (uint32_t)ol; + out->u[3] = (uint32_t)(oh >> 32); + out->u[2] = (uint32_t)oh; +} +#endif +/** + * This function simulates SIMD 128-bit left shift by the standard C. + * The 128-bit integer given in in is shifted by (shift * 8) bits. + * This function simulates the LITTLE ENDIAN SIMD. + * @param out the output of this function + * @param in the 128-bit data to be shifted + * @param shift the shift value + */ +#ifdef ONLY64 +inline static void lshift128(w128_t *out, w128_t const *in, int shift) { + uint64_t th, tl, oh, ol; + + th = ((uint64_t)in->u[2] << 32) | ((uint64_t)in->u[3]); + tl = ((uint64_t)in->u[0] << 32) | ((uint64_t)in->u[1]); + + oh = th << (shift * 8); + ol = tl << (shift * 8); + oh |= tl >> (64 - shift * 8); + out->u[0] = (uint32_t)(ol >> 32); + out->u[1] = (uint32_t)ol; + out->u[2] = (uint32_t)(oh >> 32); + out->u[3] = (uint32_t)oh; +} +#else +inline static void lshift128(w128_t *out, w128_t const *in, int shift) { + uint64_t th, tl, oh, ol; + + th = ((uint64_t)in->u[3] << 32) | ((uint64_t)in->u[2]); + tl = ((uint64_t)in->u[1] << 32) | ((uint64_t)in->u[0]); + + oh = th << (shift * 8); + ol = tl << (shift * 8); + oh |= tl >> (64 - shift * 8); + out->u[1] = (uint32_t)(ol >> 32); + out->u[0] = (uint32_t)ol; + out->u[3] = (uint32_t)(oh >> 32); + out->u[2] = (uint32_t)oh; +} +#endif + +/** + * This function represents the recursion formula. + * @param r output + * @param a a 128-bit part of the internal state array + * @param b a 128-bit part of the internal state array + * @param c a 128-bit part of the internal state array + * @param d a 128-bit part of the internal state array + */ +#if (!defined(HAVE_ALTIVEC)) && (!defined(HAVE_SSE2)) +#ifdef ONLY64 +inline static void do_recursion(w128_t *r, w128_t *a, w128_t *b, w128_t *c, + w128_t *d) { + w128_t x; + w128_t y; + + lshift128(&x, a, SL2); + rshift128(&y, c, SR2); + r->u[0] = a->u[0] ^ x.u[0] ^ ((b->u[0] >> SR1) & MSK2) ^ y.u[0] + ^ (d->u[0] << SL1); + r->u[1] = a->u[1] ^ x.u[1] ^ ((b->u[1] >> SR1) & MSK1) ^ y.u[1] + ^ (d->u[1] << SL1); + r->u[2] = a->u[2] ^ x.u[2] ^ ((b->u[2] >> SR1) & MSK4) ^ y.u[2] + ^ (d->u[2] << SL1); + r->u[3] = a->u[3] ^ x.u[3] ^ ((b->u[3] >> SR1) & MSK3) ^ y.u[3] + ^ (d->u[3] << SL1); +} +#else +inline static void do_recursion(w128_t *r, w128_t *a, w128_t *b, w128_t *c, + w128_t *d) { + w128_t x; + w128_t y; + + lshift128(&x, a, SL2); + rshift128(&y, c, SR2); + r->u[0] = a->u[0] ^ x.u[0] ^ ((b->u[0] >> SR1) & MSK1) ^ y.u[0] + ^ (d->u[0] << SL1); + r->u[1] = a->u[1] ^ x.u[1] ^ ((b->u[1] >> SR1) & MSK2) ^ y.u[1] + ^ (d->u[1] << SL1); + r->u[2] = a->u[2] ^ x.u[2] ^ ((b->u[2] >> SR1) & MSK3) ^ y.u[2] + ^ (d->u[2] << SL1); + r->u[3] = a->u[3] ^ x.u[3] ^ ((b->u[3] >> SR1) & MSK4) ^ y.u[3] + ^ (d->u[3] << SL1); +} +#endif +#endif + +#if (!defined(HAVE_ALTIVEC)) && (!defined(HAVE_SSE2)) +/** + * This function fills the internal state array with pseudorandom + * integers. + */ +inline static void gen_rand_all(void) { + int i; + w128_t *r1, *r2; + + r1 = &sfmt[N - 2]; + r2 = &sfmt[N - 1]; + for (i = 0; i < N - POS1; i++) { + do_recursion(&sfmt[i], &sfmt[i], &sfmt[i + POS1], r1, r2); + r1 = r2; + r2 = &sfmt[i]; + } + for (; i < N; i++) { + do_recursion(&sfmt[i], &sfmt[i], &sfmt[i + POS1 - N], r1, r2); + r1 = r2; + r2 = &sfmt[i]; + } +} + +/** + * This function fills the user-specified array with pseudorandom + * integers. + * + * @param array an 128-bit array to be filled by pseudorandom numbers. + * @param size number of 128-bit pseudorandom numbers to be generated. + */ +inline static void gen_rand_array(w128_t *array, int size) { + int i, j; + w128_t *r1, *r2; + + r1 = &sfmt[N - 2]; + r2 = &sfmt[N - 1]; + for (i = 0; i < N - POS1; i++) { + do_recursion(&array[i], &sfmt[i], &sfmt[i + POS1], r1, r2); + r1 = r2; + r2 = &array[i]; + } + for (; i < N; i++) { + do_recursion(&array[i], &sfmt[i], &array[i + POS1 - N], r1, r2); + r1 = r2; + r2 = &array[i]; + } + for (; i < size - N; i++) { + do_recursion(&array[i], &array[i - N], &array[i + POS1 - N], r1, r2); + r1 = r2; + r2 = &array[i]; + } + for (j = 0; j < 2 * N - size; j++) { + sfmt[j] = array[j + size - N]; + } + for (; i < size; i++, j++) { + do_recursion(&array[i], &array[i - N], &array[i + POS1 - N], r1, r2); + r1 = r2; + r2 = &array[i]; + sfmt[j] = array[i]; + } +} +#endif + +#if defined(BIG_ENDIAN64) && !defined(ONLY64) && !defined(HAVE_ALTIVEC) +inline static void swap(w128_t *array, int size) { + int i; + uint32_t x, y; + + for (i = 0; i < size; i++) { + x = array[i].u[0]; + y = array[i].u[2]; + array[i].u[0] = array[i].u[1]; + array[i].u[2] = array[i].u[3]; + array[i].u[1] = x; + array[i].u[3] = y; + } +} +#endif +/** + * This function represents a function used in the initialization + * by init_by_array + * @param x 32-bit integer + * @return 32-bit integer + */ +static uint32_t func1(uint32_t x) { + return (x ^ (x >> 27)) * (uint32_t)1664525UL; +} + +/** + * This function represents a function used in the initialization + * by init_by_array + * @param x 32-bit integer + * @return 32-bit integer + */ +static uint32_t func2(uint32_t x) { + return (x ^ (x >> 27)) * (uint32_t)1566083941UL; +} + +/** + * This function certificate the period of 2^{MEXP} + */ +static void period_certification(void) { + int inner = 0; + int i, j; + uint32_t work; + + for (i = 0; i < 4; i++) + inner ^= psfmt32[idxof(i)] & parity[i]; + for (i = 16; i > 0; i >>= 1) + inner ^= inner >> i; + inner &= 1; + /* check OK */ + if (inner == 1) { + return; + } + /* check NG, and modification */ + for (i = 0; i < 4; i++) { + work = 1; + for (j = 0; j < 32; j++) { + if ((work & parity[i]) != 0) { + psfmt32[idxof(i)] ^= work; + return; + } + work = work << 1; + } + } +} + +/*---------------- + PUBLIC FUNCTIONS + ----------------*/ +/** + * This function returns the identification string. + * The string shows the word size, the Mersenne exponent, + * and all parameters of this generator. + */ +const char *get_idstring(void) { + return IDSTR; +} + +/** + * This function returns the minimum size of array used for \b + * fill_array32() function. + * @return minimum size of array used for fill_array32() function. + */ +int get_min_array_size32(void) { + return N32; +} + +/** + * This function returns the minimum size of array used for \b + * fill_array64() function. + * @return minimum size of array used for fill_array64() function. + */ +int get_min_array_size64(void) { + return N64; +} + +#ifndef ONLY64 +/** + * This function generates and returns 32-bit pseudorandom number. + * init_gen_rand or init_by_array must be called before this function. + * @return 32-bit pseudorandom number + */ +uint32_t gen_rand32(void) { + uint32_t r; + + assert(initialized); + if (idx >= N32) { + gen_rand_all(); + idx = 0; + } + r = psfmt32[idx++]; + return r; +} +#endif +/** + * This function generates and returns 64-bit pseudorandom number. + * init_gen_rand or init_by_array must be called before this function. + * The function gen_rand64 should not be called after gen_rand32, + * unless an initialization is again executed. + * @return 64-bit pseudorandom number + */ +uint64_t gen_rand64(void) { +#if defined(BIG_ENDIAN64) && !defined(ONLY64) + uint32_t r1, r2; +#else + uint64_t r; +#endif + + assert(initialized); + assert(idx % 2 == 0); + + if (idx >= N32) { + gen_rand_all(); + idx = 0; + } +#if defined(BIG_ENDIAN64) && !defined(ONLY64) + r1 = psfmt32[idx]; + r2 = psfmt32[idx + 1]; + idx += 2; + return ((uint64_t)r2 << 32) | r1; +#else + r = psfmt64[idx / 2]; + idx += 2; + return r; +#endif +} + +#ifndef ONLY64 +/** + * This function generates pseudorandom 32-bit integers in the + * specified array[] by one call. The number of pseudorandom integers + * is specified by the argument size, which must be at least 624 and a + * multiple of four. The generation by this function is much faster + * than the following gen_rand function. + * + * For initialization, init_gen_rand or init_by_array must be called + * before the first call of this function. This function can not be + * used after calling gen_rand function, without initialization. + * + * @param array an array where pseudorandom 32-bit integers are filled + * by this function. The pointer to the array must be \b "aligned" + * (namely, must be a multiple of 16) in the SIMD version, since it + * refers to the address of a 128-bit integer. In the standard C + * version, the pointer is arbitrary. + * + * @param size the number of 32-bit pseudorandom integers to be + * generated. size must be a multiple of 4, and greater than or equal + * to (MEXP / 128 + 1) * 4. + * + * @note \b memalign or \b posix_memalign is available to get aligned + * memory. Mac OSX doesn't have these functions, but \b malloc of OSX + * returns the pointer to the aligned memory block. + */ +void fill_array32(uint32_t *array, int size) { + assert(initialized); + assert(idx == N32); + assert(size % 4 == 0); + assert(size >= N32); + + gen_rand_array((w128_t *)array, size / 4); + idx = N32; +} +#endif + +/** + * This function generates pseudorandom 64-bit integers in the + * specified array[] by one call. The number of pseudorandom integers + * is specified by the argument size, which must be at least 312 and a + * multiple of two. The generation by this function is much faster + * than the following gen_rand function. + * + * For initialization, init_gen_rand or init_by_array must be called + * before the first call of this function. This function can not be + * used after calling gen_rand function, without initialization. + * + * @param array an array where pseudorandom 64-bit integers are filled + * by this function. The pointer to the array must be "aligned" + * (namely, must be a multiple of 16) in the SIMD version, since it + * refers to the address of a 128-bit integer. In the standard C + * version, the pointer is arbitrary. + * + * @param size the number of 64-bit pseudorandom integers to be + * generated. size must be a multiple of 2, and greater than or equal + * to (MEXP / 128 + 1) * 2 + * + * @note \b memalign or \b posix_memalign is available to get aligned + * memory. Mac OSX doesn't have these functions, but \b malloc of OSX + * returns the pointer to the aligned memory block. + */ +void fill_array64(uint64_t *array, int size) { + assert(initialized); + assert(idx == N32); + assert(size % 2 == 0); + assert(size >= N64); + + gen_rand_array((w128_t *)array, size / 2); + idx = N32; + +#if defined(BIG_ENDIAN64) && !defined(ONLY64) + swap((w128_t *)array, size /2); +#endif +} + +/** + * This function initializes the internal state array with a 32-bit + * integer seed. + * + * @param seed a 32-bit integer used as the seed. + */ +void init_gen_rand(uint32_t seed) { + int i; + + psfmt32[idxof(0)] = seed; + for (i = 1; i < N32; i++) { + psfmt32[idxof(i)] = 1812433253UL * (psfmt32[idxof(i - 1)] + ^ (psfmt32[idxof(i - 1)] >> 30)) + + i; + } + idx = N32; + period_certification(); + initialized = 1; +} + +/** + * This function initializes the internal state array, + * with an array of 32-bit integers used as the seeds + * @param init_key the array of 32-bit integers, used as a seed. + * @param key_length the length of init_key. + */ +void init_by_array(uint32_t *init_key, int key_length) { + int i, j, count; + uint32_t r; + int lag; + int mid; + int size = N * 4; + + if (size >= 623) { + lag = 11; + } else if (size >= 68) { + lag = 7; + } else if (size >= 39) { + lag = 5; + } else { + lag = 3; + } + mid = (size - lag) / 2; + + memset(sfmt, 0x8b, sizeof(sfmt)); + if (key_length + 1 > N32) { + count = key_length + 1; + } else { + count = N32; + } + r = func1(psfmt32[idxof(0)] ^ psfmt32[idxof(mid)] + ^ psfmt32[idxof(N32 - 1)]); + psfmt32[idxof(mid)] += r; + r += key_length; + psfmt32[idxof(mid + lag)] += r; + psfmt32[idxof(0)] = r; + + count--; + for (i = 1, j = 0; (j < count) && (j < key_length); j++) { + r = func1(psfmt32[idxof(i)] ^ psfmt32[idxof((i + mid) % N32)] + ^ psfmt32[idxof((i + N32 - 1) % N32)]); + psfmt32[idxof((i + mid) % N32)] += r; + r += init_key[j] + i; + psfmt32[idxof((i + mid + lag) % N32)] += r; + psfmt32[idxof(i)] = r; + i = (i + 1) % N32; + } + for (; j < count; j++) { + r = func1(psfmt32[idxof(i)] ^ psfmt32[idxof((i + mid) % N32)] + ^ psfmt32[idxof((i + N32 - 1) % N32)]); + psfmt32[idxof((i + mid) % N32)] += r; + r += i; + psfmt32[idxof((i + mid + lag) % N32)] += r; + psfmt32[idxof(i)] = r; + i = (i + 1) % N32; + } + for (j = 0; j < N32; j++) { + r = func2(psfmt32[idxof(i)] + psfmt32[idxof((i + mid) % N32)] + + psfmt32[idxof((i + N32 - 1) % N32)]); + psfmt32[idxof((i + mid) % N32)] ^= r; + r -= i; + psfmt32[idxof((i + mid + lag) % N32)] ^= r; + psfmt32[idxof(i)] = r; + i = (i + 1) % N32; + } + + idx = N32; + period_certification(); + initialized = 1; +} diff --git a/src/sms/SFMT.h b/src/sms/SFMT.h new file mode 100644 index 0000000..7c8b35e --- /dev/null +++ b/src/sms/SFMT.h @@ -0,0 +1,157 @@ +/** + * @file SFMT.h + * + * @brief SIMD oriented Fast Mersenne Twister(SFMT) pseudorandom + * number generator + * + * @author Mutsuo Saito (Hiroshima University) + * @author Makoto Matsumoto (Hiroshima University) + * + * Copyright (C) 2006, 2007 Mutsuo Saito, Makoto Matsumoto and Hiroshima + * University. All rights reserved. + * + * The new BSD License is applied to this software. + * see LICENSE.txt + * + * @note We assume that your system has inttypes.h. If your system + * doesn't have inttypes.h, you have to typedef uint32_t and uint64_t, + * and you have to define PRIu64 and PRIx64 in this file as follows: + * @verbatim + typedef unsigned int uint32_t + typedef unsigned long long uint64_t + #define PRIu64 "llu" + #define PRIx64 "llx" +@endverbatim + * uint32_t must be exactly 32-bit unsigned integer type (no more, no + * less), and uint64_t must be exactly 64-bit unsigned integer type. + * PRIu64 and PRIx64 are used for printf function to print 64-bit + * unsigned int and 64-bit unsigned int in hexadecimal format. + */ + +#ifndef SFMT_H +#define SFMT_H + +#include + +#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) + #include +#elif defined(_MSC_VER) || defined(__BORLANDC__) + typedef unsigned int uint32_t; + typedef unsigned __int64 uint64_t; + #define inline __inline +#else + #include + #if defined(__GNUC__) + #define inline __inline__ + #endif +#endif + +#ifndef PRIu64 + #if defined(_MSC_VER) || defined(__BORLANDC__) + #define PRIu64 "I64u" + #define PRIx64 "I64x" + #else + #define PRIu64 "llu" + #define PRIx64 "llx" + #endif +#endif + +#if defined(__GNUC__) +#define ALWAYSINLINE __attribute__((always_inline)) +#else +#define ALWAYSINLINE +#endif + +#if defined(_MSC_VER) + #if _MSC_VER >= 1200 + #define PRE_ALWAYS __forceinline + #else + #define PRE_ALWAYS inline + #endif +#else + #define PRE_ALWAYS inline +#endif + +uint32_t gen_rand32(void); +uint64_t gen_rand64(void); +void fill_array32(uint32_t *array, int size); +void fill_array64(uint64_t *array, int size); +void init_gen_rand(uint32_t seed); +void init_by_array(uint32_t *init_key, int key_length); +const char *get_idstring(void); +int get_min_array_size32(void); +int get_min_array_size64(void); + +/* These real versions are due to Isaku Wada */ +/** generates a random number on [0,1]-real-interval */ +inline static double to_real1(uint32_t v) +{ + return v * (1.0/4294967295.0); + /* divided by 2^32-1 */ +} + +/** generates a random number on [0,1]-real-interval */ +inline static double genrand_real1(void) +{ + return to_real1(gen_rand32()); +} + +/** generates a random number on [0,1)-real-interval */ +inline static double to_real2(uint32_t v) +{ + return v * (1.0/4294967296.0); + /* divided by 2^32 */ +} + +/** generates a random number on [0,1)-real-interval */ +inline static double genrand_real2(void) +{ + return to_real2(gen_rand32()); +} + +/** generates a random number on (0,1)-real-interval */ +inline static double to_real3(uint32_t v) +{ + return (((double)v) + 0.5)*(1.0/4294967296.0); + /* divided by 2^32 */ +} + +/** generates a random number on (0,1)-real-interval */ +inline static double genrand_real3(void) +{ + return to_real3(gen_rand32()); +} +/** These real versions are due to Isaku Wada */ + +/** generates a random number on [0,1) with 53-bit resolution*/ +inline static double to_res53(uint64_t v) +{ + return v * (1.0/18446744073709551616.0L); +} + +/** generates a random number on [0,1) with 53-bit resolution from two + * 32 bit integers */ +inline static double to_res53_mix(uint32_t x, uint32_t y) +{ + return to_res53(x | ((uint64_t)y << 32)); +} + +/** generates a random number on [0,1) with 53-bit resolution + */ +inline static double genrand_res53(void) +{ + return to_res53(gen_rand64()); +} + +/** generates a random number on [0,1) with 53-bit resolution + using 32bit integer. + */ +inline static double genrand_res53_mix(void) +{ + uint32_t x, y; + + x = gen_rand32(); + y = gen_rand32(); + return to_res53_mix(x, y); +} +#endif diff --git a/src/sms/SFMT/SFMT-params.h b/src/sms/SFMT/SFMT-params.h new file mode 100644 index 0000000..661bbf2 --- /dev/null +++ b/src/sms/SFMT/SFMT-params.h @@ -0,0 +1,97 @@ +#ifndef SFMT_PARAMS_H +#define SFMT_PARAMS_H + +#if !defined(MEXP) +#ifdef __GNUC__ + #warning "MEXP is not defined. I assume MEXP is 19937." +#endif + #define MEXP 19937 +#endif +/*----------------- + BASIC DEFINITIONS + -----------------*/ +/** Mersenne Exponent. The period of the sequence + * is a multiple of 2^MEXP-1. + * #define MEXP 19937 */ +/** SFMT generator has an internal state array of 128-bit integers, + * and N is its size. */ +#define N (MEXP / 128 + 1) +/** N32 is the size of internal state array when regarded as an array + * of 32-bit integers.*/ +#define N32 (N * 4) +/** N64 is the size of internal state array when regarded as an array + * of 64-bit integers.*/ +#define N64 (N * 2) + +/*---------------------- + the parameters of SFMT + following definitions are in paramsXXXX.h file. + ----------------------*/ +/** the pick up position of the array. +#define POS1 122 +*/ + +/** the parameter of shift left as four 32-bit registers. +#define SL1 18 + */ + +/** the parameter of shift left as one 128-bit register. + * The 128-bit integer is shifted by (SL2 * 8) bits. +#define SL2 1 +*/ + +/** the parameter of shift right as four 32-bit registers. +#define SR1 11 +*/ + +/** the parameter of shift right as one 128-bit register. + * The 128-bit integer is shifted by (SL2 * 8) bits. +#define SR2 1 +*/ + +/** A bitmask, used in the recursion. These parameters are introduced + * to break symmetry of SIMD. +#define MSK1 0xdfffffefU +#define MSK2 0xddfecb7fU +#define MSK3 0xbffaffffU +#define MSK4 0xbffffff6U +*/ + +/** These definitions are part of a 128-bit period certification vector. +#define PARITY1 0x00000001U +#define PARITY2 0x00000000U +#define PARITY3 0x00000000U +#define PARITY4 0xc98e126aU +*/ + +#if MEXP == 607 + #include "SFMT-params607.h" +#elif MEXP == 1279 + #include "SFMT-params1279.h" +#elif MEXP == 2281 + #include "SFMT-params2281.h" +#elif MEXP == 4253 + #include "SFMT-params4253.h" +#elif MEXP == 11213 + #include "SFMT-params11213.h" +#elif MEXP == 19937 + #include "SFMT-params19937.h" +#elif MEXP == 44497 + #include "SFMT-params44497.h" +#elif MEXP == 86243 + #include "SFMT-params86243.h" +#elif MEXP == 132049 + #include "SFMT-params132049.h" +#elif MEXP == 216091 + #include "SFMT-params216091.h" +#else +#ifdef __GNUC__ + #error "MEXP is not valid." + #undef MEXP +#else + #undef MEXP +#endif + +#endif + +#endif /* SFMT_PARAMS_H */ diff --git a/src/sms/SFMT/SFMT-params11213.h b/src/sms/SFMT/SFMT-params11213.h new file mode 100644 index 0000000..244d313 --- /dev/null +++ b/src/sms/SFMT/SFMT-params11213.h @@ -0,0 +1,46 @@ +#ifndef SFMT_PARAMS11213_H +#define SFMT_PARAMS11213_H + +#define POS1 68 +#define SL1 14 +#define SL2 3 +#define SR1 7 +#define SR2 3 +#define MSK1 0xeffff7fbU +#define MSK2 0xffffffefU +#define MSK3 0xdfdfbfffU +#define MSK4 0x7fffdbfdU +#define PARITY1 0x00000001U +#define PARITY2 0x00000000U +#define PARITY3 0xe8148000U +#define PARITY4 0xd0c7afa3U + + +/* PARAMETERS FOR ALTIVEC */ +#if defined(__APPLE__) /* For OSX */ + #define ALTI_SL1 (vector unsigned int)(SL1, SL1, SL1, SL1) + #define ALTI_SR1 (vector unsigned int)(SR1, SR1, SR1, SR1) + #define ALTI_MSK (vector unsigned int)(MSK1, MSK2, MSK3, MSK4) + #define ALTI_MSK64 \ + (vector unsigned int)(MSK2, MSK1, MSK4, MSK3) + #define ALTI_SL2_PERM \ + (vector unsigned char)(3,21,21,21,7,0,1,2,11,4,5,6,15,8,9,10) + #define ALTI_SL2_PERM64 \ + (vector unsigned char)(3,4,5,6,7,29,29,29,11,12,13,14,15,0,1,2) + #define ALTI_SR2_PERM \ + (vector unsigned char)(5,6,7,0,9,10,11,4,13,14,15,8,19,19,19,12) + #define ALTI_SR2_PERM64 \ + (vector unsigned char)(13,14,15,0,1,2,3,4,19,19,19,8,9,10,11,12) +#else /* For OTHER OSs(Linux?) */ + #define ALTI_SL1 {SL1, SL1, SL1, SL1} + #define ALTI_SR1 {SR1, SR1, SR1, SR1} + #define ALTI_MSK {MSK1, MSK2, MSK3, MSK4} + #define ALTI_MSK64 {MSK2, MSK1, MSK4, MSK3} + #define ALTI_SL2_PERM {3,21,21,21,7,0,1,2,11,4,5,6,15,8,9,10} + #define ALTI_SL2_PERM64 {3,4,5,6,7,29,29,29,11,12,13,14,15,0,1,2} + #define ALTI_SR2_PERM {5,6,7,0,9,10,11,4,13,14,15,8,19,19,19,12} + #define ALTI_SR2_PERM64 {13,14,15,0,1,2,3,4,19,19,19,8,9,10,11,12} +#endif /* For OSX */ +#define IDSTR "SFMT-11213:68-14-3-7-3:effff7fb-ffffffef-dfdfbfff-7fffdbfd" + +#endif /* SFMT_PARAMS11213_H */ diff --git a/src/sms/SFMT/SFMT-params1279.h b/src/sms/SFMT/SFMT-params1279.h new file mode 100644 index 0000000..df538df --- /dev/null +++ b/src/sms/SFMT/SFMT-params1279.h @@ -0,0 +1,46 @@ +#ifndef SFMT_PARAMS1279_H +#define SFMT_PARAMS1279_H + +#define POS1 7 +#define SL1 14 +#define SL2 3 +#define SR1 5 +#define SR2 1 +#define MSK1 0xf7fefffdU +#define MSK2 0x7fefcfffU +#define MSK3 0xaff3ef3fU +#define MSK4 0xb5ffff7fU +#define PARITY1 0x00000001U +#define PARITY2 0x00000000U +#define PARITY3 0x00000000U +#define PARITY4 0x20000000U + + +/* PARAMETERS FOR ALTIVEC */ +#if defined(__APPLE__) /* For OSX */ + #define ALTI_SL1 (vector unsigned int)(SL1, SL1, SL1, SL1) + #define ALTI_SR1 (vector unsigned int)(SR1, SR1, SR1, SR1) + #define ALTI_MSK (vector unsigned int)(MSK1, MSK2, MSK3, MSK4) + #define ALTI_MSK64 \ + (vector unsigned int)(MSK2, MSK1, MSK4, MSK3) + #define ALTI_SL2_PERM \ + (vector unsigned char)(3,21,21,21,7,0,1,2,11,4,5,6,15,8,9,10) + #define ALTI_SL2_PERM64 \ + (vector unsigned char)(3,4,5,6,7,29,29,29,11,12,13,14,15,0,1,2) + #define ALTI_SR2_PERM \ + (vector unsigned char)(7,0,1,2,11,4,5,6,15,8,9,10,17,12,13,14) + #define ALTI_SR2_PERM64 \ + (vector unsigned char)(15,0,1,2,3,4,5,6,17,8,9,10,11,12,13,14) +#else /* For OTHER OSs(Linux?) */ + #define ALTI_SL1 {SL1, SL1, SL1, SL1} + #define ALTI_SR1 {SR1, SR1, SR1, SR1} + #define ALTI_MSK {MSK1, MSK2, MSK3, MSK4} + #define ALTI_MSK64 {MSK2, MSK1, MSK4, MSK3} + #define ALTI_SL2_PERM {3,21,21,21,7,0,1,2,11,4,5,6,15,8,9,10} + #define ALTI_SL2_PERM64 {3,4,5,6,7,29,29,29,11,12,13,14,15,0,1,2} + #define ALTI_SR2_PERM {7,0,1,2,11,4,5,6,15,8,9,10,17,12,13,14} + #define ALTI_SR2_PERM64 {15,0,1,2,3,4,5,6,17,8,9,10,11,12,13,14} +#endif /* For OSX */ +#define IDSTR "SFMT-1279:7-14-3-5-1:f7fefffd-7fefcfff-aff3ef3f-b5ffff7f" + +#endif /* SFMT_PARAMS1279_H */ diff --git a/src/sms/SFMT/SFMT-params132049.h b/src/sms/SFMT/SFMT-params132049.h new file mode 100644 index 0000000..94e297e --- /dev/null +++ b/src/sms/SFMT/SFMT-params132049.h @@ -0,0 +1,46 @@ +#ifndef SFMT_PARAMS132049_H +#define SFMT_PARAMS132049_H + +#define POS1 110 +#define SL1 19 +#define SL2 1 +#define SR1 21 +#define SR2 1 +#define MSK1 0xffffbb5fU +#define MSK2 0xfb6ebf95U +#define MSK3 0xfffefffaU +#define MSK4 0xcff77fffU +#define PARITY1 0x00000001U +#define PARITY2 0x00000000U +#define PARITY3 0xcb520000U +#define PARITY4 0xc7e91c7dU + + +/* PARAMETERS FOR ALTIVEC */ +#if defined(__APPLE__) /* For OSX */ + #define ALTI_SL1 (vector unsigned int)(SL1, SL1, SL1, SL1) + #define ALTI_SR1 (vector unsigned int)(SR1, SR1, SR1, SR1) + #define ALTI_MSK (vector unsigned int)(MSK1, MSK2, MSK3, MSK4) + #define ALTI_MSK64 \ + (vector unsigned int)(MSK2, MSK1, MSK4, MSK3) + #define ALTI_SL2_PERM \ + (vector unsigned char)(1,2,3,23,5,6,7,0,9,10,11,4,13,14,15,8) + #define ALTI_SL2_PERM64 \ + (vector unsigned char)(1,2,3,4,5,6,7,31,9,10,11,12,13,14,15,0) + #define ALTI_SR2_PERM \ + (vector unsigned char)(7,0,1,2,11,4,5,6,15,8,9,10,17,12,13,14) + #define ALTI_SR2_PERM64 \ + (vector unsigned char)(15,0,1,2,3,4,5,6,17,8,9,10,11,12,13,14) +#else /* For OTHER OSs(Linux?) */ + #define ALTI_SL1 {SL1, SL1, SL1, SL1} + #define ALTI_SR1 {SR1, SR1, SR1, SR1} + #define ALTI_MSK {MSK1, MSK2, MSK3, MSK4} + #define ALTI_MSK64 {MSK2, MSK1, MSK4, MSK3} + #define ALTI_SL2_PERM {1,2,3,23,5,6,7,0,9,10,11,4,13,14,15,8} + #define ALTI_SL2_PERM64 {1,2,3,4,5,6,7,31,9,10,11,12,13,14,15,0} + #define ALTI_SR2_PERM {7,0,1,2,11,4,5,6,15,8,9,10,17,12,13,14} + #define ALTI_SR2_PERM64 {15,0,1,2,3,4,5,6,17,8,9,10,11,12,13,14} +#endif /* For OSX */ +#define IDSTR "SFMT-132049:110-19-1-21-1:ffffbb5f-fb6ebf95-fffefffa-cff77fff" + +#endif /* SFMT_PARAMS132049_H */ diff --git a/src/sms/SFMT/SFMT-params19937.h b/src/sms/SFMT/SFMT-params19937.h new file mode 100644 index 0000000..04708cd --- /dev/null +++ b/src/sms/SFMT/SFMT-params19937.h @@ -0,0 +1,46 @@ +#ifndef SFMT_PARAMS19937_H +#define SFMT_PARAMS19937_H + +#define POS1 122 +#define SL1 18 +#define SL2 1 +#define SR1 11 +#define SR2 1 +#define MSK1 0xdfffffefU +#define MSK2 0xddfecb7fU +#define MSK3 0xbffaffffU +#define MSK4 0xbffffff6U +#define PARITY1 0x00000001U +#define PARITY2 0x00000000U +#define PARITY3 0x00000000U +#define PARITY4 0x13c9e684U + + +/* PARAMETERS FOR ALTIVEC */ +#if defined(__APPLE__) /* For OSX */ + #define ALTI_SL1 (vector unsigned int)(SL1, SL1, SL1, SL1) + #define ALTI_SR1 (vector unsigned int)(SR1, SR1, SR1, SR1) + #define ALTI_MSK (vector unsigned int)(MSK1, MSK2, MSK3, MSK4) + #define ALTI_MSK64 \ + (vector unsigned int)(MSK2, MSK1, MSK4, MSK3) + #define ALTI_SL2_PERM \ + (vector unsigned char)(1,2,3,23,5,6,7,0,9,10,11,4,13,14,15,8) + #define ALTI_SL2_PERM64 \ + (vector unsigned char)(1,2,3,4,5,6,7,31,9,10,11,12,13,14,15,0) + #define ALTI_SR2_PERM \ + (vector unsigned char)(7,0,1,2,11,4,5,6,15,8,9,10,17,12,13,14) + #define ALTI_SR2_PERM64 \ + (vector unsigned char)(15,0,1,2,3,4,5,6,17,8,9,10,11,12,13,14) +#else /* For OTHER OSs(Linux?) */ + #define ALTI_SL1 {SL1, SL1, SL1, SL1} + #define ALTI_SR1 {SR1, SR1, SR1, SR1} + #define ALTI_MSK {MSK1, MSK2, MSK3, MSK4} + #define ALTI_MSK64 {MSK2, MSK1, MSK4, MSK3} + #define ALTI_SL2_PERM {1,2,3,23,5,6,7,0,9,10,11,4,13,14,15,8} + #define ALTI_SL2_PERM64 {1,2,3,4,5,6,7,31,9,10,11,12,13,14,15,0} + #define ALTI_SR2_PERM {7,0,1,2,11,4,5,6,15,8,9,10,17,12,13,14} + #define ALTI_SR2_PERM64 {15,0,1,2,3,4,5,6,17,8,9,10,11,12,13,14} +#endif /* For OSX */ +#define IDSTR "SFMT-19937:122-18-1-11-1:dfffffef-ddfecb7f-bffaffff-bffffff6" + +#endif /* SFMT_PARAMS19937_H */ diff --git a/src/sms/SFMT/SFMT-params216091.h b/src/sms/SFMT/SFMT-params216091.h new file mode 100644 index 0000000..46c7303 --- /dev/null +++ b/src/sms/SFMT/SFMT-params216091.h @@ -0,0 +1,46 @@ +#ifndef SFMT_PARAMS216091_H +#define SFMT_PARAMS216091_H + +#define POS1 627 +#define SL1 11 +#define SL2 3 +#define SR1 10 +#define SR2 1 +#define MSK1 0xbff7bff7U +#define MSK2 0xbfffffffU +#define MSK3 0xbffffa7fU +#define MSK4 0xffddfbfbU +#define PARITY1 0xf8000001U +#define PARITY2 0x89e80709U +#define PARITY3 0x3bd2b64bU +#define PARITY4 0x0c64b1e4U + + +/* PARAMETERS FOR ALTIVEC */ +#if defined(__APPLE__) /* For OSX */ + #define ALTI_SL1 (vector unsigned int)(SL1, SL1, SL1, SL1) + #define ALTI_SR1 (vector unsigned int)(SR1, SR1, SR1, SR1) + #define ALTI_MSK (vector unsigned int)(MSK1, MSK2, MSK3, MSK4) + #define ALTI_MSK64 \ + (vector unsigned int)(MSK2, MSK1, MSK4, MSK3) + #define ALTI_SL2_PERM \ + (vector unsigned char)(3,21,21,21,7,0,1,2,11,4,5,6,15,8,9,10) + #define ALTI_SL2_PERM64 \ + (vector unsigned char)(3,4,5,6,7,29,29,29,11,12,13,14,15,0,1,2) + #define ALTI_SR2_PERM \ + (vector unsigned char)(7,0,1,2,11,4,5,6,15,8,9,10,17,12,13,14) + #define ALTI_SR2_PERM64 \ + (vector unsigned char)(15,0,1,2,3,4,5,6,17,8,9,10,11,12,13,14) +#else /* For OTHER OSs(Linux?) */ + #define ALTI_SL1 {SL1, SL1, SL1, SL1} + #define ALTI_SR1 {SR1, SR1, SR1, SR1} + #define ALTI_MSK {MSK1, MSK2, MSK3, MSK4} + #define ALTI_MSK64 {MSK2, MSK1, MSK4, MSK3} + #define ALTI_SL2_PERM {3,21,21,21,7,0,1,2,11,4,5,6,15,8,9,10} + #define ALTI_SL2_PERM64 {3,4,5,6,7,29,29,29,11,12,13,14,15,0,1,2} + #define ALTI_SR2_PERM {7,0,1,2,11,4,5,6,15,8,9,10,17,12,13,14} + #define ALTI_SR2_PERM64 {15,0,1,2,3,4,5,6,17,8,9,10,11,12,13,14} +#endif /* For OSX */ +#define IDSTR "SFMT-216091:627-11-3-10-1:bff7bff7-bfffffff-bffffa7f-ffddfbfb" + +#endif /* SFMT_PARAMS216091_H */ diff --git a/src/sms/SFMT/SFMT-params2281.h b/src/sms/SFMT/SFMT-params2281.h new file mode 100644 index 0000000..ee2ebdf --- /dev/null +++ b/src/sms/SFMT/SFMT-params2281.h @@ -0,0 +1,46 @@ +#ifndef SFMT_PARAMS2281_H +#define SFMT_PARAMS2281_H + +#define POS1 12 +#define SL1 19 +#define SL2 1 +#define SR1 5 +#define SR2 1 +#define MSK1 0xbff7ffbfU +#define MSK2 0xfdfffffeU +#define MSK3 0xf7ffef7fU +#define MSK4 0xf2f7cbbfU +#define PARITY1 0x00000001U +#define PARITY2 0x00000000U +#define PARITY3 0x00000000U +#define PARITY4 0x41dfa600U + + +/* PARAMETERS FOR ALTIVEC */ +#if defined(__APPLE__) /* For OSX */ + #define ALTI_SL1 (vector unsigned int)(SL1, SL1, SL1, SL1) + #define ALTI_SR1 (vector unsigned int)(SR1, SR1, SR1, SR1) + #define ALTI_MSK (vector unsigned int)(MSK1, MSK2, MSK3, MSK4) + #define ALTI_MSK64 \ + (vector unsigned int)(MSK2, MSK1, MSK4, MSK3) + #define ALTI_SL2_PERM \ + (vector unsigned char)(1,2,3,23,5,6,7,0,9,10,11,4,13,14,15,8) + #define ALTI_SL2_PERM64 \ + (vector unsigned char)(1,2,3,4,5,6,7,31,9,10,11,12,13,14,15,0) + #define ALTI_SR2_PERM \ + (vector unsigned char)(7,0,1,2,11,4,5,6,15,8,9,10,17,12,13,14) + #define ALTI_SR2_PERM64 \ + (vector unsigned char)(15,0,1,2,3,4,5,6,17,8,9,10,11,12,13,14) +#else /* For OTHER OSs(Linux?) */ + #define ALTI_SL1 {SL1, SL1, SL1, SL1} + #define ALTI_SR1 {SR1, SR1, SR1, SR1} + #define ALTI_MSK {MSK1, MSK2, MSK3, MSK4} + #define ALTI_MSK64 {MSK2, MSK1, MSK4, MSK3} + #define ALTI_SL2_PERM {1,2,3,23,5,6,7,0,9,10,11,4,13,14,15,8} + #define ALTI_SL2_PERM64 {1,2,3,4,5,6,7,31,9,10,11,12,13,14,15,0} + #define ALTI_SR2_PERM {7,0,1,2,11,4,5,6,15,8,9,10,17,12,13,14} + #define ALTI_SR2_PERM64 {15,0,1,2,3,4,5,6,17,8,9,10,11,12,13,14} +#endif /* For OSX */ +#define IDSTR "SFMT-2281:12-19-1-5-1:bff7ffbf-fdfffffe-f7ffef7f-f2f7cbbf" + +#endif /* SFMT_PARAMS2281_H */ diff --git a/src/sms/SFMT/SFMT-params4253.h b/src/sms/SFMT/SFMT-params4253.h new file mode 100644 index 0000000..f391a70 --- /dev/null +++ b/src/sms/SFMT/SFMT-params4253.h @@ -0,0 +1,46 @@ +#ifndef SFMT_PARAMS4253_H +#define SFMT_PARAMS4253_H + +#define POS1 17 +#define SL1 20 +#define SL2 1 +#define SR1 7 +#define SR2 1 +#define MSK1 0x9f7bffffU +#define MSK2 0x9fffff5fU +#define MSK3 0x3efffffbU +#define MSK4 0xfffff7bbU +#define PARITY1 0xa8000001U +#define PARITY2 0xaf5390a3U +#define PARITY3 0xb740b3f8U +#define PARITY4 0x6c11486dU + + +/* PARAMETERS FOR ALTIVEC */ +#if defined(__APPLE__) /* For OSX */ + #define ALTI_SL1 (vector unsigned int)(SL1, SL1, SL1, SL1) + #define ALTI_SR1 (vector unsigned int)(SR1, SR1, SR1, SR1) + #define ALTI_MSK (vector unsigned int)(MSK1, MSK2, MSK3, MSK4) + #define ALTI_MSK64 \ + (vector unsigned int)(MSK2, MSK1, MSK4, MSK3) + #define ALTI_SL2_PERM \ + (vector unsigned char)(1,2,3,23,5,6,7,0,9,10,11,4,13,14,15,8) + #define ALTI_SL2_PERM64 \ + (vector unsigned char)(1,2,3,4,5,6,7,31,9,10,11,12,13,14,15,0) + #define ALTI_SR2_PERM \ + (vector unsigned char)(7,0,1,2,11,4,5,6,15,8,9,10,17,12,13,14) + #define ALTI_SR2_PERM64 \ + (vector unsigned char)(15,0,1,2,3,4,5,6,17,8,9,10,11,12,13,14) +#else /* For OTHER OSs(Linux?) */ + #define ALTI_SL1 {SL1, SL1, SL1, SL1} + #define ALTI_SR1 {SR1, SR1, SR1, SR1} + #define ALTI_MSK {MSK1, MSK2, MSK3, MSK4} + #define ALTI_MSK64 {MSK2, MSK1, MSK4, MSK3} + #define ALTI_SL2_PERM {1,2,3,23,5,6,7,0,9,10,11,4,13,14,15,8} + #define ALTI_SL2_PERM64 {1,2,3,4,5,6,7,31,9,10,11,12,13,14,15,0} + #define ALTI_SR2_PERM {7,0,1,2,11,4,5,6,15,8,9,10,17,12,13,14} + #define ALTI_SR2_PERM64 {15,0,1,2,3,4,5,6,17,8,9,10,11,12,13,14} +#endif /* For OSX */ +#define IDSTR "SFMT-4253:17-20-1-7-1:9f7bffff-9fffff5f-3efffffb-fffff7bb" + +#endif /* SFMT_PARAMS4253_H */ diff --git a/src/sms/SFMT/SFMT-params44497.h b/src/sms/SFMT/SFMT-params44497.h new file mode 100644 index 0000000..ddef00d --- /dev/null +++ b/src/sms/SFMT/SFMT-params44497.h @@ -0,0 +1,46 @@ +#ifndef SFMT_PARAMS44497_H +#define SFMT_PARAMS44497_H + +#define POS1 330 +#define SL1 5 +#define SL2 3 +#define SR1 9 +#define SR2 3 +#define MSK1 0xeffffffbU +#define MSK2 0xdfbebfffU +#define MSK3 0xbfbf7befU +#define MSK4 0x9ffd7bffU +#define PARITY1 0x00000001U +#define PARITY2 0x00000000U +#define PARITY3 0xa3ac4000U +#define PARITY4 0xecc1327aU + + +/* PARAMETERS FOR ALTIVEC */ +#if defined(__APPLE__) /* For OSX */ + #define ALTI_SL1 (vector unsigned int)(SL1, SL1, SL1, SL1) + #define ALTI_SR1 (vector unsigned int)(SR1, SR1, SR1, SR1) + #define ALTI_MSK (vector unsigned int)(MSK1, MSK2, MSK3, MSK4) + #define ALTI_MSK64 \ + (vector unsigned int)(MSK2, MSK1, MSK4, MSK3) + #define ALTI_SL2_PERM \ + (vector unsigned char)(3,21,21,21,7,0,1,2,11,4,5,6,15,8,9,10) + #define ALTI_SL2_PERM64 \ + (vector unsigned char)(3,4,5,6,7,29,29,29,11,12,13,14,15,0,1,2) + #define ALTI_SR2_PERM \ + (vector unsigned char)(5,6,7,0,9,10,11,4,13,14,15,8,19,19,19,12) + #define ALTI_SR2_PERM64 \ + (vector unsigned char)(13,14,15,0,1,2,3,4,19,19,19,8,9,10,11,12) +#else /* For OTHER OSs(Linux?) */ + #define ALTI_SL1 {SL1, SL1, SL1, SL1} + #define ALTI_SR1 {SR1, SR1, SR1, SR1} + #define ALTI_MSK {MSK1, MSK2, MSK3, MSK4} + #define ALTI_MSK64 {MSK2, MSK1, MSK4, MSK3} + #define ALTI_SL2_PERM {3,21,21,21,7,0,1,2,11,4,5,6,15,8,9,10} + #define ALTI_SL2_PERM64 {3,4,5,6,7,29,29,29,11,12,13,14,15,0,1,2} + #define ALTI_SR2_PERM {5,6,7,0,9,10,11,4,13,14,15,8,19,19,19,12} + #define ALTI_SR2_PERM64 {13,14,15,0,1,2,3,4,19,19,19,8,9,10,11,12} +#endif /* For OSX */ +#define IDSTR "SFMT-44497:330-5-3-9-3:effffffb-dfbebfff-bfbf7bef-9ffd7bff" + +#endif /* SFMT_PARAMS44497_H */ diff --git a/src/sms/SFMT/SFMT-params607.h b/src/sms/SFMT/SFMT-params607.h new file mode 100644 index 0000000..fc2be6d --- /dev/null +++ b/src/sms/SFMT/SFMT-params607.h @@ -0,0 +1,46 @@ +#ifndef SFMT_PARAMS607_H +#define SFMT_PARAMS607_H + +#define POS1 2 +#define SL1 15 +#define SL2 3 +#define SR1 13 +#define SR2 3 +#define MSK1 0xfdff37ffU +#define MSK2 0xef7f3f7dU +#define MSK3 0xff777b7dU +#define MSK4 0x7ff7fb2fU +#define PARITY1 0x00000001U +#define PARITY2 0x00000000U +#define PARITY3 0x00000000U +#define PARITY4 0x5986f054U + + +/* PARAMETERS FOR ALTIVEC */ +#if defined(__APPLE__) /* For OSX */ + #define ALTI_SL1 (vector unsigned int)(SL1, SL1, SL1, SL1) + #define ALTI_SR1 (vector unsigned int)(SR1, SR1, SR1, SR1) + #define ALTI_MSK (vector unsigned int)(MSK1, MSK2, MSK3, MSK4) + #define ALTI_MSK64 \ + (vector unsigned int)(MSK2, MSK1, MSK4, MSK3) + #define ALTI_SL2_PERM \ + (vector unsigned char)(3,21,21,21,7,0,1,2,11,4,5,6,15,8,9,10) + #define ALTI_SL2_PERM64 \ + (vector unsigned char)(3,4,5,6,7,29,29,29,11,12,13,14,15,0,1,2) + #define ALTI_SR2_PERM \ + (vector unsigned char)(5,6,7,0,9,10,11,4,13,14,15,8,19,19,19,12) + #define ALTI_SR2_PERM64 \ + (vector unsigned char)(13,14,15,0,1,2,3,4,19,19,19,8,9,10,11,12) +#else /* For OTHER OSs(Linux?) */ + #define ALTI_SL1 {SL1, SL1, SL1, SL1} + #define ALTI_SR1 {SR1, SR1, SR1, SR1} + #define ALTI_MSK {MSK1, MSK2, MSK3, MSK4} + #define ALTI_MSK64 {MSK2, MSK1, MSK4, MSK3} + #define ALTI_SL2_PERM {3,21,21,21,7,0,1,2,11,4,5,6,15,8,9,10} + #define ALTI_SL2_PERM64 {3,4,5,6,7,29,29,29,11,12,13,14,15,0,1,2} + #define ALTI_SR2_PERM {5,6,7,0,9,10,11,4,13,14,15,8,19,19,19,12} + #define ALTI_SR2_PERM64 {13,14,15,0,1,2,3,4,19,19,19,8,9,10,11,12} +#endif /* For OSX */ +#define IDSTR "SFMT-607:2-15-3-13-3:fdff37ff-ef7f3f7d-ff777b7d-7ff7fb2f" + +#endif /* SFMT_PARAMS607_H */ diff --git a/src/sms/SFMT/SFMT-params86243.h b/src/sms/SFMT/SFMT-params86243.h new file mode 100644 index 0000000..3b52b76 --- /dev/null +++ b/src/sms/SFMT/SFMT-params86243.h @@ -0,0 +1,46 @@ +#ifndef SFMT_PARAMS86243_H +#define SFMT_PARAMS86243_H + +#define POS1 366 +#define SL1 6 +#define SL2 7 +#define SR1 19 +#define SR2 1 +#define MSK1 0xfdbffbffU +#define MSK2 0xbff7ff3fU +#define MSK3 0xfd77efffU +#define MSK4 0xbf9ff3ffU +#define PARITY1 0x00000001U +#define PARITY2 0x00000000U +#define PARITY3 0x00000000U +#define PARITY4 0xe9528d85U + + +/* PARAMETERS FOR ALTIVEC */ +#if defined(__APPLE__) /* For OSX */ + #define ALTI_SL1 (vector unsigned int)(SL1, SL1, SL1, SL1) + #define ALTI_SR1 (vector unsigned int)(SR1, SR1, SR1, SR1) + #define ALTI_MSK (vector unsigned int)(MSK1, MSK2, MSK3, MSK4) + #define ALTI_MSK64 \ + (vector unsigned int)(MSK2, MSK1, MSK4, MSK3) + #define ALTI_SL2_PERM \ + (vector unsigned char)(25,25,25,25,3,25,25,25,7,0,1,2,11,4,5,6) + #define ALTI_SL2_PERM64 \ + (vector unsigned char)(7,25,25,25,25,25,25,25,15,0,1,2,3,4,5,6) + #define ALTI_SR2_PERM \ + (vector unsigned char)(7,0,1,2,11,4,5,6,15,8,9,10,17,12,13,14) + #define ALTI_SR2_PERM64 \ + (vector unsigned char)(15,0,1,2,3,4,5,6,17,8,9,10,11,12,13,14) +#else /* For OTHER OSs(Linux?) */ + #define ALTI_SL1 {SL1, SL1, SL1, SL1} + #define ALTI_SR1 {SR1, SR1, SR1, SR1} + #define ALTI_MSK {MSK1, MSK2, MSK3, MSK4} + #define ALTI_MSK64 {MSK2, MSK1, MSK4, MSK3} + #define ALTI_SL2_PERM {25,25,25,25,3,25,25,25,7,0,1,2,11,4,5,6} + #define ALTI_SL2_PERM64 {7,25,25,25,25,25,25,25,15,0,1,2,3,4,5,6} + #define ALTI_SR2_PERM {7,0,1,2,11,4,5,6,15,8,9,10,17,12,13,14} + #define ALTI_SR2_PERM64 {15,0,1,2,3,4,5,6,17,8,9,10,11,12,13,14} +#endif /* For OSX */ +#define IDSTR "SFMT-86243:366-6-7-19-1:fdbffbff-bff7ff3f-fd77efff-bf9ff3ff" + +#endif /* SFMT_PARAMS86243_H */ diff --git a/src/sms/analysis.c b/src/sms/analysis.c new file mode 100644 index 0000000..89d4b4a --- /dev/null +++ b/src/sms/analysis.c @@ -0,0 +1,563 @@ +/* + * Copyright (c) 2008 MUSIC TECHNOLOGY GROUP (MTG) + * UNIVERSITAT POMPEU FABRA + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/*! \file analysis.c + * \brief main sms analysis routines + * + * the analysis routine here calls all necessary functions to perform the complete + * SMS analysis, once the desired analysis parameters are set in SMS_AnalParams. + */ + +#include "sms.h" + +/*! \brief maximum size for magnitude spectrum */ +#define SMS_MAX_SPEC 8192 + +/*! \brief compute spectrum, find peaks, and fundamental of one frame + * + * This is the main core of analysis calls + * + * \param iCurrentFrame frame number to be computed + * \param pAnalParams structure of analysis parameters + * \param fRefFundamental reference fundamental + */ +void sms_analyzeFrame(int iCurrentFrame, SMS_AnalParams *pAnalParams, sfloat fRefFundamental) +{ + int i, iFrame; + SMS_AnalFrame *pCurrentFrame = pAnalParams->ppFrames[iCurrentFrame]; + int iSoundLoc = pCurrentFrame->iFrameSample -((pCurrentFrame->iFrameSize + 1) >> 1) + 1; + sfloat *pFData = &(pAnalParams->soundBuffer.pFBuffer[iSoundLoc - pAnalParams->soundBuffer.iMarker]); + + /* TODO: this doesn't have to be done every time */ + int sizeWindow = pCurrentFrame->iFrameSize; + int sizeMag = sms_power2(sizeWindow); + sms_getWindow(sizeWindow, pAnalParams->spectrumWindow, pAnalParams->iWindowType); + sms_scaleWindow(sizeWindow, pAnalParams->spectrumWindow); + + /* compute the magnitude and (zero-windowed) phase spectra */ + sms_spectrum(sizeWindow, pFData, pAnalParams->spectrumWindow, sizeMag, + pAnalParams->magSpectrum, pAnalParams->phaseSpectrum, + pAnalParams->fftBuffer); + + /* convert magnitude spectra to dB */ + sms_arrayMagToDB(sizeMag, pAnalParams->magSpectrum); + + /* find the prominent peaks */ + pCurrentFrame->nPeaks = sms_detectPeaks(sizeMag, + pAnalParams->magSpectrum, + pAnalParams->phaseSpectrum, + pCurrentFrame->pSpectralPeaks, + pAnalParams); + + /* find a reference harmonic */ + if(pCurrentFrame->nPeaks > 0 && + (pAnalParams->iFormat == SMS_FORMAT_H || pAnalParams->iFormat == SMS_FORMAT_HP)) + pCurrentFrame->fFundamental = sms_harmDetection(pAnalParams->maxPeaks, pCurrentFrame->pSpectralPeaks, + fRefFundamental, pAnalParams->iRefHarmonic, + pAnalParams->fLowestFundamental, pAnalParams->fHighestFundamental, + pAnalParams->iSoundType, pAnalParams->fMinRefHarmMag, + pAnalParams->fRefHarmMagDiffFromMax); +} + +/*! \brief re-analyze the previous frames if necessary + * + * \todo explain when this is necessary + * + * \param iCurrentFrame current frame number + * \param pAnalParams structure with analysis parameters + * \return 1 if frames are good, -1 if analysis is necessary + * \todo is the return value info correct? Why isn't it used in sms_analyze? + */ +static int ReAnalyzeFrame(int iCurrentFrame, SMS_AnalParams *pAnalParams) +{ + sfloat fFund, fLastFund, fDev; + int iNewFrameSize, i; + sfloat fAvgDeviation = sms_fundDeviation(pAnalParams, iCurrentFrame); + int iFirstFrame = iCurrentFrame - pAnalParams->minGoodFrames; + + /*! \todo make this a < 0 check, but first make sure sms_fundDeviation does not + return values below zero */ + if(fAvgDeviation == -1) + return -1; + + /* if the last SMS_MIN_GOOD_FRAMES are stable look before them */ + /* and recompute the frames that are not stable */ + if (fAvgDeviation <= pAnalParams->maxDeviation) + { + for(i = 0; i < pAnalParams->analDelay; i++) + { + if(pAnalParams->ppFrames[iFirstFrame - i]->iFrameNum <= 0 || + pAnalParams->ppFrames[iFirstFrame - i]->iStatus == SMS_FRAME_RECOMPUTED) + return -1; + fFund = pAnalParams->ppFrames[iFirstFrame - i]->fFundamental; + fLastFund = pAnalParams->ppFrames[iFirstFrame - i + 1]->fFundamental; + fDev = fabs (fFund - fLastFund) / fLastFund; + iNewFrameSize = ((pAnalParams->iSamplingRate / fLastFund) * + pAnalParams->fSizeWindow/2) * 2 + 1; + + if(fFund <= 0 || fDev > .2 || + fabs((double)(pAnalParams->ppFrames[iFirstFrame - i]->iFrameSize - + iNewFrameSize)) / iNewFrameSize >= .2) + { + pAnalParams->ppFrames[iFirstFrame - i]->iFrameSize = iNewFrameSize; + pAnalParams->ppFrames[iFirstFrame - i]->iStatus = SMS_FRAME_READY; + + /* recompute frame */ + sms_analyzeFrame(iFirstFrame - i, pAnalParams, fLastFund); + pAnalParams->ppFrames[iFirstFrame - i]->iStatus = SMS_FRAME_RECOMPUTED; + + if(fabs(pAnalParams->ppFrames[iFirstFrame - i]->fFundamental - fLastFund) / + fLastFund >= .2) + return -1; + } + } + } + return 1; +} + +int sms_findPeaks(int sizeWaveform, sfloat *pWaveform, SMS_AnalParams *pAnalParams, SMS_SpectralPeaks *pSpectralPeaks) +{ + int iCurrentFrame = pAnalParams->iMaxDelayFrames - 1; /* frame # of current frame */ + sfloat fRefFundamental = 0; /* reference fundamental for current frame */ + int i, iError, iExtraSamples; /* samples used for next analysis frame */ + SMS_AnalFrame *pTmpAnalFrame; + + /* set initial analysis-window size */ + if(pAnalParams->windowSize == 0) + pAnalParams->windowSize = pAnalParams->iDefaultSizeWindow; + + /* fill sound buffer and perform pre-emphasis */ + if(sizeWaveform > 0) + sms_fillSoundBuffer(sizeWaveform, pWaveform, pAnalParams); + + /* move analysis data one frame back */ + pTmpAnalFrame = pAnalParams->ppFrames[0]; + for(i = 1; i < pAnalParams->iMaxDelayFrames; i++) + pAnalParams->ppFrames[i-1] = pAnalParams->ppFrames[i]; + pAnalParams->ppFrames[pAnalParams->iMaxDelayFrames-1] = pTmpAnalFrame; + + /* initialize the current frame */ + sms_initFrame(iCurrentFrame, pAnalParams, pAnalParams->windowSize); + + if(pAnalParams->ppFrames[iCurrentFrame]->iStatus == SMS_FRAME_READY) + { + sfloat fAvgDev = sms_fundDeviation(pAnalParams, iCurrentFrame - 1); + + /* if single note use the default fundamental as reference */ + if(pAnalParams->iSoundType == SMS_SOUND_TYPE_NOTE) + fRefFundamental = pAnalParams->fDefaultFundamental; + /* if sound is stable use the last fundamental as a reference */ + else if(fAvgDev != -1 && fAvgDev <= pAnalParams->maxDeviation) + fRefFundamental = pAnalParams->ppFrames[iCurrentFrame - 1]->fFundamental; + else + fRefFundamental = 0; + + /* compute spectrum, find peaks, and find fundamental of frame */ + sms_analyzeFrame(iCurrentFrame, pAnalParams, fRefFundamental); + + /* set the size of the next analysis window */ + if(pAnalParams->ppFrames[iCurrentFrame]->fFundamental > 0 && + pAnalParams->iSoundType != SMS_SOUND_TYPE_NOTE) + pAnalParams->windowSize = sms_sizeNextWindow(iCurrentFrame, pAnalParams); + + /* figure out how much needs to be read next time + * how many processed - sample no. of end of next frame + * = no. samples that we haven't processed yet from whenever, if sizeNextRead was 0 + */ + iExtraSamples = (pAnalParams->soundBuffer.iMarker + pAnalParams->soundBuffer.sizeBuffer) - + (pAnalParams->ppFrames[iCurrentFrame]->iFrameSample + pAnalParams->sizeHop); + + pAnalParams->sizeNextRead = MAX(0, (pAnalParams->windowSize+1)/2 - iExtraSamples); + ReAnalyzeFrame(iCurrentFrame, pAnalParams); + + /* save peaks */ + pSpectralPeaks->nPeaksFound = pAnalParams->ppFrames[iCurrentFrame]->nPeaks; + pSpectralPeaks->nPeaks = pAnalParams->maxPeaks; + + for(i = 0; i < pSpectralPeaks->nPeaks; i++) + { + if(i < pSpectralPeaks->nPeaksFound) + { + pSpectralPeaks->pSpectralPeaks[i].fMag = + sms_dBToMag(pAnalParams->ppFrames[iCurrentFrame]->pSpectralPeaks[i].fMag); + pSpectralPeaks->pSpectralPeaks[i].fFreq = + pAnalParams->ppFrames[iCurrentFrame]->pSpectralPeaks[i].fFreq; + pSpectralPeaks->pSpectralPeaks[i].fPhase = + pAnalParams->ppFrames[iCurrentFrame]->pSpectralPeaks[i].fPhase; + } + else + { + pSpectralPeaks->pSpectralPeaks[i].fMag = 0.0; + pSpectralPeaks->pSpectralPeaks[i].fFreq = 0.0; + pSpectralPeaks->pSpectralPeaks[i].fPhase = 0.0; + } + } + return pSpectralPeaks->nPeaks; + } + else + { + return 0; + } +} + +void sms_setPeaks(SMS_AnalParams *pAnalParams, int numamps, sfloat* amps, + int numfreqs, sfloat* freqs, int numphases, sfloat* phases) +{ + int i; + SMS_AnalFrame *tempFrame; + int currentFrame = pAnalParams->iMaxDelayFrames - 1; /* frame # of current frame */ + + /* move analysis data one frame back */ + tempFrame = pAnalParams->ppFrames[0]; + for(i = 1; i < pAnalParams->iMaxDelayFrames; i++) + pAnalParams->ppFrames[i-1] = pAnalParams->ppFrames[i]; + pAnalParams->ppFrames[pAnalParams->iMaxDelayFrames-1] = tempFrame; + + /* initialize the current frame */ + SMS_AnalFrame *frame = pAnalParams->ppFrames[currentFrame]; + sms_initFrame(currentFrame, pAnalParams, 0); + if(sms_errorCheck()) + { + printf("Error in init frame: %s \n", sms_errorString()); + return; + } + + for(i = 0; i < numamps; i++) + { + /* copy current peaks data */ + frame->pSpectralPeaks[i].fMag = sms_magToDB(amps[i]); + frame->pSpectralPeaks[i].fFreq = freqs[i]; + frame->pSpectralPeaks[i].fPhase = phases[i]; + } + frame->nPeaks = numamps; + frame->iStatus = SMS_FRAME_READY; + + /* harmonic detection */ + if(frame->nPeaks > 0 && + (pAnalParams->iFormat == SMS_FORMAT_H || pAnalParams->iFormat == SMS_FORMAT_HP)) + { + /* get a reference fundamental */ + sfloat refFundamental = 0; + sfloat avgDeviation = sms_fundDeviation(pAnalParams, currentFrame-1); + if(pAnalParams->iSoundType == SMS_SOUND_TYPE_NOTE) + refFundamental = pAnalParams->fDefaultFundamental; + /* if sound is stable use the last fundamental as a reference */ + else if(avgDeviation != -1 && avgDeviation <= pAnalParams->maxDeviation) + refFundamental = pAnalParams->ppFrames[currentFrame-1]->fFundamental; + else + refFundamental = 0; + + frame->fFundamental = sms_harmDetection(frame->nPeaks, frame->pSpectralPeaks, + refFundamental, pAnalParams->iRefHarmonic, + pAnalParams->fLowestFundamental, pAnalParams->fHighestFundamental, + pAnalParams->iSoundType, pAnalParams->fMinRefHarmMag, + pAnalParams->fRefHarmMagDiffFromMax); + } +} + +int sms_findPartials(SMS_Data *pSmsData, SMS_AnalParams *pAnalParams) +{ + int currentFrame = pAnalParams->iMaxDelayFrames - 1; + + /* set the frame delay, checking that it does not exceed the given maximum + * + * TODO: check for good values of pAnalParams->minGoodFrames and + * pAnalParams->analDelay here too? Or figure out why sms_crashes if + * pAnalParamx->iMaxDelayFrames is changed without changing the other + * two variables. + */ + int delayFrames = pAnalParams->minGoodFrames + pAnalParams->analDelay; + if(delayFrames > (pAnalParams->iMaxDelayFrames - 1)) + delayFrames = pAnalParams->iMaxDelayFrames - 1; + + /* clear SMS output */ + sms_clearFrame(pSmsData); + + /* incorporate the peaks into the corresponding tracks */ + if(pAnalParams->ppFrames[currentFrame-delayFrames]->fFundamental > 0 || + ((pAnalParams->iFormat == SMS_FORMAT_IH || pAnalParams->iFormat == SMS_FORMAT_IHP) && + pAnalParams->ppFrames[currentFrame-delayFrames]->nPeaks > 0)) + { + sms_peakContinuation(currentFrame-delayFrames, pAnalParams); + } + + /* fill gaps and delete short tracks */ + if(pAnalParams->iCleanTracks > 0) + { + sms_cleanTracks(currentFrame-delayFrames, pAnalParams); + } + + /* output data */ + int length = sizeof(sfloat) * pSmsData->nTracks; + memcpy((char *) pSmsData->pFSinFreq, (char *) + pAnalParams->ppFrames[0]->deterministic.pFSinFreq, length); + memcpy((char *) pSmsData->pFSinAmp, (char *) + pAnalParams->ppFrames[0]->deterministic.pFSinAmp, length); + + /* convert mags back to linear */ + sms_arrayDBToMag(pSmsData->nTracks, pSmsData->pFSinAmp); + + if(pAnalParams->iFormat == SMS_FORMAT_HP || + pAnalParams->iFormat == SMS_FORMAT_IHP) + memcpy((char *) pSmsData->pFSinPha, (char *) + pAnalParams->ppFrames[0]->deterministic.pFSinPha, length); + + return 1; +} + +int sms_findResidual(int sizeSynthesis, sfloat* pSynthesis, + int sizeOriginal, sfloat* pOriginal, + SMS_ResidualParams *residualParams) +{ + if(residualParams->hopSize < sizeOriginal) + { + sms_error("Residual signal length is smaller than the original signal length"); + return -1; + } + + sms_residual(residualParams->hopSize, pSynthesis, pOriginal, residualParams); + sms_filterHighPass(residualParams->hopSize, + residualParams->residual, + residualParams->samplingRate); + return 0; +} + +int sms_analyze(int sizeWaveform, sfloat *pWaveform, SMS_Data *pSmsData, SMS_AnalParams *pAnalParams) +{ + int iCurrentFrame = pAnalParams->iMaxDelayFrames - 1; /* frame # of current frame */ + int i, iError, iExtraSamples; /* samples used for next analysis frame */ + sfloat fRefFundamental = 0; /* reference fundamental for current frame */ + SMS_AnalFrame *pTmpAnalFrame; + + /* set the frame delay, checking that it does not exceed the given maximum + * + * TODO: check for good values of pAnalParams->minGoodFrames and + * pAnalParams->analDelay here too? Or figure out why sms_crashes if + * pAnalParamx->iMaxDelayFrames is changed without changing the other + * two variables. + */ + int delayFrames = pAnalParams->minGoodFrames + pAnalParams->analDelay; + if(delayFrames > (pAnalParams->iMaxDelayFrames - 1)) + delayFrames = pAnalParams->iMaxDelayFrames - 1; + + /* clear SMS output */ + sms_clearFrame(pSmsData); + + /* set initial analysis-window size */ + if(pAnalParams->windowSize == 0) + pAnalParams->windowSize = pAnalParams->iDefaultSizeWindow; + + /* fill the input sound buffer and perform pre-emphasis */ + if(sizeWaveform > 0) + sms_fillSoundBuffer(sizeWaveform, pWaveform, pAnalParams); + + /* move analysis data one frame back */ + pTmpAnalFrame = pAnalParams->ppFrames[0]; + for(i = 1; i < pAnalParams->iMaxDelayFrames; i++) + pAnalParams->ppFrames[i-1] = pAnalParams->ppFrames[i]; + pAnalParams->ppFrames[pAnalParams->iMaxDelayFrames-1] = pTmpAnalFrame; + + /* initialize the current frame */ + sms_initFrame(iCurrentFrame, pAnalParams, pAnalParams->windowSize); + if(sms_errorCheck()) + { + printf("error in init frame: %s \n", sms_errorString()); + return -1; + } + + /* if right data in the sound buffer do analysis */ + if(pAnalParams->ppFrames[iCurrentFrame]->iStatus == SMS_FRAME_READY) + { + sfloat fAvgDev = sms_fundDeviation(pAnalParams, iCurrentFrame - 1); + + /* if single note use the default fundamental as reference */ + if(pAnalParams->iSoundType == SMS_SOUND_TYPE_NOTE) + fRefFundamental = pAnalParams->fDefaultFundamental; + /* if sound is stable use the last fundamental as a reference */ + else if(fAvgDev != -1 && fAvgDev <= pAnalParams->maxDeviation) + fRefFundamental = pAnalParams->ppFrames[iCurrentFrame - 1]->fFundamental; + else + fRefFundamental = 0; + + /* compute spectrum, find peaks, and find fundamental of frame */ + sms_analyzeFrame(iCurrentFrame, pAnalParams, fRefFundamental); + + /* set the size of the next analysis window */ + if(pAnalParams->ppFrames[iCurrentFrame]->fFundamental > 0 && + pAnalParams->iSoundType != SMS_SOUND_TYPE_NOTE) + pAnalParams->windowSize = sms_sizeNextWindow (iCurrentFrame, pAnalParams); + + /* figure out how much needs to be read next time */ + iExtraSamples = + (pAnalParams->soundBuffer.iMarker + pAnalParams->soundBuffer.sizeBuffer) - + (pAnalParams->ppFrames[iCurrentFrame]->iFrameSample + pAnalParams->sizeHop); + + pAnalParams->sizeNextRead = MAX(0, (pAnalParams->windowSize+1)/2 - iExtraSamples); + + /* check again the previous frames and recompute if necessary */ + ReAnalyzeFrame(iCurrentFrame, pAnalParams); + } + + /* incorporate the peaks into the corresponding tracks */ + /* This is done after a pAnalParams->iMaxDelayFrames delay */ + if(pAnalParams->ppFrames[iCurrentFrame - delayFrames]->fFundamental > 0 || + ((pAnalParams->iFormat == SMS_FORMAT_IH || pAnalParams->iFormat == SMS_FORMAT_IHP) && + pAnalParams->ppFrames[iCurrentFrame - delayFrames]->nPeaks > 0)) + sms_peakContinuation(iCurrentFrame - delayFrames, pAnalParams); + + /* fill gaps and delete short tracks */ + if(pAnalParams->iCleanTracks > 0 && + pAnalParams->ppFrames[iCurrentFrame - delayFrames]->iStatus != SMS_FRAME_EMPTY) + sms_cleanTracks(iCurrentFrame - delayFrames, pAnalParams); + + /* do stochastic analysis */ + if(pAnalParams->iStochasticType != SMS_STOC_NONE) + { + /* synthesize deterministic signal */ + if(pAnalParams->ppFrames[1]->iStatus != SMS_FRAME_EMPTY && + pAnalParams->ppFrames[1]->iStatus != SMS_FRAME_END) + { + /* shift synthesis buffer */ + memcpy(pAnalParams->synthBuffer.pFBuffer, + pAnalParams->synthBuffer.pFBuffer+pAnalParams->sizeHop, + sizeof(sfloat) * pAnalParams->sizeHop); + memset(pAnalParams->synthBuffer.pFBuffer+pAnalParams->sizeHop, + 0, sizeof(sfloat) * pAnalParams->sizeHop); + + /* get deterministic signal with phase */ + sms_sineSynthFrame(&pAnalParams->ppFrames[1]->deterministic, + pAnalParams->synthBuffer.pFBuffer+pAnalParams->sizeHop, + pAnalParams->sizeHop, &pAnalParams->prevFrame, + pAnalParams->iSamplingRate); + } + + /* perform stochastic analysis after 1 frame of the */ + /* deterministic synthesis because it needs two frames */ + if(pAnalParams->ppFrames[0]->iStatus != SMS_FRAME_EMPTY && + pAnalParams->ppFrames[0]->iStatus != SMS_FRAME_END) + { + int iSoundLoc = pAnalParams->ppFrames[0]->iFrameSample - pAnalParams->sizeHop; + sfloat *pOriginal = &(pAnalParams->soundBuffer.pFBuffer[iSoundLoc - + pAnalParams->soundBuffer.iMarker]); + + int sizeData = MIN(pAnalParams->soundBuffer.sizeBuffer - + (iSoundLoc - pAnalParams->soundBuffer.iMarker), + pAnalParams->residualParams.residualSize); + if(sizeData > pAnalParams->residualParams.residualSize) + { + sms_error("Residual size larger than expected."); + return -1; + } + else if(sizeData < pAnalParams->residualParams.residualSize) + { + /* should only happen if we're at the end of a sound, unless hop size changes */ + /* TODO: should the window type be set to pAnalParams->iWindowType? */ + sms_getWindow(sizeData, pAnalParams->residualParams.fftWindow, SMS_WIN_HAMMING); + sms_scaleWindow(sizeData, pAnalParams->residualParams.fftWindow); + } + + /* obtain residual sound from original and synthesized sounds. accumulate the residual percentage.*/ + pAnalParams->fResidualAccumPerc += sms_residual(sizeData, + pAnalParams->synthBuffer.pFBuffer, + pOriginal, + &pAnalParams->residualParams); + + if(pAnalParams->iStochasticType == SMS_STOC_APPROX) + { + /* filter residual with a high pass filter (it solves some problems) */ + sms_filterHighPass(sizeData, pAnalParams->residualParams.residual, pAnalParams->iSamplingRate); + + /* approximate residual */ + sms_stocAnalysis(sizeData, pAnalParams->residualParams.residual, pAnalParams->residualParams.fftWindow, + pSmsData, pAnalParams); + } + else if(pAnalParams->iStochasticType == SMS_STOC_IFFT) + { + int sizeMag = sms_power2(sizeData >> 1); + sms_spectrum(sizeData, pAnalParams->residualParams.residual, pAnalParams->residualParams.fftWindow, + sizeMag, pSmsData->pFStocCoeff, pSmsData->pResPhase, + pAnalParams->fftBuffer); + } + + /* get sharper transitions in deterministic representation */ + sms_scaleDet(pAnalParams->synthBuffer.pFBuffer, pOriginal, + pAnalParams->ppFrames[0]->deterministic.pFSinAmp, + pAnalParams, pSmsData->nTracks); + + pAnalParams->ppFrames[0]->iStatus = SMS_FRAME_DONE; + } + } + else if(pAnalParams->ppFrames[0]->iStatus != SMS_FRAME_EMPTY && + pAnalParams->ppFrames[0]->iStatus != SMS_FRAME_END) + pAnalParams->ppFrames[0]->iStatus = SMS_FRAME_DONE; + + /* get the result */ + if(pAnalParams->ppFrames[0]->iStatus == SMS_FRAME_EMPTY) + { + /* no partials yet, so output the current peaks for testing */ + int numPeaks = pAnalParams->ppFrames[iCurrentFrame]->nPeaks; + int numTracks = pSmsData->nTracks; + numTracks = MIN(numPeaks, numTracks); + for(i = 0; i < numTracks; i++) + { + pSmsData->pFSinFreq[i] = pAnalParams->ppFrames[iCurrentFrame]->pSpectralPeaks[i].fFreq; + pSmsData->pFSinAmp[i] = sms_dBToMag(pAnalParams->ppFrames[iCurrentFrame]->pSpectralPeaks[i].fMag); + if(pAnalParams->iFormat == SMS_FORMAT_HP || pAnalParams->iFormat == SMS_FORMAT_IHP) + { + pSmsData->pFSinPha[i] = pAnalParams->ppFrames[iCurrentFrame]->pSpectralPeaks[i].fPhase; + } + } + pSmsData->nTracks = numTracks; + return 0; + } + /* return analysis data */ + else if(pAnalParams->ppFrames[0]->iStatus == SMS_FRAME_DONE) + { + /* put data into output */ + int length = sizeof(sfloat) * pSmsData->nTracks; + memcpy((char *) pSmsData->pFSinFreq, (char *) + pAnalParams->ppFrames[0]->deterministic.pFSinFreq, length); + memcpy((char *) pSmsData->pFSinAmp, (char *) + pAnalParams->ppFrames[0]->deterministic.pFSinAmp, length); + + /* convert mags back to linear */ + sms_arrayDBToMag(pSmsData->nTracks, pSmsData->pFSinAmp); + if(pAnalParams->iFormat == SMS_FORMAT_HP || pAnalParams->iFormat == SMS_FORMAT_IHP) + memcpy((char *) pSmsData->pFSinPha, (char *) + pAnalParams->ppFrames[0]->deterministic.pFSinPha, length); + + /* do post-processing (for now, spectral envelope calculation and storage) */ + if(pAnalParams->specEnvParams.iType != SMS_ENV_NONE) + { + sms_spectralEnvelope(pSmsData, &pAnalParams->specEnvParams); + } + return 1; + } + /* done, end of sound */ + else if(pAnalParams->ppFrames[0]->iStatus == SMS_FRAME_END) + return -1; + else + { + sms_error("sms_analyze error: wrong status of frame."); + return -1; + } + return 1; +} diff --git a/src/sms/cepstrum.c b/src/sms/cepstrum.c new file mode 100644 index 0000000..8a56787 --- /dev/null +++ b/src/sms/cepstrum.c @@ -0,0 +1,259 @@ +/* + * Copyright (c) 2008 MUSIC TECHNOLOGY GROUP (MTG) + * UNIVERSITAT POMPEU FABRA + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +/*! \file cepstrum.c + * \brief routines for different Fast Fourier Transform Algorithms + * + */ + +#include "sms.h" +#include +#include +#include + +#define COEF ( 8 * powf(PI, 2)) +#define CHOLESKY 1 + +typedef struct +{ + int nPoints; + int nCoeff; + gsl_matrix *pM; + gsl_matrix *pMt; + gsl_matrix *pR; + gsl_matrix *pMtMR; + gsl_vector *pXk; + gsl_vector *pMtXk; + gsl_vector *pC; + gsl_permutation *pPerm; +} CepstrumMatrices; + +void FreeDCepstrum(CepstrumMatrices *m) +{ + gsl_matrix_free(m->pM); + gsl_matrix_free(m->pMt); + gsl_matrix_free(m->pR); + gsl_matrix_free(m->pMtMR); + gsl_vector_free(m->pXk); + gsl_vector_free(m->pMtXk); + gsl_vector_free(m->pC); + gsl_permutation_free (m->pPerm); + +} + +void AllocateDCepstrum(int nPoints, int nCoeff, CepstrumMatrices *m) +{ + if(m->nPoints != 0 || m->nCoeff != 0) + FreeDCepstrum(m); + m->nPoints = nPoints; + m->nCoeff = nCoeff; + m->pM = gsl_matrix_alloc(nPoints, nCoeff); + m->pMt = gsl_matrix_alloc(nCoeff, nPoints); + m->pR = gsl_matrix_calloc(nCoeff, nCoeff); + m->pMtMR = gsl_matrix_alloc(nCoeff, nCoeff); + m->pXk = gsl_vector_alloc(nPoints); + m->pMtXk = gsl_vector_alloc(nCoeff); + m->pC = gsl_vector_alloc(nCoeff); + m->pPerm = gsl_permutation_alloc (nCoeff); +} + +/*! \brief Discrete Cepstrum Transform + * + * method for computing cepstrum aenalysis from a discrete + * set of partial peaks (frequency and amplitude) + * + * This implementation is owed to the help of Jordi Janer (thanks!) from the MTG, + * along with the following paper: + * "Regularization Techniques for Discrete Cepstrum Estimation" + * Olivier Cappe and Eric Moulines, IEEE Signal Processing Letters, Vol. 3 + * No.4, April 1996 + * + * \todo add anchor point add at frequency = 0 with the same magnitude as the first + * peak in pMag. This does not change the size of the cepstrum, only helps to smoothen it + * at the very beginning. + * + * \param sizeCepstrum order+1 of the discrete cepstrum + * \param pCepstrum pointer to output array of cepstrum coefficients + * \param sizeFreq number of partials peaks (the size of pFreq should be the same as pMag + * \param pFreq pointer to partial peak frequencies (hertz) + * \param pMag pointer to partial peak magnitudes (linear) + * \param fLambda regularization factor + * \param iMaxFreq maximum frequency of cepstrum + */ +void sms_dCepstrum( int sizeCepstrum, sfloat *pCepstrum, int sizeFreq, sfloat *pFreq, sfloat *pMag, + sfloat fLambda, int iMaxFreq) +{ + int i, k; + sfloat factor; + sfloat fNorm = PI / (sfloat)iMaxFreq; /* value to normalize frequencies to 0:0.5 */ + //static sizeCepstrumStatic + static CepstrumMatrices m; + //printf("nPoints: %d, nCoeff: %d \n", m.nPoints, m.nCoeff); + if(m.nPoints != sizeCepstrum || m.nCoeff != sizeFreq) + AllocateDCepstrum(sizeFreq, sizeCepstrum, &m); + int s; /* signum: "(-1)^n, where n is the number of interchanges in the permutation." */ + /* compute matrix M (eq. 4)*/ + for (i=0; iiEnvelope == SMS_ENV_CEP, will return cepstrum coefficeints + * If pSmsData->iEnvelope == SMS_ENV_FBINS, will return linear magnitude spectrum + * + * \param pSmsData pointer to SMS_Data structure with all the arrays necessary + * \param pSpecEnvParams pointer to a structure of parameters for spectral enveloping + */ +void sms_spectralEnvelope( SMS_Data *pSmsData, SMS_SEnvParams *pSpecEnvParams) +{ + int i, k; + int sizeCepstrum = pSpecEnvParams->iOrder+1; + //int nPeaks = 0; + static sfloat pFreqBuff[1000], pMagBuff[1000]; + + /* \todo see if this memset is even necessary, once working */ + //memset(pSmsData->pSpecEnv, 0, pSpecEnvParams->nCoeff * sizeof(sfloat)); + + /* try to store cepstrum coefficients in pSmsData->nEnvCoeff always. + if cepstrum is what is wanted, memset the rest. otherwise, hand this array 2x to dCepstrumEnvelope */ + if(pSpecEnvParams->iOrder + 1> pSmsData->nEnvCoeff) + { + sms_error("cepstrum order is larger than the size of the spectral envelope"); + return; + } + + /* find out how many tracks were actually found... many are zero + \todo is this necessary? */ + for(i = 0, k=0; i < pSmsData->nTracks; i++) + { + if(pSmsData->pFSinFreq[i] > 0.00001) + { + if(pSpecEnvParams->iAnchor != 0) + { + if(k == 0) /* add anchor at beginning */ + + { + pFreqBuff[k] = 0.0; + pMagBuff[k] = pSmsData->pFSinAmp[i]; + k++; + } + } + pFreqBuff[k] = pSmsData->pFSinFreq[i]; + pMagBuff[k] = pSmsData->pFSinAmp[i]; + k++; + } + } + /* \todo see if adding an anchor at the max freq helps */ + + + if(k < 1) // how few can this be? try out a few in python + return; + sms_dCepstrum(sizeCepstrum, pSmsData->pSpecEnv, k, pFreqBuff, pMagBuff, + pSpecEnvParams->fLambda, pSpecEnvParams->iMaxFreq); + + if(pSpecEnvParams->iType == SMS_ENV_FBINS) + { + sms_dCepstrumEnvelope(sizeCepstrum, pSmsData->pSpecEnv, + pSpecEnvParams->nCoeff, pSmsData->pSpecEnv); + } +} diff --git a/src/sms/fileIO.c b/src/sms/fileIO.c new file mode 100644 index 0000000..e870c5a --- /dev/null +++ b/src/sms/fileIO.c @@ -0,0 +1,559 @@ +/* + * Copyright (c) 2008 MUSIC TECHNOLOGY GROUP (MTG) + * UNIVERSITAT POMPEU FABRA + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +/*! \file fileIO.c + * \brief SMS file input and output + */ + +#include "sms.h" + +/*! \brief file identification constant + * + * constant number that is first within SMS_Header, in order to correctly + * identify an SMS file when read. + */ +#define SMS_MAGIC 767 + +static char pChTextString[1000]; /*!< string to store analysis parameters in sms header */ + +/*! \brief initialize the header structure of an SMS file + * + * \param pSmsHeader header for SMS file + */ +void sms_initHeader(SMS_Header *pSmsHeader) +{ + pSmsHeader->iSmsMagic = SMS_MAGIC; + pSmsHeader->iHeadBSize = sizeof(SMS_Header); + pSmsHeader->nFrames = 0; + pSmsHeader->iFrameBSize = 0; + pSmsHeader->iFormat = SMS_FORMAT_H; + pSmsHeader->iFrameRate = 0; + pSmsHeader->iStochasticType = SMS_STOC_APPROX; + pSmsHeader->nTracks = 0; + pSmsHeader->nStochasticCoeff = 0; + pSmsHeader->nEnvCoeff = 0; + pSmsHeader->iMaxFreq = 0; + pSmsHeader->fResidualPerc = 0; +} + +/*! \brief fill an SMS header with necessary information for storage + * + * copies parameters from SMS_AnalParams, along with other values + * so an SMS file can be stored and correctly synthesized at a later + * time. This is somewhat of a convenience function. + * + * sms_initAnal() should be done first to properly set everything. + * + * \param pSmsHeader header for SMS file (to be stored) + * \param pAnalParams structure of analysis parameters + * \param pProgramString pointer to a string containing the name of the program that made the analysis data + */ +void sms_fillHeader(SMS_Header *pSmsHeader, SMS_AnalParams *pAnalParams, char *pProgramString) +{ + sms_initHeader(pSmsHeader); + pSmsHeader->nFrames = pAnalParams->nFrames; + pSmsHeader->iFormat = pAnalParams->iFormat; + pSmsHeader->iFrameRate = pAnalParams->iFrameRate; + pSmsHeader->iStochasticType = pAnalParams->iStochasticType; + pSmsHeader->nTracks = pAnalParams->nTracks; + pSmsHeader->iSamplingRate = pAnalParams->iSamplingRate; + if(pAnalParams->iStochasticType == SMS_STOC_NONE) + pSmsHeader->nStochasticCoeff = 0; + else + pSmsHeader->nStochasticCoeff = pAnalParams->nStochasticCoeff; + pSmsHeader->iEnvType = pAnalParams->specEnvParams.iType; + pSmsHeader->nEnvCoeff = pAnalParams->specEnvParams.nCoeff; + pSmsHeader->iMaxFreq = (int)pAnalParams->fHighestFreq; + pSmsHeader->iFrameBSize = sms_frameSizeB(pSmsHeader); +} + +/*! \brief write SMS header to file + * + * \param pChFileName file name for SMS file + * \param pSmsHeader header for SMS file + * \param ppSmsFile (double pointer to) file to be created + * \return error code \see SMS_WRERR in SMS_ERRORS + */ +int sms_writeHeader(char *pChFileName, SMS_Header *pSmsHeader, FILE **ppSmsFile) +{ + int iVariableSize = 0; + + if(pSmsHeader->iSmsMagic != SMS_MAGIC) + { + sms_error("not an SMS file"); + return -1; + } + if((*ppSmsFile = fopen (pChFileName, "w+")) == NULL) + { + sms_error("cannot open file for writing"); + return -1; + } + + pSmsHeader->iHeadBSize = sizeof(SMS_Header); + + /* write header */ + if(fwrite((void *)pSmsHeader, (size_t)1, (size_t)sizeof(SMS_Header), + *ppSmsFile) < (size_t)sizeof(SMS_Header)) + { + sms_error("cannot write output file"); + return(-1); + } + return 0; +} + +/*! \brief rewrite SMS header and close file + * + * \param pSmsFile pointer to SMS file + * \param pSmsHeader pointer to header for SMS file + * \return error code \see SMS_WRERR in SMS_ERRORS + */ +int sms_writeFile(FILE *pSmsFile, SMS_Header *pSmsHeader) +{ + int iVariableSize; + rewind(pSmsFile); + + pSmsHeader->iHeadBSize = sizeof(SMS_Header); + + /* write header */ + if(fwrite((void *)pSmsHeader, (size_t)1, (size_t)sizeof(SMS_Header), + pSmsFile) < (size_t)sizeof(SMS_Header)) + { + sms_error("cannot write output file (header)"); + return -1; + } + + fclose(pSmsFile); + return 0; +} + +/*! \brief write SMS frame + * + * \param pSmsFile pointer to SMS file + * \param pSmsHeader pointer to SMS header + * \param pSmsFrame pointer to SMS data frame + * \return 0 on success, -1 on failure + */ +int sms_writeFrame(FILE *pSmsFile, SMS_Header *pSmsHeader, SMS_Data *pSmsFrame) +{ + if (fwrite((void *)pSmsFrame->pSmsData, 1, pSmsHeader->iFrameBSize, + pSmsFile) < (unsigned int) pSmsHeader->iFrameBSize) + { + sms_error("cannot write frame to output file"); + return -1; + } + return 0; +} + +/*! \brief get the size in bytes of the frame in a SMS file + * + * \param pSmsHeader pointer to SMS header + * \return the size in bytes of the frame + */ +int sms_frameSizeB(SMS_Header *pSmsHeader) +{ + int iSize, nDet; + + if(pSmsHeader->iFormat == SMS_FORMAT_H || + pSmsHeader->iFormat == SMS_FORMAT_IH) + nDet = 2;/* freq, mag */ + else + nDet = 3; /* freq, mag, phase */ + + iSize = sizeof (sfloat) * (nDet * pSmsHeader->nTracks); + + if(pSmsHeader->iStochasticType == SMS_STOC_APPROX) + { /* stocCoeff + 1 (gain) */ + iSize += sizeof(sfloat) * (pSmsHeader->nStochasticCoeff + 1); + } + else if(pSmsHeader->iStochasticType == SMS_STOC_IFFT) + { + /* sizeFFT*2 + 1 (gain) */ + iSize += sizeof(sfloat) * (pSmsHeader->nStochasticCoeff * 2 + 1); + } + iSize += sizeof(sfloat) * pSmsHeader->nEnvCoeff; + return iSize; +} + +/*! \brief function to read SMS header + * + * \param pChFileName file name for SMS file + * \param ppSmsHeader (double pointer to) SMS header + * \param ppSmsFile (double pointer to) inputfile + * \return error code \see SMS_ERRORS + */ +int sms_getHeader(char *pChFileName, SMS_Header **ppSmsHeader, FILE **ppSmsFile) +{ + int iHeadBSize, iFrameBSize, nFrames; + int iMagicNumber; + + /* open file for reading */ + if((*ppSmsFile = fopen (pChFileName, "r")) == NULL) + { + sms_error("could not open SMS header"); + return -1; + } + /* read magic number */ + if(fread((void *) &iMagicNumber, (size_t) sizeof(int), (size_t)1, + *ppSmsFile) < (size_t)1) + { + sms_error("could not read SMS header"); + return -1; + } + + if(iMagicNumber != SMS_MAGIC) + { + sms_error("not an SMS file"); + return -1; + } + + /* read size of of header */ + if(fread((void *) &iHeadBSize, (size_t) sizeof(int), (size_t)1, + *ppSmsFile) < (size_t)1) + { + sms_error("could not read SMS header (iHeadBSize)"); + return -1; + } + + if(iHeadBSize <= 0) + { + sms_error("bad SMS header size"); + return -1; + } + + /* read number of data Frames */ + if(fread((void *) &nFrames, (size_t) sizeof(int), (size_t)1, + *ppSmsFile) < (size_t)1) + { + sms_error("could not read SMS number of frames"); + return -1; + } + + if(nFrames <= 0) + { + sms_error("number of frames <= 0"); + return -1; + } + + /* read size of data Frames */ + if(fread((void *) &iFrameBSize, (size_t) sizeof(int), (size_t)1, + *ppSmsFile) < (size_t)1) + { + sms_error("could not read size of SMS data"); + return -1; + } + + if(iFrameBSize <= 0) + { + sms_error("size bytes of frames <= 0"); + return -1; + } + + /* allocate memory for header */ + if(((*ppSmsHeader) = (SMS_Header *)malloc (iHeadBSize)) == NULL) + { + sms_error("cannot allocate memory for header"); + return -1; + } + + /* read header */ + rewind(*ppSmsFile); + if(fread ((void *) (*ppSmsHeader), 1, iHeadBSize, *ppSmsFile) < (unsigned int) iHeadBSize) + { + sms_error("cannot read header of SMS file"); + return -1; + } + + return 0; +} + +/*! \brief read an SMS data frame + * + * \param pSmsFile pointer to SMS file + * \param pSmsHeader pointer to SMS header + * \param iFrame frame number + * \param pSmsFrame pointer to SMS frame + * \return 0 on sucess, -1 on error + */ +int sms_getFrame(FILE *pSmsFile, SMS_Header *pSmsHeader, int iFrame, SMS_Data *pSmsFrame) +{ + if(fseek(pSmsFile, pSmsHeader->iHeadBSize + iFrame * + pSmsHeader->iFrameBSize, SEEK_SET) < 0) + { + sms_error("cannot seek to the SMS frame"); + return -1; + } + if((pSmsHeader->iFrameBSize = + fread((void *)pSmsFrame->pSmsData, (size_t)1, + (size_t)pSmsHeader->iFrameBSize, pSmsFile)) + != pSmsHeader->iFrameBSize) + { + sms_error("cannot read SMS frame"); + return -1; + } + return 0; +} + +/*! \brief allocate memory for a frame of SMS data + * + * \param pSmsFrame pointer to a frame of SMS data + * \param nTracks number of sinusoidal tracks in frame + * \param nStochCoeff number of stochastic coefficients in frame + * \param iPhase whether phase information is in the frame + * \param stochType stochastic resynthesis type + * \param nStochCoeff number of envelope coefficients in frame + * \param nEnvCoeff number of envelope coefficients in frame + * \return 0 on success, -1 on error + */ +int sms_allocFrame(SMS_Data *pSmsFrame, int nTracks, int nStochCoeff, int iPhase, + int stochType, int nEnvCoeff) +{ + sfloat *dataPos; /* a marker to locate specific data witin smsData */ + + /* calculate size of frame */ + int sizeData = sizeof(sfloat); /* nSamples */ + /* frequencies and magnitudes */ + sizeData += 2 * nTracks * sizeof(sfloat); + /* phases */ + if(iPhase > 0) + sizeData += nTracks * sizeof(sfloat); + /* stochastic coefficients */ + if(stochType == SMS_STOC_APPROX) + sizeData += (nStochCoeff + 1) * sizeof(sfloat); + else if(stochType == SMS_STOC_IFFT) + sizeData += ((2*nStochCoeff) + 1) * sizeof(sfloat); + /* spectral envelope */ + sizeData += nEnvCoeff * sizeof(sfloat); /* add in number of envelope coefficients (cep or fbins) if any */ + + /* allocate memory for data */ + pSmsFrame->pSmsData = (sfloat *)malloc(sizeData); + if(pSmsFrame->pSmsData == NULL) + { + sms_error("cannot allocate memory for SMS frame data"); + return -1; + } + memset(pSmsFrame->pSmsData, 0, sizeData); + + /* set the variables in the structure */ + /* \todo why not set these in init functions, then allocate with them?? */ + pSmsFrame->sizeData = sizeData; + pSmsFrame->nTracks = nTracks; + pSmsFrame->nCoeff = nStochCoeff; + pSmsFrame->nEnvCoeff = nEnvCoeff; + + /* set pointers to data types within smsData array */ + pSmsFrame->pFSinFreq = pSmsFrame->pSmsData; + dataPos = (sfloat *)(pSmsFrame->pFSinFreq + nTracks); + + pSmsFrame->pFSinAmp = dataPos; + dataPos = (sfloat *)(pSmsFrame->pFSinAmp + nTracks); + + if(iPhase > 0) + { + pSmsFrame->pFSinPha = dataPos; + dataPos = (sfloat *)(pSmsFrame->pFSinPha + nTracks); + } + else + pSmsFrame->pFSinPha = NULL; + + if(stochType == SMS_STOC_APPROX) + { + pSmsFrame->pFStocCoeff = dataPos; + dataPos = (sfloat *)(pSmsFrame->pFStocCoeff + nStochCoeff); + + pSmsFrame->pFStocGain = dataPos; + dataPos = (sfloat *)(pSmsFrame->pFStocGain + 1); + } + else if(stochType == SMS_STOC_IFFT) + { + pSmsFrame->pFStocCoeff = dataPos; + dataPos = (sfloat *)(pSmsFrame->pFStocCoeff + nStochCoeff); + pSmsFrame->pResPhase = dataPos; + dataPos = (sfloat *)(pSmsFrame->pResPhase + nStochCoeff); + pSmsFrame->pFStocGain = dataPos; + dataPos = (sfloat *)(pSmsFrame->pFStocGain + 1); + } + else + { + pSmsFrame->pFStocCoeff = NULL; + pSmsFrame->pResPhase = NULL; + pSmsFrame->pFStocGain = NULL; + } + + if(nEnvCoeff > 0) + pSmsFrame->pSpecEnv = dataPos; + else + pSmsFrame->pSpecEnv = NULL; + + return 0; +} + +/*! \brief function to allocate an SMS data frame using an SMS_Header + * + * this one is used when you have only read the header, such as after + * opening a file. + * + * \param pSmsHeader pointer to SMS header + * \param pSmsFrame pointer to SMS frame + * \return 0 on success, -1 on error + */ +int sms_allocFrameH(SMS_Header *pSmsHeader, SMS_Data *pSmsFrame) +{ + int iPhase = (pSmsHeader->iFormat == SMS_FORMAT_HP || + pSmsHeader->iFormat == SMS_FORMAT_IHP) ? 1 : 0; + return sms_allocFrame(pSmsFrame, pSmsHeader->nTracks, + pSmsHeader->nStochasticCoeff, iPhase, + pSmsHeader->iStochasticType, + pSmsHeader->nEnvCoeff); +} + +/*! \brief free the SMS data structure + * + * \param pSmsFrame pointer to frame of SMS data + */ +void sms_freeFrame(SMS_Data *pSmsFrame) +{ + if(!pSmsFrame) + return; + + if(pSmsFrame->pSmsData) + free(pSmsFrame->pSmsData); + + pSmsFrame->nTracks = 0; + pSmsFrame->nCoeff = 0; + pSmsFrame->sizeData = 0; + pSmsFrame->pFSinFreq = NULL; + pSmsFrame->pFSinAmp = NULL; + pSmsFrame->pFStocCoeff = NULL; + pSmsFrame->pResPhase = NULL; + pSmsFrame->pFStocGain = NULL; +} + +/*! \brief clear the SMS data structure + * + * \param pSmsFrame pointer to frame of SMS data + */ +void sms_clearFrame(SMS_Data *pSmsFrame) +{ + memset(pSmsFrame->pSmsData, 0, pSmsFrame->sizeData); +} + +/*! \brief copy a frame of SMS_Data + * + * \param pCopySmsData copy of frame + * \param pOriginalSmsData original frame + * + */ +void sms_copyFrame(SMS_Data *pCopySmsData, SMS_Data *pOriginalSmsData) +{ + /* if the two frames are the same size just copy data */ + if(pCopySmsData->sizeData == pOriginalSmsData->sizeData && + pCopySmsData->nTracks == pOriginalSmsData->nTracks) + { + memcpy((char *)pCopySmsData->pSmsData, + (char *)pOriginalSmsData->pSmsData, + pCopySmsData->sizeData); + } + /* if frames is different size copy the smallest */ + else + { + int nTracks = MIN(pCopySmsData->nTracks, pOriginalSmsData->nTracks); + int nCoeff = MIN(pCopySmsData->nCoeff, pOriginalSmsData->nCoeff); + + pCopySmsData->nTracks = nTracks; + pCopySmsData->nCoeff = nCoeff; + memcpy((char *)pCopySmsData->pFSinFreq, + (char *)pOriginalSmsData->pFSinFreq, + sizeof(sfloat) * nTracks); + memcpy((char *)pCopySmsData->pFSinAmp, + (char *)pOriginalSmsData->pFSinAmp, + sizeof(sfloat) * nTracks); + if(pOriginalSmsData->pFSinPha != NULL && + pCopySmsData->pFSinPha != NULL) + memcpy((char *)pCopySmsData->pFSinPha, + (char *)pOriginalSmsData->pFSinPha, + sizeof(sfloat) * nTracks); + if(pOriginalSmsData->pFStocCoeff != NULL && + pCopySmsData->pFStocCoeff != NULL) + { + if(pOriginalSmsData->pResPhase != NULL && + pCopySmsData->pResPhase != NULL) + memcpy((char *)pCopySmsData->pResPhase, + (char *)pOriginalSmsData->pResPhase, + sizeof(sfloat) * nCoeff); + } + if(pOriginalSmsData->pFStocGain != NULL && + pCopySmsData->pFStocGain != NULL) + memcpy((char *)pCopySmsData->pFStocGain, + (char *)pOriginalSmsData->pFStocGain, + sizeof(sfloat)); + } +} + +/*! \brief function to interpolate two SMS frames + * + * this assumes that the two frames are of the same size + * + * \param pSmsFrame1 sms frame 1 + * \param pSmsFrame2 sms frame 2 + * \param pSmsFrameOut sms output frame + * \param fInterpFactor interpolation factor + */ +void sms_interpolateFrames(SMS_Data *pSmsFrame1, SMS_Data *pSmsFrame2, + SMS_Data *pSmsFrameOut, sfloat fInterpFactor) +{ + int i; + sfloat fFreq1, fFreq2; + + /* interpolate the deterministic part */ + for(i = 0; i < pSmsFrame1->nTracks; i++) + { + fFreq1 = pSmsFrame1->pFSinFreq[i]; + fFreq2 = pSmsFrame2->pFSinFreq[i]; + if(fFreq1 == 0) + fFreq1 = fFreq2; + if(fFreq2 == 0) + fFreq2 = fFreq1; + pSmsFrameOut->pFSinFreq[i] = fFreq1 + fInterpFactor * (fFreq2 - fFreq1); + pSmsFrameOut->pFSinAmp[i] = + pSmsFrame1->pFSinAmp[i] + fInterpFactor * + (pSmsFrame2->pFSinAmp[i] - pSmsFrame1->pFSinAmp[i]); + } + + /* interpolate the stochastic part. The pointer is non-null when the frame contains + stochastic coefficients */ + if(pSmsFrameOut->pFStocGain) + { + *(pSmsFrameOut->pFStocGain) = + *(pSmsFrame1->pFStocGain) + fInterpFactor * + (*(pSmsFrame2->pFStocGain) - *(pSmsFrame1->pFStocGain)); + } + /*! \todo how to interpolate residual phase spectrum */ + for(i = 0; i < pSmsFrame1->nCoeff; i++) + pSmsFrameOut->pFStocCoeff[i] = + pSmsFrame1->pFStocCoeff[i] + fInterpFactor * + (pSmsFrame2->pFStocCoeff[i] - pSmsFrame1->pFStocCoeff[i]); + + /* DO NEXT: interpolate spec env here if fbins */ + for(i = 0; i < pSmsFrame1->nEnvCoeff; i++) + pSmsFrameOut->pSpecEnv[i] = + pSmsFrame1->pSpecEnv[i] + fInterpFactor * + (pSmsFrame2->pSpecEnv[i] - pSmsFrame1->pSpecEnv[i]); +} + diff --git a/src/sms/filters.c b/src/sms/filters.c new file mode 100644 index 0000000..7f31317 --- /dev/null +++ b/src/sms/filters.c @@ -0,0 +1,190 @@ +/* + * Copyright (c) 2008 MUSIC TECHNOLOGY GROUP (MTG) + * UNIVERSITAT POMPEU FABRA + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +/*! \file filters.c + * \brief various filters + */ + +#include "sms.h" + +/*! \brief coefficient for pre_emphasis filter */ +#define SMS_EMPH_COEF .9 + +/* pre-emphasis filter function, it returns the filtered value + * + * sfloat fInput; sound sample + */ +sfloat sms_preEmphasis(sfloat fInput, SMS_AnalParams *pAnalParams) +{ + if(pAnalParams->preEmphasis) + { + sfloat fOutput = fInput - SMS_EMPH_COEF * pAnalParams->preEmphasisLastValue; + pAnalParams->preEmphasisLastValue = fOutput; + return fOutput; + } + return fInput; +} + +/* de-emphasis filter function, it returns the filtered value + * + * sfloat fInput; sound input + */ +sfloat sms_deEmphasis(sfloat fInput, SMS_SynthParams *pSynthParams) +{ + if(pSynthParams->deEmphasis) + { + sfloat fOutput = fInput + SMS_EMPH_COEF * pSynthParams->deEmphasisLastValue; + pSynthParams->deEmphasisLastValue = fInput; + return fOutput; + } + return fInput; +} + +/*! \brief function to implement a zero-pole filter + * + * \todo will forgetting to reset pD to zero at the beginning of a new analysis + * (when there are multiple analyses within the life of one program) + * cause problems? + * + * \param pFa pointer to numerator coefficients + * \param pFb pointer to denominator coefficients + * \param nCoeff number of coefficients + * \param fInput input sample + * \return value is the filtered sample + */ +static sfloat ZeroPoleFilter(sfloat *pFa, sfloat *pFb, int nCoeff, sfloat fInput ) +{ + double fOut = 0; + int iSection; + static sfloat pD[5] = {0, 0, 0, 0, 0}; + + pD[0] = fInput; + for (iSection = nCoeff-1; iSection > 0; iSection--) + { + fOut = fOut + pFa[iSection] * pD[iSection]; + pD[0] = pD[0] - pFb[iSection] * pD[iSection]; + pD[iSection] = pD [iSection-1]; + } + fOut = fOut + pFa[0] * pD[0]; + return (sfloat) fOut; +} + +/*! \brief function to filter a waveform with a high-pass filter + * + * cutoff =1500 Hz + * + * \todo this filter only works on sample rates up to 48k? + * + * \param sizeResidual size of signal + * \param pResidual pointer to residual signal + * \param iSamplingRate sampling rate of signal + */ +void sms_filterHighPass(int sizeResidual, sfloat *pResidual, int iSamplingRate) +{ + /* cutoff 800Hz */ + static sfloat pFCoeff32k[10] = {0.814255, -3.25702, 4.88553, -3.25702, + 0.814255, 1, -3.58973, 4.85128, -2.92405, 0.66301}; + static sfloat pFCoeff36k[10] = {0.833098, -3.33239, 4.99859, -3.33239, + 0.833098, 1, -3.63528, 4.97089, -3.02934,0.694052}; + static sfloat pFCoeff40k[10] = {0.848475, -3.3939, 5.09085, -3.3939, + 0.848475, 1, -3.67173, 5.068, -3.11597, 0.71991}; + static sfloat pFCoeff441k[10] = {0.861554, -3.44622, 5.16932, -3.44622, + 0.861554, 1, -3.70223, 5.15023, -3.19013, 0.742275}; + static sfloat pFCoeff48k[10] = {0.872061, -3.48824, 5.23236, -3.48824, + 0.872061, 1, -3.72641, 5.21605, -3.25002, 0.76049}; + sfloat *pFCoeff, fSample = 0; + int i; + + if(iSamplingRate <= 32000) + pFCoeff = pFCoeff32k; + else if(iSamplingRate <= 36000) + pFCoeff = pFCoeff36k; + else if(iSamplingRate <= 40000) + pFCoeff = pFCoeff40k; + else if(iSamplingRate <= 44100) + pFCoeff = pFCoeff441k; + else + pFCoeff = pFCoeff48k; + + for(i = 0; i < sizeResidual; i++) + { + /* try to avoid underflow when there is nothing to filter */ + if(i > 0 && fSample == 0 && pResidual[i] == 0) + return; + + fSample = pResidual[i]; + pResidual[i] = ZeroPoleFilter (&pFCoeff[0], &pFCoeff[5], 5, fSample); + } +} + +/*! \brief a spectral filter + * + * filter each point of the current array by the surounding + * points using a triangular window + * + * \param pFArray two dimensional input array + * \param size1 vertical size of pFArray + * \param size2 horizontal size of pFArray + * \param pFOutArray output array of size size1 + */ +void sms_filterArray(sfloat *pFArray, int size1, int size2, sfloat *pFOutArray) +{ + int i, j, iPoint, iFrame, size2_2 = size2-2, size2_1 = size2-1; + sfloat *pFCurrentArray = pFArray + (size2_1) * size1; + sfloat fVal, fWeighting, fTotalWeighting, fTmpVal; + + /* find the filtered envelope */ + for(i = 0; i < size1; i++) + { + fVal = pFCurrentArray[i]; + fTotalWeighting = 1; + /* filter by the surrounding points */ + for(j = 1; j < (size2_2); j++) + { + fWeighting = (sfloat) size2 / (1+ j); + /* filter on the vertical dimension */ + /* consider the lower points */ + iPoint = i - (size2_1) + j; + if(iPoint >= 0) + { + fVal += pFCurrentArray[iPoint] * fWeighting; + fTotalWeighting += fWeighting; + } + /* consider the higher points */ + iPoint = i + (size2_1) - j; + if(iPoint < size1) + { + fVal += pFCurrentArray[iPoint] * fWeighting; + fTotalWeighting += fWeighting; + } + /*filter on the horizontal dimension */ + /* consider the previous points */ + iFrame = j; + fTmpVal = pFArray[iFrame*size1 + i]; + if(fTmpVal) + { + fVal += fTmpVal * fWeighting; + fTotalWeighting += fWeighting; + } + } + /* scale value by weighting */ + pFOutArray[i] = fVal / fTotalWeighting; + } +} diff --git a/src/sms/fixTracks.c b/src/sms/fixTracks.c new file mode 100644 index 0000000..109d854 --- /dev/null +++ b/src/sms/fixTracks.c @@ -0,0 +1,259 @@ +/* + * Copyright (c) 2008 MUSIC TECHNOLOGY GROUP (MTG) + * UNIVERSITAT POMPEU FABRA + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +/*! \file fixTracks.c + * \brief functions for making smoothly evolving tracks (partial frequencies) + * + * Tries to fix gaps and short tracks + */ + +#include "sms.h" + +/*! \brief fill a gap in a given track + * + * \param iCurrentFrame currrent frame number + * \param iTrack track to be filled + * \param pIState pointer to the state of tracks + * \param pAnalParams pointer to analysis parameters + */ +static void FillGap(int iCurrentFrame, int iTrack, int *pIState, + SMS_AnalParams *pAnalParams) +{ + int iFrame, iLastFrame = - (pIState[iTrack] - 1); + sfloat fConstant = TWO_PI / pAnalParams->iSamplingRate; + sfloat fFirstMag, fFirstFreq, fLastMag, fLastFreq, fIncrMag, fIncrFreq, + fMag, fTmpPha, fFreq; + + if(iCurrentFrame - iLastFrame < 0) + return; + + /* if firstMag is 0 it means that there is no Gap, just the begining of a track */ + if(pAnalParams->ppFrames[iCurrentFrame - + iLastFrame]->deterministic.pFSinAmp[iTrack] == 0) + { + pIState[iTrack] = 1; + return; + } + + fFirstMag = + pAnalParams->ppFrames[iCurrentFrame - iLastFrame]->deterministic.pFSinAmp[iTrack]; + fFirstFreq = + pAnalParams->ppFrames[iCurrentFrame - iLastFrame]->deterministic.pFSinFreq[iTrack]; + fLastMag = pAnalParams->ppFrames[iCurrentFrame]->deterministic.pFSinAmp[iTrack]; + fLastFreq = pAnalParams->ppFrames[iCurrentFrame]->deterministic.pFSinFreq[iTrack]; + fIncrMag = (fLastMag - fFirstMag) / iLastFrame; + fIncrFreq = (fLastFreq - fFirstFreq) / iLastFrame; + + /* if inharmonic format and the two extremes are very different */ + /* do not interpolate, it means that they are different tracks */ + if((pAnalParams->iFormat == SMS_FORMAT_IH || + pAnalParams->iFormat == SMS_FORMAT_IHP) && + (MIN (fFirstFreq, fLastFreq) * .5 * pAnalParams->fFreqDeviation < + fabs(fLastFreq - fFirstFreq))) + { + pIState[iTrack] = 1; + return; + } + + fMag = fFirstMag; + fFreq = fFirstFreq; + /* fill the gap by interpolating values */ + /* if the gap is too long it should consider the lower partials */ + for(iFrame = iCurrentFrame - iLastFrame + 1; iFrame < iCurrentFrame; iFrame++) + { + /* interpolate magnitude */ + fMag += fIncrMag; + pAnalParams->ppFrames[iFrame]->deterministic.pFSinAmp[iTrack] = fMag; + /* interpolate frequency */ + fFreq += fIncrFreq; + pAnalParams->ppFrames[iFrame]->deterministic.pFSinFreq[iTrack] = fFreq; + /*interpolate phase (this may not be the right way) */ + fTmpPha = + pAnalParams->ppFrames[iFrame-1]->deterministic.pFSinPha[iTrack] - + (pAnalParams->ppFrames[iFrame-1]->deterministic.pFSinFreq[iTrack] * + fConstant) * pAnalParams->sizeHop; + pAnalParams->ppFrames[iFrame]->deterministic.pFSinPha[iTrack] = + fTmpPha - floor(fTmpPha/ TWO_PI) * TWO_PI; + } + + if(pAnalParams->iDebugMode == SMS_DBG_CLEAN_TRAJ || + pAnalParams->iDebugMode == SMS_DBG_ALL) + { + fprintf (stdout, "fillGap: track %d, frames %d to %d filled\n", + iTrack, pAnalParams->ppFrames[iCurrentFrame-iLastFrame + 1]->iFrameNum, + pAnalParams->ppFrames[iCurrentFrame-1]->iFrameNum); + fprintf (stdout, "firstFreq %f lastFreq %f, firstMag %f lastMag %f\n", + fFirstFreq, fLastFreq, fFirstMag, fLastMag); + + } + + /* reset status */ + pIState[iTrack] = pAnalParams->iMinTrackLength; +} + + +/*! \brief delete a short track + * + * this function is not exported to sms.h + * + * \param iCurrentFrame current frame + * \param iTrack track to be deleted + * \param pIState pointer to the state of tracks + * \param pAnalParams pointer to analysis parameters + */ +static void DeleteShortTrack(int iCurrentFrame, int iTrack, int *pIState, + SMS_AnalParams *pAnalParams) +{ + int iFrame, frame; + + for(iFrame = 1; iFrame <= pIState[iTrack]; iFrame++) + { + frame = iCurrentFrame - iFrame; + + if(frame <= 0) + return; + + pAnalParams->ppFrames[frame]->deterministic.pFSinAmp[iTrack] = 0; + pAnalParams->ppFrames[frame]->deterministic.pFSinFreq[iTrack] = 0; + pAnalParams->ppFrames[frame]->deterministic.pFSinPha[iTrack] = 0; + } + + if(pAnalParams->iDebugMode == SMS_DBG_CLEAN_TRAJ || + pAnalParams->iDebugMode == SMS_DBG_ALL) + fprintf(stdout, "deleteShortTrack: track %d, frames %d to %d deleted\n", + iTrack, pAnalParams->ppFrames[iCurrentFrame - pIState[iTrack]]->iFrameNum, + pAnalParams->ppFrames[iCurrentFrame-1]->iFrameNum); + + /* reset state */ + pIState[iTrack] = -pAnalParams->iMaxSleepingTime; +} + +/*! \brief fill gaps and delete short tracks + * + * \param iCurrentFrame current frame number + * \param pAnalParams pointer to analysis parameters + */ +void sms_cleanTracks(int iCurrentFrame, SMS_AnalParams *pAnalParams) +{ + int iTrack, iLength, iFrame; + + /* if fundamental and first partial are short, delete everything */ + if((pAnalParams->iFormat == SMS_FORMAT_H || pAnalParams->iFormat == SMS_FORMAT_HP) && + pAnalParams->ppFrames[iCurrentFrame]->deterministic.pFSinAmp[0] == 0 && + pAnalParams->guideStates[0] > 0 && + pAnalParams->guideStates[0] < pAnalParams->iMinTrackLength && + pAnalParams->ppFrames[iCurrentFrame]->deterministic.pFSinAmp[1] == 0 && + pAnalParams->guideStates[1] > 0 && + pAnalParams->guideStates[1] < pAnalParams->iMinTrackLength) + { + iLength = pAnalParams->guideStates[0]; + for(iTrack = 0; iTrack < pAnalParams->nGuides; iTrack++) + { + for(iFrame = 1; iFrame <= iLength; iFrame++) + { + if((iCurrentFrame - iFrame) >= 0) + { + pAnalParams->ppFrames[iCurrentFrame - + iFrame]->deterministic.pFSinAmp[iTrack] = 0; + pAnalParams->ppFrames[iCurrentFrame - + iFrame]->deterministic.pFSinFreq[iTrack] = 0; + pAnalParams->ppFrames[iCurrentFrame - + iFrame]->deterministic.pFSinPha[iTrack] = 0; + } + } + pAnalParams->guideStates[iTrack] = -pAnalParams->iMaxSleepingTime; + } + if(pAnalParams->iDebugMode == SMS_DBG_CLEAN_TRAJ || + pAnalParams->iDebugMode == SMS_DBG_ALL) + { + fprintf(stdout, "cleanTrack: frame %d to frame %d deleted\n", + pAnalParams->ppFrames[iCurrentFrame-iLength]->iFrameNum, + pAnalParams->ppFrames[iCurrentFrame-1]->iFrameNum); + } + + return; + } + + /* check every partial individually */ + for(iTrack = 0; iTrack < pAnalParams->nGuides; iTrack++) + { + /* track after gap */ + if(pAnalParams->ppFrames[iCurrentFrame]->deterministic.pFSinAmp[iTrack] != 0) + { + if(pAnalParams->guideStates[iTrack] < 0 && + pAnalParams->guideStates[iTrack] > -pAnalParams->iMaxSleepingTime) + FillGap (iCurrentFrame, iTrack, pAnalParams->guideStates, pAnalParams); + else + pAnalParams->guideStates[iTrack] = + (pAnalParams->guideStates[iTrack]<0) ? 1 : pAnalParams->guideStates[iTrack]+1; + } + /* gap after track */ + else + { + if(pAnalParams->guideStates[iTrack] > 0 && + pAnalParams->guideStates[iTrack] < pAnalParams->iMinTrackLength) + DeleteShortTrack (iCurrentFrame, iTrack, pAnalParams->guideStates, pAnalParams); + else + pAnalParams->guideStates[iTrack] = + (pAnalParams->guideStates[iTrack]>0) ? -1 : pAnalParams->guideStates[iTrack]-1; + } + } + return; +} + +/*! \brief scale deterministic magnitude if synthesis is larger than original + * + * \param pFSynthBuffer synthesis buffer + * \param pFOriginalBuffer original sound + * \param pFSinAmp magnitudes to be scaled + * \param pAnalParams pointer to analysis parameters + * \param nTrack number of tracks + */ +void sms_scaleDet(sfloat *pFSynthBuffer, sfloat *pFOriginalBuffer, + sfloat *pFSinAmp, SMS_AnalParams *pAnalParams, int nTrack) +{ + sfloat fOriginalMag = 0, fSynthesisMag = 0; + sfloat fCosScaleFactor; + int iTrack, i; + + /* get sound energy */ + for(i = 0; i < pAnalParams->sizeHop; i++) + { + fOriginalMag += fabs(pFOriginalBuffer[i]); + fSynthesisMag += fabs(pFSynthBuffer[i]); + } + + /* if total energy of deterministic sound is larger than original, + scale deterministic representation */ + if(fSynthesisMag > (1.5 * fOriginalMag)) + { + fCosScaleFactor = fOriginalMag / fSynthesisMag; + + if(pAnalParams->iDebugMode == SMS_DBG_CLEAN_TRAJ || + pAnalParams->iDebugMode == SMS_DBG_ALL) + fprintf(stdout, "Frame %d: magnitude scaled by %f\n", + pAnalParams->ppFrames[0]->iFrameNum, fCosScaleFactor); + + for(iTrack = 0; iTrack < nTrack; iTrack++) + if(pFSinAmp[iTrack] > 0) + pFSinAmp[iTrack] = sms_magToDB(sms_dBToMag(pFSinAmp[iTrack]) * fCosScaleFactor); + } +} + diff --git a/src/sms/harmDetection.c b/src/sms/harmDetection.c new file mode 100644 index 0000000..bf99729 --- /dev/null +++ b/src/sms/harmDetection.c @@ -0,0 +1,390 @@ +/* + * Copyright (c) 2008 MUSIC TECHNOLOGY GROUP (MTG) + * UNIVERSITAT POMPEU FABRA + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +/*! \file harmDetection.c + * \brief Detection of a given harmonic + */ + +#include "sms.h" + +#define N_FUND_HARM 6 /*!< number of harmonics to use for fundamental detection */ +#define N_HARM_PEAKS 4 /*!< number of peaks to check as possible ref harmonics */ +#define FREQ_DEV_THRES .07 /*!< threshold for deviation from perfect harmonics */ +#define MAG_PERC_THRES .6 /*!< threshold for magnitude of harmonics + with respect to the total magnitude */ +#define HARM_RATIO_THRES .8 /*!< threshold for percentage of harmonics found */ + +/*! \brief get closest peak to a given harmonic of the possible fundamental + * + * \param iPeakCandidate peak number of possible fundamental + * \param nHarm number of harmonic + * \param pSpectralPeaks pointer to all the peaks + * \param pICurrentPeak pointer to the last peak taken + * \param iRefHarmonic reference harmonic number + * \return the number of the closest peak or -1 if not found + */ +static int GetClosestPeak(int iPeakCandidate, int nHarm, SMS_Peak *pSpectralPeaks, + int *pICurrentPeak, int iRefHarmonic, int maxPeaks) +{ + int iBestPeak = *pICurrentPeak + 1; + int iNextPeak = iBestPeak + 1; + + if((iBestPeak >= maxPeaks) || (iNextPeak >= maxPeaks)) + return -1; + + sfloat fBestPeakFreq = pSpectralPeaks[iBestPeak].fFreq, + fHarmFreq = (1 + nHarm) * pSpectralPeaks[iPeakCandidate].fFreq / iRefHarmonic, + fMinDistance = fabs(fHarmFreq - fBestPeakFreq), + fMaxPeakDev = .5 * fHarmFreq / (nHarm + 1), + fDistance = 0.0; + + fDistance = fabs(fHarmFreq - pSpectralPeaks[iNextPeak].fFreq); + while((fDistance < fMinDistance) && (iNextPeak < maxPeaks - 1)) + { + iBestPeak = iNextPeak; + fMinDistance = fDistance; + iNextPeak++; + fDistance = fabs(fHarmFreq - pSpectralPeaks[iNextPeak].fFreq); + } + + /* make sure the chosen peak is good */ + fBestPeakFreq = pSpectralPeaks[iBestPeak].fFreq; + + /* if best peak is not in the range */ + if(fabs(fBestPeakFreq - fHarmFreq) > fMaxPeakDev) + return -1; + + *pICurrentPeak = iBestPeak; + return iBestPeak; +} + +/*! \brief checks if peak is substantial + * + * check if peak is larger enough to be considered a fundamental + * without any further testing or too small to be considered + * + + * \param fRefHarmMag magnitude of possible fundamental + * \param pSpectralPeaks all the peaks + * \param nCand number of existing candidates + * \param fRefHarmMagDiffFromMax value to judge the peak based on the difference of its magnitude compared to the reference + * \return 1 if big peak, -1 if too small , otherwise return 0 + */ +static int ComparePeak(sfloat fRefHarmMag, SMS_Peak *pSpectralPeaks, int nCand, + sfloat fRefHarmMagDiffFromMax, int maxPeaks) +{ + int iPeak; + sfloat fMag = 0; + + /* if peak is very large take it as possible fundamental */ + if(nCand == 0 && fRefHarmMag > 80.) + return 1; + + /* compare the peak with the first N_FUND_HARM peaks */ + /* if too small forget it */ + for(iPeak = 0; (iPeak < N_FUND_HARM) && (iPeak < maxPeaks); iPeak++) + { + if(pSpectralPeaks[iPeak].fMag > 0 && + fRefHarmMag - pSpectralPeaks[iPeak].fMag < - fRefHarmMagDiffFromMax) + return -1; + } + + /* if it is much bigger than rest take it */ + for(iPeak = 0; (iPeak < N_FUND_HARM) && (iPeak < maxPeaks); iPeak++) + { + fMag = pSpectralPeaks[iPeak].fMag; + if(fMag <= 0 || + ((fMag != fRefHarmMag) && (nCand > 0) && (fRefHarmMag - fMag < 30.0)) || + ((nCand == 0) && (fRefHarmMag - fMag < 15.0))) + return 0; + } + return 1; +} + + +/*! \brief check if the current peak is a harmonic of one of the candidates + * + * \param fFundFreq frequency of peak to be tested + * \param pCHarmonic all candidates accepted + * \param nCand location of las candidate + * \return 1 if it is a harmonic, 0 if it is not + */ +static int CheckIfHarmonic(sfloat fFundFreq, SMS_HarmCandidate *pCHarmonic, int nCand) +{ + int iPeak; + + /* go through all the candidates checking if they are fundamentals + * of the peak to be considered */ + for(iPeak = 0; iPeak < nCand; iPeak++) + { + if(fabs(floor((double)(fFundFreq / pCHarmonic[iPeak].fFreq) + .5) - + (fFundFreq / pCHarmonic[iPeak].fFreq)) <= .1) + return 1; + } + return 0; +} + + +/*! \brief consider a peak as a possible candidate and give it a weight value, + * + * \param iPeak iPeak number to be considered + * \param pSpectralPeaks all the peaks + * \param pCHarmonic all the candidates + * \param nCand candidate number that is to be filled + * \param pPeakParams analysis parameters + * \param fRefFundamental previous fundamental + * \return -1 if not good enough for a candidate, return 0 if reached + * the top frequency boundary, return -2 if stop checking because it + * found a really good one, return 1 if the peak is a good candidate + */ + +static int GoodCandidate(int iPeak, int maxPeaks, SMS_Peak *pSpectralPeaks, + SMS_HarmCandidate *pCHarmonic, int nCand, int soundType, sfloat fRefFundamental, + sfloat minRefHarmMag, sfloat refHarmMagDiffFromMax, sfloat refHarmonic) +{ + sfloat fHarmFreq = 0.0, + fRefHarmFreq = 0.0, + fRefHarmMag = 0.0, + fTotalMag = 0.0, + fTotalDev = 0.0, + fTotalMaxMag = 0.0, + fAvgMag = 0.0, + fAvgDev = 0.0, + fHarmRatio = 0.0; + int iHarm = 0, + iChosenPeak = 0, + iPeakComp = 0, + iCurrentPeak = 0, + nGoodHarm = 0, + i = 0; + + fRefHarmFreq = fHarmFreq = pSpectralPeaks[iPeak].fFreq; + + fTotalDev = 0; + fRefHarmMag = pSpectralPeaks[iPeak].fMag; + fTotalMag = fRefHarmMag; + + /* check if magnitude is big enough */ + /*! \bug sfloat comparison to 0 */ + if(((fRefFundamental > 0) && (fRefHarmMag < minRefHarmMag - 10)) || + ((fRefFundamental <= 0) && (fRefHarmMag < minRefHarmMag))) + return -1; + + /* check that it is not a harmonic of a previous candidate */ + if(nCand > 0 && + CheckIfHarmonic(fRefHarmFreq / refHarmonic, pCHarmonic, nCand)) + return -1; + + /* check if it is very big or very small */ + iPeakComp = ComparePeak(fRefHarmMag, pSpectralPeaks, nCand, refHarmMagDiffFromMax, maxPeaks); + + /* too small */ + if(iPeakComp == -1) + return -1; + /* very big */ + else if(iPeakComp == 1) + { + pCHarmonic[nCand].fFreq = fRefHarmFreq; + pCHarmonic[nCand].fMag = fRefHarmMag; + pCHarmonic[nCand].fMagPerc = 1; + pCHarmonic[nCand].fFreqDev = 0; + pCHarmonic[nCand].fHarmRatio = 1; + return -2; + } + + /* get a weight on the peak by comparing its harmonic series */ + /* with the existing peaks */ + if(soundType != SMS_SOUND_TYPE_NOTE) + { + fHarmFreq = fRefHarmFreq; + iCurrentPeak = iPeak; + nGoodHarm = 0; + for(iHarm = refHarmonic; (iHarm < N_FUND_HARM) && (iHarm < maxPeaks); iHarm++) + { + fHarmFreq += fRefHarmFreq / refHarmonic; + iChosenPeak = GetClosestPeak(iPeak, iHarm, pSpectralPeaks, + &iCurrentPeak, refHarmonic, + maxPeaks); + if(iChosenPeak > 0) + { + fTotalDev += fabs(fHarmFreq - pSpectralPeaks[iChosenPeak].fFreq) / + fHarmFreq; + fTotalMag += pSpectralPeaks[iChosenPeak].fMag; + nGoodHarm++; + } + } + + for(i = 0; i <= iCurrentPeak; i++) + fTotalMaxMag += pSpectralPeaks[i].fMag; + + fAvgDev = fTotalDev / (iHarm + 1); + fAvgMag = fTotalMag / fTotalMaxMag; + fHarmRatio = (sfloat)nGoodHarm / (N_FUND_HARM - 1); + + if(fRefFundamental > 0) + { + if(fAvgDev > FREQ_DEV_THRES || fAvgMag < MAG_PERC_THRES - .1 || + fHarmRatio < HARM_RATIO_THRES - .1) + return -1; + } + else + { + if(fAvgDev > FREQ_DEV_THRES || fAvgMag < MAG_PERC_THRES || + fHarmRatio < HARM_RATIO_THRES) + return -1; + } + } + + pCHarmonic[nCand].fFreq = fRefHarmFreq; + pCHarmonic[nCand].fMag = fRefHarmMag; + pCHarmonic[nCand].fMagPerc = fAvgMag; + pCHarmonic[nCand].fFreqDev = fAvgDev; + pCHarmonic[nCand].fHarmRatio = fHarmRatio; + + return 1; +} + +/*! \brief choose the best fundamental out of all the candidates + * + * \param pCHarmonic array of candidates + * \param iRefHarmonic reference harmonic number + * \param nGoodPeaks number of candiates + * \param fPrevFund reference fundamental + * \return the integer number of the best candidate + */ +static int GetBestCandidate(SMS_HarmCandidate *pCHarmonic, + int iRefHarmonic, int nGoodPeaks, sfloat fPrevFund) +{ + int iBestCandidate = 0, iPeak; + sfloat fBestFreq, fHarmFreq, fDev; + + /* if a fundamental existed in previous frame take the closest candidate */ + if(fPrevFund > 0) + { + for(iPeak = 1; iPeak < nGoodPeaks; iPeak++) + { + if(fabs(fPrevFund - pCHarmonic[iPeak].fFreq / iRefHarmonic) < + fabs(fPrevFund - pCHarmonic[iBestCandidate].fFreq / iRefHarmonic)) + iBestCandidate = iPeak; + } + } + else + { + /* try to find the best candidate */ + for(iPeak = 1; iPeak < nGoodPeaks; iPeak++) + { + fBestFreq = pCHarmonic[iBestCandidate].fFreq / iRefHarmonic; + fHarmFreq = fBestFreq * floor(.5 + + (pCHarmonic[iPeak].fFreq / iRefHarmonic) / + fBestFreq); + fDev = fabs(fHarmFreq - (pCHarmonic[iPeak].fFreq / iRefHarmonic)) / fHarmFreq; + + /* if candidate is far from harmonic from best candidate and + * bigger, take it */ + if(fDev > .2 && + pCHarmonic[iPeak].fMag > pCHarmonic[iBestCandidate].fMag) + iBestCandidate = iPeak; + /* if frequency deviation is much smaller, take it */ + else if(pCHarmonic[iPeak].fFreqDev < .2 * pCHarmonic[iBestCandidate].fFreqDev) + iBestCandidate = iPeak; + /* if freq. deviation is smaller and bigger amplitude, take it */ + else if(pCHarmonic[iPeak].fFreqDev < pCHarmonic[iBestCandidate].fFreqDev && + pCHarmonic[iPeak].fMagPerc > pCHarmonic[iBestCandidate].fMagPerc && + pCHarmonic[iPeak].fMag > pCHarmonic[iBestCandidate].fMag) + iBestCandidate = iPeak; + } + } + return iBestCandidate; +} + +/*! \brief main harmonic detection function + * + * find a given harmonic peak from a set of spectral peaks, + * put the frequency of the fundamental in the current frame + * + * \param pFrame pointer to current frame + * \param fRefFundamental frequency of previous frame + * \param pPeakParams pointer to analysis parameters + * \todo is it possible to use pSpectralPeaks instead of SMS_AnalFrame? + * \todo move pCHarmonic array to SMS_AnalFrame structure + - this will allow for analysis of effectiveness from outside this file + * This really should only be for sms_analyzeFrame + */ +sfloat sms_harmDetection(int numPeaks, SMS_Peak* spectralPeaks, sfloat refFundamental, + sfloat refHarmonic, sfloat lowestFreq, sfloat highestFreq, + int soundType, sfloat minRefHarmMag, sfloat refHarmMagDiffFromMax) +{ + int iPeak = -1, nGoodPeaks = 0, iCandidate, iBestCandidate; + sfloat peakFreq=0; + SMS_HarmCandidate pCHarmonic[N_HARM_PEAKS]; + + /* find all possible candidates to use as harmonic reference */ + lowestFreq = lowestFreq * refHarmonic; + highestFreq = highestFreq * refHarmonic; + + while((peakFreq < highestFreq) && (iPeak < numPeaks - 1)) + { + iPeak++; + peakFreq = spectralPeaks[iPeak].fFreq; + if(peakFreq > highestFreq) + break; + + /* no more peaks */ + if(spectralPeaks[iPeak].fMag <= 0) /*!< \bug sfloat comparison to zero */ + break; + + /* peak too low */ + if(peakFreq < lowestFreq) + continue; + + /* if previous fundamental look only around it */ + if(refFundamental > 0 && + fabs(peakFreq - (refHarmonic * refFundamental)) / refFundamental > .5) + continue; + + iCandidate = GoodCandidate(iPeak, numPeaks, spectralPeaks, pCHarmonic, + nGoodPeaks, soundType, refFundamental, + minRefHarmMag, refHarmMagDiffFromMax, refHarmonic); + + /* good candiate found */ + if(iCandidate == 1) + nGoodPeaks++; + + /* a perfect candiate found */ + else if(iCandidate == -2) + { + nGoodPeaks++; + break; + } + } + + /* if no candidate for fundamental, continue */ + if(nGoodPeaks == 0) + return -1; + /* if only 1 candidate for fundamental take it */ + else if(nGoodPeaks == 1) + return pCHarmonic[0].fFreq / refHarmonic; + /* if more than one candidate choose the best one */ + else + { + iBestCandidate = GetBestCandidate(pCHarmonic, refHarmonic, nGoodPeaks, refFundamental); + return pCHarmonic[iBestCandidate].fFreq / refHarmonic; + } +} diff --git a/src/sms/modify.c b/src/sms/modify.c new file mode 100644 index 0000000..1afdf82 --- /dev/null +++ b/src/sms/modify.c @@ -0,0 +1,215 @@ +/* + * Copyright (c) 2009 John Glover, National University of Ireland, Maynooth + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/*! \file modify.c + * \brief modify sms data + */ + +#include "sms.h" + +/*! \brief initialize a modifications structure based on an SMS_Header + * + * \param params pointer to parameter structure + * \param header pointer to sms header + */ +void sms_initModify(SMS_Header *header, SMS_ModifyParams *params) +{ + static int sizeEnvArray = 0; + params->maxFreq = header->iMaxFreq; + params->sizeSinEnv = header->nEnvCoeff; + + if(sizeEnvArray < params->sizeSinEnv) + { + if(sizeEnvArray != 0) free(params->sinEnv); + if ((params->sinEnv = (sfloat *) malloc(params->sizeSinEnv * sizeof(sfloat))) == NULL) + { + sms_error("could not allocate memory for envelope array"); + return; + } + sizeEnvArray = params->sizeSinEnv; + } + params->ready = 1; +} + +/*! \brief initialize modification parameters + * + * \todo call this from sms_initSynth()? some other mod params are updated there + * + * \param params pointer to parameters structure + */ +void sms_initModifyParams(SMS_ModifyParams *params) +{ + params->ready = 0; + params->doResGain = 0; + params->resGain = 1.; + params->doTranspose = 0; + params->transpose = 0; + params->doSinEnv = 0; + params->sinEnvInterp = 0.; + params->sizeSinEnv = 0; + params->doResEnv = 0; + params->resEnvInterp = 0.; + params->sizeResEnv = 0; +} + +/*! \brief free memory allocated during initialization + * + * \param params pointer to parameter structure + */ +void sms_freeModify(SMS_ModifyParams *params) +{ +} + +/*! \brief linear interpolation between 2 spectral envelopes. + * + * The values in env2 are overwritten by the new interpolated envelope values. + */ +void sms_interpEnvelopes(int sizeEnv, sfloat *env1, sfloat *env2, sfloat interpFactor) +{ + if(sizeEnv <= 0) + { + return; + } + + int i; + sfloat amp1, amp2; + + for(i = 0; i < sizeEnv; i++) + { + amp1 = env1[i]; + amp2 = env2[i]; + if(amp1 <= 0) amp1 = amp2; + if(amp2 <= 0) amp2 = amp1; + env2[i] = amp1 + (interpFactor * (amp2 - amp1)); + } +} + +/*! \brief apply the spectral envelope of 1 sound to another + * + * Changes the amplitude of spectral peaks in a target sound (pFreqs, pMags) to match those + * in the envelope (pCepEnvFreqs, pCepEnvMags) of another, up to a maximum frequency of maxFreq. + */ +void sms_applyEnvelope(int numPeaks, sfloat *pFreqs, sfloat *pMags, int sizeEnv, sfloat *pEnvMags, int maxFreq) +{ + if(sizeEnv <= 0 || maxFreq <= 0) + { + return; + } + + int i, envPos; + sfloat frac, binSize = (sfloat)maxFreq / (sfloat)sizeEnv; + + for(i = 0; i < numPeaks; i++) + { + /* convert peak freqs into bin positions for quicker envelope lookup */ + /* \todo try to remove so many pFreq lookups and get rid of divide */ + pFreqs[i] /= binSize; + + /* if current peak is within envelope range, set its mag to the envelope mag */ + if(pFreqs[i] < (sizeEnv-1) && pFreqs[i] > 0) + { + envPos = (int)pFreqs[i]; + frac = pFreqs[i] - envPos; + if(envPos < sizeEnv - 1) + { + pMags[i] = ((1.0 - frac) * pEnvMags[envPos]) + (frac * pEnvMags[envPos+1]); + } + else + { + pMags[i] = pEnvMags[sizeEnv-1]; + } + } + else + { + pMags[i] = 0; + } + + /* convert back to frequency values */ + pFreqs[i] *= binSize; + } + +} + +/*! \brief scale the residual gain factor + * + * \param frame pointer to sms data + * \param gain factor to scale the residual + */ +void sms_resGain(SMS_Data *frame, sfloat gain) +{ + int i; + for( i = 0; i < frame->nCoeff; i++) + frame->pFStocCoeff[i] *= gain; +} + + +/*! \brief basic transposition + * Multiply the frequencies of the deterministic component by a constant + */ +void sms_transpose(SMS_Data *frame, sfloat transpositionFactor) +{ + int i; + for(i = 0; i < frame->nTracks; i++) + { + frame->pFSinFreq[i] *= sms_scalarTempered(transpositionFactor); + } +} + + +/*! \brief transposition maintaining spectral envelope + * + * Multiply the frequencies of the deterministic component by a constant, then change + * their amplitudes so that the original spectral envelope is maintained + */ +void sms_transposeKeepEnv(SMS_Data *frame, sfloat transpositionFactor, int maxFreq) +{ + sms_transpose(frame, transpositionFactor); + sms_applyEnvelope(frame->nTracks, frame->pFSinFreq, frame->pFSinAmp, frame->nEnvCoeff, frame->pSpecEnv, maxFreq); +} + +/*! \brief modify a frame (SMS_Data object) + * + * Performs a modification on a SMS_Data object. The type of modification and any additional + * parameters are specified in the given SMS_ModifyParams structure. + */ +void sms_modify(SMS_Data *frame, SMS_ModifyParams *params) +{ + if(params->doResGain) + sms_resGain(frame, params->resGain); + + if(params->doTranspose) + sms_transpose(frame, params->transpose); + + if(params->doSinEnv) + { + if(params->sinEnvInterp < .00001) /* maintain original */ + sms_applyEnvelope(frame->nTracks, frame->pFSinFreq, frame->pFSinAmp, + frame->nEnvCoeff, frame->pSpecEnv, params->maxFreq); + else + { + if(params->sinEnvInterp > .00001 && params->sinEnvInterp < .99999) + sms_interpEnvelopes(params->sizeSinEnv, frame->pSpecEnv, params->sinEnv, params->sinEnvInterp); + + sms_applyEnvelope(frame->nTracks, frame->pFSinFreq, frame->pFSinAmp, + params->sizeSinEnv, params->sinEnv, params->maxFreq); + + } + } +} + diff --git a/src/sms/peakContinuation.c b/src/sms/peakContinuation.c new file mode 100644 index 0000000..b61d14e --- /dev/null +++ b/src/sms/peakContinuation.c @@ -0,0 +1,481 @@ +/* + * Copyright (c) 2008 MUSIC TECHNOLOGY GROUP (MTG) + * UNIVERSITAT POMPEU FABRA + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +/*! \file peakContinuation.c + * \brief peak continuation algorithm and functions + */ + +#include "sms.h" + +/*! guide states */ +#define GUIDE_BEG -2 +#define GUIDE_DEAD -1 +#define GUIDE_ACTIVE 0 + +/*!< maximum number of peak continuation candidates */ +#define MAX_CONT_CANDIDATES 5 + +/*! \brief function to get the next closest peak from a guide + * + * \param fGuideFreq guide's frequency + * \param pFFreqDistance distance of last best peak from guide + * \param pSpectralPeaks array of peaks + * \param pAnalParams analysis parameters + * \param fFreqDev maximum deviation from guide + * \return peak number or -1 if nothing is good + */ +static int GetNextClosestPeak(sfloat fGuideFreq, sfloat *pFFreqDistance, + SMS_Peak *pSpectralPeaks, SMS_AnalParams *pAnalParams, + sfloat fFreqDev) +{ + int iInitialPeak = SMS_MAX_NPEAKS * fGuideFreq / (pAnalParams->iSamplingRate * .5); + int iLowPeak, iHighPeak, iChosenPeak = -1; + sfloat fLowDistance, fHighDistance, fFreq; + + if(iInitialPeak >= pAnalParams->maxPeaks) + iInitialPeak = 0; + else if(pSpectralPeaks[iInitialPeak].fFreq <= 0) + iInitialPeak = 0; + + /* find a low peak to start */ + fLowDistance = fGuideFreq - pSpectralPeaks[iInitialPeak].fFreq; + if(floor(fLowDistance) < floor(*pFFreqDistance)) + { + while(floor(fLowDistance) <= floor(*pFFreqDistance) && + iInitialPeak > 0) + { + iInitialPeak--; + fLowDistance = fGuideFreq - pSpectralPeaks[iInitialPeak].fFreq; + } + } + else + { + while(floor(fLowDistance) >= floor(*pFFreqDistance) && + iInitialPeak < (pAnalParams->maxPeaks-1)) + { + iInitialPeak++; + if((fFreq = pSpectralPeaks[iInitialPeak].fFreq) == 0) + return -1; + fLowDistance = fGuideFreq - fFreq; + } + if(iInitialPeak > 0) + iInitialPeak--; + fLowDistance = fGuideFreq - pSpectralPeaks[iInitialPeak].fFreq; + } + + if(floor(fLowDistance) <= floor(*pFFreqDistance) || + fLowDistance > fFreqDev) + iLowPeak = -1; + else + iLowPeak = iInitialPeak; + + /* find a high peak to finish */ + iHighPeak = iInitialPeak; + fHighDistance = fGuideFreq - pSpectralPeaks[iHighPeak].fFreq; + while(floor(fHighDistance) >= floor(-*pFFreqDistance) && + iHighPeak < (pAnalParams->maxPeaks - 1)) + { + iHighPeak++; + if((fFreq = pSpectralPeaks[iHighPeak].fFreq) == 0) + { + iHighPeak = -1; + break; + } + fHighDistance = fGuideFreq - fFreq; + } + if(fHighDistance > 0 || fabs(fHighDistance) > fFreqDev || + floor(fabs(fHighDistance)) <= floor(*pFFreqDistance)) + iHighPeak = -1; + + /* chose between the two extrema */ + if(iHighPeak >= 0 && iLowPeak >= 0) + { + if(fabs(fHighDistance) > fLowDistance) + iChosenPeak = iLowPeak; + else + iChosenPeak = iHighPeak; + } + else if(iHighPeak < 0 && iLowPeak >= 0) + iChosenPeak = iLowPeak; + else if(iHighPeak >= 0 && iLowPeak < 0) + iChosenPeak = iHighPeak; + else + return -1; + + *pFFreqDistance = fabs(fGuideFreq - pSpectralPeaks[iChosenPeak].fFreq); + return iChosenPeak; +} + +/*! \brief choose the best candidate out of all + * + * \param pCandidate pointer to all the continuation candidates + * \param nCandidates number of candidates + * \param fFreqDev maximum frequency deviation allowed + * \return the peak number of the best candidate + */ +static int ChooseBestCand(SMS_ContCandidate *pCandidate, int nCandidates, sfloat fFreqDev) +{ + int i, iHighestCand, iClosestCand, iBestCand = 0; + sfloat fMaxMag, fClosestFreq; + + /* intial guess */ + iClosestCand = 0; + fClosestFreq = pCandidate[iClosestCand].fFreqDev; + iHighestCand = 0; + fMaxMag = pCandidate[iHighestCand].fMagDev; + + /* get the best candidate */ + for (i = 1; i < nCandidates; i++) + { + /* look for the one with highest magnitude */ + if (pCandidate[i].fMagDev > fMaxMag) + { + fMaxMag = pCandidate[i].fMagDev; + iHighestCand = i; + } + /* look for the closest one to the guide */ + if (pCandidate[i].fFreqDev < fClosestFreq) + { + fClosestFreq = pCandidate[i].fFreqDev; + iClosestCand = i; + } + } + iBestCand = iHighestCand; + + /* reconcile the two results */ + if(iBestCand != iClosestCand && + fabs(pCandidate[iHighestCand].fFreqDev - fClosestFreq) > fFreqDev / 2) + iBestCand = iClosestCand; + + return pCandidate[iBestCand].iPeak; +} + +/*! \brief check for one guide that has choosen iBestPeak + * + * \param iBestPeak choosen peak for a guide + * \param pGuides array of guides + * \param nGuides total number of guides + * \return number of guide that chose the peak, or -1 if none + */ +static int CheckForConflict(int iBestPeak, SMS_Guide *pGuides, int nGuides) +{ + int iGuide; + + for (iGuide = 0; iGuide < nGuides; iGuide++) + if (pGuides[iGuide].iPeakChosen == iBestPeak) + return iGuide; + + return -1; +} + +/*! \brief chose the best of the two guides for the conflicting peak + * + * \param iConflictingGuide conflicting guide number + * \param iGuide guide number + * \param pGuides array of guides + * \param pSpectralPeaks array of peaks + * \return number of guide + */ +static int BestGuide(int iConflictingGuide, int iGuide, SMS_Guide *pGuides, + SMS_Peak *pSpectralPeaks) +{ + int iConflictingPeak = pGuides[iConflictingGuide].iPeakChosen; + sfloat fGuideDistance = fabs(pSpectralPeaks[iConflictingPeak].fFreq - + pGuides[iGuide].fFreq); + sfloat fConfGuideDistance = fabs(pSpectralPeaks[iConflictingPeak].fFreq - + pGuides[iConflictingGuide].fFreq); + + if(fGuideDistance > fConfGuideDistance) + return iConflictingGuide; + else + return iGuide; +} + +/*! \brief function to find the best continuation peak for a given guide + * \param pGuides guide attributes + * \param iGuide number of guide + * \param pSpectralPeaks peak values at the current frame + * \param pAnalParams analysis parameters + * \param fFreqDev frequency deviation allowed + * \return the peak number + */ +int GetBestPeak(SMS_Guide *pGuides, int iGuide, SMS_Peak *pSpectralPeaks, + SMS_AnalParams *pAnalParams, sfloat fFreqDev) +{ + int iCand = 0, iPeak, iBestPeak, iConflictingGuide, iWinnerGuide; + sfloat fGuideFreq = pGuides[iGuide].fFreq, + fGuideMag = pGuides[iGuide].fMag, + fMagDistance = 0; + sfloat fFreqDistance = -1; + SMS_ContCandidate pCandidate[MAX_CONT_CANDIDATES]; + + /* find all possible candidates */ + while (iCand < MAX_CONT_CANDIDATES) + { + /* find the next best peak */ + if((iPeak = GetNextClosestPeak(fGuideFreq, &fFreqDistance, + pSpectralPeaks, pAnalParams, fFreqDev)) < 0) + break; + + /* if the peak's magnitude is not too small accept it as */ + /* possible candidate */ + if ((fMagDistance = pSpectralPeaks[iPeak].fMag - fGuideMag) > -20.0) + { + pCandidate[iCand].fFreqDev = fabs(fFreqDistance); + pCandidate[iCand].fMagDev = fMagDistance; + pCandidate[iCand].iPeak = iPeak; + + if(pAnalParams->iDebugMode == SMS_DBG_PEAK_CONT || + pAnalParams->iDebugMode == SMS_DBG_ALL) + fprintf(stdout, "candidate %d: freq %f mag %f\n", + iCand, pSpectralPeaks[iPeak].fFreq, + pSpectralPeaks[iPeak].fMag); + iCand++; + } + } + /* get best candidate */ + if(iCand < 1) + return 0; + else if (iCand == 1) + iBestPeak = pCandidate[0].iPeak; + else + iBestPeak = ChooseBestCand (pCandidate, iCand, + pAnalParams->fFreqDeviation); + + if(pAnalParams->iDebugMode == SMS_DBG_PEAK_CONT || + pAnalParams->iDebugMode == SMS_DBG_ALL) + fprintf (stdout, "BestCandidate: freq %f\n", + pSpectralPeaks[iBestPeak].fFreq); + + /* if peak taken by another guide resolve conflict */ + if ((iConflictingGuide = CheckForConflict (iBestPeak, pGuides, + pAnalParams->nGuides)) >= 0) + { + iWinnerGuide = BestGuide (iConflictingGuide, iGuide, pGuides, + pSpectralPeaks); + if(pAnalParams->iDebugMode == SMS_DBG_PEAK_CONT || + pAnalParams->iDebugMode == SMS_DBG_ALL) + fprintf (stdout, + "Conflict: guide: %d (%f), and guide: %d (%f). best: %d\n", + iGuide, pGuides[iGuide].fFreq, + iConflictingGuide, pGuides[iConflictingGuide].fFreq, + iWinnerGuide); + + if (iGuide == iWinnerGuide) + { + pGuides[iGuide].iPeakChosen = iBestPeak; + pGuides[iConflictingGuide].iPeakChosen = -1; + } + } + else + pGuides[iGuide].iPeakChosen = iBestPeak; + + return iBestPeak; +} + +/*! \brief function to get the next maximum (magnitude) peak + * \param pSpectralPeaks array of peaks + * \param pFCurrentMax last peak maximum + * \return the number of the maximum peak + */ +static int GetNextMax(SMS_Peak *pSpectralPeaks, SMS_AnalParams *pAnalParams, + sfloat *pFCurrentMax) +{ + sfloat fPeakMag; + sfloat fMaxMag = 0.; + int iPeak, iMaxPeak = -1; + + for (iPeak = 0; iPeak < pAnalParams->maxPeaks; iPeak++) + { + fPeakMag = pSpectralPeaks[iPeak].fMag; + + if (fPeakMag == 0) + break; + + if (fPeakMag > fMaxMag && fPeakMag < *pFCurrentMax) + { + iMaxPeak = iPeak; + fMaxMag = fPeakMag; + } + } + *pFCurrentMax = fMaxMag; + return (iMaxPeak); +} + +/*! \brief function to get a good starting peak for a track + * + * \param iGuide current guide + * \param pGuides array of guides + * \param nGuides total number of guides + * \param pSpectralPeaks array of peaks + * \param pFCurrentMax current peak maximum + * \return \todo should this return something? + */ +static int GetStartingPeak(int iGuide, SMS_Guide *pGuides, int nGuides, + SMS_Peak *pSpectralPeaks, SMS_AnalParams *pAnalParams, + sfloat *pFCurrentMax) +{ + int iPeak = -1; + short peakNotFound = 1; + + while (peakNotFound == 1 && *pFCurrentMax > 0) + { + /* \todo I don't think this ever returns -1, but check */ + if ((iPeak = GetNextMax(pSpectralPeaks, pAnalParams, pFCurrentMax)) < 0) + return (-1); + + if (CheckForConflict (iPeak, pGuides, nGuides) < 0) + { + pGuides[iGuide].iPeakChosen = iPeak; + pGuides[iGuide].iStatus = GUIDE_BEG; + pGuides[iGuide].fFreq = pSpectralPeaks[iPeak].fFreq; + peakNotFound = 0; + } + } + return (1); +} + +/*! \brief function to advance the guides through the next frame + * + * the output is the frequency, magnitude, and phase tracks + * + * \param iFrame current frame number + * \param pAnalParams analysis parameters + * \return error code \see SMS_ERRORS + */ +int sms_peakContinuation(int iFrame, SMS_AnalParams *pAnalParams) +{ + int iGuide, iCurrentPeak = -1, iGoodPeak = -1; + sfloat fFund = pAnalParams->ppFrames[iFrame]->fFundamental, + fFreqDev = fFund * pAnalParams->fFreqDeviation, fCurrentMax = 1000; + + /* update guides with fundamental contribution */ + if(fFund > 0 && (pAnalParams->iFormat == SMS_FORMAT_H || + pAnalParams->iFormat == SMS_FORMAT_HP)) + for(iGuide = 0; iGuide < pAnalParams->nGuides; iGuide++) + pAnalParams->guides[iGuide].fFreq = + (1 - pAnalParams->fFundContToGuide) * pAnalParams->guides[iGuide].fFreq + + pAnalParams->fFundContToGuide * fFund * (iGuide + 1); + + if(pAnalParams->iDebugMode == SMS_DBG_PEAK_CONT || + pAnalParams->iDebugMode == SMS_DBG_ALL) + fprintf(stdout, "Frame %d Peak Continuation: \n", + pAnalParams->ppFrames[iFrame]->iFrameNum); + + /* continue all guides */ + for(iGuide = 0; iGuide < pAnalParams->nGuides; iGuide++) + { + sfloat fPreviousFreq = pAnalParams->ppFrames[iFrame-1]->deterministic.pFSinFreq[iGuide]; + + /* get the guide value by upgrading the previous guide */ + if(fPreviousFreq > 0) + pAnalParams->guides[iGuide].fFreq = + (1 - pAnalParams->fPeakContToGuide) * pAnalParams->guides[iGuide].fFreq + + pAnalParams->fPeakContToGuide * fPreviousFreq; + + if(pAnalParams->iDebugMode == SMS_DBG_PEAK_CONT || + pAnalParams->iDebugMode == SMS_DBG_ALL) + fprintf(stdout, "Guide %d: freq %f, mag %f\n", + iGuide, pAnalParams->guides[iGuide].fFreq, pAnalParams->guides[iGuide].fMag); + + if(pAnalParams->guides[iGuide].fFreq <= 0.0 || + pAnalParams->guides[iGuide].fFreq > pAnalParams->fHighestFreq) + { + pAnalParams->guides[iGuide].iStatus = GUIDE_DEAD; + pAnalParams->guides[iGuide].fFreq = 0; + continue; + } + + pAnalParams->guides[iGuide].iPeakChosen = -1; + + if(pAnalParams->iFormat == SMS_FORMAT_IH || + pAnalParams->iFormat == SMS_FORMAT_IHP) + fFreqDev = pAnalParams->guides[iGuide].fFreq * pAnalParams->fFreqDeviation; + + /* get the best peak for the guide */ + iGoodPeak = + GetBestPeak(pAnalParams->guides, iGuide, pAnalParams->ppFrames[iFrame]->pSpectralPeaks, + pAnalParams, fFreqDev); + } + + /* try to find good peaks for the GUIDE_DEAD guides */ + if(pAnalParams->iFormat == SMS_FORMAT_IH || + pAnalParams->iFormat == SMS_FORMAT_IHP) + for(iGuide = 0; iGuide < pAnalParams->nGuides; iGuide++) + { + if(pAnalParams->guides[iGuide].iStatus != GUIDE_DEAD) + continue; + + if(GetStartingPeak(iGuide, pAnalParams->guides, pAnalParams->nGuides, + pAnalParams->ppFrames[iFrame]->pSpectralPeaks, + pAnalParams, &fCurrentMax) == -1) + break; + } + + /* save all the continuation values, + * assume output tracks are already clear */ + for(iGuide = 0; iGuide < pAnalParams->nGuides; iGuide++) + { + if(pAnalParams->guides[iGuide].iStatus == GUIDE_DEAD) + continue; + + if(pAnalParams->iFormat == SMS_FORMAT_IH || + pAnalParams->iFormat == SMS_FORMAT_IHP) + { + if(pAnalParams->guides[iGuide].iStatus > 0 && + pAnalParams->guides[iGuide].iPeakChosen == -1) + { + if(pAnalParams->guides[iGuide].iStatus++ > pAnalParams->iMaxSleepingTime) + { + pAnalParams->guides[iGuide].iStatus = GUIDE_DEAD; + pAnalParams->guides[iGuide].fFreq = 0; + pAnalParams->guides[iGuide].fMag = 0; + pAnalParams->guides[iGuide].iPeakChosen = -1; + } + else + pAnalParams->guides[iGuide].iStatus++; + continue; + } + + if(pAnalParams->guides[iGuide].iStatus == GUIDE_ACTIVE && + pAnalParams->guides[iGuide].iPeakChosen == -1) + { + pAnalParams->guides[iGuide].iStatus = 1; + continue; + } + } + + /* if good continuation peak found, save it */ + if((iCurrentPeak = pAnalParams->guides[iGuide].iPeakChosen) >= 0) + { + pAnalParams->ppFrames[iFrame]->deterministic.pFSinFreq[iGuide] = + pAnalParams->ppFrames[iFrame]->pSpectralPeaks[iCurrentPeak].fFreq; + pAnalParams->ppFrames[iFrame]->deterministic.pFSinAmp[iGuide] = + pAnalParams->ppFrames[iFrame]->pSpectralPeaks[iCurrentPeak].fMag; + pAnalParams->ppFrames[iFrame]->deterministic.pFSinPha[iGuide] = + pAnalParams->ppFrames[iFrame]->pSpectralPeaks[iCurrentPeak].fPhase; + + pAnalParams->guides[iGuide].iStatus = GUIDE_ACTIVE; + pAnalParams->guides[iGuide].iPeakChosen = -1; + } + } + return SMS_OK; +} + diff --git a/src/sms/peakDetection.c b/src/sms/peakDetection.c new file mode 100644 index 0000000..4015c27 --- /dev/null +++ b/src/sms/peakDetection.c @@ -0,0 +1,202 @@ +/* + * Copyright (c) 2008 MUSIC TECHNOLOGY GROUP (MTG) + * UNIVERSITAT POMPEU FABRA + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +/*! \file peakDetection.c + * \brief peak detection algorithm and functions + */ + +#include "sms.h" + +/*! \brief function used for the parabolic interpolation of the spectral peaks + * + * it performs the interpolation in a log scale and + * stores the location in pFDiffFromMax and + * + * \param fMaxVal value of max bin + * \param fLeftBinVal value for left bin + * \param fRightBinVal value for right bin + * \param pFDiffFromMax location of the tip as the difference from the top bin + * \return the peak height + */ +static sfloat PeakInterpolation(sfloat fMaxVal, sfloat fLeftBinVal, + sfloat fRightBinVal, sfloat *pFDiffFromMax) +{ + /* get the location of the tip of the parabola */ + *pFDiffFromMax = (.5 * (fLeftBinVal - fRightBinVal) / + (fLeftBinVal - (2*fMaxVal) + fRightBinVal)); + /* return the value at the tip */ + return fMaxVal - (.25 * (fLeftBinVal - fRightBinVal) * *pFDiffFromMax); +} + +/*! \brief detect the next local maximum in the spectrum + * + * stores the value in pFMaxVal + * + * \todo export this to sms.h and wrap in pysms + * + * \param pFMagSpectrum magnitude spectrum + * \param iHighBinBound highest bin to search + * \param pICurrentLoc current bin location + * \param pFMaxVal value of the maximum found + * \param fMinPeakMag minimum magnitude to accept a peak + * \return the bin location of the maximum + */ +static int FindNextMax(sfloat *pFMagSpectrum, int iHighBinBound, + int *pICurrentLoc, sfloat *pFMaxVal, sfloat fMinPeakMag) +{ + int iCurrentBin = *pICurrentLoc; + sfloat fPrevVal = pFMagSpectrum[iCurrentBin - 1]; + sfloat fCurrentVal = pFMagSpectrum[iCurrentBin]; + sfloat fNextVal = (iCurrentBin >= iHighBinBound) ? 0 : pFMagSpectrum[iCurrentBin + 1]; + + /* try to find a local maximum */ + while(iCurrentBin <= iHighBinBound) + { + if(fCurrentVal > fMinPeakMag && + fCurrentVal >= fPrevVal && + fCurrentVal >= fNextVal) + break; + iCurrentBin++; + fPrevVal = fCurrentVal; + fCurrentVal = fNextVal; + fNextVal = pFMagSpectrum[1+iCurrentBin]; + } + + /* save the current location, value of maximum and return */ + /* location of max */ + *pICurrentLoc = iCurrentBin + 1; + *pFMaxVal = fCurrentVal; + return iCurrentBin; +} + +/*! \brief function to detect the next spectral peak + * + * \param pFMagSpectrum magnitude spectrum + * \param iHighestBin highest bin to search + * \param pICurrentLoc current bin location + * \param pFPeakMag magnitude value of peak + * \param pFPeakLoc location of peak + * \param fMinPeakMag minimum magnitude to accept a peak + * \return 1 if found, 0 if not + */ +static int FindNextPeak(sfloat *pFMagSpectrum, int iHighestBin, + int *pICurrentLoc, sfloat *pFPeakMag, + sfloat *pFPeakLoc, sfloat fMinPeakMag) +{ + int iPeakBin = 0; /* location of the local peak */ + sfloat fPeakMag = 0; /* value of local peak */ + + /* keep trying to find a good peak while inside the freq range */ + while((iPeakBin = FindNextMax(pFMagSpectrum, iHighestBin, + pICurrentLoc, &fPeakMag, fMinPeakMag)) + <= iHighestBin) + { + /* get the neighboring samples */ + sfloat fDiffFromMax = 0; + sfloat fLeftBinVal = pFMagSpectrum[iPeakBin - 1]; + sfloat fRightBinVal = pFMagSpectrum[iPeakBin + 1]; + if(fLeftBinVal <= 0 || fRightBinVal <= 0) //ahah! there you are! + continue; + /* interpolate the spectral samples to obtain + a more accurate magnitude and freq */ + *pFPeakMag = PeakInterpolation(fPeakMag, fLeftBinVal, + fRightBinVal, &fDiffFromMax); + *pFPeakLoc = iPeakBin + fDiffFromMax; + return 1; + } + /* if it does not find a peak return 0 */ + return 0; +} + +/*! \brief get the corresponding phase value for a given peak + * + * performs linear interpolation for a more accurate phase + + * \param pPhaseSpectrum phase spectrum + * \param fPeakLoc location of peak + * \return the phase value + */ +static sfloat GetPhaseVal(sfloat *pPhaseSpectrum, sfloat fPeakLoc) +{ + int bin = (int)fPeakLoc; + sfloat fFraction = fPeakLoc - bin, + fLeftPha = pPhaseSpectrum[bin], + fRightPha = pPhaseSpectrum[bin+1]; + + /* check for phase wrapping */ + if(fLeftPha - fRightPha > 1.5 * PI) + fRightPha += TWO_PI; + else if(fRightPha - fLeftPha > 1.5 * PI) + fLeftPha += TWO_PI; + + /* return interpolated phase */ + return fLeftPha + fFraction * (fRightPha - fLeftPha); +} + +/*! \brief find the prominent spectral peaks + * + * uses a dB spectrum + * + * \param sizeSpec size of magnitude spectrum + * \param pMag pointer to power spectrum + * \param pPhase pointer to phase spectrum + * \param pSpectralPeaks pointer to array of peaks + * \param pAnalParams peak detection parameters + * \return the number of peaks found + */ +int sms_detectPeaks(int sizeSpec, sfloat *pMag, sfloat *pPhase, + SMS_Peak *pSpectralPeaks, SMS_AnalParams *pAnalParams) +{ + int sizeFft = sizeSpec << 1; + sfloat fInvSizeFft = 1.0 / sizeFft; + int iFirstBin = MAX(1, sizeFft * pAnalParams->fLowestFreq / pAnalParams->iSamplingRate); + int iHighestBin = MIN(sizeSpec-1, + sizeFft * pAnalParams->fHighestFreq / pAnalParams->iSamplingRate); + int iPeak = 0; + + /* clear peak structure */ + for(iPeak = 0; iPeak < pAnalParams->maxPeaks; iPeak++) + { + pSpectralPeaks[iPeak].fFreq = 0.0; + pSpectralPeaks[iPeak].fMag = 0.0; + pSpectralPeaks[iPeak].fPhase = 0.0; + } + + /* set starting search values */ + int iCurrentLoc = iFirstBin; + sfloat fPeakMag = 0.0; /* magnitude of peak */ + sfloat fPeakLoc = 0.0; /* location of peak */ + + /* find peaks */ + iPeak = 0; + while((iPeak < pAnalParams->maxPeaks) && + (FindNextPeak(pMag, iHighestBin, &iCurrentLoc, &fPeakMag, + &fPeakLoc, pAnalParams->fMinPeakMag) == 1)) + { + /* store peak values */ + pSpectralPeaks[iPeak].fFreq = pAnalParams->iSamplingRate * fPeakLoc * fInvSizeFft; + pSpectralPeaks[iPeak].fMag = fPeakMag; + pSpectralPeaks[iPeak].fPhase = GetPhaseVal(pPhase, fPeakLoc); + iPeak++; + } + + /* return the number of peaks found */ + return iPeak; +} diff --git a/src/sms/residual.c b/src/sms/residual.c new file mode 100644 index 0000000..0c720f0 --- /dev/null +++ b/src/sms/residual.c @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2008 MUSIC TECHNOLOGY GROUP (MTG) + * UNIVERSITAT POMPEU FABRA + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +/*! \file residual.c + * \brief main sms_residual() function + */ + +#include "sms.h" + +/*! \brief get the residual waveform + * + * \param sizeWindow size of buffers + * \param pSynthesis pointer to deterministic component + * \param pOriginal pointer to original waveform + * \param pResidual pointer to output residual waveform + * \param pWindow pointer to windowing array + * \return residual percentage (0 if residual was not large enough) + */ +int sms_residual(int sizeWindow, sfloat *pSynthesis, sfloat *pOriginal, + SMS_ResidualParams* residualParams) +{ + sfloat fScale = 1.; + sfloat fCurrentResidualMag = 0.; + sfloat fCurrentOriginalMag = 0.; + int i; + + /* get residual */ + for(i = 0; i < sizeWindow; i++) + residualParams->residual[i] = pOriginal[i] - pSynthesis[i]; + + /* get energy of residual */ + for(i = 0; i < sizeWindow; i++) + fCurrentResidualMag += (residualParams->residual[i] * residualParams->residual[i]); + + /* if residual is big enough compute coefficients */ + if(fCurrentResidualMag) + { + /* get energy of original */ + for(i = 0; i < sizeWindow; i++) + fCurrentOriginalMag += (pOriginal[i] * pOriginal[i]); + + residualParams->originalMag = + .5 * (fCurrentOriginalMag/sizeWindow + residualParams->originalMag); + residualParams->residualMag = + .5 * (fCurrentResidualMag/sizeWindow + residualParams->residualMag); + + /* scale residual if need to be */ + if(residualParams->residualMag > residualParams->originalMag) + { + fScale = residualParams->originalMag / residualParams->residualMag; + for(i = 0; i < sizeWindow; i++) + residualParams->residual[i] *= fScale; + } + + return fCurrentResidualMag / fCurrentOriginalMag; + } + return 0; +} + diff --git a/src/sms/sineSynth.c b/src/sms/sineSynth.c new file mode 100644 index 0000000..9882062 --- /dev/null +++ b/src/sms/sineSynth.c @@ -0,0 +1,190 @@ +/* + * Copyright (c) 2008 MUSIC TECHNOLOGY GROUP (MTG) + * UNIVERSITAT POMPEU FABRA + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +/*! \file sineSynth.c + * \brief functions for synthesizing evolving sinusoids + */ + +#include "sms.h" + +/*! \brief generate a sinusoid given two peaks, current and last + * + * it interpolation between phase values and magnitudes + * + * \param fFreq current frequency + * \param fMag current magnitude + * \param fPhase current phase + * \param pLastFrame stucture with values from last frame + * \param pFWaveform pointer to output waveform + * \param sizeBuffer size of the synthesis buffer + * \param iTrack current track + */ +static void SinePhaSynth(sfloat fFreq, sfloat fMag, sfloat fPhase, + SMS_Data *pLastFrame, sfloat *pFWaveform, + int sizeBuffer, int iTrack) +{ + sfloat fMagIncr, fInstMag, fInstPhase, fTmp; + int iM, i; + sfloat fAlpha, fBeta, fTmp1, fTmp2; + + /* if no mag in last frame copy freq from current and make phase */ + if(pLastFrame->pFSinAmp[iTrack] <= 0) + { + pLastFrame->pFSinFreq[iTrack] = fFreq; + fTmp = fPhase - (fFreq * sizeBuffer); + pLastFrame->pFSinPha[iTrack] = fTmp - floor(fTmp / TWO_PI) * TWO_PI; + } + /* and the other way */ + else if(fMag <= 0) + { + fFreq = pLastFrame->pFSinFreq[iTrack]; + fTmp = pLastFrame->pFSinPha[iTrack] + + (pLastFrame->pFSinFreq[iTrack] * sizeBuffer); + fPhase = fTmp - floor(fTmp / TWO_PI) * TWO_PI; + } + + /* caculate the instantaneous amplitude */ + fMagIncr = (fMag - pLastFrame->pFSinAmp[iTrack]) / sizeBuffer; + fInstMag = pLastFrame->pFSinAmp[iTrack]; + + /* create instantaneous phase from freq. and phase values */ + fTmp1 = fFreq - pLastFrame->pFSinFreq[iTrack]; + fTmp2 = ((pLastFrame->pFSinPha[iTrack] + + pLastFrame->pFSinFreq[iTrack] * sizeBuffer - fPhase) + + fTmp1 * sizeBuffer / 2.0) / TWO_PI; + iM = (int)(fTmp2 + .5); + fTmp2 = fPhase - pLastFrame->pFSinPha[iTrack] - + pLastFrame->pFSinFreq[iTrack] * sizeBuffer + TWO_PI * iM; + fAlpha = (3.0 / (sfloat)(sizeBuffer * sizeBuffer)) * + fTmp2 - fTmp1 / sizeBuffer; + fBeta = (-2.0 / ((sfloat) (sizeBuffer * sizeBuffer * sizeBuffer))) * + fTmp2 + fTmp1 / ((sfloat) (sizeBuffer * sizeBuffer)); + + for(i=0; ipFSinPha[iTrack] + + pLastFrame->pFSinFreq[iTrack] * i + + fAlpha * i * i + fBeta * i * i * i; + + /*pFWaveform[i] += sms_dBToMag(fInstMag) * sms_sine(fInstPhase + PI_2);*/ + pFWaveform[i] += sms_dBToMag(fInstMag) * sinf(fInstPhase + PI_2); + } + + /* save current values into buffer */ + pLastFrame->pFSinFreq[iTrack] = fFreq; + pLastFrame->pFSinAmp[iTrack] = fMag; + pLastFrame->pFSinPha[iTrack] = fPhase; +} + +/*! \brief generate a sinusoid given two frames, current and last + * + * \param fFreq current frequency + * \param fMag current magnitude + * \param pLastFrame stucture with values from last frame + * \param pFBuffer pointer to output waveform + * \param sizeBuffer size of the synthesis buffer + * \param iTrack current track + */ +static void SineSynth(sfloat fFreq, sfloat fMag, SMS_Data *pLastFrame, + sfloat *pFBuffer, int sizeBuffer, int iTrack) +{ + sfloat fMagIncr, fInstMag, fFreqIncr, fInstPhase, fInstFreq; + int i; + + /* if no mag in last frame copy freq from current */ + if(pLastFrame->pFSinAmp[iTrack] <= 0) + { + pLastFrame->pFSinFreq[iTrack] = fFreq; + pLastFrame->pFSinPha[iTrack] = TWO_PI * sms_random(); + } + /* and the other way */ + else if(fMag <= 0) + fFreq = pLastFrame->pFSinFreq[iTrack]; + + /* calculate the instantaneous amplitude */ + fMagIncr = (fMag - pLastFrame->pFSinAmp[iTrack]) / sizeBuffer; + fInstMag = pLastFrame->pFSinAmp[iTrack]; + /* calculate instantaneous frequency */ + fFreqIncr = (fFreq - pLastFrame->pFSinFreq[iTrack]) / sizeBuffer; + fInstFreq = pLastFrame->pFSinFreq[iTrack]; + fInstPhase = pLastFrame->pFSinPha[iTrack]; + + /* generate all the samples */ + for(i = 0; i < sizeBuffer; i++) + { + fInstMag += fMagIncr; + fInstFreq += fFreqIncr; + fInstPhase += fInstFreq; + pFBuffer[i] += sms_dBToMag(fInstMag) * sms_sine(fInstPhase); + } + + /* save current values into last values */ + pLastFrame->pFSinFreq[iTrack] = fFreq; + pLastFrame->pFSinAmp[iTrack] = fMag; + pLastFrame->pFSinPha[iTrack] = fInstPhase - floor(fInstPhase / TWO_PI) * TWO_PI; +} + +/*! \brief generate all the sinusoids for a given frame + * + * \param pSmsData SMS data for current frame + * \param pFBuffer pointer to output waveform + * \param sizeBuffer size of the synthesis buffer + * \param pLastFrame SMS data from last frame + * \param iSamplingRate sampling rate to synthesize for + */ +void sms_sineSynthFrame(SMS_Data *pSmsData, sfloat *pFBuffer, + int sizeBuffer, SMS_Data *pLastFrame, + int iSamplingRate) +{ + sfloat fMag, fFreq; + int i; + int nTracks = pSmsData->nTracks; + int iHalfSamplingRate = iSamplingRate >> 1; + + /* go through all the tracks */ + for(i = 0; i < nTracks; i++) + { + fMag = pSmsData->pFSinAmp[i]; + fFreq = pSmsData->pFSinFreq[i]; + + /* make that sure transposed frequencies don't alias */ + if(fFreq > iHalfSamplingRate || fFreq < 0) + fMag = 0; + + /* generate sines if there are magnitude values */ + if((fMag > 0) || (pLastFrame->pFSinAmp[i] > 0)) + { + /* frequency from Hz to radians */ + fFreq = (fFreq == 0) ? 0 : TWO_PI * fFreq / iSamplingRate; + + /* \todo make seperate function for SineSynth /wo phase */ + if(pSmsData->pFSinPha == NULL) + { + SineSynth(fFreq, fMag, pLastFrame, pFBuffer, sizeBuffer, i); + } + else + { + SinePhaSynth(fFreq, fMag, pSmsData->pFSinPha[i], pLastFrame, + pFBuffer, sizeBuffer, i); + } + } + } +} diff --git a/src/sms/sms.c b/src/sms/sms.c new file mode 100644 index 0000000..8501d4d --- /dev/null +++ b/src/sms/sms.c @@ -0,0 +1,1132 @@ +/* + * Copyright (c) 2008 MUSIC TECHNOLOGY GROUP (MTG) + * UNIVERSITAT POMPEU FABRA + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +/*! \file sms.c + * \brief initialization, free, and debug functions + */ + +#include "sms.h" +#include "SFMT.h" /*!< mersenne twister random number genorator */ + +char *pChDebugFile = "debug.txt"; /*!< debug text file */ +FILE *pDebug; /*!< pointer to debug file */ + +static char error_message[256]; +static int error_status = 0; +static sfloat mag_thresh = .00001; /*!< magnitude threshold for db conversion (-100db)*/ +static sfloat inv_mag_thresh = 100000.; /*!< inv(.00001) */ +static int initIsDone = 0; /* \todo is this variable necessary? */ + +#define SIZE_TABLES 4096 +#define HALF_MAX 1073741823.5 /*!< half the max of a 32-bit word */ +#define INV_HALF_MAX (1.0 / HALF_MAX) +#define TWENTY_OVER_LOG10 (20. / LOG10) + +/*! \brief initialize global data + * + * Currently, just generating the sine and sinc tables. + * This is necessary before both analysis and synthesis. + * + * If using the Mersenne Twister algorithm for random number + * generation, initialize (seed) it. + * + * \return error code \see SMS_MALLOC or SMS_OK in SMS_ERRORS + */ +int sms_init(void) +{ + if (!initIsDone) + { + initIsDone = 1; + if(sms_prepSine(SIZE_TABLES)) + { + sms_error("cannot allocate memory for sine table"); + return -1; + } + if(sms_prepSinc(SIZE_TABLES)) + { + sms_error("cannot allocate memory for sinc table"); + return -1; + } + +#ifdef MERSENNE_TWISTER + init_gen_rand(1234); +#endif + } + + return 0; +} + +/*! \brief free global data + * + * deallocates memory allocated to global arrays (windows and tables) + */ +void sms_free() +{ + initIsDone = 0; + sms_clearSine(); + sms_clearSinc(); +} + +/*! \brief give default values to an SMS_AnalParams struct + * + * This will initialize an SMS_AnalParams with values that work + * for common analyses. It is useful to start with and then + * adjust the parameters manually to fit a particular sound + * + * Certain things are hard coded in here that will have to + * be updated later (i.e. samplerate), so it is best to call this + * function first, then fill whatever parameters need to be + * adjusted. + * + * \param pAnalParams pointer to analysis data structure + */ +void sms_initAnalParams(SMS_AnalParams *pAnalParams) +{ + int i; + pAnalParams->iDebugMode = 0; + pAnalParams->iFormat = SMS_FORMAT_H; + pAnalParams->iSoundType = SMS_SOUND_TYPE_MELODY; + pAnalParams->iStochasticType =SMS_STOC_APPROX; + pAnalParams->iFrameRate = 300; + pAnalParams->nStochasticCoeff = 128; + pAnalParams->fLowestFundamental = 50; + pAnalParams->fHighestFundamental = 1000; + pAnalParams->fDefaultFundamental = 100; + pAnalParams->fPeakContToGuide = .4; + pAnalParams->fFundContToGuide = .5; + pAnalParams->fFreqDeviation = .45; + pAnalParams->iSamplingRate = 44100; /* should be set to the real samplingrate with sms_initAnalysis */ + pAnalParams->iDefaultSizeWindow = 1001; + pAnalParams->windowSize = 0; + pAnalParams->sizeHop = 110; + pAnalParams->fSizeWindow = 3.5; + pAnalParams->nTracks = 60; + pAnalParams->maxPeaks = 60; + pAnalParams->nGuides = 100; + pAnalParams->iCleanTracks = 1; + pAnalParams->fMinRefHarmMag = 30; + pAnalParams->fRefHarmMagDiffFromMax = 30; + pAnalParams->iRefHarmonic = 1; + pAnalParams->iMinTrackLength = 40; /*!< depends on iFrameRate normally */ + pAnalParams->iMaxSleepingTime = 40; /*!< depends on iFrameRate normally */ + pAnalParams->fLowestFreq = 50.0; + pAnalParams->fHighestFreq = 12000.; + pAnalParams->fMinPeakMag = 0.; + pAnalParams->iAnalysisDirection = SMS_DIR_FWD; + pAnalParams->iWindowType = SMS_WIN_BH_70; + pAnalParams->iSizeSound = 0; /*!< no sound yet */ + pAnalParams->nFrames = 0; /*!< no frames yet */ + pAnalParams->minGoodFrames = 3; + pAnalParams->maxDeviation = 0.01; + pAnalParams->analDelay = 100; + pAnalParams->iMaxDelayFrames = MAX(pAnalParams->iMinTrackLength, pAnalParams->iMaxSleepingTime) + 2 + + (pAnalParams->minGoodFrames + pAnalParams->analDelay); + pAnalParams->fResidualAccumPerc = 0.; + pAnalParams->preEmphasis = 1; /*!< perform pre-emphasis by default */ + pAnalParams->preEmphasisLastValue = 0.; + /* spectral envelope params */ + pAnalParams->specEnvParams.iType = SMS_ENV_NONE; /* turn off enveloping */ + pAnalParams->specEnvParams.iOrder = 25; /* ... but set default params anyway */ + pAnalParams->specEnvParams.fLambda = 0.00001; + pAnalParams->specEnvParams.iMaxFreq = 0; + pAnalParams->specEnvParams.nCoeff = 0; + pAnalParams->specEnvParams.iAnchor = 0; /* not yet implemented */ + pAnalParams->pFrames = NULL; + /* fft */ + for(i = 0; i < SMS_MAX_SPEC; i++) + { + pAnalParams->magSpectrum[i] = 0.0; + pAnalParams->phaseSpectrum[i] = 0.0; + pAnalParams->spectrumWindow[i] = 0.0; + pAnalParams->fftBuffer[i] = 0.0; + pAnalParams->fftBuffer[i+SMS_MAX_SPEC] = 0.0; + } + /* analysis frames */ + pAnalParams->pFrames = NULL; + pAnalParams->ppFrames = NULL; + /* residual */ + sms_initResidualParams(&pAnalParams->residualParams); + /* peak continuation */ + pAnalParams->guideStates = NULL; + pAnalParams->guides = NULL; + /* audio input frame */ + for(i = 0; i < SMS_MAX_FRAME_SIZE; i++) + pAnalParams->inputBuffer[i] = 0.0; + /* stochastic analysis */ + pAnalParams->stocMagSpectrum = NULL; + pAnalParams->approxEnvelope = NULL; + pAnalParams->ppFrames = NULL; +} + +/*! \brief initialize analysis data structure's arrays + * + * based on the SMS_AnalParams current settings, this function will + * initialize the sound, synth, and fft arrays. It is necessary before analysis. + * there can be multple SMS_AnalParams at the same time + * + * \param pAnalParams pointer to analysis paramaters + * \param pSoundHeader pointer to sound header + * \return 0 on success, -1 on error + */ +int sms_initAnalysis(SMS_AnalParams *pAnalParams) +{ + int i; + SMS_SndBuffer *pSynthBuf = &pAnalParams->synthBuffer; + SMS_SndBuffer *pSoundBuf = &pAnalParams->soundBuffer; + + /* define the hopsize for each record */ + pAnalParams->sizeHop = (int)(pAnalParams->iSamplingRate / + (sfloat) pAnalParams->iFrameRate); + + /* set the default size window to an odd length */ + pAnalParams->iDefaultSizeWindow = + (int)((pAnalParams->iSamplingRate / pAnalParams->fDefaultFundamental) * + pAnalParams->fSizeWindow / 2) * 2 + 1; + + int sizeBuffer = (pAnalParams->iMaxDelayFrames * pAnalParams->sizeHop) + SMS_MAX_WINDOW; + + /* if storing residual phases, restrict number of stochastic coefficients to the size of the spectrum (sizeHop = 1/2 sizeFft)*/ + if(pAnalParams->iStochasticType == SMS_STOC_IFFT) + pAnalParams->nStochasticCoeff = sms_power2(pAnalParams->sizeHop); + + /* do the same if spectral envelope is to be stored in frequency bins */ + if(pAnalParams->specEnvParams.iType == SMS_ENV_FBINS) + pAnalParams->specEnvParams.nCoeff = sms_power2(pAnalParams->specEnvParams.iOrder * 2); + else if(pAnalParams->specEnvParams.iType == SMS_ENV_CEP) + pAnalParams->specEnvParams.nCoeff = pAnalParams->specEnvParams.iOrder+1; + /* if specEnvParams.iMaxFreq is still 0, set it to the same as fHighestFreq (normally what you want)*/ + if(pAnalParams->specEnvParams.iMaxFreq == 0) + pAnalParams->specEnvParams.iMaxFreq = pAnalParams->fHighestFreq; + + /*\todo this probably doesn't need env coefficients - they aren't getting used */ + if(sms_allocFrame(&pAnalParams->prevFrame, pAnalParams->nGuides, + pAnalParams->nStochasticCoeff, 1, pAnalParams->iStochasticType, 0) + == -1) + { + sms_error("Could not allocate memory for prevFrame"); + return -1; + } + + pAnalParams->sizeNextRead = (pAnalParams->iDefaultSizeWindow + 1) * 0.5; + + /* sound buffer */ + if((pSoundBuf->pFBuffer = (sfloat *) calloc(sizeBuffer, sizeof(sfloat))) == NULL) + { + sms_error("Could not allocate memory for sound buffer"); + return -1; + } + pSoundBuf->iMarker = -sizeBuffer; + pSoundBuf->iFirstGood = sizeBuffer; + pSoundBuf->sizeBuffer = sizeBuffer; + + /* check default fundamental */ + if (pAnalParams->fDefaultFundamental < pAnalParams->fLowestFundamental) + { + pAnalParams->fDefaultFundamental = pAnalParams->fLowestFundamental; + } + if (pAnalParams->fDefaultFundamental > pAnalParams->fHighestFundamental) + { + pAnalParams->fDefaultFundamental = pAnalParams->fHighestFundamental; + } + + /* deterministic synthesis buffer */ + pSynthBuf->sizeBuffer = pAnalParams->sizeHop << 1; + pSynthBuf->pFBuffer = calloc(pSynthBuf->sizeBuffer, sizeof(sfloat)); + if(pSynthBuf->pFBuffer == NULL) + { + sms_error("could not allocate memory"); + return -1; + } + pSynthBuf->iMarker = pSynthBuf->sizeBuffer; + /* buffer of analysis frames */ + pAnalParams->pFrames = (SMS_AnalFrame *)malloc(pAnalParams->iMaxDelayFrames * sizeof(SMS_AnalFrame)); + if(pAnalParams->pFrames == NULL) + { + sms_error("could not allocate memory for delay frames"); + return -1; + } + pAnalParams->ppFrames = (SMS_AnalFrame **)malloc(pAnalParams->iMaxDelayFrames * sizeof(SMS_AnalFrame *)); + if(pAnalParams->ppFrames == NULL) + { + sms_error("could not allocate memory for pointers to delay frames"); + return -1; + } + + /* initialize the frame pointers and allocate memory */ + for(i = 0; i < pAnalParams->iMaxDelayFrames; i++) + { + pAnalParams->pFrames[i].iStatus = SMS_FRAME_EMPTY; + pAnalParams->pFrames[i].iFrameSample = 0; + pAnalParams->pFrames[i].iFrameSize = 0; + pAnalParams->pFrames[i].iFrameNum = 0; + pAnalParams->pFrames[i].pSpectralPeaks = + (SMS_Peak *)malloc(pAnalParams->maxPeaks * sizeof(SMS_Peak)); + if((pAnalParams->pFrames[i]).pSpectralPeaks == NULL) + { + sms_error("could not allocate memory for spectral peaks"); + return -1; + } + (pAnalParams->pFrames[i].deterministic).nTracks = pAnalParams->nGuides; + + (pAnalParams->pFrames[i].deterministic).pFSinFreq = + (sfloat *)calloc(pAnalParams->nGuides, sizeof(sfloat)); + if((pAnalParams->pFrames[i].deterministic).pFSinFreq == NULL) + { + sms_error("could not allocate memory"); + return -1; + } + + (pAnalParams->pFrames[i].deterministic).pFSinAmp = + (sfloat *)calloc(pAnalParams->nGuides, sizeof(sfloat)); + if((pAnalParams->pFrames[i].deterministic).pFSinAmp == NULL) + { + sms_error("could not allocate memory"); + return -1; + } + + (pAnalParams->pFrames[i].deterministic).pFSinPha = + (sfloat *)calloc(pAnalParams->nGuides, sizeof(sfloat)); + if((pAnalParams->pFrames[i].deterministic).pFSinPha == NULL) + { + sms_error("could not allocate memory"); + return -1; + } + pAnalParams->ppFrames[i] = &pAnalParams->pFrames[i]; + + /* set initial values */ + if(sms_clearAnalysisFrame(i, pAnalParams) < 0) + { + sms_error("could not set initial values for analysis frames"); + return -1; + } + } + + /* memory for residual */ + pAnalParams->residualParams.hopSize = pAnalParams->sizeHop; + sms_initResidual(&pAnalParams->residualParams); + + /* memory for guide states */ + pAnalParams->guideStates = (int *)calloc(pAnalParams->nGuides, sizeof(int)); + if(pAnalParams->guideStates == NULL) + { + sms_error("Could not allocate memory for guide states"); + return -1; + } + + /* memory for guides */ + pAnalParams->guides = (SMS_Guide *)malloc(pAnalParams->nGuides * sizeof(SMS_Guide)); + if(pAnalParams->guides == NULL) + { + sms_error("Could not allocate memory for guides"); + return -1; + } + + /* initial guide values */ + for (i = 0; i < pAnalParams->nGuides; i++) + { + if(pAnalParams->iFormat == SMS_FORMAT_H || pAnalParams->iFormat == SMS_FORMAT_HP) + { + pAnalParams->guides[i].fFreq = pAnalParams->fDefaultFundamental * (i + 1); + } + else + { + pAnalParams->guides[i].fFreq = 0.0; + } + pAnalParams->guides[i].fMag = 0.0; + pAnalParams->guides[i].iPeakChosen = -1; + pAnalParams->guides[i].iStatus = 0; + } + + /* stochastic analysis */ + pAnalParams->sizeStocMagSpectrum = sms_power2(pAnalParams->residualParams.residualSize) >> 1; + pAnalParams->stocMagSpectrum = (sfloat *)calloc(pAnalParams->sizeStocMagSpectrum, sizeof(sfloat)); + if(pAnalParams->stocMagSpectrum == NULL) + { + sms_error("Could not allocate memory for stochastic magnitude spectrum"); + return -1; + } + pAnalParams->approxEnvelope = (sfloat *)calloc(pAnalParams->nStochasticCoeff, sizeof(sfloat)); + if(pAnalParams->approxEnvelope == NULL) + { + sms_error("Could not allocate memory for spectral approximation envelope"); + return -1; + } + + return 0; +} + +/*! \brief give default values to an SMS_SynthParams struct + * + * This will initialize an SMS_SynthParams with values that work + * for common analyses. It is useful to start with and then + * adjust the parameters manually to fit a particular sound + * + * \param synthParams pointer to synthesis parameters data structure + */ +void sms_initSynthParams(SMS_SynthParams *synthParams) +{ + synthParams->iSamplingRate = 44100; + synthParams->iOriginalSRate = 44100; + synthParams->iSynthesisType = SMS_STYPE_ALL; + synthParams->iDetSynthType = SMS_DET_IFFT; + synthParams->sizeHop = SMS_MIN_SIZE_FRAME; + synthParams->origSizeHop = SMS_MIN_SIZE_FRAME; + synthParams->nTracks = 60; + synthParams->iStochasticType = SMS_STOC_APPROX; + synthParams->nStochasticCoeff = 128; + synthParams->pFDetWindow = NULL; + synthParams->pFStocWindow = NULL; + synthParams->pSynthBuff = NULL; + synthParams->pMagBuff = NULL; + synthParams->pPhaseBuff = NULL; + synthParams->pSpectra = NULL; + synthParams->approxEnvelope = NULL; + synthParams->deEmphasis = 1; /*!< perform de-emphasis by default */ + synthParams->deEmphasisLastValue = 0; +} + +/*! \brief initialize synthesis data structure's arrays + * + * Initialize the synthesis and fft arrays. It is necessary before synthesis. + * there can be multple SMS_SynthParams at the same time + * This function also sets some initial values that will create a sane synthesis + * environment. + * + * This function requires an SMS_Header because it may be called to synthesize + * a stored .sms file, which contains a header with necessary information. + * + * \param pSmsHeader pointer to SMS_Header + * \param pSynthParams pointer to synthesis paramaters + * \return 0 on success, -1 on error + */ +int sms_initSynth(SMS_SynthParams *pSynthParams) +{ + int sizeHop, sizeFft; + + /* make sure sizeHop is something to the power of 2 */ + sizeHop = sms_power2(pSynthParams->sizeHop); + if(sizeHop != pSynthParams->sizeHop) + { + printf("Warning: Synthesis hop size (%d) was not a power of two.\n", + pSynthParams->sizeHop); + printf(" Changed to %d.\n", sizeHop); + pSynthParams->sizeHop = sizeHop; + } + sizeFft = sizeHop * 2; + + /* TODO: check memory allocation */ + pSynthParams->pFStocWindow = (sfloat *)calloc(sizeFft, sizeof(sfloat)); + sms_getWindow(sizeFft, pSynthParams->pFStocWindow, SMS_WIN_HANNING); + pSynthParams->pFDetWindow = (sfloat *)calloc(sizeFft, sizeof(sfloat)); + sms_getWindow(sizeFft, pSynthParams->pFDetWindow, SMS_WIN_IFFT); + + /* allocate memory for analysis data - size of original hopsize + * previous frame to interpolate from */ + /* \todo why is stoch coeff + 1? */ + sms_allocFrame(&pSynthParams->prevFrame, pSynthParams->nTracks, + pSynthParams->nStochasticCoeff + 1, 1, + pSynthParams->iStochasticType, 0); + + pSynthParams->pSynthBuff = (sfloat *)calloc(sizeFft, sizeof(sfloat)); + pSynthParams->pMagBuff = (sfloat *)calloc(sizeHop, sizeof(sfloat)); + pSynthParams->pPhaseBuff = (sfloat *)calloc(sizeHop, sizeof(sfloat)); + pSynthParams->pSpectra = (sfloat *)calloc(sizeFft, sizeof(sfloat)); + + /* approximation envelope */ + pSynthParams->approxEnvelope = (sfloat *)calloc(pSynthParams->nStochasticCoeff, sizeof(sfloat)); + if(pSynthParams->approxEnvelope == NULL) + { + sms_error("Could not allocate memory for spectral approximation envelope"); + return -1; + } + + return SMS_OK; +} + +/*! \brief give default values to an SMS_ResidualParams struct + * + * \param residualParams pointer to residual data structure + */ +void sms_initResidualParams(SMS_ResidualParams *residualParams) +{ + residualParams->samplingRate = 44100; + residualParams->hopSize = 256; + residualParams->residualSize = 0; + residualParams->residual = NULL; + residualParams->fftWindow = NULL; + residualParams->ifftWindow = NULL; + residualParams->windowScale = 0.0; + residualParams->residualMag = 0.0; + residualParams->originalMag = 0.0; + residualParams->nCoeffs = 128; + residualParams->stocCoeffs = NULL; + residualParams->sizeStocMagSpectrum = 0; + residualParams->stocMagSpectrum = NULL; + residualParams->stocPhaseSpectrum = NULL; + residualParams->approx = NULL; + residualParams->approxEnvelope = NULL; + int i; + for(i = 0; i < SMS_MAX_SPEC; i++) + { + residualParams->fftBuffer[i] = 0.0; + residualParams->fftBuffer[i+SMS_MAX_SPEC] = 0.0; + } +} + +/*! \brief initialize residual data structure + * + * \param residualParams pointer to synthesis paramaters + * \return 0 on success, -1 on error + */ +int sms_initResidual(SMS_ResidualParams *residualParams) +{ + if(residualParams->hopSize <= 0) + { + sms_error("Residual hop size must be a positive integer"); + return -1; + } + + /* residual signal */ + residualParams->residualSize = residualParams->hopSize * 2; + residualParams->residual = (sfloat *)calloc(residualParams->residualSize, sizeof(sfloat)); + if(residualParams->residual == NULL) + { + sms_error("Could not allocate memory for residual"); + return -1; + } + + /* residual fft/ifft windows */ + residualParams->fftWindow = (sfloat *)calloc(residualParams->residualSize, sizeof(sfloat)); + if(residualParams->fftWindow == NULL) + { + sms_error("Could not allocate memory for residual FFT window"); + return -1; + } + sms_getWindow(residualParams->residualSize, residualParams->fftWindow, SMS_WIN_BH_70); + sms_scaleWindow(residualParams->residualSize, residualParams->fftWindow); + + residualParams->ifftWindow = (sfloat *)calloc(residualParams->residualSize, sizeof(sfloat)); + if(residualParams->ifftWindow == NULL) + { + sms_error("Could not allocate memory for residual IFFT window"); + return -1; + } + sms_getWindow(residualParams->residualSize, residualParams->ifftWindow, SMS_WIN_HANNING); + /* compute IFFT window scaling: + * windows per hop = hop size / window size = 0.5 + * overlap = 50% => 1 window total in each hop/frame + * => windowScale = window size / sum(window samples) = 1.85 + * for a 1024 sized hamming window + */ + int i; + sfloat sum = 0.0; + for(i = 0; i < residualParams->residualSize; i++) + sum += residualParams->ifftWindow[i]; + residualParams->windowScale = (sfloat)residualParams->residualSize / sum; + + /* stochastic analysis */ + residualParams->stocCoeffs = (sfloat *)calloc(residualParams->nCoeffs, sizeof(sfloat)); + if(residualParams->stocCoeffs == NULL) + { + sms_error("Could not allocate memory for stochastic coefficients"); + return -1; + } + + residualParams->sizeStocMagSpectrum = sms_power2(residualParams->residualSize) >> 1; + residualParams->stocMagSpectrum = (sfloat *)calloc(residualParams->sizeStocMagSpectrum, sizeof(sfloat)); + if(residualParams->stocMagSpectrum == NULL) + { + sms_error("Could not allocate memory for stochastic magnitude spectrum"); + return -1; + } + residualParams->stocPhaseSpectrum = (sfloat *)calloc(residualParams->sizeStocMagSpectrum, sizeof(sfloat)); + if(residualParams->stocPhaseSpectrum == NULL) + { + sms_error("Could not allocate memory for stochastic magnitude spectrum"); + return -1; + } + + residualParams->approx = (sfloat *)calloc(residualParams->residualSize, sizeof(sfloat)); + if(residualParams->approx == NULL) + { + sms_error("Could not allocate memory for spectral approximation"); + return -1; + } + residualParams->approxEnvelope = (sfloat *)calloc(residualParams->nCoeffs, sizeof(sfloat)); + if(residualParams->approxEnvelope == NULL) + { + sms_error("Could not allocate memory for spectral approximation envelope"); + return -1; + } + + return 0; +} + +/*! \brief free residual data + * + * frees all the memory allocated to an SMS_ResidualParams by + * sms_initResidual + * + * \param residualParams pointer to residual data structure + */ +void sms_freeResidual(SMS_ResidualParams *residualParams) +{ + if(residualParams->residual) + free(residualParams->residual); + if(residualParams->fftWindow) + free(residualParams->fftWindow); + if(residualParams->ifftWindow) + free(residualParams->ifftWindow); + if(residualParams->stocCoeffs) + free(residualParams->stocCoeffs); + if(residualParams->stocMagSpectrum) + free(residualParams->stocMagSpectrum); + if(residualParams->stocPhaseSpectrum) + free(residualParams->stocPhaseSpectrum); + if(residualParams->approx) + free(residualParams->approx); + if(residualParams->approxEnvelope) + free(residualParams->approxEnvelope); + + residualParams->residual = NULL; + residualParams->fftWindow = NULL; + residualParams->ifftWindow = NULL; + residualParams->stocCoeffs = NULL; + residualParams->stocMagSpectrum = NULL; + residualParams->stocPhaseSpectrum = NULL; + residualParams->approx = NULL; + residualParams->approxEnvelope = NULL; +} + +/*! \brief free analysis data + * + * frees all the memory allocated to an SMS_AnalParams by + * sms_initAnalysis + * + * \param pAnalParams pointer to analysis data structure + */ +void sms_freeAnalysis(SMS_AnalParams *pAnalParams) +{ + if(pAnalParams->pFrames) + { + int i; + for(i = 0; i < pAnalParams->iMaxDelayFrames; i++) + { + if((pAnalParams->pFrames[i]).pSpectralPeaks) + free((pAnalParams->pFrames[i]).pSpectralPeaks); + if((pAnalParams->pFrames[i].deterministic).pFSinFreq) + free((pAnalParams->pFrames[i].deterministic).pFSinFreq); + if((pAnalParams->pFrames[i].deterministic).pFSinAmp) + free((pAnalParams->pFrames[i].deterministic).pFSinAmp); + if((pAnalParams->pFrames[i].deterministic).pFSinPha) + free((pAnalParams->pFrames[i].deterministic).pFSinPha); + } + free(pAnalParams->pFrames); + } + + sms_freeFrame(&pAnalParams->prevFrame); + sms_freeResidual(&pAnalParams->residualParams); + + if(pAnalParams->soundBuffer.pFBuffer) + free(pAnalParams->soundBuffer.pFBuffer); + if((pAnalParams->synthBuffer).pFBuffer) + free((pAnalParams->synthBuffer).pFBuffer); + if(pAnalParams->ppFrames) + free(pAnalParams->ppFrames); + if(pAnalParams->guideStates) + free(pAnalParams->guideStates); + if(pAnalParams->guides) + free(pAnalParams->guides); + if(pAnalParams->stocMagSpectrum) + free(pAnalParams->stocMagSpectrum); + if(pAnalParams->approxEnvelope) + free(pAnalParams->approxEnvelope); + + pAnalParams->pFrames = NULL; + pAnalParams->ppFrames = NULL; + pAnalParams->soundBuffer.pFBuffer = NULL; + pAnalParams->synthBuffer.pFBuffer = NULL; + pAnalParams->guideStates = NULL; + pAnalParams->guides = NULL; + pAnalParams->stocMagSpectrum = NULL; + pAnalParams->approxEnvelope = NULL; +} + +/*! \brief free analysis data + * + * frees all the memory allocated to an SMS_SynthParams by + * sms_initSynthesis + * + * \todo is there a way to make sure the plan has been made + * already? as it is, it crashes if this is called without one + * \param pSynthParams pointer to synthesis data structure + */ +void sms_freeSynth(SMS_SynthParams *pSynthParams) +{ + if(pSynthParams->pFStocWindow) + free(pSynthParams->pFStocWindow); + if(pSynthParams->pFDetWindow) + free(pSynthParams->pFDetWindow); + if(pSynthParams->pSynthBuff) + free(pSynthParams->pSynthBuff); + if(pSynthParams->pSpectra) + free(pSynthParams->pSpectra); + if(pSynthParams->pMagBuff) + free(pSynthParams->pMagBuff); + if(pSynthParams->pPhaseBuff) + free(pSynthParams->pPhaseBuff); + if(pSynthParams->approxEnvelope) + free(pSynthParams->approxEnvelope); + + sms_freeFrame(&pSynthParams->prevFrame); +} + +/*! \brief Allocate memory for an array of spectral peaks + * + * Creates memory and sets default values. + * + * \param peaks the spectral peaks + * \param n number of peaks + * \return 0 on success, -1 on error + */ +int sms_initSpectralPeaks(SMS_SpectralPeaks* peaks, int n) +{ + peaks->nPeaks = n; + peaks->nPeaksFound = 0; + + peaks->pSpectralPeaks = (SMS_Peak *)malloc(n * sizeof(SMS_Peak)); + if(peaks->pSpectralPeaks == NULL) + { + sms_error("could not allocate memory for spectral peaks"); + return -1; + } + return 0; +} + +/*! \brief Deallocate memory for an array of spectral peaks + * + * \param peaks the spectral peaks + */ +void sms_freeSpectralPeaks(SMS_SpectralPeaks* peaks) +{ + if(!peaks) + return; + + if(peaks->pSpectralPeaks) + free(peaks->pSpectralPeaks); + peaks->nPeaks = 0; + peaks->nPeaksFound = 0; +} + +/*! \brief set window size for next frame + * + * adjusts the next window size to fit the currently detected fundamental + * frequency, or resets to a default window size if unstable. + * + * \param iCurrentFrame number of current frame + * \param pAnalParams analysis parameters + * \return the size of the next window in samples + */ +int sms_sizeNextWindow(int iCurrentFrame, SMS_AnalParams *pAnalParams) +{ + sfloat fFund = pAnalParams->ppFrames[iCurrentFrame]->fFundamental; + sfloat fPrevFund = pAnalParams->ppFrames[iCurrentFrame-1]->fFundamental; + int sizeWindow; + + /* if the previous fundamental was stable use it to set the window size */ + if(fPrevFund > 0 && fabs(fPrevFund - fFund) / fFund <= .2) + sizeWindow = (int)((pAnalParams->iSamplingRate / fFund) * + pAnalParams->fSizeWindow * .5) * 2 + 1; + /* otherwise use the default size window */ + else + sizeWindow = pAnalParams->iDefaultSizeWindow; + + if(sizeWindow > SMS_MAX_WINDOW) + { + fprintf(stderr, "sms_sizeNextWindow error: sizeWindow (%d) too big, set to %d\n", sizeWindow, + SMS_MAX_WINDOW); + sizeWindow = SMS_MAX_WINDOW; + } + + return sizeWindow; +} + +/*! \brief set default values for analysis frame variables + * \param iCurrentFrame frame number of the current frame + * \param pAnalParams analysis parameters + * \return 0 on success, -1 on error + */ +int sms_clearAnalysisFrame(int iCurrentFrame, SMS_AnalParams *pAnalParams) +{ + int i; + SMS_AnalFrame *currentFrame = pAnalParams->ppFrames[iCurrentFrame]; + + /* clear deterministic data */ + for(i = 0; i < pAnalParams->nGuides; i++) + { + currentFrame->deterministic.pFSinFreq[i] = 0.0; + currentFrame->deterministic.pFSinAmp[i] = 0.0; + currentFrame->deterministic.pFSinPha[i] = 0.0; + } + + /* clear peaks */ + for(i = 0; i < pAnalParams->maxPeaks; i++) + { + currentFrame->pSpectralPeaks[i].fFreq = 0.0; + currentFrame->pSpectralPeaks[i].fMag = 0.0; + currentFrame->pSpectralPeaks[i].fPhase = 0.0; + } + + currentFrame->nPeaks = 0; + currentFrame->fFundamental = 0; + currentFrame->iFrameNum = 0; + currentFrame->iFrameSize = 0; + currentFrame->iFrameSample = 0; + currentFrame->iStatus = SMS_FRAME_EMPTY; + + return 0; +} + +/*! \brief initialize the current frame + * + * initializes arrays to zero and sets the correct sample position. + * Special care is taken at the end the sample source (if there is + * not enough samples for an entire frame. + * + * \param iCurrentFrame frame number of current frame in buffer + * \param pAnalParams analysis parameters + * \param sizeWindow size of analysis window + * \return -1 on error \todo make this return void + */ +int sms_initFrame(int iCurrentFrame, SMS_AnalParams *pAnalParams, int sizeWindow) +{ + /* clear deterministic data */ + memset((sfloat *)pAnalParams->ppFrames[iCurrentFrame]->deterministic.pFSinFreq, 0, + sizeof(sfloat) * pAnalParams->nGuides); + memset((sfloat *)pAnalParams->ppFrames[iCurrentFrame]->deterministic.pFSinAmp, 0, + sizeof(sfloat) * pAnalParams->nGuides); + memset((sfloat *)pAnalParams->ppFrames[iCurrentFrame]->deterministic.pFSinPha, 0, + sizeof(sfloat) * pAnalParams->nGuides); + + /* clear peaks */ + int i; + for(i = 0; i < pAnalParams->maxPeaks; i++) + { + pAnalParams->ppFrames[iCurrentFrame]->pSpectralPeaks[i].fFreq = 0.0; + pAnalParams->ppFrames[iCurrentFrame]->pSpectralPeaks[i].fMag = 0.0; + pAnalParams->ppFrames[iCurrentFrame]->pSpectralPeaks[i].fPhase = 0.0; + } + + pAnalParams->ppFrames[iCurrentFrame]->nPeaks = 0; + pAnalParams->ppFrames[iCurrentFrame]->fFundamental = 0; + + pAnalParams->ppFrames[iCurrentFrame]->iFrameNum = + pAnalParams->ppFrames[iCurrentFrame - 1]->iFrameNum + 1; + pAnalParams->ppFrames[iCurrentFrame]->iFrameSize = sizeWindow; + + /* if first frame set center of data around 0 */ + if(pAnalParams->ppFrames[iCurrentFrame]->iFrameNum == 1) + pAnalParams->ppFrames[iCurrentFrame]->iFrameSample = 0; + /* if not, increment center of data by sizeHop */ + else + pAnalParams->ppFrames[iCurrentFrame]->iFrameSample = + pAnalParams->ppFrames[iCurrentFrame-1]->iFrameSample + pAnalParams->sizeHop; + + /* check for end of sound */ + if((pAnalParams->ppFrames[iCurrentFrame]->iFrameSample + (sizeWindow+1)/2) >= pAnalParams->iSizeSound + && pAnalParams->iSizeSound > 0) + { + pAnalParams->ppFrames[iCurrentFrame]->iFrameNum = -1; + pAnalParams->ppFrames[iCurrentFrame]->iFrameSize = 0; + pAnalParams->ppFrames[iCurrentFrame]->iStatus = SMS_FRAME_END; + } + else + { + /* good status, ready to start computing */ + pAnalParams->ppFrames[iCurrentFrame]->iStatus = SMS_FRAME_READY; + } + return SMS_OK; +} + +/*! \brief get deviation from average fundamental + *\ + * \param pAnalParams pointer to analysis params + * \param iCurrentFrame number of current frame + * \return deviation value or -1 if really off + */ +sfloat sms_fundDeviation(SMS_AnalParams *pAnalParams, int iCurrentFrame) +{ + sfloat fFund, fSum = 0, fAverage, fDeviation = 0; + int i; + + if(pAnalParams->minGoodFrames < 1) + return -1; + + /* get the sum of the past few fundamentals */ + for(i = 0; (i < pAnalParams->minGoodFrames) && (iCurrentFrame-i >= 0); i++) + { + fFund = pAnalParams->ppFrames[iCurrentFrame-i]->fFundamental; + if(fFund <= 0) + return -1; + else + fSum += fFund; + } + + /* find the average */ + fAverage = fSum / pAnalParams->minGoodFrames; + + /* get the deviation from the average */ + for(i = 0; (i < pAnalParams->minGoodFrames) && (iCurrentFrame-i >= 0); i++) + fDeviation += fabs(pAnalParams->ppFrames[iCurrentFrame-i]->fFundamental - fAverage); + + /* return the deviation from the average */ + return fDeviation / (pAnalParams->minGoodFrames * fAverage); +} + + +/*! \brief function to create the debug file + * + * \param pAnalParams pointer to analysis params + * \return error value \see SMS_ERRORS + */ +int sms_createDebugFile(SMS_AnalParams *pAnalParams) +{ + if((pDebug = fopen(pChDebugFile, "w+")) == NULL) + { + fprintf(stderr, "Cannot open debugfile: %s\n", pChDebugFile); + return SMS_WRERR; + } + return SMS_OK; +} + +/*! \brief function to write to the debug file + * + * writes three arrays of equal size to a debug text + * file ("./debug.txt"). There are three arrays for the + * frequency, magnitude, phase sets. + * + * \param pFBuffer1 pointer to array 1 + * \param pFBuffer2 pointer to array 2 + * \param pFBuffer3 pointer to array 3 + * \param sizeBuffer the size of the buffers + */ +void sms_writeDebugData(sfloat *pFBuffer1, sfloat *pFBuffer2, + sfloat *pFBuffer3, int sizeBuffer) +{ + int i; + static int counter = 0; + + for(i = 0; i < sizeBuffer; i++) + fprintf(pDebug, "%d %d %d %d\n", counter++, (int)pFBuffer1[i], + (int)pFBuffer2[i], (int)pFBuffer3[i]); +} + +/*! \brief function to write the residual sound file to disk + * + * writes the "debug.txt" file to disk and closes the file. + */ +void sms_writeDebugFile () +{ + fclose(pDebug); +} + +/*! \brief convert from magnitude to decibel + * + * \param x magnitude (0:1) + * \return decibel (0: -100) + */ +sfloat sms_magToDB(sfloat x) +{ + if(x < mag_thresh) + return 0.0; + else + //return(20. * log10(x * inv_mag_thresh)); + return TWENTY_OVER_LOG10 * log(x * inv_mag_thresh); + /*return(TWENTY_OVER_LOG10 * log(x));*/ +} + +/*! \brief convert from decibel to magnitude + * + * \param x decibel (0-100) + * \return magnitude (0-1) + */ +sfloat sms_dBToMag(sfloat x) +{ + if(x < 0.00001) + return 0.0; + else + return mag_thresh * pow(10., x*0.05); + /*return pow(10.0, x*0.05);*/ +} + +/*! \brief convert an array from magnitude to decibel + * + * Depends on a linear threshold that indicates the bottom end + * of the dB scale (magnutdes at this value will convert to zero). + * \see sms_setMagThresh + * + * \param sizeArray size of array + * \param pArray pointer to array + */ +void sms_arrayMagToDB(int sizeArray, sfloat *pArray) +{ + int i; + for(i = 0; i < sizeArray; i++) + pArray[i] = sms_magToDB(pArray[i]); +} + +/*! \brief convert and array from decibel (0-100) to magnitude (0-1) + * + * depends on the magnitude threshold + * \see sms_setMagThresh + * + * \param sizeArray size of array + * \param pArray pointer to array + */ +void sms_arrayDBToMag(int sizeArray, sfloat *pArray) +{ + int i; + for(i = 0; i < sizeArray; i++) + pArray[i] = sms_dBToMag(pArray[i]); +} +/*! \brief set the linear magnitude threshold + * + * magnitudes below this will go to zero when converted to db. + * it is limited to 0.00001 (-100db) + * + * \param x threshold value + */ +void sms_setMagThresh(sfloat x) +{ + /* limit threshold to -100db */ + if(x < 0.00001) + mag_thresh = 0.00001; + else + mag_thresh = x; + inv_mag_thresh = 1. / mag_thresh; +} + +/*! \brief get a string containing information about the error code + * + * \param pErrorMessage pointer to error message string + */ +void sms_error(char *pErrorMessage) +{ + strncpy(error_message, pErrorMessage, 256); + error_status = -1; +} + +/*! \brief check if an error has been reported + * + * \return -1 if there is an error, 0 if ok + */ +int sms_errorCheck() +{ + return error_status; +} + +/*! \brief get a string containing information about the last error + * + * \return pointer to a char string, or NULL if no error + */ +char* sms_errorString() +{ + if (error_status) + { + error_status = 0; + return error_message; + } + return NULL; +} + +/*! \brief random number genorator + * + * \return random number between -1 and 1 + */ +sfloat sms_random() +{ +#ifdef MERSENNE_TWISTER + return genrand_real1(); +#else + return (sfloat)(random() * 2 * INV_HALF_MAX); +#endif +} + +/*! \brief Root Mean Squared of an array + * + * \return RMS energy + */ +sfloat sms_rms(int sizeArray, sfloat *pArray) +{ + int i; + sfloat mean_squared = 0.; + for(i = 0; i < sizeArray; i++) + mean_squared += pArray[i] * pArray[i]; + + return sqrtf(mean_squared / sizeArray); +} + +/*! \brief make sure a number is a power of 2 + * + * \return a power of two integer >= input value + */ +int sms_power2(int n) +{ + int p = -1; + int N = n; + while(n) + { + n >>= 1; + p++; + } + + if(1<

+#include +#include +#include +#include + +#define SMS_VERSION 1.15 /*!< \brief version control number */ + +#define SMS_MAX_NPEAKS 400 /*!< \brief maximum number of peaks */ +#define SMS_MAX_FRAME_SIZE 10000 /* maximum size of input frame in samples */ +#define SMS_MAX_SPEC 8192 /*! \brief maximum size for magnitude spectrum */ + +#define sfloat double + +/*! \struct SMS_Header + * \brief structure for the header of an SMS file + * + * This header contains all the information necessary to read an SMS + * file, prepare memory and synthesizer parameters. + * + * The header also contains variable components for additional information + * that may be stored along with the analysis, such as descriptors or text. + * + * The first four members of the Header are necessary in this order to correctly + * open the .sms files created by this library. + * + * iSampleRate contains the samplerate of the analysis signal because it is + * necessary to know this information to recreate the residual spectrum. + * + * In the first release, the descriptors are not used, but are here because they + * were implemented in previous versions of this code (in the 90's). With time, + * the documentation will be updated to reflect which members of the header + * are useful in manipulations, and what functions to use for these manipulatinos + */ +typedef struct +{ + int iSmsMagic; /*!< identification constant */ + int iHeadBSize; /*!< size in bytes of header */ + int nFrames; /*!< number of data frames */ + int iFrameBSize; /*!< size in bytes of each data frame */ + int iSamplingRate; /*!< samplerate of analysis signal (necessary to recreate residual spectrum */ + int iFormat; /*!< type of data format \see SMS_Format */ + int nTracks; /*!< number of sinusoidal tracks per frame */ + int iFrameRate; /*!< rate in Hz of data frames */ + int iStochasticType; /*!< type stochastic representation */ + int nStochasticCoeff; /*!< number of stochastic coefficients per frame */ + int iEnvType; /*!< type of envelope representation */ + int nEnvCoeff; /*!< number of cepstral coefficents per frame */ + int iMaxFreq; /*!< maximum frequency of peaks (also corresponds to the last bin of the specEnv */ + sfloat fResidualPerc; /*!< percentage of the residual to original */ +} SMS_Header; + +/*! \struct SMS_Data + * \brief structure with SMS data + * + * Here is where all the analysis data ends up. Once data is in here, it is ready + * for synthesis. + * + * It is in one contigous block (pSmsData), the other pointer members point + * specifically to each component in the block. + * + * pFSinPha is optional in the final output, but it is always used to construct the + * residual signal. + */ +typedef struct +{ + sfloat *pSmsData; /*!< pointer to all SMS data */ + int sizeData; /*!< size of all the data */ + sfloat *pFSinFreq; /*!< frequency of sinusoids */ + sfloat *pFSinAmp; /*!< magnitude of sinusoids (stored in dB) */ + sfloat *pFSinPha; /*!< phase of sinusoids */ + int nTracks; /*!< number of sinusoidal tracks in frame */ + sfloat *pFStocGain; /*!< gain of stochastic component */ + int nCoeff; /*!< number of filter coefficients */ + sfloat *pFStocCoeff; /*!< filter coefficients for stochastic component */ + sfloat *pResPhase; /*!< residual phase spectrum */ + int nEnvCoeff; /*!< number of spectral envelope coefficients */ + sfloat *pSpecEnv; +} SMS_Data; + + +/*! \struct SMS_SndBuffer + * \brief buffer for sound data + * + * This structure is used for holding a buffer of audio data. iMarker is a + * sample number of the sound source that corresponds to the first sample + * in the buffer. + * + */ +typedef struct +{ + sfloat *pFBuffer; /*!< buffer for sound data*/ + int sizeBuffer; /*!< size of buffer */ + int iMarker; /*!< sample marker relating to sound source */ + int iFirstGood; /*!< first sample in buffer that is a good one */ +} SMS_SndBuffer; + +/*! \struct SMS_Peak + * \brief structure for sinusodial peak + */ +typedef struct +{ + sfloat fFreq; /*!< frequency of peak */ + sfloat fMag; /*!< magnitude of peak */ + sfloat fPhase; /*!< phase of peak */ +} SMS_Peak; + +/* a collection of spectral peaks */ +typedef struct +{ + SMS_Peak *pSpectralPeaks; + int nPeaks; + int nPeaksFound; +} SMS_SpectralPeaks; + +/*! \struct SMS_AnalFrame + * \brief structure to hold an analysis frame + * + * This structure has extra information for continuing the analysis, + * which can be disregarded once the analysis is complete. + */ +typedef struct +{ + int iFrameSample; /*!< sample number of the middle of the frame */ + int iFrameSize; /*!< number of samples used in the frame */ + int iFrameNum; /*!< frame number */ + SMS_Peak *pSpectralPeaks; /*!< spectral peaks found in frame */ + int nPeaks; /*!< number of peaks found */ + sfloat fFundamental; /*!< fundamental frequency in frame */ + SMS_Data deterministic; /*!< deterministic data */ + int iStatus; /*!< status of frame enumerated by SMS_FRAME_STATUS \see SMS_FRAME_STATUS */ +} SMS_AnalFrame; + +/*! \struct SMS_SEnvParams; + * \brief structure information and data for spectral enveloping + * + */ +typedef struct +{ + int iType; /*!< envelope type \see SMS_SpecEnvType */ + int iOrder; /*!< ceptrum order */ + int iMaxFreq; /*!< maximum frequency covered by the envelope */ + sfloat fLambda; /*!< regularization factor */ + int nCoeff; /*!< number of coefficients (bins) in the envelope */ + int iAnchor; /*!< whether to make anchor points at DC / Nyquist or not */ +} SMS_SEnvParams; + +/*! \struct SMS_Guide + * \brief information attached to a guide + * + * This structure is used to organize the detected peaks into time-varying + * trajectories, or sinusoidal tracks. As the analysis progresses, previous + * guides may be updated according to new information in the peak continuation + * of new frames (two-way mismatch). + */ +typedef struct +{ + sfloat fFreq; /*!< frequency of guide */ + sfloat fMag; /*!< magnitude of guide */ + int iStatus; /*!< status of guide: DEAD, SLEEPING, ACTIVE */ + int iPeakChosen; /*!< peak number chosen by the guide */ +} SMS_Guide; + +/*! \struct SMS_ResidualParams + * \brief structure with information for residual functions + * + * This structure contains all the necessary settings and memory for residual synthesis. + * + */ +typedef struct +{ + int samplingRate; + int hopSize; + int residualSize; + sfloat *residual; + sfloat *fftWindow; + sfloat *ifftWindow; + sfloat windowScale; + sfloat residualMag; + sfloat originalMag; + int nCoeffs; + sfloat *stocCoeffs; + int sizeStocMagSpectrum; + sfloat *stocMagSpectrum; + sfloat *stocPhaseSpectrum; + sfloat *approx; + sfloat *approxEnvelope; + sfloat fftBuffer[SMS_MAX_SPEC * 2]; +} SMS_ResidualParams; + +/*! \struct SMS_AnalParams + * \brief structure with useful information for analysis functions + * + * Each analysis needs one of these, which contains all settings, + * sound data, deterministic synthesis data, and every other + * piece of data that needs to be shared between functions. + * + * There is an array of already analyzed frames (hardcoded to 50 right now - + * \todo make it variable) that are accumulated for good harmonic detection + * and partial tracking. For instance, once the fundamental frequency of a + * harmonic signal is located (after a few frames), the harmonic analysis + * and peak detection/continuation process can be re-computed with more accuracy. + * + */ +typedef struct +{ + int iDebugMode; /*!< debug codes enumerated by SMS_DBG \see SMS_DBG */ + int iFormat; /*!< analysis format code defined by SMS_Format \see SMS_Format */ + int iSoundType; /*!< type of sound to be analyzed \see SMS_SOUND_TYPE */ + int iStochasticType; /*!< type of stochastic model defined by SMS_StocSynthType \see SMS_StocSynthType */ + int iFrameRate; /*!< rate in Hz of data frames */ + int nStochasticCoeff; /*!< number of stochastic coefficients per frame */ + sfloat fLowestFundamental; /*!< lowest fundamental frequency in Hz */ + sfloat fHighestFundamental; /*!< highest fundamental frequency in Hz */ + sfloat fDefaultFundamental; /*!< default fundamental in Hz */ + sfloat fPeakContToGuide; /*!< contribution of previous peak to current guide (between 0 and 1) */ + sfloat fFundContToGuide; /*!< contribution of current fundamental to current guide (between 0 and 1) */ + sfloat fFreqDeviation; /*!< maximum deviation from peak to peak */ + int iSamplingRate; /*! sampling rate of sound to be analyzed */ + int iDefaultSizeWindow; /*!< default size of analysis window in samples */ + int windowSize; /*!< the current window size */ + int sizeHop; /*!< hop size of analysis window in samples */ + sfloat fSizeWindow; /*!< size of analysis window in number of periods */ + int nTracks; /*!< number of sinusoidal tracks in frame */ + int maxPeaks; /*!< maximum number of peaks in a frame */ + int nGuides; /*!< number of guides used for peak detection and continuation \see SMS_Guide */ + int iCleanTracks; /*!< whether or not to clean sinusoidal tracks */ + sfloat fMinRefHarmMag; /*!< minimum magnitude in dB for reference peak */ + sfloat fRefHarmMagDiffFromMax; /*!< maximum magnitude difference from reference peak to highest peak */ + int iRefHarmonic; /*!< reference harmonic to use in the fundamental detection */ + int iMinTrackLength; /*!< minimum length in samples of a given track */ + int iMaxSleepingTime; /*!< maximum sleeping time for a track */ + sfloat fLowestFreq; /*!< lowest frequency to be searched */ + sfloat fHighestFreq; /*!< highest frequency to be searched */ + sfloat fMinPeakMag; /*!< minimum magnitude in dB for a good peak */ + int iAnalysisDirection; /*!< analysis direction, direct or reverse */ + int iSizeSound; /*!< total size of sound to be analyzed in samples */ + int nFrames; /*!< total number of frames that will be analyzed */ + int iWindowType; /*!< type of FFT analysis window \see SMS_WINDOWS */ + int iMaxDelayFrames; /*!< maximum number of frames to delay before peak continuation */ + int minGoodFrames; /*!< minimum number of stable frames for backward search */ + sfloat maxDeviation; /*!< maximum deviation allowed */ + int analDelay; /*! number of frames in the past to be looked in possible re-analyze */ + sfloat fResidualAccumPerc; /*!< accumalitive residual percentage */ + int sizeNextRead; /*!< size of samples to read from sound file next analysis */ + int preEmphasis; /*!< whether or not to perform pre-emphasis */ + sfloat preEmphasisLastValue; + SMS_Data prevFrame; /*!< the previous analysis frame */ + SMS_SEnvParams specEnvParams; /*!< all data for spectral enveloping */ + SMS_SndBuffer soundBuffer; /*!< signal to be analyzed */ + SMS_SndBuffer synthBuffer; /*!< resynthesized signal used to create the residual */ + SMS_AnalFrame *pFrames; /*!< an array of frames that have already been analyzed */ + sfloat magSpectrum[SMS_MAX_SPEC]; + sfloat phaseSpectrum[SMS_MAX_SPEC]; + sfloat spectrumWindow[SMS_MAX_SPEC]; + sfloat fftBuffer[SMS_MAX_SPEC * 2]; + SMS_ResidualParams residualParams; + int *guideStates; + SMS_Guide* guides; + sfloat inputBuffer[SMS_MAX_FRAME_SIZE]; + int sizeStocMagSpectrum; + sfloat *stocMagSpectrum; + sfloat *approxEnvelope; /*!< spectral approximation envelope */ + SMS_AnalFrame **ppFrames; /*!< pointers to the frames analyzed (it is circular-shifted once the array is full */ +} SMS_AnalParams; + +/*! \struct SMS_ModifyParams + * + * \brief structure with parameters and data that will be used to modify an SMS_Data frame + */ +typedef struct +{ + int ready; /*!< a flag to know if the struct has been initialized) */ + int maxFreq; /*!< maximum frequency component */ + int doResGain; /*!< whether or not to scale residual gain */ + sfloat resGain; /*!< residual scale factor */ + int doTranspose; /*!< whether or not to transpose */ + sfloat transpose; /*!< transposition factor */ + int doSinEnv; /*!< whether or not to apply a new spectral envelope to the sin component */ + sfloat sinEnvInterp; /*!< value between 0 (use frame's env) and 1 (use *env). Interpolates inbetween values*/ + int sizeSinEnv; /*!< size of the envelope pointed to by env */ + sfloat *sinEnv; /*!< sinusoidal spectral envelope */ + int doResEnv; /*!< whether or not to apply a new spectral envelope to the residual component */ + sfloat resEnvInterp; /*!< value between 0 (use frame's env) and 1 (use *env). Interpolates inbetween values*/ + int sizeResEnv; /*!< size of the envelope pointed to by resEnv */ + sfloat *resEnv; /*!< residual spectral envelope */ +} SMS_ModifyParams; + +/*! \struct SMS_SynthParams + * \brief structure with information for synthesis functions + * + * This structure contains all the necessary settings for different types of synthesis. + * It also holds arrays for windows and the inverse-FFT, as well as the previously + * synthesized frame. + * + */ +typedef struct +{ + int iStochasticType; /*!< type of stochastic model defined by SMS_StocSynthType + \see SMS_StocSynthType */ + int iSynthesisType; /*!< type of synthesis to perform \see SMS_SynthType */ + int iDetSynthType; /*!< method for synthesizing deterministic component \see SMS_DetSynthType */ + int iOriginalSRate; /*!< samplerate of the sound model source (for stochastic synthesis approximation) */ + int iSamplingRate; /*!< synthesis samplerate */ + int sizeHop; /*!< number of samples to synthesis for each frame */ + int origSizeHop; /*!< original number of samples used to create each analysis frame */ + int nTracks; + int nStochasticCoeff; + int deEmphasis; /*!< whether or not to perform de-emphasis */ + sfloat deEmphasisLastValue; + sfloat *pFDetWindow; /*!< array to hold the window used for deterministic synthesis \see SMS_WIN_IFFT */ + sfloat *pFStocWindow; /*!< array to hold the window used for stochastic synthesis (Hanning) */ + sfloat *pSynthBuff; /*!< an array for keeping samples during overlap-add (2x sizeHop) */ + sfloat *pMagBuff; /*!< an array for keeping magnitude spectrum for stochastic synthesis */ + sfloat *pPhaseBuff; /*!< an array for keeping phase spectrum for stochastic synthesis */ + sfloat *pSpectra; /*!< array for in-place FFT transform */ + SMS_Data prevFrame; /*!< previous data frame, for interpolation between frames */ + SMS_ModifyParams modParams; /*!< modification parameters */ + sfloat *approxEnvelope; /*!< spectral approximation envelope */ +} SMS_SynthParams; + +/*! \struct SMS_HarmCandidate + * \brief structure to hold information about a harmonic candidate + * + * This structure provides storage for accumimlated statistics when + * trying to decide which track is the fundamental frequency, during + * harmonic detection. + */ +typedef struct +{ + sfloat fFreq; /*!< frequency of harmonic */ + sfloat fMag; /*!< magnitude of harmonic */ + sfloat fMagPerc; /*!< percentage of magnitude */ + sfloat fFreqDev; /*!< deviation from perfect harmonic */ + sfloat fHarmRatio; /*!< percentage of harmonics found */ +} SMS_HarmCandidate; + +/*! \struct SMS_ContCandidate + * \brief structure to hold information about a continuation candidate + * + * This structure holds statistics about the guides, which is used to + * decide the status of the guide + */ +typedef struct +{ + sfloat fFreqDev; /*!< frequency deviation from guide */ + sfloat fMagDev; /*!< magnitude deviation from guide */ + int iPeak; /*!< peak number (organized according to frequency)*/ +} SMS_ContCandidate; + +/*! \brief analysis format + * + * Is the signal is known to be harmonic, using format harmonic (with out without + * phase) will give more accuracy to the peak continuation algorithm. If the signal + * is known to be inharmonic, then it is best to use one of the inharmonic settings + * to tell the peak continuation algorithm to just look at the peaks and connect them, + * instead of trying to look for peaks at specific frequencies (harmonic partials). + */ +enum SMS_Format +{ + SMS_FORMAT_H, /*!< 0, format harmonic */ + SMS_FORMAT_IH, /*!< 1, format inharmonic */ + SMS_FORMAT_HP, /*!< 2, format harmonic with phase */ + SMS_FORMAT_IHP /*!< 3, format inharmonic with phase */ +}; + +/*! \brief synthesis types + * + * These values are used to determine whether to synthesize + * both deterministic and stochastic components together, + * the deterministic component alone, or the stochastic + * component alone. + */ +enum SMS_SynthType +{ + SMS_STYPE_ALL, /*!< both components combined */ + SMS_STYPE_DET, /*!< deterministic component alone */ + SMS_STYPE_STOC /*!< stochastic component alone */ +}; + +/*! \brief synthesis method for deterministic component + * + * There are two options for deterministic synthesis available to the + * SMS synthesizer. The Inverse Fast Fourier Transform method + * (IFFT) is more effecient for models with lots of partial tracks, but can + * possibly smear transients. The Sinusoidal Table Lookup (SIN) can + * theoritically support faster moving tracks at a higher fidelity, but + * can consume lots of cpu at varying rates. + */ +enum SMS_DetSynthType +{ + SMS_DET_IFFT, /*!< Inverse Fast Fourier Transform (IFFT) */ + SMS_DET_SIN /*!< Sinusoidal Table Lookup (SIN) */ +}; + +/*! \brief synthesis method for stochastic component + * + * Currently, Stochastic Approximation is the only reasonable choice + * for stochastic synthesis: this method approximates the spectrum of + * the stochastic component by a specified number of coefficients during + * analyses, and then approximates another set of coefficients during + * synthesis in order to fit the specified hopsize. The phases of the + * coefficients are randomly generated, according to the theory that a + * stochastic spectrum consists of random phases. + * + * The Inverse FFT method is not implemented, but is based on the idea of storing + * the exact spectrum and phases of the residual component to file. Synthesis + * could then be an exact reconstruction of the original signal, provided + * interpolation is not necessary. + * + * No stochastic component can also be specified in order to skip the this + * time consuming process altogether. This is especially useful when + * performing multiple analyses to fine tune parameters pertaining to the + * determistic component; once that is achieved, the stochastic component + * will be much better as well. + */ +enum SMS_StocSynthType +{ + SMS_STOC_NONE, /*!< 0, no stochastistic component */ + SMS_STOC_APPROX, /*!< 1, Inverse FFT, magnitude approximation and generated phases */ + SMS_STOC_IFFT /*!< 2, inverse FFT, interpolated spectrum (not used) */ +}; + +/*! \brief synthesis method for deterministic component + * + * There are two options for deterministic synthesis available to the + * SMS synthesizer. The Inverse Fast Fourier Transform method + * (IFFT) is more effecient for models with lots of partial tracks, but can + * possibly smear transients. The Sinusoidal Table Lookup (SIN) can + * theoritically support faster moving tracks at a higher fidelity, but + * can consume lots of cpu at varying rates. + */ +enum SMS_SpecEnvType +{ + SMS_ENV_NONE, /*!< none */ + SMS_ENV_CEP, /*!< cepstral coefficients */ + SMS_ENV_FBINS /*!< frequency bins */ +}; + +/*! \brief Error codes returned by SMS file functions */ +/* \todo remove me */ +enum SMS_ERRORS +{ + SMS_OK, /*!< 0, no error*/ + SMS_NOPEN, /*!< 1, couldn't open file */ + SMS_NSMS , /*!< 2, not a SMS file */ + SMS_MALLOC, /*!< 3, couldn't allocate memory */ + SMS_RDERR, /*!< 4, read error */ + SMS_WRERR, /*!< 5, write error */ + SMS_SNDERR /*!< 6, sound IO error */ +}; + +/*! \brief debug modes + * + * \todo write details about debug files + */ +enum SMS_DBG +{ + SMS_DBG_NONE, /*!< 0, no debugging */ + SMS_DBG_DET, /*!< 1, not yet implemented \todo make this show main information to look at for discovering the correct deterministic parameters*/ + SMS_DBG_PEAK_DET, /*!< 2, peak detection function */ + SMS_DBG_HARM_DET, /*!< 3, harmonic detection function */ + SMS_DBG_PEAK_CONT, /*!< 4, peak continuation function */ + SMS_DBG_CLEAN_TRAJ, /*!< 5, clean tracks function */ + SMS_DBG_SINE_SYNTH, /*!< 6, sine synthesis function */ + SMS_DBG_STOC_ANAL, /*!< 7, stochastic analysis function */ + SMS_DBG_STOC_SYNTH, /*!< 8, stochastic synthesis function */ + SMS_DBG_SMS_ANAL, /*!< 9, top level analysis function */ + SMS_DBG_ALL, /*!< 10, everything */ + SMS_DBG_RESIDUAL, /*!< 11, write residual to file */ + SMS_DBG_SYNC, /*!< 12, write original, synthesis and residual to a text file */ +}; + +#define SMS_MAX_WINDOW 8190 /*!< \brief maximum size for analysis window */ + +/* \brief type of sound to be analyzed + * + * \todo explain the differences between these two + */ +enum SMS_SOUND_TYPE +{ + SMS_SOUND_TYPE_MELODY, /*!< 0, sound composed of several notes */ + SMS_SOUND_TYPE_NOTE /*!< 1, sound composed of a single note */ +}; + +/* \brief direction of analysis + * + * Sometimes a signal can be clearer at the end than at + * the beginning. If the signal is very harmonic at the end then + * doing the analysis in reverse could provide better results. + */ +enum SMS_DIRECTION +{ + SMS_DIR_FWD, /*!< analysis from left to right */ + SMS_DIR_REV /*!< analysis from right to left */ +}; + +/* \brief window selection +*/ +enum SMS_WINDOWS +{ + SMS_WIN_HAMMING, /*!< 0: hamming */ + SMS_WIN_BH_62, /*!< 1: blackman-harris, 62dB cutoff */ + SMS_WIN_BH_70, /*!< 2: blackman-harris, 70dB cutoff */ + SMS_WIN_BH_74, /*!< 3: blackman-harris, 74dB cutoff */ + SMS_WIN_BH_92, /*!< 4: blackman-harris, 92dB cutoff */ + SMS_WIN_HANNING, /*!< 5: hanning */ + SMS_WIN_IFFT /*!< 6: window for deterministic synthesis based on the Inverse-FFT algorithm. + This is a combination of an inverse Blackman-Harris 92dB and a triangular window. */ +}; + +/*! + * \brief frame status + */ +enum SMS_FRAME_STATUS +{ + SMS_FRAME_EMPTY, + SMS_FRAME_READY, + SMS_FRAME_PEAKS_FOUND, + SMS_FRAME_FUND_FOUND, + SMS_FRAME_TRAJ_FOUND, + SMS_FRAME_CLEANED, + SMS_FRAME_RECOMPUTED, + SMS_FRAME_DETER_SYNTH, + SMS_FRAME_STOC_COMPUTED, + SMS_FRAME_DONE, + SMS_FRAME_END +}; + +#define SMS_MIN_SIZE_FRAME 128 /* size of synthesis frame */ + +/*! \defgroup math_macros Math Macros + * \brief mathematical operations and values needed for functions within + * this library + * \{ + */ +#define PI 3.141592653589793238462643 /*!< pi */ +#define TWO_PI 6.28318530717958647692 /*!< pi * 2 */ +#define INV_TWO_PI (1 / TWO_PI) /*!< 1 / ( pi * 2) */ +#define PI_2 1.57079632679489661923 /*!< pi / 2 */ +#define LOG2 0.69314718055994529 /*!< natural logarithm of 2 */ +#define LOG10 2.3025850929940459 /*!< natural logarithm of 10 */ +#define EXP 2.7182818284590451 /*!< Eurler's number */ + +sfloat sms_magToDB(sfloat x); +sfloat sms_dBToMag(sfloat x); +void sms_arrayMagToDB(int sizeArray, sfloat *pArray); +void sms_arrayDBToMag(int sizeArray, sfloat *pArray); +void sms_setMagThresh(sfloat x); +sfloat sms_rms(int sizeArray, sfloat *pArray); +sfloat sms_sine(sfloat fTheta); +sfloat sms_sinc(sfloat fTheta); +sfloat sms_random(void); +int sms_power2(int n); +sfloat sms_scalarTempered(sfloat x); +void sms_arrayScalarTempered(int sizeArray, sfloat *pArray); + +#ifndef MAX +/*! \brief returns the maximum of a and b */ +#define MAX(a,b) ((a) > (b) ? (a) : (b)) +#endif +#ifndef MIN +/*! \brief returns the minimum of a and b */ +#define MIN(a,b) ((a) < (b) ? (a) : (b)) +#endif +/*! \} */ + +/* function declarations */ +void sms_setPeaks(SMS_AnalParams *pAnalParams, int numamps, sfloat* amps, + int numfreqs, sfloat* freqs, int numphases, sfloat* phases); +int sms_findPeaks(int sizeWaveform, sfloat *pWaveform, + SMS_AnalParams *pAnalParams, SMS_SpectralPeaks *pSpectralPeaks); +int sms_findPartials(SMS_Data *pSmsFrame, SMS_AnalParams *pAnalParams); +int sms_findResidual(int sizeSynthesis, sfloat* pSynthesis, + int sizeOriginal, sfloat* pOriginal, + SMS_ResidualParams *residualParams); +void sms_approxResidual(int sizeResidual, sfloat* residual, + int sizeApprox, sfloat* approx, + SMS_ResidualParams *residualParams); +int sms_analyze(int sizeWaveform, sfloat *pWaveform, SMS_Data *pSmsData, + SMS_AnalParams *pAnalParams); +void sms_analyzeFrame(int iCurrentFrame, SMS_AnalParams *pAnalParams, sfloat fRefFundamental); + +int sms_init(); +void sms_free(); +int sms_initAnalysis(SMS_AnalParams *pAnalParams); +void sms_initAnalParams(SMS_AnalParams *pAnalParams); +void sms_initSynthParams(SMS_SynthParams *synthParams); +int sms_initSynth(SMS_SynthParams *pSynthParams); +void sms_freeAnalysis(SMS_AnalParams *pAnalParams); +void sms_freeSynth(SMS_SynthParams *pSynthParams); +int sms_initSpectralPeaks(SMS_SpectralPeaks* peaks, int n); +void sms_freeSpectralPeaks(SMS_SpectralPeaks* peaks); + +void sms_fillSoundBuffer(int sizeWaveform, sfloat *pWaveform, SMS_AnalParams *pAnalParams); +void sms_windowCentered(int sizeWindow, sfloat *pWaveform, sfloat *pWindow, int sizeFft, sfloat *pFftBuffer); +void sms_getWindow(int sizeWindow, sfloat *pWindow, int iWindowType); +void sms_scaleWindow(int sizeWindow, sfloat *pWindow); +int sms_spectrum(int sizeWindow, sfloat *pWaveform, sfloat *pWindow, int sizeMag, + sfloat *pMag, sfloat *pPhase, sfloat *pFftBuffer); +int sms_spectrumW(int sizeWindow, sfloat *pWaveform, sfloat *pWindow, int sizeMag, + sfloat *pMag, sfloat *pPhase, sfloat *pFftBuffer); +int sms_invSpectrum(int sizeWaveform, sfloat *pWaveform, sfloat *pWindow , + int sizeMag, sfloat *pMag, sfloat *pPhase, sfloat *pFftBuffer); +/* \todo remove this once invSpectrum is completely implemented */ +int sms_invQuickSpectrumW(sfloat *pFMagSpectrum, sfloat *pFPhaseSpectrum, + int sizeFft, sfloat *pFWaveform, int sizeWave, + sfloat *pFWindow, sfloat *pFftBuffer); +int sms_spectralApprox(sfloat *pSpec1, int sizeSpec1, int sizeSpec1Used, + sfloat *pSpec2, int sizeSpec2, int nCoefficients, + sfloat *envelope); +int sms_spectrumMag(int sizeWindow, sfloat *pWaveform, sfloat *pWindow, + int sizeMag, sfloat *pMag, sfloat *pFftBuffer); + +void sms_dCepstrum(int sizeCepstrum, sfloat *pCepstrum, int sizeFreq, sfloat *pFreq, sfloat *pMag, + sfloat fLambda, int iSamplingRate); +void sms_dCepstrumEnvelope(int sizeCepstrum, sfloat *pCepstrum, int sizeEnv, sfloat *pEnv); +void sms_spectralEnvelope(SMS_Data *pSmsData, SMS_SEnvParams *pSpecEnvParams); + +int sms_sizeNextWindow(int iCurrentFrame, SMS_AnalParams *pAnalParams); +sfloat sms_fundDeviation(SMS_AnalParams *pAnalParams, int iCurrentFrame); +int sms_detectPeaks(int sizeSpec, sfloat *pFMag, sfloat *pPhase, + SMS_Peak *pSpectralPeaks, SMS_AnalParams *pAnalParams); +sfloat sms_harmDetection(int numPeaks, SMS_Peak* spectralPeaks, sfloat refFundamental, + sfloat refHarmonic, sfloat lowestFreq, sfloat highestFreq, + int soundType, sfloat minRefHarmMag, sfloat refHarmMagDiffFromMax); +int sms_peakContinuation(int iFrame, SMS_AnalParams *pAnalParams); + +sfloat sms_preEmphasis(sfloat fInput, SMS_AnalParams *pAnalParams); +sfloat sms_deEmphasis(sfloat fInput, SMS_SynthParams *pSynthParams); + +void sms_cleanTracks(int iCurrentFrame, SMS_AnalParams *pAnalParams); +void sms_scaleDet(sfloat *pSynthBuffer, sfloat *pOriginalBuffer, + sfloat *pSinAmp, SMS_AnalParams *pAnalParams, int nTracks); + +int sms_prepSine(int nTableSize); +int sms_prepSinc(int nTableSize); +void sms_clearSine(); +void sms_clearSinc(); + +void sms_synthesize(SMS_Data *pSmsFrame, sfloat*pSynthesis, SMS_SynthParams *pSynthParams); +void sms_sineSynthFrame(SMS_Data *pSmsFrame, sfloat *pBuffer, + int sizeBuffer, SMS_Data *pLastFrame, + int iSamplingRate); + +void sms_initHeader(SMS_Header *pSmsHeader); +int sms_getHeader(char *pChFileName, SMS_Header **ppSmsHeader, FILE **ppInputFile); +void sms_fillHeader(SMS_Header *pSmsHeader, SMS_AnalParams *pAnalParams, char *pProgramString); +int sms_writeHeader(char *pFileName, SMS_Header *pSmsHeader, FILE **ppOutSmsFile); +int sms_writeFile(FILE *pSmsFile, SMS_Header *pSmsHeader); +int sms_initFrame(int iCurrentFrame, SMS_AnalParams *pAnalParams, int sizeWindow); +int sms_clearAnalysisFrame(int iCurrentFrame, SMS_AnalParams *pAnalParams); +int sms_allocFrame(SMS_Data *pSmsFrame, int nTracks, int nCoeff, + int iPhase, int stochType, int nEnvCoeff); +int sms_allocFrameH(SMS_Header *pSmsHeader, SMS_Data *pSmsFrame); +int sms_getFrame(FILE *pInputFile, SMS_Header *pSmsHeader, int iFrame, SMS_Data *pSmsFrame); +int sms_writeFrame(FILE *pSmsFile, SMS_Header *pSmsHeader, SMS_Data *pSmsFrame); +void sms_freeFrame(SMS_Data *pSmsFrame); +void sms_clearFrame(SMS_Data *pSmsFrame); +void sms_copyFrame(SMS_Data *pCopySmsFrame, SMS_Data *pOriginalSmsFrame); +int sms_frameSizeB(SMS_Header *pSmsHeader); + +void sms_initResidualParams(SMS_ResidualParams *residualParams); +int sms_initResidual(SMS_ResidualParams *residualParams); +void sms_freeResidual(SMS_ResidualParams *residualParams); +int sms_residual(int sizeWindow, sfloat *pSynthesis, sfloat *pOriginal, + SMS_ResidualParams* residualParams); +void sms_filterHighPass(int sizeResidual, sfloat *pResidual, int iSamplingRate); +int sms_stocAnalysis(int sizeWindow, sfloat *pResidual, sfloat *pWindow, + SMS_Data *pSmsFrame, SMS_AnalParams *pAnalParams); + +void sms_interpolateFrames(SMS_Data *pSmsFrame1, SMS_Data *pSmsFrame2, + SMS_Data *pSmsFrameOut, sfloat fInterpFactor); +void sms_fft(int sizeFft, sfloat *pArray); +void sms_ifft(int sizeFft, sfloat *pArray); +void sms_RectToPolar(int sizeSpec, sfloat *pReal, sfloat *pMag, sfloat *pPhase); +void sms_PolarToRect(int sizeSpec, sfloat *pReal, sfloat *pMag, sfloat *pPhase); +void sms_spectrumRMS(int sizeMag, sfloat *pReal, sfloat *pMag); + +void sms_initModify(SMS_Header *header, SMS_ModifyParams *params); +void sms_initModifyParams(SMS_ModifyParams *params); +void sms_freeModify(SMS_ModifyParams *params); +void sms_modify(SMS_Data *frame, SMS_ModifyParams *params); + +/***********************************************************************************/ +/************* debug functions: ******************************************************/ + +int sms_createDebugFile(SMS_AnalParams *pAnalParams); +void sms_writeDebugData(sfloat *pBuffer1, sfloat *pBuffer2, + sfloat *pBuffer3, int sizeBuffer); +void sms_writeDebugFile(); +void sms_error(char *pErrorMessage ); +int sms_errorCheck(); +char* sms_errorString(); + +#endif /* _SMS_H */ + diff --git a/src/sms/sms.i b/src/sms/sms.i new file mode 100644 index 0000000..0b3ee5a --- /dev/null +++ b/src/sms/sms.i @@ -0,0 +1,540 @@ +%module simplsms +%{ + #include "sms.h" + #define SWIG_FILE_WITH_INIT +%} + +%include "../common/numpy.i" + +%init +%{ + import_array(); +%} + +%exception +{ + $action + if (sms_errorCheck()) + { + PyErr_SetString(PyExc_IndexError,sms_errorString()); + return NULL; + } +} + +/* apply all numpy typemaps to various names in sms.h */ +%apply(int DIM1, double* INPLACE_ARRAY1) {(int sizeWindow, double* pWindow)}; +%apply(int DIM1, double* INPLACE_ARRAY1) {(int sizeWaveform, double* pWaveform)}; +%apply(int DIM1, double* INPLACE_ARRAY1) {(long sizeSound, double* pSound)}; +%apply(int DIM1, double* INPLACE_ARRAY1) {(int sizeFft, double* pArray)}; +%apply(int DIM1, double* INPLACE_ARRAY1) {(int sizeFft, double* pFftBuffer)}; +%apply(int DIM1, double* INPLACE_ARRAY1) {(int sizeFreq, double* pFreq)}; +%apply(int DIM1, double* INPLACE_ARRAY1) {(int sizeAmp, double* pAmp)}; +%apply(int DIM1, double* INPLACE_ARRAY1) {(int sizeMag, double* pMag)}; +%apply(int DIM1, double* INPLACE_ARRAY1) {(int sizePhase, double* pPhase)}; +%apply(int DIM1, double* INPLACE_ARRAY1) {(int sizeCepstrum, double* pCepstrum)}; +%apply(int DIM1, double* INPLACE_ARRAY1) {(int sizeEnv, double* pEnv)}; +%apply(int DIM1, double* INPLACE_ARRAY1) {(int sizeTrack, double* pTrack)}; +%apply(int DIM1, double* INPLACE_ARRAY1) {(int sizeArray, double* pArray)}; +%apply(int DIM1, double* IN_ARRAY1) {(int sizeInArray, double* pInArray)}; +%apply(int DIM1, double* INPLACE_ARRAY1) {(int sizeOutArray, double* pOutArray)}; +%apply(int DIM1, double* INPLACE_ARRAY1) {(int sizeHop, double* pSynthesis)}; +%apply(int DIM1, double* INPLACE_ARRAY1) +{ + (int sizeResidual, double* residual), + (int sizeApprox, double* approx) +} +%apply(int DIM1, double* IN_ARRAY1) +{ + (int numamps, double* amps), + (int numfreqs, double* freqs), + (int numphases, double* phases) +} +%apply (int DIM1, double* IN_ARRAY1) +{ + (int sizeSynthesis, double* pSynthesis), + (int sizeOriginal, double* pOriginal), + (int sizeResidual, double* pResidual) +} + +%include "sms.h" + +/* overload the functions that will be wrapped to fit numpy typmaps (defined below) + * by renaming the wrapped names back to originals + */ +%rename(sms_detectPeaks) simplsms_detectPeaks; +%rename(sms_spectrum) simplsms_spectrum; +%rename(sms_spectrumMag) simplsms_spectrumMag; +%rename(sms_windowCentered) simplsms_windowCentered; +%rename(sms_invSpectrum) simplsms_invSpectrum; +%rename(sms_dCepstrum) simplsms_dCepstrum; +%rename(sms_synthesize) simplsms_synthesize_wrapper; + +%inline +%{ + typedef struct + { + SMS_Header *header; + SMS_Data *smsData; + int allocated; + } SMS_File; + + void simplsms_dCepstrum(int sizeCepstrum, sfloat *pCepstrum, int sizeFreq, sfloat *pFreq, int sizeMag, sfloat *pMag, + sfloat fLambda, int iSamplingRate) + { + sms_dCepstrum(sizeCepstrum,pCepstrum, sizeFreq, pFreq, pMag, + fLambda, iSamplingRate); + } + int simplsms_detectPeaks(int sizeMag, sfloat *pMag, int sizePhase, sfloat *pPhase, + SMS_SpectralPeaks *pPeakStruct, SMS_AnalParams *pAnalParams) + { + if(sizeMag != sizePhase) + { + sms_error("sizeMag != sizePhase"); + return 0; + } + if(pPeakStruct->nPeaks < pAnalParams->maxPeaks) + { + sms_error("nPeaks in SMS_SpectralPeaks is not large enough (less than SMS_AnalParams.maxPeaks)"); + return 0; + } + pPeakStruct->nPeaksFound = sms_detectPeaks(sizeMag, pMag, pPhase, pPeakStruct->pSpectralPeaks, pAnalParams); + return pPeakStruct->nPeaksFound; + } + int simplsms_spectrum(int sizeWaveform, sfloat *pWaveform, int sizeWindow, sfloat *pWindow, + int sizeMag, sfloat *pMag, int sizePhase, sfloat *pPhase, sfloat *pFftBuffer) + { + return sms_spectrum(sizeWindow, pWaveform, pWindow, sizeMag, pMag, pPhase, pFftBuffer); + } + int simplsms_spectrumMag(int sizeWaveform, sfloat *pWaveform, int sizeWindow, sfloat *pWindow, + int sizeMag, sfloat *pMag, sfloat *pFftBuffer) + { + return sms_spectrumMag(sizeWindow, pWaveform, pWindow, sizeMag, pMag, pFftBuffer); + } + int simplsms_invSpectrum(int sizeWaveform, sfloat *pWaveform, int sizeWindow, sfloat *pWindow, + int sizeMag, sfloat *pMag, int sizePhase, sfloat *pPhase, sfloat *pFftBuffer) + { + return sms_invSpectrum(sizeWaveform, pWaveform, pWindow, sizeMag, pMag, pPhase, pFftBuffer); + } + void simplsms_windowCentered(int sizeWaveform, sfloat *pWaveform, int sizeWindow, + sfloat *pWindow, int sizeFft, sfloat *pFftBuffer) + { + if (sizeWaveform != sizeWindow) + { + sms_error("sizeWaveform != sizeWindow"); + return; + } + sms_windowCentered(sizeWindow, pWaveform, pWindow, sizeFft, pFftBuffer); + } + void simplsms_synthesize_wrapper(SMS_Data *pSmsData, int sizeHop, sfloat *pSynthesis, SMS_SynthParams *pSynthParams) + { + if(sizeHop != pSynthParams->sizeHop) + { + sms_error("sizeHop != pSynthParams->sizeHop"); + return; + } + sms_synthesize(pSmsData, pSynthesis, pSynthParams); + } +%} + +%extend SMS_File +{ + /* load an entire file to an internal numpy array */ + void load(char *pFilename) + { + int i; + FILE *pSmsFile; + $self->allocated = 0; + sms_getHeader (pFilename, &$self->header, &pSmsFile); + if(sms_errorCheck()) return; + + $self->smsData = calloc($self->header->nFrames, sizeof(SMS_Data)); + for(i = 0; i < $self->header->nFrames; i++) + { + sms_allocFrameH ($self->header, &$self->smsData[i]); + if(sms_errorCheck()) + return; + sms_getFrame (pSmsFile, $self->header, i, &$self->smsData[i]); + if(sms_errorCheck()) + return; + } + $self->allocated = 1; + } + void close() /* todo: this should be in the destructor, no? */ + { + int i; + if(!$self->allocated) + { + sms_error("file not yet alloceted"); + return; + } + $self->allocated = 0; + for(i = 0; i < $self->header->nFrames; i++) + sms_freeFrame(&$self->smsData[i]); + free($self->smsData); + } + /* return a pointer to a frame, which can be passed around to other libsms functions */ + void getFrame(int i, SMS_Data *frame) + { + if(i < 0 || i >= $self->header->nFrames) + { + sms_error("index is out of file boundaries"); + return; + } + frame = &$self->smsData[i]; + } + void getTrack(int track, int sizeFreq, sfloat *pFreq, int sizeAmp, sfloat *pAmp) + { + /* fatal error protection first */ + if(!$self->allocated) + { + sms_error("file not yet alloceted"); + return; + } + if(track >= $self->header->nTracks) + { + sms_error("desired track is greater than number of tracks in file"); + return; + } + if(sizeFreq != sizeAmp) + { + sms_error("freq and amp arrays are different in size"); + return; + } + /* make sure arrays are big enough, or return less data */ + int nFrames = MIN(sizeFreq, $self->header->nFrames); + int i; + for(i=0; i < nFrames; i++) + { + pFreq[i] = $self->smsData[i].pFSinFreq[track]; + pAmp[i] = $self->smsData[i].pFSinAmp[track]; + } + } + // TODO turn into getTrackP - and check if phase exists + void getTrack(int track, int sizeFreq, sfloat *pFreq, int sizeAmp, + sfloat *pAmp, int sizePhase, sfloat *pPhase) + { + /* fatal error protection first */ + if(!$self->allocated) + { + sms_error("file not yet alloceted"); + return; + } + if(track >= $self->header->nTracks) + { + sms_error("desired track is greater than number of tracks in file"); + return; + } + if(sizeFreq != sizeAmp) + { + sms_error("freq and amp arrays are different in size"); + return; + } + /* make sure arrays are big enough, or return less data */ + int nFrames = MIN (sizeFreq, $self->header->nFrames); + int i; + for(i=0; i < nFrames; i++) + { + pFreq[i] = $self->smsData[i].pFSinFreq[track]; + pAmp[i] = $self->smsData[i].pFSinFreq[track]; + } + if($self->header->iFormat < SMS_FORMAT_HP) + return; + + if(sizePhase != sizeFreq || sizePhase != sizeAmp) + { + sms_error("phase array and freq/amp arrays are different in size"); + return; + } + for(i=0; i < nFrames; i++) + pPhase[i] = $self->smsData[i].pFSinPha[track]; + } + void getFrameDet(int i, int sizeFreq, sfloat *pFreq, int sizeAmp, sfloat *pAmp) + { + if(!$self->allocated) + { + sms_error("file not yet alloceted"); + return; + } + if(i >= $self->header->nFrames) + { + sms_error("index is greater than number of frames in file"); + return; + } + int nTracks = $self->smsData[i].nTracks; + if(sizeFreq > nTracks) + { + sms_error("index is greater than number of frames in file"); + return; + } + if(sizeFreq != sizeAmp) + { + sms_error("freq and amp arrays are different in size"); + return; + } + memcpy(pFreq, $self->smsData[i].pFSinFreq, sizeof(sfloat) * nTracks); + memcpy(pAmp, $self->smsData[i].pFSinAmp, sizeof(sfloat) * nTracks); + } + void getFrameDetP(int i, int sizeFreq, sfloat *pFreq, int sizeAmp, + sfloat *pAmp, int sizePhase, sfloat *pPhase) + { + if(!$self->allocated) + { + sms_error("file not yet alloceted"); + return; + } + if($self->header->iFormat < SMS_FORMAT_HP) + { + sms_error("file does not contain a phase component in Deterministic (iFormat < SMS_FORMAT_HP)"); + return; + } + if(i >= $self->header->nFrames) + { + sms_error("index is greater than number of frames in file"); + return; + } + int nTracks = $self->smsData[i].nTracks; + if(sizeFreq > nTracks) + { + sms_error("index is greater than number of frames in file"); + return; + } + if(sizeFreq != sizeAmp) + { + sms_error("freq and amp arrays are different in size"); + return; + } + memcpy(pFreq, $self->smsData[i].pFSinFreq, sizeof(sfloat) * nTracks); + memcpy(pAmp, $self->smsData[i].pFSinAmp, sizeof(sfloat) * nTracks); + + if(sizePhase != sizeFreq || sizePhase != sizeAmp) + { + sms_error("phase array and freq/amp arrays are different in size"); + return; + } + memcpy(pPhase, $self->smsData[i].pFSinPha, sizeof(sfloat) * nTracks); + } + void getFrameRes(int i, int sizeRes, sfloat *pRes) + { + if(!$self->allocated) + { + sms_error("file not yet alloceted"); + return; + } + if($self->header->iStochasticType < 1) + { + sms_error("file does not contain a stochastic component"); + return; + } + int nCoeff = sizeRes; + if($self->header->nStochasticCoeff > sizeRes) + nCoeff = $self->header->nStochasticCoeff; // return what you can + + memcpy(pRes, $self->smsData[i].pFStocCoeff, sizeof(sfloat) * nCoeff); + } + void getFrameEnv(int i, int sizeEnv, sfloat *pEnv) + { + if(!$self->allocated) + { + sms_error("file not yet alloceted"); + return; + } + if($self->header->iEnvType < 1) + { + sms_error("file does not contain a spectral envelope"); + return; + } + int nCoeff = sizeEnv; + if($self->header->nStochasticCoeff > sizeEnv) + nCoeff = $self->header->nEnvCoeff; // return what you can + + memcpy(pEnv, $self->smsData[i].pSpecEnv, sizeof(sfloat) * nCoeff); + } +} + +%extend SMS_AnalParams +{ + SMS_AnalParams() + { + SMS_AnalParams *s = (SMS_AnalParams *)malloc(sizeof(SMS_AnalParams)); + sms_initAnalParams(s); + return s; + } +} + +%extend SMS_SynthParams +{ + SMS_SynthParams() + { + SMS_SynthParams *s = (SMS_SynthParams *)malloc(sizeof(SMS_SynthParams)); + sms_initSynthParams(s); + return s; + } +} + +%extend SMS_SpectralPeaks +{ + SMS_SpectralPeaks(int n) + { + SMS_SpectralPeaks *s = (SMS_SpectralPeaks *)malloc(sizeof(SMS_SpectralPeaks)); + if(s == NULL) + { + sms_error("Could not allocate memory for SMS_SpectralPeaks"); + return NULL; + } + if(sms_initSpectralPeaks(s, n) < 0) + { + sms_error("Could not initialise SMS_SpectralPeaks"); + return NULL; + } + return s; + } + void getFreq(int sizeArray, sfloat *pArray ) + { + if(sizeArray < $self->nPeaksFound) + { + sms_error("numpy array not big enough"); + return; + } + int i; + for(i = 0; i < $self->nPeaksFound; i++) + pArray[i] = $self->pSpectralPeaks[i].fFreq; + } + void getMag(int sizeArray, sfloat *pArray ) + { + if(sizeArray < $self->nPeaksFound) + { + sms_error("numpy array not big enough"); + return; + } + int i; + for(i = 0; i < $self->nPeaksFound; i++) + pArray[i] = $self->pSpectralPeaks[i].fMag; + } + void getPhase(int sizeArray, sfloat *pArray ) + { + if(sizeArray < $self->nPeaksFound) + { + sms_error("numpy array not big enough"); + return; + } + int i; + for(i = 0; i < $self->nPeaksFound; i++) + pArray[i] = $self->pSpectralPeaks[i].fPhase; + } +} + +%extend SMS_Data +{ + void getSinAmp(int sizeArray, sfloat *pArray) + { + if(sizeArray < $self->nTracks) + { + sms_error("numpy array not big enough"); + return; + } + int i; + for(i = 0; i < $self->nTracks; i++) + pArray[i] = $self->pFSinAmp[i]; + } + void getSinFreq(int sizeArray, sfloat *pArray) + { + if(sizeArray < $self->nTracks) + { + sms_error("numpy array not big enough"); + return; + } + int i; + for(i = 0; i < $self->nTracks; i++) + pArray[i] = $self->pFSinFreq[i]; + } + void getSinPhase(int sizeArray, sfloat *pArray) + { + if(sizeArray < $self->nTracks) + { + sms_error("numpy array not big enough"); + return; + } + int i; + for(i = 0; i < $self->nTracks; i++) + pArray[i] = $self->pFSinPha[i]; + } + void getSinEnv(int sizeArray, sfloat *pArray) + { + if(sizeArray < $self->nEnvCoeff) + { + sms_error("numpy array not big enough"); + return; + } + int i; + for(i = 0; i < $self->nEnvCoeff; i++) + pArray[i] = $self->pSpecEnv[i]; + } + void setSinAmp(int sizeArray, sfloat *pArray) + { + if(sizeArray < $self->nTracks) + { + sms_error("numpy array not big enough"); + return; + } + int i; + for (i = 0; i < $self->nTracks; i++) + $self->pFSinAmp[i] = pArray[i]; + } + void setSinFreq(int sizeArray, sfloat *pArray) + { + if(sizeArray < $self->nTracks) + { + sms_error("numpy array not big enough"); + return; + } + int i; + for(i = 0; i < $self->nTracks; i++) + $self->pFSinFreq[i] = pArray[i]; + } + void setSinPha(int sizeArray, sfloat *pArray) + { + if(sizeArray < $self->nTracks) + { + sms_error("numpy array not big enough"); + return; + } + int i; + for(i = 0; i < $self->nTracks; i++) + $self->pFSinPha[i] = pArray[i]; + } +} + +%extend SMS_ResidualParams +{ + void getResidual(int sizeArray, sfloat *pArray) + { + if(sizeArray < $self->hopSize) + { + sms_error("numpy array not big enough"); + return; + } + int i; + for(i = 0; i < $self->hopSize; i++) + pArray[i] = $self->residual[i]; + } +} + +%extend SMS_ModifyParams +{ + /* no need to return an error code, if sms_error is called, it will throw an exception in python */ + void setSinEnv(int sizeArray, sfloat *pArray) + { + if(!$self->ready) + { + sms_error("modify parameter structure has not been initialized"); + return; + } + if(sizeArray != $self->sizeSinEnv) + { + sms_error("numpy array is not equal to envelope size"); + return; + } + memcpy($self->sinEnv, pArray, sizeof(sfloat) * $self->sizeSinEnv); + } +} + diff --git a/src/sms/soundIO.c b/src/sms/soundIO.c new file mode 100644 index 0000000..2e2379b --- /dev/null +++ b/src/sms/soundIO.c @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2008 MUSIC TECHNOLOGY GROUP (MTG) + * UNIVERSITAT POMPEU FABRA + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +/*! \file soundIO.c + * \brief soundfile input and output. +*/ +#include "sms.h" + +/*! \brief fill the sound buffer + * + * \param sizeWaveform size of input data + * \param pWaveform input data + * \param pAnalParams pointer to structure of analysis parameters + */ +void sms_fillSoundBuffer(int sizeWaveform, sfloat *pWaveform, SMS_AnalParams *pAnalParams) +{ + int i; + long sizeNewData = (long)sizeWaveform; + + /* leave space for new data */ + memcpy(pAnalParams->soundBuffer.pFBuffer, pAnalParams->soundBuffer.pFBuffer+sizeNewData, + sizeof(sfloat) * (pAnalParams->soundBuffer.sizeBuffer - sizeNewData)); + + pAnalParams->soundBuffer.iFirstGood = MAX(0, pAnalParams->soundBuffer.iFirstGood - sizeNewData); + pAnalParams->soundBuffer.iMarker += sizeNewData; + + /* put the new data in, and do some pre-emphasis */ + if(pAnalParams->iAnalysisDirection == SMS_DIR_REV) + for(i=0; isoundBuffer.pFBuffer[pAnalParams->soundBuffer.sizeBuffer - sizeNewData + i] = + sms_preEmphasis(pWaveform[sizeNewData - (1 + i)], pAnalParams); + else + for(i=0; isoundBuffer.pFBuffer[pAnalParams->soundBuffer.sizeBuffer - sizeNewData + i] = + sms_preEmphasis(pWaveform[i], pAnalParams); +} + diff --git a/src/sms/spectralApprox.c b/src/sms/spectralApprox.c new file mode 100644 index 0000000..b1f65ef --- /dev/null +++ b/src/sms/spectralApprox.c @@ -0,0 +1,152 @@ +/* + * Copyright (c) 2008 MUSIC TECHNOLOGY GROUP (MTG) + * UNIVERSITAT POMPEU FABRA + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +/*! \file spectralApprox.c + * \brief line segment approximation of a magnitude spectrum + */ +#include "sms.h" + +/*! \brief approximate a magnitude spectrum + * First downsampling using local maxima and then upsampling using linear + * interpolation. The output spectrum doesn't have to be the same size as + * the input one. + * + * \param pFSpec1 magnitude spectrum to approximate + * \param sizeSpec1 size of input spectrum + * \param sizeSpec1Used size of the spectrum to use + * \param pFSpec2 output envelope + * \param sizeSpec2 size of output envelope + * \param nCoefficients number of coefficients to use in approximation + * \return error code \see SMS_ERRORS + */ +int sms_spectralApprox(sfloat *pFSpec1, int sizeSpec1, int sizeSpec1Used, + sfloat *pFSpec2, int sizeSpec2, int nCoefficients, + sfloat *envelope) +{ + sfloat fHopSize, fCurrentLoc = 0, fLeft = 0, fRight = 0, fValue = 0, + fLastLocation, fSizeX, fSpec2Acum=0, fNextHop, fDeltaY; + int iFirstGood = 0, iLastSample = 0, i, j; + + /* when number of coefficients is smaller than 2 do not approximate */ + if(nCoefficients < 2) + { + for(i = 0; i < sizeSpec2; i++) + pFSpec2[i] = 1; + return SMS_OK; + } + + /* calculate the hop size */ + if(nCoefficients > sizeSpec1) + nCoefficients = sizeSpec1; + + fHopSize = (sfloat)sizeSpec1Used / nCoefficients; + + /* approximate by linear interpolation */ + if(fHopSize > 1) + { + iFirstGood = 0; + for(i = 0; i < nCoefficients; i++) + { + iLastSample = fLastLocation = fCurrentLoc + fHopSize; + iLastSample = MIN(sizeSpec1-1, iLastSample); + if(iLastSample < sizeSpec1-1) + { + fRight = pFSpec1[iLastSample] + + (pFSpec1[iLastSample+1] - pFSpec1[iLastSample]) * + (fLastLocation - iLastSample); + } + else + { + fRight = pFSpec1[iLastSample]; + } + + fValue = 0; + for(j = iFirstGood; j <= iLastSample; j++) + fValue = MAX (fValue, pFSpec1[j]); + fValue = MAX(fValue, MAX (fRight, fLeft)); + envelope[i] = fValue; + + fLeft = fRight; + fCurrentLoc = fLastLocation; + iFirstGood = (int)(1+ fCurrentLoc); + } + } + else if(fHopSize == 1) + { + for(i = 0; i < nCoefficients; i++) + envelope[i] = pFSpec1[i]; + } + else + { + sms_error("SpectralApprox: sizeSpec1 has too many nCoefficients"); /* \todo need to increase the frequency? */ + return -1; + } + + /* Creates Spec2 from Envelope */ + if(nCoefficients < sizeSpec2) + { + fSizeX = (sfloat) (sizeSpec2-1) / nCoefficients; + + /* the first step */ + fNextHop = fSizeX / 2; + fDeltaY = envelope[0] / fNextHop; + fSpec2Acum=pFSpec2[j=0]=0; + while(++j < fNextHop) + pFSpec2[j] = (fSpec2Acum += fDeltaY); + + /* middle values */ + for(i = 0; i <= nCoefficients-2; ++i) + { + fDeltaY = (envelope[i+1] - envelope[i]) / fSizeX; + /* first point of a segment */ + pFSpec2[j] = (fSpec2Acum = (envelope[i]+(fDeltaY*(j-fNextHop)))); + ++j; + /* remaining points */ + fNextHop += fSizeX; + while(j < fNextHop) + pFSpec2[j++] = (fSpec2Acum += fDeltaY); + } + + /* last step */ + fDeltaY = -envelope[i] * 2 / fSizeX; + /* first point of the last segment */ + pFSpec2[j] = (fSpec2Acum = (envelope[i]+(fDeltaY*(j-fNextHop)))); + ++j; + fNextHop += fSizeX / 2; + while(j < sizeSpec2-1) + pFSpec2[j++]=(fSpec2Acum += fDeltaY); + /* last should be exactly zero */ + pFSpec2[sizeSpec2-1] = .0; + } + else if(nCoefficients == sizeSpec2) + { + for(i = 0; i < nCoefficients; i++) + pFSpec2[i] = envelope[i]; + } + else + { + sms_error("SpectralApprox: sizeSpec2 has too many nCoefficients\n"); + return -1; + } + + return SMS_OK; +} + + diff --git a/src/sms/spectrum.c b/src/sms/spectrum.c new file mode 100644 index 0000000..1b8e053 --- /dev/null +++ b/src/sms/spectrum.c @@ -0,0 +1,264 @@ +/* + * Copyright (c) 2008 MUSIC TECHNOLOGY GROUP (MTG) + * UNIVERSITAT POMPEU FABRA + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +/*! \file spectrum.c + * \brief functions to convert between frequency (spectrum) and time (wavefrom) domain + */ +#include "sms.h" + +/*! \brief compute a complex spectrum from a waveform + * + * \param sizeWindow size of analysis window + * \param pWaveform pointer to input waveform + * \param pWindow pointer to input window + * \param sizeMag size of output magnitude and phase spectrums + * \param pMag pointer to output magnitude spectrum + * \param pPhase pointer to output phase spectrum + * \return sizeFft, -1 on error \todo remove this return + */ +int sms_spectrum(int sizeWindow, sfloat *pWaveform, sfloat *pWindow, int sizeMag, + sfloat *pMag, sfloat *pPhase, sfloat *pFftBuffer) +{ + int i, it2; + sfloat fReal, fImag; + + int sizeFft = sizeMag << 1; + memset(pFftBuffer, 0, sizeFft * sizeof(sfloat)); + + /* apply window to waveform and center window around 0 (zero-phase windowing)*/ + sms_windowCentered(sizeWindow, pWaveform, pWindow, sizeFft, pFftBuffer); + sms_fft(sizeFft, pFftBuffer); + + /* convert from rectangular to polar coordinates */ + for(i = 0; i < sizeMag; i++) + { + it2 = i << 1; //even numbers 0-N + fReal = pFftBuffer[it2]; /*odd numbers 1->N+1 */ + fImag = pFftBuffer[it2 + 1]; /*even numbers 2->N+2 */ + pMag[i] = sqrt(fReal * fReal + fImag * fImag); + pPhase[i] = atan2(-fImag, fReal); /* \todo why is fImag negated? */ + /*pPhase[i] = atan2(fImag, fReal);*/ + } + + return sizeFft; +} + +/* sms_spectrum, but without zero-phase windowing, and with phase calculated + * according by arctan(imag/real) instead of arctan2(-imag/real) + */ +int sms_spectrumW(int sizeWindow, sfloat *pWaveform, sfloat *pWindow, int sizeMag, + sfloat *pMag, sfloat *pPhase, sfloat *pFftBuffer) +{ + int i, it2; + sfloat fReal, fImag; + + int sizeFft = sizeMag << 1; + memset(pFftBuffer, 0, sizeFft * sizeof(sfloat)); + + /* apply window to waveform */ + for(i = 0; i < sizeWindow; i++) + pFftBuffer[i] = pWaveform[i] * pWindow[i]; + + sms_fft(sizeFft, pFftBuffer); + + /* convert from rectangular to polar coordinates */ + for(i = 0; i < sizeMag; i++) + { + it2 = i << 1; //even numbers 0-N + fReal = pFftBuffer[it2]; /*odd numbers 1->N+1 */ + fImag = pFftBuffer[it2 + 1]; /*even numbers 2->N+2 */ + pMag[i] = sqrt(fReal * fReal + fImag * fImag); + pPhase[i] = atan2(fImag, fReal); + } + + return sizeFft; +} + +/*! \brief compute the spectrum Magnitude of a waveform + * + * This function windows the waveform with pWindow and + * performs a zero-padded FFT (if sizeMag*2 > sizeWindow). + * The spectra is then converted magnitude (RMS). + * + * \param sizeWindow size of analysis window / input wavefrom + * \param pWaveform pointer to input waveform + * \param pWindow pointer to analysis window + * \param sizeMag size of output magnitude spectrum + * \param pMag pointer to output magnitude spectrum + * \return 0 on success, -1 on error + */ +int sms_spectrumMag(int sizeWindow, sfloat *pWaveform, sfloat *pWindow, + int sizeMag, sfloat *pMag, sfloat *pFftBuffer) +{ + int i,it2; + int sizeFft = sizeMag << 1; + sfloat fReal, fImag; + + /* apply window to waveform, zero the rest of the array */ + for(i = 0; i < sizeWindow; i++) + pFftBuffer[i] = pWaveform[i] * pWindow[i]; + for(i = sizeWindow; i < sizeFft; i++) + pFftBuffer[i] = 0.; + + /* compute real FFT */ + sms_fft(sizeFft, pFftBuffer); + + /* convert from rectangular to polar coordinates */ + for(i = 0; i < sizeMag; i++) + { + it2 = i << 1; + fReal = pFftBuffer[it2]; + fImag = pFftBuffer[it2+1]; + pMag[i] = sqrtf(fReal * fReal + fImag * fImag); + } + + return sizeFft; +} + +/*! \brief function for a quick inverse spectrum, windowed + * + * Not done yet, but this will be a function that is the inverse of + * sms_spectrum above. + * + * function to perform the inverse FFT, windowing the output + * sfloat *pFMagSpectrum input magnitude spectrum + * sfloat *pFPhaseSpectrum input phase spectrum + * int sizeFft size of FFT + * sfloat *pFWaveform output waveform + * int sizeWave size of output waveform + * sfloat *pFWindow synthesis window + */ +int sms_invSpectrum(int sizeWaveform, sfloat *pWaveform, sfloat *pWindow, + int sizeMag, sfloat *pMag, sfloat *pPhase, sfloat *pFftBuffer) +{ + int i; + int sizeFft = sizeMag << 1; + + sms_PolarToRect(sizeMag, pFftBuffer, pMag, pPhase); + sms_ifft(sizeFft, pFftBuffer); + + /* assume that the output array does not need to be cleared */ + /* before, this was multiplied by .5, why? */ + for(i = 0; i < sizeWaveform; i++) + //pWaveform[i] += pFftBuffer[i] * pWindow[i]; + pWaveform[i] = pFftBuffer[i]; + + return sizeFft; +} + +/*! \brief function for a quick inverse spectrum, windowed + * function to perform the inverse FFT, windowing the output + * sfloat *pFMagSpectrum input magnitude spectrum + * sfloat *pFPhaseSpectrum input phase spectrum + * int sizeFft size of FFT + * sfloat *pFWaveform output waveform + * int sizeWave size of output waveform + * sfloat *pFWindow synthesis window + */ +int sms_invQuickSpectrumW(sfloat *pFMagSpectrum, sfloat *pFPhaseSpectrum, + int sizeFft, sfloat *pFWaveform, int sizeWave, + sfloat *pFWindow, sfloat* pFftBuffer) +{ + int i, it2; + int sizeMag = sizeFft >> 1; + + /* convert from polar coordinates to rectangular */ + for(i = 0; i < sizeMag; i++) + { + it2 = i << 1; + pFftBuffer[it2] = pFMagSpectrum[i] * cos(pFPhaseSpectrum[i]); + pFftBuffer[it2+1] = pFMagSpectrum[i] * sin(pFPhaseSpectrum[i]); + } + + /* compute IFFT */ + sms_ifft(sizeFft, pFftBuffer); + + /* assume that the output array does not need to be cleared */ + for(i = 0; i < sizeWave; i++) + pFWaveform[i] += (pFftBuffer[i] * pFWindow[i] * .5); + + return sizeMag; +} + +/*! \brief convert spectrum from Rectangular to Polar form + * + * \param sizeMag size of spectrum (pMag and pPhase arrays) + * \param pRect pointer output spectrum in rectangular form (2x sizeSpec) + * \param pMag pointer to sfloat array of magnitude spectrum + * \param pPhase pointer to sfloat array of phase spectrum + */ +void sms_RectToPolar(int sizeMag, sfloat *pRect, sfloat *pMag, sfloat *pPhase) +{ + int i, it2; + sfloat fReal, fImag; + + for(i=0; isizeStocMagSpectrum, + pAnalParams->stocMagSpectrum, pAnalParams->fftBuffer); + + sms_spectralApprox(pAnalParams->stocMagSpectrum, pAnalParams->sizeStocMagSpectrum, + pAnalParams->sizeStocMagSpectrum, pSmsData->pFStocCoeff, + pSmsData->nCoeff, pSmsData->nCoeff, + pAnalParams->approxEnvelope); + + /* get energy of spectrum */ + for(i = 0; i < pAnalParams->sizeStocMagSpectrum; i++) + fMag += (pAnalParams->stocMagSpectrum[i] * pAnalParams->stocMagSpectrum[i]); + + *pSmsData->pFStocGain = fMag / pAnalParams->sizeStocMagSpectrum; + return 0; +} + diff --git a/src/sms/synthesis.c b/src/sms/synthesis.c new file mode 100644 index 0000000..bc739d0 --- /dev/null +++ b/src/sms/synthesis.c @@ -0,0 +1,260 @@ +/* + * Copyright (c) 2008 MUSIC TECHNOLOGY GROUP (MTG) + * UNIVERSITAT POMPEU FABRA + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +/*! \file synthesis.c + * \brief main synthesis routines + */ +#include "sms.h" + +/*! \brief synthesis of one frame of the deterministic component using the IFFT + * + * \param pSmsData pointer to SMS data structure frame + * \param pSynthParams pointer to structure of synthesis parameters + */ +static void SineSynthIFFT(SMS_Data *pSmsData, SMS_SynthParams *pSynthParams) +{ + int sizeFft = pSynthParams->sizeHop << 1; + int iHalfSamplingRate = pSynthParams->iSamplingRate >> 1; + int sizeMag = pSynthParams->sizeHop; + int nBins = 8; + int nTracks = pSmsData->nTracks; + int iFirstBin, k, i, l, b; + sfloat fMag=0.0, fFreq=0.0, fPhase=0.0, fLoc, fSin, fCos, fBinRemainder, + fTmp, fNewMag, fIndex; + sfloat fSamplingPeriod = 1.0 / pSynthParams->iSamplingRate; + memset(pSynthParams->pSpectra, 0, sizeFft * sizeof(sfloat)); + for(i = 0; i < nTracks; i++) + { + if(((fMag = pSmsData->pFSinAmp[i]) > 0) && + ((fFreq = (pSmsData->pFSinFreq[i])) < iHalfSamplingRate)) + { + /* \todo maybe this check can be removed if the SynthParams->prevFrame gets random + phases in sms_initSynth? */ + if(pSynthParams->prevFrame.pFSinAmp[i] <= 0) + pSynthParams->prevFrame.pFSinPha[i] = TWO_PI * sms_random(); + + fMag = sms_dBToMag(fMag); + fTmp = pSynthParams->prevFrame.pFSinPha[i] + + TWO_PI * fFreq * fSamplingPeriod * sizeMag; + fPhase = fTmp - floor(fTmp * INV_TWO_PI) * TWO_PI; + fLoc = sizeFft * fFreq * fSamplingPeriod; + iFirstBin = (int) fLoc - 3; + fBinRemainder = fLoc - floor (fLoc); + fSin = sms_sine(fPhase); + fCos = sms_sine(fPhase + PI_2); + for (k = 1, l = iFirstBin; k <= nBins; k++, l++) + { + fIndex = (k - fBinRemainder); + if (fIndex > 7.999) fIndex = 0; + fNewMag = fMag * sms_sinc (fIndex); + if(l > 0 && l < sizeMag) + { + pSynthParams->pSpectra[l*2+1] += fNewMag * fCos; + pSynthParams->pSpectra[l*2] += fNewMag * fSin; + } + else if(l == 0) + { + pSynthParams->pSpectra[0] += 2 * fNewMag * fSin; + } + else if(l < 0) + { + b = abs(l); + pSynthParams->pSpectra[b*2+1] -= fNewMag * fCos; + pSynthParams->pSpectra[b*2] += fNewMag * fSin; + } + else if(l > sizeMag) + { + b = sizeMag - (l - sizeMag); + pSynthParams->pSpectra[b*2+1] -= fNewMag * fCos; + pSynthParams->pSpectra[b*2] += fNewMag * fSin; + } + else if(l == sizeMag) + { + pSynthParams->pSpectra[1] += 2 * fNewMag * fSin; + } + } + } + pSynthParams->prevFrame.pFSinAmp[i] = fMag; + pSynthParams->prevFrame.pFSinPha[i] = fPhase; + pSynthParams->prevFrame.pFSinFreq[i] = fFreq; + } + + sms_ifft(sizeFft, pSynthParams->pSpectra); + + for(i = 0, k = sizeMag; i < sizeMag; i++, k++) + pSynthParams->pSynthBuff[i] += pSynthParams->pSpectra[k] * pSynthParams->pFDetWindow[i]; + for(i= sizeMag, k = 0; i < sizeFft; i++, k++) + pSynthParams->pSynthBuff[i] += pSynthParams->pSpectra[k] * pSynthParams->pFDetWindow[i]; +} + +/*! \brief synthesis of one frame of the stochastic component by apprimating phases + * + * computes a linearly interpolated spectral envelope to fit the correct number of output + * audio samples. Phases are generated randomly. + * + * \param pSmsData pointer to the current SMS frame + * \param pSynthParams pointer to a strucure of synthesis parameters + * \return + * \todo cleanup returns and various constant multipliers. check that approximation is ok + */ +static int StocSynthApprox(SMS_Data *pSmsData, SMS_SynthParams *pSynthParams) +{ + int i, sizeSpec1Used; + int sizeSpec1 = pSmsData->nCoeff; + int sizeSpec2 = pSynthParams->sizeHop; + int sizeFft = pSynthParams->sizeHop << 1; /* 50% overlap, so sizeFft is 2x sizeHop */ + + /* if no gain or no coefficients return */ + if(*(pSmsData->pFStocGain) <= 0) + return 0; + + sizeSpec1Used = sizeSpec1 * pSynthParams->iSamplingRate / pSynthParams->iOriginalSRate; + + /* sizeSpec1Used cannot be more than what is available \todo check by graph */ + if(sizeSpec1Used > sizeSpec1) sizeSpec1Used = sizeSpec1; + + sms_spectralApprox(pSmsData->pFStocCoeff, sizeSpec1, sizeSpec1Used, + pSynthParams->pMagBuff, sizeSpec2, sizeSpec1Used, + pSynthParams->approxEnvelope); + + /* generate random phases */ + for(i = 0; i < sizeSpec2; i++) + pSynthParams->pPhaseBuff[i] = TWO_PI * sms_random(); + + sms_invQuickSpectrumW(pSynthParams->pMagBuff, pSynthParams->pPhaseBuff, + sizeFft, pSynthParams->pSynthBuff, sizeFft, + pSynthParams->pFStocWindow, pSynthParams->pSpectra); + return 1; +} + +/*! \brief synthesizes one frame of the residual signal + * + * \param residualParams Parameters and memory for residual synthesis + */ +void sms_approxResidual(int sizeResidual, sfloat* residual, + int sizeApprox, sfloat* approx, + SMS_ResidualParams *residualParams) +{ + int i; + + /* shift buffers */ + memcpy(residualParams->residual, + residualParams->residual + residualParams->hopSize, + sizeof(sfloat) * residualParams->hopSize); + memcpy(residualParams->residual + residualParams->hopSize, residual, + sizeof(sfloat) * residualParams->hopSize); + + memcpy(residualParams->approx, + residualParams->approx + residualParams->hopSize, + sizeof(sfloat) * residualParams->hopSize); + memset(residualParams->approx + residualParams->hopSize, 0, + sizeof(sfloat) * residualParams->hopSize); + + sms_spectrumMag(residualParams->residualSize, + residualParams->residual, + residualParams->fftWindow, + residualParams->sizeStocMagSpectrum, + residualParams->stocMagSpectrum, + residualParams->fftBuffer); + + if(residualParams->sizeStocMagSpectrum != residualParams->nCoeffs) + { + sms_spectralApprox(residualParams->stocMagSpectrum, + residualParams->sizeStocMagSpectrum, + residualParams->sizeStocMagSpectrum, + residualParams->stocCoeffs, + residualParams->nCoeffs, + residualParams->nCoeffs, + residualParams->approxEnvelope); + + sms_spectralApprox(residualParams->stocCoeffs, + residualParams->nCoeffs, + residualParams->nCoeffs, + residualParams->stocMagSpectrum, + residualParams->sizeStocMagSpectrum, + residualParams->sizeStocMagSpectrum, + residualParams->approxEnvelope); + } + + /* generate random phases */ + for(i = 0; i < residualParams->sizeStocMagSpectrum; i++) + residualParams->stocPhaseSpectrum[i] = TWO_PI * sms_random(); + + /* IFFT with 50% overlap */ + sms_invQuickSpectrumW(residualParams->stocMagSpectrum, + residualParams->stocPhaseSpectrum, + residualParams->sizeStocMagSpectrum*2, + residualParams->approx, + residualParams->residualSize, + residualParams->ifftWindow, + residualParams->fftBuffer); + + /* output */ + for(i = 0; i < sizeApprox; i++) + approx[i] = residualParams->approx[i] * residualParams->windowScale; +} + +/*! \brief synthesizes one frame of SMS data + * + * \param pSmsData input SMS data + * \param pFSynthesis output sound buffer + * \param pSynthParams synthesis parameters + */ +void sms_synthesize(SMS_Data *pSmsData, sfloat *pFSynthesis, SMS_SynthParams *pSynthParams) +{ + int i; + int sizeHop = pSynthParams->sizeHop; + + memcpy(pSynthParams->pSynthBuff, (sfloat *)(pSynthParams->pSynthBuff+sizeHop), + sizeof(sfloat) * sizeHop); + memset(pSynthParams->pSynthBuff+sizeHop, 0, sizeof(sfloat) * sizeHop); + + /* convert mags from linear to db */ + sms_arrayMagToDB(pSmsData->nTracks, pSmsData->pFSinAmp); + + /* decide which combo of synthesis methods to use */ + if(pSynthParams->iSynthesisType == SMS_STYPE_ALL) + { + if(pSynthParams->iDetSynthType == SMS_DET_IFFT) + SineSynthIFFT(pSmsData, pSynthParams); + else /*pSynthParams->iDetSynthType == SMS_DET_SIN*/ + { + sms_sineSynthFrame(pSmsData, pSynthParams->pSynthBuff, pSynthParams->sizeHop, + &(pSynthParams->prevFrame), pSynthParams->iSamplingRate); + } + StocSynthApprox(pSmsData, pSynthParams); + } + else if(pSynthParams->iSynthesisType == SMS_STYPE_DET) + { + if(pSynthParams->iDetSynthType == SMS_DET_IFFT) + SineSynthIFFT(pSmsData, pSynthParams); + else /*pSynthParams->iDetSynthType == SMS_DET_SIN*/ + { + sms_sineSynthFrame(pSmsData, pSynthParams->pSynthBuff, pSynthParams->sizeHop, + &(pSynthParams->prevFrame), pSynthParams->iSamplingRate); + } + } + else /* pSynthParams->iSynthesisType == SMS_STYPE_STOC */ + StocSynthApprox(pSmsData, pSynthParams); + + /* de-emphasize the sound and normalize*/ + for(i = 0; i < sizeHop; i++) + pFSynthesis[i] = sms_deEmphasis(pSynthParams->pSynthBuff[i], pSynthParams); +} diff --git a/src/sms/tables.c b/src/sms/tables.c new file mode 100644 index 0000000..85d21cb --- /dev/null +++ b/src/sms/tables.c @@ -0,0 +1,162 @@ +/* + * Copyright (c) 2008 MUSIC TECHNOLOGY GROUP (MTG) + * UNIVERSITAT POMPEU FABRA + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +/*! \file tables.c + * \brief sin and sinc tables. + * + * contains functions for creating and indexing the tables + */ +#include "sms.h" + +/*! \brief value to scale the sine-table-lookup phase */ +static sfloat fSineScale; +/*! \brief inverse of fSineScale - turns a division into multiplication */ +static sfloat fSineIncr; +/*! \brief value to scale the sinc-table-lookup phase */ +static sfloat fSincScale; +/*! \brief global pointer to the sine table */ +static sfloat *sms_tab_sine; +/*! \brief global pointer to the sinc table */ +static sfloat *sms_tab_sinc; + +/*! \brief prepares the sine table + * \param nTableSize size of table + * \return error code \see SMS_MALLOC in SMS_ERRORS + */ +int sms_prepSine(int nTableSize) +{ + register int i; + sfloat fTheta; + + sms_tab_sine = (sfloat *)malloc(nTableSize * sizeof(sfloat)); + if(sms_tab_sine == NULL) + { + sms_error("Could not allocate memory for sine table"); + return SMS_MALLOC; + } + fSineScale = (sfloat)(TWO_PI) / (sfloat)(nTableSize - 1); + fSineIncr = 1.0 / fSineScale; + fTheta = 0.0; + for(i = 0; i < nTableSize; i++) + { + fTheta = fSineScale * (sfloat)i; + sms_tab_sine[i] = sin(fTheta); + } + return SMS_OK; +} +/*! \brief clear sine table */ +void sms_clearSine() +{ + if(sms_tab_sine) + free(sms_tab_sine); + sms_tab_sine = NULL; +} + +/*! \brief table-lookup sine method + * \param fTheta angle in radians + * \return approximately sin(fTheta) + */ +sfloat sms_sine(sfloat fTheta) +{ + int i; + fTheta = fTheta - floor(fTheta * INV_TWO_PI) * TWO_PI; + + if(fTheta < 0) + { + i = .5 - (fTheta * fSineIncr); + return -(sms_tab_sine[i]); + } + else + { + i = fTheta * fSineIncr + .5; + return sms_tab_sine[i]; + } +} + +/*! \brief Sinc method to generate the lookup table + */ +static sfloat Sinc(sfloat x, sfloat N) +{ + return sinf((N/2) * x) / sinf(x/2); +} + +/*! \brief prepare the Sinc table + * + * used for the main lobe of a frequency domain + * BlackmanHarris92 window + * + * \param nTableSize size of table + * \return error code \see SMS_MALLOC in SMS_ERRORS + */ +int sms_prepSinc(int nTableSize) +{ + int i, m; + sfloat N = 512.0; + sfloat fA[4] = {.35875, .48829, .14128, .01168}; + sfloat fMax = 0; + sfloat fTheta = -4.0 * TWO_PI / N; + sfloat fThetaIncr = (8.0 * TWO_PI / N) / (nTableSize); + + sms_tab_sinc = (sfloat *)calloc(nTableSize, sizeof(sfloat)); + if(sms_tab_sinc == NULL) + { + sms_error("Could not allocate memory for sinc table"); + return (SMS_MALLOC); + } + + for(i = 0; i < nTableSize; i++) + { + for (m = 0; m < 4; m++) + sms_tab_sinc[i] += -1 * (fA[m]/2) * + (Sinc (fTheta - m * TWO_PI/N, N) + + Sinc (fTheta + m * TWO_PI/N, N)); + fTheta += fThetaIncr; + } + + fMax = sms_tab_sinc[(int) nTableSize / 2]; + for (i = 0; i < nTableSize; i++) + sms_tab_sinc[i] = sms_tab_sinc[i] / fMax; + + fSincScale = (sfloat) nTableSize / 8.0; + return SMS_OK; +} + +/*! \brief clear sine table */ +void sms_clearSinc() +{ + if(sms_tab_sinc) + free(sms_tab_sinc); + sms_tab_sinc = 0; +} + +/*! \brief global sinc table-lookup method + * + * fTheta has to be from 0 to 8 + * + * \param fTheta angle in radians + * \return approximately sinc(fTheta) + */ +sfloat sms_sinc(sfloat fTheta) +{ + int index = (int) (.5 + fSincScale * fTheta); + return sms_tab_sinc[index]; +} + + diff --git a/src/sms/transforms.c b/src/sms/transforms.c new file mode 100644 index 0000000..04ab492 --- /dev/null +++ b/src/sms/transforms.c @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2008 MUSIC TECHNOLOGY GROUP (MTG) + * UNIVERSITAT POMPEU FABRA + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +/*! \file transforms.c + * \brief routines for different Fast Fourier Transform Algorithms + * + */ + +#include "sms.h" +#include "OOURA.h" + +static int ip[NMAXSQRT +2]; +static sfloat w[NMAX * 5 / 4]; + +/*! \brief Forward Fast Fourier Transform + * + * function to call the OOURA routines to calculate + * the forward FFT. Operation is in place. + * \todo if sizeFft != power of 2, there is a silent crash.. cuidado! + * + * \param sizeFft size of the FFT in samples (must be a power of 2 >= 2) + * \param pArray pointer to real array (n >= 2, n = power of 2) + */ +void sms_fft(int sizeFft, sfloat *pArray) +{ + rdft(sizeFft, 1, pArray, ip, w); +} + +/*! \brief Inverse Forward Fast Fourier Transform + * + * function to call the OOURA routines to calculate + * the Inverse FFT. Operation is in place. + * + * \param sizeFft size of the FFT in samples (must be a power of 2 >= 2) + * \param pArray pointer to real array (n >= 2, n = power of 2) + */ +void sms_ifft(int sizeFft, sfloat *pArray) +{ + rdft(sizeFft, -1, pArray, ip, w); +} diff --git a/src/sms/windows.c b/src/sms/windows.c new file mode 100644 index 0000000..46ca5be --- /dev/null +++ b/src/sms/windows.c @@ -0,0 +1,280 @@ +/* + * Copyright (c) 2008 MUSIC TECHNOLOGY GROUP (MTG) + * UNIVERSITAT POMPEU FABRA + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/*! \file windows.c + * \brief functions for creating various windows + * + * Use sms_getWindow() for selecting which window will be made + */ +#include "sms.h" + +/* \brief scale a window by its integral (numeric quadrature) + * + * In order to get a normalized magnitude spectrum (ex. Fourier analysis + * of a sinusoid with linear magnitude 1 gives one peak of magnitude 1 in + * the frequency domain), the spectrum windowing function should be + * normalized by its area under the curve. + * + * \param sizeWindow the size of the window + * \param pWindow pointer to an array that will hold the window + */ +void sms_scaleWindow(int sizeWindow, sfloat *pWindow) +{ + int i; + sfloat fSum = 0; + sfloat fScale; + + for(i = 0; i < sizeWindow; i++) + fSum += pWindow[i]; + + fScale = 2. / fSum; + + for(i = 0; i < sizeWindow; i++) + pWindow[i] *= fScale; +} + +/*! \brief window to be used in the IFFT synthesis + * + * contains both an inverse Blackman-Harris and triangular window. + * + * \todo read X. Rodet, Ph. Depalle, "Spectral Envelopes and Inverse FFT + * Synthesis." Proc. 93rd AES Convention, October 1992 + * \param sizeWindow the size of the window + * \param pFWindow pointer to an array that will hold the window + */ +void IFFTwindow(int sizeWindow, sfloat *pFWindow) +{ + int i; + sfloat a0 = .35875, a1 = .48829, a2 = .14128, a3 = .01168; + double fConst = TWO_PI / sizeWindow, fIncr = 2.0 /sizeWindow, fVal = 0; + + /* compute inverse of Blackman-Harris 92dB window */ + for(i = 0; i < sizeWindow; i++) + { + pFWindow[i] = 1 / (a0 - a1 * cos(fConst * i) + + a2 * cos(fConst * 2 * i) - a3 * cos(fConst * 3 * i)); + } + + /* scale function by a triangular */ + for(i = 0; i < sizeWindow / 2; i++) + { + pFWindow[i] = fVal * pFWindow[i] / 2.787457; + fVal += fIncr; + } + for(i = sizeWindow / 2; i < sizeWindow; i++) + { + pFWindow[i] = fVal * pFWindow[i] / 2.787457; + fVal -= fIncr; + } +} + +/*! \brief BlackmanHarris window with 62dB rolloff + * + * \todo where did these come from? + * \param sizeWindow the size of the window + * \param pFWindow pointer to an array that will hold the window + */ +void BlackmanHarris62(int sizeWindow, sfloat *pFWindow) +{ + int i; + double fSum = 0; + /* for 3 term -62.05 */ + sfloat a0 = .44959, a1 = .49364, a2 = .05677; + double fConst = TWO_PI / sizeWindow; + + /* compute window */ + for(i = 0; i < sizeWindow; i++) + { + fSum += pFWindow[i] = a0 - a1 * cos(fConst * i) + + a2 * cos(fConst * 2 * i); + } +} + +/*! \brief BlackmanHarris window with 70dB rolloff + * + * \param sizeWindow the size of the window + * \param pFWindow pointer to an array that will hold the window + */ +void BlackmanHarris70(int sizeWindow, sfloat *pFWindow) +{ + int i; + double fSum = 0; + /* for 3 term -70.83 */ + sfloat a0 = .42323, a1 = .49755, a2 = .07922; + double fConst = TWO_PI / sizeWindow; + + /* compute window */ + for(i = 0; i < sizeWindow; i++) + { + fSum += pFWindow[i] = a0 - a1 * cos(fConst * i) + + a2 * cos(fConst * 2 * i); + } +} + +/*! \brief BlackmanHarris window with 74dB rolloff + * + * \param sizeWindow the size of the window + * \param pFWindow pointer to an array that will hold the window + */ +void BlackmanHarris74(int sizeWindow, sfloat *pFWindow) +{ + int i; + double fSum = 0; + /* for -74dB from the Nuttall paper */ + sfloat a0 = .40217, a1 = .49703, a2 = .09892, a3 = .00188; + double fConst = TWO_PI / sizeWindow; + + /* compute window */ + for(i = 0; i < sizeWindow; i++) + { + fSum += pFWindow[i] = a0 - a1 * cos(fConst * i) + + a2 * cos(fConst * 2 * i) + a3 * cos(fConst * 3 * i); + } +} + +/*! \brief BlackmanHarris window with 92dB rolloff + * + * \param sizeWindow the size of the window + * \param pFWindow pointer to an array that will hold the window + */ +void BlackmanHarris92(int sizeWindow, sfloat *pFWindow) +{ + int i; + double fSum = 0; + /* for -92dB */ + sfloat a0 = .35875, a1 = .48829, a2 = .14128, a3 = .01168; + double fConst = TWO_PI / sizeWindow; + + /* compute window */ + for(i = 0; i < sizeWindow; i++) + { + fSum += pFWindow[i] = a0 - a1 * cos(fConst * i) + + a2 * cos(fConst * 2 * i) + a3 * cos(fConst * 3 * i); + } +} + +/*! \brief default BlackmanHarris window (70dB rolloff) + * + * \param sizeWindow the size of the window + * \param pFWindow pointer to an array that will hold the window + */ +void BlackmanHarris(int sizeWindow, sfloat *pFWindow) +{ + BlackmanHarris70(sizeWindow, pFWindow); +} + +/*! \brief Hamming window + * + * \param sizeWindow window size + * \param pWindow window array + */ +void Hamming(int sizeWindow, sfloat *pWindow) +{ + int i; + sfloat fSum = 0; + + for(i = 0; i < sizeWindow; i++) + { + fSum += pWindow[i] = 0.53836 - 0.46164*cos(TWO_PI*i/(sizeWindow-1)); + } +} + +/*! \brief Hanning window + * + * \param sizeWindow window size + * \param pWindow window array + */ +void Hanning(int sizeWindow, sfloat *pWindow) +{ + int i; + for(i = 0; i < sizeWindow; i++) + pWindow[i] = (sin(PI*i/(sizeWindow-1)))*(sin(PI*i/(sizeWindow-1))); +} + +/*! \brief main function for getting various windows + * + * \todo note on window scales + * + * \see SMS_WINDOWS for the different window types available + * \param sizeWindow window size + * \param pFWindow window array + * \param iWindowType the desired window type defined by #SMS_WINDOWS + */ +void sms_getWindow(int sizeWindow, sfloat *pFWindow, int iWindowType) +{ + switch(iWindowType) + { + case SMS_WIN_BH_62: + BlackmanHarris62(sizeWindow, pFWindow); + break; + case SMS_WIN_BH_70: + BlackmanHarris70(sizeWindow, pFWindow); + break; + case SMS_WIN_BH_74: + BlackmanHarris74(sizeWindow, pFWindow); + break; + case SMS_WIN_BH_92: + BlackmanHarris92(sizeWindow, pFWindow); + break; + case SMS_WIN_HAMMING: + Hamming(sizeWindow, pFWindow); + break; + case SMS_WIN_HANNING: + Hanning(sizeWindow, pFWindow); + break; + case SMS_WIN_IFFT: + IFFTwindow(sizeWindow, pFWindow); + break; + default: + BlackmanHarris(sizeWindow, pFWindow); + } +} + +/*! \brief apply a window and center around sample 0 + * + * function to center a waveform around sample 0, also known + * as 'zero-phase windowing'. Half the samples are at the beginning, + * half at the end, with the remaining samples (sizeFft-sizeWindow) + * in the middle (zero-padding for an interpolated spectrum). + * + * \todo do I need to garuntee that sizeWindow is odd-lengthed? + * + * \param sizeWindow size of waveform/waveform + * \param pWaveform pointer to waveform + * \param pWindow pointer to window + * \param sizeFft size of FFT + * \param pFftBuffer pointer to FFT buffer + */ +void sms_windowCentered(int sizeWindow, sfloat *pWaveform, sfloat *pWindow, + int sizeFft, sfloat *pFftBuffer) +{ + int iMiddleWindow = (sizeWindow+1) >> 1; + int iOffset = sizeFft - (iMiddleWindow - 1); + int i; + + for(i=0; iGetTable(); + if((m_tracks = ((SinAnal *)m_input)->GetTracks()) > m_maxtracks){ + m_tracks = m_maxtracks; + } + memset(m_output, 0, sizeof(double)*m_vecsize); + + // for each track + i = j = 0; + while(i < m_tracks*3){ + i3 = i/3; + ampnext = m_input->Output(i)*m_scale; + freqnext = m_input->Output(i+1)*m_pitch; + ID = ((SinAnal *)m_input)->GetTrackID(i3); + + j = i3+notcontin; + + if(i3 < oldtracks-notcontin){ + if(m_trackID[j]==ID){ + // if this is a continuing track + track = j; + contin = true; + freq = m_freqs[track]; + phase = m_phases[track]; + amp = m_amps[track]; + } + else{ + // if this is a dead track + contin = false; + track = j; + freqnext = freq = m_freqs[track]; + phase = m_phases[track]; + amp = m_amps[track]; + ampnext = 0.f; + } + } + else{ + // new tracks + contin = true; + track = -1; + freq = freqnext; + phase = -freq*m_factor; + amp = 0.f; + } + + // interpolation & track synthesis loop + double a,f,frac,incra,incrph; + int ndx; + a = amp; + f = freq; + incra = (ampnext - amp)/m_vecsize; + incrph = (freqnext - freq)/m_vecsize; + for(m_vecpos=0; m_vecpos < m_vecsize; m_vecpos++){ + if(m_enable) { + // table lookup oscillator + phase += f*m_ratio; + while(phase < 0) phase += m_size; + while(phase >= m_size) phase -= m_size; + ndx = Ftoi(phase); + frac = phase - ndx; + m_output[m_vecpos] += a*(tab[ndx] + (tab[ndx+1] - tab[ndx])*frac); + a += incra; + f += incrph; + } + else m_output[m_vecpos] = 0.f; + } + + // keep amp, freq, and phase values for next time + if(contin){ + m_amps[i3] = ampnext; + m_freqs[i3] = freqnext; + m_phases[i3] = phase; + m_trackID[i3] = ID; + i += 3; + } + else notcontin++; + } + return 1; + } + else{ + m_error = 1; + return 0; + } +} diff --git a/src/sndobj/AdSyn.h b/src/sndobj/AdSyn.h new file mode 100644 index 0000000..1d62d01 --- /dev/null +++ b/src/sndobj/AdSyn.h @@ -0,0 +1,40 @@ + +//////////////////////////////////////////////////////////////////////// +// This file is part of the SndObj library +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// Copyright (c)Victor Lazzarini, 1997-2004 +// See License.txt for a disclaimer of all warranties +// and licensing information + +#ifndef _ADSYN_H +#define _ADSYN_H + +#include "ReSyn.h" + +class AdSyn : public ReSyn { + + public: + + AdSyn(); + AdSyn(SinAnal* input, int maxtracks, Table* table, + double pitch = 1.f, double scale=1.f, + int vecsize=DEF_VECSIZE, double sr=DEF_SR); + ~AdSyn(); + short DoProcess(); +}; + +#endif diff --git a/src/sndobj/FFT.cpp b/src/sndobj/FFT.cpp new file mode 100644 index 0000000..cee737d --- /dev/null +++ b/src/sndobj/FFT.cpp @@ -0,0 +1,265 @@ + +//////////////////////////////////////////////////////////////////////// +// This file is part of the SndObj library +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// Copyright (c)Victor Lazzarini, 1997-2004 +// See License.txt for a disclaimer of all warranties +// and licensing information + +///////////////////////////////////////////////// +// FFT.cpp : implementation of the FFT class +// short-time fast fourier transform +// Victor Lazzarini, 2003 +///////////////////////////////////////////////// +#include "FFT.h" + +FFT::FFT(){ + + m_table = 0; + + // hopsize controls decimation + // we have vecsize/hopsize overlapping frames + // the vector size is also equal the fftsize + // so that each call to DoProcess produces a + // new fft frame at the output + // since SndObj has already allocated the output + // we have to reset the vector size + + m_fftsize = DEF_FFTSIZE; + SetVectorSize(DEF_FFTSIZE); + m_hopsize = DEF_VECSIZE; + + m_frames = m_fftsize/m_hopsize; + + m_sigframe = new double*[m_frames]; + m_ffttmp = new double[m_fftsize]; + m_counter = new int[m_frames]; + m_halfsize = m_fftsize/2; + m_fund = m_sr/m_fftsize; + memset(m_ffttmp, 0, m_fftsize*sizeof(double)); + int i; + for(i = 0; i < m_frames; i++){ + m_sigframe[i] = new double[m_fftsize]; + memset(m_sigframe[i], 0, m_fftsize*sizeof(double)); + m_counter[i] = i*m_hopsize; + } + + m_plan = rfftw_create_plan(m_fftsize, FFTW_REAL_TO_COMPLEX, FFTW_ESTIMATE); + + AddMsg("scale", 21); + AddMsg("fft size", 22); + AddMsg("hop size", 23); + AddMsg("window", 24); + m_scale = 1.f; + m_norm = m_fftsize; + m_cur =0; +} + + +FFT::FFT(Table* window, SndObj* input, double scale, + int fftsize, int hopsize, double sr): + SndObj(input, fftsize, sr){ + + m_table = window; + + m_hopsize = hopsize; + m_fftsize = fftsize; + m_frames = m_fftsize/m_hopsize; + + m_sigframe = new double*[m_frames]; + m_ffttmp = new double[m_fftsize]; + m_counter = new int[m_frames]; + m_halfsize = m_fftsize/2; + m_fund = m_sr/m_fftsize; + memset(m_ffttmp, 0, m_fftsize*sizeof(double)); + int i; + for(i = 0; i < m_frames; i++){ + m_sigframe[i] = new double[m_fftsize]; + memset(m_sigframe[i], 0, m_fftsize*sizeof(double)); + m_counter[i] = i*m_hopsize; + } + + m_plan = rfftw_create_plan(m_fftsize, FFTW_REAL_TO_COMPLEX, FFTW_ESTIMATE); + + AddMsg("scale", 21); + AddMsg("fft size", 22); + AddMsg("hop size", 23); + AddMsg("window", 24); + m_scale = scale; + m_norm = m_fftsize/m_scale; + m_cur =0; +} + + +FFT::~FFT(){ +#ifndef WIN + rfftw_destroy_plan(m_plan); +#endif + delete[] m_counter; + delete[] m_sigframe; + delete[] m_ffttmp; +} + +void +FFT::SetFFTSize(int fftsize){ + SetVectorSize(m_fftsize = fftsize); + ReInit(); +} + +void +FFT::SetHopSize(int hopsize){ + m_hopsize = hopsize; + ReInit(); +} + +void +FFT::ReInit(){ + + rfftw_destroy_plan(m_plan); + delete[] m_counter; + delete[] m_sigframe; + delete[] m_ffttmp; + delete[] m_output; + + if(!(m_output = new double[m_vecsize])){ + m_error = 1; +#ifdef DEBUG + cout << ErrorMessage(); +#endif + return; + } + + + m_frames = m_fftsize/m_hopsize; + m_sigframe = new double*[m_frames]; + m_ffttmp = new double[m_fftsize]; + m_counter = new int[m_frames]; + m_halfsize = m_fftsize/2; + m_fund = m_sr/m_fftsize; + int i; + for(i = 0; i < m_frames; i++){ + m_sigframe[i] = new double[m_fftsize]; + memset(m_sigframe[i], 0, m_fftsize*sizeof(double)); + m_counter[i] = i*m_hopsize; + } + + m_plan = rfftw_create_plan(m_vecsize, FFTW_REAL_TO_COMPLEX, FFTW_ESTIMATE); + m_cur =0; + m_norm = m_fftsize/m_scale; +} + + +int +FFT::Set(char* mess, double value){ + + switch(FindMsg(mess)){ + + case 21: + SetScale(value); + return 1; + + case 22: + SetFFTSize((int) value); + return 1; + + case 23: + SetHopSize((int) value); + return 1; + + default: + return SndObj::Set(mess, value); + + } +} + +int +FFT::Connect(char* mess, void *input){ + + switch(FindMsg(mess)){ + + case 24: + SetWindow((Table *) input); + return 1; + + default: + return SndObj::Connect(mess, input); + + } + +} + +short +FFT::DoProcess(){ + + if(!m_error){ + if(m_input && m_table){ + if(m_enable){ + int i; double sig = 0.f; + for(m_vecpos = 0; m_vecpos < m_hopsize; m_vecpos++) { + // signal input + sig = m_input->Output(m_vecpos); + // distribute to the signal fftframes and apply the window + // according to a time pointer (kept by counter[n]) + for(i=0;i < m_frames; i++){ + m_sigframe[i][m_counter[i]]= sig*m_table->Lookup(m_counter[i]); + m_counter[i]++; + } + } + // every hopsize samples + // set the current sigframe to be transformed + m_cur--; if(m_cur<0) m_cur = m_frames-1; + // transform it and fill the output buffer + fft(m_sigframe[m_cur]); + // zero the current sigframe time pointer + m_counter[m_cur] = 0; + return 1; + + } else { // if disabled + for(m_vecpos=0; m_vecpos < m_hopsize; m_vecpos++) + m_output[m_vecpos] = 0.f; + return 1; + } + } else { + m_error = 3; + return 0; + } + } + else + return 0; +} + +void +FFT::fft(double* signal){ + + // FFT function + rfftw_one(m_plan, signal, m_ffttmp); + + // re-arrange output into re, im format + // packing re[0] and re[nyquist] together, + // normalise it and fill the output buffer + + m_output[0] = m_ffttmp[0]/m_norm; + m_output[1] = m_ffttmp[m_halfsize]/m_norm; + for(int i=2, i2=1; i + +class FFT : public SndObj { + + protected: + + // m_vecsize is FFT size + // m_hopsize should always be set to the time-domain + // vector size + int m_fftsize; + int m_hopsize; // hopsize + int m_halfsize; // 1/2 fftsize + int *m_counter; // counter + rfftw_plan m_plan; // FFTW initialisation + double m_fund; + + double m_scale; // scaling factor + double m_norm; // norm factor + int m_frames; // frame overlaps + double** m_sigframe; // signal frames + double* m_ffttmp; // tmp vector for fft transform + int m_cur; // index into current frame + + Table* m_table; // window + + private: + // fft wrapper method + void inline fft(double* signal); + + // reset memory and initialisation + void ReInit(); + + public: + + FFT(); + FFT(Table* window, SndObj* input, double scale=1.f, + int fftsize=DEF_FFTSIZE, int hopsize=DEF_VECSIZE, + double m_sr=DEF_SR); + + ~FFT(); + + int GetFFTSize() { return m_fftsize; } + int GetHopSize() { return m_hopsize; } + void SetWindow(Table* window){ m_table = window;} + int Connect(char* mess, void* input); + int Set(char* mess, double value); + void SetScale(double scale){ m_scale = scale; m_norm = m_fftsize/m_scale;} + virtual void SetFFTSize(int fftsize); + virtual void SetHopSize(int hopsize); + + short DoProcess(); + +}; + +#endif + + + + + diff --git a/src/sndobj/HammingTable.cpp b/src/sndobj/HammingTable.cpp new file mode 100644 index 0000000..20c37b5 --- /dev/null +++ b/src/sndobj/HammingTable.cpp @@ -0,0 +1,99 @@ + +//////////////////////////////////////////////////////////////////////// +// This file is part of the SndObj library +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// Copyright (c)Victor Lazzarini, 1997-2004 +// See License.txt for a disclaimer of all warranties +// and licensing information + +//************************************************************// +// HammingTable.cpp: implementation of the HammingTable // +// object (Generalized Hamming Window function table) // +// // +// // +//************************************************************// +#include "HammingTable.h" +//////////construction / destruction /////////////////////// +HammingTable :: HammingTable(){ + + m_L = 1024; + m_alpha = .54f; + m_table = new double[m_L+1]; + MakeTable(); + +} + +HammingTable :: HammingTable(long L, double alpha){ + + m_L = L; + m_alpha = alpha; + m_table = new double [m_L+1]; + MakeTable(); + +} + + +HammingTable :: ~HammingTable(){ + + delete[] m_table; + +} + + +///////////// OPERATIONS //////////////////////////////////// +void +HammingTable :: SetParam(long L, double alpha){ + + m_alpha = alpha; + m_L = L; + delete[] m_table; + m_table = new double[m_L+1]; +} + +short +HammingTable :: MakeTable(){ + for(long n = 0; n < m_L; n++) + m_table[n]= (double)(m_alpha - (1-m_alpha)* + cos(n*TWOPI/(m_L-1.))); + m_table[m_L] = m_table[m_L-1]; + return 1; + + +} + +///////////////// ERROR HANDLING /////////////////////////////// + +char* +HammingTable::ErrorMessage(){ + + char* message; + + switch(m_error){ + + case 0: + message = "No error."; + break; + + + default: + message = "Undefined error"; + break; + } + + return message; + +} diff --git a/src/sndobj/HammingTable.h b/src/sndobj/HammingTable.h new file mode 100644 index 0000000..9a054ec --- /dev/null +++ b/src/sndobj/HammingTable.h @@ -0,0 +1,49 @@ + +//////////////////////////////////////////////////////////////////////// +// This file is part of the SndObj library +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// Copyright (c)Victor Lazzarini, 1997-2004 +// See License.txt for a disclaimer of all warranties +// and licensing information + +//************************************************************// +// HammingTable.h: interface of the HammingTable class // +// (Generalized hamming window function table) // +// // +// // +//************************************************************// +#ifndef _HAMMINGTABLE_H +#define _HAMMINGTABLE_H +#include "Table.h" + +class HammingTable : public Table { + protected : + + double m_alpha; + + public: + + void SetParam(long L, double alpha=.54); + char* ErrorMessage(); + short MakeTable(); + HammingTable(); + HammingTable(long L, double alpha); + ~HammingTable(); +}; + + +#endif diff --git a/src/sndobj/HarmTable.cpp b/src/sndobj/HarmTable.cpp new file mode 100644 index 0000000..28fcd09 --- /dev/null +++ b/src/sndobj/HarmTable.cpp @@ -0,0 +1,160 @@ + +//////////////////////////////////////////////////////////////////////// +// This file is part of the SndObj library +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// Copyright (c)Victor Lazzarini, 1997-2004 +// See License.txt for a disclaimer of all warranties +// and licensing information + +//************************************************************// +// HarmTable.cpp: implemenation of the HarmTable class // +// (harmonic function table). // +// // +// // +//************************************************************// + +#include "HarmTable.h" + +/////////////// CONSTRUCTION / DESTRUCTION ///////////////////// + +HarmTable :: HarmTable(){ + + m_L = 1024; + m_harm = 1; + m_typew = SINE; + m_phase = 0.f; + m_table = new double[m_L+1]; + MakeTable(); + +} + + +HarmTable :: HarmTable(long L, int harm, int type, double phase){ + + m_L = L; + m_harm = harm; + m_typew = type; + m_phase = (double)(phase*TWOPI); + + m_table = new double [m_L+1]; + MakeTable(); + +} + + +HarmTable :: ~HarmTable(){ + + delete[] m_table; + +} + + +///////////// OPERATIONS //////////////////////////////////// + +void +HarmTable::SetHarm(int harm, int type) +{ + m_harm = harm; + m_typew = type; + MakeTable(); +} + +short +HarmTable :: MakeTable(){ + + double max = 1.f; + int n = 1, harm = m_harm, i; + + switch (m_typew){ + case SINE: + for(i=0; i < m_L; i++) + m_table[i] = (double)(sin(i*TWOPI/m_L + m_phase)); + break; + + case SAW: + ZeroTable(); + for(i=0; i < m_L; i++){ + for(n = 1 ; n <= harm ; n++) + m_table[i] += (double)((1/(double)n)*sin(n*i*TWOPI/m_L + m_phase)); + max = (fabs((double)max) < fabs((double)m_table[i])) ? m_table[i] : max; + } + break; + + case SQUARE: + ZeroTable(); + for(i=0; i < m_L; i++){ + for(n = 1 ; n <= harm ; n+=2) + m_table[i] += (double)((1/(double)n)*sin(n*TWOPI*i/m_L + m_phase)); + max = (fabs((double)max) < fabs((double)m_table[i])) ? m_table[i] : max; + } + break; + + case BUZZ: + ZeroTable(); + for(i=0; i < m_L; i++){ + for(n = 1 ; n <= harm ; n++) + m_table[i] += (double) sin(n*TWOPI*i/m_L + m_phase); + max = (fabs((double)max) < fabs((double)m_table[i])) ? m_table[i] : max; + } + break; + + default: + ZeroTable(); + m_error = 1; + return 0; + break; + } + + //normalize: + if(m_typew!=SINE) + for(n = 0; n < m_L; n++) + m_table[n] = m_table[n]/max; + m_table[m_L] = m_table[0]; // guard point + return 1; +} + +///////////////// ERROR HANDLING /////////////////////////////// + +char* +HarmTable::ErrorMessage(){ + + char* message; + + switch(m_error){ + + case 0: + message = "No error."; + break; + + case 1: + message = "MakeTable() failed. Unsupported wave type."; + break; + + default: + message = "Undefined error"; + break; + } + + return message; + +} + + + + + + diff --git a/src/sndobj/HarmTable.h b/src/sndobj/HarmTable.h new file mode 100644 index 0000000..98671df --- /dev/null +++ b/src/sndobj/HarmTable.h @@ -0,0 +1,64 @@ + +//////////////////////////////////////////////////////////////////////// +// This file is part of the SndObj library +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// Copyright (c)Victor Lazzarini, 1997-2004 +// See License.txt for a disclaimer of all warranties +// and licensing information + +//************************************************************// +// HarmTable.h: interface of the HarmTable class (harmonic // +// function table). // +// // +// // +//************************************************************// +#ifndef _HARMTABLE_H +#define _HARMTABLE_H + +#include "Table.h" + +enum { SINE=1, SAW, SQUARE, BUZZ }; + +class HarmTable : public Table { + protected : + + int m_harm; + double m_phase; + int m_typew; + + public: + + void SetHarm(int harm, int type); + + char* ErrorMessage(); + short MakeTable(); + HarmTable(); + void SetPhase(double phase){ m_phase = (double)(phase*TWOPI); } + HarmTable(long L, int harm, int type, double phase=0.f); + ~HarmTable(); +}; + + +#endif + + + + + + + + diff --git a/src/sndobj/IFAdd.cpp b/src/sndobj/IFAdd.cpp new file mode 100644 index 0000000..c962e31 --- /dev/null +++ b/src/sndobj/IFAdd.cpp @@ -0,0 +1,116 @@ + +//////////////////////////////////////////////////////////////////////// +// This file is part of the SndObj library +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// Copyright (c)Victor Lazzarini, 1997-2004 +// See License.txt for a disclaimer of all warranties +// and licensing information + +#include "IFAdd.h" + +IFAdd::IFAdd(){ +} + +IFAdd::IFAdd(IFGram* input, int bins, Table* table, + double pitch, double scale, double tscal, int vecsize, double sr) + : ReSyn((SinAnal *)input, bins, table, pitch, scale, tscal, vecsize, sr){ +} + +IFAdd::~IFAdd(){ +} + +short +IFAdd::DoProcess() { + + if(m_input){ + + double ampnext,amp,freq, freqnext, phase; + double inc1, inc2, a, ph, cnt, frac; + double a2, a3, phasediff, phasenext, cph, shf; + bool lock; + int i2, i, bins = m_maxtracks, ndx; + double* tab = m_ptable->GetTable(); + memset(m_output, 0, sizeof(double)*m_vecsize); + + shf = m_tscal*m_pitch; + if(shf - Ftoi(shf)) lock = false; + else lock = true; + + // for each bin from 1 + for(i=1; i < bins; i++){ + + i2 = i<<1; + + ampnext = m_input->Output(i2)*m_scale; + freqnext = m_input->Output(i2+1)*TWOPI*m_pitch; + phasenext = ((IFGram *)m_input)->Outphases(i)*shf; + freq = m_freqs[i]; + phase = m_phases[i]; + amp = m_amps[i]; + + //phase difference + phasediff = phasenext - phase; + while(phasediff >= PI) phasediff -= TWOPI; + while(phasediff < -PI) phasediff += TWOPI; + // update phasediff to match the freq + cph = ((freq+freqnext)*m_factor/2. - phasediff)/TWOPI; + phasediff += TWOPI* (lock ? Ftoi(cph + 0.5) : cph); + + // interpolation coefs + a2 = 3./m_facsqr * (phasediff - m_factor/3.*(2*freq+freqnext)); + a3 = 1./(3*m_facsqr) * (freqnext - freq - 2*a2*m_factor); + + // interpolation resynthesis loop + a = amp; + ph = phase; + cnt = 0; + inc1 = (ampnext - amp)/m_vecsize; + inc2 = 1/m_sr; + for(m_vecpos=0; m_vecpos < m_vecsize; m_vecpos++){ + + if(m_enable) { + // table lookup oscillator + ph *= m_LoTWOPI; + while(ph < 0) ph += m_size; + while(ph >= m_size) ph -= m_size; + ndx = Ftoi(ph); + frac = ph - ndx; + m_output[m_vecpos] += a*(tab[ndx] + (tab[ndx+1] - tab[ndx])*frac); + a += inc1; + cnt += inc2; + ph = phase + cnt*(freq + cnt*(a2 + a3*cnt)); + + } + else m_output[m_vecpos] = 0.f; + } + + // keep amp, freq, and update phase for next time + m_amps[i] = ampnext; + m_freqs[i] = freqnext; + phasenext += (lock ? 0 : (cph - Ftoi(cph))*TWOPI); + while(phasenext < 0) phasenext += TWOPI; + while(phasenext >= TWOPI) phasenext -= TWOPI; + m_phases[i] = phasenext; + } + return 1; + } + else { + m_error = 1; + return 0; + } + +} diff --git a/src/sndobj/IFAdd.h b/src/sndobj/IFAdd.h new file mode 100644 index 0000000..57a0ec6 --- /dev/null +++ b/src/sndobj/IFAdd.h @@ -0,0 +1,46 @@ + +//////////////////////////////////////////////////////////////////////// +// This file is part of the SndObj library +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// Copyright (c)Victor Lazzarini, 1997-2004 +// See License.txt for a disclaimer of all warranties +// and licensing information + +#ifndef _IFADD_H +#define _IFADD_H + +#include "ReSyn.h" +#include "IFGram.h" + +class IFAdd : public ReSyn { + + protected: + + + + public: + + IFAdd(); + IFAdd(IFGram* input, int bins, Table* table, double pitch=1.f, double scale=1.f, + double tscal=1.f, int vecsize=DEF_VECSIZE, double sr=DEF_SR); + ~IFAdd(); + short DoProcess(); + + +}; + +#endif diff --git a/src/sndobj/IFFT.cpp b/src/sndobj/IFFT.cpp new file mode 100644 index 0000000..01f693b --- /dev/null +++ b/src/sndobj/IFFT.cpp @@ -0,0 +1,262 @@ + +//////////////////////////////////////////////////////////////////////// +// This file is part of the SndObj library +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// Copyright (c)Victor Lazzarini, 1997-2004 +// See License.txt for a disclaimer of all warranties +// and licensing information + +///////////////////////////////////////////////// +// IFFT.cpp: implementation of the IFFT class +// short-time inverse fast fourier transform +// Victor Lazzarini, 2003 +///////////////////////////////////////////////// +#include "IFFT.h" + + +IFFT::IFFT(){ + + m_table = 0; + + // vectorsize equals hopsize + // so that each call of DoProcess adds a + // new window to the overlap-add process + + m_hopsize = DEF_VECSIZE; + m_fftsize = DEF_FFTSIZE; + m_frames = m_fftsize/m_hopsize; + + m_sigframe = new double*[m_frames]; + m_ffttmp = new double[m_fftsize]; + m_counter = new int[m_frames]; + m_halfsize = m_fftsize/2; + m_fund = m_sr/m_fftsize; + int i; + memset(m_ffttmp, 0, m_fftsize*sizeof(double)); + for(i = 0; i < m_frames; i++){ + m_sigframe[i] = new double[m_fftsize]; + memset(m_sigframe[i], 0, m_fftsize*sizeof(double)); + m_counter[i] = i*m_hopsize; + } + + m_plan = rfftw_create_plan(m_fftsize, FFTW_COMPLEX_TO_REAL, FFTW_ESTIMATE); + + AddMsg("fft size", 21); + AddMsg("hop size", 22); + AddMsg("window", 23); + + m_cur = 0; +} + +IFFT::IFFT(Table* window, SndObj* input, int fftsize, int hopsize, + double sr): + SndObj(input,hopsize, sr) +{ + + m_table = window; + + m_hopsize = hopsize; + m_fftsize = fftsize; + + if(m_fftsize){ + m_frames = m_fftsize/m_hopsize; + + m_sigframe = new double*[m_frames]; + m_ffttmp = new double[m_fftsize]; + m_counter = new int[m_frames]; + m_halfsize = m_fftsize/2; + m_fund = m_sr/m_fftsize; + memset(m_ffttmp, 0, m_fftsize*sizeof(double)); + int i; + for(i = 0; i < m_frames; i++){ + m_sigframe[i] = new double[m_fftsize]; + memset(m_sigframe[i], 0, m_fftsize*sizeof(double)); + m_counter[i] = i*m_hopsize; + } + + m_plan = rfftw_create_plan(m_fftsize, FFTW_COMPLEX_TO_REAL, FFTW_ESTIMATE); + } + + AddMsg("fft size", 21); + AddMsg("hop size", 22); + AddMsg("window", 23); + + m_cur = 0; +} + +IFFT::~IFFT(){ + + if(m_fftsize){ +#ifndef WIN + rfftw_destroy_plan(m_plan); +#endif + delete[] m_counter; + delete[] m_ffttmp; + delete[] m_sigframe; + } +} + +void +IFFT::SetFFTSize(int fftsize){ + m_fftsize = fftsize; + ReInit(); +} + +void +IFFT::SetHopSize(int hopsize){ + SetVectorSize(m_hopsize = hopsize); + ReInit(); +} + +void +IFFT::ReInit(){ + + rfftw_destroy_plan(m_plan); + delete[] m_counter; + delete[] m_sigframe; + delete[] m_ffttmp; + delete[] m_output; + + if(!(m_output = new double[m_vecsize])){ + m_error = 1; +#ifdef DEBUG + cout << ErrorMessage(); +#endif + return; + } + + + m_frames = m_fftsize/m_hopsize; + m_sigframe = new double*[m_frames]; + m_ffttmp = new double[m_fftsize]; + m_counter = new int[m_frames]; + m_halfsize = m_fftsize/2; + m_fund = m_sr/m_fftsize; + int i; + for(i = 0; i < m_frames; i++){ + m_sigframe[i] = new double[m_fftsize]; + memset(m_sigframe[i], 0, m_fftsize*sizeof(double)); + m_counter[i] = i*m_hopsize; + } + + m_plan = rfftw_create_plan(m_vecsize, FFTW_REAL_TO_COMPLEX, FFTW_ESTIMATE); + m_cur =0; + +} + + +int +IFFT::Set(char* mess, double value){ + + switch(FindMsg(mess)){ + + case 21: + SetFFTSize((int) value); + return 1; + + case 22: + SetHopSize((int) value); + return 1; + + default: + return SndObj::Set(mess, value); + + } +} + +int +IFFT::Connect(char* mess, void *input){ + + switch(FindMsg(mess)){ + + case 23: + SetWindow((Table *) input); + return 1; + + default: + return SndObj::Connect(mess, input); + + } + +} + +short +IFFT::DoProcess(){ + + + if(!m_error){ + if(m_input && m_table){ + if(m_enable){ + int i; double out = 0.; + // Put the input fftframe into + // the current (free) signal frame + // and transform it + ifft(m_sigframe[m_cur]); + // set the current signal frame to the next + // one in the circular list + m_counter[m_cur] = 0; + m_cur--; if(m_cur<0) m_cur = m_frames-1; + + for(m_vecpos = 0; m_vecpos < m_vecsize; m_vecpos++){ + // overlap-add the time-domain signal frames + for(i=0; i < m_frames; i++){ + out += m_sigframe[i][m_counter[i]]*m_table->Lookup(m_counter[i]); + m_counter[i]++; + } + // output it. + m_output[m_vecpos] = (double) out; + out = 0.; + } + + return 1; + } else { // if disabled + for(m_vecpos = 0; m_vecpos < m_vecsize; m_vecpos++) + m_output[m_vecpos] = 0.f; + return 1; + } + } else { + m_error = 3; + return 0; + } + } + else + return 0; +} + + + + +void +IFFT::ifft(double* signal) { + + // get input FFT frame and + // prepare data for fftw + + m_ffttmp[0] = m_input->Output(0); + m_ffttmp[m_halfsize] = m_input->Output(1); + for(int i=2, i2=1; iOutput(i); + m_ffttmp[m_fftsize-(i2)] = m_input->Output(i+1); + } + + // Inverse FFT function + rfftw_one(m_plan, m_ffttmp, signal); + +} + + diff --git a/src/sndobj/IFFT.h b/src/sndobj/IFFT.h new file mode 100644 index 0000000..e748a68 --- /dev/null +++ b/src/sndobj/IFFT.h @@ -0,0 +1,88 @@ + +//////////////////////////////////////////////////////////////////////// +// This file is part of the SndObj library +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// Copyright (c)Victor Lazzarini, 1997-2004 +// See License.txt for a disclaimer of all warranties +// and licensing information + +////////////////////////////////////////////////////// +// IFFT.h: interface of the IFFT class: +// short-time inverse fast fourier transform +// using the FFTW library (v. 2.1.3) +// Victor Lazzarini, 2003 +///////////////////////////////////////////////////////// + +#ifndef _IFFT_H +#define _IFFT_H +#include +#include "Table.h" +#include "SndObj.h" + +class IFFT : public SndObj { + + protected: + + // m_vecsize is hopsize + // and fftsize is always a whole-number + // multiple of it. + + int m_fftsize; + int m_hopsize; // hopsize + int m_halfsize; // 1/2 fftsize + int *m_counter; // counter + rfftw_plan m_plan; // FFTW initialisation + double m_fund; + + int m_frames; // frame overlaps + double** m_sigframe; // signal frames + double* m_ffttmp; // tmp vector for fft transform + int m_cur; // index into current frame + + Table* m_table; // window + + // reset memory and initialisation + void ReInit(); + + private: + // ifft wrapper method + void inline ifft(double* signal); + + + + public: + + IFFT(); + IFFT(Table* window, SndObj* input, int fftsize = DEF_FFTSIZE, + int hopsize=DEF_VECSIZE, double sr=DEF_SR); + ~IFFT(); + + + int GetFFTSize() { return m_fftsize; } + int GetHopSize() { return m_hopsize; } + void SetWindow(Table* window){ m_table = window;} + int Connect(char* mess, void* input); + int Set(char* mess, double value); + virtual void SetFFTSize(int fftsize); + virtual void SetHopSize(int hopsize); + + short DoProcess(); + + +}; + +#endif diff --git a/src/sndobj/IFGram.cpp b/src/sndobj/IFGram.cpp new file mode 100644 index 0000000..fcd73b1 --- /dev/null +++ b/src/sndobj/IFGram.cpp @@ -0,0 +1,212 @@ + +//////////////////////////////////////////////////////////////////////// +// This file is part of the SndObj library +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// Copyright (c)Victor Lazzarini, 1997-2004 +// See License.txt for a disclaimer of all warranties +// and licensing information + +///////////////////////////////////////////////// +// IFGram.cpp: Instant Freq Analysis class +// +// Victor Lazzarini, 2003 +///////////////////////////////////////////////// + +#include "IFGram.h" + +IFGram::IFGram(){ + m_diffwin = new double[m_fftsize]; + m_fftdiff = new double[m_fftsize]; + m_diffsig = new double[m_fftsize]; + m_factor = m_sr/TWOPI; + m_pdiff = new double[m_halfsize]; +} + + +IFGram::IFGram(Table* window, SndObj* input, double scale, + int fftsize, int hopsize, double sr) + :PVA(window, input, scale, fftsize, hopsize, sr) +{ + m_diffwin = new double[m_fftsize]; + m_fftdiff = new double[m_fftsize]; + m_diffsig = new double[m_fftsize]; + m_pdiff = new double[m_halfsize]; + for(int i=0; iLookup(i) - m_table->Lookup(i+1); + m_factor = m_sr/TWOPI; + +} + + +IFGram::~IFGram(){ + delete[] m_diffwin; + delete[] m_fftdiff; + delete[] m_diffsig; +} + + +int +IFGram::Set(char* mess, double value){ + + switch(FindMsg(mess)){ + + case 22: + SetFFTSize((int) value); + return 1; + + default: + return PVA::Set(mess, value); + + } +} + +int +IFGram::Connect(char* mess, void* input){ + + int i; + + switch(FindMsg(mess)){ + + case 24: + SetWindow((Table *) input); + for(i=0; iLookup(i) - m_table->Lookup(i+1); + return 1; + + default: + return PVA::Connect(mess,input); + + } +} + +void +IFGram::SetFFTSize(int fftsize){ + + FFT::SetFFTSize(fftsize); + + delete[] m_diffwin; + delete[] m_fftdiff; + delete[] m_phases; + + m_factor = m_sr*TWOPI/m_fftsize; + m_diffwin = new double[m_fftsize]; + m_fftdiff = new double[m_fftsize]; + m_phases = new double[m_halfsize]; + + for(int i=0; iLookup(i) - m_table->Lookup(i+1); + +} + +void +IFGram::IFAnalysis(double* signal){ + + double powerspec, da,db, a, b, ph,d; + int i2, i; + + for(i=0; iLookup(i); + } + + double tmp1, tmp2; + for(i=0; i PI) d -= TWOPI; + while(d < -PI) d += TWOPI; + m_phases[i2] += d; + } + else { + m_output[i+1] = i2*m_fund; + m_phases[i2] = 0.f ; + } + } + +} + +short +IFGram::DoProcess(){ + + if(!m_error){ + if(m_input){ + if(m_enable){ + int i; double sig = 0.f; + for(m_vecpos = 0; m_vecpos < m_hopsize; m_vecpos++) { + // signal input + sig = m_input->Output(m_vecpos); + // distribute to the signal input frames + // according to a time pointer (kept by counter[n]) + for(i=0;i < m_frames; i++){ + m_sigframe[i][m_counter[i]]= (double) sig; + m_counter[i]++; + } + } + // every vecsize samples + // set the current fftframe to be transformed + m_cur--; if(m_cur<0) m_cur = m_frames-1; + + // instant frequency analysis + IFAnalysis(m_sigframe[m_cur]); + // zero the current fftframe time pointer + + m_counter[m_cur] = 0; + return 1; + + } else { // if disabled, reset the fftframes + for(m_vecpos =0; m_vecpos < m_hopsize; m_vecpos++) + m_output[m_vecpos] = 0.f; + return 1; + } + + } else { + m_error = 3; + return 0; + } + } + else + return 0; +} diff --git a/src/sndobj/IFGram.h b/src/sndobj/IFGram.h new file mode 100644 index 0000000..c404190 --- /dev/null +++ b/src/sndobj/IFGram.h @@ -0,0 +1,68 @@ + +//////////////////////////////////////////////////////////////////////// +// This file is part of the SndObj library +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// Copyright (c)Victor Lazzarini, 1997-2004 +// See License.txt for a disclaimer of all warranties +// and licensing information + +////////////////////////////////////////////////////// +// IFGram.h: Instant Freq Analysis +// +// Victor Lazzarini, 2003 +// +///////////////////////////////////////////////////////// + +#ifndef _IFGram_H +#define _IFGram_H +#include "PVA.h" + +class IFGram : public PVA { + + protected: + + + double* m_diffwin; // difference window + double* m_fftdiff; // holds fft of diff window + double* m_diffsig; + double* m_pdiff; + + private: + + void inline IFAnalysis(double* signal); + + public: + + IFGram(); + IFGram(Table* window, SndObj* input, double scale=1.f, + int fftsize=DEF_FFTSIZE, int hopsize=DEF_VECSIZE, double sr=DEF_SR); + + ~IFGram(); + + int Set(char* mess, double value); + int Connect(char* mess, void* input); + void SetFFTSize(int fftsize); + short DoProcess(); + +}; + +#endif + + + + + diff --git a/src/sndobj/PVA.cpp b/src/sndobj/PVA.cpp new file mode 100644 index 0000000..59dc9c2 --- /dev/null +++ b/src/sndobj/PVA.cpp @@ -0,0 +1,165 @@ + +//////////////////////////////////////////////////////////////////////// +// This file is part of the SndObj library +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// Copyright (c)Victor Lazzarini, 1997-2004 +// See License.txt for a disclaimer of all warranties +// and licensing information + +///////////////////////////////////////////////// +// PVA.cpp: Phase Vocoder Analysis class +// +// Victor Lazzarini, 2003 +///////////////////////////////////////////////// +#include "PVA.h" + +PVA::PVA(){ + m_rotcount = 0; + m_phases = new double[m_halfsize]; + memset(m_phases, 0, sizeof(double)*m_halfsize); + m_factor = m_sr/(m_hopsize*TWOPI); +} + + +PVA::PVA(Table* window, SndObj* input, double scale, + int fftsize, int hopsize, double sr) + :FFT(window, input, scale, fftsize, hopsize, sr) +{ + m_rotcount = 0; + m_phases = new double[m_halfsize]; + memset(m_phases, 0, sizeof(double)*m_halfsize); + m_factor = m_sr/(m_hopsize*TWOPI); +} + + +PVA::~PVA(){ + delete[] m_phases; + +} + + +int +PVA::Set(char* mess, double value){ + + switch(FindMsg(mess)){ + + case 22: + SetFFTSize((int) value); + return 1; + + case 23: + SetHopSize((int) value); + return 1; + + default: + return FFT::Set(mess, value); + + } +} +void +PVA::SetFFTSize(int fftsize){ + m_rotcount = 0; + FFT::SetFFTSize(fftsize); +} + +void +PVA::SetHopSize(int hopsize){ + m_rotcount = 0; + m_factor = m_sr/(hopsize*TWOPI); + FFT::SetFFTSize(hopsize); +} + +void +PVA::pvanalysis(double* signal){ + + double re, im, pha, diff; + int i2; + + rfftw_one(m_plan, signal, m_ffttmp); + + m_output[0] = m_ffttmp[0]/m_norm; + m_output[1] = m_ffttmp[m_halfsize]/m_norm; + + for(int i=2; i PI) diff -= TWOPI; + while(diff < -PI) diff += TWOPI; + } + m_output[i+1] = (double) diff*m_factor + i2*m_fund; + + } + +} + + +short +PVA::DoProcess(){ + + if(!m_error){ + if(m_input){ + if(m_enable){ + int i; double sig = 0.f; + for(m_vecpos = 0; m_vecpos < m_hopsize; m_vecpos++) { + // signal input + sig = m_input->Output(m_vecpos); + // distribute to the signal fftframes and apply the window + // according to a time pointer (kept by counter[n]) + // input is also rotated according to the input time. + for(i=0;i < m_frames; i++){ + m_sigframe[i][m_rotcount]= (double) sig*m_table->Lookup(m_counter[i]); + m_counter[i]++; + } + m_rotcount++; + } + m_rotcount %= m_fftsize; + // every vecsize samples + // set the current fftframe to be transformed + m_cur--; if(m_cur<0) m_cur = m_frames-1; + + // phase vocoder analysis + pvanalysis(m_sigframe[m_cur]); + + // zero the current fftframe time pointer + m_counter[m_cur] = 0; + return 1; + + } else { // if disabled, reset the fftframes + for(m_vecpos =0; m_vecpos < m_hopsize; m_vecpos++) + m_output[m_vecpos] = 0.f; + return 1; + } + + } else { + m_error = 3; + return 0; + } + } + else + return 0; +} + diff --git a/src/sndobj/PVA.h b/src/sndobj/PVA.h new file mode 100644 index 0000000..0826f99 --- /dev/null +++ b/src/sndobj/PVA.h @@ -0,0 +1,66 @@ + +//////////////////////////////////////////////////////////////////////// +// This file is part of the SndObj library +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// Copyright (c)Victor Lazzarini, 1997-2004 +// See License.txt for a disclaimer of all warranties +// and licensing information + +////////////////////////////////////////////////////// +// PVA.h: Phase Vocoder Analysis Class +// +// Victor Lazzarini, 2003 +// +///////////////////////////////////////////////////////// + +#ifndef _PVA_H +#define _PVA_H +#include "FFT.h" + +class PVA : public FFT { + + protected: + + int m_rotcount; // rotation counter + double m_factor; // conversion factor + double* m_phases; + + private: + + void inline pvanalysis(double* signal); + + public: + + PVA(); + PVA(Table* window, SndObj* input, double scale=1.f, + int fftsize=DEF_FFTSIZE, int hopsize=DEF_VECSIZE, double sr=DEF_SR); + + ~PVA(); + double Outphases(int pos){ return m_phases[pos]; } // reads phase output. + int Set(char* mess, double value); + void SetFFTSize(int fftsize); + void SetHopSize(int hopsize); + short DoProcess(); + +}; + +#endif + + + + + diff --git a/src/sndobj/PVS.cpp b/src/sndobj/PVS.cpp new file mode 100644 index 0000000..d38f4e5 --- /dev/null +++ b/src/sndobj/PVS.cpp @@ -0,0 +1,168 @@ + +//////////////////////////////////////////////////////////////////////// +// This file is part of the SndObj library +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// Copyright (c)Victor Lazzarini, 1997-2004 +// See License.txt for a disclaimer of all warranties +// and licensing information + +///////////////////////////////////////////////// +// PVS.cpp : Phase Vocoder Synthesis Class +// +// Victor Lazzarini, 2003 +// +///////////////////////////////////////////////// +#include "PVS.h" + + +PVS::PVS(){ + m_rotcount = m_vecsize; + m_phases = new double[m_halfsize]; + memset(m_phases, 0, sizeof(double)*m_halfsize); + m_factor = (m_hopsize*TWOPI)/m_sr; + m_first = true; +} + +PVS::PVS(Table* window, SndObj* input, int fftsize, + int hopsize, double sr) + :IFFT(window, input,fftsize,hopsize,sr) +{ + m_rotcount = m_vecsize; + if(m_halfsize){ + m_phases = new double[m_halfsize]; + memset(m_phases, 0, sizeof(double)*m_halfsize); + } + m_factor = (m_hopsize*TWOPI)/m_sr; + m_first = true; +} + +PVS::~PVS(){ + if(m_halfsize) + delete[] m_phases; +} + + +int +PVS::Set(char* mess, double value){ + + switch(FindMsg(mess)){ + + case 22: + SetFFTSize((int) value); + return 1; + + case 23: + SetHopSize((int) value); + return 1; + + default: + return IFFT::Set(mess, value); + + } +} + +void +PVS::SetFFTSize(int fftsize){ + m_rotcount = m_vecsize; + IFFT::SetFFTSize(fftsize); +} + +void +PVS::SetHopSize(int hopsize){ + m_rotcount = m_vecsize; + m_factor = (m_hopsize*TWOPI)/m_sr; + IFFT::SetFFTSize(hopsize); +} + +void +PVS::pvsynthesis(double* signal){ + double pha; + int i2; + + m_ffttmp[0] = m_input->Output(0); + m_ffttmp[m_halfsize] = m_input->Output(1); + + for(int i=0;iOutput(i+1) - m_fund*i2; + pha = m_phases[i2]*m_factor; + m_ffttmp[i2] = m_input->Output(i)*cos(pha); + m_ffttmp[m_fftsize-(i2)] = m_input->Output(i)*sin(pha); + } + + rfftw_one(m_plan, m_ffttmp, signal); +} + + +short +PVS::DoProcess(){ + if(!m_error){ + if(m_input){ + if(m_enable){ + int i; double out = 0.; + // phase vocoder synthesis + + if(m_first) { + for(m_vecpos = 0; m_vecpos < m_vecsize; m_vecpos++) + m_output[m_vecpos] = 0.f; + } else { + pvsynthesis(m_sigframe[m_cur]); + } + + // set the current signal frame to the next + // one in the circular list + m_counter[m_cur] = 0; + m_cur++; if(m_cur==m_frames) m_cur = 0; + + + for(m_vecpos = 0; m_vecpos < m_vecsize; m_vecpos++){ + // overlap-add the time-domain signal frames + // also make sure the frames are unrotated + for(i=0; i < m_frames; i++){ + out += m_sigframe[i][m_rotcount]*m_table->Lookup(m_counter[i]); + m_counter[i]++; + } + m_rotcount++; + // output it. + m_output[m_vecpos] = (double) out; + out = 0.; + } + m_rotcount %= m_fftsize; + m_first = false; + return 1; + } else { // if disabled + for(m_vecpos = 0; m_vecpos < m_vecsize; m_vecpos++) + m_output[m_vecpos] = 0.f; + m_first = true; + return 1; + } + } else { + m_error = 3; + return 0; + } + } + else + return 0; +} + + + + + + + + diff --git a/src/sndobj/PVS.h b/src/sndobj/PVS.h new file mode 100644 index 0000000..6108055 --- /dev/null +++ b/src/sndobj/PVS.h @@ -0,0 +1,67 @@ + +//////////////////////////////////////////////////////////////////////// +// This file is part of the SndObj library +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// Copyright (c)Victor Lazzarini, 1997-2004 +// See License.txt for a disclaimer of all warranties +// and licensing information + +////////////////////////////////////////////////////// +// PVS.h: Phase Vocoder Synthesis Class +// +// Victor Lazzarini, 2003 +// +///////////////////////////////////////////////////////// + +#ifndef _PVS_H +#define _PVS_H + +#include "IFFT.h" + +class PVS : public IFFT { + + protected: + + int m_rotcount; // rotation counter + double m_factor; // conversion factor + double* m_phases; // old phases + + private: + void inline pvsynthesis(double* signal); + bool m_first; + + public: + + PVS(); + PVS(Table* window, SndObj* input, int fftsize=DEF_FFTSIZE, + int hopsize=DEF_VECSIZE, double sr=DEF_SR); + ~PVS(); + + + int Set(char* mess, double value); + void SetFFTSize(int fftsize); + void SetHopSize(int hopsize); + + short DoProcess(); + + +}; + + + + +#endif diff --git a/src/sndobj/ReSyn.cpp b/src/sndobj/ReSyn.cpp new file mode 100644 index 0000000..9d72b12 --- /dev/null +++ b/src/sndobj/ReSyn.cpp @@ -0,0 +1,179 @@ + +//////////////////////////////////////////////////////////////////////// +// This file is part of the SndObj library +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// + +// Copyright (c)Victor Lazzarini, 1997-2004 +// See License.txt for a disclaimer of all warranties +// and licensing information + +#include "ReSyn.h" +#include "IFGram.h" + +ReSyn::ReSyn(){ + AddMsg("pitch", 31); + AddMsg("timescale", 32); + +} + +ReSyn::ReSyn(SinAnal* input, int maxtracks, Table* table, double pitch, double scale, double tscal, + int vecsize, double sr) + : SinSyn(input, maxtracks, table, scale, vecsize, sr){ + m_pitch = pitch; + AddMsg("pitch", 31); + AddMsg("timescale", 32); +} + +ReSyn::~ReSyn(){ +} + +int +ReSyn::Set(char* mess, double value){ + + switch(FindMsg(mess)){ + + case 31: + SetPitch(value); + return 1; + + case 32: + SetTimeScale(value); + return 1; + + + default: + return SinSyn::Set(mess, value); + + } +} + + +short +ReSyn::DoProcess() { + + if(m_input){ + + double ampnext,amp,freq, freqnext, phase,phasenext; + double a2, a3, phasediff, cph; + int i3, i, j, ID; + int notcontin = 0; + bool contin = false; + int oldtracks = m_tracks; + double* tab = m_ptable->GetTable(); + if((m_tracks = ((SinAnal *)m_input)->GetTracks()) > + m_maxtracks) m_tracks = m_maxtracks; + + memset(m_output, 0, sizeof(double)*m_vecsize); + + // for each track + i = j = 0; + while(i < m_tracks*3){ + + i3 = i/3; + ampnext = m_input->Output(i)*m_scale; + freqnext = m_input->Output(i+1)*TWOPI*m_pitch; + phasenext = m_input->Output(i+2)*m_tscal*m_pitch; + ID = ((SinAnal *)m_input)->GetTrackID(i3); + + j = i3+notcontin; + + if(i3 < oldtracks-notcontin){ + if(m_trackID[j]==ID){ + // if this is a continuing track + contin = true; + freq = m_freqs[j]; + phase = m_phases[j]; + amp = m_amps[j]; + + } + else { + // if this is a dead track + contin = false; + freqnext = freq = m_freqs[j]; + phase = m_phases[j]; + phasenext = phase + freq*m_factor; + amp = m_amps[j]; + ampnext = 0.f; + } + } + + else{ + // new tracks + contin = true; + freq = freqnext; + phase = phasenext - freq*m_factor; + amp = 0.f; + } + + //phase difference + phasediff = phasenext - phase; + while(phasediff >= PI) phasediff -= TWOPI; + while(phasediff < -PI) phasediff += TWOPI; + // update phasediff to match the freq + cph = ((freq+freqnext)*m_factor/2. - phasediff)/TWOPI; + phasediff += TWOPI*cph; + + // interpolation coefs + a2 = 3./m_facsqr * (phasediff - m_factor/3.*(2*freq+freqnext)); + a3 = 1./(3*m_facsqr) * (freqnext - freq - 2*a2*m_factor); + + // interpolation resynthesis loop + double inc1, inc2, a, ph, cnt, frac; + int ndx; + a = amp; + ph = phase; + cnt = 0; + inc1 = (ampnext - amp)/m_vecsize; + inc2 = 1/m_sr; + for(m_vecpos=0; m_vecpos < m_vecsize; m_vecpos++){ + + if(m_enable) { + // table lookup oscillator + ph *= m_LoTWOPI; + while(ph < 0) ph += m_size; + while(ph >= m_size) ph -= m_size; + ndx = Ftoi(ph); + frac = ph - ndx; + m_output[m_vecpos] += a*(tab[ndx] + (tab[ndx+1] - tab[ndx])*frac); + a += inc1; + cnt += inc2; + ph = phase + cnt*(freq + cnt*(a2 + a3*cnt)); + + } + else m_output[m_vecpos] = 0.f; + } + + // keep amp, freq, and phase values for next time + if(contin){ + m_amps[i3] = ampnext; + m_freqs[i3] = freqnext; + phasenext += (cph - Ftoi(cph))*TWOPI; + while(phasenext < 0) phasenext += TWOPI; + while(phasenext >= TWOPI) phasenext -= TWOPI; + m_phases[i3] = phasenext; + m_trackID[i3] = ID; + i += 3; + } else notcontin++; + } + return 1; + } + else { + m_error = 1; + return 0; + } + +} diff --git a/src/sndobj/ReSyn.h b/src/sndobj/ReSyn.h new file mode 100644 index 0000000..d7525f8 --- /dev/null +++ b/src/sndobj/ReSyn.h @@ -0,0 +1,50 @@ + +//////////////////////////////////////////////////////////////////////// +// This file is part of the SndObj library +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// Copyright (c)Victor Lazzarini, 1997-2004 +// See License.txt for a disclaimer of all warranties +// and licensing information + +#ifndef _RESYN_H +#define _RESYN_H + +#include "SinSyn.h" + +class ReSyn : public SinSyn { + + protected: + + double m_pitch; + double m_tscal; + + public: + + ReSyn(); + ReSyn(SinAnal* input, int maxtracks, Table* table, double pitch=1.f, + double scale=1.f, double tscal=1.f, int vecsize=DEF_VECSIZE, + double sr=DEF_SR); + void SetPitch(double pitch){ m_pitch = pitch; } + void SetTimeScale(double scale) { m_tscal = scale; } + int Set(char* mess, double value); + ~ReSyn(); + short DoProcess(); + + +}; + +#endif diff --git a/src/sndobj/SinAnal.cpp b/src/sndobj/SinAnal.cpp new file mode 100644 index 0000000..e5c19c7 --- /dev/null +++ b/src/sndobj/SinAnal.cpp @@ -0,0 +1,878 @@ + +//////////////////////////////////////////////////////////////////////// +// This file is part of the SndObj library +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// Copyright (c)Victor Lazzarini, 1997-2004 +// See License.txt for a disclaimer of all warranties +// and licensing information + +#include "SinAnal.h" + +SinAnal::SinAnal(){ + m_thresh = 0.f; + m_startupThresh = 0.f; + m_maxtracks = 0; + m_tracks = 0; + m_prev = 1; m_cur =0; + m_numbins = m_accum = 0; + + m_bndx = m_pkmags = m_adthresh = 0; + m_phases = m_freqs = m_mags = m_bins = 0; + m_tstart = m_lastpk = m_trkid = 0; + m_trndx = 0; + m_binmax = m_magmax = m_diffs = 0; + m_maxix = 0; + m_contflag = 0; + m_minpoints = 0; + m_maxgap = 3; + m_numpeaks = 0; + AddMsg("max tracks", 21); + AddMsg("threshold", 22); +} + +SinAnal::SinAnal(SndObj* input, double threshold, int maxtracks, + int minpoints, int maxgap, double sr) + :SndObj(input,maxtracks*3,sr){ + m_minpoints = (minpoints > 1 ? minpoints : 1) - 1; + m_thresh = threshold; + m_startupThresh = 0.f; + m_maxtracks = maxtracks; + m_tracks = 0; + m_prev = 1; m_cur = 0; m_accum = 0; + m_maxgap = maxgap; + m_numpeaks = 0; + m_numbins = ((FFT *)m_input)->GetFFTSize()/2 + 1; + + m_bndx = new double*[m_minpoints+2]; + m_pkmags = new double*[m_minpoints+2]; + m_adthresh = new double*[m_minpoints+2]; + m_tstart = new unsigned int*[m_minpoints+2]; + m_lastpk = new unsigned int*[m_minpoints+2]; + m_trkid = new unsigned int*[m_minpoints+2]; + int i; + for(i = 0; i < m_minpoints+2; i++){ + m_bndx[i] = new double[m_maxtracks]; + memset(m_bndx[i], 0, sizeof(double) * m_maxtracks); + m_pkmags[i] = new double[m_maxtracks]; + memset(m_pkmags[i], 0, sizeof(double) * m_maxtracks); + m_adthresh[i] = new double[m_maxtracks]; + memset(m_adthresh[i], 0, sizeof(double) * m_maxtracks); + m_tstart[i] = new unsigned int[m_maxtracks]; + memset(m_tstart[i], 0, sizeof(unsigned int) * m_maxtracks); + m_lastpk[i] = new unsigned int[m_maxtracks]; + memset(m_lastpk[i], 0, sizeof(unsigned int) * m_maxtracks); + m_trkid[i] = new unsigned int[m_maxtracks]; + memset(m_trkid[i], 0, sizeof(unsigned int) * m_maxtracks); + } + + m_bins = new double[m_maxtracks]; + memset(m_bins, 0, sizeof(double) * m_maxtracks); + m_trndx = new int[m_maxtracks]; + memset(m_trndx, 0, sizeof(int) * m_maxtracks); + m_contflag = new bool[m_maxtracks]; + memset(m_contflag, 0, sizeof(bool) * m_maxtracks); + + m_phases = new double[m_numbins]; + memset(m_phases, 0, sizeof(double) * m_numbins); + m_freqs = new double[m_numbins]; + memset(m_freqs, 0, sizeof(double) * m_numbins); + m_mags = new double[m_numbins]; + memset(m_mags, 0, sizeof(double) * m_numbins); + + m_binmax = new double[m_numbins]; + memset(m_binmax, 0, sizeof(double) * m_numbins); + m_magmax = new double[m_numbins]; + memset(m_magmax, 0, sizeof(double) * m_numbins); + m_diffs = new double[m_numbins]; + memset(m_diffs, 0, sizeof(double) * m_numbins); + + m_maxix = new int[m_numbins]; + memset(m_maxix, 0, sizeof(int) * m_numbins); + m_timecount = 0; + + m_phases[0] = 0.f; + m_freqs[0] = 0.f; + m_phases[m_numbins-1] = 0.f; + m_freqs[m_numbins-1] = m_sr/2; + + AddMsg("max tracks", 21); + AddMsg("threshold", 22); + + for(i = 0; i < m_maxtracks; i++) + m_pkmags[m_prev][i] = m_bndx[m_prev][i] = m_adthresh[m_prev][i] = 0.f; +} + +SinAnal::SinAnal(SndObj* input, int numbins, double threshold, int maxtracks, + int minpoints, int maxgap, double sr) + :SndObj(input,maxtracks*3,sr){ + m_minpoints = (minpoints > 1 ? minpoints : 1) - 1; + m_thresh = threshold; + m_startupThresh = 0.f; + m_maxtracks = maxtracks; + m_tracks = 0; + m_prev = 1; m_cur = 0; m_accum = 0; + m_maxgap = maxgap; + m_numpeaks = 0; + m_numbins = numbins; + + m_bndx = new double*[m_minpoints+2]; + m_pkmags = new double*[m_minpoints+2]; + m_adthresh = new double*[m_minpoints+2]; + m_tstart = new unsigned int*[m_minpoints+2]; + m_lastpk = new unsigned int*[m_minpoints+2]; + m_trkid = new unsigned int*[m_minpoints+2]; + int i; + for(i = 0; i < m_minpoints+2; i++){ + m_bndx[i] = new double[m_maxtracks]; + memset(m_bndx[i], 0, sizeof(double) * m_maxtracks); + m_pkmags[i] = new double[m_maxtracks]; + memset(m_pkmags[i], 0, sizeof(double) * m_maxtracks); + m_adthresh[i] = new double[m_maxtracks]; + memset(m_adthresh[i], 0, sizeof(double) * m_maxtracks); + m_tstart[i] = new unsigned int[m_maxtracks]; + memset(m_tstart[i], 0, sizeof(unsigned int) * m_maxtracks); + m_lastpk[i] = new unsigned int[m_maxtracks]; + memset(m_lastpk[i], 0, sizeof(unsigned int) * m_maxtracks); + m_trkid[i] = new unsigned int[m_maxtracks]; + memset(m_trkid[i], 0, sizeof(unsigned int) * m_maxtracks); + } + + m_bins = new double[m_maxtracks]; + memset(m_bins, 0, sizeof(double) * m_maxtracks); + m_trndx = new int[m_maxtracks]; + memset(m_trndx, 0, sizeof(int) * m_maxtracks); + m_contflag = new bool[m_maxtracks]; + memset(m_contflag, 0, sizeof(bool) * m_maxtracks); + + m_phases = new double[m_numbins]; + memset(m_phases, 0, sizeof(double) * m_numbins); + m_freqs = new double[m_numbins]; + memset(m_freqs, 0, sizeof(double) * m_numbins); + m_mags = new double[m_numbins]; + memset(m_mags, 0, sizeof(double) * m_numbins); + + m_binmax = new double[m_numbins]; + memset(m_binmax, 0, sizeof(double) * m_numbins); + m_magmax = new double[m_numbins]; + memset(m_magmax, 0, sizeof(double) * m_numbins); + m_diffs = new double[m_numbins]; + memset(m_diffs, 0, sizeof(double) * m_numbins); + + m_maxix = new int[m_numbins]; + memset(m_maxix, 0, sizeof(int) * m_numbins); + m_timecount = 0; + + m_phases[0] = 0.f; + m_freqs[0] = 0.f; + m_phases[m_numbins-1] = 0.f; + m_freqs[m_numbins-1] = m_sr/2; + + AddMsg("max tracks", 21); + AddMsg("threshold", 22); + + for(i = 0; i < m_maxtracks; i++) + m_pkmags[m_prev][i] = m_bndx[m_prev][i] = m_adthresh[m_prev][i] = 0.f; +} + +SinAnal::~SinAnal(){ + if(m_numbins){ + int i; + for(i = 0; i < m_minpoints+2; i++){ + delete [] m_bndx[i]; + delete [] m_pkmags[i]; + delete [] m_adthresh[i]; + delete [] m_tstart[i]; + delete [] m_lastpk[i]; + delete [] m_trkid[i]; + } + } + + if(m_bndx) delete[] m_bndx; + if(m_pkmags) delete[] m_pkmags; + if(m_adthresh) delete[] m_adthresh; + if(m_tstart) delete[] m_tstart; + if(m_lastpk) delete[] m_lastpk; + if(m_trkid) delete[] m_trkid; + if(m_bins) delete[] m_bins; + if(m_trndx) delete[] m_trndx; + if(m_contflag) delete[] m_contflag; + + if(m_phases) delete[] m_phases; + if(m_freqs) delete[] m_freqs; + if(m_mags) delete[] m_mags; + if(m_binmax) delete[] m_binmax; + if(m_magmax) delete[] m_magmax; + if(m_diffs) delete[] m_diffs; + if(m_maxix) delete[] m_maxix; +} + +void +SinAnal::SetMaxTracks(int maxtracks){ + if(m_numbins){ + int i; + for(i = 0; i < m_minpoints+2; i++){ + delete [] m_bndx[i]; + delete [] m_pkmags[i]; + delete [] m_adthresh[i]; + delete [] m_tstart[i]; + delete [] m_lastpk[i]; + delete [] m_trkid[i]; + } + } + + if(m_bndx) delete[] m_bndx; + if(m_pkmags) delete[] m_pkmags; + if(m_adthresh) delete[] m_adthresh; + if(m_tstart) delete[] m_tstart; + if(m_lastpk) delete[] m_lastpk; + if(m_trkid) delete[] m_trkid; + if(m_bins) delete[] m_bins; + if(m_trndx) delete[] m_trndx; + if(m_contflag) delete[] m_contflag; + + m_maxtracks = maxtracks; + m_bins = new double[m_maxtracks]; + memset(m_bins, 0, sizeof(double) * m_maxtracks); + m_trndx = new int[m_maxtracks]; + memset(m_trndx, 0, sizeof(int) * m_maxtracks); + m_contflag = new bool[m_maxtracks]; + memset(m_contflag, 0, sizeof(bool) * m_maxtracks); + + m_prev = 1; + m_cur = 0; + m_bndx = new double*[m_minpoints+2]; + m_pkmags = new double*[m_minpoints+2]; + m_adthresh = new double*[m_minpoints+2]; + m_tstart = new unsigned int*[m_minpoints+2]; + m_lastpk = new unsigned int*[m_minpoints+2]; + m_trkid = new unsigned int*[m_minpoints+2]; + int i; + for(i = 0; i < m_minpoints+2; i++){ + m_bndx[i] = new double[m_maxtracks]; + memset(m_bndx[i], 0, sizeof(double) * m_maxtracks); + m_pkmags[i] = new double[m_maxtracks]; + memset(m_pkmags[i], 0, sizeof(double) * m_maxtracks); + m_adthresh[i] = new double[m_maxtracks]; + memset(m_adthresh[i], 0, sizeof(double) * m_maxtracks); + m_tstart[i] = new unsigned int[m_maxtracks]; + memset(m_tstart[i], 0, sizeof(unsigned int) * m_maxtracks); + m_lastpk[i] = new unsigned int[m_maxtracks]; + memset(m_lastpk[i], 0, sizeof(unsigned int) * m_maxtracks); + m_trkid[i] = new unsigned int[m_maxtracks]; + memset(m_trkid[i], 0, sizeof(unsigned int) * m_maxtracks); + } + for(i = 0; i < m_maxtracks; i++) + m_pkmags[m_prev][i] = m_bndx[m_prev][i] = m_adthresh[m_prev][i] = 0.f; + + SetVectorSize(m_maxtracks*3); +} + +void +SinAnal::SetIFGram(SndObj* input){ + if(m_input){ + delete[] m_phases; + delete[] m_freqs; + delete[] m_mags; + delete[] m_binmax; + delete[] m_magmax; + delete[] m_diffs; + delete[] m_maxix; + } + + SetInput(input); + m_numbins = ((FFT *)m_input)->GetFFTSize()/2 + 1; + + m_phases = new double[m_numbins]; + m_freqs = new double[m_numbins]; + m_mags = new double[m_numbins]; + m_binmax = new double[m_numbins]; + m_magmax = new double[m_numbins]; + m_diffs = new double[m_numbins]; + m_maxix = new int[m_numbins]; + + m_phases[0] = 0.f; + m_freqs[0] = 0.f; + m_phases[m_numbins-1] = 0.f; + m_freqs[m_numbins-1] = m_sr/2; +} + +int +SinAnal::Set(char* mess, double value){ + switch(FindMsg(mess)){ + case 21: + SetMaxTracks((int)value); + return 1; + + case 22: + SetThreshold(value); + return 1; + + default: + return SndObj::Set(mess, value); + } +} + +int +SinAnal::Connect(char* mess, void *input){ + switch(FindMsg(mess)){ + case 3: + SetIFGram((SndObj *)input); + return 1; + + default: + return SndObj::Connect(mess, input); + } +} + +int +SinAnal::peakdetection(){ + double logthresh; + int i = 0, n = 0; + double max = 0.f; + double y1, y2, a, b, ftmp; + + for(i=0; i m_mags[i-1] ? true : false ); + else test1 = false; + test2 = (m_mags[i] >= m_mags[i+1] ? true : false); // check! + + if((m_mags[i] > logthresh) && + (test1 && test2)){ + m_maxix[n] = i; + n++; + } + } + + for(i =0; i < n; i++){ + int rmax; + rmax = m_maxix[i]; + + y1 = m_mags[rmax] - (ftmp = (rmax ? m_mags[rmax-1] : m_mags[rmax+1])) + 0.000001; + y2 = (rmax < m_numbins-1 ? m_mags[rmax+1] : m_mags[rmax]) - ftmp + 0.000001; + + a = (y2 - 2*y1)/2.f; + b = 1.f - y1/a; + + m_binmax[i] = (double) (rmax - 1. + b/2.); + m_magmax[i] = (double) exp(ftmp - a*b*b/4.); + } + + return n; +} + +int +SinAnal::FindPeaks(){ + if(!m_error){ + if(m_input){ + int i2; + // input is in "real-spec" format packing 0 and Nyquist + // together in pos 0 and 1 + for(m_vecpos=1; m_vecpos < m_numbins-1; m_vecpos++){ + i2 = m_vecpos*2; + m_phases[m_vecpos] = ((PVA *)m_input)->Outphases(m_vecpos); + m_freqs[m_vecpos] = m_input->Output(i2+1); + m_mags[m_vecpos] = m_input->Output(i2); + } + m_mags[0] = m_input->Output(0); + m_mags[m_numbins-1] = m_input->Output(1); + + if(m_enable){ + // find peaks + int n = 0; + n = peakdetection(); + + // output peaks + for(m_vecpos=0; m_vecpos < m_vecsize; m_vecpos += 3){ + int pos = m_vecpos/3, ndx; + double frac, a, b; + if((pos < n) && (pos < m_maxtracks)){ + // bin number + ndx = Ftoi(m_binmax[pos]); + // fractional part of bin number + frac = (m_binmax[pos] - ndx); + + // amplitude + m_output[m_vecpos] = m_magmax[pos]; + // frequency + a = m_freqs[ndx]; + b = (m_binmax[pos] < m_numbins-1 ? (m_freqs[ndx+1] - a) : 0); + m_output[m_vecpos+1] = a + frac*b; + // phase + m_output[m_vecpos+2] = m_phases[ndx]; + } + else{ + m_output[m_vecpos] = + m_output[m_vecpos+1] = + m_output[m_vecpos+2] = 0.f; + } + } + if(n > m_maxtracks){ + n = m_maxtracks; + } + return n; + } + else // if disabled + for(m_vecpos=0; m_vecpos < m_vecsize;m_vecpos++) + m_output[m_vecpos] = 0.f; + return 1; + } + else { + m_error = 11; + return 0; + } + } + return 0; +} + +void +SinAnal::SetPeaks(int numamps, double* amps, int numfreqs, + double* freqs, int numphases, double* phases){ + double binwidth = (m_sr / 2) / m_numbins; + m_numpeaks = numamps; + for(int i = 0; i < m_numbins; i++){ + if(i < m_numpeaks){ + m_magmax[i] = amps[i]; + m_binmax[i] = freqs[i] / binwidth; + m_phases[i] = phases[i]; + } + else{ + m_magmax[i] = m_binmax[i] = m_phases[i] = 0.f; + } + } +} + +void +SinAnal::PartialTracking(){ + int bestix, count=0, i = 0, n = 0, j = 0; + double dbstep; + + // reset allowcont flags + for(i=0; i < m_maxtracks; i++){ + m_contflag[i] = false; + } + + // loop to the end of tracks (indicate by the 0'd bins) + // find continuation tracks + for(j=0; m_bndx[m_prev][j] != 0.f && j < m_maxtracks; j++){ + int foundcont = 0; + + if(m_numpeaks > 0){ // check for peaks; m_numpeaks will be > 0 + double F = m_bndx[m_prev][j]; + + for(i=0; i < m_numbins; i++){ + m_diffs[i] = m_binmax[i] - F; //differences + m_diffs[i] = (m_diffs[i] < 0 ? -m_diffs[i] : m_diffs[i]); + } + + bestix = 0; // best index + for(i=0; i < m_numbins; i++) + if(m_diffs[i] < m_diffs[bestix]) bestix = i; + + // if difference smaller than 1 bin + double tempf = F - m_binmax[bestix]; + tempf = (tempf < 0 ? -tempf : tempf); + if(tempf < 1.){ + // if amp jump is too great (check) + if(m_adthresh[m_prev][j] < + (dbstep = 20*log10(m_magmax[bestix]/m_pkmags[m_prev][j]))){ + // mark for discontinuation; + m_contflag[j] = false; + } + else{ + m_bndx[m_prev][j] = m_binmax[bestix]; + m_pkmags[m_prev][j] = m_magmax[bestix]; + // track index keeps track history + // so we know which ones continue + m_contflag[j] = true; + m_binmax[bestix] = m_magmax[bestix] = 0.f; + m_lastpk[m_prev][j] = m_timecount; + foundcont = 1; + count++; + + // update the adaptive mag threshold + double tmp1 = dbstep*1.5f; + double tmp2 = m_adthresh[m_prev][j] - + (m_adthresh[m_prev][j] - 1.5f)*0.048770575f; + m_adthresh[m_prev][j] = (tmp1 > tmp2 ? tmp1 : tmp2); + } // else + } // if difference + } // if check + + // if we did not find a continuation + // we'll check if the magnitudes around it are below + // a certain threshold. Mags[] holds the logs of the magnitudes + // Check also if the last peak in this track is more than m_maxgap + // old + if(!foundcont){ + if((exp(m_mags[int(m_bndx[m_prev][j]+0.5)]) < 0.2*m_pkmags[m_prev][j]) + || ((m_timecount - m_lastpk[m_prev][j]) > (unsigned int) m_maxgap)){ + m_contflag[j] = false; + } + else{ + m_contflag[j] = true; + count++; + } + } + } // for loop + + // compress the arrays + for(i=0, n=0; i < m_maxtracks; i++){ + if(m_contflag[i]){ + m_bndx[m_cur][n] = m_bndx[m_prev][i]; + m_pkmags[m_cur][n] = m_pkmags[m_prev][i]; + m_adthresh[m_cur][n] = m_adthresh[m_prev][i]; + m_tstart[m_cur][n] = m_tstart[m_prev][i]; + m_trkid[m_cur][n] = m_trkid[m_prev][i]; + m_lastpk[m_cur][n] = m_lastpk[m_prev][i]; + n++; + } // ID == -1 means zero'd track + else + m_trndx[i] = -1; + } + + if(count < m_maxtracks){ + // if we have not exceeded available tracks. + // create new tracks for all new peaks + for(j=0; j< m_numbins && count < m_maxtracks; j++){ + if(m_magmax[j] > m_startupThresh){ + m_bndx[m_cur][count] = m_binmax[j]; + m_pkmags[m_cur][count] = m_magmax[j]; + m_adthresh[m_cur][count] = 400.f; + // track ID is a positive number in the + // range of 0 - maxtracks*3 - 1 + // it is given when the track starts + // used to identify and match tracks + m_tstart[m_cur][count] = m_timecount; + m_trkid[m_cur][count] = ((m_accum++)%m_vecsize); + m_lastpk[m_cur][count] = m_timecount; + count++; + } + } + for(i = count; i < m_maxtracks; i++){ + // zero the right-hand size of the current arrays + if(i >= count) + m_pkmags[m_cur][i] = m_bndx[m_cur][i] = m_adthresh[m_cur][i] = 0.f; + } + } // if count != maxtracks + + // count is the number of continuing tracks + new tracks + // now we check for tracks that have been there for more + // than minpoints hop periods and output them + m_tracks = 0; + for(i=0; i < count; i++){ + int curpos = m_timecount-m_minpoints; + if(curpos >= 0 && m_tstart[m_cur][i] <= (unsigned int)curpos){ + int tpoint = m_cur-m_minpoints; + if(tpoint < 0){ + tpoint += m_minpoints+2; + } + + m_bins[i] = m_bndx[tpoint][i]; + m_mags[i] = m_pkmags[tpoint][i]; + m_trndx[i] = m_trkid[tpoint][i]; + m_tracks++; + } + } + + // end track-selecting + // current arrays become previous + m_prev = m_cur; + m_cur = (m_cur < m_minpoints+1 ? m_cur+1 : 0); + m_timecount++; + + // Output + if(!m_error){ + if(m_input){ + if(m_enable){ + double binwidth = (m_sr / 2) / m_numbins; + + for(m_vecpos=0; m_vecpos < m_vecsize; m_vecpos += 3){ + int pos = m_vecpos/3; + if((pos < m_tracks) && (pos < m_maxtracks)){ + // amplitude + m_output[m_vecpos] = m_mags[pos]; + // frequency + m_output[m_vecpos+1] = m_bins[pos] * binwidth; + // phase + m_output[m_vecpos+2] = m_phases[pos]; + } + else{ + m_output[m_vecpos] = + m_output[m_vecpos+1] = + m_output[m_vecpos+2] = 0.f; + } + } + } + else // if disabled + for(m_vecpos=0; m_vecpos < m_vecsize;m_vecpos++) + m_output[m_vecpos] = 0.f; + } + else { + m_error = 11; + } + } +} + +void +SinAnal::sinanalysis(){ + + int bestix, count=0, i = 0, n = 0, j = 0; + double dbstep; + + n = peakdetection(); + + // track-secting + + // reset allowcont flags + for(i=0; i 0){ // check for peaks; n will be > 0 + + double F = m_bndx[m_prev][j]; + + for(i=0; i < m_numbins; i++){ + m_diffs[i] = m_binmax[i] - F; //differences + m_diffs[i] = (m_diffs[i] < 0 ? -m_diffs[i] : m_diffs[i]); + } + + + bestix = 0; // best index + for(i=0; i < m_numbins; i++) + if(m_diffs[i] < m_diffs[bestix]) bestix = i; + + // if difference smaller than 1 bin + double tempf = F - m_binmax[bestix]; + tempf = (tempf < 0 ? -tempf : tempf); + if(tempf < 1.){ + + // if amp jump is too great (check) + if(m_adthresh[m_prev][j] < + (dbstep = 20*log10(m_magmax[bestix]/m_pkmags[m_prev][j]))){ + // mark for discontinuation; + m_contflag[j] = false; + } + else { + m_bndx[m_prev][j] = m_binmax[bestix]; + m_pkmags[m_prev][j] = m_magmax[bestix]; + // track index keeps track history + // so we know which ones continue + m_contflag[j] = true; + m_binmax[bestix] = m_magmax[bestix] = 0.f; + m_lastpk[m_prev][j] = m_timecount; + foundcont = 1; + count++; + + // update the adaptive mag threshold + double tmp1 = dbstep*1.5f; + double tmp2 = m_adthresh[m_prev][j] - + (m_adthresh[m_prev][j] - 1.5f)*0.048770575f; + m_adthresh[m_prev][j] = (tmp1 > tmp2 ? tmp1 : tmp2); + + } // else + } // if difference + // if check + } + + // if we did not find a continuation + // we'll check if the magnitudes around it are below + // a certain threshold. Mags[] holds the logs of the magnitudes + // Check also if the last peak in this track is more than m_maxgap + // old + if(!foundcont){ + if((exp(m_mags[int(m_bndx[m_prev][j]+0.5)]) < 0.2*m_pkmags[m_prev][j]) + || ((m_timecount - m_lastpk[m_prev][j]) > (unsigned int) m_maxgap)) + { + m_contflag[j] = false; + + } else { + m_contflag[j] = true; + count++; + } + + } + + } // for loop + + // compress the arrays + for(i=0, n=0; i < m_maxtracks; i++){ + if(m_contflag[i]){ + m_bndx[m_cur][n] = m_bndx[m_prev][i]; + m_pkmags[m_cur][n] = m_pkmags[m_prev][i]; + m_adthresh[m_cur][n] = m_adthresh[m_prev][i]; + m_tstart[m_cur][n] = m_tstart[m_prev][i]; + m_trkid[m_cur][n] = m_trkid[m_prev][i]; + m_lastpk[m_cur][n] = m_lastpk[m_prev][i]; + n++; + } // ID == -1 means zero'd track + else + m_trndx[i] = -1; + } + + if(count < m_maxtracks){ + // if we have not exceeded available tracks. + // create new tracks for all new peaks + + for(j=0; j< m_numbins && count < m_maxtracks; j++){ + + if(m_magmax[j] > m_startupThresh){ + + m_bndx[m_cur][count] = m_binmax[j]; + m_pkmags[m_cur][count] = m_magmax[j]; + m_adthresh[m_cur][count] = 400.f; + // track ID is a positive number in the + // range of 0 - maxtracks*3 - 1 + // it is given when the track starts + // used to identify and match tracks + m_tstart[m_cur][count] = m_timecount; + m_trkid[m_cur][count] = ((m_accum++)%m_vecsize); + m_lastpk[m_cur][count] = m_timecount; + count++; + + } + } + for(i = count; i < m_maxtracks; i++){ + // zero the right-hand size of the current arrays + if(i >= count) + m_pkmags[m_cur][i] = m_bndx[m_cur][i] = m_adthresh[m_cur][i] = 0.f; + } + + } // if count != maxtracks + + // count is the number of continuing tracks + new tracks + // now we check for tracks that have been there for more + // than minpoints hop periods and output them + + m_tracks = 0; + for(i=0; i < count; i++){ + int curpos = m_timecount-m_minpoints; + if(curpos >= 0 && m_tstart[m_cur][i] <= (unsigned int)curpos){ + int tpoint = m_cur-m_minpoints; + + if(tpoint < 0) { + tpoint += m_minpoints+2; + } + m_bins[i] = m_bndx[tpoint][i]; + m_mags[i] = m_pkmags[tpoint][i]; + m_trndx[i] = m_trkid[tpoint][i]; + m_tracks++; + } + + } + // end track-selecting + // current arrays become previous + //int tmp = m_prev; + m_prev = m_cur; + m_cur = (m_cur < m_minpoints+1 ? m_cur+1 : 0); + m_timecount++; +} + +short +SinAnal::DoProcess(){ + if(!m_error){ + if(m_input){ + int i2; + + // input is in "real-spec" format packing 0 and Nyquist + // together in pos 0 and 1 + + for(m_vecpos=1; m_vecpos < m_numbins-1; m_vecpos++){ + i2 = m_vecpos*2; + m_phases[m_vecpos] = ((PVA *)m_input)->Outphases(m_vecpos); + m_freqs[m_vecpos] = m_input->Output(i2+1); + m_mags[m_vecpos] = m_input->Output(i2); + } + m_mags[0] = m_input->Output(0); + m_mags[m_numbins-1] = m_input->Output(1); + + if(m_enable){ + + // sinusoidal analysis + // generates bin indexes and magnitudes + // m_bins and m_mags, respectively + + sinanalysis(); + + // m_output holds [amp, freq, pha] + // m_vecsize is m_maxtracks*3 + // estimated to be a little above count*3 + + for(m_vecpos=0; m_vecpos < m_vecsize; m_vecpos+=3){ + int pos = m_vecpos/3, ndx; + double frac,a,b; + if(pos < m_tracks){ + // magnitudes + ndx = Ftoi(m_bins[pos]); + m_output[m_vecpos] = m_mags[pos]; + // fractional part of bin indexes + frac =(m_bins[pos] - ndx); + // freq Interpolation + // m_output[1,4,7, ..etc] holds track freq + a = m_freqs[ndx]; + b = (m_bins[pos] < m_numbins-1 ? (m_freqs[ndx+1] - a) : 0); + m_output[m_vecpos+1] = a + frac*b; + // phase Interpolation + // m_output[2,5,8 ...] holds track phase + m_output[m_vecpos+2] = m_phases[ndx]; + } + else{ // empty tracks + m_output[m_vecpos] = + m_output[m_vecpos+1] = + m_output[m_vecpos+2] = 0.f; + } + } + + + } + else // if disabled + for(m_vecpos=0; m_vecpos < m_vecsize;m_vecpos++) + m_output[m_vecpos] = 0.f; + return 1; + } + else { + m_error = 11; + return 0; + } + } + else return 0; +} + diff --git a/src/sndobj/SinAnal.h b/src/sndobj/SinAnal.h new file mode 100644 index 0000000..ee46a44 --- /dev/null +++ b/src/sndobj/SinAnal.h @@ -0,0 +1,98 @@ + +//////////////////////////////////////////////////////////////////////// +// This file is part of the SndObj library +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// Copyright (c)Victor Lazzarini, 1997-2004 +// See License.txt for a disclaimer of all warranties +// and licensing information + +#ifndef _SINANAL_H +#define _SINANAL_H + +#include "SndObj.h" +#include "PVA.h" + +class SinAnal : public SndObj { + + protected: + + double** m_bndx; // bin indexes + double** m_pkmags; // peak mags + double** m_adthresh; // thresholds + unsigned int** m_tstart; // start times + unsigned int** m_lastpk; // end times + unsigned int** m_trkid; // track ids + + double* m_phases; // phases + double* m_freqs; // frequencies + double* m_mags; // magnitudes + double* m_bins; // track bin indexes + int* m_trndx; // track IDs + + double* m_binmax; // peak bin indexes + double* m_magmax; // peak mags + double* m_diffs; // differences + + int* m_maxix; // max peak locations + bool* m_contflag; // continuation flags + + int m_numbins; // number of bins + int m_maxtracks; // max number of tracks + double m_startupThresh; // startup threshold + double m_thresh; // threshold + + int m_tracks; // tracks in a frame + int m_prev; + int m_cur; + int m_accum; // ID counter + unsigned int m_timecount; + int m_minpoints; // minimun number of points in track + int m_maxgap; // max gap (in points) between consecutive points + int m_numpeaks; // number of peaks found in peak detection + + private: + + void sinanalysis(); + int peakdetection(); + + public: + + SinAnal(); + SinAnal(SndObj* input, double threshold, int maxtracks, int minpoints=1, + int maxgap=3, double sr=DEF_SR); + SinAnal(SndObj* input, int numbins, double threshold, int maxtracks, int minpoints=1, + int maxgap=3, double sr=DEF_SR); + ~SinAnal(); + + virtual int GetTrackID(int track){ return m_trndx[track]; } + virtual int GetTracks(){ return m_tracks;} + + int Set(char* mess, double value); + int Connect(char* mess, void* input); + + void SetThreshold(double threshold){ m_thresh = threshold; } + void SetIFGram(SndObj* input); + void SetMaxTracks(int maxtracks); + + int FindPeaks(); + void SetPeaks(int numamps, double* amps, int numfreqs, double* freqs, + int numphases, double* phases); + void PartialTracking(); + short DoProcess(); +}; + +#endif diff --git a/src/sndobj/SinSyn.cpp b/src/sndobj/SinSyn.cpp new file mode 100644 index 0000000..7d31e15 --- /dev/null +++ b/src/sndobj/SinSyn.cpp @@ -0,0 +1,268 @@ + +//////////////////////////////////////////////////////////////////////// +// This file is part of the SndObj library +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// Copyright (c)Victor Lazzarini, 1997-2004 +// See License.txt for a disclaimer of all warranties +// and licensing information + +#include "SinSyn.h" + +SinSyn::SinSyn(){ + + m_factor = m_vecsize/m_sr; + m_facsqr = m_factor*m_factor; + m_ptable = 0; + m_size = 0; + m_LoTWOPI = 0.f; + m_maxtracks = 0; + m_freqs = 0; + m_amps = 0; + m_phases = 0; + m_trackID = 0; + m_scale = 0.f; + m_ratio = 0.f; + m_tracks = 0; + AddMsg("max tracks", 21); + AddMsg("scale", 23); + AddMsg("table", 24); +} + +SinSyn::SinSyn(SinAnal* input, int maxtracks, Table* table, + double scale, int vecsize, double sr) +:SndObj(input, vecsize, sr){ + + m_ptable = table; + m_size = m_ptable->GetLen(); + m_LoTWOPI = m_size/TWOPI; + + m_factor = m_vecsize/m_sr; + m_facsqr = m_factor*m_factor; + m_maxtracks = maxtracks; + m_tracks = 0; + m_scale = scale; + m_input = input; + m_freqs = new double[m_maxtracks]; + m_amps = new double[m_maxtracks]; + m_phases = new double[m_maxtracks]; + m_trackID = new int[m_maxtracks]; + + memset(m_phases, 0, sizeof(double)*m_maxtracks); + + m_incr = 0.f; + m_ratio = m_size/m_sr; + AddMsg("max tracks", 21); + AddMsg("scale", 23); + AddMsg("table", 24); + AddMsg("timescale", 24); + memset(m_trackID, 0, sizeof(int)); + +} + +SinSyn::~SinSyn(){ + + delete[] m_freqs; + delete[] m_amps; + delete[] m_phases; + delete[] m_trackID; + +} + + void +SinSyn::SetTable(Table *table) +{ + m_ptable = table; + m_size = m_ptable->GetLen(); + m_LoTWOPI = m_size/TWOPI; + m_ratio = m_size/m_sr; +} + +int +SinSyn::Connect(char* mess, void* input){ + + switch (FindMsg(mess)){ + + case 24: + SetTable((Table *) input); + return 1; + + default: + return SndObj::Connect(mess,input); + + } + +} + + +int +SinSyn::Set(char* mess, double value){ + + switch(FindMsg(mess)){ + + case 21: + SetMaxTracks((int)value); + return 1; + + case 23: + SetScale(value); + return 1; + + default: + return SndObj::Set(mess, value); + + } +} + + +void +SinSyn::SetMaxTracks(int maxtracks){ + + if(m_maxtracks){ + + delete[] m_freqs; + delete[] m_amps; + delete[] m_phases; + delete[] m_trackID; + + } + + m_maxtracks = maxtracks; + m_freqs = new double[m_maxtracks]; + m_amps = new double[m_maxtracks]; + m_phases = new double[m_maxtracks]; + m_trackID = new int[m_maxtracks]; + +} + +short +SinSyn::DoProcess() { + + if(m_input){ + + double ampnext,amp,freq, freqnext, phase,phasenext; + double a2, a3, phasediff, cph; + int i3, i, j, ID, track; + int notcontin = 0; + bool contin = false; + int oldtracks = m_tracks; + double* tab = m_ptable->GetTable(); + if((m_tracks = ((SinAnal *)m_input)->GetTracks()) > + m_maxtracks) m_tracks = m_maxtracks; + + memset(m_output, 0, sizeof(double)*m_vecsize); + + // for each track + i = j = 0; + while(i < m_tracks*3){ + i3 = i/3; + ampnext = m_input->Output(i)*m_scale; + freqnext = m_input->Output(i+1)*TWOPI; + phasenext = m_input->Output(i+2); + ID = ((SinAnal *)m_input)->GetTrackID(i3); + + j = i3+notcontin; + + if(i3 < oldtracks-notcontin){ + + if(m_trackID[j]==ID){ + // if this is a continuing track + track = j; + contin = true; + freq = m_freqs[track]; + phase = m_phases[track]; + amp = m_amps[track]; + + } + else { + // if this is a dead track + contin = false; + track = j; + freqnext = freq = m_freqs[track]; + phase = m_phases[track]; + phasenext = phase + freq*m_factor; + amp = m_amps[track]; + ampnext = 0.f; + } + } + + else{ + // new tracks + contin = true; + track = -1; + freq = freqnext; + phase = phasenext - freq*m_factor; + amp = 0.f; + } + + // phasediff + phasediff = phasenext - phase; + while(phasediff >= PI) phasediff -= TWOPI; + while(phasediff < -PI) phasediff += TWOPI; + // update phasediff to match the freq + cph = ((freq+freqnext)*m_factor/2. - phasediff)/TWOPI; + phasediff += TWOPI * Ftoi(cph + 0.5); + // interpolation coefs + a2 = 3./m_facsqr * (phasediff - m_factor/3.*(2*freq+freqnext)); + a3 = 1./(3*m_facsqr) * (freqnext - freq - 2*a2*m_factor); + + // interpolation resynthesis loop + double inc1, inc2, a, ph, cnt, frac; + int ndx; + a = amp; + ph = phase; + cnt = 0; + inc1 = (ampnext - amp)/m_vecsize; + inc2 = 1/m_sr; + for(m_vecpos=0; m_vecpos < m_vecsize; m_vecpos++){ + + if(m_enable) { + // table lookup oscillator + ph *= m_LoTWOPI; + while(ph < 0) ph += m_size; + while(ph >= m_size) ph -= m_size; + ndx = Ftoi(ph); + frac = ph - ndx; + m_output[m_vecpos] += a*(tab[ndx] + (tab[ndx+1] - tab[ndx])*frac); + a += inc1; + cnt += inc2; + ph = phase + cnt*(freq + cnt*(a2 + a3*cnt)); + + } + else m_output[m_vecpos] = 0.f; + } + + // keep amp, freq, and phase values for next time + if(contin){ + m_amps[i3] = ampnext; + m_freqs[i3] = freqnext; + while(phasenext < 0) phasenext += TWOPI; + while(phasenext >= TWOPI) phasenext -= TWOPI; + m_phases[i3] = phasenext; + m_trackID[i3] = ID; + i += 3; + } else notcontin++; + } + + return 1; + } + else { + m_error = 1; + return 0; + } + +} + diff --git a/src/sndobj/SinSyn.h b/src/sndobj/SinSyn.h new file mode 100644 index 0000000..6d9e519 --- /dev/null +++ b/src/sndobj/SinSyn.h @@ -0,0 +1,69 @@ + +//////////////////////////////////////////////////////////////////////// +// This file is part of the SndObj library +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// Copyright (c)Victor Lazzarini, 1997-2004 +// See License.txt for a disclaimer of all warranties +// and licensing information + +#ifndef _SINSYN_H +#define _SINSYN_H + +#include "SndObj.h" +#include "SinAnal.h" +#include "Table.h" + +class SinSyn : public SndObj { + + protected: + + double m_size; + Table* m_ptable; + + double m_factor; + double m_facsqr; + double m_LoTWOPI; + double m_scale; + double m_incr; + double m_ratio; + + int m_tracks; + int* m_trackID; + int m_maxtracks; + + double* m_phases; + double* m_freqs; + double* m_amps; + + public: + + SinSyn(); + SinSyn(SinAnal* input, int maxtracks, Table* table, double scale=1.f, + int vecsize=DEF_VECSIZE, double sr=DEF_SR); + + ~SinSyn(); + void SetTable(Table* table); + void SetMaxTracks(int maxtracks); + void SetScale(double scale) { m_scale = scale; } + int Set(char* mess, double value); + int Connect(char* mess, void* input); + short DoProcess(); + + +}; + +#endif diff --git a/src/sndobj/SndIO.cpp b/src/sndobj/SndIO.cpp new file mode 100644 index 0000000..6f79feb --- /dev/null +++ b/src/sndobj/SndIO.cpp @@ -0,0 +1,154 @@ + +//////////////////////////////////////////////////////////////////////// +// This file is part of the SndObj library +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// Copyright (c)Victor Lazzarini, 1997-2004 +// See License.txt for a disclaimer of all warranties +// and licensing information + +///////////////////////////////////////////////////////// +// SndIO.cpp: implementation of the SndIO class +// +// +// +// + +#include "SndIO.h" + + +SndIO::SndIO(short channels, short bits, SndObj** inputlist, + int vecsize, double sr){ + + int n; + m_channels = channels; + m_bits = bits; + m_sampsize = bits/8; + m_vecpos = 0; + m_sr = sr; + + if(m_channels){ + if(!(m_IOobjs = new SndObj*[m_channels])){ + m_error = 2; +#ifdef DEBUG + cout << ErrorMessage(); +#endif + return; + } + + if(inputlist) // if an array of input objects exists + for(n=0;nOutput(m_vecpos) << "\n"; + return 1; + } + else{ + m_error = 4; + return 0; + } + } + + short + SndIO::Read(){ + for(m_vecpos = 0; m_vecpos < m_samples; m_vecpos+=m_channels) + for(int n = 0; n < m_channels; n++) + cin >> m_output[n+m_vecpos]; + return 1; + } + + char* SndIO::ErrorMessage(){ + + char* message; + + switch(m_error){ + + case 0: + message = "No error\n"; + break; + + case 1: + message = "Failed to allocate vector memory\n"; + break; + + case 2: + message = "Failed to allocate input object memory\n"; + break; + + case 3: + message = "Sampling rate mismatch\n"; + break; + + case 4: + message = "No input objects \n"; + break; + + default: + message = "Undefined error\n"; + break; + + } + + return message; + + } + + diff --git a/src/sndobj/SndIO.h b/src/sndobj/SndIO.h new file mode 100644 index 0000000..ad9456e --- /dev/null +++ b/src/sndobj/SndIO.h @@ -0,0 +1,139 @@ + +//////////////////////////////////////////////////////////////////////// +// This file is part of the SndObj library +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// Copyright (c)Victor Lazzarini, 1997-2004 +// See License.txt for a disclaimer of all warranties +// and licensing information + +//************************************************************// +// SndIO.h: interface of the SndIO base class. // +// // +// // +// // +//************************************************************// +#ifndef _SNDIO_H +#define _SNDIO_H +#include +#include "SndObj.h" + +enum{FLOATSAM=0, BYTESAM, SHORTSAM_LE}; +const int SHORTSAM_BE = -2; +const int S24LE = 3; +const int S24BE = -3; +const int LONGSAM = 4; + +enum{SND_INPUT, SND_OUTPUT, SND_IO}; + + +#ifdef WIN +const int SHORTSAM = SHORTSAM_LE; +#endif + +#ifdef OSS +const int SHORTSAM = SHORTSAM_LE; +#endif + +#ifdef ALSA +const int SHORTSAM = SHORTSAM_LE; +const int LONGSAM_LE = LONGSAM; +const int LONGSAM_BE = 5; +const int TWENTY_FOUR = 6; +const int TWENTYFOUR_LE = TWENTY_FOUR; +const int TWENTYFOUR_BE = 7; +#endif + + +#ifdef SGI +const int SHORTSAM = SHORTSAM_BE; +#endif + +#if defined(MACOSX) && defined(WORDS_BIGENDIAN) +const int SHORTSAM = SHORTSAM_BE; +#endif + +#if defined(MACOSX) && !defined(WORDS_BIGENDIAN) +const int SHORTSAM = SHORTSAM_LE; +#endif + + + +struct _24Bit { + char s[3]; +}; + + +class SndIO { + + protected: + + SndObj** m_IOobjs; + double* m_output; + double m_sr; + short m_channels; + short m_bits; + int m_vecsize; + int m_vecsize_max; + int m_vecpos; + int m_error; + int m_samples; + + short VerifySR(SndObj *InObj){ + if(InObj->GetSr() != m_sr) return 0; + else return 1; + } + + public: + short m_sampsize; + + double GetSr(){ return m_sr; } + int GetVectorSize() { return m_vecsize; } + void SetVectorSize(int vecsize); + void LimitVectorSize(int limit) { + if(limit <= m_vecsize_max){ + m_vecsize = limit; + m_samples = m_vecsize*m_channels; + } + } + void RestoreVectorSize(){ m_vecsize = m_vecsize_max; } + short GetChannels() { return m_channels; } + short GetSize() { return m_bits; } + double Output(int pos){ return m_output[pos]; } + double Output(int pos, int channel){ + return m_output[(pos*m_channels)+(channel-1)]; + } + short SetOutput(short channel, SndObj* input){ + if(channel <= m_channels){ + m_IOobjs[channel-1] = input; + return 1; + } else return 0; + } + + SndIO(short channels=1, short bits=16,SndObj** inputlist=0, + int vecsize = DEF_VECSIZE, double sr = DEF_SR); + virtual ~SndIO(); + virtual short Read(); + virtual short Write(); + virtual char* ErrorMessage(); + int Error() { return m_error; } + +}; + + + +#endif + diff --git a/src/sndobj/SndObj.cpp b/src/sndobj/SndObj.cpp new file mode 100644 index 0000000..a111426 --- /dev/null +++ b/src/sndobj/SndObj.cpp @@ -0,0 +1,254 @@ + +//////////////////////////////////////////////////////////////////////// +// This file is part of the SndObj library +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// Copyright (c)Victor Lazzarini, 1997-2004 +// See License.txt for a disclaimer of all warranties +// and licensing information + +/////////////////////////////////////// +// SndObj Library Version 2 +// SndObj class +// a very basic model for all derived classes +// +////////////////////////////////////// +#include "SndObj.h" +#include "SndIO.h" + +SndObj::SndObj(){ + m_output = NULL; + SetVectorSize(DEF_VECSIZE); + m_input = 0; + m_sr = DEF_SR; + m_error =0; + for(m_vecpos = 0; m_vecpos < m_vecsize; m_vecpos++) + m_output[m_vecpos]= 0.f; + m_msgtable = new msg_link; + m_msgtable->previous = 0; + AddMsg("SR", 1); + AddMsg("vector size", 2); + AddMsg("input", 3); + Enable(); + +} + +SndObj::SndObj(SndObj* input, int vecsize, double sr){ + m_output = NULL; + SetVectorSize(vecsize); + m_input = input; + m_sr = sr; + m_error = 0; + for(m_vecpos = 0; m_vecpos < m_vecsize; m_vecpos++) m_output[m_vecpos]= 0.f; + + m_msgtable = new msg_link; + m_msgtable->previous = 0; + AddMsg("SR", 1); + AddMsg("vector size", 2); + AddMsg("input", 3); + Enable(); + +} + + +SndObj::SndObj(SndObj& obj){ + m_output = NULL; + SetVectorSize(obj.GetVectorSize()); + SetSr(obj.GetSr()); + + for(int n=0; nprevious = 0; + AddMsg("SR", 1); + AddMsg("vector size", 2); + AddMsg("input", 3); + Enable(); + +} + + +SndObj::~SndObj(){ + + delete[] m_output; + + msg_link *todestroy = m_msgtable; + while(m_msgtable->previous){ + m_msgtable = todestroy->previous; + delete todestroy; + todestroy = m_msgtable; + } + delete m_msgtable; + +} + +void +SndObj::GetMsgList(string* list){ + msg_link* tmp = m_msgtable; + while(tmp->previous){ + list->append(tmp->msg); + list->append("\n"); + tmp = tmp->previous; + } +} + + +void +SndObj::AddMsg(const char* mess, int ID){ + + msg_link* newlink = new msg_link; + msg_link* tmp = m_msgtable; + newlink->msg = mess; + newlink->ID = ID; + m_msgtable = newlink; + m_msgtable->previous = tmp; +} + +int +SndObj::Connect(char* mess, void *input){ + + switch (FindMsg(mess)){ + + case 3: + m_input = (SndObj *) input; + return 1; + + default: + return 0; + + } +} + +int +SndObj::Set(char* mess, double value){ + + switch (FindMsg(mess)){ + + case 1: + SetSr(value); + return 1; + + case 2: + SetVectorSize((int) value); + return 1; + + default: + return 0; + + } + + +} + + +void +SndObj::SetVectorSize(int vecsize){ + if(m_output) delete[] m_output; + if(!(m_output = new double[vecsize])){ + m_error = 1; +#ifdef DEBUG + cout << ErrorMessage(); +#endif + m_vecsize = m_vecsize_max = 0; + return; + } + m_vecsize = vecsize; + m_vecsize_max = vecsize; + m_altvecpos = m_vecpos = 0; +} + +short +SndObj::DoProcess(){ + + if(!m_error){ + if(m_input){ + for(m_vecpos = 0; m_vecpos < m_vecsize; m_vecpos++) { + if(m_enable) m_output[m_vecpos] = m_input->Output(m_vecpos); + else m_output[m_vecpos] = 0.f; + } + return 1; + } else { + return 0; + } + } + else return 0; +} + +void +SndObj::operator>>(SndIO& out){ + out.SetOutput(1, this); + out.Write(); +} + +void +SndObj::operator<<(SndIO& in){ + in.Read(); + for(int n=0;n +#include +#include +#include +#include +#ifndef WIN +#include +#endif + +using namespace std; + +class SndIO; +const double PI = 4.*atan(1.); +const int DEF_FFTSIZE = 1024; +const int DEF_VECSIZE = 256; +const double DEF_SR = 44100.f; + +struct msg_link { + string msg; + int ID; + msg_link *previous; +}; + +class SndObj { + + protected: + + double* m_output; // output samples + SndObj* m_input; // input object + double m_sr; // sampling rate + int m_vecsize; //vector size + int m_vecpos; // vector pos counter + int m_vecsize_max; // for limiting operation + int m_altvecpos; // secondary counter + int m_error; // error code + short m_enable; // enable object + + msg_link *m_msgtable; + + inline int FindMsg(char* mess); + void AddMsg(const char* mess, int ID); + +#if defined (WIN) && !defined(GCC) + int Ftoi(double x){ + union { + double f; + int i; + } u; + unsigned int tmp; + unsigned char tmp2; + u.f = x; + tmp2 = (unsigned char) 158 - (unsigned char) (((int) u.i & 0x7F800000) >> 23); + if (tmp2 & (unsigned char) 0xE0) + return (unsigned int) 0; + tmp = (unsigned int) u.i | (unsigned int) 0xFF800000UL; + tmp = (tmp << 8) >> tmp2; + return (u.i < (int) 0 ? -((int) tmp) : (int) tmp); + } + + int Ftoi(double fval){ + int temp; + short oldcw; + short tempcw; + _asm { + fnstcw oldcw /*save current control reg*/ + wait + mov ax,oldcw + or ah,0Ch /*set truncation mode */ + mov tempcw,ax + fldcw tempcw + fld fval /*do the conversion... */ + fistp temp + fldcw oldcw /*restore register */ + mov eax,temp /* = "return temp;" */ + } + return temp; + } +#else + int Ftoi(double fval) { return (int) fval; } + int Ftoi(float fval) { return (int) fval; } +#endif + + public: + + bool IsProcessing() { + if(m_vecpos && m_vecpos != m_vecsize) return true; + else return false; + } + + int GetError() { return m_error; } + +#ifndef SWIGJAVA + SndObj operator=(SndObj obj){ + if(&obj == this) return *this; + for(int n = 0; n < m_vecsize; n++) m_output[n] = obj.Output(n); + return *this; + } + + SndObj& operator+=(SndObj& obj){ + for(int n = 0; n < m_vecsize; n++) m_output[n] = m_output[n]+obj.Output(n); + return *this; + } + + SndObj& operator-=(SndObj& obj){ + for(int n = 0; n < m_vecsize; n++) m_output[n] = m_output[n]-obj.Output(n); + return *this; + } + + SndObj& operator*=(SndObj& obj){ + for(int n = 0; n < m_vecsize; n++) m_output[n] = m_output[n]*obj.Output(n); + return *this; + } + + SndObj& operator+=(double val){ + for(int n = 0; n < m_vecsize; n++) m_output[n] = m_output[n]+val; + return *this; + } + + SndObj& operator-=(double val){ + for(int n = 0; n < m_vecsize; n++) m_output[n] = m_output[n]-val; + return *this; + } + + SndObj& operator*=(double val){ + for(int n = 0; n < m_vecsize; n++) m_output[n] = m_output[n]*val; + return *this; + } + + SndObj operator+(SndObj& obj){ + SndObj temp(0, m_vecsize, m_sr); + for(int n = 0; n < m_vecsize; n++) temp.m_output[n] = m_output[n]+obj.Output(n); + return temp; + } + + SndObj operator-(SndObj& obj){ + SndObj temp(0, m_vecsize, m_sr); + for(int n = 0; n < m_vecsize; n++) temp.m_output[n] = m_output[n]-obj.Output(n); + return temp; + } + + SndObj operator*(SndObj& obj){ + SndObj temp(0, m_vecsize, m_sr); + for(int n = 0; n < m_vecsize; n++) temp.m_output[n] = m_output[n]*obj.Output(n); + return temp; + } + + SndObj operator+(double val){ + SndObj temp(0, m_vecsize, m_sr); + for(int n = 0; n < m_vecsize; n++) temp.m_output[n] = m_output[n]+val; + return temp; + } + + SndObj operator-(double val){ + SndObj temp(0, m_vecsize, m_sr); + for(int n = 0; n < m_vecsize; n++) temp.m_output[n] = m_output[n]-val; + return temp; + } + + SndObj operator*(double val){ + SndObj temp(0, m_vecsize, m_sr); + for(int n = 0; n < m_vecsize; n++) temp.m_output[n] = m_output[n]*val; + return temp; + } + + void operator<<(double val){ + if(m_vecpos >= m_vecsize) m_vecpos=0; + m_output[m_vecpos++] = val; + } + + void operator<<(double* vector){ + for(m_vecpos=0;m_vecpos>(SndIO& out); + void operator<<(SndIO& in); + +#endif + + int PushIn(double *in_vector, int size){ + for(int i = 0; i= m_vecsize) m_vecpos = 0; + m_output[m_vecpos++] = in_vector[i]; + } + return m_vecpos; + } + + int PopOut(double *out_vector, int size){ + for(int i = 0; i= m_vecsize) m_altvecpos = 0; + out_vector[i] = m_output[m_altvecpos++]; + } + return m_altvecpos; + } + + + int AddOut(double *vector, int size){ + for(int i = 0; i= m_vecsize) m_altvecpos = 0; + vector[i] += m_output[m_altvecpos++]; + } + return m_altvecpos; + } + + + void GetMsgList(string* list); + void Enable(){ m_enable = 1; } + void Disable(){ m_enable = 0; } + virtual double Output(int pos){ return m_output[pos%m_vecsize];} + + int GetVectorSize() { return m_vecsize; } + void SetVectorSize(int vecsize); + void LimitVectorSize(int limit) { + if(limit <= m_vecsize_max) + m_vecsize = limit; + } + void RestoreVectorSize(){ m_vecsize = m_vecsize_max; } + double GetSr(){ return m_sr;} + virtual void SetSr(double sr){ m_sr = sr;} + virtual int Set(char* mess, double value); + virtual int Connect(char* mess, void* input); + + + void SetInput(SndObj* input){ + m_input = input; + } + + SndObj* GetInput(){ return m_input; } + + SndObj(SndObj* input, int vecsize = DEF_VECSIZE, double sr = DEF_SR); + SndObj(); +#if !defined (SWIGPYTHON) && !defined(SWIGCFFI) + SndObj(SndObj& obj); +#endif + + virtual ~SndObj(); + virtual char* ErrorMessage(); + virtual const char* CErrorMessage(); + virtual short DoProcess(); + +}; + +int +SndObj::FindMsg(char* mess){ + + msg_link* iter = m_msgtable; + while(iter->previous && iter->msg.compare(mess)) + iter = iter->previous; + if(!iter->msg.compare(mess)) return iter->ID; + else return 0; +} + + +#endif diff --git a/src/sndobj/Table.h b/src/sndobj/Table.h new file mode 100644 index 0000000..f20a2bd --- /dev/null +++ b/src/sndobj/Table.h @@ -0,0 +1,62 @@ + +//////////////////////////////////////////////////////////////////////// +// This file is part of the SndObj library +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// Copyright (c)Victor Lazzarini, 1997-2004 +// See License.txt for a disclaimer of all warranties +// and licensing information + +//************************************************************// +// Table.h: interface of the table abstract base class // +// // +// // +// // +//************************************************************// +#ifndef _TABLE_H +#define _TABLE_H +#include +const double TWOPI = 8.*atan(1.); +class Table { + + protected: + + long m_L; // size; + double* m_table; // table + int m_error; // error code + void ZeroTable () + { + int i; + for(i=0;i +#include +#include + +/* some basic definitions */ +#ifndef BOOL +#define BOOL int +#define TRUE 1 +#define FALSE 0 +#endif + +#define SAMPLE float /* data type used in calculation */ + +#define SHORT_SIZE sizeof(short) +#define INT_SIZE sizeof(int) +#define FLOAT_SIZE sizeof(float) +#define SAMPLE_SIZE sizeof(SAMPLE) +#define PNTR_SIZE sizeof(char *) + +#define PI 3.1415927 +#define TWO_PI 6.2831854 + +/* type definitions for I/O buffers */ +#define REAL 0 /* real only */ +#define IMAG 2 /* imaginary only */ +#define RECT 8 /* real and imaginary */ +#define MAG 16 /* magnitude only */ +#define PHASE 32 /* phase only */ +#define POLAR 64 /* magnitude and phase*/ + +/* scale definitions for I/O buffers */ +#define LINEAR 0 +#define DB 1 /* 20log10 */ + +/* transform direction definition */ +#define FORWARD 1 /* Forward FFT */ +#define INVERSE 2 /* Inverse FFT */ + +/* window type definitions */ +#define HANNING 1 +#define RECTANGULAR 0 + + + +/* network structure definition */ + +typedef struct Tfft_net { + int n; + int stages; + int bps; + int direction; + int window_type; + int *load_index; + SAMPLE *window, *inv_window; + SAMPLE *regr; + SAMPLE *regi; + SAMPLE **indexpr; + SAMPLE **indexpi; + SAMPLE **indexqr; + SAMPLE **indexqi; + SAMPLE *coeffr, *inv_coeffr; + SAMPLE *coeffi, *inv_coeffi; + struct Tfft_net *next; +} FFT_NET; + + +void cfft(int trnsfrm_dir, int npnt, int window, + float *source_buf, int source_form, int source_scale, + float *result_buf, int result_form, int result_scale, int debug); + + +/*****************************************************************************/ +/* GLOBAL DECLARATIONS */ +/*****************************************************************************/ + +static FFT_NET *firstnet; + +/* prototypes */ + +void net_alloc(FFT_NET *fft_net); +void net_dealloc(FFT_NET *fft_net); +int power_of_two(int n); +void create_hanning(SAMPLE *window, int n, SAMPLE scale); +void create_rectangular(SAMPLE *window, int n, SAMPLE scale); +void short_to_float(short *short_buf, float *float_buf, int n); +void load_registers(FFT_NET *fft_net, float *buf, int buf_form, + int buf_scale, int trnsfrm_dir); +void compute_fft(FFT_NET *fft_net); +void store_registers(FFT_NET *fft_net, float *buf, int buf_form, + int buf_scale, int debug); +void build_fft_network(FFT_NET *fft_net, int n, int window_type); + +/*****************************************************************************/ +/* GENERALIZED FAST FOURIER TRANSFORM MODULE */ +/*****************************************************************************/ + +void cfft(int trnsfrm_dir, int npnt, int window, + float *source_buf, int source_form, int source_scale, + float *result_buf, int result_form, int result_scale, int debug) + +/* modifies: result_buf + effects: Computes npnt FFT specified by form, scale, and dir parameters. + Source samples (single precision float) are taken from soure_buf and + the transfrmd representation is stored in result_buf (single precision + float). The parameters are defined as follows: + + trnsfrm_dir = FORWARD | INVERSE + npnt = 2^k for some any positive integer k + window = HANNING | RECTANGULAR + (RECT = real and imag parts, POLAR = magnitude and phase) + source_form = REAL | IMAG | RECT | POLAR + result_form = REAL | IMAG | RECT | MAG | PHASE | POLAR + xxxxxx_scale= LINEAR | DB ( 20log10 |mag| ) + + The input/output buffers are stored in a form appropriate to the type. + For example: REAL => {real, real, real ...}, + MAG => {mag, mag, mag, ... }, + RECT => {real, imag, real, imag, ... }, + POLAR => {mag, phase, mag, phase, ... }. + + To look at the magnitude (in db) of a 1024 point FFT of a real time + signal we have: + + fft(FORWARD, 1024, RECTANGULAR, input, REAL, LINEAR, output, MAG, DB) + + All possible input and output combinations are possible given the + choice of type and scale parameters. +*/ + +{ + FFT_NET *thisnet = (FFT_NET *)0; + FFT_NET *lastnet = (FFT_NET *)0; + + /* A linked list of fft networks of different sizes is maintained to + avoid building with every call. The network is built on the first + call but reused for subsequent calls requesting the same size + transformation. + */ + + thisnet=firstnet; + while (thisnet) { + if (!(thisnet->n == npnt) || !(thisnet->window_type == window)) { + /* current net doesn't match size or window type */ + lastnet=thisnet; + thisnet=thisnet->next; + continue; /* keep looking */ + } + + else { /* network matches desired size */ + load_registers(thisnet, source_buf, source_form, source_scale, + trnsfrm_dir); + compute_fft(thisnet); /* do transformation */ + store_registers(thisnet, result_buf, result_form, result_scale,debug); + return; + } + } + + /* none of existing networks match required size*/ + + if (lastnet) { /* add new network to end of list */ + thisnet = (FFT_NET *)malloc(sizeof(FFT_NET)); /* allocate */ + thisnet->next = 0; + lastnet->next = thisnet; /* add to end of list */ + } + else { /* first network to be created */ + thisnet=firstnet=(FFT_NET *)malloc(sizeof(FFT_NET)); /* alloc. */ + thisnet->next = 0; + } + + /* build new network and compute transformation */ + build_fft_network(thisnet, npnt, window); + load_registers(thisnet, source_buf, source_form, source_scale, + trnsfrm_dir); + compute_fft(thisnet); + store_registers(thisnet, result_buf, result_form, result_scale,debug); + return; +} + +void fft_clear(void) + +/* effects: Deallocates all preserved FFT networks. Should be used when + finished with all computations. +*/ + +{ + FFT_NET *thisnet, *nextnet; + + if (firstnet) { + thisnet=firstnet; + do { + nextnet = thisnet->next; + net_dealloc(thisnet); + free((char *)thisnet); + } while (thisnet = nextnet); + } +} + + +/*****************************************************************************/ +/* NETWORK CONSTRUCTION */ +/*****************************************************************************/ + +void build_fft_network(FFT_NET *fft_net, int n, int window_type) + + +/* modifies:fft_net + effects: Constructs the fft network as described in fft.h. Butterfly + coefficients, read/write indicies, bit reversed load indicies, + and array allocations are computed. +*/ + +{ + int cntr, i, j, s; + int stages, bps; + int **p, **q, *pp, *qp; + SAMPLE two_pi_div_n = TWO_PI / n; + + + /* network definition */ + fft_net->n = n; + fft_net->bps = bps = n/2; + for (i = 0, j = n; j > 1; j >>= 1, i++); + fft_net->stages = stages = i; + fft_net->direction = FORWARD; + fft_net->window_type = window_type; + fft_net->next = (FFT_NET *)0; + + /* allocate registers, index, coefficient arrays */ + net_alloc(fft_net); + + + /* create appropriate windows */ + if (window_type==HANNING) { + create_hanning(fft_net->window, n, 1.); + create_hanning(fft_net->inv_window, n, 1./n); + } + else { + create_rectangular(fft_net->window, n, 1.); + create_rectangular(fft_net->inv_window, n, 1./n); + } + + + /* calculate butterfly coefficients */ { + + int num_diff_coeffs, power_inc, power; + SAMPLE *coeffpr = fft_net->coeffr; + SAMPLE *coeffpi = fft_net->coeffi; + SAMPLE *inv_coeffpr = fft_net->inv_coeffr; + SAMPLE *inv_coeffpi = fft_net->inv_coeffi; + + /* stage one coeffs are 1 + 0j */ + for (i = 0; i < bps; i++) { + *coeffpr = *inv_coeffpr = 1.; + *coeffpi = *inv_coeffpi = 0.; + coeffpr++; inv_coeffpr++; + coeffpi++; inv_coeffpi++; + } + + /* stage 2 to last stage coeffs need calculation */ + /* (1< 2^r */ + for (s = 2; s <= stages; s++) { + + num_diff_coeffs = n / (1 << (stages - s + 1)); + power_inc = 1 << (stages -s); + cntr = 0; + + for (i = bps/num_diff_coeffs; i > 0; i--) { + + power = 0; + + for (j = num_diff_coeffs; j > 0; j--) { + *coeffpr = cos(two_pi_div_n*power); + *inv_coeffpr = cos(two_pi_div_n*power); +/* AAA change these signs */ *coeffpi = -sin(two_pi_div_n*power); +/* change back */ *inv_coeffpi = sin(two_pi_div_n*power); + power += power_inc; + coeffpr++; inv_coeffpr++; + coeffpi++; inv_coeffpi++; + } + } + } + } + + /* calculate network indicies: stage exchange indicies are + calculated and then used as offset values from the base + register locations. The final addresses are then stored in + fft_net. + */ { + + int index, inc; + SAMPLE **indexpr = fft_net->indexpr; + SAMPLE **indexpi = fft_net->indexpi; + SAMPLE **indexqr = fft_net->indexqr; + SAMPLE **indexqi = fft_net->indexqi; + SAMPLE *regr = fft_net->regr; + SAMPLE *regi = fft_net->regi; + + + /* allocate temporary 2d stage exchange index, 1d temp + load index */ + p = (int **)malloc(stages * PNTR_SIZE); + q = (int **)malloc(stages * PNTR_SIZE); + + for (s = 0; s < stages; s++) { + p[s] = (int *)malloc(bps * INT_SIZE); + q[s] = (int *)malloc(bps * INT_SIZE); + } + + /* calculate stage exchange indicies: */ + for (s = 0; s < stages; s++) { + pp = p[s]; + qp = q[s]; + inc = 1 << s; + cntr = 1 << (stages-s-1); + i = j = index = 0; + + do { + do { + qp[i] = index + inc; + pp[i++] = index++; + } while (++j < inc); + index = qp[i-1] + 1; + j = 0; + } while (--cntr); + } + + /* compute actual address values using indicies as offsets */ + for (s = 0; s < stages; s++) { + for (i = 0; i < bps; i++) { + *indexpr++ = regr + p[s][i]; + *indexpi++ = regi + p[s][i]; + *indexqr++ = regr + q[s][i]; + *indexqi++ = regi + q[s][i]; + } + } + } + + + /* calculate load indicies (bit reverse ordering) */ + /* bit reverse ordering achieved by passing normal + order indicies backwards through the network */ + + /* init to normal order indicies */ { + int *load_index,*load_indexp; + int *temp_indexp, *temp_index; + temp_index=temp_indexp=(int *)malloc(n * INT_SIZE); + + i = 0; j = n; + load_index = load_indexp = fft_net->load_index; + + while (j--) + *load_indexp++ = i++; + + /* pass indicies backwards through net */ + for (s = stages - 1; s > 0; s--) { + pp = p[s]; + qp = q[s]; + + for (i = 0; i < bps; i++) { + temp_index[pp[i]]=load_index[2*i]; + temp_index[qp[i]]=load_index[2*i+1]; + } + j = n; + load_indexp = load_index; + temp_indexp = temp_index; + while (j--) + *load_indexp++ = *temp_indexp++; + } + + /* free all temporary arrays */ + free((char *)temp_index); + for (s = 0; s < stages; s++) { + free((char *)p[s]);free((char *)q[s]); + } + free((char *)p);free((char *)q); + } +} + + + +/*****************************************************************************/ +/* REGISTER LOAD AND STORE */ +/*****************************************************************************/ + +void load_registers(FFT_NET *fft_net, float *buf, int buf_form, + int buf_scale, int trnsfrm_dir) + +/* effects: Multiplies the input buffer with the appropriate window and + stores the resulting values in the initial registers of the + network. Input buffer must contain values appropriate to form. + For RECT, the buffer contains real num. followed by imag num, + and for POLAR, it contains magnitude followed by phase. Pure + inputs are listed normally. Both LINEAR and DB scales are + interpreted. +*/ + +{ + int *load_index = fft_net->load_index; + SAMPLE *window; + int index, i = 0, n = fft_net->n; + + if (trnsfrm_dir==FORWARD) window = fft_net->window; + else if (trnsfrm_dir==INVERSE) window = fft_net->inv_window; + else { + fprintf(stderr, "load_registers:illegal transform direction\n"); + exit(0); + } + fft_net->direction = trnsfrm_dir; + + switch(buf_scale) { + case LINEAR: { + + switch (buf_form) { + case REAL: { /* pure REAL */ + while (i < fft_net->n) { + index = load_index[i]; + fft_net->regr[i]=(SAMPLE)buf[index] * window[index]; + fft_net->regi[i]=0.; + i++; + } + } break; + + case IMAG: { /* pure IMAGinary */ + while (i < fft_net->n) { + index = load_index[i]; + fft_net->regr[i]=0; + fft_net->regi[i]=(SAMPLE)buf[index] * window[index]; + i++; + } + } break; + + case RECT: { /* both REAL and IMAGinary */ + while (i < fft_net->n) { + index = load_index[i]; + fft_net->regr[i]=(SAMPLE)buf[index*2] * window[index]; + fft_net->regi[i]=(SAMPLE)buf[index*2+1] * window[index]; + i++; + } + } break; + + case POLAR: { /* magnitude followed by phase */ + while (i < fft_net->n) { + index = load_index[i]; + fft_net->regr[i]=(SAMPLE)(buf[index*2] * cos(buf[index*2+1])) + * window[index]; + fft_net->regi[i]=(SAMPLE)(buf[index*2] * sin(buf[index*2+1])) + * window[index]; + i++; + } + } break; + + default: { + fprintf(stderr, "load_registers:illegal input form\n"); + exit(0); + } break; + } + } break; + + case DB: { + + switch (buf_form) { + case REAL: { /* log pure REAL */ + while (i < fft_net->n) { + index = load_index[i]; + fft_net->regr[i]=(SAMPLE)pow(10., (1./20.)*buf[index]) + * window[index]; /* window scaling after linearization */ + fft_net->regi[i]=0.; + i++; + } + } break; + + case IMAG: { /* log pure IMAGinary */ + while (i < fft_net->n) { + index = load_index[i]; + fft_net->regr[i]=0.; + fft_net->regi[i]=(SAMPLE)pow(10., (1./20.)*buf[index]) + * window[index]; + i++; + } + } break; + + case RECT: { /* log REAL and log IMAGinary */ + while (i < fft_net->n) { + index = load_index[i]; + fft_net->regr[i]=(SAMPLE)pow(10., (1./20.)*buf[index*2]) + * window[index]; + fft_net->regi[i]=(SAMPLE)pow(10., (1./20.)*buf[index*2+1]) + * window[index]; + i++; + } + } break; + + case POLAR: { /* log mag followed by phase */ + while (i < fft_net->n) { + index = load_index[i]; + fft_net->regr[i]=(SAMPLE)(pow(10., (1./20.)*buf[index*2]) + * cos(buf[index*2+1])) * window[index]; + fft_net->regi[i]=(SAMPLE)(pow(10., (1./20.)*buf[index*2]) + * sin(buf[index*2+1])) * window[index]; + i++; + } + } break; + + default: { + fprintf(stderr, "load_registers:illegal input form\n"); + exit(0); + } break; + } + } break; + + default: { + fprintf(stderr, "load_registers:illegal input scale\n"); + exit(0); + } break; + } +} + + +void store_registers(FFT_NET *fft_net, float *buf, int buf_form, + int buf_scale, int debug) + +/* modifies: buf + effects: Writes the final contents of the network registers into buf in + either linear or db scale, polar or rectangular form. If any of + the pure forms(REAL, IMAG, MAG, or PHASE) are used then only the + corresponding part of the registers is stored in buf. +*/ + +{ + int i; + SAMPLE real, imag, mag, phase; + int n; + + i = 0; + n = fft_net->n; + + switch (buf_scale) { + case LINEAR: { + + switch (buf_form) { + case REAL: { /* pure REAL */ + do { + *buf++ = (float)fft_net->regr[i]; + } while (++i < n); + } break; + + case IMAG: { /* pure IMAGinary */ + do { + *buf++ = (float)fft_net->regi[i]; + } while (++i < n); + } break; + + case RECT: { /* both REAL and IMAGinary */ + do { + *buf++ = (float)fft_net->regr[i]; + *buf++ = (float)fft_net->regi[i]; + } while (++i < n); + } break; + + case MAG: { /* magnitude only */ + do { + real = fft_net->regr[i]; + imag = fft_net->regi[i]; + *buf++ = (float)sqrt(real*real+imag*imag); + } while (++i < n); + } break; + + case PHASE: { /* phase only */ + do { + real = fft_net->regr[i]; + imag = fft_net->regi[i]; + if (real > .00001) + *buf++ = (float)atan2(imag, real); + else { /* deal with bad case */ + if (imag > 0){ *buf++ = PI / 2.; + if(debug) fprintf(stderr,"real=0 and imag > 0\n");} + else if (imag < 0){ *buf++ = -PI / 2.; + if(debug) fprintf(stderr,"real=0 and imag < 0\n");} + else { *buf++ = 0; + if(debug) fprintf(stderr,"real=0 and imag=0\n");} + } + } while (++i < n); + } break; + + case POLAR: { /* magnitude and phase */ + do { + real = fft_net->regr[i]; + imag = fft_net->regi[i]; + *buf++ = (float)sqrt(real*real+imag*imag); + if (real) /* a hack to avoid div by zero */ + *buf++ = (float)atan2(imag, real); + else { /* deal with bad case */ + if (imag > 0) *buf++ = PI / 2.; + else if (imag < 0) *buf++ = -PI / 2.; + else *buf++ = 0; + } + } while (++i < n); + } break; + + default: { + fprintf(stderr, "store_registers:illegal output form\n"); + exit(0); + } break; + } + } break; + + case DB: { + + switch (buf_form) { + case REAL: { /* real only */ + do { + *buf++ = (float)20.*log10(fft_net->regr[i]); + } while (++i < n); + } break; + + case IMAG: { /* imag only */ + do { + *buf++ = (float)20.*log10(fft_net->regi[i]); + } while (++i < n); + } break; + + case RECT: { /* real and imag */ + do { + *buf++ = (float)20.*log10(fft_net->regr[i]); + *buf++ = (float)20.*log10(fft_net->regi[i]); + } while (++i < n); + } break; + + case MAG: { /* magnitude only */ + do { + real = fft_net->regr[i]; + imag = fft_net->regi[i]; + *buf++ = (float)20.*log10(sqrt(real*real+imag*imag)); + } while (++i < n); + } break; + + case PHASE: { /* phase only */ + do { + real = fft_net->regr[i]; + imag = fft_net->regi[i]; + if (real) + *buf++ = (float)atan2(imag, real); + else { /* deal with bad case */ + if (imag > 0) *buf++ = PI / 2.; + else if (imag < 0) *buf++ = -PI / 2.; + else *buf++ = 0; + } + } while (++i < n); + } break; + + case POLAR: { /* magnitude and phase */ + do { + real = fft_net->regr[i]; + imag = fft_net->regi[i]; + *buf++ = (float)20.*log10(sqrt(real*real+imag*imag)); + if (real) + *buf++ = (float)atan2(imag, real); + else { /* deal with bad case */ + if (imag > 0) *buf++ = PI / 2.; + else if (imag < 0) *buf++ = -PI / 2.; + else *buf++ = 0; + } + } while (++i < n); + } break; + + default: { + fprintf(stderr, "store_registers:illegal output form\n"); + exit(0); + } break; + } + } break; + + default: { + fprintf(stderr, "store_registers:illegal output scale\n"); + exit(0); + } break; + } +} + + + +/*****************************************************************************/ +/* COMPUTE TRANSFORMATION */ +/*****************************************************************************/ + +void compute_fft(FFT_NET *fft_net) + + +/* modifies: fft_net + effects: Passes the values (already loaded) in the registers through + the network, multiplying with appropriate coefficients at each + stage. The fft result will be in the registers at the end of + the computation. The direction of the transformation is indicated + by the network flag 'direction'. The form of the computation is: + + X(pn) = X(p) + C*X(q) + X(qn) = X(p) - C*X(q) + + where X(pn,qn) represents the output of the registers at each stage. + The calculations are actually done in place. Register pointers are + used to speed up the calculations. + + Register and coefficient addresses involved in the calculations + are stored sequentially and are accessed as such. fft_net->indexp, + indexq contain pointers to the relevant addresses, and fft_net->coeffs, + inv_coeffs points to the appropriate coefficients at each stage of the + computation. +*/ + +{ + SAMPLE **xpr, **xpi, **xqr, **xqi, *cr, *ci; + int i; + SAMPLE tpr, tpi, tqr, tqi; + int bps = fft_net->bps; + int cnt = bps * (fft_net->stages - 1); + + /* predetermined register addresses and coefficients */ + xpr = fft_net->indexpr; + xpi = fft_net->indexpi; + xqr = fft_net->indexqr; + xqi = fft_net->indexqi; + + if (fft_net->direction==FORWARD) { /* FORWARD FFT coefficients */ + cr = fft_net->coeffr; + ci = fft_net->coeffi; + } + else { /* INVERSE FFT coefficients */ + cr = fft_net->inv_coeffr; + ci = fft_net->inv_coeffi; + } + + /* stage one coefficients are 1 + 0j so C*X(q)=X(q) */ + /* bps mults can be avoided */ + + for (i = 0; i < bps; i++) { + + /* add X(p) and X(q) */ + tpr = **xpr + **xqr; + tpi = **xpi + **xqi; + tqr = **xpr - **xqr; + tqi = **xpi - **xqi; + + /* exchange register with temp */ + **xpr = tpr; + **xpi = tpi; + **xqr = tqr; + **xqi = tqi; + + /* next set of register for calculations: */ + xpr++; xpi++; xqr++; xqi++; cr++; ci++; + + } + + for (i = 0; i < cnt; i++) { + + /* mult X(q) by coeff C */ + tqr = **xqr * *cr - **xqi * *ci; + tqi = **xqr * *ci + **xqi * *cr; + + /* exchange register with temp */ + **xqr = tqr; + **xqi = tqi; + + /* add X(p) and X(q) */ + tpr = **xpr + **xqr; + tpi = **xpi + **xqi; + tqr = **xpr - **xqr; + tqi = **xpi - **xqi; + + /* exchange register with temp */ + **xpr = tpr; + **xpi = tpi; + **xqr = tqr; + **xqi = tqi; + /* next set of register for calculations: */ + xpr++; xpi++; xqr++; xqi++; cr++; ci++; + } +} + + +/****************************************************************************/ +/* SUPPORT MODULES */ +/****************************************************************************/ + +void net_alloc(FFT_NET *fft_net) + + +/* effects: Allocates appropriate two dimensional arrays and assigns + correct internal pointers. +*/ + +{ + + int stages, bps, n; + + n = fft_net->n; + stages = fft_net->stages; + bps = fft_net->bps; + + + /* two dimensional arrays with elements stored sequentially */ + + fft_net->load_index = (int *)malloc(n * INT_SIZE); + fft_net->regr = (SAMPLE *)malloc(n * SAMPLE_SIZE); + fft_net->regi = (SAMPLE *)malloc(n * SAMPLE_SIZE); + fft_net->coeffr = (SAMPLE *)malloc(stages*bps*SAMPLE_SIZE); + fft_net->coeffi = (SAMPLE *)malloc(stages*bps*SAMPLE_SIZE); + fft_net->inv_coeffr = (SAMPLE *)malloc(stages*bps*SAMPLE_SIZE); + fft_net->inv_coeffi = (SAMPLE *)malloc(stages*bps*SAMPLE_SIZE); + fft_net->indexpr = (SAMPLE **)malloc(stages * bps * PNTR_SIZE); + fft_net->indexpi = (SAMPLE **)malloc(stages * bps * PNTR_SIZE); + fft_net->indexqr = (SAMPLE **)malloc(stages * bps * PNTR_SIZE); + fft_net->indexqi = (SAMPLE **)malloc(stages * bps * PNTR_SIZE); + + /* one dimensional load window */ + fft_net->window = (SAMPLE *)malloc(n * SAMPLE_SIZE); + fft_net->inv_window = (SAMPLE *)malloc(n * SAMPLE_SIZE); +} + +void net_dealloc(FFT_NET *fft_net) + + +/* effects: Deallocates given FFT network. +*/ + +{ + + free((char *)fft_net->load_index); + free((char *)fft_net->regr); + free((char *)fft_net->regi); + free((char *)fft_net->coeffr); + free((char *)fft_net->coeffi); + free((char *)fft_net->inv_coeffr); + free((char *)fft_net->inv_coeffi); + free((char *)fft_net->indexpr); + free((char *)fft_net->indexpi); + free((char *)fft_net->indexqr); + free((char *)fft_net->indexqi); + free((char *)fft_net->window); + free((char *)fft_net->inv_window); +} + + +BOOL power_of_two(n) + +int n; + +/* effects: Returns TRUE if n is a power of two, otherwise FALSE. +*/ + +{ + int i; + + for (i = n; i > 1; i >>= 1) + if (i & 1) return FALSE; /* more than one bit high */ + return TRUE; +} + + +void create_hanning(SAMPLE *window, int n, SAMPLE scale) + +/* effects: Fills the buffer window with a hanning window of the appropriate + size scaled by scale. +*/ + +{ + SAMPLE a, pi_div_n = PI/n; + int k; + + for (k=1; k <= n; k++) { + a = sin(k * pi_div_n); + *window++ = scale * a * a; + } +} + + +void create_rectangular(SAMPLE *window, int n, SAMPLE scale) + +/* effects: Fills the buffer window with a rectangular window of the + appropriate size of height scale. +*/ + +{ + while (n--) + *window++ = scale; +} + + +void short_to_float(short *short_buf, float *float_buf, int n) + +/* effects; Converts short_buf to floats and stores them in float_buf. +*/ + +{ + while (n--) { + *float_buf++ = (float)*short_buf++; + } +} + +void ComplexFFT(float *buf, int npoints) +{ + float *fp, *fp2; + int i; + cfft(FORWARD, npoints, RECTANGULAR, + buf, RECT, LINEAR, buf, RECT, LINEAR, 0); +} + +void ComplexIFFT(float *buf, int npoints) +{ + double renorm; + float *fp, *fp2; + int i; + renorm = (double) npoints; + cfft(INVERSE, npoints, RECTANGULAR, + buf, RECT, LINEAR, buf, RECT, LINEAR, 0); + for (i = npoints << 1, fp = buf; i--; fp++) *fp *= renorm; +} + + + diff --git a/src/sndobj/rfftw/config.c b/src/sndobj/rfftw/config.c new file mode 100644 index 0000000..9e05eeb --- /dev/null +++ b/src/sndobj/rfftw/config.c @@ -0,0 +1,164 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* config.c -- this file contains all the codelets the system knows about */ + +/* $Id: config.c,v 1.1.1.1 2006/05/12 15:14:59 veplaini Exp $ */ + +#include + +/* the signature is the same as the size, for now */ +#define NOTW_CODELET(x) \ + &fftw_no_twiddle_##x##_desc +#define NOTWI_CODELET(x) \ + &fftwi_no_twiddle_##x##_desc + +#define TWIDDLE_CODELET(x) \ + &fftw_twiddle_##x##_desc + +#define TWIDDLEI_CODELET(x) \ + &fftwi_twiddle_##x##_desc + +/* automatically-generated list of codelets */ + +extern fftw_codelet_desc fftw_no_twiddle_1_desc; +extern fftw_codelet_desc fftwi_no_twiddle_1_desc; +extern fftw_codelet_desc fftw_no_twiddle_2_desc; +extern fftw_codelet_desc fftwi_no_twiddle_2_desc; +extern fftw_codelet_desc fftw_no_twiddle_3_desc; +extern fftw_codelet_desc fftwi_no_twiddle_3_desc; +extern fftw_codelet_desc fftw_no_twiddle_4_desc; +extern fftw_codelet_desc fftwi_no_twiddle_4_desc; +extern fftw_codelet_desc fftw_no_twiddle_5_desc; +extern fftw_codelet_desc fftwi_no_twiddle_5_desc; +extern fftw_codelet_desc fftw_no_twiddle_6_desc; +extern fftw_codelet_desc fftwi_no_twiddle_6_desc; +extern fftw_codelet_desc fftw_no_twiddle_7_desc; +extern fftw_codelet_desc fftwi_no_twiddle_7_desc; +extern fftw_codelet_desc fftw_no_twiddle_8_desc; +extern fftw_codelet_desc fftwi_no_twiddle_8_desc; +extern fftw_codelet_desc fftw_no_twiddle_9_desc; +extern fftw_codelet_desc fftwi_no_twiddle_9_desc; +extern fftw_codelet_desc fftw_no_twiddle_10_desc; +extern fftw_codelet_desc fftwi_no_twiddle_10_desc; +extern fftw_codelet_desc fftw_no_twiddle_11_desc; +extern fftw_codelet_desc fftwi_no_twiddle_11_desc; +extern fftw_codelet_desc fftw_no_twiddle_12_desc; +extern fftw_codelet_desc fftwi_no_twiddle_12_desc; +extern fftw_codelet_desc fftw_no_twiddle_13_desc; +extern fftw_codelet_desc fftwi_no_twiddle_13_desc; +extern fftw_codelet_desc fftw_no_twiddle_14_desc; +extern fftw_codelet_desc fftwi_no_twiddle_14_desc; +extern fftw_codelet_desc fftw_no_twiddle_15_desc; +extern fftw_codelet_desc fftwi_no_twiddle_15_desc; +extern fftw_codelet_desc fftw_no_twiddle_16_desc; +extern fftw_codelet_desc fftwi_no_twiddle_16_desc; +extern fftw_codelet_desc fftw_no_twiddle_32_desc; +extern fftw_codelet_desc fftwi_no_twiddle_32_desc; +extern fftw_codelet_desc fftw_no_twiddle_64_desc; +extern fftw_codelet_desc fftwi_no_twiddle_64_desc; +extern fftw_codelet_desc fftw_twiddle_2_desc; +extern fftw_codelet_desc fftwi_twiddle_2_desc; +extern fftw_codelet_desc fftw_twiddle_3_desc; +extern fftw_codelet_desc fftwi_twiddle_3_desc; +extern fftw_codelet_desc fftw_twiddle_4_desc; +extern fftw_codelet_desc fftwi_twiddle_4_desc; +extern fftw_codelet_desc fftw_twiddle_5_desc; +extern fftw_codelet_desc fftwi_twiddle_5_desc; +extern fftw_codelet_desc fftw_twiddle_6_desc; +extern fftw_codelet_desc fftwi_twiddle_6_desc; +extern fftw_codelet_desc fftw_twiddle_7_desc; +extern fftw_codelet_desc fftwi_twiddle_7_desc; +extern fftw_codelet_desc fftw_twiddle_8_desc; +extern fftw_codelet_desc fftwi_twiddle_8_desc; +extern fftw_codelet_desc fftw_twiddle_9_desc; +extern fftw_codelet_desc fftwi_twiddle_9_desc; +extern fftw_codelet_desc fftw_twiddle_10_desc; +extern fftw_codelet_desc fftwi_twiddle_10_desc; +extern fftw_codelet_desc fftw_twiddle_16_desc; +extern fftw_codelet_desc fftwi_twiddle_16_desc; +extern fftw_codelet_desc fftw_twiddle_32_desc; +extern fftw_codelet_desc fftwi_twiddle_32_desc; +extern fftw_codelet_desc fftw_twiddle_64_desc; +extern fftw_codelet_desc fftwi_twiddle_64_desc; + +fftw_codelet_desc *fftw_config[] = +{ + NOTW_CODELET(1), + NOTWI_CODELET(1), + NOTW_CODELET(2), + NOTWI_CODELET(2), + NOTW_CODELET(3), + NOTWI_CODELET(3), + NOTW_CODELET(4), + NOTWI_CODELET(4), + NOTW_CODELET(5), + NOTWI_CODELET(5), + NOTW_CODELET(6), + NOTWI_CODELET(6), + NOTW_CODELET(7), + NOTWI_CODELET(7), + NOTW_CODELET(8), + NOTWI_CODELET(8), + NOTW_CODELET(9), + NOTWI_CODELET(9), + NOTW_CODELET(10), + NOTWI_CODELET(10), + NOTW_CODELET(11), + NOTWI_CODELET(11), + NOTW_CODELET(12), + NOTWI_CODELET(12), + NOTW_CODELET(13), + NOTWI_CODELET(13), + NOTW_CODELET(14), + NOTWI_CODELET(14), + NOTW_CODELET(15), + NOTWI_CODELET(15), + NOTW_CODELET(16), + NOTWI_CODELET(16), + NOTW_CODELET(32), + NOTWI_CODELET(32), + NOTW_CODELET(64), + NOTWI_CODELET(64), + TWIDDLE_CODELET(2), + TWIDDLEI_CODELET(2), + TWIDDLE_CODELET(3), + TWIDDLEI_CODELET(3), + TWIDDLE_CODELET(4), + TWIDDLEI_CODELET(4), + TWIDDLE_CODELET(5), + TWIDDLEI_CODELET(5), + TWIDDLE_CODELET(6), + TWIDDLEI_CODELET(6), + TWIDDLE_CODELET(7), + TWIDDLEI_CODELET(7), + TWIDDLE_CODELET(8), + TWIDDLEI_CODELET(8), + TWIDDLE_CODELET(9), + TWIDDLEI_CODELET(9), + TWIDDLE_CODELET(10), + TWIDDLEI_CODELET(10), + TWIDDLE_CODELET(16), + TWIDDLEI_CODELET(16), + TWIDDLE_CODELET(32), + TWIDDLEI_CODELET(32), + TWIDDLE_CODELET(64), + TWIDDLEI_CODELET(64), + (fftw_codelet_desc *) 0 +}; diff --git a/src/sndobj/rfftw/config.h b/src/sndobj/rfftw/config.h new file mode 100644 index 0000000..c7b543c --- /dev/null +++ b/src/sndobj/rfftw/config.h @@ -0,0 +1,170 @@ +/* -*- C -*- */ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* fftw.h -- system-wide definitions */ +/* $Id: config.h,v 1.1 2007/01/08 10:53:29 veplaini Exp $ */ + +/* configuration options (guessed by configure) */ + +/* Define to empty if the keyword does not work. */ +/* #undef const */ + +/* Define if you have the gettimeofday function. */ +/* #undef HAVE_GETTIMEOFDAY */ + +/* Define if you have the BSDgettimeofday function. */ +/* #undef HAVE_BSDGETTIMEOFDAY */ + +/* Define if you have the header file. */ +/* #undef HAVE_SYS_TIME_H */ + +/* Define if you have the header file. */ +/* #undef HAVE_UNISTD_H */ + +/* Define if you have the header file. */ +/* #undef HAVE_GETOPT_H */ + +/* Define if you have the header file */ +/* #undef HAVE_MALLOC_H */ + +/* Define if you have gethrtime() a la Solaris 2 */ +/* #undef HAVE_GETHRTIME */ +/* #undef HAVE_HRTIME_T */ + +/* Define to sizeof int and long long, if available: */ +#define SIZEOF_INT 0 +#define SIZEOF_LONG_LONG 0 + +#if (SIZEOF_INT != 0) && (SIZEOF_LONG_LONG >= 2 * SIZEOF_INT) +# define LONGLONG_IS_TWOINTS +#endif + +/* Define to use "unsafe" modular multiply (can cause integer overflow + and errors for transforms of large prime sizes using Rader). */ +/* #undef FFTW_ENABLE_UNSAFE_MULMOD */ + +/* Define if you have getopt() */ +/* #undef HAVE_GETOPT */ + +/* Define if you have getopt_long() */ +/* #undef HAVE_GETOPT_LONG */ + +/* Define if you have isnan() */ +/* #undef HAVE_ISNAN */ + +/* Define for enabling the high resolution Pentium timer */ +/* #undef FFTW_ENABLE_PENTIUM_TIMER */ + +/* + * When using FFTW_ENABLE_PENTIUM_TIMER, set FFTW_CYCLES_PER_SEC + * to your real CPU clock speed! + */ +/* This is for 200 MHz */ +/* #define FFTW_CYCLES_PER_SEC 200000000L */ + +/* + * Define to enable a gcc/x86 specific hack that aligns + * the stack to an 8-byte boundary + */ +/* #undef FFTW_ENABLE_I386_HACKS */ + +/* Define when using a version of gcc that aligns the stack properly */ +/* #undef FFTW_GCC_ALIGNS_STACK */ + +/* Define to enable extra runtime checks for debugging. */ +/* #undef FFTW_DEBUG */ + +/* Define to enable vector-recurse feature. */ +/* #undef FFTW_ENABLE_VECTOR_RECURSE */ + +/* + * Define to enable extra runtime checks for the alignment of variables + * in the codelets (causes coredump for misaligned double on x86). + */ +/* #undef FFTW_DEBUG_ALIGNMENT */ + +#define FFTW_VERSION "2.1.3" + +/* Use Win32 high-resolution timer */ +#if defined(__WIN32__) || defined(WIN32) || defined(_WINDOWS) +# define HAVE_WIN32_TIMER +# define HAVE_WIN32 +#endif + +/* Use MacOS Time Manager timer */ +#if defined(MAC) || defined(macintosh) +# define HAVE_MAC_TIMER +# define HAVE_MACOS + +/* Define to use nanosecond timer on PCI PowerMacs: */ +/* (WARNING: experimental, use at your own risk.) */ +/* #undef HAVE_MAC_PCI_TIMER */ +#endif + +/* define if you have alloca.h: */ +/* #undef HAVE_ALLOCA_H */ + +/* define if you have the alloca function: */ +/* #undef HAVE_ALLOCA */ + +/************************** threads configuration ************************/ + +/* The following preprocessor symbols select which threads library + to use when compiling the FFTW threads parallel libraries: */ + +/* #undef FFTW_USING_SOLARIS_THREADS */ +/* #undef FFTW_USING_POSIX_THREADS */ +/* #undef FFTW_USING_BEOS_THREADS */ +/* #undef FFTW_USING_MACH_THREADS */ + +/* #undef HAVE_PTHREAD_CREATE_UNDETACHED */ + +/* #undef HAVE_MACH_CTHREADS_H */ +/* #undef HAVE_CTHREADS_H */ +/* #undef HAVE_CTHREAD_H */ + +#ifdef HAVE_WIN32 +#define FFTW_USING_WIN32_THREADS +#endif + +#ifdef HAVE_MACOS +#define FFTW_USING_MACOS_THREADS +#endif + +/*********************** fortran wrapper configuration *********************/ + +/* These symbols select how to mangle function names so that they will + be recognized by the linker. If none of them are defined, then + Fortran wrappers will not be compiled. */ + +/* #undef FFTW_FORTRANIZE_LOWERCASE */ +/* #undef FFTW_FORTRANIZE_LOWERCASE_UNDERSCORE */ +/* #undef FFTW_FORTRANIZE_UPPERCASE */ +/* #undef FFTW_FORTRANIZE_UPPERCASE_UNDERSCORE */ + +/* define the following if names with an underscore get an extra one: */ +/* #undef FFTW_FORTRANIZE_EXTRA_UNDERSCORE */ + +/* The following symbols control how MPI_Comm data structures are + translated between Fortran and C for the fftw_mpi wrappers. See + the file mpi/fftw_f77_mpi.h for more information. */ +/* #undef HAVE_MPI_COMM_F2C */ +/* #undef FFTW_USE_F77_MPI_COMM */ +/* #undef FFTW_USE_F77_MPI_COMM_P */ diff --git a/src/sndobj/rfftw/executor.c b/src/sndobj/rfftw/executor.c new file mode 100644 index 0000000..667910f --- /dev/null +++ b/src/sndobj/rfftw/executor.c @@ -0,0 +1,465 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* + * executor.c -- execute the fft + */ + +/* $Id: executor.c,v 1.1.1.1 2006/05/12 15:14:50 veplaini Exp $ */ +#include +#include +#include + +const char *fftw_version = "FFTW V" ;//FFTW_VERSION " ($Id: executor.c,v 1.1.1.1 2006/05/12 15:14:50 veplaini Exp $)"; + +/* + * This function is called in other files, so we cannot declare + * it static. + */ +void fftw_strided_copy(int n, fftw_complex *in, int ostride, + fftw_complex *out) +{ + int i; + fftw_real r0, r1, i0, i1; + fftw_real r2, r3, i2, i3; + + i = 0; + + for (; i < (n & 3); ++i) { + out[i * ostride] = in[i]; + } + + for (; i < n; i += 4) { + r0 = c_re(in[i]); + i0 = c_im(in[i]); + r1 = c_re(in[i + 1]); + i1 = c_im(in[i + 1]); + r2 = c_re(in[i + 2]); + i2 = c_im(in[i + 2]); + r3 = c_re(in[i + 3]); + i3 = c_im(in[i + 3]); + c_re(out[i * ostride]) = r0; + c_im(out[i * ostride]) = i0; + c_re(out[(i + 1) * ostride]) = r1; + c_im(out[(i + 1) * ostride]) = i1; + c_re(out[(i + 2) * ostride]) = r2; + c_im(out[(i + 2) * ostride]) = i2; + c_re(out[(i + 3) * ostride]) = r3; + c_im(out[(i + 3) * ostride]) = i3; + } +} + +static void executor_many(int n, const fftw_complex *in, + fftw_complex *out, + fftw_plan_node *p, + int istride, + int ostride, + int howmany, int idist, int odist, + fftw_recurse_kind recurse_kind) +{ + int s; + + switch (p->type) { + case FFTW_NOTW: + { + fftw_notw_codelet *codelet = p->nodeu.notw.codelet; + + HACK_ALIGN_STACK_ODD; + for (s = 0; s < howmany; ++s) + codelet(in + s * idist, + out + s * odist, + istride, ostride); + break; + } + + default: + for (s = 0; s < howmany; ++s) + fftw_executor_simple(n, in + s * idist, + out + s * odist, + p, istride, ostride, + recurse_kind); + } +} + +#ifdef FFTW_ENABLE_VECTOR_RECURSE + +/* executor_many_vector is like executor_many, but it pushes the + howmany loop down to the leaves of the transform: */ +static void executor_many_vector(int n, const fftw_complex *in, + fftw_complex *out, + fftw_plan_node *p, + int istride, + int ostride, + int howmany, int idist, int odist) +{ + int s; + + switch (p->type) { + case FFTW_NOTW: + { + fftw_notw_codelet *codelet = p->nodeu.notw.codelet; + + HACK_ALIGN_STACK_ODD; + for (s = 0; s < howmany; ++s) + codelet(in + s * idist, + out + s * odist, + istride, ostride); + break; + } + + case FFTW_TWIDDLE: + { + int r = p->nodeu.twiddle.size; + int m = n / r; + fftw_twiddle_codelet *codelet; + fftw_complex *W; + + for (s = 0; s < r; ++s) + executor_many_vector(m, in + s * istride, + out + s * (m * ostride), + p->nodeu.twiddle.recurse, + istride * r, ostride, + howmany, idist, odist); + + codelet = p->nodeu.twiddle.codelet; + W = p->nodeu.twiddle.tw->twarray; + + /* This may not be the right thing. We maybe should have + the howmany loop for the twiddle codelets at the + topmost level of the recursion, since odist is big; + i.e. separate recursions for twiddle and notwiddle. */ + HACK_ALIGN_STACK_EVEN; + for (s = 0; s < howmany; ++s) + codelet(out + s * odist, W, m * ostride, m, ostride); + + break; + } + + case FFTW_GENERIC: + { + int r = p->nodeu.generic.size; + int m = n / r; + fftw_generic_codelet *codelet; + fftw_complex *W; + + for (s = 0; s < r; ++s) + executor_many_vector(m, in + s * istride, + out + s * (m * ostride), + p->nodeu.generic.recurse, + istride * r, ostride, + howmany, idist, odist); + + codelet = p->nodeu.generic.codelet; + W = p->nodeu.generic.tw->twarray; + for (s = 0; s < howmany; ++s) + codelet(out + s * odist, W, m, r, n, ostride); + + break; + } + + case FFTW_RADER: + { + int r = p->nodeu.rader.size; + int m = n / r; + fftw_rader_codelet *codelet; + fftw_complex *W; + + for (s = 0; s < r; ++s) + executor_many_vector(m, in + s * istride, + out + s * (m * ostride), + p->nodeu.rader.recurse, + istride * r, ostride, + howmany, idist, odist); + + codelet = p->nodeu.rader.codelet; + W = p->nodeu.rader.tw->twarray; + for (s = 0; s < howmany; ++s) + codelet(out + s * odist, W, m, r, ostride, + p->nodeu.rader.rader_data); + + break; + } + + default: + fftw_die("BUG in executor: invalid plan\n"); + break; + } +} + +#endif /* FFTW_ENABLE_VECTOR_RECURSE */ + +/* + * Do *not* declare simple executor static--we need to call it + * from other files...also, preface its name with "fftw_" + * to avoid any possible name collisions. + */ +void fftw_executor_simple(int n, const fftw_complex *in, + fftw_complex *out, + fftw_plan_node *p, + int istride, + int ostride, + fftw_recurse_kind recurse_kind) +{ + switch (p->type) { + case FFTW_NOTW: + HACK_ALIGN_STACK_ODD; + (p->nodeu.notw.codelet)(in, out, istride, ostride); + break; + + case FFTW_TWIDDLE: + { + int r = p->nodeu.twiddle.size; + int m = n / r; + fftw_twiddle_codelet *codelet; + fftw_complex *W; + +#ifdef FFTW_ENABLE_VECTOR_RECURSE + if (recurse_kind == FFTW_NORMAL_RECURSE) +#endif + executor_many(m, in, out, + p->nodeu.twiddle.recurse, + istride * r, ostride, + r, istride, m * ostride, + FFTW_NORMAL_RECURSE); +#ifdef FFTW_ENABLE_VECTOR_RECURSE + else + executor_many_vector(m, in, out, + p->nodeu.twiddle.recurse, + istride * r, ostride, + r, istride, m * ostride); +#endif + + codelet = p->nodeu.twiddle.codelet; + W = p->nodeu.twiddle.tw->twarray; + + HACK_ALIGN_STACK_EVEN; + codelet(out, W, m * ostride, m, ostride); + + break; + } + + case FFTW_GENERIC: + { + int r = p->nodeu.generic.size; + int m = n / r; + fftw_generic_codelet *codelet; + fftw_complex *W; + +#ifdef FFTW_ENABLE_VECTOR_RECURSE + if (recurse_kind == FFTW_NORMAL_RECURSE) +#endif + executor_many(m, in, out, + p->nodeu.generic.recurse, + istride * r, ostride, + r, istride, m * ostride, + FFTW_NORMAL_RECURSE); +#ifdef FFTW_ENABLE_VECTOR_RECURSE + else + executor_many_vector(m, in, out, + p->nodeu.generic.recurse, + istride * r, ostride, + r, istride, m * ostride); +#endif + + codelet = p->nodeu.generic.codelet; + W = p->nodeu.generic.tw->twarray; + codelet(out, W, m, r, n, ostride); + + break; + } + + case FFTW_RADER: + { + int r = p->nodeu.rader.size; + int m = n / r; + fftw_rader_codelet *codelet; + fftw_complex *W; + +#ifdef FFTW_ENABLE_VECTOR_RECURSE + if (recurse_kind == FFTW_NORMAL_RECURSE) +#endif + executor_many(m, in, out, + p->nodeu.rader.recurse, + istride * r, ostride, + r, istride, m * ostride, + FFTW_NORMAL_RECURSE); +#ifdef FFTW_ENABLE_VECTOR_RECURSE + else + executor_many_vector(m, in, out, + p->nodeu.rader.recurse, + istride * r, ostride, + r, istride, m * ostride); +#endif + + codelet = p->nodeu.rader.codelet; + W = p->nodeu.rader.tw->twarray; + codelet(out, W, m, r, ostride, + p->nodeu.rader.rader_data); + + break; + } + + default: + fftw_die("BUG in executor: invalid plan\n"); + break; + } +} + +static void executor_simple_inplace(int n, fftw_complex *in, + fftw_complex *out, + fftw_plan_node *p, + int istride, + fftw_recurse_kind recurse_kind) +{ + switch (p->type) { + case FFTW_NOTW: + HACK_ALIGN_STACK_ODD; + (p->nodeu.notw.codelet)(in, in, istride, istride); + break; + + default: + { + fftw_complex *tmp; + + if (out) + tmp = out; + else + tmp = (fftw_complex *) + fftw_malloc(n * sizeof(fftw_complex)); + + fftw_executor_simple(n, in, tmp, p, istride, 1, + recurse_kind); + fftw_strided_copy(n, tmp, istride, in); + + if (!out) + fftw_free(tmp); + } + } +} + +static void executor_many_inplace(int n, fftw_complex *in, + fftw_complex *out, + fftw_plan_node *p, + int istride, + int howmany, int idist, + fftw_recurse_kind recurse_kind) +{ + switch (p->type) { + case FFTW_NOTW: + { + fftw_notw_codelet *codelet = p->nodeu.notw.codelet; + int s; + + HACK_ALIGN_STACK_ODD; + for (s = 0; s < howmany; ++s) + codelet(in + s * idist, + in + s * idist, + istride, istride); + break; + } + + default: + { + int s; + fftw_complex *tmp; + if (out) + tmp = out; + else + tmp = (fftw_complex *) + fftw_malloc(n * sizeof(fftw_complex)); + + for (s = 0; s < howmany; ++s) { + fftw_executor_simple(n, + in + s * idist, + tmp, + p, istride, 1, recurse_kind); + fftw_strided_copy(n, tmp, istride, in + s * idist); + } + + if (!out) + fftw_free(tmp); + } + } +} + +/* user interface */ +void fftw(fftw_plan plan, int howmany, fftw_complex *in, int istride, + int idist, fftw_complex *out, int ostride, int odist) +{ + int n = plan->n; + + if (plan->flags & FFTW_IN_PLACE) { + if (howmany == 1) { + executor_simple_inplace(n, in, out, plan->root, istride, + plan->recurse_kind); + } else { + executor_many_inplace(n, in, out, plan->root, istride, howmany, + idist, plan->recurse_kind); + } + } else { + if (howmany == 1) { + fftw_executor_simple(n, in, out, plan->root, istride, ostride, + plan->recurse_kind); + } else { +#ifdef FFTW_ENABLE_VECTOR_RECURSE + int vector_size = plan->vector_size; + if (vector_size <= 1) +#endif + executor_many(n, in, out, plan->root, istride, ostride, + howmany, idist, odist, plan->recurse_kind); +#ifdef FFTW_ENABLE_VECTOR_RECURSE + else { + int s; + int num_vects = howmany / vector_size; + fftw_plan_node *root = plan->root; + + for (s = 0; s < num_vects; ++s) + executor_many_vector(n, + in + s * (vector_size * idist), + out + s * (vector_size * odist), + root, + istride, ostride, + vector_size, idist, odist); + + s = howmany % vector_size; + if (s > 0) + executor_many(n, + in + num_vects * (vector_size * idist), + out + num_vects * (vector_size * odist), + root, + istride, ostride, + s, idist, odist, + FFTW_NORMAL_RECURSE); + } +#endif + } + } +} + +void fftw_one(fftw_plan plan, fftw_complex *in, fftw_complex *out) +{ + int n = plan->n; + + if (plan->flags & FFTW_IN_PLACE) + executor_simple_inplace(n, in, out, plan->root, 1, + plan->recurse_kind); + else + fftw_executor_simple(n, in, out, plan->root, 1, 1, + plan->recurse_kind); +} diff --git a/src/sndobj/rfftw/f77_func.h b/src/sndobj/rfftw/f77_func.h new file mode 100644 index 0000000..00d94b5 --- /dev/null +++ b/src/sndobj/rfftw/f77_func.h @@ -0,0 +1,61 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#ifndef F77_FUNC_H +#define F77_FUNC_H + +#include + +/* Define a macro to mangle function names so that they can be + recognized by the Fortran linker. Specifically, F77_FUNC_ + is designed to mangle identifiers containing an underscore. */ + +#ifdef FFTW_FORTRANIZE_LOWERCASE +# ifdef FFTW_FORTRANIZE_EXTRA_UNDERSCORE +# define F77_FUNC_(x,X) x ## _ +# else +# define F77_FUNC_(x,X) x +# endif +#endif + +#ifdef FFTW_FORTRANIZE_LOWERCASE_UNDERSCORE +# ifdef FFTW_FORTRANIZE_EXTRA_UNDERSCORE +# define F77_FUNC_(x,X) x ## __ +# else +# define F77_FUNC_(x,X) x ## _ +# endif +#endif + +#ifdef FFTW_FORTRANIZE_UPPERCASE +# ifdef FFTW_FORTRANIZE_EXTRA_UNDERSCORE +# define F77_FUNC_(x,X) X ## _ +# else +# define F77_FUNC_(x,X) X +# endif +#endif + +#ifdef FFTW_FORTRANIZE_UPPERCASE_UNDERSCORE +# ifdef FFTW_FORTRANIZE_EXTRA_UNDERSCORE +# define F77_FUNC_(x,X) X ## __ +# else +# define F77_FUNC_(x,X) X ## _ +# endif +#endif + +#endif /* F77_FUNC_H */ diff --git a/src/sndobj/rfftw/fcr_1.c b/src/sndobj/rfftw/fcr_1.c new file mode 100644 index 0000000..c005d34 --- /dev/null +++ b/src/sndobj/rfftw/fcr_1.c @@ -0,0 +1,59 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:17 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2real 1 */ + +/* + * This function contains 0 FP additions, 0 FP multiplications, + * (or, 0 additions, 0 multiplications, 0 fused multiply/add), + * 1 stack variables, and 2 memory accesses + */ + +/* + * Generator Id's : + * $Id: fcr_1.c,v 1.1.1.1 2006/05/12 15:14:49 veplaini Exp $ + * $Id: fcr_1.c,v 1.1.1.1 2006/05/12 15:14:49 veplaini Exp $ + * $Id: fcr_1.c,v 1.1.1.1 2006/05/12 15:14:49 veplaini Exp $ + */ + +void fftw_hc2real_1(const fftw_real *real_input, const fftw_real *imag_input, fftw_real *output, int real_istride, int imag_istride, int ostride) +{ + fftw_real tmp1; + ASSERT_ALIGNED_DOUBLE; + tmp1 = real_input[0]; + output[0] = tmp1; +} + +fftw_codelet_desc fftw_hc2real_1_desc = +{ + "fftw_hc2real_1", + (void (*)()) fftw_hc2real_1, + 1, + FFTW_BACKWARD, + FFTW_HC2REAL, + 37, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fcr_10.c b/src/sndobj/rfftw/fcr_10.c new file mode 100644 index 0000000..8fd3284 --- /dev/null +++ b/src/sndobj/rfftw/fcr_10.c @@ -0,0 +1,154 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:21 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2real 10 */ + +/* + * This function contains 34 FP additions, 14 FP multiplications, + * (or, 26 additions, 6 multiplications, 8 fused multiply/add), + * 20 stack variables, and 20 memory accesses + */ +static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); +static const fftw_real K1_902113032 = FFTW_KONST(+1.902113032590307144232878666758764286811397268); +static const fftw_real K1_175570504 = FFTW_KONST(+1.175570504584946258337411909278145537195304875); +static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); +static const fftw_real K1_118033988 = FFTW_KONST(+1.118033988749894848204586834365638117720309180); + +/* + * Generator Id's : + * $Id: fcr_10.c,v 1.1.1.1 2006/05/12 15:14:45 veplaini Exp $ + * $Id: fcr_10.c,v 1.1.1.1 2006/05/12 15:14:45 veplaini Exp $ + * $Id: fcr_10.c,v 1.1.1.1 2006/05/12 15:14:45 veplaini Exp $ + */ + +void fftw_hc2real_10(const fftw_real *real_input, const fftw_real *imag_input, fftw_real *output, int real_istride, int imag_istride, int ostride) +{ + fftw_real tmp3; + fftw_real tmp11; + fftw_real tmp23; + fftw_real tmp31; + fftw_real tmp20; + fftw_real tmp30; + fftw_real tmp10; + fftw_real tmp28; + fftw_real tmp14; + fftw_real tmp16; + fftw_real tmp18; + fftw_real tmp19; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp21; + fftw_real tmp22; + ASSERT_ALIGNED_DOUBLE; + tmp1 = real_input[0]; + tmp2 = real_input[5 * real_istride]; + tmp3 = tmp1 - tmp2; + tmp11 = tmp1 + tmp2; + tmp21 = imag_input[4 * imag_istride]; + tmp22 = imag_input[imag_istride]; + tmp23 = tmp21 - tmp22; + tmp31 = tmp21 + tmp22; + } + tmp18 = imag_input[2 * imag_istride]; + tmp19 = imag_input[3 * imag_istride]; + tmp20 = tmp18 - tmp19; + tmp30 = tmp18 + tmp19; + { + fftw_real tmp6; + fftw_real tmp12; + fftw_real tmp9; + fftw_real tmp13; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp4; + fftw_real tmp5; + fftw_real tmp7; + fftw_real tmp8; + ASSERT_ALIGNED_DOUBLE; + tmp4 = real_input[2 * real_istride]; + tmp5 = real_input[3 * real_istride]; + tmp6 = tmp4 - tmp5; + tmp12 = tmp4 + tmp5; + tmp7 = real_input[4 * real_istride]; + tmp8 = real_input[real_istride]; + tmp9 = tmp7 - tmp8; + tmp13 = tmp7 + tmp8; + } + tmp10 = tmp6 + tmp9; + tmp28 = K1_118033988 * (tmp6 - tmp9); + tmp14 = tmp12 + tmp13; + tmp16 = K1_118033988 * (tmp12 - tmp13); + } + output[5 * ostride] = tmp3 + (K2_000000000 * tmp10); + { + fftw_real tmp32; + fftw_real tmp34; + fftw_real tmp29; + fftw_real tmp33; + fftw_real tmp27; + ASSERT_ALIGNED_DOUBLE; + tmp32 = (K1_175570504 * tmp30) - (K1_902113032 * tmp31); + tmp34 = (K1_902113032 * tmp30) + (K1_175570504 * tmp31); + tmp27 = tmp3 - (K500000000 * tmp10); + tmp29 = tmp27 - tmp28; + tmp33 = tmp28 + tmp27; + output[7 * ostride] = tmp29 - tmp32; + output[3 * ostride] = tmp29 + tmp32; + output[ostride] = tmp33 - tmp34; + output[9 * ostride] = tmp33 + tmp34; + } + output[0] = tmp11 + (K2_000000000 * tmp14); + { + fftw_real tmp24; + fftw_real tmp26; + fftw_real tmp17; + fftw_real tmp25; + fftw_real tmp15; + ASSERT_ALIGNED_DOUBLE; + tmp24 = (K1_175570504 * tmp20) - (K1_902113032 * tmp23); + tmp26 = (K1_902113032 * tmp20) + (K1_175570504 * tmp23); + tmp15 = tmp11 - (K500000000 * tmp14); + tmp17 = tmp15 - tmp16; + tmp25 = tmp16 + tmp15; + output[2 * ostride] = tmp17 - tmp24; + output[8 * ostride] = tmp17 + tmp24; + output[6 * ostride] = tmp25 - tmp26; + output[4 * ostride] = tmp25 + tmp26; + } +} + +fftw_codelet_desc fftw_hc2real_10_desc = +{ + "fftw_hc2real_10", + (void (*)()) fftw_hc2real_10, + 10, + FFTW_BACKWARD, + FFTW_HC2REAL, + 235, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fcr_11.c b/src/sndobj/rfftw/fcr_11.c new file mode 100644 index 0000000..e03295e --- /dev/null +++ b/src/sndobj/rfftw/fcr_11.c @@ -0,0 +1,123 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:22 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2real 11 */ + +/* + * This function contains 60 FP additions, 51 FP multiplications, + * (or, 59 additions, 50 multiplications, 1 fused multiply/add), + * 21 stack variables, and 22 memory accesses + */ +static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); +static const fftw_real K1_918985947 = FFTW_KONST(+1.918985947228994779780736114132655398124909697); +static const fftw_real K1_309721467 = FFTW_KONST(+1.309721467890570128113850144932587106367582399); +static const fftw_real K284629676 = FFTW_KONST(+0.284629676546570280887585337232739337582102722); +static const fftw_real K830830026 = FFTW_KONST(+0.830830026003772851058548298459246407048009821); +static const fftw_real K1_682507065 = FFTW_KONST(+1.682507065662362337723623297838735435026584997); +static const fftw_real K563465113 = FFTW_KONST(+0.563465113682859395422835830693233798071555798); +static const fftw_real K1_511499148 = FFTW_KONST(+1.511499148708516567548071687944688840359434890); +static const fftw_real K1_979642883 = FFTW_KONST(+1.979642883761865464752184075553437574753038744); +static const fftw_real K1_819263990 = FFTW_KONST(+1.819263990709036742823430766158056920120482102); +static const fftw_real K1_081281634 = FFTW_KONST(+1.081281634911195164215271908637383390863541216); + +/* + * Generator Id's : + * $Id: fcr_11.c,v 1.1.1.1 2006/05/12 15:15:01 veplaini Exp $ + * $Id: fcr_11.c,v 1.1.1.1 2006/05/12 15:15:01 veplaini Exp $ + * $Id: fcr_11.c,v 1.1.1.1 2006/05/12 15:15:01 veplaini Exp $ + */ + +void fftw_hc2real_11(const fftw_real *real_input, const fftw_real *imag_input, fftw_real *output, int real_istride, int imag_istride, int ostride) +{ + fftw_real tmp13; + fftw_real tmp21; + fftw_real tmp15; + fftw_real tmp17; + fftw_real tmp19; + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp6; + fftw_real tmp5; + fftw_real tmp4; + fftw_real tmp3; + fftw_real tmp7; + fftw_real tmp20; + fftw_real tmp14; + fftw_real tmp16; + fftw_real tmp18; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp8; + fftw_real tmp12; + fftw_real tmp9; + fftw_real tmp10; + fftw_real tmp11; + ASSERT_ALIGNED_DOUBLE; + tmp8 = imag_input[2 * imag_istride]; + tmp12 = imag_input[imag_istride]; + tmp9 = imag_input[4 * imag_istride]; + tmp10 = imag_input[5 * imag_istride]; + tmp11 = imag_input[3 * imag_istride]; + tmp13 = (K1_081281634 * tmp8) + (K1_819263990 * tmp9) - (K1_979642883 * tmp10) - (K1_511499148 * tmp11) - (K563465113 * tmp12); + tmp21 = (K1_979642883 * tmp8) + (K1_819263990 * tmp10) - (K563465113 * tmp9) - (K1_081281634 * tmp11) - (K1_511499148 * tmp12); + tmp15 = (K563465113 * tmp8) + (K1_819263990 * tmp11) - (K1_511499148 * tmp10) - (K1_081281634 * tmp9) - (K1_979642883 * tmp12); + tmp17 = (K1_081281634 * tmp12) + (K1_819263990 * tmp8) + (K1_979642883 * tmp11) + (K1_511499148 * tmp9) + (K563465113 * tmp10); + tmp19 = (K563465113 * tmp11) + (K1_979642883 * tmp9) + (K1_081281634 * tmp10) - (K1_511499148 * tmp8) - (K1_819263990 * tmp12); + } + tmp1 = real_input[0]; + tmp2 = real_input[real_istride]; + tmp6 = real_input[5 * real_istride]; + tmp5 = real_input[4 * real_istride]; + tmp4 = real_input[3 * real_istride]; + tmp3 = real_input[2 * real_istride]; + tmp7 = tmp1 + (K1_682507065 * tmp3) + (K830830026 * tmp5) - (K284629676 * tmp6) - (K1_309721467 * tmp4) - (K1_918985947 * tmp2); + tmp20 = tmp1 + (K1_682507065 * tmp4) + (K830830026 * tmp6) - (K1_918985947 * tmp5) - (K284629676 * tmp3) - (K1_309721467 * tmp2); + tmp14 = tmp1 + (K830830026 * tmp4) + (K1_682507065 * tmp5) - (K1_309721467 * tmp6) - (K1_918985947 * tmp3) - (K284629676 * tmp2); + tmp16 = tmp1 + (K1_682507065 * tmp2) + (K830830026 * tmp3) - (K1_918985947 * tmp6) - (K1_309721467 * tmp5) - (K284629676 * tmp4); + tmp18 = tmp1 + (K830830026 * tmp2) + (K1_682507065 * tmp6) - (K284629676 * tmp5) - (K1_918985947 * tmp4) - (K1_309721467 * tmp3); + output[6 * ostride] = tmp7 - tmp13; + output[5 * ostride] = tmp7 + tmp13; + output[7 * ostride] = tmp20 - tmp21; + output[4 * ostride] = tmp20 + tmp21; + output[0] = tmp1 + (K2_000000000 * (tmp2 + tmp3 + tmp4 + tmp5 + tmp6)); + output[2 * ostride] = tmp18 + tmp19; + output[9 * ostride] = tmp18 - tmp19; + output[10 * ostride] = tmp16 + tmp17; + output[ostride] = tmp16 - tmp17; + output[8 * ostride] = tmp14 - tmp15; + output[3 * ostride] = tmp14 + tmp15; +} + +fftw_codelet_desc fftw_hc2real_11_desc = +{ + "fftw_hc2real_11", + (void (*)()) fftw_hc2real_11, + 11, + FFTW_BACKWARD, + FFTW_HC2REAL, + 257, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fcr_12.c b/src/sndobj/rfftw/fcr_12.c new file mode 100644 index 0000000..effd9a0 --- /dev/null +++ b/src/sndobj/rfftw/fcr_12.c @@ -0,0 +1,168 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:23 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2real 12 */ + +/* + * This function contains 38 FP additions, 10 FP multiplications, + * (or, 34 additions, 6 multiplications, 4 fused multiply/add), + * 22 stack variables, and 24 memory accesses + */ +static const fftw_real K1_732050807 = FFTW_KONST(+1.732050807568877293527446341505872366942805254); +static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); + +/* + * Generator Id's : + * $Id: fcr_12.c,v 1.1.1.1 2006/05/12 15:15:01 veplaini Exp $ + * $Id: fcr_12.c,v 1.1.1.1 2006/05/12 15:15:01 veplaini Exp $ + * $Id: fcr_12.c,v 1.1.1.1 2006/05/12 15:15:01 veplaini Exp $ + */ + +void fftw_hc2real_12(const fftw_real *real_input, const fftw_real *imag_input, fftw_real *output, int real_istride, int imag_istride, int ostride) +{ + fftw_real tmp8; + fftw_real tmp11; + fftw_real tmp22; + fftw_real tmp36; + fftw_real tmp32; + fftw_real tmp33; + fftw_real tmp25; + fftw_real tmp37; + fftw_real tmp3; + fftw_real tmp27; + fftw_real tmp16; + fftw_real tmp6; + fftw_real tmp28; + fftw_real tmp20; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp9; + fftw_real tmp10; + fftw_real tmp23; + fftw_real tmp24; + ASSERT_ALIGNED_DOUBLE; + tmp8 = real_input[3 * real_istride]; + tmp9 = real_input[5 * real_istride]; + tmp10 = real_input[real_istride]; + tmp11 = tmp9 + tmp10; + tmp22 = (K2_000000000 * tmp8) - tmp11; + tmp36 = K1_732050807 * (tmp9 - tmp10); + tmp32 = imag_input[3 * imag_istride]; + tmp23 = imag_input[5 * imag_istride]; + tmp24 = imag_input[imag_istride]; + tmp33 = tmp23 + tmp24; + tmp25 = K1_732050807 * (tmp23 - tmp24); + tmp37 = (K2_000000000 * tmp32) + tmp33; + } + { + fftw_real tmp15; + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp13; + fftw_real tmp14; + ASSERT_ALIGNED_DOUBLE; + tmp14 = imag_input[4 * imag_istride]; + tmp15 = K1_732050807 * tmp14; + tmp1 = real_input[0]; + tmp2 = real_input[4 * real_istride]; + tmp13 = tmp1 - tmp2; + tmp3 = tmp1 + (K2_000000000 * tmp2); + tmp27 = tmp13 - tmp15; + tmp16 = tmp13 + tmp15; + } + { + fftw_real tmp19; + fftw_real tmp4; + fftw_real tmp5; + fftw_real tmp17; + fftw_real tmp18; + ASSERT_ALIGNED_DOUBLE; + tmp18 = imag_input[2 * imag_istride]; + tmp19 = K1_732050807 * tmp18; + tmp4 = real_input[6 * real_istride]; + tmp5 = real_input[2 * real_istride]; + tmp17 = tmp4 - tmp5; + tmp6 = tmp4 + (K2_000000000 * tmp5); + tmp28 = tmp17 + tmp19; + tmp20 = tmp17 - tmp19; + } + { + fftw_real tmp7; + fftw_real tmp12; + fftw_real tmp39; + fftw_real tmp40; + ASSERT_ALIGNED_DOUBLE; + tmp7 = tmp3 + tmp6; + tmp12 = K2_000000000 * (tmp8 + tmp11); + output[6 * ostride] = tmp7 - tmp12; + output[0] = tmp7 + tmp12; + { + fftw_real tmp31; + fftw_real tmp34; + fftw_real tmp21; + fftw_real tmp26; + ASSERT_ALIGNED_DOUBLE; + tmp31 = tmp3 - tmp6; + tmp34 = K2_000000000 * (tmp32 - tmp33); + output[9 * ostride] = tmp31 - tmp34; + output[3 * ostride] = tmp31 + tmp34; + tmp21 = tmp16 + tmp20; + tmp26 = tmp22 - tmp25; + output[2 * ostride] = tmp21 - tmp26; + output[8 * ostride] = tmp21 + tmp26; + } + tmp39 = tmp16 - tmp20; + tmp40 = tmp37 - tmp36; + output[5 * ostride] = tmp39 - tmp40; + output[11 * ostride] = tmp39 + tmp40; + { + fftw_real tmp35; + fftw_real tmp38; + fftw_real tmp29; + fftw_real tmp30; + ASSERT_ALIGNED_DOUBLE; + tmp35 = tmp27 - tmp28; + tmp38 = tmp36 + tmp37; + output[ostride] = tmp35 - tmp38; + output[7 * ostride] = tmp35 + tmp38; + tmp29 = tmp27 + tmp28; + tmp30 = tmp22 + tmp25; + output[10 * ostride] = tmp29 - tmp30; + output[4 * ostride] = tmp29 + tmp30; + } + } +} + +fftw_codelet_desc fftw_hc2real_12_desc = +{ + "fftw_hc2real_12", + (void (*)()) fftw_hc2real_12, + 12, + FFTW_BACKWARD, + FFTW_HC2REAL, + 279, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fcr_128.c b/src/sndobj/rfftw/fcr_128.c new file mode 100644 index 0000000..41bf4a2 --- /dev/null +++ b/src/sndobj/rfftw/fcr_128.c @@ -0,0 +1,2564 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:29 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2real 128 */ + +/* + * This function contains 956 FP additions, 374 FP multiplications, + * (or, 812 additions, 230 multiplications, 144 fused multiply/add), + * 176 stack variables, and 256 memory accesses + */ +static const fftw_real K555570233 = FFTW_KONST(+0.555570233019602224742830813948532874374937191); +static const fftw_real K831469612 = FFTW_KONST(+0.831469612302545237078788377617905756738560812); +static const fftw_real K195090322 = FFTW_KONST(+0.195090322016128267848284868477022240927691618); +static const fftw_real K980785280 = FFTW_KONST(+0.980785280403230449126182236134239036973933731); +static const fftw_real K995184726 = FFTW_KONST(+0.995184726672196886244836953109479921575474869); +static const fftw_real K098017140 = FFTW_KONST(+0.098017140329560601994195563888641845861136673); +static const fftw_real K471396736 = FFTW_KONST(+0.471396736825997648556387625905254377657460319); +static const fftw_real K881921264 = FFTW_KONST(+0.881921264348355029712756863660388349508442621); +static const fftw_real K803207531 = FFTW_KONST(+0.803207531480644909806676512963141923879569427); +static const fftw_real K595699304 = FFTW_KONST(+0.595699304492433343467036528829969889511926338); +static const fftw_real K989176509 = FFTW_KONST(+0.989176509964780973451673738016243063983689533); +static const fftw_real K146730474 = FFTW_KONST(+0.146730474455361751658850129646717819706215317); +static const fftw_real K773010453 = FFTW_KONST(+0.773010453362736960810906609758469800971041293); +static const fftw_real K634393284 = FFTW_KONST(+0.634393284163645498215171613225493370675687095); +static const fftw_real K290284677 = FFTW_KONST(+0.290284677254462367636192375817395274691476278); +static const fftw_real K956940335 = FFTW_KONST(+0.956940335732208864935797886980269969482849206); +static const fftw_real K336889853 = FFTW_KONST(+0.336889853392220050689253212619147570477766780); +static const fftw_real K941544065 = FFTW_KONST(+0.941544065183020778412509402599502357185589796); +static const fftw_real K903989293 = FFTW_KONST(+0.903989293123443331586200297230537048710132025); +static const fftw_real K427555093 = FFTW_KONST(+0.427555093430282094320966856888798534304578629); +static const fftw_real K998795456 = FFTW_KONST(+0.998795456205172392714771604759100694443203615); +static const fftw_real K049067674 = FFTW_KONST(+0.049067674327418014254954976942682658314745363); +static const fftw_real K671558954 = FFTW_KONST(+0.671558954847018400625376850427421803228750632); +static const fftw_real K740951125 = FFTW_KONST(+0.740951125354959091175616897495162729728955309); +static const fftw_real K514102744 = FFTW_KONST(+0.514102744193221726593693838968815772608049120); +static const fftw_real K857728610 = FFTW_KONST(+0.857728610000272069902269984284770137042490799); +static const fftw_real K242980179 = FFTW_KONST(+0.242980179903263889948274162077471118320990783); +static const fftw_real K970031253 = FFTW_KONST(+0.970031253194543992603984207286100251456865962); +static const fftw_real K765366864 = FFTW_KONST(+0.765366864730179543456919968060797733522689125); +static const fftw_real K1_847759065 = FFTW_KONST(+1.847759065022573512256366378793576573644833252); +static const fftw_real K1_414213562 = FFTW_KONST(+1.414213562373095048801688724209698078569671875); +static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); + +/* + * Generator Id's : + * $Id: fcr_128.c,v 1.1.1.1 2006/05/12 15:14:52 veplaini Exp $ + * $Id: fcr_128.c,v 1.1.1.1 2006/05/12 15:14:52 veplaini Exp $ + * $Id: fcr_128.c,v 1.1.1.1 2006/05/12 15:14:52 veplaini Exp $ + */ + +void fftw_hc2real_128(const fftw_real *real_input, const fftw_real *imag_input, fftw_real *output, int real_istride, int imag_istride, int ostride) +{ + fftw_real tmp10; + fftw_real tmp454; + fftw_real tmp134; + fftw_real tmp326; + fftw_real tmp529; + fftw_real tmp705; + fftw_real tmp775; + fftw_real tmp891; + fftw_real tmp17; + fftw_real tmp143; + fftw_real tmp327; + fftw_real tmp455; + fftw_real tmp536; + fftw_real tmp706; + fftw_real tmp778; + fftw_real tmp892; + fftw_real tmp112; + fftw_real tmp478; + fftw_real tmp507; + fftw_real tmp411; + fftw_real tmp646; + fftw_real tmp731; + fftw_real tmp662; + fftw_real tmp728; + fftw_real tmp856; + fftw_real tmp917; + fftw_real tmp832; + fftw_real tmp914; + fftw_real tmp825; + fftw_real tmp916; + fftw_real tmp853; + fftw_real tmp913; + fftw_real tmp127; + fftw_real tmp481; + fftw_real tmp506; + fftw_real tmp408; + fftw_real tmp262; + fftw_real tmp288; + fftw_real tmp350; + fftw_real tmp360; + fftw_real tmp659; + fftw_real tmp730; + fftw_real tmp631; + fftw_real tmp727; + fftw_real tmp281; + fftw_real tmp289; + fftw_real tmp353; + fftw_real tmp361; + fftw_real tmp33; + fftw_real tmp457; + fftw_real tmp153; + fftw_real tmp329; + fftw_real tmp431; + fftw_real tmp458; + fftw_real tmp162; + fftw_real tmp330; + fftw_real tmp544; + fftw_real tmp551; + fftw_real tmp708; + fftw_real tmp680; + fftw_real tmp681; + fftw_real tmp709; + fftw_real tmp782; + fftw_real tmp785; + fftw_real tmp894; + fftw_real tmp866; + fftw_real tmp867; + fftw_real tmp895; + fftw_real tmp49; + fftw_real tmp461; + fftw_real tmp668; + fftw_real tmp715; + fftw_real tmp838; + fftw_real tmp901; + fftw_real tmp794; + fftw_real tmp898; + fftw_real tmp568; + fftw_real tmp712; + fftw_real tmp335; + fftw_real tmp365; + fftw_real tmp183; + fftw_real tmp293; + fftw_real tmp417; + fftw_real tmp465; + fftw_real tmp64; + fftw_real tmp464; + fftw_real tmp671; + fftw_real tmp713; + fftw_real tmp841; + fftw_real tmp899; + fftw_real tmp801; + fftw_real tmp902; + fftw_real tmp583; + fftw_real tmp716; + fftw_real tmp338; + fftw_real tmp366; + fftw_real tmp202; + fftw_real tmp294; + fftw_real tmp420; + fftw_real tmp462; + fftw_real tmp81; + fftw_real tmp471; + fftw_real tmp503; + fftw_real tmp404; + fftw_real tmp615; + fftw_real tmp724; + fftw_real tmp655; + fftw_real tmp721; + fftw_real tmp849; + fftw_real tmp910; + fftw_real tmp817; + fftw_real tmp907; + fftw_real tmp810; + fftw_real tmp909; + fftw_real tmp846; + fftw_real tmp906; + fftw_real tmp96; + fftw_real tmp474; + fftw_real tmp504; + fftw_real tmp401; + fftw_real tmp223; + fftw_real tmp285; + fftw_real tmp343; + fftw_real tmp357; + fftw_real tmp652; + fftw_real tmp723; + fftw_real tmp600; + fftw_real tmp720; + fftw_real tmp242; + fftw_real tmp286; + fftw_real tmp346; + fftw_real tmp358; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp5; + fftw_real tmp524; + fftw_real tmp3; + fftw_real tmp522; + fftw_real tmp9; + fftw_real tmp526; + fftw_real tmp133; + fftw_real tmp527; + fftw_real tmp6; + fftw_real tmp130; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp4; + fftw_real tmp523; + fftw_real tmp1; + fftw_real tmp2; + ASSERT_ALIGNED_DOUBLE; + tmp4 = real_input[32 * real_istride]; + tmp5 = K2_000000000 * tmp4; + tmp523 = imag_input[32 * imag_istride]; + tmp524 = K2_000000000 * tmp523; + tmp1 = real_input[0]; + tmp2 = real_input[64 * real_istride]; + tmp3 = tmp1 + tmp2; + tmp522 = tmp1 - tmp2; + { + fftw_real tmp7; + fftw_real tmp8; + fftw_real tmp131; + fftw_real tmp132; + ASSERT_ALIGNED_DOUBLE; + tmp7 = real_input[16 * real_istride]; + tmp8 = real_input[48 * real_istride]; + tmp9 = K2_000000000 * (tmp7 + tmp8); + tmp526 = tmp7 - tmp8; + tmp131 = imag_input[16 * imag_istride]; + tmp132 = imag_input[48 * imag_istride]; + tmp133 = K2_000000000 * (tmp131 - tmp132); + tmp527 = tmp132 + tmp131; + } + } + tmp6 = tmp3 + tmp5; + tmp10 = tmp6 + tmp9; + tmp454 = tmp6 - tmp9; + tmp130 = tmp3 - tmp5; + tmp134 = tmp130 - tmp133; + tmp326 = tmp130 + tmp133; + { + fftw_real tmp525; + fftw_real tmp528; + fftw_real tmp773; + fftw_real tmp774; + ASSERT_ALIGNED_DOUBLE; + tmp525 = tmp522 - tmp524; + tmp528 = K1_414213562 * (tmp526 - tmp527); + tmp529 = tmp525 + tmp528; + tmp705 = tmp525 - tmp528; + tmp773 = tmp522 + tmp524; + tmp774 = K1_414213562 * (tmp526 + tmp527); + tmp775 = tmp773 - tmp774; + tmp891 = tmp773 + tmp774; + } + } + { + fftw_real tmp13; + fftw_real tmp530; + fftw_real tmp141; + fftw_real tmp534; + fftw_real tmp16; + fftw_real tmp533; + fftw_real tmp138; + fftw_real tmp531; + fftw_real tmp135; + fftw_real tmp142; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp11; + fftw_real tmp12; + fftw_real tmp139; + fftw_real tmp140; + ASSERT_ALIGNED_DOUBLE; + tmp11 = real_input[8 * real_istride]; + tmp12 = real_input[56 * real_istride]; + tmp13 = tmp11 + tmp12; + tmp530 = tmp11 - tmp12; + tmp139 = imag_input[8 * imag_istride]; + tmp140 = imag_input[56 * imag_istride]; + tmp141 = tmp139 - tmp140; + tmp534 = tmp139 + tmp140; + } + { + fftw_real tmp14; + fftw_real tmp15; + fftw_real tmp136; + fftw_real tmp137; + ASSERT_ALIGNED_DOUBLE; + tmp14 = real_input[24 * real_istride]; + tmp15 = real_input[40 * real_istride]; + tmp16 = tmp14 + tmp15; + tmp533 = tmp15 - tmp14; + tmp136 = imag_input[24 * imag_istride]; + tmp137 = imag_input[40 * imag_istride]; + tmp138 = tmp136 - tmp137; + tmp531 = tmp137 + tmp136; + } + tmp17 = K2_000000000 * (tmp13 + tmp16); + tmp135 = tmp13 - tmp16; + tmp142 = tmp138 + tmp141; + tmp143 = K1_414213562 * (tmp135 - tmp142); + tmp327 = K1_414213562 * (tmp135 + tmp142); + tmp455 = K2_000000000 * (tmp141 - tmp138); + { + fftw_real tmp532; + fftw_real tmp535; + fftw_real tmp776; + fftw_real tmp777; + ASSERT_ALIGNED_DOUBLE; + tmp532 = tmp530 - tmp531; + tmp535 = tmp533 + tmp534; + tmp536 = (K1_847759065 * tmp532) - (K765366864 * tmp535); + tmp706 = (K765366864 * tmp532) + (K1_847759065 * tmp535); + tmp776 = tmp530 + tmp531; + tmp777 = tmp534 - tmp533; + tmp778 = (K765366864 * tmp776) - (K1_847759065 * tmp777); + tmp892 = (K1_847759065 * tmp776) + (K765366864 * tmp777); + } + } + { + fftw_real tmp104; + fftw_real tmp244; + fftw_real tmp260; + fftw_real tmp406; + fftw_real tmp619; + fftw_real tmp819; + fftw_real tmp622; + fftw_real tmp820; + fftw_real tmp126; + fftw_real tmp272; + fftw_real tmp270; + fftw_real tmp410; + fftw_real tmp641; + fftw_real tmp829; + fftw_real tmp644; + fftw_real tmp830; + fftw_real tmp111; + fftw_real tmp253; + fftw_real tmp251; + fftw_real tmp407; + fftw_real tmp626; + fftw_real tmp822; + fftw_real tmp629; + fftw_real tmp823; + fftw_real tmp119; + fftw_real tmp263; + fftw_real tmp279; + fftw_real tmp409; + fftw_real tmp634; + fftw_real tmp826; + fftw_real tmp637; + fftw_real tmp827; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp100; + fftw_real tmp617; + fftw_real tmp259; + fftw_real tmp621; + fftw_real tmp103; + fftw_real tmp620; + fftw_real tmp256; + fftw_real tmp618; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp98; + fftw_real tmp99; + fftw_real tmp257; + fftw_real tmp258; + ASSERT_ALIGNED_DOUBLE; + tmp98 = real_input[3 * real_istride]; + tmp99 = real_input[61 * real_istride]; + tmp100 = tmp98 + tmp99; + tmp617 = tmp98 - tmp99; + tmp257 = imag_input[3 * imag_istride]; + tmp258 = imag_input[61 * imag_istride]; + tmp259 = tmp257 - tmp258; + tmp621 = tmp257 + tmp258; + } + { + fftw_real tmp101; + fftw_real tmp102; + fftw_real tmp254; + fftw_real tmp255; + ASSERT_ALIGNED_DOUBLE; + tmp101 = real_input[29 * real_istride]; + tmp102 = real_input[35 * real_istride]; + tmp103 = tmp101 + tmp102; + tmp620 = tmp102 - tmp101; + tmp254 = imag_input[29 * imag_istride]; + tmp255 = imag_input[35 * imag_istride]; + tmp256 = tmp254 - tmp255; + tmp618 = tmp255 + tmp254; + } + tmp104 = tmp100 + tmp103; + tmp244 = tmp100 - tmp103; + tmp260 = tmp256 + tmp259; + tmp406 = tmp259 - tmp256; + tmp619 = tmp617 - tmp618; + tmp819 = tmp617 + tmp618; + tmp622 = tmp620 + tmp621; + tmp820 = tmp621 - tmp620; + } + { + fftw_real tmp122; + fftw_real tmp639; + fftw_real tmp269; + fftw_real tmp643; + fftw_real tmp125; + fftw_real tmp642; + fftw_real tmp266; + fftw_real tmp640; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp120; + fftw_real tmp121; + fftw_real tmp267; + fftw_real tmp268; + ASSERT_ALIGNED_DOUBLE; + tmp120 = real_input[11 * real_istride]; + tmp121 = real_input[53 * real_istride]; + tmp122 = tmp120 + tmp121; + tmp639 = tmp120 - tmp121; + tmp267 = imag_input[11 * imag_istride]; + tmp268 = imag_input[53 * imag_istride]; + tmp269 = tmp267 - tmp268; + tmp643 = tmp267 + tmp268; + } + { + fftw_real tmp123; + fftw_real tmp124; + fftw_real tmp264; + fftw_real tmp265; + ASSERT_ALIGNED_DOUBLE; + tmp123 = real_input[21 * real_istride]; + tmp124 = real_input[43 * real_istride]; + tmp125 = tmp123 + tmp124; + tmp642 = tmp124 - tmp123; + tmp264 = imag_input[21 * imag_istride]; + tmp265 = imag_input[43 * imag_istride]; + tmp266 = tmp264 - tmp265; + tmp640 = tmp265 + tmp264; + } + tmp126 = tmp122 + tmp125; + tmp272 = tmp125 - tmp122; + tmp270 = tmp266 + tmp269; + tmp410 = tmp269 - tmp266; + tmp641 = tmp639 - tmp640; + tmp829 = tmp639 + tmp640; + tmp644 = tmp642 + tmp643; + tmp830 = tmp643 - tmp642; + } + { + fftw_real tmp107; + fftw_real tmp624; + fftw_real tmp250; + fftw_real tmp628; + fftw_real tmp110; + fftw_real tmp627; + fftw_real tmp247; + fftw_real tmp625; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp105; + fftw_real tmp106; + fftw_real tmp248; + fftw_real tmp249; + ASSERT_ALIGNED_DOUBLE; + tmp105 = real_input[13 * real_istride]; + tmp106 = real_input[51 * real_istride]; + tmp107 = tmp105 + tmp106; + tmp624 = tmp105 - tmp106; + tmp248 = imag_input[13 * imag_istride]; + tmp249 = imag_input[51 * imag_istride]; + tmp250 = tmp248 - tmp249; + tmp628 = tmp248 + tmp249; + } + { + fftw_real tmp108; + fftw_real tmp109; + fftw_real tmp245; + fftw_real tmp246; + ASSERT_ALIGNED_DOUBLE; + tmp108 = real_input[19 * real_istride]; + tmp109 = real_input[45 * real_istride]; + tmp110 = tmp108 + tmp109; + tmp627 = tmp109 - tmp108; + tmp245 = imag_input[19 * imag_istride]; + tmp246 = imag_input[45 * imag_istride]; + tmp247 = tmp245 - tmp246; + tmp625 = tmp246 + tmp245; + } + tmp111 = tmp107 + tmp110; + tmp253 = tmp110 - tmp107; + tmp251 = tmp247 + tmp250; + tmp407 = tmp250 - tmp247; + tmp626 = tmp624 - tmp625; + tmp822 = tmp624 + tmp625; + tmp629 = tmp627 + tmp628; + tmp823 = tmp628 - tmp627; + } + { + fftw_real tmp115; + fftw_real tmp632; + fftw_real tmp278; + fftw_real tmp636; + fftw_real tmp118; + fftw_real tmp635; + fftw_real tmp275; + fftw_real tmp633; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp113; + fftw_real tmp114; + fftw_real tmp276; + fftw_real tmp277; + ASSERT_ALIGNED_DOUBLE; + tmp113 = real_input[5 * real_istride]; + tmp114 = real_input[59 * real_istride]; + tmp115 = tmp113 + tmp114; + tmp632 = tmp113 - tmp114; + tmp276 = imag_input[5 * imag_istride]; + tmp277 = imag_input[59 * imag_istride]; + tmp278 = tmp276 - tmp277; + tmp636 = tmp276 + tmp277; + } + { + fftw_real tmp116; + fftw_real tmp117; + fftw_real tmp273; + fftw_real tmp274; + ASSERT_ALIGNED_DOUBLE; + tmp116 = real_input[27 * real_istride]; + tmp117 = real_input[37 * real_istride]; + tmp118 = tmp116 + tmp117; + tmp635 = tmp117 - tmp116; + tmp273 = imag_input[27 * imag_istride]; + tmp274 = imag_input[37 * imag_istride]; + tmp275 = tmp273 - tmp274; + tmp633 = tmp274 + tmp273; + } + tmp119 = tmp115 + tmp118; + tmp263 = tmp115 - tmp118; + tmp279 = tmp275 + tmp278; + tmp409 = tmp278 - tmp275; + tmp634 = tmp632 - tmp633; + tmp826 = tmp632 + tmp633; + tmp637 = tmp635 + tmp636; + tmp827 = tmp636 - tmp635; + } + { + fftw_real tmp828; + fftw_real tmp831; + fftw_real tmp623; + fftw_real tmp630; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp476; + fftw_real tmp477; + fftw_real tmp638; + fftw_real tmp645; + ASSERT_ALIGNED_DOUBLE; + tmp112 = tmp104 + tmp111; + tmp476 = tmp104 - tmp111; + tmp477 = tmp409 + tmp410; + tmp478 = tmp476 - tmp477; + tmp507 = tmp476 + tmp477; + tmp411 = tmp409 - tmp410; + tmp638 = (K970031253 * tmp634) - (K242980179 * tmp637); + tmp645 = (K857728610 * tmp641) - (K514102744 * tmp644); + tmp646 = tmp638 + tmp645; + tmp731 = tmp645 - tmp638; + } + { + fftw_real tmp660; + fftw_real tmp661; + fftw_real tmp854; + fftw_real tmp855; + ASSERT_ALIGNED_DOUBLE; + tmp660 = (K242980179 * tmp634) + (K970031253 * tmp637); + tmp661 = (K514102744 * tmp641) + (K857728610 * tmp644); + tmp662 = tmp660 - tmp661; + tmp728 = tmp660 + tmp661; + tmp854 = (K740951125 * tmp826) - (K671558954 * tmp827); + tmp855 = (K049067674 * tmp829) + (K998795456 * tmp830); + tmp856 = tmp854 - tmp855; + tmp917 = tmp854 + tmp855; + } + tmp828 = (K671558954 * tmp826) + (K740951125 * tmp827); + tmp831 = (K998795456 * tmp829) - (K049067674 * tmp830); + tmp832 = tmp828 - tmp831; + tmp914 = tmp828 + tmp831; + { + fftw_real tmp821; + fftw_real tmp824; + fftw_real tmp851; + fftw_real tmp852; + ASSERT_ALIGNED_DOUBLE; + tmp821 = (K427555093 * tmp819) + (K903989293 * tmp820); + tmp824 = (K941544065 * tmp822) - (K336889853 * tmp823); + tmp825 = tmp821 - tmp824; + tmp916 = tmp821 + tmp824; + tmp851 = (K903989293 * tmp819) - (K427555093 * tmp820); + tmp852 = (K336889853 * tmp822) + (K941544065 * tmp823); + tmp853 = tmp851 - tmp852; + tmp913 = tmp851 + tmp852; + } + { + fftw_real tmp479; + fftw_real tmp480; + fftw_real tmp252; + fftw_real tmp261; + ASSERT_ALIGNED_DOUBLE; + tmp127 = tmp119 + tmp126; + tmp479 = tmp126 - tmp119; + tmp480 = tmp406 + tmp407; + tmp481 = tmp479 + tmp480; + tmp506 = tmp480 - tmp479; + tmp408 = tmp406 - tmp407; + tmp252 = tmp244 - tmp251; + tmp261 = tmp253 + tmp260; + tmp262 = (K956940335 * tmp252) - (K290284677 * tmp261); + tmp288 = (K956940335 * tmp261) + (K290284677 * tmp252); + } + { + fftw_real tmp348; + fftw_real tmp349; + fftw_real tmp657; + fftw_real tmp658; + ASSERT_ALIGNED_DOUBLE; + tmp348 = tmp244 + tmp251; + tmp349 = tmp260 - tmp253; + tmp350 = (K634393284 * tmp348) - (K773010453 * tmp349); + tmp360 = (K634393284 * tmp349) + (K773010453 * tmp348); + tmp657 = (K146730474 * tmp619) + (K989176509 * tmp622); + tmp658 = (K595699304 * tmp626) + (K803207531 * tmp629); + tmp659 = tmp657 - tmp658; + tmp730 = tmp657 + tmp658; + } + tmp623 = (K989176509 * tmp619) - (K146730474 * tmp622); + tmp630 = (K803207531 * tmp626) - (K595699304 * tmp629); + tmp631 = tmp623 + tmp630; + tmp727 = tmp623 - tmp630; + { + fftw_real tmp271; + fftw_real tmp280; + fftw_real tmp351; + fftw_real tmp352; + ASSERT_ALIGNED_DOUBLE; + tmp271 = tmp263 - tmp270; + tmp280 = tmp272 + tmp279; + tmp281 = (K881921264 * tmp271) - (K471396736 * tmp280); + tmp289 = (K881921264 * tmp280) + (K471396736 * tmp271); + tmp351 = tmp263 + tmp270; + tmp352 = tmp279 - tmp272; + tmp353 = (K098017140 * tmp351) - (K995184726 * tmp352); + tmp361 = (K098017140 * tmp352) + (K995184726 * tmp351); + } + } + } + { + fftw_real tmp21; + fftw_real tmp780; + fftw_real tmp540; + fftw_real tmp157; + fftw_real tmp24; + fftw_real tmp781; + fftw_real tmp543; + fftw_real tmp160; + fftw_real tmp28; + fftw_real tmp783; + fftw_real tmp547; + fftw_real tmp148; + fftw_real tmp31; + fftw_real tmp784; + fftw_real tmp550; + fftw_real tmp151; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp19; + fftw_real tmp20; + fftw_real tmp538; + fftw_real tmp155; + fftw_real tmp156; + fftw_real tmp539; + ASSERT_ALIGNED_DOUBLE; + tmp19 = real_input[4 * real_istride]; + tmp20 = real_input[60 * real_istride]; + tmp538 = tmp19 - tmp20; + tmp155 = imag_input[28 * imag_istride]; + tmp156 = imag_input[36 * imag_istride]; + tmp539 = tmp156 + tmp155; + tmp21 = tmp19 + tmp20; + tmp780 = tmp538 + tmp539; + tmp540 = tmp538 - tmp539; + tmp157 = tmp155 - tmp156; + } + { + fftw_real tmp22; + fftw_real tmp23; + fftw_real tmp541; + fftw_real tmp158; + fftw_real tmp159; + fftw_real tmp542; + ASSERT_ALIGNED_DOUBLE; + tmp22 = real_input[28 * real_istride]; + tmp23 = real_input[36 * real_istride]; + tmp541 = tmp23 - tmp22; + tmp158 = imag_input[4 * imag_istride]; + tmp159 = imag_input[60 * imag_istride]; + tmp542 = tmp158 + tmp159; + tmp24 = tmp22 + tmp23; + tmp781 = tmp542 - tmp541; + tmp543 = tmp541 + tmp542; + tmp160 = tmp158 - tmp159; + } + { + fftw_real tmp26; + fftw_real tmp27; + fftw_real tmp545; + fftw_real tmp146; + fftw_real tmp147; + fftw_real tmp546; + ASSERT_ALIGNED_DOUBLE; + tmp26 = real_input[12 * real_istride]; + tmp27 = real_input[52 * real_istride]; + tmp545 = tmp26 - tmp27; + tmp146 = imag_input[20 * imag_istride]; + tmp147 = imag_input[44 * imag_istride]; + tmp546 = tmp147 + tmp146; + tmp28 = tmp26 + tmp27; + tmp783 = tmp545 + tmp546; + tmp547 = tmp545 - tmp546; + tmp148 = tmp146 - tmp147; + } + { + fftw_real tmp29; + fftw_real tmp30; + fftw_real tmp548; + fftw_real tmp149; + fftw_real tmp150; + fftw_real tmp549; + ASSERT_ALIGNED_DOUBLE; + tmp29 = real_input[20 * real_istride]; + tmp30 = real_input[44 * real_istride]; + tmp548 = tmp30 - tmp29; + tmp149 = imag_input[12 * imag_istride]; + tmp150 = imag_input[52 * imag_istride]; + tmp549 = tmp149 + tmp150; + tmp31 = tmp29 + tmp30; + tmp784 = tmp549 - tmp548; + tmp550 = tmp548 + tmp549; + tmp151 = tmp149 - tmp150; + } + { + fftw_real tmp25; + fftw_real tmp32; + fftw_real tmp145; + fftw_real tmp152; + ASSERT_ALIGNED_DOUBLE; + tmp25 = tmp21 + tmp24; + tmp32 = tmp28 + tmp31; + tmp33 = K2_000000000 * (tmp25 + tmp32); + tmp457 = tmp25 - tmp32; + tmp145 = tmp21 - tmp24; + tmp152 = tmp148 + tmp151; + tmp153 = tmp145 - tmp152; + tmp329 = tmp145 + tmp152; + } + { + fftw_real tmp429; + fftw_real tmp430; + fftw_real tmp154; + fftw_real tmp161; + ASSERT_ALIGNED_DOUBLE; + tmp429 = tmp160 - tmp157; + tmp430 = tmp151 - tmp148; + tmp431 = K2_000000000 * (tmp429 - tmp430); + tmp458 = tmp429 + tmp430; + tmp154 = tmp31 - tmp28; + tmp161 = tmp157 + tmp160; + tmp162 = tmp154 + tmp161; + tmp330 = tmp161 - tmp154; + } + tmp544 = (K980785280 * tmp540) - (K195090322 * tmp543); + tmp551 = (K831469612 * tmp547) - (K555570233 * tmp550); + tmp708 = tmp544 - tmp551; + tmp680 = (K195090322 * tmp540) + (K980785280 * tmp543); + tmp681 = (K555570233 * tmp547) + (K831469612 * tmp550); + tmp709 = tmp680 + tmp681; + tmp782 = (K831469612 * tmp780) - (K555570233 * tmp781); + tmp785 = (K195090322 * tmp783) + (K980785280 * tmp784); + tmp894 = tmp782 + tmp785; + tmp866 = (K555570233 * tmp780) + (K831469612 * tmp781); + tmp867 = (K980785280 * tmp783) - (K195090322 * tmp784); + tmp895 = tmp866 + tmp867; + } + { + fftw_real tmp37; + fftw_real tmp180; + fftw_real tmp40; + fftw_real tmp177; + fftw_real tmp165; + fftw_real tmp559; + fftw_real tmp789; + fftw_real tmp788; + fftw_real tmp556; + fftw_real tmp181; + fftw_real tmp44; + fftw_real tmp171; + fftw_real tmp47; + fftw_real tmp168; + fftw_real tmp172; + fftw_real tmp566; + fftw_real tmp792; + fftw_real tmp791; + fftw_real tmp563; + fftw_real tmp174; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp554; + fftw_real tmp558; + fftw_real tmp557; + fftw_real tmp555; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp35; + fftw_real tmp36; + fftw_real tmp178; + fftw_real tmp179; + ASSERT_ALIGNED_DOUBLE; + tmp35 = real_input[2 * real_istride]; + tmp36 = real_input[62 * real_istride]; + tmp37 = tmp35 + tmp36; + tmp554 = tmp35 - tmp36; + tmp178 = imag_input[2 * imag_istride]; + tmp179 = imag_input[62 * imag_istride]; + tmp180 = tmp178 - tmp179; + tmp558 = tmp178 + tmp179; + } + { + fftw_real tmp38; + fftw_real tmp39; + fftw_real tmp175; + fftw_real tmp176; + ASSERT_ALIGNED_DOUBLE; + tmp38 = real_input[30 * real_istride]; + tmp39 = real_input[34 * real_istride]; + tmp40 = tmp38 + tmp39; + tmp557 = tmp39 - tmp38; + tmp175 = imag_input[30 * imag_istride]; + tmp176 = imag_input[34 * imag_istride]; + tmp177 = tmp175 - tmp176; + tmp555 = tmp176 + tmp175; + } + tmp165 = tmp37 - tmp40; + tmp559 = tmp557 + tmp558; + tmp789 = tmp558 - tmp557; + tmp788 = tmp554 + tmp555; + tmp556 = tmp554 - tmp555; + tmp181 = tmp177 + tmp180; + } + { + fftw_real tmp561; + fftw_real tmp565; + fftw_real tmp564; + fftw_real tmp562; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp42; + fftw_real tmp43; + fftw_real tmp169; + fftw_real tmp170; + ASSERT_ALIGNED_DOUBLE; + tmp42 = real_input[14 * real_istride]; + tmp43 = real_input[50 * real_istride]; + tmp44 = tmp42 + tmp43; + tmp561 = tmp42 - tmp43; + tmp169 = imag_input[14 * imag_istride]; + tmp170 = imag_input[50 * imag_istride]; + tmp171 = tmp169 - tmp170; + tmp565 = tmp169 + tmp170; + } + { + fftw_real tmp45; + fftw_real tmp46; + fftw_real tmp166; + fftw_real tmp167; + ASSERT_ALIGNED_DOUBLE; + tmp45 = real_input[18 * real_istride]; + tmp46 = real_input[46 * real_istride]; + tmp47 = tmp45 + tmp46; + tmp564 = tmp46 - tmp45; + tmp166 = imag_input[18 * imag_istride]; + tmp167 = imag_input[46 * imag_istride]; + tmp168 = tmp166 - tmp167; + tmp562 = tmp167 + tmp166; + } + tmp172 = tmp168 + tmp171; + tmp566 = tmp564 + tmp565; + tmp792 = tmp565 - tmp564; + tmp791 = tmp561 + tmp562; + tmp563 = tmp561 - tmp562; + tmp174 = tmp47 - tmp44; + } + { + fftw_real tmp41; + fftw_real tmp48; + fftw_real tmp666; + fftw_real tmp667; + ASSERT_ALIGNED_DOUBLE; + tmp41 = tmp37 + tmp40; + tmp48 = tmp44 + tmp47; + tmp49 = tmp41 + tmp48; + tmp461 = tmp41 - tmp48; + tmp666 = (K098017140 * tmp556) + (K995184726 * tmp559); + tmp667 = (K634393284 * tmp563) + (K773010453 * tmp566); + tmp668 = tmp666 - tmp667; + tmp715 = tmp666 + tmp667; + } + { + fftw_real tmp836; + fftw_real tmp837; + fftw_real tmp790; + fftw_real tmp793; + ASSERT_ALIGNED_DOUBLE; + tmp836 = (K290284677 * tmp788) + (K956940335 * tmp789); + tmp837 = (K881921264 * tmp791) - (K471396736 * tmp792); + tmp838 = tmp836 - tmp837; + tmp901 = tmp836 + tmp837; + tmp790 = (K956940335 * tmp788) - (K290284677 * tmp789); + tmp793 = (K471396736 * tmp791) + (K881921264 * tmp792); + tmp794 = tmp790 - tmp793; + tmp898 = tmp790 + tmp793; + } + { + fftw_real tmp560; + fftw_real tmp567; + fftw_real tmp333; + fftw_real tmp334; + ASSERT_ALIGNED_DOUBLE; + tmp560 = (K995184726 * tmp556) - (K098017140 * tmp559); + tmp567 = (K773010453 * tmp563) - (K634393284 * tmp566); + tmp568 = tmp560 + tmp567; + tmp712 = tmp560 - tmp567; + tmp333 = tmp165 + tmp172; + tmp334 = tmp181 - tmp174; + tmp335 = (K831469612 * tmp333) - (K555570233 * tmp334); + tmp365 = (K831469612 * tmp334) + (K555570233 * tmp333); + } + { + fftw_real tmp173; + fftw_real tmp182; + fftw_real tmp415; + fftw_real tmp416; + ASSERT_ALIGNED_DOUBLE; + tmp173 = tmp165 - tmp172; + tmp182 = tmp174 + tmp181; + tmp183 = (K980785280 * tmp173) - (K195090322 * tmp182); + tmp293 = (K980785280 * tmp182) + (K195090322 * tmp173); + tmp415 = tmp180 - tmp177; + tmp416 = tmp171 - tmp168; + tmp417 = tmp415 - tmp416; + tmp465 = tmp415 + tmp416; + } + } + { + fftw_real tmp52; + fftw_real tmp199; + fftw_real tmp55; + fftw_real tmp196; + fftw_real tmp184; + fftw_real tmp574; + fftw_real tmp796; + fftw_real tmp795; + fftw_real tmp571; + fftw_real tmp200; + fftw_real tmp59; + fftw_real tmp190; + fftw_real tmp62; + fftw_real tmp187; + fftw_real tmp191; + fftw_real tmp581; + fftw_real tmp799; + fftw_real tmp798; + fftw_real tmp578; + fftw_real tmp193; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp569; + fftw_real tmp573; + fftw_real tmp572; + fftw_real tmp570; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp50; + fftw_real tmp51; + fftw_real tmp197; + fftw_real tmp198; + ASSERT_ALIGNED_DOUBLE; + tmp50 = real_input[6 * real_istride]; + tmp51 = real_input[58 * real_istride]; + tmp52 = tmp50 + tmp51; + tmp569 = tmp50 - tmp51; + tmp197 = imag_input[6 * imag_istride]; + tmp198 = imag_input[58 * imag_istride]; + tmp199 = tmp197 - tmp198; + tmp573 = tmp197 + tmp198; + } + { + fftw_real tmp53; + fftw_real tmp54; + fftw_real tmp194; + fftw_real tmp195; + ASSERT_ALIGNED_DOUBLE; + tmp53 = real_input[26 * real_istride]; + tmp54 = real_input[38 * real_istride]; + tmp55 = tmp53 + tmp54; + tmp572 = tmp54 - tmp53; + tmp194 = imag_input[26 * imag_istride]; + tmp195 = imag_input[38 * imag_istride]; + tmp196 = tmp194 - tmp195; + tmp570 = tmp195 + tmp194; + } + tmp184 = tmp52 - tmp55; + tmp574 = tmp572 + tmp573; + tmp796 = tmp573 - tmp572; + tmp795 = tmp569 + tmp570; + tmp571 = tmp569 - tmp570; + tmp200 = tmp196 + tmp199; + } + { + fftw_real tmp576; + fftw_real tmp580; + fftw_real tmp579; + fftw_real tmp577; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp57; + fftw_real tmp58; + fftw_real tmp188; + fftw_real tmp189; + ASSERT_ALIGNED_DOUBLE; + tmp57 = real_input[10 * real_istride]; + tmp58 = real_input[54 * real_istride]; + tmp59 = tmp57 + tmp58; + tmp576 = tmp57 - tmp58; + tmp188 = imag_input[10 * imag_istride]; + tmp189 = imag_input[54 * imag_istride]; + tmp190 = tmp188 - tmp189; + tmp580 = tmp188 + tmp189; + } + { + fftw_real tmp60; + fftw_real tmp61; + fftw_real tmp185; + fftw_real tmp186; + ASSERT_ALIGNED_DOUBLE; + tmp60 = real_input[22 * real_istride]; + tmp61 = real_input[42 * real_istride]; + tmp62 = tmp60 + tmp61; + tmp579 = tmp61 - tmp60; + tmp185 = imag_input[22 * imag_istride]; + tmp186 = imag_input[42 * imag_istride]; + tmp187 = tmp185 - tmp186; + tmp577 = tmp186 + tmp185; + } + tmp191 = tmp187 + tmp190; + tmp581 = tmp579 + tmp580; + tmp799 = tmp580 - tmp579; + tmp798 = tmp576 + tmp577; + tmp578 = tmp576 - tmp577; + tmp193 = tmp62 - tmp59; + } + { + fftw_real tmp56; + fftw_real tmp63; + fftw_real tmp669; + fftw_real tmp670; + ASSERT_ALIGNED_DOUBLE; + tmp56 = tmp52 + tmp55; + tmp63 = tmp59 + tmp62; + tmp64 = tmp56 + tmp63; + tmp464 = tmp63 - tmp56; + tmp669 = (K290284677 * tmp571) + (K956940335 * tmp574); + tmp670 = (K471396736 * tmp578) + (K881921264 * tmp581); + tmp671 = tmp669 - tmp670; + tmp713 = tmp669 + tmp670; + } + { + fftw_real tmp839; + fftw_real tmp840; + fftw_real tmp797; + fftw_real tmp800; + ASSERT_ALIGNED_DOUBLE; + tmp839 = (K773010453 * tmp795) + (K634393284 * tmp796); + tmp840 = (K995184726 * tmp798) + (K098017140 * tmp799); + tmp841 = tmp839 - tmp840; + tmp899 = tmp839 + tmp840; + tmp797 = (K634393284 * tmp795) - (K773010453 * tmp796); + tmp800 = (K098017140 * tmp798) - (K995184726 * tmp799); + tmp801 = tmp797 + tmp800; + tmp902 = tmp800 - tmp797; + } + { + fftw_real tmp575; + fftw_real tmp582; + fftw_real tmp336; + fftw_real tmp337; + ASSERT_ALIGNED_DOUBLE; + tmp575 = (K956940335 * tmp571) - (K290284677 * tmp574); + tmp582 = (K881921264 * tmp578) - (K471396736 * tmp581); + tmp583 = tmp575 + tmp582; + tmp716 = tmp582 - tmp575; + tmp336 = tmp200 - tmp193; + tmp337 = tmp184 + tmp191; + tmp338 = (K980785280 * tmp336) + (K195090322 * tmp337); + tmp366 = (K980785280 * tmp337) - (K195090322 * tmp336); + } + { + fftw_real tmp192; + fftw_real tmp201; + fftw_real tmp418; + fftw_real tmp419; + ASSERT_ALIGNED_DOUBLE; + tmp192 = tmp184 - tmp191; + tmp201 = tmp193 + tmp200; + tmp202 = (K831469612 * tmp192) - (K555570233 * tmp201); + tmp294 = (K831469612 * tmp201) + (K555570233 * tmp192); + tmp418 = tmp199 - tmp196; + tmp419 = tmp190 - tmp187; + tmp420 = tmp418 - tmp419; + tmp462 = tmp418 + tmp419; + } + } + { + fftw_real tmp73; + fftw_real tmp205; + fftw_real tmp221; + fftw_real tmp399; + fftw_real tmp588; + fftw_real tmp804; + fftw_real tmp591; + fftw_real tmp805; + fftw_real tmp95; + fftw_real tmp233; + fftw_real tmp231; + fftw_real tmp403; + fftw_real tmp610; + fftw_real tmp814; + fftw_real tmp613; + fftw_real tmp815; + fftw_real tmp80; + fftw_real tmp214; + fftw_real tmp212; + fftw_real tmp400; + fftw_real tmp595; + fftw_real tmp807; + fftw_real tmp598; + fftw_real tmp808; + fftw_real tmp88; + fftw_real tmp224; + fftw_real tmp240; + fftw_real tmp402; + fftw_real tmp603; + fftw_real tmp811; + fftw_real tmp606; + fftw_real tmp812; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp69; + fftw_real tmp586; + fftw_real tmp220; + fftw_real tmp590; + fftw_real tmp72; + fftw_real tmp589; + fftw_real tmp217; + fftw_real tmp587; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp67; + fftw_real tmp68; + fftw_real tmp218; + fftw_real tmp219; + ASSERT_ALIGNED_DOUBLE; + tmp67 = real_input[real_istride]; + tmp68 = real_input[63 * real_istride]; + tmp69 = tmp67 + tmp68; + tmp586 = tmp67 - tmp68; + tmp218 = imag_input[imag_istride]; + tmp219 = imag_input[63 * imag_istride]; + tmp220 = tmp218 - tmp219; + tmp590 = tmp218 + tmp219; + } + { + fftw_real tmp70; + fftw_real tmp71; + fftw_real tmp215; + fftw_real tmp216; + ASSERT_ALIGNED_DOUBLE; + tmp70 = real_input[31 * real_istride]; + tmp71 = real_input[33 * real_istride]; + tmp72 = tmp70 + tmp71; + tmp589 = tmp71 - tmp70; + tmp215 = imag_input[31 * imag_istride]; + tmp216 = imag_input[33 * imag_istride]; + tmp217 = tmp215 - tmp216; + tmp587 = tmp216 + tmp215; + } + tmp73 = tmp69 + tmp72; + tmp205 = tmp69 - tmp72; + tmp221 = tmp217 + tmp220; + tmp399 = tmp220 - tmp217; + tmp588 = tmp586 - tmp587; + tmp804 = tmp586 + tmp587; + tmp591 = tmp589 + tmp590; + tmp805 = tmp590 - tmp589; + } + { + fftw_real tmp91; + fftw_real tmp608; + fftw_real tmp230; + fftw_real tmp612; + fftw_real tmp94; + fftw_real tmp611; + fftw_real tmp227; + fftw_real tmp609; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp89; + fftw_real tmp90; + fftw_real tmp228; + fftw_real tmp229; + ASSERT_ALIGNED_DOUBLE; + tmp89 = real_input[9 * real_istride]; + tmp90 = real_input[55 * real_istride]; + tmp91 = tmp89 + tmp90; + tmp608 = tmp89 - tmp90; + tmp228 = imag_input[9 * imag_istride]; + tmp229 = imag_input[55 * imag_istride]; + tmp230 = tmp228 - tmp229; + tmp612 = tmp228 + tmp229; + } + { + fftw_real tmp92; + fftw_real tmp93; + fftw_real tmp225; + fftw_real tmp226; + ASSERT_ALIGNED_DOUBLE; + tmp92 = real_input[23 * real_istride]; + tmp93 = real_input[41 * real_istride]; + tmp94 = tmp92 + tmp93; + tmp611 = tmp93 - tmp92; + tmp225 = imag_input[23 * imag_istride]; + tmp226 = imag_input[41 * imag_istride]; + tmp227 = tmp225 - tmp226; + tmp609 = tmp226 + tmp225; + } + tmp95 = tmp91 + tmp94; + tmp233 = tmp94 - tmp91; + tmp231 = tmp227 + tmp230; + tmp403 = tmp230 - tmp227; + tmp610 = tmp608 - tmp609; + tmp814 = tmp608 + tmp609; + tmp613 = tmp611 + tmp612; + tmp815 = tmp612 - tmp611; + } + { + fftw_real tmp76; + fftw_real tmp593; + fftw_real tmp211; + fftw_real tmp597; + fftw_real tmp79; + fftw_real tmp596; + fftw_real tmp208; + fftw_real tmp594; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp74; + fftw_real tmp75; + fftw_real tmp209; + fftw_real tmp210; + ASSERT_ALIGNED_DOUBLE; + tmp74 = real_input[15 * real_istride]; + tmp75 = real_input[49 * real_istride]; + tmp76 = tmp74 + tmp75; + tmp593 = tmp74 - tmp75; + tmp209 = imag_input[15 * imag_istride]; + tmp210 = imag_input[49 * imag_istride]; + tmp211 = tmp209 - tmp210; + tmp597 = tmp209 + tmp210; + } + { + fftw_real tmp77; + fftw_real tmp78; + fftw_real tmp206; + fftw_real tmp207; + ASSERT_ALIGNED_DOUBLE; + tmp77 = real_input[17 * real_istride]; + tmp78 = real_input[47 * real_istride]; + tmp79 = tmp77 + tmp78; + tmp596 = tmp78 - tmp77; + tmp206 = imag_input[17 * imag_istride]; + tmp207 = imag_input[47 * imag_istride]; + tmp208 = tmp206 - tmp207; + tmp594 = tmp207 + tmp206; + } + tmp80 = tmp76 + tmp79; + tmp214 = tmp79 - tmp76; + tmp212 = tmp208 + tmp211; + tmp400 = tmp211 - tmp208; + tmp595 = tmp593 - tmp594; + tmp807 = tmp593 + tmp594; + tmp598 = tmp596 + tmp597; + tmp808 = tmp597 - tmp596; + } + { + fftw_real tmp84; + fftw_real tmp601; + fftw_real tmp239; + fftw_real tmp605; + fftw_real tmp87; + fftw_real tmp604; + fftw_real tmp236; + fftw_real tmp602; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp82; + fftw_real tmp83; + fftw_real tmp237; + fftw_real tmp238; + ASSERT_ALIGNED_DOUBLE; + tmp82 = real_input[7 * real_istride]; + tmp83 = real_input[57 * real_istride]; + tmp84 = tmp82 + tmp83; + tmp601 = tmp82 - tmp83; + tmp237 = imag_input[7 * imag_istride]; + tmp238 = imag_input[57 * imag_istride]; + tmp239 = tmp237 - tmp238; + tmp605 = tmp237 + tmp238; + } + { + fftw_real tmp85; + fftw_real tmp86; + fftw_real tmp234; + fftw_real tmp235; + ASSERT_ALIGNED_DOUBLE; + tmp85 = real_input[25 * real_istride]; + tmp86 = real_input[39 * real_istride]; + tmp87 = tmp85 + tmp86; + tmp604 = tmp86 - tmp85; + tmp234 = imag_input[25 * imag_istride]; + tmp235 = imag_input[39 * imag_istride]; + tmp236 = tmp234 - tmp235; + tmp602 = tmp235 + tmp234; + } + tmp88 = tmp84 + tmp87; + tmp224 = tmp84 - tmp87; + tmp240 = tmp236 + tmp239; + tmp402 = tmp239 - tmp236; + tmp603 = tmp601 - tmp602; + tmp811 = tmp601 + tmp602; + tmp606 = tmp604 + tmp605; + tmp812 = tmp605 - tmp604; + } + { + fftw_real tmp813; + fftw_real tmp816; + fftw_real tmp592; + fftw_real tmp599; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp469; + fftw_real tmp470; + fftw_real tmp607; + fftw_real tmp614; + ASSERT_ALIGNED_DOUBLE; + tmp81 = tmp73 + tmp80; + tmp469 = tmp73 - tmp80; + tmp470 = tmp402 + tmp403; + tmp471 = tmp469 - tmp470; + tmp503 = tmp469 + tmp470; + tmp404 = tmp402 - tmp403; + tmp607 = (K941544065 * tmp603) - (K336889853 * tmp606); + tmp614 = (K903989293 * tmp610) - (K427555093 * tmp613); + tmp615 = tmp607 + tmp614; + tmp724 = tmp614 - tmp607; + } + { + fftw_real tmp653; + fftw_real tmp654; + fftw_real tmp847; + fftw_real tmp848; + ASSERT_ALIGNED_DOUBLE; + tmp653 = (K336889853 * tmp603) + (K941544065 * tmp606); + tmp654 = (K427555093 * tmp610) + (K903989293 * tmp613); + tmp655 = tmp653 - tmp654; + tmp721 = tmp653 + tmp654; + tmp847 = (K514102744 * tmp811) - (K857728610 * tmp812); + tmp848 = (K242980179 * tmp814) - (K970031253 * tmp815); + tmp849 = tmp847 + tmp848; + tmp910 = tmp848 - tmp847; + } + tmp813 = (K857728610 * tmp811) + (K514102744 * tmp812); + tmp816 = (K970031253 * tmp814) + (K242980179 * tmp815); + tmp817 = tmp813 - tmp816; + tmp907 = tmp813 + tmp816; + { + fftw_real tmp806; + fftw_real tmp809; + fftw_real tmp844; + fftw_real tmp845; + ASSERT_ALIGNED_DOUBLE; + tmp806 = (K146730474 * tmp804) + (K989176509 * tmp805); + tmp809 = (K803207531 * tmp807) - (K595699304 * tmp808); + tmp810 = tmp806 - tmp809; + tmp909 = tmp806 + tmp809; + tmp844 = (K989176509 * tmp804) - (K146730474 * tmp805); + tmp845 = (K595699304 * tmp807) + (K803207531 * tmp808); + tmp846 = tmp844 - tmp845; + tmp906 = tmp844 + tmp845; + } + { + fftw_real tmp472; + fftw_real tmp473; + fftw_real tmp213; + fftw_real tmp222; + ASSERT_ALIGNED_DOUBLE; + tmp96 = tmp88 + tmp95; + tmp472 = tmp95 - tmp88; + tmp473 = tmp399 + tmp400; + tmp474 = tmp472 + tmp473; + tmp504 = tmp473 - tmp472; + tmp401 = tmp399 - tmp400; + tmp213 = tmp205 - tmp212; + tmp222 = tmp214 + tmp221; + tmp223 = (K995184726 * tmp213) - (K098017140 * tmp222); + tmp285 = (K995184726 * tmp222) + (K098017140 * tmp213); + } + { + fftw_real tmp341; + fftw_real tmp342; + fftw_real tmp650; + fftw_real tmp651; + ASSERT_ALIGNED_DOUBLE; + tmp341 = tmp205 + tmp212; + tmp342 = tmp221 - tmp214; + tmp343 = (K956940335 * tmp341) - (K290284677 * tmp342); + tmp357 = (K956940335 * tmp342) + (K290284677 * tmp341); + tmp650 = (K049067674 * tmp588) + (K998795456 * tmp591); + tmp651 = (K671558954 * tmp595) + (K740951125 * tmp598); + tmp652 = tmp650 - tmp651; + tmp723 = tmp650 + tmp651; + } + tmp592 = (K998795456 * tmp588) - (K049067674 * tmp591); + tmp599 = (K740951125 * tmp595) - (K671558954 * tmp598); + tmp600 = tmp592 + tmp599; + tmp720 = tmp592 - tmp599; + { + fftw_real tmp232; + fftw_real tmp241; + fftw_real tmp344; + fftw_real tmp345; + ASSERT_ALIGNED_DOUBLE; + tmp232 = tmp224 - tmp231; + tmp241 = tmp233 + tmp240; + tmp242 = (K773010453 * tmp232) - (K634393284 * tmp241); + tmp286 = (K773010453 * tmp241) + (K634393284 * tmp232); + tmp344 = tmp240 - tmp233; + tmp345 = tmp224 + tmp231; + tmp346 = (K881921264 * tmp344) + (K471396736 * tmp345); + tmp358 = (K881921264 * tmp345) - (K471396736 * tmp344); + } + } + } + { + fftw_real tmp65; + fftw_real tmp421; + fftw_real tmp34; + fftw_real tmp414; + fftw_real tmp129; + fftw_real tmp423; + fftw_real tmp413; + fftw_real tmp424; + fftw_real tmp18; + fftw_real tmp66; + fftw_real tmp398; + ASSERT_ALIGNED_DOUBLE; + tmp65 = K2_000000000 * (tmp49 + tmp64); + tmp421 = K2_000000000 * (tmp417 - tmp420); + tmp18 = tmp10 + tmp17; + tmp34 = tmp18 + tmp33; + tmp414 = tmp18 - tmp33; + { + fftw_real tmp97; + fftw_real tmp128; + fftw_real tmp405; + fftw_real tmp412; + ASSERT_ALIGNED_DOUBLE; + tmp97 = tmp81 + tmp96; + tmp128 = tmp112 + tmp127; + tmp129 = K2_000000000 * (tmp97 + tmp128); + tmp423 = tmp97 - tmp128; + tmp405 = tmp401 - tmp404; + tmp412 = tmp408 - tmp411; + tmp413 = K2_000000000 * (tmp405 - tmp412); + tmp424 = tmp405 + tmp412; + } + tmp66 = tmp34 + tmp65; + output[64 * ostride] = tmp66 - tmp129; + output[0] = tmp66 + tmp129; + tmp398 = tmp34 - tmp65; + output[32 * ostride] = tmp398 - tmp413; + output[96 * ostride] = tmp398 + tmp413; + { + fftw_real tmp422; + fftw_real tmp425; + fftw_real tmp426; + fftw_real tmp427; + ASSERT_ALIGNED_DOUBLE; + tmp422 = tmp414 - tmp421; + tmp425 = K1_414213562 * (tmp423 - tmp424); + output[80 * ostride] = tmp422 - tmp425; + output[16 * ostride] = tmp422 + tmp425; + tmp426 = tmp414 + tmp421; + tmp427 = K1_414213562 * (tmp423 + tmp424); + output[48 * ostride] = tmp426 - tmp427; + output[112 * ostride] = tmp426 + tmp427; + } + } + { + fftw_real tmp432; + fftw_real tmp446; + fftw_real tmp442; + fftw_real tmp450; + fftw_real tmp435; + fftw_real tmp447; + fftw_real tmp439; + fftw_real tmp449; + fftw_real tmp428; + fftw_real tmp440; + fftw_real tmp441; + ASSERT_ALIGNED_DOUBLE; + tmp428 = tmp10 - tmp17; + tmp432 = tmp428 - tmp431; + tmp446 = tmp428 + tmp431; + tmp440 = tmp127 - tmp112; + tmp441 = tmp401 + tmp404; + tmp442 = tmp440 + tmp441; + tmp450 = tmp441 - tmp440; + { + fftw_real tmp433; + fftw_real tmp434; + fftw_real tmp437; + fftw_real tmp438; + ASSERT_ALIGNED_DOUBLE; + tmp433 = tmp49 - tmp64; + tmp434 = tmp417 + tmp420; + tmp435 = K1_414213562 * (tmp433 - tmp434); + tmp447 = K1_414213562 * (tmp433 + tmp434); + tmp437 = tmp81 - tmp96; + tmp438 = tmp408 + tmp411; + tmp439 = tmp437 - tmp438; + tmp449 = tmp437 + tmp438; + } + { + fftw_real tmp436; + fftw_real tmp443; + fftw_real tmp444; + fftw_real tmp445; + ASSERT_ALIGNED_DOUBLE; + tmp436 = tmp432 + tmp435; + tmp443 = (K1_847759065 * tmp439) - (K765366864 * tmp442); + output[72 * ostride] = tmp436 - tmp443; + output[8 * ostride] = tmp436 + tmp443; + tmp444 = tmp432 - tmp435; + tmp445 = (K1_847759065 * tmp442) + (K765366864 * tmp439); + output[40 * ostride] = tmp444 - tmp445; + output[104 * ostride] = tmp444 + tmp445; + } + { + fftw_real tmp448; + fftw_real tmp451; + fftw_real tmp452; + fftw_real tmp453; + ASSERT_ALIGNED_DOUBLE; + tmp448 = tmp446 - tmp447; + tmp451 = (K765366864 * tmp449) - (K1_847759065 * tmp450); + output[88 * ostride] = tmp448 - tmp451; + output[24 * ostride] = tmp448 + tmp451; + tmp452 = tmp446 + tmp447; + tmp453 = (K765366864 * tmp450) + (K1_847759065 * tmp449); + output[56 * ostride] = tmp452 - tmp453; + output[120 * ostride] = tmp452 + tmp453; + } + } + { + fftw_real tmp203; + fftw_real tmp295; + fftw_real tmp164; + fftw_real tmp292; + fftw_real tmp283; + fftw_real tmp297; + fftw_real tmp291; + fftw_real tmp298; + fftw_real tmp144; + fftw_real tmp163; + fftw_real tmp204; + fftw_real tmp284; + ASSERT_ALIGNED_DOUBLE; + tmp203 = K2_000000000 * (tmp183 + tmp202); + tmp295 = K2_000000000 * (tmp293 - tmp294); + tmp144 = tmp134 + tmp143; + tmp163 = (K1_847759065 * tmp153) - (K765366864 * tmp162); + tmp164 = tmp144 + tmp163; + tmp292 = tmp144 - tmp163; + { + fftw_real tmp243; + fftw_real tmp282; + fftw_real tmp287; + fftw_real tmp290; + ASSERT_ALIGNED_DOUBLE; + tmp243 = tmp223 + tmp242; + tmp282 = tmp262 + tmp281; + tmp283 = K2_000000000 * (tmp243 + tmp282); + tmp297 = tmp243 - tmp282; + tmp287 = tmp285 - tmp286; + tmp290 = tmp288 - tmp289; + tmp291 = K2_000000000 * (tmp287 - tmp290); + tmp298 = tmp287 + tmp290; + } + tmp204 = tmp164 + tmp203; + output[66 * ostride] = tmp204 - tmp283; + output[2 * ostride] = tmp204 + tmp283; + tmp284 = tmp164 - tmp203; + output[34 * ostride] = tmp284 - tmp291; + output[98 * ostride] = tmp284 + tmp291; + { + fftw_real tmp296; + fftw_real tmp299; + fftw_real tmp300; + fftw_real tmp301; + ASSERT_ALIGNED_DOUBLE; + tmp296 = tmp292 - tmp295; + tmp299 = K1_414213562 * (tmp297 - tmp298); + output[82 * ostride] = tmp296 - tmp299; + output[18 * ostride] = tmp296 + tmp299; + tmp300 = tmp292 + tmp295; + tmp301 = K1_414213562 * (tmp297 + tmp298); + output[50 * ostride] = tmp300 - tmp301; + output[114 * ostride] = tmp300 + tmp301; + } + } + { + fftw_real tmp304; + fftw_real tmp318; + fftw_real tmp314; + fftw_real tmp322; + fftw_real tmp307; + fftw_real tmp319; + fftw_real tmp311; + fftw_real tmp321; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp302; + fftw_real tmp303; + fftw_real tmp312; + fftw_real tmp313; + ASSERT_ALIGNED_DOUBLE; + tmp302 = tmp134 - tmp143; + tmp303 = (K1_847759065 * tmp162) + (K765366864 * tmp153); + tmp304 = tmp302 - tmp303; + tmp318 = tmp302 + tmp303; + tmp312 = tmp285 + tmp286; + tmp313 = tmp281 - tmp262; + tmp314 = tmp312 + tmp313; + tmp322 = tmp312 - tmp313; + } + { + fftw_real tmp305; + fftw_real tmp306; + fftw_real tmp309; + fftw_real tmp310; + ASSERT_ALIGNED_DOUBLE; + tmp305 = tmp183 - tmp202; + tmp306 = tmp293 + tmp294; + tmp307 = K1_414213562 * (tmp305 - tmp306); + tmp319 = K1_414213562 * (tmp305 + tmp306); + tmp309 = tmp223 - tmp242; + tmp310 = tmp288 + tmp289; + tmp311 = tmp309 - tmp310; + tmp321 = tmp309 + tmp310; + } + { + fftw_real tmp308; + fftw_real tmp315; + fftw_real tmp316; + fftw_real tmp317; + ASSERT_ALIGNED_DOUBLE; + tmp308 = tmp304 + tmp307; + tmp315 = (K1_847759065 * tmp311) - (K765366864 * tmp314); + output[74 * ostride] = tmp308 - tmp315; + output[10 * ostride] = tmp308 + tmp315; + tmp316 = tmp304 - tmp307; + tmp317 = (K1_847759065 * tmp314) + (K765366864 * tmp311); + output[42 * ostride] = tmp316 - tmp317; + output[106 * ostride] = tmp316 + tmp317; + } + { + fftw_real tmp320; + fftw_real tmp323; + fftw_real tmp324; + fftw_real tmp325; + ASSERT_ALIGNED_DOUBLE; + tmp320 = tmp318 - tmp319; + tmp323 = (K765366864 * tmp321) - (K1_847759065 * tmp322); + output[90 * ostride] = tmp320 - tmp323; + output[26 * ostride] = tmp320 + tmp323; + tmp324 = tmp318 + tmp319; + tmp325 = (K765366864 * tmp322) + (K1_847759065 * tmp321); + output[58 * ostride] = tmp324 - tmp325; + output[122 * ostride] = tmp324 + tmp325; + } + } + { + fftw_real tmp460; + fftw_real tmp488; + fftw_real tmp487; + fftw_real tmp492; + fftw_real tmp483; + fftw_real tmp491; + fftw_real tmp467; + fftw_real tmp489; + fftw_real tmp468; + fftw_real tmp484; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp456; + fftw_real tmp459; + fftw_real tmp485; + fftw_real tmp486; + ASSERT_ALIGNED_DOUBLE; + tmp456 = tmp454 - tmp455; + tmp459 = K1_414213562 * (tmp457 - tmp458); + tmp460 = tmp456 + tmp459; + tmp488 = tmp456 - tmp459; + tmp485 = (K980785280 * tmp474) + (K195090322 * tmp471); + tmp486 = (K831469612 * tmp481) + (K555570233 * tmp478); + tmp487 = K2_000000000 * (tmp485 - tmp486); + tmp492 = tmp485 + tmp486; + } + { + fftw_real tmp475; + fftw_real tmp482; + fftw_real tmp463; + fftw_real tmp466; + ASSERT_ALIGNED_DOUBLE; + tmp475 = (K980785280 * tmp471) - (K195090322 * tmp474); + tmp482 = (K831469612 * tmp478) - (K555570233 * tmp481); + tmp483 = K2_000000000 * (tmp475 + tmp482); + tmp491 = tmp475 - tmp482; + tmp463 = tmp461 - tmp462; + tmp466 = tmp464 + tmp465; + tmp467 = (K1_847759065 * tmp463) - (K765366864 * tmp466); + tmp489 = (K1_847759065 * tmp466) + (K765366864 * tmp463); + } + tmp468 = tmp460 + tmp467; + output[68 * ostride] = tmp468 - tmp483; + output[4 * ostride] = tmp468 + tmp483; + tmp484 = tmp460 - tmp467; + output[36 * ostride] = tmp484 - tmp487; + output[100 * ostride] = tmp484 + tmp487; + { + fftw_real tmp490; + fftw_real tmp493; + fftw_real tmp494; + fftw_real tmp495; + ASSERT_ALIGNED_DOUBLE; + tmp490 = tmp488 - tmp489; + tmp493 = K1_414213562 * (tmp491 - tmp492); + output[84 * ostride] = tmp490 - tmp493; + output[20 * ostride] = tmp490 + tmp493; + tmp494 = tmp488 + tmp489; + tmp495 = K1_414213562 * (tmp491 + tmp492); + output[52 * ostride] = tmp494 - tmp495; + output[116 * ostride] = tmp494 + tmp495; + } + } + { + fftw_real tmp498; + fftw_real tmp514; + fftw_real tmp513; + fftw_real tmp518; + fftw_real tmp509; + fftw_real tmp517; + fftw_real tmp501; + fftw_real tmp515; + fftw_real tmp502; + fftw_real tmp510; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp496; + fftw_real tmp497; + fftw_real tmp511; + fftw_real tmp512; + ASSERT_ALIGNED_DOUBLE; + tmp496 = tmp454 + tmp455; + tmp497 = K1_414213562 * (tmp457 + tmp458); + tmp498 = tmp496 - tmp497; + tmp514 = tmp496 + tmp497; + tmp511 = (K831469612 * tmp504) + (K555570233 * tmp503); + tmp512 = (K980785280 * tmp507) - (K195090322 * tmp506); + tmp513 = K2_000000000 * (tmp511 - tmp512); + tmp518 = tmp511 + tmp512; + } + { + fftw_real tmp505; + fftw_real tmp508; + fftw_real tmp499; + fftw_real tmp500; + ASSERT_ALIGNED_DOUBLE; + tmp505 = (K831469612 * tmp503) - (K555570233 * tmp504); + tmp508 = (K980785280 * tmp506) + (K195090322 * tmp507); + tmp509 = K2_000000000 * (tmp505 - tmp508); + tmp517 = tmp505 + tmp508; + tmp499 = tmp461 + tmp462; + tmp500 = tmp465 - tmp464; + tmp501 = (K765366864 * tmp499) - (K1_847759065 * tmp500); + tmp515 = (K765366864 * tmp500) + (K1_847759065 * tmp499); + } + tmp502 = tmp498 + tmp501; + output[76 * ostride] = tmp502 - tmp509; + output[12 * ostride] = tmp502 + tmp509; + tmp510 = tmp498 - tmp501; + output[44 * ostride] = tmp510 - tmp513; + output[108 * ostride] = tmp510 + tmp513; + { + fftw_real tmp516; + fftw_real tmp519; + fftw_real tmp520; + fftw_real tmp521; + ASSERT_ALIGNED_DOUBLE; + tmp516 = tmp514 - tmp515; + tmp519 = K1_414213562 * (tmp517 - tmp518); + output[92 * ostride] = tmp516 - tmp519; + output[28 * ostride] = tmp516 + tmp519; + tmp520 = tmp514 + tmp515; + tmp521 = K1_414213562 * (tmp517 + tmp518); + output[60 * ostride] = tmp520 - tmp521; + output[124 * ostride] = tmp520 + tmp521; + } + } + { + fftw_real tmp339; + fftw_real tmp367; + fftw_real tmp332; + fftw_real tmp364; + fftw_real tmp355; + fftw_real tmp369; + fftw_real tmp363; + fftw_real tmp370; + fftw_real tmp328; + fftw_real tmp331; + fftw_real tmp340; + fftw_real tmp356; + ASSERT_ALIGNED_DOUBLE; + tmp339 = K2_000000000 * (tmp335 - tmp338); + tmp367 = K2_000000000 * (tmp365 - tmp366); + tmp328 = tmp326 - tmp327; + tmp331 = (K765366864 * tmp329) - (K1_847759065 * tmp330); + tmp332 = tmp328 + tmp331; + tmp364 = tmp328 - tmp331; + { + fftw_real tmp347; + fftw_real tmp354; + fftw_real tmp359; + fftw_real tmp362; + ASSERT_ALIGNED_DOUBLE; + tmp347 = tmp343 - tmp346; + tmp354 = tmp350 + tmp353; + tmp355 = K2_000000000 * (tmp347 + tmp354); + tmp369 = tmp347 - tmp354; + tmp359 = tmp357 - tmp358; + tmp362 = tmp360 - tmp361; + tmp363 = K2_000000000 * (tmp359 - tmp362); + tmp370 = tmp359 + tmp362; + } + tmp340 = tmp332 + tmp339; + output[70 * ostride] = tmp340 - tmp355; + output[6 * ostride] = tmp340 + tmp355; + tmp356 = tmp332 - tmp339; + output[38 * ostride] = tmp356 - tmp363; + output[102 * ostride] = tmp356 + tmp363; + { + fftw_real tmp368; + fftw_real tmp371; + fftw_real tmp372; + fftw_real tmp373; + ASSERT_ALIGNED_DOUBLE; + tmp368 = tmp364 - tmp367; + tmp371 = K1_414213562 * (tmp369 - tmp370); + output[86 * ostride] = tmp368 - tmp371; + output[22 * ostride] = tmp368 + tmp371; + tmp372 = tmp364 + tmp367; + tmp373 = K1_414213562 * (tmp369 + tmp370); + output[54 * ostride] = tmp372 - tmp373; + output[118 * ostride] = tmp372 + tmp373; + } + } + { + fftw_real tmp376; + fftw_real tmp390; + fftw_real tmp386; + fftw_real tmp394; + fftw_real tmp379; + fftw_real tmp391; + fftw_real tmp383; + fftw_real tmp393; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp374; + fftw_real tmp375; + fftw_real tmp384; + fftw_real tmp385; + ASSERT_ALIGNED_DOUBLE; + tmp374 = tmp326 + tmp327; + tmp375 = (K765366864 * tmp330) + (K1_847759065 * tmp329); + tmp376 = tmp374 - tmp375; + tmp390 = tmp374 + tmp375; + tmp384 = tmp357 + tmp358; + tmp385 = tmp353 - tmp350; + tmp386 = tmp384 + tmp385; + tmp394 = tmp384 - tmp385; + } + { + fftw_real tmp377; + fftw_real tmp378; + fftw_real tmp381; + fftw_real tmp382; + ASSERT_ALIGNED_DOUBLE; + tmp377 = tmp335 + tmp338; + tmp378 = tmp365 + tmp366; + tmp379 = K1_414213562 * (tmp377 - tmp378); + tmp391 = K1_414213562 * (tmp377 + tmp378); + tmp381 = tmp343 + tmp346; + tmp382 = tmp360 + tmp361; + tmp383 = tmp381 - tmp382; + tmp393 = tmp381 + tmp382; + } + { + fftw_real tmp380; + fftw_real tmp387; + fftw_real tmp388; + fftw_real tmp389; + ASSERT_ALIGNED_DOUBLE; + tmp380 = tmp376 + tmp379; + tmp387 = (K1_847759065 * tmp383) - (K765366864 * tmp386); + output[78 * ostride] = tmp380 - tmp387; + output[14 * ostride] = tmp380 + tmp387; + tmp388 = tmp376 - tmp379; + tmp389 = (K1_847759065 * tmp386) + (K765366864 * tmp383); + output[46 * ostride] = tmp388 - tmp389; + output[110 * ostride] = tmp388 + tmp389; + } + { + fftw_real tmp392; + fftw_real tmp395; + fftw_real tmp396; + fftw_real tmp397; + ASSERT_ALIGNED_DOUBLE; + tmp392 = tmp390 - tmp391; + tmp395 = (K765366864 * tmp393) - (K1_847759065 * tmp394); + output[94 * ostride] = tmp392 - tmp395; + output[30 * ostride] = tmp392 + tmp395; + tmp396 = tmp390 + tmp391; + tmp397 = (K765366864 * tmp394) + (K1_847759065 * tmp393); + output[62 * ostride] = tmp396 - tmp397; + output[126 * ostride] = tmp396 + tmp397; + } + } + { + fftw_real tmp584; + fftw_real tmp672; + fftw_real tmp553; + fftw_real tmp665; + fftw_real tmp648; + fftw_real tmp674; + fftw_real tmp664; + fftw_real tmp675; + fftw_real tmp537; + fftw_real tmp552; + fftw_real tmp585; + fftw_real tmp649; + ASSERT_ALIGNED_DOUBLE; + tmp584 = K2_000000000 * (tmp568 + tmp583); + tmp672 = K2_000000000 * (tmp668 - tmp671); + tmp537 = tmp529 + tmp536; + tmp552 = K2_000000000 * (tmp544 + tmp551); + tmp553 = tmp537 + tmp552; + tmp665 = tmp537 - tmp552; + { + fftw_real tmp616; + fftw_real tmp647; + fftw_real tmp656; + fftw_real tmp663; + ASSERT_ALIGNED_DOUBLE; + tmp616 = tmp600 + tmp615; + tmp647 = tmp631 + tmp646; + tmp648 = K2_000000000 * (tmp616 + tmp647); + tmp674 = tmp616 - tmp647; + tmp656 = tmp652 - tmp655; + tmp663 = tmp659 - tmp662; + tmp664 = K2_000000000 * (tmp656 - tmp663); + tmp675 = tmp656 + tmp663; + } + tmp585 = tmp553 + tmp584; + output[65 * ostride] = tmp585 - tmp648; + output[ostride] = tmp585 + tmp648; + tmp649 = tmp553 - tmp584; + output[33 * ostride] = tmp649 - tmp664; + output[97 * ostride] = tmp649 + tmp664; + { + fftw_real tmp673; + fftw_real tmp676; + fftw_real tmp677; + fftw_real tmp678; + ASSERT_ALIGNED_DOUBLE; + tmp673 = tmp665 - tmp672; + tmp676 = K1_414213562 * (tmp674 - tmp675); + output[81 * ostride] = tmp673 - tmp676; + output[17 * ostride] = tmp673 + tmp676; + tmp677 = tmp665 + tmp672; + tmp678 = K1_414213562 * (tmp674 + tmp675); + output[49 * ostride] = tmp677 - tmp678; + output[113 * ostride] = tmp677 + tmp678; + } + } + { + fftw_real tmp683; + fftw_real tmp697; + fftw_real tmp693; + fftw_real tmp701; + fftw_real tmp686; + fftw_real tmp698; + fftw_real tmp690; + fftw_real tmp700; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp679; + fftw_real tmp682; + fftw_real tmp691; + fftw_real tmp692; + ASSERT_ALIGNED_DOUBLE; + tmp679 = tmp529 - tmp536; + tmp682 = K2_000000000 * (tmp680 - tmp681); + tmp683 = tmp679 - tmp682; + tmp697 = tmp679 + tmp682; + tmp691 = tmp652 + tmp655; + tmp692 = tmp646 - tmp631; + tmp693 = tmp691 + tmp692; + tmp701 = tmp691 - tmp692; + } + { + fftw_real tmp684; + fftw_real tmp685; + fftw_real tmp688; + fftw_real tmp689; + ASSERT_ALIGNED_DOUBLE; + tmp684 = tmp568 - tmp583; + tmp685 = tmp668 + tmp671; + tmp686 = K1_414213562 * (tmp684 - tmp685); + tmp698 = K1_414213562 * (tmp684 + tmp685); + tmp688 = tmp600 - tmp615; + tmp689 = tmp659 + tmp662; + tmp690 = tmp688 - tmp689; + tmp700 = tmp688 + tmp689; + } + { + fftw_real tmp687; + fftw_real tmp694; + fftw_real tmp695; + fftw_real tmp696; + ASSERT_ALIGNED_DOUBLE; + tmp687 = tmp683 + tmp686; + tmp694 = (K1_847759065 * tmp690) - (K765366864 * tmp693); + output[73 * ostride] = tmp687 - tmp694; + output[9 * ostride] = tmp687 + tmp694; + tmp695 = tmp683 - tmp686; + tmp696 = (K1_847759065 * tmp693) + (K765366864 * tmp690); + output[41 * ostride] = tmp695 - tmp696; + output[105 * ostride] = tmp695 + tmp696; + } + { + fftw_real tmp699; + fftw_real tmp702; + fftw_real tmp703; + fftw_real tmp704; + ASSERT_ALIGNED_DOUBLE; + tmp699 = tmp697 - tmp698; + tmp702 = (K765366864 * tmp700) - (K1_847759065 * tmp701); + output[89 * ostride] = tmp699 - tmp702; + output[25 * ostride] = tmp699 + tmp702; + tmp703 = tmp697 + tmp698; + tmp704 = (K765366864 * tmp701) + (K1_847759065 * tmp700); + output[57 * ostride] = tmp703 - tmp704; + output[121 * ostride] = tmp703 + tmp704; + } + } + { + fftw_real tmp711; + fftw_real tmp739; + fftw_real tmp718; + fftw_real tmp740; + fftw_real tmp726; + fftw_real tmp736; + fftw_real tmp733; + fftw_real tmp737; + fftw_real tmp742; + fftw_real tmp743; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp707; + fftw_real tmp710; + fftw_real tmp714; + fftw_real tmp717; + ASSERT_ALIGNED_DOUBLE; + tmp707 = tmp705 - tmp706; + tmp710 = K1_414213562 * (tmp708 - tmp709); + tmp711 = tmp707 + tmp710; + tmp739 = tmp707 - tmp710; + tmp714 = tmp712 - tmp713; + tmp717 = tmp715 + tmp716; + tmp718 = (K1_847759065 * tmp714) - (K765366864 * tmp717); + tmp740 = (K1_847759065 * tmp717) + (K765366864 * tmp714); + { + fftw_real tmp722; + fftw_real tmp725; + fftw_real tmp729; + fftw_real tmp732; + ASSERT_ALIGNED_DOUBLE; + tmp722 = tmp720 - tmp721; + tmp725 = tmp723 + tmp724; + tmp726 = (K980785280 * tmp722) - (K195090322 * tmp725); + tmp736 = (K980785280 * tmp725) + (K195090322 * tmp722); + tmp729 = tmp727 - tmp728; + tmp732 = tmp730 + tmp731; + tmp733 = (K831469612 * tmp729) - (K555570233 * tmp732); + tmp737 = (K831469612 * tmp732) + (K555570233 * tmp729); + } + tmp742 = tmp726 - tmp733; + tmp743 = tmp736 + tmp737; + } + { + fftw_real tmp719; + fftw_real tmp734; + fftw_real tmp735; + fftw_real tmp738; + ASSERT_ALIGNED_DOUBLE; + tmp719 = tmp711 + tmp718; + tmp734 = K2_000000000 * (tmp726 + tmp733); + output[69 * ostride] = tmp719 - tmp734; + output[5 * ostride] = tmp719 + tmp734; + tmp735 = tmp711 - tmp718; + tmp738 = K2_000000000 * (tmp736 - tmp737); + output[37 * ostride] = tmp735 - tmp738; + output[101 * ostride] = tmp735 + tmp738; + } + { + fftw_real tmp741; + fftw_real tmp744; + fftw_real tmp745; + fftw_real tmp746; + ASSERT_ALIGNED_DOUBLE; + tmp741 = tmp739 - tmp740; + tmp744 = K1_414213562 * (tmp742 - tmp743); + output[85 * ostride] = tmp741 - tmp744; + output[21 * ostride] = tmp741 + tmp744; + tmp745 = tmp739 + tmp740; + tmp746 = K1_414213562 * (tmp742 + tmp743); + output[53 * ostride] = tmp745 - tmp746; + output[117 * ostride] = tmp745 + tmp746; + } + } + { + fftw_real tmp749; + fftw_real tmp765; + fftw_real tmp752; + fftw_real tmp766; + fftw_real tmp756; + fftw_real tmp762; + fftw_real tmp759; + fftw_real tmp763; + fftw_real tmp768; + fftw_real tmp769; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp747; + fftw_real tmp748; + fftw_real tmp750; + fftw_real tmp751; + ASSERT_ALIGNED_DOUBLE; + tmp747 = tmp705 + tmp706; + tmp748 = K1_414213562 * (tmp708 + tmp709); + tmp749 = tmp747 - tmp748; + tmp765 = tmp747 + tmp748; + tmp750 = tmp712 + tmp713; + tmp751 = tmp715 - tmp716; + tmp752 = (K765366864 * tmp750) - (K1_847759065 * tmp751); + tmp766 = (K765366864 * tmp751) + (K1_847759065 * tmp750); + { + fftw_real tmp754; + fftw_real tmp755; + fftw_real tmp757; + fftw_real tmp758; + ASSERT_ALIGNED_DOUBLE; + tmp754 = tmp720 + tmp721; + tmp755 = tmp723 - tmp724; + tmp756 = (K831469612 * tmp754) - (K555570233 * tmp755); + tmp762 = (K831469612 * tmp755) + (K555570233 * tmp754); + tmp757 = tmp730 - tmp731; + tmp758 = tmp727 + tmp728; + tmp759 = (K980785280 * tmp757) + (K195090322 * tmp758); + tmp763 = (K980785280 * tmp758) - (K195090322 * tmp757); + } + tmp768 = tmp756 + tmp759; + tmp769 = tmp762 + tmp763; + } + { + fftw_real tmp753; + fftw_real tmp760; + fftw_real tmp761; + fftw_real tmp764; + ASSERT_ALIGNED_DOUBLE; + tmp753 = tmp749 + tmp752; + tmp760 = K2_000000000 * (tmp756 - tmp759); + output[77 * ostride] = tmp753 - tmp760; + output[13 * ostride] = tmp753 + tmp760; + tmp761 = tmp749 - tmp752; + tmp764 = K2_000000000 * (tmp762 - tmp763); + output[45 * ostride] = tmp761 - tmp764; + output[109 * ostride] = tmp761 + tmp764; + } + { + fftw_real tmp767; + fftw_real tmp770; + fftw_real tmp771; + fftw_real tmp772; + ASSERT_ALIGNED_DOUBLE; + tmp767 = tmp765 - tmp766; + tmp770 = K1_414213562 * (tmp768 - tmp769); + output[93 * ostride] = tmp767 - tmp770; + output[29 * ostride] = tmp767 + tmp770; + tmp771 = tmp765 + tmp766; + tmp772 = K1_414213562 * (tmp768 + tmp769); + output[61 * ostride] = tmp771 - tmp772; + output[125 * ostride] = tmp771 + tmp772; + } + } + { + fftw_real tmp802; + fftw_real tmp858; + fftw_real tmp864; + fftw_real tmp842; + fftw_real tmp834; + fftw_real tmp859; + fftw_real tmp787; + fftw_real tmp835; + fftw_real tmp850; + fftw_real tmp857; + fftw_real tmp803; + fftw_real tmp863; + ASSERT_ALIGNED_DOUBLE; + tmp802 = K2_000000000 * (tmp794 + tmp801); + tmp850 = tmp846 + tmp849; + tmp857 = tmp853 + tmp856; + tmp858 = tmp850 - tmp857; + tmp864 = K2_000000000 * (tmp850 + tmp857); + tmp842 = K2_000000000 * (tmp838 - tmp841); + { + fftw_real tmp818; + fftw_real tmp833; + fftw_real tmp779; + fftw_real tmp786; + ASSERT_ALIGNED_DOUBLE; + tmp818 = tmp810 - tmp817; + tmp833 = tmp825 - tmp832; + tmp834 = K2_000000000 * (tmp818 - tmp833); + tmp859 = tmp818 + tmp833; + tmp779 = tmp775 + tmp778; + tmp786 = K2_000000000 * (tmp782 - tmp785); + tmp787 = tmp779 + tmp786; + tmp835 = tmp779 - tmp786; + } + tmp803 = tmp787 - tmp802; + output[35 * ostride] = tmp803 - tmp834; + output[99 * ostride] = tmp803 + tmp834; + tmp863 = tmp787 + tmp802; + output[67 * ostride] = tmp863 - tmp864; + output[3 * ostride] = tmp863 + tmp864; + { + fftw_real tmp843; + fftw_real tmp860; + fftw_real tmp861; + fftw_real tmp862; + ASSERT_ALIGNED_DOUBLE; + tmp843 = tmp835 - tmp842; + tmp860 = K1_414213562 * (tmp858 - tmp859); + output[83 * ostride] = tmp843 - tmp860; + output[19 * ostride] = tmp843 + tmp860; + tmp861 = tmp835 + tmp842; + tmp862 = K1_414213562 * (tmp859 + tmp858); + output[51 * ostride] = tmp861 - tmp862; + output[115 * ostride] = tmp861 + tmp862; + } + } + { + fftw_real tmp869; + fftw_real tmp883; + fftw_real tmp879; + fftw_real tmp887; + fftw_real tmp872; + fftw_real tmp884; + fftw_real tmp876; + fftw_real tmp886; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp865; + fftw_real tmp868; + fftw_real tmp877; + fftw_real tmp878; + ASSERT_ALIGNED_DOUBLE; + tmp865 = tmp775 - tmp778; + tmp868 = K2_000000000 * (tmp866 - tmp867); + tmp869 = tmp865 + tmp868; + tmp883 = tmp865 - tmp868; + tmp877 = tmp810 + tmp817; + tmp878 = tmp856 - tmp853; + tmp879 = tmp877 - tmp878; + tmp887 = tmp877 + tmp878; + } + { + fftw_real tmp870; + fftw_real tmp871; + fftw_real tmp874; + fftw_real tmp875; + ASSERT_ALIGNED_DOUBLE; + tmp870 = tmp794 - tmp801; + tmp871 = tmp838 + tmp841; + tmp872 = K1_414213562 * (tmp870 + tmp871); + tmp884 = K1_414213562 * (tmp870 - tmp871); + tmp874 = tmp846 - tmp849; + tmp875 = tmp825 + tmp832; + tmp876 = tmp874 + tmp875; + tmp886 = tmp874 - tmp875; + } + { + fftw_real tmp873; + fftw_real tmp880; + fftw_real tmp881; + fftw_real tmp882; + ASSERT_ALIGNED_DOUBLE; + tmp873 = tmp869 - tmp872; + tmp880 = (K765366864 * tmp876) - (K1_847759065 * tmp879); + output[91 * ostride] = tmp873 - tmp880; + output[27 * ostride] = tmp873 + tmp880; + tmp881 = tmp869 + tmp872; + tmp882 = (K1_847759065 * tmp876) + (K765366864 * tmp879); + output[59 * ostride] = tmp881 - tmp882; + output[123 * ostride] = tmp881 + tmp882; + } + { + fftw_real tmp885; + fftw_real tmp888; + fftw_real tmp889; + fftw_real tmp890; + ASSERT_ALIGNED_DOUBLE; + tmp885 = tmp883 + tmp884; + tmp888 = (K1_847759065 * tmp886) - (K765366864 * tmp887); + output[75 * ostride] = tmp885 - tmp888; + output[11 * ostride] = tmp885 + tmp888; + tmp889 = tmp883 - tmp884; + tmp890 = (K765366864 * tmp886) + (K1_847759065 * tmp887); + output[43 * ostride] = tmp889 - tmp890; + output[107 * ostride] = tmp889 + tmp890; + } + } + { + fftw_real tmp897; + fftw_real tmp925; + fftw_real tmp904; + fftw_real tmp926; + fftw_real tmp912; + fftw_real tmp922; + fftw_real tmp919; + fftw_real tmp923; + fftw_real tmp928; + fftw_real tmp929; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp893; + fftw_real tmp896; + fftw_real tmp900; + fftw_real tmp903; + ASSERT_ALIGNED_DOUBLE; + tmp893 = tmp891 - tmp892; + tmp896 = K1_414213562 * (tmp894 - tmp895); + tmp897 = tmp893 + tmp896; + tmp925 = tmp893 - tmp896; + tmp900 = tmp898 - tmp899; + tmp903 = tmp901 + tmp902; + tmp904 = (K1_847759065 * tmp900) - (K765366864 * tmp903); + tmp926 = (K1_847759065 * tmp903) + (K765366864 * tmp900); + { + fftw_real tmp908; + fftw_real tmp911; + fftw_real tmp915; + fftw_real tmp918; + ASSERT_ALIGNED_DOUBLE; + tmp908 = tmp906 - tmp907; + tmp911 = tmp909 + tmp910; + tmp912 = (K980785280 * tmp908) - (K195090322 * tmp911); + tmp922 = (K980785280 * tmp911) + (K195090322 * tmp908); + tmp915 = tmp913 - tmp914; + tmp918 = tmp916 - tmp917; + tmp919 = (K831469612 * tmp915) - (K555570233 * tmp918); + tmp923 = (K555570233 * tmp915) + (K831469612 * tmp918); + } + tmp928 = tmp912 - tmp919; + tmp929 = tmp922 + tmp923; + } + { + fftw_real tmp905; + fftw_real tmp920; + fftw_real tmp921; + fftw_real tmp924; + ASSERT_ALIGNED_DOUBLE; + tmp905 = tmp897 + tmp904; + tmp920 = K2_000000000 * (tmp912 + tmp919); + output[71 * ostride] = tmp905 - tmp920; + output[7 * ostride] = tmp905 + tmp920; + tmp921 = tmp897 - tmp904; + tmp924 = K2_000000000 * (tmp922 - tmp923); + output[39 * ostride] = tmp921 - tmp924; + output[103 * ostride] = tmp921 + tmp924; + } + { + fftw_real tmp927; + fftw_real tmp930; + fftw_real tmp931; + fftw_real tmp932; + ASSERT_ALIGNED_DOUBLE; + tmp927 = tmp925 - tmp926; + tmp930 = K1_414213562 * (tmp928 - tmp929); + output[87 * ostride] = tmp927 - tmp930; + output[23 * ostride] = tmp927 + tmp930; + tmp931 = tmp925 + tmp926; + tmp932 = K1_414213562 * (tmp928 + tmp929); + output[55 * ostride] = tmp931 - tmp932; + output[119 * ostride] = tmp931 + tmp932; + } + } + { + fftw_real tmp935; + fftw_real tmp951; + fftw_real tmp938; + fftw_real tmp952; + fftw_real tmp942; + fftw_real tmp948; + fftw_real tmp945; + fftw_real tmp949; + fftw_real tmp954; + fftw_real tmp955; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp933; + fftw_real tmp934; + fftw_real tmp936; + fftw_real tmp937; + ASSERT_ALIGNED_DOUBLE; + tmp933 = tmp891 + tmp892; + tmp934 = K1_414213562 * (tmp895 + tmp894); + tmp935 = tmp933 - tmp934; + tmp951 = tmp933 + tmp934; + tmp936 = tmp898 + tmp899; + tmp937 = tmp901 - tmp902; + tmp938 = (K765366864 * tmp936) - (K1_847759065 * tmp937); + tmp952 = (K765366864 * tmp937) + (K1_847759065 * tmp936); + { + fftw_real tmp940; + fftw_real tmp941; + fftw_real tmp943; + fftw_real tmp944; + ASSERT_ALIGNED_DOUBLE; + tmp940 = tmp909 - tmp910; + tmp941 = tmp906 + tmp907; + tmp942 = (K831469612 * tmp940) + (K555570233 * tmp941); + tmp948 = (K831469612 * tmp941) - (K555570233 * tmp940); + tmp943 = tmp913 + tmp914; + tmp944 = tmp916 + tmp917; + tmp945 = (K980785280 * tmp943) - (K195090322 * tmp944); + tmp949 = (K195090322 * tmp943) + (K980785280 * tmp944); + } + tmp954 = tmp948 + tmp949; + tmp955 = tmp942 + tmp945; + } + { + fftw_real tmp939; + fftw_real tmp946; + fftw_real tmp947; + fftw_real tmp950; + ASSERT_ALIGNED_DOUBLE; + tmp939 = tmp935 - tmp938; + tmp946 = K2_000000000 * (tmp942 - tmp945); + output[47 * ostride] = tmp939 - tmp946; + output[111 * ostride] = tmp939 + tmp946; + tmp947 = tmp935 + tmp938; + tmp950 = K2_000000000 * (tmp948 - tmp949); + output[79 * ostride] = tmp947 - tmp950; + output[15 * ostride] = tmp947 + tmp950; + } + { + fftw_real tmp953; + fftw_real tmp956; + fftw_real tmp957; + fftw_real tmp958; + ASSERT_ALIGNED_DOUBLE; + tmp953 = tmp951 - tmp952; + tmp956 = K1_414213562 * (tmp954 - tmp955); + output[95 * ostride] = tmp953 - tmp956; + output[31 * ostride] = tmp953 + tmp956; + tmp957 = tmp951 + tmp952; + tmp958 = K1_414213562 * (tmp955 + tmp954); + output[63 * ostride] = tmp957 - tmp958; + output[127 * ostride] = tmp957 + tmp958; + } + } +} + +fftw_codelet_desc fftw_hc2real_128_desc = +{ + "fftw_hc2real_128", + (void (*)()) fftw_hc2real_128, + 128, + FFTW_BACKWARD, + FFTW_HC2REAL, + 2831, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fcr_13.c b/src/sndobj/rfftw/fcr_13.c new file mode 100644 index 0000000..f832626 --- /dev/null +++ b/src/sndobj/rfftw/fcr_13.c @@ -0,0 +1,273 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:23 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2real 13 */ + +/* + * This function contains 76 FP additions, 35 FP multiplications, + * (or, 56 additions, 15 multiplications, 20 fused multiply/add), + * 36 stack variables, and 26 memory accesses + */ +static const fftw_real K531932498 = FFTW_KONST(+0.531932498429674575175042127684371897596660533); +static const fftw_real K774781170 = FFTW_KONST(+0.774781170935234584261351932853525703557550433); +static const fftw_real K1_007074065 = FFTW_KONST(+1.007074065727533254493747707736933954186697125); +static const fftw_real K227708958 = FFTW_KONST(+0.227708958111581597949308691735310621069285120); +static const fftw_real K265966249 = FFTW_KONST(+0.265966249214837287587521063842185948798330267); +static const fftw_real K516520780 = FFTW_KONST(+0.516520780623489722840901288569017135705033622); +static const fftw_real K151805972 = FFTW_KONST(+0.151805972074387731966205794490207080712856746); +static const fftw_real K503537032 = FFTW_KONST(+0.503537032863766627246873853868466977093348562); +static const fftw_real K166666666 = FFTW_KONST(+0.166666666666666666666666666666666666666666667); +static const fftw_real K600925212 = FFTW_KONST(+0.600925212577331548853203544578415991041882762); +static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); +static const fftw_real K348277202 = FFTW_KONST(+0.348277202304271810011321589858529485233929352); +static const fftw_real K1_150281458 = FFTW_KONST(+1.150281458948006242736771094910906776922003215); +static const fftw_real K256247671 = FFTW_KONST(+0.256247671582936600958684654061725059144125175); +static const fftw_real K156891391 = FFTW_KONST(+0.156891391051584611046832726756003269660212636); +static const fftw_real K300238635 = FFTW_KONST(+0.300238635966332641462884626667381504676006424); +static const fftw_real K011599105 = FFTW_KONST(+0.011599105605768290721655456654083252189827041); +static const fftw_real K1_732050807 = FFTW_KONST(+1.732050807568877293527446341505872366942805254); +static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); + +/* + * Generator Id's : + * $Id: fcr_13.c,v 1.1.1.1 2006/05/12 15:15:01 veplaini Exp $ + * $Id: fcr_13.c,v 1.1.1.1 2006/05/12 15:15:01 veplaini Exp $ + * $Id: fcr_13.c,v 1.1.1.1 2006/05/12 15:15:01 veplaini Exp $ + */ + +void fftw_hc2real_13(const fftw_real *real_input, const fftw_real *imag_input, fftw_real *output, int real_istride, int imag_istride, int ostride) +{ + fftw_real tmp42; + fftw_real tmp52; + fftw_real tmp45; + fftw_real tmp51; + fftw_real tmp56; + fftw_real tmp67; + fftw_real tmp1; + fftw_real tmp22; + fftw_real tmp12; + fftw_real tmp13; + fftw_real tmp16; + fftw_real tmp19; + fftw_real tmp20; + fftw_real tmp23; + fftw_real tmp24; + fftw_real tmp25; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp28; + fftw_real tmp31; + fftw_real tmp32; + fftw_real tmp37; + fftw_real tmp39; + fftw_real tmp38; + fftw_real tmp35; + fftw_real tmp40; + fftw_real tmp36; + fftw_real tmp41; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp29; + fftw_real tmp30; + fftw_real tmp33; + fftw_real tmp34; + ASSERT_ALIGNED_DOUBLE; + tmp28 = imag_input[imag_istride]; + tmp29 = imag_input[3 * imag_istride]; + tmp30 = imag_input[4 * imag_istride]; + tmp31 = tmp29 - tmp30; + tmp32 = (K2_000000000 * tmp28) - tmp31; + tmp37 = K1_732050807 * (tmp29 + tmp30); + tmp39 = imag_input[5 * imag_istride]; + tmp33 = imag_input[6 * imag_istride]; + tmp34 = imag_input[2 * imag_istride]; + tmp38 = tmp33 + tmp34; + tmp35 = K1_732050807 * (tmp33 - tmp34); + tmp40 = tmp38 - (K2_000000000 * tmp39); + } + tmp36 = tmp32 + tmp35; + tmp41 = tmp37 - tmp40; + tmp42 = (K011599105 * tmp36) - (K300238635 * tmp41); + tmp52 = (K300238635 * tmp36) + (K011599105 * tmp41); + { + fftw_real tmp43; + fftw_real tmp44; + fftw_real tmp54; + fftw_real tmp55; + ASSERT_ALIGNED_DOUBLE; + tmp43 = tmp32 - tmp35; + tmp44 = tmp37 + tmp40; + tmp45 = (K156891391 * tmp43) + (K256247671 * tmp44); + tmp51 = (K256247671 * tmp43) - (K156891391 * tmp44); + tmp54 = tmp28 + tmp31; + tmp55 = tmp38 + tmp39; + tmp56 = (K1_150281458 * tmp54) - (K348277202 * tmp55); + tmp67 = (K348277202 * tmp54) + (K1_150281458 * tmp55); + } + } + { + fftw_real tmp11; + fftw_real tmp18; + fftw_real tmp15; + fftw_real tmp6; + fftw_real tmp17; + fftw_real tmp14; + ASSERT_ALIGNED_DOUBLE; + tmp1 = real_input[0]; + { + fftw_real tmp7; + fftw_real tmp8; + fftw_real tmp9; + fftw_real tmp10; + ASSERT_ALIGNED_DOUBLE; + tmp7 = real_input[5 * real_istride]; + tmp8 = real_input[6 * real_istride]; + tmp9 = real_input[2 * real_istride]; + tmp10 = tmp8 + tmp9; + tmp11 = tmp7 + tmp10; + tmp18 = tmp7 - (K500000000 * tmp10); + tmp15 = tmp8 - tmp9; + } + { + fftw_real tmp2; + fftw_real tmp3; + fftw_real tmp4; + fftw_real tmp5; + ASSERT_ALIGNED_DOUBLE; + tmp2 = real_input[real_istride]; + tmp3 = real_input[3 * real_istride]; + tmp4 = real_input[4 * real_istride]; + tmp5 = tmp3 + tmp4; + tmp6 = tmp2 + tmp5; + tmp17 = tmp2 - (K500000000 * tmp5); + tmp14 = tmp3 - tmp4; + } + tmp22 = K600925212 * (tmp6 - tmp11); + tmp12 = tmp6 + tmp11; + tmp13 = tmp1 - (K166666666 * tmp12); + tmp16 = tmp14 - tmp15; + tmp19 = tmp17 + tmp18; + tmp20 = (K503537032 * tmp16) + (K151805972 * tmp19); + tmp23 = tmp17 - tmp18; + tmp24 = tmp14 + tmp15; + tmp25 = (K516520780 * tmp23) - (K265966249 * tmp24); + } + output[0] = tmp1 + (K2_000000000 * tmp12); + { + fftw_real tmp46; + fftw_real tmp68; + fftw_real tmp70; + fftw_real tmp27; + fftw_real tmp69; + fftw_real tmp73; + fftw_real tmp57; + fftw_real tmp64; + fftw_real tmp63; + fftw_real tmp65; + fftw_real tmp50; + fftw_real tmp72; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp66; + fftw_real tmp21; + fftw_real tmp26; + fftw_real tmp53; + ASSERT_ALIGNED_DOUBLE; + tmp46 = K1_732050807 * (tmp42 + tmp45); + tmp66 = tmp42 - tmp45; + tmp68 = (K2_000000000 * tmp66) - tmp67; + tmp70 = tmp66 + tmp67; + tmp21 = tmp13 - tmp20; + tmp26 = tmp22 - tmp25; + tmp27 = tmp21 - tmp26; + tmp69 = tmp26 + tmp21; + tmp73 = K1_732050807 * (tmp52 + tmp51); + tmp53 = tmp51 - tmp52; + tmp57 = tmp53 + tmp56; + tmp64 = tmp56 - (K2_000000000 * tmp53); + { + fftw_real tmp61; + fftw_real tmp62; + fftw_real tmp48; + fftw_real tmp49; + ASSERT_ALIGNED_DOUBLE; + tmp61 = (K2_000000000 * tmp20) + tmp13; + tmp62 = (K2_000000000 * tmp25) + tmp22; + tmp63 = tmp61 - tmp62; + tmp65 = tmp62 + tmp61; + tmp48 = (K227708958 * tmp16) - (K1_007074065 * tmp19); + tmp49 = (K774781170 * tmp24) + (K531932498 * tmp23); + tmp50 = tmp48 - tmp49; + tmp72 = tmp49 + tmp48; + } + } + output[5 * ostride] = tmp63 - tmp64; + output[8 * ostride] = tmp63 + tmp64; + { + fftw_real tmp47; + fftw_real tmp58; + fftw_real tmp59; + fftw_real tmp60; + ASSERT_ALIGNED_DOUBLE; + tmp47 = tmp27 - tmp46; + tmp58 = tmp50 + tmp57; + output[2 * ostride] = tmp47 - tmp58; + output[7 * ostride] = tmp47 + tmp58; + tmp59 = tmp27 + tmp46; + tmp60 = tmp57 - tmp50; + output[6 * ostride] = tmp59 - tmp60; + output[11 * ostride] = tmp59 + tmp60; + } + output[12 * ostride] = tmp65 - tmp68; + output[ostride] = tmp65 + tmp68; + { + fftw_real tmp71; + fftw_real tmp74; + fftw_real tmp75; + fftw_real tmp76; + ASSERT_ALIGNED_DOUBLE; + tmp71 = tmp69 - tmp70; + tmp74 = tmp72 + tmp73; + output[3 * ostride] = tmp71 - tmp74; + output[9 * ostride] = tmp74 + tmp71; + tmp75 = tmp69 + tmp70; + tmp76 = tmp73 - tmp72; + output[4 * ostride] = tmp75 - tmp76; + output[10 * ostride] = tmp76 + tmp75; + } + } +} + +fftw_codelet_desc fftw_hc2real_13_desc = +{ + "fftw_hc2real_13", + (void (*)()) fftw_hc2real_13, + 13, + FFTW_BACKWARD, + FFTW_HC2REAL, + 301, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fcr_14.c b/src/sndobj/rfftw/fcr_14.c new file mode 100644 index 0000000..8f3492a --- /dev/null +++ b/src/sndobj/rfftw/fcr_14.c @@ -0,0 +1,175 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:25 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2real 14 */ + +/* + * This function contains 62 FP additions, 38 FP multiplications, + * (or, 60 additions, 36 multiplications, 2 fused multiply/add), + * 24 stack variables, and 28 memory accesses + */ +static const fftw_real K445041867 = FFTW_KONST(+0.445041867912628808577805128993589518932711138); +static const fftw_real K1_801937735 = FFTW_KONST(+1.801937735804838252472204639014890102331838324); +static const fftw_real K1_246979603 = FFTW_KONST(+1.246979603717467061050009768008479621264549462); +static const fftw_real K867767478 = FFTW_KONST(+0.867767478235116240951536665696717509219981456); +static const fftw_real K1_949855824 = FFTW_KONST(+1.949855824363647214036263365987862434465571601); +static const fftw_real K1_563662964 = FFTW_KONST(+1.563662964936059617416889053348115500464669037); +static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); + +/* + * Generator Id's : + * $Id: fcr_14.c,v 1.1.1.1 2006/05/12 15:14:45 veplaini Exp $ + * $Id: fcr_14.c,v 1.1.1.1 2006/05/12 15:14:45 veplaini Exp $ + * $Id: fcr_14.c,v 1.1.1.1 2006/05/12 15:14:45 veplaini Exp $ + */ + +void fftw_hc2real_14(const fftw_real *real_input, const fftw_real *imag_input, fftw_real *output, int real_istride, int imag_istride, int ostride) +{ + fftw_real tmp3; + fftw_real tmp13; + fftw_real tmp6; + fftw_real tmp14; + fftw_real tmp26; + fftw_real tmp35; + fftw_real tmp23; + fftw_real tmp34; + fftw_real tmp12; + fftw_real tmp16; + fftw_real tmp20; + fftw_real tmp33; + fftw_real tmp9; + fftw_real tmp15; + fftw_real tmp1; + fftw_real tmp2; + ASSERT_ALIGNED_DOUBLE; + tmp1 = real_input[0]; + tmp2 = real_input[7 * real_istride]; + tmp3 = tmp1 - tmp2; + tmp13 = tmp1 + tmp2; + { + fftw_real tmp4; + fftw_real tmp5; + fftw_real tmp24; + fftw_real tmp25; + ASSERT_ALIGNED_DOUBLE; + tmp4 = real_input[2 * real_istride]; + tmp5 = real_input[5 * real_istride]; + tmp6 = tmp4 - tmp5; + tmp14 = tmp4 + tmp5; + tmp24 = imag_input[2 * imag_istride]; + tmp25 = imag_input[5 * imag_istride]; + tmp26 = tmp24 - tmp25; + tmp35 = tmp24 + tmp25; + } + { + fftw_real tmp21; + fftw_real tmp22; + fftw_real tmp10; + fftw_real tmp11; + ASSERT_ALIGNED_DOUBLE; + tmp21 = imag_input[6 * imag_istride]; + tmp22 = imag_input[imag_istride]; + tmp23 = tmp21 - tmp22; + tmp34 = tmp21 + tmp22; + tmp10 = real_input[6 * real_istride]; + tmp11 = real_input[real_istride]; + tmp12 = tmp10 - tmp11; + tmp16 = tmp10 + tmp11; + } + { + fftw_real tmp18; + fftw_real tmp19; + fftw_real tmp7; + fftw_real tmp8; + ASSERT_ALIGNED_DOUBLE; + tmp18 = imag_input[4 * imag_istride]; + tmp19 = imag_input[3 * imag_istride]; + tmp20 = tmp18 - tmp19; + tmp33 = tmp18 + tmp19; + tmp7 = real_input[4 * real_istride]; + tmp8 = real_input[3 * real_istride]; + tmp9 = tmp7 - tmp8; + tmp15 = tmp7 + tmp8; + } + { + fftw_real tmp38; + fftw_real tmp37; + fftw_real tmp29; + fftw_real tmp28; + ASSERT_ALIGNED_DOUBLE; + output[7 * ostride] = tmp3 + (K2_000000000 * (tmp6 + tmp9 + tmp12)); + tmp38 = (K1_563662964 * tmp35) + (K1_949855824 * tmp33) + (K867767478 * tmp34); + tmp37 = tmp3 + (K1_246979603 * tmp6) - (K1_801937735 * tmp12) - (K445041867 * tmp9); + output[ostride] = tmp37 - tmp38; + output[13 * ostride] = tmp37 + tmp38; + { + fftw_real tmp40; + fftw_real tmp39; + fftw_real tmp36; + fftw_real tmp32; + ASSERT_ALIGNED_DOUBLE; + tmp40 = (K867767478 * tmp33) + (K1_563662964 * tmp34) - (K1_949855824 * tmp35); + tmp39 = tmp3 + (K1_246979603 * tmp12) - (K1_801937735 * tmp9) - (K445041867 * tmp6); + output[5 * ostride] = tmp39 - tmp40; + output[9 * ostride] = tmp39 + tmp40; + tmp36 = (K1_563662964 * tmp33) - (K1_949855824 * tmp34) - (K867767478 * tmp35); + tmp32 = tmp3 + (K1_246979603 * tmp9) - (K445041867 * tmp12) - (K1_801937735 * tmp6); + output[11 * ostride] = tmp32 - tmp36; + output[3 * ostride] = tmp32 + tmp36; + } + output[0] = tmp13 + (K2_000000000 * (tmp14 + tmp15 + tmp16)); + tmp29 = (K867767478 * tmp20) + (K1_563662964 * tmp23) - (K1_949855824 * tmp26); + tmp28 = tmp13 + (K1_246979603 * tmp16) - (K1_801937735 * tmp15) - (K445041867 * tmp14); + output[12 * ostride] = tmp28 - tmp29; + output[2 * ostride] = tmp28 + tmp29; + { + fftw_real tmp31; + fftw_real tmp30; + fftw_real tmp27; + fftw_real tmp17; + ASSERT_ALIGNED_DOUBLE; + tmp31 = (K1_563662964 * tmp26) + (K1_949855824 * tmp20) + (K867767478 * tmp23); + tmp30 = tmp13 + (K1_246979603 * tmp14) - (K1_801937735 * tmp16) - (K445041867 * tmp15); + output[8 * ostride] = tmp30 - tmp31; + output[6 * ostride] = tmp30 + tmp31; + tmp27 = (K1_563662964 * tmp20) - (K1_949855824 * tmp23) - (K867767478 * tmp26); + tmp17 = tmp13 + (K1_246979603 * tmp15) - (K445041867 * tmp16) - (K1_801937735 * tmp14); + output[4 * ostride] = tmp17 - tmp27; + output[10 * ostride] = tmp17 + tmp27; + } + } +} + +fftw_codelet_desc fftw_hc2real_14_desc = +{ + "fftw_hc2real_14", + (void (*)()) fftw_hc2real_14, + 14, + FFTW_BACKWARD, + FFTW_HC2REAL, + 323, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fcr_15.c b/src/sndobj/rfftw/fcr_15.c new file mode 100644 index 0000000..4c6c504 --- /dev/null +++ b/src/sndobj/rfftw/fcr_15.c @@ -0,0 +1,226 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:26 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2real 15 */ + +/* + * This function contains 64 FP additions, 31 FP multiplications, + * (or, 47 additions, 14 multiplications, 17 fused multiply/add), + * 36 stack variables, and 30 memory accesses + */ +static const fftw_real K1_118033988 = FFTW_KONST(+1.118033988749894848204586834365638117720309180); +static const fftw_real K1_902113032 = FFTW_KONST(+1.902113032590307144232878666758764286811397268); +static const fftw_real K1_175570504 = FFTW_KONST(+1.175570504584946258337411909278145537195304875); +static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); +static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); +static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); +static const fftw_real K1_732050807 = FFTW_KONST(+1.732050807568877293527446341505872366942805254); + +/* + * Generator Id's : + * $Id: fcr_15.c,v 1.1.1.1 2006/05/12 15:14:55 veplaini Exp $ + * $Id: fcr_15.c,v 1.1.1.1 2006/05/12 15:14:55 veplaini Exp $ + * $Id: fcr_15.c,v 1.1.1.1 2006/05/12 15:14:55 veplaini Exp $ + */ + +void fftw_hc2real_15(const fftw_real *real_input, const fftw_real *imag_input, fftw_real *output, int real_istride, int imag_istride, int ostride) +{ + fftw_real tmp3; + fftw_real tmp30; + fftw_real tmp18; + fftw_real tmp37; + fftw_real tmp61; + fftw_real tmp62; + fftw_real tmp45; + fftw_real tmp40; + fftw_real tmp23; + fftw_real tmp31; + fftw_real tmp42; + fftw_real tmp28; + fftw_real tmp32; + fftw_real tmp8; + fftw_real tmp13; + fftw_real tmp14; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp17; + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp15; + fftw_real tmp16; + ASSERT_ALIGNED_DOUBLE; + tmp16 = imag_input[5 * imag_istride]; + tmp17 = K1_732050807 * tmp16; + tmp1 = real_input[0]; + tmp2 = real_input[5 * real_istride]; + tmp15 = tmp1 - tmp2; + tmp3 = tmp1 + (K2_000000000 * tmp2); + tmp30 = tmp15 - tmp17; + tmp18 = tmp15 + tmp17; + } + { + fftw_real tmp4; + fftw_real tmp39; + fftw_real tmp5; + fftw_real tmp6; + fftw_real tmp7; + fftw_real tmp22; + fftw_real tmp38; + fftw_real tmp9; + fftw_real tmp44; + fftw_real tmp10; + fftw_real tmp11; + fftw_real tmp12; + fftw_real tmp27; + fftw_real tmp43; + fftw_real tmp19; + fftw_real tmp24; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp20; + fftw_real tmp21; + fftw_real tmp25; + fftw_real tmp26; + ASSERT_ALIGNED_DOUBLE; + tmp4 = real_input[3 * real_istride]; + tmp39 = imag_input[3 * imag_istride]; + tmp5 = real_input[7 * real_istride]; + tmp6 = real_input[2 * real_istride]; + tmp7 = tmp5 + tmp6; + tmp20 = imag_input[7 * imag_istride]; + tmp21 = imag_input[2 * imag_istride]; + tmp22 = K866025403 * (tmp20 - tmp21); + tmp38 = tmp20 + tmp21; + tmp9 = real_input[6 * real_istride]; + tmp44 = imag_input[6 * imag_istride]; + tmp10 = real_input[4 * real_istride]; + tmp11 = real_input[real_istride]; + tmp12 = tmp10 + tmp11; + tmp25 = imag_input[4 * imag_istride]; + tmp26 = imag_input[imag_istride]; + tmp27 = K866025403 * (tmp25 + tmp26); + tmp43 = tmp25 - tmp26; + } + tmp37 = K866025403 * (tmp5 - tmp6); + tmp61 = tmp39 - tmp38; + tmp62 = tmp44 - tmp43; + tmp45 = (K500000000 * tmp43) + tmp44; + tmp40 = (K500000000 * tmp38) + tmp39; + tmp19 = tmp4 - (K500000000 * tmp7); + tmp23 = tmp19 - tmp22; + tmp31 = tmp19 + tmp22; + tmp42 = K866025403 * (tmp10 - tmp11); + tmp24 = tmp9 - (K500000000 * tmp12); + tmp28 = tmp24 - tmp27; + tmp32 = tmp24 + tmp27; + tmp8 = tmp4 + tmp7; + tmp13 = tmp9 + tmp12; + tmp14 = tmp8 + tmp13; + } + output[0] = tmp3 + (K2_000000000 * tmp14); + { + fftw_real tmp63; + fftw_real tmp65; + fftw_real tmp60; + fftw_real tmp64; + fftw_real tmp58; + fftw_real tmp59; + ASSERT_ALIGNED_DOUBLE; + tmp63 = (K1_175570504 * tmp61) - (K1_902113032 * tmp62); + tmp65 = (K1_902113032 * tmp61) + (K1_175570504 * tmp62); + tmp58 = tmp3 - (K500000000 * tmp14); + tmp59 = K1_118033988 * (tmp8 - tmp13); + tmp60 = tmp58 - tmp59; + tmp64 = tmp59 + tmp58; + output[12 * ostride] = tmp60 - tmp63; + output[3 * ostride] = tmp60 + tmp63; + output[6 * ostride] = tmp64 - tmp65; + output[9 * ostride] = tmp64 + tmp65; + } + { + fftw_real tmp51; + fftw_real tmp29; + fftw_real tmp50; + fftw_real tmp55; + fftw_real tmp57; + fftw_real tmp53; + fftw_real tmp54; + fftw_real tmp56; + fftw_real tmp52; + ASSERT_ALIGNED_DOUBLE; + tmp51 = K1_118033988 * (tmp23 - tmp28); + tmp29 = tmp23 + tmp28; + tmp50 = tmp18 - (K500000000 * tmp29); + tmp53 = tmp40 - tmp37; + tmp54 = tmp45 - tmp42; + tmp55 = (K1_175570504 * tmp53) - (K1_902113032 * tmp54); + tmp57 = (K1_902113032 * tmp53) + (K1_175570504 * tmp54); + output[5 * ostride] = tmp18 + (K2_000000000 * tmp29); + tmp56 = tmp51 + tmp50; + output[11 * ostride] = tmp56 - tmp57; + output[14 * ostride] = tmp56 + tmp57; + tmp52 = tmp50 - tmp51; + output[2 * ostride] = tmp52 - tmp55; + output[8 * ostride] = tmp52 + tmp55; + } + { + fftw_real tmp35; + fftw_real tmp33; + fftw_real tmp34; + fftw_real tmp47; + fftw_real tmp49; + fftw_real tmp41; + fftw_real tmp46; + fftw_real tmp48; + fftw_real tmp36; + ASSERT_ALIGNED_DOUBLE; + tmp35 = K1_118033988 * (tmp31 - tmp32); + tmp33 = tmp31 + tmp32; + tmp34 = tmp30 - (K500000000 * tmp33); + tmp41 = tmp37 + tmp40; + tmp46 = tmp42 + tmp45; + tmp47 = (K1_175570504 * tmp41) - (K1_902113032 * tmp46); + tmp49 = (K1_902113032 * tmp41) + (K1_175570504 * tmp46); + output[10 * ostride] = tmp30 + (K2_000000000 * tmp33); + tmp48 = tmp35 + tmp34; + output[ostride] = tmp48 - tmp49; + output[4 * ostride] = tmp48 + tmp49; + tmp36 = tmp34 - tmp35; + output[7 * ostride] = tmp36 - tmp47; + output[13 * ostride] = tmp36 + tmp47; + } +} + +fftw_codelet_desc fftw_hc2real_15_desc = +{ + "fftw_hc2real_15", + (void (*)()) fftw_hc2real_15, + 15, + FFTW_BACKWARD, + FFTW_HC2REAL, + 345, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fcr_16.c b/src/sndobj/rfftw/fcr_16.c new file mode 100644 index 0000000..d1e6c1d --- /dev/null +++ b/src/sndobj/rfftw/fcr_16.c @@ -0,0 +1,226 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:27 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2real 16 */ + +/* + * This function contains 58 FP additions, 18 FP multiplications, + * (or, 54 additions, 14 multiplications, 4 fused multiply/add), + * 26 stack variables, and 32 memory accesses + */ +static const fftw_real K765366864 = FFTW_KONST(+0.765366864730179543456919968060797733522689125); +static const fftw_real K1_847759065 = FFTW_KONST(+1.847759065022573512256366378793576573644833252); +static const fftw_real K1_414213562 = FFTW_KONST(+1.414213562373095048801688724209698078569671875); +static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); + +/* + * Generator Id's : + * $Id: fcr_16.c,v 1.1.1.1 2006/05/12 15:14:46 veplaini Exp $ + * $Id: fcr_16.c,v 1.1.1.1 2006/05/12 15:14:46 veplaini Exp $ + * $Id: fcr_16.c,v 1.1.1.1 2006/05/12 15:14:46 veplaini Exp $ + */ + +void fftw_hc2real_16(const fftw_real *real_input, const fftw_real *imag_input, fftw_real *output, int real_istride, int imag_istride, int ostride) +{ + fftw_real tmp9; + fftw_real tmp54; + fftw_real tmp42; + fftw_real tmp21; + fftw_real tmp6; + fftw_real tmp18; + fftw_real tmp39; + fftw_real tmp53; + fftw_real tmp13; + fftw_real tmp29; + fftw_real tmp16; + fftw_real tmp26; + fftw_real tmp23; + fftw_real tmp49; + fftw_real tmp57; + fftw_real tmp56; + fftw_real tmp46; + fftw_real tmp30; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp7; + fftw_real tmp8; + fftw_real tmp40; + fftw_real tmp19; + fftw_real tmp20; + fftw_real tmp41; + ASSERT_ALIGNED_DOUBLE; + tmp7 = real_input[2 * real_istride]; + tmp8 = real_input[6 * real_istride]; + tmp40 = tmp7 - tmp8; + tmp19 = imag_input[2 * imag_istride]; + tmp20 = imag_input[6 * imag_istride]; + tmp41 = tmp20 + tmp19; + tmp9 = K2_000000000 * (tmp7 + tmp8); + tmp54 = K1_414213562 * (tmp40 + tmp41); + tmp42 = K1_414213562 * (tmp40 - tmp41); + tmp21 = K2_000000000 * (tmp19 - tmp20); + } + { + fftw_real tmp5; + fftw_real tmp38; + fftw_real tmp3; + fftw_real tmp36; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp4; + fftw_real tmp37; + fftw_real tmp1; + fftw_real tmp2; + ASSERT_ALIGNED_DOUBLE; + tmp4 = real_input[4 * real_istride]; + tmp5 = K2_000000000 * tmp4; + tmp37 = imag_input[4 * imag_istride]; + tmp38 = K2_000000000 * tmp37; + tmp1 = real_input[0]; + tmp2 = real_input[8 * real_istride]; + tmp3 = tmp1 + tmp2; + tmp36 = tmp1 - tmp2; + } + tmp6 = tmp3 + tmp5; + tmp18 = tmp3 - tmp5; + tmp39 = tmp36 - tmp38; + tmp53 = tmp36 + tmp38; + } + { + fftw_real tmp44; + fftw_real tmp48; + fftw_real tmp47; + fftw_real tmp45; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp11; + fftw_real tmp12; + fftw_real tmp27; + fftw_real tmp28; + ASSERT_ALIGNED_DOUBLE; + tmp11 = real_input[real_istride]; + tmp12 = real_input[7 * real_istride]; + tmp13 = tmp11 + tmp12; + tmp44 = tmp11 - tmp12; + tmp27 = imag_input[imag_istride]; + tmp28 = imag_input[7 * imag_istride]; + tmp29 = tmp27 - tmp28; + tmp48 = tmp27 + tmp28; + } + { + fftw_real tmp14; + fftw_real tmp15; + fftw_real tmp24; + fftw_real tmp25; + ASSERT_ALIGNED_DOUBLE; + tmp14 = real_input[3 * real_istride]; + tmp15 = real_input[5 * real_istride]; + tmp16 = tmp14 + tmp15; + tmp47 = tmp15 - tmp14; + tmp24 = imag_input[3 * imag_istride]; + tmp25 = imag_input[5 * imag_istride]; + tmp26 = tmp24 - tmp25; + tmp45 = tmp25 + tmp24; + } + tmp23 = tmp13 - tmp16; + tmp49 = tmp47 + tmp48; + tmp57 = tmp48 - tmp47; + tmp56 = tmp44 + tmp45; + tmp46 = tmp44 - tmp45; + tmp30 = tmp26 + tmp29; + } + { + fftw_real tmp10; + fftw_real tmp17; + fftw_real tmp34; + fftw_real tmp35; + ASSERT_ALIGNED_DOUBLE; + tmp10 = tmp6 + tmp9; + tmp17 = K2_000000000 * (tmp13 + tmp16); + output[8 * ostride] = tmp10 - tmp17; + output[0] = tmp10 + tmp17; + tmp34 = tmp6 - tmp9; + tmp35 = K2_000000000 * (tmp29 - tmp26); + output[4 * ostride] = tmp34 - tmp35; + output[12 * ostride] = tmp34 + tmp35; + } + { + fftw_real tmp22; + fftw_real tmp31; + fftw_real tmp32; + fftw_real tmp33; + ASSERT_ALIGNED_DOUBLE; + tmp22 = tmp18 - tmp21; + tmp31 = K1_414213562 * (tmp23 - tmp30); + output[10 * ostride] = tmp22 - tmp31; + output[2 * ostride] = tmp22 + tmp31; + tmp32 = tmp18 + tmp21; + tmp33 = K1_414213562 * (tmp23 + tmp30); + output[6 * ostride] = tmp32 - tmp33; + output[14 * ostride] = tmp32 + tmp33; + } + { + fftw_real tmp43; + fftw_real tmp50; + fftw_real tmp51; + fftw_real tmp52; + ASSERT_ALIGNED_DOUBLE; + tmp43 = tmp39 + tmp42; + tmp50 = (K1_847759065 * tmp46) - (K765366864 * tmp49); + output[9 * ostride] = tmp43 - tmp50; + output[ostride] = tmp43 + tmp50; + tmp51 = tmp39 - tmp42; + tmp52 = (K765366864 * tmp46) + (K1_847759065 * tmp49); + output[5 * ostride] = tmp51 - tmp52; + output[13 * ostride] = tmp51 + tmp52; + } + { + fftw_real tmp55; + fftw_real tmp58; + fftw_real tmp59; + fftw_real tmp60; + ASSERT_ALIGNED_DOUBLE; + tmp55 = tmp53 - tmp54; + tmp58 = (K765366864 * tmp56) - (K1_847759065 * tmp57); + output[11 * ostride] = tmp55 - tmp58; + output[3 * ostride] = tmp55 + tmp58; + tmp59 = tmp53 + tmp54; + tmp60 = (K1_847759065 * tmp56) + (K765366864 * tmp57); + output[7 * ostride] = tmp59 - tmp60; + output[15 * ostride] = tmp59 + tmp60; + } +} + +fftw_codelet_desc fftw_hc2real_16_desc = +{ + "fftw_hc2real_16", + (void (*)()) fftw_hc2real_16, + 16, + FFTW_BACKWARD, + FFTW_HC2REAL, + 367, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fcr_2.c b/src/sndobj/rfftw/fcr_2.c new file mode 100644 index 0000000..070857b --- /dev/null +++ b/src/sndobj/rfftw/fcr_2.c @@ -0,0 +1,62 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:18 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2real 2 */ + +/* + * This function contains 2 FP additions, 0 FP multiplications, + * (or, 2 additions, 0 multiplications, 0 fused multiply/add), + * 2 stack variables, and 4 memory accesses + */ + +/* + * Generator Id's : + * $Id: fcr_2.c,v 1.1.1.1 2006/05/12 15:14:48 veplaini Exp $ + * $Id: fcr_2.c,v 1.1.1.1 2006/05/12 15:14:48 veplaini Exp $ + * $Id: fcr_2.c,v 1.1.1.1 2006/05/12 15:14:48 veplaini Exp $ + */ + +void fftw_hc2real_2(const fftw_real *real_input, const fftw_real *imag_input, fftw_real *output, int real_istride, int imag_istride, int ostride) +{ + fftw_real tmp1; + fftw_real tmp2; + ASSERT_ALIGNED_DOUBLE; + tmp1 = real_input[0]; + tmp2 = real_input[real_istride]; + output[ostride] = tmp1 - tmp2; + output[0] = tmp1 + tmp2; +} + +fftw_codelet_desc fftw_hc2real_2_desc = +{ + "fftw_hc2real_2", + (void (*)()) fftw_hc2real_2, + 2, + FFTW_BACKWARD, + FFTW_HC2REAL, + 59, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fcr_3.c b/src/sndobj/rfftw/fcr_3.c new file mode 100644 index 0000000..c120dd4 --- /dev/null +++ b/src/sndobj/rfftw/fcr_3.c @@ -0,0 +1,71 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:18 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2real 3 */ + +/* + * This function contains 4 FP additions, 2 FP multiplications, + * (or, 3 additions, 1 multiplications, 1 fused multiply/add), + * 5 stack variables, and 6 memory accesses + */ +static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); +static const fftw_real K1_732050807 = FFTW_KONST(+1.732050807568877293527446341505872366942805254); + +/* + * Generator Id's : + * $Id: fcr_3.c,v 1.1.1.1 2006/05/12 15:14:54 veplaini Exp $ + * $Id: fcr_3.c,v 1.1.1.1 2006/05/12 15:14:54 veplaini Exp $ + * $Id: fcr_3.c,v 1.1.1.1 2006/05/12 15:14:54 veplaini Exp $ + */ + +void fftw_hc2real_3(const fftw_real *real_input, const fftw_real *imag_input, fftw_real *output, int real_istride, int imag_istride, int ostride) +{ + fftw_real tmp5; + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp3; + fftw_real tmp4; + ASSERT_ALIGNED_DOUBLE; + tmp4 = imag_input[imag_istride]; + tmp5 = K1_732050807 * tmp4; + tmp1 = real_input[0]; + tmp2 = real_input[real_istride]; + tmp3 = tmp1 - tmp2; + output[0] = tmp1 + (K2_000000000 * tmp2); + output[2 * ostride] = tmp3 + tmp5; + output[ostride] = tmp3 - tmp5; +} + +fftw_codelet_desc fftw_hc2real_3_desc = +{ + "fftw_hc2real_3", + (void (*)()) fftw_hc2real_3, + 3, + FFTW_BACKWARD, + FFTW_HC2REAL, + 81, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fcr_32.c b/src/sndobj/rfftw/fcr_32.c new file mode 100644 index 0000000..7a21b13 --- /dev/null +++ b/src/sndobj/rfftw/fcr_32.c @@ -0,0 +1,490 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:27 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2real 32 */ + +/* + * This function contains 156 FP additions, 54 FP multiplications, + * (or, 140 additions, 38 multiplications, 16 fused multiply/add), + * 44 stack variables, and 64 memory accesses + */ +static const fftw_real K765366864 = FFTW_KONST(+0.765366864730179543456919968060797733522689125); +static const fftw_real K1_847759065 = FFTW_KONST(+1.847759065022573512256366378793576573644833252); +static const fftw_real K555570233 = FFTW_KONST(+0.555570233019602224742830813948532874374937191); +static const fftw_real K831469612 = FFTW_KONST(+0.831469612302545237078788377617905756738560812); +static const fftw_real K195090322 = FFTW_KONST(+0.195090322016128267848284868477022240927691618); +static const fftw_real K980785280 = FFTW_KONST(+0.980785280403230449126182236134239036973933731); +static const fftw_real K1_414213562 = FFTW_KONST(+1.414213562373095048801688724209698078569671875); +static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); + +/* + * Generator Id's : + * $Id: fcr_32.c,v 1.1.1.1 2006/05/12 15:14:44 veplaini Exp $ + * $Id: fcr_32.c,v 1.1.1.1 2006/05/12 15:14:44 veplaini Exp $ + * $Id: fcr_32.c,v 1.1.1.1 2006/05/12 15:14:44 veplaini Exp $ + */ + +void fftw_hc2real_32(const fftw_real *real_input, const fftw_real *imag_input, fftw_real *output, int real_istride, int imag_istride, int ostride) +{ + fftw_real tmp9; + fftw_real tmp134; + fftw_real tmp96; + fftw_real tmp37; + fftw_real tmp32; + fftw_real tmp58; + fftw_real tmp56; + fftw_real tmp80; + fftw_real tmp145; + fftw_real tmp149; + fftw_real tmp119; + fftw_real tmp123; + fftw_real tmp6; + fftw_real tmp34; + fftw_real tmp93; + fftw_real tmp133; + fftw_real tmp17; + fftw_real tmp39; + fftw_real tmp46; + fftw_real tmp83; + fftw_real tmp100; + fftw_real tmp136; + fftw_real tmp103; + fftw_real tmp137; + fftw_real tmp25; + fftw_real tmp49; + fftw_real tmp65; + fftw_real tmp79; + fftw_real tmp142; + fftw_real tmp148; + fftw_real tmp112; + fftw_real tmp122; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp7; + fftw_real tmp8; + fftw_real tmp94; + fftw_real tmp35; + fftw_real tmp36; + fftw_real tmp95; + ASSERT_ALIGNED_DOUBLE; + tmp7 = real_input[4 * real_istride]; + tmp8 = real_input[12 * real_istride]; + tmp94 = tmp7 - tmp8; + tmp35 = imag_input[4 * imag_istride]; + tmp36 = imag_input[12 * imag_istride]; + tmp95 = tmp36 + tmp35; + tmp9 = K2_000000000 * (tmp7 + tmp8); + tmp134 = K1_414213562 * (tmp94 + tmp95); + tmp96 = K1_414213562 * (tmp94 - tmp95); + tmp37 = K2_000000000 * (tmp35 - tmp36); + } + { + fftw_real tmp28; + fftw_real tmp113; + fftw_real tmp55; + fftw_real tmp117; + fftw_real tmp31; + fftw_real tmp116; + fftw_real tmp52; + fftw_real tmp114; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp26; + fftw_real tmp27; + fftw_real tmp53; + fftw_real tmp54; + ASSERT_ALIGNED_DOUBLE; + tmp26 = real_input[3 * real_istride]; + tmp27 = real_input[13 * real_istride]; + tmp28 = tmp26 + tmp27; + tmp113 = tmp26 - tmp27; + tmp53 = imag_input[3 * imag_istride]; + tmp54 = imag_input[13 * imag_istride]; + tmp55 = tmp53 - tmp54; + tmp117 = tmp53 + tmp54; + } + { + fftw_real tmp29; + fftw_real tmp30; + fftw_real tmp50; + fftw_real tmp51; + ASSERT_ALIGNED_DOUBLE; + tmp29 = real_input[5 * real_istride]; + tmp30 = real_input[11 * real_istride]; + tmp31 = tmp29 + tmp30; + tmp116 = tmp30 - tmp29; + tmp50 = imag_input[5 * imag_istride]; + tmp51 = imag_input[11 * imag_istride]; + tmp52 = tmp50 - tmp51; + tmp114 = tmp51 + tmp50; + } + tmp32 = tmp28 + tmp31; + tmp58 = tmp31 - tmp28; + tmp56 = tmp52 + tmp55; + tmp80 = tmp55 - tmp52; + { + fftw_real tmp143; + fftw_real tmp144; + fftw_real tmp115; + fftw_real tmp118; + ASSERT_ALIGNED_DOUBLE; + tmp143 = tmp113 + tmp114; + tmp144 = tmp117 - tmp116; + tmp145 = (K980785280 * tmp143) - (K195090322 * tmp144); + tmp149 = (K195090322 * tmp143) + (K980785280 * tmp144); + tmp115 = tmp113 - tmp114; + tmp118 = tmp116 + tmp117; + tmp119 = (K831469612 * tmp115) - (K555570233 * tmp118); + tmp123 = (K555570233 * tmp115) + (K831469612 * tmp118); + } + } + { + fftw_real tmp5; + fftw_real tmp92; + fftw_real tmp3; + fftw_real tmp90; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp4; + fftw_real tmp91; + fftw_real tmp1; + fftw_real tmp2; + ASSERT_ALIGNED_DOUBLE; + tmp4 = real_input[8 * real_istride]; + tmp5 = K2_000000000 * tmp4; + tmp91 = imag_input[8 * imag_istride]; + tmp92 = K2_000000000 * tmp91; + tmp1 = real_input[0]; + tmp2 = real_input[16 * real_istride]; + tmp3 = tmp1 + tmp2; + tmp90 = tmp1 - tmp2; + } + tmp6 = tmp3 + tmp5; + tmp34 = tmp3 - tmp5; + tmp93 = tmp90 - tmp92; + tmp133 = tmp90 + tmp92; + } + { + fftw_real tmp13; + fftw_real tmp98; + fftw_real tmp45; + fftw_real tmp102; + fftw_real tmp16; + fftw_real tmp101; + fftw_real tmp42; + fftw_real tmp99; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp11; + fftw_real tmp12; + fftw_real tmp43; + fftw_real tmp44; + ASSERT_ALIGNED_DOUBLE; + tmp11 = real_input[2 * real_istride]; + tmp12 = real_input[14 * real_istride]; + tmp13 = tmp11 + tmp12; + tmp98 = tmp11 - tmp12; + tmp43 = imag_input[2 * imag_istride]; + tmp44 = imag_input[14 * imag_istride]; + tmp45 = tmp43 - tmp44; + tmp102 = tmp43 + tmp44; + } + { + fftw_real tmp14; + fftw_real tmp15; + fftw_real tmp40; + fftw_real tmp41; + ASSERT_ALIGNED_DOUBLE; + tmp14 = real_input[6 * real_istride]; + tmp15 = real_input[10 * real_istride]; + tmp16 = tmp14 + tmp15; + tmp101 = tmp15 - tmp14; + tmp40 = imag_input[6 * imag_istride]; + tmp41 = imag_input[10 * imag_istride]; + tmp42 = tmp40 - tmp41; + tmp99 = tmp41 + tmp40; + } + tmp17 = K2_000000000 * (tmp13 + tmp16); + tmp39 = tmp13 - tmp16; + tmp46 = tmp42 + tmp45; + tmp83 = K2_000000000 * (tmp45 - tmp42); + tmp100 = tmp98 - tmp99; + tmp136 = tmp98 + tmp99; + tmp103 = tmp101 + tmp102; + tmp137 = tmp102 - tmp101; + } + { + fftw_real tmp21; + fftw_real tmp106; + fftw_real tmp64; + fftw_real tmp110; + fftw_real tmp24; + fftw_real tmp109; + fftw_real tmp61; + fftw_real tmp107; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp19; + fftw_real tmp20; + fftw_real tmp62; + fftw_real tmp63; + ASSERT_ALIGNED_DOUBLE; + tmp19 = real_input[real_istride]; + tmp20 = real_input[15 * real_istride]; + tmp21 = tmp19 + tmp20; + tmp106 = tmp19 - tmp20; + tmp62 = imag_input[imag_istride]; + tmp63 = imag_input[15 * imag_istride]; + tmp64 = tmp62 - tmp63; + tmp110 = tmp62 + tmp63; + } + { + fftw_real tmp22; + fftw_real tmp23; + fftw_real tmp59; + fftw_real tmp60; + ASSERT_ALIGNED_DOUBLE; + tmp22 = real_input[7 * real_istride]; + tmp23 = real_input[9 * real_istride]; + tmp24 = tmp22 + tmp23; + tmp109 = tmp23 - tmp22; + tmp59 = imag_input[7 * imag_istride]; + tmp60 = imag_input[9 * imag_istride]; + tmp61 = tmp59 - tmp60; + tmp107 = tmp60 + tmp59; + } + tmp25 = tmp21 + tmp24; + tmp49 = tmp21 - tmp24; + tmp65 = tmp61 + tmp64; + tmp79 = tmp64 - tmp61; + { + fftw_real tmp140; + fftw_real tmp141; + fftw_real tmp108; + fftw_real tmp111; + ASSERT_ALIGNED_DOUBLE; + tmp140 = tmp106 + tmp107; + tmp141 = tmp110 - tmp109; + tmp142 = (K555570233 * tmp140) + (K831469612 * tmp141); + tmp148 = (K831469612 * tmp140) - (K555570233 * tmp141); + tmp108 = tmp106 - tmp107; + tmp111 = tmp109 + tmp110; + tmp112 = (K980785280 * tmp108) - (K195090322 * tmp111); + tmp122 = (K195090322 * tmp108) + (K980785280 * tmp111); + } + } + { + fftw_real tmp33; + fftw_real tmp81; + fftw_real tmp18; + fftw_real tmp78; + fftw_real tmp10; + ASSERT_ALIGNED_DOUBLE; + tmp33 = K2_000000000 * (tmp25 + tmp32); + tmp81 = K2_000000000 * (tmp79 - tmp80); + tmp10 = tmp6 + tmp9; + tmp18 = tmp10 + tmp17; + tmp78 = tmp10 - tmp17; + output[16 * ostride] = tmp18 - tmp33; + output[0] = tmp18 + tmp33; + output[8 * ostride] = tmp78 - tmp81; + output[24 * ostride] = tmp78 + tmp81; + } + { + fftw_real tmp84; + fftw_real tmp88; + fftw_real tmp87; + fftw_real tmp89; + fftw_real tmp82; + fftw_real tmp85; + fftw_real tmp86; + ASSERT_ALIGNED_DOUBLE; + tmp82 = tmp6 - tmp9; + tmp84 = tmp82 - tmp83; + tmp88 = tmp82 + tmp83; + tmp85 = tmp25 - tmp32; + tmp86 = tmp79 + tmp80; + tmp87 = K1_414213562 * (tmp85 - tmp86); + tmp89 = K1_414213562 * (tmp85 + tmp86); + output[20 * ostride] = tmp84 - tmp87; + output[4 * ostride] = tmp84 + tmp87; + output[12 * ostride] = tmp88 - tmp89; + output[28 * ostride] = tmp88 + tmp89; + } + { + fftw_real tmp48; + fftw_real tmp68; + fftw_real tmp67; + fftw_real tmp69; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp38; + fftw_real tmp47; + fftw_real tmp57; + fftw_real tmp66; + ASSERT_ALIGNED_DOUBLE; + tmp38 = tmp34 - tmp37; + tmp47 = K1_414213562 * (tmp39 - tmp46); + tmp48 = tmp38 + tmp47; + tmp68 = tmp38 - tmp47; + tmp57 = tmp49 - tmp56; + tmp66 = tmp58 + tmp65; + tmp67 = (K1_847759065 * tmp57) - (K765366864 * tmp66); + tmp69 = (K1_847759065 * tmp66) + (K765366864 * tmp57); + } + output[18 * ostride] = tmp48 - tmp67; + output[2 * ostride] = tmp48 + tmp67; + output[10 * ostride] = tmp68 - tmp69; + output[26 * ostride] = tmp68 + tmp69; + } + { + fftw_real tmp72; + fftw_real tmp76; + fftw_real tmp75; + fftw_real tmp77; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp70; + fftw_real tmp71; + fftw_real tmp73; + fftw_real tmp74; + ASSERT_ALIGNED_DOUBLE; + tmp70 = tmp34 + tmp37; + tmp71 = K1_414213562 * (tmp39 + tmp46); + tmp72 = tmp70 - tmp71; + tmp76 = tmp70 + tmp71; + tmp73 = tmp49 + tmp56; + tmp74 = tmp65 - tmp58; + tmp75 = (K765366864 * tmp73) - (K1_847759065 * tmp74); + tmp77 = (K765366864 * tmp74) + (K1_847759065 * tmp73); + } + output[22 * ostride] = tmp72 - tmp75; + output[6 * ostride] = tmp72 + tmp75; + output[14 * ostride] = tmp76 - tmp77; + output[30 * ostride] = tmp76 + tmp77; + } + { + fftw_real tmp120; + fftw_real tmp124; + fftw_real tmp105; + fftw_real tmp121; + fftw_real tmp97; + fftw_real tmp104; + ASSERT_ALIGNED_DOUBLE; + tmp120 = K2_000000000 * (tmp112 + tmp119); + tmp124 = K2_000000000 * (tmp122 - tmp123); + tmp97 = tmp93 + tmp96; + tmp104 = (K1_847759065 * tmp100) - (K765366864 * tmp103); + tmp105 = tmp97 + tmp104; + tmp121 = tmp97 - tmp104; + output[17 * ostride] = tmp105 - tmp120; + output[ostride] = tmp105 + tmp120; + output[9 * ostride] = tmp121 - tmp124; + output[25 * ostride] = tmp121 + tmp124; + } + { + fftw_real tmp127; + fftw_real tmp131; + fftw_real tmp130; + fftw_real tmp132; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp125; + fftw_real tmp126; + fftw_real tmp128; + fftw_real tmp129; + ASSERT_ALIGNED_DOUBLE; + tmp125 = tmp93 - tmp96; + tmp126 = (K765366864 * tmp100) + (K1_847759065 * tmp103); + tmp127 = tmp125 - tmp126; + tmp131 = tmp125 + tmp126; + tmp128 = tmp112 - tmp119; + tmp129 = tmp122 + tmp123; + tmp130 = K1_414213562 * (tmp128 - tmp129); + tmp132 = K1_414213562 * (tmp128 + tmp129); + } + output[21 * ostride] = tmp127 - tmp130; + output[5 * ostride] = tmp127 + tmp130; + output[13 * ostride] = tmp131 - tmp132; + output[29 * ostride] = tmp131 + tmp132; + } + { + fftw_real tmp146; + fftw_real tmp150; + fftw_real tmp139; + fftw_real tmp147; + fftw_real tmp135; + fftw_real tmp138; + ASSERT_ALIGNED_DOUBLE; + tmp146 = K2_000000000 * (tmp142 - tmp145); + tmp150 = K2_000000000 * (tmp148 - tmp149); + tmp135 = tmp133 - tmp134; + tmp138 = (K765366864 * tmp136) - (K1_847759065 * tmp137); + tmp139 = tmp135 - tmp138; + tmp147 = tmp135 + tmp138; + output[11 * ostride] = tmp139 - tmp146; + output[27 * ostride] = tmp139 + tmp146; + output[19 * ostride] = tmp147 - tmp150; + output[3 * ostride] = tmp147 + tmp150; + } + { + fftw_real tmp153; + fftw_real tmp157; + fftw_real tmp156; + fftw_real tmp158; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp151; + fftw_real tmp152; + fftw_real tmp154; + fftw_real tmp155; + ASSERT_ALIGNED_DOUBLE; + tmp151 = tmp133 + tmp134; + tmp152 = (K1_847759065 * tmp136) + (K765366864 * tmp137); + tmp153 = tmp151 - tmp152; + tmp157 = tmp151 + tmp152; + tmp154 = tmp148 + tmp149; + tmp155 = tmp142 + tmp145; + tmp156 = K1_414213562 * (tmp154 - tmp155); + tmp158 = K1_414213562 * (tmp155 + tmp154); + } + output[23 * ostride] = tmp153 - tmp156; + output[7 * ostride] = tmp153 + tmp156; + output[15 * ostride] = tmp157 - tmp158; + output[31 * ostride] = tmp157 + tmp158; + } +} + +fftw_codelet_desc fftw_hc2real_32_desc = +{ + "fftw_hc2real_32", + (void (*)()) fftw_hc2real_32, + 32, + FFTW_BACKWARD, + FFTW_HC2REAL, + 719, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fcr_4.c b/src/sndobj/rfftw/fcr_4.c new file mode 100644 index 0000000..6543a34 --- /dev/null +++ b/src/sndobj/rfftw/fcr_4.c @@ -0,0 +1,80 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:18 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2real 4 */ + +/* + * This function contains 6 FP additions, 2 FP multiplications, + * (or, 6 additions, 2 multiplications, 0 fused multiply/add), + * 8 stack variables, and 8 memory accesses + */ +static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); + +/* + * Generator Id's : + * $Id: fcr_4.c,v 1.1.1.1 2006/05/12 15:14:50 veplaini Exp $ + * $Id: fcr_4.c,v 1.1.1.1 2006/05/12 15:14:50 veplaini Exp $ + * $Id: fcr_4.c,v 1.1.1.1 2006/05/12 15:14:50 veplaini Exp $ + */ + +void fftw_hc2real_4(const fftw_real *real_input, const fftw_real *imag_input, fftw_real *output, int real_istride, int imag_istride, int ostride) +{ + fftw_real tmp5; + fftw_real tmp8; + fftw_real tmp3; + fftw_real tmp6; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp4; + fftw_real tmp7; + fftw_real tmp1; + fftw_real tmp2; + ASSERT_ALIGNED_DOUBLE; + tmp4 = real_input[real_istride]; + tmp5 = K2_000000000 * tmp4; + tmp7 = imag_input[imag_istride]; + tmp8 = K2_000000000 * tmp7; + tmp1 = real_input[0]; + tmp2 = real_input[2 * real_istride]; + tmp3 = tmp1 + tmp2; + tmp6 = tmp1 - tmp2; + } + output[2 * ostride] = tmp3 - tmp5; + output[0] = tmp3 + tmp5; + output[ostride] = tmp6 - tmp8; + output[3 * ostride] = tmp6 + tmp8; +} + +fftw_codelet_desc fftw_hc2real_4_desc = +{ + "fftw_hc2real_4", + (void (*)()) fftw_hc2real_4, + 4, + FFTW_BACKWARD, + FFTW_HC2REAL, + 103, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fcr_5.c b/src/sndobj/rfftw/fcr_5.c new file mode 100644 index 0000000..bb494de --- /dev/null +++ b/src/sndobj/rfftw/fcr_5.c @@ -0,0 +1,93 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:19 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2real 5 */ + +/* + * This function contains 12 FP additions, 7 FP multiplications, + * (or, 8 additions, 3 multiplications, 4 fused multiply/add), + * 12 stack variables, and 10 memory accesses + */ +static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); +static const fftw_real K1_118033988 = FFTW_KONST(+1.118033988749894848204586834365638117720309180); +static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); +static const fftw_real K1_902113032 = FFTW_KONST(+1.902113032590307144232878666758764286811397268); +static const fftw_real K1_175570504 = FFTW_KONST(+1.175570504584946258337411909278145537195304875); + +/* + * Generator Id's : + * $Id: fcr_5.c,v 1.1.1.1 2006/05/12 15:14:50 veplaini Exp $ + * $Id: fcr_5.c,v 1.1.1.1 2006/05/12 15:14:50 veplaini Exp $ + * $Id: fcr_5.c,v 1.1.1.1 2006/05/12 15:14:50 veplaini Exp $ + */ + +void fftw_hc2real_5(const fftw_real *real_input, const fftw_real *imag_input, fftw_real *output, int real_istride, int imag_istride, int ostride) +{ + fftw_real tmp10; + fftw_real tmp12; + fftw_real tmp1; + fftw_real tmp4; + fftw_real tmp5; + fftw_real tmp6; + fftw_real tmp11; + fftw_real tmp7; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp8; + fftw_real tmp9; + fftw_real tmp2; + fftw_real tmp3; + ASSERT_ALIGNED_DOUBLE; + tmp8 = imag_input[imag_istride]; + tmp9 = imag_input[2 * imag_istride]; + tmp10 = (K1_175570504 * tmp8) - (K1_902113032 * tmp9); + tmp12 = (K1_902113032 * tmp8) + (K1_175570504 * tmp9); + tmp1 = real_input[0]; + tmp2 = real_input[real_istride]; + tmp3 = real_input[2 * real_istride]; + tmp4 = tmp2 + tmp3; + tmp5 = tmp1 - (K500000000 * tmp4); + tmp6 = K1_118033988 * (tmp2 - tmp3); + } + output[0] = tmp1 + (K2_000000000 * tmp4); + tmp11 = tmp6 + tmp5; + output[ostride] = tmp11 - tmp12; + output[4 * ostride] = tmp11 + tmp12; + tmp7 = tmp5 - tmp6; + output[2 * ostride] = tmp7 - tmp10; + output[3 * ostride] = tmp7 + tmp10; +} + +fftw_codelet_desc fftw_hc2real_5_desc = +{ + "fftw_hc2real_5", + (void (*)()) fftw_hc2real_5, + 5, + FFTW_BACKWARD, + FFTW_HC2REAL, + 125, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fcr_6.c b/src/sndobj/rfftw/fcr_6.c new file mode 100644 index 0000000..10865c9 --- /dev/null +++ b/src/sndobj/rfftw/fcr_6.c @@ -0,0 +1,95 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:19 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2real 6 */ + +/* + * This function contains 14 FP additions, 4 FP multiplications, + * (or, 12 additions, 2 multiplications, 2 fused multiply/add), + * 14 stack variables, and 12 memory accesses + */ +static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); +static const fftw_real K1_732050807 = FFTW_KONST(+1.732050807568877293527446341505872366942805254); + +/* + * Generator Id's : + * $Id: fcr_6.c,v 1.1.1.1 2006/05/12 15:14:45 veplaini Exp $ + * $Id: fcr_6.c,v 1.1.1.1 2006/05/12 15:14:45 veplaini Exp $ + * $Id: fcr_6.c,v 1.1.1.1 2006/05/12 15:14:45 veplaini Exp $ + */ + +void fftw_hc2real_6(const fftw_real *real_input, const fftw_real *imag_input, fftw_real *output, int real_istride, int imag_istride, int ostride) +{ + fftw_real tmp3; + fftw_real tmp7; + fftw_real tmp12; + fftw_real tmp14; + fftw_real tmp6; + fftw_real tmp8; + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp13; + fftw_real tmp9; + ASSERT_ALIGNED_DOUBLE; + tmp1 = real_input[0]; + tmp2 = real_input[3 * real_istride]; + tmp3 = tmp1 - tmp2; + tmp7 = tmp1 + tmp2; + { + fftw_real tmp10; + fftw_real tmp11; + fftw_real tmp4; + fftw_real tmp5; + ASSERT_ALIGNED_DOUBLE; + tmp10 = imag_input[2 * imag_istride]; + tmp11 = imag_input[imag_istride]; + tmp12 = K1_732050807 * (tmp10 - tmp11); + tmp14 = K1_732050807 * (tmp10 + tmp11); + tmp4 = real_input[2 * real_istride]; + tmp5 = real_input[real_istride]; + tmp6 = tmp4 - tmp5; + tmp8 = tmp4 + tmp5; + } + output[3 * ostride] = tmp3 + (K2_000000000 * tmp6); + tmp13 = tmp3 - tmp6; + output[ostride] = tmp13 - tmp14; + output[5 * ostride] = tmp13 + tmp14; + output[0] = tmp7 + (K2_000000000 * tmp8); + tmp9 = tmp7 - tmp8; + output[4 * ostride] = tmp9 - tmp12; + output[2 * ostride] = tmp9 + tmp12; +} + +fftw_codelet_desc fftw_hc2real_6_desc = +{ + "fftw_hc2real_6", + (void (*)()) fftw_hc2real_6, + 6, + FFTW_BACKWARD, + FFTW_HC2REAL, + 147, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fcr_64.c b/src/sndobj/rfftw/fcr_64.c new file mode 100644 index 0000000..68055be --- /dev/null +++ b/src/sndobj/rfftw/fcr_64.c @@ -0,0 +1,1111 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:28 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2real 64 */ + +/* + * This function contains 394 FP additions, 146 FP multiplications, + * (or, 342 additions, 94 multiplications, 52 fused multiply/add), + * 86 stack variables, and 128 memory accesses + */ +static const fftw_real K555570233 = FFTW_KONST(+0.555570233019602224742830813948532874374937191); +static const fftw_real K831469612 = FFTW_KONST(+0.831469612302545237078788377617905756738560812); +static const fftw_real K195090322 = FFTW_KONST(+0.195090322016128267848284868477022240927691618); +static const fftw_real K980785280 = FFTW_KONST(+0.980785280403230449126182236134239036973933731); +static const fftw_real K765366864 = FFTW_KONST(+0.765366864730179543456919968060797733522689125); +static const fftw_real K1_847759065 = FFTW_KONST(+1.847759065022573512256366378793576573644833252); +static const fftw_real K995184726 = FFTW_KONST(+0.995184726672196886244836953109479921575474869); +static const fftw_real K098017140 = FFTW_KONST(+0.098017140329560601994195563888641845861136673); +static const fftw_real K471396736 = FFTW_KONST(+0.471396736825997648556387625905254377657460319); +static const fftw_real K881921264 = FFTW_KONST(+0.881921264348355029712756863660388349508442621); +static const fftw_real K773010453 = FFTW_KONST(+0.773010453362736960810906609758469800971041293); +static const fftw_real K634393284 = FFTW_KONST(+0.634393284163645498215171613225493370675687095); +static const fftw_real K290284677 = FFTW_KONST(+0.290284677254462367636192375817395274691476278); +static const fftw_real K956940335 = FFTW_KONST(+0.956940335732208864935797886980269969482849206); +static const fftw_real K1_414213562 = FFTW_KONST(+1.414213562373095048801688724209698078569671875); +static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); + +/* + * Generator Id's : + * $Id: fcr_64.c,v 1.1.1.1 2006/05/12 15:15:01 veplaini Exp $ + * $Id: fcr_64.c,v 1.1.1.1 2006/05/12 15:15:01 veplaini Exp $ + * $Id: fcr_64.c,v 1.1.1.1 2006/05/12 15:15:01 veplaini Exp $ + */ + +void fftw_hc2real_64(const fftw_real *real_input, const fftw_real *imag_input, fftw_real *output, int real_istride, int imag_istride, int ostride) +{ + fftw_real tmp10; + fftw_real tmp196; + fftw_real tmp70; + fftw_real tmp152; + fftw_real tmp227; + fftw_real tmp301; + fftw_real tmp327; + fftw_real tmp373; + fftw_real tmp64; + fftw_real tmp206; + fftw_real tmp128; + fftw_real tmp163; + fftw_real tmp184; + fftw_real tmp204; + fftw_real tmp137; + fftw_real tmp162; + fftw_real tmp273; + fftw_real tmp287; + fftw_real tmp349; + fftw_real tmp359; + fftw_real tmp280; + fftw_real tmp288; + fftw_real tmp352; + fftw_real tmp360; + fftw_real tmp17; + fftw_real tmp79; + fftw_real tmp153; + fftw_real tmp197; + fftw_real tmp234; + fftw_real tmp302; + fftw_real tmp330; + fftw_real tmp374; + fftw_real tmp25; + fftw_real tmp32; + fftw_real tmp199; + fftw_real tmp89; + fftw_real tmp155; + fftw_real tmp187; + fftw_real tmp188; + fftw_real tmp200; + fftw_real tmp98; + fftw_real tmp156; + fftw_real tmp242; + fftw_real tmp292; + fftw_real tmp334; + fftw_real tmp364; + fftw_real tmp249; + fftw_real tmp293; + fftw_real tmp337; + fftw_real tmp365; + fftw_real tmp49; + fftw_real tmp203; + fftw_real tmp109; + fftw_real tmp159; + fftw_real tmp181; + fftw_real tmp207; + fftw_real tmp118; + fftw_real tmp160; + fftw_real tmp258; + fftw_real tmp284; + fftw_real tmp342; + fftw_real tmp356; + fftw_real tmp265; + fftw_real tmp285; + fftw_real tmp345; + fftw_real tmp357; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp5; + fftw_real tmp222; + fftw_real tmp3; + fftw_real tmp220; + fftw_real tmp9; + fftw_real tmp224; + fftw_real tmp69; + fftw_real tmp225; + fftw_real tmp6; + fftw_real tmp66; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp4; + fftw_real tmp221; + fftw_real tmp1; + fftw_real tmp2; + ASSERT_ALIGNED_DOUBLE; + tmp4 = real_input[16 * real_istride]; + tmp5 = K2_000000000 * tmp4; + tmp221 = imag_input[16 * imag_istride]; + tmp222 = K2_000000000 * tmp221; + tmp1 = real_input[0]; + tmp2 = real_input[32 * real_istride]; + tmp3 = tmp1 + tmp2; + tmp220 = tmp1 - tmp2; + { + fftw_real tmp7; + fftw_real tmp8; + fftw_real tmp67; + fftw_real tmp68; + ASSERT_ALIGNED_DOUBLE; + tmp7 = real_input[8 * real_istride]; + tmp8 = real_input[24 * real_istride]; + tmp9 = K2_000000000 * (tmp7 + tmp8); + tmp224 = tmp7 - tmp8; + tmp67 = imag_input[8 * imag_istride]; + tmp68 = imag_input[24 * imag_istride]; + tmp69 = K2_000000000 * (tmp67 - tmp68); + tmp225 = tmp68 + tmp67; + } + } + tmp6 = tmp3 + tmp5; + tmp10 = tmp6 + tmp9; + tmp196 = tmp6 - tmp9; + tmp66 = tmp3 - tmp5; + tmp70 = tmp66 - tmp69; + tmp152 = tmp66 + tmp69; + { + fftw_real tmp223; + fftw_real tmp226; + fftw_real tmp325; + fftw_real tmp326; + ASSERT_ALIGNED_DOUBLE; + tmp223 = tmp220 - tmp222; + tmp226 = K1_414213562 * (tmp224 - tmp225); + tmp227 = tmp223 + tmp226; + tmp301 = tmp223 - tmp226; + tmp325 = tmp220 + tmp222; + tmp326 = K1_414213562 * (tmp224 + tmp225); + tmp327 = tmp325 - tmp326; + tmp373 = tmp325 + tmp326; + } + } + { + fftw_real tmp52; + fftw_real tmp267; + fftw_real tmp135; + fftw_real tmp271; + fftw_real tmp55; + fftw_real tmp270; + fftw_real tmp132; + fftw_real tmp268; + fftw_real tmp59; + fftw_real tmp274; + fftw_real tmp126; + fftw_real tmp278; + fftw_real tmp62; + fftw_real tmp277; + fftw_real tmp123; + fftw_real tmp275; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp50; + fftw_real tmp51; + fftw_real tmp133; + fftw_real tmp134; + ASSERT_ALIGNED_DOUBLE; + tmp50 = real_input[3 * real_istride]; + tmp51 = real_input[29 * real_istride]; + tmp52 = tmp50 + tmp51; + tmp267 = tmp50 - tmp51; + tmp133 = imag_input[3 * imag_istride]; + tmp134 = imag_input[29 * imag_istride]; + tmp135 = tmp133 - tmp134; + tmp271 = tmp133 + tmp134; + } + { + fftw_real tmp53; + fftw_real tmp54; + fftw_real tmp130; + fftw_real tmp131; + ASSERT_ALIGNED_DOUBLE; + tmp53 = real_input[13 * real_istride]; + tmp54 = real_input[19 * real_istride]; + tmp55 = tmp53 + tmp54; + tmp270 = tmp54 - tmp53; + tmp130 = imag_input[13 * imag_istride]; + tmp131 = imag_input[19 * imag_istride]; + tmp132 = tmp130 - tmp131; + tmp268 = tmp131 + tmp130; + } + { + fftw_real tmp57; + fftw_real tmp58; + fftw_real tmp124; + fftw_real tmp125; + ASSERT_ALIGNED_DOUBLE; + tmp57 = real_input[5 * real_istride]; + tmp58 = real_input[27 * real_istride]; + tmp59 = tmp57 + tmp58; + tmp274 = tmp57 - tmp58; + tmp124 = imag_input[5 * imag_istride]; + tmp125 = imag_input[27 * imag_istride]; + tmp126 = tmp124 - tmp125; + tmp278 = tmp124 + tmp125; + } + { + fftw_real tmp60; + fftw_real tmp61; + fftw_real tmp121; + fftw_real tmp122; + ASSERT_ALIGNED_DOUBLE; + tmp60 = real_input[11 * real_istride]; + tmp61 = real_input[21 * real_istride]; + tmp62 = tmp60 + tmp61; + tmp277 = tmp61 - tmp60; + tmp121 = imag_input[11 * imag_istride]; + tmp122 = imag_input[21 * imag_istride]; + tmp123 = tmp121 - tmp122; + tmp275 = tmp122 + tmp121; + } + { + fftw_real tmp56; + fftw_real tmp63; + fftw_real tmp120; + fftw_real tmp127; + ASSERT_ALIGNED_DOUBLE; + tmp56 = tmp52 + tmp55; + tmp63 = tmp59 + tmp62; + tmp64 = tmp56 + tmp63; + tmp206 = tmp63 - tmp56; + tmp120 = tmp52 - tmp55; + tmp127 = tmp123 + tmp126; + tmp128 = tmp120 - tmp127; + tmp163 = tmp120 + tmp127; + } + { + fftw_real tmp182; + fftw_real tmp183; + fftw_real tmp129; + fftw_real tmp136; + ASSERT_ALIGNED_DOUBLE; + tmp182 = tmp135 - tmp132; + tmp183 = tmp126 - tmp123; + tmp184 = tmp182 - tmp183; + tmp204 = tmp182 + tmp183; + tmp129 = tmp62 - tmp59; + tmp136 = tmp132 + tmp135; + tmp137 = tmp129 + tmp136; + tmp162 = tmp136 - tmp129; + } + { + fftw_real tmp269; + fftw_real tmp272; + fftw_real tmp347; + fftw_real tmp348; + ASSERT_ALIGNED_DOUBLE; + tmp269 = tmp267 - tmp268; + tmp272 = tmp270 + tmp271; + tmp273 = (K956940335 * tmp269) - (K290284677 * tmp272); + tmp287 = (K290284677 * tmp269) + (K956940335 * tmp272); + tmp347 = tmp267 + tmp268; + tmp348 = tmp271 - tmp270; + tmp349 = (K634393284 * tmp347) - (K773010453 * tmp348); + tmp359 = (K773010453 * tmp347) + (K634393284 * tmp348); + } + { + fftw_real tmp276; + fftw_real tmp279; + fftw_real tmp350; + fftw_real tmp351; + ASSERT_ALIGNED_DOUBLE; + tmp276 = tmp274 - tmp275; + tmp279 = tmp277 + tmp278; + tmp280 = (K881921264 * tmp276) - (K471396736 * tmp279); + tmp288 = (K471396736 * tmp276) + (K881921264 * tmp279); + tmp350 = tmp274 + tmp275; + tmp351 = tmp278 - tmp277; + tmp352 = (K098017140 * tmp350) - (K995184726 * tmp351); + tmp360 = (K995184726 * tmp350) + (K098017140 * tmp351); + } + } + { + fftw_real tmp13; + fftw_real tmp228; + fftw_real tmp77; + fftw_real tmp232; + fftw_real tmp16; + fftw_real tmp231; + fftw_real tmp74; + fftw_real tmp229; + fftw_real tmp71; + fftw_real tmp78; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp11; + fftw_real tmp12; + fftw_real tmp75; + fftw_real tmp76; + ASSERT_ALIGNED_DOUBLE; + tmp11 = real_input[4 * real_istride]; + tmp12 = real_input[28 * real_istride]; + tmp13 = tmp11 + tmp12; + tmp228 = tmp11 - tmp12; + tmp75 = imag_input[4 * imag_istride]; + tmp76 = imag_input[28 * imag_istride]; + tmp77 = tmp75 - tmp76; + tmp232 = tmp75 + tmp76; + } + { + fftw_real tmp14; + fftw_real tmp15; + fftw_real tmp72; + fftw_real tmp73; + ASSERT_ALIGNED_DOUBLE; + tmp14 = real_input[12 * real_istride]; + tmp15 = real_input[20 * real_istride]; + tmp16 = tmp14 + tmp15; + tmp231 = tmp15 - tmp14; + tmp72 = imag_input[12 * imag_istride]; + tmp73 = imag_input[20 * imag_istride]; + tmp74 = tmp72 - tmp73; + tmp229 = tmp73 + tmp72; + } + tmp17 = K2_000000000 * (tmp13 + tmp16); + tmp71 = tmp13 - tmp16; + tmp78 = tmp74 + tmp77; + tmp79 = K1_414213562 * (tmp71 - tmp78); + tmp153 = K1_414213562 * (tmp71 + tmp78); + tmp197 = K2_000000000 * (tmp77 - tmp74); + { + fftw_real tmp230; + fftw_real tmp233; + fftw_real tmp328; + fftw_real tmp329; + ASSERT_ALIGNED_DOUBLE; + tmp230 = tmp228 - tmp229; + tmp233 = tmp231 + tmp232; + tmp234 = (K1_847759065 * tmp230) - (K765366864 * tmp233); + tmp302 = (K765366864 * tmp230) + (K1_847759065 * tmp233); + tmp328 = tmp228 + tmp229; + tmp329 = tmp232 - tmp231; + tmp330 = (K765366864 * tmp328) - (K1_847759065 * tmp329); + tmp374 = (K1_847759065 * tmp328) + (K765366864 * tmp329); + } + } + { + fftw_real tmp21; + fftw_real tmp236; + fftw_real tmp96; + fftw_real tmp240; + fftw_real tmp24; + fftw_real tmp239; + fftw_real tmp93; + fftw_real tmp237; + fftw_real tmp28; + fftw_real tmp243; + fftw_real tmp87; + fftw_real tmp247; + fftw_real tmp31; + fftw_real tmp246; + fftw_real tmp84; + fftw_real tmp244; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp19; + fftw_real tmp20; + fftw_real tmp94; + fftw_real tmp95; + ASSERT_ALIGNED_DOUBLE; + tmp19 = real_input[2 * real_istride]; + tmp20 = real_input[30 * real_istride]; + tmp21 = tmp19 + tmp20; + tmp236 = tmp19 - tmp20; + tmp94 = imag_input[2 * imag_istride]; + tmp95 = imag_input[30 * imag_istride]; + tmp96 = tmp94 - tmp95; + tmp240 = tmp94 + tmp95; + } + { + fftw_real tmp22; + fftw_real tmp23; + fftw_real tmp91; + fftw_real tmp92; + ASSERT_ALIGNED_DOUBLE; + tmp22 = real_input[14 * real_istride]; + tmp23 = real_input[18 * real_istride]; + tmp24 = tmp22 + tmp23; + tmp239 = tmp23 - tmp22; + tmp91 = imag_input[14 * imag_istride]; + tmp92 = imag_input[18 * imag_istride]; + tmp93 = tmp91 - tmp92; + tmp237 = tmp92 + tmp91; + } + { + fftw_real tmp26; + fftw_real tmp27; + fftw_real tmp85; + fftw_real tmp86; + ASSERT_ALIGNED_DOUBLE; + tmp26 = real_input[6 * real_istride]; + tmp27 = real_input[26 * real_istride]; + tmp28 = tmp26 + tmp27; + tmp243 = tmp26 - tmp27; + tmp85 = imag_input[6 * imag_istride]; + tmp86 = imag_input[26 * imag_istride]; + tmp87 = tmp85 - tmp86; + tmp247 = tmp85 + tmp86; + } + { + fftw_real tmp29; + fftw_real tmp30; + fftw_real tmp82; + fftw_real tmp83; + ASSERT_ALIGNED_DOUBLE; + tmp29 = real_input[10 * real_istride]; + tmp30 = real_input[22 * real_istride]; + tmp31 = tmp29 + tmp30; + tmp246 = tmp30 - tmp29; + tmp82 = imag_input[10 * imag_istride]; + tmp83 = imag_input[22 * imag_istride]; + tmp84 = tmp82 - tmp83; + tmp244 = tmp83 + tmp82; + } + { + fftw_real tmp81; + fftw_real tmp88; + fftw_real tmp90; + fftw_real tmp97; + ASSERT_ALIGNED_DOUBLE; + tmp25 = tmp21 + tmp24; + tmp32 = tmp28 + tmp31; + tmp199 = tmp25 - tmp32; + tmp81 = tmp21 - tmp24; + tmp88 = tmp84 + tmp87; + tmp89 = tmp81 - tmp88; + tmp155 = tmp81 + tmp88; + tmp187 = tmp96 - tmp93; + tmp188 = tmp87 - tmp84; + tmp200 = tmp187 + tmp188; + tmp90 = tmp31 - tmp28; + tmp97 = tmp93 + tmp96; + tmp98 = tmp90 + tmp97; + tmp156 = tmp97 - tmp90; + } + { + fftw_real tmp238; + fftw_real tmp241; + fftw_real tmp332; + fftw_real tmp333; + ASSERT_ALIGNED_DOUBLE; + tmp238 = tmp236 - tmp237; + tmp241 = tmp239 + tmp240; + tmp242 = (K980785280 * tmp238) - (K195090322 * tmp241); + tmp292 = (K195090322 * tmp238) + (K980785280 * tmp241); + tmp332 = tmp236 + tmp237; + tmp333 = tmp240 - tmp239; + tmp334 = (K831469612 * tmp332) - (K555570233 * tmp333); + tmp364 = (K555570233 * tmp332) + (K831469612 * tmp333); + } + { + fftw_real tmp245; + fftw_real tmp248; + fftw_real tmp335; + fftw_real tmp336; + ASSERT_ALIGNED_DOUBLE; + tmp245 = tmp243 - tmp244; + tmp248 = tmp246 + tmp247; + tmp249 = (K831469612 * tmp245) - (K555570233 * tmp248); + tmp293 = (K555570233 * tmp245) + (K831469612 * tmp248); + tmp335 = tmp243 + tmp244; + tmp336 = tmp247 - tmp246; + tmp337 = (K195090322 * tmp335) + (K980785280 * tmp336); + tmp365 = (K980785280 * tmp335) - (K195090322 * tmp336); + } + } + { + fftw_real tmp37; + fftw_real tmp252; + fftw_real tmp116; + fftw_real tmp256; + fftw_real tmp40; + fftw_real tmp255; + fftw_real tmp113; + fftw_real tmp253; + fftw_real tmp44; + fftw_real tmp259; + fftw_real tmp107; + fftw_real tmp263; + fftw_real tmp47; + fftw_real tmp262; + fftw_real tmp104; + fftw_real tmp260; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp35; + fftw_real tmp36; + fftw_real tmp114; + fftw_real tmp115; + ASSERT_ALIGNED_DOUBLE; + tmp35 = real_input[real_istride]; + tmp36 = real_input[31 * real_istride]; + tmp37 = tmp35 + tmp36; + tmp252 = tmp35 - tmp36; + tmp114 = imag_input[imag_istride]; + tmp115 = imag_input[31 * imag_istride]; + tmp116 = tmp114 - tmp115; + tmp256 = tmp114 + tmp115; + } + { + fftw_real tmp38; + fftw_real tmp39; + fftw_real tmp111; + fftw_real tmp112; + ASSERT_ALIGNED_DOUBLE; + tmp38 = real_input[15 * real_istride]; + tmp39 = real_input[17 * real_istride]; + tmp40 = tmp38 + tmp39; + tmp255 = tmp39 - tmp38; + tmp111 = imag_input[15 * imag_istride]; + tmp112 = imag_input[17 * imag_istride]; + tmp113 = tmp111 - tmp112; + tmp253 = tmp112 + tmp111; + } + { + fftw_real tmp42; + fftw_real tmp43; + fftw_real tmp105; + fftw_real tmp106; + ASSERT_ALIGNED_DOUBLE; + tmp42 = real_input[7 * real_istride]; + tmp43 = real_input[25 * real_istride]; + tmp44 = tmp42 + tmp43; + tmp259 = tmp42 - tmp43; + tmp105 = imag_input[7 * imag_istride]; + tmp106 = imag_input[25 * imag_istride]; + tmp107 = tmp105 - tmp106; + tmp263 = tmp105 + tmp106; + } + { + fftw_real tmp45; + fftw_real tmp46; + fftw_real tmp102; + fftw_real tmp103; + ASSERT_ALIGNED_DOUBLE; + tmp45 = real_input[9 * real_istride]; + tmp46 = real_input[23 * real_istride]; + tmp47 = tmp45 + tmp46; + tmp262 = tmp46 - tmp45; + tmp102 = imag_input[9 * imag_istride]; + tmp103 = imag_input[23 * imag_istride]; + tmp104 = tmp102 - tmp103; + tmp260 = tmp103 + tmp102; + } + { + fftw_real tmp41; + fftw_real tmp48; + fftw_real tmp101; + fftw_real tmp108; + ASSERT_ALIGNED_DOUBLE; + tmp41 = tmp37 + tmp40; + tmp48 = tmp44 + tmp47; + tmp49 = tmp41 + tmp48; + tmp203 = tmp41 - tmp48; + tmp101 = tmp37 - tmp40; + tmp108 = tmp104 + tmp107; + tmp109 = tmp101 - tmp108; + tmp159 = tmp101 + tmp108; + } + { + fftw_real tmp179; + fftw_real tmp180; + fftw_real tmp110; + fftw_real tmp117; + ASSERT_ALIGNED_DOUBLE; + tmp179 = tmp116 - tmp113; + tmp180 = tmp107 - tmp104; + tmp181 = tmp179 - tmp180; + tmp207 = tmp179 + tmp180; + tmp110 = tmp47 - tmp44; + tmp117 = tmp113 + tmp116; + tmp118 = tmp110 + tmp117; + tmp160 = tmp117 - tmp110; + } + { + fftw_real tmp254; + fftw_real tmp257; + fftw_real tmp340; + fftw_real tmp341; + ASSERT_ALIGNED_DOUBLE; + tmp254 = tmp252 - tmp253; + tmp257 = tmp255 + tmp256; + tmp258 = (K995184726 * tmp254) - (K098017140 * tmp257); + tmp284 = (K098017140 * tmp254) + (K995184726 * tmp257); + tmp340 = tmp252 + tmp253; + tmp341 = tmp256 - tmp255; + tmp342 = (K956940335 * tmp340) - (K290284677 * tmp341); + tmp356 = (K290284677 * tmp340) + (K956940335 * tmp341); + } + { + fftw_real tmp261; + fftw_real tmp264; + fftw_real tmp343; + fftw_real tmp344; + ASSERT_ALIGNED_DOUBLE; + tmp261 = tmp259 - tmp260; + tmp264 = tmp262 + tmp263; + tmp265 = (K773010453 * tmp261) - (K634393284 * tmp264); + tmp285 = (K634393284 * tmp261) + (K773010453 * tmp264); + tmp343 = tmp259 + tmp260; + tmp344 = tmp263 - tmp262; + tmp345 = (K471396736 * tmp343) + (K881921264 * tmp344); + tmp357 = (K881921264 * tmp343) - (K471396736 * tmp344); + } + } + { + fftw_real tmp65; + fftw_real tmp185; + fftw_real tmp34; + fftw_real tmp178; + fftw_real tmp18; + fftw_real tmp33; + ASSERT_ALIGNED_DOUBLE; + tmp65 = K2_000000000 * (tmp49 + tmp64); + tmp185 = K2_000000000 * (tmp181 - tmp184); + tmp18 = tmp10 + tmp17; + tmp33 = K2_000000000 * (tmp25 + tmp32); + tmp34 = tmp18 + tmp33; + tmp178 = tmp18 - tmp33; + output[32 * ostride] = tmp34 - tmp65; + output[0] = tmp34 + tmp65; + output[16 * ostride] = tmp178 - tmp185; + output[48 * ostride] = tmp178 + tmp185; + } + { + fftw_real tmp190; + fftw_real tmp194; + fftw_real tmp193; + fftw_real tmp195; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp186; + fftw_real tmp189; + fftw_real tmp191; + fftw_real tmp192; + ASSERT_ALIGNED_DOUBLE; + tmp186 = tmp10 - tmp17; + tmp189 = K2_000000000 * (tmp187 - tmp188); + tmp190 = tmp186 - tmp189; + tmp194 = tmp186 + tmp189; + tmp191 = tmp49 - tmp64; + tmp192 = tmp181 + tmp184; + tmp193 = K1_414213562 * (tmp191 - tmp192); + tmp195 = K1_414213562 * (tmp191 + tmp192); + } + output[40 * ostride] = tmp190 - tmp193; + output[8 * ostride] = tmp190 + tmp193; + output[24 * ostride] = tmp194 - tmp195; + output[56 * ostride] = tmp194 + tmp195; + } + { + fftw_real tmp100; + fftw_real tmp140; + fftw_real tmp146; + fftw_real tmp150; + fftw_real tmp139; + fftw_real tmp147; + fftw_real tmp143; + fftw_real tmp148; + fftw_real tmp151; + fftw_real tmp149; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp80; + fftw_real tmp99; + fftw_real tmp144; + fftw_real tmp145; + ASSERT_ALIGNED_DOUBLE; + tmp80 = tmp70 + tmp79; + tmp99 = (K1_847759065 * tmp89) - (K765366864 * tmp98); + tmp100 = tmp80 + tmp99; + tmp140 = tmp80 - tmp99; + tmp144 = tmp70 - tmp79; + tmp145 = (K1_847759065 * tmp98) + (K765366864 * tmp89); + tmp146 = tmp144 - tmp145; + tmp150 = tmp144 + tmp145; + } + { + fftw_real tmp119; + fftw_real tmp138; + fftw_real tmp141; + fftw_real tmp142; + ASSERT_ALIGNED_DOUBLE; + tmp119 = (K980785280 * tmp109) - (K195090322 * tmp118); + tmp138 = (K831469612 * tmp128) - (K555570233 * tmp137); + tmp139 = K2_000000000 * (tmp119 + tmp138); + tmp147 = tmp119 - tmp138; + tmp141 = (K980785280 * tmp118) + (K195090322 * tmp109); + tmp142 = (K831469612 * tmp137) + (K555570233 * tmp128); + tmp143 = K2_000000000 * (tmp141 - tmp142); + tmp148 = tmp141 + tmp142; + } + output[34 * ostride] = tmp100 - tmp139; + output[2 * ostride] = tmp100 + tmp139; + output[18 * ostride] = tmp140 - tmp143; + output[50 * ostride] = tmp140 + tmp143; + tmp151 = K1_414213562 * (tmp147 + tmp148); + output[26 * ostride] = tmp150 - tmp151; + output[58 * ostride] = tmp150 + tmp151; + tmp149 = K1_414213562 * (tmp147 - tmp148); + output[42 * ostride] = tmp146 - tmp149; + output[10 * ostride] = tmp146 + tmp149; + } + { + fftw_real tmp339; + fftw_real tmp355; + fftw_real tmp367; + fftw_real tmp371; + fftw_real tmp354; + fftw_real tmp368; + fftw_real tmp362; + fftw_real tmp369; + fftw_real tmp372; + fftw_real tmp370; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp331; + fftw_real tmp338; + fftw_real tmp363; + fftw_real tmp366; + ASSERT_ALIGNED_DOUBLE; + tmp331 = tmp327 + tmp330; + tmp338 = K2_000000000 * (tmp334 - tmp337); + tmp339 = tmp331 + tmp338; + tmp355 = tmp331 - tmp338; + tmp363 = tmp327 - tmp330; + tmp366 = K2_000000000 * (tmp364 - tmp365); + tmp367 = tmp363 - tmp366; + tmp371 = tmp363 + tmp366; + } + { + fftw_real tmp346; + fftw_real tmp353; + fftw_real tmp358; + fftw_real tmp361; + ASSERT_ALIGNED_DOUBLE; + tmp346 = tmp342 - tmp345; + tmp353 = tmp349 + tmp352; + tmp354 = K2_000000000 * (tmp346 + tmp353); + tmp368 = tmp346 - tmp353; + tmp358 = tmp356 - tmp357; + tmp361 = tmp359 - tmp360; + tmp362 = K2_000000000 * (tmp358 - tmp361); + tmp369 = tmp358 + tmp361; + } + output[35 * ostride] = tmp339 - tmp354; + output[3 * ostride] = tmp339 + tmp354; + output[19 * ostride] = tmp355 - tmp362; + output[51 * ostride] = tmp355 + tmp362; + tmp372 = K1_414213562 * (tmp368 + tmp369); + output[27 * ostride] = tmp371 - tmp372; + output[59 * ostride] = tmp371 + tmp372; + tmp370 = K1_414213562 * (tmp368 - tmp369); + output[43 * ostride] = tmp367 - tmp370; + output[11 * ostride] = tmp367 + tmp370; + } + { + fftw_real tmp375; + fftw_real tmp389; + fftw_real tmp378; + fftw_real tmp390; + fftw_real tmp382; + fftw_real tmp392; + fftw_real tmp385; + fftw_real tmp393; + fftw_real tmp376; + fftw_real tmp377; + ASSERT_ALIGNED_DOUBLE; + tmp375 = tmp373 - tmp374; + tmp389 = tmp373 + tmp374; + tmp376 = tmp334 + tmp337; + tmp377 = tmp364 + tmp365; + tmp378 = K1_414213562 * (tmp376 - tmp377); + tmp390 = K1_414213562 * (tmp377 + tmp376); + { + fftw_real tmp380; + fftw_real tmp381; + fftw_real tmp383; + fftw_real tmp384; + ASSERT_ALIGNED_DOUBLE; + tmp380 = tmp342 + tmp345; + tmp381 = tmp359 + tmp360; + tmp382 = tmp380 - tmp381; + tmp392 = tmp380 + tmp381; + tmp383 = tmp356 + tmp357; + tmp384 = tmp352 - tmp349; + tmp385 = tmp383 + tmp384; + tmp393 = tmp383 - tmp384; + } + { + fftw_real tmp379; + fftw_real tmp386; + fftw_real tmp387; + fftw_real tmp388; + ASSERT_ALIGNED_DOUBLE; + tmp379 = tmp375 + tmp378; + tmp386 = (K1_847759065 * tmp382) - (K765366864 * tmp385); + output[39 * ostride] = tmp379 - tmp386; + output[7 * ostride] = tmp379 + tmp386; + tmp387 = tmp375 - tmp378; + tmp388 = (K1_847759065 * tmp385) + (K765366864 * tmp382); + output[23 * ostride] = tmp387 - tmp388; + output[55 * ostride] = tmp387 + tmp388; + } + { + fftw_real tmp391; + fftw_real tmp394; + fftw_real tmp395; + fftw_real tmp396; + ASSERT_ALIGNED_DOUBLE; + tmp391 = tmp389 - tmp390; + tmp394 = (K765366864 * tmp392) - (K1_847759065 * tmp393); + output[47 * ostride] = tmp391 - tmp394; + output[15 * ostride] = tmp391 + tmp394; + tmp395 = tmp389 + tmp390; + tmp396 = (K765366864 * tmp393) + (K1_847759065 * tmp392); + output[31 * ostride] = tmp395 - tmp396; + output[63 * ostride] = tmp395 + tmp396; + } + } + { + fftw_real tmp214; + fftw_real tmp218; + fftw_real tmp217; + fftw_real tmp219; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp212; + fftw_real tmp213; + fftw_real tmp215; + fftw_real tmp216; + ASSERT_ALIGNED_DOUBLE; + tmp212 = tmp196 + tmp197; + tmp213 = K1_414213562 * (tmp199 + tmp200); + tmp214 = tmp212 - tmp213; + tmp218 = tmp212 + tmp213; + tmp215 = tmp203 + tmp204; + tmp216 = tmp207 - tmp206; + tmp217 = (K765366864 * tmp215) - (K1_847759065 * tmp216); + tmp219 = (K765366864 * tmp216) + (K1_847759065 * tmp215); + } + output[44 * ostride] = tmp214 - tmp217; + output[12 * ostride] = tmp214 + tmp217; + output[28 * ostride] = tmp218 - tmp219; + output[60 * ostride] = tmp218 + tmp219; + } + { + fftw_real tmp202; + fftw_real tmp210; + fftw_real tmp209; + fftw_real tmp211; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp198; + fftw_real tmp201; + fftw_real tmp205; + fftw_real tmp208; + ASSERT_ALIGNED_DOUBLE; + tmp198 = tmp196 - tmp197; + tmp201 = K1_414213562 * (tmp199 - tmp200); + tmp202 = tmp198 + tmp201; + tmp210 = tmp198 - tmp201; + tmp205 = tmp203 - tmp204; + tmp208 = tmp206 + tmp207; + tmp209 = (K1_847759065 * tmp205) - (K765366864 * tmp208); + tmp211 = (K1_847759065 * tmp208) + (K765366864 * tmp205); + } + output[36 * ostride] = tmp202 - tmp209; + output[4 * ostride] = tmp202 + tmp209; + output[20 * ostride] = tmp210 - tmp211; + output[52 * ostride] = tmp210 + tmp211; + } + { + fftw_real tmp158; + fftw_real tmp166; + fftw_real tmp172; + fftw_real tmp176; + fftw_real tmp165; + fftw_real tmp173; + fftw_real tmp169; + fftw_real tmp174; + fftw_real tmp177; + fftw_real tmp175; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp154; + fftw_real tmp157; + fftw_real tmp170; + fftw_real tmp171; + ASSERT_ALIGNED_DOUBLE; + tmp154 = tmp152 - tmp153; + tmp157 = (K765366864 * tmp155) - (K1_847759065 * tmp156); + tmp158 = tmp154 + tmp157; + tmp166 = tmp154 - tmp157; + tmp170 = tmp152 + tmp153; + tmp171 = (K765366864 * tmp156) + (K1_847759065 * tmp155); + tmp172 = tmp170 - tmp171; + tmp176 = tmp170 + tmp171; + } + { + fftw_real tmp161; + fftw_real tmp164; + fftw_real tmp167; + fftw_real tmp168; + ASSERT_ALIGNED_DOUBLE; + tmp161 = (K831469612 * tmp159) - (K555570233 * tmp160); + tmp164 = (K980785280 * tmp162) + (K195090322 * tmp163); + tmp165 = K2_000000000 * (tmp161 - tmp164); + tmp173 = tmp161 + tmp164; + tmp167 = (K831469612 * tmp160) + (K555570233 * tmp159); + tmp168 = (K980785280 * tmp163) - (K195090322 * tmp162); + tmp169 = K2_000000000 * (tmp167 - tmp168); + tmp174 = tmp167 + tmp168; + } + output[38 * ostride] = tmp158 - tmp165; + output[6 * ostride] = tmp158 + tmp165; + output[22 * ostride] = tmp166 - tmp169; + output[54 * ostride] = tmp166 + tmp169; + tmp177 = K1_414213562 * (tmp173 + tmp174); + output[30 * ostride] = tmp176 - tmp177; + output[62 * ostride] = tmp176 + tmp177; + tmp175 = K1_414213562 * (tmp173 - tmp174); + output[46 * ostride] = tmp172 - tmp175; + output[14 * ostride] = tmp172 + tmp175; + } + { + fftw_real tmp251; + fftw_real tmp283; + fftw_real tmp295; + fftw_real tmp299; + fftw_real tmp282; + fftw_real tmp296; + fftw_real tmp290; + fftw_real tmp297; + fftw_real tmp300; + fftw_real tmp298; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp235; + fftw_real tmp250; + fftw_real tmp291; + fftw_real tmp294; + ASSERT_ALIGNED_DOUBLE; + tmp235 = tmp227 + tmp234; + tmp250 = K2_000000000 * (tmp242 + tmp249); + tmp251 = tmp235 + tmp250; + tmp283 = tmp235 - tmp250; + tmp291 = tmp227 - tmp234; + tmp294 = K2_000000000 * (tmp292 - tmp293); + tmp295 = tmp291 - tmp294; + tmp299 = tmp291 + tmp294; + } + { + fftw_real tmp266; + fftw_real tmp281; + fftw_real tmp286; + fftw_real tmp289; + ASSERT_ALIGNED_DOUBLE; + tmp266 = tmp258 + tmp265; + tmp281 = tmp273 + tmp280; + tmp282 = K2_000000000 * (tmp266 + tmp281); + tmp296 = tmp266 - tmp281; + tmp286 = tmp284 - tmp285; + tmp289 = tmp287 - tmp288; + tmp290 = K2_000000000 * (tmp286 - tmp289); + tmp297 = tmp286 + tmp289; + } + output[33 * ostride] = tmp251 - tmp282; + output[ostride] = tmp251 + tmp282; + output[17 * ostride] = tmp283 - tmp290; + output[49 * ostride] = tmp283 + tmp290; + tmp300 = K1_414213562 * (tmp296 + tmp297); + output[25 * ostride] = tmp299 - tmp300; + output[57 * ostride] = tmp299 + tmp300; + tmp298 = K1_414213562 * (tmp296 - tmp297); + output[41 * ostride] = tmp295 - tmp298; + output[9 * ostride] = tmp295 + tmp298; + } + { + fftw_real tmp303; + fftw_real tmp317; + fftw_real tmp306; + fftw_real tmp318; + fftw_real tmp310; + fftw_real tmp320; + fftw_real tmp313; + fftw_real tmp321; + fftw_real tmp304; + fftw_real tmp305; + ASSERT_ALIGNED_DOUBLE; + tmp303 = tmp301 - tmp302; + tmp317 = tmp301 + tmp302; + tmp304 = tmp242 - tmp249; + tmp305 = tmp292 + tmp293; + tmp306 = K1_414213562 * (tmp304 - tmp305); + tmp318 = K1_414213562 * (tmp304 + tmp305); + { + fftw_real tmp308; + fftw_real tmp309; + fftw_real tmp311; + fftw_real tmp312; + ASSERT_ALIGNED_DOUBLE; + tmp308 = tmp258 - tmp265; + tmp309 = tmp287 + tmp288; + tmp310 = tmp308 - tmp309; + tmp320 = tmp308 + tmp309; + tmp311 = tmp284 + tmp285; + tmp312 = tmp280 - tmp273; + tmp313 = tmp311 + tmp312; + tmp321 = tmp311 - tmp312; + } + { + fftw_real tmp307; + fftw_real tmp314; + fftw_real tmp315; + fftw_real tmp316; + ASSERT_ALIGNED_DOUBLE; + tmp307 = tmp303 + tmp306; + tmp314 = (K1_847759065 * tmp310) - (K765366864 * tmp313); + output[37 * ostride] = tmp307 - tmp314; + output[5 * ostride] = tmp307 + tmp314; + tmp315 = tmp303 - tmp306; + tmp316 = (K1_847759065 * tmp313) + (K765366864 * tmp310); + output[21 * ostride] = tmp315 - tmp316; + output[53 * ostride] = tmp315 + tmp316; + } + { + fftw_real tmp319; + fftw_real tmp322; + fftw_real tmp323; + fftw_real tmp324; + ASSERT_ALIGNED_DOUBLE; + tmp319 = tmp317 - tmp318; + tmp322 = (K765366864 * tmp320) - (K1_847759065 * tmp321); + output[45 * ostride] = tmp319 - tmp322; + output[13 * ostride] = tmp319 + tmp322; + tmp323 = tmp317 + tmp318; + tmp324 = (K765366864 * tmp321) + (K1_847759065 * tmp320); + output[29 * ostride] = tmp323 - tmp324; + output[61 * ostride] = tmp323 + tmp324; + } + } +} + +fftw_codelet_desc fftw_hc2real_64_desc = +{ + "fftw_hc2real_64", + (void (*)()) fftw_hc2real_64, + 64, + FFTW_BACKWARD, + FFTW_HC2REAL, + 1423, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fcr_7.c b/src/sndobj/rfftw/fcr_7.c new file mode 100644 index 0000000..311fd7f --- /dev/null +++ b/src/sndobj/rfftw/fcr_7.c @@ -0,0 +1,96 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:19 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2real 7 */ + +/* + * This function contains 24 FP additions, 19 FP multiplications, + * (or, 23 additions, 18 multiplications, 1 fused multiply/add), + * 13 stack variables, and 14 memory accesses + */ +static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); +static const fftw_real K1_801937735 = FFTW_KONST(+1.801937735804838252472204639014890102331838324); +static const fftw_real K445041867 = FFTW_KONST(+0.445041867912628808577805128993589518932711138); +static const fftw_real K1_246979603 = FFTW_KONST(+1.246979603717467061050009768008479621264549462); +static const fftw_real K867767478 = FFTW_KONST(+0.867767478235116240951536665696717509219981456); +static const fftw_real K1_949855824 = FFTW_KONST(+1.949855824363647214036263365987862434465571601); +static const fftw_real K1_563662964 = FFTW_KONST(+1.563662964936059617416889053348115500464669037); + +/* + * Generator Id's : + * $Id: fcr_7.c,v 1.1.1.1 2006/05/12 15:14:46 veplaini Exp $ + * $Id: fcr_7.c,v 1.1.1.1 2006/05/12 15:14:46 veplaini Exp $ + * $Id: fcr_7.c,v 1.1.1.1 2006/05/12 15:14:46 veplaini Exp $ + */ + +void fftw_hc2real_7(const fftw_real *real_input, const fftw_real *imag_input, fftw_real *output, int real_istride, int imag_istride, int ostride) +{ + fftw_real tmp9; + fftw_real tmp13; + fftw_real tmp11; + fftw_real tmp1; + fftw_real tmp4; + fftw_real tmp2; + fftw_real tmp3; + fftw_real tmp5; + fftw_real tmp12; + fftw_real tmp10; + fftw_real tmp6; + fftw_real tmp8; + fftw_real tmp7; + ASSERT_ALIGNED_DOUBLE; + tmp6 = imag_input[2 * imag_istride]; + tmp8 = imag_input[imag_istride]; + tmp7 = imag_input[3 * imag_istride]; + tmp9 = (K1_563662964 * tmp6) - (K1_949855824 * tmp7) - (K867767478 * tmp8); + tmp13 = (K867767478 * tmp6) + (K1_563662964 * tmp7) - (K1_949855824 * tmp8); + tmp11 = (K1_563662964 * tmp8) + (K1_949855824 * tmp6) + (K867767478 * tmp7); + tmp1 = real_input[0]; + tmp4 = real_input[3 * real_istride]; + tmp2 = real_input[real_istride]; + tmp3 = real_input[2 * real_istride]; + tmp5 = tmp1 + (K1_246979603 * tmp3) - (K445041867 * tmp4) - (K1_801937735 * tmp2); + tmp12 = tmp1 + (K1_246979603 * tmp4) - (K1_801937735 * tmp3) - (K445041867 * tmp2); + tmp10 = tmp1 + (K1_246979603 * tmp2) - (K1_801937735 * tmp4) - (K445041867 * tmp3); + output[4 * ostride] = tmp5 - tmp9; + output[3 * ostride] = tmp5 + tmp9; + output[0] = tmp1 + (K2_000000000 * (tmp2 + tmp3 + tmp4)); + output[2 * ostride] = tmp12 + tmp13; + output[5 * ostride] = tmp12 - tmp13; + output[6 * ostride] = tmp10 + tmp11; + output[ostride] = tmp10 - tmp11; +} + +fftw_codelet_desc fftw_hc2real_7_desc = +{ + "fftw_hc2real_7", + (void (*)()) fftw_hc2real_7, + 7, + FFTW_BACKWARD, + FFTW_HC2REAL, + 169, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fcr_8.c b/src/sndobj/rfftw/fcr_8.c new file mode 100644 index 0000000..8bd5b02 --- /dev/null +++ b/src/sndobj/rfftw/fcr_8.c @@ -0,0 +1,119 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:20 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2real 8 */ + +/* + * This function contains 20 FP additions, 6 FP multiplications, + * (or, 20 additions, 6 multiplications, 0 fused multiply/add), + * 18 stack variables, and 16 memory accesses + */ +static const fftw_real K1_414213562 = FFTW_KONST(+1.414213562373095048801688724209698078569671875); +static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); + +/* + * Generator Id's : + * $Id: fcr_8.c,v 1.1.1.1 2006/05/12 15:14:56 veplaini Exp $ + * $Id: fcr_8.c,v 1.1.1.1 2006/05/12 15:14:56 veplaini Exp $ + * $Id: fcr_8.c,v 1.1.1.1 2006/05/12 15:14:56 veplaini Exp $ + */ + +void fftw_hc2real_8(const fftw_real *real_input, const fftw_real *imag_input, fftw_real *output, int real_istride, int imag_istride, int ostride) +{ + fftw_real tmp5; + fftw_real tmp12; + fftw_real tmp3; + fftw_real tmp10; + fftw_real tmp9; + fftw_real tmp14; + fftw_real tmp17; + fftw_real tmp22; + fftw_real tmp6; + fftw_real tmp21; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp4; + fftw_real tmp11; + fftw_real tmp1; + fftw_real tmp2; + ASSERT_ALIGNED_DOUBLE; + tmp4 = real_input[2 * real_istride]; + tmp5 = K2_000000000 * tmp4; + tmp11 = imag_input[2 * imag_istride]; + tmp12 = K2_000000000 * tmp11; + tmp1 = real_input[0]; + tmp2 = real_input[4 * real_istride]; + tmp3 = tmp1 + tmp2; + tmp10 = tmp1 - tmp2; + { + fftw_real tmp7; + fftw_real tmp8; + fftw_real tmp15; + fftw_real tmp16; + ASSERT_ALIGNED_DOUBLE; + tmp7 = real_input[real_istride]; + tmp8 = real_input[3 * real_istride]; + tmp9 = K2_000000000 * (tmp7 + tmp8); + tmp14 = tmp7 - tmp8; + tmp15 = imag_input[3 * imag_istride]; + tmp16 = imag_input[imag_istride]; + tmp17 = tmp15 + tmp16; + tmp22 = K2_000000000 * (tmp16 - tmp15); + } + } + tmp6 = tmp3 + tmp5; + output[4 * ostride] = tmp6 - tmp9; + output[0] = tmp6 + tmp9; + tmp21 = tmp3 - tmp5; + output[2 * ostride] = tmp21 - tmp22; + output[6 * ostride] = tmp21 + tmp22; + { + fftw_real tmp13; + fftw_real tmp18; + fftw_real tmp19; + fftw_real tmp20; + ASSERT_ALIGNED_DOUBLE; + tmp13 = tmp10 - tmp12; + tmp18 = K1_414213562 * (tmp14 - tmp17); + output[5 * ostride] = tmp13 - tmp18; + output[ostride] = tmp13 + tmp18; + tmp19 = tmp10 + tmp12; + tmp20 = K1_414213562 * (tmp14 + tmp17); + output[3 * ostride] = tmp19 - tmp20; + output[7 * ostride] = tmp19 + tmp20; + } +} + +fftw_codelet_desc fftw_hc2real_8_desc = +{ + "fftw_hc2real_8", + (void (*)()) fftw_hc2real_8, + 8, + FFTW_BACKWARD, + FFTW_HC2REAL, + 191, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fcr_9.c b/src/sndobj/rfftw/fcr_9.c new file mode 100644 index 0000000..68500ce --- /dev/null +++ b/src/sndobj/rfftw/fcr_9.c @@ -0,0 +1,155 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:21 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2real 9 */ + +/* + * This function contains 32 FP additions, 18 FP multiplications, + * (or, 22 additions, 8 multiplications, 10 fused multiply/add), + * 22 stack variables, and 18 memory accesses + */ +static const fftw_real K984807753 = FFTW_KONST(+0.984807753012208059366743024589523013670643252); +static const fftw_real K173648177 = FFTW_KONST(+0.173648177666930348851716626769314796000375677); +static const fftw_real K300767466 = FFTW_KONST(+0.300767466360870593278543795225003852144476517); +static const fftw_real K1_705737063 = FFTW_KONST(+1.705737063904886419256501927880148143872040591); +static const fftw_real K642787609 = FFTW_KONST(+0.642787609686539326322643409907263432907559884); +static const fftw_real K766044443 = FFTW_KONST(+0.766044443118978035202392650555416673935832457); +static const fftw_real K1_326827896 = FFTW_KONST(+1.326827896337876792410842639271782594433726619); +static const fftw_real K1_113340798 = FFTW_KONST(+1.113340798452838732905825904094046265936583811); +static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); +static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); +static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); +static const fftw_real K1_732050807 = FFTW_KONST(+1.732050807568877293527446341505872366942805254); + +/* + * Generator Id's : + * $Id: fcr_9.c,v 1.1.1.1 2006/05/12 15:15:01 veplaini Exp $ + * $Id: fcr_9.c,v 1.1.1.1 2006/05/12 15:15:01 veplaini Exp $ + * $Id: fcr_9.c,v 1.1.1.1 2006/05/12 15:15:01 veplaini Exp $ + */ + +void fftw_hc2real_9(const fftw_real *real_input, const fftw_real *imag_input, fftw_real *output, int real_istride, int imag_istride, int ostride) +{ + fftw_real tmp3; + fftw_real tmp26; + fftw_real tmp12; + fftw_real tmp20; + fftw_real tmp19; + fftw_real tmp8; + fftw_real tmp17; + fftw_real tmp27; + fftw_real tmp22; + fftw_real tmp28; + fftw_real tmp32; + fftw_real tmp33; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp11; + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp9; + fftw_real tmp10; + ASSERT_ALIGNED_DOUBLE; + tmp10 = imag_input[3 * imag_istride]; + tmp11 = K1_732050807 * tmp10; + tmp1 = real_input[0]; + tmp2 = real_input[3 * real_istride]; + tmp9 = tmp1 - tmp2; + tmp3 = tmp1 + (K2_000000000 * tmp2); + tmp26 = tmp9 + tmp11; + tmp12 = tmp9 - tmp11; + } + { + fftw_real tmp4; + fftw_real tmp7; + fftw_real tmp18; + fftw_real tmp16; + fftw_real tmp13; + fftw_real tmp21; + ASSERT_ALIGNED_DOUBLE; + tmp4 = real_input[real_istride]; + tmp20 = imag_input[imag_istride]; + { + fftw_real tmp5; + fftw_real tmp6; + fftw_real tmp14; + fftw_real tmp15; + ASSERT_ALIGNED_DOUBLE; + tmp5 = real_input[4 * real_istride]; + tmp6 = real_input[2 * real_istride]; + tmp7 = tmp5 + tmp6; + tmp18 = K866025403 * (tmp5 - tmp6); + tmp14 = imag_input[4 * imag_istride]; + tmp15 = imag_input[2 * imag_istride]; + tmp16 = K866025403 * (tmp14 + tmp15); + tmp19 = tmp15 - tmp14; + } + tmp8 = tmp4 + tmp7; + tmp13 = tmp4 - (K500000000 * tmp7); + tmp17 = tmp13 - tmp16; + tmp27 = tmp13 + tmp16; + tmp21 = (K500000000 * tmp19) + tmp20; + tmp22 = tmp18 + tmp21; + tmp28 = tmp21 - tmp18; + } + output[0] = tmp3 + (K2_000000000 * tmp8); + tmp32 = tmp3 - tmp8; + tmp33 = K1_732050807 * (tmp20 - tmp19); + output[3 * ostride] = tmp32 - tmp33; + output[6 * ostride] = tmp32 + tmp33; + { + fftw_real tmp25; + fftw_real tmp23; + fftw_real tmp24; + fftw_real tmp31; + fftw_real tmp29; + fftw_real tmp30; + ASSERT_ALIGNED_DOUBLE; + tmp25 = (K1_113340798 * tmp17) + (K1_326827896 * tmp22); + tmp23 = (K766044443 * tmp17) - (K642787609 * tmp22); + tmp24 = tmp12 - tmp23; + output[ostride] = tmp12 + (K2_000000000 * tmp23); + output[7 * ostride] = tmp24 + tmp25; + output[4 * ostride] = tmp24 - tmp25; + tmp31 = (K1_705737063 * tmp27) + (K300767466 * tmp28); + tmp29 = (K173648177 * tmp27) - (K984807753 * tmp28); + tmp30 = tmp26 - tmp29; + output[2 * ostride] = tmp26 + (K2_000000000 * tmp29); + output[8 * ostride] = tmp30 + tmp31; + output[5 * ostride] = tmp30 - tmp31; + } +} + +fftw_codelet_desc fftw_hc2real_9_desc = +{ + "fftw_hc2real_9", + (void (*)()) fftw_hc2real_9, + 9, + FFTW_BACKWARD, + FFTW_HC2REAL, + 213, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fftw-int.h b/src/sndobj/rfftw/fftw-int.h new file mode 100644 index 0000000..d0dcdb2 --- /dev/null +++ b/src/sndobj/rfftw/fftw-int.h @@ -0,0 +1,500 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* fftw.h -- system-wide definitions */ +/* $Id: fftw-int.h,v 1.2 2007/01/08 10:53:29 veplaini Exp $ */ + +#ifndef FFTW_INT_H +#define FFTW_INT_H +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/****************************************************************************/ +/* Private Functions */ +/****************************************************************************/ + +extern fftw_twiddle *fftw_create_twiddle(int n, const fftw_codelet_desc *d); +extern void fftw_destroy_twiddle(fftw_twiddle *tw); + +extern void fftw_strided_copy(int, fftw_complex *, int, fftw_complex *); +extern void fftw_executor_simple(int, const fftw_complex *, fftw_complex *, + fftw_plan_node *, int, int, + fftw_recurse_kind recurse_kind); + +extern fftwnd_plan fftwnd_create_plan_aux(int rank, const int *n, + fftw_direction dir, int flags); +extern fftw_plan *fftwnd_new_plan_array(int rank); +extern fftw_plan *fftwnd_create_plans_generic(fftw_plan *plans, + int rank, const int *n, + fftw_direction dir, int flags); +extern fftw_plan *fftwnd_create_plans_specific(fftw_plan *plans, + int rank, const int *n, + const int *n_after, + fftw_direction dir, int flags, + fftw_complex *in, int istride, + fftw_complex *out, int ostride); +extern int fftwnd_work_size(int rank, const int *n, int flags, int ncopies); + +extern void fftwnd_aux(fftwnd_plan p, int cur_dim, + fftw_complex *in, int istride, + fftw_complex *out, int ostride, + fftw_complex *work); +extern void fftwnd_aux_howmany(fftwnd_plan p, int cur_dim, + int howmany, + fftw_complex *in, int istride, int idist, + fftw_complex *out, int ostride, int odist, + fftw_complex *work); + +/* wisdom prototypes */ +enum fftw_wisdom_category { + FFTW_WISDOM, RFFTW_WISDOM +}; + +extern int fftw_wisdom_lookup(int n, int flags, fftw_direction dir, + enum fftw_wisdom_category category, + int istride, int ostride, + enum fftw_node_type *type, + int *signature, + fftw_recurse_kind *recurse_kind, int replace_p); +extern void fftw_wisdom_add(int n, int flags, fftw_direction dir, + enum fftw_wisdom_category cat, + int istride, int ostride, + enum fftw_node_type type, + int signature, + fftw_recurse_kind recurse_kind); + +/* Private planner functions: */ +extern double fftw_estimate_node(fftw_plan_node *p); +extern fftw_plan_node *fftw_make_node_notw(int size, + const fftw_codelet_desc *config); +extern fftw_plan_node *fftw_make_node_real2hc(int size, + const fftw_codelet_desc *config); +extern fftw_plan_node *fftw_make_node_hc2real(int size, + const fftw_codelet_desc *config); +extern fftw_plan_node *fftw_make_node_twiddle(int n, + const fftw_codelet_desc *config, + fftw_plan_node *recurse, + int flags); +extern fftw_plan_node *fftw_make_node_hc2hc(int n, + fftw_direction dir, + const fftw_codelet_desc *config, + fftw_plan_node *recurse, + int flags); +extern fftw_plan_node *fftw_make_node_generic(int n, int size, + fftw_generic_codelet *codelet, + fftw_plan_node *recurse, + int flags); +extern fftw_plan_node *fftw_make_node_rgeneric(int n, int size, + fftw_direction dir, + fftw_rgeneric_codelet * codelet, + fftw_plan_node *recurse, + int flags); +extern int fftw_factor(int n); +extern fftw_plan_node *fftw_make_node(void); +extern fftw_plan fftw_make_plan(int n, fftw_direction dir, + fftw_plan_node *root, int flags, + enum fftw_node_type wisdom_type, + int wisdom_signature, + fftw_recurse_kind recurse_kind, + int vector_size); +extern void fftw_use_plan(fftw_plan p); +extern void fftw_use_node(fftw_plan_node *p); +extern void fftw_destroy_plan_internal(fftw_plan p); +extern fftw_plan fftw_pick_better(fftw_plan p1, fftw_plan p2); +extern fftw_plan fftw_lookup(fftw_plan *table, int n, int flags, + int vector_size); +extern void fftw_insert(fftw_plan *table, fftw_plan this_plan); +extern void fftw_make_empty_table(fftw_plan *table); +extern void fftw_destroy_table(fftw_plan *table); +extern void fftw_complete_twiddle(fftw_plan_node *p, int n); + +extern fftw_plan_node *fftw_make_node_rader(int n, int size, + fftw_direction dir, + fftw_plan_node *recurse, + int flags); +extern fftw_rader_data *fftw_rader_top; + +/* undocumented debugging hook */ +typedef void (*fftw_plan_hook_ptr) (fftw_plan plan); +extern DL_IMPORT(fftw_plan_hook_ptr) fftw_plan_hook; +extern DL_IMPORT(fftw_plan_hook_ptr) rfftw_plan_hook; + +/****************************************************************************/ +/* Overflow-safe multiply */ +/****************************************************************************/ + +/* The Rader routines do a lot of operations of the form (x * y) % p, which + are vulnerable to overflow problems for large p. To get around this, + we either use "long long" arithmetic (if it is available and double + the size of int), or default to a subroutine defined in twiddle.c. */ + +#if defined(FFTW_ENABLE_UNSAFE_MULMOD) +# define MULMOD(x,y,p) (((x) * (y)) % (p)) +#elif defined(LONGLONG_IS_TWOINTS) +# define MULMOD(x,y,p) ((int) ((((long long) (x)) * ((long long) (y))) \ + % ((long long) (p)))) +#else +# define USE_FFTW_SAFE_MULMOD +# define MULMOD(x,y,p) fftw_safe_mulmod(x,y,p) +extern int fftw_safe_mulmod(int x, int y, int p); +#endif + +/****************************************************************************/ +/* Floating Point Types */ +/****************************************************************************/ + +/* + * We use these definitions to make it easier for people to change + * FFTW to use long double and similar types. You shouldn't have to + * change this just to use float or double. + */ + +/* + * Change this if your floating-point constants need to be expressed + * in a special way. For example, if fftw_real is long double, you + * will need to append L to your fp constants to make them of the + * same precision. Do this by changing "x" below to "x##L". + */ +#define FFTW_KONST(x) ((fftw_real) x) + +/* + * Ordinarily, we use the standard sin/cos functions to compute trig. + * constants. You'll need to change these if fftw_real has more + * than double precision. + */ +#define FFTW_TRIG_SIN sin +#define FFTW_TRIG_COS cos +typedef double FFTW_TRIG_REAL; /* the argument type for sin and cos */ + +#define FFTW_K2PI FFTW_KONST(6.2831853071795864769252867665590057683943388) + +/****************************************************************************/ +/* gcc/x86 hacks */ +/****************************************************************************/ + +/* + * gcc 2.[78].x and x86 specific hacks. These macros align the stack + * pointer so that the double precision temporary variables in the + * codelets will be aligned to a multiple of 8 bytes (*way* faster on + * pentium and pentiumpro) + */ +#ifdef __GNUC__ +# ifdef __i386__ +# ifdef FFTW_ENABLE_I386_HACKS +# ifndef FFTW_GCC_ALIGNS_STACK +# ifndef FFTW_ENABLE_FLOAT +# define FFTW_USING_I386_HACKS +# define HACK_ALIGN_STACK_EVEN { \ + if ((((long) (__builtin_alloca(0))) & 0x7)) __builtin_alloca(4); \ + } + +# define HACK_ALIGN_STACK_ODD { \ + if (!(((long) (__builtin_alloca(0))) & 0x7)) __builtin_alloca(4); \ + } + +# endif /* ! FFTW_ENABLE_FLOAT */ +# endif /* ! FFTW_GCC_ALIGNS_STACK */ +# endif /* FFTW_ENABLE_I386_HACKS */ + +# ifdef FFTW_DEBUG_ALIGNMENT +# define ASSERT_ALIGNED_DOUBLE { \ + double __foo; \ + if ((((long) &__foo) & 0x7)) abort(); \ + } +# endif /* FFTW_DEBUG_ALIGNMENT */ + +# endif /* __i386__ */ +#endif /* __GNUC__ */ + +#ifndef HACK_ALIGN_STACK_EVEN +# define HACK_ALIGN_STACK_EVEN {} +#endif +#ifndef HACK_ALIGN_STACK_ODD +# define HACK_ALIGN_STACK_ODD {} +#endif +#ifndef ASSERT_ALIGNED_DOUBLE +# define ASSERT_ALIGNED_DOUBLE {} +#endif + +/****************************************************************************/ +/* Timers */ +/****************************************************************************/ + +/* + * Here, you can use all the nice timers available in your machine. + */ + +/* + * + Things you should define to include your own clock: + + fftw_time -- the data type used to store a time + + extern fftw_time fftw_get_time(void); + -- a function returning the current time. (We have + implemented this as a macro in most cases.) + + extern fftw_time fftw_time_diff(fftw_time t1, fftw_time t2); + -- returns the time difference (t1 - t2). + If t1 < t2, it may simply return zero (although this + is not required). (We have implemented this as a macro + in most cases.) + + extern double fftw_time_to_sec(fftw_time t); + -- returns the time t expressed in seconds, as a double. + (Implemented as a macro in most cases.) + + FFTW_TIME_MIN -- a double-precision macro holding the minimum + time interval (in seconds) for accurate time measurements. + This should probably be at least 100 times the precision of + your clock (we use even longer intervals, to be conservative). + This will determine how long the planner takes to measure + the speeds of different possible plans. + + Bracket all of your definitions with an appropriate #ifdef so that + they will be enabled on your machine. If you do add your own + high-precision timer code, let us know (at fftw@fftw.org). + + Only declarations should go in this file. Any function definitions + that you need should go into timer.c. + */ + +/* + * define a symbol so that we know that we have the fftw_time_diff + * function/macro (it did not exist prior to FFTW 1.2) + */ +#define FFTW_HAS_TIME_DIFF + +/********************************************** + * SOLARIS + **********************************************/ +#if defined(HAVE_GETHRTIME) && defined(HAVE_HRTIME_T) + +/* we use the nanosecond virtual timer */ +#ifdef HAVE_SYS_TIME_H +#include +#endif + +typedef hrtime_t fftw_time; + +#define fftw_get_time() gethrtime() +#define fftw_time_diff(t1,t2) ((t1) - (t2)) +#define fftw_time_to_sec(t) ((double) t / 1.0e9) + +/* + * a measurement is valid if it runs for at least + * FFTW_TIME_MIN seconds. + */ +#define FFTW_TIME_MIN (1.0e-4) /* for Solaris nanosecond timer */ +#define FFTW_TIME_REPEAT 8 + +/********************************************** + * Pentium time stamp counter + **********************************************/ +#elif defined(__GNUC__) && defined(__i386__) && defined(FFTW_ENABLE_PENTIUM_TIMER) + +/* + * Use internal Pentium register (time stamp counter). Resolution + * is 1/FFTW_CYCLES_PER_SEC seconds (e.g. 5 ns for Pentium 200 MHz). + * (This code was contributed by Wolfgang Reimer) + */ + +#ifndef FFTW_CYCLES_PER_SEC +#error "Must define FFTW_CYCLES_PER_SEC in fftw/config.h to use the Pentium cycle counter" +#endif + +typedef unsigned long long fftw_time; + +static __inline__ fftw_time read_tsc() +{ + fftw_time ret; + + __asm__ __volatile__("rdtsc": "=A" (ret)); + /* no input, nothing else clobbered */ + return ret; +} + +#define fftw_get_time() read_tsc() +#define fftw_time_diff(t1,t2) ((t1) - (t2)) +#define fftw_time_to_sec(t) (((double) (t)) / FFTW_CYCLES_PER_SEC) +#define FFTW_TIME_MIN (1.0e-4) /* for Pentium TSC register */ + +/************* generic systems having gettimeofday ************/ +#elif defined(HAVE_GETTIMEOFDAY) || defined(HAVE_BSDGETTIMEOFDAY) +#ifdef HAVE_SYS_TIME_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif +#define FFTW_USE_GETTIMEOFDAY + +typedef struct timeval fftw_time; + +extern fftw_time fftw_gettimeofday_get_time(void); +extern fftw_time fftw_gettimeofday_time_diff(fftw_time t1, fftw_time t2); +#define fftw_get_time() fftw_gettimeofday_get_time() +#define fftw_time_diff(t1, t2) fftw_gettimeofday_time_diff(t1, t2) +#define fftw_time_to_sec(t) ((double)(t).tv_sec + (double)(t).tv_usec * 1.0E-6) + +#ifndef FFTW_TIME_MIN +/* this should be fine on any system claiming a microsecond timer */ +#define FFTW_TIME_MIN (1.0e-2) +#endif + +/********************************************** + * MACINTOSH + **********************************************/ +#elif defined(HAVE_MAC_TIMER) + +/* + * By default, use the microsecond-timer in the Mac Time Manager. + * Alternatively, by changing the following #if 1 to #if 0, you + * can use the nanosecond timer available *only* on PCI PowerMacs. + * WARNING: the nanosecond timer was just a little experiment; + * I haven't gotten it to work reliably. Tips/patches are welcome. + */ +#ifndef HAVE_MAC_PCI_TIMER /* use time manager */ + +/* + * Use Macintosh Time Manager routines (maximum resolution is about 20 + * microseconds). + */ +typedef struct fftw_time_struct { + unsigned long hi, lo; +} fftw_time; + +extern fftw_time get_Mac_microseconds(void); + +#define fftw_get_time() get_Mac_microseconds() + +/* define as a function instead of a macro: */ +extern fftw_time fftw_time_diff(fftw_time t1, fftw_time t2); + +#define fftw_time_to_sec(t) ((t).lo * 1.0e-6 + 4294967295.0e-6 * (t).hi) + +/* very conservative, since timer should be accurate to 20e-6: */ +/* (although this seems not to be the case in practice) */ +#define FFTW_TIME_MIN (5.0e-2) /* for MacOS Time Manager timer */ + +#else /* use nanosecond timer */ + +/* Use the nanosecond timer available on PCI PowerMacs. */ + +#include + +typedef AbsoluteTime fftw_time; +#define fftw_get_time() UpTime() +#define fftw_time_diff(t1,t2) SubAbsoluteFromAbsolute(t1,t2) +#define fftw_time_to_sec(t) (AbsoluteToNanoseconds(t).lo * 1.0e-9) + +/* Extremely conservative minimum time: */ +/* for MacOS PCI PowerMac nanosecond timer */ +#define FFTW_TIME_MIN (5.0e-3) + +#endif /* use nanosecond timer */ + +/********************************************** + * WINDOWS + **********************************************/ +#elif defined(HAVE_WIN32_TIMER) + +#include + +typedef unsigned long fftw_time; +extern unsigned long GetPerfTime(void); +extern double GetPerfSec(double ticks); + +#define fftw_get_time() GetPerfTime() +#define fftw_time_diff(t1,t2) ((t1) - (t2)) +#define fftw_time_to_sec(t) GetPerfSec(t) + +#define FFTW_TIME_MIN (5.0e-2) /* for Win32 timer */ + +/********************************************** + * CRAY + **********************************************/ +#elif defined(_CRAYMPP) /* Cray MPP system */ + +double SECONDR(void); /* + * I think you have to link with -lsci to + * get this + */ + +typedef double fftw_time; +#define fftw_get_time() SECONDR() +#define fftw_time_diff(t1,t2) ((t1) - (t2)) +#define fftw_time_to_sec(t) (t) + +#define FFTW_TIME_MIN (1.0e-1) /* for Cray MPP SECONDR timer */ + +/********************************************** + * VANILLA UNIX/ISO C SYSTEMS + **********************************************/ +/* last resort: use good old Unix clock() */ +#else + +#include + +typedef clock_t fftw_time; + +#ifndef CLOCKS_PER_SEC +#ifdef sun +/* stupid sunos4 prototypes */ +#define CLOCKS_PER_SEC 1000000 +extern long clock(void); +#else /* not sun, we don't know CLOCKS_PER_SEC */ +#error Please define CLOCKS_PER_SEC +#endif +#endif + +#define fftw_get_time() clock() +#define fftw_time_diff(t1,t2) ((t1) - (t2)) +#define fftw_time_to_sec(t) (((double) (t)) / CLOCKS_PER_SEC) + +/* + * ***VERY*** conservative constant: this says that a + * measurement must run for 200ms in order to be valid. + * You had better check the manual of your machine + * to discover if it can do better than this + */ +#define FFTW_TIME_MIN (2.0e-1) /* for default clock() timer */ + +#endif /* UNIX clock() */ + +/* take FFTW_TIME_REPEAT measurements... */ +#ifndef FFTW_TIME_REPEAT +#define FFTW_TIME_REPEAT 4 +#endif + +/* but do not run for more than TIME_LIMIT seconds while measuring one FFT */ +#ifndef FFTW_TIME_LIMIT +#define FFTW_TIME_LIMIT 2.0 +#endif + +#ifdef __cplusplus +} /* extern "C" */ + +#endif /* __cplusplus */ + +#endif /* FFTW_INT_H */ diff --git a/src/sndobj/rfftw/fftw.h b/src/sndobj/rfftw/fftw.h new file mode 100644 index 0000000..41af839 --- /dev/null +++ b/src/sndobj/rfftw/fftw.h @@ -0,0 +1,425 @@ +/* -*- C -*- */ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* fftw.h -- system-wide definitions */ +/* $Id: fftw.h,v 1.1 2007/01/05 19:26:43 veplaini Exp $ */ + +#ifndef FFTW_H +#define FFTW_H + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/* Define for using single precision */ +/* + * If you can, use configure --enable-float instead of changing this + * flag directly + */ +/* #undef FFTW_ENABLE_FLOAT*/ +//#define FFTW_ENABLE_FLOAT + +/* our real numbers */ +#ifdef FFTW_ENABLE_FLOAT +typedef float fftw_real; +#else +typedef double fftw_real; +#endif + +/********************************************* + * Complex numbers and operations + *********************************************/ +typedef struct { + fftw_real re, im; +} fftw_complex; + +#define c_re(c) ((c).re) +#define c_im(c) ((c).im) + +typedef enum { + FFTW_FORWARD = -1, FFTW_BACKWARD = 1 +} fftw_direction; + +/* backward compatibility with FFTW-1.3 */ +typedef fftw_complex FFTW_COMPLEX; +typedef fftw_real FFTW_REAL; + +#ifndef FFTW_1_0_COMPATIBILITY +#define FFTW_1_0_COMPATIBILITY 0 +#endif + +#if FFTW_1_0_COMPATIBILITY +/* backward compatibility with FFTW-1.0 */ +#define REAL fftw_real +#define COMPLEX fftw_complex +#endif + +/********************************************* + * Success or failure status + *********************************************/ + +typedef enum { + FFTW_SUCCESS = 0, FFTW_FAILURE = -1 +} fftw_status; + +/********************************************* + * Codelets + *********************************************/ +typedef void (fftw_notw_codelet) + (const fftw_complex *, fftw_complex *, int, int); +typedef void (fftw_twiddle_codelet) + (fftw_complex *, const fftw_complex *, int, + int, int); +typedef void (fftw_generic_codelet) + (fftw_complex *, const fftw_complex *, int, + int, int, int); +typedef void (fftw_real2hc_codelet) + (const fftw_real *, fftw_real *, fftw_real *, + int, int, int); +typedef void (fftw_hc2real_codelet) + (const fftw_real *, const fftw_real *, + fftw_real *, int, int, int); +typedef void (fftw_hc2hc_codelet) + (fftw_real *, const fftw_complex *, + int, int, int); +typedef void (fftw_rgeneric_codelet) + (fftw_real *, const fftw_complex *, int, + int, int, int); + +/********************************************* + * Configurations + *********************************************/ +/* + * A configuration is a database of all known codelets + */ + +enum fftw_node_type { + FFTW_NOTW, FFTW_TWIDDLE, FFTW_GENERIC, FFTW_RADER, + FFTW_REAL2HC, FFTW_HC2REAL, FFTW_HC2HC, FFTW_RGENERIC +}; + +/* description of a codelet */ +typedef struct { + const char *name; /* name of the codelet */ + void (*codelet) (); /* pointer to the codelet itself */ + int size; /* size of the codelet */ + fftw_direction dir; /* direction */ + enum fftw_node_type type; /* TWIDDLE or NO_TWIDDLE */ + int signature; /* unique id */ + int ntwiddle; /* number of twiddle factors */ + const int *twiddle_order; /* + * array that determines the order + * in which the codelet expects + * the twiddle factors + */ +} fftw_codelet_desc; + +/* On Win32, you need to do funny things to access global variables + in shared libraries. Thanks to Andrew Sterian for this hack. */ +#ifdef HAVE_WIN32 +# if defined(BUILD_FFTW_DLL) +# define DL_IMPORT(type) __declspec(dllexport) type +# elif defined(USE_FFTW_DLL) +# define DL_IMPORT(type) __declspec(dllimport) type +# else +# define DL_IMPORT(type) type +# endif +#else +#ifndef SWIGPYTHON +# define DL_IMPORT(type) type +#endif +#endif + +extern DL_IMPORT(const char *) fftw_version; + +/***************************** + * Plans + *****************************/ +/* + * A plan is a sequence of reductions to compute a FFT of + * a given size. At each step, the FFT algorithm can: + * + * 1) apply a notw codelet, or + * 2) recurse and apply a twiddle codelet, or + * 3) apply the generic codelet. + */ + +/* structure that contains twiddle factors */ +typedef struct fftw_twiddle_struct { + int n; + const fftw_codelet_desc *cdesc; + fftw_complex *twarray; + struct fftw_twiddle_struct *next; + int refcnt; +} fftw_twiddle; + +typedef struct fftw_rader_data_struct { + struct fftw_plan_struct *plan; + fftw_complex *omega; + int g, ginv; + int p, flags, refcount; + struct fftw_rader_data_struct *next; + fftw_codelet_desc *cdesc; +} fftw_rader_data; + +typedef void (fftw_rader_codelet) + (fftw_complex *, const fftw_complex *, int, + int, int, fftw_rader_data *); + +/* structure that holds all the data needed for a given step */ +typedef struct fftw_plan_node_struct { + enum fftw_node_type type; + + union { + /* nodes of type FFTW_NOTW */ + struct { + int size; + fftw_notw_codelet *codelet; + const fftw_codelet_desc *codelet_desc; + } notw; + + /* nodes of type FFTW_TWIDDLE */ + struct { + int size; + fftw_twiddle_codelet *codelet; + fftw_twiddle *tw; + struct fftw_plan_node_struct *recurse; + const fftw_codelet_desc *codelet_desc; + } twiddle; + + /* nodes of type FFTW_GENERIC */ + struct { + int size; + fftw_generic_codelet *codelet; + fftw_twiddle *tw; + struct fftw_plan_node_struct *recurse; + } generic; + + /* nodes of type FFTW_RADER */ + struct { + int size; + fftw_rader_codelet *codelet; + fftw_rader_data *rader_data; + fftw_twiddle *tw; + struct fftw_plan_node_struct *recurse; + } rader; + + /* nodes of type FFTW_REAL2HC */ + struct { + int size; + fftw_real2hc_codelet *codelet; + const fftw_codelet_desc *codelet_desc; + } real2hc; + + /* nodes of type FFTW_HC2REAL */ + struct { + int size; + fftw_hc2real_codelet *codelet; + const fftw_codelet_desc *codelet_desc; + } hc2real; + + /* nodes of type FFTW_HC2HC */ + struct { + int size; + fftw_direction dir; + fftw_hc2hc_codelet *codelet; + fftw_twiddle *tw; + struct fftw_plan_node_struct *recurse; + const fftw_codelet_desc *codelet_desc; + } hc2hc; + + /* nodes of type FFTW_RGENERIC */ + struct { + int size; + fftw_direction dir; + fftw_rgeneric_codelet *codelet; + fftw_twiddle *tw; + struct fftw_plan_node_struct *recurse; + } rgeneric; + } nodeu; + + int refcnt; +} fftw_plan_node; + +typedef enum { + FFTW_NORMAL_RECURSE = 0, + FFTW_VECTOR_RECURSE = 1 +} fftw_recurse_kind; + +struct fftw_plan_struct { + int n; + int refcnt; + fftw_direction dir; + int flags; + int wisdom_signature; + enum fftw_node_type wisdom_type; + struct fftw_plan_struct *next; + fftw_plan_node *root; + double cost; + fftw_recurse_kind recurse_kind; + int vector_size; +}; + +typedef struct fftw_plan_struct *fftw_plan; + +/* flags for the planner */ +#define FFTW_ESTIMATE (0) +#define FFTW_MEASURE (1) + +#define FFTW_OUT_OF_PLACE (0) +#define FFTW_IN_PLACE (8) +#define FFTW_USE_WISDOM (16) + +#define FFTW_THREADSAFE (128) /* guarantee plan is read-only so that the + same plan can be used in parallel by + multiple threads */ + +#define FFTWND_FORCE_BUFFERED (256) /* internal flag, forces buffering + in fftwnd transforms */ + +#define FFTW_NO_VECTOR_RECURSE (512) /* internal flag, prevents use + of vector recursion */ + +extern fftw_plan fftw_create_plan_specific(int n, fftw_direction dir, + int flags, + fftw_complex *in, int istride, + fftw_complex *out, int ostride); +#define FFTW_HAS_PLAN_SPECIFIC +extern fftw_plan fftw_create_plan(int n, fftw_direction dir, int flags); +extern void fftw_print_plan(fftw_plan plan); +extern void fftw_destroy_plan(fftw_plan plan); +extern void fftw(fftw_plan plan, int howmany, fftw_complex *in, int istride, + int idist, fftw_complex *out, int ostride, int odist); +extern void fftw_one(fftw_plan plan, fftw_complex *in, fftw_complex *out); +extern void fftw_die(const char *s); +extern void *fftw_malloc(size_t n); +extern void fftw_free(void *p); +extern void fftw_check_memory_leaks(void); +extern void fftw_print_max_memory_usage(void); + +typedef void *(*fftw_malloc_type_function) (size_t n); +typedef void (*fftw_free_type_function) (void *p); +typedef void (*fftw_die_type_function) (const char *errString); +extern DL_IMPORT(fftw_malloc_type_function) fftw_malloc_hook; +extern DL_IMPORT(fftw_free_type_function) fftw_free_hook; +extern DL_IMPORT(fftw_die_type_function) fftw_die_hook; + +extern size_t fftw_sizeof_fftw_real(void); + +/* Wisdom: */ +/* + * define this symbol so that users know we are using a version of FFTW + * with wisdom + */ +#define FFTW_HAS_WISDOM +extern void fftw_forget_wisdom(void); +extern void fftw_export_wisdom(void (*emitter) (char c, void *), void *data); +extern fftw_status fftw_import_wisdom(int (*g) (void *), void *data); +extern void fftw_export_wisdom_to_file(FILE *output_file); +extern fftw_status fftw_import_wisdom_from_file(FILE *input_file); +extern char *fftw_export_wisdom_to_string(void); +extern fftw_status fftw_import_wisdom_from_string(const char *input_string); + +/* + * define symbol so we know this function is available (it is not in + * older FFTWs) + */ +#define FFTW_HAS_FPRINT_PLAN +extern void fftw_fprint_plan(FILE *f, fftw_plan plan); + +/***************************** + * N-dimensional code + *****************************/ +typedef struct { + int is_in_place; /* 1 if for in-place FFTs, 0 otherwise */ + + int rank; /* + * the rank (number of dimensions) of the + * array to be FFTed + */ + int *n; /* + * the dimensions of the array to the + * FFTed + */ + fftw_direction dir; + + int *n_before; /* + * n_before[i] = product of n[j] for j < i + */ + int *n_after; /* n_after[i] = product of n[j] for j > i */ + + fftw_plan *plans; /* 1d fftw plans for each dimension */ + + int nbuffers, nwork; + fftw_complex *work; /* + * work array big enough to hold + * nbuffers+1 of the largest dimension + * (has nwork elements) + */ +} fftwnd_data; + +typedef fftwnd_data *fftwnd_plan; + +/* Initializing the FFTWND plan: */ +extern fftwnd_plan fftw2d_create_plan(int nx, int ny, fftw_direction dir, + int flags); +extern fftwnd_plan fftw3d_create_plan(int nx, int ny, int nz, + fftw_direction dir, int flags); +extern fftwnd_plan fftwnd_create_plan(int rank, const int *n, + fftw_direction dir, + int flags); + +extern fftwnd_plan fftw2d_create_plan_specific(int nx, int ny, + fftw_direction dir, + int flags, + fftw_complex *in, int istride, + fftw_complex *out, int ostride); +extern fftwnd_plan fftw3d_create_plan_specific(int nx, int ny, int nz, + fftw_direction dir, int flags, + fftw_complex *in, int istride, + fftw_complex *out, int ostride); +extern fftwnd_plan fftwnd_create_plan_specific(int rank, const int *n, + fftw_direction dir, + int flags, + fftw_complex *in, int istride, + fftw_complex *out, int ostride); + +/* Freeing the FFTWND plan: */ +extern void fftwnd_destroy_plan(fftwnd_plan plan); + +/* Printing the plan: */ +extern void fftwnd_fprint_plan(FILE *f, fftwnd_plan p); +extern void fftwnd_print_plan(fftwnd_plan p); +#define FFTWND_HAS_PRINT_PLAN + +/* Computing the N-Dimensional FFT */ +extern void fftwnd(fftwnd_plan plan, int howmany, + fftw_complex *in, int istride, int idist, + fftw_complex *out, int ostride, int odist); +extern void fftwnd_one(fftwnd_plan p, fftw_complex *in, fftw_complex *out); + +#ifdef __cplusplus +} /* extern "C" */ + +#endif /* __cplusplus */ +#endif /* FFTW_H */ diff --git a/src/sndobj/rfftw/fftwnd.c b/src/sndobj/rfftw/fftwnd.c new file mode 100644 index 0000000..83bd7c8 --- /dev/null +++ b/src/sndobj/rfftw/fftwnd.c @@ -0,0 +1,780 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* $Id: fftwnd.c,v 1.1.1.1 2006/05/12 15:14:56 veplaini Exp $ */ + +#include + +/* the number of buffers to use for buffered transforms: */ +#define FFTWND_NBUFFERS 8 + +/* the default number of buffers to use: */ +#define FFTWND_DEFAULT_NBUFFERS 0 + +/* the number of "padding" elements between consecutive buffer lines */ +#define FFTWND_BUFFER_PADDING 8 + +static void destroy_plan_array(int rank, fftw_plan *plans); + +static void init_test_array(fftw_complex *arr, int stride, int n) +{ + int j; + + for (j = 0; j < n; ++j) { + c_re(arr[stride * j]) = 0.0; + c_im(arr[stride * j]) = 0.0; + } +} + +/* + * Same as fftw_measure_runtime, except for fftwnd plan. + */ +double fftwnd_measure_runtime(fftwnd_plan plan, + fftw_complex *in, int istride, + fftw_complex *out, int ostride) +{ + fftw_time begin, end, start; + double t, tmax, tmin; + int i, iter; + int n; + int repeat; + + if (plan->rank == 0) + return 0.0; + + n = 1; + for (i = 0; i < plan->rank; ++i) + n *= plan->n[i]; + + iter = 1; + + for (;;) { + tmin = 1.0E10; + tmax = -1.0E10; + init_test_array(in, istride, n); + + start = fftw_get_time(); + /* repeat the measurement FFTW_TIME_REPEAT times */ + for (repeat = 0; repeat < FFTW_TIME_REPEAT; ++repeat) { + begin = fftw_get_time(); + for (i = 0; i < iter; ++i) { + fftwnd(plan, 1, in, istride, 0, out, ostride, 0); + } + end = fftw_get_time(); + + t = fftw_time_to_sec(fftw_time_diff(end, begin)); + if (t < tmin) + tmin = t; + if (t > tmax) + tmax = t; + + /* do not run for too long */ + t = fftw_time_to_sec(fftw_time_diff(end, start)); + if (t > FFTW_TIME_LIMIT) + break; + } + + if (tmin >= FFTW_TIME_MIN) + break; + + iter *= 2; + } + + tmin /= (double) iter; + tmax /= (double) iter; + + return tmin; +} + +/********************** Initializing the FFTWND Plan ***********************/ + +/* Initialize everything except for the 1D plans and the work array: */ +fftwnd_plan fftwnd_create_plan_aux(int rank, const int *n, + fftw_direction dir, int flags) +{ + int i; + fftwnd_plan p; + + if (rank < 0) + return 0; + + for (i = 0; i < rank; ++i) + if (n[i] <= 0) + return 0; + + p = (fftwnd_plan) fftw_malloc(sizeof(fftwnd_data)); + p->n = 0; + p->n_before = 0; + p->n_after = 0; + p->plans = 0; + p->work = 0; + p->dir = dir; + + p->rank = rank; + p->is_in_place = flags & FFTW_IN_PLACE; + + p->nwork = 0; + p->nbuffers = 0; + + if (rank == 0) + return 0; + + p->n = (int *) fftw_malloc(sizeof(int) * rank); + p->n_before = (int *) fftw_malloc(sizeof(int) * rank); + p->n_after = (int *) fftw_malloc(sizeof(int) * rank); + p->n_before[0] = 1; + p->n_after[rank - 1] = 1; + + for (i = 0; i < rank; ++i) { + p->n[i] = n[i]; + + if (i) { + p->n_before[i] = p->n_before[i - 1] * n[i - 1]; + p->n_after[rank - 1 - i] = p->n_after[rank - i] * n[rank - i]; + } + } + + return p; +} + +/* create an empty new array of rank 1d plans */ +fftw_plan *fftwnd_new_plan_array(int rank) +{ + fftw_plan *plans; + int i; + + plans = (fftw_plan *) fftw_malloc(rank * sizeof(fftw_plan)); + if (!plans) + return 0; + for (i = 0; i < rank; ++i) + plans[i] = 0; + return plans; +} + +/* + * create an array of plans using the ordinary 1d fftw_create_plan, + * which allocates its own array and creates plans optimized for + * contiguous data. + */ +fftw_plan *fftwnd_create_plans_generic(fftw_plan *plans, + int rank, const int *n, + fftw_direction dir, int flags) +{ + if (rank <= 0) + return 0; + + if (plans) { + int i, j; + int cur_flags; + + for (i = 0; i < rank; ++i) { + if (i < rank - 1 || (flags & FFTW_IN_PLACE)) { + /* + * fft's except the last dimension are always in-place + */ + cur_flags = flags | FFTW_IN_PLACE; + for (j = i - 1; j >= 0 && n[i] != n[j]; --j); + } else { + cur_flags = flags; + /* + * we must create a separate plan for the last + * dimension + */ + j = -1; + } + + if (j >= 0) { + /* + * If a plan already exists for this size + * array, reuse it: + */ + plans[i] = plans[j]; + } else { + /* generate a new plan: */ + plans[i] = fftw_create_plan(n[i], dir, cur_flags); + if (!plans[i]) { + destroy_plan_array(rank, plans); + return 0; + } + } + } + } + return plans; +} + +static int get_maxdim(int rank, const int *n, int flags) +{ + int i; + int maxdim = 0; + + for (i = 0; i < rank - 1; ++i) + if (n[i] > maxdim) + maxdim = n[i]; + if (rank > 0 && flags & FFTW_IN_PLACE && n[rank - 1] > maxdim) + maxdim = n[rank - 1]; + + return maxdim; +} + +/* compute number of elements required for work array (has to + be big enough to hold ncopies of the largest dimension in + n that will need an in-place transform. */ +int fftwnd_work_size(int rank, const int *n, int flags, int ncopies) +{ + return (ncopies * get_maxdim(rank, n, flags) + + (ncopies - 1) * FFTWND_BUFFER_PADDING); +} + +/* + * create plans using the fftw_create_plan_specific planner, which + * allows us to create plans for each dimension that are specialized + * for the strides that we are going to use. + */ +fftw_plan *fftwnd_create_plans_specific(fftw_plan *plans, + int rank, const int *n, + const int *n_after, + fftw_direction dir, int flags, + fftw_complex *in, int istride, + fftw_complex *out, int ostride) +{ + if (rank <= 0) + return 0; + + if (plans) { + int i, stride, cur_flags; + fftw_complex *work = 0; + int nwork; + + nwork = fftwnd_work_size(rank, n, flags, 1); + if (nwork) + work = (fftw_complex*)fftw_malloc(nwork * sizeof(fftw_complex)); + + for (i = 0; i < rank; ++i) { + /* fft's except the last dimension are always in-place */ + if (i < rank - 1) + cur_flags = flags | FFTW_IN_PLACE; + else + cur_flags = flags; + + /* stride for transforming ith dimension */ + stride = n_after[i]; + + if (cur_flags & FFTW_IN_PLACE) + plans[i] = fftw_create_plan_specific(n[i], dir, cur_flags, + in, istride * stride, + work, 1); + else + plans[i] = fftw_create_plan_specific(n[i], dir, cur_flags, + in, istride * stride, + out, ostride * stride); + if (!plans[i]) { + destroy_plan_array(rank, plans); + fftw_free(work); + return 0; + } + } + + if (work) + fftw_free(work); + } + return plans; +} + +/* + * Create an fftwnd_plan specialized for specific arrays. (These + * arrays are ignored, however, if they are NULL or if the flags do + * not include FFTW_MEASURE.) The main advantage of being provided + * arrays like this is that we can do runtime timing measurements of + * our options, without worrying about allocating excessive scratch + * space. + */ +fftwnd_plan fftwnd_create_plan_specific(int rank, const int *n, + fftw_direction dir, int flags, + fftw_complex *in, int istride, + fftw_complex *out, int ostride) +{ + fftwnd_plan p; + + if (!(p = fftwnd_create_plan_aux(rank, n, dir, flags))) + return 0; + + if (!(flags & FFTW_MEASURE) || in == 0 + || (!p->is_in_place && out == 0)) { + +/**** use default plan ****/ + + p->plans = fftwnd_create_plans_generic(fftwnd_new_plan_array(rank), + rank, n, dir, flags); + if (!p->plans) { + fftwnd_destroy_plan(p); + return 0; + } + if (flags & FFTWND_FORCE_BUFFERED) + p->nbuffers = FFTWND_NBUFFERS; + else + p->nbuffers = FFTWND_DEFAULT_NBUFFERS; + + p->nwork = fftwnd_work_size(rank, n, flags, p->nbuffers + 1); + if (p->nwork && !(flags & FFTW_THREADSAFE)) { + p->work = (fftw_complex*) fftw_malloc(p->nwork + * sizeof(fftw_complex)); + if (!p->work) { + fftwnd_destroy_plan(p); + return 0; + } + } + } else { +/**** use runtime measurements to pick plan ****/ + + fftw_plan *plans_buf, *plans_nobuf; + double t_buf, t_nobuf; + + p->nwork = fftwnd_work_size(rank, n, flags, FFTWND_NBUFFERS + 1); + if (p->nwork && !(flags & FFTW_THREADSAFE)) { + p->work = (fftw_complex*) fftw_malloc(p->nwork + * sizeof(fftw_complex)); + if (!p->work) { + fftwnd_destroy_plan(p); + return 0; + } + } + else + p->work = (fftw_complex*) NULL; + + /* two possible sets of 1D plans: */ + plans_buf = fftwnd_create_plans_generic(fftwnd_new_plan_array(rank), + rank, n, dir, flags); + plans_nobuf = + fftwnd_create_plans_specific(fftwnd_new_plan_array(rank), + rank, n, p->n_after, dir, + flags, in, istride, + out, ostride); + if (!plans_buf || !plans_nobuf) { + destroy_plan_array(rank, plans_nobuf); + destroy_plan_array(rank, plans_buf); + fftwnd_destroy_plan(p); + return 0; + } + /* time the two possible plans */ + p->plans = plans_nobuf; + p->nbuffers = 0; + p->nwork = fftwnd_work_size(rank, n, flags, p->nbuffers + 1); + t_nobuf = fftwnd_measure_runtime(p, in, istride, out, ostride); + p->plans = plans_buf; + p->nbuffers = FFTWND_NBUFFERS; + p->nwork = fftwnd_work_size(rank, n, flags, p->nbuffers + 1); + t_buf = fftwnd_measure_runtime(p, in, istride, out, ostride); + + /* pick the better one: */ + if (t_nobuf < t_buf) { /* use unbuffered transform */ + p->plans = plans_nobuf; + p->nbuffers = 0; + + /* work array is unnecessarily large */ + if (p->work) + fftw_free(p->work); + p->work = 0; + + destroy_plan_array(rank, plans_buf); + + /* allocate a work array of the correct size: */ + p->nwork = fftwnd_work_size(rank, n, flags, p->nbuffers + 1); + if (p->nwork && !(flags & FFTW_THREADSAFE)) { + p->work = (fftw_complex*) fftw_malloc(p->nwork + * sizeof(fftw_complex)); + if (!p->work) { + fftwnd_destroy_plan(p); + return 0; + } + } + } else { /* use buffered transform */ + destroy_plan_array(rank, plans_nobuf); + } + } + + return p; +} + +fftwnd_plan fftw2d_create_plan_specific(int nx, int ny, + fftw_direction dir, int flags, + fftw_complex *in, int istride, + fftw_complex *out, int ostride) +{ + int n[2]; + + n[0] = nx; + n[1] = ny; + + return fftwnd_create_plan_specific(2, n, dir, flags, + in, istride, out, ostride); +} + +fftwnd_plan fftw3d_create_plan_specific(int nx, int ny, int nz, + fftw_direction dir, int flags, + fftw_complex *in, int istride, + fftw_complex *out, int ostride) +{ + int n[3]; + + n[0] = nx; + n[1] = ny; + n[2] = nz; + + return fftwnd_create_plan_specific(3, n, dir, flags, + in, istride, out, ostride); +} + +/* Create a generic fftwnd plan: */ + +fftwnd_plan fftwnd_create_plan(int rank, const int *n, + fftw_direction dir, int flags) +{ + return fftwnd_create_plan_specific(rank, n, dir, flags, 0, 1, 0, 1); +} + +fftwnd_plan fftw2d_create_plan(int nx, int ny, + fftw_direction dir, int flags) +{ + return fftw2d_create_plan_specific(nx, ny, dir, flags, 0, 1, 0, 1); +} + +fftwnd_plan fftw3d_create_plan(int nx, int ny, int nz, + fftw_direction dir, int flags) +{ + return fftw3d_create_plan_specific(nx, ny, nz, dir, flags, 0, 1, 0, 1); +} + +/************************ Freeing the FFTWND Plan ************************/ + +static void destroy_plan_array(int rank, fftw_plan *plans) +{ + if (plans) { + int i, j; + + for (i = 0; i < rank; ++i) { + for (j = i - 1; + j >= 0 && plans[i] != plans[j]; + --j); + if (j < 0 && plans[i]) + fftw_destroy_plan(plans[i]); + } + fftw_free(plans); + } +} + +void fftwnd_destroy_plan(fftwnd_plan plan) +{ + if (plan) { + destroy_plan_array(plan->rank, plan->plans); + + if (plan->n) + fftw_free(plan->n); + + if (plan->n_before) + fftw_free(plan->n_before); + + if (plan->n_after) + fftw_free(plan->n_after); + + if (plan->work) + fftw_free(plan->work); + + fftw_free(plan); + } +} + +/************************ Printing the FFTWND Plan ************************/ + +void fftwnd_fprint_plan(FILE *f, fftwnd_plan plan) +{ + if (plan) { + int i, j; + + if (plan->rank == 0) { + fprintf(f, "plan for rank 0 (null) transform.\n"); + return; + } + fprintf(f, "plan for "); + for (i = 0; i < plan->rank; ++i) + fprintf(f, "%s%d", i ? "x" : "", plan->n[i]); + fprintf(f, " transform:\n"); + + if (plan->nbuffers > 0) + fprintf(f, " -- using buffered transforms (%d buffers)\n", + plan->nbuffers); + else + fprintf(f, " -- using unbuffered transform\n"); + + for (i = 0; i < plan->rank; ++i) { + fprintf(f, "* dimension %d (size %d) ", i, plan->n[i]); + + for (j = i - 1; j >= 0; --j) + if (plan->plans[j] == plan->plans[i]) + break; + + if (j < 0) + fftw_fprint_plan(f, plan->plans[i]); + else + fprintf(f, "plan is same as dimension %d plan.\n", j); + } + } +} + +void fftwnd_print_plan(fftwnd_plan plan) +{ + fftwnd_fprint_plan(stdout, plan); +} + +/********************* Buffered FFTW (in-place) *********************/ + +void fftw_buffered(fftw_plan p, int howmany, + fftw_complex *in, int istride, int idist, + fftw_complex *work, + int nbuffers, fftw_complex *buffers) +{ + int i = 0, n, nb; + + n = p->n; + nb = n + FFTWND_BUFFER_PADDING; + + do { + for (; i <= howmany - nbuffers; i += nbuffers) { + fftw_complex *cur_in = in + i * idist; + int j, buf; + + /* + * First, copy nbuffers strided arrays to the + * contiguous buffer arrays (reading consecutive + * locations, assuming that idist is 1): + */ + for (j = 0; j < n; ++j) { + fftw_complex *cur_in2 = cur_in + j * istride; + fftw_complex *cur_buffers = buffers + j; + + for (buf = 0; buf <= nbuffers - 4; buf += 4) { + *cur_buffers = *cur_in2; + *(cur_buffers += nb) = *(cur_in2 += idist); + *(cur_buffers += nb) = *(cur_in2 += idist); + *(cur_buffers += nb) = *(cur_in2 += idist); + cur_buffers += nb; + cur_in2 += idist; + } + for (; buf < nbuffers; ++buf) { + *cur_buffers = *cur_in2; + cur_buffers += nb; + cur_in2 += idist; + } + } + + /* + * Now, compute the FFTs in the buffers (in-place + * using work): + */ + fftw(p, nbuffers, buffers, 1, nb, work, 1, 0); + + /* + * Finally, copy the results back from the contiguous + * buffers to the strided arrays (writing consecutive + * locations): + */ + for (j = 0; j < n; ++j) { + fftw_complex *cur_in2 = cur_in + j * istride; + fftw_complex *cur_buffers = buffers + j; + + for (buf = 0; buf <= nbuffers - 4; buf += 4) { + *cur_in2 = *cur_buffers; + *(cur_in2 += idist) = *(cur_buffers += nb); + *(cur_in2 += idist) = *(cur_buffers += nb); + *(cur_in2 += idist) = *(cur_buffers += nb); + cur_buffers += nb; + cur_in2 += idist; + } + for (; buf < nbuffers; ++buf) { + *cur_in2 = *cur_buffers; + cur_buffers += nb; + cur_in2 += idist; + } + } + } + + /* + * we skip howmany % nbuffers ffts at the end of the loop, + * so we have to go back and do them: + */ + nbuffers = howmany - i; + } while (i < howmany); +} + +/********************* Computing the N-Dimensional FFT *********************/ + +void fftwnd_aux(fftwnd_plan p, int cur_dim, + fftw_complex *in, int istride, + fftw_complex *out, int ostride, + fftw_complex *work) +{ + int n_after = p->n_after[cur_dim], n = p->n[cur_dim]; + + if (cur_dim == p->rank - 2) { + /* just do the last dimension directly: */ + if (p->is_in_place) + fftw(p->plans[p->rank - 1], n, + in, istride, n_after * istride, + work, 1, 0); + else + fftw(p->plans[p->rank - 1], n, + in, istride, n_after * istride, + out, ostride, n_after * ostride); + } else { /* we have at least two dimensions to go */ + int i; + + /* + * process the subsequent dimensions recursively, in hyperslabs, + * to get maximum locality: + */ + for (i = 0; i < n; ++i) + fftwnd_aux(p, cur_dim + 1, + in + i * n_after * istride, istride, + out + i * n_after * ostride, ostride, work); + } + + /* do the current dimension (in-place): */ + if (p->nbuffers == 0) { + fftw(p->plans[cur_dim], n_after, + out, n_after * ostride, ostride, + work, 1, 0); + } else /* using contiguous copy buffers: */ + fftw_buffered(p->plans[cur_dim], n_after, + out, n_after * ostride, ostride, + work, p->nbuffers, work + n); +} + +/* + * alternate version of fftwnd_aux -- this version pushes the howmany + * loop down to the leaves of the computation, for greater locality in + * cases where dist < stride + */ +void fftwnd_aux_howmany(fftwnd_plan p, int cur_dim, + int howmany, + fftw_complex *in, int istride, int idist, + fftw_complex *out, int ostride, int odist, + fftw_complex *work) +{ + int n_after = p->n_after[cur_dim], n = p->n[cur_dim]; + int k; + + if (cur_dim == p->rank - 2) { + /* just do the last dimension directly: */ + if (p->is_in_place) + for (k = 0; k < n; ++k) + fftw(p->plans[p->rank - 1], howmany, + in + k * n_after * istride, istride, idist, + work, 1, 0); + else + for (k = 0; k < n; ++k) + fftw(p->plans[p->rank - 1], howmany, + in + k * n_after * istride, istride, idist, + out + k * n_after * ostride, ostride, odist); + } else { /* we have at least two dimensions to go */ + int i; + + /* + * process the subsequent dimensions recursively, in + * hyperslabs, to get maximum locality: + */ + for (i = 0; i < n; ++i) + fftwnd_aux_howmany(p, cur_dim + 1, howmany, + in + i * n_after * istride, istride, idist, + out + i * n_after * ostride, ostride, odist, + work); + } + + /* do the current dimension (in-place): */ + if (p->nbuffers == 0) + for (k = 0; k < n_after; ++k) + fftw(p->plans[cur_dim], howmany, + out + k * ostride, n_after * ostride, odist, + work, 1, 0); + else /* using contiguous copy buffers: */ + for (k = 0; k < n_after; ++k) + fftw_buffered(p->plans[cur_dim], howmany, + out + k * ostride, n_after * ostride, odist, + work, p->nbuffers, work + n); +} + +void fftwnd(fftwnd_plan p, int howmany, + fftw_complex *in, int istride, int idist, + fftw_complex *out, int ostride, int odist) +{ + fftw_complex *work; + +#ifdef FFTW_DEBUG + if (p->rank > 0 && (p->plans[0]->flags & FFTW_THREADSAFE) + && p->nwork && p->work) + fftw_die("bug with FFTW_THREADSAFE flag\n"); +#endif + + if (p->nwork && !p->work) + work = (fftw_complex *) fftw_malloc(p->nwork * sizeof(fftw_complex)); + else + work = p->work; + + switch (p->rank) { + case 0: + break; + case 1: + if (p->is_in_place) /* fft is in-place */ + fftw(p->plans[0], howmany, in, istride, idist, + work, 1, 0); + else + fftw(p->plans[0], howmany, in, istride, idist, + out, ostride, odist); + break; + default: /* rank >= 2 */ + { + if (p->is_in_place) { + out = in; + ostride = istride; + odist = idist; + } + if (howmany > 1 && odist < ostride) + fftwnd_aux_howmany(p, 0, howmany, + in, istride, idist, + out, ostride, odist, + work); + else { + int i; + + for (i = 0; i < howmany; ++i) + fftwnd_aux(p, 0, + in + i * idist, istride, + out + i * odist, ostride, + work); + } + } + } + + if (p->nwork && !p->work) + fftw_free(work); + +} + +void fftwnd_one(fftwnd_plan p, fftw_complex *in, fftw_complex *out) +{ + fftwnd(p, 1, in, 1, 1, out, 1, 1); +} diff --git a/src/sndobj/rfftw/fhb_10.c b/src/sndobj/rfftw/fhb_10.c new file mode 100644 index 0000000..35c615d --- /dev/null +++ b/src/sndobj/rfftw/fhb_10.c @@ -0,0 +1,581 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:45:15 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-backward 10 */ + +/* + * This function contains 168 FP additions, 90 FP multiplications, + * (or, 124 additions, 46 multiplications, 44 fused multiply/add), + * 37 stack variables, and 80 memory accesses + */ +static const fftw_real K250000000 = FFTW_KONST(+0.250000000000000000000000000000000000000000000); +static const fftw_real K951056516 = FFTW_KONST(+0.951056516295153572116439333379382143405698634); +static const fftw_real K587785252 = FFTW_KONST(+0.587785252292473129168705954639072768597652438); +static const fftw_real K559016994 = FFTW_KONST(+0.559016994374947424102293417182819058860154590); +static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); +static const fftw_real K1_902113032 = FFTW_KONST(+1.902113032590307144232878666758764286811397268); +static const fftw_real K1_175570504 = FFTW_KONST(+1.175570504584946258337411909278145537195304875); +static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); +static const fftw_real K1_118033988 = FFTW_KONST(+1.118033988749894848204586834365638117720309180); + +/* + * Generator Id's : + * $Id: fhb_10.c,v 1.1.1.1 2006/05/12 15:15:01 veplaini Exp $ + * $Id: fhb_10.c,v 1.1.1.1 2006/05/12 15:15:01 veplaini Exp $ + * $Id: fhb_10.c,v 1.1.1.1 2006/05/12 15:15:01 veplaini Exp $ + */ + +void fftw_hc2hc_backward_10(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_real *X; + fftw_real *Y; + X = A; + Y = A + (10 * iostride); + { + fftw_real tmp155; + fftw_real tmp163; + fftw_real tmp175; + fftw_real tmp183; + fftw_real tmp172; + fftw_real tmp182; + fftw_real tmp162; + fftw_real tmp180; + fftw_real tmp166; + fftw_real tmp167; + fftw_real tmp170; + fftw_real tmp171; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp153; + fftw_real tmp154; + fftw_real tmp173; + fftw_real tmp174; + ASSERT_ALIGNED_DOUBLE; + tmp153 = X[0]; + tmp154 = X[5 * iostride]; + tmp155 = tmp153 - tmp154; + tmp163 = tmp153 + tmp154; + tmp173 = Y[-4 * iostride]; + tmp174 = Y[-iostride]; + tmp175 = tmp173 - tmp174; + tmp183 = tmp173 + tmp174; + } + tmp170 = Y[-2 * iostride]; + tmp171 = Y[-3 * iostride]; + tmp172 = tmp170 - tmp171; + tmp182 = tmp170 + tmp171; + { + fftw_real tmp158; + fftw_real tmp164; + fftw_real tmp161; + fftw_real tmp165; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp156; + fftw_real tmp157; + fftw_real tmp159; + fftw_real tmp160; + ASSERT_ALIGNED_DOUBLE; + tmp156 = X[2 * iostride]; + tmp157 = X[3 * iostride]; + tmp158 = tmp156 - tmp157; + tmp164 = tmp156 + tmp157; + tmp159 = X[4 * iostride]; + tmp160 = X[iostride]; + tmp161 = tmp159 - tmp160; + tmp165 = tmp159 + tmp160; + } + tmp162 = tmp158 + tmp161; + tmp180 = K1_118033988 * (tmp158 - tmp161); + tmp166 = tmp164 + tmp165; + tmp167 = K1_118033988 * (tmp164 - tmp165); + } + X[5 * iostride] = tmp155 + (K2_000000000 * tmp162); + { + fftw_real tmp184; + fftw_real tmp186; + fftw_real tmp181; + fftw_real tmp185; + fftw_real tmp179; + ASSERT_ALIGNED_DOUBLE; + tmp184 = (K1_175570504 * tmp182) - (K1_902113032 * tmp183); + tmp186 = (K1_902113032 * tmp182) + (K1_175570504 * tmp183); + tmp179 = tmp155 - (K500000000 * tmp162); + tmp181 = tmp179 - tmp180; + tmp185 = tmp179 + tmp180; + X[7 * iostride] = tmp181 - tmp184; + X[3 * iostride] = tmp181 + tmp184; + X[iostride] = tmp185 - tmp186; + X[9 * iostride] = tmp185 + tmp186; + } + X[0] = tmp163 + (K2_000000000 * tmp166); + { + fftw_real tmp176; + fftw_real tmp178; + fftw_real tmp169; + fftw_real tmp177; + fftw_real tmp168; + ASSERT_ALIGNED_DOUBLE; + tmp176 = (K1_902113032 * tmp172) + (K1_175570504 * tmp175); + tmp178 = (K1_902113032 * tmp175) - (K1_175570504 * tmp172); + tmp168 = tmp163 - (K500000000 * tmp166); + tmp169 = tmp167 + tmp168; + tmp177 = tmp168 - tmp167; + X[4 * iostride] = tmp169 + tmp176; + X[6 * iostride] = tmp169 - tmp176; + X[8 * iostride] = tmp177 - tmp178; + X[2 * iostride] = tmp177 + tmp178; + } + } + X = X + dist; + Y = Y - dist; + for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 9) { + fftw_real tmp35; + fftw_real tmp102; + fftw_real tmp77; + fftw_real tmp112; + fftw_real tmp72; + fftw_real tmp73; + fftw_real tmp50; + fftw_real tmp53; + fftw_real tmp123; + fftw_real tmp122; + fftw_real tmp109; + fftw_real tmp131; + fftw_real tmp61; + fftw_real tmp68; + fftw_real tmp80; + fftw_real tmp82; + fftw_real tmp134; + fftw_real tmp133; + fftw_real tmp119; + fftw_real tmp126; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp33; + fftw_real tmp34; + fftw_real tmp75; + fftw_real tmp76; + ASSERT_ALIGNED_DOUBLE; + tmp33 = X[0]; + tmp34 = Y[-5 * iostride]; + tmp35 = tmp33 + tmp34; + tmp102 = tmp33 - tmp34; + tmp75 = Y[0]; + tmp76 = X[5 * iostride]; + tmp77 = tmp75 - tmp76; + tmp112 = tmp75 + tmp76; + } + { + fftw_real tmp38; + fftw_real tmp103; + fftw_real tmp48; + fftw_real tmp107; + fftw_real tmp41; + fftw_real tmp104; + fftw_real tmp45; + fftw_real tmp106; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp36; + fftw_real tmp37; + fftw_real tmp46; + fftw_real tmp47; + ASSERT_ALIGNED_DOUBLE; + tmp36 = X[2 * iostride]; + tmp37 = Y[-7 * iostride]; + tmp38 = tmp36 + tmp37; + tmp103 = tmp36 - tmp37; + tmp46 = Y[-6 * iostride]; + tmp47 = X[iostride]; + tmp48 = tmp46 + tmp47; + tmp107 = tmp46 - tmp47; + } + { + fftw_real tmp39; + fftw_real tmp40; + fftw_real tmp43; + fftw_real tmp44; + ASSERT_ALIGNED_DOUBLE; + tmp39 = Y[-8 * iostride]; + tmp40 = X[3 * iostride]; + tmp41 = tmp39 + tmp40; + tmp104 = tmp39 - tmp40; + tmp43 = X[4 * iostride]; + tmp44 = Y[-9 * iostride]; + tmp45 = tmp43 + tmp44; + tmp106 = tmp43 - tmp44; + } + { + fftw_real tmp42; + fftw_real tmp49; + fftw_real tmp105; + fftw_real tmp108; + ASSERT_ALIGNED_DOUBLE; + tmp72 = tmp38 - tmp41; + tmp73 = tmp45 - tmp48; + tmp42 = tmp38 + tmp41; + tmp49 = tmp45 + tmp48; + tmp50 = tmp42 + tmp49; + tmp53 = K559016994 * (tmp42 - tmp49); + tmp123 = tmp106 - tmp107; + tmp122 = tmp103 - tmp104; + tmp105 = tmp103 + tmp104; + tmp108 = tmp106 + tmp107; + tmp109 = tmp105 + tmp108; + tmp131 = K559016994 * (tmp105 - tmp108); + } + } + { + fftw_real tmp57; + fftw_real tmp113; + fftw_real tmp67; + fftw_real tmp117; + fftw_real tmp60; + fftw_real tmp114; + fftw_real tmp64; + fftw_real tmp116; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp55; + fftw_real tmp56; + fftw_real tmp65; + fftw_real tmp66; + ASSERT_ALIGNED_DOUBLE; + tmp55 = Y[-2 * iostride]; + tmp56 = X[7 * iostride]; + tmp57 = tmp55 - tmp56; + tmp113 = tmp55 + tmp56; + tmp65 = Y[-iostride]; + tmp66 = X[6 * iostride]; + tmp67 = tmp65 - tmp66; + tmp117 = tmp65 + tmp66; + } + { + fftw_real tmp58; + fftw_real tmp59; + fftw_real tmp62; + fftw_real tmp63; + ASSERT_ALIGNED_DOUBLE; + tmp58 = Y[-3 * iostride]; + tmp59 = X[8 * iostride]; + tmp60 = tmp58 - tmp59; + tmp114 = tmp58 + tmp59; + tmp62 = Y[-4 * iostride]; + tmp63 = X[9 * iostride]; + tmp64 = tmp62 - tmp63; + tmp116 = tmp62 + tmp63; + } + { + fftw_real tmp78; + fftw_real tmp79; + fftw_real tmp115; + fftw_real tmp118; + ASSERT_ALIGNED_DOUBLE; + tmp61 = tmp57 - tmp60; + tmp68 = tmp64 - tmp67; + tmp78 = tmp57 + tmp60; + tmp79 = tmp64 + tmp67; + tmp80 = tmp78 + tmp79; + tmp82 = K559016994 * (tmp78 - tmp79); + tmp134 = tmp116 + tmp117; + tmp133 = tmp113 + tmp114; + tmp115 = tmp113 - tmp114; + tmp118 = tmp116 - tmp117; + tmp119 = tmp115 + tmp118; + tmp126 = K559016994 * (tmp115 - tmp118); + } + } + X[0] = tmp35 + tmp50; + { + fftw_real tmp69; + fftw_real tmp91; + fftw_real tmp54; + fftw_real tmp90; + fftw_real tmp95; + fftw_real tmp74; + fftw_real tmp83; + fftw_real tmp94; + fftw_real tmp52; + fftw_real tmp81; + ASSERT_ALIGNED_DOUBLE; + tmp69 = (K587785252 * tmp61) - (K951056516 * tmp68); + tmp91 = (K951056516 * tmp61) + (K587785252 * tmp68); + tmp52 = tmp35 - (K250000000 * tmp50); + tmp54 = tmp52 - tmp53; + tmp90 = tmp53 + tmp52; + tmp95 = (K951056516 * tmp72) + (K587785252 * tmp73); + tmp74 = (K587785252 * tmp72) - (K951056516 * tmp73); + tmp81 = tmp77 - (K250000000 * tmp80); + tmp83 = tmp81 - tmp82; + tmp94 = tmp82 + tmp81; + { + fftw_real tmp70; + fftw_real tmp84; + fftw_real tmp51; + fftw_real tmp71; + ASSERT_ALIGNED_DOUBLE; + tmp70 = tmp54 - tmp69; + tmp84 = tmp74 + tmp83; + tmp51 = c_re(W[1]); + tmp71 = c_im(W[1]); + X[2 * iostride] = (tmp51 * tmp70) + (tmp71 * tmp84); + Y[-7 * iostride] = (tmp51 * tmp84) - (tmp71 * tmp70); + } + { + fftw_real tmp86; + fftw_real tmp88; + fftw_real tmp85; + fftw_real tmp87; + ASSERT_ALIGNED_DOUBLE; + tmp86 = tmp54 + tmp69; + tmp88 = tmp83 - tmp74; + tmp85 = c_re(W[7]); + tmp87 = c_im(W[7]); + X[8 * iostride] = (tmp85 * tmp86) + (tmp87 * tmp88); + Y[-iostride] = (tmp85 * tmp88) - (tmp87 * tmp86); + } + { + fftw_real tmp92; + fftw_real tmp96; + fftw_real tmp89; + fftw_real tmp93; + ASSERT_ALIGNED_DOUBLE; + tmp92 = tmp90 + tmp91; + tmp96 = tmp94 - tmp95; + tmp89 = c_re(W[3]); + tmp93 = c_im(W[3]); + X[4 * iostride] = (tmp89 * tmp92) + (tmp93 * tmp96); + Y[-5 * iostride] = (tmp89 * tmp96) - (tmp93 * tmp92); + } + { + fftw_real tmp98; + fftw_real tmp100; + fftw_real tmp97; + fftw_real tmp99; + ASSERT_ALIGNED_DOUBLE; + tmp98 = tmp90 - tmp91; + tmp100 = tmp95 + tmp94; + tmp97 = c_re(W[5]); + tmp99 = c_im(W[5]); + X[6 * iostride] = (tmp97 * tmp98) + (tmp99 * tmp100); + Y[-3 * iostride] = (tmp97 * tmp100) - (tmp99 * tmp98); + } + } + Y[-9 * iostride] = tmp77 + tmp80; + { + fftw_real tmp110; + fftw_real tmp120; + fftw_real tmp101; + fftw_real tmp111; + ASSERT_ALIGNED_DOUBLE; + tmp110 = tmp102 + tmp109; + tmp120 = tmp112 + tmp119; + tmp101 = c_re(W[4]); + tmp111 = c_im(W[4]); + X[5 * iostride] = (tmp101 * tmp110) + (tmp111 * tmp120); + Y[-4 * iostride] = (tmp101 * tmp120) - (tmp111 * tmp110); + } + { + fftw_real tmp124; + fftw_real tmp142; + fftw_real tmp127; + fftw_real tmp143; + fftw_real tmp147; + fftw_real tmp135; + fftw_real tmp132; + fftw_real tmp146; + fftw_real tmp125; + fftw_real tmp130; + ASSERT_ALIGNED_DOUBLE; + tmp124 = (K587785252 * tmp122) - (K951056516 * tmp123); + tmp142 = (K951056516 * tmp122) + (K587785252 * tmp123); + tmp125 = tmp112 - (K250000000 * tmp119); + tmp127 = tmp125 - tmp126; + tmp143 = tmp126 + tmp125; + tmp147 = (K951056516 * tmp133) + (K587785252 * tmp134); + tmp135 = (K587785252 * tmp133) - (K951056516 * tmp134); + tmp130 = tmp102 - (K250000000 * tmp109); + tmp132 = tmp130 - tmp131; + tmp146 = tmp131 + tmp130; + { + fftw_real tmp128; + fftw_real tmp136; + fftw_real tmp121; + fftw_real tmp129; + ASSERT_ALIGNED_DOUBLE; + tmp128 = tmp124 + tmp127; + tmp136 = tmp132 - tmp135; + tmp121 = c_re(W[6]); + tmp129 = c_im(W[6]); + Y[-2 * iostride] = (tmp121 * tmp128) - (tmp129 * tmp136); + X[7 * iostride] = (tmp129 * tmp128) + (tmp121 * tmp136); + } + { + fftw_real tmp138; + fftw_real tmp140; + fftw_real tmp137; + fftw_real tmp139; + ASSERT_ALIGNED_DOUBLE; + tmp138 = tmp127 - tmp124; + tmp140 = tmp132 + tmp135; + tmp137 = c_re(W[2]); + tmp139 = c_im(W[2]); + Y[-6 * iostride] = (tmp137 * tmp138) - (tmp139 * tmp140); + X[3 * iostride] = (tmp139 * tmp138) + (tmp137 * tmp140); + } + { + fftw_real tmp144; + fftw_real tmp148; + fftw_real tmp141; + fftw_real tmp145; + ASSERT_ALIGNED_DOUBLE; + tmp144 = tmp142 + tmp143; + tmp148 = tmp146 - tmp147; + tmp141 = c_re(W[0]); + tmp145 = c_im(W[0]); + Y[-8 * iostride] = (tmp141 * tmp144) - (tmp145 * tmp148); + X[iostride] = (tmp145 * tmp144) + (tmp141 * tmp148); + } + { + fftw_real tmp150; + fftw_real tmp152; + fftw_real tmp149; + fftw_real tmp151; + ASSERT_ALIGNED_DOUBLE; + tmp150 = tmp143 - tmp142; + tmp152 = tmp146 + tmp147; + tmp149 = c_re(W[8]); + tmp151 = c_im(W[8]); + Y[0] = (tmp149 * tmp150) - (tmp151 * tmp152); + X[9 * iostride] = (tmp151 * tmp150) + (tmp149 * tmp152); + } + } + } + if (i == m) { + fftw_real tmp1; + fftw_real tmp24; + fftw_real tmp8; + fftw_real tmp10; + fftw_real tmp25; + fftw_real tmp26; + fftw_real tmp14; + fftw_real tmp28; + fftw_real tmp23; + fftw_real tmp17; + ASSERT_ALIGNED_DOUBLE; + tmp1 = X[2 * iostride]; + tmp24 = Y[-2 * iostride]; + { + fftw_real tmp2; + fftw_real tmp3; + fftw_real tmp4; + fftw_real tmp5; + fftw_real tmp6; + fftw_real tmp7; + ASSERT_ALIGNED_DOUBLE; + tmp2 = X[4 * iostride]; + tmp3 = X[0]; + tmp4 = tmp2 + tmp3; + tmp5 = X[3 * iostride]; + tmp6 = X[iostride]; + tmp7 = tmp5 + tmp6; + tmp8 = tmp4 + tmp7; + tmp10 = K1_118033988 * (tmp7 - tmp4); + tmp25 = tmp2 - tmp3; + tmp26 = tmp5 - tmp6; + } + { + fftw_real tmp12; + fftw_real tmp13; + fftw_real tmp22; + fftw_real tmp15; + fftw_real tmp16; + fftw_real tmp21; + ASSERT_ALIGNED_DOUBLE; + tmp12 = Y[-4 * iostride]; + tmp13 = Y[0]; + tmp22 = tmp12 + tmp13; + tmp15 = Y[-iostride]; + tmp16 = Y[-3 * iostride]; + tmp21 = tmp16 + tmp15; + tmp14 = tmp12 - tmp13; + tmp28 = K1_118033988 * (tmp21 + tmp22); + tmp23 = tmp21 - tmp22; + tmp17 = tmp15 - tmp16; + } + X[0] = K2_000000000 * (tmp1 + tmp8); + { + fftw_real tmp18; + fftw_real tmp19; + fftw_real tmp11; + fftw_real tmp20; + fftw_real tmp9; + ASSERT_ALIGNED_DOUBLE; + tmp18 = (K1_175570504 * tmp14) - (K1_902113032 * tmp17); + tmp19 = (K1_175570504 * tmp17) + (K1_902113032 * tmp14); + tmp9 = (K500000000 * tmp8) - (K2_000000000 * tmp1); + tmp11 = tmp9 - tmp10; + tmp20 = tmp9 + tmp10; + X[2 * iostride] = tmp11 + tmp18; + X[8 * iostride] = tmp18 - tmp11; + X[4 * iostride] = tmp19 - tmp20; + X[6 * iostride] = tmp20 + tmp19; + } + X[5 * iostride] = K2_000000000 * (tmp23 - tmp24); + { + fftw_real tmp27; + fftw_real tmp31; + fftw_real tmp30; + fftw_real tmp32; + fftw_real tmp29; + ASSERT_ALIGNED_DOUBLE; + tmp27 = (K1_902113032 * tmp25) + (K1_175570504 * tmp26); + tmp31 = (K1_902113032 * tmp26) - (K1_175570504 * tmp25); + tmp29 = (K500000000 * tmp23) + (K2_000000000 * tmp24); + tmp30 = tmp28 + tmp29; + tmp32 = tmp29 - tmp28; + X[iostride] = -(tmp27 + tmp30); + X[9 * iostride] = tmp27 - tmp30; + X[3 * iostride] = tmp31 + tmp32; + X[7 * iostride] = tmp32 - tmp31; + } + } +} + +static const int twiddle_order[] = +{1, 2, 3, 4, 5, 6, 7, 8, 9}; +fftw_codelet_desc fftw_hc2hc_backward_10_desc = +{ + "fftw_hc2hc_backward_10", + (void (*)()) fftw_hc2hc_backward_10, + 10, + FFTW_BACKWARD, + FFTW_HC2HC, + 234, + 9, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/fhb_16.c b/src/sndobj/rfftw/fhb_16.c new file mode 100644 index 0000000..83c828b --- /dev/null +++ b/src/sndobj/rfftw/fhb_16.c @@ -0,0 +1,976 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:45:16 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-backward 16 */ + +/* + * This function contains 298 FP additions, 134 FP multiplications, + * (or, 244 additions, 80 multiplications, 54 fused multiply/add), + * 49 stack variables, and 128 memory accesses + */ +static const fftw_real K1_961570560 = FFTW_KONST(+1.961570560806460898252364472268478073947867462); +static const fftw_real K390180644 = FFTW_KONST(+0.390180644032256535696569736954044481855383236); +static const fftw_real K1_111140466 = FFTW_KONST(+1.111140466039204449485661627897065748749874382); +static const fftw_real K1_662939224 = FFTW_KONST(+1.662939224605090474157576755235811513477121624); +static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); +static const fftw_real K382683432 = FFTW_KONST(+0.382683432365089771728459984030398866761344562); +static const fftw_real K923879532 = FFTW_KONST(+0.923879532511286756128183189396788286822416626); +static const fftw_real K765366864 = FFTW_KONST(+0.765366864730179543456919968060797733522689125); +static const fftw_real K1_847759065 = FFTW_KONST(+1.847759065022573512256366378793576573644833252); +static const fftw_real K1_414213562 = FFTW_KONST(+1.414213562373095048801688724209698078569671875); +static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); + +/* + * Generator Id's : + * $Id: fhb_16.c,v 1.1.1.1 2006/05/12 15:14:54 veplaini Exp $ + * $Id: fhb_16.c,v 1.1.1.1 2006/05/12 15:14:54 veplaini Exp $ + * $Id: fhb_16.c,v 1.1.1.1 2006/05/12 15:14:54 veplaini Exp $ + */ + +void fftw_hc2hc_backward_16(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_real *X; + fftw_real *Y; + X = A; + Y = A + (16 * iostride); + { + fftw_real tmp279; + fftw_real tmp324; + fftw_real tmp312; + fftw_real tmp299; + fftw_real tmp276; + fftw_real tmp296; + fftw_real tmp309; + fftw_real tmp323; + fftw_real tmp283; + fftw_real tmp291; + fftw_real tmp286; + fftw_real tmp294; + fftw_real tmp301; + fftw_real tmp319; + fftw_real tmp327; + fftw_real tmp326; + fftw_real tmp316; + fftw_real tmp302; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp277; + fftw_real tmp278; + fftw_real tmp310; + fftw_real tmp297; + fftw_real tmp298; + fftw_real tmp311; + ASSERT_ALIGNED_DOUBLE; + tmp277 = X[2 * iostride]; + tmp278 = X[6 * iostride]; + tmp310 = tmp277 - tmp278; + tmp297 = Y[-2 * iostride]; + tmp298 = Y[-6 * iostride]; + tmp311 = tmp298 + tmp297; + tmp279 = K2_000000000 * (tmp277 + tmp278); + tmp324 = K1_414213562 * (tmp310 + tmp311); + tmp312 = K1_414213562 * (tmp310 - tmp311); + tmp299 = K2_000000000 * (tmp297 - tmp298); + } + { + fftw_real tmp275; + fftw_real tmp308; + fftw_real tmp273; + fftw_real tmp306; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp274; + fftw_real tmp307; + fftw_real tmp271; + fftw_real tmp272; + ASSERT_ALIGNED_DOUBLE; + tmp274 = X[4 * iostride]; + tmp275 = K2_000000000 * tmp274; + tmp307 = Y[-4 * iostride]; + tmp308 = K2_000000000 * tmp307; + tmp271 = X[0]; + tmp272 = X[8 * iostride]; + tmp273 = tmp271 + tmp272; + tmp306 = tmp271 - tmp272; + } + tmp276 = tmp273 + tmp275; + tmp296 = tmp273 - tmp275; + tmp309 = tmp306 - tmp308; + tmp323 = tmp306 + tmp308; + } + { + fftw_real tmp314; + fftw_real tmp318; + fftw_real tmp317; + fftw_real tmp315; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp281; + fftw_real tmp282; + fftw_real tmp289; + fftw_real tmp290; + ASSERT_ALIGNED_DOUBLE; + tmp281 = X[iostride]; + tmp282 = X[7 * iostride]; + tmp283 = tmp281 + tmp282; + tmp314 = tmp281 - tmp282; + tmp289 = Y[-iostride]; + tmp290 = Y[-7 * iostride]; + tmp291 = tmp289 - tmp290; + tmp318 = tmp289 + tmp290; + } + { + fftw_real tmp284; + fftw_real tmp285; + fftw_real tmp292; + fftw_real tmp293; + ASSERT_ALIGNED_DOUBLE; + tmp284 = X[3 * iostride]; + tmp285 = X[5 * iostride]; + tmp286 = tmp284 + tmp285; + tmp317 = tmp285 - tmp284; + tmp292 = Y[-3 * iostride]; + tmp293 = Y[-5 * iostride]; + tmp294 = tmp292 - tmp293; + tmp315 = tmp293 + tmp292; + } + tmp301 = tmp283 - tmp286; + tmp319 = tmp317 + tmp318; + tmp327 = tmp318 - tmp317; + tmp326 = tmp314 + tmp315; + tmp316 = tmp314 - tmp315; + tmp302 = tmp294 + tmp291; + } + { + fftw_real tmp280; + fftw_real tmp287; + fftw_real tmp288; + fftw_real tmp295; + ASSERT_ALIGNED_DOUBLE; + tmp280 = tmp276 + tmp279; + tmp287 = K2_000000000 * (tmp283 + tmp286); + X[8 * iostride] = tmp280 - tmp287; + X[0] = tmp280 + tmp287; + tmp288 = tmp276 - tmp279; + tmp295 = K2_000000000 * (tmp291 - tmp294); + X[12 * iostride] = tmp288 + tmp295; + X[4 * iostride] = tmp288 - tmp295; + } + { + fftw_real tmp300; + fftw_real tmp303; + fftw_real tmp304; + fftw_real tmp305; + ASSERT_ALIGNED_DOUBLE; + tmp300 = tmp296 - tmp299; + tmp303 = K1_414213562 * (tmp301 - tmp302); + X[10 * iostride] = tmp300 - tmp303; + X[2 * iostride] = tmp300 + tmp303; + tmp304 = tmp296 + tmp299; + tmp305 = K1_414213562 * (tmp301 + tmp302); + X[6 * iostride] = tmp304 - tmp305; + X[14 * iostride] = tmp304 + tmp305; + } + { + fftw_real tmp313; + fftw_real tmp320; + fftw_real tmp321; + fftw_real tmp322; + ASSERT_ALIGNED_DOUBLE; + tmp313 = tmp309 + tmp312; + tmp320 = (K1_847759065 * tmp316) - (K765366864 * tmp319); + X[9 * iostride] = tmp313 - tmp320; + X[iostride] = tmp313 + tmp320; + tmp321 = tmp309 - tmp312; + tmp322 = (K765366864 * tmp316) + (K1_847759065 * tmp319); + X[5 * iostride] = tmp321 - tmp322; + X[13 * iostride] = tmp321 + tmp322; + } + { + fftw_real tmp325; + fftw_real tmp328; + fftw_real tmp329; + fftw_real tmp330; + ASSERT_ALIGNED_DOUBLE; + tmp325 = tmp323 - tmp324; + tmp328 = (K765366864 * tmp326) - (K1_847759065 * tmp327); + X[11 * iostride] = tmp325 - tmp328; + X[3 * iostride] = tmp325 + tmp328; + tmp329 = tmp323 + tmp324; + tmp330 = (K1_847759065 * tmp326) + (K765366864 * tmp327); + X[7 * iostride] = tmp329 - tmp330; + X[15 * iostride] = tmp329 + tmp330; + } + } + X = X + dist; + Y = Y - dist; + for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 15) { + fftw_real tmp73; + fftw_real tmp98; + fftw_real tmp135; + fftw_real tmp160; + fftw_real tmp182; + fftw_real tmp236; + fftw_real tmp210; + fftw_real tmp248; + fftw_real tmp95; + fftw_real tmp124; + fftw_real tmp138; + fftw_real tmp164; + fftw_real tmp197; + fftw_real tmp216; + fftw_real tmp244; + fftw_real tmp252; + fftw_real tmp80; + fftw_real tmp128; + fftw_real tmp105; + fftw_real tmp161; + fftw_real tmp213; + fftw_real tmp237; + fftw_real tmp189; + fftw_real tmp249; + fftw_real tmp88; + fftw_real tmp115; + fftw_real tmp137; + fftw_real tmp163; + fftw_real tmp204; + fftw_real tmp215; + fftw_real tmp241; + fftw_real tmp251; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp69; + fftw_real tmp180; + fftw_real tmp131; + fftw_real tmp209; + fftw_real tmp72; + fftw_real tmp208; + fftw_real tmp134; + fftw_real tmp181; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp67; + fftw_real tmp68; + fftw_real tmp129; + fftw_real tmp130; + ASSERT_ALIGNED_DOUBLE; + tmp67 = X[0]; + tmp68 = Y[-8 * iostride]; + tmp69 = tmp67 + tmp68; + tmp180 = tmp67 - tmp68; + tmp129 = Y[0]; + tmp130 = X[8 * iostride]; + tmp131 = tmp129 - tmp130; + tmp209 = tmp129 + tmp130; + } + { + fftw_real tmp70; + fftw_real tmp71; + fftw_real tmp132; + fftw_real tmp133; + ASSERT_ALIGNED_DOUBLE; + tmp70 = X[4 * iostride]; + tmp71 = Y[-12 * iostride]; + tmp72 = tmp70 + tmp71; + tmp208 = tmp70 - tmp71; + tmp132 = Y[-4 * iostride]; + tmp133 = X[12 * iostride]; + tmp134 = tmp132 - tmp133; + tmp181 = tmp132 + tmp133; + } + tmp73 = tmp69 + tmp72; + tmp98 = tmp69 - tmp72; + tmp135 = tmp131 - tmp134; + tmp160 = tmp131 + tmp134; + tmp182 = tmp180 - tmp181; + tmp236 = tmp180 + tmp181; + tmp210 = tmp208 + tmp209; + tmp248 = tmp209 - tmp208; + } + { + fftw_real tmp91; + fftw_real tmp194; + fftw_real tmp119; + fftw_real tmp192; + fftw_real tmp94; + fftw_real tmp191; + fftw_real tmp122; + fftw_real tmp195; + fftw_real tmp116; + fftw_real tmp123; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp89; + fftw_real tmp90; + fftw_real tmp117; + fftw_real tmp118; + ASSERT_ALIGNED_DOUBLE; + tmp89 = Y[-15 * iostride]; + tmp90 = X[7 * iostride]; + tmp91 = tmp89 + tmp90; + tmp194 = tmp89 - tmp90; + tmp117 = Y[-7 * iostride]; + tmp118 = X[15 * iostride]; + tmp119 = tmp117 - tmp118; + tmp192 = tmp117 + tmp118; + } + { + fftw_real tmp92; + fftw_real tmp93; + fftw_real tmp120; + fftw_real tmp121; + ASSERT_ALIGNED_DOUBLE; + tmp92 = X[3 * iostride]; + tmp93 = Y[-11 * iostride]; + tmp94 = tmp92 + tmp93; + tmp191 = tmp92 - tmp93; + tmp120 = Y[-3 * iostride]; + tmp121 = X[11 * iostride]; + tmp122 = tmp120 - tmp121; + tmp195 = tmp120 + tmp121; + } + tmp95 = tmp91 + tmp94; + tmp116 = tmp91 - tmp94; + tmp123 = tmp119 - tmp122; + tmp124 = tmp116 + tmp123; + tmp138 = tmp123 - tmp116; + tmp164 = tmp119 + tmp122; + { + fftw_real tmp193; + fftw_real tmp196; + fftw_real tmp242; + fftw_real tmp243; + ASSERT_ALIGNED_DOUBLE; + tmp193 = tmp191 - tmp192; + tmp196 = tmp194 - tmp195; + tmp197 = (K923879532 * tmp193) - (K382683432 * tmp196); + tmp216 = (K382683432 * tmp193) + (K923879532 * tmp196); + tmp242 = tmp194 + tmp195; + tmp243 = tmp191 + tmp192; + tmp244 = (K382683432 * tmp242) - (K923879532 * tmp243); + tmp252 = (K382683432 * tmp243) + (K923879532 * tmp242); + } + } + { + fftw_real tmp76; + fftw_real tmp183; + fftw_real tmp104; + fftw_real tmp184; + fftw_real tmp79; + fftw_real tmp186; + fftw_real tmp101; + fftw_real tmp187; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp74; + fftw_real tmp75; + fftw_real tmp102; + fftw_real tmp103; + ASSERT_ALIGNED_DOUBLE; + tmp74 = X[2 * iostride]; + tmp75 = Y[-10 * iostride]; + tmp76 = tmp74 + tmp75; + tmp183 = tmp74 - tmp75; + tmp102 = Y[-2 * iostride]; + tmp103 = X[10 * iostride]; + tmp104 = tmp102 - tmp103; + tmp184 = tmp102 + tmp103; + } + { + fftw_real tmp77; + fftw_real tmp78; + fftw_real tmp99; + fftw_real tmp100; + ASSERT_ALIGNED_DOUBLE; + tmp77 = Y[-14 * iostride]; + tmp78 = X[6 * iostride]; + tmp79 = tmp77 + tmp78; + tmp186 = tmp77 - tmp78; + tmp99 = Y[-6 * iostride]; + tmp100 = X[14 * iostride]; + tmp101 = tmp99 - tmp100; + tmp187 = tmp99 + tmp100; + } + tmp80 = tmp76 + tmp79; + tmp128 = tmp76 - tmp79; + tmp105 = tmp101 - tmp104; + tmp161 = tmp104 + tmp101; + { + fftw_real tmp211; + fftw_real tmp212; + fftw_real tmp185; + fftw_real tmp188; + ASSERT_ALIGNED_DOUBLE; + tmp211 = tmp183 + tmp184; + tmp212 = tmp186 + tmp187; + tmp213 = K707106781 * (tmp211 - tmp212); + tmp237 = K707106781 * (tmp211 + tmp212); + tmp185 = tmp183 - tmp184; + tmp188 = tmp186 - tmp187; + tmp189 = K707106781 * (tmp185 + tmp188); + tmp249 = K707106781 * (tmp185 - tmp188); + } + } + { + fftw_real tmp84; + fftw_real tmp201; + fftw_real tmp110; + fftw_real tmp199; + fftw_real tmp87; + fftw_real tmp198; + fftw_real tmp113; + fftw_real tmp202; + fftw_real tmp107; + fftw_real tmp114; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp82; + fftw_real tmp83; + fftw_real tmp108; + fftw_real tmp109; + ASSERT_ALIGNED_DOUBLE; + tmp82 = X[iostride]; + tmp83 = Y[-9 * iostride]; + tmp84 = tmp82 + tmp83; + tmp201 = tmp82 - tmp83; + tmp108 = Y[-iostride]; + tmp109 = X[9 * iostride]; + tmp110 = tmp108 - tmp109; + tmp199 = tmp108 + tmp109; + } + { + fftw_real tmp85; + fftw_real tmp86; + fftw_real tmp111; + fftw_real tmp112; + ASSERT_ALIGNED_DOUBLE; + tmp85 = X[5 * iostride]; + tmp86 = Y[-13 * iostride]; + tmp87 = tmp85 + tmp86; + tmp198 = tmp85 - tmp86; + tmp111 = Y[-5 * iostride]; + tmp112 = X[13 * iostride]; + tmp113 = tmp111 - tmp112; + tmp202 = tmp111 + tmp112; + } + tmp88 = tmp84 + tmp87; + tmp107 = tmp84 - tmp87; + tmp114 = tmp110 - tmp113; + tmp115 = tmp107 - tmp114; + tmp137 = tmp107 + tmp114; + tmp163 = tmp110 + tmp113; + { + fftw_real tmp200; + fftw_real tmp203; + fftw_real tmp239; + fftw_real tmp240; + ASSERT_ALIGNED_DOUBLE; + tmp200 = tmp198 + tmp199; + tmp203 = tmp201 - tmp202; + tmp204 = (K923879532 * tmp200) + (K382683432 * tmp203); + tmp215 = (K923879532 * tmp203) - (K382683432 * tmp200); + tmp239 = tmp201 + tmp202; + tmp240 = tmp199 - tmp198; + tmp241 = (K382683432 * tmp239) - (K923879532 * tmp240); + tmp251 = (K382683432 * tmp240) + (K923879532 * tmp239); + } + } + { + fftw_real tmp81; + fftw_real tmp96; + fftw_real tmp158; + fftw_real tmp162; + fftw_real tmp165; + fftw_real tmp166; + fftw_real tmp157; + fftw_real tmp159; + ASSERT_ALIGNED_DOUBLE; + tmp81 = tmp73 + tmp80; + tmp96 = tmp88 + tmp95; + tmp158 = tmp81 - tmp96; + tmp162 = tmp160 + tmp161; + tmp165 = tmp163 + tmp164; + tmp166 = tmp162 - tmp165; + X[0] = tmp81 + tmp96; + Y[-15 * iostride] = tmp162 + tmp165; + tmp157 = c_re(W[7]); + tmp159 = c_im(W[7]); + X[8 * iostride] = (tmp157 * tmp158) + (tmp159 * tmp166); + Y[-7 * iostride] = (tmp157 * tmp166) - (tmp159 * tmp158); + } + { + fftw_real tmp170; + fftw_real tmp176; + fftw_real tmp174; + fftw_real tmp178; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp168; + fftw_real tmp169; + fftw_real tmp172; + fftw_real tmp173; + ASSERT_ALIGNED_DOUBLE; + tmp168 = tmp160 - tmp161; + tmp169 = tmp88 - tmp95; + tmp170 = tmp168 - tmp169; + tmp176 = tmp169 + tmp168; + tmp172 = tmp73 - tmp80; + tmp173 = tmp164 - tmp163; + tmp174 = tmp172 - tmp173; + tmp178 = tmp172 + tmp173; + } + { + fftw_real tmp167; + fftw_real tmp171; + fftw_real tmp175; + fftw_real tmp177; + ASSERT_ALIGNED_DOUBLE; + tmp167 = c_re(W[11]); + tmp171 = c_im(W[11]); + Y[-3 * iostride] = (tmp167 * tmp170) - (tmp171 * tmp174); + X[12 * iostride] = (tmp171 * tmp170) + (tmp167 * tmp174); + tmp175 = c_re(W[3]); + tmp177 = c_im(W[3]); + Y[-11 * iostride] = (tmp175 * tmp176) - (tmp177 * tmp178); + X[4 * iostride] = (tmp177 * tmp176) + (tmp175 * tmp178); + } + } + { + fftw_real tmp126; + fftw_real tmp142; + fftw_real tmp140; + fftw_real tmp144; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp106; + fftw_real tmp125; + fftw_real tmp136; + fftw_real tmp139; + ASSERT_ALIGNED_DOUBLE; + tmp106 = tmp98 + tmp105; + tmp125 = K707106781 * (tmp115 + tmp124); + tmp126 = tmp106 - tmp125; + tmp142 = tmp106 + tmp125; + tmp136 = tmp128 + tmp135; + tmp139 = K707106781 * (tmp137 + tmp138); + tmp140 = tmp136 - tmp139; + tmp144 = tmp136 + tmp139; + } + { + fftw_real tmp97; + fftw_real tmp127; + fftw_real tmp141; + fftw_real tmp143; + ASSERT_ALIGNED_DOUBLE; + tmp97 = c_re(W[9]); + tmp127 = c_im(W[9]); + X[10 * iostride] = (tmp97 * tmp126) + (tmp127 * tmp140); + Y[-5 * iostride] = (tmp97 * tmp140) - (tmp127 * tmp126); + tmp141 = c_re(W[1]); + tmp143 = c_im(W[1]); + X[2 * iostride] = (tmp141 * tmp142) + (tmp143 * tmp144); + Y[-13 * iostride] = (tmp141 * tmp144) - (tmp143 * tmp142); + } + } + { + fftw_real tmp148; + fftw_real tmp154; + fftw_real tmp152; + fftw_real tmp156; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp146; + fftw_real tmp147; + fftw_real tmp150; + fftw_real tmp151; + ASSERT_ALIGNED_DOUBLE; + tmp146 = tmp135 - tmp128; + tmp147 = K707106781 * (tmp115 - tmp124); + tmp148 = tmp146 - tmp147; + tmp154 = tmp146 + tmp147; + tmp150 = tmp98 - tmp105; + tmp151 = K707106781 * (tmp138 - tmp137); + tmp152 = tmp150 - tmp151; + tmp156 = tmp150 + tmp151; + } + { + fftw_real tmp145; + fftw_real tmp149; + fftw_real tmp153; + fftw_real tmp155; + ASSERT_ALIGNED_DOUBLE; + tmp145 = c_re(W[13]); + tmp149 = c_im(W[13]); + Y[-iostride] = (tmp145 * tmp148) - (tmp149 * tmp152); + X[14 * iostride] = (tmp149 * tmp148) + (tmp145 * tmp152); + tmp153 = c_re(W[5]); + tmp155 = c_im(W[5]); + Y[-9 * iostride] = (tmp153 * tmp154) - (tmp155 * tmp156); + X[6 * iostride] = (tmp155 * tmp154) + (tmp153 * tmp156); + } + } + { + fftw_real tmp206; + fftw_real tmp220; + fftw_real tmp218; + fftw_real tmp222; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp190; + fftw_real tmp205; + fftw_real tmp214; + fftw_real tmp217; + ASSERT_ALIGNED_DOUBLE; + tmp190 = tmp182 - tmp189; + tmp205 = tmp197 - tmp204; + tmp206 = tmp190 - tmp205; + tmp220 = tmp190 + tmp205; + tmp214 = tmp210 - tmp213; + tmp217 = tmp215 - tmp216; + tmp218 = tmp214 - tmp217; + tmp222 = tmp214 + tmp217; + } + { + fftw_real tmp179; + fftw_real tmp207; + fftw_real tmp219; + fftw_real tmp221; + ASSERT_ALIGNED_DOUBLE; + tmp179 = c_re(W[12]); + tmp207 = c_im(W[12]); + X[13 * iostride] = (tmp179 * tmp206) + (tmp207 * tmp218); + Y[-2 * iostride] = (tmp179 * tmp218) - (tmp207 * tmp206); + tmp219 = c_re(W[4]); + tmp221 = c_im(W[4]); + X[5 * iostride] = (tmp219 * tmp220) + (tmp221 * tmp222); + Y[-10 * iostride] = (tmp219 * tmp222) - (tmp221 * tmp220); + } + } + { + fftw_real tmp226; + fftw_real tmp232; + fftw_real tmp230; + fftw_real tmp234; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp224; + fftw_real tmp225; + fftw_real tmp228; + fftw_real tmp229; + ASSERT_ALIGNED_DOUBLE; + tmp224 = tmp210 + tmp213; + tmp225 = tmp204 + tmp197; + tmp226 = tmp224 - tmp225; + tmp232 = tmp224 + tmp225; + tmp228 = tmp182 + tmp189; + tmp229 = tmp215 + tmp216; + tmp230 = tmp228 - tmp229; + tmp234 = tmp228 + tmp229; + } + { + fftw_real tmp223; + fftw_real tmp227; + fftw_real tmp231; + fftw_real tmp233; + ASSERT_ALIGNED_DOUBLE; + tmp223 = c_re(W[8]); + tmp227 = c_im(W[8]); + Y[-6 * iostride] = (tmp223 * tmp226) - (tmp227 * tmp230); + X[9 * iostride] = (tmp227 * tmp226) + (tmp223 * tmp230); + tmp231 = c_re(W[0]); + tmp233 = c_im(W[0]); + Y[-14 * iostride] = (tmp231 * tmp232) - (tmp233 * tmp234); + X[iostride] = (tmp233 * tmp232) + (tmp231 * tmp234); + } + } + { + fftw_real tmp246; + fftw_real tmp256; + fftw_real tmp254; + fftw_real tmp258; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp238; + fftw_real tmp245; + fftw_real tmp250; + fftw_real tmp253; + ASSERT_ALIGNED_DOUBLE; + tmp238 = tmp236 - tmp237; + tmp245 = tmp241 + tmp244; + tmp246 = tmp238 - tmp245; + tmp256 = tmp238 + tmp245; + tmp250 = tmp248 + tmp249; + tmp253 = tmp251 - tmp252; + tmp254 = tmp250 - tmp253; + tmp258 = tmp250 + tmp253; + } + { + fftw_real tmp235; + fftw_real tmp247; + fftw_real tmp255; + fftw_real tmp257; + ASSERT_ALIGNED_DOUBLE; + tmp235 = c_re(W[10]); + tmp247 = c_im(W[10]); + X[11 * iostride] = (tmp235 * tmp246) + (tmp247 * tmp254); + Y[-4 * iostride] = (tmp235 * tmp254) - (tmp247 * tmp246); + tmp255 = c_re(W[2]); + tmp257 = c_im(W[2]); + X[3 * iostride] = (tmp255 * tmp256) + (tmp257 * tmp258); + Y[-12 * iostride] = (tmp255 * tmp258) - (tmp257 * tmp256); + } + } + { + fftw_real tmp262; + fftw_real tmp268; + fftw_real tmp266; + fftw_real tmp270; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp260; + fftw_real tmp261; + fftw_real tmp264; + fftw_real tmp265; + ASSERT_ALIGNED_DOUBLE; + tmp260 = tmp248 - tmp249; + tmp261 = tmp241 - tmp244; + tmp262 = tmp260 + tmp261; + tmp268 = tmp260 - tmp261; + tmp264 = tmp236 + tmp237; + tmp265 = tmp251 + tmp252; + tmp266 = tmp264 - tmp265; + tmp270 = tmp264 + tmp265; + } + { + fftw_real tmp259; + fftw_real tmp263; + fftw_real tmp267; + fftw_real tmp269; + ASSERT_ALIGNED_DOUBLE; + tmp259 = c_re(W[6]); + tmp263 = c_im(W[6]); + Y[-8 * iostride] = (tmp259 * tmp262) - (tmp263 * tmp266); + X[7 * iostride] = (tmp263 * tmp262) + (tmp259 * tmp266); + tmp267 = c_re(W[14]); + tmp269 = c_im(W[14]); + Y[0] = (tmp267 * tmp268) - (tmp269 * tmp270); + X[15 * iostride] = (tmp269 * tmp268) + (tmp267 * tmp270); + } + } + } + if (i == m) { + fftw_real tmp7; + fftw_real tmp51; + fftw_real tmp19; + fftw_real tmp43; + fftw_real tmp39; + fftw_real tmp47; + fftw_real tmp59; + fftw_real tmp64; + fftw_real tmp14; + fftw_real tmp56; + fftw_real tmp24; + fftw_real tmp32; + fftw_real tmp29; + fftw_real tmp33; + fftw_real tmp54; + fftw_real tmp65; + fftw_real tmp63; + fftw_real tmp66; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp3; + fftw_real tmp15; + fftw_real tmp38; + fftw_real tmp57; + fftw_real tmp6; + fftw_real tmp35; + fftw_real tmp18; + fftw_real tmp58; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp36; + fftw_real tmp37; + ASSERT_ALIGNED_DOUBLE; + tmp1 = X[0]; + tmp2 = X[7 * iostride]; + tmp3 = tmp1 + tmp2; + tmp15 = tmp1 - tmp2; + tmp36 = Y[0]; + tmp37 = Y[-7 * iostride]; + tmp38 = tmp36 + tmp37; + tmp57 = tmp36 - tmp37; + } + { + fftw_real tmp4; + fftw_real tmp5; + fftw_real tmp16; + fftw_real tmp17; + ASSERT_ALIGNED_DOUBLE; + tmp4 = X[4 * iostride]; + tmp5 = X[3 * iostride]; + tmp6 = tmp4 + tmp5; + tmp35 = tmp4 - tmp5; + tmp16 = Y[-4 * iostride]; + tmp17 = Y[-3 * iostride]; + tmp18 = tmp16 + tmp17; + tmp58 = tmp16 - tmp17; + } + tmp7 = tmp3 + tmp6; + tmp51 = tmp3 - tmp6; + tmp19 = tmp15 - tmp18; + tmp43 = tmp15 + tmp18; + tmp39 = tmp35 + tmp38; + tmp47 = tmp38 - tmp35; + tmp59 = tmp57 - tmp58; + tmp64 = tmp58 + tmp57; + } + { + fftw_real tmp10; + fftw_real tmp20; + fftw_real tmp23; + fftw_real tmp53; + fftw_real tmp13; + fftw_real tmp25; + fftw_real tmp28; + fftw_real tmp52; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp8; + fftw_real tmp9; + fftw_real tmp21; + fftw_real tmp22; + ASSERT_ALIGNED_DOUBLE; + tmp8 = X[2 * iostride]; + tmp9 = X[5 * iostride]; + tmp10 = tmp8 + tmp9; + tmp20 = tmp8 - tmp9; + tmp21 = Y[-2 * iostride]; + tmp22 = Y[-5 * iostride]; + tmp23 = tmp21 + tmp22; + tmp53 = tmp21 - tmp22; + } + { + fftw_real tmp11; + fftw_real tmp12; + fftw_real tmp26; + fftw_real tmp27; + ASSERT_ALIGNED_DOUBLE; + tmp11 = X[iostride]; + tmp12 = X[6 * iostride]; + tmp13 = tmp11 + tmp12; + tmp25 = tmp11 - tmp12; + tmp26 = Y[-iostride]; + tmp27 = Y[-6 * iostride]; + tmp28 = tmp26 + tmp27; + tmp52 = tmp27 - tmp26; + } + tmp14 = tmp10 + tmp13; + tmp56 = tmp10 - tmp13; + tmp24 = tmp20 - tmp23; + tmp32 = tmp20 + tmp23; + tmp29 = tmp25 - tmp28; + tmp33 = tmp25 + tmp28; + tmp54 = tmp52 - tmp53; + tmp65 = tmp53 + tmp52; + } + X[0] = K2_000000000 * (tmp7 + tmp14); + X[8 * iostride] = -(K2_000000000 * (tmp65 + tmp64)); + tmp63 = tmp7 - tmp14; + tmp66 = tmp64 - tmp65; + X[4 * iostride] = K1_414213562 * (tmp63 - tmp66); + X[12 * iostride] = -(K1_414213562 * (tmp63 + tmp66)); + { + fftw_real tmp61; + fftw_real tmp62; + fftw_real tmp55; + fftw_real tmp60; + ASSERT_ALIGNED_DOUBLE; + tmp61 = tmp51 - tmp54; + tmp62 = tmp59 - tmp56; + X[6 * iostride] = (K765366864 * tmp61) - (K1_847759065 * tmp62); + X[14 * iostride] = -((K1_847759065 * tmp61) + (K765366864 * tmp62)); + tmp55 = tmp51 + tmp54; + tmp60 = tmp56 + tmp59; + X[2 * iostride] = (K1_847759065 * tmp55) - (K765366864 * tmp60); + X[10 * iostride] = -((K765366864 * tmp55) + (K1_847759065 * tmp60)); + } + { + fftw_real tmp45; + fftw_real tmp49; + fftw_real tmp48; + fftw_real tmp50; + fftw_real tmp44; + fftw_real tmp46; + ASSERT_ALIGNED_DOUBLE; + tmp44 = K707106781 * (tmp32 + tmp33); + tmp45 = tmp43 - tmp44; + tmp49 = tmp43 + tmp44; + tmp46 = K707106781 * (tmp24 - tmp29); + tmp48 = tmp46 + tmp47; + tmp50 = tmp47 - tmp46; + X[3 * iostride] = (K1_662939224 * tmp45) - (K1_111140466 * tmp48); + X[11 * iostride] = -((K1_111140466 * tmp45) + (K1_662939224 * tmp48)); + X[7 * iostride] = (K390180644 * tmp49) - (K1_961570560 * tmp50); + X[15 * iostride] = -((K1_961570560 * tmp49) + (K390180644 * tmp50)); + } + { + fftw_real tmp31; + fftw_real tmp41; + fftw_real tmp40; + fftw_real tmp42; + fftw_real tmp30; + fftw_real tmp34; + ASSERT_ALIGNED_DOUBLE; + tmp30 = K707106781 * (tmp24 + tmp29); + tmp31 = tmp19 + tmp30; + tmp41 = tmp19 - tmp30; + tmp34 = K707106781 * (tmp32 - tmp33); + tmp40 = tmp34 + tmp39; + tmp42 = tmp39 - tmp34; + X[iostride] = (K1_961570560 * tmp31) - (K390180644 * tmp40); + X[9 * iostride] = -((K390180644 * tmp31) + (K1_961570560 * tmp40)); + X[5 * iostride] = (K1_111140466 * tmp41) - (K1_662939224 * tmp42); + X[13 * iostride] = -((K1_662939224 * tmp41) + (K1_111140466 * tmp42)); + } + } +} + +static const int twiddle_order[] = +{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; +fftw_codelet_desc fftw_hc2hc_backward_16_desc = +{ + "fftw_hc2hc_backward_16", + (void (*)()) fftw_hc2hc_backward_16, + 16, + FFTW_BACKWARD, + FFTW_HC2HC, + 366, + 15, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/fhb_2.c b/src/sndobj/rfftw/fhb_2.c new file mode 100644 index 0000000..fbf786b --- /dev/null +++ b/src/sndobj/rfftw/fhb_2.c @@ -0,0 +1,106 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:45:09 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-backward 2 */ + +/* + * This function contains 8 FP additions, 6 FP multiplications, + * (or, 6 additions, 4 multiplications, 2 fused multiply/add), + * 11 stack variables, and 16 memory accesses + */ +static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); + +/* + * Generator Id's : + * $Id: fhb_2.c,v 1.1.1.1 2006/05/12 15:15:01 veplaini Exp $ + * $Id: fhb_2.c,v 1.1.1.1 2006/05/12 15:15:01 veplaini Exp $ + * $Id: fhb_2.c,v 1.1.1.1 2006/05/12 15:15:01 veplaini Exp $ + */ + +void fftw_hc2hc_backward_2(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_real *X; + fftw_real *Y; + X = A; + Y = A + (2 * iostride); + { + fftw_real tmp11; + fftw_real tmp12; + ASSERT_ALIGNED_DOUBLE; + tmp11 = X[0]; + tmp12 = X[iostride]; + X[iostride] = tmp11 - tmp12; + X[0] = tmp11 + tmp12; + } + X = X + dist; + Y = Y - dist; + for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 1) { + fftw_real tmp3; + fftw_real tmp4; + fftw_real tmp8; + fftw_real tmp5; + fftw_real tmp6; + fftw_real tmp10; + fftw_real tmp7; + fftw_real tmp9; + ASSERT_ALIGNED_DOUBLE; + tmp3 = X[0]; + tmp4 = Y[-iostride]; + tmp8 = tmp3 - tmp4; + tmp5 = Y[0]; + tmp6 = X[iostride]; + tmp10 = tmp5 + tmp6; + X[0] = tmp3 + tmp4; + Y[-iostride] = tmp5 - tmp6; + tmp7 = c_re(W[0]); + tmp9 = c_im(W[0]); + X[iostride] = (tmp7 * tmp8) + (tmp9 * tmp10); + Y[0] = (tmp7 * tmp10) - (tmp9 * tmp8); + } + if (i == m) { + fftw_real tmp1; + fftw_real tmp2; + ASSERT_ALIGNED_DOUBLE; + tmp1 = X[0]; + X[0] = K2_000000000 * tmp1; + tmp2 = Y[0]; + X[iostride] = -(K2_000000000 * tmp2); + } +} + +static const int twiddle_order[] = +{1}; +fftw_codelet_desc fftw_hc2hc_backward_2_desc = +{ + "fftw_hc2hc_backward_2", + (void (*)()) fftw_hc2hc_backward_2, + 2, + FFTW_BACKWARD, + FFTW_HC2HC, + 58, + 1, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/fhb_3.c b/src/sndobj/rfftw/fhb_3.c new file mode 100644 index 0000000..abde8d0 --- /dev/null +++ b/src/sndobj/rfftw/fhb_3.c @@ -0,0 +1,158 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:45:09 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-backward 3 */ + +/* + * This function contains 24 FP additions, 16 FP multiplications, + * (or, 16 additions, 8 multiplications, 8 fused multiply/add), + * 15 stack variables, and 24 memory accesses + */ +static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); +static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); +static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); +static const fftw_real K1_732050807 = FFTW_KONST(+1.732050807568877293527446341505872366942805254); + +/* + * Generator Id's : + * $Id: fhb_3.c,v 1.1.1.1 2006/05/12 15:14:52 veplaini Exp $ + * $Id: fhb_3.c,v 1.1.1.1 2006/05/12 15:14:52 veplaini Exp $ + * $Id: fhb_3.c,v 1.1.1.1 2006/05/12 15:14:52 veplaini Exp $ + */ + +void fftw_hc2hc_backward_3(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_real *X; + fftw_real *Y; + X = A; + Y = A + (3 * iostride); + { + fftw_real tmp30; + fftw_real tmp26; + fftw_real tmp27; + fftw_real tmp28; + fftw_real tmp29; + ASSERT_ALIGNED_DOUBLE; + tmp29 = Y[-iostride]; + tmp30 = K1_732050807 * tmp29; + tmp26 = X[0]; + tmp27 = X[iostride]; + tmp28 = tmp26 - tmp27; + X[0] = tmp26 + (K2_000000000 * tmp27); + X[iostride] = tmp28 - tmp30; + X[2 * iostride] = tmp28 + tmp30; + } + X = X + dist; + Y = Y - dist; + for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 2) { + fftw_real tmp6; + fftw_real tmp9; + fftw_real tmp15; + fftw_real tmp19; + fftw_real tmp10; + fftw_real tmp13; + fftw_real tmp16; + fftw_real tmp20; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp7; + fftw_real tmp8; + fftw_real tmp11; + fftw_real tmp12; + ASSERT_ALIGNED_DOUBLE; + tmp6 = X[0]; + tmp7 = X[iostride]; + tmp8 = Y[-2 * iostride]; + tmp9 = tmp7 + tmp8; + tmp15 = K866025403 * (tmp7 - tmp8); + tmp19 = tmp6 - (K500000000 * tmp9); + tmp10 = Y[0]; + tmp11 = Y[-iostride]; + tmp12 = X[2 * iostride]; + tmp13 = tmp11 - tmp12; + tmp16 = tmp10 - (K500000000 * tmp13); + tmp20 = K866025403 * (tmp11 + tmp12); + } + X[0] = tmp6 + tmp9; + { + fftw_real tmp23; + fftw_real tmp25; + fftw_real tmp22; + fftw_real tmp24; + ASSERT_ALIGNED_DOUBLE; + tmp23 = tmp16 - tmp15; + tmp25 = tmp19 + tmp20; + tmp22 = c_re(W[1]); + tmp24 = c_im(W[1]); + Y[0] = (tmp22 * tmp23) - (tmp24 * tmp25); + X[2 * iostride] = (tmp24 * tmp23) + (tmp22 * tmp25); + } + Y[-2 * iostride] = tmp10 + tmp13; + { + fftw_real tmp17; + fftw_real tmp21; + fftw_real tmp14; + fftw_real tmp18; + ASSERT_ALIGNED_DOUBLE; + tmp17 = tmp15 + tmp16; + tmp21 = tmp19 - tmp20; + tmp14 = c_re(W[0]); + tmp18 = c_im(W[0]); + Y[-iostride] = (tmp14 * tmp17) - (tmp18 * tmp21); + X[iostride] = (tmp18 * tmp17) + (tmp14 * tmp21); + } + } + if (i == m) { + fftw_real tmp5; + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp3; + fftw_real tmp4; + ASSERT_ALIGNED_DOUBLE; + tmp4 = Y[0]; + tmp5 = K1_732050807 * tmp4; + tmp1 = X[iostride]; + tmp2 = X[0]; + tmp3 = tmp2 - tmp1; + X[0] = tmp1 + (K2_000000000 * tmp2); + X[2 * iostride] = -(tmp3 + tmp5); + X[iostride] = tmp3 - tmp5; + } +} + +static const int twiddle_order[] = +{1, 2}; +fftw_codelet_desc fftw_hc2hc_backward_3_desc = +{ + "fftw_hc2hc_backward_3", + (void (*)()) fftw_hc2hc_backward_3, + 3, + FFTW_BACKWARD, + FFTW_HC2HC, + 80, + 2, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/fhb_32.c b/src/sndobj/rfftw/fhb_32.c new file mode 100644 index 0000000..7ba3270 --- /dev/null +++ b/src/sndobj/rfftw/fhb_32.c @@ -0,0 +1,2303 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:45:18 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-backward 32 */ + +/* + * This function contains 764 FP additions, 346 FP multiplications, + * (or, 618 additions, 200 multiplications, 146 fused multiply/add), + * 93 stack variables, and 256 memory accesses + */ +static const fftw_real K1_662939224 = FFTW_KONST(+1.662939224605090474157576755235811513477121624); +static const fftw_real K1_111140466 = FFTW_KONST(+1.111140466039204449485661627897065748749874382); +static const fftw_real K390180644 = FFTW_KONST(+0.390180644032256535696569736954044481855383236); +static const fftw_real K1_961570560 = FFTW_KONST(+1.961570560806460898252364472268478073947867462); +static const fftw_real K1_913880671 = FFTW_KONST(+1.913880671464417729871595773960539938965698411); +static const fftw_real K580569354 = FFTW_KONST(+0.580569354508924735272384751634790549382952557); +static const fftw_real K942793473 = FFTW_KONST(+0.942793473651995297112775251810508755314920638); +static const fftw_real K1_763842528 = FFTW_KONST(+1.763842528696710059425513727320776699016885241); +static const fftw_real K1_546020906 = FFTW_KONST(+1.546020906725473921621813219516939601942082586); +static const fftw_real K1_268786568 = FFTW_KONST(+1.268786568327290996430343226450986741351374190); +static const fftw_real K196034280 = FFTW_KONST(+0.196034280659121203988391127777283691722273346); +static const fftw_real K1_990369453 = FFTW_KONST(+1.990369453344393772489673906218959843150949737); +static const fftw_real K382683432 = FFTW_KONST(+0.382683432365089771728459984030398866761344562); +static const fftw_real K923879532 = FFTW_KONST(+0.923879532511286756128183189396788286822416626); +static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); +static const fftw_real K765366864 = FFTW_KONST(+0.765366864730179543456919968060797733522689125); +static const fftw_real K1_847759065 = FFTW_KONST(+1.847759065022573512256366378793576573644833252); +static const fftw_real K555570233 = FFTW_KONST(+0.555570233019602224742830813948532874374937191); +static const fftw_real K831469612 = FFTW_KONST(+0.831469612302545237078788377617905756738560812); +static const fftw_real K195090322 = FFTW_KONST(+0.195090322016128267848284868477022240927691618); +static const fftw_real K980785280 = FFTW_KONST(+0.980785280403230449126182236134239036973933731); +static const fftw_real K1_414213562 = FFTW_KONST(+1.414213562373095048801688724209698078569671875); +static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); + +/* + * Generator Id's : + * $Id: fhb_32.c,v 1.1.1.1 2006/05/12 15:14:57 veplaini Exp $ + * $Id: fhb_32.c,v 1.1.1.1 2006/05/12 15:14:57 veplaini Exp $ + * $Id: fhb_32.c,v 1.1.1.1 2006/05/12 15:14:57 veplaini Exp $ + */ + +void fftw_hc2hc_backward_32(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_real *X; + fftw_real *Y; + X = A; + Y = A + (32 * iostride); + { + fftw_real tmp679; + fftw_real tmp804; + fftw_real tmp766; + fftw_real tmp707; + fftw_real tmp702; + fftw_real tmp728; + fftw_real tmp726; + fftw_real tmp753; + fftw_real tmp815; + fftw_real tmp819; + fftw_real tmp789; + fftw_real tmp793; + fftw_real tmp676; + fftw_real tmp704; + fftw_real tmp763; + fftw_real tmp803; + fftw_real tmp687; + fftw_real tmp709; + fftw_real tmp716; + fftw_real tmp749; + fftw_real tmp770; + fftw_real tmp806; + fftw_real tmp773; + fftw_real tmp807; + fftw_real tmp695; + fftw_real tmp719; + fftw_real tmp735; + fftw_real tmp752; + fftw_real tmp812; + fftw_real tmp818; + fftw_real tmp782; + fftw_real tmp792; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp677; + fftw_real tmp678; + fftw_real tmp764; + fftw_real tmp705; + fftw_real tmp706; + fftw_real tmp765; + ASSERT_ALIGNED_DOUBLE; + tmp677 = X[4 * iostride]; + tmp678 = X[12 * iostride]; + tmp764 = tmp677 - tmp678; + tmp705 = Y[-4 * iostride]; + tmp706 = Y[-12 * iostride]; + tmp765 = tmp706 + tmp705; + tmp679 = K2_000000000 * (tmp677 + tmp678); + tmp804 = K1_414213562 * (tmp764 + tmp765); + tmp766 = K1_414213562 * (tmp764 - tmp765); + tmp707 = K2_000000000 * (tmp705 - tmp706); + } + { + fftw_real tmp698; + fftw_real tmp783; + fftw_real tmp725; + fftw_real tmp787; + fftw_real tmp701; + fftw_real tmp786; + fftw_real tmp722; + fftw_real tmp784; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp696; + fftw_real tmp697; + fftw_real tmp723; + fftw_real tmp724; + ASSERT_ALIGNED_DOUBLE; + tmp696 = X[3 * iostride]; + tmp697 = X[13 * iostride]; + tmp698 = tmp696 + tmp697; + tmp783 = tmp696 - tmp697; + tmp723 = Y[-3 * iostride]; + tmp724 = Y[-13 * iostride]; + tmp725 = tmp723 - tmp724; + tmp787 = tmp723 + tmp724; + } + { + fftw_real tmp699; + fftw_real tmp700; + fftw_real tmp720; + fftw_real tmp721; + ASSERT_ALIGNED_DOUBLE; + tmp699 = X[5 * iostride]; + tmp700 = X[11 * iostride]; + tmp701 = tmp699 + tmp700; + tmp786 = tmp700 - tmp699; + tmp720 = Y[-5 * iostride]; + tmp721 = Y[-11 * iostride]; + tmp722 = tmp720 - tmp721; + tmp784 = tmp721 + tmp720; + } + tmp702 = tmp698 + tmp701; + tmp728 = tmp701 - tmp698; + tmp726 = tmp722 + tmp725; + tmp753 = tmp725 - tmp722; + { + fftw_real tmp813; + fftw_real tmp814; + fftw_real tmp785; + fftw_real tmp788; + ASSERT_ALIGNED_DOUBLE; + tmp813 = tmp783 + tmp784; + tmp814 = tmp787 - tmp786; + tmp815 = (K980785280 * tmp813) - (K195090322 * tmp814); + tmp819 = (K195090322 * tmp813) + (K980785280 * tmp814); + tmp785 = tmp783 - tmp784; + tmp788 = tmp786 + tmp787; + tmp789 = (K831469612 * tmp785) - (K555570233 * tmp788); + tmp793 = (K555570233 * tmp785) + (K831469612 * tmp788); + } + } + { + fftw_real tmp675; + fftw_real tmp762; + fftw_real tmp673; + fftw_real tmp760; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp674; + fftw_real tmp761; + fftw_real tmp671; + fftw_real tmp672; + ASSERT_ALIGNED_DOUBLE; + tmp674 = X[8 * iostride]; + tmp675 = K2_000000000 * tmp674; + tmp761 = Y[-8 * iostride]; + tmp762 = K2_000000000 * tmp761; + tmp671 = X[0]; + tmp672 = X[16 * iostride]; + tmp673 = tmp671 + tmp672; + tmp760 = tmp671 - tmp672; + } + tmp676 = tmp673 + tmp675; + tmp704 = tmp673 - tmp675; + tmp763 = tmp760 - tmp762; + tmp803 = tmp760 + tmp762; + } + { + fftw_real tmp683; + fftw_real tmp768; + fftw_real tmp715; + fftw_real tmp772; + fftw_real tmp686; + fftw_real tmp771; + fftw_real tmp712; + fftw_real tmp769; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp681; + fftw_real tmp682; + fftw_real tmp713; + fftw_real tmp714; + ASSERT_ALIGNED_DOUBLE; + tmp681 = X[2 * iostride]; + tmp682 = X[14 * iostride]; + tmp683 = tmp681 + tmp682; + tmp768 = tmp681 - tmp682; + tmp713 = Y[-2 * iostride]; + tmp714 = Y[-14 * iostride]; + tmp715 = tmp713 - tmp714; + tmp772 = tmp713 + tmp714; + } + { + fftw_real tmp684; + fftw_real tmp685; + fftw_real tmp710; + fftw_real tmp711; + ASSERT_ALIGNED_DOUBLE; + tmp684 = X[6 * iostride]; + tmp685 = X[10 * iostride]; + tmp686 = tmp684 + tmp685; + tmp771 = tmp685 - tmp684; + tmp710 = Y[-6 * iostride]; + tmp711 = Y[-10 * iostride]; + tmp712 = tmp710 - tmp711; + tmp769 = tmp711 + tmp710; + } + tmp687 = K2_000000000 * (tmp683 + tmp686); + tmp709 = tmp683 - tmp686; + tmp716 = tmp712 + tmp715; + tmp749 = K2_000000000 * (tmp715 - tmp712); + tmp770 = tmp768 - tmp769; + tmp806 = tmp768 + tmp769; + tmp773 = tmp771 + tmp772; + tmp807 = tmp772 - tmp771; + } + { + fftw_real tmp691; + fftw_real tmp776; + fftw_real tmp734; + fftw_real tmp780; + fftw_real tmp694; + fftw_real tmp779; + fftw_real tmp731; + fftw_real tmp777; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp689; + fftw_real tmp690; + fftw_real tmp732; + fftw_real tmp733; + ASSERT_ALIGNED_DOUBLE; + tmp689 = X[iostride]; + tmp690 = X[15 * iostride]; + tmp691 = tmp689 + tmp690; + tmp776 = tmp689 - tmp690; + tmp732 = Y[-iostride]; + tmp733 = Y[-15 * iostride]; + tmp734 = tmp732 - tmp733; + tmp780 = tmp732 + tmp733; + } + { + fftw_real tmp692; + fftw_real tmp693; + fftw_real tmp729; + fftw_real tmp730; + ASSERT_ALIGNED_DOUBLE; + tmp692 = X[7 * iostride]; + tmp693 = X[9 * iostride]; + tmp694 = tmp692 + tmp693; + tmp779 = tmp693 - tmp692; + tmp729 = Y[-7 * iostride]; + tmp730 = Y[-9 * iostride]; + tmp731 = tmp729 - tmp730; + tmp777 = tmp730 + tmp729; + } + tmp695 = tmp691 + tmp694; + tmp719 = tmp691 - tmp694; + tmp735 = tmp731 + tmp734; + tmp752 = tmp734 - tmp731; + { + fftw_real tmp810; + fftw_real tmp811; + fftw_real tmp778; + fftw_real tmp781; + ASSERT_ALIGNED_DOUBLE; + tmp810 = tmp776 + tmp777; + tmp811 = tmp780 - tmp779; + tmp812 = (K555570233 * tmp810) + (K831469612 * tmp811); + tmp818 = (K831469612 * tmp810) - (K555570233 * tmp811); + tmp778 = tmp776 - tmp777; + tmp781 = tmp779 + tmp780; + tmp782 = (K980785280 * tmp778) - (K195090322 * tmp781); + tmp792 = (K195090322 * tmp778) + (K980785280 * tmp781); + } + } + { + fftw_real tmp703; + fftw_real tmp759; + fftw_real tmp688; + fftw_real tmp758; + fftw_real tmp680; + ASSERT_ALIGNED_DOUBLE; + tmp703 = K2_000000000 * (tmp695 + tmp702); + tmp759 = K2_000000000 * (tmp752 - tmp753); + tmp680 = tmp676 + tmp679; + tmp688 = tmp680 + tmp687; + tmp758 = tmp680 - tmp687; + X[16 * iostride] = tmp688 - tmp703; + X[0] = tmp688 + tmp703; + X[24 * iostride] = tmp758 + tmp759; + X[8 * iostride] = tmp758 - tmp759; + } + { + fftw_real tmp750; + fftw_real tmp756; + fftw_real tmp755; + fftw_real tmp757; + fftw_real tmp748; + fftw_real tmp751; + fftw_real tmp754; + ASSERT_ALIGNED_DOUBLE; + tmp748 = tmp676 - tmp679; + tmp750 = tmp748 - tmp749; + tmp756 = tmp748 + tmp749; + tmp751 = tmp695 - tmp702; + tmp754 = tmp752 + tmp753; + tmp755 = K1_414213562 * (tmp751 - tmp754); + tmp757 = K1_414213562 * (tmp751 + tmp754); + X[20 * iostride] = tmp750 - tmp755; + X[4 * iostride] = tmp750 + tmp755; + X[12 * iostride] = tmp756 - tmp757; + X[28 * iostride] = tmp756 + tmp757; + } + { + fftw_real tmp718; + fftw_real tmp738; + fftw_real tmp737; + fftw_real tmp739; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp708; + fftw_real tmp717; + fftw_real tmp727; + fftw_real tmp736; + ASSERT_ALIGNED_DOUBLE; + tmp708 = tmp704 - tmp707; + tmp717 = K1_414213562 * (tmp709 - tmp716); + tmp718 = tmp708 + tmp717; + tmp738 = tmp708 - tmp717; + tmp727 = tmp719 - tmp726; + tmp736 = tmp728 + tmp735; + tmp737 = (K1_847759065 * tmp727) - (K765366864 * tmp736); + tmp739 = (K1_847759065 * tmp736) + (K765366864 * tmp727); + } + X[18 * iostride] = tmp718 - tmp737; + X[2 * iostride] = tmp718 + tmp737; + X[10 * iostride] = tmp738 - tmp739; + X[26 * iostride] = tmp738 + tmp739; + } + { + fftw_real tmp742; + fftw_real tmp746; + fftw_real tmp745; + fftw_real tmp747; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp740; + fftw_real tmp741; + fftw_real tmp743; + fftw_real tmp744; + ASSERT_ALIGNED_DOUBLE; + tmp740 = tmp704 + tmp707; + tmp741 = K1_414213562 * (tmp709 + tmp716); + tmp742 = tmp740 - tmp741; + tmp746 = tmp740 + tmp741; + tmp743 = tmp719 + tmp726; + tmp744 = tmp735 - tmp728; + tmp745 = (K765366864 * tmp743) - (K1_847759065 * tmp744); + tmp747 = (K765366864 * tmp744) + (K1_847759065 * tmp743); + } + X[22 * iostride] = tmp742 - tmp745; + X[6 * iostride] = tmp742 + tmp745; + X[14 * iostride] = tmp746 - tmp747; + X[30 * iostride] = tmp746 + tmp747; + } + { + fftw_real tmp790; + fftw_real tmp794; + fftw_real tmp775; + fftw_real tmp791; + fftw_real tmp767; + fftw_real tmp774; + ASSERT_ALIGNED_DOUBLE; + tmp790 = K2_000000000 * (tmp782 + tmp789); + tmp794 = K2_000000000 * (tmp792 - tmp793); + tmp767 = tmp763 + tmp766; + tmp774 = (K1_847759065 * tmp770) - (K765366864 * tmp773); + tmp775 = tmp767 + tmp774; + tmp791 = tmp767 - tmp774; + X[17 * iostride] = tmp775 - tmp790; + X[iostride] = tmp775 + tmp790; + X[9 * iostride] = tmp791 - tmp794; + X[25 * iostride] = tmp791 + tmp794; + } + { + fftw_real tmp797; + fftw_real tmp801; + fftw_real tmp800; + fftw_real tmp802; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp795; + fftw_real tmp796; + fftw_real tmp798; + fftw_real tmp799; + ASSERT_ALIGNED_DOUBLE; + tmp795 = tmp763 - tmp766; + tmp796 = (K765366864 * tmp770) + (K1_847759065 * tmp773); + tmp797 = tmp795 - tmp796; + tmp801 = tmp795 + tmp796; + tmp798 = tmp782 - tmp789; + tmp799 = tmp792 + tmp793; + tmp800 = K1_414213562 * (tmp798 - tmp799); + tmp802 = K1_414213562 * (tmp798 + tmp799); + } + X[21 * iostride] = tmp797 - tmp800; + X[5 * iostride] = tmp797 + tmp800; + X[13 * iostride] = tmp801 - tmp802; + X[29 * iostride] = tmp801 + tmp802; + } + { + fftw_real tmp816; + fftw_real tmp820; + fftw_real tmp809; + fftw_real tmp817; + fftw_real tmp805; + fftw_real tmp808; + ASSERT_ALIGNED_DOUBLE; + tmp816 = K2_000000000 * (tmp812 - tmp815); + tmp820 = K2_000000000 * (tmp818 - tmp819); + tmp805 = tmp803 - tmp804; + tmp808 = (K765366864 * tmp806) - (K1_847759065 * tmp807); + tmp809 = tmp805 - tmp808; + tmp817 = tmp805 + tmp808; + X[11 * iostride] = tmp809 - tmp816; + X[27 * iostride] = tmp809 + tmp816; + X[19 * iostride] = tmp817 - tmp820; + X[3 * iostride] = tmp817 + tmp820; + } + { + fftw_real tmp823; + fftw_real tmp827; + fftw_real tmp826; + fftw_real tmp828; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp821; + fftw_real tmp822; + fftw_real tmp824; + fftw_real tmp825; + ASSERT_ALIGNED_DOUBLE; + tmp821 = tmp803 + tmp804; + tmp822 = (K1_847759065 * tmp806) + (K765366864 * tmp807); + tmp823 = tmp821 - tmp822; + tmp827 = tmp821 + tmp822; + tmp824 = tmp818 + tmp819; + tmp825 = tmp812 + tmp815; + tmp826 = K1_414213562 * (tmp824 - tmp825); + tmp828 = K1_414213562 * (tmp825 + tmp824); + } + X[23 * iostride] = tmp823 - tmp826; + X[7 * iostride] = tmp823 + tmp826; + X[15 * iostride] = tmp827 - tmp828; + X[31 * iostride] = tmp827 + tmp828; + } + } + X = X + dist; + Y = Y - dist; + for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 31) { + fftw_real tmp446; + fftw_real tmp580; + fftw_real tmp189; + fftw_real tmp238; + fftw_real tmp382; + fftw_real tmp420; + fftw_real tmp307; + fftw_real tmp332; + fftw_real tmp514; + fftw_real tmp608; + fftw_real tmp354; + fftw_real tmp408; + fftw_real tmp453; + fftw_real tmp609; + fftw_real tmp517; + fftw_real tmp581; + fftw_real tmp235; + fftw_real tmp272; + fftw_real tmp365; + fftw_real tmp411; + fftw_real tmp287; + fftw_real tmp336; + fftw_real tmp368; + fftw_real tmp412; + fftw_real tmp500; + fftw_real tmp550; + fftw_real tmp593; + fftw_real tmp643; + fftw_real tmp507; + fftw_real tmp551; + fftw_real tmp596; + fftw_real tmp642; + fftw_real tmp204; + fftw_real tmp292; + fftw_real tmp357; + fftw_real tmp384; + fftw_real tmp253; + fftw_real tmp333; + fftw_real tmp360; + fftw_real tmp383; + fftw_real tmp461; + fftw_real tmp520; + fftw_real tmp588; + fftw_real tmp612; + fftw_real tmp468; + fftw_real tmp519; + fftw_real tmp585; + fftw_real tmp611; + fftw_real tmp220; + fftw_real tmp255; + fftw_real tmp372; + fftw_real tmp414; + fftw_real tmp270; + fftw_real tmp335; + fftw_real tmp375; + fftw_real tmp415; + fftw_real tmp481; + fftw_real tmp547; + fftw_real tmp600; + fftw_real tmp640; + fftw_real tmp488; + fftw_real tmp548; + fftw_real tmp603; + fftw_real tmp639; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp177; + fftw_real tmp444; + fftw_real tmp295; + fftw_real tmp513; + fftw_real tmp180; + fftw_real tmp512; + fftw_real tmp298; + fftw_real tmp445; + fftw_real tmp184; + fftw_real tmp447; + fftw_real tmp302; + fftw_real tmp448; + fftw_real tmp187; + fftw_real tmp450; + fftw_real tmp305; + fftw_real tmp451; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp175; + fftw_real tmp176; + fftw_real tmp293; + fftw_real tmp294; + ASSERT_ALIGNED_DOUBLE; + tmp175 = X[0]; + tmp176 = Y[-16 * iostride]; + tmp177 = tmp175 + tmp176; + tmp444 = tmp175 - tmp176; + tmp293 = Y[0]; + tmp294 = X[16 * iostride]; + tmp295 = tmp293 - tmp294; + tmp513 = tmp293 + tmp294; + } + { + fftw_real tmp178; + fftw_real tmp179; + fftw_real tmp296; + fftw_real tmp297; + ASSERT_ALIGNED_DOUBLE; + tmp178 = X[8 * iostride]; + tmp179 = Y[-24 * iostride]; + tmp180 = tmp178 + tmp179; + tmp512 = tmp178 - tmp179; + tmp296 = Y[-8 * iostride]; + tmp297 = X[24 * iostride]; + tmp298 = tmp296 - tmp297; + tmp445 = tmp296 + tmp297; + } + { + fftw_real tmp182; + fftw_real tmp183; + fftw_real tmp300; + fftw_real tmp301; + ASSERT_ALIGNED_DOUBLE; + tmp182 = X[4 * iostride]; + tmp183 = Y[-20 * iostride]; + tmp184 = tmp182 + tmp183; + tmp447 = tmp182 - tmp183; + tmp300 = Y[-4 * iostride]; + tmp301 = X[20 * iostride]; + tmp302 = tmp300 - tmp301; + tmp448 = tmp300 + tmp301; + } + { + fftw_real tmp185; + fftw_real tmp186; + fftw_real tmp303; + fftw_real tmp304; + ASSERT_ALIGNED_DOUBLE; + tmp185 = Y[-28 * iostride]; + tmp186 = X[12 * iostride]; + tmp187 = tmp185 + tmp186; + tmp450 = tmp185 - tmp186; + tmp303 = Y[-12 * iostride]; + tmp304 = X[28 * iostride]; + tmp305 = tmp303 - tmp304; + tmp451 = tmp303 + tmp304; + } + { + fftw_real tmp181; + fftw_real tmp188; + fftw_real tmp352; + fftw_real tmp353; + ASSERT_ALIGNED_DOUBLE; + tmp446 = tmp444 - tmp445; + tmp580 = tmp444 + tmp445; + tmp181 = tmp177 + tmp180; + tmp188 = tmp184 + tmp187; + tmp189 = tmp181 + tmp188; + tmp238 = tmp181 - tmp188; + { + fftw_real tmp380; + fftw_real tmp381; + fftw_real tmp299; + fftw_real tmp306; + ASSERT_ALIGNED_DOUBLE; + tmp380 = tmp295 - tmp298; + tmp381 = tmp184 - tmp187; + tmp382 = tmp380 - tmp381; + tmp420 = tmp381 + tmp380; + tmp299 = tmp295 + tmp298; + tmp306 = tmp302 + tmp305; + tmp307 = tmp299 - tmp306; + tmp332 = tmp299 + tmp306; + } + tmp514 = tmp512 + tmp513; + tmp608 = tmp513 - tmp512; + tmp352 = tmp177 - tmp180; + tmp353 = tmp305 - tmp302; + tmp354 = tmp352 - tmp353; + tmp408 = tmp352 + tmp353; + { + fftw_real tmp449; + fftw_real tmp452; + fftw_real tmp515; + fftw_real tmp516; + ASSERT_ALIGNED_DOUBLE; + tmp449 = tmp447 - tmp448; + tmp452 = tmp450 - tmp451; + tmp453 = K707106781 * (tmp449 + tmp452); + tmp609 = K707106781 * (tmp449 - tmp452); + tmp515 = tmp447 + tmp448; + tmp516 = tmp450 + tmp451; + tmp517 = K707106781 * (tmp515 - tmp516); + tmp581 = K707106781 * (tmp515 + tmp516); + } + } + } + { + fftw_real tmp223; + fftw_real tmp490; + fftw_real tmp275; + fftw_real tmp502; + fftw_real tmp226; + fftw_real tmp501; + fftw_real tmp278; + fftw_real tmp491; + fftw_real tmp233; + fftw_real tmp505; + fftw_real tmp498; + fftw_real tmp285; + fftw_real tmp230; + fftw_real tmp504; + fftw_real tmp495; + fftw_real tmp282; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp221; + fftw_real tmp222; + fftw_real tmp276; + fftw_real tmp277; + ASSERT_ALIGNED_DOUBLE; + tmp221 = Y[-31 * iostride]; + tmp222 = X[15 * iostride]; + tmp223 = tmp221 + tmp222; + tmp490 = tmp221 - tmp222; + { + fftw_real tmp273; + fftw_real tmp274; + fftw_real tmp224; + fftw_real tmp225; + ASSERT_ALIGNED_DOUBLE; + tmp273 = Y[-15 * iostride]; + tmp274 = X[31 * iostride]; + tmp275 = tmp273 - tmp274; + tmp502 = tmp273 + tmp274; + tmp224 = X[7 * iostride]; + tmp225 = Y[-23 * iostride]; + tmp226 = tmp224 + tmp225; + tmp501 = tmp224 - tmp225; + } + tmp276 = Y[-7 * iostride]; + tmp277 = X[23 * iostride]; + tmp278 = tmp276 - tmp277; + tmp491 = tmp276 + tmp277; + { + fftw_real tmp231; + fftw_real tmp232; + fftw_real tmp496; + fftw_real tmp283; + fftw_real tmp284; + fftw_real tmp497; + ASSERT_ALIGNED_DOUBLE; + tmp231 = Y[-27 * iostride]; + tmp232 = X[11 * iostride]; + tmp496 = tmp231 - tmp232; + tmp283 = Y[-11 * iostride]; + tmp284 = X[27 * iostride]; + tmp497 = tmp283 + tmp284; + tmp233 = tmp231 + tmp232; + tmp505 = tmp496 + tmp497; + tmp498 = tmp496 - tmp497; + tmp285 = tmp283 - tmp284; + } + { + fftw_real tmp228; + fftw_real tmp229; + fftw_real tmp493; + fftw_real tmp280; + fftw_real tmp281; + fftw_real tmp494; + ASSERT_ALIGNED_DOUBLE; + tmp228 = X[3 * iostride]; + tmp229 = Y[-19 * iostride]; + tmp493 = tmp228 - tmp229; + tmp280 = Y[-3 * iostride]; + tmp281 = X[19 * iostride]; + tmp494 = tmp280 + tmp281; + tmp230 = tmp228 + tmp229; + tmp504 = tmp493 + tmp494; + tmp495 = tmp493 - tmp494; + tmp282 = tmp280 - tmp281; + } + } + { + fftw_real tmp227; + fftw_real tmp234; + fftw_real tmp363; + fftw_real tmp364; + ASSERT_ALIGNED_DOUBLE; + tmp227 = tmp223 + tmp226; + tmp234 = tmp230 + tmp233; + tmp235 = tmp227 + tmp234; + tmp272 = tmp227 - tmp234; + tmp363 = tmp275 - tmp278; + tmp364 = tmp230 - tmp233; + tmp365 = tmp363 - tmp364; + tmp411 = tmp364 + tmp363; + } + { + fftw_real tmp279; + fftw_real tmp286; + fftw_real tmp366; + fftw_real tmp367; + ASSERT_ALIGNED_DOUBLE; + tmp279 = tmp275 + tmp278; + tmp286 = tmp282 + tmp285; + tmp287 = tmp279 - tmp286; + tmp336 = tmp279 + tmp286; + tmp366 = tmp223 - tmp226; + tmp367 = tmp285 - tmp282; + tmp368 = tmp366 - tmp367; + tmp412 = tmp366 + tmp367; + } + { + fftw_real tmp492; + fftw_real tmp499; + fftw_real tmp591; + fftw_real tmp592; + ASSERT_ALIGNED_DOUBLE; + tmp492 = tmp490 - tmp491; + tmp499 = K707106781 * (tmp495 + tmp498); + tmp500 = tmp492 - tmp499; + tmp550 = tmp492 + tmp499; + tmp591 = K707106781 * (tmp495 - tmp498); + tmp592 = tmp501 + tmp502; + tmp593 = tmp591 - tmp592; + tmp643 = tmp592 + tmp591; + } + { + fftw_real tmp503; + fftw_real tmp506; + fftw_real tmp594; + fftw_real tmp595; + ASSERT_ALIGNED_DOUBLE; + tmp503 = tmp501 - tmp502; + tmp506 = K707106781 * (tmp504 - tmp505); + tmp507 = tmp503 - tmp506; + tmp551 = tmp503 + tmp506; + tmp594 = tmp490 + tmp491; + tmp595 = K707106781 * (tmp504 + tmp505); + tmp596 = tmp594 - tmp595; + tmp642 = tmp594 + tmp595; + } + } + { + fftw_real tmp192; + fftw_real tmp465; + fftw_real tmp248; + fftw_real tmp463; + fftw_real tmp195; + fftw_real tmp462; + fftw_real tmp251; + fftw_real tmp466; + fftw_real tmp199; + fftw_real tmp458; + fftw_real tmp241; + fftw_real tmp456; + fftw_real tmp202; + fftw_real tmp455; + fftw_real tmp244; + fftw_real tmp459; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp190; + fftw_real tmp191; + fftw_real tmp246; + fftw_real tmp247; + ASSERT_ALIGNED_DOUBLE; + tmp190 = X[2 * iostride]; + tmp191 = Y[-18 * iostride]; + tmp192 = tmp190 + tmp191; + tmp465 = tmp190 - tmp191; + tmp246 = Y[-2 * iostride]; + tmp247 = X[18 * iostride]; + tmp248 = tmp246 - tmp247; + tmp463 = tmp246 + tmp247; + } + { + fftw_real tmp193; + fftw_real tmp194; + fftw_real tmp249; + fftw_real tmp250; + ASSERT_ALIGNED_DOUBLE; + tmp193 = X[10 * iostride]; + tmp194 = Y[-26 * iostride]; + tmp195 = tmp193 + tmp194; + tmp462 = tmp193 - tmp194; + tmp249 = Y[-10 * iostride]; + tmp250 = X[26 * iostride]; + tmp251 = tmp249 - tmp250; + tmp466 = tmp249 + tmp250; + } + { + fftw_real tmp197; + fftw_real tmp198; + fftw_real tmp239; + fftw_real tmp240; + ASSERT_ALIGNED_DOUBLE; + tmp197 = Y[-30 * iostride]; + tmp198 = X[14 * iostride]; + tmp199 = tmp197 + tmp198; + tmp458 = tmp197 - tmp198; + tmp239 = Y[-14 * iostride]; + tmp240 = X[30 * iostride]; + tmp241 = tmp239 - tmp240; + tmp456 = tmp239 + tmp240; + } + { + fftw_real tmp200; + fftw_real tmp201; + fftw_real tmp242; + fftw_real tmp243; + ASSERT_ALIGNED_DOUBLE; + tmp200 = X[6 * iostride]; + tmp201 = Y[-22 * iostride]; + tmp202 = tmp200 + tmp201; + tmp455 = tmp200 - tmp201; + tmp242 = Y[-6 * iostride]; + tmp243 = X[22 * iostride]; + tmp244 = tmp242 - tmp243; + tmp459 = tmp242 + tmp243; + } + { + fftw_real tmp196; + fftw_real tmp203; + fftw_real tmp355; + fftw_real tmp356; + ASSERT_ALIGNED_DOUBLE; + tmp196 = tmp192 + tmp195; + tmp203 = tmp199 + tmp202; + tmp204 = tmp196 + tmp203; + tmp292 = tmp196 - tmp203; + tmp355 = tmp241 - tmp244; + tmp356 = tmp199 - tmp202; + tmp357 = tmp355 - tmp356; + tmp384 = tmp356 + tmp355; + } + { + fftw_real tmp245; + fftw_real tmp252; + fftw_real tmp358; + fftw_real tmp359; + ASSERT_ALIGNED_DOUBLE; + tmp245 = tmp241 + tmp244; + tmp252 = tmp248 + tmp251; + tmp253 = tmp245 - tmp252; + tmp333 = tmp252 + tmp245; + tmp358 = tmp192 - tmp195; + tmp359 = tmp248 - tmp251; + tmp360 = tmp358 + tmp359; + tmp383 = tmp358 - tmp359; + } + { + fftw_real tmp457; + fftw_real tmp460; + fftw_real tmp586; + fftw_real tmp587; + ASSERT_ALIGNED_DOUBLE; + tmp457 = tmp455 - tmp456; + tmp460 = tmp458 - tmp459; + tmp461 = (K923879532 * tmp457) - (K382683432 * tmp460); + tmp520 = (K382683432 * tmp457) + (K923879532 * tmp460); + tmp586 = tmp458 + tmp459; + tmp587 = tmp455 + tmp456; + tmp588 = (K382683432 * tmp586) - (K923879532 * tmp587); + tmp612 = (K382683432 * tmp587) + (K923879532 * tmp586); + } + { + fftw_real tmp464; + fftw_real tmp467; + fftw_real tmp583; + fftw_real tmp584; + ASSERT_ALIGNED_DOUBLE; + tmp464 = tmp462 + tmp463; + tmp467 = tmp465 - tmp466; + tmp468 = (K923879532 * tmp464) + (K382683432 * tmp467); + tmp519 = (K923879532 * tmp467) - (K382683432 * tmp464); + tmp583 = tmp465 + tmp466; + tmp584 = tmp463 - tmp462; + tmp585 = (K382683432 * tmp583) - (K923879532 * tmp584); + tmp611 = (K382683432 * tmp584) + (K923879532 * tmp583); + } + } + { + fftw_real tmp208; + fftw_real tmp471; + fftw_real tmp258; + fftw_real tmp483; + fftw_real tmp211; + fftw_real tmp482; + fftw_real tmp261; + fftw_real tmp472; + fftw_real tmp218; + fftw_real tmp486; + fftw_real tmp479; + fftw_real tmp268; + fftw_real tmp215; + fftw_real tmp485; + fftw_real tmp476; + fftw_real tmp265; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp206; + fftw_real tmp207; + fftw_real tmp259; + fftw_real tmp260; + ASSERT_ALIGNED_DOUBLE; + tmp206 = X[iostride]; + tmp207 = Y[-17 * iostride]; + tmp208 = tmp206 + tmp207; + tmp471 = tmp206 - tmp207; + { + fftw_real tmp256; + fftw_real tmp257; + fftw_real tmp209; + fftw_real tmp210; + ASSERT_ALIGNED_DOUBLE; + tmp256 = Y[-iostride]; + tmp257 = X[17 * iostride]; + tmp258 = tmp256 - tmp257; + tmp483 = tmp256 + tmp257; + tmp209 = X[9 * iostride]; + tmp210 = Y[-25 * iostride]; + tmp211 = tmp209 + tmp210; + tmp482 = tmp209 - tmp210; + } + tmp259 = Y[-9 * iostride]; + tmp260 = X[25 * iostride]; + tmp261 = tmp259 - tmp260; + tmp472 = tmp259 + tmp260; + { + fftw_real tmp216; + fftw_real tmp217; + fftw_real tmp477; + fftw_real tmp266; + fftw_real tmp267; + fftw_real tmp478; + ASSERT_ALIGNED_DOUBLE; + tmp216 = Y[-29 * iostride]; + tmp217 = X[13 * iostride]; + tmp477 = tmp216 - tmp217; + tmp266 = Y[-13 * iostride]; + tmp267 = X[29 * iostride]; + tmp478 = tmp266 + tmp267; + tmp218 = tmp216 + tmp217; + tmp486 = tmp477 + tmp478; + tmp479 = tmp477 - tmp478; + tmp268 = tmp266 - tmp267; + } + { + fftw_real tmp213; + fftw_real tmp214; + fftw_real tmp474; + fftw_real tmp263; + fftw_real tmp264; + fftw_real tmp475; + ASSERT_ALIGNED_DOUBLE; + tmp213 = X[5 * iostride]; + tmp214 = Y[-21 * iostride]; + tmp474 = tmp213 - tmp214; + tmp263 = Y[-5 * iostride]; + tmp264 = X[21 * iostride]; + tmp475 = tmp263 + tmp264; + tmp215 = tmp213 + tmp214; + tmp485 = tmp474 + tmp475; + tmp476 = tmp474 - tmp475; + tmp265 = tmp263 - tmp264; + } + } + { + fftw_real tmp212; + fftw_real tmp219; + fftw_real tmp370; + fftw_real tmp371; + ASSERT_ALIGNED_DOUBLE; + tmp212 = tmp208 + tmp211; + tmp219 = tmp215 + tmp218; + tmp220 = tmp212 + tmp219; + tmp255 = tmp212 - tmp219; + tmp370 = tmp258 - tmp261; + tmp371 = tmp215 - tmp218; + tmp372 = tmp370 - tmp371; + tmp414 = tmp371 + tmp370; + } + { + fftw_real tmp262; + fftw_real tmp269; + fftw_real tmp373; + fftw_real tmp374; + ASSERT_ALIGNED_DOUBLE; + tmp262 = tmp258 + tmp261; + tmp269 = tmp265 + tmp268; + tmp270 = tmp262 - tmp269; + tmp335 = tmp262 + tmp269; + tmp373 = tmp208 - tmp211; + tmp374 = tmp268 - tmp265; + tmp375 = tmp373 - tmp374; + tmp415 = tmp373 + tmp374; + } + { + fftw_real tmp473; + fftw_real tmp480; + fftw_real tmp598; + fftw_real tmp599; + ASSERT_ALIGNED_DOUBLE; + tmp473 = tmp471 - tmp472; + tmp480 = K707106781 * (tmp476 + tmp479); + tmp481 = tmp473 - tmp480; + tmp547 = tmp473 + tmp480; + tmp598 = tmp483 - tmp482; + tmp599 = K707106781 * (tmp476 - tmp479); + tmp600 = tmp598 + tmp599; + tmp640 = tmp598 - tmp599; + } + { + fftw_real tmp484; + fftw_real tmp487; + fftw_real tmp601; + fftw_real tmp602; + ASSERT_ALIGNED_DOUBLE; + tmp484 = tmp482 + tmp483; + tmp487 = K707106781 * (tmp485 - tmp486); + tmp488 = tmp484 - tmp487; + tmp548 = tmp484 + tmp487; + tmp601 = tmp471 + tmp472; + tmp602 = K707106781 * (tmp485 + tmp486); + tmp603 = tmp601 - tmp602; + tmp639 = tmp601 + tmp602; + } + } + { + fftw_real tmp205; + fftw_real tmp236; + fftw_real tmp330; + fftw_real tmp334; + fftw_real tmp337; + fftw_real tmp338; + fftw_real tmp329; + fftw_real tmp331; + ASSERT_ALIGNED_DOUBLE; + tmp205 = tmp189 + tmp204; + tmp236 = tmp220 + tmp235; + tmp330 = tmp205 - tmp236; + tmp334 = tmp332 + tmp333; + tmp337 = tmp335 + tmp336; + tmp338 = tmp334 - tmp337; + X[0] = tmp205 + tmp236; + Y[-31 * iostride] = tmp334 + tmp337; + tmp329 = c_re(W[15]); + tmp331 = c_im(W[15]); + X[16 * iostride] = (tmp329 * tmp330) + (tmp331 * tmp338); + Y[-15 * iostride] = (tmp329 * tmp338) - (tmp331 * tmp330); + } + { + fftw_real tmp342; + fftw_real tmp348; + fftw_real tmp346; + fftw_real tmp350; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp340; + fftw_real tmp341; + fftw_real tmp344; + fftw_real tmp345; + ASSERT_ALIGNED_DOUBLE; + tmp340 = tmp332 - tmp333; + tmp341 = tmp220 - tmp235; + tmp342 = tmp340 - tmp341; + tmp348 = tmp341 + tmp340; + tmp344 = tmp189 - tmp204; + tmp345 = tmp336 - tmp335; + tmp346 = tmp344 - tmp345; + tmp350 = tmp344 + tmp345; + } + { + fftw_real tmp339; + fftw_real tmp343; + fftw_real tmp347; + fftw_real tmp349; + ASSERT_ALIGNED_DOUBLE; + tmp339 = c_re(W[23]); + tmp343 = c_im(W[23]); + Y[-7 * iostride] = (tmp339 * tmp342) - (tmp343 * tmp346); + X[24 * iostride] = (tmp343 * tmp342) + (tmp339 * tmp346); + tmp347 = c_re(W[7]); + tmp349 = c_im(W[7]); + Y[-23 * iostride] = (tmp347 * tmp348) - (tmp349 * tmp350); + X[8 * iostride] = (tmp349 * tmp348) + (tmp347 * tmp350); + } + } + { + fftw_real tmp254; + fftw_real tmp322; + fftw_real tmp289; + fftw_real tmp319; + fftw_real tmp308; + fftw_real tmp318; + fftw_real tmp311; + fftw_real tmp323; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp271; + fftw_real tmp288; + fftw_real tmp309; + fftw_real tmp310; + ASSERT_ALIGNED_DOUBLE; + tmp254 = tmp238 + tmp253; + tmp322 = tmp238 - tmp253; + tmp271 = tmp255 - tmp270; + tmp288 = tmp272 + tmp287; + tmp289 = K707106781 * (tmp271 + tmp288); + tmp319 = K707106781 * (tmp271 - tmp288); + tmp308 = tmp292 + tmp307; + tmp318 = tmp307 - tmp292; + tmp309 = tmp255 + tmp270; + tmp310 = tmp287 - tmp272; + tmp311 = K707106781 * (tmp309 + tmp310); + tmp323 = K707106781 * (tmp310 - tmp309); + } + { + fftw_real tmp290; + fftw_real tmp312; + fftw_real tmp237; + fftw_real tmp291; + ASSERT_ALIGNED_DOUBLE; + tmp290 = tmp254 - tmp289; + tmp312 = tmp308 - tmp311; + tmp237 = c_re(W[19]); + tmp291 = c_im(W[19]); + X[20 * iostride] = (tmp237 * tmp290) + (tmp291 * tmp312); + Y[-11 * iostride] = (tmp237 * tmp312) - (tmp291 * tmp290); + } + { + fftw_real tmp314; + fftw_real tmp316; + fftw_real tmp313; + fftw_real tmp315; + ASSERT_ALIGNED_DOUBLE; + tmp314 = tmp254 + tmp289; + tmp316 = tmp308 + tmp311; + tmp313 = c_re(W[3]); + tmp315 = c_im(W[3]); + X[4 * iostride] = (tmp313 * tmp314) + (tmp315 * tmp316); + Y[-27 * iostride] = (tmp313 * tmp316) - (tmp315 * tmp314); + } + { + fftw_real tmp320; + fftw_real tmp324; + fftw_real tmp317; + fftw_real tmp321; + ASSERT_ALIGNED_DOUBLE; + tmp320 = tmp318 - tmp319; + tmp324 = tmp322 - tmp323; + tmp317 = c_re(W[27]); + tmp321 = c_im(W[27]); + Y[-3 * iostride] = (tmp317 * tmp320) - (tmp321 * tmp324); + X[28 * iostride] = (tmp321 * tmp320) + (tmp317 * tmp324); + } + { + fftw_real tmp326; + fftw_real tmp328; + fftw_real tmp325; + fftw_real tmp327; + ASSERT_ALIGNED_DOUBLE; + tmp326 = tmp318 + tmp319; + tmp328 = tmp322 + tmp323; + tmp325 = c_re(W[11]); + tmp327 = c_im(W[11]); + Y[-19 * iostride] = (tmp325 * tmp326) - (tmp327 * tmp328); + X[12 * iostride] = (tmp327 * tmp326) + (tmp325 * tmp328); + } + } + { + fftw_real tmp638; + fftw_real tmp664; + fftw_real tmp653; + fftw_real tmp665; + fftw_real tmp645; + fftw_real tmp661; + fftw_real tmp650; + fftw_real tmp660; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp636; + fftw_real tmp637; + fftw_real tmp651; + fftw_real tmp652; + ASSERT_ALIGNED_DOUBLE; + tmp636 = tmp580 + tmp581; + tmp637 = tmp611 + tmp612; + tmp638 = tmp636 - tmp637; + tmp664 = tmp636 + tmp637; + tmp651 = (K195090322 * tmp640) + (K980785280 * tmp639); + tmp652 = (K195090322 * tmp643) + (K980785280 * tmp642); + tmp653 = tmp651 - tmp652; + tmp665 = tmp651 + tmp652; + } + { + fftw_real tmp641; + fftw_real tmp644; + fftw_real tmp648; + fftw_real tmp649; + ASSERT_ALIGNED_DOUBLE; + tmp641 = (K195090322 * tmp639) - (K980785280 * tmp640); + tmp644 = (K195090322 * tmp642) - (K980785280 * tmp643); + tmp645 = tmp641 + tmp644; + tmp661 = tmp641 - tmp644; + tmp648 = tmp608 - tmp609; + tmp649 = tmp585 - tmp588; + tmp650 = tmp648 + tmp649; + tmp660 = tmp648 - tmp649; + } + { + fftw_real tmp646; + fftw_real tmp654; + fftw_real tmp635; + fftw_real tmp647; + ASSERT_ALIGNED_DOUBLE; + tmp646 = tmp638 - tmp645; + tmp654 = tmp650 - tmp653; + tmp635 = c_re(W[22]); + tmp647 = c_im(W[22]); + X[23 * iostride] = (tmp635 * tmp646) + (tmp647 * tmp654); + Y[-8 * iostride] = (tmp635 * tmp654) - (tmp647 * tmp646); + } + { + fftw_real tmp656; + fftw_real tmp658; + fftw_real tmp655; + fftw_real tmp657; + ASSERT_ALIGNED_DOUBLE; + tmp656 = tmp638 + tmp645; + tmp658 = tmp650 + tmp653; + tmp655 = c_re(W[6]); + tmp657 = c_im(W[6]); + X[7 * iostride] = (tmp655 * tmp656) + (tmp657 * tmp658); + Y[-24 * iostride] = (tmp655 * tmp658) - (tmp657 * tmp656); + } + { + fftw_real tmp662; + fftw_real tmp666; + fftw_real tmp659; + fftw_real tmp663; + ASSERT_ALIGNED_DOUBLE; + tmp662 = tmp660 + tmp661; + tmp666 = tmp664 - tmp665; + tmp659 = c_re(W[14]); + tmp663 = c_im(W[14]); + Y[-16 * iostride] = (tmp659 * tmp662) - (tmp663 * tmp666); + X[15 * iostride] = (tmp663 * tmp662) + (tmp659 * tmp666); + } + { + fftw_real tmp668; + fftw_real tmp670; + fftw_real tmp667; + fftw_real tmp669; + ASSERT_ALIGNED_DOUBLE; + tmp668 = tmp660 - tmp661; + tmp670 = tmp664 + tmp665; + tmp667 = c_re(W[30]); + tmp669 = c_im(W[30]); + Y[0] = (tmp667 * tmp668) - (tmp669 * tmp670); + X[31 * iostride] = (tmp669 * tmp668) + (tmp667 * tmp670); + } + } + { + fftw_real tmp410; + fftw_real tmp436; + fftw_real tmp425; + fftw_real tmp437; + fftw_real tmp422; + fftw_real tmp432; + fftw_real tmp417; + fftw_real tmp433; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp409; + fftw_real tmp423; + fftw_real tmp424; + fftw_real tmp421; + fftw_real tmp413; + fftw_real tmp416; + ASSERT_ALIGNED_DOUBLE; + tmp409 = K707106781 * (tmp383 + tmp384); + tmp410 = tmp408 - tmp409; + tmp436 = tmp408 + tmp409; + tmp423 = (K923879532 * tmp415) - (K382683432 * tmp414); + tmp424 = (K382683432 * tmp411) + (K923879532 * tmp412); + tmp425 = tmp423 - tmp424; + tmp437 = tmp423 + tmp424; + tmp421 = K707106781 * (tmp360 + tmp357); + tmp422 = tmp420 - tmp421; + tmp432 = tmp420 + tmp421; + tmp413 = (K923879532 * tmp411) - (K382683432 * tmp412); + tmp416 = (K923879532 * tmp414) + (K382683432 * tmp415); + tmp417 = tmp413 - tmp416; + tmp433 = tmp416 + tmp413; + } + { + fftw_real tmp418; + fftw_real tmp426; + fftw_real tmp407; + fftw_real tmp419; + ASSERT_ALIGNED_DOUBLE; + tmp418 = tmp410 - tmp417; + tmp426 = tmp422 - tmp425; + tmp407 = c_re(W[25]); + tmp419 = c_im(W[25]); + X[26 * iostride] = (tmp407 * tmp418) + (tmp419 * tmp426); + Y[-5 * iostride] = (tmp407 * tmp426) - (tmp419 * tmp418); + } + { + fftw_real tmp428; + fftw_real tmp430; + fftw_real tmp427; + fftw_real tmp429; + ASSERT_ALIGNED_DOUBLE; + tmp428 = tmp410 + tmp417; + tmp430 = tmp422 + tmp425; + tmp427 = c_re(W[9]); + tmp429 = c_im(W[9]); + X[10 * iostride] = (tmp427 * tmp428) + (tmp429 * tmp430); + Y[-21 * iostride] = (tmp427 * tmp430) - (tmp429 * tmp428); + } + { + fftw_real tmp434; + fftw_real tmp438; + fftw_real tmp431; + fftw_real tmp435; + ASSERT_ALIGNED_DOUBLE; + tmp434 = tmp432 - tmp433; + tmp438 = tmp436 - tmp437; + tmp431 = c_re(W[17]); + tmp435 = c_im(W[17]); + Y[-13 * iostride] = (tmp431 * tmp434) - (tmp435 * tmp438); + X[18 * iostride] = (tmp435 * tmp434) + (tmp431 * tmp438); + } + { + fftw_real tmp440; + fftw_real tmp442; + fftw_real tmp439; + fftw_real tmp441; + ASSERT_ALIGNED_DOUBLE; + tmp440 = tmp432 + tmp433; + tmp442 = tmp436 + tmp437; + tmp439 = c_re(W[1]); + tmp441 = c_im(W[1]); + Y[-29 * iostride] = (tmp439 * tmp440) - (tmp441 * tmp442); + X[2 * iostride] = (tmp441 * tmp440) + (tmp439 * tmp442); + } + } + { + fftw_real tmp362; + fftw_real tmp400; + fftw_real tmp389; + fftw_real tmp401; + fftw_real tmp386; + fftw_real tmp396; + fftw_real tmp377; + fftw_real tmp397; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp361; + fftw_real tmp387; + fftw_real tmp388; + fftw_real tmp385; + fftw_real tmp369; + fftw_real tmp376; + ASSERT_ALIGNED_DOUBLE; + tmp361 = K707106781 * (tmp357 - tmp360); + tmp362 = tmp354 - tmp361; + tmp400 = tmp354 + tmp361; + tmp387 = (K382683432 * tmp375) - (K923879532 * tmp372); + tmp388 = (K923879532 * tmp365) + (K382683432 * tmp368); + tmp389 = tmp387 - tmp388; + tmp401 = tmp387 + tmp388; + tmp385 = K707106781 * (tmp383 - tmp384); + tmp386 = tmp382 - tmp385; + tmp396 = tmp382 + tmp385; + tmp369 = (K382683432 * tmp365) - (K923879532 * tmp368); + tmp376 = (K382683432 * tmp372) + (K923879532 * tmp375); + tmp377 = tmp369 - tmp376; + tmp397 = tmp376 + tmp369; + } + { + fftw_real tmp378; + fftw_real tmp390; + fftw_real tmp351; + fftw_real tmp379; + ASSERT_ALIGNED_DOUBLE; + tmp378 = tmp362 - tmp377; + tmp390 = tmp386 - tmp389; + tmp351 = c_re(W[29]); + tmp379 = c_im(W[29]); + X[30 * iostride] = (tmp351 * tmp378) + (tmp379 * tmp390); + Y[-iostride] = (tmp351 * tmp390) - (tmp379 * tmp378); + } + { + fftw_real tmp392; + fftw_real tmp394; + fftw_real tmp391; + fftw_real tmp393; + ASSERT_ALIGNED_DOUBLE; + tmp392 = tmp362 + tmp377; + tmp394 = tmp386 + tmp389; + tmp391 = c_re(W[13]); + tmp393 = c_im(W[13]); + X[14 * iostride] = (tmp391 * tmp392) + (tmp393 * tmp394); + Y[-17 * iostride] = (tmp391 * tmp394) - (tmp393 * tmp392); + } + { + fftw_real tmp398; + fftw_real tmp402; + fftw_real tmp395; + fftw_real tmp399; + ASSERT_ALIGNED_DOUBLE; + tmp398 = tmp396 - tmp397; + tmp402 = tmp400 - tmp401; + tmp395 = c_re(W[21]); + tmp399 = c_im(W[21]); + Y[-9 * iostride] = (tmp395 * tmp398) - (tmp399 * tmp402); + X[22 * iostride] = (tmp399 * tmp398) + (tmp395 * tmp402); + } + { + fftw_real tmp404; + fftw_real tmp406; + fftw_real tmp403; + fftw_real tmp405; + ASSERT_ALIGNED_DOUBLE; + tmp404 = tmp396 + tmp397; + tmp406 = tmp400 + tmp401; + tmp403 = c_re(W[5]); + tmp405 = c_im(W[5]); + Y[-25 * iostride] = (tmp403 * tmp404) - (tmp405 * tmp406); + X[6 * iostride] = (tmp405 * tmp404) + (tmp403 * tmp406); + } + } + { + fftw_real tmp590; + fftw_real tmp628; + fftw_real tmp617; + fftw_real tmp629; + fftw_real tmp605; + fftw_real tmp625; + fftw_real tmp614; + fftw_real tmp624; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp582; + fftw_real tmp589; + fftw_real tmp615; + fftw_real tmp616; + ASSERT_ALIGNED_DOUBLE; + tmp582 = tmp580 - tmp581; + tmp589 = tmp585 + tmp588; + tmp590 = tmp582 - tmp589; + tmp628 = tmp582 + tmp589; + tmp615 = (K831469612 * tmp603) - (K555570233 * tmp600); + tmp616 = (K555570233 * tmp593) + (K831469612 * tmp596); + tmp617 = tmp615 - tmp616; + tmp629 = tmp615 + tmp616; + } + { + fftw_real tmp597; + fftw_real tmp604; + fftw_real tmp610; + fftw_real tmp613; + ASSERT_ALIGNED_DOUBLE; + tmp597 = (K831469612 * tmp593) - (K555570233 * tmp596); + tmp604 = (K831469612 * tmp600) + (K555570233 * tmp603); + tmp605 = tmp597 - tmp604; + tmp625 = tmp604 + tmp597; + tmp610 = tmp608 + tmp609; + tmp613 = tmp611 - tmp612; + tmp614 = tmp610 - tmp613; + tmp624 = tmp610 + tmp613; + } + { + fftw_real tmp606; + fftw_real tmp618; + fftw_real tmp579; + fftw_real tmp607; + ASSERT_ALIGNED_DOUBLE; + tmp606 = tmp590 - tmp605; + tmp618 = tmp614 - tmp617; + tmp579 = c_re(W[26]); + tmp607 = c_im(W[26]); + X[27 * iostride] = (tmp579 * tmp606) + (tmp607 * tmp618); + Y[-4 * iostride] = (tmp579 * tmp618) - (tmp607 * tmp606); + } + { + fftw_real tmp620; + fftw_real tmp622; + fftw_real tmp619; + fftw_real tmp621; + ASSERT_ALIGNED_DOUBLE; + tmp620 = tmp590 + tmp605; + tmp622 = tmp614 + tmp617; + tmp619 = c_re(W[10]); + tmp621 = c_im(W[10]); + X[11 * iostride] = (tmp619 * tmp620) + (tmp621 * tmp622); + Y[-20 * iostride] = (tmp619 * tmp622) - (tmp621 * tmp620); + } + { + fftw_real tmp626; + fftw_real tmp630; + fftw_real tmp623; + fftw_real tmp627; + ASSERT_ALIGNED_DOUBLE; + tmp626 = tmp624 - tmp625; + tmp630 = tmp628 - tmp629; + tmp623 = c_re(W[18]); + tmp627 = c_im(W[18]); + Y[-12 * iostride] = (tmp623 * tmp626) - (tmp627 * tmp630); + X[19 * iostride] = (tmp627 * tmp626) + (tmp623 * tmp630); + } + { + fftw_real tmp632; + fftw_real tmp634; + fftw_real tmp631; + fftw_real tmp633; + ASSERT_ALIGNED_DOUBLE; + tmp632 = tmp624 + tmp625; + tmp634 = tmp628 + tmp629; + tmp631 = c_re(W[2]); + tmp633 = c_im(W[2]); + Y[-28 * iostride] = (tmp631 * tmp632) - (tmp633 * tmp634); + X[3 * iostride] = (tmp633 * tmp632) + (tmp631 * tmp634); + } + } + { + fftw_real tmp546; + fftw_real tmp572; + fftw_real tmp561; + fftw_real tmp573; + fftw_real tmp553; + fftw_real tmp569; + fftw_real tmp558; + fftw_real tmp568; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp544; + fftw_real tmp545; + fftw_real tmp559; + fftw_real tmp560; + ASSERT_ALIGNED_DOUBLE; + tmp544 = tmp446 + tmp453; + tmp545 = tmp519 + tmp520; + tmp546 = tmp544 + tmp545; + tmp572 = tmp544 - tmp545; + tmp559 = (K195090322 * tmp547) + (K980785280 * tmp548); + tmp560 = (K980785280 * tmp551) - (K195090322 * tmp550); + tmp561 = tmp559 + tmp560; + tmp573 = tmp560 - tmp559; + } + { + fftw_real tmp549; + fftw_real tmp552; + fftw_real tmp556; + fftw_real tmp557; + ASSERT_ALIGNED_DOUBLE; + tmp549 = (K980785280 * tmp547) - (K195090322 * tmp548); + tmp552 = (K980785280 * tmp550) + (K195090322 * tmp551); + tmp553 = tmp549 + tmp552; + tmp569 = tmp549 - tmp552; + tmp556 = tmp514 + tmp517; + tmp557 = tmp468 + tmp461; + tmp558 = tmp556 + tmp557; + tmp568 = tmp556 - tmp557; + } + { + fftw_real tmp554; + fftw_real tmp562; + fftw_real tmp543; + fftw_real tmp555; + ASSERT_ALIGNED_DOUBLE; + tmp554 = tmp546 - tmp553; + tmp562 = tmp558 - tmp561; + tmp543 = c_re(W[16]); + tmp555 = c_im(W[16]); + X[17 * iostride] = (tmp543 * tmp554) + (tmp555 * tmp562); + Y[-14 * iostride] = (tmp543 * tmp562) - (tmp555 * tmp554); + } + { + fftw_real tmp564; + fftw_real tmp566; + fftw_real tmp563; + fftw_real tmp565; + ASSERT_ALIGNED_DOUBLE; + tmp564 = tmp546 + tmp553; + tmp566 = tmp558 + tmp561; + tmp563 = c_re(W[0]); + tmp565 = c_im(W[0]); + X[iostride] = (tmp563 * tmp564) + (tmp565 * tmp566); + Y[-30 * iostride] = (tmp563 * tmp566) - (tmp565 * tmp564); + } + { + fftw_real tmp570; + fftw_real tmp574; + fftw_real tmp567; + fftw_real tmp571; + ASSERT_ALIGNED_DOUBLE; + tmp570 = tmp568 - tmp569; + tmp574 = tmp572 - tmp573; + tmp567 = c_re(W[24]); + tmp571 = c_im(W[24]); + Y[-6 * iostride] = (tmp567 * tmp570) - (tmp571 * tmp574); + X[25 * iostride] = (tmp571 * tmp570) + (tmp567 * tmp574); + } + { + fftw_real tmp576; + fftw_real tmp578; + fftw_real tmp575; + fftw_real tmp577; + ASSERT_ALIGNED_DOUBLE; + tmp576 = tmp568 + tmp569; + tmp578 = tmp572 + tmp573; + tmp575 = c_re(W[8]); + tmp577 = c_im(W[8]); + Y[-22 * iostride] = (tmp575 * tmp576) - (tmp577 * tmp578); + X[9 * iostride] = (tmp577 * tmp576) + (tmp575 * tmp578); + } + } + { + fftw_real tmp470; + fftw_real tmp536; + fftw_real tmp525; + fftw_real tmp537; + fftw_real tmp509; + fftw_real tmp533; + fftw_real tmp522; + fftw_real tmp532; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp454; + fftw_real tmp469; + fftw_real tmp523; + fftw_real tmp524; + ASSERT_ALIGNED_DOUBLE; + tmp454 = tmp446 - tmp453; + tmp469 = tmp461 - tmp468; + tmp470 = tmp454 + tmp469; + tmp536 = tmp454 - tmp469; + tmp523 = (K831469612 * tmp481) + (K555570233 * tmp488); + tmp524 = (K555570233 * tmp507) - (K831469612 * tmp500); + tmp525 = tmp523 + tmp524; + tmp537 = tmp524 - tmp523; + } + { + fftw_real tmp489; + fftw_real tmp508; + fftw_real tmp518; + fftw_real tmp521; + ASSERT_ALIGNED_DOUBLE; + tmp489 = (K555570233 * tmp481) - (K831469612 * tmp488); + tmp508 = (K555570233 * tmp500) + (K831469612 * tmp507); + tmp509 = tmp489 + tmp508; + tmp533 = tmp489 - tmp508; + tmp518 = tmp514 - tmp517; + tmp521 = tmp519 - tmp520; + tmp522 = tmp518 + tmp521; + tmp532 = tmp518 - tmp521; + } + { + fftw_real tmp510; + fftw_real tmp526; + fftw_real tmp443; + fftw_real tmp511; + ASSERT_ALIGNED_DOUBLE; + tmp510 = tmp470 - tmp509; + tmp526 = tmp522 - tmp525; + tmp443 = c_re(W[20]); + tmp511 = c_im(W[20]); + X[21 * iostride] = (tmp443 * tmp510) + (tmp511 * tmp526); + Y[-10 * iostride] = (tmp443 * tmp526) - (tmp511 * tmp510); + } + { + fftw_real tmp528; + fftw_real tmp530; + fftw_real tmp527; + fftw_real tmp529; + ASSERT_ALIGNED_DOUBLE; + tmp528 = tmp470 + tmp509; + tmp530 = tmp522 + tmp525; + tmp527 = c_re(W[4]); + tmp529 = c_im(W[4]); + X[5 * iostride] = (tmp527 * tmp528) + (tmp529 * tmp530); + Y[-26 * iostride] = (tmp527 * tmp530) - (tmp529 * tmp528); + } + { + fftw_real tmp534; + fftw_real tmp538; + fftw_real tmp531; + fftw_real tmp535; + ASSERT_ALIGNED_DOUBLE; + tmp534 = tmp532 - tmp533; + tmp538 = tmp536 - tmp537; + tmp531 = c_re(W[28]); + tmp535 = c_im(W[28]); + Y[-2 * iostride] = (tmp531 * tmp534) - (tmp535 * tmp538); + X[29 * iostride] = (tmp535 * tmp534) + (tmp531 * tmp538); + } + { + fftw_real tmp540; + fftw_real tmp542; + fftw_real tmp539; + fftw_real tmp541; + ASSERT_ALIGNED_DOUBLE; + tmp540 = tmp532 + tmp533; + tmp542 = tmp536 + tmp537; + tmp539 = c_re(W[12]); + tmp541 = c_im(W[12]); + Y[-18 * iostride] = (tmp539 * tmp540) - (tmp541 * tmp542); + X[13 * iostride] = (tmp541 * tmp540) + (tmp539 * tmp542); + } + } + } + if (i == m) { + fftw_real tmp7; + fftw_real tmp123; + fftw_real tmp35; + fftw_real tmp95; + fftw_real tmp82; + fftw_real tmp110; + fftw_real tmp146; + fftw_real tmp165; + fftw_real tmp29; + fftw_real tmp137; + fftw_real tmp141; + fftw_real tmp160; + fftw_real tmp69; + fftw_real tmp73; + fftw_real tmp103; + fftw_real tmp107; + fftw_real tmp14; + fftw_real tmp143; + fftw_real tmp46; + fftw_real tmp109; + fftw_real tmp126; + fftw_real tmp166; + fftw_real tmp77; + fftw_real tmp96; + fftw_real tmp22; + fftw_real tmp132; + fftw_real tmp140; + fftw_real tmp161; + fftw_real tmp58; + fftw_real tmp72; + fftw_real tmp100; + fftw_real tmp106; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp3; + fftw_real tmp31; + fftw_real tmp81; + fftw_real tmp144; + fftw_real tmp6; + fftw_real tmp78; + fftw_real tmp34; + fftw_real tmp145; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp79; + fftw_real tmp80; + ASSERT_ALIGNED_DOUBLE; + tmp1 = X[0]; + tmp2 = X[15 * iostride]; + tmp3 = tmp1 + tmp2; + tmp31 = tmp1 - tmp2; + tmp79 = Y[0]; + tmp80 = Y[-15 * iostride]; + tmp81 = tmp79 + tmp80; + tmp144 = tmp79 - tmp80; + } + { + fftw_real tmp4; + fftw_real tmp5; + fftw_real tmp32; + fftw_real tmp33; + ASSERT_ALIGNED_DOUBLE; + tmp4 = X[8 * iostride]; + tmp5 = X[7 * iostride]; + tmp6 = tmp4 + tmp5; + tmp78 = tmp4 - tmp5; + tmp32 = Y[-8 * iostride]; + tmp33 = Y[-7 * iostride]; + tmp34 = tmp32 + tmp33; + tmp145 = tmp32 - tmp33; + } + tmp7 = tmp3 + tmp6; + tmp123 = tmp3 - tmp6; + tmp35 = tmp31 - tmp34; + tmp95 = tmp31 + tmp34; + tmp82 = tmp78 + tmp81; + tmp110 = tmp81 - tmp78; + tmp146 = tmp144 - tmp145; + tmp165 = tmp145 + tmp144; + } + { + fftw_real tmp25; + fftw_real tmp59; + fftw_real tmp67; + fftw_real tmp134; + fftw_real tmp28; + fftw_real tmp64; + fftw_real tmp62; + fftw_real tmp135; + fftw_real tmp133; + fftw_real tmp136; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp23; + fftw_real tmp24; + fftw_real tmp65; + fftw_real tmp66; + ASSERT_ALIGNED_DOUBLE; + tmp23 = X[iostride]; + tmp24 = X[14 * iostride]; + tmp25 = tmp23 + tmp24; + tmp59 = tmp23 - tmp24; + tmp65 = Y[-iostride]; + tmp66 = Y[-14 * iostride]; + tmp67 = tmp65 + tmp66; + tmp134 = tmp66 - tmp65; + } + { + fftw_real tmp26; + fftw_real tmp27; + fftw_real tmp60; + fftw_real tmp61; + ASSERT_ALIGNED_DOUBLE; + tmp26 = X[6 * iostride]; + tmp27 = X[9 * iostride]; + tmp28 = tmp26 + tmp27; + tmp64 = tmp26 - tmp27; + tmp60 = Y[-6 * iostride]; + tmp61 = Y[-9 * iostride]; + tmp62 = tmp60 + tmp61; + tmp135 = tmp60 - tmp61; + } + tmp29 = tmp25 + tmp28; + tmp133 = tmp25 - tmp28; + tmp136 = tmp134 - tmp135; + tmp137 = tmp133 + tmp136; + tmp141 = tmp136 - tmp133; + tmp160 = tmp135 + tmp134; + { + fftw_real tmp63; + fftw_real tmp68; + fftw_real tmp101; + fftw_real tmp102; + ASSERT_ALIGNED_DOUBLE; + tmp63 = tmp59 - tmp62; + tmp68 = tmp64 - tmp67; + tmp69 = (K923879532 * tmp63) + (K382683432 * tmp68); + tmp73 = (K923879532 * tmp68) - (K382683432 * tmp63); + tmp101 = tmp59 + tmp62; + tmp102 = tmp64 + tmp67; + tmp103 = (K382683432 * tmp101) - (K923879532 * tmp102); + tmp107 = (K923879532 * tmp101) + (K382683432 * tmp102); + } + } + { + fftw_real tmp10; + fftw_real tmp36; + fftw_real tmp39; + fftw_real tmp125; + fftw_real tmp13; + fftw_real tmp41; + fftw_real tmp44; + fftw_real tmp124; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp8; + fftw_real tmp9; + fftw_real tmp37; + fftw_real tmp38; + ASSERT_ALIGNED_DOUBLE; + tmp8 = X[4 * iostride]; + tmp9 = X[11 * iostride]; + tmp10 = tmp8 + tmp9; + tmp36 = tmp8 - tmp9; + tmp37 = Y[-4 * iostride]; + tmp38 = Y[-11 * iostride]; + tmp39 = tmp37 + tmp38; + tmp125 = tmp37 - tmp38; + } + { + fftw_real tmp11; + fftw_real tmp12; + fftw_real tmp42; + fftw_real tmp43; + ASSERT_ALIGNED_DOUBLE; + tmp11 = X[3 * iostride]; + tmp12 = X[12 * iostride]; + tmp13 = tmp11 + tmp12; + tmp41 = tmp11 - tmp12; + tmp42 = Y[-3 * iostride]; + tmp43 = Y[-12 * iostride]; + tmp44 = tmp42 + tmp43; + tmp124 = tmp43 - tmp42; + } + { + fftw_real tmp40; + fftw_real tmp45; + fftw_real tmp75; + fftw_real tmp76; + ASSERT_ALIGNED_DOUBLE; + tmp14 = tmp10 + tmp13; + tmp143 = tmp10 - tmp13; + tmp40 = tmp36 - tmp39; + tmp45 = tmp41 - tmp44; + tmp46 = K707106781 * (tmp40 + tmp45); + tmp109 = K707106781 * (tmp40 - tmp45); + tmp126 = tmp124 - tmp125; + tmp166 = tmp125 + tmp124; + tmp75 = tmp36 + tmp39; + tmp76 = tmp41 + tmp44; + tmp77 = K707106781 * (tmp75 - tmp76); + tmp96 = K707106781 * (tmp75 + tmp76); + } + } + { + fftw_real tmp18; + fftw_real tmp48; + fftw_real tmp56; + fftw_real tmp129; + fftw_real tmp21; + fftw_real tmp53; + fftw_real tmp51; + fftw_real tmp130; + fftw_real tmp128; + fftw_real tmp131; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp16; + fftw_real tmp17; + fftw_real tmp54; + fftw_real tmp55; + ASSERT_ALIGNED_DOUBLE; + tmp16 = X[2 * iostride]; + tmp17 = X[13 * iostride]; + tmp18 = tmp16 + tmp17; + tmp48 = tmp16 - tmp17; + tmp54 = Y[-2 * iostride]; + tmp55 = Y[-13 * iostride]; + tmp56 = tmp54 + tmp55; + tmp129 = tmp54 - tmp55; + } + { + fftw_real tmp19; + fftw_real tmp20; + fftw_real tmp49; + fftw_real tmp50; + ASSERT_ALIGNED_DOUBLE; + tmp19 = X[10 * iostride]; + tmp20 = X[5 * iostride]; + tmp21 = tmp19 + tmp20; + tmp53 = tmp19 - tmp20; + tmp49 = Y[-10 * iostride]; + tmp50 = Y[-5 * iostride]; + tmp51 = tmp49 + tmp50; + tmp130 = tmp49 - tmp50; + } + tmp22 = tmp18 + tmp21; + tmp128 = tmp18 - tmp21; + tmp131 = tmp129 - tmp130; + tmp132 = tmp128 - tmp131; + tmp140 = tmp128 + tmp131; + tmp161 = tmp130 + tmp129; + { + fftw_real tmp52; + fftw_real tmp57; + fftw_real tmp98; + fftw_real tmp99; + ASSERT_ALIGNED_DOUBLE; + tmp52 = tmp48 - tmp51; + tmp57 = tmp53 + tmp56; + tmp58 = (K923879532 * tmp52) - (K382683432 * tmp57); + tmp72 = (K382683432 * tmp52) + (K923879532 * tmp57); + tmp98 = tmp48 + tmp51; + tmp99 = tmp56 - tmp53; + tmp100 = (K382683432 * tmp98) - (K923879532 * tmp99); + tmp106 = (K923879532 * tmp98) + (K382683432 * tmp99); + } + } + { + fftw_real tmp15; + fftw_real tmp30; + fftw_real tmp171; + fftw_real tmp172; + fftw_real tmp173; + fftw_real tmp174; + ASSERT_ALIGNED_DOUBLE; + tmp15 = tmp7 + tmp14; + tmp30 = tmp22 + tmp29; + tmp171 = tmp15 - tmp30; + tmp172 = tmp166 + tmp165; + tmp173 = tmp161 + tmp160; + tmp174 = tmp172 - tmp173; + X[0] = K2_000000000 * (tmp15 + tmp30); + X[16 * iostride] = -(K2_000000000 * (tmp173 + tmp172)); + X[8 * iostride] = K1_414213562 * (tmp171 - tmp174); + X[24 * iostride] = -(K1_414213562 * (tmp171 + tmp174)); + } + { + fftw_real tmp163; + fftw_real tmp169; + fftw_real tmp168; + fftw_real tmp170; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp159; + fftw_real tmp162; + fftw_real tmp164; + fftw_real tmp167; + ASSERT_ALIGNED_DOUBLE; + tmp159 = tmp7 - tmp14; + tmp162 = tmp160 - tmp161; + tmp163 = tmp159 + tmp162; + tmp169 = tmp159 - tmp162; + tmp164 = tmp22 - tmp29; + tmp167 = tmp165 - tmp166; + tmp168 = tmp164 + tmp167; + tmp170 = tmp167 - tmp164; + } + X[4 * iostride] = (K1_847759065 * tmp163) - (K765366864 * tmp168); + X[20 * iostride] = -((K765366864 * tmp163) + (K1_847759065 * tmp168)); + X[12 * iostride] = (K765366864 * tmp169) - (K1_847759065 * tmp170); + X[28 * iostride] = -((K1_847759065 * tmp169) + (K765366864 * tmp170)); + } + { + fftw_real tmp71; + fftw_real tmp85; + fftw_real tmp84; + fftw_real tmp86; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp47; + fftw_real tmp70; + fftw_real tmp74; + fftw_real tmp83; + ASSERT_ALIGNED_DOUBLE; + tmp47 = tmp35 + tmp46; + tmp70 = tmp58 + tmp69; + tmp71 = tmp47 + tmp70; + tmp85 = tmp47 - tmp70; + tmp74 = tmp72 + tmp73; + tmp83 = tmp77 + tmp82; + tmp84 = tmp74 + tmp83; + tmp86 = tmp83 - tmp74; + } + X[iostride] = (K1_990369453 * tmp71) - (K196034280 * tmp84); + X[17 * iostride] = -((K196034280 * tmp71) + (K1_990369453 * tmp84)); + X[9 * iostride] = (K1_268786568 * tmp85) - (K1_546020906 * tmp86); + X[25 * iostride] = -((K1_546020906 * tmp85) + (K1_268786568 * tmp86)); + } + { + fftw_real tmp89; + fftw_real tmp93; + fftw_real tmp92; + fftw_real tmp94; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp87; + fftw_real tmp88; + fftw_real tmp90; + fftw_real tmp91; + ASSERT_ALIGNED_DOUBLE; + tmp87 = tmp35 - tmp46; + tmp88 = tmp73 - tmp72; + tmp89 = tmp87 + tmp88; + tmp93 = tmp87 - tmp88; + tmp90 = tmp58 - tmp69; + tmp91 = tmp82 - tmp77; + tmp92 = tmp90 + tmp91; + tmp94 = tmp91 - tmp90; + } + X[5 * iostride] = (K1_763842528 * tmp89) - (K942793473 * tmp92); + X[21 * iostride] = -((K942793473 * tmp89) + (K1_763842528 * tmp92)); + X[13 * iostride] = (K580569354 * tmp93) - (K1_913880671 * tmp94); + X[29 * iostride] = -((K1_913880671 * tmp93) + (K580569354 * tmp94)); + } + { + fftw_real tmp105; + fftw_real tmp113; + fftw_real tmp112; + fftw_real tmp114; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp97; + fftw_real tmp104; + fftw_real tmp108; + fftw_real tmp111; + ASSERT_ALIGNED_DOUBLE; + tmp97 = tmp95 - tmp96; + tmp104 = tmp100 + tmp103; + tmp105 = tmp97 + tmp104; + tmp113 = tmp97 - tmp104; + tmp108 = tmp106 - tmp107; + tmp111 = tmp109 + tmp110; + tmp112 = tmp108 + tmp111; + tmp114 = tmp111 - tmp108; + } + X[3 * iostride] = (K1_913880671 * tmp105) - (K580569354 * tmp112); + X[19 * iostride] = -((K580569354 * tmp105) + (K1_913880671 * tmp112)); + X[11 * iostride] = (K942793473 * tmp113) - (K1_763842528 * tmp114); + X[27 * iostride] = -((K1_763842528 * tmp113) + (K942793473 * tmp114)); + } + { + fftw_real tmp117; + fftw_real tmp121; + fftw_real tmp120; + fftw_real tmp122; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp115; + fftw_real tmp116; + fftw_real tmp118; + fftw_real tmp119; + ASSERT_ALIGNED_DOUBLE; + tmp115 = tmp95 + tmp96; + tmp116 = tmp106 + tmp107; + tmp117 = tmp115 - tmp116; + tmp121 = tmp115 + tmp116; + tmp118 = tmp100 - tmp103; + tmp119 = tmp110 - tmp109; + tmp120 = tmp118 + tmp119; + tmp122 = tmp119 - tmp118; + } + X[7 * iostride] = (K1_546020906 * tmp117) - (K1_268786568 * tmp120); + X[23 * iostride] = -((K1_268786568 * tmp117) + (K1_546020906 * tmp120)); + X[15 * iostride] = (K196034280 * tmp121) - (K1_990369453 * tmp122); + X[31 * iostride] = -((K1_990369453 * tmp121) + (K196034280 * tmp122)); + } + { + fftw_real tmp139; + fftw_real tmp149; + fftw_real tmp148; + fftw_real tmp150; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp127; + fftw_real tmp138; + fftw_real tmp142; + fftw_real tmp147; + ASSERT_ALIGNED_DOUBLE; + tmp127 = tmp123 + tmp126; + tmp138 = K707106781 * (tmp132 + tmp137); + tmp139 = tmp127 + tmp138; + tmp149 = tmp127 - tmp138; + tmp142 = K707106781 * (tmp140 + tmp141); + tmp147 = tmp143 + tmp146; + tmp148 = tmp142 + tmp147; + tmp150 = tmp147 - tmp142; + } + X[2 * iostride] = (K1_961570560 * tmp139) - (K390180644 * tmp148); + X[18 * iostride] = -((K390180644 * tmp139) + (K1_961570560 * tmp148)); + X[10 * iostride] = (K1_111140466 * tmp149) - (K1_662939224 * tmp150); + X[26 * iostride] = -((K1_662939224 * tmp149) + (K1_111140466 * tmp150)); + } + { + fftw_real tmp153; + fftw_real tmp157; + fftw_real tmp156; + fftw_real tmp158; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp151; + fftw_real tmp152; + fftw_real tmp154; + fftw_real tmp155; + ASSERT_ALIGNED_DOUBLE; + tmp151 = tmp123 - tmp126; + tmp152 = K707106781 * (tmp141 - tmp140); + tmp153 = tmp151 + tmp152; + tmp157 = tmp151 - tmp152; + tmp154 = K707106781 * (tmp132 - tmp137); + tmp155 = tmp146 - tmp143; + tmp156 = tmp154 + tmp155; + tmp158 = tmp155 - tmp154; + } + X[6 * iostride] = (K1_662939224 * tmp153) - (K1_111140466 * tmp156); + X[22 * iostride] = -((K1_111140466 * tmp153) + (K1_662939224 * tmp156)); + X[14 * iostride] = (K390180644 * tmp157) - (K1_961570560 * tmp158); + X[30 * iostride] = -((K1_961570560 * tmp157) + (K390180644 * tmp158)); + } + } +} + +static const int twiddle_order[] = +{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31}; +fftw_codelet_desc fftw_hc2hc_backward_32_desc = +{ + "fftw_hc2hc_backward_32", + (void (*)()) fftw_hc2hc_backward_32, + 32, + FFTW_BACKWARD, + FFTW_HC2HC, + 718, + 31, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/fhb_4.c b/src/sndobj/rfftw/fhb_4.c new file mode 100644 index 0000000..5400df3 --- /dev/null +++ b/src/sndobj/rfftw/fhb_4.c @@ -0,0 +1,193 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:45:10 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-backward 4 */ + +/* + * This function contains 34 FP additions, 18 FP multiplications, + * (or, 28 additions, 12 multiplications, 6 fused multiply/add), + * 15 stack variables, and 32 memory accesses + */ +static const fftw_real K1_414213562 = FFTW_KONST(+1.414213562373095048801688724209698078569671875); +static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); + +/* + * Generator Id's : + * $Id: fhb_4.c,v 1.1.1.1 2006/05/12 15:14:46 veplaini Exp $ + * $Id: fhb_4.c,v 1.1.1.1 2006/05/12 15:14:46 veplaini Exp $ + * $Id: fhb_4.c,v 1.1.1.1 2006/05/12 15:14:46 veplaini Exp $ + */ + +void fftw_hc2hc_backward_4(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_real *X; + fftw_real *Y; + X = A; + Y = A + (4 * iostride); + { + fftw_real tmp39; + fftw_real tmp42; + fftw_real tmp37; + fftw_real tmp40; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp38; + fftw_real tmp41; + fftw_real tmp35; + fftw_real tmp36; + ASSERT_ALIGNED_DOUBLE; + tmp38 = X[iostride]; + tmp39 = K2_000000000 * tmp38; + tmp41 = Y[-iostride]; + tmp42 = K2_000000000 * tmp41; + tmp35 = X[0]; + tmp36 = X[2 * iostride]; + tmp37 = tmp35 + tmp36; + tmp40 = tmp35 - tmp36; + } + X[2 * iostride] = tmp37 - tmp39; + X[0] = tmp37 + tmp39; + X[3 * iostride] = tmp40 + tmp42; + X[iostride] = tmp40 - tmp42; + } + X = X + dist; + Y = Y - dist; + for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 3) { + fftw_real tmp9; + fftw_real tmp28; + fftw_real tmp18; + fftw_real tmp25; + fftw_real tmp12; + fftw_real tmp24; + fftw_real tmp21; + fftw_real tmp29; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp7; + fftw_real tmp8; + fftw_real tmp16; + fftw_real tmp17; + ASSERT_ALIGNED_DOUBLE; + tmp7 = X[0]; + tmp8 = Y[-2 * iostride]; + tmp9 = tmp7 + tmp8; + tmp28 = tmp7 - tmp8; + tmp16 = Y[0]; + tmp17 = X[2 * iostride]; + tmp18 = tmp16 - tmp17; + tmp25 = tmp16 + tmp17; + } + { + fftw_real tmp10; + fftw_real tmp11; + fftw_real tmp19; + fftw_real tmp20; + ASSERT_ALIGNED_DOUBLE; + tmp10 = X[iostride]; + tmp11 = Y[-3 * iostride]; + tmp12 = tmp10 + tmp11; + tmp24 = tmp10 - tmp11; + tmp19 = Y[-iostride]; + tmp20 = X[3 * iostride]; + tmp21 = tmp19 - tmp20; + tmp29 = tmp19 + tmp20; + } + X[0] = tmp9 + tmp12; + { + fftw_real tmp14; + fftw_real tmp22; + fftw_real tmp13; + fftw_real tmp15; + ASSERT_ALIGNED_DOUBLE; + tmp14 = tmp9 - tmp12; + tmp22 = tmp18 - tmp21; + tmp13 = c_re(W[1]); + tmp15 = c_im(W[1]); + X[2 * iostride] = (tmp13 * tmp14) + (tmp15 * tmp22); + Y[-iostride] = (tmp13 * tmp22) - (tmp15 * tmp14); + } + Y[-3 * iostride] = tmp18 + tmp21; + { + fftw_real tmp26; + fftw_real tmp30; + fftw_real tmp23; + fftw_real tmp27; + ASSERT_ALIGNED_DOUBLE; + tmp26 = tmp24 + tmp25; + tmp30 = tmp28 - tmp29; + tmp23 = c_re(W[0]); + tmp27 = c_im(W[0]); + Y[-2 * iostride] = (tmp23 * tmp26) - (tmp27 * tmp30); + X[iostride] = (tmp27 * tmp26) + (tmp23 * tmp30); + } + { + fftw_real tmp32; + fftw_real tmp34; + fftw_real tmp31; + fftw_real tmp33; + ASSERT_ALIGNED_DOUBLE; + tmp32 = tmp25 - tmp24; + tmp34 = tmp28 + tmp29; + tmp31 = c_re(W[2]); + tmp33 = c_im(W[2]); + Y[0] = (tmp31 * tmp32) - (tmp33 * tmp34); + X[3 * iostride] = (tmp33 * tmp32) + (tmp31 * tmp34); + } + } + if (i == m) { + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp3; + fftw_real tmp4; + fftw_real tmp5; + fftw_real tmp6; + ASSERT_ALIGNED_DOUBLE; + tmp1 = X[0]; + tmp2 = X[iostride]; + tmp3 = tmp1 - tmp2; + tmp4 = Y[0]; + tmp5 = Y[-iostride]; + tmp6 = tmp4 + tmp5; + X[0] = K2_000000000 * (tmp1 + tmp2); + X[2 * iostride] = -(K2_000000000 * (tmp4 - tmp5)); + X[iostride] = K1_414213562 * (tmp3 - tmp6); + X[3 * iostride] = -(K1_414213562 * (tmp3 + tmp6)); + } +} + +static const int twiddle_order[] = +{1, 2, 3}; +fftw_codelet_desc fftw_hc2hc_backward_4_desc = +{ + "fftw_hc2hc_backward_4", + (void (*)()) fftw_hc2hc_backward_4, + 4, + FFTW_BACKWARD, + FFTW_HC2HC, + 102, + 3, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/fhb_5.c b/src/sndobj/rfftw/fhb_5.c new file mode 100644 index 0000000..59b57c9 --- /dev/null +++ b/src/sndobj/rfftw/fhb_5.c @@ -0,0 +1,276 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:45:10 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-backward 5 */ + +/* + * This function contains 64 FP additions, 42 FP multiplications, + * (or, 42 additions, 20 multiplications, 22 fused multiply/add), + * 25 stack variables, and 40 memory accesses + */ +static const fftw_real K250000000 = FFTW_KONST(+0.250000000000000000000000000000000000000000000); +static const fftw_real K559016994 = FFTW_KONST(+0.559016994374947424102293417182819058860154590); +static const fftw_real K951056516 = FFTW_KONST(+0.951056516295153572116439333379382143405698634); +static const fftw_real K587785252 = FFTW_KONST(+0.587785252292473129168705954639072768597652438); +static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); +static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); +static const fftw_real K1_118033988 = FFTW_KONST(+1.118033988749894848204586834365638117720309180); +static const fftw_real K1_175570504 = FFTW_KONST(+1.175570504584946258337411909278145537195304875); +static const fftw_real K1_902113032 = FFTW_KONST(+1.902113032590307144232878666758764286811397268); + +/* + * Generator Id's : + * $Id: fhb_5.c,v 1.1.1.1 2006/05/12 15:14:45 veplaini Exp $ + * $Id: fhb_5.c,v 1.1.1.1 2006/05/12 15:14:45 veplaini Exp $ + * $Id: fhb_5.c,v 1.1.1.1 2006/05/12 15:14:45 veplaini Exp $ + */ + +void fftw_hc2hc_backward_5(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_real *X; + fftw_real *Y; + X = A; + Y = A + (5 * iostride); + { + fftw_real tmp70; + fftw_real tmp72; + fftw_real tmp61; + fftw_real tmp64; + fftw_real tmp65; + fftw_real tmp66; + fftw_real tmp71; + fftw_real tmp67; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp68; + fftw_real tmp69; + fftw_real tmp62; + fftw_real tmp63; + ASSERT_ALIGNED_DOUBLE; + tmp68 = Y[-iostride]; + tmp69 = Y[-2 * iostride]; + tmp70 = (K1_902113032 * tmp68) + (K1_175570504 * tmp69); + tmp72 = (K1_902113032 * tmp69) - (K1_175570504 * tmp68); + tmp61 = X[0]; + tmp62 = X[iostride]; + tmp63 = X[2 * iostride]; + tmp64 = tmp62 + tmp63; + tmp65 = K1_118033988 * (tmp62 - tmp63); + tmp66 = tmp61 - (K500000000 * tmp64); + } + X[0] = tmp61 + (K2_000000000 * tmp64); + tmp71 = tmp66 - tmp65; + X[3 * iostride] = tmp71 - tmp72; + X[2 * iostride] = tmp71 + tmp72; + tmp67 = tmp65 + tmp66; + X[4 * iostride] = tmp67 + tmp70; + X[iostride] = tmp67 - tmp70; + } + X = X + dist; + Y = Y - dist; + for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 4) { + fftw_real tmp13; + fftw_real tmp32; + fftw_real tmp50; + fftw_real tmp39; + fftw_real tmp20; + fftw_real tmp38; + fftw_real tmp21; + fftw_real tmp34; + fftw_real tmp28; + fftw_real tmp33; + fftw_real tmp43; + fftw_real tmp55; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp19; + fftw_real tmp31; + fftw_real tmp16; + fftw_real tmp30; + ASSERT_ALIGNED_DOUBLE; + tmp13 = X[0]; + { + fftw_real tmp17; + fftw_real tmp18; + fftw_real tmp14; + fftw_real tmp15; + ASSERT_ALIGNED_DOUBLE; + tmp17 = X[2 * iostride]; + tmp18 = Y[-3 * iostride]; + tmp19 = tmp17 + tmp18; + tmp31 = tmp17 - tmp18; + tmp14 = X[iostride]; + tmp15 = Y[-4 * iostride]; + tmp16 = tmp14 + tmp15; + tmp30 = tmp14 - tmp15; + } + tmp32 = (K587785252 * tmp30) - (K951056516 * tmp31); + tmp50 = (K951056516 * tmp30) + (K587785252 * tmp31); + tmp39 = K559016994 * (tmp16 - tmp19); + tmp20 = tmp16 + tmp19; + tmp38 = tmp13 - (K250000000 * tmp20); + } + { + fftw_real tmp27; + fftw_real tmp42; + fftw_real tmp24; + fftw_real tmp41; + ASSERT_ALIGNED_DOUBLE; + tmp21 = Y[0]; + { + fftw_real tmp25; + fftw_real tmp26; + fftw_real tmp22; + fftw_real tmp23; + ASSERT_ALIGNED_DOUBLE; + tmp25 = Y[-2 * iostride]; + tmp26 = X[3 * iostride]; + tmp27 = tmp25 - tmp26; + tmp42 = tmp25 + tmp26; + tmp22 = Y[-iostride]; + tmp23 = X[4 * iostride]; + tmp24 = tmp22 - tmp23; + tmp41 = tmp22 + tmp23; + } + tmp34 = K559016994 * (tmp24 - tmp27); + tmp28 = tmp24 + tmp27; + tmp33 = tmp21 - (K250000000 * tmp28); + tmp43 = (K587785252 * tmp41) - (K951056516 * tmp42); + tmp55 = (K951056516 * tmp41) + (K587785252 * tmp42); + } + X[0] = tmp13 + tmp20; + { + fftw_real tmp52; + fftw_real tmp58; + fftw_real tmp56; + fftw_real tmp60; + fftw_real tmp51; + fftw_real tmp54; + ASSERT_ALIGNED_DOUBLE; + tmp51 = tmp34 + tmp33; + tmp52 = tmp50 + tmp51; + tmp58 = tmp51 - tmp50; + tmp54 = tmp39 + tmp38; + tmp56 = tmp54 - tmp55; + tmp60 = tmp54 + tmp55; + { + fftw_real tmp49; + fftw_real tmp53; + fftw_real tmp57; + fftw_real tmp59; + ASSERT_ALIGNED_DOUBLE; + tmp49 = c_re(W[0]); + tmp53 = c_im(W[0]); + Y[-3 * iostride] = (tmp49 * tmp52) - (tmp53 * tmp56); + X[iostride] = (tmp53 * tmp52) + (tmp49 * tmp56); + tmp57 = c_re(W[3]); + tmp59 = c_im(W[3]); + Y[0] = (tmp57 * tmp58) - (tmp59 * tmp60); + X[4 * iostride] = (tmp59 * tmp58) + (tmp57 * tmp60); + } + } + Y[-4 * iostride] = tmp21 + tmp28; + { + fftw_real tmp36; + fftw_real tmp46; + fftw_real tmp44; + fftw_real tmp48; + fftw_real tmp35; + fftw_real tmp40; + ASSERT_ALIGNED_DOUBLE; + tmp35 = tmp33 - tmp34; + tmp36 = tmp32 + tmp35; + tmp46 = tmp35 - tmp32; + tmp40 = tmp38 - tmp39; + tmp44 = tmp40 - tmp43; + tmp48 = tmp40 + tmp43; + { + fftw_real tmp29; + fftw_real tmp37; + fftw_real tmp45; + fftw_real tmp47; + ASSERT_ALIGNED_DOUBLE; + tmp29 = c_re(W[1]); + tmp37 = c_im(W[1]); + Y[-2 * iostride] = (tmp29 * tmp36) - (tmp37 * tmp44); + X[2 * iostride] = (tmp37 * tmp36) + (tmp29 * tmp44); + tmp45 = c_re(W[2]); + tmp47 = c_im(W[2]); + Y[-iostride] = (tmp45 * tmp46) - (tmp47 * tmp48); + X[3 * iostride] = (tmp47 * tmp46) + (tmp45 * tmp48); + } + } + } + if (i == m) { + fftw_real tmp10; + fftw_real tmp12; + fftw_real tmp1; + fftw_real tmp4; + fftw_real tmp5; + fftw_real tmp6; + fftw_real tmp11; + fftw_real tmp7; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp8; + fftw_real tmp9; + fftw_real tmp2; + fftw_real tmp3; + ASSERT_ALIGNED_DOUBLE; + tmp8 = Y[-iostride]; + tmp9 = Y[0]; + tmp10 = (K1_902113032 * tmp8) + (K1_175570504 * tmp9); + tmp12 = (K1_175570504 * tmp8) - (K1_902113032 * tmp9); + tmp1 = X[2 * iostride]; + tmp2 = X[iostride]; + tmp3 = X[0]; + tmp4 = tmp2 + tmp3; + tmp5 = (K500000000 * tmp4) - tmp1; + tmp6 = K1_118033988 * (tmp3 - tmp2); + } + X[0] = tmp1 + (K2_000000000 * tmp4); + tmp11 = tmp6 - tmp5; + X[2 * iostride] = tmp11 + tmp12; + X[3 * iostride] = tmp12 - tmp11; + tmp7 = tmp5 + tmp6; + X[iostride] = tmp7 - tmp10; + X[4 * iostride] = -(tmp7 + tmp10); + } +} + +static const int twiddle_order[] = +{1, 2, 3, 4}; +fftw_codelet_desc fftw_hc2hc_backward_5_desc = +{ + "fftw_hc2hc_backward_5", + (void (*)()) fftw_hc2hc_backward_5, + 5, + FFTW_BACKWARD, + FFTW_HC2HC, + 124, + 4, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/fhb_6.c b/src/sndobj/rfftw/fhb_6.c new file mode 100644 index 0000000..5c062a8 --- /dev/null +++ b/src/sndobj/rfftw/fhb_6.c @@ -0,0 +1,301 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:45:10 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-backward 6 */ + +/* + * This function contains 72 FP additions, 38 FP multiplications, + * (or, 54 additions, 20 multiplications, 18 fused multiply/add), + * 25 stack variables, and 48 memory accesses + */ +static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); +static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); +static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); +static const fftw_real K1_732050807 = FFTW_KONST(+1.732050807568877293527446341505872366942805254); + +/* + * Generator Id's : + * $Id: fhb_6.c,v 1.1.1.1 2006/05/12 15:14:45 veplaini Exp $ + * $Id: fhb_6.c,v 1.1.1.1 2006/05/12 15:14:45 veplaini Exp $ + * $Id: fhb_6.c,v 1.1.1.1 2006/05/12 15:14:45 veplaini Exp $ + */ + +void fftw_hc2hc_backward_6(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_real *X; + fftw_real *Y; + X = A; + Y = A + (6 * iostride); + { + fftw_real tmp71; + fftw_real tmp75; + fftw_real tmp80; + fftw_real tmp82; + fftw_real tmp74; + fftw_real tmp76; + fftw_real tmp69; + fftw_real tmp70; + fftw_real tmp77; + fftw_real tmp81; + ASSERT_ALIGNED_DOUBLE; + tmp69 = X[0]; + tmp70 = X[3 * iostride]; + tmp71 = tmp69 - tmp70; + tmp75 = tmp69 + tmp70; + { + fftw_real tmp78; + fftw_real tmp79; + fftw_real tmp72; + fftw_real tmp73; + ASSERT_ALIGNED_DOUBLE; + tmp78 = Y[-2 * iostride]; + tmp79 = Y[-iostride]; + tmp80 = K1_732050807 * (tmp78 + tmp79); + tmp82 = K1_732050807 * (tmp78 - tmp79); + tmp72 = X[2 * iostride]; + tmp73 = X[iostride]; + tmp74 = tmp72 - tmp73; + tmp76 = tmp72 + tmp73; + } + X[3 * iostride] = tmp71 + (K2_000000000 * tmp74); + tmp77 = tmp71 - tmp74; + X[iostride] = tmp77 - tmp80; + X[5 * iostride] = tmp77 + tmp80; + X[0] = tmp75 + (K2_000000000 * tmp76); + tmp81 = tmp75 - tmp76; + X[2 * iostride] = tmp81 + tmp82; + X[4 * iostride] = tmp81 - tmp82; + } + X = X + dist; + Y = Y - dist; + for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 5) { + fftw_real tmp15; + fftw_real tmp46; + fftw_real tmp25; + fftw_real tmp52; + fftw_real tmp22; + fftw_real tmp35; + fftw_real tmp49; + fftw_real tmp62; + fftw_real tmp32; + fftw_real tmp39; + fftw_real tmp55; + fftw_real tmp59; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp13; + fftw_real tmp14; + fftw_real tmp23; + fftw_real tmp24; + ASSERT_ALIGNED_DOUBLE; + tmp13 = X[0]; + tmp14 = Y[-3 * iostride]; + tmp15 = tmp13 + tmp14; + tmp46 = tmp13 - tmp14; + tmp23 = Y[0]; + tmp24 = X[3 * iostride]; + tmp25 = tmp23 - tmp24; + tmp52 = tmp23 + tmp24; + } + { + fftw_real tmp18; + fftw_real tmp47; + fftw_real tmp21; + fftw_real tmp48; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp16; + fftw_real tmp17; + fftw_real tmp19; + fftw_real tmp20; + ASSERT_ALIGNED_DOUBLE; + tmp16 = X[2 * iostride]; + tmp17 = Y[-5 * iostride]; + tmp18 = tmp16 + tmp17; + tmp47 = tmp16 - tmp17; + tmp19 = Y[-4 * iostride]; + tmp20 = X[iostride]; + tmp21 = tmp19 + tmp20; + tmp48 = tmp19 - tmp20; + } + tmp22 = tmp18 + tmp21; + tmp35 = K866025403 * (tmp18 - tmp21); + tmp49 = tmp47 + tmp48; + tmp62 = K866025403 * (tmp47 - tmp48); + } + { + fftw_real tmp28; + fftw_real tmp54; + fftw_real tmp31; + fftw_real tmp53; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp26; + fftw_real tmp27; + fftw_real tmp29; + fftw_real tmp30; + ASSERT_ALIGNED_DOUBLE; + tmp26 = Y[-2 * iostride]; + tmp27 = X[5 * iostride]; + tmp28 = tmp26 - tmp27; + tmp54 = tmp26 + tmp27; + tmp29 = Y[-iostride]; + tmp30 = X[4 * iostride]; + tmp31 = tmp29 - tmp30; + tmp53 = tmp29 + tmp30; + } + tmp32 = tmp28 + tmp31; + tmp39 = K866025403 * (tmp31 - tmp28); + tmp55 = tmp53 - tmp54; + tmp59 = K866025403 * (tmp54 + tmp53); + } + X[0] = tmp15 + tmp22; + { + fftw_real tmp36; + fftw_real tmp42; + fftw_real tmp40; + fftw_real tmp44; + fftw_real tmp34; + fftw_real tmp38; + ASSERT_ALIGNED_DOUBLE; + tmp34 = tmp25 - (K500000000 * tmp32); + tmp36 = tmp34 - tmp35; + tmp42 = tmp35 + tmp34; + tmp38 = tmp15 - (K500000000 * tmp22); + tmp40 = tmp38 - tmp39; + tmp44 = tmp38 + tmp39; + { + fftw_real tmp33; + fftw_real tmp37; + fftw_real tmp41; + fftw_real tmp43; + ASSERT_ALIGNED_DOUBLE; + tmp33 = c_re(W[1]); + tmp37 = c_im(W[1]); + Y[-3 * iostride] = (tmp33 * tmp36) - (tmp37 * tmp40); + X[2 * iostride] = (tmp37 * tmp36) + (tmp33 * tmp40); + tmp41 = c_re(W[3]); + tmp43 = c_im(W[3]); + Y[-iostride] = (tmp41 * tmp42) - (tmp43 * tmp44); + X[4 * iostride] = (tmp43 * tmp42) + (tmp41 * tmp44); + } + } + Y[-5 * iostride] = tmp25 + tmp32; + { + fftw_real tmp50; + fftw_real tmp56; + fftw_real tmp45; + fftw_real tmp51; + ASSERT_ALIGNED_DOUBLE; + tmp50 = tmp46 + tmp49; + tmp56 = tmp52 - tmp55; + tmp45 = c_re(W[2]); + tmp51 = c_im(W[2]); + X[3 * iostride] = (tmp45 * tmp50) + (tmp51 * tmp56); + Y[-2 * iostride] = (tmp45 * tmp56) - (tmp51 * tmp50); + } + { + fftw_real tmp60; + fftw_real tmp66; + fftw_real tmp64; + fftw_real tmp68; + fftw_real tmp58; + fftw_real tmp63; + ASSERT_ALIGNED_DOUBLE; + tmp58 = tmp46 - (K500000000 * tmp49); + tmp60 = tmp58 - tmp59; + tmp66 = tmp58 + tmp59; + tmp63 = tmp52 + (K500000000 * tmp55); + tmp64 = tmp62 + tmp63; + tmp68 = tmp63 - tmp62; + { + fftw_real tmp57; + fftw_real tmp61; + fftw_real tmp65; + fftw_real tmp67; + ASSERT_ALIGNED_DOUBLE; + tmp57 = c_re(W[0]); + tmp61 = c_im(W[0]); + X[iostride] = (tmp57 * tmp60) + (tmp61 * tmp64); + Y[-4 * iostride] = (tmp57 * tmp64) - (tmp61 * tmp60); + tmp65 = c_re(W[4]); + tmp67 = c_im(W[4]); + X[5 * iostride] = (tmp65 * tmp66) + (tmp67 * tmp68); + Y[0] = (tmp65 * tmp68) - (tmp67 * tmp66); + } + } + } + if (i == m) { + fftw_real tmp1; + fftw_real tmp6; + fftw_real tmp4; + fftw_real tmp5; + fftw_real tmp9; + fftw_real tmp11; + fftw_real tmp12; + fftw_real tmp10; + ASSERT_ALIGNED_DOUBLE; + tmp1 = X[iostride]; + tmp6 = Y[-iostride]; + { + fftw_real tmp2; + fftw_real tmp3; + fftw_real tmp7; + fftw_real tmp8; + ASSERT_ALIGNED_DOUBLE; + tmp2 = X[2 * iostride]; + tmp3 = X[0]; + tmp4 = tmp2 + tmp3; + tmp5 = K1_732050807 * (tmp2 - tmp3); + tmp7 = Y[-2 * iostride]; + tmp8 = Y[0]; + tmp9 = tmp7 + tmp8; + tmp11 = K1_732050807 * (tmp7 - tmp8); + } + X[0] = K2_000000000 * (tmp1 + tmp4); + tmp12 = (K2_000000000 * tmp1) - tmp4; + X[2 * iostride] = tmp11 - tmp12; + X[4 * iostride] = tmp12 + tmp11; + X[3 * iostride] = K2_000000000 * (tmp6 - tmp9); + tmp10 = (K2_000000000 * tmp6) + tmp9; + X[iostride] = -(tmp5 + tmp10); + X[5 * iostride] = tmp5 - tmp10; + } +} + +static const int twiddle_order[] = +{1, 2, 3, 4, 5}; +fftw_codelet_desc fftw_hc2hc_backward_6_desc = +{ + "fftw_hc2hc_backward_6", + (void (*)()) fftw_hc2hc_backward_6, + 6, + FFTW_BACKWARD, + FFTW_HC2HC, + 146, + 5, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/fhb_7.c b/src/sndobj/rfftw/fhb_7.c new file mode 100644 index 0000000..f69be92 --- /dev/null +++ b/src/sndobj/rfftw/fhb_7.c @@ -0,0 +1,320 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:45:11 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-backward 7 */ + +/* + * This function contains 120 FP additions, 98 FP multiplications, + * (or, 106 additions, 84 multiplications, 14 fused multiply/add), + * 32 stack variables, and 56 memory accesses + */ +static const fftw_real K222520933 = FFTW_KONST(+0.222520933956314404288902564496794759466355569); +static const fftw_real K900968867 = FFTW_KONST(+0.900968867902419126236102319507445051165919162); +static const fftw_real K623489801 = FFTW_KONST(+0.623489801858733530525004884004239810632274731); +static const fftw_real K781831482 = FFTW_KONST(+0.781831482468029808708444526674057750232334519); +static const fftw_real K974927912 = FFTW_KONST(+0.974927912181823607018131682993931217232785801); +static const fftw_real K433883739 = FFTW_KONST(+0.433883739117558120475768332848358754609990728); +static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); +static const fftw_real K1_801937735 = FFTW_KONST(+1.801937735804838252472204639014890102331838324); +static const fftw_real K445041867 = FFTW_KONST(+0.445041867912628808577805128993589518932711138); +static const fftw_real K1_246979603 = FFTW_KONST(+1.246979603717467061050009768008479621264549462); +static const fftw_real K867767478 = FFTW_KONST(+0.867767478235116240951536665696717509219981456); +static const fftw_real K1_949855824 = FFTW_KONST(+1.949855824363647214036263365987862434465571601); +static const fftw_real K1_563662964 = FFTW_KONST(+1.563662964936059617416889053348115500464669037); + +/* + * Generator Id's : + * $Id: fhb_7.c,v 1.1.1.1 2006/05/12 15:14:57 veplaini Exp $ + * $Id: fhb_7.c,v 1.1.1.1 2006/05/12 15:14:57 veplaini Exp $ + * $Id: fhb_7.c,v 1.1.1.1 2006/05/12 15:14:57 veplaini Exp $ + */ + +void fftw_hc2hc_backward_7(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_real *X; + fftw_real *Y; + X = A; + Y = A + (7 * iostride); + { + fftw_real tmp84; + fftw_real tmp88; + fftw_real tmp86; + fftw_real tmp76; + fftw_real tmp79; + fftw_real tmp77; + fftw_real tmp78; + fftw_real tmp80; + fftw_real tmp87; + fftw_real tmp85; + fftw_real tmp81; + fftw_real tmp83; + fftw_real tmp82; + ASSERT_ALIGNED_DOUBLE; + tmp81 = Y[-2 * iostride]; + tmp83 = Y[-iostride]; + tmp82 = Y[-3 * iostride]; + tmp84 = (K1_563662964 * tmp81) - (K1_949855824 * tmp82) - (K867767478 * tmp83); + tmp88 = (K867767478 * tmp81) + (K1_563662964 * tmp82) - (K1_949855824 * tmp83); + tmp86 = (K1_563662964 * tmp83) + (K1_949855824 * tmp81) + (K867767478 * tmp82); + tmp76 = X[0]; + tmp79 = X[3 * iostride]; + tmp77 = X[iostride]; + tmp78 = X[2 * iostride]; + tmp80 = tmp76 + (K1_246979603 * tmp78) - (K445041867 * tmp79) - (K1_801937735 * tmp77); + tmp87 = tmp76 + (K1_246979603 * tmp79) - (K1_801937735 * tmp78) - (K445041867 * tmp77); + tmp85 = tmp76 + (K1_246979603 * tmp77) - (K1_801937735 * tmp79) - (K445041867 * tmp78); + X[4 * iostride] = tmp80 - tmp84; + X[3 * iostride] = tmp80 + tmp84; + X[0] = tmp76 + (K2_000000000 * (tmp77 + tmp78 + tmp79)); + X[2 * iostride] = tmp87 + tmp88; + X[5 * iostride] = tmp87 - tmp88; + X[iostride] = tmp85 - tmp86; + X[6 * iostride] = tmp85 + tmp86; + } + X = X + dist; + Y = Y - dist; + for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 6) { + fftw_real tmp14; + fftw_real tmp23; + fftw_real tmp17; + fftw_real tmp20; + fftw_real tmp39; + fftw_real tmp53; + fftw_real tmp66; + fftw_real tmp69; + fftw_real tmp57; + fftw_real tmp42; + fftw_real tmp24; + fftw_real tmp33; + fftw_real tmp27; + fftw_real tmp30; + fftw_real tmp46; + fftw_real tmp58; + fftw_real tmp70; + fftw_real tmp65; + fftw_real tmp54; + fftw_real tmp35; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp37; + fftw_real tmp36; + fftw_real tmp38; + fftw_real tmp21; + fftw_real tmp22; + ASSERT_ALIGNED_DOUBLE; + tmp14 = X[0]; + tmp21 = X[3 * iostride]; + tmp22 = Y[-4 * iostride]; + tmp23 = tmp21 + tmp22; + tmp37 = tmp21 - tmp22; + { + fftw_real tmp15; + fftw_real tmp16; + fftw_real tmp18; + fftw_real tmp19; + ASSERT_ALIGNED_DOUBLE; + tmp15 = X[iostride]; + tmp16 = Y[-6 * iostride]; + tmp17 = tmp15 + tmp16; + tmp36 = tmp15 - tmp16; + tmp18 = X[2 * iostride]; + tmp19 = Y[-5 * iostride]; + tmp20 = tmp18 + tmp19; + tmp38 = tmp18 - tmp19; + } + tmp39 = (K433883739 * tmp36) + (K974927912 * tmp37) - (K781831482 * tmp38); + tmp53 = (K781831482 * tmp36) + (K974927912 * tmp38) + (K433883739 * tmp37); + tmp66 = (K974927912 * tmp36) - (K781831482 * tmp37) - (K433883739 * tmp38); + tmp69 = tmp14 + (K623489801 * tmp23) - (K900968867 * tmp20) - (K222520933 * tmp17); + tmp57 = tmp14 + (K623489801 * tmp17) - (K900968867 * tmp23) - (K222520933 * tmp20); + tmp42 = tmp14 + (K623489801 * tmp20) - (K222520933 * tmp23) - (K900968867 * tmp17); + } + { + fftw_real tmp44; + fftw_real tmp45; + fftw_real tmp43; + fftw_real tmp31; + fftw_real tmp32; + ASSERT_ALIGNED_DOUBLE; + tmp24 = Y[0]; + tmp31 = Y[-3 * iostride]; + tmp32 = X[4 * iostride]; + tmp33 = tmp31 - tmp32; + tmp44 = tmp31 + tmp32; + { + fftw_real tmp25; + fftw_real tmp26; + fftw_real tmp28; + fftw_real tmp29; + ASSERT_ALIGNED_DOUBLE; + tmp25 = Y[-iostride]; + tmp26 = X[6 * iostride]; + tmp27 = tmp25 - tmp26; + tmp45 = tmp25 + tmp26; + tmp28 = Y[-2 * iostride]; + tmp29 = X[5 * iostride]; + tmp30 = tmp28 - tmp29; + tmp43 = tmp28 + tmp29; + } + tmp46 = (K781831482 * tmp43) - (K974927912 * tmp44) - (K433883739 * tmp45); + tmp58 = (K781831482 * tmp45) + (K974927912 * tmp43) + (K433883739 * tmp44); + tmp70 = (K433883739 * tmp43) + (K781831482 * tmp44) - (K974927912 * tmp45); + tmp65 = tmp24 + (K623489801 * tmp33) - (K900968867 * tmp30) - (K222520933 * tmp27); + tmp54 = tmp24 + (K623489801 * tmp27) - (K900968867 * tmp33) - (K222520933 * tmp30); + tmp35 = tmp24 + (K623489801 * tmp30) - (K222520933 * tmp33) - (K900968867 * tmp27); + } + X[0] = tmp14 + tmp17 + tmp20 + tmp23; + { + fftw_real tmp61; + fftw_real tmp63; + fftw_real tmp60; + fftw_real tmp62; + ASSERT_ALIGNED_DOUBLE; + tmp61 = tmp54 - tmp53; + tmp63 = tmp57 + tmp58; + tmp60 = c_re(W[5]); + tmp62 = c_im(W[5]); + Y[0] = (tmp60 * tmp61) - (tmp62 * tmp63); + X[6 * iostride] = (tmp62 * tmp61) + (tmp60 * tmp63); + } + { + fftw_real tmp73; + fftw_real tmp75; + fftw_real tmp72; + fftw_real tmp74; + ASSERT_ALIGNED_DOUBLE; + tmp73 = tmp66 + tmp65; + tmp75 = tmp69 + tmp70; + tmp72 = c_re(W[1]); + tmp74 = c_im(W[1]); + Y[-4 * iostride] = (tmp72 * tmp73) - (tmp74 * tmp75); + X[2 * iostride] = (tmp74 * tmp73) + (tmp72 * tmp75); + } + { + fftw_real tmp67; + fftw_real tmp71; + fftw_real tmp64; + fftw_real tmp68; + ASSERT_ALIGNED_DOUBLE; + tmp67 = tmp65 - tmp66; + tmp71 = tmp69 - tmp70; + tmp64 = c_re(W[4]); + tmp68 = c_im(W[4]); + Y[-iostride] = (tmp64 * tmp67) - (tmp68 * tmp71); + X[5 * iostride] = (tmp68 * tmp67) + (tmp64 * tmp71); + } + Y[-6 * iostride] = tmp24 + tmp27 + tmp30 + tmp33; + { + fftw_real tmp40; + fftw_real tmp47; + fftw_real tmp34; + fftw_real tmp41; + ASSERT_ALIGNED_DOUBLE; + tmp40 = tmp35 - tmp39; + tmp47 = tmp42 - tmp46; + tmp34 = c_re(W[3]); + tmp41 = c_im(W[3]); + Y[-2 * iostride] = (tmp34 * tmp40) - (tmp41 * tmp47); + X[4 * iostride] = (tmp41 * tmp40) + (tmp34 * tmp47); + } + { + fftw_real tmp49; + fftw_real tmp51; + fftw_real tmp48; + fftw_real tmp50; + ASSERT_ALIGNED_DOUBLE; + tmp49 = tmp39 + tmp35; + tmp51 = tmp42 + tmp46; + tmp48 = c_re(W[2]); + tmp50 = c_im(W[2]); + Y[-3 * iostride] = (tmp48 * tmp49) - (tmp50 * tmp51); + X[3 * iostride] = (tmp50 * tmp49) + (tmp48 * tmp51); + } + { + fftw_real tmp55; + fftw_real tmp59; + fftw_real tmp52; + fftw_real tmp56; + ASSERT_ALIGNED_DOUBLE; + tmp55 = tmp53 + tmp54; + tmp59 = tmp57 - tmp58; + tmp52 = c_re(W[0]); + tmp56 = c_im(W[0]); + Y[-5 * iostride] = (tmp52 * tmp55) - (tmp56 * tmp59); + X[iostride] = (tmp56 * tmp55) + (tmp52 * tmp59); + } + } + if (i == m) { + fftw_real tmp9; + fftw_real tmp13; + fftw_real tmp11; + fftw_real tmp1; + fftw_real tmp4; + fftw_real tmp2; + fftw_real tmp3; + fftw_real tmp5; + fftw_real tmp12; + fftw_real tmp10; + fftw_real tmp6; + fftw_real tmp8; + fftw_real tmp7; + ASSERT_ALIGNED_DOUBLE; + tmp6 = Y[-2 * iostride]; + tmp8 = Y[0]; + tmp7 = Y[-iostride]; + tmp9 = (K1_563662964 * tmp6) + (K1_949855824 * tmp7) + (K867767478 * tmp8); + tmp13 = (K1_563662964 * tmp7) - (K1_949855824 * tmp8) - (K867767478 * tmp6); + tmp11 = (K1_949855824 * tmp6) - (K1_563662964 * tmp8) - (K867767478 * tmp7); + tmp1 = X[3 * iostride]; + tmp4 = X[0]; + tmp2 = X[2 * iostride]; + tmp3 = X[iostride]; + tmp5 = (K445041867 * tmp3) + (K1_801937735 * tmp4) - (K1_246979603 * tmp2) - tmp1; + tmp12 = (K1_801937735 * tmp2) + (K445041867 * tmp4) - (K1_246979603 * tmp3) - tmp1; + tmp10 = tmp1 + (K1_246979603 * tmp4) - (K1_801937735 * tmp3) - (K445041867 * tmp2); + X[iostride] = tmp5 - tmp9; + X[6 * iostride] = -(tmp5 + tmp9); + X[0] = tmp1 + (K2_000000000 * (tmp2 + tmp3 + tmp4)); + X[4 * iostride] = tmp13 - tmp12; + X[3 * iostride] = tmp12 + tmp13; + X[5 * iostride] = tmp11 - tmp10; + X[2 * iostride] = tmp10 + tmp11; + } +} + +static const int twiddle_order[] = +{1, 2, 3, 4, 5, 6}; +fftw_codelet_desc fftw_hc2hc_backward_7_desc = +{ + "fftw_hc2hc_backward_7", + (void (*)()) fftw_hc2hc_backward_7, + 7, + FFTW_BACKWARD, + FFTW_HC2HC, + 168, + 6, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/fhb_8.c b/src/sndobj/rfftw/fhb_8.c new file mode 100644 index 0000000..a6d7e2c --- /dev/null +++ b/src/sndobj/rfftw/fhb_8.c @@ -0,0 +1,415 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:45:12 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-backward 8 */ + +/* + * This function contains 108 FP additions, 50 FP multiplications, + * (or, 90 additions, 32 multiplications, 18 fused multiply/add), + * 31 stack variables, and 64 memory accesses + */ +static const fftw_real K765366864 = FFTW_KONST(+0.765366864730179543456919968060797733522689125); +static const fftw_real K1_847759065 = FFTW_KONST(+1.847759065022573512256366378793576573644833252); +static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); +static const fftw_real K1_414213562 = FFTW_KONST(+1.414213562373095048801688724209698078569671875); +static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); + +/* + * Generator Id's : + * $Id: fhb_8.c,v 1.1.1.1 2006/05/12 15:14:59 veplaini Exp $ + * $Id: fhb_8.c,v 1.1.1.1 2006/05/12 15:14:59 veplaini Exp $ + * $Id: fhb_8.c,v 1.1.1.1 2006/05/12 15:14:59 veplaini Exp $ + */ + +void fftw_hc2hc_backward_8(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_real *X; + fftw_real *Y; + X = A; + Y = A + (8 * iostride); + { + fftw_real tmp107; + fftw_real tmp118; + fftw_real tmp105; + fftw_real tmp116; + fftw_real tmp111; + fftw_real tmp120; + fftw_real tmp115; + fftw_real tmp121; + fftw_real tmp108; + fftw_real tmp112; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp106; + fftw_real tmp117; + fftw_real tmp103; + fftw_real tmp104; + ASSERT_ALIGNED_DOUBLE; + tmp106 = X[2 * iostride]; + tmp107 = K2_000000000 * tmp106; + tmp117 = Y[-2 * iostride]; + tmp118 = K2_000000000 * tmp117; + tmp103 = X[0]; + tmp104 = X[4 * iostride]; + tmp105 = tmp103 + tmp104; + tmp116 = tmp103 - tmp104; + { + fftw_real tmp109; + fftw_real tmp110; + fftw_real tmp113; + fftw_real tmp114; + ASSERT_ALIGNED_DOUBLE; + tmp109 = X[iostride]; + tmp110 = X[3 * iostride]; + tmp111 = K2_000000000 * (tmp109 + tmp110); + tmp120 = tmp109 - tmp110; + tmp113 = Y[-iostride]; + tmp114 = Y[-3 * iostride]; + tmp115 = K2_000000000 * (tmp113 - tmp114); + tmp121 = tmp114 + tmp113; + } + } + tmp108 = tmp105 + tmp107; + X[4 * iostride] = tmp108 - tmp111; + X[0] = tmp108 + tmp111; + tmp112 = tmp105 - tmp107; + X[6 * iostride] = tmp112 + tmp115; + X[2 * iostride] = tmp112 - tmp115; + { + fftw_real tmp119; + fftw_real tmp122; + fftw_real tmp123; + fftw_real tmp124; + ASSERT_ALIGNED_DOUBLE; + tmp119 = tmp116 - tmp118; + tmp122 = K1_414213562 * (tmp120 - tmp121); + X[5 * iostride] = tmp119 - tmp122; + X[iostride] = tmp119 + tmp122; + tmp123 = tmp116 + tmp118; + tmp124 = K1_414213562 * (tmp120 + tmp121); + X[3 * iostride] = tmp123 - tmp124; + X[7 * iostride] = tmp123 + tmp124; + } + } + X = X + dist; + Y = Y - dist; + for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 7) { + fftw_real tmp29; + fftw_real tmp60; + fftw_real tmp46; + fftw_real tmp56; + fftw_real tmp70; + fftw_real tmp96; + fftw_real tmp82; + fftw_real tmp92; + fftw_real tmp36; + fftw_real tmp57; + fftw_real tmp53; + fftw_real tmp61; + fftw_real tmp73; + fftw_real tmp83; + fftw_real tmp76; + fftw_real tmp84; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp25; + fftw_real tmp68; + fftw_real tmp42; + fftw_real tmp81; + fftw_real tmp28; + fftw_real tmp80; + fftw_real tmp45; + fftw_real tmp69; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp23; + fftw_real tmp24; + fftw_real tmp40; + fftw_real tmp41; + ASSERT_ALIGNED_DOUBLE; + tmp23 = X[0]; + tmp24 = Y[-4 * iostride]; + tmp25 = tmp23 + tmp24; + tmp68 = tmp23 - tmp24; + tmp40 = Y[0]; + tmp41 = X[4 * iostride]; + tmp42 = tmp40 - tmp41; + tmp81 = tmp40 + tmp41; + } + { + fftw_real tmp26; + fftw_real tmp27; + fftw_real tmp43; + fftw_real tmp44; + ASSERT_ALIGNED_DOUBLE; + tmp26 = X[2 * iostride]; + tmp27 = Y[-6 * iostride]; + tmp28 = tmp26 + tmp27; + tmp80 = tmp26 - tmp27; + tmp43 = Y[-2 * iostride]; + tmp44 = X[6 * iostride]; + tmp45 = tmp43 - tmp44; + tmp69 = tmp43 + tmp44; + } + tmp29 = tmp25 + tmp28; + tmp60 = tmp25 - tmp28; + tmp46 = tmp42 + tmp45; + tmp56 = tmp42 - tmp45; + tmp70 = tmp68 - tmp69; + tmp96 = tmp68 + tmp69; + tmp82 = tmp80 + tmp81; + tmp92 = tmp81 - tmp80; + } + { + fftw_real tmp32; + fftw_real tmp71; + fftw_real tmp49; + fftw_real tmp72; + fftw_real tmp35; + fftw_real tmp74; + fftw_real tmp52; + fftw_real tmp75; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp30; + fftw_real tmp31; + fftw_real tmp47; + fftw_real tmp48; + ASSERT_ALIGNED_DOUBLE; + tmp30 = X[iostride]; + tmp31 = Y[-5 * iostride]; + tmp32 = tmp30 + tmp31; + tmp71 = tmp30 - tmp31; + tmp47 = Y[-iostride]; + tmp48 = X[5 * iostride]; + tmp49 = tmp47 - tmp48; + tmp72 = tmp47 + tmp48; + } + { + fftw_real tmp33; + fftw_real tmp34; + fftw_real tmp50; + fftw_real tmp51; + ASSERT_ALIGNED_DOUBLE; + tmp33 = Y[-7 * iostride]; + tmp34 = X[3 * iostride]; + tmp35 = tmp33 + tmp34; + tmp74 = tmp33 - tmp34; + tmp50 = Y[-3 * iostride]; + tmp51 = X[7 * iostride]; + tmp52 = tmp50 - tmp51; + tmp75 = tmp50 + tmp51; + } + tmp36 = tmp32 + tmp35; + tmp57 = tmp32 - tmp35; + tmp53 = tmp49 + tmp52; + tmp61 = tmp52 - tmp49; + tmp73 = tmp71 - tmp72; + tmp83 = tmp71 + tmp72; + tmp76 = tmp74 - tmp75; + tmp84 = tmp74 + tmp75; + } + X[0] = tmp29 + tmp36; + Y[-7 * iostride] = tmp46 + tmp53; + { + fftw_real tmp38; + fftw_real tmp54; + fftw_real tmp37; + fftw_real tmp39; + ASSERT_ALIGNED_DOUBLE; + tmp38 = tmp29 - tmp36; + tmp54 = tmp46 - tmp53; + tmp37 = c_re(W[3]); + tmp39 = c_im(W[3]); + X[4 * iostride] = (tmp37 * tmp38) + (tmp39 * tmp54); + Y[-3 * iostride] = (tmp37 * tmp54) - (tmp39 * tmp38); + } + { + fftw_real tmp64; + fftw_real tmp66; + fftw_real tmp63; + fftw_real tmp65; + ASSERT_ALIGNED_DOUBLE; + tmp64 = tmp57 + tmp56; + tmp66 = tmp60 + tmp61; + tmp63 = c_re(W[1]); + tmp65 = c_im(W[1]); + Y[-5 * iostride] = (tmp63 * tmp64) - (tmp65 * tmp66); + X[2 * iostride] = (tmp65 * tmp64) + (tmp63 * tmp66); + } + { + fftw_real tmp58; + fftw_real tmp62; + fftw_real tmp55; + fftw_real tmp59; + ASSERT_ALIGNED_DOUBLE; + tmp58 = tmp56 - tmp57; + tmp62 = tmp60 - tmp61; + tmp55 = c_re(W[5]); + tmp59 = c_im(W[5]); + Y[-iostride] = (tmp55 * tmp58) - (tmp59 * tmp62); + X[6 * iostride] = (tmp59 * tmp58) + (tmp55 * tmp62); + } + { + fftw_real tmp94; + fftw_real tmp100; + fftw_real tmp98; + fftw_real tmp102; + fftw_real tmp93; + fftw_real tmp97; + ASSERT_ALIGNED_DOUBLE; + tmp93 = K707106781 * (tmp73 - tmp76); + tmp94 = tmp92 + tmp93; + tmp100 = tmp92 - tmp93; + tmp97 = K707106781 * (tmp83 + tmp84); + tmp98 = tmp96 - tmp97; + tmp102 = tmp96 + tmp97; + { + fftw_real tmp91; + fftw_real tmp95; + fftw_real tmp99; + fftw_real tmp101; + ASSERT_ALIGNED_DOUBLE; + tmp91 = c_re(W[2]); + tmp95 = c_im(W[2]); + Y[-4 * iostride] = (tmp91 * tmp94) - (tmp95 * tmp98); + X[3 * iostride] = (tmp95 * tmp94) + (tmp91 * tmp98); + tmp99 = c_re(W[6]); + tmp101 = c_im(W[6]); + Y[0] = (tmp99 * tmp100) - (tmp101 * tmp102); + X[7 * iostride] = (tmp101 * tmp100) + (tmp99 * tmp102); + } + } + { + fftw_real tmp78; + fftw_real tmp88; + fftw_real tmp86; + fftw_real tmp90; + fftw_real tmp77; + fftw_real tmp85; + ASSERT_ALIGNED_DOUBLE; + tmp77 = K707106781 * (tmp73 + tmp76); + tmp78 = tmp70 - tmp77; + tmp88 = tmp70 + tmp77; + tmp85 = K707106781 * (tmp83 - tmp84); + tmp86 = tmp82 - tmp85; + tmp90 = tmp82 + tmp85; + { + fftw_real tmp67; + fftw_real tmp79; + fftw_real tmp87; + fftw_real tmp89; + ASSERT_ALIGNED_DOUBLE; + tmp67 = c_re(W[4]); + tmp79 = c_im(W[4]); + X[5 * iostride] = (tmp67 * tmp78) + (tmp79 * tmp86); + Y[-2 * iostride] = (tmp67 * tmp86) - (tmp79 * tmp78); + tmp87 = c_re(W[0]); + tmp89 = c_im(W[0]); + X[iostride] = (tmp87 * tmp88) + (tmp89 * tmp90); + Y[-6 * iostride] = (tmp87 * tmp90) - (tmp89 * tmp88); + } + } + } + if (i == m) { + fftw_real tmp3; + fftw_real tmp7; + fftw_real tmp15; + fftw_real tmp20; + fftw_real tmp6; + fftw_real tmp12; + fftw_real tmp10; + fftw_real tmp21; + fftw_real tmp19; + fftw_real tmp22; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp13; + fftw_real tmp14; + ASSERT_ALIGNED_DOUBLE; + tmp1 = X[0]; + tmp2 = X[3 * iostride]; + tmp3 = tmp1 + tmp2; + tmp7 = tmp1 - tmp2; + tmp13 = Y[0]; + tmp14 = Y[-3 * iostride]; + tmp15 = tmp13 + tmp14; + tmp20 = tmp13 - tmp14; + } + { + fftw_real tmp4; + fftw_real tmp5; + fftw_real tmp8; + fftw_real tmp9; + ASSERT_ALIGNED_DOUBLE; + tmp4 = X[2 * iostride]; + tmp5 = X[iostride]; + tmp6 = tmp4 + tmp5; + tmp12 = tmp4 - tmp5; + tmp8 = Y[-2 * iostride]; + tmp9 = Y[-iostride]; + tmp10 = tmp8 + tmp9; + tmp21 = tmp8 - tmp9; + } + X[0] = K2_000000000 * (tmp3 + tmp6); + tmp19 = tmp3 - tmp6; + tmp22 = tmp20 - tmp21; + X[2 * iostride] = K1_414213562 * (tmp19 - tmp22); + X[6 * iostride] = -(K1_414213562 * (tmp19 + tmp22)); + X[4 * iostride] = -(K2_000000000 * (tmp21 + tmp20)); + { + fftw_real tmp11; + fftw_real tmp16; + fftw_real tmp17; + fftw_real tmp18; + ASSERT_ALIGNED_DOUBLE; + tmp11 = tmp7 - tmp10; + tmp16 = tmp12 + tmp15; + X[iostride] = (K1_847759065 * tmp11) - (K765366864 * tmp16); + X[5 * iostride] = -((K765366864 * tmp11) + (K1_847759065 * tmp16)); + tmp17 = tmp7 + tmp10; + tmp18 = tmp15 - tmp12; + X[3 * iostride] = (K765366864 * tmp17) - (K1_847759065 * tmp18); + X[7 * iostride] = -((K1_847759065 * tmp17) + (K765366864 * tmp18)); + } + } +} + +static const int twiddle_order[] = +{1, 2, 3, 4, 5, 6, 7}; +fftw_codelet_desc fftw_hc2hc_backward_8_desc = +{ + "fftw_hc2hc_backward_8", + (void (*)()) fftw_hc2hc_backward_8, + 8, + FFTW_BACKWARD, + FFTW_HC2HC, + 190, + 7, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/fhb_9.c b/src/sndobj/rfftw/fhb_9.c new file mode 100644 index 0000000..6451692 --- /dev/null +++ b/src/sndobj/rfftw/fhb_9.c @@ -0,0 +1,564 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:45:14 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-backward 9 */ + +/* + * This function contains 183 FP additions, 122 FP multiplications, + * (or, 130 additions, 69 multiplications, 53 fused multiply/add), + * 43 stack variables, and 72 memory accesses + */ +static const fftw_real K663413948 = FFTW_KONST(+0.663413948168938396205421319635891297216863310); +static const fftw_real K556670399 = FFTW_KONST(+0.556670399226419366452912952047023132968291906); +static const fftw_real K296198132 = FFTW_KONST(+0.296198132726023843175338011893050938967728390); +static const fftw_real K150383733 = FFTW_KONST(+0.150383733180435296639271897612501926072238258); +static const fftw_real K813797681 = FFTW_KONST(+0.813797681349373692844693217248393223289101568); +static const fftw_real K852868531 = FFTW_KONST(+0.852868531952443209628250963940074071936020296); +static const fftw_real K939692620 = FFTW_KONST(+0.939692620785908384054109277324731469936208134); +static const fftw_real K342020143 = FFTW_KONST(+0.342020143325668733044099614682259580763083368); +static const fftw_real K984807753 = FFTW_KONST(+0.984807753012208059366743024589523013670643252); +static const fftw_real K173648177 = FFTW_KONST(+0.173648177666930348851716626769314796000375677); +static const fftw_real K300767466 = FFTW_KONST(+0.300767466360870593278543795225003852144476517); +static const fftw_real K1_705737063 = FFTW_KONST(+1.705737063904886419256501927880148143872040591); +static const fftw_real K642787609 = FFTW_KONST(+0.642787609686539326322643409907263432907559884); +static const fftw_real K766044443 = FFTW_KONST(+0.766044443118978035202392650555416673935832457); +static const fftw_real K1_326827896 = FFTW_KONST(+1.326827896337876792410842639271782594433726619); +static const fftw_real K1_113340798 = FFTW_KONST(+1.113340798452838732905825904094046265936583811); +static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); +static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); +static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); +static const fftw_real K1_732050807 = FFTW_KONST(+1.732050807568877293527446341505872366942805254); + +/* + * Generator Id's : + * $Id: fhb_9.c,v 1.1.1.1 2006/05/12 15:14:46 veplaini Exp $ + * $Id: fhb_9.c,v 1.1.1.1 2006/05/12 15:14:46 veplaini Exp $ + * $Id: fhb_9.c,v 1.1.1.1 2006/05/12 15:14:46 veplaini Exp $ + */ + +void fftw_hc2hc_backward_9(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_real *X; + fftw_real *Y; + X = A; + Y = A + (9 * iostride); + { + fftw_real tmp153; + fftw_real tmp181; + fftw_real tmp175; + fftw_real tmp160; + fftw_real tmp163; + fftw_real tmp158; + fftw_real tmp167; + fftw_real tmp178; + fftw_real tmp170; + fftw_real tmp179; + fftw_real tmp159; + fftw_real tmp164; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp174; + fftw_real tmp151; + fftw_real tmp152; + fftw_real tmp172; + fftw_real tmp173; + ASSERT_ALIGNED_DOUBLE; + tmp173 = Y[-3 * iostride]; + tmp174 = K1_732050807 * tmp173; + tmp151 = X[0]; + tmp152 = X[3 * iostride]; + tmp172 = tmp152 - tmp151; + tmp153 = tmp151 + (K2_000000000 * tmp152); + tmp181 = tmp174 - tmp172; + tmp175 = tmp172 + tmp174; + } + { + fftw_real tmp154; + fftw_real tmp157; + fftw_real tmp168; + fftw_real tmp166; + fftw_real tmp165; + fftw_real tmp169; + ASSERT_ALIGNED_DOUBLE; + tmp154 = X[iostride]; + tmp160 = Y[-iostride]; + { + fftw_real tmp155; + fftw_real tmp156; + fftw_real tmp161; + fftw_real tmp162; + ASSERT_ALIGNED_DOUBLE; + tmp155 = X[4 * iostride]; + tmp156 = X[2 * iostride]; + tmp157 = tmp155 + tmp156; + tmp168 = K866025403 * (tmp155 - tmp156); + tmp161 = Y[-2 * iostride]; + tmp162 = Y[-4 * iostride]; + tmp163 = tmp161 - tmp162; + tmp166 = K866025403 * (tmp162 + tmp161); + } + tmp158 = tmp154 + tmp157; + tmp165 = tmp154 - (K500000000 * tmp157); + tmp167 = tmp165 - tmp166; + tmp178 = tmp165 + tmp166; + tmp169 = (K500000000 * tmp163) + tmp160; + tmp170 = tmp168 + tmp169; + tmp179 = tmp169 - tmp168; + } + X[0] = tmp153 + (K2_000000000 * tmp158); + tmp159 = tmp153 - tmp158; + tmp164 = K1_732050807 * (tmp160 - tmp163); + X[6 * iostride] = tmp159 + tmp164; + X[3 * iostride] = tmp159 - tmp164; + { + fftw_real tmp176; + fftw_real tmp171; + fftw_real tmp177; + fftw_real tmp183; + fftw_real tmp180; + fftw_real tmp182; + ASSERT_ALIGNED_DOUBLE; + tmp176 = (K1_113340798 * tmp167) + (K1_326827896 * tmp170); + tmp171 = (K766044443 * tmp167) - (K642787609 * tmp170); + tmp177 = tmp171 + tmp175; + X[iostride] = (K2_000000000 * tmp171) - tmp175; + X[7 * iostride] = tmp176 - tmp177; + X[4 * iostride] = -(tmp176 + tmp177); + tmp183 = (K1_705737063 * tmp178) + (K300767466 * tmp179); + tmp180 = (K173648177 * tmp178) - (K984807753 * tmp179); + tmp182 = tmp181 - tmp180; + X[2 * iostride] = (K2_000000000 * tmp180) + tmp181; + X[8 * iostride] = tmp183 + tmp182; + X[5 * iostride] = tmp182 - tmp183; + } + } + X = X + dist; + Y = Y - dist; + for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 8) { + fftw_real tmp43; + fftw_real tmp86; + fftw_real tmp134; + fftw_real tmp59; + fftw_real tmp106; + fftw_real tmp124; + fftw_real tmp48; + fftw_real tmp53; + fftw_real tmp54; + fftw_real tmp100; + fftw_real tmp108; + fftw_real tmp130; + fftw_real tmp136; + fftw_real tmp127; + fftw_real tmp135; + fftw_real tmp93; + fftw_real tmp107; + fftw_real tmp64; + fftw_real tmp69; + fftw_real tmp70; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp39; + fftw_real tmp55; + fftw_real tmp42; + fftw_real tmp104; + fftw_real tmp58; + fftw_real tmp85; + fftw_real tmp84; + fftw_real tmp105; + ASSERT_ALIGNED_DOUBLE; + tmp39 = X[0]; + tmp55 = Y[0]; + { + fftw_real tmp40; + fftw_real tmp41; + fftw_real tmp56; + fftw_real tmp57; + ASSERT_ALIGNED_DOUBLE; + tmp40 = X[3 * iostride]; + tmp41 = Y[-6 * iostride]; + tmp42 = tmp40 + tmp41; + tmp104 = K866025403 * (tmp40 - tmp41); + tmp56 = Y[-3 * iostride]; + tmp57 = X[6 * iostride]; + tmp58 = tmp56 - tmp57; + tmp85 = K866025403 * (tmp56 + tmp57); + } + tmp43 = tmp39 + tmp42; + tmp84 = tmp39 - (K500000000 * tmp42); + tmp86 = tmp84 - tmp85; + tmp134 = tmp84 + tmp85; + tmp59 = tmp55 + tmp58; + tmp105 = tmp55 - (K500000000 * tmp58); + tmp106 = tmp104 + tmp105; + tmp124 = tmp105 - tmp104; + } + { + fftw_real tmp44; + fftw_real tmp47; + fftw_real tmp87; + fftw_real tmp90; + fftw_real tmp60; + fftw_real tmp63; + fftw_real tmp88; + fftw_real tmp91; + fftw_real tmp49; + fftw_real tmp52; + fftw_real tmp94; + fftw_real tmp97; + fftw_real tmp65; + fftw_real tmp68; + fftw_real tmp95; + fftw_real tmp98; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp45; + fftw_real tmp46; + fftw_real tmp61; + fftw_real tmp62; + ASSERT_ALIGNED_DOUBLE; + tmp44 = X[iostride]; + tmp45 = X[4 * iostride]; + tmp46 = Y[-7 * iostride]; + tmp47 = tmp45 + tmp46; + tmp87 = tmp44 - (K500000000 * tmp47); + tmp90 = K866025403 * (tmp45 - tmp46); + tmp60 = Y[-iostride]; + tmp61 = Y[-4 * iostride]; + tmp62 = X[7 * iostride]; + tmp63 = tmp61 - tmp62; + tmp88 = K866025403 * (tmp61 + tmp62); + tmp91 = tmp60 - (K500000000 * tmp63); + } + { + fftw_real tmp50; + fftw_real tmp51; + fftw_real tmp66; + fftw_real tmp67; + ASSERT_ALIGNED_DOUBLE; + tmp49 = X[2 * iostride]; + tmp50 = Y[-5 * iostride]; + tmp51 = Y[-8 * iostride]; + tmp52 = tmp50 + tmp51; + tmp94 = tmp49 - (K500000000 * tmp52); + tmp97 = K866025403 * (tmp50 - tmp51); + tmp65 = Y[-2 * iostride]; + tmp66 = X[5 * iostride]; + tmp67 = X[8 * iostride]; + tmp68 = tmp66 + tmp67; + tmp95 = K866025403 * (tmp66 - tmp67); + tmp98 = tmp65 + (K500000000 * tmp68); + } + tmp48 = tmp44 + tmp47; + tmp53 = tmp49 + tmp52; + tmp54 = tmp48 + tmp53; + { + fftw_real tmp96; + fftw_real tmp99; + fftw_real tmp128; + fftw_real tmp129; + ASSERT_ALIGNED_DOUBLE; + tmp96 = tmp94 + tmp95; + tmp99 = tmp97 + tmp98; + tmp100 = (K173648177 * tmp96) - (K984807753 * tmp99); + tmp108 = (K984807753 * tmp96) + (K173648177 * tmp99); + tmp128 = tmp94 - tmp95; + tmp129 = tmp98 - tmp97; + tmp130 = (K342020143 * tmp128) - (K939692620 * tmp129); + tmp136 = (K939692620 * tmp128) + (K342020143 * tmp129); + } + { + fftw_real tmp125; + fftw_real tmp126; + fftw_real tmp89; + fftw_real tmp92; + ASSERT_ALIGNED_DOUBLE; + tmp125 = tmp91 - tmp90; + tmp126 = tmp87 + tmp88; + tmp127 = (K173648177 * tmp125) + (K984807753 * tmp126); + tmp135 = (K173648177 * tmp126) - (K984807753 * tmp125); + tmp89 = tmp87 - tmp88; + tmp92 = tmp90 + tmp91; + tmp93 = (K766044443 * tmp89) - (K642787609 * tmp92); + tmp107 = (K766044443 * tmp92) + (K642787609 * tmp89); + tmp64 = tmp60 + tmp63; + tmp69 = tmp65 - tmp68; + tmp70 = tmp64 + tmp69; + } + } + X[0] = tmp43 + tmp54; + { + fftw_real tmp74; + fftw_real tmp80; + fftw_real tmp78; + fftw_real tmp82; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp72; + fftw_real tmp73; + fftw_real tmp76; + fftw_real tmp77; + ASSERT_ALIGNED_DOUBLE; + tmp72 = tmp59 - (K500000000 * tmp70); + tmp73 = K866025403 * (tmp48 - tmp53); + tmp74 = tmp72 - tmp73; + tmp80 = tmp73 + tmp72; + tmp76 = tmp43 - (K500000000 * tmp54); + tmp77 = K866025403 * (tmp69 - tmp64); + tmp78 = tmp76 - tmp77; + tmp82 = tmp76 + tmp77; + } + { + fftw_real tmp71; + fftw_real tmp75; + fftw_real tmp79; + fftw_real tmp81; + ASSERT_ALIGNED_DOUBLE; + tmp71 = c_re(W[5]); + tmp75 = c_im(W[5]); + Y[-2 * iostride] = (tmp71 * tmp74) - (tmp75 * tmp78); + X[6 * iostride] = (tmp75 * tmp74) + (tmp71 * tmp78); + tmp79 = c_re(W[2]); + tmp81 = c_im(W[2]); + Y[-5 * iostride] = (tmp79 * tmp80) - (tmp81 * tmp82); + X[3 * iostride] = (tmp81 * tmp80) + (tmp79 * tmp82); + } + } + Y[-8 * iostride] = tmp59 + tmp70; + { + fftw_real tmp113; + fftw_real tmp102; + fftw_real tmp116; + fftw_real tmp117; + fftw_real tmp110; + fftw_real tmp112; + fftw_real tmp101; + fftw_real tmp109; + fftw_real tmp83; + fftw_real tmp103; + ASSERT_ALIGNED_DOUBLE; + tmp113 = K866025403 * (tmp93 - tmp100); + tmp101 = tmp93 + tmp100; + tmp102 = tmp86 + tmp101; + tmp116 = tmp86 - (K500000000 * tmp101); + tmp117 = K866025403 * (tmp108 - tmp107); + tmp109 = tmp107 + tmp108; + tmp110 = tmp106 + tmp109; + tmp112 = tmp106 - (K500000000 * tmp109); + tmp83 = c_re(W[0]); + tmp103 = c_im(W[0]); + X[iostride] = (tmp83 * tmp102) + (tmp103 * tmp110); + Y[-7 * iostride] = (tmp83 * tmp110) - (tmp103 * tmp102); + { + fftw_real tmp120; + fftw_real tmp122; + fftw_real tmp119; + fftw_real tmp121; + ASSERT_ALIGNED_DOUBLE; + tmp120 = tmp113 + tmp112; + tmp122 = tmp116 + tmp117; + tmp119 = c_re(W[3]); + tmp121 = c_im(W[3]); + Y[-4 * iostride] = (tmp119 * tmp120) - (tmp121 * tmp122); + X[4 * iostride] = (tmp121 * tmp120) + (tmp119 * tmp122); + } + { + fftw_real tmp114; + fftw_real tmp118; + fftw_real tmp111; + fftw_real tmp115; + ASSERT_ALIGNED_DOUBLE; + tmp114 = tmp112 - tmp113; + tmp118 = tmp116 - tmp117; + tmp111 = c_re(W[6]); + tmp115 = c_im(W[6]); + Y[-iostride] = (tmp111 * tmp114) - (tmp115 * tmp118); + X[7 * iostride] = (tmp115 * tmp114) + (tmp111 * tmp118); + } + } + { + fftw_real tmp141; + fftw_real tmp132; + fftw_real tmp144; + fftw_real tmp145; + fftw_real tmp138; + fftw_real tmp140; + fftw_real tmp131; + fftw_real tmp137; + fftw_real tmp123; + fftw_real tmp133; + ASSERT_ALIGNED_DOUBLE; + tmp141 = K866025403 * (tmp130 - tmp127); + tmp131 = tmp127 + tmp130; + tmp132 = tmp124 + tmp131; + tmp144 = tmp124 - (K500000000 * tmp131); + tmp145 = K866025403 * (tmp135 + tmp136); + tmp137 = tmp135 - tmp136; + tmp138 = tmp134 + tmp137; + tmp140 = tmp134 - (K500000000 * tmp137); + tmp123 = c_re(W[1]); + tmp133 = c_im(W[1]); + Y[-6 * iostride] = (tmp123 * tmp132) - (tmp133 * tmp138); + X[2 * iostride] = (tmp133 * tmp132) + (tmp123 * tmp138); + { + fftw_real tmp148; + fftw_real tmp150; + fftw_real tmp147; + fftw_real tmp149; + ASSERT_ALIGNED_DOUBLE; + tmp148 = tmp141 + tmp140; + tmp150 = tmp144 + tmp145; + tmp147 = c_re(W[4]); + tmp149 = c_im(W[4]); + X[5 * iostride] = (tmp147 * tmp148) + (tmp149 * tmp150); + Y[-3 * iostride] = (tmp147 * tmp150) - (tmp149 * tmp148); + } + { + fftw_real tmp142; + fftw_real tmp146; + fftw_real tmp139; + fftw_real tmp143; + ASSERT_ALIGNED_DOUBLE; + tmp142 = tmp140 - tmp141; + tmp146 = tmp144 - tmp145; + tmp139 = c_re(W[7]); + tmp143 = c_im(W[7]); + X[8 * iostride] = (tmp139 * tmp142) + (tmp143 * tmp146); + Y[0] = (tmp139 * tmp146) - (tmp143 * tmp142); + } + } + } + if (i == m) { + fftw_real tmp3; + fftw_real tmp31; + fftw_real tmp28; + fftw_real tmp17; + fftw_real tmp34; + fftw_real tmp7; + fftw_real tmp33; + fftw_real tmp23; + fftw_real tmp20; + fftw_real tmp35; + fftw_real tmp12; + fftw_real tmp14; + fftw_real tmp32; + fftw_real tmp8; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp27; + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp25; + fftw_real tmp26; + ASSERT_ALIGNED_DOUBLE; + tmp26 = Y[-iostride]; + tmp27 = K1_732050807 * tmp26; + tmp1 = X[4 * iostride]; + tmp2 = X[iostride]; + tmp25 = tmp2 - tmp1; + tmp3 = tmp1 + (K2_000000000 * tmp2); + tmp31 = tmp25 - tmp27; + tmp28 = tmp25 + tmp27; + } + { + fftw_real tmp4; + fftw_real tmp6; + fftw_real tmp5; + fftw_real tmp13; + fftw_real tmp15; + fftw_real tmp18; + fftw_real tmp22; + fftw_real tmp9; + fftw_real tmp11; + fftw_real tmp10; + fftw_real tmp21; + fftw_real tmp19; + fftw_real tmp16; + ASSERT_ALIGNED_DOUBLE; + tmp4 = X[3 * iostride]; + tmp6 = X[2 * iostride]; + tmp5 = X[0]; + tmp13 = K500000000 * (tmp5 + tmp6); + tmp15 = K866025403 * (tmp6 - tmp5); + tmp18 = K866025403 * (tmp4 - tmp5); + tmp22 = K500000000 * (tmp4 + tmp5); + tmp9 = Y[-2 * iostride]; + tmp11 = Y[0]; + tmp10 = Y[-3 * iostride]; + tmp21 = K866025403 * (tmp11 - tmp10); + tmp19 = (K500000000 * (tmp11 + tmp10)) + tmp9; + tmp16 = (K500000000 * (tmp9 - tmp11)) + tmp10; + tmp17 = tmp15 - tmp16; + tmp34 = tmp15 + tmp16; + tmp7 = tmp4 + tmp5 + tmp6; + tmp33 = tmp22 + tmp21 - tmp6; + tmp23 = (tmp6 + tmp21) - tmp22; + tmp20 = tmp18 - tmp19; + tmp35 = tmp18 + tmp19; + tmp12 = (K1_732050807 * (tmp9 - tmp10)) - (K1_732050807 * tmp11); + tmp14 = tmp4 - (K866025403 * (tmp11 + tmp9)) - tmp13; + tmp32 = tmp13 - (K866025403 * (tmp11 + tmp9)) - tmp4; + } + X[0] = tmp3 + (K2_000000000 * tmp7); + tmp8 = tmp7 - tmp3; + X[3 * iostride] = tmp8 + tmp12; + X[6 * iostride] = tmp12 - tmp8; + { + fftw_real tmp30; + fftw_real tmp24; + fftw_real tmp29; + fftw_real tmp38; + fftw_real tmp36; + fftw_real tmp37; + ASSERT_ALIGNED_DOUBLE; + tmp30 = (K852868531 * tmp14) + (K813797681 * tmp20) + (K150383733 * tmp17) - (K296198132 * tmp23); + tmp24 = (K173648177 * tmp14) - (K984807753 * tmp17) - (K342020143 * tmp20) - (K939692620 * tmp23); + tmp29 = tmp28 + (K500000000 * tmp24); + X[2 * iostride] = tmp24 - tmp28; + X[8 * iostride] = tmp30 - tmp29; + X[5 * iostride] = tmp29 + tmp30; + tmp38 = (K556670399 * tmp32) + (K663413948 * tmp34) - (K150383733 * tmp35) - (K852868531 * tmp33); + tmp36 = (K766044443 * tmp32) + (K173648177 * tmp33) - (K642787609 * tmp34) - (K984807753 * tmp35); + tmp37 = (K500000000 * tmp36) - tmp31; + X[iostride] = tmp31 + tmp36; + X[7 * iostride] = tmp38 - tmp37; + X[4 * iostride] = tmp37 + tmp38; + } + } +} + +static const int twiddle_order[] = +{1, 2, 3, 4, 5, 6, 7, 8}; +fftw_codelet_desc fftw_hc2hc_backward_9_desc = +{ + "fftw_hc2hc_backward_9", + (void (*)()) fftw_hc2hc_backward_9, + 9, + FFTW_BACKWARD, + FFTW_HC2HC, + 212, + 8, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/fhf_10.c b/src/sndobj/rfftw/fhf_10.c new file mode 100644 index 0000000..f0eb13b --- /dev/null +++ b/src/sndobj/rfftw/fhf_10.c @@ -0,0 +1,561 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:49 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-forward 10 */ + +/* + * This function contains 168 FP additions, 84 FP multiplications, + * (or, 126 additions, 42 multiplications, 42 fused multiply/add), + * 43 stack variables, and 80 memory accesses + */ +static const fftw_real K587785252 = FFTW_KONST(+0.587785252292473129168705954639072768597652438); +static const fftw_real K951056516 = FFTW_KONST(+0.951056516295153572116439333379382143405698634); +static const fftw_real K250000000 = FFTW_KONST(+0.250000000000000000000000000000000000000000000); +static const fftw_real K559016994 = FFTW_KONST(+0.559016994374947424102293417182819058860154590); + +/* + * Generator Id's : + * $Id: fhf_10.c,v 1.1.1.1 2006/05/12 15:14:49 veplaini Exp $ + * $Id: fhf_10.c,v 1.1.1.1 2006/05/12 15:14:49 veplaini Exp $ + * $Id: fhf_10.c,v 1.1.1.1 2006/05/12 15:14:49 veplaini Exp $ + */ + +void fftw_hc2hc_forward_10(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_real *X; + fftw_real *Y; + X = A; + Y = A + (10 * iostride); + { + fftw_real tmp170; + fftw_real tmp181; + fftw_real tmp162; + fftw_real tmp175; + fftw_real tmp165; + fftw_real tmp176; + fftw_real tmp166; + fftw_real tmp183; + fftw_real tmp155; + fftw_real tmp178; + fftw_real tmp158; + fftw_real tmp179; + fftw_real tmp159; + fftw_real tmp182; + fftw_real tmp168; + fftw_real tmp169; + ASSERT_ALIGNED_DOUBLE; + tmp168 = X[0]; + tmp169 = X[5 * iostride]; + tmp170 = tmp168 - tmp169; + tmp181 = tmp168 + tmp169; + { + fftw_real tmp160; + fftw_real tmp161; + fftw_real tmp163; + fftw_real tmp164; + ASSERT_ALIGNED_DOUBLE; + tmp160 = X[4 * iostride]; + tmp161 = X[9 * iostride]; + tmp162 = tmp160 - tmp161; + tmp175 = tmp160 + tmp161; + tmp163 = X[6 * iostride]; + tmp164 = X[iostride]; + tmp165 = tmp163 - tmp164; + tmp176 = tmp163 + tmp164; + } + tmp166 = tmp162 + tmp165; + tmp183 = tmp175 + tmp176; + { + fftw_real tmp153; + fftw_real tmp154; + fftw_real tmp156; + fftw_real tmp157; + ASSERT_ALIGNED_DOUBLE; + tmp153 = X[2 * iostride]; + tmp154 = X[7 * iostride]; + tmp155 = tmp153 - tmp154; + tmp178 = tmp153 + tmp154; + tmp156 = X[8 * iostride]; + tmp157 = X[3 * iostride]; + tmp158 = tmp156 - tmp157; + tmp179 = tmp156 + tmp157; + } + tmp159 = tmp155 + tmp158; + tmp182 = tmp178 + tmp179; + { + fftw_real tmp167; + fftw_real tmp171; + fftw_real tmp172; + fftw_real tmp186; + fftw_real tmp184; + fftw_real tmp185; + ASSERT_ALIGNED_DOUBLE; + tmp167 = K559016994 * (tmp159 - tmp166); + tmp171 = tmp159 + tmp166; + tmp172 = tmp170 - (K250000000 * tmp171); + X[iostride] = tmp167 + tmp172; + X[3 * iostride] = tmp172 - tmp167; + X[5 * iostride] = tmp170 + tmp171; + tmp186 = K559016994 * (tmp182 - tmp183); + tmp184 = tmp182 + tmp183; + tmp185 = tmp181 - (K250000000 * tmp184); + X[2 * iostride] = tmp185 - tmp186; + X[4 * iostride] = tmp186 + tmp185; + X[0] = tmp181 + tmp184; + } + { + fftw_real tmp173; + fftw_real tmp174; + fftw_real tmp177; + fftw_real tmp180; + ASSERT_ALIGNED_DOUBLE; + tmp173 = tmp155 - tmp158; + tmp174 = tmp162 - tmp165; + Y[-iostride] = -((K951056516 * tmp173) + (K587785252 * tmp174)); + Y[-3 * iostride] = (K587785252 * tmp173) - (K951056516 * tmp174); + tmp177 = tmp175 - tmp176; + tmp180 = tmp178 - tmp179; + Y[-2 * iostride] = (K951056516 * tmp177) - (K587785252 * tmp180); + Y[-4 * iostride] = (K951056516 * tmp180) + (K587785252 * tmp177); + } + } + X = X + dist; + Y = Y - dist; + for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 9) { + fftw_real tmp39; + fftw_real tmp87; + fftw_real tmp132; + fftw_real tmp144; + fftw_real tmp73; + fftw_real tmp84; + fftw_real tmp85; + fftw_real tmp91; + fftw_real tmp92; + fftw_real tmp93; + fftw_real tmp100; + fftw_real tmp103; + fftw_real tmp128; + fftw_real tmp121; + fftw_real tmp122; + fftw_real tmp142; + fftw_real tmp50; + fftw_real tmp61; + fftw_real tmp62; + fftw_real tmp88; + fftw_real tmp89; + fftw_real tmp90; + fftw_real tmp107; + fftw_real tmp110; + fftw_real tmp127; + fftw_real tmp118; + fftw_real tmp119; + fftw_real tmp141; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp33; + fftw_real tmp131; + fftw_real tmp38; + fftw_real tmp130; + ASSERT_ALIGNED_DOUBLE; + tmp33 = X[0]; + tmp131 = Y[-9 * iostride]; + { + fftw_real tmp35; + fftw_real tmp37; + fftw_real tmp34; + fftw_real tmp36; + ASSERT_ALIGNED_DOUBLE; + tmp35 = X[5 * iostride]; + tmp37 = Y[-4 * iostride]; + tmp34 = c_re(W[4]); + tmp36 = c_im(W[4]); + tmp38 = (tmp34 * tmp35) - (tmp36 * tmp37); + tmp130 = (tmp36 * tmp35) + (tmp34 * tmp37); + } + tmp39 = tmp33 - tmp38; + tmp87 = tmp33 + tmp38; + tmp132 = tmp130 + tmp131; + tmp144 = tmp131 - tmp130; + } + { + fftw_real tmp67; + fftw_real tmp98; + fftw_real tmp83; + fftw_real tmp102; + fftw_real tmp72; + fftw_real tmp99; + fftw_real tmp78; + fftw_real tmp101; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp64; + fftw_real tmp66; + fftw_real tmp63; + fftw_real tmp65; + ASSERT_ALIGNED_DOUBLE; + tmp64 = X[4 * iostride]; + tmp66 = Y[-5 * iostride]; + tmp63 = c_re(W[3]); + tmp65 = c_im(W[3]); + tmp67 = (tmp63 * tmp64) - (tmp65 * tmp66); + tmp98 = (tmp65 * tmp64) + (tmp63 * tmp66); + } + { + fftw_real tmp80; + fftw_real tmp82; + fftw_real tmp79; + fftw_real tmp81; + ASSERT_ALIGNED_DOUBLE; + tmp80 = X[iostride]; + tmp82 = Y[-8 * iostride]; + tmp79 = c_re(W[0]); + tmp81 = c_im(W[0]); + tmp83 = (tmp79 * tmp80) - (tmp81 * tmp82); + tmp102 = (tmp81 * tmp80) + (tmp79 * tmp82); + } + { + fftw_real tmp69; + fftw_real tmp71; + fftw_real tmp68; + fftw_real tmp70; + ASSERT_ALIGNED_DOUBLE; + tmp69 = X[9 * iostride]; + tmp71 = Y[0]; + tmp68 = c_re(W[8]); + tmp70 = c_im(W[8]); + tmp72 = (tmp68 * tmp69) - (tmp70 * tmp71); + tmp99 = (tmp70 * tmp69) + (tmp68 * tmp71); + } + { + fftw_real tmp75; + fftw_real tmp77; + fftw_real tmp74; + fftw_real tmp76; + ASSERT_ALIGNED_DOUBLE; + tmp75 = X[6 * iostride]; + tmp77 = Y[-3 * iostride]; + tmp74 = c_re(W[5]); + tmp76 = c_im(W[5]); + tmp78 = (tmp74 * tmp75) - (tmp76 * tmp77); + tmp101 = (tmp76 * tmp75) + (tmp74 * tmp77); + } + tmp73 = tmp67 - tmp72; + tmp84 = tmp78 - tmp83; + tmp85 = tmp73 + tmp84; + tmp91 = tmp67 + tmp72; + tmp92 = tmp78 + tmp83; + tmp93 = tmp91 + tmp92; + tmp100 = tmp98 + tmp99; + tmp103 = tmp101 + tmp102; + tmp128 = tmp100 + tmp103; + tmp121 = tmp98 - tmp99; + tmp122 = tmp101 - tmp102; + tmp142 = tmp121 + tmp122; + } + { + fftw_real tmp44; + fftw_real tmp105; + fftw_real tmp60; + fftw_real tmp109; + fftw_real tmp49; + fftw_real tmp106; + fftw_real tmp55; + fftw_real tmp108; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp41; + fftw_real tmp43; + fftw_real tmp40; + fftw_real tmp42; + ASSERT_ALIGNED_DOUBLE; + tmp41 = X[2 * iostride]; + tmp43 = Y[-7 * iostride]; + tmp40 = c_re(W[1]); + tmp42 = c_im(W[1]); + tmp44 = (tmp40 * tmp41) - (tmp42 * tmp43); + tmp105 = (tmp42 * tmp41) + (tmp40 * tmp43); + } + { + fftw_real tmp57; + fftw_real tmp59; + fftw_real tmp56; + fftw_real tmp58; + ASSERT_ALIGNED_DOUBLE; + tmp57 = X[3 * iostride]; + tmp59 = Y[-6 * iostride]; + tmp56 = c_re(W[2]); + tmp58 = c_im(W[2]); + tmp60 = (tmp56 * tmp57) - (tmp58 * tmp59); + tmp109 = (tmp58 * tmp57) + (tmp56 * tmp59); + } + { + fftw_real tmp46; + fftw_real tmp48; + fftw_real tmp45; + fftw_real tmp47; + ASSERT_ALIGNED_DOUBLE; + tmp46 = X[7 * iostride]; + tmp48 = Y[-2 * iostride]; + tmp45 = c_re(W[6]); + tmp47 = c_im(W[6]); + tmp49 = (tmp45 * tmp46) - (tmp47 * tmp48); + tmp106 = (tmp47 * tmp46) + (tmp45 * tmp48); + } + { + fftw_real tmp52; + fftw_real tmp54; + fftw_real tmp51; + fftw_real tmp53; + ASSERT_ALIGNED_DOUBLE; + tmp52 = X[8 * iostride]; + tmp54 = Y[-iostride]; + tmp51 = c_re(W[7]); + tmp53 = c_im(W[7]); + tmp55 = (tmp51 * tmp52) - (tmp53 * tmp54); + tmp108 = (tmp53 * tmp52) + (tmp51 * tmp54); + } + tmp50 = tmp44 - tmp49; + tmp61 = tmp55 - tmp60; + tmp62 = tmp50 + tmp61; + tmp88 = tmp44 + tmp49; + tmp89 = tmp55 + tmp60; + tmp90 = tmp88 + tmp89; + tmp107 = tmp105 + tmp106; + tmp110 = tmp108 + tmp109; + tmp127 = tmp107 + tmp110; + tmp118 = tmp105 - tmp106; + tmp119 = tmp108 - tmp109; + tmp141 = tmp118 + tmp119; + } + { + fftw_real tmp115; + fftw_real tmp86; + fftw_real tmp116; + fftw_real tmp124; + fftw_real tmp126; + fftw_real tmp120; + fftw_real tmp123; + fftw_real tmp125; + fftw_real tmp117; + ASSERT_ALIGNED_DOUBLE; + tmp115 = K559016994 * (tmp62 - tmp85); + tmp86 = tmp62 + tmp85; + tmp116 = tmp39 - (K250000000 * tmp86); + tmp120 = tmp118 - tmp119; + tmp123 = tmp121 - tmp122; + tmp124 = (K951056516 * tmp120) + (K587785252 * tmp123); + tmp126 = (K951056516 * tmp123) - (K587785252 * tmp120); + Y[-5 * iostride] = tmp39 + tmp86; + tmp125 = tmp116 - tmp115; + Y[-7 * iostride] = tmp125 - tmp126; + X[3 * iostride] = tmp125 + tmp126; + tmp117 = tmp115 + tmp116; + Y[-9 * iostride] = tmp117 - tmp124; + X[iostride] = tmp117 + tmp124; + } + { + fftw_real tmp148; + fftw_real tmp143; + fftw_real tmp149; + fftw_real tmp147; + fftw_real tmp151; + fftw_real tmp145; + fftw_real tmp146; + fftw_real tmp152; + fftw_real tmp150; + ASSERT_ALIGNED_DOUBLE; + tmp148 = K559016994 * (tmp141 - tmp142); + tmp143 = tmp141 + tmp142; + tmp149 = tmp144 - (K250000000 * tmp143); + tmp145 = tmp50 - tmp61; + tmp146 = tmp73 - tmp84; + tmp147 = (K951056516 * tmp145) + (K587785252 * tmp146); + tmp151 = (K587785252 * tmp145) - (K951056516 * tmp146); + X[5 * iostride] = -(tmp143 + tmp144); + tmp152 = tmp149 - tmp148; + X[7 * iostride] = tmp151 - tmp152; + Y[-3 * iostride] = tmp151 + tmp152; + tmp150 = tmp148 + tmp149; + X[9 * iostride] = -(tmp147 + tmp150); + Y[-iostride] = tmp150 - tmp147; + } + { + fftw_real tmp96; + fftw_real tmp94; + fftw_real tmp95; + fftw_real tmp112; + fftw_real tmp114; + fftw_real tmp104; + fftw_real tmp111; + fftw_real tmp113; + fftw_real tmp97; + ASSERT_ALIGNED_DOUBLE; + tmp96 = K559016994 * (tmp90 - tmp93); + tmp94 = tmp90 + tmp93; + tmp95 = tmp87 - (K250000000 * tmp94); + tmp104 = tmp100 - tmp103; + tmp111 = tmp107 - tmp110; + tmp112 = (K951056516 * tmp104) - (K587785252 * tmp111); + tmp114 = (K951056516 * tmp111) + (K587785252 * tmp104); + X[0] = tmp87 + tmp94; + tmp113 = tmp96 + tmp95; + X[4 * iostride] = tmp113 - tmp114; + Y[-6 * iostride] = tmp113 + tmp114; + tmp97 = tmp95 - tmp96; + X[2 * iostride] = tmp97 - tmp112; + Y[-8 * iostride] = tmp97 + tmp112; + } + { + fftw_real tmp134; + fftw_real tmp129; + fftw_real tmp133; + fftw_real tmp138; + fftw_real tmp140; + fftw_real tmp136; + fftw_real tmp137; + fftw_real tmp139; + fftw_real tmp135; + ASSERT_ALIGNED_DOUBLE; + tmp134 = K559016994 * (tmp127 - tmp128); + tmp129 = tmp127 + tmp128; + tmp133 = tmp132 - (K250000000 * tmp129); + tmp136 = tmp91 - tmp92; + tmp137 = tmp88 - tmp89; + tmp138 = (K951056516 * tmp136) - (K587785252 * tmp137); + tmp140 = (K951056516 * tmp137) + (K587785252 * tmp136); + Y[0] = tmp129 + tmp132; + tmp139 = tmp134 + tmp133; + X[6 * iostride] = -(tmp139 - tmp140); + Y[-4 * iostride] = tmp140 + tmp139; + tmp135 = tmp133 - tmp134; + X[8 * iostride] = -(tmp135 - tmp138); + Y[-2 * iostride] = tmp138 + tmp135; + } + } + if (i == m) { + fftw_real tmp1; + fftw_real tmp24; + fftw_real tmp8; + fftw_real tmp10; + fftw_real tmp25; + fftw_real tmp26; + fftw_real tmp14; + fftw_real tmp28; + fftw_real tmp23; + fftw_real tmp17; + ASSERT_ALIGNED_DOUBLE; + tmp1 = X[0]; + tmp24 = X[5 * iostride]; + { + fftw_real tmp2; + fftw_real tmp3; + fftw_real tmp4; + fftw_real tmp5; + fftw_real tmp6; + fftw_real tmp7; + ASSERT_ALIGNED_DOUBLE; + tmp2 = X[4 * iostride]; + tmp3 = X[6 * iostride]; + tmp4 = tmp2 - tmp3; + tmp5 = X[8 * iostride]; + tmp6 = X[2 * iostride]; + tmp7 = tmp5 - tmp6; + tmp8 = tmp4 + tmp7; + tmp10 = K559016994 * (tmp4 - tmp7); + tmp25 = tmp2 + tmp3; + tmp26 = tmp5 + tmp6; + } + { + fftw_real tmp12; + fftw_real tmp13; + fftw_real tmp22; + fftw_real tmp15; + fftw_real tmp16; + fftw_real tmp21; + ASSERT_ALIGNED_DOUBLE; + tmp12 = X[iostride]; + tmp13 = X[9 * iostride]; + tmp22 = tmp12 + tmp13; + tmp15 = X[3 * iostride]; + tmp16 = X[7 * iostride]; + tmp21 = tmp15 + tmp16; + tmp14 = tmp12 - tmp13; + tmp28 = K559016994 * (tmp22 + tmp21); + tmp23 = tmp21 - tmp22; + tmp17 = tmp15 - tmp16; + } + X[2 * iostride] = tmp1 + tmp8; + { + fftw_real tmp18; + fftw_real tmp20; + fftw_real tmp11; + fftw_real tmp19; + fftw_real tmp9; + ASSERT_ALIGNED_DOUBLE; + tmp18 = (K587785252 * tmp14) - (K951056516 * tmp17); + tmp20 = (K951056516 * tmp14) + (K587785252 * tmp17); + tmp9 = tmp1 - (K250000000 * tmp8); + tmp11 = tmp9 - tmp10; + tmp19 = tmp10 + tmp9; + X[3 * iostride] = tmp11 - tmp18; + X[iostride] = tmp11 + tmp18; + X[4 * iostride] = tmp19 - tmp20; + X[0] = tmp19 + tmp20; + } + Y[-2 * iostride] = tmp23 - tmp24; + { + fftw_real tmp27; + fftw_real tmp32; + fftw_real tmp30; + fftw_real tmp31; + fftw_real tmp29; + ASSERT_ALIGNED_DOUBLE; + tmp27 = (K951056516 * tmp25) + (K587785252 * tmp26); + tmp32 = (K951056516 * tmp26) - (K587785252 * tmp25); + tmp29 = (K250000000 * tmp23) + tmp24; + tmp30 = tmp28 + tmp29; + tmp31 = tmp29 - tmp28; + Y[0] = -(tmp27 + tmp30); + Y[-4 * iostride] = tmp27 - tmp30; + Y[-iostride] = tmp31 - tmp32; + Y[-3 * iostride] = tmp32 + tmp31; + } + } +} + +static const int twiddle_order[] = +{1, 2, 3, 4, 5, 6, 7, 8, 9}; +fftw_codelet_desc fftw_hc2hc_forward_10_desc = +{ + "fftw_hc2hc_forward_10", + (void (*)()) fftw_hc2hc_forward_10, + 10, + FFTW_FORWARD, + FFTW_HC2HC, + 223, + 9, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/fhf_16.c b/src/sndobj/rfftw/fhf_16.c new file mode 100644 index 0000000..0c64bba --- /dev/null +++ b/src/sndobj/rfftw/fhf_16.c @@ -0,0 +1,975 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:51 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-forward 16 */ + +/* + * This function contains 298 FP additions, 130 FP multiplications, + * (or, 244 additions, 76 multiplications, 54 fused multiply/add), + * 51 stack variables, and 128 memory accesses + */ +static const fftw_real K277785116 = FFTW_KONST(+0.277785116509801112371415406974266437187468595); +static const fftw_real K415734806 = FFTW_KONST(+0.415734806151272618539394188808952878369280406); +static const fftw_real K490392640 = FFTW_KONST(+0.490392640201615224563091118067119518486966865); +static const fftw_real K097545161 = FFTW_KONST(+0.097545161008064133924142434238511120463845809); +static const fftw_real K1_414213562 = FFTW_KONST(+1.414213562373095048801688724209698078569671875); +static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); +static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); +static const fftw_real K923879532 = FFTW_KONST(+0.923879532511286756128183189396788286822416626); +static const fftw_real K382683432 = FFTW_KONST(+0.382683432365089771728459984030398866761344562); + +/* + * Generator Id's : + * $Id: fhf_16.c,v 1.1.1.1 2006/05/12 15:14:56 veplaini Exp $ + * $Id: fhf_16.c,v 1.1.1.1 2006/05/12 15:14:56 veplaini Exp $ + * $Id: fhf_16.c,v 1.1.1.1 2006/05/12 15:14:56 veplaini Exp $ + */ + +void fftw_hc2hc_forward_16(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_real *X; + fftw_real *Y; + X = A; + Y = A + (16 * iostride); + { + fftw_real tmp277; + fftw_real tmp280; + fftw_real tmp281; + fftw_real tmp309; + fftw_real tmp292; + fftw_real tmp307; + fftw_real tmp314; + fftw_real tmp322; + fftw_real tmp330; + fftw_real tmp284; + fftw_real tmp287; + fftw_real tmp288; + fftw_real tmp310; + fftw_real tmp291; + fftw_real tmp300; + fftw_real tmp315; + fftw_real tmp325; + fftw_real tmp331; + fftw_real tmp290; + fftw_real tmp289; + fftw_real tmp317; + fftw_real tmp318; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp275; + fftw_real tmp276; + fftw_real tmp278; + fftw_real tmp279; + ASSERT_ALIGNED_DOUBLE; + tmp275 = X[0]; + tmp276 = X[8 * iostride]; + tmp277 = tmp275 + tmp276; + tmp278 = X[4 * iostride]; + tmp279 = X[12 * iostride]; + tmp280 = tmp278 + tmp279; + tmp281 = tmp277 + tmp280; + tmp309 = tmp275 - tmp276; + tmp292 = tmp278 - tmp279; + } + { + fftw_real tmp303; + fftw_real tmp320; + fftw_real tmp306; + fftw_real tmp321; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp301; + fftw_real tmp302; + fftw_real tmp304; + fftw_real tmp305; + ASSERT_ALIGNED_DOUBLE; + tmp301 = X[iostride]; + tmp302 = X[9 * iostride]; + tmp303 = tmp301 - tmp302; + tmp320 = tmp301 + tmp302; + tmp304 = X[5 * iostride]; + tmp305 = X[13 * iostride]; + tmp306 = tmp304 - tmp305; + tmp321 = tmp304 + tmp305; + } + tmp307 = (K382683432 * tmp303) + (K923879532 * tmp306); + tmp314 = (K923879532 * tmp303) - (K382683432 * tmp306); + tmp322 = tmp320 - tmp321; + tmp330 = tmp320 + tmp321; + } + { + fftw_real tmp282; + fftw_real tmp283; + fftw_real tmp285; + fftw_real tmp286; + ASSERT_ALIGNED_DOUBLE; + tmp282 = X[2 * iostride]; + tmp283 = X[10 * iostride]; + tmp284 = tmp282 + tmp283; + tmp290 = tmp282 - tmp283; + tmp285 = X[14 * iostride]; + tmp286 = X[6 * iostride]; + tmp287 = tmp285 + tmp286; + tmp289 = tmp285 - tmp286; + } + tmp288 = tmp284 + tmp287; + tmp310 = K707106781 * (tmp290 + tmp289); + tmp291 = K707106781 * (tmp289 - tmp290); + { + fftw_real tmp296; + fftw_real tmp323; + fftw_real tmp299; + fftw_real tmp324; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp294; + fftw_real tmp295; + fftw_real tmp297; + fftw_real tmp298; + ASSERT_ALIGNED_DOUBLE; + tmp294 = X[15 * iostride]; + tmp295 = X[7 * iostride]; + tmp296 = tmp294 - tmp295; + tmp323 = tmp294 + tmp295; + tmp297 = X[3 * iostride]; + tmp298 = X[11 * iostride]; + tmp299 = tmp297 - tmp298; + tmp324 = tmp297 + tmp298; + } + tmp300 = (K382683432 * tmp296) - (K923879532 * tmp299); + tmp315 = (K923879532 * tmp296) + (K382683432 * tmp299); + tmp325 = tmp323 - tmp324; + tmp331 = tmp323 + tmp324; + } + { + fftw_real tmp329; + fftw_real tmp332; + fftw_real tmp327; + fftw_real tmp328; + ASSERT_ALIGNED_DOUBLE; + X[4 * iostride] = tmp281 - tmp288; + tmp329 = tmp281 + tmp288; + tmp332 = tmp330 + tmp331; + X[8 * iostride] = tmp329 - tmp332; + X[0] = tmp329 + tmp332; + Y[-4 * iostride] = tmp331 - tmp330; + tmp327 = tmp287 - tmp284; + tmp328 = K707106781 * (tmp325 - tmp322); + Y[-2 * iostride] = tmp327 + tmp328; + Y[-6 * iostride] = tmp328 - tmp327; + } + { + fftw_real tmp319; + fftw_real tmp326; + fftw_real tmp313; + fftw_real tmp316; + ASSERT_ALIGNED_DOUBLE; + tmp319 = tmp277 - tmp280; + tmp326 = K707106781 * (tmp322 + tmp325); + X[6 * iostride] = tmp319 - tmp326; + X[2 * iostride] = tmp319 + tmp326; + tmp313 = tmp309 + tmp310; + tmp316 = tmp314 + tmp315; + X[7 * iostride] = tmp313 - tmp316; + X[iostride] = tmp313 + tmp316; + } + tmp317 = tmp292 + tmp291; + tmp318 = tmp315 - tmp314; + Y[-3 * iostride] = tmp317 + tmp318; + Y[-5 * iostride] = tmp318 - tmp317; + { + fftw_real tmp293; + fftw_real tmp308; + fftw_real tmp311; + fftw_real tmp312; + ASSERT_ALIGNED_DOUBLE; + tmp293 = tmp291 - tmp292; + tmp308 = tmp300 - tmp307; + Y[-iostride] = tmp293 + tmp308; + Y[-7 * iostride] = tmp308 - tmp293; + tmp311 = tmp309 - tmp310; + tmp312 = tmp307 + tmp300; + X[5 * iostride] = tmp311 - tmp312; + X[3 * iostride] = tmp311 + tmp312; + } + } + X = X + dist; + Y = Y - dist; + for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 15) { + fftw_real tmp77; + fftw_real tmp161; + fftw_real tmp249; + fftw_real tmp262; + fftw_real tmp88; + fftw_real tmp263; + fftw_real tmp164; + fftw_real tmp246; + fftw_real tmp147; + fftw_real tmp158; + fftw_real tmp231; + fftw_real tmp198; + fftw_real tmp214; + fftw_real tmp232; + fftw_real tmp233; + fftw_real tmp234; + fftw_real tmp193; + fftw_real tmp213; + fftw_real tmp100; + fftw_real tmp222; + fftw_real tmp170; + fftw_real tmp206; + fftw_real tmp111; + fftw_real tmp223; + fftw_real tmp175; + fftw_real tmp207; + fftw_real tmp124; + fftw_real tmp135; + fftw_real tmp226; + fftw_real tmp187; + fftw_real tmp211; + fftw_real tmp227; + fftw_real tmp228; + fftw_real tmp229; + fftw_real tmp182; + fftw_real tmp210; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp71; + fftw_real tmp248; + fftw_real tmp76; + fftw_real tmp247; + ASSERT_ALIGNED_DOUBLE; + tmp71 = X[0]; + tmp248 = Y[-15 * iostride]; + { + fftw_real tmp73; + fftw_real tmp75; + fftw_real tmp72; + fftw_real tmp74; + ASSERT_ALIGNED_DOUBLE; + tmp73 = X[8 * iostride]; + tmp75 = Y[-7 * iostride]; + tmp72 = c_re(W[7]); + tmp74 = c_im(W[7]); + tmp76 = (tmp72 * tmp73) - (tmp74 * tmp75); + tmp247 = (tmp74 * tmp73) + (tmp72 * tmp75); + } + tmp77 = tmp71 + tmp76; + tmp161 = tmp71 - tmp76; + tmp249 = tmp247 + tmp248; + tmp262 = tmp248 - tmp247; + } + { + fftw_real tmp82; + fftw_real tmp162; + fftw_real tmp87; + fftw_real tmp163; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp79; + fftw_real tmp81; + fftw_real tmp78; + fftw_real tmp80; + ASSERT_ALIGNED_DOUBLE; + tmp79 = X[4 * iostride]; + tmp81 = Y[-11 * iostride]; + tmp78 = c_re(W[3]); + tmp80 = c_im(W[3]); + tmp82 = (tmp78 * tmp79) - (tmp80 * tmp81); + tmp162 = (tmp80 * tmp79) + (tmp78 * tmp81); + } + { + fftw_real tmp84; + fftw_real tmp86; + fftw_real tmp83; + fftw_real tmp85; + ASSERT_ALIGNED_DOUBLE; + tmp84 = X[12 * iostride]; + tmp86 = Y[-3 * iostride]; + tmp83 = c_re(W[11]); + tmp85 = c_im(W[11]); + tmp87 = (tmp83 * tmp84) - (tmp85 * tmp86); + tmp163 = (tmp85 * tmp84) + (tmp83 * tmp86); + } + tmp88 = tmp82 + tmp87; + tmp263 = tmp82 - tmp87; + tmp164 = tmp162 - tmp163; + tmp246 = tmp162 + tmp163; + } + { + fftw_real tmp141; + fftw_real tmp194; + fftw_real tmp157; + fftw_real tmp191; + fftw_real tmp146; + fftw_real tmp195; + fftw_real tmp152; + fftw_real tmp190; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp138; + fftw_real tmp140; + fftw_real tmp137; + fftw_real tmp139; + ASSERT_ALIGNED_DOUBLE; + tmp138 = X[15 * iostride]; + tmp140 = Y[0]; + tmp137 = c_re(W[14]); + tmp139 = c_im(W[14]); + tmp141 = (tmp137 * tmp138) - (tmp139 * tmp140); + tmp194 = (tmp139 * tmp138) + (tmp137 * tmp140); + } + { + fftw_real tmp154; + fftw_real tmp156; + fftw_real tmp153; + fftw_real tmp155; + ASSERT_ALIGNED_DOUBLE; + tmp154 = X[11 * iostride]; + tmp156 = Y[-4 * iostride]; + tmp153 = c_re(W[10]); + tmp155 = c_im(W[10]); + tmp157 = (tmp153 * tmp154) - (tmp155 * tmp156); + tmp191 = (tmp155 * tmp154) + (tmp153 * tmp156); + } + { + fftw_real tmp143; + fftw_real tmp145; + fftw_real tmp142; + fftw_real tmp144; + ASSERT_ALIGNED_DOUBLE; + tmp143 = X[7 * iostride]; + tmp145 = Y[-8 * iostride]; + tmp142 = c_re(W[6]); + tmp144 = c_im(W[6]); + tmp146 = (tmp142 * tmp143) - (tmp144 * tmp145); + tmp195 = (tmp144 * tmp143) + (tmp142 * tmp145); + } + { + fftw_real tmp149; + fftw_real tmp151; + fftw_real tmp148; + fftw_real tmp150; + ASSERT_ALIGNED_DOUBLE; + tmp149 = X[3 * iostride]; + tmp151 = Y[-12 * iostride]; + tmp148 = c_re(W[2]); + tmp150 = c_im(W[2]); + tmp152 = (tmp148 * tmp149) - (tmp150 * tmp151); + tmp190 = (tmp150 * tmp149) + (tmp148 * tmp151); + } + { + fftw_real tmp196; + fftw_real tmp197; + fftw_real tmp189; + fftw_real tmp192; + ASSERT_ALIGNED_DOUBLE; + tmp147 = tmp141 + tmp146; + tmp158 = tmp152 + tmp157; + tmp231 = tmp147 - tmp158; + tmp196 = tmp194 - tmp195; + tmp197 = tmp152 - tmp157; + tmp198 = tmp196 + tmp197; + tmp214 = tmp196 - tmp197; + tmp232 = tmp194 + tmp195; + tmp233 = tmp190 + tmp191; + tmp234 = tmp232 - tmp233; + tmp189 = tmp141 - tmp146; + tmp192 = tmp190 - tmp191; + tmp193 = tmp189 - tmp192; + tmp213 = tmp189 + tmp192; + } + } + { + fftw_real tmp94; + fftw_real tmp166; + fftw_real tmp99; + fftw_real tmp167; + fftw_real tmp168; + fftw_real tmp169; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp91; + fftw_real tmp93; + fftw_real tmp90; + fftw_real tmp92; + ASSERT_ALIGNED_DOUBLE; + tmp91 = X[2 * iostride]; + tmp93 = Y[-13 * iostride]; + tmp90 = c_re(W[1]); + tmp92 = c_im(W[1]); + tmp94 = (tmp90 * tmp91) - (tmp92 * tmp93); + tmp166 = (tmp92 * tmp91) + (tmp90 * tmp93); + } + { + fftw_real tmp96; + fftw_real tmp98; + fftw_real tmp95; + fftw_real tmp97; + ASSERT_ALIGNED_DOUBLE; + tmp96 = X[10 * iostride]; + tmp98 = Y[-5 * iostride]; + tmp95 = c_re(W[9]); + tmp97 = c_im(W[9]); + tmp99 = (tmp95 * tmp96) - (tmp97 * tmp98); + tmp167 = (tmp97 * tmp96) + (tmp95 * tmp98); + } + tmp100 = tmp94 + tmp99; + tmp222 = tmp166 + tmp167; + tmp168 = tmp166 - tmp167; + tmp169 = tmp94 - tmp99; + tmp170 = tmp168 - tmp169; + tmp206 = tmp169 + tmp168; + } + { + fftw_real tmp105; + fftw_real tmp172; + fftw_real tmp110; + fftw_real tmp173; + fftw_real tmp171; + fftw_real tmp174; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp102; + fftw_real tmp104; + fftw_real tmp101; + fftw_real tmp103; + ASSERT_ALIGNED_DOUBLE; + tmp102 = X[14 * iostride]; + tmp104 = Y[-iostride]; + tmp101 = c_re(W[13]); + tmp103 = c_im(W[13]); + tmp105 = (tmp101 * tmp102) - (tmp103 * tmp104); + tmp172 = (tmp103 * tmp102) + (tmp101 * tmp104); + } + { + fftw_real tmp107; + fftw_real tmp109; + fftw_real tmp106; + fftw_real tmp108; + ASSERT_ALIGNED_DOUBLE; + tmp107 = X[6 * iostride]; + tmp109 = Y[-9 * iostride]; + tmp106 = c_re(W[5]); + tmp108 = c_im(W[5]); + tmp110 = (tmp106 * tmp107) - (tmp108 * tmp109); + tmp173 = (tmp108 * tmp107) + (tmp106 * tmp109); + } + tmp111 = tmp105 + tmp110; + tmp223 = tmp172 + tmp173; + tmp171 = tmp105 - tmp110; + tmp174 = tmp172 - tmp173; + tmp175 = tmp171 + tmp174; + tmp207 = tmp171 - tmp174; + } + { + fftw_real tmp118; + fftw_real tmp178; + fftw_real tmp134; + fftw_real tmp185; + fftw_real tmp123; + fftw_real tmp179; + fftw_real tmp129; + fftw_real tmp184; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp115; + fftw_real tmp117; + fftw_real tmp114; + fftw_real tmp116; + ASSERT_ALIGNED_DOUBLE; + tmp115 = X[iostride]; + tmp117 = Y[-14 * iostride]; + tmp114 = c_re(W[0]); + tmp116 = c_im(W[0]); + tmp118 = (tmp114 * tmp115) - (tmp116 * tmp117); + tmp178 = (tmp116 * tmp115) + (tmp114 * tmp117); + } + { + fftw_real tmp131; + fftw_real tmp133; + fftw_real tmp130; + fftw_real tmp132; + ASSERT_ALIGNED_DOUBLE; + tmp131 = X[13 * iostride]; + tmp133 = Y[-2 * iostride]; + tmp130 = c_re(W[12]); + tmp132 = c_im(W[12]); + tmp134 = (tmp130 * tmp131) - (tmp132 * tmp133); + tmp185 = (tmp132 * tmp131) + (tmp130 * tmp133); + } + { + fftw_real tmp120; + fftw_real tmp122; + fftw_real tmp119; + fftw_real tmp121; + ASSERT_ALIGNED_DOUBLE; + tmp120 = X[9 * iostride]; + tmp122 = Y[-6 * iostride]; + tmp119 = c_re(W[8]); + tmp121 = c_im(W[8]); + tmp123 = (tmp119 * tmp120) - (tmp121 * tmp122); + tmp179 = (tmp121 * tmp120) + (tmp119 * tmp122); + } + { + fftw_real tmp126; + fftw_real tmp128; + fftw_real tmp125; + fftw_real tmp127; + ASSERT_ALIGNED_DOUBLE; + tmp126 = X[5 * iostride]; + tmp128 = Y[-10 * iostride]; + tmp125 = c_re(W[4]); + tmp127 = c_im(W[4]); + tmp129 = (tmp125 * tmp126) - (tmp127 * tmp128); + tmp184 = (tmp127 * tmp126) + (tmp125 * tmp128); + } + { + fftw_real tmp183; + fftw_real tmp186; + fftw_real tmp180; + fftw_real tmp181; + ASSERT_ALIGNED_DOUBLE; + tmp124 = tmp118 + tmp123; + tmp135 = tmp129 + tmp134; + tmp226 = tmp124 - tmp135; + tmp183 = tmp118 - tmp123; + tmp186 = tmp184 - tmp185; + tmp187 = tmp183 - tmp186; + tmp211 = tmp183 + tmp186; + tmp227 = tmp178 + tmp179; + tmp228 = tmp184 + tmp185; + tmp229 = tmp227 - tmp228; + tmp180 = tmp178 - tmp179; + tmp181 = tmp129 - tmp134; + tmp182 = tmp180 + tmp181; + tmp210 = tmp180 - tmp181; + } + } + { + fftw_real tmp177; + fftw_real tmp201; + fftw_real tmp271; + fftw_real tmp273; + fftw_real tmp200; + fftw_real tmp274; + fftw_real tmp204; + fftw_real tmp272; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp165; + fftw_real tmp176; + fftw_real tmp269; + fftw_real tmp270; + ASSERT_ALIGNED_DOUBLE; + tmp165 = tmp161 - tmp164; + tmp176 = K707106781 * (tmp170 - tmp175); + tmp177 = tmp165 + tmp176; + tmp201 = tmp165 - tmp176; + tmp269 = K707106781 * (tmp207 - tmp206); + tmp270 = tmp263 + tmp262; + tmp271 = tmp269 + tmp270; + tmp273 = tmp270 - tmp269; + } + { + fftw_real tmp188; + fftw_real tmp199; + fftw_real tmp202; + fftw_real tmp203; + ASSERT_ALIGNED_DOUBLE; + tmp188 = (K923879532 * tmp182) + (K382683432 * tmp187); + tmp199 = (K382683432 * tmp193) - (K923879532 * tmp198); + tmp200 = tmp188 + tmp199; + tmp274 = tmp199 - tmp188; + tmp202 = (K382683432 * tmp182) - (K923879532 * tmp187); + tmp203 = (K382683432 * tmp198) + (K923879532 * tmp193); + tmp204 = tmp202 - tmp203; + tmp272 = tmp202 + tmp203; + } + Y[-11 * iostride] = tmp177 - tmp200; + X[3 * iostride] = tmp177 + tmp200; + Y[-15 * iostride] = tmp201 - tmp204; + X[7 * iostride] = tmp201 + tmp204; + X[11 * iostride] = -(tmp271 - tmp272); + Y[-3 * iostride] = tmp272 + tmp271; + X[15 * iostride] = -(tmp273 - tmp274); + Y[-7 * iostride] = tmp274 + tmp273; + } + { + fftw_real tmp209; + fftw_real tmp217; + fftw_real tmp265; + fftw_real tmp267; + fftw_real tmp216; + fftw_real tmp268; + fftw_real tmp220; + fftw_real tmp266; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp205; + fftw_real tmp208; + fftw_real tmp261; + fftw_real tmp264; + ASSERT_ALIGNED_DOUBLE; + tmp205 = tmp161 + tmp164; + tmp208 = K707106781 * (tmp206 + tmp207); + tmp209 = tmp205 + tmp208; + tmp217 = tmp205 - tmp208; + tmp261 = K707106781 * (tmp170 + tmp175); + tmp264 = tmp262 - tmp263; + tmp265 = tmp261 + tmp264; + tmp267 = tmp264 - tmp261; + } + { + fftw_real tmp212; + fftw_real tmp215; + fftw_real tmp218; + fftw_real tmp219; + ASSERT_ALIGNED_DOUBLE; + tmp212 = (K382683432 * tmp210) + (K923879532 * tmp211); + tmp215 = (K923879532 * tmp213) - (K382683432 * tmp214); + tmp216 = tmp212 + tmp215; + tmp268 = tmp215 - tmp212; + tmp218 = (K923879532 * tmp210) - (K382683432 * tmp211); + tmp219 = (K923879532 * tmp214) + (K382683432 * tmp213); + tmp220 = tmp218 - tmp219; + tmp266 = tmp218 + tmp219; + } + Y[-9 * iostride] = tmp209 - tmp216; + X[iostride] = tmp209 + tmp216; + Y[-13 * iostride] = tmp217 - tmp220; + X[5 * iostride] = tmp217 + tmp220; + X[9 * iostride] = -(tmp265 - tmp266); + Y[-iostride] = tmp266 + tmp265; + X[13 * iostride] = -(tmp267 - tmp268); + Y[-5 * iostride] = tmp268 + tmp267; + } + { + fftw_real tmp225; + fftw_real tmp237; + fftw_real tmp257; + fftw_real tmp259; + fftw_real tmp236; + fftw_real tmp260; + fftw_real tmp240; + fftw_real tmp258; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp221; + fftw_real tmp224; + fftw_real tmp255; + fftw_real tmp256; + ASSERT_ALIGNED_DOUBLE; + tmp221 = tmp77 - tmp88; + tmp224 = tmp222 - tmp223; + tmp225 = tmp221 + tmp224; + tmp237 = tmp221 - tmp224; + tmp255 = tmp111 - tmp100; + tmp256 = tmp249 - tmp246; + tmp257 = tmp255 + tmp256; + tmp259 = tmp256 - tmp255; + } + { + fftw_real tmp230; + fftw_real tmp235; + fftw_real tmp238; + fftw_real tmp239; + ASSERT_ALIGNED_DOUBLE; + tmp230 = tmp226 + tmp229; + tmp235 = tmp231 - tmp234; + tmp236 = K707106781 * (tmp230 + tmp235); + tmp260 = K707106781 * (tmp235 - tmp230); + tmp238 = tmp229 - tmp226; + tmp239 = tmp231 + tmp234; + tmp240 = K707106781 * (tmp238 - tmp239); + tmp258 = K707106781 * (tmp238 + tmp239); + } + Y[-10 * iostride] = tmp225 - tmp236; + X[2 * iostride] = tmp225 + tmp236; + Y[-14 * iostride] = tmp237 - tmp240; + X[6 * iostride] = tmp237 + tmp240; + X[10 * iostride] = -(tmp257 - tmp258); + Y[-2 * iostride] = tmp258 + tmp257; + X[14 * iostride] = -(tmp259 - tmp260); + Y[-6 * iostride] = tmp260 + tmp259; + } + { + fftw_real tmp113; + fftw_real tmp241; + fftw_real tmp251; + fftw_real tmp253; + fftw_real tmp160; + fftw_real tmp254; + fftw_real tmp244; + fftw_real tmp252; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp89; + fftw_real tmp112; + fftw_real tmp245; + fftw_real tmp250; + ASSERT_ALIGNED_DOUBLE; + tmp89 = tmp77 + tmp88; + tmp112 = tmp100 + tmp111; + tmp113 = tmp89 + tmp112; + tmp241 = tmp89 - tmp112; + tmp245 = tmp222 + tmp223; + tmp250 = tmp246 + tmp249; + tmp251 = tmp245 + tmp250; + tmp253 = tmp250 - tmp245; + } + { + fftw_real tmp136; + fftw_real tmp159; + fftw_real tmp242; + fftw_real tmp243; + ASSERT_ALIGNED_DOUBLE; + tmp136 = tmp124 + tmp135; + tmp159 = tmp147 + tmp158; + tmp160 = tmp136 + tmp159; + tmp254 = tmp159 - tmp136; + tmp242 = tmp227 + tmp228; + tmp243 = tmp232 + tmp233; + tmp244 = tmp242 - tmp243; + tmp252 = tmp242 + tmp243; + } + Y[-8 * iostride] = tmp113 - tmp160; + X[0] = tmp113 + tmp160; + Y[-12 * iostride] = tmp241 - tmp244; + X[4 * iostride] = tmp241 + tmp244; + X[8 * iostride] = -(tmp251 - tmp252); + Y[0] = tmp252 + tmp251; + X[12 * iostride] = -(tmp253 - tmp254); + Y[-4 * iostride] = tmp254 + tmp253; + } + } + if (i == m) { + fftw_real tmp5; + fftw_real tmp41; + fftw_real tmp61; + fftw_real tmp67; + fftw_real tmp30; + fftw_real tmp49; + fftw_real tmp34; + fftw_real tmp50; + fftw_real tmp12; + fftw_real tmp66; + fftw_real tmp44; + fftw_real tmp58; + fftw_real tmp19; + fftw_real tmp46; + fftw_real tmp23; + fftw_real tmp47; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp60; + fftw_real tmp4; + fftw_real tmp59; + fftw_real tmp2; + fftw_real tmp3; + ASSERT_ALIGNED_DOUBLE; + tmp1 = X[0]; + tmp60 = X[8 * iostride]; + tmp2 = X[4 * iostride]; + tmp3 = X[12 * iostride]; + tmp4 = K707106781 * (tmp2 - tmp3); + tmp59 = K707106781 * (tmp2 + tmp3); + tmp5 = tmp1 + tmp4; + tmp41 = tmp1 - tmp4; + tmp61 = tmp59 + tmp60; + tmp67 = tmp60 - tmp59; + } + { + fftw_real tmp29; + fftw_real tmp33; + fftw_real tmp27; + fftw_real tmp31; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp28; + fftw_real tmp32; + fftw_real tmp25; + fftw_real tmp26; + ASSERT_ALIGNED_DOUBLE; + tmp28 = X[15 * iostride]; + tmp29 = K2_000000000 * tmp28; + tmp32 = X[7 * iostride]; + tmp33 = K2_000000000 * tmp32; + tmp25 = X[3 * iostride]; + tmp26 = X[11 * iostride]; + tmp27 = K1_414213562 * (tmp25 - tmp26); + tmp31 = K1_414213562 * (tmp25 + tmp26); + } + tmp30 = tmp27 - tmp29; + tmp49 = tmp27 + tmp29; + tmp34 = tmp31 + tmp33; + tmp50 = tmp33 - tmp31; + } + { + fftw_real tmp8; + fftw_real tmp42; + fftw_real tmp11; + fftw_real tmp43; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp6; + fftw_real tmp7; + fftw_real tmp9; + fftw_real tmp10; + ASSERT_ALIGNED_DOUBLE; + tmp6 = X[2 * iostride]; + tmp7 = X[10 * iostride]; + tmp8 = (K923879532 * tmp6) - (K382683432 * tmp7); + tmp42 = (K382683432 * tmp6) + (K923879532 * tmp7); + tmp9 = X[6 * iostride]; + tmp10 = X[14 * iostride]; + tmp11 = (K382683432 * tmp9) - (K923879532 * tmp10); + tmp43 = (K923879532 * tmp9) + (K382683432 * tmp10); + } + tmp12 = tmp8 + tmp11; + tmp66 = tmp11 - tmp8; + tmp44 = tmp42 - tmp43; + tmp58 = tmp42 + tmp43; + } + { + fftw_real tmp15; + fftw_real tmp22; + fftw_real tmp18; + fftw_real tmp20; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp14; + fftw_real tmp21; + fftw_real tmp16; + fftw_real tmp17; + ASSERT_ALIGNED_DOUBLE; + tmp14 = X[iostride]; + tmp15 = K2_000000000 * tmp14; + tmp21 = X[9 * iostride]; + tmp22 = K2_000000000 * tmp21; + tmp16 = X[5 * iostride]; + tmp17 = X[13 * iostride]; + tmp18 = K1_414213562 * (tmp16 - tmp17); + tmp20 = K1_414213562 * (tmp16 + tmp17); + } + tmp19 = tmp15 + tmp18; + tmp46 = tmp15 - tmp18; + tmp23 = tmp20 + tmp22; + tmp47 = tmp22 - tmp20; + } + { + fftw_real tmp13; + fftw_real tmp62; + fftw_real tmp36; + fftw_real tmp57; + fftw_real tmp24; + fftw_real tmp35; + ASSERT_ALIGNED_DOUBLE; + tmp13 = tmp5 - tmp12; + tmp62 = tmp58 + tmp61; + tmp24 = (K097545161 * tmp19) + (K490392640 * tmp23); + tmp35 = (K097545161 * tmp30) - (K490392640 * tmp34); + tmp36 = tmp24 + tmp35; + tmp57 = tmp35 - tmp24; + X[4 * iostride] = tmp13 - tmp36; + X[3 * iostride] = tmp13 + tmp36; + Y[0] = tmp57 - tmp62; + Y[-7 * iostride] = tmp57 + tmp62; + } + { + fftw_real tmp37; + fftw_real tmp64; + fftw_real tmp40; + fftw_real tmp63; + fftw_real tmp38; + fftw_real tmp39; + ASSERT_ALIGNED_DOUBLE; + tmp37 = tmp5 + tmp12; + tmp64 = tmp61 - tmp58; + tmp38 = (K490392640 * tmp19) - (K097545161 * tmp23); + tmp39 = (K490392640 * tmp30) + (K097545161 * tmp34); + tmp40 = tmp38 + tmp39; + tmp63 = tmp39 - tmp38; + X[7 * iostride] = tmp37 - tmp40; + X[0] = tmp37 + tmp40; + Y[-4 * iostride] = tmp63 - tmp64; + Y[-3 * iostride] = tmp63 + tmp64; + } + { + fftw_real tmp45; + fftw_real tmp68; + fftw_real tmp52; + fftw_real tmp65; + fftw_real tmp48; + fftw_real tmp51; + ASSERT_ALIGNED_DOUBLE; + tmp45 = tmp41 + tmp44; + tmp68 = tmp66 - tmp67; + tmp48 = (K415734806 * tmp46) + (K277785116 * tmp47); + tmp51 = (K415734806 * tmp49) + (K277785116 * tmp50); + tmp52 = tmp48 - tmp51; + tmp65 = tmp48 + tmp51; + X[6 * iostride] = tmp45 - tmp52; + X[iostride] = tmp45 + tmp52; + Y[-5 * iostride] = -(tmp65 + tmp68); + Y[-2 * iostride] = tmp68 - tmp65; + } + { + fftw_real tmp53; + fftw_real tmp70; + fftw_real tmp56; + fftw_real tmp69; + fftw_real tmp54; + fftw_real tmp55; + ASSERT_ALIGNED_DOUBLE; + tmp53 = tmp41 - tmp44; + tmp70 = tmp66 + tmp67; + tmp54 = (K415734806 * tmp50) - (K277785116 * tmp49); + tmp55 = (K415734806 * tmp47) - (K277785116 * tmp46); + tmp56 = tmp54 - tmp55; + tmp69 = tmp55 + tmp54; + X[5 * iostride] = tmp53 - tmp56; + X[2 * iostride] = tmp53 + tmp56; + Y[-6 * iostride] = tmp69 - tmp70; + Y[-iostride] = tmp69 + tmp70; + } + } +} + +static const int twiddle_order[] = +{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; +fftw_codelet_desc fftw_hc2hc_forward_16_desc = +{ + "fftw_hc2hc_forward_16", + (void (*)()) fftw_hc2hc_forward_16, + 16, + FFTW_FORWARD, + FFTW_HC2HC, + 355, + 15, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/fhf_2.c b/src/sndobj/rfftw/fhf_2.c new file mode 100644 index 0000000..60808be --- /dev/null +++ b/src/sndobj/rfftw/fhf_2.c @@ -0,0 +1,108 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:42 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-forward 2 */ + +/* + * This function contains 8 FP additions, 4 FP multiplications, + * (or, 6 additions, 2 multiplications, 2 fused multiply/add), + * 11 stack variables, and 16 memory accesses + */ + +/* + * Generator Id's : + * $Id: fhf_2.c,v 1.1.1.1 2006/05/12 15:14:45 veplaini Exp $ + * $Id: fhf_2.c,v 1.1.1.1 2006/05/12 15:14:45 veplaini Exp $ + * $Id: fhf_2.c,v 1.1.1.1 2006/05/12 15:14:45 veplaini Exp $ + */ + +void fftw_hc2hc_forward_2(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_real *X; + fftw_real *Y; + X = A; + Y = A + (2 * iostride); + { + fftw_real tmp11; + fftw_real tmp12; + ASSERT_ALIGNED_DOUBLE; + tmp11 = X[0]; + tmp12 = X[iostride]; + X[iostride] = tmp11 - tmp12; + X[0] = tmp11 + tmp12; + } + X = X + dist; + Y = Y - dist; + for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 1) { + fftw_real tmp3; + fftw_real tmp9; + fftw_real tmp8; + fftw_real tmp10; + ASSERT_ALIGNED_DOUBLE; + tmp3 = X[0]; + tmp9 = Y[-iostride]; + { + fftw_real tmp5; + fftw_real tmp7; + fftw_real tmp4; + fftw_real tmp6; + ASSERT_ALIGNED_DOUBLE; + tmp5 = X[iostride]; + tmp7 = Y[0]; + tmp4 = c_re(W[0]); + tmp6 = c_im(W[0]); + tmp8 = (tmp4 * tmp5) - (tmp6 * tmp7); + tmp10 = (tmp6 * tmp5) + (tmp4 * tmp7); + } + Y[-iostride] = tmp3 - tmp8; + X[0] = tmp3 + tmp8; + X[iostride] = -(tmp9 - tmp10); + Y[0] = tmp10 + tmp9; + } + if (i == m) { + fftw_real tmp1; + fftw_real tmp2; + ASSERT_ALIGNED_DOUBLE; + tmp1 = X[0]; + X[0] = tmp1; + tmp2 = X[iostride]; + Y[0] = -tmp2; + } +} + +static const int twiddle_order[] = +{1}; +fftw_codelet_desc fftw_hc2hc_forward_2_desc = +{ + "fftw_hc2hc_forward_2", + (void (*)()) fftw_hc2hc_forward_2, + 2, + FFTW_FORWARD, + FFTW_HC2HC, + 47, + 1, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/fhf_3.c b/src/sndobj/rfftw/fhf_3.c new file mode 100644 index 0000000..e7defaf --- /dev/null +++ b/src/sndobj/rfftw/fhf_3.c @@ -0,0 +1,150 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:43 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-forward 3 */ + +/* + * This function contains 25 FP additions, 16 FP multiplications, + * (or, 17 additions, 8 multiplications, 8 fused multiply/add), + * 15 stack variables, and 24 memory accesses + */ +static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); +static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); + +/* + * Generator Id's : + * $Id: fhf_3.c,v 1.1.1.1 2006/05/12 15:14:49 veplaini Exp $ + * $Id: fhf_3.c,v 1.1.1.1 2006/05/12 15:14:49 veplaini Exp $ + * $Id: fhf_3.c,v 1.1.1.1 2006/05/12 15:14:49 veplaini Exp $ + */ + +void fftw_hc2hc_forward_3(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_real *X; + fftw_real *Y; + X = A; + Y = A + (3 * iostride); + { + fftw_real tmp24; + fftw_real tmp25; + fftw_real tmp26; + fftw_real tmp27; + ASSERT_ALIGNED_DOUBLE; + tmp24 = X[0]; + tmp25 = X[iostride]; + tmp26 = X[2 * iostride]; + tmp27 = tmp25 + tmp26; + X[iostride] = tmp24 - (K500000000 * tmp27); + X[0] = tmp24 + tmp27; + Y[-iostride] = K866025403 * (tmp26 - tmp25); + } + X = X + dist; + Y = Y - dist; + for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 2) { + fftw_real tmp4; + fftw_real tmp21; + fftw_real tmp9; + fftw_real tmp17; + fftw_real tmp14; + fftw_real tmp18; + fftw_real tmp15; + fftw_real tmp20; + ASSERT_ALIGNED_DOUBLE; + tmp4 = X[0]; + tmp21 = Y[-2 * iostride]; + { + fftw_real tmp6; + fftw_real tmp8; + fftw_real tmp5; + fftw_real tmp7; + ASSERT_ALIGNED_DOUBLE; + tmp6 = X[iostride]; + tmp8 = Y[-iostride]; + tmp5 = c_re(W[0]); + tmp7 = c_im(W[0]); + tmp9 = (tmp5 * tmp6) - (tmp7 * tmp8); + tmp17 = (tmp7 * tmp6) + (tmp5 * tmp8); + } + { + fftw_real tmp11; + fftw_real tmp13; + fftw_real tmp10; + fftw_real tmp12; + ASSERT_ALIGNED_DOUBLE; + tmp11 = X[2 * iostride]; + tmp13 = Y[0]; + tmp10 = c_re(W[1]); + tmp12 = c_im(W[1]); + tmp14 = (tmp10 * tmp11) - (tmp12 * tmp13); + tmp18 = (tmp12 * tmp11) + (tmp10 * tmp13); + } + tmp15 = tmp9 + tmp14; + tmp20 = tmp17 + tmp18; + { + fftw_real tmp16; + fftw_real tmp19; + fftw_real tmp22; + fftw_real tmp23; + ASSERT_ALIGNED_DOUBLE; + X[0] = tmp4 + tmp15; + tmp16 = tmp4 - (K500000000 * tmp15); + tmp19 = K866025403 * (tmp17 - tmp18); + Y[-2 * iostride] = tmp16 - tmp19; + X[iostride] = tmp16 + tmp19; + Y[0] = tmp20 + tmp21; + tmp22 = tmp21 - (K500000000 * tmp20); + tmp23 = K866025403 * (tmp14 - tmp9); + X[2 * iostride] = -(tmp22 - tmp23); + Y[-iostride] = tmp23 + tmp22; + } + } + if (i == m) { + fftw_real tmp1; + fftw_real tmp3; + fftw_real tmp2; + ASSERT_ALIGNED_DOUBLE; + tmp1 = X[iostride]; + tmp3 = X[0]; + tmp2 = X[2 * iostride]; + Y[0] = -(K866025403 * (tmp1 + tmp2)); + X[iostride] = tmp3 + tmp2 - tmp1; + X[0] = tmp3 - (K500000000 * (tmp2 - tmp1)); + } +} + +static const int twiddle_order[] = +{1, 2}; +fftw_codelet_desc fftw_hc2hc_forward_3_desc = +{ + "fftw_hc2hc_forward_3", + (void (*)()) fftw_hc2hc_forward_3, + 3, + FFTW_FORWARD, + FFTW_HC2HC, + 69, + 2, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/fhf_32.c b/src/sndobj/rfftw/fhf_32.c new file mode 100644 index 0000000..879f427 --- /dev/null +++ b/src/sndobj/rfftw/fhf_32.c @@ -0,0 +1,2312 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:52 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-forward 32 */ + +/* + * This function contains 764 FP additions, 340 FP multiplications, + * (or, 618 additions, 194 multiplications, 146 fused multiply/add), + * 91 stack variables, and 256 memory accesses + */ +static const fftw_real K145142338 = FFTW_KONST(+0.145142338627231183818096187908697637345738139); +static const fftw_real K478470167 = FFTW_KONST(+0.478470167866104432467898943490134984741424603); +static const fftw_real K235698368 = FFTW_KONST(+0.235698368412998824278193812952627188828730159); +static const fftw_real K440960632 = FFTW_KONST(+0.440960632174177514856378431830194174754221310); +static const fftw_real K317196642 = FFTW_KONST(+0.317196642081822749107585806612746685337843547); +static const fftw_real K386505226 = FFTW_KONST(+0.386505226681368480405453304879234900485520646); +static const fftw_real K497592363 = FFTW_KONST(+0.497592363336098443122418476554739960787737434); +static const fftw_real K049008570 = FFTW_KONST(+0.049008570164780300997097781944320922930568337); +static const fftw_real K277785116 = FFTW_KONST(+0.277785116509801112371415406974266437187468595); +static const fftw_real K415734806 = FFTW_KONST(+0.415734806151272618539394188808952878369280406); +static const fftw_real K097545161 = FFTW_KONST(+0.097545161008064133924142434238511120463845809); +static const fftw_real K490392640 = FFTW_KONST(+0.490392640201615224563091118067119518486966865); +static const fftw_real K765366864 = FFTW_KONST(+0.765366864730179543456919968060797733522689125); +static const fftw_real K1_847759065 = FFTW_KONST(+1.847759065022573512256366378793576573644833252); +static const fftw_real K1_414213562 = FFTW_KONST(+1.414213562373095048801688724209698078569671875); +static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); +static const fftw_real K195090322 = FFTW_KONST(+0.195090322016128267848284868477022240927691618); +static const fftw_real K980785280 = FFTW_KONST(+0.980785280403230449126182236134239036973933731); +static const fftw_real K555570233 = FFTW_KONST(+0.555570233019602224742830813948532874374937191); +static const fftw_real K831469612 = FFTW_KONST(+0.831469612302545237078788377617905756738560812); +static const fftw_real K382683432 = FFTW_KONST(+0.382683432365089771728459984030398866761344562); +static const fftw_real K923879532 = FFTW_KONST(+0.923879532511286756128183189396788286822416626); +static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); + +/* + * Generator Id's : + * $Id: fhf_32.c,v 1.1.1.1 2006/05/12 15:14:45 veplaini Exp $ + * $Id: fhf_32.c,v 1.1.1.1 2006/05/12 15:14:45 veplaini Exp $ + * $Id: fhf_32.c,v 1.1.1.1 2006/05/12 15:14:45 veplaini Exp $ + */ + +void fftw_hc2hc_forward_32(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_real *X; + fftw_real *Y; + X = A; + Y = A + (32 * iostride); + { + fftw_real tmp685; + fftw_real tmp813; + fftw_real tmp709; + fftw_real tmp761; + fftw_real tmp692; + fftw_real tmp826; + fftw_real tmp712; + fftw_real tmp760; + fftw_real tmp801; + fftw_real tmp821; + fftw_real tmp749; + fftw_real tmp777; + fftw_real tmp804; + fftw_real tmp822; + fftw_real tmp754; + fftw_real tmp778; + fftw_real tmp700; + fftw_real tmp814; + fftw_real tmp716; + fftw_real tmp758; + fftw_real tmp707; + fftw_real tmp815; + fftw_real tmp719; + fftw_real tmp757; + fftw_real tmp794; + fftw_real tmp818; + fftw_real tmp732; + fftw_real tmp774; + fftw_real tmp797; + fftw_real tmp819; + fftw_real tmp737; + fftw_real tmp775; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp679; + fftw_real tmp680; + fftw_real tmp681; + fftw_real tmp682; + fftw_real tmp683; + fftw_real tmp684; + ASSERT_ALIGNED_DOUBLE; + tmp679 = X[0]; + tmp680 = X[16 * iostride]; + tmp681 = tmp679 + tmp680; + tmp682 = X[8 * iostride]; + tmp683 = X[24 * iostride]; + tmp684 = tmp682 + tmp683; + tmp685 = tmp681 + tmp684; + tmp813 = tmp681 - tmp684; + tmp709 = tmp679 - tmp680; + tmp761 = tmp682 - tmp683; + } + { + fftw_real tmp688; + fftw_real tmp710; + fftw_real tmp691; + fftw_real tmp711; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp686; + fftw_real tmp687; + fftw_real tmp689; + fftw_real tmp690; + ASSERT_ALIGNED_DOUBLE; + tmp686 = X[4 * iostride]; + tmp687 = X[20 * iostride]; + tmp688 = tmp686 + tmp687; + tmp710 = tmp686 - tmp687; + tmp689 = X[28 * iostride]; + tmp690 = X[12 * iostride]; + tmp691 = tmp689 + tmp690; + tmp711 = tmp689 - tmp690; + } + tmp692 = tmp688 + tmp691; + tmp826 = tmp691 - tmp688; + tmp712 = K707106781 * (tmp710 + tmp711); + tmp760 = K707106781 * (tmp711 - tmp710); + } + { + fftw_real tmp741; + fftw_real tmp799; + fftw_real tmp753; + fftw_real tmp800; + fftw_real tmp744; + fftw_real tmp802; + fftw_real tmp747; + fftw_real tmp803; + fftw_real tmp748; + fftw_real tmp750; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp739; + fftw_real tmp740; + fftw_real tmp751; + fftw_real tmp752; + ASSERT_ALIGNED_DOUBLE; + tmp739 = X[31 * iostride]; + tmp740 = X[15 * iostride]; + tmp741 = tmp739 - tmp740; + tmp799 = tmp739 + tmp740; + tmp751 = X[7 * iostride]; + tmp752 = X[23 * iostride]; + tmp753 = tmp751 - tmp752; + tmp800 = tmp751 + tmp752; + } + { + fftw_real tmp742; + fftw_real tmp743; + fftw_real tmp745; + fftw_real tmp746; + ASSERT_ALIGNED_DOUBLE; + tmp742 = X[3 * iostride]; + tmp743 = X[19 * iostride]; + tmp744 = tmp742 - tmp743; + tmp802 = tmp742 + tmp743; + tmp745 = X[27 * iostride]; + tmp746 = X[11 * iostride]; + tmp747 = tmp745 - tmp746; + tmp803 = tmp745 + tmp746; + } + tmp801 = tmp799 + tmp800; + tmp821 = tmp799 - tmp800; + tmp748 = K707106781 * (tmp744 + tmp747); + tmp749 = tmp741 + tmp748; + tmp777 = tmp741 - tmp748; + tmp804 = tmp802 + tmp803; + tmp822 = tmp803 - tmp802; + tmp750 = K707106781 * (tmp747 - tmp744); + tmp754 = tmp750 - tmp753; + tmp778 = tmp753 + tmp750; + } + { + fftw_real tmp696; + fftw_real tmp714; + fftw_real tmp699; + fftw_real tmp715; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp694; + fftw_real tmp695; + fftw_real tmp697; + fftw_real tmp698; + ASSERT_ALIGNED_DOUBLE; + tmp694 = X[2 * iostride]; + tmp695 = X[18 * iostride]; + tmp696 = tmp694 + tmp695; + tmp714 = tmp694 - tmp695; + tmp697 = X[10 * iostride]; + tmp698 = X[26 * iostride]; + tmp699 = tmp697 + tmp698; + tmp715 = tmp697 - tmp698; + } + tmp700 = tmp696 + tmp699; + tmp814 = tmp696 - tmp699; + tmp716 = (K923879532 * tmp714) - (K382683432 * tmp715); + tmp758 = (K382683432 * tmp714) + (K923879532 * tmp715); + } + { + fftw_real tmp703; + fftw_real tmp717; + fftw_real tmp706; + fftw_real tmp718; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp701; + fftw_real tmp702; + fftw_real tmp704; + fftw_real tmp705; + ASSERT_ALIGNED_DOUBLE; + tmp701 = X[30 * iostride]; + tmp702 = X[14 * iostride]; + tmp703 = tmp701 + tmp702; + tmp717 = tmp701 - tmp702; + tmp704 = X[6 * iostride]; + tmp705 = X[22 * iostride]; + tmp706 = tmp704 + tmp705; + tmp718 = tmp704 - tmp705; + } + tmp707 = tmp703 + tmp706; + tmp815 = tmp703 - tmp706; + tmp719 = (K923879532 * tmp717) + (K382683432 * tmp718); + tmp757 = (K382683432 * tmp717) - (K923879532 * tmp718); + } + { + fftw_real tmp724; + fftw_real tmp792; + fftw_real tmp736; + fftw_real tmp793; + fftw_real tmp727; + fftw_real tmp795; + fftw_real tmp730; + fftw_real tmp796; + fftw_real tmp731; + fftw_real tmp733; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp722; + fftw_real tmp723; + fftw_real tmp734; + fftw_real tmp735; + ASSERT_ALIGNED_DOUBLE; + tmp722 = X[iostride]; + tmp723 = X[17 * iostride]; + tmp724 = tmp722 - tmp723; + tmp792 = tmp722 + tmp723; + tmp734 = X[9 * iostride]; + tmp735 = X[25 * iostride]; + tmp736 = tmp734 - tmp735; + tmp793 = tmp734 + tmp735; + } + { + fftw_real tmp725; + fftw_real tmp726; + fftw_real tmp728; + fftw_real tmp729; + ASSERT_ALIGNED_DOUBLE; + tmp725 = X[5 * iostride]; + tmp726 = X[21 * iostride]; + tmp727 = tmp725 - tmp726; + tmp795 = tmp725 + tmp726; + tmp728 = X[29 * iostride]; + tmp729 = X[13 * iostride]; + tmp730 = tmp728 - tmp729; + tmp796 = tmp728 + tmp729; + } + tmp794 = tmp792 + tmp793; + tmp818 = tmp792 - tmp793; + tmp731 = K707106781 * (tmp727 + tmp730); + tmp732 = tmp724 + tmp731; + tmp774 = tmp724 - tmp731; + tmp797 = tmp795 + tmp796; + tmp819 = tmp796 - tmp795; + tmp733 = K707106781 * (tmp730 - tmp727); + tmp737 = tmp733 - tmp736; + tmp775 = tmp736 + tmp733; + } + { + fftw_real tmp693; + fftw_real tmp708; + fftw_real tmp809; + fftw_real tmp810; + fftw_real tmp811; + fftw_real tmp812; + ASSERT_ALIGNED_DOUBLE; + tmp693 = tmp685 + tmp692; + tmp708 = tmp700 + tmp707; + tmp809 = tmp693 + tmp708; + tmp810 = tmp794 + tmp797; + tmp811 = tmp801 + tmp804; + tmp812 = tmp810 + tmp811; + X[8 * iostride] = tmp693 - tmp708; + Y[-8 * iostride] = tmp811 - tmp810; + X[16 * iostride] = tmp809 - tmp812; + X[0] = tmp809 + tmp812; + } + { + fftw_real tmp791; + fftw_real tmp807; + fftw_real tmp806; + fftw_real tmp808; + fftw_real tmp798; + fftw_real tmp805; + ASSERT_ALIGNED_DOUBLE; + tmp791 = tmp685 - tmp692; + tmp807 = tmp707 - tmp700; + tmp798 = tmp794 - tmp797; + tmp805 = tmp801 - tmp804; + tmp806 = K707106781 * (tmp798 + tmp805); + tmp808 = K707106781 * (tmp805 - tmp798); + X[12 * iostride] = tmp791 - tmp806; + X[4 * iostride] = tmp791 + tmp806; + Y[-4 * iostride] = tmp807 + tmp808; + Y[-12 * iostride] = tmp808 - tmp807; + } + { + fftw_real tmp817; + fftw_real tmp833; + fftw_real tmp827; + fftw_real tmp829; + fftw_real tmp824; + fftw_real tmp828; + fftw_real tmp832; + fftw_real tmp834; + fftw_real tmp816; + fftw_real tmp825; + ASSERT_ALIGNED_DOUBLE; + tmp816 = K707106781 * (tmp814 + tmp815); + tmp817 = tmp813 + tmp816; + tmp833 = tmp813 - tmp816; + tmp825 = K707106781 * (tmp815 - tmp814); + tmp827 = tmp825 - tmp826; + tmp829 = tmp826 + tmp825; + { + fftw_real tmp820; + fftw_real tmp823; + fftw_real tmp830; + fftw_real tmp831; + ASSERT_ALIGNED_DOUBLE; + tmp820 = (K923879532 * tmp818) + (K382683432 * tmp819); + tmp823 = (K923879532 * tmp821) - (K382683432 * tmp822); + tmp824 = tmp820 + tmp823; + tmp828 = tmp823 - tmp820; + tmp830 = (K923879532 * tmp819) - (K382683432 * tmp818); + tmp831 = (K382683432 * tmp821) + (K923879532 * tmp822); + tmp832 = tmp830 + tmp831; + tmp834 = tmp831 - tmp830; + } + X[14 * iostride] = tmp817 - tmp824; + X[2 * iostride] = tmp817 + tmp824; + Y[-6 * iostride] = tmp827 + tmp828; + Y[-10 * iostride] = tmp828 - tmp827; + Y[-2 * iostride] = tmp829 + tmp832; + Y[-14 * iostride] = tmp832 - tmp829; + X[10 * iostride] = tmp833 - tmp834; + X[6 * iostride] = tmp833 + tmp834; + } + { + fftw_real tmp773; + fftw_real tmp789; + fftw_real tmp788; + fftw_real tmp790; + fftw_real tmp780; + fftw_real tmp784; + fftw_real tmp783; + fftw_real tmp785; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp771; + fftw_real tmp772; + fftw_real tmp786; + fftw_real tmp787; + ASSERT_ALIGNED_DOUBLE; + tmp771 = tmp709 - tmp712; + tmp772 = tmp758 + tmp757; + tmp773 = tmp771 + tmp772; + tmp789 = tmp771 - tmp772; + tmp786 = (K831469612 * tmp775) - (K555570233 * tmp774); + tmp787 = (K555570233 * tmp777) + (K831469612 * tmp778); + tmp788 = tmp786 + tmp787; + tmp790 = tmp787 - tmp786; + } + { + fftw_real tmp776; + fftw_real tmp779; + fftw_real tmp781; + fftw_real tmp782; + ASSERT_ALIGNED_DOUBLE; + tmp776 = (K831469612 * tmp774) + (K555570233 * tmp775); + tmp779 = (K831469612 * tmp777) - (K555570233 * tmp778); + tmp780 = tmp776 + tmp779; + tmp784 = tmp779 - tmp776; + tmp781 = tmp719 - tmp716; + tmp782 = tmp761 + tmp760; + tmp783 = tmp781 - tmp782; + tmp785 = tmp782 + tmp781; + } + X[13 * iostride] = tmp773 - tmp780; + X[3 * iostride] = tmp773 + tmp780; + Y[-5 * iostride] = tmp783 + tmp784; + Y[-11 * iostride] = tmp784 - tmp783; + Y[-3 * iostride] = tmp785 + tmp788; + Y[-13 * iostride] = tmp788 - tmp785; + X[11 * iostride] = tmp789 - tmp790; + X[5 * iostride] = tmp789 + tmp790; + } + { + fftw_real tmp721; + fftw_real tmp769; + fftw_real tmp768; + fftw_real tmp770; + fftw_real tmp756; + fftw_real tmp764; + fftw_real tmp763; + fftw_real tmp765; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp713; + fftw_real tmp720; + fftw_real tmp766; + fftw_real tmp767; + ASSERT_ALIGNED_DOUBLE; + tmp713 = tmp709 + tmp712; + tmp720 = tmp716 + tmp719; + tmp721 = tmp713 + tmp720; + tmp769 = tmp713 - tmp720; + tmp766 = (K980785280 * tmp737) - (K195090322 * tmp732); + tmp767 = (K195090322 * tmp749) + (K980785280 * tmp754); + tmp768 = tmp766 + tmp767; + tmp770 = tmp767 - tmp766; + } + { + fftw_real tmp738; + fftw_real tmp755; + fftw_real tmp759; + fftw_real tmp762; + ASSERT_ALIGNED_DOUBLE; + tmp738 = (K980785280 * tmp732) + (K195090322 * tmp737); + tmp755 = (K980785280 * tmp749) - (K195090322 * tmp754); + tmp756 = tmp738 + tmp755; + tmp764 = tmp755 - tmp738; + tmp759 = tmp757 - tmp758; + tmp762 = tmp760 - tmp761; + tmp763 = tmp759 - tmp762; + tmp765 = tmp762 + tmp759; + } + X[15 * iostride] = tmp721 - tmp756; + X[iostride] = tmp721 + tmp756; + Y[-7 * iostride] = tmp763 + tmp764; + Y[-9 * iostride] = tmp764 - tmp763; + Y[-iostride] = tmp765 + tmp768; + Y[-15 * iostride] = tmp768 - tmp765; + X[9 * iostride] = tmp769 - tmp770; + X[7 * iostride] = tmp769 + tmp770; + } + } + X = X + dist; + Y = Y - dist; + for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 31) { + fftw_real tmp201; + fftw_real tmp533; + fftw_real tmp653; + fftw_real tmp667; + fftw_real tmp623; + fftw_real tmp637; + fftw_real tmp373; + fftw_real tmp485; + fftw_real tmp343; + fftw_real tmp561; + fftw_real tmp458; + fftw_real tmp508; + fftw_real tmp568; + fftw_real tmp604; + fftw_real tmp441; + fftw_real tmp505; + fftw_real tmp224; + fftw_real tmp636; + fftw_real tmp383; + fftw_real tmp487; + fftw_real tmp536; + fftw_real tmp618; + fftw_real tmp378; + fftw_real tmp486; + fftw_real tmp366; + fftw_real tmp569; + fftw_real tmp564; + fftw_real tmp605; + fftw_real tmp452; + fftw_real tmp509; + fftw_real tmp461; + fftw_real tmp506; + fftw_real tmp248; + fftw_real tmp541; + fftw_real tmp395; + fftw_real tmp491; + fftw_real tmp540; + fftw_real tmp594; + fftw_real tmp390; + fftw_real tmp490; + fftw_real tmp296; + fftw_real tmp555; + fftw_real tmp431; + fftw_real tmp498; + fftw_real tmp552; + fftw_real tmp599; + fftw_real tmp414; + fftw_real tmp501; + fftw_real tmp271; + fftw_real tmp543; + fftw_real tmp406; + fftw_real tmp494; + fftw_real tmp546; + fftw_real tmp595; + fftw_real tmp401; + fftw_real tmp493; + fftw_real tmp319; + fftw_real tmp553; + fftw_real tmp558; + fftw_real tmp600; + fftw_real tmp425; + fftw_real tmp499; + fftw_real tmp434; + fftw_real tmp502; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp183; + fftw_real tmp621; + fftw_real tmp188; + fftw_real tmp620; + fftw_real tmp194; + fftw_real tmp370; + fftw_real tmp199; + fftw_real tmp371; + ASSERT_ALIGNED_DOUBLE; + tmp183 = X[0]; + tmp621 = Y[-31 * iostride]; + { + fftw_real tmp185; + fftw_real tmp187; + fftw_real tmp184; + fftw_real tmp186; + ASSERT_ALIGNED_DOUBLE; + tmp185 = X[16 * iostride]; + tmp187 = Y[-15 * iostride]; + tmp184 = c_re(W[15]); + tmp186 = c_im(W[15]); + tmp188 = (tmp184 * tmp185) - (tmp186 * tmp187); + tmp620 = (tmp186 * tmp185) + (tmp184 * tmp187); + } + { + fftw_real tmp191; + fftw_real tmp193; + fftw_real tmp190; + fftw_real tmp192; + ASSERT_ALIGNED_DOUBLE; + tmp191 = X[8 * iostride]; + tmp193 = Y[-23 * iostride]; + tmp190 = c_re(W[7]); + tmp192 = c_im(W[7]); + tmp194 = (tmp190 * tmp191) - (tmp192 * tmp193); + tmp370 = (tmp192 * tmp191) + (tmp190 * tmp193); + } + { + fftw_real tmp196; + fftw_real tmp198; + fftw_real tmp195; + fftw_real tmp197; + ASSERT_ALIGNED_DOUBLE; + tmp196 = X[24 * iostride]; + tmp198 = Y[-7 * iostride]; + tmp195 = c_re(W[23]); + tmp197 = c_im(W[23]); + tmp199 = (tmp195 * tmp196) - (tmp197 * tmp198); + tmp371 = (tmp197 * tmp196) + (tmp195 * tmp198); + } + { + fftw_real tmp189; + fftw_real tmp200; + fftw_real tmp651; + fftw_real tmp652; + ASSERT_ALIGNED_DOUBLE; + tmp189 = tmp183 + tmp188; + tmp200 = tmp194 + tmp199; + tmp201 = tmp189 + tmp200; + tmp533 = tmp189 - tmp200; + tmp651 = tmp621 - tmp620; + tmp652 = tmp194 - tmp199; + tmp653 = tmp651 - tmp652; + tmp667 = tmp652 + tmp651; + } + { + fftw_real tmp619; + fftw_real tmp622; + fftw_real tmp369; + fftw_real tmp372; + ASSERT_ALIGNED_DOUBLE; + tmp619 = tmp370 + tmp371; + tmp622 = tmp620 + tmp621; + tmp623 = tmp619 + tmp622; + tmp637 = tmp622 - tmp619; + tmp369 = tmp183 - tmp188; + tmp372 = tmp370 - tmp371; + tmp373 = tmp369 - tmp372; + tmp485 = tmp369 + tmp372; + } + } + { + fftw_real tmp325; + fftw_real tmp454; + fftw_real tmp341; + fftw_real tmp439; + fftw_real tmp330; + fftw_real tmp455; + fftw_real tmp336; + fftw_real tmp438; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp322; + fftw_real tmp324; + fftw_real tmp321; + fftw_real tmp323; + ASSERT_ALIGNED_DOUBLE; + tmp322 = X[31 * iostride]; + tmp324 = Y[0]; + tmp321 = c_re(W[30]); + tmp323 = c_im(W[30]); + tmp325 = (tmp321 * tmp322) - (tmp323 * tmp324); + tmp454 = (tmp323 * tmp322) + (tmp321 * tmp324); + } + { + fftw_real tmp338; + fftw_real tmp340; + fftw_real tmp337; + fftw_real tmp339; + ASSERT_ALIGNED_DOUBLE; + tmp338 = X[23 * iostride]; + tmp340 = Y[-8 * iostride]; + tmp337 = c_re(W[22]); + tmp339 = c_im(W[22]); + tmp341 = (tmp337 * tmp338) - (tmp339 * tmp340); + tmp439 = (tmp339 * tmp338) + (tmp337 * tmp340); + } + { + fftw_real tmp327; + fftw_real tmp329; + fftw_real tmp326; + fftw_real tmp328; + ASSERT_ALIGNED_DOUBLE; + tmp327 = X[15 * iostride]; + tmp329 = Y[-16 * iostride]; + tmp326 = c_re(W[14]); + tmp328 = c_im(W[14]); + tmp330 = (tmp326 * tmp327) - (tmp328 * tmp329); + tmp455 = (tmp328 * tmp327) + (tmp326 * tmp329); + } + { + fftw_real tmp333; + fftw_real tmp335; + fftw_real tmp332; + fftw_real tmp334; + ASSERT_ALIGNED_DOUBLE; + tmp333 = X[7 * iostride]; + tmp335 = Y[-24 * iostride]; + tmp332 = c_re(W[6]); + tmp334 = c_im(W[6]); + tmp336 = (tmp332 * tmp333) - (tmp334 * tmp335); + tmp438 = (tmp334 * tmp333) + (tmp332 * tmp335); + } + { + fftw_real tmp331; + fftw_real tmp342; + fftw_real tmp456; + fftw_real tmp457; + ASSERT_ALIGNED_DOUBLE; + tmp331 = tmp325 + tmp330; + tmp342 = tmp336 + tmp341; + tmp343 = tmp331 + tmp342; + tmp561 = tmp331 - tmp342; + tmp456 = tmp454 - tmp455; + tmp457 = tmp336 - tmp341; + tmp458 = tmp456 + tmp457; + tmp508 = tmp456 - tmp457; + } + { + fftw_real tmp566; + fftw_real tmp567; + fftw_real tmp437; + fftw_real tmp440; + ASSERT_ALIGNED_DOUBLE; + tmp566 = tmp454 + tmp455; + tmp567 = tmp438 + tmp439; + tmp568 = tmp566 - tmp567; + tmp604 = tmp566 + tmp567; + tmp437 = tmp325 - tmp330; + tmp440 = tmp438 - tmp439; + tmp441 = tmp437 - tmp440; + tmp505 = tmp437 + tmp440; + } + } + { + fftw_real tmp206; + fftw_real tmp374; + fftw_real tmp222; + fftw_real tmp381; + fftw_real tmp211; + fftw_real tmp375; + fftw_real tmp217; + fftw_real tmp380; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp203; + fftw_real tmp205; + fftw_real tmp202; + fftw_real tmp204; + ASSERT_ALIGNED_DOUBLE; + tmp203 = X[4 * iostride]; + tmp205 = Y[-27 * iostride]; + tmp202 = c_re(W[3]); + tmp204 = c_im(W[3]); + tmp206 = (tmp202 * tmp203) - (tmp204 * tmp205); + tmp374 = (tmp204 * tmp203) + (tmp202 * tmp205); + } + { + fftw_real tmp219; + fftw_real tmp221; + fftw_real tmp218; + fftw_real tmp220; + ASSERT_ALIGNED_DOUBLE; + tmp219 = X[12 * iostride]; + tmp221 = Y[-19 * iostride]; + tmp218 = c_re(W[11]); + tmp220 = c_im(W[11]); + tmp222 = (tmp218 * tmp219) - (tmp220 * tmp221); + tmp381 = (tmp220 * tmp219) + (tmp218 * tmp221); + } + { + fftw_real tmp208; + fftw_real tmp210; + fftw_real tmp207; + fftw_real tmp209; + ASSERT_ALIGNED_DOUBLE; + tmp208 = X[20 * iostride]; + tmp210 = Y[-11 * iostride]; + tmp207 = c_re(W[19]); + tmp209 = c_im(W[19]); + tmp211 = (tmp207 * tmp208) - (tmp209 * tmp210); + tmp375 = (tmp209 * tmp208) + (tmp207 * tmp210); + } + { + fftw_real tmp214; + fftw_real tmp216; + fftw_real tmp213; + fftw_real tmp215; + ASSERT_ALIGNED_DOUBLE; + tmp214 = X[28 * iostride]; + tmp216 = Y[-3 * iostride]; + tmp213 = c_re(W[27]); + tmp215 = c_im(W[27]); + tmp217 = (tmp213 * tmp214) - (tmp215 * tmp216); + tmp380 = (tmp215 * tmp214) + (tmp213 * tmp216); + } + { + fftw_real tmp212; + fftw_real tmp223; + fftw_real tmp379; + fftw_real tmp382; + ASSERT_ALIGNED_DOUBLE; + tmp212 = tmp206 + tmp211; + tmp223 = tmp217 + tmp222; + tmp224 = tmp212 + tmp223; + tmp636 = tmp223 - tmp212; + tmp379 = tmp217 - tmp222; + tmp382 = tmp380 - tmp381; + tmp383 = tmp379 + tmp382; + tmp487 = tmp379 - tmp382; + } + { + fftw_real tmp534; + fftw_real tmp535; + fftw_real tmp376; + fftw_real tmp377; + ASSERT_ALIGNED_DOUBLE; + tmp534 = tmp374 + tmp375; + tmp535 = tmp380 + tmp381; + tmp536 = tmp534 - tmp535; + tmp618 = tmp534 + tmp535; + tmp376 = tmp374 - tmp375; + tmp377 = tmp206 - tmp211; + tmp378 = tmp376 - tmp377; + tmp486 = tmp377 + tmp376; + } + } + { + fftw_real tmp348; + fftw_real tmp442; + fftw_real tmp353; + fftw_real tmp443; + fftw_real tmp444; + fftw_real tmp445; + fftw_real tmp359; + fftw_real tmp448; + fftw_real tmp364; + fftw_real tmp449; + fftw_real tmp447; + fftw_real tmp450; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp345; + fftw_real tmp347; + fftw_real tmp344; + fftw_real tmp346; + ASSERT_ALIGNED_DOUBLE; + tmp345 = X[3 * iostride]; + tmp347 = Y[-28 * iostride]; + tmp344 = c_re(W[2]); + tmp346 = c_im(W[2]); + tmp348 = (tmp344 * tmp345) - (tmp346 * tmp347); + tmp442 = (tmp346 * tmp345) + (tmp344 * tmp347); + } + { + fftw_real tmp350; + fftw_real tmp352; + fftw_real tmp349; + fftw_real tmp351; + ASSERT_ALIGNED_DOUBLE; + tmp350 = X[19 * iostride]; + tmp352 = Y[-12 * iostride]; + tmp349 = c_re(W[18]); + tmp351 = c_im(W[18]); + tmp353 = (tmp349 * tmp350) - (tmp351 * tmp352); + tmp443 = (tmp351 * tmp350) + (tmp349 * tmp352); + } + tmp444 = tmp442 - tmp443; + tmp445 = tmp348 - tmp353; + { + fftw_real tmp356; + fftw_real tmp358; + fftw_real tmp355; + fftw_real tmp357; + ASSERT_ALIGNED_DOUBLE; + tmp356 = X[27 * iostride]; + tmp358 = Y[-4 * iostride]; + tmp355 = c_re(W[26]); + tmp357 = c_im(W[26]); + tmp359 = (tmp355 * tmp356) - (tmp357 * tmp358); + tmp448 = (tmp357 * tmp356) + (tmp355 * tmp358); + } + { + fftw_real tmp361; + fftw_real tmp363; + fftw_real tmp360; + fftw_real tmp362; + ASSERT_ALIGNED_DOUBLE; + tmp361 = X[11 * iostride]; + tmp363 = Y[-20 * iostride]; + tmp360 = c_re(W[10]); + tmp362 = c_im(W[10]); + tmp364 = (tmp360 * tmp361) - (tmp362 * tmp363); + tmp449 = (tmp362 * tmp361) + (tmp360 * tmp363); + } + tmp447 = tmp359 - tmp364; + tmp450 = tmp448 - tmp449; + { + fftw_real tmp354; + fftw_real tmp365; + fftw_real tmp562; + fftw_real tmp563; + ASSERT_ALIGNED_DOUBLE; + tmp354 = tmp348 + tmp353; + tmp365 = tmp359 + tmp364; + tmp366 = tmp354 + tmp365; + tmp569 = tmp365 - tmp354; + tmp562 = tmp442 + tmp443; + tmp563 = tmp448 + tmp449; + tmp564 = tmp562 - tmp563; + tmp605 = tmp562 + tmp563; + } + { + fftw_real tmp446; + fftw_real tmp451; + fftw_real tmp459; + fftw_real tmp460; + ASSERT_ALIGNED_DOUBLE; + tmp446 = tmp444 - tmp445; + tmp451 = tmp447 + tmp450; + tmp452 = K707106781 * (tmp446 - tmp451); + tmp509 = K707106781 * (tmp446 + tmp451); + tmp459 = tmp447 - tmp450; + tmp460 = tmp445 + tmp444; + tmp461 = K707106781 * (tmp459 - tmp460); + tmp506 = K707106781 * (tmp460 + tmp459); + } + } + { + fftw_real tmp230; + fftw_real tmp386; + fftw_real tmp246; + fftw_real tmp393; + fftw_real tmp235; + fftw_real tmp387; + fftw_real tmp241; + fftw_real tmp392; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp227; + fftw_real tmp229; + fftw_real tmp226; + fftw_real tmp228; + ASSERT_ALIGNED_DOUBLE; + tmp227 = X[2 * iostride]; + tmp229 = Y[-29 * iostride]; + tmp226 = c_re(W[1]); + tmp228 = c_im(W[1]); + tmp230 = (tmp226 * tmp227) - (tmp228 * tmp229); + tmp386 = (tmp228 * tmp227) + (tmp226 * tmp229); + } + { + fftw_real tmp243; + fftw_real tmp245; + fftw_real tmp242; + fftw_real tmp244; + ASSERT_ALIGNED_DOUBLE; + tmp243 = X[26 * iostride]; + tmp245 = Y[-5 * iostride]; + tmp242 = c_re(W[25]); + tmp244 = c_im(W[25]); + tmp246 = (tmp242 * tmp243) - (tmp244 * tmp245); + tmp393 = (tmp244 * tmp243) + (tmp242 * tmp245); + } + { + fftw_real tmp232; + fftw_real tmp234; + fftw_real tmp231; + fftw_real tmp233; + ASSERT_ALIGNED_DOUBLE; + tmp232 = X[18 * iostride]; + tmp234 = Y[-13 * iostride]; + tmp231 = c_re(W[17]); + tmp233 = c_im(W[17]); + tmp235 = (tmp231 * tmp232) - (tmp233 * tmp234); + tmp387 = (tmp233 * tmp232) + (tmp231 * tmp234); + } + { + fftw_real tmp238; + fftw_real tmp240; + fftw_real tmp237; + fftw_real tmp239; + ASSERT_ALIGNED_DOUBLE; + tmp238 = X[10 * iostride]; + tmp240 = Y[-21 * iostride]; + tmp237 = c_re(W[9]); + tmp239 = c_im(W[9]); + tmp241 = (tmp237 * tmp238) - (tmp239 * tmp240); + tmp392 = (tmp239 * tmp238) + (tmp237 * tmp240); + } + { + fftw_real tmp236; + fftw_real tmp247; + fftw_real tmp391; + fftw_real tmp394; + ASSERT_ALIGNED_DOUBLE; + tmp236 = tmp230 + tmp235; + tmp247 = tmp241 + tmp246; + tmp248 = tmp236 + tmp247; + tmp541 = tmp236 - tmp247; + tmp391 = tmp230 - tmp235; + tmp394 = tmp392 - tmp393; + tmp395 = tmp391 - tmp394; + tmp491 = tmp391 + tmp394; + } + { + fftw_real tmp538; + fftw_real tmp539; + fftw_real tmp388; + fftw_real tmp389; + ASSERT_ALIGNED_DOUBLE; + tmp538 = tmp386 + tmp387; + tmp539 = tmp392 + tmp393; + tmp540 = tmp538 - tmp539; + tmp594 = tmp538 + tmp539; + tmp388 = tmp386 - tmp387; + tmp389 = tmp241 - tmp246; + tmp390 = tmp388 + tmp389; + tmp490 = tmp388 - tmp389; + } + } + { + fftw_real tmp278; + fftw_real tmp410; + fftw_real tmp294; + fftw_real tmp429; + fftw_real tmp283; + fftw_real tmp411; + fftw_real tmp289; + fftw_real tmp428; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp275; + fftw_real tmp277; + fftw_real tmp274; + fftw_real tmp276; + ASSERT_ALIGNED_DOUBLE; + tmp275 = X[iostride]; + tmp277 = Y[-30 * iostride]; + tmp274 = c_re(W[0]); + tmp276 = c_im(W[0]); + tmp278 = (tmp274 * tmp275) - (tmp276 * tmp277); + tmp410 = (tmp276 * tmp275) + (tmp274 * tmp277); + } + { + fftw_real tmp291; + fftw_real tmp293; + fftw_real tmp290; + fftw_real tmp292; + ASSERT_ALIGNED_DOUBLE; + tmp291 = X[25 * iostride]; + tmp293 = Y[-6 * iostride]; + tmp290 = c_re(W[24]); + tmp292 = c_im(W[24]); + tmp294 = (tmp290 * tmp291) - (tmp292 * tmp293); + tmp429 = (tmp292 * tmp291) + (tmp290 * tmp293); + } + { + fftw_real tmp280; + fftw_real tmp282; + fftw_real tmp279; + fftw_real tmp281; + ASSERT_ALIGNED_DOUBLE; + tmp280 = X[17 * iostride]; + tmp282 = Y[-14 * iostride]; + tmp279 = c_re(W[16]); + tmp281 = c_im(W[16]); + tmp283 = (tmp279 * tmp280) - (tmp281 * tmp282); + tmp411 = (tmp281 * tmp280) + (tmp279 * tmp282); + } + { + fftw_real tmp286; + fftw_real tmp288; + fftw_real tmp285; + fftw_real tmp287; + ASSERT_ALIGNED_DOUBLE; + tmp286 = X[9 * iostride]; + tmp288 = Y[-22 * iostride]; + tmp285 = c_re(W[8]); + tmp287 = c_im(W[8]); + tmp289 = (tmp285 * tmp286) - (tmp287 * tmp288); + tmp428 = (tmp287 * tmp286) + (tmp285 * tmp288); + } + { + fftw_real tmp284; + fftw_real tmp295; + fftw_real tmp427; + fftw_real tmp430; + ASSERT_ALIGNED_DOUBLE; + tmp284 = tmp278 + tmp283; + tmp295 = tmp289 + tmp294; + tmp296 = tmp284 + tmp295; + tmp555 = tmp284 - tmp295; + tmp427 = tmp278 - tmp283; + tmp430 = tmp428 - tmp429; + tmp431 = tmp427 - tmp430; + tmp498 = tmp427 + tmp430; + } + { + fftw_real tmp550; + fftw_real tmp551; + fftw_real tmp412; + fftw_real tmp413; + ASSERT_ALIGNED_DOUBLE; + tmp550 = tmp410 + tmp411; + tmp551 = tmp428 + tmp429; + tmp552 = tmp550 - tmp551; + tmp599 = tmp550 + tmp551; + tmp412 = tmp410 - tmp411; + tmp413 = tmp289 - tmp294; + tmp414 = tmp412 + tmp413; + tmp501 = tmp412 - tmp413; + } + } + { + fftw_real tmp253; + fftw_real tmp397; + fftw_real tmp269; + fftw_real tmp404; + fftw_real tmp258; + fftw_real tmp398; + fftw_real tmp264; + fftw_real tmp403; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp250; + fftw_real tmp252; + fftw_real tmp249; + fftw_real tmp251; + ASSERT_ALIGNED_DOUBLE; + tmp250 = X[30 * iostride]; + tmp252 = Y[-iostride]; + tmp249 = c_re(W[29]); + tmp251 = c_im(W[29]); + tmp253 = (tmp249 * tmp250) - (tmp251 * tmp252); + tmp397 = (tmp251 * tmp250) + (tmp249 * tmp252); + } + { + fftw_real tmp266; + fftw_real tmp268; + fftw_real tmp265; + fftw_real tmp267; + ASSERT_ALIGNED_DOUBLE; + tmp266 = X[22 * iostride]; + tmp268 = Y[-9 * iostride]; + tmp265 = c_re(W[21]); + tmp267 = c_im(W[21]); + tmp269 = (tmp265 * tmp266) - (tmp267 * tmp268); + tmp404 = (tmp267 * tmp266) + (tmp265 * tmp268); + } + { + fftw_real tmp255; + fftw_real tmp257; + fftw_real tmp254; + fftw_real tmp256; + ASSERT_ALIGNED_DOUBLE; + tmp255 = X[14 * iostride]; + tmp257 = Y[-17 * iostride]; + tmp254 = c_re(W[13]); + tmp256 = c_im(W[13]); + tmp258 = (tmp254 * tmp255) - (tmp256 * tmp257); + tmp398 = (tmp256 * tmp255) + (tmp254 * tmp257); + } + { + fftw_real tmp261; + fftw_real tmp263; + fftw_real tmp260; + fftw_real tmp262; + ASSERT_ALIGNED_DOUBLE; + tmp261 = X[6 * iostride]; + tmp263 = Y[-25 * iostride]; + tmp260 = c_re(W[5]); + tmp262 = c_im(W[5]); + tmp264 = (tmp260 * tmp261) - (tmp262 * tmp263); + tmp403 = (tmp262 * tmp261) + (tmp260 * tmp263); + } + { + fftw_real tmp259; + fftw_real tmp270; + fftw_real tmp402; + fftw_real tmp405; + ASSERT_ALIGNED_DOUBLE; + tmp259 = tmp253 + tmp258; + tmp270 = tmp264 + tmp269; + tmp271 = tmp259 + tmp270; + tmp543 = tmp259 - tmp270; + tmp402 = tmp253 - tmp258; + tmp405 = tmp403 - tmp404; + tmp406 = tmp402 - tmp405; + tmp494 = tmp402 + tmp405; + } + { + fftw_real tmp544; + fftw_real tmp545; + fftw_real tmp399; + fftw_real tmp400; + ASSERT_ALIGNED_DOUBLE; + tmp544 = tmp397 + tmp398; + tmp545 = tmp403 + tmp404; + tmp546 = tmp544 - tmp545; + tmp595 = tmp544 + tmp545; + tmp399 = tmp397 - tmp398; + tmp400 = tmp264 - tmp269; + tmp401 = tmp399 + tmp400; + tmp493 = tmp399 - tmp400; + } + } + { + fftw_real tmp301; + fftw_real tmp421; + fftw_real tmp306; + fftw_real tmp422; + fftw_real tmp420; + fftw_real tmp423; + fftw_real tmp312; + fftw_real tmp416; + fftw_real tmp317; + fftw_real tmp417; + fftw_real tmp415; + fftw_real tmp418; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp298; + fftw_real tmp300; + fftw_real tmp297; + fftw_real tmp299; + ASSERT_ALIGNED_DOUBLE; + tmp298 = X[5 * iostride]; + tmp300 = Y[-26 * iostride]; + tmp297 = c_re(W[4]); + tmp299 = c_im(W[4]); + tmp301 = (tmp297 * tmp298) - (tmp299 * tmp300); + tmp421 = (tmp299 * tmp298) + (tmp297 * tmp300); + } + { + fftw_real tmp303; + fftw_real tmp305; + fftw_real tmp302; + fftw_real tmp304; + ASSERT_ALIGNED_DOUBLE; + tmp303 = X[21 * iostride]; + tmp305 = Y[-10 * iostride]; + tmp302 = c_re(W[20]); + tmp304 = c_im(W[20]); + tmp306 = (tmp302 * tmp303) - (tmp304 * tmp305); + tmp422 = (tmp304 * tmp303) + (tmp302 * tmp305); + } + tmp420 = tmp301 - tmp306; + tmp423 = tmp421 - tmp422; + { + fftw_real tmp309; + fftw_real tmp311; + fftw_real tmp308; + fftw_real tmp310; + ASSERT_ALIGNED_DOUBLE; + tmp309 = X[29 * iostride]; + tmp311 = Y[-2 * iostride]; + tmp308 = c_re(W[28]); + tmp310 = c_im(W[28]); + tmp312 = (tmp308 * tmp309) - (tmp310 * tmp311); + tmp416 = (tmp310 * tmp309) + (tmp308 * tmp311); + } + { + fftw_real tmp314; + fftw_real tmp316; + fftw_real tmp313; + fftw_real tmp315; + ASSERT_ALIGNED_DOUBLE; + tmp314 = X[13 * iostride]; + tmp316 = Y[-18 * iostride]; + tmp313 = c_re(W[12]); + tmp315 = c_im(W[12]); + tmp317 = (tmp313 * tmp314) - (tmp315 * tmp316); + tmp417 = (tmp315 * tmp314) + (tmp313 * tmp316); + } + tmp415 = tmp312 - tmp317; + tmp418 = tmp416 - tmp417; + { + fftw_real tmp307; + fftw_real tmp318; + fftw_real tmp556; + fftw_real tmp557; + ASSERT_ALIGNED_DOUBLE; + tmp307 = tmp301 + tmp306; + tmp318 = tmp312 + tmp317; + tmp319 = tmp307 + tmp318; + tmp553 = tmp318 - tmp307; + tmp556 = tmp421 + tmp422; + tmp557 = tmp416 + tmp417; + tmp558 = tmp556 - tmp557; + tmp600 = tmp556 + tmp557; + } + { + fftw_real tmp419; + fftw_real tmp424; + fftw_real tmp432; + fftw_real tmp433; + ASSERT_ALIGNED_DOUBLE; + tmp419 = tmp415 - tmp418; + tmp424 = tmp420 + tmp423; + tmp425 = K707106781 * (tmp419 - tmp424); + tmp499 = K707106781 * (tmp424 + tmp419); + tmp432 = tmp423 - tmp420; + tmp433 = tmp415 + tmp418; + tmp434 = K707106781 * (tmp432 - tmp433); + tmp502 = K707106781 * (tmp432 + tmp433); + } + } + { + fftw_real tmp273; + fftw_real tmp613; + fftw_real tmp625; + fftw_real tmp627; + fftw_real tmp368; + fftw_real tmp628; + fftw_real tmp616; + fftw_real tmp626; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp225; + fftw_real tmp272; + fftw_real tmp617; + fftw_real tmp624; + ASSERT_ALIGNED_DOUBLE; + tmp225 = tmp201 + tmp224; + tmp272 = tmp248 + tmp271; + tmp273 = tmp225 + tmp272; + tmp613 = tmp225 - tmp272; + tmp617 = tmp594 + tmp595; + tmp624 = tmp618 + tmp623; + tmp625 = tmp617 + tmp624; + tmp627 = tmp624 - tmp617; + } + { + fftw_real tmp320; + fftw_real tmp367; + fftw_real tmp614; + fftw_real tmp615; + ASSERT_ALIGNED_DOUBLE; + tmp320 = tmp296 + tmp319; + tmp367 = tmp343 + tmp366; + tmp368 = tmp320 + tmp367; + tmp628 = tmp367 - tmp320; + tmp614 = tmp599 + tmp600; + tmp615 = tmp604 + tmp605; + tmp616 = tmp614 - tmp615; + tmp626 = tmp614 + tmp615; + } + Y[-16 * iostride] = tmp273 - tmp368; + X[0] = tmp273 + tmp368; + Y[-24 * iostride] = tmp613 - tmp616; + X[8 * iostride] = tmp613 + tmp616; + X[16 * iostride] = -(tmp625 - tmp626); + Y[0] = tmp626 + tmp625; + X[24 * iostride] = -(tmp627 - tmp628); + Y[-8 * iostride] = tmp628 + tmp627; + } + { + fftw_real tmp597; + fftw_real tmp609; + fftw_real tmp631; + fftw_real tmp633; + fftw_real tmp602; + fftw_real tmp610; + fftw_real tmp607; + fftw_real tmp611; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp593; + fftw_real tmp596; + fftw_real tmp629; + fftw_real tmp630; + ASSERT_ALIGNED_DOUBLE; + tmp593 = tmp201 - tmp224; + tmp596 = tmp594 - tmp595; + tmp597 = tmp593 + tmp596; + tmp609 = tmp593 - tmp596; + tmp629 = tmp271 - tmp248; + tmp630 = tmp623 - tmp618; + tmp631 = tmp629 + tmp630; + tmp633 = tmp630 - tmp629; + } + { + fftw_real tmp598; + fftw_real tmp601; + fftw_real tmp603; + fftw_real tmp606; + ASSERT_ALIGNED_DOUBLE; + tmp598 = tmp296 - tmp319; + tmp601 = tmp599 - tmp600; + tmp602 = tmp598 + tmp601; + tmp610 = tmp601 - tmp598; + tmp603 = tmp343 - tmp366; + tmp606 = tmp604 - tmp605; + tmp607 = tmp603 - tmp606; + tmp611 = tmp603 + tmp606; + } + { + fftw_real tmp608; + fftw_real tmp634; + fftw_real tmp612; + fftw_real tmp632; + ASSERT_ALIGNED_DOUBLE; + tmp608 = K707106781 * (tmp602 + tmp607); + Y[-20 * iostride] = tmp597 - tmp608; + X[4 * iostride] = tmp597 + tmp608; + tmp634 = K707106781 * (tmp607 - tmp602); + X[28 * iostride] = -(tmp633 - tmp634); + Y[-12 * iostride] = tmp634 + tmp633; + tmp612 = K707106781 * (tmp610 - tmp611); + Y[-28 * iostride] = tmp609 - tmp612; + X[12 * iostride] = tmp609 + tmp612; + tmp632 = K707106781 * (tmp610 + tmp611); + X[20 * iostride] = -(tmp631 - tmp632); + Y[-4 * iostride] = tmp632 + tmp631; + } + } + { + fftw_real tmp537; + fftw_real tmp577; + fftw_real tmp548; + fftw_real tmp635; + fftw_real tmp580; + fftw_real tmp643; + fftw_real tmp560; + fftw_real tmp574; + fftw_real tmp638; + fftw_real tmp644; + fftw_real tmp584; + fftw_real tmp590; + fftw_real tmp571; + fftw_real tmp575; + fftw_real tmp587; + fftw_real tmp591; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp542; + fftw_real tmp547; + fftw_real tmp582; + fftw_real tmp583; + ASSERT_ALIGNED_DOUBLE; + tmp537 = tmp533 - tmp536; + tmp577 = tmp533 + tmp536; + tmp542 = tmp540 - tmp541; + tmp547 = tmp543 + tmp546; + tmp548 = K707106781 * (tmp542 - tmp547); + tmp635 = K707106781 * (tmp542 + tmp547); + { + fftw_real tmp578; + fftw_real tmp579; + fftw_real tmp554; + fftw_real tmp559; + ASSERT_ALIGNED_DOUBLE; + tmp578 = tmp541 + tmp540; + tmp579 = tmp543 - tmp546; + tmp580 = K707106781 * (tmp578 + tmp579); + tmp643 = K707106781 * (tmp579 - tmp578); + tmp554 = tmp552 - tmp553; + tmp559 = tmp555 - tmp558; + tmp560 = (K923879532 * tmp554) + (K382683432 * tmp559); + tmp574 = (K382683432 * tmp554) - (K923879532 * tmp559); + } + tmp638 = tmp636 + tmp637; + tmp644 = tmp637 - tmp636; + tmp582 = tmp552 + tmp553; + tmp583 = tmp555 + tmp558; + tmp584 = (K382683432 * tmp582) + (K923879532 * tmp583); + tmp590 = (K923879532 * tmp582) - (K382683432 * tmp583); + { + fftw_real tmp565; + fftw_real tmp570; + fftw_real tmp585; + fftw_real tmp586; + ASSERT_ALIGNED_DOUBLE; + tmp565 = tmp561 - tmp564; + tmp570 = tmp568 - tmp569; + tmp571 = (K382683432 * tmp565) - (K923879532 * tmp570); + tmp575 = (K382683432 * tmp570) + (K923879532 * tmp565); + tmp585 = tmp561 + tmp564; + tmp586 = tmp568 + tmp569; + tmp587 = (K923879532 * tmp585) - (K382683432 * tmp586); + tmp591 = (K923879532 * tmp586) + (K382683432 * tmp585); + } + } + { + fftw_real tmp549; + fftw_real tmp572; + fftw_real tmp573; + fftw_real tmp576; + ASSERT_ALIGNED_DOUBLE; + tmp549 = tmp537 + tmp548; + tmp572 = tmp560 + tmp571; + Y[-22 * iostride] = tmp549 - tmp572; + X[6 * iostride] = tmp549 + tmp572; + tmp573 = tmp537 - tmp548; + tmp576 = tmp574 - tmp575; + Y[-30 * iostride] = tmp573 - tmp576; + X[14 * iostride] = tmp573 + tmp576; + } + { + fftw_real tmp645; + fftw_real tmp646; + fftw_real tmp647; + fftw_real tmp648; + ASSERT_ALIGNED_DOUBLE; + tmp645 = tmp643 + tmp644; + tmp646 = tmp574 + tmp575; + X[22 * iostride] = -(tmp645 - tmp646); + Y[-6 * iostride] = tmp646 + tmp645; + tmp647 = tmp644 - tmp643; + tmp648 = tmp571 - tmp560; + X[30 * iostride] = -(tmp647 - tmp648); + Y[-14 * iostride] = tmp648 + tmp647; + } + { + fftw_real tmp581; + fftw_real tmp588; + fftw_real tmp589; + fftw_real tmp592; + ASSERT_ALIGNED_DOUBLE; + tmp581 = tmp577 + tmp580; + tmp588 = tmp584 + tmp587; + Y[-18 * iostride] = tmp581 - tmp588; + X[2 * iostride] = tmp581 + tmp588; + tmp589 = tmp577 - tmp580; + tmp592 = tmp590 - tmp591; + Y[-26 * iostride] = tmp589 - tmp592; + X[10 * iostride] = tmp589 + tmp592; + } + { + fftw_real tmp639; + fftw_real tmp640; + fftw_real tmp641; + fftw_real tmp642; + ASSERT_ALIGNED_DOUBLE; + tmp639 = tmp635 + tmp638; + tmp640 = tmp590 + tmp591; + X[18 * iostride] = -(tmp639 - tmp640); + Y[-2 * iostride] = tmp640 + tmp639; + tmp641 = tmp638 - tmp635; + tmp642 = tmp587 - tmp584; + X[26 * iostride] = -(tmp641 - tmp642); + Y[-10 * iostride] = tmp642 + tmp641; + } + } + { + fftw_real tmp489; + fftw_real tmp517; + fftw_real tmp520; + fftw_real tmp659; + fftw_real tmp654; + fftw_real tmp660; + fftw_real tmp496; + fftw_real tmp649; + fftw_real tmp504; + fftw_real tmp514; + fftw_real tmp524; + fftw_real tmp530; + fftw_real tmp511; + fftw_real tmp515; + fftw_real tmp527; + fftw_real tmp531; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp488; + fftw_real tmp518; + fftw_real tmp519; + fftw_real tmp650; + fftw_real tmp492; + fftw_real tmp495; + ASSERT_ALIGNED_DOUBLE; + tmp488 = K707106781 * (tmp486 + tmp487); + tmp489 = tmp485 - tmp488; + tmp517 = tmp485 + tmp488; + tmp518 = (K382683432 * tmp490) + (K923879532 * tmp491); + tmp519 = (K923879532 * tmp494) - (K382683432 * tmp493); + tmp520 = tmp518 + tmp519; + tmp659 = tmp519 - tmp518; + tmp650 = K707106781 * (tmp378 + tmp383); + tmp654 = tmp650 + tmp653; + tmp660 = tmp653 - tmp650; + tmp492 = (K923879532 * tmp490) - (K382683432 * tmp491); + tmp495 = (K923879532 * tmp493) + (K382683432 * tmp494); + tmp496 = tmp492 - tmp495; + tmp649 = tmp492 + tmp495; + } + { + fftw_real tmp500; + fftw_real tmp503; + fftw_real tmp522; + fftw_real tmp523; + ASSERT_ALIGNED_DOUBLE; + tmp500 = tmp498 - tmp499; + tmp503 = tmp501 - tmp502; + tmp504 = (K555570233 * tmp500) + (K831469612 * tmp503); + tmp514 = (K555570233 * tmp503) - (K831469612 * tmp500); + tmp522 = tmp498 + tmp499; + tmp523 = tmp501 + tmp502; + tmp524 = (K980785280 * tmp522) + (K195090322 * tmp523); + tmp530 = (K980785280 * tmp523) - (K195090322 * tmp522); + } + { + fftw_real tmp507; + fftw_real tmp510; + fftw_real tmp525; + fftw_real tmp526; + ASSERT_ALIGNED_DOUBLE; + tmp507 = tmp505 - tmp506; + tmp510 = tmp508 - tmp509; + tmp511 = (K555570233 * tmp507) - (K831469612 * tmp510); + tmp515 = (K831469612 * tmp507) + (K555570233 * tmp510); + tmp525 = tmp505 + tmp506; + tmp526 = tmp508 + tmp509; + tmp527 = (K980785280 * tmp525) - (K195090322 * tmp526); + tmp531 = (K195090322 * tmp525) + (K980785280 * tmp526); + } + { + fftw_real tmp497; + fftw_real tmp512; + fftw_real tmp513; + fftw_real tmp516; + ASSERT_ALIGNED_DOUBLE; + tmp497 = tmp489 + tmp496; + tmp512 = tmp504 + tmp511; + Y[-21 * iostride] = tmp497 - tmp512; + X[5 * iostride] = tmp497 + tmp512; + tmp513 = tmp489 - tmp496; + tmp516 = tmp514 - tmp515; + Y[-29 * iostride] = tmp513 - tmp516; + X[13 * iostride] = tmp513 + tmp516; + } + { + fftw_real tmp661; + fftw_real tmp662; + fftw_real tmp663; + fftw_real tmp664; + ASSERT_ALIGNED_DOUBLE; + tmp661 = tmp659 + tmp660; + tmp662 = tmp514 + tmp515; + X[21 * iostride] = -(tmp661 - tmp662); + Y[-5 * iostride] = tmp662 + tmp661; + tmp663 = tmp660 - tmp659; + tmp664 = tmp511 - tmp504; + X[29 * iostride] = -(tmp663 - tmp664); + Y[-13 * iostride] = tmp664 + tmp663; + } + { + fftw_real tmp521; + fftw_real tmp528; + fftw_real tmp529; + fftw_real tmp532; + ASSERT_ALIGNED_DOUBLE; + tmp521 = tmp517 + tmp520; + tmp528 = tmp524 + tmp527; + Y[-17 * iostride] = tmp521 - tmp528; + X[iostride] = tmp521 + tmp528; + tmp529 = tmp517 - tmp520; + tmp532 = tmp530 - tmp531; + Y[-25 * iostride] = tmp529 - tmp532; + X[9 * iostride] = tmp529 + tmp532; + } + { + fftw_real tmp655; + fftw_real tmp656; + fftw_real tmp657; + fftw_real tmp658; + ASSERT_ALIGNED_DOUBLE; + tmp655 = tmp649 + tmp654; + tmp656 = tmp530 + tmp531; + X[17 * iostride] = -(tmp655 - tmp656); + Y[-iostride] = tmp656 + tmp655; + tmp657 = tmp654 - tmp649; + tmp658 = tmp527 - tmp524; + X[25 * iostride] = -(tmp657 - tmp658); + Y[-9 * iostride] = tmp658 + tmp657; + } + } + { + fftw_real tmp385; + fftw_real tmp469; + fftw_real tmp472; + fftw_real tmp673; + fftw_real tmp668; + fftw_real tmp674; + fftw_real tmp408; + fftw_real tmp665; + fftw_real tmp436; + fftw_real tmp466; + fftw_real tmp476; + fftw_real tmp482; + fftw_real tmp463; + fftw_real tmp467; + fftw_real tmp479; + fftw_real tmp483; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp384; + fftw_real tmp470; + fftw_real tmp471; + fftw_real tmp666; + fftw_real tmp396; + fftw_real tmp407; + ASSERT_ALIGNED_DOUBLE; + tmp384 = K707106781 * (tmp378 - tmp383); + tmp385 = tmp373 - tmp384; + tmp469 = tmp373 + tmp384; + tmp470 = (K923879532 * tmp390) + (K382683432 * tmp395); + tmp471 = (K382683432 * tmp406) - (K923879532 * tmp401); + tmp472 = tmp470 + tmp471; + tmp673 = tmp471 - tmp470; + tmp666 = K707106781 * (tmp487 - tmp486); + tmp668 = tmp666 + tmp667; + tmp674 = tmp667 - tmp666; + tmp396 = (K382683432 * tmp390) - (K923879532 * tmp395); + tmp407 = (K382683432 * tmp401) + (K923879532 * tmp406); + tmp408 = tmp396 - tmp407; + tmp665 = tmp396 + tmp407; + } + { + fftw_real tmp426; + fftw_real tmp435; + fftw_real tmp474; + fftw_real tmp475; + ASSERT_ALIGNED_DOUBLE; + tmp426 = tmp414 - tmp425; + tmp435 = tmp431 - tmp434; + tmp436 = (K980785280 * tmp426) + (K195090322 * tmp435); + tmp466 = (K195090322 * tmp426) - (K980785280 * tmp435); + tmp474 = tmp414 + tmp425; + tmp475 = tmp431 + tmp434; + tmp476 = (K555570233 * tmp474) + (K831469612 * tmp475); + tmp482 = (K831469612 * tmp474) - (K555570233 * tmp475); + } + { + fftw_real tmp453; + fftw_real tmp462; + fftw_real tmp477; + fftw_real tmp478; + ASSERT_ALIGNED_DOUBLE; + tmp453 = tmp441 - tmp452; + tmp462 = tmp458 - tmp461; + tmp463 = (K195090322 * tmp453) - (K980785280 * tmp462); + tmp467 = (K195090322 * tmp462) + (K980785280 * tmp453); + tmp477 = tmp441 + tmp452; + tmp478 = tmp458 + tmp461; + tmp479 = (K831469612 * tmp477) - (K555570233 * tmp478); + tmp483 = (K831469612 * tmp478) + (K555570233 * tmp477); + } + { + fftw_real tmp409; + fftw_real tmp464; + fftw_real tmp465; + fftw_real tmp468; + ASSERT_ALIGNED_DOUBLE; + tmp409 = tmp385 + tmp408; + tmp464 = tmp436 + tmp463; + Y[-23 * iostride] = tmp409 - tmp464; + X[7 * iostride] = tmp409 + tmp464; + tmp465 = tmp385 - tmp408; + tmp468 = tmp466 - tmp467; + Y[-31 * iostride] = tmp465 - tmp468; + X[15 * iostride] = tmp465 + tmp468; + } + { + fftw_real tmp675; + fftw_real tmp676; + fftw_real tmp677; + fftw_real tmp678; + ASSERT_ALIGNED_DOUBLE; + tmp675 = tmp673 + tmp674; + tmp676 = tmp466 + tmp467; + X[23 * iostride] = -(tmp675 - tmp676); + Y[-7 * iostride] = tmp676 + tmp675; + tmp677 = tmp674 - tmp673; + tmp678 = tmp463 - tmp436; + X[31 * iostride] = -(tmp677 - tmp678); + Y[-15 * iostride] = tmp678 + tmp677; + } + { + fftw_real tmp473; + fftw_real tmp480; + fftw_real tmp481; + fftw_real tmp484; + ASSERT_ALIGNED_DOUBLE; + tmp473 = tmp469 + tmp472; + tmp480 = tmp476 + tmp479; + Y[-19 * iostride] = tmp473 - tmp480; + X[3 * iostride] = tmp473 + tmp480; + tmp481 = tmp469 - tmp472; + tmp484 = tmp482 - tmp483; + Y[-27 * iostride] = tmp481 - tmp484; + X[11 * iostride] = tmp481 + tmp484; + } + { + fftw_real tmp669; + fftw_real tmp670; + fftw_real tmp671; + fftw_real tmp672; + ASSERT_ALIGNED_DOUBLE; + tmp669 = tmp665 + tmp668; + tmp670 = tmp482 + tmp483; + X[19 * iostride] = -(tmp669 - tmp670); + Y[-3 * iostride] = tmp670 + tmp669; + tmp671 = tmp668 - tmp665; + tmp672 = tmp479 - tmp476; + X[27 * iostride] = -(tmp671 - tmp672); + Y[-11 * iostride] = tmp672 + tmp671; + } + } + } + if (i == m) { + fftw_real tmp5; + fftw_real tmp105; + fftw_real tmp158; + fftw_real tmp171; + fftw_real tmp12; + fftw_real tmp170; + fftw_real tmp108; + fftw_real tmp155; + fftw_real tmp74; + fftw_real tmp97; + fftw_real tmp130; + fftw_real tmp146; + fftw_real tmp82; + fftw_real tmp98; + fftw_real tmp127; + fftw_real tmp145; + fftw_real tmp24; + fftw_real tmp90; + fftw_real tmp115; + fftw_real tmp138; + fftw_real tmp35; + fftw_real tmp91; + fftw_real tmp112; + fftw_real tmp139; + fftw_real tmp51; + fftw_real tmp94; + fftw_real tmp123; + fftw_real tmp143; + fftw_real tmp59; + fftw_real tmp95; + fftw_real tmp120; + fftw_real tmp142; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp157; + fftw_real tmp4; + fftw_real tmp156; + fftw_real tmp2; + fftw_real tmp3; + ASSERT_ALIGNED_DOUBLE; + tmp1 = X[0]; + tmp157 = X[16 * iostride]; + tmp2 = X[8 * iostride]; + tmp3 = X[24 * iostride]; + tmp4 = K707106781 * (tmp2 - tmp3); + tmp156 = K707106781 * (tmp2 + tmp3); + tmp5 = tmp1 + tmp4; + tmp105 = tmp1 - tmp4; + tmp158 = tmp156 + tmp157; + tmp171 = tmp157 - tmp156; + } + { + fftw_real tmp8; + fftw_real tmp106; + fftw_real tmp11; + fftw_real tmp107; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp6; + fftw_real tmp7; + fftw_real tmp9; + fftw_real tmp10; + ASSERT_ALIGNED_DOUBLE; + tmp6 = X[4 * iostride]; + tmp7 = X[20 * iostride]; + tmp8 = (K923879532 * tmp6) - (K382683432 * tmp7); + tmp106 = (K382683432 * tmp6) + (K923879532 * tmp7); + tmp9 = X[12 * iostride]; + tmp10 = X[28 * iostride]; + tmp11 = (K382683432 * tmp9) - (K923879532 * tmp10); + tmp107 = (K923879532 * tmp9) + (K382683432 * tmp10); + } + tmp12 = tmp8 + tmp11; + tmp170 = tmp11 - tmp8; + tmp108 = tmp106 - tmp107; + tmp155 = tmp106 + tmp107; + } + { + fftw_real tmp65; + fftw_real tmp80; + fftw_real tmp63; + fftw_real tmp78; + fftw_real tmp69; + fftw_real tmp75; + fftw_real tmp72; + fftw_real tmp76; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp64; + fftw_real tmp79; + fftw_real tmp61; + fftw_real tmp62; + ASSERT_ALIGNED_DOUBLE; + tmp64 = X[31 * iostride]; + tmp65 = K2_000000000 * tmp64; + tmp79 = X[15 * iostride]; + tmp80 = K2_000000000 * tmp79; + tmp61 = X[7 * iostride]; + tmp62 = X[23 * iostride]; + tmp63 = K1_414213562 * (tmp61 - tmp62); + tmp78 = K1_414213562 * (tmp61 + tmp62); + { + fftw_real tmp67; + fftw_real tmp68; + fftw_real tmp70; + fftw_real tmp71; + ASSERT_ALIGNED_DOUBLE; + tmp67 = X[3 * iostride]; + tmp68 = X[19 * iostride]; + tmp69 = (K1_847759065 * tmp67) - (K765366864 * tmp68); + tmp75 = (K765366864 * tmp67) + (K1_847759065 * tmp68); + tmp70 = X[11 * iostride]; + tmp71 = X[27 * iostride]; + tmp72 = (K765366864 * tmp70) - (K1_847759065 * tmp71); + tmp76 = (K1_847759065 * tmp70) + (K765366864 * tmp71); + } + } + { + fftw_real tmp66; + fftw_real tmp73; + fftw_real tmp128; + fftw_real tmp129; + ASSERT_ALIGNED_DOUBLE; + tmp66 = tmp63 - tmp65; + tmp73 = tmp69 + tmp72; + tmp74 = tmp66 + tmp73; + tmp97 = tmp66 - tmp73; + tmp128 = tmp72 - tmp69; + tmp129 = tmp80 - tmp78; + tmp130 = tmp128 - tmp129; + tmp146 = tmp128 + tmp129; + } + { + fftw_real tmp77; + fftw_real tmp81; + fftw_real tmp125; + fftw_real tmp126; + ASSERT_ALIGNED_DOUBLE; + tmp77 = tmp75 + tmp76; + tmp81 = tmp78 + tmp80; + tmp82 = tmp77 + tmp81; + tmp98 = tmp81 - tmp77; + tmp125 = tmp63 + tmp65; + tmp126 = tmp75 - tmp76; + tmp127 = tmp125 + tmp126; + tmp145 = tmp126 - tmp125; + } + } + { + fftw_real tmp15; + fftw_real tmp22; + fftw_real tmp18; + fftw_real tmp20; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp14; + fftw_real tmp21; + fftw_real tmp16; + fftw_real tmp17; + ASSERT_ALIGNED_DOUBLE; + tmp14 = X[2 * iostride]; + tmp15 = K2_000000000 * tmp14; + tmp21 = X[18 * iostride]; + tmp22 = K2_000000000 * tmp21; + tmp16 = X[10 * iostride]; + tmp17 = X[26 * iostride]; + tmp18 = K1_414213562 * (tmp16 - tmp17); + tmp20 = K1_414213562 * (tmp16 + tmp17); + } + { + fftw_real tmp19; + fftw_real tmp23; + fftw_real tmp113; + fftw_real tmp114; + ASSERT_ALIGNED_DOUBLE; + tmp19 = tmp15 + tmp18; + tmp23 = tmp20 + tmp22; + tmp24 = (K490392640 * tmp19) - (K097545161 * tmp23); + tmp90 = (K097545161 * tmp19) + (K490392640 * tmp23); + tmp113 = tmp22 - tmp20; + tmp114 = tmp15 - tmp18; + tmp115 = (K415734806 * tmp113) - (K277785116 * tmp114); + tmp138 = (K415734806 * tmp114) + (K277785116 * tmp113); + } + } + { + fftw_real tmp29; + fftw_real tmp33; + fftw_real tmp27; + fftw_real tmp31; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp28; + fftw_real tmp32; + fftw_real tmp25; + fftw_real tmp26; + ASSERT_ALIGNED_DOUBLE; + tmp28 = X[30 * iostride]; + tmp29 = K2_000000000 * tmp28; + tmp32 = X[14 * iostride]; + tmp33 = K2_000000000 * tmp32; + tmp25 = X[6 * iostride]; + tmp26 = X[22 * iostride]; + tmp27 = K1_414213562 * (tmp25 - tmp26); + tmp31 = K1_414213562 * (tmp25 + tmp26); + } + { + fftw_real tmp30; + fftw_real tmp34; + fftw_real tmp110; + fftw_real tmp111; + ASSERT_ALIGNED_DOUBLE; + tmp30 = tmp27 - tmp29; + tmp34 = tmp31 + tmp33; + tmp35 = (K490392640 * tmp30) + (K097545161 * tmp34); + tmp91 = (K097545161 * tmp30) - (K490392640 * tmp34); + tmp110 = tmp33 - tmp31; + tmp111 = tmp27 + tmp29; + tmp112 = (K415734806 * tmp110) - (K277785116 * tmp111); + tmp139 = (K415734806 * tmp111) + (K277785116 * tmp110); + } + } + { + fftw_real tmp39; + fftw_real tmp57; + fftw_real tmp42; + fftw_real tmp55; + fftw_real tmp46; + fftw_real tmp52; + fftw_real tmp49; + fftw_real tmp53; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp38; + fftw_real tmp56; + fftw_real tmp40; + fftw_real tmp41; + ASSERT_ALIGNED_DOUBLE; + tmp38 = X[iostride]; + tmp39 = K2_000000000 * tmp38; + tmp56 = X[17 * iostride]; + tmp57 = K2_000000000 * tmp56; + tmp40 = X[9 * iostride]; + tmp41 = X[25 * iostride]; + tmp42 = K1_414213562 * (tmp40 - tmp41); + tmp55 = K1_414213562 * (tmp40 + tmp41); + { + fftw_real tmp44; + fftw_real tmp45; + fftw_real tmp47; + fftw_real tmp48; + ASSERT_ALIGNED_DOUBLE; + tmp44 = X[5 * iostride]; + tmp45 = X[21 * iostride]; + tmp46 = (K1_847759065 * tmp44) - (K765366864 * tmp45); + tmp52 = (K765366864 * tmp44) + (K1_847759065 * tmp45); + tmp47 = X[13 * iostride]; + tmp48 = X[29 * iostride]; + tmp49 = (K765366864 * tmp47) - (K1_847759065 * tmp48); + tmp53 = (K1_847759065 * tmp47) + (K765366864 * tmp48); + } + } + { + fftw_real tmp43; + fftw_real tmp50; + fftw_real tmp121; + fftw_real tmp122; + ASSERT_ALIGNED_DOUBLE; + tmp43 = tmp39 + tmp42; + tmp50 = tmp46 + tmp49; + tmp51 = tmp43 + tmp50; + tmp94 = tmp43 - tmp50; + tmp121 = tmp49 - tmp46; + tmp122 = tmp57 - tmp55; + tmp123 = tmp121 - tmp122; + tmp143 = tmp121 + tmp122; + } + { + fftw_real tmp54; + fftw_real tmp58; + fftw_real tmp118; + fftw_real tmp119; + ASSERT_ALIGNED_DOUBLE; + tmp54 = tmp52 + tmp53; + tmp58 = tmp55 + tmp57; + tmp59 = tmp54 + tmp58; + tmp95 = tmp58 - tmp54; + tmp118 = tmp39 - tmp42; + tmp119 = tmp52 - tmp53; + tmp120 = tmp118 - tmp119; + tmp142 = tmp118 + tmp119; + } + } + { + fftw_real tmp37; + fftw_real tmp85; + fftw_real tmp160; + fftw_real tmp162; + fftw_real tmp84; + fftw_real tmp153; + fftw_real tmp88; + fftw_real tmp161; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp13; + fftw_real tmp36; + fftw_real tmp154; + fftw_real tmp159; + ASSERT_ALIGNED_DOUBLE; + tmp13 = tmp5 + tmp12; + tmp36 = tmp24 + tmp35; + tmp37 = tmp13 - tmp36; + tmp85 = tmp13 + tmp36; + tmp154 = tmp91 - tmp90; + tmp159 = tmp155 + tmp158; + tmp160 = tmp154 - tmp159; + tmp162 = tmp154 + tmp159; + } + { + fftw_real tmp60; + fftw_real tmp83; + fftw_real tmp86; + fftw_real tmp87; + ASSERT_ALIGNED_DOUBLE; + tmp60 = (K049008570 * tmp51) + (K497592363 * tmp59); + tmp83 = (K049008570 * tmp74) - (K497592363 * tmp82); + tmp84 = tmp60 + tmp83; + tmp153 = tmp83 - tmp60; + tmp86 = (K497592363 * tmp51) - (K049008570 * tmp59); + tmp87 = (K497592363 * tmp74) + (K049008570 * tmp82); + tmp88 = tmp86 + tmp87; + tmp161 = tmp87 - tmp86; + } + X[8 * iostride] = tmp37 - tmp84; + X[7 * iostride] = tmp37 + tmp84; + X[15 * iostride] = tmp85 - tmp88; + X[0] = tmp85 + tmp88; + Y[-15 * iostride] = tmp153 - tmp160; + Y[0] = tmp153 + tmp160; + Y[-8 * iostride] = tmp161 - tmp162; + Y[-7 * iostride] = tmp161 + tmp162; + } + { + fftw_real tmp93; + fftw_real tmp101; + fftw_real tmp166; + fftw_real tmp168; + fftw_real tmp100; + fftw_real tmp163; + fftw_real tmp104; + fftw_real tmp167; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp89; + fftw_real tmp92; + fftw_real tmp164; + fftw_real tmp165; + ASSERT_ALIGNED_DOUBLE; + tmp89 = tmp5 - tmp12; + tmp92 = tmp90 + tmp91; + tmp93 = tmp89 + tmp92; + tmp101 = tmp89 - tmp92; + tmp164 = tmp35 - tmp24; + tmp165 = tmp158 - tmp155; + tmp166 = tmp164 - tmp165; + tmp168 = tmp164 + tmp165; + } + { + fftw_real tmp96; + fftw_real tmp99; + fftw_real tmp102; + fftw_real tmp103; + ASSERT_ALIGNED_DOUBLE; + tmp96 = (K386505226 * tmp94) + (K317196642 * tmp95); + tmp99 = (K386505226 * tmp97) - (K317196642 * tmp98); + tmp100 = tmp96 + tmp99; + tmp163 = tmp99 - tmp96; + tmp102 = (K317196642 * tmp97) + (K386505226 * tmp98); + tmp103 = (K386505226 * tmp95) - (K317196642 * tmp94); + tmp104 = tmp102 - tmp103; + tmp167 = tmp103 + tmp102; + } + X[12 * iostride] = tmp93 - tmp100; + X[3 * iostride] = tmp93 + tmp100; + X[11 * iostride] = tmp101 - tmp104; + X[4 * iostride] = tmp101 + tmp104; + Y[-11 * iostride] = tmp163 - tmp166; + Y[-4 * iostride] = tmp163 + tmp166; + Y[-12 * iostride] = tmp167 - tmp168; + Y[-3 * iostride] = tmp167 + tmp168; + } + { + fftw_real tmp117; + fftw_real tmp133; + fftw_real tmp174; + fftw_real tmp176; + fftw_real tmp132; + fftw_real tmp175; + fftw_real tmp136; + fftw_real tmp169; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp109; + fftw_real tmp116; + fftw_real tmp172; + fftw_real tmp173; + ASSERT_ALIGNED_DOUBLE; + tmp109 = tmp105 - tmp108; + tmp116 = tmp112 - tmp115; + tmp117 = tmp109 + tmp116; + tmp133 = tmp109 - tmp116; + tmp172 = tmp170 - tmp171; + tmp173 = tmp138 + tmp139; + tmp174 = tmp172 - tmp173; + tmp176 = tmp173 + tmp172; + } + { + fftw_real tmp124; + fftw_real tmp131; + fftw_real tmp134; + fftw_real tmp135; + ASSERT_ALIGNED_DOUBLE; + tmp124 = (K440960632 * tmp120) + (K235698368 * tmp123); + tmp131 = (K440960632 * tmp127) + (K235698368 * tmp130); + tmp132 = tmp124 - tmp131; + tmp175 = tmp124 + tmp131; + tmp134 = (K440960632 * tmp130) - (K235698368 * tmp127); + tmp135 = (K440960632 * tmp123) - (K235698368 * tmp120); + tmp136 = tmp134 - tmp135; + tmp169 = tmp135 + tmp134; + } + X[13 * iostride] = tmp117 - tmp132; + X[2 * iostride] = tmp117 + tmp132; + X[10 * iostride] = tmp133 - tmp136; + X[5 * iostride] = tmp133 + tmp136; + Y[-13 * iostride] = tmp169 - tmp174; + Y[-2 * iostride] = tmp169 + tmp174; + Y[-5 * iostride] = -(tmp175 + tmp176); + Y[-10 * iostride] = tmp176 - tmp175; + } + { + fftw_real tmp141; + fftw_real tmp149; + fftw_real tmp180; + fftw_real tmp182; + fftw_real tmp148; + fftw_real tmp177; + fftw_real tmp152; + fftw_real tmp181; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp137; + fftw_real tmp140; + fftw_real tmp178; + fftw_real tmp179; + ASSERT_ALIGNED_DOUBLE; + tmp137 = tmp105 + tmp108; + tmp140 = tmp138 - tmp139; + tmp141 = tmp137 + tmp140; + tmp149 = tmp137 - tmp140; + tmp178 = tmp115 + tmp112; + tmp179 = tmp170 + tmp171; + tmp180 = tmp178 - tmp179; + tmp182 = tmp178 + tmp179; + } + { + fftw_real tmp144; + fftw_real tmp147; + fftw_real tmp150; + fftw_real tmp151; + ASSERT_ALIGNED_DOUBLE; + tmp144 = (K478470167 * tmp142) + (K145142338 * tmp143); + tmp147 = (K478470167 * tmp145) - (K145142338 * tmp146); + tmp148 = tmp144 + tmp147; + tmp177 = tmp147 - tmp144; + tmp150 = (K145142338 * tmp145) + (K478470167 * tmp146); + tmp151 = (K478470167 * tmp143) - (K145142338 * tmp142); + tmp152 = tmp150 - tmp151; + tmp181 = tmp151 + tmp150; + } + X[14 * iostride] = tmp141 - tmp148; + X[iostride] = tmp141 + tmp148; + X[9 * iostride] = tmp149 - tmp152; + X[6 * iostride] = tmp149 + tmp152; + Y[-9 * iostride] = tmp177 - tmp180; + Y[-6 * iostride] = tmp177 + tmp180; + Y[-14 * iostride] = tmp181 - tmp182; + Y[-iostride] = tmp181 + tmp182; + } + } +} + +static const int twiddle_order[] = +{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31}; +fftw_codelet_desc fftw_hc2hc_forward_32_desc = +{ + "fftw_hc2hc_forward_32", + (void (*)()) fftw_hc2hc_forward_32, + 32, + FFTW_FORWARD, + FFTW_HC2HC, + 707, + 31, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/fhf_4.c b/src/sndobj/rfftw/fhf_4.c new file mode 100644 index 0000000..cc1a8ae --- /dev/null +++ b/src/sndobj/rfftw/fhf_4.c @@ -0,0 +1,185 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:43 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-forward 4 */ + +/* + * This function contains 34 FP additions, 14 FP multiplications, + * (or, 28 additions, 8 multiplications, 6 fused multiply/add), + * 15 stack variables, and 32 memory accesses + */ +static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); + +/* + * Generator Id's : + * $Id: fhf_4.c,v 1.1.1.1 2006/05/12 15:14:48 veplaini Exp $ + * $Id: fhf_4.c,v 1.1.1.1 2006/05/12 15:14:48 veplaini Exp $ + * $Id: fhf_4.c,v 1.1.1.1 2006/05/12 15:14:48 veplaini Exp $ + */ + +void fftw_hc2hc_forward_4(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_real *X; + fftw_real *Y; + X = A; + Y = A + (4 * iostride); + { + fftw_real tmp35; + fftw_real tmp36; + fftw_real tmp37; + fftw_real tmp38; + fftw_real tmp39; + fftw_real tmp40; + ASSERT_ALIGNED_DOUBLE; + tmp35 = X[0]; + tmp36 = X[2 * iostride]; + tmp37 = tmp35 + tmp36; + tmp38 = X[iostride]; + tmp39 = X[3 * iostride]; + tmp40 = tmp38 + tmp39; + X[iostride] = tmp35 - tmp36; + Y[-iostride] = -(tmp38 - tmp39); + X[2 * iostride] = tmp37 - tmp40; + X[0] = tmp37 + tmp40; + } + X = X + dist; + Y = Y - dist; + for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 3) { + fftw_real tmp7; + fftw_real tmp30; + fftw_real tmp12; + fftw_real tmp29; + fftw_real tmp18; + fftw_real tmp26; + fftw_real tmp23; + fftw_real tmp27; + ASSERT_ALIGNED_DOUBLE; + tmp7 = X[0]; + tmp30 = Y[-3 * iostride]; + { + fftw_real tmp9; + fftw_real tmp11; + fftw_real tmp8; + fftw_real tmp10; + ASSERT_ALIGNED_DOUBLE; + tmp9 = X[2 * iostride]; + tmp11 = Y[-iostride]; + tmp8 = c_re(W[1]); + tmp10 = c_im(W[1]); + tmp12 = (tmp8 * tmp9) - (tmp10 * tmp11); + tmp29 = (tmp10 * tmp9) + (tmp8 * tmp11); + } + { + fftw_real tmp15; + fftw_real tmp17; + fftw_real tmp14; + fftw_real tmp16; + ASSERT_ALIGNED_DOUBLE; + tmp15 = X[iostride]; + tmp17 = Y[-2 * iostride]; + tmp14 = c_re(W[0]); + tmp16 = c_im(W[0]); + tmp18 = (tmp14 * tmp15) - (tmp16 * tmp17); + tmp26 = (tmp16 * tmp15) + (tmp14 * tmp17); + } + { + fftw_real tmp20; + fftw_real tmp22; + fftw_real tmp19; + fftw_real tmp21; + ASSERT_ALIGNED_DOUBLE; + tmp20 = X[3 * iostride]; + tmp22 = Y[0]; + tmp19 = c_re(W[2]); + tmp21 = c_im(W[2]); + tmp23 = (tmp19 * tmp20) - (tmp21 * tmp22); + tmp27 = (tmp21 * tmp20) + (tmp19 * tmp22); + } + { + fftw_real tmp13; + fftw_real tmp24; + fftw_real tmp33; + fftw_real tmp34; + ASSERT_ALIGNED_DOUBLE; + tmp13 = tmp7 + tmp12; + tmp24 = tmp18 + tmp23; + Y[-2 * iostride] = tmp13 - tmp24; + X[0] = tmp13 + tmp24; + tmp33 = tmp18 - tmp23; + tmp34 = tmp30 - tmp29; + X[3 * iostride] = -(tmp33 + tmp34); + Y[-iostride] = tmp34 - tmp33; + } + { + fftw_real tmp31; + fftw_real tmp32; + fftw_real tmp25; + fftw_real tmp28; + ASSERT_ALIGNED_DOUBLE; + tmp31 = tmp29 + tmp30; + tmp32 = tmp26 + tmp27; + X[2 * iostride] = -(tmp31 - tmp32); + Y[0] = tmp32 + tmp31; + tmp25 = tmp7 - tmp12; + tmp28 = tmp26 - tmp27; + Y[-3 * iostride] = tmp25 - tmp28; + X[iostride] = tmp25 + tmp28; + } + } + if (i == m) { + fftw_real tmp1; + fftw_real tmp6; + fftw_real tmp4; + fftw_real tmp5; + fftw_real tmp2; + fftw_real tmp3; + ASSERT_ALIGNED_DOUBLE; + tmp1 = X[0]; + tmp6 = X[2 * iostride]; + tmp2 = X[iostride]; + tmp3 = X[3 * iostride]; + tmp4 = K707106781 * (tmp2 - tmp3); + tmp5 = K707106781 * (tmp2 + tmp3); + X[iostride] = tmp1 - tmp4; + X[0] = tmp1 + tmp4; + Y[0] = -(tmp5 + tmp6); + Y[-iostride] = tmp6 - tmp5; + } +} + +static const int twiddle_order[] = +{1, 2, 3}; +fftw_codelet_desc fftw_hc2hc_forward_4_desc = +{ + "fftw_hc2hc_forward_4", + (void (*)()) fftw_hc2hc_forward_4, + 4, + FFTW_FORWARD, + FFTW_HC2HC, + 91, + 3, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/fhf_5.c b/src/sndobj/rfftw/fhf_5.c new file mode 100644 index 0000000..5594c2f --- /dev/null +++ b/src/sndobj/rfftw/fhf_5.c @@ -0,0 +1,268 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:44 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-forward 5 */ + +/* + * This function contains 64 FP additions, 40 FP multiplications, + * (or, 44 additions, 20 multiplications, 20 fused multiply/add), + * 27 stack variables, and 40 memory accesses + */ +static const fftw_real K250000000 = FFTW_KONST(+0.250000000000000000000000000000000000000000000); +static const fftw_real K559016994 = FFTW_KONST(+0.559016994374947424102293417182819058860154590); +static const fftw_real K587785252 = FFTW_KONST(+0.587785252292473129168705954639072768597652438); +static const fftw_real K951056516 = FFTW_KONST(+0.951056516295153572116439333379382143405698634); + +/* + * Generator Id's : + * $Id: fhf_5.c,v 1.1.1.1 2006/05/12 15:15:01 veplaini Exp $ + * $Id: fhf_5.c,v 1.1.1.1 2006/05/12 15:15:01 veplaini Exp $ + * $Id: fhf_5.c,v 1.1.1.1 2006/05/12 15:15:01 veplaini Exp $ + */ + +void fftw_hc2hc_forward_5(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_real *X; + fftw_real *Y; + X = A; + Y = A + (5 * iostride); + { + fftw_real tmp70; + fftw_real tmp67; + fftw_real tmp68; + fftw_real tmp63; + fftw_real tmp71; + fftw_real tmp66; + fftw_real tmp69; + fftw_real tmp72; + ASSERT_ALIGNED_DOUBLE; + tmp70 = X[0]; + { + fftw_real tmp61; + fftw_real tmp62; + fftw_real tmp64; + fftw_real tmp65; + ASSERT_ALIGNED_DOUBLE; + tmp61 = X[4 * iostride]; + tmp62 = X[iostride]; + tmp67 = tmp62 + tmp61; + tmp64 = X[2 * iostride]; + tmp65 = X[3 * iostride]; + tmp68 = tmp64 + tmp65; + tmp63 = tmp61 - tmp62; + tmp71 = tmp67 + tmp68; + tmp66 = tmp64 - tmp65; + } + Y[-iostride] = (K951056516 * tmp63) - (K587785252 * tmp66); + Y[-2 * iostride] = (K587785252 * tmp63) + (K951056516 * tmp66); + X[0] = tmp70 + tmp71; + tmp69 = K559016994 * (tmp67 - tmp68); + tmp72 = tmp70 - (K250000000 * tmp71); + X[iostride] = tmp69 + tmp72; + X[2 * iostride] = tmp72 - tmp69; + } + X = X + dist; + Y = Y - dist; + for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 4) { + fftw_real tmp13; + fftw_real tmp52; + fftw_real tmp42; + fftw_real tmp45; + fftw_real tmp49; + fftw_real tmp50; + fftw_real tmp51; + fftw_real tmp54; + fftw_real tmp53; + fftw_real tmp24; + fftw_real tmp35; + fftw_real tmp36; + ASSERT_ALIGNED_DOUBLE; + tmp13 = X[0]; + tmp52 = Y[-4 * iostride]; + { + fftw_real tmp18; + fftw_real tmp40; + fftw_real tmp34; + fftw_real tmp44; + fftw_real tmp23; + fftw_real tmp41; + fftw_real tmp29; + fftw_real tmp43; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp15; + fftw_real tmp17; + fftw_real tmp14; + fftw_real tmp16; + ASSERT_ALIGNED_DOUBLE; + tmp15 = X[iostride]; + tmp17 = Y[-3 * iostride]; + tmp14 = c_re(W[0]); + tmp16 = c_im(W[0]); + tmp18 = (tmp14 * tmp15) - (tmp16 * tmp17); + tmp40 = (tmp16 * tmp15) + (tmp14 * tmp17); + } + { + fftw_real tmp31; + fftw_real tmp33; + fftw_real tmp30; + fftw_real tmp32; + ASSERT_ALIGNED_DOUBLE; + tmp31 = X[3 * iostride]; + tmp33 = Y[-iostride]; + tmp30 = c_re(W[2]); + tmp32 = c_im(W[2]); + tmp34 = (tmp30 * tmp31) - (tmp32 * tmp33); + tmp44 = (tmp32 * tmp31) + (tmp30 * tmp33); + } + { + fftw_real tmp20; + fftw_real tmp22; + fftw_real tmp19; + fftw_real tmp21; + ASSERT_ALIGNED_DOUBLE; + tmp20 = X[4 * iostride]; + tmp22 = Y[0]; + tmp19 = c_re(W[3]); + tmp21 = c_im(W[3]); + tmp23 = (tmp19 * tmp20) - (tmp21 * tmp22); + tmp41 = (tmp21 * tmp20) + (tmp19 * tmp22); + } + { + fftw_real tmp26; + fftw_real tmp28; + fftw_real tmp25; + fftw_real tmp27; + ASSERT_ALIGNED_DOUBLE; + tmp26 = X[2 * iostride]; + tmp28 = Y[-2 * iostride]; + tmp25 = c_re(W[1]); + tmp27 = c_im(W[1]); + tmp29 = (tmp25 * tmp26) - (tmp27 * tmp28); + tmp43 = (tmp27 * tmp26) + (tmp25 * tmp28); + } + tmp42 = tmp40 - tmp41; + tmp45 = tmp43 - tmp44; + tmp49 = tmp40 + tmp41; + tmp50 = tmp43 + tmp44; + tmp51 = tmp49 + tmp50; + tmp54 = tmp29 - tmp34; + tmp53 = tmp18 - tmp23; + tmp24 = tmp18 + tmp23; + tmp35 = tmp29 + tmp34; + tmp36 = tmp24 + tmp35; + } + X[0] = tmp13 + tmp36; + { + fftw_real tmp46; + fftw_real tmp48; + fftw_real tmp39; + fftw_real tmp47; + fftw_real tmp37; + fftw_real tmp38; + ASSERT_ALIGNED_DOUBLE; + tmp46 = (K951056516 * tmp42) + (K587785252 * tmp45); + tmp48 = (K951056516 * tmp45) - (K587785252 * tmp42); + tmp37 = K559016994 * (tmp24 - tmp35); + tmp38 = tmp13 - (K250000000 * tmp36); + tmp39 = tmp37 + tmp38; + tmp47 = tmp38 - tmp37; + Y[-4 * iostride] = tmp39 - tmp46; + X[iostride] = tmp39 + tmp46; + X[2 * iostride] = tmp47 - tmp48; + Y[-3 * iostride] = tmp47 + tmp48; + } + Y[0] = tmp51 + tmp52; + { + fftw_real tmp55; + fftw_real tmp60; + fftw_real tmp58; + fftw_real tmp59; + fftw_real tmp56; + fftw_real tmp57; + ASSERT_ALIGNED_DOUBLE; + tmp55 = (K951056516 * tmp53) + (K587785252 * tmp54); + tmp60 = (K951056516 * tmp54) - (K587785252 * tmp53); + tmp56 = K559016994 * (tmp49 - tmp50); + tmp57 = tmp52 - (K250000000 * tmp51); + tmp58 = tmp56 + tmp57; + tmp59 = tmp57 - tmp56; + X[4 * iostride] = -(tmp55 + tmp58); + Y[-iostride] = tmp58 - tmp55; + X[3 * iostride] = -(tmp59 - tmp60); + Y[-2 * iostride] = tmp60 + tmp59; + } + } + if (i == m) { + fftw_real tmp8; + fftw_real tmp3; + fftw_real tmp6; + fftw_real tmp9; + fftw_real tmp12; + fftw_real tmp11; + fftw_real tmp7; + fftw_real tmp10; + ASSERT_ALIGNED_DOUBLE; + tmp8 = X[0]; + { + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp4; + fftw_real tmp5; + ASSERT_ALIGNED_DOUBLE; + tmp1 = X[2 * iostride]; + tmp2 = X[3 * iostride]; + tmp3 = tmp1 - tmp2; + tmp4 = X[4 * iostride]; + tmp5 = X[iostride]; + tmp6 = tmp4 - tmp5; + tmp9 = tmp3 + tmp6; + tmp12 = tmp4 + tmp5; + tmp11 = tmp1 + tmp2; + } + X[2 * iostride] = tmp8 + tmp9; + tmp7 = K559016994 * (tmp3 - tmp6); + tmp10 = tmp8 - (K250000000 * tmp9); + X[0] = tmp7 + tmp10; + X[iostride] = tmp10 - tmp7; + Y[0] = -((K951056516 * tmp11) + (K587785252 * tmp12)); + Y[-iostride] = -((K951056516 * tmp12) - (K587785252 * tmp11)); + } +} + +static const int twiddle_order[] = +{1, 2, 3, 4}; +fftw_codelet_desc fftw_hc2hc_forward_5_desc = +{ + "fftw_hc2hc_forward_5", + (void (*)()) fftw_hc2hc_forward_5, + 5, + FFTW_FORWARD, + FFTW_HC2HC, + 113, + 4, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/fhf_6.c b/src/sndobj/rfftw/fhf_6.c new file mode 100644 index 0000000..62c31f1 --- /dev/null +++ b/src/sndobj/rfftw/fhf_6.c @@ -0,0 +1,299 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:45 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-forward 6 */ + +/* + * This function contains 72 FP additions, 36 FP multiplications, + * (or, 54 additions, 18 multiplications, 18 fused multiply/add), + * 23 stack variables, and 48 memory accesses + */ +static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); +static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); + +/* + * Generator Id's : + * $Id: fhf_6.c,v 1.1.1.1 2006/05/12 15:14:55 veplaini Exp $ + * $Id: fhf_6.c,v 1.1.1.1 2006/05/12 15:14:55 veplaini Exp $ + * $Id: fhf_6.c,v 1.1.1.1 2006/05/12 15:14:55 veplaini Exp $ + */ + +void fftw_hc2hc_forward_6(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_real *X; + fftw_real *Y; + X = A; + Y = A + (6 * iostride); + { + fftw_real tmp71; + fftw_real tmp81; + fftw_real tmp77; + fftw_real tmp79; + fftw_real tmp74; + fftw_real tmp80; + fftw_real tmp69; + fftw_real tmp70; + fftw_real tmp78; + fftw_real tmp82; + ASSERT_ALIGNED_DOUBLE; + tmp69 = X[0]; + tmp70 = X[3 * iostride]; + tmp71 = tmp69 - tmp70; + tmp81 = tmp69 + tmp70; + { + fftw_real tmp75; + fftw_real tmp76; + fftw_real tmp72; + fftw_real tmp73; + ASSERT_ALIGNED_DOUBLE; + tmp75 = X[4 * iostride]; + tmp76 = X[iostride]; + tmp77 = tmp75 - tmp76; + tmp79 = tmp75 + tmp76; + tmp72 = X[2 * iostride]; + tmp73 = X[5 * iostride]; + tmp74 = tmp72 - tmp73; + tmp80 = tmp72 + tmp73; + } + Y[-iostride] = K866025403 * (tmp77 - tmp74); + tmp78 = tmp74 + tmp77; + X[iostride] = tmp71 - (K500000000 * tmp78); + X[3 * iostride] = tmp71 + tmp78; + Y[-2 * iostride] = -(K866025403 * (tmp79 - tmp80)); + tmp82 = tmp80 + tmp79; + X[2 * iostride] = tmp81 - (K500000000 * tmp82); + X[0] = tmp81 + tmp82; + } + X = X + dist; + Y = Y - dist; + for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 5) { + fftw_real tmp19; + fftw_real tmp43; + fftw_real tmp62; + fftw_real tmp66; + fftw_real tmp41; + fftw_real tmp45; + fftw_real tmp53; + fftw_real tmp57; + fftw_real tmp30; + fftw_real tmp44; + fftw_real tmp50; + fftw_real tmp56; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp13; + fftw_real tmp61; + fftw_real tmp18; + fftw_real tmp60; + ASSERT_ALIGNED_DOUBLE; + tmp13 = X[0]; + tmp61 = Y[-5 * iostride]; + { + fftw_real tmp15; + fftw_real tmp17; + fftw_real tmp14; + fftw_real tmp16; + ASSERT_ALIGNED_DOUBLE; + tmp15 = X[3 * iostride]; + tmp17 = Y[-2 * iostride]; + tmp14 = c_re(W[2]); + tmp16 = c_im(W[2]); + tmp18 = (tmp14 * tmp15) - (tmp16 * tmp17); + tmp60 = (tmp16 * tmp15) + (tmp14 * tmp17); + } + tmp19 = tmp13 - tmp18; + tmp43 = tmp13 + tmp18; + tmp62 = tmp60 + tmp61; + tmp66 = tmp61 - tmp60; + } + { + fftw_real tmp35; + fftw_real tmp51; + fftw_real tmp40; + fftw_real tmp52; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp32; + fftw_real tmp34; + fftw_real tmp31; + fftw_real tmp33; + ASSERT_ALIGNED_DOUBLE; + tmp32 = X[4 * iostride]; + tmp34 = Y[-iostride]; + tmp31 = c_re(W[3]); + tmp33 = c_im(W[3]); + tmp35 = (tmp31 * tmp32) - (tmp33 * tmp34); + tmp51 = (tmp33 * tmp32) + (tmp31 * tmp34); + } + { + fftw_real tmp37; + fftw_real tmp39; + fftw_real tmp36; + fftw_real tmp38; + ASSERT_ALIGNED_DOUBLE; + tmp37 = X[iostride]; + tmp39 = Y[-4 * iostride]; + tmp36 = c_re(W[0]); + tmp38 = c_im(W[0]); + tmp40 = (tmp36 * tmp37) - (tmp38 * tmp39); + tmp52 = (tmp38 * tmp37) + (tmp36 * tmp39); + } + tmp41 = tmp35 - tmp40; + tmp45 = tmp35 + tmp40; + tmp53 = tmp51 + tmp52; + tmp57 = tmp51 - tmp52; + } + { + fftw_real tmp24; + fftw_real tmp48; + fftw_real tmp29; + fftw_real tmp49; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp21; + fftw_real tmp23; + fftw_real tmp20; + fftw_real tmp22; + ASSERT_ALIGNED_DOUBLE; + tmp21 = X[2 * iostride]; + tmp23 = Y[-3 * iostride]; + tmp20 = c_re(W[1]); + tmp22 = c_im(W[1]); + tmp24 = (tmp20 * tmp21) - (tmp22 * tmp23); + tmp48 = (tmp22 * tmp21) + (tmp20 * tmp23); + } + { + fftw_real tmp26; + fftw_real tmp28; + fftw_real tmp25; + fftw_real tmp27; + ASSERT_ALIGNED_DOUBLE; + tmp26 = X[5 * iostride]; + tmp28 = Y[0]; + tmp25 = c_re(W[4]); + tmp27 = c_im(W[4]); + tmp29 = (tmp25 * tmp26) - (tmp27 * tmp28); + tmp49 = (tmp27 * tmp26) + (tmp25 * tmp28); + } + tmp30 = tmp24 - tmp29; + tmp44 = tmp24 + tmp29; + tmp50 = tmp48 + tmp49; + tmp56 = tmp48 - tmp49; + } + { + fftw_real tmp58; + fftw_real tmp42; + fftw_real tmp55; + fftw_real tmp68; + fftw_real tmp65; + fftw_real tmp67; + ASSERT_ALIGNED_DOUBLE; + tmp58 = K866025403 * (tmp56 - tmp57); + tmp42 = tmp30 + tmp41; + tmp55 = tmp19 - (K500000000 * tmp42); + Y[-3 * iostride] = tmp19 + tmp42; + X[iostride] = tmp55 + tmp58; + Y[-5 * iostride] = tmp55 - tmp58; + tmp68 = K866025403 * (tmp41 - tmp30); + tmp65 = tmp56 + tmp57; + tmp67 = tmp66 - (K500000000 * tmp65); + X[3 * iostride] = -(tmp65 + tmp66); + Y[-iostride] = tmp68 + tmp67; + X[5 * iostride] = -(tmp67 - tmp68); + } + { + fftw_real tmp54; + fftw_real tmp46; + fftw_real tmp47; + fftw_real tmp63; + fftw_real tmp59; + fftw_real tmp64; + ASSERT_ALIGNED_DOUBLE; + tmp54 = K866025403 * (tmp50 - tmp53); + tmp46 = tmp44 + tmp45; + tmp47 = tmp43 - (K500000000 * tmp46); + X[0] = tmp43 + tmp46; + Y[-4 * iostride] = tmp47 + tmp54; + X[2 * iostride] = tmp47 - tmp54; + tmp63 = K866025403 * (tmp45 - tmp44); + tmp59 = tmp50 + tmp53; + tmp64 = tmp62 - (K500000000 * tmp59); + Y[0] = tmp59 + tmp62; + Y[-2 * iostride] = tmp64 - tmp63; + X[4 * iostride] = -(tmp63 + tmp64); + } + } + if (i == m) { + fftw_real tmp1; + fftw_real tmp11; + fftw_real tmp4; + fftw_real tmp9; + fftw_real tmp8; + fftw_real tmp10; + fftw_real tmp5; + fftw_real tmp12; + ASSERT_ALIGNED_DOUBLE; + tmp1 = X[0]; + tmp11 = X[3 * iostride]; + { + fftw_real tmp2; + fftw_real tmp3; + fftw_real tmp6; + fftw_real tmp7; + ASSERT_ALIGNED_DOUBLE; + tmp2 = X[2 * iostride]; + tmp3 = X[4 * iostride]; + tmp4 = tmp2 - tmp3; + tmp9 = K866025403 * (tmp2 + tmp3); + tmp6 = X[iostride]; + tmp7 = X[5 * iostride]; + tmp8 = K866025403 * (tmp6 - tmp7); + tmp10 = tmp6 + tmp7; + } + X[iostride] = tmp1 - tmp4; + tmp5 = tmp1 + (K500000000 * tmp4); + X[2 * iostride] = tmp5 - tmp8; + X[0] = tmp5 + tmp8; + Y[-iostride] = tmp11 - tmp10; + tmp12 = (K500000000 * tmp10) + tmp11; + Y[0] = -(tmp9 + tmp12); + Y[-2 * iostride] = tmp9 - tmp12; + } +} + +static const int twiddle_order[] = +{1, 2, 3, 4, 5}; +fftw_codelet_desc fftw_hc2hc_forward_6_desc = +{ + "fftw_hc2hc_forward_6", + (void (*)()) fftw_hc2hc_forward_6, + 6, + FFTW_FORWARD, + FFTW_HC2HC, + 135, + 5, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/fhf_7.c b/src/sndobj/rfftw/fhf_7.c new file mode 100644 index 0000000..f45d487 --- /dev/null +++ b/src/sndobj/rfftw/fhf_7.c @@ -0,0 +1,325 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:46 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-forward 7 */ + +/* + * This function contains 120 FP additions, 96 FP multiplications, + * (or, 108 additions, 84 multiplications, 12 fused multiply/add), + * 25 stack variables, and 56 memory accesses + */ +static const fftw_real K222520933 = FFTW_KONST(+0.222520933956314404288902564496794759466355569); +static const fftw_real K900968867 = FFTW_KONST(+0.900968867902419126236102319507445051165919162); +static const fftw_real K623489801 = FFTW_KONST(+0.623489801858733530525004884004239810632274731); +static const fftw_real K433883739 = FFTW_KONST(+0.433883739117558120475768332848358754609990728); +static const fftw_real K974927912 = FFTW_KONST(+0.974927912181823607018131682993931217232785801); +static const fftw_real K781831482 = FFTW_KONST(+0.781831482468029808708444526674057750232334519); + +/* + * Generator Id's : + * $Id: fhf_7.c,v 1.1.1.1 2006/05/12 15:14:59 veplaini Exp $ + * $Id: fhf_7.c,v 1.1.1.1 2006/05/12 15:14:59 veplaini Exp $ + * $Id: fhf_7.c,v 1.1.1.1 2006/05/12 15:14:59 veplaini Exp $ + */ + +void fftw_hc2hc_forward_7(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_real *X; + fftw_real *Y; + X = A; + Y = A + (7 * iostride); + { + fftw_real tmp85; + fftw_real tmp84; + fftw_real tmp88; + fftw_real tmp78; + fftw_real tmp86; + fftw_real tmp81; + fftw_real tmp87; + fftw_real tmp82; + fftw_real tmp83; + ASSERT_ALIGNED_DOUBLE; + tmp85 = X[0]; + tmp82 = X[iostride]; + tmp83 = X[6 * iostride]; + tmp84 = tmp82 - tmp83; + tmp88 = tmp82 + tmp83; + { + fftw_real tmp76; + fftw_real tmp77; + fftw_real tmp79; + fftw_real tmp80; + ASSERT_ALIGNED_DOUBLE; + tmp76 = X[2 * iostride]; + tmp77 = X[5 * iostride]; + tmp78 = tmp76 - tmp77; + tmp86 = tmp76 + tmp77; + tmp79 = X[3 * iostride]; + tmp80 = X[4 * iostride]; + tmp81 = tmp79 - tmp80; + tmp87 = tmp79 + tmp80; + } + Y[-3 * iostride] = (K781831482 * tmp78) - (K974927912 * tmp81) - (K433883739 * tmp84); + Y[-iostride] = -((K781831482 * tmp84) + (K974927912 * tmp78) + (K433883739 * tmp81)); + Y[-2 * iostride] = (K433883739 * tmp78) + (K781831482 * tmp81) - (K974927912 * tmp84); + X[2 * iostride] = tmp85 + (K623489801 * tmp87) - (K900968867 * tmp86) - (K222520933 * tmp88); + X[iostride] = tmp85 + (K623489801 * tmp88) - (K900968867 * tmp87) - (K222520933 * tmp86); + X[3 * iostride] = tmp85 + (K623489801 * tmp86) - (K222520933 * tmp87) - (K900968867 * tmp88); + X[0] = tmp85 + tmp88 + tmp86 + tmp87; + } + X = X + dist; + Y = Y - dist; + for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 6) { + fftw_real tmp14; + fftw_real tmp66; + fftw_real tmp25; + fftw_real tmp68; + fftw_real tmp51; + fftw_real tmp63; + fftw_real tmp36; + fftw_real tmp69; + fftw_real tmp57; + fftw_real tmp64; + fftw_real tmp47; + fftw_real tmp70; + fftw_real tmp54; + fftw_real tmp65; + ASSERT_ALIGNED_DOUBLE; + tmp14 = X[0]; + tmp66 = Y[-6 * iostride]; + { + fftw_real tmp19; + fftw_real tmp49; + fftw_real tmp24; + fftw_real tmp50; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp16; + fftw_real tmp18; + fftw_real tmp15; + fftw_real tmp17; + ASSERT_ALIGNED_DOUBLE; + tmp16 = X[iostride]; + tmp18 = Y[-5 * iostride]; + tmp15 = c_re(W[0]); + tmp17 = c_im(W[0]); + tmp19 = (tmp15 * tmp16) - (tmp17 * tmp18); + tmp49 = (tmp17 * tmp16) + (tmp15 * tmp18); + } + { + fftw_real tmp21; + fftw_real tmp23; + fftw_real tmp20; + fftw_real tmp22; + ASSERT_ALIGNED_DOUBLE; + tmp21 = X[6 * iostride]; + tmp23 = Y[0]; + tmp20 = c_re(W[5]); + tmp22 = c_im(W[5]); + tmp24 = (tmp20 * tmp21) - (tmp22 * tmp23); + tmp50 = (tmp22 * tmp21) + (tmp20 * tmp23); + } + tmp25 = tmp19 + tmp24; + tmp68 = tmp24 - tmp19; + tmp51 = tmp49 - tmp50; + tmp63 = tmp49 + tmp50; + } + { + fftw_real tmp30; + fftw_real tmp55; + fftw_real tmp35; + fftw_real tmp56; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp27; + fftw_real tmp29; + fftw_real tmp26; + fftw_real tmp28; + ASSERT_ALIGNED_DOUBLE; + tmp27 = X[2 * iostride]; + tmp29 = Y[-4 * iostride]; + tmp26 = c_re(W[1]); + tmp28 = c_im(W[1]); + tmp30 = (tmp26 * tmp27) - (tmp28 * tmp29); + tmp55 = (tmp28 * tmp27) + (tmp26 * tmp29); + } + { + fftw_real tmp32; + fftw_real tmp34; + fftw_real tmp31; + fftw_real tmp33; + ASSERT_ALIGNED_DOUBLE; + tmp32 = X[5 * iostride]; + tmp34 = Y[-iostride]; + tmp31 = c_re(W[4]); + tmp33 = c_im(W[4]); + tmp35 = (tmp31 * tmp32) - (tmp33 * tmp34); + tmp56 = (tmp33 * tmp32) + (tmp31 * tmp34); + } + tmp36 = tmp30 + tmp35; + tmp69 = tmp35 - tmp30; + tmp57 = tmp55 - tmp56; + tmp64 = tmp55 + tmp56; + } + { + fftw_real tmp41; + fftw_real tmp52; + fftw_real tmp46; + fftw_real tmp53; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp38; + fftw_real tmp40; + fftw_real tmp37; + fftw_real tmp39; + ASSERT_ALIGNED_DOUBLE; + tmp38 = X[3 * iostride]; + tmp40 = Y[-3 * iostride]; + tmp37 = c_re(W[2]); + tmp39 = c_im(W[2]); + tmp41 = (tmp37 * tmp38) - (tmp39 * tmp40); + tmp52 = (tmp39 * tmp38) + (tmp37 * tmp40); + } + { + fftw_real tmp43; + fftw_real tmp45; + fftw_real tmp42; + fftw_real tmp44; + ASSERT_ALIGNED_DOUBLE; + tmp43 = X[4 * iostride]; + tmp45 = Y[-2 * iostride]; + tmp42 = c_re(W[3]); + tmp44 = c_im(W[3]); + tmp46 = (tmp42 * tmp43) - (tmp44 * tmp45); + tmp53 = (tmp44 * tmp43) + (tmp42 * tmp45); + } + tmp47 = tmp41 + tmp46; + tmp70 = tmp46 - tmp41; + tmp54 = tmp52 - tmp53; + tmp65 = tmp52 + tmp53; + } + { + fftw_real tmp60; + fftw_real tmp59; + fftw_real tmp73; + fftw_real tmp72; + ASSERT_ALIGNED_DOUBLE; + X[0] = tmp14 + tmp25 + tmp36 + tmp47; + tmp60 = (K781831482 * tmp51) + (K974927912 * tmp57) + (K433883739 * tmp54); + tmp59 = tmp14 + (K623489801 * tmp25) - (K900968867 * tmp47) - (K222520933 * tmp36); + Y[-6 * iostride] = tmp59 - tmp60; + X[iostride] = tmp59 + tmp60; + { + fftw_real tmp62; + fftw_real tmp61; + fftw_real tmp58; + fftw_real tmp48; + ASSERT_ALIGNED_DOUBLE; + tmp62 = (K433883739 * tmp51) + (K974927912 * tmp54) - (K781831482 * tmp57); + tmp61 = tmp14 + (K623489801 * tmp36) - (K222520933 * tmp47) - (K900968867 * tmp25); + Y[-4 * iostride] = tmp61 - tmp62; + X[3 * iostride] = tmp61 + tmp62; + tmp58 = (K974927912 * tmp51) - (K781831482 * tmp54) - (K433883739 * tmp57); + tmp48 = tmp14 + (K623489801 * tmp47) - (K900968867 * tmp36) - (K222520933 * tmp25); + Y[-5 * iostride] = tmp48 - tmp58; + X[2 * iostride] = tmp48 + tmp58; + } + Y[0] = tmp63 + tmp64 + tmp65 + tmp66; + tmp73 = (K974927912 * tmp68) - (K781831482 * tmp70) - (K433883739 * tmp69); + tmp72 = (K623489801 * tmp65) + tmp66 - (K900968867 * tmp64) - (K222520933 * tmp63); + X[5 * iostride] = -(tmp72 - tmp73); + Y[-2 * iostride] = tmp73 + tmp72; + { + fftw_real tmp75; + fftw_real tmp74; + fftw_real tmp71; + fftw_real tmp67; + ASSERT_ALIGNED_DOUBLE; + tmp75 = (K433883739 * tmp68) + (K974927912 * tmp70) - (K781831482 * tmp69); + tmp74 = (K623489801 * tmp64) + tmp66 - (K222520933 * tmp65) - (K900968867 * tmp63); + X[4 * iostride] = -(tmp74 - tmp75); + Y[-3 * iostride] = tmp75 + tmp74; + tmp71 = (K781831482 * tmp68) + (K974927912 * tmp69) + (K433883739 * tmp70); + tmp67 = (K623489801 * tmp63) + tmp66 - (K900968867 * tmp65) - (K222520933 * tmp64); + X[6 * iostride] = -(tmp67 - tmp71); + Y[-iostride] = tmp71 + tmp67; + } + } + } + if (i == m) { + fftw_real tmp1; + fftw_real tmp10; + fftw_real tmp13; + fftw_real tmp4; + fftw_real tmp11; + fftw_real tmp7; + fftw_real tmp12; + fftw_real tmp8; + fftw_real tmp9; + ASSERT_ALIGNED_DOUBLE; + tmp1 = X[0]; + tmp8 = X[iostride]; + tmp9 = X[6 * iostride]; + tmp10 = tmp8 - tmp9; + tmp13 = tmp8 + tmp9; + { + fftw_real tmp2; + fftw_real tmp3; + fftw_real tmp5; + fftw_real tmp6; + ASSERT_ALIGNED_DOUBLE; + tmp2 = X[2 * iostride]; + tmp3 = X[5 * iostride]; + tmp4 = tmp2 - tmp3; + tmp11 = tmp2 + tmp3; + tmp5 = X[3 * iostride]; + tmp6 = X[4 * iostride]; + tmp7 = tmp5 - tmp6; + tmp12 = tmp5 + tmp6; + } + Y[0] = -((K781831482 * tmp11) + (K974927912 * tmp12) + (K433883739 * tmp13)); + Y[-iostride] = (K781831482 * tmp12) - (K974927912 * tmp13) - (K433883739 * tmp11); + Y[-2 * iostride] = (K974927912 * tmp11) - (K781831482 * tmp13) - (K433883739 * tmp12); + X[iostride] = tmp1 + (K222520933 * tmp10) - (K623489801 * tmp7) - (K900968867 * tmp4); + X[2 * iostride] = tmp1 + (K900968867 * tmp7) - (K623489801 * tmp10) - (K222520933 * tmp4); + X[3 * iostride] = tmp1 + tmp4 - (tmp7 + tmp10); + X[0] = tmp1 + (K623489801 * tmp4) + (K222520933 * tmp7) + (K900968867 * tmp10); + } +} + +static const int twiddle_order[] = +{1, 2, 3, 4, 5, 6}; +fftw_codelet_desc fftw_hc2hc_forward_7_desc = +{ + "fftw_hc2hc_forward_7", + (void (*)()) fftw_hc2hc_forward_7, + 7, + FFTW_FORWARD, + FFTW_HC2HC, + 157, + 6, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/fhf_8.c b/src/sndobj/rfftw/fhf_8.c new file mode 100644 index 0000000..a9b21a0 --- /dev/null +++ b/src/sndobj/rfftw/fhf_8.c @@ -0,0 +1,415 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:46 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-forward 8 */ + +/* + * This function contains 108 FP additions, 44 FP multiplications, + * (or, 90 additions, 26 multiplications, 18 fused multiply/add), + * 29 stack variables, and 64 memory accesses + */ +static const fftw_real K382683432 = FFTW_KONST(+0.382683432365089771728459984030398866761344562); +static const fftw_real K923879532 = FFTW_KONST(+0.923879532511286756128183189396788286822416626); +static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); + +/* + * Generator Id's : + * $Id: fhf_8.c,v 1.1.1.1 2006/05/12 15:14:50 veplaini Exp $ + * $Id: fhf_8.c,v 1.1.1.1 2006/05/12 15:14:50 veplaini Exp $ + * $Id: fhf_8.c,v 1.1.1.1 2006/05/12 15:14:50 veplaini Exp $ + */ + +void fftw_hc2hc_forward_8(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_real *X; + fftw_real *Y; + X = A; + Y = A + (8 * iostride); + { + fftw_real tmp105; + fftw_real tmp109; + fftw_real tmp115; + fftw_real tmp121; + fftw_real tmp108; + fftw_real tmp118; + fftw_real tmp112; + fftw_real tmp120; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp103; + fftw_real tmp104; + fftw_real tmp113; + fftw_real tmp114; + ASSERT_ALIGNED_DOUBLE; + tmp103 = X[0]; + tmp104 = X[4 * iostride]; + tmp105 = tmp103 + tmp104; + tmp109 = tmp103 - tmp104; + tmp113 = X[7 * iostride]; + tmp114 = X[3 * iostride]; + tmp115 = tmp113 - tmp114; + tmp121 = tmp113 + tmp114; + } + { + fftw_real tmp106; + fftw_real tmp107; + fftw_real tmp110; + fftw_real tmp111; + ASSERT_ALIGNED_DOUBLE; + tmp106 = X[2 * iostride]; + tmp107 = X[6 * iostride]; + tmp108 = tmp106 + tmp107; + tmp118 = tmp106 - tmp107; + tmp110 = X[iostride]; + tmp111 = X[5 * iostride]; + tmp112 = tmp110 - tmp111; + tmp120 = tmp110 + tmp111; + } + { + fftw_real tmp119; + fftw_real tmp122; + fftw_real tmp116; + fftw_real tmp117; + ASSERT_ALIGNED_DOUBLE; + X[2 * iostride] = tmp105 - tmp108; + tmp119 = tmp105 + tmp108; + tmp122 = tmp120 + tmp121; + X[4 * iostride] = tmp119 - tmp122; + X[0] = tmp119 + tmp122; + Y[-2 * iostride] = tmp121 - tmp120; + tmp116 = K707106781 * (tmp112 + tmp115); + X[3 * iostride] = tmp109 - tmp116; + X[iostride] = tmp109 + tmp116; + tmp117 = K707106781 * (tmp115 - tmp112); + Y[-iostride] = tmp117 - tmp118; + Y[-3 * iostride] = tmp118 + tmp117; + } + } + X = X + dist; + Y = Y - dist; + for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 7) { + fftw_real tmp29; + fftw_real tmp65; + fftw_real tmp92; + fftw_real tmp97; + fftw_real tmp63; + fftw_real tmp75; + fftw_real tmp78; + fftw_real tmp87; + fftw_real tmp40; + fftw_real tmp98; + fftw_real tmp68; + fftw_real tmp89; + fftw_real tmp52; + fftw_real tmp70; + fftw_real tmp73; + fftw_real tmp86; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp23; + fftw_real tmp91; + fftw_real tmp28; + fftw_real tmp90; + ASSERT_ALIGNED_DOUBLE; + tmp23 = X[0]; + tmp91 = Y[-7 * iostride]; + { + fftw_real tmp25; + fftw_real tmp27; + fftw_real tmp24; + fftw_real tmp26; + ASSERT_ALIGNED_DOUBLE; + tmp25 = X[4 * iostride]; + tmp27 = Y[-3 * iostride]; + tmp24 = c_re(W[3]); + tmp26 = c_im(W[3]); + tmp28 = (tmp24 * tmp25) - (tmp26 * tmp27); + tmp90 = (tmp26 * tmp25) + (tmp24 * tmp27); + } + tmp29 = tmp23 + tmp28; + tmp65 = tmp23 - tmp28; + tmp92 = tmp90 + tmp91; + tmp97 = tmp91 - tmp90; + } + { + fftw_real tmp57; + fftw_real tmp76; + fftw_real tmp62; + fftw_real tmp77; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp54; + fftw_real tmp56; + fftw_real tmp53; + fftw_real tmp55; + ASSERT_ALIGNED_DOUBLE; + tmp54 = X[7 * iostride]; + tmp56 = Y[0]; + tmp53 = c_re(W[6]); + tmp55 = c_im(W[6]); + tmp57 = (tmp53 * tmp54) - (tmp55 * tmp56); + tmp76 = (tmp55 * tmp54) + (tmp53 * tmp56); + } + { + fftw_real tmp59; + fftw_real tmp61; + fftw_real tmp58; + fftw_real tmp60; + ASSERT_ALIGNED_DOUBLE; + tmp59 = X[3 * iostride]; + tmp61 = Y[-4 * iostride]; + tmp58 = c_re(W[2]); + tmp60 = c_im(W[2]); + tmp62 = (tmp58 * tmp59) - (tmp60 * tmp61); + tmp77 = (tmp60 * tmp59) + (tmp58 * tmp61); + } + tmp63 = tmp57 + tmp62; + tmp75 = tmp57 - tmp62; + tmp78 = tmp76 - tmp77; + tmp87 = tmp76 + tmp77; + } + { + fftw_real tmp34; + fftw_real tmp66; + fftw_real tmp39; + fftw_real tmp67; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp31; + fftw_real tmp33; + fftw_real tmp30; + fftw_real tmp32; + ASSERT_ALIGNED_DOUBLE; + tmp31 = X[2 * iostride]; + tmp33 = Y[-5 * iostride]; + tmp30 = c_re(W[1]); + tmp32 = c_im(W[1]); + tmp34 = (tmp30 * tmp31) - (tmp32 * tmp33); + tmp66 = (tmp32 * tmp31) + (tmp30 * tmp33); + } + { + fftw_real tmp36; + fftw_real tmp38; + fftw_real tmp35; + fftw_real tmp37; + ASSERT_ALIGNED_DOUBLE; + tmp36 = X[6 * iostride]; + tmp38 = Y[-iostride]; + tmp35 = c_re(W[5]); + tmp37 = c_im(W[5]); + tmp39 = (tmp35 * tmp36) - (tmp37 * tmp38); + tmp67 = (tmp37 * tmp36) + (tmp35 * tmp38); + } + tmp40 = tmp34 + tmp39; + tmp98 = tmp34 - tmp39; + tmp68 = tmp66 - tmp67; + tmp89 = tmp66 + tmp67; + } + { + fftw_real tmp46; + fftw_real tmp71; + fftw_real tmp51; + fftw_real tmp72; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp43; + fftw_real tmp45; + fftw_real tmp42; + fftw_real tmp44; + ASSERT_ALIGNED_DOUBLE; + tmp43 = X[iostride]; + tmp45 = Y[-6 * iostride]; + tmp42 = c_re(W[0]); + tmp44 = c_im(W[0]); + tmp46 = (tmp42 * tmp43) - (tmp44 * tmp45); + tmp71 = (tmp44 * tmp43) + (tmp42 * tmp45); + } + { + fftw_real tmp48; + fftw_real tmp50; + fftw_real tmp47; + fftw_real tmp49; + ASSERT_ALIGNED_DOUBLE; + tmp48 = X[5 * iostride]; + tmp50 = Y[-2 * iostride]; + tmp47 = c_re(W[4]); + tmp49 = c_im(W[4]); + tmp51 = (tmp47 * tmp48) - (tmp49 * tmp50); + tmp72 = (tmp49 * tmp48) + (tmp47 * tmp50); + } + tmp52 = tmp46 + tmp51; + tmp70 = tmp46 - tmp51; + tmp73 = tmp71 - tmp72; + tmp86 = tmp71 + tmp72; + } + { + fftw_real tmp41; + fftw_real tmp64; + fftw_real tmp85; + fftw_real tmp88; + ASSERT_ALIGNED_DOUBLE; + tmp41 = tmp29 + tmp40; + tmp64 = tmp52 + tmp63; + Y[-4 * iostride] = tmp41 - tmp64; + X[0] = tmp41 + tmp64; + { + fftw_real tmp95; + fftw_real tmp96; + fftw_real tmp93; + fftw_real tmp94; + ASSERT_ALIGNED_DOUBLE; + tmp95 = tmp92 - tmp89; + tmp96 = tmp63 - tmp52; + X[6 * iostride] = -(tmp95 - tmp96); + Y[-2 * iostride] = tmp96 + tmp95; + tmp93 = tmp89 + tmp92; + tmp94 = tmp86 + tmp87; + X[4 * iostride] = -(tmp93 - tmp94); + Y[0] = tmp94 + tmp93; + } + tmp85 = tmp29 - tmp40; + tmp88 = tmp86 - tmp87; + Y[-6 * iostride] = tmp85 - tmp88; + X[2 * iostride] = tmp85 + tmp88; + { + fftw_real tmp81; + fftw_real tmp99; + fftw_real tmp84; + fftw_real tmp100; + fftw_real tmp82; + fftw_real tmp83; + ASSERT_ALIGNED_DOUBLE; + tmp81 = tmp65 - tmp68; + tmp99 = tmp97 - tmp98; + tmp82 = tmp73 - tmp70; + tmp83 = tmp75 + tmp78; + tmp84 = K707106781 * (tmp82 - tmp83); + tmp100 = K707106781 * (tmp82 + tmp83); + Y[-7 * iostride] = tmp81 - tmp84; + X[3 * iostride] = tmp81 + tmp84; + X[5 * iostride] = -(tmp99 - tmp100); + Y[-iostride] = tmp100 + tmp99; + } + { + fftw_real tmp69; + fftw_real tmp101; + fftw_real tmp80; + fftw_real tmp102; + fftw_real tmp74; + fftw_real tmp79; + ASSERT_ALIGNED_DOUBLE; + tmp69 = tmp65 + tmp68; + tmp101 = tmp98 + tmp97; + tmp74 = tmp70 + tmp73; + tmp79 = tmp75 - tmp78; + tmp80 = K707106781 * (tmp74 + tmp79); + tmp102 = K707106781 * (tmp79 - tmp74); + Y[-5 * iostride] = tmp69 - tmp80; + X[iostride] = tmp69 + tmp80; + X[7 * iostride] = -(tmp101 - tmp102); + Y[-3 * iostride] = tmp102 + tmp101; + } + } + } + if (i == m) { + fftw_real tmp1; + fftw_real tmp19; + fftw_real tmp4; + fftw_real tmp18; + fftw_real tmp8; + fftw_real tmp14; + fftw_real tmp11; + fftw_real tmp15; + fftw_real tmp2; + fftw_real tmp3; + ASSERT_ALIGNED_DOUBLE; + tmp1 = X[0]; + tmp19 = X[4 * iostride]; + tmp2 = X[2 * iostride]; + tmp3 = X[6 * iostride]; + tmp4 = K707106781 * (tmp2 - tmp3); + tmp18 = K707106781 * (tmp2 + tmp3); + { + fftw_real tmp6; + fftw_real tmp7; + fftw_real tmp9; + fftw_real tmp10; + ASSERT_ALIGNED_DOUBLE; + tmp6 = X[iostride]; + tmp7 = X[5 * iostride]; + tmp8 = (K923879532 * tmp6) - (K382683432 * tmp7); + tmp14 = (K382683432 * tmp6) + (K923879532 * tmp7); + tmp9 = X[3 * iostride]; + tmp10 = X[7 * iostride]; + tmp11 = (K382683432 * tmp9) - (K923879532 * tmp10); + tmp15 = (K923879532 * tmp9) + (K382683432 * tmp10); + } + { + fftw_real tmp5; + fftw_real tmp12; + fftw_real tmp21; + fftw_real tmp22; + ASSERT_ALIGNED_DOUBLE; + tmp5 = tmp1 + tmp4; + tmp12 = tmp8 + tmp11; + X[3 * iostride] = tmp5 - tmp12; + X[0] = tmp5 + tmp12; + tmp21 = tmp11 - tmp8; + tmp22 = tmp19 - tmp18; + Y[-2 * iostride] = tmp21 - tmp22; + Y[-iostride] = tmp21 + tmp22; + } + { + fftw_real tmp17; + fftw_real tmp20; + fftw_real tmp13; + fftw_real tmp16; + ASSERT_ALIGNED_DOUBLE; + tmp17 = tmp14 + tmp15; + tmp20 = tmp18 + tmp19; + Y[0] = -(tmp17 + tmp20); + Y[-3 * iostride] = tmp20 - tmp17; + tmp13 = tmp1 - tmp4; + tmp16 = tmp14 - tmp15; + X[2 * iostride] = tmp13 - tmp16; + X[iostride] = tmp13 + tmp16; + } + } +} + +static const int twiddle_order[] = +{1, 2, 3, 4, 5, 6, 7}; +fftw_codelet_desc fftw_hc2hc_forward_8_desc = +{ + "fftw_hc2hc_forward_8", + (void (*)()) fftw_hc2hc_forward_8, + 8, + FFTW_FORWARD, + FFTW_HC2HC, + 179, + 7, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/fhf_9.c b/src/sndobj/rfftw/fhf_9.c new file mode 100644 index 0000000..d4d2315 --- /dev/null +++ b/src/sndobj/rfftw/fhf_9.c @@ -0,0 +1,525 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:48 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-forward 9 */ + +/* + * This function contains 188 FP additions, 136 FP multiplications, + * (or, 139 additions, 87 multiplications, 49 fused multiply/add), + * 35 stack variables, and 72 memory accesses + */ +static const fftw_real K250000000 = FFTW_KONST(+0.250000000000000000000000000000000000000000000); +static const fftw_real K433012701 = FFTW_KONST(+0.433012701892219323381861585376468091735701313); +static const fftw_real K1_532088886 = FFTW_KONST(+1.532088886237956070404785301110833347871664914); +static const fftw_real K1_879385241 = FFTW_KONST(+1.879385241571816768108218554649462939872416269); +static const fftw_real K347296355 = FFTW_KONST(+0.347296355333860697703433253538629592000751354); +static const fftw_real K1_285575219 = FFTW_KONST(+1.285575219373078652645286819814526865815119768); +static const fftw_real K684040286 = FFTW_KONST(+0.684040286651337466088199229364519161526166735); +static const fftw_real K1_969615506 = FFTW_KONST(+1.969615506024416118733486049179046027341286503); +static const fftw_real K342020143 = FFTW_KONST(+0.342020143325668733044099614682259580763083368); +static const fftw_real K813797681 = FFTW_KONST(+0.813797681349373692844693217248393223289101568); +static const fftw_real K939692620 = FFTW_KONST(+0.939692620785908384054109277324731469936208134); +static const fftw_real K296198132 = FFTW_KONST(+0.296198132726023843175338011893050938967728390); +static const fftw_real K852868531 = FFTW_KONST(+0.852868531952443209628250963940074071936020296); +static const fftw_real K173648177 = FFTW_KONST(+0.173648177666930348851716626769314796000375677); +static const fftw_real K556670399 = FFTW_KONST(+0.556670399226419366452912952047023132968291906); +static const fftw_real K766044443 = FFTW_KONST(+0.766044443118978035202392650555416673935832457); +static const fftw_real K984807753 = FFTW_KONST(+0.984807753012208059366743024589523013670643252); +static const fftw_real K150383733 = FFTW_KONST(+0.150383733180435296639271897612501926072238258); +static const fftw_real K642787609 = FFTW_KONST(+0.642787609686539326322643409907263432907559884); +static const fftw_real K663413948 = FFTW_KONST(+0.663413948168938396205421319635891297216863310); +static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); +static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); + +/* + * Generator Id's : + * $Id: fhf_9.c,v 1.1.1.1 2006/05/12 15:14:48 veplaini Exp $ + * $Id: fhf_9.c,v 1.1.1.1 2006/05/12 15:14:48 veplaini Exp $ + * $Id: fhf_9.c,v 1.1.1.1 2006/05/12 15:14:48 veplaini Exp $ + */ + +void fftw_hc2hc_forward_9(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_real *X; + fftw_real *Y; + X = A; + Y = A + (9 * iostride); + { + fftw_real tmp136; + fftw_real tmp150; + fftw_real tmp155; + fftw_real tmp154; + fftw_real tmp139; + fftw_real tmp162; + fftw_real tmp145; + fftw_real tmp153; + fftw_real tmp156; + fftw_real tmp137; + fftw_real tmp138; + fftw_real tmp140; + fftw_real tmp151; + ASSERT_ALIGNED_DOUBLE; + tmp136 = X[0]; + { + fftw_real tmp146; + fftw_real tmp147; + fftw_real tmp148; + fftw_real tmp149; + ASSERT_ALIGNED_DOUBLE; + tmp146 = X[2 * iostride]; + tmp147 = X[5 * iostride]; + tmp148 = X[8 * iostride]; + tmp149 = tmp147 + tmp148; + tmp150 = tmp146 + tmp149; + tmp155 = tmp146 - (K500000000 * tmp149); + tmp154 = tmp148 - tmp147; + } + tmp137 = X[3 * iostride]; + tmp138 = X[6 * iostride]; + tmp139 = tmp137 + tmp138; + tmp162 = tmp138 - tmp137; + { + fftw_real tmp141; + fftw_real tmp142; + fftw_real tmp143; + fftw_real tmp144; + ASSERT_ALIGNED_DOUBLE; + tmp141 = X[iostride]; + tmp142 = X[4 * iostride]; + tmp143 = X[7 * iostride]; + tmp144 = tmp142 + tmp143; + tmp145 = tmp141 + tmp144; + tmp153 = tmp141 - (K500000000 * tmp144); + tmp156 = tmp143 - tmp142; + } + Y[-3 * iostride] = K866025403 * (tmp150 - tmp145); + tmp140 = tmp136 + tmp139; + tmp151 = tmp145 + tmp150; + X[3 * iostride] = tmp140 - (K500000000 * tmp151); + X[0] = tmp140 + tmp151; + { + fftw_real tmp164; + fftw_real tmp160; + fftw_real tmp161; + fftw_real tmp163; + fftw_real tmp152; + fftw_real tmp157; + fftw_real tmp158; + fftw_real tmp159; + ASSERT_ALIGNED_DOUBLE; + tmp164 = K866025403 * tmp162; + tmp160 = (K663413948 * tmp156) - (K642787609 * tmp153); + tmp161 = (K150383733 * tmp154) - (K984807753 * tmp155); + tmp163 = tmp160 + tmp161; + tmp152 = tmp136 - (K500000000 * tmp139); + tmp157 = (K766044443 * tmp153) + (K556670399 * tmp156); + tmp158 = (K173648177 * tmp155) + (K852868531 * tmp154); + tmp159 = tmp157 + tmp158; + X[iostride] = tmp152 + tmp159; + X[4 * iostride] = tmp152 + (K866025403 * (tmp160 - tmp161)) - (K500000000 * tmp159); + X[2 * iostride] = tmp152 + (K173648177 * tmp153) - (K296198132 * tmp154) - (K939692620 * tmp155) - (K852868531 * tmp156); + Y[-iostride] = tmp164 + tmp163; + Y[-4 * iostride] = (K866025403 * (tmp162 + (tmp158 - tmp157))) - (K500000000 * tmp163); + Y[-2 * iostride] = (K813797681 * tmp154) - (K342020143 * tmp155) - (K150383733 * tmp156) - (K984807753 * tmp153) - tmp164; + } + } + X = X + dist; + Y = Y - dist; + for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 8) { + fftw_real tmp24; + fftw_real tmp122; + fftw_real tmp75; + fftw_real tmp121; + fftw_real tmp128; + fftw_real tmp127; + fftw_real tmp35; + fftw_real tmp72; + fftw_real tmp70; + fftw_real tmp92; + fftw_real tmp109; + fftw_real tmp118; + fftw_real tmp97; + fftw_real tmp108; + fftw_real tmp53; + fftw_real tmp81; + fftw_real tmp105; + fftw_real tmp117; + fftw_real tmp86; + fftw_real tmp106; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp29; + fftw_real tmp73; + fftw_real tmp34; + fftw_real tmp74; + ASSERT_ALIGNED_DOUBLE; + tmp24 = X[0]; + tmp122 = Y[-8 * iostride]; + { + fftw_real tmp26; + fftw_real tmp28; + fftw_real tmp25; + fftw_real tmp27; + ASSERT_ALIGNED_DOUBLE; + tmp26 = X[3 * iostride]; + tmp28 = Y[-5 * iostride]; + tmp25 = c_re(W[2]); + tmp27 = c_im(W[2]); + tmp29 = (tmp25 * tmp26) - (tmp27 * tmp28); + tmp73 = (tmp27 * tmp26) + (tmp25 * tmp28); + } + { + fftw_real tmp31; + fftw_real tmp33; + fftw_real tmp30; + fftw_real tmp32; + ASSERT_ALIGNED_DOUBLE; + tmp31 = X[6 * iostride]; + tmp33 = Y[-2 * iostride]; + tmp30 = c_re(W[5]); + tmp32 = c_im(W[5]); + tmp34 = (tmp30 * tmp31) - (tmp32 * tmp33); + tmp74 = (tmp32 * tmp31) + (tmp30 * tmp33); + } + tmp75 = K866025403 * (tmp73 - tmp74); + tmp121 = tmp73 + tmp74; + tmp128 = tmp122 - (K500000000 * tmp121); + tmp127 = K866025403 * (tmp34 - tmp29); + tmp35 = tmp29 + tmp34; + tmp72 = tmp24 - (K500000000 * tmp35); + } + { + fftw_real tmp58; + fftw_real tmp94; + fftw_real tmp63; + fftw_real tmp89; + fftw_real tmp68; + fftw_real tmp90; + fftw_real tmp69; + fftw_real tmp95; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp55; + fftw_real tmp57; + fftw_real tmp54; + fftw_real tmp56; + ASSERT_ALIGNED_DOUBLE; + tmp55 = X[2 * iostride]; + tmp57 = Y[-6 * iostride]; + tmp54 = c_re(W[1]); + tmp56 = c_im(W[1]); + tmp58 = (tmp54 * tmp55) - (tmp56 * tmp57); + tmp94 = (tmp56 * tmp55) + (tmp54 * tmp57); + } + { + fftw_real tmp60; + fftw_real tmp62; + fftw_real tmp59; + fftw_real tmp61; + ASSERT_ALIGNED_DOUBLE; + tmp60 = X[5 * iostride]; + tmp62 = Y[-3 * iostride]; + tmp59 = c_re(W[4]); + tmp61 = c_im(W[4]); + tmp63 = (tmp59 * tmp60) - (tmp61 * tmp62); + tmp89 = (tmp61 * tmp60) + (tmp59 * tmp62); + } + { + fftw_real tmp65; + fftw_real tmp67; + fftw_real tmp64; + fftw_real tmp66; + ASSERT_ALIGNED_DOUBLE; + tmp65 = X[8 * iostride]; + tmp67 = Y[0]; + tmp64 = c_re(W[7]); + tmp66 = c_im(W[7]); + tmp68 = (tmp64 * tmp65) - (tmp66 * tmp67); + tmp90 = (tmp66 * tmp65) + (tmp64 * tmp67); + } + tmp69 = tmp63 + tmp68; + tmp95 = tmp89 + tmp90; + { + fftw_real tmp88; + fftw_real tmp91; + fftw_real tmp93; + fftw_real tmp96; + ASSERT_ALIGNED_DOUBLE; + tmp70 = tmp58 + tmp69; + tmp88 = tmp58 - (K500000000 * tmp69); + tmp91 = K866025403 * (tmp89 - tmp90); + tmp92 = tmp88 + tmp91; + tmp109 = tmp88 - tmp91; + tmp118 = tmp94 + tmp95; + tmp93 = K866025403 * (tmp68 - tmp63); + tmp96 = tmp94 - (K500000000 * tmp95); + tmp97 = tmp93 + tmp96; + tmp108 = tmp96 - tmp93; + } + } + { + fftw_real tmp41; + fftw_real tmp83; + fftw_real tmp46; + fftw_real tmp78; + fftw_real tmp51; + fftw_real tmp79; + fftw_real tmp52; + fftw_real tmp84; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp38; + fftw_real tmp40; + fftw_real tmp37; + fftw_real tmp39; + ASSERT_ALIGNED_DOUBLE; + tmp38 = X[iostride]; + tmp40 = Y[-7 * iostride]; + tmp37 = c_re(W[0]); + tmp39 = c_im(W[0]); + tmp41 = (tmp37 * tmp38) - (tmp39 * tmp40); + tmp83 = (tmp39 * tmp38) + (tmp37 * tmp40); + } + { + fftw_real tmp43; + fftw_real tmp45; + fftw_real tmp42; + fftw_real tmp44; + ASSERT_ALIGNED_DOUBLE; + tmp43 = X[4 * iostride]; + tmp45 = Y[-4 * iostride]; + tmp42 = c_re(W[3]); + tmp44 = c_im(W[3]); + tmp46 = (tmp42 * tmp43) - (tmp44 * tmp45); + tmp78 = (tmp44 * tmp43) + (tmp42 * tmp45); + } + { + fftw_real tmp48; + fftw_real tmp50; + fftw_real tmp47; + fftw_real tmp49; + ASSERT_ALIGNED_DOUBLE; + tmp48 = X[7 * iostride]; + tmp50 = Y[-iostride]; + tmp47 = c_re(W[6]); + tmp49 = c_im(W[6]); + tmp51 = (tmp47 * tmp48) - (tmp49 * tmp50); + tmp79 = (tmp49 * tmp48) + (tmp47 * tmp50); + } + tmp52 = tmp46 + tmp51; + tmp84 = tmp78 + tmp79; + { + fftw_real tmp77; + fftw_real tmp80; + fftw_real tmp82; + fftw_real tmp85; + ASSERT_ALIGNED_DOUBLE; + tmp53 = tmp41 + tmp52; + tmp77 = tmp41 - (K500000000 * tmp52); + tmp80 = K866025403 * (tmp78 - tmp79); + tmp81 = tmp77 + tmp80; + tmp105 = tmp77 - tmp80; + tmp117 = tmp83 + tmp84; + tmp82 = K866025403 * (tmp51 - tmp46); + tmp85 = tmp83 - (K500000000 * tmp84); + tmp86 = tmp82 + tmp85; + tmp106 = tmp85 - tmp82; + } + } + { + fftw_real tmp119; + fftw_real tmp36; + fftw_real tmp71; + fftw_real tmp116; + ASSERT_ALIGNED_DOUBLE; + tmp119 = K866025403 * (tmp117 - tmp118); + tmp36 = tmp24 + tmp35; + tmp71 = tmp53 + tmp70; + tmp116 = tmp36 - (K500000000 * tmp71); + X[0] = tmp36 + tmp71; + X[3 * iostride] = tmp116 + tmp119; + Y[-6 * iostride] = tmp116 - tmp119; + } + { + fftw_real tmp125; + fftw_real tmp120; + fftw_real tmp123; + fftw_real tmp124; + ASSERT_ALIGNED_DOUBLE; + tmp125 = K866025403 * (tmp70 - tmp53); + tmp120 = tmp117 + tmp118; + tmp123 = tmp121 + tmp122; + tmp124 = tmp123 - (K500000000 * tmp120); + Y[0] = tmp120 + tmp123; + Y[-3 * iostride] = tmp125 + tmp124; + X[6 * iostride] = -(tmp124 - tmp125); + } + { + fftw_real tmp76; + fftw_real tmp129; + fftw_real tmp99; + fftw_real tmp131; + fftw_real tmp103; + fftw_real tmp126; + fftw_real tmp100; + fftw_real tmp130; + ASSERT_ALIGNED_DOUBLE; + tmp76 = tmp72 + tmp75; + tmp129 = tmp127 + tmp128; + { + fftw_real tmp87; + fftw_real tmp98; + fftw_real tmp101; + fftw_real tmp102; + ASSERT_ALIGNED_DOUBLE; + tmp87 = (K766044443 * tmp81) + (K642787609 * tmp86); + tmp98 = (K173648177 * tmp92) + (K984807753 * tmp97); + tmp99 = tmp87 + tmp98; + tmp131 = K866025403 * (tmp98 - tmp87); + tmp101 = (K766044443 * tmp86) - (K642787609 * tmp81); + tmp102 = (K173648177 * tmp97) - (K984807753 * tmp92); + tmp103 = K866025403 * (tmp101 - tmp102); + tmp126 = tmp101 + tmp102; + } + X[iostride] = tmp76 + tmp99; + tmp100 = tmp76 - (K500000000 * tmp99); + Y[-7 * iostride] = tmp100 - tmp103; + X[4 * iostride] = tmp100 + tmp103; + Y[-iostride] = tmp126 + tmp129; + tmp130 = tmp129 - (K500000000 * tmp126); + X[7 * iostride] = -(tmp130 - tmp131); + Y[-4 * iostride] = tmp131 + tmp130; + } + { + fftw_real tmp104; + fftw_real tmp133; + fftw_real tmp111; + fftw_real tmp132; + fftw_real tmp115; + fftw_real tmp134; + fftw_real tmp112; + fftw_real tmp135; + ASSERT_ALIGNED_DOUBLE; + tmp104 = tmp72 - tmp75; + tmp133 = tmp128 - tmp127; + { + fftw_real tmp107; + fftw_real tmp110; + fftw_real tmp113; + fftw_real tmp114; + ASSERT_ALIGNED_DOUBLE; + tmp107 = (K173648177 * tmp105) + (K984807753 * tmp106); + tmp110 = (K342020143 * tmp108) - (K939692620 * tmp109); + tmp111 = tmp107 + tmp110; + tmp132 = K866025403 * (tmp110 - tmp107); + tmp113 = (K173648177 * tmp106) - (K984807753 * tmp105); + tmp114 = (K342020143 * tmp109) + (K939692620 * tmp108); + tmp115 = K866025403 * (tmp113 + tmp114); + tmp134 = tmp113 - tmp114; + } + X[2 * iostride] = tmp104 + tmp111; + tmp112 = tmp104 - (K500000000 * tmp111); + Y[-8 * iostride] = tmp112 - tmp115; + Y[-5 * iostride] = tmp112 + tmp115; + Y[-2 * iostride] = tmp134 + tmp133; + tmp135 = tmp133 - (K500000000 * tmp134); + X[5 * iostride] = -(tmp132 + tmp135); + X[8 * iostride] = -(tmp135 - tmp132); + } + } + if (i == m) { + fftw_real tmp12; + fftw_real tmp18; + fftw_real tmp4; + fftw_real tmp7; + fftw_real tmp10; + fftw_real tmp9; + fftw_real tmp14; + fftw_real tmp23; + fftw_real tmp16; + fftw_real tmp21; + fftw_real tmp5; + fftw_real tmp8; + fftw_real tmp6; + fftw_real tmp11; + fftw_real tmp22; + fftw_real tmp13; + fftw_real tmp17; + fftw_real tmp20; + fftw_real tmp1; + fftw_real tmp3; + fftw_real tmp2; + fftw_real tmp15; + fftw_real tmp19; + ASSERT_ALIGNED_DOUBLE; + tmp1 = X[0]; + tmp3 = X[3 * iostride]; + tmp2 = X[6 * iostride]; + tmp12 = K866025403 * (tmp3 + tmp2); + tmp18 = tmp1 - (K500000000 * (tmp2 - tmp3)); + tmp4 = tmp1 + tmp2 - tmp3; + tmp7 = X[4 * iostride]; + tmp10 = X[7 * iostride]; + tmp9 = X[iostride]; + tmp14 = (K1_969615506 * tmp7) + (K684040286 * tmp9) + (K1_285575219 * tmp10); + tmp23 = (K1_285575219 * tmp9) - (K1_969615506 * tmp10) - (K684040286 * tmp7); + tmp16 = (K347296355 * tmp7) + (K1_879385241 * tmp9) - (K1_532088886 * tmp10); + tmp21 = (K1_879385241 * tmp7) + (K1_532088886 * tmp9) + (K347296355 * tmp10); + tmp5 = X[2 * iostride]; + tmp8 = X[5 * iostride]; + tmp6 = X[8 * iostride]; + tmp11 = tmp8 - (tmp5 + tmp6); + tmp22 = (K1_285575219 * tmp6) - (K684040286 * tmp8) - (K1_969615506 * tmp5); + tmp13 = (K1_285575219 * tmp5) + (K1_969615506 * tmp8) + (K684040286 * tmp6); + tmp17 = (K1_532088886 * tmp5) - (K1_879385241 * tmp6) - (K347296355 * tmp8); + tmp20 = (K347296355 * tmp5) + (K1_879385241 * tmp8) + (K1_532088886 * tmp6); + Y[-iostride] = K866025403 * (tmp11 + tmp7 - (tmp9 + tmp10)); + X[iostride] = tmp4 + (K500000000 * (tmp11 + tmp9 + tmp10 - tmp7)); + X[4 * iostride] = tmp4 + tmp5 + tmp6 + tmp7 - (tmp8 + tmp9 + tmp10); + X[2 * iostride] = tmp18 + (K433012701 * (tmp22 - tmp23)) + (K250000000 * (tmp21 - tmp20)); + Y[-2 * iostride] = tmp12 - (K433012701 * (tmp20 + tmp21)) - (K250000000 * (tmp22 + tmp23)); + tmp15 = tmp13 + tmp14; + Y[0] = -(tmp12 + (K500000000 * tmp15)); + Y[-3 * iostride] = (K250000000 * tmp15) - (K433012701 * (tmp16 - tmp17)) - tmp12; + tmp19 = tmp17 + tmp16; + X[0] = tmp18 + (K500000000 * tmp19); + X[3 * iostride] = tmp18 + (K433012701 * (tmp13 - tmp14)) - (K250000000 * tmp19); + } +} + +static const int twiddle_order[] = +{1, 2, 3, 4, 5, 6, 7, 8}; +fftw_codelet_desc fftw_hc2hc_forward_9_desc = +{ + "fftw_hc2hc_forward_9", + (void (*)()) fftw_hc2hc_forward_9, + 9, + FFTW_FORWARD, + FFTW_HC2HC, + 201, + 8, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/fn_1.c b/src/sndobj/rfftw/fn_1.c new file mode 100644 index 0000000..64f011d --- /dev/null +++ b/src/sndobj/rfftw/fn_1.c @@ -0,0 +1,62 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:43:47 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddle 1 */ + +/* + * This function contains 0 FP additions, 0 FP multiplications, + * (or, 0 additions, 0 multiplications, 0 fused multiply/add), + * 2 stack variables, and 4 memory accesses + */ + +/* + * Generator Id's : + * $Id: fn_1.c,v 1.1.1.1 2006/05/12 15:15:01 veplaini Exp $ + * $Id: fn_1.c,v 1.1.1.1 2006/05/12 15:15:01 veplaini Exp $ + * $Id: fn_1.c,v 1.1.1.1 2006/05/12 15:15:01 veplaini Exp $ + */ + +void fftw_no_twiddle_1(const fftw_complex *input, fftw_complex *output, int istride, int ostride) +{ + fftw_real tmp1; + fftw_real tmp2; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(input[0]); + c_re(output[0]) = tmp1; + tmp2 = c_im(input[0]); + c_im(output[0]) = tmp2; +} + +fftw_codelet_desc fftw_no_twiddle_1_desc = +{ + "fftw_no_twiddle_1", + (void (*)()) fftw_no_twiddle_1, + 1, + FFTW_FORWARD, + FFTW_NOTW, + 23, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fn_10.c b/src/sndobj/rfftw/fn_10.c new file mode 100644 index 0000000..c162c39 --- /dev/null +++ b/src/sndobj/rfftw/fn_10.c @@ -0,0 +1,281 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:43:48 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddle 10 */ + +/* + * This function contains 84 FP additions, 24 FP multiplications, + * (or, 72 additions, 12 multiplications, 12 fused multiply/add), + * 36 stack variables, and 40 memory accesses + */ +static const fftw_real K250000000 = FFTW_KONST(+0.250000000000000000000000000000000000000000000); +static const fftw_real K559016994 = FFTW_KONST(+0.559016994374947424102293417182819058860154590); +static const fftw_real K587785252 = FFTW_KONST(+0.587785252292473129168705954639072768597652438); +static const fftw_real K951056516 = FFTW_KONST(+0.951056516295153572116439333379382143405698634); + +/* + * Generator Id's : + * $Id: fn_10.c,v 1.1.1.1 2006/05/12 15:14:59 veplaini Exp $ + * $Id: fn_10.c,v 1.1.1.1 2006/05/12 15:14:59 veplaini Exp $ + * $Id: fn_10.c,v 1.1.1.1 2006/05/12 15:14:59 veplaini Exp $ + */ + +void fftw_no_twiddle_10(const fftw_complex *input, fftw_complex *output, int istride, int ostride) +{ + fftw_real tmp3; + fftw_real tmp19; + fftw_real tmp52; + fftw_real tmp76; + fftw_real tmp56; + fftw_real tmp57; + fftw_real tmp10; + fftw_real tmp17; + fftw_real tmp18; + fftw_real tmp74; + fftw_real tmp73; + fftw_real tmp22; + fftw_real tmp25; + fftw_real tmp26; + fftw_real tmp36; + fftw_real tmp43; + fftw_real tmp47; + fftw_real tmp48; + fftw_real tmp53; + fftw_real tmp66; + fftw_real tmp69; + fftw_real tmp77; + fftw_real tmp78; + fftw_real tmp79; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp50; + fftw_real tmp51; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(input[0]); + tmp2 = c_re(input[5 * istride]); + tmp3 = tmp1 - tmp2; + tmp19 = tmp1 + tmp2; + tmp50 = c_im(input[0]); + tmp51 = c_im(input[5 * istride]); + tmp52 = tmp50 - tmp51; + tmp76 = tmp50 + tmp51; + } + { + fftw_real tmp6; + fftw_real tmp20; + fftw_real tmp16; + fftw_real tmp24; + fftw_real tmp9; + fftw_real tmp21; + fftw_real tmp13; + fftw_real tmp23; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp4; + fftw_real tmp5; + fftw_real tmp14; + fftw_real tmp15; + ASSERT_ALIGNED_DOUBLE; + tmp4 = c_re(input[2 * istride]); + tmp5 = c_re(input[7 * istride]); + tmp6 = tmp4 - tmp5; + tmp20 = tmp4 + tmp5; + tmp14 = c_re(input[6 * istride]); + tmp15 = c_re(input[istride]); + tmp16 = tmp14 - tmp15; + tmp24 = tmp14 + tmp15; + } + { + fftw_real tmp7; + fftw_real tmp8; + fftw_real tmp11; + fftw_real tmp12; + ASSERT_ALIGNED_DOUBLE; + tmp7 = c_re(input[8 * istride]); + tmp8 = c_re(input[3 * istride]); + tmp9 = tmp7 - tmp8; + tmp21 = tmp7 + tmp8; + tmp11 = c_re(input[4 * istride]); + tmp12 = c_re(input[9 * istride]); + tmp13 = tmp11 - tmp12; + tmp23 = tmp11 + tmp12; + } + tmp56 = tmp6 - tmp9; + tmp57 = tmp13 - tmp16; + tmp10 = tmp6 + tmp9; + tmp17 = tmp13 + tmp16; + tmp18 = tmp10 + tmp17; + tmp74 = tmp20 - tmp21; + tmp73 = tmp23 - tmp24; + tmp22 = tmp20 + tmp21; + tmp25 = tmp23 + tmp24; + tmp26 = tmp22 + tmp25; + } + { + fftw_real tmp32; + fftw_real tmp67; + fftw_real tmp42; + fftw_real tmp65; + fftw_real tmp35; + fftw_real tmp68; + fftw_real tmp39; + fftw_real tmp64; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp30; + fftw_real tmp31; + fftw_real tmp40; + fftw_real tmp41; + ASSERT_ALIGNED_DOUBLE; + tmp30 = c_im(input[2 * istride]); + tmp31 = c_im(input[7 * istride]); + tmp32 = tmp30 - tmp31; + tmp67 = tmp30 + tmp31; + tmp40 = c_im(input[6 * istride]); + tmp41 = c_im(input[istride]); + tmp42 = tmp40 - tmp41; + tmp65 = tmp40 + tmp41; + } + { + fftw_real tmp33; + fftw_real tmp34; + fftw_real tmp37; + fftw_real tmp38; + ASSERT_ALIGNED_DOUBLE; + tmp33 = c_im(input[8 * istride]); + tmp34 = c_im(input[3 * istride]); + tmp35 = tmp33 - tmp34; + tmp68 = tmp33 + tmp34; + tmp37 = c_im(input[4 * istride]); + tmp38 = c_im(input[9 * istride]); + tmp39 = tmp37 - tmp38; + tmp64 = tmp37 + tmp38; + } + tmp36 = tmp32 - tmp35; + tmp43 = tmp39 - tmp42; + tmp47 = tmp32 + tmp35; + tmp48 = tmp39 + tmp42; + tmp53 = tmp47 + tmp48; + tmp66 = tmp64 - tmp65; + tmp69 = tmp67 - tmp68; + tmp77 = tmp67 + tmp68; + tmp78 = tmp64 + tmp65; + tmp79 = tmp77 + tmp78; + } + c_re(output[5 * ostride]) = tmp3 + tmp18; + { + fftw_real tmp44; + fftw_real tmp46; + fftw_real tmp29; + fftw_real tmp45; + fftw_real tmp27; + fftw_real tmp28; + ASSERT_ALIGNED_DOUBLE; + tmp44 = (K951056516 * tmp36) + (K587785252 * tmp43); + tmp46 = (K951056516 * tmp43) - (K587785252 * tmp36); + tmp27 = K559016994 * (tmp10 - tmp17); + tmp28 = tmp3 - (K250000000 * tmp18); + tmp29 = tmp27 + tmp28; + tmp45 = tmp28 - tmp27; + c_re(output[9 * ostride]) = tmp29 - tmp44; + c_re(output[ostride]) = tmp29 + tmp44; + c_re(output[7 * ostride]) = tmp45 - tmp46; + c_re(output[3 * ostride]) = tmp45 + tmp46; + } + c_re(output[0]) = tmp19 + tmp26; + { + fftw_real tmp70; + fftw_real tmp72; + fftw_real tmp63; + fftw_real tmp71; + fftw_real tmp61; + fftw_real tmp62; + ASSERT_ALIGNED_DOUBLE; + tmp70 = (K951056516 * tmp66) - (K587785252 * tmp69); + tmp72 = (K951056516 * tmp69) + (K587785252 * tmp66); + tmp61 = tmp19 - (K250000000 * tmp26); + tmp62 = K559016994 * (tmp22 - tmp25); + tmp63 = tmp61 - tmp62; + tmp71 = tmp62 + tmp61; + c_re(output[2 * ostride]) = tmp63 - tmp70; + c_re(output[8 * ostride]) = tmp63 + tmp70; + c_re(output[4 * ostride]) = tmp71 - tmp72; + c_re(output[6 * ostride]) = tmp71 + tmp72; + } + c_im(output[5 * ostride]) = tmp52 + tmp53; + { + fftw_real tmp58; + fftw_real tmp60; + fftw_real tmp55; + fftw_real tmp59; + fftw_real tmp49; + fftw_real tmp54; + ASSERT_ALIGNED_DOUBLE; + tmp58 = (K951056516 * tmp56) + (K587785252 * tmp57); + tmp60 = (K951056516 * tmp57) - (K587785252 * tmp56); + tmp49 = K559016994 * (tmp47 - tmp48); + tmp54 = tmp52 - (K250000000 * tmp53); + tmp55 = tmp49 + tmp54; + tmp59 = tmp54 - tmp49; + c_im(output[ostride]) = tmp55 - tmp58; + c_im(output[9 * ostride]) = tmp58 + tmp55; + c_im(output[3 * ostride]) = tmp59 - tmp60; + c_im(output[7 * ostride]) = tmp60 + tmp59; + } + c_im(output[0]) = tmp76 + tmp79; + { + fftw_real tmp75; + fftw_real tmp83; + fftw_real tmp82; + fftw_real tmp84; + fftw_real tmp80; + fftw_real tmp81; + ASSERT_ALIGNED_DOUBLE; + tmp75 = (K951056516 * tmp73) - (K587785252 * tmp74); + tmp83 = (K951056516 * tmp74) + (K587785252 * tmp73); + tmp80 = tmp76 - (K250000000 * tmp79); + tmp81 = K559016994 * (tmp77 - tmp78); + tmp82 = tmp80 - tmp81; + tmp84 = tmp81 + tmp80; + c_im(output[2 * ostride]) = tmp75 + tmp82; + c_im(output[8 * ostride]) = tmp82 - tmp75; + c_im(output[4 * ostride]) = tmp83 + tmp84; + c_im(output[6 * ostride]) = tmp84 - tmp83; + } +} + +fftw_codelet_desc fftw_no_twiddle_10_desc = +{ + "fftw_no_twiddle_10", + (void (*)()) fftw_no_twiddle_10, + 10, + FFTW_FORWARD, + FFTW_NOTW, + 221, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fn_11.c b/src/sndobj/rfftw/fn_11.c new file mode 100644 index 0000000..9cdbf1f --- /dev/null +++ b/src/sndobj/rfftw/fn_11.c @@ -0,0 +1,242 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:43:48 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddle 11 */ + +/* + * This function contains 140 FP additions, 100 FP multiplications, + * (or, 140 additions, 100 multiplications, 0 fused multiply/add), + * 30 stack variables, and 44 memory accesses + */ +static const fftw_real K959492973 = FFTW_KONST(+0.959492973614497389890368057066327699062454848); +static const fftw_real K654860733 = FFTW_KONST(+0.654860733945285064056925072466293553183791199); +static const fftw_real K142314838 = FFTW_KONST(+0.142314838273285140443792668616369668791051361); +static const fftw_real K415415013 = FFTW_KONST(+0.415415013001886425529274149229623203524004910); +static const fftw_real K841253532 = FFTW_KONST(+0.841253532831181168861811648919367717513292498); +static const fftw_real K540640817 = FFTW_KONST(+0.540640817455597582107635954318691695431770608); +static const fftw_real K909631995 = FFTW_KONST(+0.909631995354518371411715383079028460060241051); +static const fftw_real K989821441 = FFTW_KONST(+0.989821441880932732376092037776718787376519372); +static const fftw_real K755749574 = FFTW_KONST(+0.755749574354258283774035843972344420179717445); +static const fftw_real K281732556 = FFTW_KONST(+0.281732556841429697711417915346616899035777899); + +/* + * Generator Id's : + * $Id: fn_11.c,v 1.1.1.1 2006/05/12 15:14:53 veplaini Exp $ + * $Id: fn_11.c,v 1.1.1.1 2006/05/12 15:14:53 veplaini Exp $ + * $Id: fn_11.c,v 1.1.1.1 2006/05/12 15:14:53 veplaini Exp $ + */ + +void fftw_no_twiddle_11(const fftw_complex *input, fftw_complex *output, int istride, int ostride) +{ + fftw_real tmp1; + fftw_real tmp48; + fftw_real tmp4; + fftw_real tmp42; + fftw_real tmp20; + fftw_real tmp53; + fftw_real tmp32; + fftw_real tmp49; + fftw_real tmp7; + fftw_real tmp46; + fftw_real tmp10; + fftw_real tmp43; + fftw_real tmp23; + fftw_real tmp52; + fftw_real tmp13; + fftw_real tmp45; + fftw_real tmp26; + fftw_real tmp50; + fftw_real tmp29; + fftw_real tmp51; + fftw_real tmp16; + fftw_real tmp44; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp2; + fftw_real tmp3; + fftw_real tmp18; + fftw_real tmp19; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(input[0]); + tmp48 = c_im(input[0]); + tmp2 = c_re(input[istride]); + tmp3 = c_re(input[10 * istride]); + tmp4 = tmp2 + tmp3; + tmp42 = tmp3 - tmp2; + tmp18 = c_im(input[istride]); + tmp19 = c_im(input[10 * istride]); + tmp20 = tmp18 - tmp19; + tmp53 = tmp18 + tmp19; + { + fftw_real tmp30; + fftw_real tmp31; + fftw_real tmp5; + fftw_real tmp6; + ASSERT_ALIGNED_DOUBLE; + tmp30 = c_im(input[2 * istride]); + tmp31 = c_im(input[9 * istride]); + tmp32 = tmp30 - tmp31; + tmp49 = tmp30 + tmp31; + tmp5 = c_re(input[2 * istride]); + tmp6 = c_re(input[9 * istride]); + tmp7 = tmp5 + tmp6; + tmp46 = tmp6 - tmp5; + } + } + { + fftw_real tmp8; + fftw_real tmp9; + fftw_real tmp24; + fftw_real tmp25; + ASSERT_ALIGNED_DOUBLE; + tmp8 = c_re(input[3 * istride]); + tmp9 = c_re(input[8 * istride]); + tmp10 = tmp8 + tmp9; + tmp43 = tmp9 - tmp8; + { + fftw_real tmp21; + fftw_real tmp22; + fftw_real tmp11; + fftw_real tmp12; + ASSERT_ALIGNED_DOUBLE; + tmp21 = c_im(input[3 * istride]); + tmp22 = c_im(input[8 * istride]); + tmp23 = tmp21 - tmp22; + tmp52 = tmp21 + tmp22; + tmp11 = c_re(input[4 * istride]); + tmp12 = c_re(input[7 * istride]); + tmp13 = tmp11 + tmp12; + tmp45 = tmp12 - tmp11; + } + tmp24 = c_im(input[4 * istride]); + tmp25 = c_im(input[7 * istride]); + tmp26 = tmp24 - tmp25; + tmp50 = tmp24 + tmp25; + { + fftw_real tmp27; + fftw_real tmp28; + fftw_real tmp14; + fftw_real tmp15; + ASSERT_ALIGNED_DOUBLE; + tmp27 = c_im(input[5 * istride]); + tmp28 = c_im(input[6 * istride]); + tmp29 = tmp27 - tmp28; + tmp51 = tmp27 + tmp28; + tmp14 = c_re(input[5 * istride]); + tmp15 = c_re(input[6 * istride]); + tmp16 = tmp14 + tmp15; + tmp44 = tmp15 - tmp14; + } + } + { + fftw_real tmp35; + fftw_real tmp34; + fftw_real tmp59; + fftw_real tmp60; + ASSERT_ALIGNED_DOUBLE; + c_re(output[0]) = tmp1 + tmp4 + tmp7 + tmp10 + tmp13 + tmp16; + { + fftw_real tmp41; + fftw_real tmp40; + fftw_real tmp37; + fftw_real tmp36; + ASSERT_ALIGNED_DOUBLE; + tmp41 = (K281732556 * tmp20) + (K755749574 * tmp23) + (K989821441 * tmp29) - (K909631995 * tmp26) - (K540640817 * tmp32); + tmp40 = tmp1 + (K841253532 * tmp7) + (K415415013 * tmp13) - (K142314838 * tmp16) - (K654860733 * tmp10) - (K959492973 * tmp4); + c_re(output[6 * ostride]) = tmp40 - tmp41; + c_re(output[5 * ostride]) = tmp40 + tmp41; + tmp37 = (K540640817 * tmp20) + (K909631995 * tmp32) + (K989821441 * tmp23) + (K755749574 * tmp26) + (K281732556 * tmp29); + tmp36 = tmp1 + (K841253532 * tmp4) + (K415415013 * tmp7) - (K959492973 * tmp16) - (K654860733 * tmp13) - (K142314838 * tmp10); + c_re(output[10 * ostride]) = tmp36 - tmp37; + c_re(output[ostride]) = tmp36 + tmp37; + } + tmp35 = (K909631995 * tmp20) + (K755749574 * tmp32) - (K540640817 * tmp29) - (K989821441 * tmp26) - (K281732556 * tmp23); + tmp34 = tmp1 + (K415415013 * tmp4) + (K841253532 * tmp16) - (K142314838 * tmp13) - (K959492973 * tmp10) - (K654860733 * tmp7); + c_re(output[9 * ostride]) = tmp34 - tmp35; + c_re(output[2 * ostride]) = tmp34 + tmp35; + { + fftw_real tmp39; + fftw_real tmp38; + fftw_real tmp33; + fftw_real tmp17; + ASSERT_ALIGNED_DOUBLE; + tmp39 = (K989821441 * tmp20) + (K540640817 * tmp26) + (K755749574 * tmp29) - (K909631995 * tmp23) - (K281732556 * tmp32); + tmp38 = tmp1 + (K415415013 * tmp10) + (K841253532 * tmp13) - (K654860733 * tmp16) - (K959492973 * tmp7) - (K142314838 * tmp4); + c_re(output[8 * ostride]) = tmp38 - tmp39; + c_re(output[3 * ostride]) = tmp38 + tmp39; + tmp33 = (K755749574 * tmp20) + (K540640817 * tmp23) + (K281732556 * tmp26) - (K909631995 * tmp29) - (K989821441 * tmp32); + tmp17 = tmp1 + (K841253532 * tmp10) + (K415415013 * tmp16) - (K959492973 * tmp13) - (K142314838 * tmp7) - (K654860733 * tmp4); + c_re(output[7 * ostride]) = tmp17 - tmp33; + c_re(output[4 * ostride]) = tmp17 + tmp33; + } + c_im(output[0]) = tmp48 + tmp53 + tmp49 + tmp52 + tmp50 + tmp51; + { + fftw_real tmp47; + fftw_real tmp54; + fftw_real tmp57; + fftw_real tmp58; + ASSERT_ALIGNED_DOUBLE; + tmp47 = (K281732556 * tmp42) + (K755749574 * tmp43) + (K989821441 * tmp44) - (K909631995 * tmp45) - (K540640817 * tmp46); + tmp54 = tmp48 + (K841253532 * tmp49) + (K415415013 * tmp50) - (K142314838 * tmp51) - (K654860733 * tmp52) - (K959492973 * tmp53); + c_im(output[5 * ostride]) = tmp47 + tmp54; + c_im(output[6 * ostride]) = tmp54 - tmp47; + tmp57 = (K540640817 * tmp42) + (K909631995 * tmp46) + (K989821441 * tmp43) + (K755749574 * tmp45) + (K281732556 * tmp44); + tmp58 = tmp48 + (K841253532 * tmp53) + (K415415013 * tmp49) - (K959492973 * tmp51) - (K654860733 * tmp50) - (K142314838 * tmp52); + c_im(output[ostride]) = tmp57 + tmp58; + c_im(output[10 * ostride]) = tmp58 - tmp57; + } + tmp59 = (K909631995 * tmp42) + (K755749574 * tmp46) - (K540640817 * tmp44) - (K989821441 * tmp45) - (K281732556 * tmp43); + tmp60 = tmp48 + (K415415013 * tmp53) + (K841253532 * tmp51) - (K142314838 * tmp50) - (K959492973 * tmp52) - (K654860733 * tmp49); + c_im(output[2 * ostride]) = tmp59 + tmp60; + c_im(output[9 * ostride]) = tmp60 - tmp59; + { + fftw_real tmp55; + fftw_real tmp56; + fftw_real tmp61; + fftw_real tmp62; + ASSERT_ALIGNED_DOUBLE; + tmp55 = (K989821441 * tmp42) + (K540640817 * tmp45) + (K755749574 * tmp44) - (K909631995 * tmp43) - (K281732556 * tmp46); + tmp56 = tmp48 + (K415415013 * tmp52) + (K841253532 * tmp50) - (K654860733 * tmp51) - (K959492973 * tmp49) - (K142314838 * tmp53); + c_im(output[3 * ostride]) = tmp55 + tmp56; + c_im(output[8 * ostride]) = tmp56 - tmp55; + tmp61 = (K755749574 * tmp42) + (K540640817 * tmp43) + (K281732556 * tmp45) - (K909631995 * tmp44) - (K989821441 * tmp46); + tmp62 = tmp48 + (K841253532 * tmp52) + (K415415013 * tmp51) - (K959492973 * tmp50) - (K142314838 * tmp49) - (K654860733 * tmp53); + c_im(output[4 * ostride]) = tmp61 + tmp62; + c_im(output[7 * ostride]) = tmp62 - tmp61; + } + } +} + +fftw_codelet_desc fftw_no_twiddle_11_desc = +{ + "fftw_no_twiddle_11", + (void (*)()) fftw_no_twiddle_11, + 11, + FFTW_FORWARD, + FFTW_NOTW, + 243, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fn_12.c b/src/sndobj/rfftw/fn_12.c new file mode 100644 index 0000000..47e89e4 --- /dev/null +++ b/src/sndobj/rfftw/fn_12.c @@ -0,0 +1,322 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:43:48 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddle 12 */ + +/* + * This function contains 96 FP additions, 16 FP multiplications, + * (or, 88 additions, 8 multiplications, 8 fused multiply/add), + * 40 stack variables, and 48 memory accesses + */ +static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); +static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); + +/* + * Generator Id's : + * $Id: fn_12.c,v 1.1.1.1 2006/05/12 15:14:50 veplaini Exp $ + * $Id: fn_12.c,v 1.1.1.1 2006/05/12 15:14:50 veplaini Exp $ + * $Id: fn_12.c,v 1.1.1.1 2006/05/12 15:14:50 veplaini Exp $ + */ + +void fftw_no_twiddle_12(const fftw_complex *input, fftw_complex *output, int istride, int ostride) +{ + fftw_real tmp5; + fftw_real tmp53; + fftw_real tmp36; + fftw_real tmp28; + fftw_real tmp35; + fftw_real tmp54; + fftw_real tmp10; + fftw_real tmp56; + fftw_real tmp39; + fftw_real tmp33; + fftw_real tmp38; + fftw_real tmp57; + fftw_real tmp16; + fftw_real tmp42; + fftw_real tmp72; + fftw_real tmp45; + fftw_real tmp92; + fftw_real tmp75; + fftw_real tmp21; + fftw_real tmp47; + fftw_real tmp77; + fftw_real tmp50; + fftw_real tmp93; + fftw_real tmp80; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp3; + fftw_real tmp4; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(input[0]); + tmp2 = c_re(input[4 * istride]); + tmp3 = c_re(input[8 * istride]); + tmp4 = tmp2 + tmp3; + tmp5 = tmp1 + tmp4; + tmp53 = tmp1 - (K500000000 * tmp4); + tmp36 = K866025403 * (tmp3 - tmp2); + } + { + fftw_real tmp24; + fftw_real tmp25; + fftw_real tmp26; + fftw_real tmp27; + ASSERT_ALIGNED_DOUBLE; + tmp24 = c_im(input[0]); + tmp25 = c_im(input[4 * istride]); + tmp26 = c_im(input[8 * istride]); + tmp27 = tmp25 + tmp26; + tmp28 = tmp24 + tmp27; + tmp35 = tmp24 - (K500000000 * tmp27); + tmp54 = K866025403 * (tmp25 - tmp26); + } + { + fftw_real tmp6; + fftw_real tmp7; + fftw_real tmp8; + fftw_real tmp9; + ASSERT_ALIGNED_DOUBLE; + tmp6 = c_re(input[6 * istride]); + tmp7 = c_re(input[10 * istride]); + tmp8 = c_re(input[2 * istride]); + tmp9 = tmp7 + tmp8; + tmp10 = tmp6 + tmp9; + tmp56 = tmp6 - (K500000000 * tmp9); + tmp39 = K866025403 * (tmp8 - tmp7); + } + { + fftw_real tmp29; + fftw_real tmp30; + fftw_real tmp31; + fftw_real tmp32; + ASSERT_ALIGNED_DOUBLE; + tmp29 = c_im(input[6 * istride]); + tmp30 = c_im(input[10 * istride]); + tmp31 = c_im(input[2 * istride]); + tmp32 = tmp30 + tmp31; + tmp33 = tmp29 + tmp32; + tmp38 = tmp29 - (K500000000 * tmp32); + tmp57 = K866025403 * (tmp30 - tmp31); + } + { + fftw_real tmp12; + fftw_real tmp13; + fftw_real tmp14; + fftw_real tmp15; + ASSERT_ALIGNED_DOUBLE; + tmp12 = c_re(input[3 * istride]); + tmp13 = c_re(input[7 * istride]); + tmp14 = c_re(input[11 * istride]); + tmp15 = tmp13 + tmp14; + tmp16 = tmp12 + tmp15; + tmp42 = tmp12 - (K500000000 * tmp15); + tmp72 = K866025403 * (tmp14 - tmp13); + } + { + fftw_real tmp73; + fftw_real tmp43; + fftw_real tmp44; + fftw_real tmp74; + ASSERT_ALIGNED_DOUBLE; + tmp73 = c_im(input[3 * istride]); + tmp43 = c_im(input[7 * istride]); + tmp44 = c_im(input[11 * istride]); + tmp74 = tmp43 + tmp44; + tmp45 = K866025403 * (tmp43 - tmp44); + tmp92 = tmp73 + tmp74; + tmp75 = tmp73 - (K500000000 * tmp74); + } + { + fftw_real tmp17; + fftw_real tmp18; + fftw_real tmp19; + fftw_real tmp20; + ASSERT_ALIGNED_DOUBLE; + tmp17 = c_re(input[9 * istride]); + tmp18 = c_re(input[istride]); + tmp19 = c_re(input[5 * istride]); + tmp20 = tmp18 + tmp19; + tmp21 = tmp17 + tmp20; + tmp47 = tmp17 - (K500000000 * tmp20); + tmp77 = K866025403 * (tmp19 - tmp18); + } + { + fftw_real tmp78; + fftw_real tmp48; + fftw_real tmp49; + fftw_real tmp79; + ASSERT_ALIGNED_DOUBLE; + tmp78 = c_im(input[9 * istride]); + tmp48 = c_im(input[istride]); + tmp49 = c_im(input[5 * istride]); + tmp79 = tmp48 + tmp49; + tmp50 = K866025403 * (tmp48 - tmp49); + tmp93 = tmp78 + tmp79; + tmp80 = tmp78 - (K500000000 * tmp79); + } + { + fftw_real tmp11; + fftw_real tmp22; + fftw_real tmp23; + fftw_real tmp34; + ASSERT_ALIGNED_DOUBLE; + tmp11 = tmp5 + tmp10; + tmp22 = tmp16 + tmp21; + c_re(output[6 * ostride]) = tmp11 - tmp22; + c_re(output[0]) = tmp11 + tmp22; + { + fftw_real tmp91; + fftw_real tmp94; + fftw_real tmp95; + fftw_real tmp96; + ASSERT_ALIGNED_DOUBLE; + tmp91 = tmp5 - tmp10; + tmp94 = tmp92 - tmp93; + c_re(output[3 * ostride]) = tmp91 - tmp94; + c_re(output[9 * ostride]) = tmp91 + tmp94; + tmp95 = tmp28 + tmp33; + tmp96 = tmp92 + tmp93; + c_im(output[6 * ostride]) = tmp95 - tmp96; + c_im(output[0]) = tmp95 + tmp96; + } + tmp23 = tmp16 - tmp21; + tmp34 = tmp28 - tmp33; + c_im(output[3 * ostride]) = tmp23 + tmp34; + c_im(output[9 * ostride]) = tmp34 - tmp23; + { + fftw_real tmp63; + fftw_real tmp83; + fftw_real tmp82; + fftw_real tmp84; + fftw_real tmp66; + fftw_real tmp70; + fftw_real tmp69; + fftw_real tmp71; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp61; + fftw_real tmp62; + fftw_real tmp76; + fftw_real tmp81; + ASSERT_ALIGNED_DOUBLE; + tmp61 = tmp36 + tmp35; + tmp62 = tmp39 + tmp38; + tmp63 = tmp61 - tmp62; + tmp83 = tmp61 + tmp62; + tmp76 = tmp72 + tmp75; + tmp81 = tmp77 + tmp80; + tmp82 = tmp76 - tmp81; + tmp84 = tmp76 + tmp81; + } + { + fftw_real tmp64; + fftw_real tmp65; + fftw_real tmp67; + fftw_real tmp68; + ASSERT_ALIGNED_DOUBLE; + tmp64 = tmp42 + tmp45; + tmp65 = tmp47 + tmp50; + tmp66 = tmp64 - tmp65; + tmp70 = tmp64 + tmp65; + tmp67 = tmp53 + tmp54; + tmp68 = tmp56 + tmp57; + tmp69 = tmp67 + tmp68; + tmp71 = tmp67 - tmp68; + } + c_im(output[ostride]) = tmp63 - tmp66; + c_im(output[7 * ostride]) = tmp63 + tmp66; + c_re(output[10 * ostride]) = tmp69 - tmp70; + c_re(output[4 * ostride]) = tmp69 + tmp70; + c_re(output[7 * ostride]) = tmp71 - tmp82; + c_re(output[ostride]) = tmp71 + tmp82; + c_im(output[10 * ostride]) = tmp83 - tmp84; + c_im(output[4 * ostride]) = tmp83 + tmp84; + } + { + fftw_real tmp41; + fftw_real tmp89; + fftw_real tmp88; + fftw_real tmp90; + fftw_real tmp52; + fftw_real tmp60; + fftw_real tmp59; + fftw_real tmp85; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp37; + fftw_real tmp40; + fftw_real tmp86; + fftw_real tmp87; + ASSERT_ALIGNED_DOUBLE; + tmp37 = tmp35 - tmp36; + tmp40 = tmp38 - tmp39; + tmp41 = tmp37 - tmp40; + tmp89 = tmp37 + tmp40; + tmp86 = tmp75 - tmp72; + tmp87 = tmp80 - tmp77; + tmp88 = tmp86 - tmp87; + tmp90 = tmp86 + tmp87; + } + { + fftw_real tmp46; + fftw_real tmp51; + fftw_real tmp55; + fftw_real tmp58; + ASSERT_ALIGNED_DOUBLE; + tmp46 = tmp42 - tmp45; + tmp51 = tmp47 - tmp50; + tmp52 = tmp46 - tmp51; + tmp60 = tmp46 + tmp51; + tmp55 = tmp53 - tmp54; + tmp58 = tmp56 - tmp57; + tmp59 = tmp55 + tmp58; + tmp85 = tmp55 - tmp58; + } + c_im(output[5 * ostride]) = tmp41 - tmp52; + c_im(output[11 * ostride]) = tmp41 + tmp52; + c_re(output[2 * ostride]) = tmp59 - tmp60; + c_re(output[8 * ostride]) = tmp59 + tmp60; + c_re(output[11 * ostride]) = tmp85 - tmp88; + c_re(output[5 * ostride]) = tmp85 + tmp88; + c_im(output[2 * ostride]) = tmp89 - tmp90; + c_im(output[8 * ostride]) = tmp89 + tmp90; + } + } +} + +fftw_codelet_desc fftw_no_twiddle_12_desc = +{ + "fftw_no_twiddle_12", + (void (*)()) fftw_no_twiddle_12, + 12, + FFTW_FORWARD, + FFTW_NOTW, + 265, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fn_13.c b/src/sndobj/rfftw/fn_13.c new file mode 100644 index 0000000..2af61ae --- /dev/null +++ b/src/sndobj/rfftw/fn_13.c @@ -0,0 +1,526 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:43:48 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddle 13 */ + +/* + * This function contains 176 FP additions, 68 FP multiplications, + * (or, 138 additions, 30 multiplications, 38 fused multiply/add), + * 50 stack variables, and 52 memory accesses + */ +static const fftw_real K1_732050807 = FFTW_KONST(+1.732050807568877293527446341505872366942805254); +static const fftw_real K256247671 = FFTW_KONST(+0.256247671582936600958684654061725059144125175); +static const fftw_real K156891391 = FFTW_KONST(+0.156891391051584611046832726756003269660212636); +static const fftw_real K300238635 = FFTW_KONST(+0.300238635966332641462884626667381504676006424); +static const fftw_real K011599105 = FFTW_KONST(+0.011599105605768290721655456654083252189827041); +static const fftw_real K174138601 = FFTW_KONST(+0.174138601152135905005660794929264742616964676); +static const fftw_real K575140729 = FFTW_KONST(+0.575140729474003121368385547455453388461001608); +static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); +static const fftw_real K083333333 = FFTW_KONST(+0.083333333333333333333333333333333333333333333); +static const fftw_real K075902986 = FFTW_KONST(+0.075902986037193865983102897245103540356428373); +static const fftw_real K251768516 = FFTW_KONST(+0.251768516431883313623436926934233488546674281); +static const fftw_real K258260390 = FFTW_KONST(+0.258260390311744861420450644284508567852516811); +static const fftw_real K132983124 = FFTW_KONST(+0.132983124607418643793760531921092974399165133); +static const fftw_real K265966249 = FFTW_KONST(+0.265966249214837287587521063842185948798330267); +static const fftw_real K387390585 = FFTW_KONST(+0.387390585467617292130675966426762851778775217); +static const fftw_real K503537032 = FFTW_KONST(+0.503537032863766627246873853868466977093348562); +static const fftw_real K113854479 = FFTW_KONST(+0.113854479055790798974654345867655310534642560); +static const fftw_real K300462606 = FFTW_KONST(+0.300462606288665774426601772289207995520941381); +static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); +static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); + +/* + * Generator Id's : + * $Id: fn_13.c,v 1.1.1.1 2006/05/12 15:14:47 veplaini Exp $ + * $Id: fn_13.c,v 1.1.1.1 2006/05/12 15:14:47 veplaini Exp $ + * $Id: fn_13.c,v 1.1.1.1 2006/05/12 15:14:47 veplaini Exp $ + */ + +void fftw_no_twiddle_13(const fftw_complex *input, fftw_complex *output, int istride, int ostride) +{ + fftw_real tmp1; + fftw_real tmp88; + fftw_real tmp29; + fftw_real tmp36; + fftw_real tmp43; + fftw_real tmp121; + fftw_real tmp128; + fftw_real tmp30; + fftw_real tmp24; + fftw_real tmp131; + fftw_real tmp124; + fftw_real tmp129; + fftw_real tmp41; + fftw_real tmp44; + fftw_real tmp134; + fftw_real tmp83; + fftw_real tmp89; + fftw_real tmp70; + fftw_real tmp85; + fftw_real tmp137; + fftw_real tmp141; + fftw_real tmp146; + fftw_real tmp77; + fftw_real tmp86; + fftw_real tmp144; + fftw_real tmp147; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(input[0]); + tmp88 = c_im(input[0]); + { + fftw_real tmp15; + fftw_real tmp25; + fftw_real tmp18; + fftw_real tmp26; + fftw_real tmp21; + fftw_real tmp27; + fftw_real tmp22; + fftw_real tmp28; + fftw_real tmp6; + fftw_real tmp37; + fftw_real tmp33; + fftw_real tmp11; + fftw_real tmp38; + fftw_real tmp34; + fftw_real tmp13; + fftw_real tmp14; + fftw_real tmp12; + fftw_real tmp23; + ASSERT_ALIGNED_DOUBLE; + tmp13 = c_re(input[8 * istride]); + tmp14 = c_re(input[5 * istride]); + tmp15 = tmp13 + tmp14; + tmp25 = tmp13 - tmp14; + { + fftw_real tmp16; + fftw_real tmp17; + fftw_real tmp19; + fftw_real tmp20; + ASSERT_ALIGNED_DOUBLE; + tmp16 = c_re(input[6 * istride]); + tmp17 = c_re(input[11 * istride]); + tmp18 = tmp16 + tmp17; + tmp26 = tmp16 - tmp17; + tmp19 = c_re(input[2 * istride]); + tmp20 = c_re(input[7 * istride]); + tmp21 = tmp19 + tmp20; + tmp27 = tmp19 - tmp20; + } + tmp22 = tmp18 + tmp21; + tmp28 = tmp26 + tmp27; + { + fftw_real tmp2; + fftw_real tmp3; + fftw_real tmp4; + fftw_real tmp5; + ASSERT_ALIGNED_DOUBLE; + tmp2 = c_re(input[istride]); + tmp3 = c_re(input[3 * istride]); + tmp4 = c_re(input[9 * istride]); + tmp5 = tmp3 + tmp4; + tmp6 = tmp2 + tmp5; + tmp37 = tmp2 - (K500000000 * tmp5); + tmp33 = tmp3 - tmp4; + } + { + fftw_real tmp7; + fftw_real tmp8; + fftw_real tmp9; + fftw_real tmp10; + ASSERT_ALIGNED_DOUBLE; + tmp7 = c_re(input[12 * istride]); + tmp8 = c_re(input[4 * istride]); + tmp9 = c_re(input[10 * istride]); + tmp10 = tmp8 + tmp9; + tmp11 = tmp7 + tmp10; + tmp38 = tmp7 - (K500000000 * tmp10); + tmp34 = tmp8 - tmp9; + } + tmp29 = tmp25 - tmp28; + { + fftw_real tmp32; + fftw_real tmp35; + fftw_real tmp119; + fftw_real tmp120; + ASSERT_ALIGNED_DOUBLE; + tmp32 = tmp25 + (K500000000 * tmp28); + tmp35 = K866025403 * (tmp33 + tmp34); + tmp36 = tmp32 - tmp35; + tmp43 = tmp35 + tmp32; + tmp119 = tmp33 - tmp34; + tmp120 = tmp27 - tmp26; + tmp121 = tmp119 + tmp120; + tmp128 = tmp120 - tmp119; + } + tmp30 = tmp6 - tmp11; + tmp12 = tmp6 + tmp11; + tmp23 = tmp15 + tmp22; + tmp24 = tmp12 + tmp23; + tmp131 = K300462606 * (tmp12 - tmp23); + { + fftw_real tmp122; + fftw_real tmp123; + fftw_real tmp39; + fftw_real tmp40; + ASSERT_ALIGNED_DOUBLE; + tmp122 = tmp37 + tmp38; + tmp123 = tmp15 - (K500000000 * tmp22); + tmp124 = tmp122 + tmp123; + tmp129 = tmp122 - tmp123; + tmp39 = tmp37 - tmp38; + tmp40 = K866025403 * (tmp18 - tmp21); + tmp41 = tmp39 + tmp40; + tmp44 = tmp39 - tmp40; + } + } + { + fftw_real tmp61; + fftw_real tmp135; + fftw_real tmp64; + fftw_real tmp71; + fftw_real tmp67; + fftw_real tmp72; + fftw_real tmp68; + fftw_real tmp136; + fftw_real tmp52; + fftw_real tmp79; + fftw_real tmp75; + fftw_real tmp57; + fftw_real tmp80; + fftw_real tmp74; + fftw_real tmp59; + fftw_real tmp60; + fftw_real tmp139; + fftw_real tmp140; + ASSERT_ALIGNED_DOUBLE; + tmp59 = c_im(input[8 * istride]); + tmp60 = c_im(input[5 * istride]); + tmp61 = tmp59 + tmp60; + tmp135 = tmp59 - tmp60; + { + fftw_real tmp62; + fftw_real tmp63; + fftw_real tmp65; + fftw_real tmp66; + ASSERT_ALIGNED_DOUBLE; + tmp62 = c_im(input[6 * istride]); + tmp63 = c_im(input[11 * istride]); + tmp64 = tmp62 + tmp63; + tmp71 = tmp62 - tmp63; + tmp65 = c_im(input[2 * istride]); + tmp66 = c_im(input[7 * istride]); + tmp67 = tmp65 + tmp66; + tmp72 = tmp65 - tmp66; + } + tmp68 = tmp64 + tmp67; + tmp136 = tmp71 + tmp72; + { + fftw_real tmp48; + fftw_real tmp49; + fftw_real tmp50; + fftw_real tmp51; + ASSERT_ALIGNED_DOUBLE; + tmp48 = c_im(input[istride]); + tmp49 = c_im(input[3 * istride]); + tmp50 = c_im(input[9 * istride]); + tmp51 = tmp49 + tmp50; + tmp52 = tmp48 - (K500000000 * tmp51); + tmp79 = tmp48 + tmp51; + tmp75 = tmp49 - tmp50; + } + { + fftw_real tmp53; + fftw_real tmp54; + fftw_real tmp55; + fftw_real tmp56; + ASSERT_ALIGNED_DOUBLE; + tmp53 = c_im(input[12 * istride]); + tmp54 = c_im(input[4 * istride]); + tmp55 = c_im(input[10 * istride]); + tmp56 = tmp54 + tmp55; + tmp57 = tmp53 - (K500000000 * tmp56); + tmp80 = tmp53 + tmp56; + tmp74 = tmp54 - tmp55; + } + tmp134 = tmp79 - tmp80; + { + fftw_real tmp81; + fftw_real tmp82; + fftw_real tmp58; + fftw_real tmp69; + ASSERT_ALIGNED_DOUBLE; + tmp81 = tmp79 + tmp80; + tmp82 = tmp61 + tmp68; + tmp83 = K300462606 * (tmp81 - tmp82); + tmp89 = tmp81 + tmp82; + tmp58 = tmp52 + tmp57; + tmp69 = tmp61 - (K500000000 * tmp68); + tmp70 = tmp58 - tmp69; + tmp85 = tmp58 + tmp69; + } + tmp137 = tmp135 - tmp136; + tmp139 = K866025403 * (tmp75 + tmp74); + tmp140 = tmp135 + (K500000000 * tmp136); + tmp141 = tmp139 - tmp140; + tmp146 = tmp139 + tmp140; + { + fftw_real tmp73; + fftw_real tmp76; + fftw_real tmp142; + fftw_real tmp143; + ASSERT_ALIGNED_DOUBLE; + tmp73 = tmp71 - tmp72; + tmp76 = tmp74 - tmp75; + tmp77 = tmp73 - tmp76; + tmp86 = tmp76 + tmp73; + tmp142 = tmp52 - tmp57; + tmp143 = K866025403 * (tmp67 - tmp64); + tmp144 = tmp142 - tmp143; + tmp147 = tmp142 + tmp143; + } + } + c_re(output[0]) = tmp1 + tmp24; + { + fftw_real tmp163; + fftw_real tmp173; + fftw_real tmp127; + fftw_real tmp169; + fftw_real tmp153; + fftw_real tmp132; + fftw_real tmp138; + fftw_real tmp149; + fftw_real tmp160; + fftw_real tmp172; + fftw_real tmp154; + fftw_real tmp157; + fftw_real tmp158; + fftw_real tmp170; + fftw_real tmp161; + fftw_real tmp162; + ASSERT_ALIGNED_DOUBLE; + tmp161 = (K113854479 * tmp121) - (K503537032 * tmp124); + tmp162 = (K387390585 * tmp128) - (K265966249 * tmp129); + tmp163 = tmp161 - tmp162; + tmp173 = tmp162 + tmp161; + { + fftw_real tmp130; + fftw_real tmp151; + fftw_real tmp125; + fftw_real tmp126; + fftw_real tmp152; + ASSERT_ALIGNED_DOUBLE; + tmp130 = (K132983124 * tmp128) + (K258260390 * tmp129); + tmp151 = tmp131 - tmp130; + tmp125 = (K251768516 * tmp121) + (K075902986 * tmp124); + tmp126 = tmp1 - (K083333333 * tmp24); + tmp152 = tmp126 - tmp125; + tmp127 = (K2_000000000 * tmp125) + tmp126; + tmp169 = tmp152 - tmp151; + tmp153 = tmp151 + tmp152; + tmp132 = (K2_000000000 * tmp130) + tmp131; + } + { + fftw_real tmp145; + fftw_real tmp148; + fftw_real tmp155; + fftw_real tmp156; + ASSERT_ALIGNED_DOUBLE; + tmp138 = (K575140729 * tmp134) + (K174138601 * tmp137); + tmp145 = (K011599105 * tmp141) + (K300238635 * tmp144); + tmp148 = (K156891391 * tmp146) - (K256247671 * tmp147); + tmp149 = tmp145 + tmp148; + tmp160 = K1_732050807 * (tmp148 - tmp145); + tmp172 = tmp149 - tmp138; + tmp154 = (K174138601 * tmp134) - (K575140729 * tmp137); + tmp155 = (K300238635 * tmp141) - (K011599105 * tmp144); + tmp156 = (K256247671 * tmp146) + (K156891391 * tmp147); + tmp157 = tmp155 + tmp156; + tmp158 = tmp154 - tmp157; + tmp170 = K1_732050807 * (tmp156 - tmp155); + } + { + fftw_real tmp133; + fftw_real tmp150; + fftw_real tmp165; + fftw_real tmp166; + ASSERT_ALIGNED_DOUBLE; + tmp133 = tmp127 - tmp132; + tmp150 = tmp138 + (K2_000000000 * tmp149); + c_re(output[8 * ostride]) = tmp133 - tmp150; + c_re(output[5 * ostride]) = tmp133 + tmp150; + { + fftw_real tmp167; + fftw_real tmp168; + fftw_real tmp159; + fftw_real tmp164; + ASSERT_ALIGNED_DOUBLE; + tmp167 = tmp132 + tmp127; + tmp168 = tmp154 + (K2_000000000 * tmp157); + c_re(output[12 * ostride]) = tmp167 - tmp168; + c_re(output[ostride]) = tmp167 + tmp168; + tmp159 = tmp153 - tmp158; + tmp164 = tmp160 - tmp163; + c_re(output[4 * ostride]) = tmp159 - tmp164; + c_re(output[10 * ostride]) = tmp164 + tmp159; + } + tmp165 = tmp153 + tmp158; + tmp166 = tmp163 + tmp160; + c_re(output[3 * ostride]) = tmp165 - tmp166; + c_re(output[9 * ostride]) = tmp166 + tmp165; + { + fftw_real tmp175; + fftw_real tmp176; + fftw_real tmp171; + fftw_real tmp174; + ASSERT_ALIGNED_DOUBLE; + tmp175 = tmp169 + tmp170; + tmp176 = tmp173 + tmp172; + c_re(output[2 * ostride]) = tmp175 - tmp176; + c_re(output[7 * ostride]) = tmp176 + tmp175; + tmp171 = tmp169 - tmp170; + tmp174 = tmp172 - tmp173; + c_re(output[6 * ostride]) = tmp171 - tmp174; + c_re(output[11 * ostride]) = tmp174 + tmp171; + } + } + } + c_im(output[0]) = tmp88 + tmp89; + { + fftw_real tmp102; + fftw_real tmp115; + fftw_real tmp84; + fftw_real tmp112; + fftw_real tmp106; + fftw_real tmp91; + fftw_real tmp31; + fftw_real tmp46; + fftw_real tmp107; + fftw_real tmp111; + fftw_real tmp94; + fftw_real tmp97; + fftw_real tmp99; + fftw_real tmp114; + fftw_real tmp100; + fftw_real tmp101; + ASSERT_ALIGNED_DOUBLE; + tmp100 = (K387390585 * tmp77) + (K265966249 * tmp70); + tmp101 = (K113854479 * tmp86) + (K503537032 * tmp85); + tmp102 = tmp100 + tmp101; + tmp115 = tmp100 - tmp101; + { + fftw_real tmp78; + fftw_real tmp105; + fftw_real tmp87; + fftw_real tmp90; + fftw_real tmp104; + ASSERT_ALIGNED_DOUBLE; + tmp78 = (K258260390 * tmp70) - (K132983124 * tmp77); + tmp105 = tmp83 - tmp78; + tmp87 = (K075902986 * tmp85) - (K251768516 * tmp86); + tmp90 = tmp88 - (K083333333 * tmp89); + tmp104 = tmp90 - tmp87; + tmp84 = (K2_000000000 * tmp78) + tmp83; + tmp112 = tmp105 + tmp104; + tmp106 = tmp104 - tmp105; + tmp91 = (K2_000000000 * tmp87) + tmp90; + } + { + fftw_real tmp42; + fftw_real tmp45; + fftw_real tmp95; + fftw_real tmp96; + ASSERT_ALIGNED_DOUBLE; + tmp31 = (K575140729 * tmp29) - (K174138601 * tmp30); + tmp42 = (K300238635 * tmp36) + (K011599105 * tmp41); + tmp45 = (K256247671 * tmp43) + (K156891391 * tmp44); + tmp46 = tmp42 - tmp45; + tmp107 = K1_732050807 * (tmp45 + tmp42); + tmp111 = tmp31 - tmp46; + tmp94 = (K575140729 * tmp30) + (K174138601 * tmp29); + tmp95 = (K156891391 * tmp43) - (K256247671 * tmp44); + tmp96 = (K300238635 * tmp41) - (K011599105 * tmp36); + tmp97 = tmp95 + tmp96; + tmp99 = tmp97 - tmp94; + tmp114 = K1_732050807 * (tmp96 - tmp95); + } + { + fftw_real tmp47; + fftw_real tmp92; + fftw_real tmp109; + fftw_real tmp110; + ASSERT_ALIGNED_DOUBLE; + tmp47 = tmp31 + (K2_000000000 * tmp46); + tmp92 = tmp84 + tmp91; + c_im(output[ostride]) = tmp47 + tmp92; + c_im(output[12 * ostride]) = tmp92 - tmp47; + { + fftw_real tmp93; + fftw_real tmp98; + fftw_real tmp103; + fftw_real tmp108; + ASSERT_ALIGNED_DOUBLE; + tmp93 = tmp91 - tmp84; + tmp98 = tmp94 + (K2_000000000 * tmp97); + c_im(output[5 * ostride]) = tmp93 - tmp98; + c_im(output[8 * ostride]) = tmp98 + tmp93; + tmp103 = tmp99 + tmp102; + tmp108 = tmp106 - tmp107; + c_im(output[2 * ostride]) = tmp103 + tmp108; + c_im(output[7 * ostride]) = tmp108 - tmp103; + } + tmp109 = tmp107 + tmp106; + tmp110 = tmp102 - tmp99; + c_im(output[6 * ostride]) = tmp109 - tmp110; + c_im(output[11 * ostride]) = tmp110 + tmp109; + { + fftw_real tmp117; + fftw_real tmp118; + fftw_real tmp113; + fftw_real tmp116; + ASSERT_ALIGNED_DOUBLE; + tmp117 = tmp112 - tmp111; + tmp118 = tmp114 - tmp115; + c_im(output[4 * ostride]) = tmp117 - tmp118; + c_im(output[10 * ostride]) = tmp118 + tmp117; + tmp113 = tmp111 + tmp112; + tmp116 = tmp114 + tmp115; + c_im(output[3 * ostride]) = tmp113 - tmp116; + c_im(output[9 * ostride]) = tmp116 + tmp113; + } + } + } +} + +fftw_codelet_desc fftw_no_twiddle_13_desc = +{ + "fftw_no_twiddle_13", + (void (*)()) fftw_no_twiddle_13, + 13, + FFTW_FORWARD, + FFTW_NOTW, + 287, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fn_14.c b/src/sndobj/rfftw/fn_14.c new file mode 100644 index 0000000..bb61195 --- /dev/null +++ b/src/sndobj/rfftw/fn_14.c @@ -0,0 +1,355 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:43:49 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddle 14 */ + +/* + * This function contains 148 FP additions, 72 FP multiplications, + * (or, 148 additions, 72 multiplications, 0 fused multiply/add), + * 36 stack variables, and 56 memory accesses + */ +static const fftw_real K222520933 = FFTW_KONST(+0.222520933956314404288902564496794759466355569); +static const fftw_real K900968867 = FFTW_KONST(+0.900968867902419126236102319507445051165919162); +static const fftw_real K623489801 = FFTW_KONST(+0.623489801858733530525004884004239810632274731); +static const fftw_real K433883739 = FFTW_KONST(+0.433883739117558120475768332848358754609990728); +static const fftw_real K781831482 = FFTW_KONST(+0.781831482468029808708444526674057750232334519); +static const fftw_real K974927912 = FFTW_KONST(+0.974927912181823607018131682993931217232785801); + +/* + * Generator Id's : + * $Id: fn_14.c,v 1.1.1.1 2006/05/12 15:14:57 veplaini Exp $ + * $Id: fn_14.c,v 1.1.1.1 2006/05/12 15:14:57 veplaini Exp $ + * $Id: fn_14.c,v 1.1.1.1 2006/05/12 15:14:57 veplaini Exp $ + */ + +void fftw_no_twiddle_14(const fftw_complex *input, fftw_complex *output, int istride, int ostride) +{ + fftw_real tmp3; + fftw_real tmp25; + fftw_real tmp68; + fftw_real tmp77; + fftw_real tmp10; + fftw_real tmp62; + fftw_real tmp28; + fftw_real tmp88; + fftw_real tmp42; + fftw_real tmp71; + fftw_real tmp80; + fftw_real tmp97; + fftw_real tmp17; + fftw_real tmp64; + fftw_real tmp31; + fftw_real tmp90; + fftw_real tmp56; + fftw_real tmp69; + fftw_real tmp86; + fftw_real tmp99; + fftw_real tmp24; + fftw_real tmp63; + fftw_real tmp34; + fftw_real tmp89; + fftw_real tmp49; + fftw_real tmp70; + fftw_real tmp83; + fftw_real tmp98; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp66; + fftw_real tmp67; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(input[0]); + tmp2 = c_re(input[7 * istride]); + tmp3 = tmp1 - tmp2; + tmp25 = tmp1 + tmp2; + tmp66 = c_im(input[0]); + tmp67 = c_im(input[7 * istride]); + tmp68 = tmp66 - tmp67; + tmp77 = tmp66 + tmp67; + } + { + fftw_real tmp6; + fftw_real tmp26; + fftw_real tmp9; + fftw_real tmp27; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp4; + fftw_real tmp5; + fftw_real tmp7; + fftw_real tmp8; + ASSERT_ALIGNED_DOUBLE; + tmp4 = c_re(input[2 * istride]); + tmp5 = c_re(input[9 * istride]); + tmp6 = tmp4 - tmp5; + tmp26 = tmp4 + tmp5; + tmp7 = c_re(input[12 * istride]); + tmp8 = c_re(input[5 * istride]); + tmp9 = tmp7 - tmp8; + tmp27 = tmp7 + tmp8; + } + tmp10 = tmp6 + tmp9; + tmp62 = tmp9 - tmp6; + tmp28 = tmp26 + tmp27; + tmp88 = tmp27 - tmp26; + } + { + fftw_real tmp38; + fftw_real tmp78; + fftw_real tmp41; + fftw_real tmp79; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp36; + fftw_real tmp37; + fftw_real tmp39; + fftw_real tmp40; + ASSERT_ALIGNED_DOUBLE; + tmp36 = c_im(input[2 * istride]); + tmp37 = c_im(input[9 * istride]); + tmp38 = tmp36 - tmp37; + tmp78 = tmp36 + tmp37; + tmp39 = c_im(input[12 * istride]); + tmp40 = c_im(input[5 * istride]); + tmp41 = tmp39 - tmp40; + tmp79 = tmp39 + tmp40; + } + tmp42 = tmp38 - tmp41; + tmp71 = tmp38 + tmp41; + tmp80 = tmp78 + tmp79; + tmp97 = tmp78 - tmp79; + } + { + fftw_real tmp13; + fftw_real tmp29; + fftw_real tmp16; + fftw_real tmp30; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp11; + fftw_real tmp12; + fftw_real tmp14; + fftw_real tmp15; + ASSERT_ALIGNED_DOUBLE; + tmp11 = c_re(input[4 * istride]); + tmp12 = c_re(input[11 * istride]); + tmp13 = tmp11 - tmp12; + tmp29 = tmp11 + tmp12; + tmp14 = c_re(input[10 * istride]); + tmp15 = c_re(input[3 * istride]); + tmp16 = tmp14 - tmp15; + tmp30 = tmp14 + tmp15; + } + tmp17 = tmp13 + tmp16; + tmp64 = tmp16 - tmp13; + tmp31 = tmp29 + tmp30; + tmp90 = tmp29 - tmp30; + } + { + fftw_real tmp52; + fftw_real tmp84; + fftw_real tmp55; + fftw_real tmp85; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp50; + fftw_real tmp51; + fftw_real tmp53; + fftw_real tmp54; + ASSERT_ALIGNED_DOUBLE; + tmp50 = c_im(input[4 * istride]); + tmp51 = c_im(input[11 * istride]); + tmp52 = tmp50 - tmp51; + tmp84 = tmp50 + tmp51; + tmp53 = c_im(input[10 * istride]); + tmp54 = c_im(input[3 * istride]); + tmp55 = tmp53 - tmp54; + tmp85 = tmp53 + tmp54; + } + tmp56 = tmp52 - tmp55; + tmp69 = tmp52 + tmp55; + tmp86 = tmp84 + tmp85; + tmp99 = tmp85 - tmp84; + } + { + fftw_real tmp20; + fftw_real tmp32; + fftw_real tmp23; + fftw_real tmp33; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp18; + fftw_real tmp19; + fftw_real tmp21; + fftw_real tmp22; + ASSERT_ALIGNED_DOUBLE; + tmp18 = c_re(input[6 * istride]); + tmp19 = c_re(input[13 * istride]); + tmp20 = tmp18 - tmp19; + tmp32 = tmp18 + tmp19; + tmp21 = c_re(input[8 * istride]); + tmp22 = c_re(input[istride]); + tmp23 = tmp21 - tmp22; + tmp33 = tmp21 + tmp22; + } + tmp24 = tmp20 + tmp23; + tmp63 = tmp23 - tmp20; + tmp34 = tmp32 + tmp33; + tmp89 = tmp32 - tmp33; + } + { + fftw_real tmp45; + fftw_real tmp81; + fftw_real tmp48; + fftw_real tmp82; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp43; + fftw_real tmp44; + fftw_real tmp46; + fftw_real tmp47; + ASSERT_ALIGNED_DOUBLE; + tmp43 = c_im(input[6 * istride]); + tmp44 = c_im(input[13 * istride]); + tmp45 = tmp43 - tmp44; + tmp81 = tmp43 + tmp44; + tmp46 = c_im(input[8 * istride]); + tmp47 = c_im(input[istride]); + tmp48 = tmp46 - tmp47; + tmp82 = tmp46 + tmp47; + } + tmp49 = tmp45 - tmp48; + tmp70 = tmp45 + tmp48; + tmp83 = tmp81 + tmp82; + tmp98 = tmp82 - tmp81; + } + { + fftw_real tmp57; + fftw_real tmp35; + fftw_real tmp100; + fftw_real tmp96; + ASSERT_ALIGNED_DOUBLE; + c_re(output[7 * ostride]) = tmp3 + tmp10 + tmp17 + tmp24; + tmp57 = (K974927912 * tmp42) - (K781831482 * tmp49) - (K433883739 * tmp56); + tmp35 = tmp3 + (K623489801 * tmp24) - (K900968867 * tmp17) - (K222520933 * tmp10); + c_re(output[5 * ostride]) = tmp35 - tmp57; + c_re(output[9 * ostride]) = tmp35 + tmp57; + { + fftw_real tmp59; + fftw_real tmp58; + fftw_real tmp61; + fftw_real tmp60; + ASSERT_ALIGNED_DOUBLE; + tmp59 = (K781831482 * tmp42) + (K974927912 * tmp56) + (K433883739 * tmp49); + tmp58 = tmp3 + (K623489801 * tmp10) - (K900968867 * tmp24) - (K222520933 * tmp17); + c_re(output[13 * ostride]) = tmp58 - tmp59; + c_re(output[ostride]) = tmp58 + tmp59; + tmp61 = (K433883739 * tmp42) + (K974927912 * tmp49) - (K781831482 * tmp56); + tmp60 = tmp3 + (K623489801 * tmp17) - (K222520933 * tmp24) - (K900968867 * tmp10); + c_re(output[11 * ostride]) = tmp60 - tmp61; + c_re(output[3 * ostride]) = tmp60 + tmp61; + } + c_re(output[0]) = tmp25 + tmp28 + tmp31 + tmp34; + tmp100 = (K781831482 * tmp97) - (K433883739 * tmp98) - (K974927912 * tmp99); + tmp96 = tmp25 + (K623489801 * tmp28) - (K900968867 * tmp34) - (K222520933 * tmp31); + c_re(output[6 * ostride]) = tmp96 - tmp100; + c_re(output[8 * ostride]) = tmp96 + tmp100; + { + fftw_real tmp102; + fftw_real tmp101; + fftw_real tmp104; + fftw_real tmp103; + ASSERT_ALIGNED_DOUBLE; + tmp102 = (K433883739 * tmp97) + (K781831482 * tmp99) - (K974927912 * tmp98); + tmp101 = tmp25 + (K623489801 * tmp31) - (K222520933 * tmp34) - (K900968867 * tmp28); + c_re(output[4 * ostride]) = tmp101 - tmp102; + c_re(output[10 * ostride]) = tmp101 + tmp102; + tmp104 = (K974927912 * tmp97) + (K433883739 * tmp99) + (K781831482 * tmp98); + tmp103 = tmp25 + (K623489801 * tmp34) - (K900968867 * tmp31) - (K222520933 * tmp28); + c_re(output[12 * ostride]) = tmp103 - tmp104; + c_re(output[2 * ostride]) = tmp103 + tmp104; + } + } + { + fftw_real tmp76; + fftw_real tmp75; + fftw_real tmp94; + fftw_real tmp95; + ASSERT_ALIGNED_DOUBLE; + c_im(output[7 * ostride]) = tmp68 + tmp71 + tmp69 + tmp70; + tmp76 = (K974927912 * tmp62) - (K781831482 * tmp63) - (K433883739 * tmp64); + tmp75 = tmp68 + (K623489801 * tmp70) - (K900968867 * tmp69) - (K222520933 * tmp71); + c_im(output[5 * ostride]) = tmp75 - tmp76; + c_im(output[9 * ostride]) = tmp76 + tmp75; + { + fftw_real tmp73; + fftw_real tmp74; + fftw_real tmp65; + fftw_real tmp72; + ASSERT_ALIGNED_DOUBLE; + tmp73 = (K781831482 * tmp62) + (K974927912 * tmp64) + (K433883739 * tmp63); + tmp74 = tmp68 + (K623489801 * tmp71) - (K900968867 * tmp70) - (K222520933 * tmp69); + c_im(output[ostride]) = tmp73 + tmp74; + c_im(output[13 * ostride]) = tmp74 - tmp73; + tmp65 = (K433883739 * tmp62) + (K974927912 * tmp63) - (K781831482 * tmp64); + tmp72 = tmp68 + (K623489801 * tmp69) - (K222520933 * tmp70) - (K900968867 * tmp71); + c_im(output[3 * ostride]) = tmp65 + tmp72; + c_im(output[11 * ostride]) = tmp72 - tmp65; + } + c_im(output[0]) = tmp77 + tmp80 + tmp86 + tmp83; + tmp94 = (K974927912 * tmp88) + (K433883739 * tmp90) + (K781831482 * tmp89); + tmp95 = tmp77 + (K623489801 * tmp83) - (K900968867 * tmp86) - (K222520933 * tmp80); + c_im(output[2 * ostride]) = tmp94 + tmp95; + c_im(output[12 * ostride]) = tmp95 - tmp94; + { + fftw_real tmp91; + fftw_real tmp87; + fftw_real tmp93; + fftw_real tmp92; + ASSERT_ALIGNED_DOUBLE; + tmp91 = (K781831482 * tmp88) - (K433883739 * tmp89) - (K974927912 * tmp90); + tmp87 = tmp77 + (K623489801 * tmp80) - (K900968867 * tmp83) - (K222520933 * tmp86); + c_im(output[6 * ostride]) = tmp87 - tmp91; + c_im(output[8 * ostride]) = tmp91 + tmp87; + tmp93 = (K433883739 * tmp88) + (K781831482 * tmp90) - (K974927912 * tmp89); + tmp92 = tmp77 + (K623489801 * tmp86) - (K222520933 * tmp83) - (K900968867 * tmp80); + c_im(output[4 * ostride]) = tmp92 - tmp93; + c_im(output[10 * ostride]) = tmp93 + tmp92; + } + } +} + +fftw_codelet_desc fftw_no_twiddle_14_desc = +{ + "fftw_no_twiddle_14", + (void (*)()) fftw_no_twiddle_14, + 14, + FFTW_FORWARD, + FFTW_NOTW, + 309, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fn_15.c b/src/sndobj/rfftw/fn_15.c new file mode 100644 index 0000000..e324734 --- /dev/null +++ b/src/sndobj/rfftw/fn_15.c @@ -0,0 +1,446 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:43:49 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddle 15 */ + +/* + * This function contains 156 FP additions, 56 FP multiplications, + * (or, 128 additions, 28 multiplications, 28 fused multiply/add), + * 62 stack variables, and 60 memory accesses + */ +static const fftw_real K587785252 = FFTW_KONST(+0.587785252292473129168705954639072768597652438); +static const fftw_real K951056516 = FFTW_KONST(+0.951056516295153572116439333379382143405698634); +static const fftw_real K250000000 = FFTW_KONST(+0.250000000000000000000000000000000000000000000); +static const fftw_real K559016994 = FFTW_KONST(+0.559016994374947424102293417182819058860154590); +static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); +static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); + +/* + * Generator Id's : + * $Id: fn_15.c,v 1.1.1.1 2006/05/12 15:14:58 veplaini Exp $ + * $Id: fn_15.c,v 1.1.1.1 2006/05/12 15:14:58 veplaini Exp $ + * $Id: fn_15.c,v 1.1.1.1 2006/05/12 15:14:58 veplaini Exp $ + */ + +void fftw_no_twiddle_15(const fftw_complex *input, fftw_complex *output, int istride, int ostride) +{ + fftw_real tmp5; + fftw_real tmp33; + fftw_real tmp57; + fftw_real tmp145; + fftw_real tmp100; + fftw_real tmp124; + fftw_real tmp21; + fftw_real tmp26; + fftw_real tmp27; + fftw_real tmp49; + fftw_real tmp54; + fftw_real tmp55; + fftw_real tmp136; + fftw_real tmp137; + fftw_real tmp147; + fftw_real tmp61; + fftw_real tmp62; + fftw_real tmp63; + fftw_real tmp112; + fftw_real tmp113; + fftw_real tmp126; + fftw_real tmp83; + fftw_real tmp88; + fftw_real tmp94; + fftw_real tmp10; + fftw_real tmp15; + fftw_real tmp16; + fftw_real tmp38; + fftw_real tmp43; + fftw_real tmp44; + fftw_real tmp139; + fftw_real tmp140; + fftw_real tmp146; + fftw_real tmp58; + fftw_real tmp59; + fftw_real tmp60; + fftw_real tmp115; + fftw_real tmp116; + fftw_real tmp125; + fftw_real tmp72; + fftw_real tmp77; + fftw_real tmp93; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp97; + fftw_real tmp4; + fftw_real tmp96; + fftw_real tmp32; + fftw_real tmp98; + fftw_real tmp29; + fftw_real tmp99; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(input[0]); + tmp97 = c_im(input[0]); + { + fftw_real tmp2; + fftw_real tmp3; + fftw_real tmp30; + fftw_real tmp31; + ASSERT_ALIGNED_DOUBLE; + tmp2 = c_re(input[5 * istride]); + tmp3 = c_re(input[10 * istride]); + tmp4 = tmp2 + tmp3; + tmp96 = K866025403 * (tmp3 - tmp2); + tmp30 = c_im(input[5 * istride]); + tmp31 = c_im(input[10 * istride]); + tmp32 = K866025403 * (tmp30 - tmp31); + tmp98 = tmp30 + tmp31; + } + tmp5 = tmp1 + tmp4; + tmp29 = tmp1 - (K500000000 * tmp4); + tmp33 = tmp29 - tmp32; + tmp57 = tmp29 + tmp32; + tmp145 = tmp97 + tmp98; + tmp99 = tmp97 - (K500000000 * tmp98); + tmp100 = tmp96 + tmp99; + tmp124 = tmp99 - tmp96; + } + { + fftw_real tmp17; + fftw_real tmp20; + fftw_real tmp45; + fftw_real tmp79; + fftw_real tmp80; + fftw_real tmp81; + fftw_real tmp48; + fftw_real tmp82; + fftw_real tmp22; + fftw_real tmp25; + fftw_real tmp50; + fftw_real tmp84; + fftw_real tmp85; + fftw_real tmp86; + fftw_real tmp53; + fftw_real tmp87; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp18; + fftw_real tmp19; + fftw_real tmp46; + fftw_real tmp47; + ASSERT_ALIGNED_DOUBLE; + tmp17 = c_re(input[6 * istride]); + tmp18 = c_re(input[11 * istride]); + tmp19 = c_re(input[istride]); + tmp20 = tmp18 + tmp19; + tmp45 = tmp17 - (K500000000 * tmp20); + tmp79 = K866025403 * (tmp19 - tmp18); + tmp80 = c_im(input[6 * istride]); + tmp46 = c_im(input[11 * istride]); + tmp47 = c_im(input[istride]); + tmp81 = tmp46 + tmp47; + tmp48 = K866025403 * (tmp46 - tmp47); + tmp82 = tmp80 - (K500000000 * tmp81); + } + { + fftw_real tmp23; + fftw_real tmp24; + fftw_real tmp51; + fftw_real tmp52; + ASSERT_ALIGNED_DOUBLE; + tmp22 = c_re(input[9 * istride]); + tmp23 = c_re(input[14 * istride]); + tmp24 = c_re(input[4 * istride]); + tmp25 = tmp23 + tmp24; + tmp50 = tmp22 - (K500000000 * tmp25); + tmp84 = K866025403 * (tmp24 - tmp23); + tmp85 = c_im(input[9 * istride]); + tmp51 = c_im(input[14 * istride]); + tmp52 = c_im(input[4 * istride]); + tmp86 = tmp51 + tmp52; + tmp53 = K866025403 * (tmp51 - tmp52); + tmp87 = tmp85 - (K500000000 * tmp86); + } + tmp21 = tmp17 + tmp20; + tmp26 = tmp22 + tmp25; + tmp27 = tmp21 + tmp26; + tmp49 = tmp45 - tmp48; + tmp54 = tmp50 - tmp53; + tmp55 = tmp49 + tmp54; + tmp136 = tmp80 + tmp81; + tmp137 = tmp85 + tmp86; + tmp147 = tmp136 + tmp137; + tmp61 = tmp45 + tmp48; + tmp62 = tmp50 + tmp53; + tmp63 = tmp61 + tmp62; + tmp112 = tmp82 - tmp79; + tmp113 = tmp87 - tmp84; + tmp126 = tmp112 + tmp113; + tmp83 = tmp79 + tmp82; + tmp88 = tmp84 + tmp87; + tmp94 = tmp83 + tmp88; + } + { + fftw_real tmp6; + fftw_real tmp9; + fftw_real tmp34; + fftw_real tmp68; + fftw_real tmp69; + fftw_real tmp70; + fftw_real tmp37; + fftw_real tmp71; + fftw_real tmp11; + fftw_real tmp14; + fftw_real tmp39; + fftw_real tmp73; + fftw_real tmp74; + fftw_real tmp75; + fftw_real tmp42; + fftw_real tmp76; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp7; + fftw_real tmp8; + fftw_real tmp35; + fftw_real tmp36; + ASSERT_ALIGNED_DOUBLE; + tmp6 = c_re(input[3 * istride]); + tmp7 = c_re(input[8 * istride]); + tmp8 = c_re(input[13 * istride]); + tmp9 = tmp7 + tmp8; + tmp34 = tmp6 - (K500000000 * tmp9); + tmp68 = K866025403 * (tmp8 - tmp7); + tmp69 = c_im(input[3 * istride]); + tmp35 = c_im(input[8 * istride]); + tmp36 = c_im(input[13 * istride]); + tmp70 = tmp35 + tmp36; + tmp37 = K866025403 * (tmp35 - tmp36); + tmp71 = tmp69 - (K500000000 * tmp70); + } + { + fftw_real tmp12; + fftw_real tmp13; + fftw_real tmp40; + fftw_real tmp41; + ASSERT_ALIGNED_DOUBLE; + tmp11 = c_re(input[12 * istride]); + tmp12 = c_re(input[2 * istride]); + tmp13 = c_re(input[7 * istride]); + tmp14 = tmp12 + tmp13; + tmp39 = tmp11 - (K500000000 * tmp14); + tmp73 = K866025403 * (tmp13 - tmp12); + tmp74 = c_im(input[12 * istride]); + tmp40 = c_im(input[2 * istride]); + tmp41 = c_im(input[7 * istride]); + tmp75 = tmp40 + tmp41; + tmp42 = K866025403 * (tmp40 - tmp41); + tmp76 = tmp74 - (K500000000 * tmp75); + } + tmp10 = tmp6 + tmp9; + tmp15 = tmp11 + tmp14; + tmp16 = tmp10 + tmp15; + tmp38 = tmp34 - tmp37; + tmp43 = tmp39 - tmp42; + tmp44 = tmp38 + tmp43; + tmp139 = tmp69 + tmp70; + tmp140 = tmp74 + tmp75; + tmp146 = tmp139 + tmp140; + tmp58 = tmp34 + tmp37; + tmp59 = tmp39 + tmp42; + tmp60 = tmp58 + tmp59; + tmp115 = tmp71 - tmp68; + tmp116 = tmp76 - tmp73; + tmp125 = tmp115 + tmp116; + tmp72 = tmp68 + tmp71; + tmp77 = tmp73 + tmp76; + tmp93 = tmp72 + tmp77; + } + { + fftw_real tmp134; + fftw_real tmp28; + fftw_real tmp133; + fftw_real tmp142; + fftw_real tmp144; + fftw_real tmp138; + fftw_real tmp141; + fftw_real tmp143; + fftw_real tmp135; + ASSERT_ALIGNED_DOUBLE; + tmp134 = K559016994 * (tmp16 - tmp27); + tmp28 = tmp16 + tmp27; + tmp133 = tmp5 - (K250000000 * tmp28); + tmp138 = tmp136 - tmp137; + tmp141 = tmp139 - tmp140; + tmp142 = (K951056516 * tmp138) - (K587785252 * tmp141); + tmp144 = (K951056516 * tmp141) + (K587785252 * tmp138); + c_re(output[0]) = tmp5 + tmp28; + tmp143 = tmp134 + tmp133; + c_re(output[9 * ostride]) = tmp143 - tmp144; + c_re(output[6 * ostride]) = tmp143 + tmp144; + tmp135 = tmp133 - tmp134; + c_re(output[12 * ostride]) = tmp135 - tmp142; + c_re(output[3 * ostride]) = tmp135 + tmp142; + } + { + fftw_real tmp110; + fftw_real tmp56; + fftw_real tmp109; + fftw_real tmp118; + fftw_real tmp120; + fftw_real tmp114; + fftw_real tmp117; + fftw_real tmp119; + fftw_real tmp111; + ASSERT_ALIGNED_DOUBLE; + tmp110 = K559016994 * (tmp44 - tmp55); + tmp56 = tmp44 + tmp55; + tmp109 = tmp33 - (K250000000 * tmp56); + tmp114 = tmp112 - tmp113; + tmp117 = tmp115 - tmp116; + tmp118 = (K951056516 * tmp114) - (K587785252 * tmp117); + tmp120 = (K951056516 * tmp117) + (K587785252 * tmp114); + c_re(output[5 * ostride]) = tmp33 + tmp56; + tmp119 = tmp110 + tmp109; + c_re(output[14 * ostride]) = tmp119 - tmp120; + c_re(output[11 * ostride]) = tmp119 + tmp120; + tmp111 = tmp109 - tmp110; + c_re(output[2 * ostride]) = tmp111 - tmp118; + c_re(output[8 * ostride]) = tmp111 + tmp118; + } + { + fftw_real tmp150; + fftw_real tmp148; + fftw_real tmp149; + fftw_real tmp154; + fftw_real tmp156; + fftw_real tmp152; + fftw_real tmp153; + fftw_real tmp155; + fftw_real tmp151; + ASSERT_ALIGNED_DOUBLE; + tmp150 = K559016994 * (tmp146 - tmp147); + tmp148 = tmp146 + tmp147; + tmp149 = tmp145 - (K250000000 * tmp148); + tmp152 = tmp21 - tmp26; + tmp153 = tmp10 - tmp15; + tmp154 = (K951056516 * tmp152) - (K587785252 * tmp153); + tmp156 = (K951056516 * tmp153) + (K587785252 * tmp152); + c_im(output[0]) = tmp145 + tmp148; + tmp155 = tmp150 + tmp149; + c_im(output[6 * ostride]) = tmp155 - tmp156; + c_im(output[9 * ostride]) = tmp156 + tmp155; + tmp151 = tmp149 - tmp150; + c_im(output[3 * ostride]) = tmp151 - tmp154; + c_im(output[12 * ostride]) = tmp154 + tmp151; + } + { + fftw_real tmp129; + fftw_real tmp127; + fftw_real tmp128; + fftw_real tmp123; + fftw_real tmp132; + fftw_real tmp121; + fftw_real tmp122; + fftw_real tmp131; + fftw_real tmp130; + ASSERT_ALIGNED_DOUBLE; + tmp129 = K559016994 * (tmp125 - tmp126); + tmp127 = tmp125 + tmp126; + tmp128 = tmp124 - (K250000000 * tmp127); + tmp121 = tmp49 - tmp54; + tmp122 = tmp38 - tmp43; + tmp123 = (K951056516 * tmp121) - (K587785252 * tmp122); + tmp132 = (K951056516 * tmp122) + (K587785252 * tmp121); + c_im(output[5 * ostride]) = tmp124 + tmp127; + tmp131 = tmp129 + tmp128; + c_im(output[11 * ostride]) = tmp131 - tmp132; + c_im(output[14 * ostride]) = tmp132 + tmp131; + tmp130 = tmp128 - tmp129; + c_im(output[2 * ostride]) = tmp123 + tmp130; + c_im(output[8 * ostride]) = tmp130 - tmp123; + } + { + fftw_real tmp95; + fftw_real tmp101; + fftw_real tmp102; + fftw_real tmp106; + fftw_real tmp107; + fftw_real tmp104; + fftw_real tmp105; + fftw_real tmp108; + fftw_real tmp103; + ASSERT_ALIGNED_DOUBLE; + tmp95 = K559016994 * (tmp93 - tmp94); + tmp101 = tmp93 + tmp94; + tmp102 = tmp100 - (K250000000 * tmp101); + tmp104 = tmp58 - tmp59; + tmp105 = tmp61 - tmp62; + tmp106 = (K951056516 * tmp104) + (K587785252 * tmp105); + tmp107 = (K951056516 * tmp105) - (K587785252 * tmp104); + c_im(output[10 * ostride]) = tmp100 + tmp101; + tmp108 = tmp102 - tmp95; + c_im(output[7 * ostride]) = tmp107 + tmp108; + c_im(output[13 * ostride]) = tmp108 - tmp107; + tmp103 = tmp95 + tmp102; + c_im(output[ostride]) = tmp103 - tmp106; + c_im(output[4 * ostride]) = tmp106 + tmp103; + } + { + fftw_real tmp65; + fftw_real tmp64; + fftw_real tmp66; + fftw_real tmp90; + fftw_real tmp92; + fftw_real tmp78; + fftw_real tmp89; + fftw_real tmp91; + fftw_real tmp67; + ASSERT_ALIGNED_DOUBLE; + tmp65 = K559016994 * (tmp60 - tmp63); + tmp64 = tmp60 + tmp63; + tmp66 = tmp57 - (K250000000 * tmp64); + tmp78 = tmp72 - tmp77; + tmp89 = tmp83 - tmp88; + tmp90 = (K951056516 * tmp78) + (K587785252 * tmp89); + tmp92 = (K951056516 * tmp89) - (K587785252 * tmp78); + c_re(output[10 * ostride]) = tmp57 + tmp64; + tmp91 = tmp66 - tmp65; + c_re(output[7 * ostride]) = tmp91 - tmp92; + c_re(output[13 * ostride]) = tmp91 + tmp92; + tmp67 = tmp65 + tmp66; + c_re(output[4 * ostride]) = tmp67 - tmp90; + c_re(output[ostride]) = tmp67 + tmp90; + } +} + +fftw_codelet_desc fftw_no_twiddle_15_desc = +{ + "fftw_no_twiddle_15", + (void (*)()) fftw_no_twiddle_15, + 15, + FFTW_FORWARD, + FFTW_NOTW, + 331, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fn_16.c b/src/sndobj/rfftw/fn_16.c new file mode 100644 index 0000000..cbe06fd --- /dev/null +++ b/src/sndobj/rfftw/fn_16.c @@ -0,0 +1,439 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:43:51 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddle 16 */ + +/* + * This function contains 144 FP additions, 24 FP multiplications, + * (or, 136 additions, 16 multiplications, 8 fused multiply/add), + * 46 stack variables, and 64 memory accesses + */ +static const fftw_real K923879532 = FFTW_KONST(+0.923879532511286756128183189396788286822416626); +static const fftw_real K382683432 = FFTW_KONST(+0.382683432365089771728459984030398866761344562); +static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); + +/* + * Generator Id's : + * $Id: fn_16.c,v 1.1.1.1 2006/05/12 15:14:59 veplaini Exp $ + * $Id: fn_16.c,v 1.1.1.1 2006/05/12 15:14:59 veplaini Exp $ + * $Id: fn_16.c,v 1.1.1.1 2006/05/12 15:14:59 veplaini Exp $ + */ + +void fftw_no_twiddle_16(const fftw_complex *input, fftw_complex *output, int istride, int ostride) +{ + fftw_real tmp7; + fftw_real tmp115; + fftw_real tmp38; + fftw_real tmp129; + fftw_real tmp49; + fftw_real tmp95; + fftw_real tmp83; + fftw_real tmp105; + fftw_real tmp29; + fftw_real tmp123; + fftw_real tmp73; + fftw_real tmp101; + fftw_real tmp78; + fftw_real tmp102; + fftw_real tmp126; + fftw_real tmp141; + fftw_real tmp14; + fftw_real tmp130; + fftw_real tmp45; + fftw_real tmp116; + fftw_real tmp52; + fftw_real tmp85; + fftw_real tmp55; + fftw_real tmp84; + fftw_real tmp22; + fftw_real tmp118; + fftw_real tmp62; + fftw_real tmp98; + fftw_real tmp67; + fftw_real tmp99; + fftw_real tmp121; + fftw_real tmp140; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp3; + fftw_real tmp47; + fftw_real tmp34; + fftw_real tmp82; + fftw_real tmp6; + fftw_real tmp81; + fftw_real tmp37; + fftw_real tmp48; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp32; + fftw_real tmp33; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(input[0]); + tmp2 = c_re(input[8 * istride]); + tmp3 = tmp1 + tmp2; + tmp47 = tmp1 - tmp2; + tmp32 = c_im(input[0]); + tmp33 = c_im(input[8 * istride]); + tmp34 = tmp32 + tmp33; + tmp82 = tmp32 - tmp33; + } + { + fftw_real tmp4; + fftw_real tmp5; + fftw_real tmp35; + fftw_real tmp36; + ASSERT_ALIGNED_DOUBLE; + tmp4 = c_re(input[4 * istride]); + tmp5 = c_re(input[12 * istride]); + tmp6 = tmp4 + tmp5; + tmp81 = tmp4 - tmp5; + tmp35 = c_im(input[4 * istride]); + tmp36 = c_im(input[12 * istride]); + tmp37 = tmp35 + tmp36; + tmp48 = tmp35 - tmp36; + } + tmp7 = tmp3 + tmp6; + tmp115 = tmp3 - tmp6; + tmp38 = tmp34 + tmp37; + tmp129 = tmp34 - tmp37; + tmp49 = tmp47 - tmp48; + tmp95 = tmp47 + tmp48; + tmp83 = tmp81 + tmp82; + tmp105 = tmp82 - tmp81; + } + { + fftw_real tmp25; + fftw_real tmp69; + fftw_real tmp77; + fftw_real tmp124; + fftw_real tmp28; + fftw_real tmp74; + fftw_real tmp72; + fftw_real tmp125; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp23; + fftw_real tmp24; + fftw_real tmp75; + fftw_real tmp76; + ASSERT_ALIGNED_DOUBLE; + tmp23 = c_re(input[15 * istride]); + tmp24 = c_re(input[7 * istride]); + tmp25 = tmp23 + tmp24; + tmp69 = tmp23 - tmp24; + tmp75 = c_im(input[15 * istride]); + tmp76 = c_im(input[7 * istride]); + tmp77 = tmp75 - tmp76; + tmp124 = tmp75 + tmp76; + } + { + fftw_real tmp26; + fftw_real tmp27; + fftw_real tmp70; + fftw_real tmp71; + ASSERT_ALIGNED_DOUBLE; + tmp26 = c_re(input[3 * istride]); + tmp27 = c_re(input[11 * istride]); + tmp28 = tmp26 + tmp27; + tmp74 = tmp26 - tmp27; + tmp70 = c_im(input[3 * istride]); + tmp71 = c_im(input[11 * istride]); + tmp72 = tmp70 - tmp71; + tmp125 = tmp70 + tmp71; + } + tmp29 = tmp25 + tmp28; + tmp123 = tmp25 - tmp28; + tmp73 = tmp69 - tmp72; + tmp101 = tmp69 + tmp72; + tmp78 = tmp74 + tmp77; + tmp102 = tmp77 - tmp74; + tmp126 = tmp124 - tmp125; + tmp141 = tmp124 + tmp125; + } + { + fftw_real tmp10; + fftw_real tmp51; + fftw_real tmp41; + fftw_real tmp50; + fftw_real tmp13; + fftw_real tmp53; + fftw_real tmp44; + fftw_real tmp54; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp8; + fftw_real tmp9; + fftw_real tmp39; + fftw_real tmp40; + ASSERT_ALIGNED_DOUBLE; + tmp8 = c_re(input[2 * istride]); + tmp9 = c_re(input[10 * istride]); + tmp10 = tmp8 + tmp9; + tmp51 = tmp8 - tmp9; + tmp39 = c_im(input[2 * istride]); + tmp40 = c_im(input[10 * istride]); + tmp41 = tmp39 + tmp40; + tmp50 = tmp39 - tmp40; + } + { + fftw_real tmp11; + fftw_real tmp12; + fftw_real tmp42; + fftw_real tmp43; + ASSERT_ALIGNED_DOUBLE; + tmp11 = c_re(input[14 * istride]); + tmp12 = c_re(input[6 * istride]); + tmp13 = tmp11 + tmp12; + tmp53 = tmp11 - tmp12; + tmp42 = c_im(input[14 * istride]); + tmp43 = c_im(input[6 * istride]); + tmp44 = tmp42 + tmp43; + tmp54 = tmp42 - tmp43; + } + tmp14 = tmp10 + tmp13; + tmp130 = tmp13 - tmp10; + tmp45 = tmp41 + tmp44; + tmp116 = tmp41 - tmp44; + tmp52 = tmp50 - tmp51; + tmp85 = tmp51 + tmp50; + tmp55 = tmp53 + tmp54; + tmp84 = tmp53 - tmp54; + } + { + fftw_real tmp18; + fftw_real tmp63; + fftw_real tmp61; + fftw_real tmp119; + fftw_real tmp21; + fftw_real tmp58; + fftw_real tmp66; + fftw_real tmp120; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp16; + fftw_real tmp17; + fftw_real tmp59; + fftw_real tmp60; + ASSERT_ALIGNED_DOUBLE; + tmp16 = c_re(input[istride]); + tmp17 = c_re(input[9 * istride]); + tmp18 = tmp16 + tmp17; + tmp63 = tmp16 - tmp17; + tmp59 = c_im(input[istride]); + tmp60 = c_im(input[9 * istride]); + tmp61 = tmp59 - tmp60; + tmp119 = tmp59 + tmp60; + } + { + fftw_real tmp19; + fftw_real tmp20; + fftw_real tmp64; + fftw_real tmp65; + ASSERT_ALIGNED_DOUBLE; + tmp19 = c_re(input[5 * istride]); + tmp20 = c_re(input[13 * istride]); + tmp21 = tmp19 + tmp20; + tmp58 = tmp19 - tmp20; + tmp64 = c_im(input[5 * istride]); + tmp65 = c_im(input[13 * istride]); + tmp66 = tmp64 - tmp65; + tmp120 = tmp64 + tmp65; + } + tmp22 = tmp18 + tmp21; + tmp118 = tmp18 - tmp21; + tmp62 = tmp58 + tmp61; + tmp98 = tmp61 - tmp58; + tmp67 = tmp63 - tmp66; + tmp99 = tmp63 + tmp66; + tmp121 = tmp119 - tmp120; + tmp140 = tmp119 + tmp120; + } + { + fftw_real tmp15; + fftw_real tmp30; + fftw_real tmp31; + fftw_real tmp46; + ASSERT_ALIGNED_DOUBLE; + tmp15 = tmp7 + tmp14; + tmp30 = tmp22 + tmp29; + c_re(output[8 * ostride]) = tmp15 - tmp30; + c_re(output[0]) = tmp15 + tmp30; + tmp31 = tmp29 - tmp22; + tmp46 = tmp38 - tmp45; + c_im(output[4 * ostride]) = tmp31 + tmp46; + c_im(output[12 * ostride]) = tmp46 - tmp31; + } + { + fftw_real tmp143; + fftw_real tmp144; + fftw_real tmp139; + fftw_real tmp142; + ASSERT_ALIGNED_DOUBLE; + tmp143 = tmp38 + tmp45; + tmp144 = tmp140 + tmp141; + c_im(output[8 * ostride]) = tmp143 - tmp144; + c_im(output[0]) = tmp143 + tmp144; + tmp139 = tmp7 - tmp14; + tmp142 = tmp140 - tmp141; + c_re(output[12 * ostride]) = tmp139 - tmp142; + c_re(output[4 * ostride]) = tmp139 + tmp142; + } + { + fftw_real tmp117; + fftw_real tmp131; + fftw_real tmp128; + fftw_real tmp132; + fftw_real tmp122; + fftw_real tmp127; + ASSERT_ALIGNED_DOUBLE; + tmp117 = tmp115 + tmp116; + tmp131 = tmp129 - tmp130; + tmp122 = tmp118 + tmp121; + tmp127 = tmp123 - tmp126; + tmp128 = K707106781 * (tmp122 + tmp127); + tmp132 = K707106781 * (tmp127 - tmp122); + c_re(output[10 * ostride]) = tmp117 - tmp128; + c_re(output[2 * ostride]) = tmp117 + tmp128; + c_im(output[14 * ostride]) = tmp131 - tmp132; + c_im(output[6 * ostride]) = tmp131 + tmp132; + } + { + fftw_real tmp133; + fftw_real tmp137; + fftw_real tmp136; + fftw_real tmp138; + fftw_real tmp134; + fftw_real tmp135; + ASSERT_ALIGNED_DOUBLE; + tmp133 = tmp115 - tmp116; + tmp137 = tmp130 + tmp129; + tmp134 = tmp121 - tmp118; + tmp135 = tmp123 + tmp126; + tmp136 = K707106781 * (tmp134 - tmp135); + tmp138 = K707106781 * (tmp134 + tmp135); + c_re(output[14 * ostride]) = tmp133 - tmp136; + c_re(output[6 * ostride]) = tmp133 + tmp136; + c_im(output[10 * ostride]) = tmp137 - tmp138; + c_im(output[2 * ostride]) = tmp137 + tmp138; + } + { + fftw_real tmp57; + fftw_real tmp89; + fftw_real tmp92; + fftw_real tmp94; + fftw_real tmp87; + fftw_real tmp93; + fftw_real tmp80; + fftw_real tmp88; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp56; + fftw_real tmp90; + fftw_real tmp91; + fftw_real tmp86; + fftw_real tmp68; + fftw_real tmp79; + ASSERT_ALIGNED_DOUBLE; + tmp56 = K707106781 * (tmp52 - tmp55); + tmp57 = tmp49 + tmp56; + tmp89 = tmp49 - tmp56; + tmp90 = (K382683432 * tmp62) - (K923879532 * tmp67); + tmp91 = (K382683432 * tmp78) + (K923879532 * tmp73); + tmp92 = tmp90 - tmp91; + tmp94 = tmp90 + tmp91; + tmp86 = K707106781 * (tmp84 - tmp85); + tmp87 = tmp83 - tmp86; + tmp93 = tmp83 + tmp86; + tmp68 = (K923879532 * tmp62) + (K382683432 * tmp67); + tmp79 = (K382683432 * tmp73) - (K923879532 * tmp78); + tmp80 = tmp68 + tmp79; + tmp88 = tmp79 - tmp68; + } + c_re(output[11 * ostride]) = tmp57 - tmp80; + c_re(output[3 * ostride]) = tmp57 + tmp80; + c_im(output[15 * ostride]) = tmp87 - tmp88; + c_im(output[7 * ostride]) = tmp87 + tmp88; + c_re(output[15 * ostride]) = tmp89 - tmp92; + c_re(output[7 * ostride]) = tmp89 + tmp92; + c_im(output[11 * ostride]) = tmp93 - tmp94; + c_im(output[3 * ostride]) = tmp93 + tmp94; + } + { + fftw_real tmp97; + fftw_real tmp109; + fftw_real tmp112; + fftw_real tmp114; + fftw_real tmp107; + fftw_real tmp113; + fftw_real tmp104; + fftw_real tmp108; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp96; + fftw_real tmp110; + fftw_real tmp111; + fftw_real tmp106; + fftw_real tmp100; + fftw_real tmp103; + ASSERT_ALIGNED_DOUBLE; + tmp96 = K707106781 * (tmp85 + tmp84); + tmp97 = tmp95 + tmp96; + tmp109 = tmp95 - tmp96; + tmp110 = (K923879532 * tmp98) - (K382683432 * tmp99); + tmp111 = (K923879532 * tmp102) + (K382683432 * tmp101); + tmp112 = tmp110 - tmp111; + tmp114 = tmp110 + tmp111; + tmp106 = K707106781 * (tmp52 + tmp55); + tmp107 = tmp105 - tmp106; + tmp113 = tmp105 + tmp106; + tmp100 = (K382683432 * tmp98) + (K923879532 * tmp99); + tmp103 = (K923879532 * tmp101) - (K382683432 * tmp102); + tmp104 = tmp100 + tmp103; + tmp108 = tmp103 - tmp100; + } + c_re(output[9 * ostride]) = tmp97 - tmp104; + c_re(output[ostride]) = tmp97 + tmp104; + c_im(output[13 * ostride]) = tmp107 - tmp108; + c_im(output[5 * ostride]) = tmp107 + tmp108; + c_re(output[13 * ostride]) = tmp109 - tmp112; + c_re(output[5 * ostride]) = tmp109 + tmp112; + c_im(output[9 * ostride]) = tmp113 - tmp114; + c_im(output[ostride]) = tmp113 + tmp114; + } +} + +fftw_codelet_desc fftw_no_twiddle_16_desc = +{ + "fftw_no_twiddle_16", + (void (*)()) fftw_no_twiddle_16, + 16, + FFTW_FORWARD, + FFTW_NOTW, + 353, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fn_2.c b/src/sndobj/rfftw/fn_2.c new file mode 100644 index 0000000..216a5d5 --- /dev/null +++ b/src/sndobj/rfftw/fn_2.c @@ -0,0 +1,68 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:43:47 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddle 2 */ + +/* + * This function contains 4 FP additions, 0 FP multiplications, + * (or, 4 additions, 0 multiplications, 0 fused multiply/add), + * 4 stack variables, and 8 memory accesses + */ + +/* + * Generator Id's : + * $Id: fn_2.c,v 1.1.1.1 2006/05/12 15:14:45 veplaini Exp $ + * $Id: fn_2.c,v 1.1.1.1 2006/05/12 15:14:45 veplaini Exp $ + * $Id: fn_2.c,v 1.1.1.1 2006/05/12 15:14:45 veplaini Exp $ + */ + +void fftw_no_twiddle_2(const fftw_complex *input, fftw_complex *output, int istride, int ostride) +{ + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp3; + fftw_real tmp4; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(input[0]); + tmp2 = c_re(input[istride]); + c_re(output[ostride]) = tmp1 - tmp2; + c_re(output[0]) = tmp1 + tmp2; + tmp3 = c_im(input[0]); + tmp4 = c_im(input[istride]); + c_im(output[ostride]) = tmp3 - tmp4; + c_im(output[0]) = tmp3 + tmp4; +} + +fftw_codelet_desc fftw_no_twiddle_2_desc = +{ + "fftw_no_twiddle_2", + (void (*)()) fftw_no_twiddle_2, + 2, + FFTW_FORWARD, + FFTW_NOTW, + 45, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fn_3.c b/src/sndobj/rfftw/fn_3.c new file mode 100644 index 0000000..92718aa --- /dev/null +++ b/src/sndobj/rfftw/fn_3.c @@ -0,0 +1,91 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:43:47 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddle 3 */ + +/* + * This function contains 12 FP additions, 4 FP multiplications, + * (or, 10 additions, 2 multiplications, 2 fused multiply/add), + * 12 stack variables, and 12 memory accesses + */ +static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); +static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); + +/* + * Generator Id's : + * $Id: fn_3.c,v 1.1.1.1 2006/05/12 15:14:59 veplaini Exp $ + * $Id: fn_3.c,v 1.1.1.1 2006/05/12 15:14:59 veplaini Exp $ + * $Id: fn_3.c,v 1.1.1.1 2006/05/12 15:14:59 veplaini Exp $ + */ + +void fftw_no_twiddle_3(const fftw_complex *input, fftw_complex *output, int istride, int ostride) +{ + fftw_real tmp1; + fftw_real tmp10; + fftw_real tmp4; + fftw_real tmp9; + fftw_real tmp8; + fftw_real tmp11; + fftw_real tmp5; + fftw_real tmp12; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(input[0]); + tmp10 = c_im(input[0]); + { + fftw_real tmp2; + fftw_real tmp3; + fftw_real tmp6; + fftw_real tmp7; + ASSERT_ALIGNED_DOUBLE; + tmp2 = c_re(input[istride]); + tmp3 = c_re(input[2 * istride]); + tmp4 = tmp2 + tmp3; + tmp9 = K866025403 * (tmp3 - tmp2); + tmp6 = c_im(input[istride]); + tmp7 = c_im(input[2 * istride]); + tmp8 = K866025403 * (tmp6 - tmp7); + tmp11 = tmp6 + tmp7; + } + c_re(output[0]) = tmp1 + tmp4; + tmp5 = tmp1 - (K500000000 * tmp4); + c_re(output[2 * ostride]) = tmp5 - tmp8; + c_re(output[ostride]) = tmp5 + tmp8; + c_im(output[0]) = tmp10 + tmp11; + tmp12 = tmp10 - (K500000000 * tmp11); + c_im(output[ostride]) = tmp9 + tmp12; + c_im(output[2 * ostride]) = tmp12 - tmp9; +} + +fftw_codelet_desc fftw_no_twiddle_3_desc = +{ + "fftw_no_twiddle_3", + (void (*)()) fftw_no_twiddle_3, + 3, + FFTW_FORWARD, + FFTW_NOTW, + 67, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fn_32.c b/src/sndobj/rfftw/fn_32.c new file mode 100644 index 0000000..231a98e --- /dev/null +++ b/src/sndobj/rfftw/fn_32.c @@ -0,0 +1,1042 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:43:51 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddle 32 */ + +/* + * This function contains 372 FP additions, 84 FP multiplications, + * (or, 340 additions, 52 multiplications, 32 fused multiply/add), + * 92 stack variables, and 128 memory accesses + */ +static const fftw_real K831469612 = FFTW_KONST(+0.831469612302545237078788377617905756738560812); +static const fftw_real K555570233 = FFTW_KONST(+0.555570233019602224742830813948532874374937191); +static const fftw_real K195090322 = FFTW_KONST(+0.195090322016128267848284868477022240927691618); +static const fftw_real K980785280 = FFTW_KONST(+0.980785280403230449126182236134239036973933731); +static const fftw_real K923879532 = FFTW_KONST(+0.923879532511286756128183189396788286822416626); +static const fftw_real K382683432 = FFTW_KONST(+0.382683432365089771728459984030398866761344562); +static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); + +/* + * Generator Id's : + * $Id: fn_32.c,v 1.1.1.1 2006/05/12 15:14:46 veplaini Exp $ + * $Id: fn_32.c,v 1.1.1.1 2006/05/12 15:14:46 veplaini Exp $ + * $Id: fn_32.c,v 1.1.1.1 2006/05/12 15:14:46 veplaini Exp $ + */ + +void fftw_no_twiddle_32(const fftw_complex *input, fftw_complex *output, int istride, int ostride) +{ + fftw_real tmp7; + fftw_real tmp275; + fftw_real tmp70; + fftw_real tmp309; + fftw_real tmp97; + fftw_real tmp215; + fftw_real tmp179; + fftw_real tmp241; + fftw_real tmp14; + fftw_real tmp310; + fftw_real tmp77; + fftw_real tmp276; + fftw_real tmp182; + fftw_real tmp216; + fftw_real tmp104; + fftw_real tmp242; + fftw_real tmp153; + fftw_real tmp233; + fftw_real tmp53; + fftw_real tmp60; + fftw_real tmp351; + fftw_real tmp306; + fftw_real tmp330; + fftw_real tmp352; + fftw_real tmp353; + fftw_real tmp354; + fftw_real tmp170; + fftw_real tmp236; + fftw_real tmp301; + fftw_real tmp329; + fftw_real tmp164; + fftw_real tmp237; + fftw_real tmp173; + fftw_real tmp234; + fftw_real tmp22; + fftw_real tmp280; + fftw_real tmp313; + fftw_real tmp85; + fftw_real tmp112; + fftw_real tmp185; + fftw_real tmp220; + fftw_real tmp245; + fftw_real tmp29; + fftw_real tmp283; + fftw_real tmp312; + fftw_real tmp92; + fftw_real tmp119; + fftw_real tmp184; + fftw_real tmp223; + fftw_real tmp244; + fftw_real tmp126; + fftw_real tmp229; + fftw_real tmp38; + fftw_real tmp45; + fftw_real tmp346; + fftw_real tmp295; + fftw_real tmp327; + fftw_real tmp347; + fftw_real tmp348; + fftw_real tmp349; + fftw_real tmp143; + fftw_real tmp226; + fftw_real tmp290; + fftw_real tmp326; + fftw_real tmp137; + fftw_real tmp227; + fftw_real tmp146; + fftw_real tmp230; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp3; + fftw_real tmp95; + fftw_real tmp66; + fftw_real tmp178; + fftw_real tmp6; + fftw_real tmp177; + fftw_real tmp69; + fftw_real tmp96; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp64; + fftw_real tmp65; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(input[0]); + tmp2 = c_re(input[16 * istride]); + tmp3 = tmp1 + tmp2; + tmp95 = tmp1 - tmp2; + tmp64 = c_im(input[0]); + tmp65 = c_im(input[16 * istride]); + tmp66 = tmp64 + tmp65; + tmp178 = tmp64 - tmp65; + } + { + fftw_real tmp4; + fftw_real tmp5; + fftw_real tmp67; + fftw_real tmp68; + ASSERT_ALIGNED_DOUBLE; + tmp4 = c_re(input[8 * istride]); + tmp5 = c_re(input[24 * istride]); + tmp6 = tmp4 + tmp5; + tmp177 = tmp4 - tmp5; + tmp67 = c_im(input[8 * istride]); + tmp68 = c_im(input[24 * istride]); + tmp69 = tmp67 + tmp68; + tmp96 = tmp67 - tmp68; + } + tmp7 = tmp3 + tmp6; + tmp275 = tmp3 - tmp6; + tmp70 = tmp66 + tmp69; + tmp309 = tmp66 - tmp69; + tmp97 = tmp95 - tmp96; + tmp215 = tmp95 + tmp96; + tmp179 = tmp177 + tmp178; + tmp241 = tmp178 - tmp177; + } + { + fftw_real tmp10; + fftw_real tmp99; + fftw_real tmp73; + fftw_real tmp98; + fftw_real tmp13; + fftw_real tmp101; + fftw_real tmp76; + fftw_real tmp102; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp8; + fftw_real tmp9; + fftw_real tmp71; + fftw_real tmp72; + ASSERT_ALIGNED_DOUBLE; + tmp8 = c_re(input[4 * istride]); + tmp9 = c_re(input[20 * istride]); + tmp10 = tmp8 + tmp9; + tmp99 = tmp8 - tmp9; + tmp71 = c_im(input[4 * istride]); + tmp72 = c_im(input[20 * istride]); + tmp73 = tmp71 + tmp72; + tmp98 = tmp71 - tmp72; + } + { + fftw_real tmp11; + fftw_real tmp12; + fftw_real tmp74; + fftw_real tmp75; + ASSERT_ALIGNED_DOUBLE; + tmp11 = c_re(input[28 * istride]); + tmp12 = c_re(input[12 * istride]); + tmp13 = tmp11 + tmp12; + tmp101 = tmp11 - tmp12; + tmp74 = c_im(input[28 * istride]); + tmp75 = c_im(input[12 * istride]); + tmp76 = tmp74 + tmp75; + tmp102 = tmp74 - tmp75; + } + tmp14 = tmp10 + tmp13; + tmp310 = tmp13 - tmp10; + tmp77 = tmp73 + tmp76; + tmp276 = tmp73 - tmp76; + { + fftw_real tmp180; + fftw_real tmp181; + fftw_real tmp100; + fftw_real tmp103; + ASSERT_ALIGNED_DOUBLE; + tmp180 = tmp101 - tmp102; + tmp181 = tmp99 + tmp98; + tmp182 = K707106781 * (tmp180 - tmp181); + tmp216 = K707106781 * (tmp181 + tmp180); + tmp100 = tmp98 - tmp99; + tmp103 = tmp101 + tmp102; + tmp104 = K707106781 * (tmp100 - tmp103); + tmp242 = K707106781 * (tmp100 + tmp103); + } + } + { + fftw_real tmp49; + fftw_real tmp149; + fftw_real tmp169; + fftw_real tmp302; + fftw_real tmp52; + fftw_real tmp166; + fftw_real tmp152; + fftw_real tmp303; + fftw_real tmp56; + fftw_real tmp157; + fftw_real tmp156; + fftw_real tmp298; + fftw_real tmp59; + fftw_real tmp159; + fftw_real tmp162; + fftw_real tmp299; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp47; + fftw_real tmp48; + fftw_real tmp167; + fftw_real tmp168; + ASSERT_ALIGNED_DOUBLE; + tmp47 = c_re(input[31 * istride]); + tmp48 = c_re(input[15 * istride]); + tmp49 = tmp47 + tmp48; + tmp149 = tmp47 - tmp48; + tmp167 = c_im(input[31 * istride]); + tmp168 = c_im(input[15 * istride]); + tmp169 = tmp167 - tmp168; + tmp302 = tmp167 + tmp168; + } + { + fftw_real tmp50; + fftw_real tmp51; + fftw_real tmp150; + fftw_real tmp151; + ASSERT_ALIGNED_DOUBLE; + tmp50 = c_re(input[7 * istride]); + tmp51 = c_re(input[23 * istride]); + tmp52 = tmp50 + tmp51; + tmp166 = tmp50 - tmp51; + tmp150 = c_im(input[7 * istride]); + tmp151 = c_im(input[23 * istride]); + tmp152 = tmp150 - tmp151; + tmp303 = tmp150 + tmp151; + } + { + fftw_real tmp54; + fftw_real tmp55; + fftw_real tmp154; + fftw_real tmp155; + ASSERT_ALIGNED_DOUBLE; + tmp54 = c_re(input[3 * istride]); + tmp55 = c_re(input[19 * istride]); + tmp56 = tmp54 + tmp55; + tmp157 = tmp54 - tmp55; + tmp154 = c_im(input[3 * istride]); + tmp155 = c_im(input[19 * istride]); + tmp156 = tmp154 - tmp155; + tmp298 = tmp154 + tmp155; + } + { + fftw_real tmp57; + fftw_real tmp58; + fftw_real tmp160; + fftw_real tmp161; + ASSERT_ALIGNED_DOUBLE; + tmp57 = c_re(input[27 * istride]); + tmp58 = c_re(input[11 * istride]); + tmp59 = tmp57 + tmp58; + tmp159 = tmp57 - tmp58; + tmp160 = c_im(input[27 * istride]); + tmp161 = c_im(input[11 * istride]); + tmp162 = tmp160 - tmp161; + tmp299 = tmp160 + tmp161; + } + { + fftw_real tmp304; + fftw_real tmp305; + fftw_real tmp297; + fftw_real tmp300; + ASSERT_ALIGNED_DOUBLE; + tmp153 = tmp149 - tmp152; + tmp233 = tmp149 + tmp152; + tmp53 = tmp49 + tmp52; + tmp60 = tmp56 + tmp59; + tmp351 = tmp53 - tmp60; + tmp304 = tmp302 - tmp303; + tmp305 = tmp59 - tmp56; + tmp306 = tmp304 - tmp305; + tmp330 = tmp305 + tmp304; + tmp352 = tmp302 + tmp303; + tmp353 = tmp298 + tmp299; + tmp354 = tmp352 - tmp353; + tmp170 = tmp166 + tmp169; + tmp236 = tmp169 - tmp166; + tmp297 = tmp49 - tmp52; + tmp300 = tmp298 - tmp299; + tmp301 = tmp297 - tmp300; + tmp329 = tmp297 + tmp300; + { + fftw_real tmp158; + fftw_real tmp163; + fftw_real tmp171; + fftw_real tmp172; + ASSERT_ALIGNED_DOUBLE; + tmp158 = tmp156 - tmp157; + tmp163 = tmp159 + tmp162; + tmp164 = K707106781 * (tmp158 - tmp163); + tmp237 = K707106781 * (tmp158 + tmp163); + tmp171 = tmp159 - tmp162; + tmp172 = tmp157 + tmp156; + tmp173 = K707106781 * (tmp171 - tmp172); + tmp234 = K707106781 * (tmp172 + tmp171); + } + } + } + { + fftw_real tmp18; + fftw_real tmp109; + fftw_real tmp81; + fftw_real tmp107; + fftw_real tmp21; + fftw_real tmp106; + fftw_real tmp84; + fftw_real tmp110; + fftw_real tmp278; + fftw_real tmp279; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp16; + fftw_real tmp17; + fftw_real tmp79; + fftw_real tmp80; + ASSERT_ALIGNED_DOUBLE; + tmp16 = c_re(input[2 * istride]); + tmp17 = c_re(input[18 * istride]); + tmp18 = tmp16 + tmp17; + tmp109 = tmp16 - tmp17; + tmp79 = c_im(input[2 * istride]); + tmp80 = c_im(input[18 * istride]); + tmp81 = tmp79 + tmp80; + tmp107 = tmp79 - tmp80; + } + { + fftw_real tmp19; + fftw_real tmp20; + fftw_real tmp82; + fftw_real tmp83; + ASSERT_ALIGNED_DOUBLE; + tmp19 = c_re(input[10 * istride]); + tmp20 = c_re(input[26 * istride]); + tmp21 = tmp19 + tmp20; + tmp106 = tmp19 - tmp20; + tmp82 = c_im(input[10 * istride]); + tmp83 = c_im(input[26 * istride]); + tmp84 = tmp82 + tmp83; + tmp110 = tmp82 - tmp83; + } + tmp22 = tmp18 + tmp21; + tmp278 = tmp81 - tmp84; + tmp279 = tmp18 - tmp21; + tmp280 = tmp278 - tmp279; + tmp313 = tmp279 + tmp278; + tmp85 = tmp81 + tmp84; + { + fftw_real tmp108; + fftw_real tmp111; + fftw_real tmp218; + fftw_real tmp219; + ASSERT_ALIGNED_DOUBLE; + tmp108 = tmp106 + tmp107; + tmp111 = tmp109 - tmp110; + tmp112 = (K382683432 * tmp108) - (K923879532 * tmp111); + tmp185 = (K923879532 * tmp108) + (K382683432 * tmp111); + tmp218 = tmp107 - tmp106; + tmp219 = tmp109 + tmp110; + tmp220 = (K923879532 * tmp218) - (K382683432 * tmp219); + tmp245 = (K382683432 * tmp218) + (K923879532 * tmp219); + } + } + { + fftw_real tmp25; + fftw_real tmp116; + fftw_real tmp88; + fftw_real tmp114; + fftw_real tmp28; + fftw_real tmp113; + fftw_real tmp91; + fftw_real tmp117; + fftw_real tmp281; + fftw_real tmp282; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp23; + fftw_real tmp24; + fftw_real tmp86; + fftw_real tmp87; + ASSERT_ALIGNED_DOUBLE; + tmp23 = c_re(input[30 * istride]); + tmp24 = c_re(input[14 * istride]); + tmp25 = tmp23 + tmp24; + tmp116 = tmp23 - tmp24; + tmp86 = c_im(input[30 * istride]); + tmp87 = c_im(input[14 * istride]); + tmp88 = tmp86 + tmp87; + tmp114 = tmp86 - tmp87; + } + { + fftw_real tmp26; + fftw_real tmp27; + fftw_real tmp89; + fftw_real tmp90; + ASSERT_ALIGNED_DOUBLE; + tmp26 = c_re(input[6 * istride]); + tmp27 = c_re(input[22 * istride]); + tmp28 = tmp26 + tmp27; + tmp113 = tmp26 - tmp27; + tmp89 = c_im(input[6 * istride]); + tmp90 = c_im(input[22 * istride]); + tmp91 = tmp89 + tmp90; + tmp117 = tmp89 - tmp90; + } + tmp29 = tmp25 + tmp28; + tmp281 = tmp25 - tmp28; + tmp282 = tmp88 - tmp91; + tmp283 = tmp281 + tmp282; + tmp312 = tmp281 - tmp282; + tmp92 = tmp88 + tmp91; + { + fftw_real tmp115; + fftw_real tmp118; + fftw_real tmp221; + fftw_real tmp222; + ASSERT_ALIGNED_DOUBLE; + tmp115 = tmp113 + tmp114; + tmp118 = tmp116 - tmp117; + tmp119 = (K382683432 * tmp115) + (K923879532 * tmp118); + tmp184 = (K382683432 * tmp118) - (K923879532 * tmp115); + tmp221 = tmp114 - tmp113; + tmp222 = tmp116 + tmp117; + tmp223 = (K923879532 * tmp221) + (K382683432 * tmp222); + tmp244 = (K923879532 * tmp222) - (K382683432 * tmp221); + } + } + { + fftw_real tmp34; + fftw_real tmp139; + fftw_real tmp125; + fftw_real tmp286; + fftw_real tmp37; + fftw_real tmp122; + fftw_real tmp142; + fftw_real tmp287; + fftw_real tmp41; + fftw_real tmp132; + fftw_real tmp135; + fftw_real tmp292; + fftw_real tmp44; + fftw_real tmp127; + fftw_real tmp130; + fftw_real tmp293; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp32; + fftw_real tmp33; + fftw_real tmp123; + fftw_real tmp124; + ASSERT_ALIGNED_DOUBLE; + tmp32 = c_re(input[istride]); + tmp33 = c_re(input[17 * istride]); + tmp34 = tmp32 + tmp33; + tmp139 = tmp32 - tmp33; + tmp123 = c_im(input[istride]); + tmp124 = c_im(input[17 * istride]); + tmp125 = tmp123 - tmp124; + tmp286 = tmp123 + tmp124; + } + { + fftw_real tmp35; + fftw_real tmp36; + fftw_real tmp140; + fftw_real tmp141; + ASSERT_ALIGNED_DOUBLE; + tmp35 = c_re(input[9 * istride]); + tmp36 = c_re(input[25 * istride]); + tmp37 = tmp35 + tmp36; + tmp122 = tmp35 - tmp36; + tmp140 = c_im(input[9 * istride]); + tmp141 = c_im(input[25 * istride]); + tmp142 = tmp140 - tmp141; + tmp287 = tmp140 + tmp141; + } + { + fftw_real tmp39; + fftw_real tmp40; + fftw_real tmp133; + fftw_real tmp134; + ASSERT_ALIGNED_DOUBLE; + tmp39 = c_re(input[5 * istride]); + tmp40 = c_re(input[21 * istride]); + tmp41 = tmp39 + tmp40; + tmp132 = tmp39 - tmp40; + tmp133 = c_im(input[5 * istride]); + tmp134 = c_im(input[21 * istride]); + tmp135 = tmp133 - tmp134; + tmp292 = tmp133 + tmp134; + } + { + fftw_real tmp42; + fftw_real tmp43; + fftw_real tmp128; + fftw_real tmp129; + ASSERT_ALIGNED_DOUBLE; + tmp42 = c_re(input[29 * istride]); + tmp43 = c_re(input[13 * istride]); + tmp44 = tmp42 + tmp43; + tmp127 = tmp42 - tmp43; + tmp128 = c_im(input[29 * istride]); + tmp129 = c_im(input[13 * istride]); + tmp130 = tmp128 - tmp129; + tmp293 = tmp128 + tmp129; + } + { + fftw_real tmp291; + fftw_real tmp294; + fftw_real tmp288; + fftw_real tmp289; + ASSERT_ALIGNED_DOUBLE; + tmp126 = tmp122 + tmp125; + tmp229 = tmp125 - tmp122; + tmp38 = tmp34 + tmp37; + tmp45 = tmp41 + tmp44; + tmp346 = tmp38 - tmp45; + tmp291 = tmp34 - tmp37; + tmp294 = tmp292 - tmp293; + tmp295 = tmp291 - tmp294; + tmp327 = tmp291 + tmp294; + tmp347 = tmp286 + tmp287; + tmp348 = tmp292 + tmp293; + tmp349 = tmp347 - tmp348; + tmp143 = tmp139 - tmp142; + tmp226 = tmp139 + tmp142; + tmp288 = tmp286 - tmp287; + tmp289 = tmp44 - tmp41; + tmp290 = tmp288 - tmp289; + tmp326 = tmp289 + tmp288; + { + fftw_real tmp131; + fftw_real tmp136; + fftw_real tmp144; + fftw_real tmp145; + ASSERT_ALIGNED_DOUBLE; + tmp131 = tmp127 - tmp130; + tmp136 = tmp132 + tmp135; + tmp137 = K707106781 * (tmp131 - tmp136); + tmp227 = K707106781 * (tmp136 + tmp131); + tmp144 = tmp135 - tmp132; + tmp145 = tmp127 + tmp130; + tmp146 = K707106781 * (tmp144 - tmp145); + tmp230 = K707106781 * (tmp144 + tmp145); + } + } + } + { + fftw_real tmp285; + fftw_real tmp317; + fftw_real tmp320; + fftw_real tmp322; + fftw_real tmp308; + fftw_real tmp316; + fftw_real tmp315; + fftw_real tmp321; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp277; + fftw_real tmp284; + fftw_real tmp318; + fftw_real tmp319; + ASSERT_ALIGNED_DOUBLE; + tmp277 = tmp275 - tmp276; + tmp284 = K707106781 * (tmp280 - tmp283); + tmp285 = tmp277 + tmp284; + tmp317 = tmp277 - tmp284; + tmp318 = (K382683432 * tmp290) - (K923879532 * tmp295); + tmp319 = (K382683432 * tmp306) + (K923879532 * tmp301); + tmp320 = tmp318 - tmp319; + tmp322 = tmp318 + tmp319; + } + { + fftw_real tmp296; + fftw_real tmp307; + fftw_real tmp311; + fftw_real tmp314; + ASSERT_ALIGNED_DOUBLE; + tmp296 = (K923879532 * tmp290) + (K382683432 * tmp295); + tmp307 = (K382683432 * tmp301) - (K923879532 * tmp306); + tmp308 = tmp296 + tmp307; + tmp316 = tmp307 - tmp296; + tmp311 = tmp309 - tmp310; + tmp314 = K707106781 * (tmp312 - tmp313); + tmp315 = tmp311 - tmp314; + tmp321 = tmp311 + tmp314; + } + c_re(output[22 * ostride]) = tmp285 - tmp308; + c_re(output[6 * ostride]) = tmp285 + tmp308; + c_im(output[30 * ostride]) = tmp315 - tmp316; + c_im(output[14 * ostride]) = tmp315 + tmp316; + c_re(output[30 * ostride]) = tmp317 - tmp320; + c_re(output[14 * ostride]) = tmp317 + tmp320; + c_im(output[22 * ostride]) = tmp321 - tmp322; + c_im(output[6 * ostride]) = tmp321 + tmp322; + } + { + fftw_real tmp325; + fftw_real tmp337; + fftw_real tmp340; + fftw_real tmp342; + fftw_real tmp332; + fftw_real tmp336; + fftw_real tmp335; + fftw_real tmp341; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp323; + fftw_real tmp324; + fftw_real tmp338; + fftw_real tmp339; + ASSERT_ALIGNED_DOUBLE; + tmp323 = tmp275 + tmp276; + tmp324 = K707106781 * (tmp313 + tmp312); + tmp325 = tmp323 + tmp324; + tmp337 = tmp323 - tmp324; + tmp338 = (K923879532 * tmp326) - (K382683432 * tmp327); + tmp339 = (K923879532 * tmp330) + (K382683432 * tmp329); + tmp340 = tmp338 - tmp339; + tmp342 = tmp338 + tmp339; + } + { + fftw_real tmp328; + fftw_real tmp331; + fftw_real tmp333; + fftw_real tmp334; + ASSERT_ALIGNED_DOUBLE; + tmp328 = (K382683432 * tmp326) + (K923879532 * tmp327); + tmp331 = (K923879532 * tmp329) - (K382683432 * tmp330); + tmp332 = tmp328 + tmp331; + tmp336 = tmp331 - tmp328; + tmp333 = tmp310 + tmp309; + tmp334 = K707106781 * (tmp280 + tmp283); + tmp335 = tmp333 - tmp334; + tmp341 = tmp333 + tmp334; + } + c_re(output[18 * ostride]) = tmp325 - tmp332; + c_re(output[2 * ostride]) = tmp325 + tmp332; + c_im(output[26 * ostride]) = tmp335 - tmp336; + c_im(output[10 * ostride]) = tmp335 + tmp336; + c_re(output[26 * ostride]) = tmp337 - tmp340; + c_re(output[10 * ostride]) = tmp337 + tmp340; + c_im(output[18 * ostride]) = tmp341 - tmp342; + c_im(output[2 * ostride]) = tmp341 + tmp342; + } + { + fftw_real tmp345; + fftw_real tmp361; + fftw_real tmp364; + fftw_real tmp366; + fftw_real tmp356; + fftw_real tmp360; + fftw_real tmp359; + fftw_real tmp365; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp343; + fftw_real tmp344; + fftw_real tmp362; + fftw_real tmp363; + ASSERT_ALIGNED_DOUBLE; + tmp343 = tmp7 - tmp14; + tmp344 = tmp85 - tmp92; + tmp345 = tmp343 + tmp344; + tmp361 = tmp343 - tmp344; + tmp362 = tmp349 - tmp346; + tmp363 = tmp351 + tmp354; + tmp364 = K707106781 * (tmp362 - tmp363); + tmp366 = K707106781 * (tmp362 + tmp363); + } + { + fftw_real tmp350; + fftw_real tmp355; + fftw_real tmp357; + fftw_real tmp358; + ASSERT_ALIGNED_DOUBLE; + tmp350 = tmp346 + tmp349; + tmp355 = tmp351 - tmp354; + tmp356 = K707106781 * (tmp350 + tmp355); + tmp360 = K707106781 * (tmp355 - tmp350); + tmp357 = tmp70 - tmp77; + tmp358 = tmp29 - tmp22; + tmp359 = tmp357 - tmp358; + tmp365 = tmp358 + tmp357; + } + c_re(output[20 * ostride]) = tmp345 - tmp356; + c_re(output[4 * ostride]) = tmp345 + tmp356; + c_im(output[28 * ostride]) = tmp359 - tmp360; + c_im(output[12 * ostride]) = tmp359 + tmp360; + c_re(output[28 * ostride]) = tmp361 - tmp364; + c_re(output[12 * ostride]) = tmp361 + tmp364; + c_im(output[20 * ostride]) = tmp365 - tmp366; + c_im(output[4 * ostride]) = tmp365 + tmp366; + } + { + fftw_real tmp31; + fftw_real tmp367; + fftw_real tmp370; + fftw_real tmp372; + fftw_real tmp62; + fftw_real tmp63; + fftw_real tmp94; + fftw_real tmp371; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp15; + fftw_real tmp30; + fftw_real tmp368; + fftw_real tmp369; + ASSERT_ALIGNED_DOUBLE; + tmp15 = tmp7 + tmp14; + tmp30 = tmp22 + tmp29; + tmp31 = tmp15 + tmp30; + tmp367 = tmp15 - tmp30; + tmp368 = tmp347 + tmp348; + tmp369 = tmp352 + tmp353; + tmp370 = tmp368 - tmp369; + tmp372 = tmp368 + tmp369; + } + { + fftw_real tmp46; + fftw_real tmp61; + fftw_real tmp78; + fftw_real tmp93; + ASSERT_ALIGNED_DOUBLE; + tmp46 = tmp38 + tmp45; + tmp61 = tmp53 + tmp60; + tmp62 = tmp46 + tmp61; + tmp63 = tmp61 - tmp46; + tmp78 = tmp70 + tmp77; + tmp93 = tmp85 + tmp92; + tmp94 = tmp78 - tmp93; + tmp371 = tmp78 + tmp93; + } + c_re(output[16 * ostride]) = tmp31 - tmp62; + c_re(output[0]) = tmp31 + tmp62; + c_im(output[8 * ostride]) = tmp63 + tmp94; + c_im(output[24 * ostride]) = tmp94 - tmp63; + c_re(output[24 * ostride]) = tmp367 - tmp370; + c_re(output[8 * ostride]) = tmp367 + tmp370; + c_im(output[16 * ostride]) = tmp371 - tmp372; + c_im(output[0]) = tmp371 + tmp372; + } + { + fftw_real tmp121; + fftw_real tmp189; + fftw_real tmp187; + fftw_real tmp193; + fftw_real tmp148; + fftw_real tmp190; + fftw_real tmp175; + fftw_real tmp191; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp105; + fftw_real tmp120; + fftw_real tmp183; + fftw_real tmp186; + ASSERT_ALIGNED_DOUBLE; + tmp105 = tmp97 - tmp104; + tmp120 = tmp112 - tmp119; + tmp121 = tmp105 + tmp120; + tmp189 = tmp105 - tmp120; + tmp183 = tmp179 - tmp182; + tmp186 = tmp184 - tmp185; + tmp187 = tmp183 - tmp186; + tmp193 = tmp183 + tmp186; + } + { + fftw_real tmp138; + fftw_real tmp147; + fftw_real tmp165; + fftw_real tmp174; + ASSERT_ALIGNED_DOUBLE; + tmp138 = tmp126 - tmp137; + tmp147 = tmp143 - tmp146; + tmp148 = (K980785280 * tmp138) + (K195090322 * tmp147); + tmp190 = (K195090322 * tmp138) - (K980785280 * tmp147); + tmp165 = tmp153 - tmp164; + tmp174 = tmp170 - tmp173; + tmp175 = (K195090322 * tmp165) - (K980785280 * tmp174); + tmp191 = (K195090322 * tmp174) + (K980785280 * tmp165); + } + { + fftw_real tmp176; + fftw_real tmp188; + fftw_real tmp192; + fftw_real tmp194; + ASSERT_ALIGNED_DOUBLE; + tmp176 = tmp148 + tmp175; + c_re(output[23 * ostride]) = tmp121 - tmp176; + c_re(output[7 * ostride]) = tmp121 + tmp176; + tmp188 = tmp175 - tmp148; + c_im(output[31 * ostride]) = tmp187 - tmp188; + c_im(output[15 * ostride]) = tmp187 + tmp188; + tmp192 = tmp190 - tmp191; + c_re(output[31 * ostride]) = tmp189 - tmp192; + c_re(output[15 * ostride]) = tmp189 + tmp192; + tmp194 = tmp190 + tmp191; + c_im(output[23 * ostride]) = tmp193 - tmp194; + c_im(output[7 * ostride]) = tmp193 + tmp194; + } + } + { + fftw_real tmp197; + fftw_real tmp209; + fftw_real tmp207; + fftw_real tmp213; + fftw_real tmp200; + fftw_real tmp210; + fftw_real tmp203; + fftw_real tmp211; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp195; + fftw_real tmp196; + fftw_real tmp205; + fftw_real tmp206; + ASSERT_ALIGNED_DOUBLE; + tmp195 = tmp97 + tmp104; + tmp196 = tmp185 + tmp184; + tmp197 = tmp195 + tmp196; + tmp209 = tmp195 - tmp196; + tmp205 = tmp179 + tmp182; + tmp206 = tmp112 + tmp119; + tmp207 = tmp205 - tmp206; + tmp213 = tmp205 + tmp206; + } + { + fftw_real tmp198; + fftw_real tmp199; + fftw_real tmp201; + fftw_real tmp202; + ASSERT_ALIGNED_DOUBLE; + tmp198 = tmp126 + tmp137; + tmp199 = tmp143 + tmp146; + tmp200 = (K555570233 * tmp198) + (K831469612 * tmp199); + tmp210 = (K831469612 * tmp198) - (K555570233 * tmp199); + tmp201 = tmp153 + tmp164; + tmp202 = tmp170 + tmp173; + tmp203 = (K831469612 * tmp201) - (K555570233 * tmp202); + tmp211 = (K831469612 * tmp202) + (K555570233 * tmp201); + } + { + fftw_real tmp204; + fftw_real tmp208; + fftw_real tmp212; + fftw_real tmp214; + ASSERT_ALIGNED_DOUBLE; + tmp204 = tmp200 + tmp203; + c_re(output[19 * ostride]) = tmp197 - tmp204; + c_re(output[3 * ostride]) = tmp197 + tmp204; + tmp208 = tmp203 - tmp200; + c_im(output[27 * ostride]) = tmp207 - tmp208; + c_im(output[11 * ostride]) = tmp207 + tmp208; + tmp212 = tmp210 - tmp211; + c_re(output[27 * ostride]) = tmp209 - tmp212; + c_re(output[11 * ostride]) = tmp209 + tmp212; + tmp214 = tmp210 + tmp211; + c_im(output[19 * ostride]) = tmp213 - tmp214; + c_im(output[3 * ostride]) = tmp213 + tmp214; + } + } + { + fftw_real tmp225; + fftw_real tmp249; + fftw_real tmp247; + fftw_real tmp253; + fftw_real tmp232; + fftw_real tmp250; + fftw_real tmp239; + fftw_real tmp251; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp217; + fftw_real tmp224; + fftw_real tmp243; + fftw_real tmp246; + ASSERT_ALIGNED_DOUBLE; + tmp217 = tmp215 - tmp216; + tmp224 = tmp220 - tmp223; + tmp225 = tmp217 + tmp224; + tmp249 = tmp217 - tmp224; + tmp243 = tmp241 - tmp242; + tmp246 = tmp244 - tmp245; + tmp247 = tmp243 - tmp246; + tmp253 = tmp243 + tmp246; + } + { + fftw_real tmp228; + fftw_real tmp231; + fftw_real tmp235; + fftw_real tmp238; + ASSERT_ALIGNED_DOUBLE; + tmp228 = tmp226 - tmp227; + tmp231 = tmp229 - tmp230; + tmp232 = (K555570233 * tmp228) + (K831469612 * tmp231); + tmp250 = (K555570233 * tmp231) - (K831469612 * tmp228); + tmp235 = tmp233 - tmp234; + tmp238 = tmp236 - tmp237; + tmp239 = (K555570233 * tmp235) - (K831469612 * tmp238); + tmp251 = (K831469612 * tmp235) + (K555570233 * tmp238); + } + { + fftw_real tmp240; + fftw_real tmp248; + fftw_real tmp252; + fftw_real tmp254; + ASSERT_ALIGNED_DOUBLE; + tmp240 = tmp232 + tmp239; + c_re(output[21 * ostride]) = tmp225 - tmp240; + c_re(output[5 * ostride]) = tmp225 + tmp240; + tmp248 = tmp239 - tmp232; + c_im(output[29 * ostride]) = tmp247 - tmp248; + c_im(output[13 * ostride]) = tmp247 + tmp248; + tmp252 = tmp250 - tmp251; + c_re(output[29 * ostride]) = tmp249 - tmp252; + c_re(output[13 * ostride]) = tmp249 + tmp252; + tmp254 = tmp250 + tmp251; + c_im(output[21 * ostride]) = tmp253 - tmp254; + c_im(output[5 * ostride]) = tmp253 + tmp254; + } + } + { + fftw_real tmp257; + fftw_real tmp269; + fftw_real tmp267; + fftw_real tmp273; + fftw_real tmp260; + fftw_real tmp270; + fftw_real tmp263; + fftw_real tmp271; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp255; + fftw_real tmp256; + fftw_real tmp265; + fftw_real tmp266; + ASSERT_ALIGNED_DOUBLE; + tmp255 = tmp215 + tmp216; + tmp256 = tmp245 + tmp244; + tmp257 = tmp255 + tmp256; + tmp269 = tmp255 - tmp256; + tmp265 = tmp241 + tmp242; + tmp266 = tmp220 + tmp223; + tmp267 = tmp265 - tmp266; + tmp273 = tmp265 + tmp266; + } + { + fftw_real tmp258; + fftw_real tmp259; + fftw_real tmp261; + fftw_real tmp262; + ASSERT_ALIGNED_DOUBLE; + tmp258 = tmp226 + tmp227; + tmp259 = tmp229 + tmp230; + tmp260 = (K980785280 * tmp258) + (K195090322 * tmp259); + tmp270 = (K980785280 * tmp259) - (K195090322 * tmp258); + tmp261 = tmp233 + tmp234; + tmp262 = tmp236 + tmp237; + tmp263 = (K980785280 * tmp261) - (K195090322 * tmp262); + tmp271 = (K195090322 * tmp261) + (K980785280 * tmp262); + } + { + fftw_real tmp264; + fftw_real tmp268; + fftw_real tmp272; + fftw_real tmp274; + ASSERT_ALIGNED_DOUBLE; + tmp264 = tmp260 + tmp263; + c_re(output[17 * ostride]) = tmp257 - tmp264; + c_re(output[ostride]) = tmp257 + tmp264; + tmp268 = tmp263 - tmp260; + c_im(output[25 * ostride]) = tmp267 - tmp268; + c_im(output[9 * ostride]) = tmp267 + tmp268; + tmp272 = tmp270 - tmp271; + c_re(output[25 * ostride]) = tmp269 - tmp272; + c_re(output[9 * ostride]) = tmp269 + tmp272; + tmp274 = tmp270 + tmp271; + c_im(output[17 * ostride]) = tmp273 - tmp274; + c_im(output[ostride]) = tmp273 + tmp274; + } + } +} + +fftw_codelet_desc fftw_no_twiddle_32_desc = +{ + "fftw_no_twiddle_32", + (void (*)()) fftw_no_twiddle_32, + 32, + FFTW_FORWARD, + FFTW_NOTW, + 705, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fn_4.c b/src/sndobj/rfftw/fn_4.c new file mode 100644 index 0000000..496667b --- /dev/null +++ b/src/sndobj/rfftw/fn_4.c @@ -0,0 +1,102 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:43:47 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddle 4 */ + +/* + * This function contains 16 FP additions, 0 FP multiplications, + * (or, 16 additions, 0 multiplications, 0 fused multiply/add), + * 12 stack variables, and 16 memory accesses + */ + +/* + * Generator Id's : + * $Id: fn_4.c,v 1.1.1.1 2006/05/12 15:15:01 veplaini Exp $ + * $Id: fn_4.c,v 1.1.1.1 2006/05/12 15:15:01 veplaini Exp $ + * $Id: fn_4.c,v 1.1.1.1 2006/05/12 15:15:01 veplaini Exp $ + */ + +void fftw_no_twiddle_4(const fftw_complex *input, fftw_complex *output, int istride, int ostride) +{ + fftw_real tmp3; + fftw_real tmp11; + fftw_real tmp9; + fftw_real tmp15; + fftw_real tmp6; + fftw_real tmp10; + fftw_real tmp14; + fftw_real tmp16; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp7; + fftw_real tmp8; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(input[0]); + tmp2 = c_re(input[2 * istride]); + tmp3 = tmp1 + tmp2; + tmp11 = tmp1 - tmp2; + tmp7 = c_im(input[0]); + tmp8 = c_im(input[2 * istride]); + tmp9 = tmp7 - tmp8; + tmp15 = tmp7 + tmp8; + } + { + fftw_real tmp4; + fftw_real tmp5; + fftw_real tmp12; + fftw_real tmp13; + ASSERT_ALIGNED_DOUBLE; + tmp4 = c_re(input[istride]); + tmp5 = c_re(input[3 * istride]); + tmp6 = tmp4 + tmp5; + tmp10 = tmp4 - tmp5; + tmp12 = c_im(input[istride]); + tmp13 = c_im(input[3 * istride]); + tmp14 = tmp12 - tmp13; + tmp16 = tmp12 + tmp13; + } + c_re(output[2 * ostride]) = tmp3 - tmp6; + c_re(output[0]) = tmp3 + tmp6; + c_im(output[ostride]) = tmp9 - tmp10; + c_im(output[3 * ostride]) = tmp10 + tmp9; + c_re(output[3 * ostride]) = tmp11 - tmp14; + c_re(output[ostride]) = tmp11 + tmp14; + c_im(output[2 * ostride]) = tmp15 - tmp16; + c_im(output[0]) = tmp15 + tmp16; +} + +fftw_codelet_desc fftw_no_twiddle_4_desc = +{ + "fftw_no_twiddle_4", + (void (*)()) fftw_no_twiddle_4, + 4, + FFTW_FORWARD, + FFTW_NOTW, + 89, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fn_5.c b/src/sndobj/rfftw/fn_5.c new file mode 100644 index 0000000..5001163 --- /dev/null +++ b/src/sndobj/rfftw/fn_5.c @@ -0,0 +1,146 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:43:47 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddle 5 */ + +/* + * This function contains 32 FP additions, 12 FP multiplications, + * (or, 26 additions, 6 multiplications, 6 fused multiply/add), + * 16 stack variables, and 20 memory accesses + */ +static const fftw_real K250000000 = FFTW_KONST(+0.250000000000000000000000000000000000000000000); +static const fftw_real K587785252 = FFTW_KONST(+0.587785252292473129168705954639072768597652438); +static const fftw_real K951056516 = FFTW_KONST(+0.951056516295153572116439333379382143405698634); +static const fftw_real K559016994 = FFTW_KONST(+0.559016994374947424102293417182819058860154590); + +/* + * Generator Id's : + * $Id: fn_5.c,v 1.1.1.1 2006/05/12 15:14:50 veplaini Exp $ + * $Id: fn_5.c,v 1.1.1.1 2006/05/12 15:14:50 veplaini Exp $ + * $Id: fn_5.c,v 1.1.1.1 2006/05/12 15:14:50 veplaini Exp $ + */ + +void fftw_no_twiddle_5(const fftw_complex *input, fftw_complex *output, int istride, int ostride) +{ + fftw_real tmp1; + fftw_real tmp24; + fftw_real tmp8; + fftw_real tmp9; + fftw_real tmp28; + fftw_real tmp29; + fftw_real tmp14; + fftw_real tmp25; + fftw_real tmp23; + fftw_real tmp17; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(input[0]); + tmp24 = c_im(input[0]); + { + fftw_real tmp2; + fftw_real tmp3; + fftw_real tmp4; + fftw_real tmp5; + fftw_real tmp6; + fftw_real tmp7; + ASSERT_ALIGNED_DOUBLE; + tmp2 = c_re(input[istride]); + tmp3 = c_re(input[4 * istride]); + tmp4 = tmp2 + tmp3; + tmp5 = c_re(input[2 * istride]); + tmp6 = c_re(input[3 * istride]); + tmp7 = tmp5 + tmp6; + tmp8 = tmp4 + tmp7; + tmp9 = K559016994 * (tmp4 - tmp7); + tmp28 = tmp2 - tmp3; + tmp29 = tmp5 - tmp6; + } + { + fftw_real tmp12; + fftw_real tmp13; + fftw_real tmp21; + fftw_real tmp15; + fftw_real tmp16; + fftw_real tmp22; + ASSERT_ALIGNED_DOUBLE; + tmp12 = c_im(input[istride]); + tmp13 = c_im(input[4 * istride]); + tmp21 = tmp12 + tmp13; + tmp15 = c_im(input[2 * istride]); + tmp16 = c_im(input[3 * istride]); + tmp22 = tmp15 + tmp16; + tmp14 = tmp12 - tmp13; + tmp25 = tmp21 + tmp22; + tmp23 = K559016994 * (tmp21 - tmp22); + tmp17 = tmp15 - tmp16; + } + c_re(output[0]) = tmp1 + tmp8; + { + fftw_real tmp18; + fftw_real tmp20; + fftw_real tmp11; + fftw_real tmp19; + fftw_real tmp10; + ASSERT_ALIGNED_DOUBLE; + tmp18 = (K951056516 * tmp14) + (K587785252 * tmp17); + tmp20 = (K951056516 * tmp17) - (K587785252 * tmp14); + tmp10 = tmp1 - (K250000000 * tmp8); + tmp11 = tmp9 + tmp10; + tmp19 = tmp10 - tmp9; + c_re(output[4 * ostride]) = tmp11 - tmp18; + c_re(output[ostride]) = tmp11 + tmp18; + c_re(output[2 * ostride]) = tmp19 - tmp20; + c_re(output[3 * ostride]) = tmp19 + tmp20; + } + c_im(output[0]) = tmp24 + tmp25; + { + fftw_real tmp30; + fftw_real tmp31; + fftw_real tmp27; + fftw_real tmp32; + fftw_real tmp26; + ASSERT_ALIGNED_DOUBLE; + tmp30 = (K951056516 * tmp28) + (K587785252 * tmp29); + tmp31 = (K951056516 * tmp29) - (K587785252 * tmp28); + tmp26 = tmp24 - (K250000000 * tmp25); + tmp27 = tmp23 + tmp26; + tmp32 = tmp26 - tmp23; + c_im(output[ostride]) = tmp27 - tmp30; + c_im(output[4 * ostride]) = tmp30 + tmp27; + c_im(output[2 * ostride]) = tmp31 + tmp32; + c_im(output[3 * ostride]) = tmp32 - tmp31; + } +} + +fftw_codelet_desc fftw_no_twiddle_5_desc = +{ + "fftw_no_twiddle_5", + (void (*)()) fftw_no_twiddle_5, + 5, + FFTW_FORWARD, + FFTW_NOTW, + 111, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fn_6.c b/src/sndobj/rfftw/fn_6.c new file mode 100644 index 0000000..0f2c7e3 --- /dev/null +++ b/src/sndobj/rfftw/fn_6.c @@ -0,0 +1,157 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:43:47 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddle 6 */ + +/* + * This function contains 36 FP additions, 8 FP multiplications, + * (or, 32 additions, 4 multiplications, 4 fused multiply/add), + * 20 stack variables, and 24 memory accesses + */ +static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); +static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); + +/* + * Generator Id's : + * $Id: fn_6.c,v 1.1.1.1 2006/05/12 15:14:58 veplaini Exp $ + * $Id: fn_6.c,v 1.1.1.1 2006/05/12 15:14:58 veplaini Exp $ + * $Id: fn_6.c,v 1.1.1.1 2006/05/12 15:14:58 veplaini Exp $ + */ + +void fftw_no_twiddle_6(const fftw_complex *input, fftw_complex *output, int istride, int ostride) +{ + fftw_real tmp3; + fftw_real tmp11; + fftw_real tmp26; + fftw_real tmp33; + fftw_real tmp6; + fftw_real tmp12; + fftw_real tmp9; + fftw_real tmp13; + fftw_real tmp10; + fftw_real tmp14; + fftw_real tmp18; + fftw_real tmp30; + fftw_real tmp21; + fftw_real tmp31; + fftw_real tmp27; + fftw_real tmp34; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp24; + fftw_real tmp25; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(input[0]); + tmp2 = c_re(input[3 * istride]); + tmp3 = tmp1 - tmp2; + tmp11 = tmp1 + tmp2; + tmp24 = c_im(input[0]); + tmp25 = c_im(input[3 * istride]); + tmp26 = tmp24 - tmp25; + tmp33 = tmp24 + tmp25; + } + { + fftw_real tmp4; + fftw_real tmp5; + fftw_real tmp7; + fftw_real tmp8; + ASSERT_ALIGNED_DOUBLE; + tmp4 = c_re(input[2 * istride]); + tmp5 = c_re(input[5 * istride]); + tmp6 = tmp4 - tmp5; + tmp12 = tmp4 + tmp5; + tmp7 = c_re(input[4 * istride]); + tmp8 = c_re(input[istride]); + tmp9 = tmp7 - tmp8; + tmp13 = tmp7 + tmp8; + } + tmp10 = tmp6 + tmp9; + tmp14 = tmp12 + tmp13; + { + fftw_real tmp16; + fftw_real tmp17; + fftw_real tmp19; + fftw_real tmp20; + ASSERT_ALIGNED_DOUBLE; + tmp16 = c_im(input[2 * istride]); + tmp17 = c_im(input[5 * istride]); + tmp18 = tmp16 - tmp17; + tmp30 = tmp16 + tmp17; + tmp19 = c_im(input[4 * istride]); + tmp20 = c_im(input[istride]); + tmp21 = tmp19 - tmp20; + tmp31 = tmp19 + tmp20; + } + tmp27 = tmp18 + tmp21; + tmp34 = tmp30 + tmp31; + { + fftw_real tmp15; + fftw_real tmp22; + fftw_real tmp29; + fftw_real tmp32; + ASSERT_ALIGNED_DOUBLE; + c_re(output[3 * ostride]) = tmp3 + tmp10; + tmp15 = tmp3 - (K500000000 * tmp10); + tmp22 = K866025403 * (tmp18 - tmp21); + c_re(output[5 * ostride]) = tmp15 - tmp22; + c_re(output[ostride]) = tmp15 + tmp22; + c_re(output[0]) = tmp11 + tmp14; + tmp29 = tmp11 - (K500000000 * tmp14); + tmp32 = K866025403 * (tmp30 - tmp31); + c_re(output[2 * ostride]) = tmp29 - tmp32; + c_re(output[4 * ostride]) = tmp29 + tmp32; + } + { + fftw_real tmp23; + fftw_real tmp28; + fftw_real tmp35; + fftw_real tmp36; + ASSERT_ALIGNED_DOUBLE; + c_im(output[3 * ostride]) = tmp26 + tmp27; + tmp23 = K866025403 * (tmp9 - tmp6); + tmp28 = tmp26 - (K500000000 * tmp27); + c_im(output[ostride]) = tmp23 + tmp28; + c_im(output[5 * ostride]) = tmp28 - tmp23; + c_im(output[0]) = tmp33 + tmp34; + tmp35 = tmp33 - (K500000000 * tmp34); + tmp36 = K866025403 * (tmp13 - tmp12); + c_im(output[2 * ostride]) = tmp35 - tmp36; + c_im(output[4 * ostride]) = tmp36 + tmp35; + } +} + +fftw_codelet_desc fftw_no_twiddle_6_desc = +{ + "fftw_no_twiddle_6", + (void (*)()) fftw_no_twiddle_6, + 6, + FFTW_FORWARD, + FFTW_NOTW, + 133, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fn_64.c b/src/sndobj/rfftw/fn_64.c new file mode 100644 index 0000000..b07eeab --- /dev/null +++ b/src/sndobj/rfftw/fn_64.c @@ -0,0 +1,2449 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:43:52 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddle 64 */ + +/* + * This function contains 912 FP additions, 248 FP multiplications, + * (or, 808 additions, 144 multiplications, 104 fused multiply/add), + * 156 stack variables, and 256 memory accesses + */ +static const fftw_real K555570233 = FFTW_KONST(+0.555570233019602224742830813948532874374937191); +static const fftw_real K831469612 = FFTW_KONST(+0.831469612302545237078788377617905756738560812); +static const fftw_real K881921264 = FFTW_KONST(+0.881921264348355029712756863660388349508442621); +static const fftw_real K471396736 = FFTW_KONST(+0.471396736825997648556387625905254377657460319); +static const fftw_real K290284677 = FFTW_KONST(+0.290284677254462367636192375817395274691476278); +static const fftw_real K956940335 = FFTW_KONST(+0.956940335732208864935797886980269969482849206); +static const fftw_real K980785280 = FFTW_KONST(+0.980785280403230449126182236134239036973933731); +static const fftw_real K195090322 = FFTW_KONST(+0.195090322016128267848284868477022240927691618); +static const fftw_real K995184726 = FFTW_KONST(+0.995184726672196886244836953109479921575474869); +static const fftw_real K098017140 = FFTW_KONST(+0.098017140329560601994195563888641845861136673); +static const fftw_real K773010453 = FFTW_KONST(+0.773010453362736960810906609758469800971041293); +static const fftw_real K634393284 = FFTW_KONST(+0.634393284163645498215171613225493370675687095); +static const fftw_real K923879532 = FFTW_KONST(+0.923879532511286756128183189396788286822416626); +static const fftw_real K382683432 = FFTW_KONST(+0.382683432365089771728459984030398866761344562); +static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); + +/* + * Generator Id's : + * $Id: fn_64.c,v 1.1.1.1 2006/05/12 15:14:47 veplaini Exp $ + * $Id: fn_64.c,v 1.1.1.1 2006/05/12 15:14:47 veplaini Exp $ + * $Id: fn_64.c,v 1.1.1.1 2006/05/12 15:14:47 veplaini Exp $ + */ + +void fftw_no_twiddle_64(const fftw_complex *input, fftw_complex *output, int istride, int ostride) +{ + fftw_real tmp193; + fftw_real tmp471; + fftw_real tmp15; + fftw_real tmp815; + fftw_real tmp719; + fftw_real tmp781; + fftw_real tmp142; + fftw_real tmp849; + fftw_real tmp371; + fftw_real tmp537; + fftw_real tmp637; + fftw_real tmp755; + fftw_real tmp200; + fftw_real tmp538; + fftw_real tmp374; + fftw_real tmp472; + fftw_real tmp109; + fftw_real tmp837; + fftw_real tmp693; + fftw_real tmp773; + fftw_real tmp844; + fftw_real tmp892; + fftw_real tmp710; + fftw_real tmp776; + fftw_real tmp329; + fftw_real tmp429; + fftw_real tmp519; + fftw_real tmp593; + fftw_real tmp362; + fftw_real tmp432; + fftw_real tmp530; + fftw_real tmp596; + fftw_real tmp30; + fftw_real tmp850; + fftw_real tmp640; + fftw_real tmp721; + fftw_real tmp157; + fftw_real tmp816; + fftw_real tmp643; + fftw_real tmp720; + fftw_real tmp208; + fftw_real tmp377; + fftw_real tmp476; + fftw_real tmp541; + fftw_real tmp215; + fftw_real tmp376; + fftw_real tmp479; + fftw_real tmp540; + fftw_real tmp124; + fftw_real tmp845; + fftw_real tmp365; + fftw_real tmp430; + fftw_real tmp352; + fftw_real tmp433; + fftw_real tmp840; + fftw_real tmp893; + fftw_real tmp526; + fftw_real tmp597; + fftw_real tmp533; + fftw_real tmp594; + fftw_real tmp704; + fftw_real tmp777; + fftw_real tmp713; + fftw_real tmp774; + fftw_real tmp46; + fftw_real tmp819; + fftw_real tmp648; + fftw_real tmp758; + fftw_real tmp173; + fftw_real tmp818; + fftw_real tmp651; + fftw_real tmp759; + fftw_real tmp228; + fftw_real tmp414; + fftw_real tmp484; + fftw_real tmp578; + fftw_real tmp235; + fftw_real tmp415; + fftw_real tmp487; + fftw_real tmp579; + fftw_real tmp78; + fftw_real tmp831; + fftw_real tmp666; + fftw_real tmp769; + fftw_real tmp828; + fftw_real tmp887; + fftw_real tmp683; + fftw_real tmp766; + fftw_real tmp274; + fftw_real tmp425; + fftw_real tmp500; + fftw_real tmp589; + fftw_real tmp307; + fftw_real tmp422; + fftw_real tmp511; + fftw_real tmp586; + fftw_real tmp61; + fftw_real tmp821; + fftw_real tmp655; + fftw_real tmp761; + fftw_real tmp188; + fftw_real tmp822; + fftw_real tmp658; + fftw_real tmp762; + fftw_real tmp247; + fftw_real tmp417; + fftw_real tmp491; + fftw_real tmp581; + fftw_real tmp254; + fftw_real tmp418; + fftw_real tmp494; + fftw_real tmp582; + fftw_real tmp93; + fftw_real tmp829; + fftw_real tmp310; + fftw_real tmp426; + fftw_real tmp297; + fftw_real tmp423; + fftw_real tmp834; + fftw_real tmp888; + fftw_real tmp507; + fftw_real tmp587; + fftw_real tmp514; + fftw_real tmp590; + fftw_real tmp677; + fftw_real tmp767; + fftw_real tmp686; + fftw_real tmp770; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp3; + fftw_real tmp191; + fftw_real tmp130; + fftw_real tmp370; + fftw_real tmp6; + fftw_real tmp369; + fftw_real tmp133; + fftw_real tmp192; + fftw_real tmp10; + fftw_real tmp195; + fftw_real tmp137; + fftw_real tmp194; + fftw_real tmp13; + fftw_real tmp197; + fftw_real tmp140; + fftw_real tmp198; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp128; + fftw_real tmp129; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(input[0]); + tmp2 = c_re(input[32 * istride]); + tmp3 = tmp1 + tmp2; + tmp191 = tmp1 - tmp2; + tmp128 = c_im(input[0]); + tmp129 = c_im(input[32 * istride]); + tmp130 = tmp128 + tmp129; + tmp370 = tmp128 - tmp129; + } + { + fftw_real tmp4; + fftw_real tmp5; + fftw_real tmp131; + fftw_real tmp132; + ASSERT_ALIGNED_DOUBLE; + tmp4 = c_re(input[16 * istride]); + tmp5 = c_re(input[48 * istride]); + tmp6 = tmp4 + tmp5; + tmp369 = tmp4 - tmp5; + tmp131 = c_im(input[16 * istride]); + tmp132 = c_im(input[48 * istride]); + tmp133 = tmp131 + tmp132; + tmp192 = tmp131 - tmp132; + } + { + fftw_real tmp8; + fftw_real tmp9; + fftw_real tmp135; + fftw_real tmp136; + ASSERT_ALIGNED_DOUBLE; + tmp8 = c_re(input[8 * istride]); + tmp9 = c_re(input[40 * istride]); + tmp10 = tmp8 + tmp9; + tmp195 = tmp8 - tmp9; + tmp135 = c_im(input[8 * istride]); + tmp136 = c_im(input[40 * istride]); + tmp137 = tmp135 + tmp136; + tmp194 = tmp135 - tmp136; + } + { + fftw_real tmp11; + fftw_real tmp12; + fftw_real tmp138; + fftw_real tmp139; + ASSERT_ALIGNED_DOUBLE; + tmp11 = c_re(input[56 * istride]); + tmp12 = c_re(input[24 * istride]); + tmp13 = tmp11 + tmp12; + tmp197 = tmp11 - tmp12; + tmp138 = c_im(input[56 * istride]); + tmp139 = c_im(input[24 * istride]); + tmp140 = tmp138 + tmp139; + tmp198 = tmp138 - tmp139; + } + { + fftw_real tmp7; + fftw_real tmp14; + fftw_real tmp635; + fftw_real tmp636; + ASSERT_ALIGNED_DOUBLE; + tmp193 = tmp191 - tmp192; + tmp471 = tmp191 + tmp192; + tmp7 = tmp3 + tmp6; + tmp14 = tmp10 + tmp13; + tmp15 = tmp7 + tmp14; + tmp815 = tmp7 - tmp14; + { + fftw_real tmp717; + fftw_real tmp718; + fftw_real tmp134; + fftw_real tmp141; + ASSERT_ALIGNED_DOUBLE; + tmp717 = tmp130 - tmp133; + tmp718 = tmp13 - tmp10; + tmp719 = tmp717 - tmp718; + tmp781 = tmp718 + tmp717; + tmp134 = tmp130 + tmp133; + tmp141 = tmp137 + tmp140; + tmp142 = tmp134 + tmp141; + tmp849 = tmp134 - tmp141; + } + tmp371 = tmp369 + tmp370; + tmp537 = tmp370 - tmp369; + tmp635 = tmp3 - tmp6; + tmp636 = tmp137 - tmp140; + tmp637 = tmp635 - tmp636; + tmp755 = tmp635 + tmp636; + { + fftw_real tmp196; + fftw_real tmp199; + fftw_real tmp372; + fftw_real tmp373; + ASSERT_ALIGNED_DOUBLE; + tmp196 = tmp194 - tmp195; + tmp199 = tmp197 + tmp198; + tmp200 = K707106781 * (tmp196 - tmp199); + tmp538 = K707106781 * (tmp196 + tmp199); + tmp372 = tmp197 - tmp198; + tmp373 = tmp195 + tmp194; + tmp374 = K707106781 * (tmp372 - tmp373); + tmp472 = K707106781 * (tmp373 + tmp372); + } + } + } + { + fftw_real tmp97; + fftw_real tmp313; + fftw_real tmp357; + fftw_real tmp706; + fftw_real tmp100; + fftw_real tmp354; + fftw_real tmp316; + fftw_real tmp707; + fftw_real tmp107; + fftw_real tmp691; + fftw_real tmp327; + fftw_real tmp359; + fftw_real tmp104; + fftw_real tmp690; + fftw_real tmp322; + fftw_real tmp360; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp95; + fftw_real tmp96; + fftw_real tmp314; + fftw_real tmp315; + ASSERT_ALIGNED_DOUBLE; + tmp95 = c_re(input[63 * istride]); + tmp96 = c_re(input[31 * istride]); + tmp97 = tmp95 + tmp96; + tmp313 = tmp95 - tmp96; + { + fftw_real tmp355; + fftw_real tmp356; + fftw_real tmp98; + fftw_real tmp99; + ASSERT_ALIGNED_DOUBLE; + tmp355 = c_im(input[63 * istride]); + tmp356 = c_im(input[31 * istride]); + tmp357 = tmp355 - tmp356; + tmp706 = tmp355 + tmp356; + tmp98 = c_re(input[15 * istride]); + tmp99 = c_re(input[47 * istride]); + tmp100 = tmp98 + tmp99; + tmp354 = tmp98 - tmp99; + } + tmp314 = c_im(input[15 * istride]); + tmp315 = c_im(input[47 * istride]); + tmp316 = tmp314 - tmp315; + tmp707 = tmp314 + tmp315; + { + fftw_real tmp105; + fftw_real tmp106; + fftw_real tmp323; + fftw_real tmp324; + fftw_real tmp325; + fftw_real tmp326; + ASSERT_ALIGNED_DOUBLE; + tmp105 = c_re(input[55 * istride]); + tmp106 = c_re(input[23 * istride]); + tmp323 = tmp105 - tmp106; + tmp324 = c_im(input[55 * istride]); + tmp325 = c_im(input[23 * istride]); + tmp326 = tmp324 - tmp325; + tmp107 = tmp105 + tmp106; + tmp691 = tmp324 + tmp325; + tmp327 = tmp323 + tmp326; + tmp359 = tmp323 - tmp326; + } + { + fftw_real tmp102; + fftw_real tmp103; + fftw_real tmp321; + fftw_real tmp318; + fftw_real tmp319; + fftw_real tmp320; + ASSERT_ALIGNED_DOUBLE; + tmp102 = c_re(input[7 * istride]); + tmp103 = c_re(input[39 * istride]); + tmp321 = tmp102 - tmp103; + tmp318 = c_im(input[7 * istride]); + tmp319 = c_im(input[39 * istride]); + tmp320 = tmp318 - tmp319; + tmp104 = tmp102 + tmp103; + tmp690 = tmp318 + tmp319; + tmp322 = tmp320 - tmp321; + tmp360 = tmp321 + tmp320; + } + } + { + fftw_real tmp101; + fftw_real tmp108; + fftw_real tmp689; + fftw_real tmp692; + ASSERT_ALIGNED_DOUBLE; + tmp101 = tmp97 + tmp100; + tmp108 = tmp104 + tmp107; + tmp109 = tmp101 + tmp108; + tmp837 = tmp101 - tmp108; + tmp689 = tmp97 - tmp100; + tmp692 = tmp690 - tmp691; + tmp693 = tmp689 - tmp692; + tmp773 = tmp689 + tmp692; + } + { + fftw_real tmp842; + fftw_real tmp843; + fftw_real tmp708; + fftw_real tmp709; + ASSERT_ALIGNED_DOUBLE; + tmp842 = tmp706 + tmp707; + tmp843 = tmp690 + tmp691; + tmp844 = tmp842 - tmp843; + tmp892 = tmp842 + tmp843; + tmp708 = tmp706 - tmp707; + tmp709 = tmp107 - tmp104; + tmp710 = tmp708 - tmp709; + tmp776 = tmp709 + tmp708; + } + { + fftw_real tmp317; + fftw_real tmp328; + fftw_real tmp517; + fftw_real tmp518; + ASSERT_ALIGNED_DOUBLE; + tmp317 = tmp313 - tmp316; + tmp328 = K707106781 * (tmp322 - tmp327); + tmp329 = tmp317 - tmp328; + tmp429 = tmp317 + tmp328; + tmp517 = tmp313 + tmp316; + tmp518 = K707106781 * (tmp360 + tmp359); + tmp519 = tmp517 - tmp518; + tmp593 = tmp517 + tmp518; + } + { + fftw_real tmp358; + fftw_real tmp361; + fftw_real tmp528; + fftw_real tmp529; + ASSERT_ALIGNED_DOUBLE; + tmp358 = tmp354 + tmp357; + tmp361 = K707106781 * (tmp359 - tmp360); + tmp362 = tmp358 - tmp361; + tmp432 = tmp358 + tmp361; + tmp528 = tmp357 - tmp354; + tmp529 = K707106781 * (tmp322 + tmp327); + tmp530 = tmp528 - tmp529; + tmp596 = tmp528 + tmp529; + } + } + { + fftw_real tmp18; + fftw_real tmp205; + fftw_real tmp145; + fftw_real tmp203; + fftw_real tmp21; + fftw_real tmp202; + fftw_real tmp148; + fftw_real tmp206; + fftw_real tmp25; + fftw_real tmp212; + fftw_real tmp152; + fftw_real tmp210; + fftw_real tmp28; + fftw_real tmp209; + fftw_real tmp155; + fftw_real tmp213; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp16; + fftw_real tmp17; + fftw_real tmp143; + fftw_real tmp144; + ASSERT_ALIGNED_DOUBLE; + tmp16 = c_re(input[4 * istride]); + tmp17 = c_re(input[36 * istride]); + tmp18 = tmp16 + tmp17; + tmp205 = tmp16 - tmp17; + tmp143 = c_im(input[4 * istride]); + tmp144 = c_im(input[36 * istride]); + tmp145 = tmp143 + tmp144; + tmp203 = tmp143 - tmp144; + } + { + fftw_real tmp19; + fftw_real tmp20; + fftw_real tmp146; + fftw_real tmp147; + ASSERT_ALIGNED_DOUBLE; + tmp19 = c_re(input[20 * istride]); + tmp20 = c_re(input[52 * istride]); + tmp21 = tmp19 + tmp20; + tmp202 = tmp19 - tmp20; + tmp146 = c_im(input[20 * istride]); + tmp147 = c_im(input[52 * istride]); + tmp148 = tmp146 + tmp147; + tmp206 = tmp146 - tmp147; + } + { + fftw_real tmp23; + fftw_real tmp24; + fftw_real tmp150; + fftw_real tmp151; + ASSERT_ALIGNED_DOUBLE; + tmp23 = c_re(input[60 * istride]); + tmp24 = c_re(input[28 * istride]); + tmp25 = tmp23 + tmp24; + tmp212 = tmp23 - tmp24; + tmp150 = c_im(input[60 * istride]); + tmp151 = c_im(input[28 * istride]); + tmp152 = tmp150 + tmp151; + tmp210 = tmp150 - tmp151; + } + { + fftw_real tmp26; + fftw_real tmp27; + fftw_real tmp153; + fftw_real tmp154; + ASSERT_ALIGNED_DOUBLE; + tmp26 = c_re(input[12 * istride]); + tmp27 = c_re(input[44 * istride]); + tmp28 = tmp26 + tmp27; + tmp209 = tmp26 - tmp27; + tmp153 = c_im(input[12 * istride]); + tmp154 = c_im(input[44 * istride]); + tmp155 = tmp153 + tmp154; + tmp213 = tmp153 - tmp154; + } + { + fftw_real tmp22; + fftw_real tmp29; + fftw_real tmp638; + fftw_real tmp639; + ASSERT_ALIGNED_DOUBLE; + tmp22 = tmp18 + tmp21; + tmp29 = tmp25 + tmp28; + tmp30 = tmp22 + tmp29; + tmp850 = tmp29 - tmp22; + tmp638 = tmp145 - tmp148; + tmp639 = tmp18 - tmp21; + tmp640 = tmp638 - tmp639; + tmp721 = tmp639 + tmp638; + } + { + fftw_real tmp149; + fftw_real tmp156; + fftw_real tmp641; + fftw_real tmp642; + ASSERT_ALIGNED_DOUBLE; + tmp149 = tmp145 + tmp148; + tmp156 = tmp152 + tmp155; + tmp157 = tmp149 + tmp156; + tmp816 = tmp149 - tmp156; + tmp641 = tmp25 - tmp28; + tmp642 = tmp152 - tmp155; + tmp643 = tmp641 + tmp642; + tmp720 = tmp641 - tmp642; + } + { + fftw_real tmp204; + fftw_real tmp207; + fftw_real tmp474; + fftw_real tmp475; + ASSERT_ALIGNED_DOUBLE; + tmp204 = tmp202 + tmp203; + tmp207 = tmp205 - tmp206; + tmp208 = (K382683432 * tmp204) - (K923879532 * tmp207); + tmp377 = (K923879532 * tmp204) + (K382683432 * tmp207); + tmp474 = tmp203 - tmp202; + tmp475 = tmp205 + tmp206; + tmp476 = (K923879532 * tmp474) - (K382683432 * tmp475); + tmp541 = (K382683432 * tmp474) + (K923879532 * tmp475); + } + { + fftw_real tmp211; + fftw_real tmp214; + fftw_real tmp477; + fftw_real tmp478; + ASSERT_ALIGNED_DOUBLE; + tmp211 = tmp209 + tmp210; + tmp214 = tmp212 - tmp213; + tmp215 = (K382683432 * tmp211) + (K923879532 * tmp214); + tmp376 = (K382683432 * tmp214) - (K923879532 * tmp211); + tmp477 = tmp210 - tmp209; + tmp478 = tmp212 + tmp213; + tmp479 = (K923879532 * tmp477) + (K382683432 * tmp478); + tmp540 = (K923879532 * tmp478) - (K382683432 * tmp477); + } + } + { + fftw_real tmp112; + fftw_real tmp694; + fftw_real tmp115; + fftw_real tmp695; + fftw_real tmp334; + fftw_real tmp520; + fftw_real tmp339; + fftw_real tmp521; + fftw_real tmp697; + fftw_real tmp696; + fftw_real tmp119; + fftw_real tmp700; + fftw_real tmp122; + fftw_real tmp701; + fftw_real tmp345; + fftw_real tmp523; + fftw_real tmp350; + fftw_real tmp524; + fftw_real tmp702; + fftw_real tmp699; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp335; + fftw_real tmp333; + fftw_real tmp330; + fftw_real tmp338; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp110; + fftw_real tmp111; + fftw_real tmp331; + fftw_real tmp332; + ASSERT_ALIGNED_DOUBLE; + tmp110 = c_re(input[3 * istride]); + tmp111 = c_re(input[35 * istride]); + tmp112 = tmp110 + tmp111; + tmp335 = tmp110 - tmp111; + tmp331 = c_im(input[3 * istride]); + tmp332 = c_im(input[35 * istride]); + tmp333 = tmp331 - tmp332; + tmp694 = tmp331 + tmp332; + } + { + fftw_real tmp113; + fftw_real tmp114; + fftw_real tmp336; + fftw_real tmp337; + ASSERT_ALIGNED_DOUBLE; + tmp113 = c_re(input[19 * istride]); + tmp114 = c_re(input[51 * istride]); + tmp115 = tmp113 + tmp114; + tmp330 = tmp113 - tmp114; + tmp336 = c_im(input[19 * istride]); + tmp337 = c_im(input[51 * istride]); + tmp338 = tmp336 - tmp337; + tmp695 = tmp336 + tmp337; + } + tmp334 = tmp330 + tmp333; + tmp520 = tmp333 - tmp330; + tmp339 = tmp335 - tmp338; + tmp521 = tmp335 + tmp338; + tmp697 = tmp112 - tmp115; + tmp696 = tmp694 - tmp695; + } + { + fftw_real tmp346; + fftw_real tmp344; + fftw_real tmp341; + fftw_real tmp349; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp117; + fftw_real tmp118; + fftw_real tmp342; + fftw_real tmp343; + ASSERT_ALIGNED_DOUBLE; + tmp117 = c_re(input[59 * istride]); + tmp118 = c_re(input[27 * istride]); + tmp119 = tmp117 + tmp118; + tmp346 = tmp117 - tmp118; + tmp342 = c_im(input[59 * istride]); + tmp343 = c_im(input[27 * istride]); + tmp344 = tmp342 - tmp343; + tmp700 = tmp342 + tmp343; + } + { + fftw_real tmp120; + fftw_real tmp121; + fftw_real tmp347; + fftw_real tmp348; + ASSERT_ALIGNED_DOUBLE; + tmp120 = c_re(input[11 * istride]); + tmp121 = c_re(input[43 * istride]); + tmp122 = tmp120 + tmp121; + tmp341 = tmp120 - tmp121; + tmp347 = c_im(input[11 * istride]); + tmp348 = c_im(input[43 * istride]); + tmp349 = tmp347 - tmp348; + tmp701 = tmp347 + tmp348; + } + tmp345 = tmp341 + tmp344; + tmp523 = tmp344 - tmp341; + tmp350 = tmp346 - tmp349; + tmp524 = tmp346 + tmp349; + tmp702 = tmp700 - tmp701; + tmp699 = tmp119 - tmp122; + } + { + fftw_real tmp116; + fftw_real tmp123; + fftw_real tmp363; + fftw_real tmp364; + ASSERT_ALIGNED_DOUBLE; + tmp116 = tmp112 + tmp115; + tmp123 = tmp119 + tmp122; + tmp124 = tmp116 + tmp123; + tmp845 = tmp123 - tmp116; + tmp363 = (K382683432 * tmp350) - (K923879532 * tmp345); + tmp364 = (K923879532 * tmp334) + (K382683432 * tmp339); + tmp365 = tmp363 - tmp364; + tmp430 = tmp364 + tmp363; + } + { + fftw_real tmp340; + fftw_real tmp351; + fftw_real tmp838; + fftw_real tmp839; + ASSERT_ALIGNED_DOUBLE; + tmp340 = (K382683432 * tmp334) - (K923879532 * tmp339); + tmp351 = (K382683432 * tmp345) + (K923879532 * tmp350); + tmp352 = tmp340 - tmp351; + tmp433 = tmp340 + tmp351; + tmp838 = tmp694 + tmp695; + tmp839 = tmp700 + tmp701; + tmp840 = tmp838 - tmp839; + tmp893 = tmp838 + tmp839; + } + { + fftw_real tmp522; + fftw_real tmp525; + fftw_real tmp531; + fftw_real tmp532; + ASSERT_ALIGNED_DOUBLE; + tmp522 = (K923879532 * tmp520) - (K382683432 * tmp521); + tmp525 = (K923879532 * tmp523) + (K382683432 * tmp524); + tmp526 = tmp522 - tmp525; + tmp597 = tmp522 + tmp525; + tmp531 = (K923879532 * tmp524) - (K382683432 * tmp523); + tmp532 = (K382683432 * tmp520) + (K923879532 * tmp521); + tmp533 = tmp531 - tmp532; + tmp594 = tmp532 + tmp531; + } + { + fftw_real tmp698; + fftw_real tmp703; + fftw_real tmp711; + fftw_real tmp712; + ASSERT_ALIGNED_DOUBLE; + tmp698 = tmp696 - tmp697; + tmp703 = tmp699 + tmp702; + tmp704 = K707106781 * (tmp698 - tmp703); + tmp777 = K707106781 * (tmp698 + tmp703); + tmp711 = tmp699 - tmp702; + tmp712 = tmp697 + tmp696; + tmp713 = K707106781 * (tmp711 - tmp712); + tmp774 = K707106781 * (tmp712 + tmp711); + } + } + { + fftw_real tmp34; + fftw_real tmp229; + fftw_real tmp161; + fftw_real tmp219; + fftw_real tmp37; + fftw_real tmp218; + fftw_real tmp164; + fftw_real tmp230; + fftw_real tmp44; + fftw_real tmp233; + fftw_real tmp223; + fftw_real tmp171; + fftw_real tmp41; + fftw_real tmp232; + fftw_real tmp226; + fftw_real tmp168; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp32; + fftw_real tmp33; + fftw_real tmp162; + fftw_real tmp163; + ASSERT_ALIGNED_DOUBLE; + tmp32 = c_re(input[2 * istride]); + tmp33 = c_re(input[34 * istride]); + tmp34 = tmp32 + tmp33; + tmp229 = tmp32 - tmp33; + { + fftw_real tmp159; + fftw_real tmp160; + fftw_real tmp35; + fftw_real tmp36; + ASSERT_ALIGNED_DOUBLE; + tmp159 = c_im(input[2 * istride]); + tmp160 = c_im(input[34 * istride]); + tmp161 = tmp159 + tmp160; + tmp219 = tmp159 - tmp160; + tmp35 = c_re(input[18 * istride]); + tmp36 = c_re(input[50 * istride]); + tmp37 = tmp35 + tmp36; + tmp218 = tmp35 - tmp36; + } + tmp162 = c_im(input[18 * istride]); + tmp163 = c_im(input[50 * istride]); + tmp164 = tmp162 + tmp163; + tmp230 = tmp162 - tmp163; + { + fftw_real tmp42; + fftw_real tmp43; + fftw_real tmp221; + fftw_real tmp169; + fftw_real tmp170; + fftw_real tmp222; + ASSERT_ALIGNED_DOUBLE; + tmp42 = c_re(input[58 * istride]); + tmp43 = c_re(input[26 * istride]); + tmp221 = tmp42 - tmp43; + tmp169 = c_im(input[58 * istride]); + tmp170 = c_im(input[26 * istride]); + tmp222 = tmp169 - tmp170; + tmp44 = tmp42 + tmp43; + tmp233 = tmp221 + tmp222; + tmp223 = tmp221 - tmp222; + tmp171 = tmp169 + tmp170; + } + { + fftw_real tmp39; + fftw_real tmp40; + fftw_real tmp224; + fftw_real tmp166; + fftw_real tmp167; + fftw_real tmp225; + ASSERT_ALIGNED_DOUBLE; + tmp39 = c_re(input[10 * istride]); + tmp40 = c_re(input[42 * istride]); + tmp224 = tmp39 - tmp40; + tmp166 = c_im(input[10 * istride]); + tmp167 = c_im(input[42 * istride]); + tmp225 = tmp166 - tmp167; + tmp41 = tmp39 + tmp40; + tmp232 = tmp225 - tmp224; + tmp226 = tmp224 + tmp225; + tmp168 = tmp166 + tmp167; + } + } + { + fftw_real tmp38; + fftw_real tmp45; + fftw_real tmp646; + fftw_real tmp647; + ASSERT_ALIGNED_DOUBLE; + tmp38 = tmp34 + tmp37; + tmp45 = tmp41 + tmp44; + tmp46 = tmp38 + tmp45; + tmp819 = tmp38 - tmp45; + tmp646 = tmp161 - tmp164; + tmp647 = tmp44 - tmp41; + tmp648 = tmp646 - tmp647; + tmp758 = tmp647 + tmp646; + } + { + fftw_real tmp165; + fftw_real tmp172; + fftw_real tmp649; + fftw_real tmp650; + ASSERT_ALIGNED_DOUBLE; + tmp165 = tmp161 + tmp164; + tmp172 = tmp168 + tmp171; + tmp173 = tmp165 + tmp172; + tmp818 = tmp165 - tmp172; + tmp649 = tmp34 - tmp37; + tmp650 = tmp168 - tmp171; + tmp651 = tmp649 - tmp650; + tmp759 = tmp649 + tmp650; + } + { + fftw_real tmp220; + fftw_real tmp227; + fftw_real tmp482; + fftw_real tmp483; + ASSERT_ALIGNED_DOUBLE; + tmp220 = tmp218 + tmp219; + tmp227 = K707106781 * (tmp223 - tmp226); + tmp228 = tmp220 - tmp227; + tmp414 = tmp220 + tmp227; + tmp482 = tmp219 - tmp218; + tmp483 = K707106781 * (tmp232 + tmp233); + tmp484 = tmp482 - tmp483; + tmp578 = tmp482 + tmp483; + } + { + fftw_real tmp231; + fftw_real tmp234; + fftw_real tmp485; + fftw_real tmp486; + ASSERT_ALIGNED_DOUBLE; + tmp231 = tmp229 - tmp230; + tmp234 = K707106781 * (tmp232 - tmp233); + tmp235 = tmp231 - tmp234; + tmp415 = tmp231 + tmp234; + tmp485 = tmp229 + tmp230; + tmp486 = K707106781 * (tmp226 + tmp223); + tmp487 = tmp485 - tmp486; + tmp579 = tmp485 + tmp486; + } + } + { + fftw_real tmp66; + fftw_real tmp299; + fftw_real tmp261; + fftw_real tmp662; + fftw_real tmp69; + fftw_real tmp258; + fftw_real tmp302; + fftw_real tmp663; + fftw_real tmp76; + fftw_real tmp681; + fftw_real tmp267; + fftw_real tmp305; + fftw_real tmp73; + fftw_real tmp680; + fftw_real tmp272; + fftw_real tmp304; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp64; + fftw_real tmp65; + fftw_real tmp300; + fftw_real tmp301; + ASSERT_ALIGNED_DOUBLE; + tmp64 = c_re(input[istride]); + tmp65 = c_re(input[33 * istride]); + tmp66 = tmp64 + tmp65; + tmp299 = tmp64 - tmp65; + { + fftw_real tmp259; + fftw_real tmp260; + fftw_real tmp67; + fftw_real tmp68; + ASSERT_ALIGNED_DOUBLE; + tmp259 = c_im(input[istride]); + tmp260 = c_im(input[33 * istride]); + tmp261 = tmp259 - tmp260; + tmp662 = tmp259 + tmp260; + tmp67 = c_re(input[17 * istride]); + tmp68 = c_re(input[49 * istride]); + tmp69 = tmp67 + tmp68; + tmp258 = tmp67 - tmp68; + } + tmp300 = c_im(input[17 * istride]); + tmp301 = c_im(input[49 * istride]); + tmp302 = tmp300 - tmp301; + tmp663 = tmp300 + tmp301; + { + fftw_real tmp74; + fftw_real tmp75; + fftw_real tmp263; + fftw_real tmp264; + fftw_real tmp265; + fftw_real tmp266; + ASSERT_ALIGNED_DOUBLE; + tmp74 = c_re(input[57 * istride]); + tmp75 = c_re(input[25 * istride]); + tmp263 = tmp74 - tmp75; + tmp264 = c_im(input[57 * istride]); + tmp265 = c_im(input[25 * istride]); + tmp266 = tmp264 - tmp265; + tmp76 = tmp74 + tmp75; + tmp681 = tmp264 + tmp265; + tmp267 = tmp263 - tmp266; + tmp305 = tmp263 + tmp266; + } + { + fftw_real tmp71; + fftw_real tmp72; + fftw_real tmp268; + fftw_real tmp269; + fftw_real tmp270; + fftw_real tmp271; + ASSERT_ALIGNED_DOUBLE; + tmp71 = c_re(input[9 * istride]); + tmp72 = c_re(input[41 * istride]); + tmp268 = tmp71 - tmp72; + tmp269 = c_im(input[9 * istride]); + tmp270 = c_im(input[41 * istride]); + tmp271 = tmp269 - tmp270; + tmp73 = tmp71 + tmp72; + tmp680 = tmp269 + tmp270; + tmp272 = tmp268 + tmp271; + tmp304 = tmp271 - tmp268; + } + } + { + fftw_real tmp70; + fftw_real tmp77; + fftw_real tmp664; + fftw_real tmp665; + ASSERT_ALIGNED_DOUBLE; + tmp70 = tmp66 + tmp69; + tmp77 = tmp73 + tmp76; + tmp78 = tmp70 + tmp77; + tmp831 = tmp70 - tmp77; + tmp664 = tmp662 - tmp663; + tmp665 = tmp76 - tmp73; + tmp666 = tmp664 - tmp665; + tmp769 = tmp665 + tmp664; + } + { + fftw_real tmp826; + fftw_real tmp827; + fftw_real tmp679; + fftw_real tmp682; + ASSERT_ALIGNED_DOUBLE; + tmp826 = tmp662 + tmp663; + tmp827 = tmp680 + tmp681; + tmp828 = tmp826 - tmp827; + tmp887 = tmp826 + tmp827; + tmp679 = tmp66 - tmp69; + tmp682 = tmp680 - tmp681; + tmp683 = tmp679 - tmp682; + tmp766 = tmp679 + tmp682; + } + { + fftw_real tmp262; + fftw_real tmp273; + fftw_real tmp498; + fftw_real tmp499; + ASSERT_ALIGNED_DOUBLE; + tmp262 = tmp258 + tmp261; + tmp273 = K707106781 * (tmp267 - tmp272); + tmp274 = tmp262 - tmp273; + tmp425 = tmp262 + tmp273; + tmp498 = tmp261 - tmp258; + tmp499 = K707106781 * (tmp304 + tmp305); + tmp500 = tmp498 - tmp499; + tmp589 = tmp498 + tmp499; + } + { + fftw_real tmp303; + fftw_real tmp306; + fftw_real tmp509; + fftw_real tmp510; + ASSERT_ALIGNED_DOUBLE; + tmp303 = tmp299 - tmp302; + tmp306 = K707106781 * (tmp304 - tmp305); + tmp307 = tmp303 - tmp306; + tmp422 = tmp303 + tmp306; + tmp509 = tmp299 + tmp302; + tmp510 = K707106781 * (tmp272 + tmp267); + tmp511 = tmp509 - tmp510; + tmp586 = tmp509 + tmp510; + } + } + { + fftw_real tmp49; + fftw_real tmp248; + fftw_real tmp176; + fftw_real tmp238; + fftw_real tmp52; + fftw_real tmp237; + fftw_real tmp179; + fftw_real tmp249; + fftw_real tmp59; + fftw_real tmp252; + fftw_real tmp242; + fftw_real tmp186; + fftw_real tmp56; + fftw_real tmp251; + fftw_real tmp245; + fftw_real tmp183; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp47; + fftw_real tmp48; + fftw_real tmp177; + fftw_real tmp178; + ASSERT_ALIGNED_DOUBLE; + tmp47 = c_re(input[62 * istride]); + tmp48 = c_re(input[30 * istride]); + tmp49 = tmp47 + tmp48; + tmp248 = tmp47 - tmp48; + { + fftw_real tmp174; + fftw_real tmp175; + fftw_real tmp50; + fftw_real tmp51; + ASSERT_ALIGNED_DOUBLE; + tmp174 = c_im(input[62 * istride]); + tmp175 = c_im(input[30 * istride]); + tmp176 = tmp174 + tmp175; + tmp238 = tmp174 - tmp175; + tmp50 = c_re(input[14 * istride]); + tmp51 = c_re(input[46 * istride]); + tmp52 = tmp50 + tmp51; + tmp237 = tmp50 - tmp51; + } + tmp177 = c_im(input[14 * istride]); + tmp178 = c_im(input[46 * istride]); + tmp179 = tmp177 + tmp178; + tmp249 = tmp177 - tmp178; + { + fftw_real tmp57; + fftw_real tmp58; + fftw_real tmp240; + fftw_real tmp184; + fftw_real tmp185; + fftw_real tmp241; + ASSERT_ALIGNED_DOUBLE; + tmp57 = c_re(input[54 * istride]); + tmp58 = c_re(input[22 * istride]); + tmp240 = tmp57 - tmp58; + tmp184 = c_im(input[54 * istride]); + tmp185 = c_im(input[22 * istride]); + tmp241 = tmp184 - tmp185; + tmp59 = tmp57 + tmp58; + tmp252 = tmp240 + tmp241; + tmp242 = tmp240 - tmp241; + tmp186 = tmp184 + tmp185; + } + { + fftw_real tmp54; + fftw_real tmp55; + fftw_real tmp243; + fftw_real tmp181; + fftw_real tmp182; + fftw_real tmp244; + ASSERT_ALIGNED_DOUBLE; + tmp54 = c_re(input[6 * istride]); + tmp55 = c_re(input[38 * istride]); + tmp243 = tmp54 - tmp55; + tmp181 = c_im(input[6 * istride]); + tmp182 = c_im(input[38 * istride]); + tmp244 = tmp181 - tmp182; + tmp56 = tmp54 + tmp55; + tmp251 = tmp244 - tmp243; + tmp245 = tmp243 + tmp244; + tmp183 = tmp181 + tmp182; + } + } + { + fftw_real tmp53; + fftw_real tmp60; + fftw_real tmp653; + fftw_real tmp654; + ASSERT_ALIGNED_DOUBLE; + tmp53 = tmp49 + tmp52; + tmp60 = tmp56 + tmp59; + tmp61 = tmp53 + tmp60; + tmp821 = tmp53 - tmp60; + tmp653 = tmp176 - tmp179; + tmp654 = tmp59 - tmp56; + tmp655 = tmp653 - tmp654; + tmp761 = tmp654 + tmp653; + } + { + fftw_real tmp180; + fftw_real tmp187; + fftw_real tmp656; + fftw_real tmp657; + ASSERT_ALIGNED_DOUBLE; + tmp180 = tmp176 + tmp179; + tmp187 = tmp183 + tmp186; + tmp188 = tmp180 + tmp187; + tmp822 = tmp180 - tmp187; + tmp656 = tmp49 - tmp52; + tmp657 = tmp183 - tmp186; + tmp658 = tmp656 - tmp657; + tmp762 = tmp656 + tmp657; + } + { + fftw_real tmp239; + fftw_real tmp246; + fftw_real tmp489; + fftw_real tmp490; + ASSERT_ALIGNED_DOUBLE; + tmp239 = tmp237 + tmp238; + tmp246 = K707106781 * (tmp242 - tmp245); + tmp247 = tmp239 - tmp246; + tmp417 = tmp239 + tmp246; + tmp489 = tmp248 + tmp249; + tmp490 = K707106781 * (tmp245 + tmp242); + tmp491 = tmp489 - tmp490; + tmp581 = tmp489 + tmp490; + } + { + fftw_real tmp250; + fftw_real tmp253; + fftw_real tmp492; + fftw_real tmp493; + ASSERT_ALIGNED_DOUBLE; + tmp250 = tmp248 - tmp249; + tmp253 = K707106781 * (tmp251 - tmp252); + tmp254 = tmp250 - tmp253; + tmp418 = tmp250 + tmp253; + tmp492 = tmp238 - tmp237; + tmp493 = K707106781 * (tmp251 + tmp252); + tmp494 = tmp492 - tmp493; + tmp582 = tmp492 + tmp493; + } + } + { + fftw_real tmp81; + fftw_real tmp673; + fftw_real tmp84; + fftw_real tmp674; + fftw_real tmp290; + fftw_real tmp504; + fftw_real tmp295; + fftw_real tmp505; + fftw_real tmp675; + fftw_real tmp672; + fftw_real tmp88; + fftw_real tmp668; + fftw_real tmp91; + fftw_real tmp669; + fftw_real tmp279; + fftw_real tmp501; + fftw_real tmp284; + fftw_real tmp502; + fftw_real tmp670; + fftw_real tmp667; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp291; + fftw_real tmp289; + fftw_real tmp286; + fftw_real tmp294; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp79; + fftw_real tmp80; + fftw_real tmp287; + fftw_real tmp288; + ASSERT_ALIGNED_DOUBLE; + tmp79 = c_re(input[5 * istride]); + tmp80 = c_re(input[37 * istride]); + tmp81 = tmp79 + tmp80; + tmp291 = tmp79 - tmp80; + tmp287 = c_im(input[5 * istride]); + tmp288 = c_im(input[37 * istride]); + tmp289 = tmp287 - tmp288; + tmp673 = tmp287 + tmp288; + } + { + fftw_real tmp82; + fftw_real tmp83; + fftw_real tmp292; + fftw_real tmp293; + ASSERT_ALIGNED_DOUBLE; + tmp82 = c_re(input[21 * istride]); + tmp83 = c_re(input[53 * istride]); + tmp84 = tmp82 + tmp83; + tmp286 = tmp82 - tmp83; + tmp292 = c_im(input[21 * istride]); + tmp293 = c_im(input[53 * istride]); + tmp294 = tmp292 - tmp293; + tmp674 = tmp292 + tmp293; + } + tmp290 = tmp286 + tmp289; + tmp504 = tmp289 - tmp286; + tmp295 = tmp291 - tmp294; + tmp505 = tmp291 + tmp294; + tmp675 = tmp673 - tmp674; + tmp672 = tmp81 - tmp84; + } + { + fftw_real tmp275; + fftw_real tmp283; + fftw_real tmp280; + fftw_real tmp278; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp86; + fftw_real tmp87; + fftw_real tmp281; + fftw_real tmp282; + ASSERT_ALIGNED_DOUBLE; + tmp86 = c_re(input[61 * istride]); + tmp87 = c_re(input[29 * istride]); + tmp88 = tmp86 + tmp87; + tmp275 = tmp86 - tmp87; + tmp281 = c_im(input[61 * istride]); + tmp282 = c_im(input[29 * istride]); + tmp283 = tmp281 - tmp282; + tmp668 = tmp281 + tmp282; + } + { + fftw_real tmp89; + fftw_real tmp90; + fftw_real tmp276; + fftw_real tmp277; + ASSERT_ALIGNED_DOUBLE; + tmp89 = c_re(input[13 * istride]); + tmp90 = c_re(input[45 * istride]); + tmp91 = tmp89 + tmp90; + tmp280 = tmp89 - tmp90; + tmp276 = c_im(input[13 * istride]); + tmp277 = c_im(input[45 * istride]); + tmp278 = tmp276 - tmp277; + tmp669 = tmp276 + tmp277; + } + tmp279 = tmp275 - tmp278; + tmp501 = tmp275 + tmp278; + tmp284 = tmp280 + tmp283; + tmp502 = tmp283 - tmp280; + tmp670 = tmp668 - tmp669; + tmp667 = tmp88 - tmp91; + } + { + fftw_real tmp85; + fftw_real tmp92; + fftw_real tmp308; + fftw_real tmp309; + ASSERT_ALIGNED_DOUBLE; + tmp85 = tmp81 + tmp84; + tmp92 = tmp88 + tmp91; + tmp93 = tmp85 + tmp92; + tmp829 = tmp92 - tmp85; + tmp308 = (K382683432 * tmp290) - (K923879532 * tmp295); + tmp309 = (K382683432 * tmp284) + (K923879532 * tmp279); + tmp310 = tmp308 - tmp309; + tmp426 = tmp308 + tmp309; + } + { + fftw_real tmp285; + fftw_real tmp296; + fftw_real tmp832; + fftw_real tmp833; + ASSERT_ALIGNED_DOUBLE; + tmp285 = (K382683432 * tmp279) - (K923879532 * tmp284); + tmp296 = (K923879532 * tmp290) + (K382683432 * tmp295); + tmp297 = tmp285 - tmp296; + tmp423 = tmp296 + tmp285; + tmp832 = tmp673 + tmp674; + tmp833 = tmp668 + tmp669; + tmp834 = tmp832 - tmp833; + tmp888 = tmp832 + tmp833; + } + { + fftw_real tmp503; + fftw_real tmp506; + fftw_real tmp512; + fftw_real tmp513; + ASSERT_ALIGNED_DOUBLE; + tmp503 = (K923879532 * tmp501) - (K382683432 * tmp502); + tmp506 = (K382683432 * tmp504) + (K923879532 * tmp505); + tmp507 = tmp503 - tmp506; + tmp587 = tmp506 + tmp503; + tmp512 = (K923879532 * tmp504) - (K382683432 * tmp505); + tmp513 = (K923879532 * tmp502) + (K382683432 * tmp501); + tmp514 = tmp512 - tmp513; + tmp590 = tmp512 + tmp513; + } + { + fftw_real tmp671; + fftw_real tmp676; + fftw_real tmp684; + fftw_real tmp685; + ASSERT_ALIGNED_DOUBLE; + tmp671 = tmp667 - tmp670; + tmp676 = tmp672 + tmp675; + tmp677 = K707106781 * (tmp671 - tmp676); + tmp767 = K707106781 * (tmp676 + tmp671); + tmp684 = tmp675 - tmp672; + tmp685 = tmp667 + tmp670; + tmp686 = K707106781 * (tmp684 - tmp685); + tmp770 = K707106781 * (tmp684 + tmp685); + } + } + { + fftw_real tmp63; + fftw_real tmp907; + fftw_real tmp910; + fftw_real tmp912; + fftw_real tmp126; + fftw_real tmp127; + fftw_real tmp190; + fftw_real tmp911; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp31; + fftw_real tmp62; + fftw_real tmp908; + fftw_real tmp909; + ASSERT_ALIGNED_DOUBLE; + tmp31 = tmp15 + tmp30; + tmp62 = tmp46 + tmp61; + tmp63 = tmp31 + tmp62; + tmp907 = tmp31 - tmp62; + tmp908 = tmp887 + tmp888; + tmp909 = tmp892 + tmp893; + tmp910 = tmp908 - tmp909; + tmp912 = tmp908 + tmp909; + } + { + fftw_real tmp94; + fftw_real tmp125; + fftw_real tmp158; + fftw_real tmp189; + ASSERT_ALIGNED_DOUBLE; + tmp94 = tmp78 + tmp93; + tmp125 = tmp109 + tmp124; + tmp126 = tmp94 + tmp125; + tmp127 = tmp125 - tmp94; + tmp158 = tmp142 + tmp157; + tmp189 = tmp173 + tmp188; + tmp190 = tmp158 - tmp189; + tmp911 = tmp158 + tmp189; + } + c_re(output[32 * ostride]) = tmp63 - tmp126; + c_re(output[0]) = tmp63 + tmp126; + c_im(output[16 * ostride]) = tmp127 + tmp190; + c_im(output[48 * ostride]) = tmp190 - tmp127; + c_re(output[48 * ostride]) = tmp907 - tmp910; + c_re(output[16 * ostride]) = tmp907 + tmp910; + c_im(output[32 * ostride]) = tmp911 - tmp912; + c_im(output[0]) = tmp911 + tmp912; + } + { + fftw_real tmp885; + fftw_real tmp901; + fftw_real tmp899; + fftw_real tmp905; + fftw_real tmp890; + fftw_real tmp902; + fftw_real tmp895; + fftw_real tmp903; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp883; + fftw_real tmp884; + fftw_real tmp897; + fftw_real tmp898; + ASSERT_ALIGNED_DOUBLE; + tmp883 = tmp15 - tmp30; + tmp884 = tmp173 - tmp188; + tmp885 = tmp883 + tmp884; + tmp901 = tmp883 - tmp884; + tmp897 = tmp142 - tmp157; + tmp898 = tmp61 - tmp46; + tmp899 = tmp897 - tmp898; + tmp905 = tmp898 + tmp897; + } + { + fftw_real tmp886; + fftw_real tmp889; + fftw_real tmp891; + fftw_real tmp894; + ASSERT_ALIGNED_DOUBLE; + tmp886 = tmp78 - tmp93; + tmp889 = tmp887 - tmp888; + tmp890 = tmp886 + tmp889; + tmp902 = tmp889 - tmp886; + tmp891 = tmp109 - tmp124; + tmp894 = tmp892 - tmp893; + tmp895 = tmp891 - tmp894; + tmp903 = tmp891 + tmp894; + } + { + fftw_real tmp896; + fftw_real tmp900; + fftw_real tmp904; + fftw_real tmp906; + ASSERT_ALIGNED_DOUBLE; + tmp896 = K707106781 * (tmp890 + tmp895); + c_re(output[40 * ostride]) = tmp885 - tmp896; + c_re(output[8 * ostride]) = tmp885 + tmp896; + tmp900 = K707106781 * (tmp895 - tmp890); + c_im(output[56 * ostride]) = tmp899 - tmp900; + c_im(output[24 * ostride]) = tmp899 + tmp900; + tmp904 = K707106781 * (tmp902 - tmp903); + c_re(output[56 * ostride]) = tmp901 - tmp904; + c_re(output[24 * ostride]) = tmp901 + tmp904; + tmp906 = K707106781 * (tmp902 + tmp903); + c_im(output[40 * ostride]) = tmp905 - tmp906; + c_im(output[8 * ostride]) = tmp905 + tmp906; + } + } + { + fftw_real tmp217; + fftw_real tmp391; + fftw_real tmp396; + fftw_real tmp406; + fftw_real tmp399; + fftw_real tmp407; + fftw_real tmp367; + fftw_real tmp387; + fftw_real tmp312; + fftw_real tmp386; + fftw_real tmp379; + fftw_real tmp401; + fftw_real tmp382; + fftw_real tmp392; + fftw_real tmp256; + fftw_real tmp402; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp201; + fftw_real tmp216; + fftw_real tmp394; + fftw_real tmp395; + ASSERT_ALIGNED_DOUBLE; + tmp201 = tmp193 - tmp200; + tmp216 = tmp208 - tmp215; + tmp217 = tmp201 - tmp216; + tmp391 = tmp201 + tmp216; + tmp394 = tmp274 + tmp297; + tmp395 = tmp307 + tmp310; + tmp396 = (K634393284 * tmp394) + (K773010453 * tmp395); + tmp406 = (K773010453 * tmp394) - (K634393284 * tmp395); + } + { + fftw_real tmp397; + fftw_real tmp398; + fftw_real tmp353; + fftw_real tmp366; + ASSERT_ALIGNED_DOUBLE; + tmp397 = tmp329 + tmp352; + tmp398 = tmp362 + tmp365; + tmp399 = (K773010453 * tmp397) - (K634393284 * tmp398); + tmp407 = (K773010453 * tmp398) + (K634393284 * tmp397); + tmp353 = tmp329 - tmp352; + tmp366 = tmp362 - tmp365; + tmp367 = (K098017140 * tmp353) - (K995184726 * tmp366); + tmp387 = (K098017140 * tmp366) + (K995184726 * tmp353); + } + { + fftw_real tmp298; + fftw_real tmp311; + fftw_real tmp375; + fftw_real tmp378; + ASSERT_ALIGNED_DOUBLE; + tmp298 = tmp274 - tmp297; + tmp311 = tmp307 - tmp310; + tmp312 = (K995184726 * tmp298) + (K098017140 * tmp311); + tmp386 = (K098017140 * tmp298) - (K995184726 * tmp311); + tmp375 = tmp371 - tmp374; + tmp378 = tmp376 - tmp377; + tmp379 = tmp375 - tmp378; + tmp401 = tmp375 + tmp378; + } + { + fftw_real tmp380; + fftw_real tmp381; + fftw_real tmp236; + fftw_real tmp255; + ASSERT_ALIGNED_DOUBLE; + tmp380 = (K195090322 * tmp254) - (K980785280 * tmp247); + tmp381 = (K980785280 * tmp228) + (K195090322 * tmp235); + tmp382 = tmp380 - tmp381; + tmp392 = tmp381 + tmp380; + tmp236 = (K195090322 * tmp228) - (K980785280 * tmp235); + tmp255 = (K195090322 * tmp247) + (K980785280 * tmp254); + tmp256 = tmp236 - tmp255; + tmp402 = tmp236 + tmp255; + } + { + fftw_real tmp257; + fftw_real tmp368; + fftw_real tmp383; + fftw_real tmp384; + ASSERT_ALIGNED_DOUBLE; + tmp257 = tmp217 + tmp256; + tmp368 = tmp312 + tmp367; + c_re(output[47 * ostride]) = tmp257 - tmp368; + c_re(output[15 * ostride]) = tmp257 + tmp368; + tmp383 = tmp379 - tmp382; + tmp384 = tmp367 - tmp312; + c_im(output[63 * ostride]) = tmp383 - tmp384; + c_im(output[31 * ostride]) = tmp383 + tmp384; + } + { + fftw_real tmp389; + fftw_real tmp390; + fftw_real tmp385; + fftw_real tmp388; + ASSERT_ALIGNED_DOUBLE; + tmp389 = tmp379 + tmp382; + tmp390 = tmp386 + tmp387; + c_im(output[47 * ostride]) = tmp389 - tmp390; + c_im(output[15 * ostride]) = tmp389 + tmp390; + tmp385 = tmp217 - tmp256; + tmp388 = tmp386 - tmp387; + c_re(output[63 * ostride]) = tmp385 - tmp388; + c_re(output[31 * ostride]) = tmp385 + tmp388; + } + { + fftw_real tmp393; + fftw_real tmp400; + fftw_real tmp403; + fftw_real tmp404; + ASSERT_ALIGNED_DOUBLE; + tmp393 = tmp391 + tmp392; + tmp400 = tmp396 + tmp399; + c_re(output[39 * ostride]) = tmp393 - tmp400; + c_re(output[7 * ostride]) = tmp393 + tmp400; + tmp403 = tmp401 - tmp402; + tmp404 = tmp399 - tmp396; + c_im(output[55 * ostride]) = tmp403 - tmp404; + c_im(output[23 * ostride]) = tmp403 + tmp404; + } + { + fftw_real tmp409; + fftw_real tmp410; + fftw_real tmp405; + fftw_real tmp408; + ASSERT_ALIGNED_DOUBLE; + tmp409 = tmp401 + tmp402; + tmp410 = tmp406 + tmp407; + c_im(output[39 * ostride]) = tmp409 - tmp410; + c_im(output[7 * ostride]) = tmp409 + tmp410; + tmp405 = tmp391 - tmp392; + tmp408 = tmp406 - tmp407; + c_re(output[55 * ostride]) = tmp405 - tmp408; + c_re(output[23 * ostride]) = tmp405 + tmp408; + } + } + { + fftw_real tmp413; + fftw_real tmp451; + fftw_real tmp456; + fftw_real tmp466; + fftw_real tmp459; + fftw_real tmp467; + fftw_real tmp435; + fftw_real tmp447; + fftw_real tmp428; + fftw_real tmp446; + fftw_real tmp439; + fftw_real tmp461; + fftw_real tmp442; + fftw_real tmp452; + fftw_real tmp420; + fftw_real tmp462; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp411; + fftw_real tmp412; + fftw_real tmp454; + fftw_real tmp455; + ASSERT_ALIGNED_DOUBLE; + tmp411 = tmp193 + tmp200; + tmp412 = tmp377 + tmp376; + tmp413 = tmp411 - tmp412; + tmp451 = tmp411 + tmp412; + tmp454 = tmp422 + tmp423; + tmp455 = tmp425 + tmp426; + tmp456 = (K956940335 * tmp454) + (K290284677 * tmp455); + tmp466 = (K956940335 * tmp455) - (K290284677 * tmp454); + } + { + fftw_real tmp457; + fftw_real tmp458; + fftw_real tmp431; + fftw_real tmp434; + ASSERT_ALIGNED_DOUBLE; + tmp457 = tmp429 + tmp430; + tmp458 = tmp432 + tmp433; + tmp459 = (K956940335 * tmp457) - (K290284677 * tmp458); + tmp467 = (K290284677 * tmp457) + (K956940335 * tmp458); + tmp431 = tmp429 - tmp430; + tmp434 = tmp432 - tmp433; + tmp435 = (K471396736 * tmp431) - (K881921264 * tmp434); + tmp447 = (K881921264 * tmp431) + (K471396736 * tmp434); + } + { + fftw_real tmp424; + fftw_real tmp427; + fftw_real tmp437; + fftw_real tmp438; + ASSERT_ALIGNED_DOUBLE; + tmp424 = tmp422 - tmp423; + tmp427 = tmp425 - tmp426; + tmp428 = (K471396736 * tmp424) + (K881921264 * tmp427); + tmp446 = (K471396736 * tmp427) - (K881921264 * tmp424); + tmp437 = tmp371 + tmp374; + tmp438 = tmp208 + tmp215; + tmp439 = tmp437 - tmp438; + tmp461 = tmp437 + tmp438; + } + { + fftw_real tmp440; + fftw_real tmp441; + fftw_real tmp416; + fftw_real tmp419; + ASSERT_ALIGNED_DOUBLE; + tmp440 = (K831469612 * tmp418) - (K555570233 * tmp417); + tmp441 = (K555570233 * tmp414) + (K831469612 * tmp415); + tmp442 = tmp440 - tmp441; + tmp452 = tmp441 + tmp440; + tmp416 = (K831469612 * tmp414) - (K555570233 * tmp415); + tmp419 = (K831469612 * tmp417) + (K555570233 * tmp418); + tmp420 = tmp416 - tmp419; + tmp462 = tmp416 + tmp419; + } + { + fftw_real tmp421; + fftw_real tmp436; + fftw_real tmp443; + fftw_real tmp444; + ASSERT_ALIGNED_DOUBLE; + tmp421 = tmp413 + tmp420; + tmp436 = tmp428 + tmp435; + c_re(output[43 * ostride]) = tmp421 - tmp436; + c_re(output[11 * ostride]) = tmp421 + tmp436; + tmp443 = tmp439 - tmp442; + tmp444 = tmp435 - tmp428; + c_im(output[59 * ostride]) = tmp443 - tmp444; + c_im(output[27 * ostride]) = tmp443 + tmp444; + } + { + fftw_real tmp449; + fftw_real tmp450; + fftw_real tmp445; + fftw_real tmp448; + ASSERT_ALIGNED_DOUBLE; + tmp449 = tmp439 + tmp442; + tmp450 = tmp446 + tmp447; + c_im(output[43 * ostride]) = tmp449 - tmp450; + c_im(output[11 * ostride]) = tmp449 + tmp450; + tmp445 = tmp413 - tmp420; + tmp448 = tmp446 - tmp447; + c_re(output[59 * ostride]) = tmp445 - tmp448; + c_re(output[27 * ostride]) = tmp445 + tmp448; + } + { + fftw_real tmp453; + fftw_real tmp460; + fftw_real tmp463; + fftw_real tmp464; + ASSERT_ALIGNED_DOUBLE; + tmp453 = tmp451 + tmp452; + tmp460 = tmp456 + tmp459; + c_re(output[35 * ostride]) = tmp453 - tmp460; + c_re(output[3 * ostride]) = tmp453 + tmp460; + tmp463 = tmp461 - tmp462; + tmp464 = tmp459 - tmp456; + c_im(output[51 * ostride]) = tmp463 - tmp464; + c_im(output[19 * ostride]) = tmp463 + tmp464; + } + { + fftw_real tmp469; + fftw_real tmp470; + fftw_real tmp465; + fftw_real tmp468; + ASSERT_ALIGNED_DOUBLE; + tmp469 = tmp461 + tmp462; + tmp470 = tmp466 + tmp467; + c_im(output[35 * ostride]) = tmp469 - tmp470; + c_im(output[3 * ostride]) = tmp469 + tmp470; + tmp465 = tmp451 - tmp452; + tmp468 = tmp466 - tmp467; + c_re(output[51 * ostride]) = tmp465 - tmp468; + c_re(output[19 * ostride]) = tmp465 + tmp468; + } + } + { + fftw_real tmp817; + fftw_real tmp863; + fftw_real tmp824; + fftw_real tmp874; + fftw_real tmp854; + fftw_real tmp864; + fftw_real tmp836; + fftw_real tmp858; + fftw_real tmp851; + fftw_real tmp873; + fftw_real tmp868; + fftw_real tmp878; + fftw_real tmp847; + fftw_real tmp859; + fftw_real tmp871; + fftw_real tmp879; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp820; + fftw_real tmp823; + fftw_real tmp866; + fftw_real tmp867; + ASSERT_ALIGNED_DOUBLE; + tmp817 = tmp815 - tmp816; + tmp863 = tmp815 + tmp816; + tmp820 = tmp818 - tmp819; + tmp823 = tmp821 + tmp822; + tmp824 = K707106781 * (tmp820 - tmp823); + tmp874 = K707106781 * (tmp820 + tmp823); + { + fftw_real tmp852; + fftw_real tmp853; + fftw_real tmp830; + fftw_real tmp835; + ASSERT_ALIGNED_DOUBLE; + tmp852 = tmp821 - tmp822; + tmp853 = tmp819 + tmp818; + tmp854 = K707106781 * (tmp852 - tmp853); + tmp864 = K707106781 * (tmp853 + tmp852); + tmp830 = tmp828 - tmp829; + tmp835 = tmp831 - tmp834; + tmp836 = (K923879532 * tmp830) + (K382683432 * tmp835); + tmp858 = (K382683432 * tmp830) - (K923879532 * tmp835); + } + tmp851 = tmp849 - tmp850; + tmp873 = tmp850 + tmp849; + tmp866 = tmp829 + tmp828; + tmp867 = tmp831 + tmp834; + tmp868 = (K382683432 * tmp866) + (K923879532 * tmp867); + tmp878 = (K923879532 * tmp866) - (K382683432 * tmp867); + { + fftw_real tmp841; + fftw_real tmp846; + fftw_real tmp869; + fftw_real tmp870; + ASSERT_ALIGNED_DOUBLE; + tmp841 = tmp837 - tmp840; + tmp846 = tmp844 - tmp845; + tmp847 = (K382683432 * tmp841) - (K923879532 * tmp846); + tmp859 = (K382683432 * tmp846) + (K923879532 * tmp841); + tmp869 = tmp837 + tmp840; + tmp870 = tmp845 + tmp844; + tmp871 = (K923879532 * tmp869) - (K382683432 * tmp870); + tmp879 = (K923879532 * tmp870) + (K382683432 * tmp869); + } + } + { + fftw_real tmp825; + fftw_real tmp848; + fftw_real tmp855; + fftw_real tmp856; + ASSERT_ALIGNED_DOUBLE; + tmp825 = tmp817 + tmp824; + tmp848 = tmp836 + tmp847; + c_re(output[44 * ostride]) = tmp825 - tmp848; + c_re(output[12 * ostride]) = tmp825 + tmp848; + tmp855 = tmp851 - tmp854; + tmp856 = tmp847 - tmp836; + c_im(output[60 * ostride]) = tmp855 - tmp856; + c_im(output[28 * ostride]) = tmp855 + tmp856; + } + { + fftw_real tmp861; + fftw_real tmp862; + fftw_real tmp857; + fftw_real tmp860; + ASSERT_ALIGNED_DOUBLE; + tmp861 = tmp851 + tmp854; + tmp862 = tmp858 + tmp859; + c_im(output[44 * ostride]) = tmp861 - tmp862; + c_im(output[12 * ostride]) = tmp861 + tmp862; + tmp857 = tmp817 - tmp824; + tmp860 = tmp858 - tmp859; + c_re(output[60 * ostride]) = tmp857 - tmp860; + c_re(output[28 * ostride]) = tmp857 + tmp860; + } + { + fftw_real tmp865; + fftw_real tmp872; + fftw_real tmp875; + fftw_real tmp876; + ASSERT_ALIGNED_DOUBLE; + tmp865 = tmp863 + tmp864; + tmp872 = tmp868 + tmp871; + c_re(output[36 * ostride]) = tmp865 - tmp872; + c_re(output[4 * ostride]) = tmp865 + tmp872; + tmp875 = tmp873 - tmp874; + tmp876 = tmp871 - tmp868; + c_im(output[52 * ostride]) = tmp875 - tmp876; + c_im(output[20 * ostride]) = tmp875 + tmp876; + } + { + fftw_real tmp881; + fftw_real tmp882; + fftw_real tmp877; + fftw_real tmp880; + ASSERT_ALIGNED_DOUBLE; + tmp881 = tmp873 + tmp874; + tmp882 = tmp878 + tmp879; + c_im(output[36 * ostride]) = tmp881 - tmp882; + c_im(output[4 * ostride]) = tmp881 + tmp882; + tmp877 = tmp863 - tmp864; + tmp880 = tmp878 - tmp879; + c_re(output[52 * ostride]) = tmp877 - tmp880; + c_re(output[20 * ostride]) = tmp877 + tmp880; + } + } + { + fftw_real tmp757; + fftw_real tmp795; + fftw_real tmp800; + fftw_real tmp810; + fftw_real tmp803; + fftw_real tmp811; + fftw_real tmp779; + fftw_real tmp791; + fftw_real tmp783; + fftw_real tmp805; + fftw_real tmp764; + fftw_real tmp806; + fftw_real tmp786; + fftw_real tmp796; + fftw_real tmp772; + fftw_real tmp790; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp756; + fftw_real tmp798; + fftw_real tmp799; + fftw_real tmp782; + fftw_real tmp760; + fftw_real tmp763; + ASSERT_ALIGNED_DOUBLE; + tmp756 = K707106781 * (tmp721 + tmp720); + tmp757 = tmp755 - tmp756; + tmp795 = tmp755 + tmp756; + tmp798 = tmp766 + tmp767; + tmp799 = tmp769 + tmp770; + tmp800 = (K980785280 * tmp798) + (K195090322 * tmp799); + tmp810 = (K980785280 * tmp799) - (K195090322 * tmp798); + { + fftw_real tmp801; + fftw_real tmp802; + fftw_real tmp775; + fftw_real tmp778; + ASSERT_ALIGNED_DOUBLE; + tmp801 = tmp773 + tmp774; + tmp802 = tmp776 + tmp777; + tmp803 = (K980785280 * tmp801) - (K195090322 * tmp802); + tmp811 = (K195090322 * tmp801) + (K980785280 * tmp802); + tmp775 = tmp773 - tmp774; + tmp778 = tmp776 - tmp777; + tmp779 = (K555570233 * tmp775) - (K831469612 * tmp778); + tmp791 = (K831469612 * tmp775) + (K555570233 * tmp778); + } + tmp782 = K707106781 * (tmp640 + tmp643); + tmp783 = tmp781 - tmp782; + tmp805 = tmp781 + tmp782; + tmp760 = (K923879532 * tmp758) - (K382683432 * tmp759); + tmp763 = (K923879532 * tmp761) + (K382683432 * tmp762); + tmp764 = tmp760 - tmp763; + tmp806 = tmp760 + tmp763; + { + fftw_real tmp784; + fftw_real tmp785; + fftw_real tmp768; + fftw_real tmp771; + ASSERT_ALIGNED_DOUBLE; + tmp784 = (K923879532 * tmp762) - (K382683432 * tmp761); + tmp785 = (K382683432 * tmp758) + (K923879532 * tmp759); + tmp786 = tmp784 - tmp785; + tmp796 = tmp785 + tmp784; + tmp768 = tmp766 - tmp767; + tmp771 = tmp769 - tmp770; + tmp772 = (K555570233 * tmp768) + (K831469612 * tmp771); + tmp790 = (K555570233 * tmp771) - (K831469612 * tmp768); + } + } + { + fftw_real tmp765; + fftw_real tmp780; + fftw_real tmp787; + fftw_real tmp788; + ASSERT_ALIGNED_DOUBLE; + tmp765 = tmp757 + tmp764; + tmp780 = tmp772 + tmp779; + c_re(output[42 * ostride]) = tmp765 - tmp780; + c_re(output[10 * ostride]) = tmp765 + tmp780; + tmp787 = tmp783 - tmp786; + tmp788 = tmp779 - tmp772; + c_im(output[58 * ostride]) = tmp787 - tmp788; + c_im(output[26 * ostride]) = tmp787 + tmp788; + } + { + fftw_real tmp793; + fftw_real tmp794; + fftw_real tmp789; + fftw_real tmp792; + ASSERT_ALIGNED_DOUBLE; + tmp793 = tmp783 + tmp786; + tmp794 = tmp790 + tmp791; + c_im(output[42 * ostride]) = tmp793 - tmp794; + c_im(output[10 * ostride]) = tmp793 + tmp794; + tmp789 = tmp757 - tmp764; + tmp792 = tmp790 - tmp791; + c_re(output[58 * ostride]) = tmp789 - tmp792; + c_re(output[26 * ostride]) = tmp789 + tmp792; + } + { + fftw_real tmp797; + fftw_real tmp804; + fftw_real tmp807; + fftw_real tmp808; + ASSERT_ALIGNED_DOUBLE; + tmp797 = tmp795 + tmp796; + tmp804 = tmp800 + tmp803; + c_re(output[34 * ostride]) = tmp797 - tmp804; + c_re(output[2 * ostride]) = tmp797 + tmp804; + tmp807 = tmp805 - tmp806; + tmp808 = tmp803 - tmp800; + c_im(output[50 * ostride]) = tmp807 - tmp808; + c_im(output[18 * ostride]) = tmp807 + tmp808; + } + { + fftw_real tmp813; + fftw_real tmp814; + fftw_real tmp809; + fftw_real tmp812; + ASSERT_ALIGNED_DOUBLE; + tmp813 = tmp805 + tmp806; + tmp814 = tmp810 + tmp811; + c_im(output[34 * ostride]) = tmp813 - tmp814; + c_im(output[2 * ostride]) = tmp813 + tmp814; + tmp809 = tmp795 - tmp796; + tmp812 = tmp810 - tmp811; + c_re(output[50 * ostride]) = tmp809 - tmp812; + c_re(output[18 * ostride]) = tmp809 + tmp812; + } + } + { + fftw_real tmp645; + fftw_real tmp735; + fftw_real tmp740; + fftw_real tmp750; + fftw_real tmp743; + fftw_real tmp751; + fftw_real tmp715; + fftw_real tmp731; + fftw_real tmp723; + fftw_real tmp745; + fftw_real tmp660; + fftw_real tmp746; + fftw_real tmp726; + fftw_real tmp736; + fftw_real tmp688; + fftw_real tmp730; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp644; + fftw_real tmp738; + fftw_real tmp739; + fftw_real tmp722; + fftw_real tmp652; + fftw_real tmp659; + ASSERT_ALIGNED_DOUBLE; + tmp644 = K707106781 * (tmp640 - tmp643); + tmp645 = tmp637 - tmp644; + tmp735 = tmp637 + tmp644; + tmp738 = tmp666 + tmp677; + tmp739 = tmp683 + tmp686; + tmp740 = (K555570233 * tmp738) + (K831469612 * tmp739); + tmp750 = (K831469612 * tmp738) - (K555570233 * tmp739); + { + fftw_real tmp741; + fftw_real tmp742; + fftw_real tmp705; + fftw_real tmp714; + ASSERT_ALIGNED_DOUBLE; + tmp741 = tmp693 + tmp704; + tmp742 = tmp710 + tmp713; + tmp743 = (K831469612 * tmp741) - (K555570233 * tmp742); + tmp751 = (K831469612 * tmp742) + (K555570233 * tmp741); + tmp705 = tmp693 - tmp704; + tmp714 = tmp710 - tmp713; + tmp715 = (K195090322 * tmp705) - (K980785280 * tmp714); + tmp731 = (K195090322 * tmp714) + (K980785280 * tmp705); + } + tmp722 = K707106781 * (tmp720 - tmp721); + tmp723 = tmp719 - tmp722; + tmp745 = tmp719 + tmp722; + tmp652 = (K382683432 * tmp648) - (K923879532 * tmp651); + tmp659 = (K382683432 * tmp655) + (K923879532 * tmp658); + tmp660 = tmp652 - tmp659; + tmp746 = tmp652 + tmp659; + { + fftw_real tmp724; + fftw_real tmp725; + fftw_real tmp678; + fftw_real tmp687; + ASSERT_ALIGNED_DOUBLE; + tmp724 = (K382683432 * tmp658) - (K923879532 * tmp655); + tmp725 = (K923879532 * tmp648) + (K382683432 * tmp651); + tmp726 = tmp724 - tmp725; + tmp736 = tmp725 + tmp724; + tmp678 = tmp666 - tmp677; + tmp687 = tmp683 - tmp686; + tmp688 = (K980785280 * tmp678) + (K195090322 * tmp687); + tmp730 = (K195090322 * tmp678) - (K980785280 * tmp687); + } + } + { + fftw_real tmp661; + fftw_real tmp716; + fftw_real tmp727; + fftw_real tmp728; + ASSERT_ALIGNED_DOUBLE; + tmp661 = tmp645 + tmp660; + tmp716 = tmp688 + tmp715; + c_re(output[46 * ostride]) = tmp661 - tmp716; + c_re(output[14 * ostride]) = tmp661 + tmp716; + tmp727 = tmp723 - tmp726; + tmp728 = tmp715 - tmp688; + c_im(output[62 * ostride]) = tmp727 - tmp728; + c_im(output[30 * ostride]) = tmp727 + tmp728; + } + { + fftw_real tmp733; + fftw_real tmp734; + fftw_real tmp729; + fftw_real tmp732; + ASSERT_ALIGNED_DOUBLE; + tmp733 = tmp723 + tmp726; + tmp734 = tmp730 + tmp731; + c_im(output[46 * ostride]) = tmp733 - tmp734; + c_im(output[14 * ostride]) = tmp733 + tmp734; + tmp729 = tmp645 - tmp660; + tmp732 = tmp730 - tmp731; + c_re(output[62 * ostride]) = tmp729 - tmp732; + c_re(output[30 * ostride]) = tmp729 + tmp732; + } + { + fftw_real tmp737; + fftw_real tmp744; + fftw_real tmp747; + fftw_real tmp748; + ASSERT_ALIGNED_DOUBLE; + tmp737 = tmp735 + tmp736; + tmp744 = tmp740 + tmp743; + c_re(output[38 * ostride]) = tmp737 - tmp744; + c_re(output[6 * ostride]) = tmp737 + tmp744; + tmp747 = tmp745 - tmp746; + tmp748 = tmp743 - tmp740; + c_im(output[54 * ostride]) = tmp747 - tmp748; + c_im(output[22 * ostride]) = tmp747 + tmp748; + } + { + fftw_real tmp753; + fftw_real tmp754; + fftw_real tmp749; + fftw_real tmp752; + ASSERT_ALIGNED_DOUBLE; + tmp753 = tmp745 + tmp746; + tmp754 = tmp750 + tmp751; + c_im(output[38 * ostride]) = tmp753 - tmp754; + c_im(output[6 * ostride]) = tmp753 + tmp754; + tmp749 = tmp735 - tmp736; + tmp752 = tmp750 - tmp751; + c_re(output[54 * ostride]) = tmp749 - tmp752; + c_re(output[22 * ostride]) = tmp749 + tmp752; + } + } + { + fftw_real tmp481; + fftw_real tmp555; + fftw_real tmp560; + fftw_real tmp570; + fftw_real tmp563; + fftw_real tmp571; + fftw_real tmp535; + fftw_real tmp551; + fftw_real tmp516; + fftw_real tmp550; + fftw_real tmp543; + fftw_real tmp565; + fftw_real tmp546; + fftw_real tmp556; + fftw_real tmp496; + fftw_real tmp566; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp473; + fftw_real tmp480; + fftw_real tmp558; + fftw_real tmp559; + ASSERT_ALIGNED_DOUBLE; + tmp473 = tmp471 - tmp472; + tmp480 = tmp476 - tmp479; + tmp481 = tmp473 - tmp480; + tmp555 = tmp473 + tmp480; + tmp558 = tmp500 + tmp507; + tmp559 = tmp511 + tmp514; + tmp560 = (K471396736 * tmp558) + (K881921264 * tmp559); + tmp570 = (K881921264 * tmp558) - (K471396736 * tmp559); + } + { + fftw_real tmp561; + fftw_real tmp562; + fftw_real tmp527; + fftw_real tmp534; + ASSERT_ALIGNED_DOUBLE; + tmp561 = tmp519 + tmp526; + tmp562 = tmp530 + tmp533; + tmp563 = (K881921264 * tmp561) - (K471396736 * tmp562); + tmp571 = (K881921264 * tmp562) + (K471396736 * tmp561); + tmp527 = tmp519 - tmp526; + tmp534 = tmp530 - tmp533; + tmp535 = (K290284677 * tmp527) - (K956940335 * tmp534); + tmp551 = (K290284677 * tmp534) + (K956940335 * tmp527); + } + { + fftw_real tmp508; + fftw_real tmp515; + fftw_real tmp539; + fftw_real tmp542; + ASSERT_ALIGNED_DOUBLE; + tmp508 = tmp500 - tmp507; + tmp515 = tmp511 - tmp514; + tmp516 = (K956940335 * tmp508) + (K290284677 * tmp515); + tmp550 = (K290284677 * tmp508) - (K956940335 * tmp515); + tmp539 = tmp537 - tmp538; + tmp542 = tmp540 - tmp541; + tmp543 = tmp539 - tmp542; + tmp565 = tmp539 + tmp542; + } + { + fftw_real tmp544; + fftw_real tmp545; + fftw_real tmp488; + fftw_real tmp495; + ASSERT_ALIGNED_DOUBLE; + tmp544 = (K555570233 * tmp491) - (K831469612 * tmp494); + tmp545 = (K555570233 * tmp487) + (K831469612 * tmp484); + tmp546 = tmp544 - tmp545; + tmp556 = tmp545 + tmp544; + tmp488 = (K555570233 * tmp484) - (K831469612 * tmp487); + tmp495 = (K831469612 * tmp491) + (K555570233 * tmp494); + tmp496 = tmp488 - tmp495; + tmp566 = tmp488 + tmp495; + } + { + fftw_real tmp497; + fftw_real tmp536; + fftw_real tmp547; + fftw_real tmp548; + ASSERT_ALIGNED_DOUBLE; + tmp497 = tmp481 + tmp496; + tmp536 = tmp516 + tmp535; + c_re(output[45 * ostride]) = tmp497 - tmp536; + c_re(output[13 * ostride]) = tmp497 + tmp536; + tmp547 = tmp543 - tmp546; + tmp548 = tmp535 - tmp516; + c_im(output[61 * ostride]) = tmp547 - tmp548; + c_im(output[29 * ostride]) = tmp547 + tmp548; + } + { + fftw_real tmp553; + fftw_real tmp554; + fftw_real tmp549; + fftw_real tmp552; + ASSERT_ALIGNED_DOUBLE; + tmp553 = tmp543 + tmp546; + tmp554 = tmp550 + tmp551; + c_im(output[45 * ostride]) = tmp553 - tmp554; + c_im(output[13 * ostride]) = tmp553 + tmp554; + tmp549 = tmp481 - tmp496; + tmp552 = tmp550 - tmp551; + c_re(output[61 * ostride]) = tmp549 - tmp552; + c_re(output[29 * ostride]) = tmp549 + tmp552; + } + { + fftw_real tmp557; + fftw_real tmp564; + fftw_real tmp567; + fftw_real tmp568; + ASSERT_ALIGNED_DOUBLE; + tmp557 = tmp555 + tmp556; + tmp564 = tmp560 + tmp563; + c_re(output[37 * ostride]) = tmp557 - tmp564; + c_re(output[5 * ostride]) = tmp557 + tmp564; + tmp567 = tmp565 - tmp566; + tmp568 = tmp563 - tmp560; + c_im(output[53 * ostride]) = tmp567 - tmp568; + c_im(output[21 * ostride]) = tmp567 + tmp568; + } + { + fftw_real tmp573; + fftw_real tmp574; + fftw_real tmp569; + fftw_real tmp572; + ASSERT_ALIGNED_DOUBLE; + tmp573 = tmp565 + tmp566; + tmp574 = tmp570 + tmp571; + c_im(output[37 * ostride]) = tmp573 - tmp574; + c_im(output[5 * ostride]) = tmp573 + tmp574; + tmp569 = tmp555 - tmp556; + tmp572 = tmp570 - tmp571; + c_re(output[53 * ostride]) = tmp569 - tmp572; + c_re(output[21 * ostride]) = tmp569 + tmp572; + } + } + { + fftw_real tmp577; + fftw_real tmp615; + fftw_real tmp620; + fftw_real tmp630; + fftw_real tmp623; + fftw_real tmp631; + fftw_real tmp599; + fftw_real tmp611; + fftw_real tmp592; + fftw_real tmp610; + fftw_real tmp603; + fftw_real tmp625; + fftw_real tmp606; + fftw_real tmp616; + fftw_real tmp584; + fftw_real tmp626; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp575; + fftw_real tmp576; + fftw_real tmp618; + fftw_real tmp619; + ASSERT_ALIGNED_DOUBLE; + tmp575 = tmp471 + tmp472; + tmp576 = tmp541 + tmp540; + tmp577 = tmp575 - tmp576; + tmp615 = tmp575 + tmp576; + tmp618 = tmp586 + tmp587; + tmp619 = tmp589 + tmp590; + tmp620 = (K995184726 * tmp618) + (K098017140 * tmp619); + tmp630 = (K995184726 * tmp619) - (K098017140 * tmp618); + } + { + fftw_real tmp621; + fftw_real tmp622; + fftw_real tmp595; + fftw_real tmp598; + ASSERT_ALIGNED_DOUBLE; + tmp621 = tmp593 + tmp594; + tmp622 = tmp596 + tmp597; + tmp623 = (K995184726 * tmp621) - (K098017140 * tmp622); + tmp631 = (K098017140 * tmp621) + (K995184726 * tmp622); + tmp595 = tmp593 - tmp594; + tmp598 = tmp596 - tmp597; + tmp599 = (K634393284 * tmp595) - (K773010453 * tmp598); + tmp611 = (K773010453 * tmp595) + (K634393284 * tmp598); + } + { + fftw_real tmp588; + fftw_real tmp591; + fftw_real tmp601; + fftw_real tmp602; + ASSERT_ALIGNED_DOUBLE; + tmp588 = tmp586 - tmp587; + tmp591 = tmp589 - tmp590; + tmp592 = (K634393284 * tmp588) + (K773010453 * tmp591); + tmp610 = (K634393284 * tmp591) - (K773010453 * tmp588); + tmp601 = tmp537 + tmp538; + tmp602 = tmp476 + tmp479; + tmp603 = tmp601 - tmp602; + tmp625 = tmp601 + tmp602; + } + { + fftw_real tmp604; + fftw_real tmp605; + fftw_real tmp580; + fftw_real tmp583; + ASSERT_ALIGNED_DOUBLE; + tmp604 = (K980785280 * tmp581) - (K195090322 * tmp582); + tmp605 = (K980785280 * tmp579) + (K195090322 * tmp578); + tmp606 = tmp604 - tmp605; + tmp616 = tmp605 + tmp604; + tmp580 = (K980785280 * tmp578) - (K195090322 * tmp579); + tmp583 = (K195090322 * tmp581) + (K980785280 * tmp582); + tmp584 = tmp580 - tmp583; + tmp626 = tmp580 + tmp583; + } + { + fftw_real tmp585; + fftw_real tmp600; + fftw_real tmp607; + fftw_real tmp608; + ASSERT_ALIGNED_DOUBLE; + tmp585 = tmp577 + tmp584; + tmp600 = tmp592 + tmp599; + c_re(output[41 * ostride]) = tmp585 - tmp600; + c_re(output[9 * ostride]) = tmp585 + tmp600; + tmp607 = tmp603 - tmp606; + tmp608 = tmp599 - tmp592; + c_im(output[57 * ostride]) = tmp607 - tmp608; + c_im(output[25 * ostride]) = tmp607 + tmp608; + } + { + fftw_real tmp613; + fftw_real tmp614; + fftw_real tmp609; + fftw_real tmp612; + ASSERT_ALIGNED_DOUBLE; + tmp613 = tmp603 + tmp606; + tmp614 = tmp610 + tmp611; + c_im(output[41 * ostride]) = tmp613 - tmp614; + c_im(output[9 * ostride]) = tmp613 + tmp614; + tmp609 = tmp577 - tmp584; + tmp612 = tmp610 - tmp611; + c_re(output[57 * ostride]) = tmp609 - tmp612; + c_re(output[25 * ostride]) = tmp609 + tmp612; + } + { + fftw_real tmp617; + fftw_real tmp624; + fftw_real tmp627; + fftw_real tmp628; + ASSERT_ALIGNED_DOUBLE; + tmp617 = tmp615 + tmp616; + tmp624 = tmp620 + tmp623; + c_re(output[33 * ostride]) = tmp617 - tmp624; + c_re(output[ostride]) = tmp617 + tmp624; + tmp627 = tmp625 - tmp626; + tmp628 = tmp623 - tmp620; + c_im(output[49 * ostride]) = tmp627 - tmp628; + c_im(output[17 * ostride]) = tmp627 + tmp628; + } + { + fftw_real tmp633; + fftw_real tmp634; + fftw_real tmp629; + fftw_real tmp632; + ASSERT_ALIGNED_DOUBLE; + tmp633 = tmp625 + tmp626; + tmp634 = tmp630 + tmp631; + c_im(output[33 * ostride]) = tmp633 - tmp634; + c_im(output[ostride]) = tmp633 + tmp634; + tmp629 = tmp615 - tmp616; + tmp632 = tmp630 - tmp631; + c_re(output[49 * ostride]) = tmp629 - tmp632; + c_re(output[17 * ostride]) = tmp629 + tmp632; + } + } +} + +fftw_codelet_desc fftw_no_twiddle_64_desc = +{ + "fftw_no_twiddle_64", + (void (*)()) fftw_no_twiddle_64, + 64, + FFTW_FORWARD, + FFTW_NOTW, + 1409, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fn_7.c b/src/sndobj/rfftw/fn_7.c new file mode 100644 index 0000000..c852679 --- /dev/null +++ b/src/sndobj/rfftw/fn_7.c @@ -0,0 +1,170 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:43:47 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddle 7 */ + +/* + * This function contains 60 FP additions, 36 FP multiplications, + * (or, 60 additions, 36 multiplications, 0 fused multiply/add), + * 22 stack variables, and 28 memory accesses + */ +static const fftw_real K222520933 = FFTW_KONST(+0.222520933956314404288902564496794759466355569); +static const fftw_real K900968867 = FFTW_KONST(+0.900968867902419126236102319507445051165919162); +static const fftw_real K623489801 = FFTW_KONST(+0.623489801858733530525004884004239810632274731); +static const fftw_real K433883739 = FFTW_KONST(+0.433883739117558120475768332848358754609990728); +static const fftw_real K974927912 = FFTW_KONST(+0.974927912181823607018131682993931217232785801); +static const fftw_real K781831482 = FFTW_KONST(+0.781831482468029808708444526674057750232334519); + +/* + * Generator Id's : + * $Id: fn_7.c,v 1.1.1.1 2006/05/12 15:14:58 veplaini Exp $ + * $Id: fn_7.c,v 1.1.1.1 2006/05/12 15:14:58 veplaini Exp $ + * $Id: fn_7.c,v 1.1.1.1 2006/05/12 15:14:58 veplaini Exp $ + */ + +void fftw_no_twiddle_7(const fftw_complex *input, fftw_complex *output, int istride, int ostride) +{ + fftw_real tmp1; + fftw_real tmp30; + fftw_real tmp4; + fftw_real tmp26; + fftw_real tmp14; + fftw_real tmp33; + fftw_real tmp7; + fftw_real tmp28; + fftw_real tmp20; + fftw_real tmp31; + fftw_real tmp10; + fftw_real tmp27; + fftw_real tmp17; + fftw_real tmp32; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(input[0]); + tmp30 = c_im(input[0]); + { + fftw_real tmp2; + fftw_real tmp3; + fftw_real tmp12; + fftw_real tmp13; + ASSERT_ALIGNED_DOUBLE; + tmp2 = c_re(input[istride]); + tmp3 = c_re(input[6 * istride]); + tmp4 = tmp2 + tmp3; + tmp26 = tmp3 - tmp2; + tmp12 = c_im(input[istride]); + tmp13 = c_im(input[6 * istride]); + tmp14 = tmp12 - tmp13; + tmp33 = tmp12 + tmp13; + } + { + fftw_real tmp5; + fftw_real tmp6; + fftw_real tmp18; + fftw_real tmp19; + ASSERT_ALIGNED_DOUBLE; + tmp5 = c_re(input[2 * istride]); + tmp6 = c_re(input[5 * istride]); + tmp7 = tmp5 + tmp6; + tmp28 = tmp6 - tmp5; + tmp18 = c_im(input[2 * istride]); + tmp19 = c_im(input[5 * istride]); + tmp20 = tmp18 - tmp19; + tmp31 = tmp18 + tmp19; + } + { + fftw_real tmp8; + fftw_real tmp9; + fftw_real tmp15; + fftw_real tmp16; + ASSERT_ALIGNED_DOUBLE; + tmp8 = c_re(input[3 * istride]); + tmp9 = c_re(input[4 * istride]); + tmp10 = tmp8 + tmp9; + tmp27 = tmp9 - tmp8; + tmp15 = c_im(input[3 * istride]); + tmp16 = c_im(input[4 * istride]); + tmp17 = tmp15 - tmp16; + tmp32 = tmp15 + tmp16; + } + { + fftw_real tmp23; + fftw_real tmp22; + fftw_real tmp35; + fftw_real tmp36; + ASSERT_ALIGNED_DOUBLE; + c_re(output[0]) = tmp1 + tmp4 + tmp7 + tmp10; + tmp23 = (K781831482 * tmp14) + (K974927912 * tmp20) + (K433883739 * tmp17); + tmp22 = tmp1 + (K623489801 * tmp4) - (K900968867 * tmp10) - (K222520933 * tmp7); + c_re(output[6 * ostride]) = tmp22 - tmp23; + c_re(output[ostride]) = tmp22 + tmp23; + { + fftw_real tmp25; + fftw_real tmp24; + fftw_real tmp21; + fftw_real tmp11; + ASSERT_ALIGNED_DOUBLE; + tmp25 = (K433883739 * tmp14) + (K974927912 * tmp17) - (K781831482 * tmp20); + tmp24 = tmp1 + (K623489801 * tmp7) - (K222520933 * tmp10) - (K900968867 * tmp4); + c_re(output[4 * ostride]) = tmp24 - tmp25; + c_re(output[3 * ostride]) = tmp24 + tmp25; + tmp21 = (K974927912 * tmp14) - (K781831482 * tmp17) - (K433883739 * tmp20); + tmp11 = tmp1 + (K623489801 * tmp10) - (K900968867 * tmp7) - (K222520933 * tmp4); + c_re(output[5 * ostride]) = tmp11 - tmp21; + c_re(output[2 * ostride]) = tmp11 + tmp21; + } + c_im(output[0]) = tmp30 + tmp33 + tmp31 + tmp32; + tmp35 = (K781831482 * tmp26) + (K974927912 * tmp28) + (K433883739 * tmp27); + tmp36 = tmp30 + (K623489801 * tmp33) - (K900968867 * tmp32) - (K222520933 * tmp31); + c_im(output[ostride]) = tmp35 + tmp36; + c_im(output[6 * ostride]) = tmp36 - tmp35; + { + fftw_real tmp29; + fftw_real tmp34; + fftw_real tmp37; + fftw_real tmp38; + ASSERT_ALIGNED_DOUBLE; + tmp29 = (K433883739 * tmp26) + (K974927912 * tmp27) - (K781831482 * tmp28); + tmp34 = tmp30 + (K623489801 * tmp31) - (K222520933 * tmp32) - (K900968867 * tmp33); + c_im(output[3 * ostride]) = tmp29 + tmp34; + c_im(output[4 * ostride]) = tmp34 - tmp29; + tmp37 = (K974927912 * tmp26) - (K781831482 * tmp27) - (K433883739 * tmp28); + tmp38 = tmp30 + (K623489801 * tmp32) - (K900968867 * tmp31) - (K222520933 * tmp33); + c_im(output[2 * ostride]) = tmp37 + tmp38; + c_im(output[5 * ostride]) = tmp38 - tmp37; + } + } +} + +fftw_codelet_desc fftw_no_twiddle_7_desc = +{ + "fftw_no_twiddle_7", + (void (*)()) fftw_no_twiddle_7, + 7, + FFTW_FORWARD, + FFTW_NOTW, + 155, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fn_8.c b/src/sndobj/rfftw/fn_8.c new file mode 100644 index 0000000..1421eab --- /dev/null +++ b/src/sndobj/rfftw/fn_8.c @@ -0,0 +1,201 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:43:47 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddle 8 */ + +/* + * This function contains 52 FP additions, 4 FP multiplications, + * (or, 52 additions, 4 multiplications, 0 fused multiply/add), + * 26 stack variables, and 32 memory accesses + */ +static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); + +/* + * Generator Id's : + * $Id: fn_8.c,v 1.1.1.1 2006/05/12 15:14:46 veplaini Exp $ + * $Id: fn_8.c,v 1.1.1.1 2006/05/12 15:14:46 veplaini Exp $ + * $Id: fn_8.c,v 1.1.1.1 2006/05/12 15:14:46 veplaini Exp $ + */ + +void fftw_no_twiddle_8(const fftw_complex *input, fftw_complex *output, int istride, int ostride) +{ + fftw_real tmp3; + fftw_real tmp23; + fftw_real tmp18; + fftw_real tmp38; + fftw_real tmp6; + fftw_real tmp37; + fftw_real tmp21; + fftw_real tmp24; + fftw_real tmp13; + fftw_real tmp49; + fftw_real tmp35; + fftw_real tmp43; + fftw_real tmp10; + fftw_real tmp48; + fftw_real tmp30; + fftw_real tmp42; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp19; + fftw_real tmp20; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(input[0]); + tmp2 = c_re(input[4 * istride]); + tmp3 = tmp1 + tmp2; + tmp23 = tmp1 - tmp2; + { + fftw_real tmp16; + fftw_real tmp17; + fftw_real tmp4; + fftw_real tmp5; + ASSERT_ALIGNED_DOUBLE; + tmp16 = c_im(input[0]); + tmp17 = c_im(input[4 * istride]); + tmp18 = tmp16 + tmp17; + tmp38 = tmp16 - tmp17; + tmp4 = c_re(input[2 * istride]); + tmp5 = c_re(input[6 * istride]); + tmp6 = tmp4 + tmp5; + tmp37 = tmp4 - tmp5; + } + tmp19 = c_im(input[2 * istride]); + tmp20 = c_im(input[6 * istride]); + tmp21 = tmp19 + tmp20; + tmp24 = tmp19 - tmp20; + { + fftw_real tmp11; + fftw_real tmp12; + fftw_real tmp31; + fftw_real tmp32; + fftw_real tmp33; + fftw_real tmp34; + ASSERT_ALIGNED_DOUBLE; + tmp11 = c_re(input[7 * istride]); + tmp12 = c_re(input[3 * istride]); + tmp31 = tmp11 - tmp12; + tmp32 = c_im(input[7 * istride]); + tmp33 = c_im(input[3 * istride]); + tmp34 = tmp32 - tmp33; + tmp13 = tmp11 + tmp12; + tmp49 = tmp32 + tmp33; + tmp35 = tmp31 - tmp34; + tmp43 = tmp31 + tmp34; + } + { + fftw_real tmp8; + fftw_real tmp9; + fftw_real tmp26; + fftw_real tmp27; + fftw_real tmp28; + fftw_real tmp29; + ASSERT_ALIGNED_DOUBLE; + tmp8 = c_re(input[istride]); + tmp9 = c_re(input[5 * istride]); + tmp26 = tmp8 - tmp9; + tmp27 = c_im(input[istride]); + tmp28 = c_im(input[5 * istride]); + tmp29 = tmp27 - tmp28; + tmp10 = tmp8 + tmp9; + tmp48 = tmp27 + tmp28; + tmp30 = tmp26 + tmp29; + tmp42 = tmp29 - tmp26; + } + } + { + fftw_real tmp7; + fftw_real tmp14; + fftw_real tmp15; + fftw_real tmp22; + ASSERT_ALIGNED_DOUBLE; + tmp7 = tmp3 + tmp6; + tmp14 = tmp10 + tmp13; + c_re(output[4 * ostride]) = tmp7 - tmp14; + c_re(output[0]) = tmp7 + tmp14; + tmp15 = tmp13 - tmp10; + tmp22 = tmp18 - tmp21; + c_im(output[2 * ostride]) = tmp15 + tmp22; + c_im(output[6 * ostride]) = tmp22 - tmp15; + } + { + fftw_real tmp51; + fftw_real tmp52; + fftw_real tmp47; + fftw_real tmp50; + ASSERT_ALIGNED_DOUBLE; + tmp51 = tmp18 + tmp21; + tmp52 = tmp48 + tmp49; + c_im(output[4 * ostride]) = tmp51 - tmp52; + c_im(output[0]) = tmp51 + tmp52; + tmp47 = tmp3 - tmp6; + tmp50 = tmp48 - tmp49; + c_re(output[6 * ostride]) = tmp47 - tmp50; + c_re(output[2 * ostride]) = tmp47 + tmp50; + } + { + fftw_real tmp25; + fftw_real tmp36; + fftw_real tmp39; + fftw_real tmp40; + ASSERT_ALIGNED_DOUBLE; + tmp25 = tmp23 + tmp24; + tmp36 = K707106781 * (tmp30 + tmp35); + c_re(output[5 * ostride]) = tmp25 - tmp36; + c_re(output[ostride]) = tmp25 + tmp36; + tmp39 = tmp37 + tmp38; + tmp40 = K707106781 * (tmp35 - tmp30); + c_im(output[7 * ostride]) = tmp39 - tmp40; + c_im(output[3 * ostride]) = tmp39 + tmp40; + } + { + fftw_real tmp45; + fftw_real tmp46; + fftw_real tmp41; + fftw_real tmp44; + ASSERT_ALIGNED_DOUBLE; + tmp45 = tmp38 - tmp37; + tmp46 = K707106781 * (tmp42 + tmp43); + c_im(output[5 * ostride]) = tmp45 - tmp46; + c_im(output[ostride]) = tmp45 + tmp46; + tmp41 = tmp23 - tmp24; + tmp44 = K707106781 * (tmp42 - tmp43); + c_re(output[7 * ostride]) = tmp41 - tmp44; + c_re(output[3 * ostride]) = tmp41 + tmp44; + } +} + +fftw_codelet_desc fftw_no_twiddle_8_desc = +{ + "fftw_no_twiddle_8", + (void (*)()) fftw_no_twiddle_8, + 8, + FFTW_FORWARD, + FFTW_NOTW, + 177, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fn_9.c b/src/sndobj/rfftw/fn_9.c new file mode 100644 index 0000000..4475465 --- /dev/null +++ b/src/sndobj/rfftw/fn_9.c @@ -0,0 +1,275 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:43:47 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddle 9 */ + +/* + * This function contains 80 FP additions, 40 FP multiplications, + * (or, 60 additions, 20 multiplications, 20 fused multiply/add), + * 30 stack variables, and 36 memory accesses + */ +static const fftw_real K939692620 = FFTW_KONST(+0.939692620785908384054109277324731469936208134); +static const fftw_real K342020143 = FFTW_KONST(+0.342020143325668733044099614682259580763083368); +static const fftw_real K984807753 = FFTW_KONST(+0.984807753012208059366743024589523013670643252); +static const fftw_real K173648177 = FFTW_KONST(+0.173648177666930348851716626769314796000375677); +static const fftw_real K642787609 = FFTW_KONST(+0.642787609686539326322643409907263432907559884); +static const fftw_real K766044443 = FFTW_KONST(+0.766044443118978035202392650555416673935832457); +static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); +static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); + +/* + * Generator Id's : + * $Id: fn_9.c,v 1.1.1.1 2006/05/12 15:14:55 veplaini Exp $ + * $Id: fn_9.c,v 1.1.1.1 2006/05/12 15:14:55 veplaini Exp $ + * $Id: fn_9.c,v 1.1.1.1 2006/05/12 15:14:55 veplaini Exp $ + */ + +void fftw_no_twiddle_9(const fftw_complex *input, fftw_complex *output, int istride, int ostride) +{ + fftw_real tmp5; + fftw_real tmp17; + fftw_real tmp50; + fftw_real tmp20; + fftw_real tmp78; + fftw_real tmp53; + fftw_real tmp10; + fftw_real tmp26; + fftw_real tmp58; + fftw_real tmp74; + fftw_real tmp31; + fftw_real tmp59; + fftw_real tmp15; + fftw_real tmp37; + fftw_real tmp62; + fftw_real tmp75; + fftw_real tmp42; + fftw_real tmp61; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp3; + fftw_real tmp4; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(input[0]); + tmp2 = c_re(input[3 * istride]); + tmp3 = c_re(input[6 * istride]); + tmp4 = tmp2 + tmp3; + tmp5 = tmp1 + tmp4; + tmp17 = tmp1 - (K500000000 * tmp4); + tmp50 = K866025403 * (tmp3 - tmp2); + } + { + fftw_real tmp51; + fftw_real tmp18; + fftw_real tmp19; + fftw_real tmp52; + ASSERT_ALIGNED_DOUBLE; + tmp51 = c_im(input[0]); + tmp18 = c_im(input[3 * istride]); + tmp19 = c_im(input[6 * istride]); + tmp52 = tmp18 + tmp19; + tmp20 = K866025403 * (tmp18 - tmp19); + tmp78 = tmp51 + tmp52; + tmp53 = tmp51 - (K500000000 * tmp52); + } + { + fftw_real tmp6; + fftw_real tmp28; + fftw_real tmp9; + fftw_real tmp27; + fftw_real tmp25; + fftw_real tmp29; + fftw_real tmp22; + fftw_real tmp30; + ASSERT_ALIGNED_DOUBLE; + tmp6 = c_re(input[istride]); + tmp28 = c_im(input[istride]); + { + fftw_real tmp7; + fftw_real tmp8; + fftw_real tmp23; + fftw_real tmp24; + ASSERT_ALIGNED_DOUBLE; + tmp7 = c_re(input[4 * istride]); + tmp8 = c_re(input[7 * istride]); + tmp9 = tmp7 + tmp8; + tmp27 = K866025403 * (tmp8 - tmp7); + tmp23 = c_im(input[4 * istride]); + tmp24 = c_im(input[7 * istride]); + tmp25 = K866025403 * (tmp23 - tmp24); + tmp29 = tmp23 + tmp24; + } + tmp10 = tmp6 + tmp9; + tmp22 = tmp6 - (K500000000 * tmp9); + tmp26 = tmp22 + tmp25; + tmp58 = tmp22 - tmp25; + tmp74 = tmp28 + tmp29; + tmp30 = tmp28 - (K500000000 * tmp29); + tmp31 = tmp27 + tmp30; + tmp59 = tmp30 - tmp27; + } + { + fftw_real tmp11; + fftw_real tmp39; + fftw_real tmp14; + fftw_real tmp38; + fftw_real tmp36; + fftw_real tmp40; + fftw_real tmp33; + fftw_real tmp41; + ASSERT_ALIGNED_DOUBLE; + tmp11 = c_re(input[2 * istride]); + tmp39 = c_im(input[2 * istride]); + { + fftw_real tmp12; + fftw_real tmp13; + fftw_real tmp34; + fftw_real tmp35; + ASSERT_ALIGNED_DOUBLE; + tmp12 = c_re(input[5 * istride]); + tmp13 = c_re(input[8 * istride]); + tmp14 = tmp12 + tmp13; + tmp38 = K866025403 * (tmp13 - tmp12); + tmp34 = c_im(input[5 * istride]); + tmp35 = c_im(input[8 * istride]); + tmp36 = K866025403 * (tmp34 - tmp35); + tmp40 = tmp34 + tmp35; + } + tmp15 = tmp11 + tmp14; + tmp33 = tmp11 - (K500000000 * tmp14); + tmp37 = tmp33 + tmp36; + tmp62 = tmp33 - tmp36; + tmp75 = tmp39 + tmp40; + tmp41 = tmp39 - (K500000000 * tmp40); + tmp42 = tmp38 + tmp41; + tmp61 = tmp41 - tmp38; + } + { + fftw_real tmp76; + fftw_real tmp16; + fftw_real tmp73; + fftw_real tmp77; + fftw_real tmp79; + fftw_real tmp80; + ASSERT_ALIGNED_DOUBLE; + tmp76 = K866025403 * (tmp74 - tmp75); + tmp16 = tmp10 + tmp15; + tmp73 = tmp5 - (K500000000 * tmp16); + c_re(output[0]) = tmp5 + tmp16; + c_re(output[3 * ostride]) = tmp73 + tmp76; + c_re(output[6 * ostride]) = tmp73 - tmp76; + tmp77 = K866025403 * (tmp15 - tmp10); + tmp79 = tmp74 + tmp75; + tmp80 = tmp78 - (K500000000 * tmp79); + c_im(output[3 * ostride]) = tmp77 + tmp80; + c_im(output[6 * ostride]) = tmp80 - tmp77; + c_im(output[0]) = tmp78 + tmp79; + } + { + fftw_real tmp21; + fftw_real tmp54; + fftw_real tmp44; + fftw_real tmp49; + fftw_real tmp48; + fftw_real tmp55; + fftw_real tmp45; + fftw_real tmp56; + ASSERT_ALIGNED_DOUBLE; + tmp21 = tmp17 + tmp20; + tmp54 = tmp50 + tmp53; + { + fftw_real tmp32; + fftw_real tmp43; + fftw_real tmp46; + fftw_real tmp47; + ASSERT_ALIGNED_DOUBLE; + tmp32 = (K766044443 * tmp26) + (K642787609 * tmp31); + tmp43 = (K173648177 * tmp37) + (K984807753 * tmp42); + tmp44 = tmp32 + tmp43; + tmp49 = K866025403 * (tmp43 - tmp32); + tmp46 = (K766044443 * tmp31) - (K642787609 * tmp26); + tmp47 = (K173648177 * tmp42) - (K984807753 * tmp37); + tmp48 = K866025403 * (tmp46 - tmp47); + tmp55 = tmp46 + tmp47; + } + c_re(output[ostride]) = tmp21 + tmp44; + tmp45 = tmp21 - (K500000000 * tmp44); + c_re(output[7 * ostride]) = tmp45 - tmp48; + c_re(output[4 * ostride]) = tmp45 + tmp48; + c_im(output[ostride]) = tmp54 + tmp55; + tmp56 = tmp54 - (K500000000 * tmp55); + c_im(output[4 * ostride]) = tmp49 + tmp56; + c_im(output[7 * ostride]) = tmp56 - tmp49; + } + { + fftw_real tmp57; + fftw_real tmp69; + fftw_real tmp72; + fftw_real tmp66; + fftw_real tmp64; + fftw_real tmp65; + fftw_real tmp71; + fftw_real tmp70; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp67; + fftw_real tmp68; + fftw_real tmp60; + fftw_real tmp63; + ASSERT_ALIGNED_DOUBLE; + tmp57 = tmp17 - tmp20; + tmp67 = (K173648177 * tmp59) - (K984807753 * tmp58); + tmp68 = (K342020143 * tmp62) + (K939692620 * tmp61); + tmp69 = tmp67 - tmp68; + tmp72 = K866025403 * (tmp67 + tmp68); + tmp66 = tmp53 - tmp50; + tmp60 = (K173648177 * tmp58) + (K984807753 * tmp59); + tmp63 = (K342020143 * tmp61) - (K939692620 * tmp62); + tmp64 = tmp60 + tmp63; + tmp65 = K866025403 * (tmp63 - tmp60); + } + c_re(output[2 * ostride]) = tmp57 + tmp64; + tmp71 = tmp57 - (K500000000 * tmp64); + c_re(output[8 * ostride]) = tmp71 - tmp72; + c_re(output[5 * ostride]) = tmp71 + tmp72; + c_im(output[2 * ostride]) = tmp66 + tmp69; + tmp70 = tmp66 - (K500000000 * tmp69); + c_im(output[5 * ostride]) = tmp65 + tmp70; + c_im(output[8 * ostride]) = tmp70 - tmp65; + } +} + +fftw_codelet_desc fftw_no_twiddle_9_desc = +{ + "fftw_no_twiddle_9", + (void (*)()) fftw_no_twiddle_9, + 9, + FFTW_FORWARD, + FFTW_NOTW, + 199, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fni_1.c b/src/sndobj/rfftw/fni_1.c new file mode 100644 index 0000000..fd24544 --- /dev/null +++ b/src/sndobj/rfftw/fni_1.c @@ -0,0 +1,62 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:02 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddleinv 1 */ + +/* + * This function contains 0 FP additions, 0 FP multiplications, + * (or, 0 additions, 0 multiplications, 0 fused multiply/add), + * 2 stack variables, and 4 memory accesses + */ + +/* + * Generator Id's : + * $Id: fni_1.c,v 1.1.1.1 2006/05/12 15:14:45 veplaini Exp $ + * $Id: fni_1.c,v 1.1.1.1 2006/05/12 15:14:45 veplaini Exp $ + * $Id: fni_1.c,v 1.1.1.1 2006/05/12 15:14:45 veplaini Exp $ + */ + +void fftwi_no_twiddle_1(const fftw_complex *input, fftw_complex *output, int istride, int ostride) +{ + fftw_real tmp1; + fftw_real tmp2; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(input[0]); + c_re(output[0]) = tmp1; + tmp2 = c_im(input[0]); + c_im(output[0]) = tmp2; +} + +fftw_codelet_desc fftwi_no_twiddle_1_desc = +{ + "fftwi_no_twiddle_1", + (void (*)()) fftwi_no_twiddle_1, + 1, + FFTW_BACKWARD, + FFTW_NOTW, + 34, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fni_10.c b/src/sndobj/rfftw/fni_10.c new file mode 100644 index 0000000..8dc01b8 --- /dev/null +++ b/src/sndobj/rfftw/fni_10.c @@ -0,0 +1,281 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:08 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddleinv 10 */ + +/* + * This function contains 84 FP additions, 24 FP multiplications, + * (or, 72 additions, 12 multiplications, 12 fused multiply/add), + * 36 stack variables, and 40 memory accesses + */ +static const fftw_real K559016994 = FFTW_KONST(+0.559016994374947424102293417182819058860154590); +static const fftw_real K250000000 = FFTW_KONST(+0.250000000000000000000000000000000000000000000); +static const fftw_real K951056516 = FFTW_KONST(+0.951056516295153572116439333379382143405698634); +static const fftw_real K587785252 = FFTW_KONST(+0.587785252292473129168705954639072768597652438); + +/* + * Generator Id's : + * $Id: fni_10.c,v 1.1.1.1 2006/05/12 15:14:44 veplaini Exp $ + * $Id: fni_10.c,v 1.1.1.1 2006/05/12 15:14:44 veplaini Exp $ + * $Id: fni_10.c,v 1.1.1.1 2006/05/12 15:14:44 veplaini Exp $ + */ + +void fftwi_no_twiddle_10(const fftw_complex *input, fftw_complex *output, int istride, int ostride) +{ + fftw_real tmp3; + fftw_real tmp19; + fftw_real tmp55; + fftw_real tmp76; + fftw_real tmp47; + fftw_real tmp48; + fftw_real tmp10; + fftw_real tmp17; + fftw_real tmp18; + fftw_real tmp74; + fftw_real tmp73; + fftw_real tmp22; + fftw_real tmp25; + fftw_real tmp26; + fftw_real tmp36; + fftw_real tmp43; + fftw_real tmp50; + fftw_real tmp51; + fftw_real tmp56; + fftw_real tmp66; + fftw_real tmp69; + fftw_real tmp77; + fftw_real tmp78; + fftw_real tmp79; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp53; + fftw_real tmp54; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(input[0]); + tmp2 = c_re(input[5 * istride]); + tmp3 = tmp1 - tmp2; + tmp19 = tmp1 + tmp2; + tmp53 = c_im(input[0]); + tmp54 = c_im(input[5 * istride]); + tmp55 = tmp53 - tmp54; + tmp76 = tmp53 + tmp54; + } + { + fftw_real tmp6; + fftw_real tmp20; + fftw_real tmp16; + fftw_real tmp24; + fftw_real tmp9; + fftw_real tmp21; + fftw_real tmp13; + fftw_real tmp23; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp4; + fftw_real tmp5; + fftw_real tmp14; + fftw_real tmp15; + ASSERT_ALIGNED_DOUBLE; + tmp4 = c_re(input[2 * istride]); + tmp5 = c_re(input[7 * istride]); + tmp6 = tmp4 - tmp5; + tmp20 = tmp4 + tmp5; + tmp14 = c_re(input[6 * istride]); + tmp15 = c_re(input[istride]); + tmp16 = tmp14 - tmp15; + tmp24 = tmp14 + tmp15; + } + { + fftw_real tmp7; + fftw_real tmp8; + fftw_real tmp11; + fftw_real tmp12; + ASSERT_ALIGNED_DOUBLE; + tmp7 = c_re(input[8 * istride]); + tmp8 = c_re(input[3 * istride]); + tmp9 = tmp7 - tmp8; + tmp21 = tmp7 + tmp8; + tmp11 = c_re(input[4 * istride]); + tmp12 = c_re(input[9 * istride]); + tmp13 = tmp11 - tmp12; + tmp23 = tmp11 + tmp12; + } + tmp47 = tmp6 - tmp9; + tmp48 = tmp13 - tmp16; + tmp10 = tmp6 + tmp9; + tmp17 = tmp13 + tmp16; + tmp18 = tmp10 + tmp17; + tmp74 = tmp23 - tmp24; + tmp73 = tmp20 - tmp21; + tmp22 = tmp20 + tmp21; + tmp25 = tmp23 + tmp24; + tmp26 = tmp22 + tmp25; + } + { + fftw_real tmp32; + fftw_real tmp64; + fftw_real tmp42; + fftw_real tmp68; + fftw_real tmp35; + fftw_real tmp65; + fftw_real tmp39; + fftw_real tmp67; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp30; + fftw_real tmp31; + fftw_real tmp40; + fftw_real tmp41; + ASSERT_ALIGNED_DOUBLE; + tmp30 = c_im(input[2 * istride]); + tmp31 = c_im(input[7 * istride]); + tmp32 = tmp30 - tmp31; + tmp64 = tmp30 + tmp31; + tmp40 = c_im(input[6 * istride]); + tmp41 = c_im(input[istride]); + tmp42 = tmp40 - tmp41; + tmp68 = tmp40 + tmp41; + } + { + fftw_real tmp33; + fftw_real tmp34; + fftw_real tmp37; + fftw_real tmp38; + ASSERT_ALIGNED_DOUBLE; + tmp33 = c_im(input[8 * istride]); + tmp34 = c_im(input[3 * istride]); + tmp35 = tmp33 - tmp34; + tmp65 = tmp33 + tmp34; + tmp37 = c_im(input[4 * istride]); + tmp38 = c_im(input[9 * istride]); + tmp39 = tmp37 - tmp38; + tmp67 = tmp37 + tmp38; + } + tmp36 = tmp32 - tmp35; + tmp43 = tmp39 - tmp42; + tmp50 = tmp32 + tmp35; + tmp51 = tmp39 + tmp42; + tmp56 = tmp50 + tmp51; + tmp66 = tmp64 - tmp65; + tmp69 = tmp67 - tmp68; + tmp77 = tmp64 + tmp65; + tmp78 = tmp67 + tmp68; + tmp79 = tmp77 + tmp78; + } + c_re(output[5 * ostride]) = tmp3 + tmp18; + { + fftw_real tmp44; + fftw_real tmp46; + fftw_real tmp29; + fftw_real tmp45; + fftw_real tmp27; + fftw_real tmp28; + ASSERT_ALIGNED_DOUBLE; + tmp44 = (K587785252 * tmp36) - (K951056516 * tmp43); + tmp46 = (K951056516 * tmp36) + (K587785252 * tmp43); + tmp27 = tmp3 - (K250000000 * tmp18); + tmp28 = K559016994 * (tmp10 - tmp17); + tmp29 = tmp27 - tmp28; + tmp45 = tmp28 + tmp27; + c_re(output[7 * ostride]) = tmp29 - tmp44; + c_re(output[3 * ostride]) = tmp29 + tmp44; + c_re(output[ostride]) = tmp45 - tmp46; + c_re(output[9 * ostride]) = tmp45 + tmp46; + } + c_re(output[0]) = tmp19 + tmp26; + { + fftw_real tmp70; + fftw_real tmp72; + fftw_real tmp63; + fftw_real tmp71; + fftw_real tmp61; + fftw_real tmp62; + ASSERT_ALIGNED_DOUBLE; + tmp70 = (K587785252 * tmp66) - (K951056516 * tmp69); + tmp72 = (K951056516 * tmp66) + (K587785252 * tmp69); + tmp61 = tmp19 - (K250000000 * tmp26); + tmp62 = K559016994 * (tmp22 - tmp25); + tmp63 = tmp61 - tmp62; + tmp71 = tmp62 + tmp61; + c_re(output[2 * ostride]) = tmp63 - tmp70; + c_re(output[8 * ostride]) = tmp63 + tmp70; + c_re(output[6 * ostride]) = tmp71 - tmp72; + c_re(output[4 * ostride]) = tmp71 + tmp72; + } + c_im(output[5 * ostride]) = tmp55 + tmp56; + { + fftw_real tmp49; + fftw_real tmp60; + fftw_real tmp58; + fftw_real tmp59; + fftw_real tmp52; + fftw_real tmp57; + ASSERT_ALIGNED_DOUBLE; + tmp49 = (K951056516 * tmp47) + (K587785252 * tmp48); + tmp60 = (K587785252 * tmp47) - (K951056516 * tmp48); + tmp52 = K559016994 * (tmp50 - tmp51); + tmp57 = tmp55 - (K250000000 * tmp56); + tmp58 = tmp52 + tmp57; + tmp59 = tmp57 - tmp52; + c_im(output[ostride]) = tmp49 + tmp58; + c_im(output[9 * ostride]) = tmp58 - tmp49; + c_im(output[3 * ostride]) = tmp59 - tmp60; + c_im(output[7 * ostride]) = tmp60 + tmp59; + } + c_im(output[0]) = tmp76 + tmp79; + { + fftw_real tmp75; + fftw_real tmp84; + fftw_real tmp82; + fftw_real tmp83; + fftw_real tmp80; + fftw_real tmp81; + ASSERT_ALIGNED_DOUBLE; + tmp75 = (K587785252 * tmp73) - (K951056516 * tmp74); + tmp84 = (K951056516 * tmp73) + (K587785252 * tmp74); + tmp80 = tmp76 - (K250000000 * tmp79); + tmp81 = K559016994 * (tmp77 - tmp78); + tmp82 = tmp80 - tmp81; + tmp83 = tmp81 + tmp80; + c_im(output[2 * ostride]) = tmp75 + tmp82; + c_im(output[8 * ostride]) = tmp82 - tmp75; + c_im(output[4 * ostride]) = tmp83 - tmp84; + c_im(output[6 * ostride]) = tmp84 + tmp83; + } +} + +fftw_codelet_desc fftwi_no_twiddle_10_desc = +{ + "fftwi_no_twiddle_10", + (void (*)()) fftwi_no_twiddle_10, + 10, + FFTW_BACKWARD, + FFTW_NOTW, + 232, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fni_11.c b/src/sndobj/rfftw/fni_11.c new file mode 100644 index 0000000..59c9dc3 --- /dev/null +++ b/src/sndobj/rfftw/fni_11.c @@ -0,0 +1,242 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:08 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddleinv 11 */ + +/* + * This function contains 140 FP additions, 100 FP multiplications, + * (or, 140 additions, 100 multiplications, 0 fused multiply/add), + * 30 stack variables, and 44 memory accesses + */ +static const fftw_real K959492973 = FFTW_KONST(+0.959492973614497389890368057066327699062454848); +static const fftw_real K654860733 = FFTW_KONST(+0.654860733945285064056925072466293553183791199); +static const fftw_real K142314838 = FFTW_KONST(+0.142314838273285140443792668616369668791051361); +static const fftw_real K415415013 = FFTW_KONST(+0.415415013001886425529274149229623203524004910); +static const fftw_real K841253532 = FFTW_KONST(+0.841253532831181168861811648919367717513292498); +static const fftw_real K540640817 = FFTW_KONST(+0.540640817455597582107635954318691695431770608); +static const fftw_real K909631995 = FFTW_KONST(+0.909631995354518371411715383079028460060241051); +static const fftw_real K989821441 = FFTW_KONST(+0.989821441880932732376092037776718787376519372); +static const fftw_real K755749574 = FFTW_KONST(+0.755749574354258283774035843972344420179717445); +static const fftw_real K281732556 = FFTW_KONST(+0.281732556841429697711417915346616899035777899); + +/* + * Generator Id's : + * $Id: fni_11.c,v 1.1.1.1 2006/05/12 15:14:56 veplaini Exp $ + * $Id: fni_11.c,v 1.1.1.1 2006/05/12 15:14:56 veplaini Exp $ + * $Id: fni_11.c,v 1.1.1.1 2006/05/12 15:14:56 veplaini Exp $ + */ + +void fftwi_no_twiddle_11(const fftw_complex *input, fftw_complex *output, int istride, int ostride) +{ + fftw_real tmp1; + fftw_real tmp23; + fftw_real tmp4; + fftw_real tmp17; + fftw_real tmp38; + fftw_real tmp49; + fftw_real tmp26; + fftw_real tmp53; + fftw_real tmp7; + fftw_real tmp21; + fftw_real tmp10; + fftw_real tmp18; + fftw_real tmp35; + fftw_real tmp50; + fftw_real tmp13; + fftw_real tmp20; + fftw_real tmp29; + fftw_real tmp51; + fftw_real tmp32; + fftw_real tmp52; + fftw_real tmp16; + fftw_real tmp19; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp2; + fftw_real tmp3; + fftw_real tmp36; + fftw_real tmp37; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(input[0]); + tmp23 = c_im(input[0]); + tmp2 = c_re(input[istride]); + tmp3 = c_re(input[10 * istride]); + tmp4 = tmp2 + tmp3; + tmp17 = tmp2 - tmp3; + tmp36 = c_im(input[istride]); + tmp37 = c_im(input[10 * istride]); + tmp38 = tmp36 + tmp37; + tmp49 = tmp37 - tmp36; + { + fftw_real tmp24; + fftw_real tmp25; + fftw_real tmp5; + fftw_real tmp6; + ASSERT_ALIGNED_DOUBLE; + tmp24 = c_im(input[2 * istride]); + tmp25 = c_im(input[9 * istride]); + tmp26 = tmp24 + tmp25; + tmp53 = tmp25 - tmp24; + tmp5 = c_re(input[2 * istride]); + tmp6 = c_re(input[9 * istride]); + tmp7 = tmp5 + tmp6; + tmp21 = tmp5 - tmp6; + } + } + { + fftw_real tmp8; + fftw_real tmp9; + fftw_real tmp27; + fftw_real tmp28; + ASSERT_ALIGNED_DOUBLE; + tmp8 = c_re(input[3 * istride]); + tmp9 = c_re(input[8 * istride]); + tmp10 = tmp8 + tmp9; + tmp18 = tmp8 - tmp9; + { + fftw_real tmp33; + fftw_real tmp34; + fftw_real tmp11; + fftw_real tmp12; + ASSERT_ALIGNED_DOUBLE; + tmp33 = c_im(input[3 * istride]); + tmp34 = c_im(input[8 * istride]); + tmp35 = tmp33 + tmp34; + tmp50 = tmp34 - tmp33; + tmp11 = c_re(input[4 * istride]); + tmp12 = c_re(input[7 * istride]); + tmp13 = tmp11 + tmp12; + tmp20 = tmp11 - tmp12; + } + tmp27 = c_im(input[4 * istride]); + tmp28 = c_im(input[7 * istride]); + tmp29 = tmp27 + tmp28; + tmp51 = tmp28 - tmp27; + { + fftw_real tmp30; + fftw_real tmp31; + fftw_real tmp14; + fftw_real tmp15; + ASSERT_ALIGNED_DOUBLE; + tmp30 = c_im(input[5 * istride]); + tmp31 = c_im(input[6 * istride]); + tmp32 = tmp30 + tmp31; + tmp52 = tmp31 - tmp30; + tmp14 = c_re(input[5 * istride]); + tmp15 = c_re(input[6 * istride]); + tmp16 = tmp14 + tmp15; + tmp19 = tmp14 - tmp15; + } + } + { + fftw_real tmp56; + fftw_real tmp55; + fftw_real tmp44; + fftw_real tmp45; + ASSERT_ALIGNED_DOUBLE; + c_re(output[0]) = tmp1 + tmp4 + tmp7 + tmp10 + tmp13 + tmp16; + { + fftw_real tmp62; + fftw_real tmp61; + fftw_real tmp58; + fftw_real tmp57; + ASSERT_ALIGNED_DOUBLE; + tmp62 = (K281732556 * tmp49) + (K755749574 * tmp50) + (K989821441 * tmp52) - (K909631995 * tmp51) - (K540640817 * tmp53); + tmp61 = tmp1 + (K841253532 * tmp7) + (K415415013 * tmp13) - (K142314838 * tmp16) - (K654860733 * tmp10) - (K959492973 * tmp4); + c_re(output[6 * ostride]) = tmp61 - tmp62; + c_re(output[5 * ostride]) = tmp61 + tmp62; + tmp58 = (K540640817 * tmp49) + (K909631995 * tmp53) + (K989821441 * tmp50) + (K755749574 * tmp51) + (K281732556 * tmp52); + tmp57 = tmp1 + (K841253532 * tmp4) + (K415415013 * tmp7) - (K959492973 * tmp16) - (K654860733 * tmp13) - (K142314838 * tmp10); + c_re(output[10 * ostride]) = tmp57 - tmp58; + c_re(output[ostride]) = tmp57 + tmp58; + } + tmp56 = (K909631995 * tmp49) + (K755749574 * tmp53) - (K540640817 * tmp52) - (K989821441 * tmp51) - (K281732556 * tmp50); + tmp55 = tmp1 + (K415415013 * tmp4) + (K841253532 * tmp16) - (K142314838 * tmp13) - (K959492973 * tmp10) - (K654860733 * tmp7); + c_re(output[9 * ostride]) = tmp55 - tmp56; + c_re(output[2 * ostride]) = tmp55 + tmp56; + { + fftw_real tmp60; + fftw_real tmp59; + fftw_real tmp54; + fftw_real tmp48; + ASSERT_ALIGNED_DOUBLE; + tmp60 = (K989821441 * tmp49) + (K540640817 * tmp51) + (K755749574 * tmp52) - (K909631995 * tmp50) - (K281732556 * tmp53); + tmp59 = tmp1 + (K415415013 * tmp10) + (K841253532 * tmp13) - (K654860733 * tmp16) - (K959492973 * tmp7) - (K142314838 * tmp4); + c_re(output[8 * ostride]) = tmp59 - tmp60; + c_re(output[3 * ostride]) = tmp59 + tmp60; + tmp54 = (K755749574 * tmp49) + (K540640817 * tmp50) + (K281732556 * tmp51) - (K909631995 * tmp52) - (K989821441 * tmp53); + tmp48 = tmp1 + (K841253532 * tmp10) + (K415415013 * tmp16) - (K959492973 * tmp13) - (K142314838 * tmp7) - (K654860733 * tmp4); + c_re(output[7 * ostride]) = tmp48 - tmp54; + c_re(output[4 * ostride]) = tmp48 + tmp54; + } + c_im(output[0]) = tmp23 + tmp38 + tmp26 + tmp35 + tmp29 + tmp32; + { + fftw_real tmp22; + fftw_real tmp39; + fftw_real tmp42; + fftw_real tmp43; + ASSERT_ALIGNED_DOUBLE; + tmp22 = (K281732556 * tmp17) + (K755749574 * tmp18) + (K989821441 * tmp19) - (K909631995 * tmp20) - (K540640817 * tmp21); + tmp39 = tmp23 + (K841253532 * tmp26) + (K415415013 * tmp29) - (K142314838 * tmp32) - (K654860733 * tmp35) - (K959492973 * tmp38); + c_im(output[5 * ostride]) = tmp22 + tmp39; + c_im(output[6 * ostride]) = tmp39 - tmp22; + tmp42 = (K540640817 * tmp17) + (K909631995 * tmp21) + (K989821441 * tmp18) + (K755749574 * tmp20) + (K281732556 * tmp19); + tmp43 = tmp23 + (K841253532 * tmp38) + (K415415013 * tmp26) - (K959492973 * tmp32) - (K654860733 * tmp29) - (K142314838 * tmp35); + c_im(output[ostride]) = tmp42 + tmp43; + c_im(output[10 * ostride]) = tmp43 - tmp42; + } + tmp44 = (K909631995 * tmp17) + (K755749574 * tmp21) - (K540640817 * tmp19) - (K989821441 * tmp20) - (K281732556 * tmp18); + tmp45 = tmp23 + (K415415013 * tmp38) + (K841253532 * tmp32) - (K142314838 * tmp29) - (K959492973 * tmp35) - (K654860733 * tmp26); + c_im(output[2 * ostride]) = tmp44 + tmp45; + c_im(output[9 * ostride]) = tmp45 - tmp44; + { + fftw_real tmp40; + fftw_real tmp41; + fftw_real tmp46; + fftw_real tmp47; + ASSERT_ALIGNED_DOUBLE; + tmp40 = (K989821441 * tmp17) + (K540640817 * tmp20) + (K755749574 * tmp19) - (K909631995 * tmp18) - (K281732556 * tmp21); + tmp41 = tmp23 + (K415415013 * tmp35) + (K841253532 * tmp29) - (K654860733 * tmp32) - (K959492973 * tmp26) - (K142314838 * tmp38); + c_im(output[3 * ostride]) = tmp40 + tmp41; + c_im(output[8 * ostride]) = tmp41 - tmp40; + tmp46 = (K755749574 * tmp17) + (K540640817 * tmp18) + (K281732556 * tmp20) - (K909631995 * tmp19) - (K989821441 * tmp21); + tmp47 = tmp23 + (K841253532 * tmp35) + (K415415013 * tmp32) - (K959492973 * tmp29) - (K142314838 * tmp26) - (K654860733 * tmp38); + c_im(output[4 * ostride]) = tmp46 + tmp47; + c_im(output[7 * ostride]) = tmp47 - tmp46; + } + } +} + +fftw_codelet_desc fftwi_no_twiddle_11_desc = +{ + "fftwi_no_twiddle_11", + (void (*)()) fftwi_no_twiddle_11, + 11, + FFTW_BACKWARD, + FFTW_NOTW, + 254, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fni_12.c b/src/sndobj/rfftw/fni_12.c new file mode 100644 index 0000000..192a2cf --- /dev/null +++ b/src/sndobj/rfftw/fni_12.c @@ -0,0 +1,322 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:09 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddleinv 12 */ + +/* + * This function contains 96 FP additions, 16 FP multiplications, + * (or, 88 additions, 8 multiplications, 8 fused multiply/add), + * 40 stack variables, and 48 memory accesses + */ +static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); +static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); + +/* + * Generator Id's : + * $Id: fni_12.c,v 1.1.1.1 2006/05/12 15:14:54 veplaini Exp $ + * $Id: fni_12.c,v 1.1.1.1 2006/05/12 15:14:54 veplaini Exp $ + * $Id: fni_12.c,v 1.1.1.1 2006/05/12 15:14:54 veplaini Exp $ + */ + +void fftwi_no_twiddle_12(const fftw_complex *input, fftw_complex *output, int istride, int ostride) +{ + fftw_real tmp5; + fftw_real tmp35; + fftw_real tmp57; + fftw_real tmp27; + fftw_real tmp58; + fftw_real tmp36; + fftw_real tmp10; + fftw_real tmp38; + fftw_real tmp60; + fftw_real tmp32; + fftw_real tmp61; + fftw_real tmp39; + fftw_real tmp16; + fftw_real tmp82; + fftw_real tmp42; + fftw_real tmp47; + fftw_real tmp76; + fftw_real tmp83; + fftw_real tmp21; + fftw_real tmp85; + fftw_real tmp49; + fftw_real tmp54; + fftw_real tmp77; + fftw_real tmp86; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp3; + fftw_real tmp4; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(input[0]); + tmp2 = c_re(input[4 * istride]); + tmp3 = c_re(input[8 * istride]); + tmp4 = tmp2 + tmp3; + tmp5 = tmp1 + tmp4; + tmp35 = tmp1 - (K500000000 * tmp4); + tmp57 = K866025403 * (tmp2 - tmp3); + } + { + fftw_real tmp23; + fftw_real tmp24; + fftw_real tmp25; + fftw_real tmp26; + ASSERT_ALIGNED_DOUBLE; + tmp23 = c_im(input[0]); + tmp24 = c_im(input[4 * istride]); + tmp25 = c_im(input[8 * istride]); + tmp26 = tmp24 + tmp25; + tmp27 = tmp23 + tmp26; + tmp58 = tmp23 - (K500000000 * tmp26); + tmp36 = K866025403 * (tmp25 - tmp24); + } + { + fftw_real tmp6; + fftw_real tmp7; + fftw_real tmp8; + fftw_real tmp9; + ASSERT_ALIGNED_DOUBLE; + tmp6 = c_re(input[6 * istride]); + tmp7 = c_re(input[10 * istride]); + tmp8 = c_re(input[2 * istride]); + tmp9 = tmp7 + tmp8; + tmp10 = tmp6 + tmp9; + tmp38 = tmp6 - (K500000000 * tmp9); + tmp60 = K866025403 * (tmp7 - tmp8); + } + { + fftw_real tmp28; + fftw_real tmp29; + fftw_real tmp30; + fftw_real tmp31; + ASSERT_ALIGNED_DOUBLE; + tmp28 = c_im(input[6 * istride]); + tmp29 = c_im(input[10 * istride]); + tmp30 = c_im(input[2 * istride]); + tmp31 = tmp29 + tmp30; + tmp32 = tmp28 + tmp31; + tmp61 = tmp28 - (K500000000 * tmp31); + tmp39 = K866025403 * (tmp30 - tmp29); + } + { + fftw_real tmp12; + fftw_real tmp13; + fftw_real tmp14; + fftw_real tmp15; + ASSERT_ALIGNED_DOUBLE; + tmp12 = c_re(input[3 * istride]); + tmp13 = c_re(input[7 * istride]); + tmp14 = c_re(input[11 * istride]); + tmp15 = tmp13 + tmp14; + tmp16 = tmp12 + tmp15; + tmp82 = tmp12 - (K500000000 * tmp15); + tmp42 = K866025403 * (tmp13 - tmp14); + } + { + fftw_real tmp43; + fftw_real tmp44; + fftw_real tmp45; + fftw_real tmp46; + ASSERT_ALIGNED_DOUBLE; + tmp43 = c_im(input[3 * istride]); + tmp44 = c_im(input[7 * istride]); + tmp45 = c_im(input[11 * istride]); + tmp46 = tmp44 + tmp45; + tmp47 = tmp43 - (K500000000 * tmp46); + tmp76 = tmp43 + tmp46; + tmp83 = K866025403 * (tmp45 - tmp44); + } + { + fftw_real tmp17; + fftw_real tmp18; + fftw_real tmp19; + fftw_real tmp20; + ASSERT_ALIGNED_DOUBLE; + tmp17 = c_re(input[9 * istride]); + tmp18 = c_re(input[istride]); + tmp19 = c_re(input[5 * istride]); + tmp20 = tmp18 + tmp19; + tmp21 = tmp17 + tmp20; + tmp85 = tmp17 - (K500000000 * tmp20); + tmp49 = K866025403 * (tmp18 - tmp19); + } + { + fftw_real tmp50; + fftw_real tmp51; + fftw_real tmp52; + fftw_real tmp53; + ASSERT_ALIGNED_DOUBLE; + tmp50 = c_im(input[9 * istride]); + tmp51 = c_im(input[istride]); + tmp52 = c_im(input[5 * istride]); + tmp53 = tmp51 + tmp52; + tmp54 = tmp50 - (K500000000 * tmp53); + tmp77 = tmp50 + tmp53; + tmp86 = K866025403 * (tmp52 - tmp51); + } + { + fftw_real tmp11; + fftw_real tmp22; + fftw_real tmp33; + fftw_real tmp34; + ASSERT_ALIGNED_DOUBLE; + tmp11 = tmp5 + tmp10; + tmp22 = tmp16 + tmp21; + c_re(output[6 * ostride]) = tmp11 - tmp22; + c_re(output[0]) = tmp11 + tmp22; + { + fftw_real tmp75; + fftw_real tmp78; + fftw_real tmp79; + fftw_real tmp80; + ASSERT_ALIGNED_DOUBLE; + tmp75 = tmp5 - tmp10; + tmp78 = tmp76 - tmp77; + c_re(output[9 * ostride]) = tmp75 - tmp78; + c_re(output[3 * ostride]) = tmp75 + tmp78; + tmp79 = tmp27 + tmp32; + tmp80 = tmp76 + tmp77; + c_im(output[6 * ostride]) = tmp79 - tmp80; + c_im(output[0]) = tmp79 + tmp80; + } + tmp33 = tmp27 - tmp32; + tmp34 = tmp16 - tmp21; + c_im(output[3 * ostride]) = tmp33 - tmp34; + c_im(output[9 * ostride]) = tmp34 + tmp33; + { + fftw_real tmp67; + fftw_real tmp89; + fftw_real tmp88; + fftw_real tmp90; + fftw_real tmp70; + fftw_real tmp74; + fftw_real tmp73; + fftw_real tmp81; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp65; + fftw_real tmp66; + fftw_real tmp84; + fftw_real tmp87; + ASSERT_ALIGNED_DOUBLE; + tmp65 = tmp35 - tmp36; + tmp66 = tmp38 - tmp39; + tmp67 = tmp65 - tmp66; + tmp89 = tmp65 + tmp66; + tmp84 = tmp82 - tmp83; + tmp87 = tmp85 - tmp86; + tmp88 = tmp84 - tmp87; + tmp90 = tmp84 + tmp87; + } + { + fftw_real tmp68; + fftw_real tmp69; + fftw_real tmp71; + fftw_real tmp72; + ASSERT_ALIGNED_DOUBLE; + tmp68 = tmp47 - tmp42; + tmp69 = tmp54 - tmp49; + tmp70 = tmp68 - tmp69; + tmp74 = tmp68 + tmp69; + tmp71 = tmp58 - tmp57; + tmp72 = tmp61 - tmp60; + tmp73 = tmp71 + tmp72; + tmp81 = tmp71 - tmp72; + } + c_re(output[5 * ostride]) = tmp67 - tmp70; + c_re(output[11 * ostride]) = tmp67 + tmp70; + c_im(output[2 * ostride]) = tmp73 - tmp74; + c_im(output[8 * ostride]) = tmp73 + tmp74; + c_im(output[11 * ostride]) = tmp81 - tmp88; + c_im(output[5 * ostride]) = tmp81 + tmp88; + c_re(output[2 * ostride]) = tmp89 - tmp90; + c_re(output[8 * ostride]) = tmp89 + tmp90; + } + { + fftw_real tmp41; + fftw_real tmp95; + fftw_real tmp94; + fftw_real tmp96; + fftw_real tmp56; + fftw_real tmp64; + fftw_real tmp63; + fftw_real tmp91; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp37; + fftw_real tmp40; + fftw_real tmp92; + fftw_real tmp93; + ASSERT_ALIGNED_DOUBLE; + tmp37 = tmp35 + tmp36; + tmp40 = tmp38 + tmp39; + tmp41 = tmp37 - tmp40; + tmp95 = tmp37 + tmp40; + tmp92 = tmp82 + tmp83; + tmp93 = tmp85 + tmp86; + tmp94 = tmp92 - tmp93; + tmp96 = tmp92 + tmp93; + } + { + fftw_real tmp48; + fftw_real tmp55; + fftw_real tmp59; + fftw_real tmp62; + ASSERT_ALIGNED_DOUBLE; + tmp48 = tmp42 + tmp47; + tmp55 = tmp49 + tmp54; + tmp56 = tmp48 - tmp55; + tmp64 = tmp48 + tmp55; + tmp59 = tmp57 + tmp58; + tmp62 = tmp60 + tmp61; + tmp63 = tmp59 + tmp62; + tmp91 = tmp59 - tmp62; + } + c_re(output[ostride]) = tmp41 - tmp56; + c_re(output[7 * ostride]) = tmp41 + tmp56; + c_im(output[10 * ostride]) = tmp63 - tmp64; + c_im(output[4 * ostride]) = tmp63 + tmp64; + c_im(output[7 * ostride]) = tmp91 - tmp94; + c_im(output[ostride]) = tmp91 + tmp94; + c_re(output[10 * ostride]) = tmp95 - tmp96; + c_re(output[4 * ostride]) = tmp95 + tmp96; + } + } +} + +fftw_codelet_desc fftwi_no_twiddle_12_desc = +{ + "fftwi_no_twiddle_12", + (void (*)()) fftwi_no_twiddle_12, + 12, + FFTW_BACKWARD, + FFTW_NOTW, + 276, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fni_13.c b/src/sndobj/rfftw/fni_13.c new file mode 100644 index 0000000..3aede90 --- /dev/null +++ b/src/sndobj/rfftw/fni_13.c @@ -0,0 +1,526 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:10 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddleinv 13 */ + +/* + * This function contains 176 FP additions, 68 FP multiplications, + * (or, 138 additions, 30 multiplications, 38 fused multiply/add), + * 50 stack variables, and 52 memory accesses + */ +static const fftw_real K1_732050807 = FFTW_KONST(+1.732050807568877293527446341505872366942805254); +static const fftw_real K156891391 = FFTW_KONST(+0.156891391051584611046832726756003269660212636); +static const fftw_real K256247671 = FFTW_KONST(+0.256247671582936600958684654061725059144125175); +static const fftw_real K300238635 = FFTW_KONST(+0.300238635966332641462884626667381504676006424); +static const fftw_real K011599105 = FFTW_KONST(+0.011599105605768290721655456654083252189827041); +static const fftw_real K174138601 = FFTW_KONST(+0.174138601152135905005660794929264742616964676); +static const fftw_real K575140729 = FFTW_KONST(+0.575140729474003121368385547455453388461001608); +static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); +static const fftw_real K083333333 = FFTW_KONST(+0.083333333333333333333333333333333333333333333); +static const fftw_real K075902986 = FFTW_KONST(+0.075902986037193865983102897245103540356428373); +static const fftw_real K251768516 = FFTW_KONST(+0.251768516431883313623436926934233488546674281); +static const fftw_real K258260390 = FFTW_KONST(+0.258260390311744861420450644284508567852516811); +static const fftw_real K132983124 = FFTW_KONST(+0.132983124607418643793760531921092974399165133); +static const fftw_real K503537032 = FFTW_KONST(+0.503537032863766627246873853868466977093348562); +static const fftw_real K113854479 = FFTW_KONST(+0.113854479055790798974654345867655310534642560); +static const fftw_real K265966249 = FFTW_KONST(+0.265966249214837287587521063842185948798330267); +static const fftw_real K387390585 = FFTW_KONST(+0.387390585467617292130675966426762851778775217); +static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); +static const fftw_real K300462606 = FFTW_KONST(+0.300462606288665774426601772289207995520941381); +static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); + +/* + * Generator Id's : + * $Id: fni_13.c,v 1.1.1.1 2006/05/12 15:14:55 veplaini Exp $ + * $Id: fni_13.c,v 1.1.1.1 2006/05/12 15:14:55 veplaini Exp $ + * $Id: fni_13.c,v 1.1.1.1 2006/05/12 15:14:55 veplaini Exp $ + */ + +void fftwi_no_twiddle_13(const fftw_complex *input, fftw_complex *output, int istride, int ostride) +{ + fftw_real tmp1; + fftw_real tmp88; + fftw_real tmp25; + fftw_real tmp24; + fftw_real tmp126; + fftw_real tmp124; + fftw_real tmp129; + fftw_real tmp30; + fftw_real tmp36; + fftw_real tmp43; + fftw_real tmp121; + fftw_real tmp128; + fftw_real tmp41; + fftw_real tmp44; + fftw_real tmp136; + fftw_real tmp144; + fftw_real tmp146; + fftw_real tmp77; + fftw_real tmp86; + fftw_real tmp137; + fftw_real tmp83; + fftw_real tmp89; + fftw_real tmp70; + fftw_real tmp85; + fftw_real tmp141; + fftw_real tmp147; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(input[0]); + tmp88 = c_im(input[0]); + { + fftw_real tmp15; + fftw_real tmp26; + fftw_real tmp18; + fftw_real tmp27; + fftw_real tmp21; + fftw_real tmp28; + fftw_real tmp22; + fftw_real tmp29; + fftw_real tmp6; + fftw_real tmp37; + fftw_real tmp32; + fftw_real tmp11; + fftw_real tmp38; + fftw_real tmp33; + fftw_real tmp13; + fftw_real tmp14; + fftw_real tmp34; + fftw_real tmp35; + ASSERT_ALIGNED_DOUBLE; + tmp13 = c_re(input[8 * istride]); + tmp14 = c_re(input[5 * istride]); + tmp15 = tmp13 + tmp14; + tmp26 = tmp13 - tmp14; + { + fftw_real tmp16; + fftw_real tmp17; + fftw_real tmp19; + fftw_real tmp20; + ASSERT_ALIGNED_DOUBLE; + tmp16 = c_re(input[6 * istride]); + tmp17 = c_re(input[11 * istride]); + tmp18 = tmp16 + tmp17; + tmp27 = tmp16 - tmp17; + tmp19 = c_re(input[2 * istride]); + tmp20 = c_re(input[7 * istride]); + tmp21 = tmp19 + tmp20; + tmp28 = tmp19 - tmp20; + } + tmp22 = tmp18 + tmp21; + tmp29 = tmp27 + tmp28; + { + fftw_real tmp2; + fftw_real tmp3; + fftw_real tmp4; + fftw_real tmp5; + ASSERT_ALIGNED_DOUBLE; + tmp2 = c_re(input[istride]); + tmp3 = c_re(input[3 * istride]); + tmp4 = c_re(input[9 * istride]); + tmp5 = tmp3 + tmp4; + tmp6 = tmp2 + tmp5; + tmp37 = tmp2 - (K500000000 * tmp5); + tmp32 = tmp3 - tmp4; + } + { + fftw_real tmp7; + fftw_real tmp8; + fftw_real tmp9; + fftw_real tmp10; + ASSERT_ALIGNED_DOUBLE; + tmp7 = c_re(input[12 * istride]); + tmp8 = c_re(input[4 * istride]); + tmp9 = c_re(input[10 * istride]); + tmp10 = tmp8 + tmp9; + tmp11 = tmp7 + tmp10; + tmp38 = tmp7 - (K500000000 * tmp10); + tmp33 = tmp8 - tmp9; + } + tmp25 = tmp6 - tmp11; + { + fftw_real tmp12; + fftw_real tmp23; + fftw_real tmp122; + fftw_real tmp123; + ASSERT_ALIGNED_DOUBLE; + tmp12 = tmp6 + tmp11; + tmp23 = tmp15 + tmp22; + tmp24 = tmp12 + tmp23; + tmp126 = K300462606 * (tmp12 - tmp23); + tmp122 = tmp37 + tmp38; + tmp123 = tmp15 - (K500000000 * tmp22); + tmp124 = tmp122 - tmp123; + tmp129 = tmp122 + tmp123; + } + tmp30 = tmp26 - tmp29; + tmp34 = K866025403 * (tmp32 + tmp33); + tmp35 = tmp26 + (K500000000 * tmp29); + tmp36 = tmp34 + tmp35; + tmp43 = tmp35 - tmp34; + { + fftw_real tmp119; + fftw_real tmp120; + fftw_real tmp39; + fftw_real tmp40; + ASSERT_ALIGNED_DOUBLE; + tmp119 = tmp28 - tmp27; + tmp120 = tmp32 - tmp33; + tmp121 = tmp119 - tmp120; + tmp128 = tmp120 + tmp119; + tmp39 = tmp37 - tmp38; + tmp40 = K866025403 * (tmp18 - tmp21); + tmp41 = tmp39 - tmp40; + tmp44 = tmp39 + tmp40; + } + } + { + fftw_real tmp61; + fftw_real tmp134; + fftw_real tmp64; + fftw_real tmp71; + fftw_real tmp67; + fftw_real tmp72; + fftw_real tmp68; + fftw_real tmp135; + fftw_real tmp52; + fftw_real tmp79; + fftw_real tmp75; + fftw_real tmp57; + fftw_real tmp80; + fftw_real tmp74; + fftw_real tmp59; + fftw_real tmp60; + fftw_real tmp81; + fftw_real tmp82; + ASSERT_ALIGNED_DOUBLE; + tmp59 = c_im(input[8 * istride]); + tmp60 = c_im(input[5 * istride]); + tmp61 = tmp59 + tmp60; + tmp134 = tmp59 - tmp60; + { + fftw_real tmp62; + fftw_real tmp63; + fftw_real tmp65; + fftw_real tmp66; + ASSERT_ALIGNED_DOUBLE; + tmp62 = c_im(input[6 * istride]); + tmp63 = c_im(input[11 * istride]); + tmp64 = tmp62 + tmp63; + tmp71 = tmp62 - tmp63; + tmp65 = c_im(input[2 * istride]); + tmp66 = c_im(input[7 * istride]); + tmp67 = tmp65 + tmp66; + tmp72 = tmp65 - tmp66; + } + tmp68 = tmp64 + tmp67; + tmp135 = tmp71 + tmp72; + { + fftw_real tmp48; + fftw_real tmp49; + fftw_real tmp50; + fftw_real tmp51; + ASSERT_ALIGNED_DOUBLE; + tmp48 = c_im(input[istride]); + tmp49 = c_im(input[3 * istride]); + tmp50 = c_im(input[9 * istride]); + tmp51 = tmp49 + tmp50; + tmp52 = tmp48 - (K500000000 * tmp51); + tmp79 = tmp48 + tmp51; + tmp75 = tmp49 - tmp50; + } + { + fftw_real tmp53; + fftw_real tmp54; + fftw_real tmp55; + fftw_real tmp56; + ASSERT_ALIGNED_DOUBLE; + tmp53 = c_im(input[12 * istride]); + tmp54 = c_im(input[4 * istride]); + tmp55 = c_im(input[10 * istride]); + tmp56 = tmp54 + tmp55; + tmp57 = tmp53 - (K500000000 * tmp56); + tmp80 = tmp53 + tmp56; + tmp74 = tmp54 - tmp55; + } + tmp136 = tmp134 - tmp135; + { + fftw_real tmp142; + fftw_real tmp143; + fftw_real tmp73; + fftw_real tmp76; + ASSERT_ALIGNED_DOUBLE; + tmp142 = K866025403 * (tmp75 + tmp74); + tmp143 = tmp134 + (K500000000 * tmp135); + tmp144 = tmp142 - tmp143; + tmp146 = tmp142 + tmp143; + tmp73 = tmp71 - tmp72; + tmp76 = tmp74 - tmp75; + tmp77 = tmp73 - tmp76; + tmp86 = tmp76 + tmp73; + } + tmp137 = tmp79 - tmp80; + tmp81 = tmp79 + tmp80; + tmp82 = tmp61 + tmp68; + tmp83 = K300462606 * (tmp81 - tmp82); + tmp89 = tmp81 + tmp82; + { + fftw_real tmp58; + fftw_real tmp69; + fftw_real tmp139; + fftw_real tmp140; + ASSERT_ALIGNED_DOUBLE; + tmp58 = tmp52 + tmp57; + tmp69 = tmp61 - (K500000000 * tmp68); + tmp70 = tmp58 - tmp69; + tmp85 = tmp58 + tmp69; + tmp139 = tmp52 - tmp57; + tmp140 = K866025403 * (tmp67 - tmp64); + tmp141 = tmp139 - tmp140; + tmp147 = tmp139 + tmp140; + } + } + c_re(output[0]) = tmp1 + tmp24; + { + fftw_real tmp164; + fftw_real tmp172; + fftw_real tmp127; + fftw_real tmp169; + fftw_real tmp159; + fftw_real tmp132; + fftw_real tmp138; + fftw_real tmp149; + fftw_real tmp160; + fftw_real tmp170; + fftw_real tmp152; + fftw_real tmp155; + fftw_real tmp165; + fftw_real tmp173; + fftw_real tmp162; + fftw_real tmp163; + ASSERT_ALIGNED_DOUBLE; + tmp162 = (K387390585 * tmp121) - (K265966249 * tmp124); + tmp163 = (K113854479 * tmp128) - (K503537032 * tmp129); + tmp164 = tmp162 + tmp163; + tmp172 = tmp163 - tmp162; + { + fftw_real tmp125; + fftw_real tmp158; + fftw_real tmp130; + fftw_real tmp131; + fftw_real tmp157; + ASSERT_ALIGNED_DOUBLE; + tmp125 = (K132983124 * tmp121) + (K258260390 * tmp124); + tmp158 = tmp126 - tmp125; + tmp130 = (K251768516 * tmp128) + (K075902986 * tmp129); + tmp131 = tmp1 - (K083333333 * tmp24); + tmp157 = tmp131 - tmp130; + tmp127 = (K2_000000000 * tmp125) + tmp126; + tmp169 = tmp158 + tmp157; + tmp159 = tmp157 - tmp158; + tmp132 = (K2_000000000 * tmp130) + tmp131; + } + { + fftw_real tmp145; + fftw_real tmp148; + fftw_real tmp153; + fftw_real tmp154; + ASSERT_ALIGNED_DOUBLE; + tmp138 = (K575140729 * tmp136) - (K174138601 * tmp137); + tmp145 = (K011599105 * tmp141) - (K300238635 * tmp144); + tmp148 = (K256247671 * tmp146) + (K156891391 * tmp147); + tmp149 = tmp145 - tmp148; + tmp160 = K1_732050807 * (tmp145 + tmp148); + tmp170 = tmp138 - tmp149; + tmp152 = (K575140729 * tmp137) + (K174138601 * tmp136); + tmp153 = (K256247671 * tmp147) - (K156891391 * tmp146); + tmp154 = (K011599105 * tmp144) + (K300238635 * tmp141); + tmp155 = tmp153 - tmp154; + tmp165 = tmp152 + tmp155; + tmp173 = K1_732050807 * (tmp154 + tmp153); + } + { + fftw_real tmp133; + fftw_real tmp150; + fftw_real tmp167; + fftw_real tmp168; + ASSERT_ALIGNED_DOUBLE; + tmp133 = tmp127 + tmp132; + tmp150 = tmp138 + (K2_000000000 * tmp149); + c_re(output[12 * ostride]) = tmp133 - tmp150; + c_re(output[ostride]) = tmp133 + tmp150; + { + fftw_real tmp151; + fftw_real tmp156; + fftw_real tmp161; + fftw_real tmp166; + ASSERT_ALIGNED_DOUBLE; + tmp151 = tmp132 - tmp127; + tmp156 = tmp152 - (K2_000000000 * tmp155); + c_re(output[5 * ostride]) = tmp151 - tmp156; + c_re(output[8 * ostride]) = tmp151 + tmp156; + tmp161 = tmp159 - tmp160; + tmp166 = tmp164 + tmp165; + c_re(output[2 * ostride]) = tmp161 - tmp166; + c_re(output[7 * ostride]) = tmp161 + tmp166; + } + tmp167 = tmp159 + tmp160; + tmp168 = tmp165 - tmp164; + c_re(output[6 * ostride]) = tmp167 - tmp168; + c_re(output[11 * ostride]) = tmp167 + tmp168; + { + fftw_real tmp175; + fftw_real tmp176; + fftw_real tmp171; + fftw_real tmp174; + ASSERT_ALIGNED_DOUBLE; + tmp175 = tmp169 - tmp170; + tmp176 = tmp173 - tmp172; + c_re(output[4 * ostride]) = tmp175 - tmp176; + c_re(output[10 * ostride]) = tmp175 + tmp176; + tmp171 = tmp169 + tmp170; + tmp174 = tmp172 + tmp173; + c_re(output[3 * ostride]) = tmp171 - tmp174; + c_re(output[9 * ostride]) = tmp171 + tmp174; + } + } + } + c_im(output[0]) = tmp88 + tmp89; + { + fftw_real tmp102; + fftw_real tmp115; + fftw_real tmp84; + fftw_real tmp112; + fftw_real tmp107; + fftw_real tmp91; + fftw_real tmp31; + fftw_real tmp46; + fftw_real tmp104; + fftw_real tmp111; + fftw_real tmp93; + fftw_real tmp96; + fftw_real tmp99; + fftw_real tmp114; + fftw_real tmp100; + fftw_real tmp101; + ASSERT_ALIGNED_DOUBLE; + tmp100 = (K387390585 * tmp77) + (K265966249 * tmp70); + tmp101 = (K113854479 * tmp86) + (K503537032 * tmp85); + tmp102 = tmp100 + tmp101; + tmp115 = tmp100 - tmp101; + { + fftw_real tmp78; + fftw_real tmp106; + fftw_real tmp87; + fftw_real tmp90; + fftw_real tmp105; + ASSERT_ALIGNED_DOUBLE; + tmp78 = (K258260390 * tmp70) - (K132983124 * tmp77); + tmp106 = tmp83 - tmp78; + tmp87 = (K075902986 * tmp85) - (K251768516 * tmp86); + tmp90 = tmp88 - (K083333333 * tmp89); + tmp105 = tmp90 - tmp87; + tmp84 = (K2_000000000 * tmp78) + tmp83; + tmp112 = tmp106 + tmp105; + tmp107 = tmp105 - tmp106; + tmp91 = (K2_000000000 * tmp87) + tmp90; + } + { + fftw_real tmp42; + fftw_real tmp45; + fftw_real tmp94; + fftw_real tmp95; + ASSERT_ALIGNED_DOUBLE; + tmp31 = (K174138601 * tmp25) - (K575140729 * tmp30); + tmp42 = (K256247671 * tmp36) + (K156891391 * tmp41); + tmp45 = (K300238635 * tmp43) + (K011599105 * tmp44); + tmp46 = tmp42 - tmp45; + tmp104 = K1_732050807 * (tmp42 + tmp45); + tmp111 = tmp31 - tmp46; + tmp93 = (K575140729 * tmp25) + (K174138601 * tmp30); + tmp94 = (K256247671 * tmp41) - (K156891391 * tmp36); + tmp95 = (K011599105 * tmp43) - (K300238635 * tmp44); + tmp96 = tmp94 + tmp95; + tmp99 = tmp93 + tmp96; + tmp114 = K1_732050807 * (tmp95 - tmp94); + } + { + fftw_real tmp47; + fftw_real tmp92; + fftw_real tmp109; + fftw_real tmp110; + ASSERT_ALIGNED_DOUBLE; + tmp47 = tmp31 + (K2_000000000 * tmp46); + tmp92 = tmp84 + tmp91; + c_im(output[ostride]) = tmp47 + tmp92; + c_im(output[12 * ostride]) = tmp92 - tmp47; + { + fftw_real tmp97; + fftw_real tmp98; + fftw_real tmp103; + fftw_real tmp108; + ASSERT_ALIGNED_DOUBLE; + tmp97 = tmp93 - (K2_000000000 * tmp96); + tmp98 = tmp91 - tmp84; + c_im(output[5 * ostride]) = tmp97 + tmp98; + c_im(output[8 * ostride]) = tmp98 - tmp97; + tmp103 = tmp99 + tmp102; + tmp108 = tmp104 + tmp107; + c_im(output[2 * ostride]) = tmp103 + tmp108; + c_im(output[7 * ostride]) = tmp108 - tmp103; + } + tmp109 = tmp107 - tmp104; + tmp110 = tmp102 - tmp99; + c_im(output[6 * ostride]) = tmp109 - tmp110; + c_im(output[11 * ostride]) = tmp110 + tmp109; + { + fftw_real tmp117; + fftw_real tmp118; + fftw_real tmp113; + fftw_real tmp116; + ASSERT_ALIGNED_DOUBLE; + tmp117 = tmp112 - tmp111; + tmp118 = tmp114 - tmp115; + c_im(output[4 * ostride]) = tmp117 - tmp118; + c_im(output[10 * ostride]) = tmp118 + tmp117; + tmp113 = tmp111 + tmp112; + tmp116 = tmp114 + tmp115; + c_im(output[3 * ostride]) = tmp113 - tmp116; + c_im(output[9 * ostride]) = tmp116 + tmp113; + } + } + } +} + +fftw_codelet_desc fftwi_no_twiddle_13_desc = +{ + "fftwi_no_twiddle_13", + (void (*)()) fftwi_no_twiddle_13, + 13, + FFTW_BACKWARD, + FFTW_NOTW, + 298, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fni_14.c b/src/sndobj/rfftw/fni_14.c new file mode 100644 index 0000000..78bc7e8 --- /dev/null +++ b/src/sndobj/rfftw/fni_14.c @@ -0,0 +1,355 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:12 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddleinv 14 */ + +/* + * This function contains 148 FP additions, 72 FP multiplications, + * (or, 148 additions, 72 multiplications, 0 fused multiply/add), + * 36 stack variables, and 56 memory accesses + */ +static const fftw_real K222520933 = FFTW_KONST(+0.222520933956314404288902564496794759466355569); +static const fftw_real K900968867 = FFTW_KONST(+0.900968867902419126236102319507445051165919162); +static const fftw_real K623489801 = FFTW_KONST(+0.623489801858733530525004884004239810632274731); +static const fftw_real K433883739 = FFTW_KONST(+0.433883739117558120475768332848358754609990728); +static const fftw_real K781831482 = FFTW_KONST(+0.781831482468029808708444526674057750232334519); +static const fftw_real K974927912 = FFTW_KONST(+0.974927912181823607018131682993931217232785801); + +/* + * Generator Id's : + * $Id: fni_14.c,v 1.1.1.1 2006/05/12 15:14:50 veplaini Exp $ + * $Id: fni_14.c,v 1.1.1.1 2006/05/12 15:14:50 veplaini Exp $ + * $Id: fni_14.c,v 1.1.1.1 2006/05/12 15:14:50 veplaini Exp $ + */ + +void fftwi_no_twiddle_14(const fftw_complex *input, fftw_complex *output, int istride, int ostride) +{ + fftw_real tmp3; + fftw_real tmp25; + fftw_real tmp68; + fftw_real tmp92; + fftw_real tmp10; + fftw_real tmp62; + fftw_real tmp28; + fftw_real tmp97; + fftw_real tmp42; + fftw_real tmp71; + fftw_real tmp80; + fftw_real tmp93; + fftw_real tmp17; + fftw_real tmp64; + fftw_real tmp31; + fftw_real tmp99; + fftw_real tmp56; + fftw_real tmp69; + fftw_real tmp86; + fftw_real tmp95; + fftw_real tmp24; + fftw_real tmp63; + fftw_real tmp34; + fftw_real tmp98; + fftw_real tmp49; + fftw_real tmp70; + fftw_real tmp83; + fftw_real tmp94; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp66; + fftw_real tmp67; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(input[0]); + tmp2 = c_re(input[7 * istride]); + tmp3 = tmp1 - tmp2; + tmp25 = tmp1 + tmp2; + tmp66 = c_im(input[0]); + tmp67 = c_im(input[7 * istride]); + tmp68 = tmp66 - tmp67; + tmp92 = tmp66 + tmp67; + } + { + fftw_real tmp6; + fftw_real tmp26; + fftw_real tmp9; + fftw_real tmp27; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp4; + fftw_real tmp5; + fftw_real tmp7; + fftw_real tmp8; + ASSERT_ALIGNED_DOUBLE; + tmp4 = c_re(input[2 * istride]); + tmp5 = c_re(input[9 * istride]); + tmp6 = tmp4 - tmp5; + tmp26 = tmp4 + tmp5; + tmp7 = c_re(input[12 * istride]); + tmp8 = c_re(input[5 * istride]); + tmp9 = tmp7 - tmp8; + tmp27 = tmp7 + tmp8; + } + tmp10 = tmp6 + tmp9; + tmp62 = tmp6 - tmp9; + tmp28 = tmp26 + tmp27; + tmp97 = tmp26 - tmp27; + } + { + fftw_real tmp38; + fftw_real tmp78; + fftw_real tmp41; + fftw_real tmp79; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp36; + fftw_real tmp37; + fftw_real tmp39; + fftw_real tmp40; + ASSERT_ALIGNED_DOUBLE; + tmp36 = c_im(input[12 * istride]); + tmp37 = c_im(input[5 * istride]); + tmp38 = tmp36 - tmp37; + tmp78 = tmp36 + tmp37; + tmp39 = c_im(input[2 * istride]); + tmp40 = c_im(input[9 * istride]); + tmp41 = tmp39 - tmp40; + tmp79 = tmp39 + tmp40; + } + tmp42 = tmp38 - tmp41; + tmp71 = tmp41 + tmp38; + tmp80 = tmp78 - tmp79; + tmp93 = tmp79 + tmp78; + } + { + fftw_real tmp13; + fftw_real tmp29; + fftw_real tmp16; + fftw_real tmp30; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp11; + fftw_real tmp12; + fftw_real tmp14; + fftw_real tmp15; + ASSERT_ALIGNED_DOUBLE; + tmp11 = c_re(input[4 * istride]); + tmp12 = c_re(input[11 * istride]); + tmp13 = tmp11 - tmp12; + tmp29 = tmp11 + tmp12; + tmp14 = c_re(input[10 * istride]); + tmp15 = c_re(input[3 * istride]); + tmp16 = tmp14 - tmp15; + tmp30 = tmp14 + tmp15; + } + tmp17 = tmp13 + tmp16; + tmp64 = tmp13 - tmp16; + tmp31 = tmp29 + tmp30; + tmp99 = tmp30 - tmp29; + } + { + fftw_real tmp52; + fftw_real tmp85; + fftw_real tmp55; + fftw_real tmp84; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp50; + fftw_real tmp51; + fftw_real tmp53; + fftw_real tmp54; + ASSERT_ALIGNED_DOUBLE; + tmp50 = c_im(input[10 * istride]); + tmp51 = c_im(input[3 * istride]); + tmp52 = tmp50 - tmp51; + tmp85 = tmp50 + tmp51; + tmp53 = c_im(input[4 * istride]); + tmp54 = c_im(input[11 * istride]); + tmp55 = tmp53 - tmp54; + tmp84 = tmp53 + tmp54; + } + tmp56 = tmp52 - tmp55; + tmp69 = tmp55 + tmp52; + tmp86 = tmp84 - tmp85; + tmp95 = tmp84 + tmp85; + } + { + fftw_real tmp20; + fftw_real tmp32; + fftw_real tmp23; + fftw_real tmp33; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp18; + fftw_real tmp19; + fftw_real tmp21; + fftw_real tmp22; + ASSERT_ALIGNED_DOUBLE; + tmp18 = c_re(input[6 * istride]); + tmp19 = c_re(input[13 * istride]); + tmp20 = tmp18 - tmp19; + tmp32 = tmp18 + tmp19; + tmp21 = c_re(input[8 * istride]); + tmp22 = c_re(input[istride]); + tmp23 = tmp21 - tmp22; + tmp33 = tmp21 + tmp22; + } + tmp24 = tmp20 + tmp23; + tmp63 = tmp20 - tmp23; + tmp34 = tmp32 + tmp33; + tmp98 = tmp33 - tmp32; + } + { + fftw_real tmp45; + fftw_real tmp82; + fftw_real tmp48; + fftw_real tmp81; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp43; + fftw_real tmp44; + fftw_real tmp46; + fftw_real tmp47; + ASSERT_ALIGNED_DOUBLE; + tmp43 = c_im(input[8 * istride]); + tmp44 = c_im(input[istride]); + tmp45 = tmp43 - tmp44; + tmp82 = tmp43 + tmp44; + tmp46 = c_im(input[6 * istride]); + tmp47 = c_im(input[13 * istride]); + tmp48 = tmp46 - tmp47; + tmp81 = tmp46 + tmp47; + } + tmp49 = tmp45 - tmp48; + tmp70 = tmp48 + tmp45; + tmp83 = tmp81 - tmp82; + tmp94 = tmp81 + tmp82; + } + { + fftw_real tmp57; + fftw_real tmp35; + fftw_real tmp87; + fftw_real tmp77; + ASSERT_ALIGNED_DOUBLE; + c_re(output[7 * ostride]) = tmp3 + tmp10 + tmp17 + tmp24; + tmp57 = (K974927912 * tmp42) - (K781831482 * tmp49) - (K433883739 * tmp56); + tmp35 = tmp3 + (K623489801 * tmp24) - (K900968867 * tmp17) - (K222520933 * tmp10); + c_re(output[5 * ostride]) = tmp35 - tmp57; + c_re(output[9 * ostride]) = tmp35 + tmp57; + { + fftw_real tmp59; + fftw_real tmp58; + fftw_real tmp61; + fftw_real tmp60; + ASSERT_ALIGNED_DOUBLE; + tmp59 = (K781831482 * tmp42) + (K974927912 * tmp56) + (K433883739 * tmp49); + tmp58 = tmp3 + (K623489801 * tmp10) - (K900968867 * tmp24) - (K222520933 * tmp17); + c_re(output[13 * ostride]) = tmp58 - tmp59; + c_re(output[ostride]) = tmp58 + tmp59; + tmp61 = (K433883739 * tmp42) + (K974927912 * tmp49) - (K781831482 * tmp56); + tmp60 = tmp3 + (K623489801 * tmp17) - (K222520933 * tmp24) - (K900968867 * tmp10); + c_re(output[11 * ostride]) = tmp60 - tmp61; + c_re(output[3 * ostride]) = tmp60 + tmp61; + } + c_re(output[0]) = tmp25 + tmp28 + tmp31 + tmp34; + tmp87 = (K781831482 * tmp80) - (K433883739 * tmp83) - (K974927912 * tmp86); + tmp77 = tmp25 + (K623489801 * tmp28) - (K900968867 * tmp34) - (K222520933 * tmp31); + c_re(output[6 * ostride]) = tmp77 - tmp87; + c_re(output[8 * ostride]) = tmp77 + tmp87; + { + fftw_real tmp89; + fftw_real tmp88; + fftw_real tmp91; + fftw_real tmp90; + ASSERT_ALIGNED_DOUBLE; + tmp89 = (K433883739 * tmp80) + (K781831482 * tmp86) - (K974927912 * tmp83); + tmp88 = tmp25 + (K623489801 * tmp31) - (K222520933 * tmp34) - (K900968867 * tmp28); + c_re(output[4 * ostride]) = tmp88 - tmp89; + c_re(output[10 * ostride]) = tmp88 + tmp89; + tmp91 = (K974927912 * tmp80) + (K433883739 * tmp86) + (K781831482 * tmp83); + tmp90 = tmp25 + (K623489801 * tmp34) - (K900968867 * tmp31) - (K222520933 * tmp28); + c_re(output[12 * ostride]) = tmp90 - tmp91; + c_re(output[2 * ostride]) = tmp90 + tmp91; + } + } + { + fftw_real tmp76; + fftw_real tmp75; + fftw_real tmp103; + fftw_real tmp104; + ASSERT_ALIGNED_DOUBLE; + c_im(output[7 * ostride]) = tmp68 + tmp71 + tmp69 + tmp70; + tmp76 = (K974927912 * tmp62) - (K781831482 * tmp63) - (K433883739 * tmp64); + tmp75 = tmp68 + (K623489801 * tmp70) - (K900968867 * tmp69) - (K222520933 * tmp71); + c_im(output[5 * ostride]) = tmp75 - tmp76; + c_im(output[9 * ostride]) = tmp76 + tmp75; + { + fftw_real tmp73; + fftw_real tmp74; + fftw_real tmp65; + fftw_real tmp72; + ASSERT_ALIGNED_DOUBLE; + tmp73 = (K781831482 * tmp62) + (K974927912 * tmp64) + (K433883739 * tmp63); + tmp74 = tmp68 + (K623489801 * tmp71) - (K900968867 * tmp70) - (K222520933 * tmp69); + c_im(output[ostride]) = tmp73 + tmp74; + c_im(output[13 * ostride]) = tmp74 - tmp73; + tmp65 = (K433883739 * tmp62) + (K974927912 * tmp63) - (K781831482 * tmp64); + tmp72 = tmp68 + (K623489801 * tmp69) - (K222520933 * tmp70) - (K900968867 * tmp71); + c_im(output[3 * ostride]) = tmp65 + tmp72; + c_im(output[11 * ostride]) = tmp72 - tmp65; + } + c_im(output[0]) = tmp92 + tmp93 + tmp95 + tmp94; + tmp103 = (K974927912 * tmp97) + (K433883739 * tmp99) + (K781831482 * tmp98); + tmp104 = tmp92 + (K623489801 * tmp94) - (K900968867 * tmp95) - (K222520933 * tmp93); + c_im(output[2 * ostride]) = tmp103 + tmp104; + c_im(output[12 * ostride]) = tmp104 - tmp103; + { + fftw_real tmp100; + fftw_real tmp96; + fftw_real tmp102; + fftw_real tmp101; + ASSERT_ALIGNED_DOUBLE; + tmp100 = (K781831482 * tmp97) - (K433883739 * tmp98) - (K974927912 * tmp99); + tmp96 = tmp92 + (K623489801 * tmp93) - (K900968867 * tmp94) - (K222520933 * tmp95); + c_im(output[6 * ostride]) = tmp96 - tmp100; + c_im(output[8 * ostride]) = tmp100 + tmp96; + tmp102 = (K433883739 * tmp97) + (K781831482 * tmp99) - (K974927912 * tmp98); + tmp101 = tmp92 + (K623489801 * tmp95) - (K222520933 * tmp94) - (K900968867 * tmp93); + c_im(output[4 * ostride]) = tmp101 - tmp102; + c_im(output[10 * ostride]) = tmp102 + tmp101; + } + } +} + +fftw_codelet_desc fftwi_no_twiddle_14_desc = +{ + "fftwi_no_twiddle_14", + (void (*)()) fftwi_no_twiddle_14, + 14, + FFTW_BACKWARD, + FFTW_NOTW, + 320, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fni_15.c b/src/sndobj/rfftw/fni_15.c new file mode 100644 index 0000000..c7e147d --- /dev/null +++ b/src/sndobj/rfftw/fni_15.c @@ -0,0 +1,446 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:14 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddleinv 15 */ + +/* + * This function contains 156 FP additions, 56 FP multiplications, + * (or, 128 additions, 28 multiplications, 28 fused multiply/add), + * 62 stack variables, and 60 memory accesses + */ +static const fftw_real K951056516 = FFTW_KONST(+0.951056516295153572116439333379382143405698634); +static const fftw_real K587785252 = FFTW_KONST(+0.587785252292473129168705954639072768597652438); +static const fftw_real K250000000 = FFTW_KONST(+0.250000000000000000000000000000000000000000000); +static const fftw_real K559016994 = FFTW_KONST(+0.559016994374947424102293417182819058860154590); +static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); +static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); + +/* + * Generator Id's : + * $Id: fni_15.c,v 1.1.1.1 2006/05/12 15:14:46 veplaini Exp $ + * $Id: fni_15.c,v 1.1.1.1 2006/05/12 15:14:46 veplaini Exp $ + * $Id: fni_15.c,v 1.1.1.1 2006/05/12 15:14:46 veplaini Exp $ + */ + +void fftwi_no_twiddle_15(const fftw_complex *input, fftw_complex *output, int istride, int ostride) +{ + fftw_real tmp5; + fftw_real tmp121; + fftw_real tmp148; + fftw_real tmp87; + fftw_real tmp35; + fftw_real tmp67; + fftw_real tmp21; + fftw_real tmp26; + fftw_real tmp27; + fftw_real tmp111; + fftw_real tmp114; + fftw_real tmp123; + fftw_real tmp139; + fftw_real tmp140; + fftw_real tmp146; + fftw_real tmp81; + fftw_real tmp82; + fftw_real tmp89; + fftw_real tmp71; + fftw_real tmp72; + fftw_real tmp73; + fftw_real tmp57; + fftw_real tmp64; + fftw_real tmp65; + fftw_real tmp10; + fftw_real tmp15; + fftw_real tmp16; + fftw_real tmp104; + fftw_real tmp107; + fftw_real tmp122; + fftw_real tmp136; + fftw_real tmp137; + fftw_real tmp145; + fftw_real tmp78; + fftw_real tmp79; + fftw_real tmp88; + fftw_real tmp68; + fftw_real tmp69; + fftw_real tmp70; + fftw_real tmp42; + fftw_real tmp49; + fftw_real tmp50; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp30; + fftw_real tmp4; + fftw_real tmp29; + fftw_real tmp33; + fftw_real tmp120; + fftw_real tmp119; + fftw_real tmp34; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(input[0]); + tmp30 = c_im(input[0]); + { + fftw_real tmp2; + fftw_real tmp3; + fftw_real tmp31; + fftw_real tmp32; + ASSERT_ALIGNED_DOUBLE; + tmp2 = c_re(input[5 * istride]); + tmp3 = c_re(input[10 * istride]); + tmp4 = tmp2 + tmp3; + tmp29 = K866025403 * (tmp2 - tmp3); + tmp31 = c_im(input[5 * istride]); + tmp32 = c_im(input[10 * istride]); + tmp33 = tmp31 + tmp32; + tmp120 = K866025403 * (tmp32 - tmp31); + } + tmp5 = tmp1 + tmp4; + tmp119 = tmp1 - (K500000000 * tmp4); + tmp121 = tmp119 - tmp120; + tmp148 = tmp119 + tmp120; + tmp87 = tmp30 + tmp33; + tmp34 = tmp30 - (K500000000 * tmp33); + tmp35 = tmp29 + tmp34; + tmp67 = tmp34 - tmp29; + } + { + fftw_real tmp17; + fftw_real tmp20; + fftw_real tmp51; + fftw_real tmp109; + fftw_real tmp52; + fftw_real tmp55; + fftw_real tmp56; + fftw_real tmp110; + fftw_real tmp22; + fftw_real tmp25; + fftw_real tmp58; + fftw_real tmp112; + fftw_real tmp59; + fftw_real tmp62; + fftw_real tmp63; + fftw_real tmp113; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp18; + fftw_real tmp19; + fftw_real tmp53; + fftw_real tmp54; + ASSERT_ALIGNED_DOUBLE; + tmp17 = c_re(input[6 * istride]); + tmp18 = c_re(input[11 * istride]); + tmp19 = c_re(input[istride]); + tmp20 = tmp18 + tmp19; + tmp51 = K866025403 * (tmp18 - tmp19); + tmp109 = tmp17 - (K500000000 * tmp20); + tmp52 = c_im(input[6 * istride]); + tmp53 = c_im(input[11 * istride]); + tmp54 = c_im(input[istride]); + tmp55 = tmp53 + tmp54; + tmp56 = tmp52 - (K500000000 * tmp55); + tmp110 = K866025403 * (tmp54 - tmp53); + } + { + fftw_real tmp23; + fftw_real tmp24; + fftw_real tmp60; + fftw_real tmp61; + ASSERT_ALIGNED_DOUBLE; + tmp22 = c_re(input[9 * istride]); + tmp23 = c_re(input[14 * istride]); + tmp24 = c_re(input[4 * istride]); + tmp25 = tmp23 + tmp24; + tmp58 = K866025403 * (tmp23 - tmp24); + tmp112 = tmp22 - (K500000000 * tmp25); + tmp59 = c_im(input[9 * istride]); + tmp60 = c_im(input[14 * istride]); + tmp61 = c_im(input[4 * istride]); + tmp62 = tmp60 + tmp61; + tmp63 = tmp59 - (K500000000 * tmp62); + tmp113 = K866025403 * (tmp61 - tmp60); + } + tmp21 = tmp17 + tmp20; + tmp26 = tmp22 + tmp25; + tmp27 = tmp21 + tmp26; + tmp111 = tmp109 - tmp110; + tmp114 = tmp112 - tmp113; + tmp123 = tmp111 + tmp114; + tmp139 = tmp109 + tmp110; + tmp140 = tmp112 + tmp113; + tmp146 = tmp139 + tmp140; + tmp81 = tmp52 + tmp55; + tmp82 = tmp59 + tmp62; + tmp89 = tmp81 + tmp82; + tmp71 = tmp56 - tmp51; + tmp72 = tmp63 - tmp58; + tmp73 = tmp71 + tmp72; + tmp57 = tmp51 + tmp56; + tmp64 = tmp58 + tmp63; + tmp65 = tmp57 + tmp64; + } + { + fftw_real tmp6; + fftw_real tmp9; + fftw_real tmp36; + fftw_real tmp102; + fftw_real tmp37; + fftw_real tmp40; + fftw_real tmp41; + fftw_real tmp103; + fftw_real tmp11; + fftw_real tmp14; + fftw_real tmp43; + fftw_real tmp105; + fftw_real tmp44; + fftw_real tmp47; + fftw_real tmp48; + fftw_real tmp106; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp7; + fftw_real tmp8; + fftw_real tmp38; + fftw_real tmp39; + ASSERT_ALIGNED_DOUBLE; + tmp6 = c_re(input[3 * istride]); + tmp7 = c_re(input[8 * istride]); + tmp8 = c_re(input[13 * istride]); + tmp9 = tmp7 + tmp8; + tmp36 = K866025403 * (tmp7 - tmp8); + tmp102 = tmp6 - (K500000000 * tmp9); + tmp37 = c_im(input[3 * istride]); + tmp38 = c_im(input[8 * istride]); + tmp39 = c_im(input[13 * istride]); + tmp40 = tmp38 + tmp39; + tmp41 = tmp37 - (K500000000 * tmp40); + tmp103 = K866025403 * (tmp39 - tmp38); + } + { + fftw_real tmp12; + fftw_real tmp13; + fftw_real tmp45; + fftw_real tmp46; + ASSERT_ALIGNED_DOUBLE; + tmp11 = c_re(input[12 * istride]); + tmp12 = c_re(input[2 * istride]); + tmp13 = c_re(input[7 * istride]); + tmp14 = tmp12 + tmp13; + tmp43 = K866025403 * (tmp12 - tmp13); + tmp105 = tmp11 - (K500000000 * tmp14); + tmp44 = c_im(input[12 * istride]); + tmp45 = c_im(input[2 * istride]); + tmp46 = c_im(input[7 * istride]); + tmp47 = tmp45 + tmp46; + tmp48 = tmp44 - (K500000000 * tmp47); + tmp106 = K866025403 * (tmp46 - tmp45); + } + tmp10 = tmp6 + tmp9; + tmp15 = tmp11 + tmp14; + tmp16 = tmp10 + tmp15; + tmp104 = tmp102 - tmp103; + tmp107 = tmp105 - tmp106; + tmp122 = tmp104 + tmp107; + tmp136 = tmp102 + tmp103; + tmp137 = tmp105 + tmp106; + tmp145 = tmp136 + tmp137; + tmp78 = tmp37 + tmp40; + tmp79 = tmp44 + tmp47; + tmp88 = tmp78 + tmp79; + tmp68 = tmp41 - tmp36; + tmp69 = tmp48 - tmp43; + tmp70 = tmp68 + tmp69; + tmp42 = tmp36 + tmp41; + tmp49 = tmp43 + tmp48; + tmp50 = tmp42 + tmp49; + } + { + fftw_real tmp76; + fftw_real tmp28; + fftw_real tmp75; + fftw_real tmp84; + fftw_real tmp86; + fftw_real tmp80; + fftw_real tmp83; + fftw_real tmp85; + fftw_real tmp77; + ASSERT_ALIGNED_DOUBLE; + tmp76 = K559016994 * (tmp16 - tmp27); + tmp28 = tmp16 + tmp27; + tmp75 = tmp5 - (K250000000 * tmp28); + tmp80 = tmp78 - tmp79; + tmp83 = tmp81 - tmp82; + tmp84 = (K587785252 * tmp80) - (K951056516 * tmp83); + tmp86 = (K951056516 * tmp80) + (K587785252 * tmp83); + c_re(output[0]) = tmp5 + tmp28; + tmp85 = tmp76 + tmp75; + c_re(output[6 * ostride]) = tmp85 - tmp86; + c_re(output[9 * ostride]) = tmp85 + tmp86; + tmp77 = tmp75 - tmp76; + c_re(output[12 * ostride]) = tmp77 - tmp84; + c_re(output[3 * ostride]) = tmp77 + tmp84; + } + { + fftw_real tmp134; + fftw_real tmp66; + fftw_real tmp133; + fftw_real tmp142; + fftw_real tmp144; + fftw_real tmp138; + fftw_real tmp141; + fftw_real tmp143; + fftw_real tmp135; + ASSERT_ALIGNED_DOUBLE; + tmp134 = K559016994 * (tmp50 - tmp65); + tmp66 = tmp50 + tmp65; + tmp133 = tmp35 - (K250000000 * tmp66); + tmp138 = tmp136 - tmp137; + tmp141 = tmp139 - tmp140; + tmp142 = (K587785252 * tmp138) - (K951056516 * tmp141); + tmp144 = (K951056516 * tmp138) + (K587785252 * tmp141); + c_im(output[10 * ostride]) = tmp35 + tmp66; + tmp143 = tmp134 + tmp133; + c_im(output[4 * ostride]) = tmp143 - tmp144; + c_im(output[ostride]) = tmp143 + tmp144; + tmp135 = tmp133 - tmp134; + c_im(output[13 * ostride]) = tmp135 - tmp142; + c_im(output[7 * ostride]) = tmp135 + tmp142; + } + { + fftw_real tmp147; + fftw_real tmp149; + fftw_real tmp150; + fftw_real tmp154; + fftw_real tmp156; + fftw_real tmp152; + fftw_real tmp153; + fftw_real tmp155; + fftw_real tmp151; + ASSERT_ALIGNED_DOUBLE; + tmp147 = K559016994 * (tmp145 - tmp146); + tmp149 = tmp145 + tmp146; + tmp150 = tmp148 - (K250000000 * tmp149); + tmp152 = tmp42 - tmp49; + tmp153 = tmp57 - tmp64; + tmp154 = (K951056516 * tmp152) + (K587785252 * tmp153); + tmp156 = (K587785252 * tmp152) - (K951056516 * tmp153); + c_re(output[10 * ostride]) = tmp148 + tmp149; + tmp155 = tmp150 - tmp147; + c_re(output[7 * ostride]) = tmp155 - tmp156; + c_re(output[13 * ostride]) = tmp156 + tmp155; + tmp151 = tmp147 + tmp150; + c_re(output[ostride]) = tmp151 - tmp154; + c_re(output[4 * ostride]) = tmp154 + tmp151; + } + { + fftw_real tmp126; + fftw_real tmp124; + fftw_real tmp125; + fftw_real tmp130; + fftw_real tmp132; + fftw_real tmp128; + fftw_real tmp129; + fftw_real tmp131; + fftw_real tmp127; + ASSERT_ALIGNED_DOUBLE; + tmp126 = K559016994 * (tmp122 - tmp123); + tmp124 = tmp122 + tmp123; + tmp125 = tmp121 - (K250000000 * tmp124); + tmp128 = tmp68 - tmp69; + tmp129 = tmp71 - tmp72; + tmp130 = (K587785252 * tmp128) - (K951056516 * tmp129); + tmp132 = (K951056516 * tmp128) + (K587785252 * tmp129); + c_re(output[5 * ostride]) = tmp121 + tmp124; + tmp131 = tmp126 + tmp125; + c_re(output[11 * ostride]) = tmp131 - tmp132; + c_re(output[14 * ostride]) = tmp132 + tmp131; + tmp127 = tmp125 - tmp126; + c_re(output[2 * ostride]) = tmp127 - tmp130; + c_re(output[8 * ostride]) = tmp130 + tmp127; + } + { + fftw_real tmp92; + fftw_real tmp90; + fftw_real tmp91; + fftw_real tmp96; + fftw_real tmp97; + fftw_real tmp94; + fftw_real tmp95; + fftw_real tmp98; + fftw_real tmp93; + ASSERT_ALIGNED_DOUBLE; + tmp92 = K559016994 * (tmp88 - tmp89); + tmp90 = tmp88 + tmp89; + tmp91 = tmp87 - (K250000000 * tmp90); + tmp94 = tmp10 - tmp15; + tmp95 = tmp21 - tmp26; + tmp96 = (K587785252 * tmp94) - (K951056516 * tmp95); + tmp97 = (K951056516 * tmp94) + (K587785252 * tmp95); + c_im(output[0]) = tmp87 + tmp90; + tmp98 = tmp92 + tmp91; + c_im(output[6 * ostride]) = tmp97 + tmp98; + c_im(output[9 * ostride]) = tmp98 - tmp97; + tmp93 = tmp91 - tmp92; + c_im(output[3 * ostride]) = tmp93 - tmp96; + c_im(output[12 * ostride]) = tmp96 + tmp93; + } + { + fftw_real tmp100; + fftw_real tmp74; + fftw_real tmp99; + fftw_real tmp116; + fftw_real tmp118; + fftw_real tmp108; + fftw_real tmp115; + fftw_real tmp117; + fftw_real tmp101; + ASSERT_ALIGNED_DOUBLE; + tmp100 = K559016994 * (tmp70 - tmp73); + tmp74 = tmp70 + tmp73; + tmp99 = tmp67 - (K250000000 * tmp74); + tmp108 = tmp104 - tmp107; + tmp115 = tmp111 - tmp114; + tmp116 = (K587785252 * tmp108) - (K951056516 * tmp115); + tmp118 = (K951056516 * tmp108) + (K587785252 * tmp115); + c_im(output[5 * ostride]) = tmp67 + tmp74; + tmp117 = tmp100 + tmp99; + c_im(output[14 * ostride]) = tmp117 - tmp118; + c_im(output[11 * ostride]) = tmp117 + tmp118; + tmp101 = tmp99 - tmp100; + c_im(output[8 * ostride]) = tmp101 - tmp116; + c_im(output[2 * ostride]) = tmp101 + tmp116; + } +} + +fftw_codelet_desc fftwi_no_twiddle_15_desc = +{ + "fftwi_no_twiddle_15", + (void (*)()) fftwi_no_twiddle_15, + 15, + FFTW_BACKWARD, + FFTW_NOTW, + 342, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fni_16.c b/src/sndobj/rfftw/fni_16.c new file mode 100644 index 0000000..3e761e0 --- /dev/null +++ b/src/sndobj/rfftw/fni_16.c @@ -0,0 +1,439 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:15 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddleinv 16 */ + +/* + * This function contains 144 FP additions, 24 FP multiplications, + * (or, 136 additions, 16 multiplications, 8 fused multiply/add), + * 46 stack variables, and 64 memory accesses + */ +static const fftw_real K382683432 = FFTW_KONST(+0.382683432365089771728459984030398866761344562); +static const fftw_real K923879532 = FFTW_KONST(+0.923879532511286756128183189396788286822416626); +static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); + +/* + * Generator Id's : + * $Id: fni_16.c,v 1.1.1.1 2006/05/12 15:14:59 veplaini Exp $ + * $Id: fni_16.c,v 1.1.1.1 2006/05/12 15:14:59 veplaini Exp $ + * $Id: fni_16.c,v 1.1.1.1 2006/05/12 15:14:59 veplaini Exp $ + */ + +void fftwi_no_twiddle_16(const fftw_complex *input, fftw_complex *output, int istride, int ostride) +{ + fftw_real tmp7; + fftw_real tmp129; + fftw_real tmp38; + fftw_real tmp115; + fftw_real tmp49; + fftw_real tmp95; + fftw_real tmp83; + fftw_real tmp105; + fftw_real tmp29; + fftw_real tmp123; + fftw_real tmp73; + fftw_real tmp101; + fftw_real tmp78; + fftw_real tmp102; + fftw_real tmp126; + fftw_real tmp141; + fftw_real tmp14; + fftw_real tmp116; + fftw_real tmp45; + fftw_real tmp130; + fftw_real tmp52; + fftw_real tmp84; + fftw_real tmp55; + fftw_real tmp85; + fftw_real tmp22; + fftw_real tmp118; + fftw_real tmp62; + fftw_real tmp98; + fftw_real tmp67; + fftw_real tmp99; + fftw_real tmp121; + fftw_real tmp140; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp3; + fftw_real tmp81; + fftw_real tmp34; + fftw_real tmp48; + fftw_real tmp6; + fftw_real tmp47; + fftw_real tmp37; + fftw_real tmp82; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp32; + fftw_real tmp33; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(input[0]); + tmp2 = c_re(input[8 * istride]); + tmp3 = tmp1 + tmp2; + tmp81 = tmp1 - tmp2; + tmp32 = c_im(input[0]); + tmp33 = c_im(input[8 * istride]); + tmp34 = tmp32 + tmp33; + tmp48 = tmp32 - tmp33; + } + { + fftw_real tmp4; + fftw_real tmp5; + fftw_real tmp35; + fftw_real tmp36; + ASSERT_ALIGNED_DOUBLE; + tmp4 = c_re(input[4 * istride]); + tmp5 = c_re(input[12 * istride]); + tmp6 = tmp4 + tmp5; + tmp47 = tmp4 - tmp5; + tmp35 = c_im(input[4 * istride]); + tmp36 = c_im(input[12 * istride]); + tmp37 = tmp35 + tmp36; + tmp82 = tmp35 - tmp36; + } + tmp7 = tmp3 + tmp6; + tmp129 = tmp3 - tmp6; + tmp38 = tmp34 + tmp37; + tmp115 = tmp34 - tmp37; + tmp49 = tmp47 + tmp48; + tmp95 = tmp48 - tmp47; + tmp83 = tmp81 - tmp82; + tmp105 = tmp81 + tmp82; + } + { + fftw_real tmp25; + fftw_real tmp74; + fftw_real tmp72; + fftw_real tmp124; + fftw_real tmp28; + fftw_real tmp69; + fftw_real tmp77; + fftw_real tmp125; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp23; + fftw_real tmp24; + fftw_real tmp70; + fftw_real tmp71; + ASSERT_ALIGNED_DOUBLE; + tmp23 = c_re(input[15 * istride]); + tmp24 = c_re(input[7 * istride]); + tmp25 = tmp23 + tmp24; + tmp74 = tmp23 - tmp24; + tmp70 = c_im(input[15 * istride]); + tmp71 = c_im(input[7 * istride]); + tmp72 = tmp70 - tmp71; + tmp124 = tmp70 + tmp71; + } + { + fftw_real tmp26; + fftw_real tmp27; + fftw_real tmp75; + fftw_real tmp76; + ASSERT_ALIGNED_DOUBLE; + tmp26 = c_re(input[3 * istride]); + tmp27 = c_re(input[11 * istride]); + tmp28 = tmp26 + tmp27; + tmp69 = tmp26 - tmp27; + tmp75 = c_im(input[3 * istride]); + tmp76 = c_im(input[11 * istride]); + tmp77 = tmp75 - tmp76; + tmp125 = tmp75 + tmp76; + } + tmp29 = tmp25 + tmp28; + tmp123 = tmp25 - tmp28; + tmp73 = tmp69 + tmp72; + tmp101 = tmp72 - tmp69; + tmp78 = tmp74 - tmp77; + tmp102 = tmp74 + tmp77; + tmp126 = tmp124 - tmp125; + tmp141 = tmp124 + tmp125; + } + { + fftw_real tmp10; + fftw_real tmp50; + fftw_real tmp41; + fftw_real tmp51; + fftw_real tmp13; + fftw_real tmp54; + fftw_real tmp44; + fftw_real tmp53; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp8; + fftw_real tmp9; + fftw_real tmp39; + fftw_real tmp40; + ASSERT_ALIGNED_DOUBLE; + tmp8 = c_re(input[2 * istride]); + tmp9 = c_re(input[10 * istride]); + tmp10 = tmp8 + tmp9; + tmp50 = tmp8 - tmp9; + tmp39 = c_im(input[2 * istride]); + tmp40 = c_im(input[10 * istride]); + tmp41 = tmp39 + tmp40; + tmp51 = tmp39 - tmp40; + } + { + fftw_real tmp11; + fftw_real tmp12; + fftw_real tmp42; + fftw_real tmp43; + ASSERT_ALIGNED_DOUBLE; + tmp11 = c_re(input[14 * istride]); + tmp12 = c_re(input[6 * istride]); + tmp13 = tmp11 + tmp12; + tmp54 = tmp11 - tmp12; + tmp42 = c_im(input[14 * istride]); + tmp43 = c_im(input[6 * istride]); + tmp44 = tmp42 + tmp43; + tmp53 = tmp42 - tmp43; + } + tmp14 = tmp10 + tmp13; + tmp116 = tmp10 - tmp13; + tmp45 = tmp41 + tmp44; + tmp130 = tmp44 - tmp41; + tmp52 = tmp50 + tmp51; + tmp84 = tmp50 - tmp51; + tmp55 = tmp53 - tmp54; + tmp85 = tmp54 + tmp53; + } + { + fftw_real tmp18; + fftw_real tmp63; + fftw_real tmp61; + fftw_real tmp119; + fftw_real tmp21; + fftw_real tmp58; + fftw_real tmp66; + fftw_real tmp120; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp16; + fftw_real tmp17; + fftw_real tmp59; + fftw_real tmp60; + ASSERT_ALIGNED_DOUBLE; + tmp16 = c_re(input[istride]); + tmp17 = c_re(input[9 * istride]); + tmp18 = tmp16 + tmp17; + tmp63 = tmp16 - tmp17; + tmp59 = c_im(input[istride]); + tmp60 = c_im(input[9 * istride]); + tmp61 = tmp59 - tmp60; + tmp119 = tmp59 + tmp60; + } + { + fftw_real tmp19; + fftw_real tmp20; + fftw_real tmp64; + fftw_real tmp65; + ASSERT_ALIGNED_DOUBLE; + tmp19 = c_re(input[5 * istride]); + tmp20 = c_re(input[13 * istride]); + tmp21 = tmp19 + tmp20; + tmp58 = tmp19 - tmp20; + tmp64 = c_im(input[5 * istride]); + tmp65 = c_im(input[13 * istride]); + tmp66 = tmp64 - tmp65; + tmp120 = tmp64 + tmp65; + } + tmp22 = tmp18 + tmp21; + tmp118 = tmp18 - tmp21; + tmp62 = tmp58 + tmp61; + tmp98 = tmp61 - tmp58; + tmp67 = tmp63 - tmp66; + tmp99 = tmp63 + tmp66; + tmp121 = tmp119 - tmp120; + tmp140 = tmp119 + tmp120; + } + { + fftw_real tmp15; + fftw_real tmp30; + fftw_real tmp31; + fftw_real tmp46; + ASSERT_ALIGNED_DOUBLE; + tmp15 = tmp7 + tmp14; + tmp30 = tmp22 + tmp29; + c_re(output[8 * ostride]) = tmp15 - tmp30; + c_re(output[0]) = tmp15 + tmp30; + tmp31 = tmp22 - tmp29; + tmp46 = tmp38 - tmp45; + c_im(output[4 * ostride]) = tmp31 + tmp46; + c_im(output[12 * ostride]) = tmp46 - tmp31; + } + { + fftw_real tmp139; + fftw_real tmp142; + fftw_real tmp143; + fftw_real tmp144; + ASSERT_ALIGNED_DOUBLE; + tmp139 = tmp38 + tmp45; + tmp142 = tmp140 + tmp141; + c_im(output[8 * ostride]) = tmp139 - tmp142; + c_im(output[0]) = tmp139 + tmp142; + tmp143 = tmp7 - tmp14; + tmp144 = tmp141 - tmp140; + c_re(output[12 * ostride]) = tmp143 - tmp144; + c_re(output[4 * ostride]) = tmp143 + tmp144; + } + { + fftw_real tmp117; + fftw_real tmp131; + fftw_real tmp128; + fftw_real tmp132; + fftw_real tmp122; + fftw_real tmp127; + ASSERT_ALIGNED_DOUBLE; + tmp117 = tmp115 - tmp116; + tmp131 = tmp129 + tmp130; + tmp122 = tmp118 - tmp121; + tmp127 = tmp123 + tmp126; + tmp128 = K707106781 * (tmp122 - tmp127); + tmp132 = K707106781 * (tmp122 + tmp127); + c_im(output[14 * ostride]) = tmp117 - tmp128; + c_im(output[6 * ostride]) = tmp117 + tmp128; + c_re(output[10 * ostride]) = tmp131 - tmp132; + c_re(output[2 * ostride]) = tmp131 + tmp132; + } + { + fftw_real tmp133; + fftw_real tmp137; + fftw_real tmp136; + fftw_real tmp138; + fftw_real tmp134; + fftw_real tmp135; + ASSERT_ALIGNED_DOUBLE; + tmp133 = tmp116 + tmp115; + tmp137 = tmp129 - tmp130; + tmp134 = tmp118 + tmp121; + tmp135 = tmp126 - tmp123; + tmp136 = K707106781 * (tmp134 + tmp135); + tmp138 = K707106781 * (tmp135 - tmp134); + c_im(output[10 * ostride]) = tmp133 - tmp136; + c_im(output[2 * ostride]) = tmp133 + tmp136; + c_re(output[14 * ostride]) = tmp137 - tmp138; + c_re(output[6 * ostride]) = tmp137 + tmp138; + } + { + fftw_real tmp57; + fftw_real tmp89; + fftw_real tmp92; + fftw_real tmp94; + fftw_real tmp87; + fftw_real tmp93; + fftw_real tmp80; + fftw_real tmp88; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp56; + fftw_real tmp90; + fftw_real tmp91; + fftw_real tmp86; + fftw_real tmp68; + fftw_real tmp79; + ASSERT_ALIGNED_DOUBLE; + tmp56 = K707106781 * (tmp52 + tmp55); + tmp57 = tmp49 + tmp56; + tmp89 = tmp49 - tmp56; + tmp90 = (K923879532 * tmp67) - (K382683432 * tmp62); + tmp91 = (K382683432 * tmp73) + (K923879532 * tmp78); + tmp92 = tmp90 - tmp91; + tmp94 = tmp90 + tmp91; + tmp86 = K707106781 * (tmp84 + tmp85); + tmp87 = tmp83 - tmp86; + tmp93 = tmp83 + tmp86; + tmp68 = (K923879532 * tmp62) + (K382683432 * tmp67); + tmp79 = (K923879532 * tmp73) - (K382683432 * tmp78); + tmp80 = tmp68 + tmp79; + tmp88 = tmp79 - tmp68; + } + c_im(output[9 * ostride]) = tmp57 - tmp80; + c_im(output[ostride]) = tmp57 + tmp80; + c_re(output[13 * ostride]) = tmp87 - tmp88; + c_re(output[5 * ostride]) = tmp87 + tmp88; + c_im(output[13 * ostride]) = tmp89 - tmp92; + c_im(output[5 * ostride]) = tmp89 + tmp92; + c_re(output[9 * ostride]) = tmp93 - tmp94; + c_re(output[ostride]) = tmp93 + tmp94; + } + { + fftw_real tmp97; + fftw_real tmp109; + fftw_real tmp112; + fftw_real tmp114; + fftw_real tmp107; + fftw_real tmp113; + fftw_real tmp104; + fftw_real tmp108; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp96; + fftw_real tmp110; + fftw_real tmp111; + fftw_real tmp106; + fftw_real tmp100; + fftw_real tmp103; + ASSERT_ALIGNED_DOUBLE; + tmp96 = K707106781 * (tmp84 - tmp85); + tmp97 = tmp95 + tmp96; + tmp109 = tmp95 - tmp96; + tmp110 = (K382683432 * tmp99) - (K923879532 * tmp98); + tmp111 = (K923879532 * tmp101) + (K382683432 * tmp102); + tmp112 = tmp110 - tmp111; + tmp114 = tmp110 + tmp111; + tmp106 = K707106781 * (tmp55 - tmp52); + tmp107 = tmp105 - tmp106; + tmp113 = tmp105 + tmp106; + tmp100 = (K382683432 * tmp98) + (K923879532 * tmp99); + tmp103 = (K382683432 * tmp101) - (K923879532 * tmp102); + tmp104 = tmp100 + tmp103; + tmp108 = tmp103 - tmp100; + } + c_im(output[11 * ostride]) = tmp97 - tmp104; + c_im(output[3 * ostride]) = tmp97 + tmp104; + c_re(output[15 * ostride]) = tmp107 - tmp108; + c_re(output[7 * ostride]) = tmp107 + tmp108; + c_im(output[15 * ostride]) = tmp109 - tmp112; + c_im(output[7 * ostride]) = tmp109 + tmp112; + c_re(output[11 * ostride]) = tmp113 - tmp114; + c_re(output[3 * ostride]) = tmp113 + tmp114; + } +} + +fftw_codelet_desc fftwi_no_twiddle_16_desc = +{ + "fftwi_no_twiddle_16", + (void (*)()) fftwi_no_twiddle_16, + 16, + FFTW_BACKWARD, + FFTW_NOTW, + 364, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fni_2.c b/src/sndobj/rfftw/fni_2.c new file mode 100644 index 0000000..357427f --- /dev/null +++ b/src/sndobj/rfftw/fni_2.c @@ -0,0 +1,68 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:02 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddleinv 2 */ + +/* + * This function contains 4 FP additions, 0 FP multiplications, + * (or, 4 additions, 0 multiplications, 0 fused multiply/add), + * 4 stack variables, and 8 memory accesses + */ + +/* + * Generator Id's : + * $Id: fni_2.c,v 1.1.1.1 2006/05/12 15:14:54 veplaini Exp $ + * $Id: fni_2.c,v 1.1.1.1 2006/05/12 15:14:54 veplaini Exp $ + * $Id: fni_2.c,v 1.1.1.1 2006/05/12 15:14:54 veplaini Exp $ + */ + +void fftwi_no_twiddle_2(const fftw_complex *input, fftw_complex *output, int istride, int ostride) +{ + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp3; + fftw_real tmp4; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(input[0]); + tmp2 = c_re(input[istride]); + c_re(output[ostride]) = tmp1 - tmp2; + c_re(output[0]) = tmp1 + tmp2; + tmp3 = c_im(input[0]); + tmp4 = c_im(input[istride]); + c_im(output[ostride]) = tmp3 - tmp4; + c_im(output[0]) = tmp3 + tmp4; +} + +fftw_codelet_desc fftwi_no_twiddle_2_desc = +{ + "fftwi_no_twiddle_2", + (void (*)()) fftwi_no_twiddle_2, + 2, + FFTW_BACKWARD, + FFTW_NOTW, + 56, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fni_3.c b/src/sndobj/rfftw/fni_3.c new file mode 100644 index 0000000..a541423 --- /dev/null +++ b/src/sndobj/rfftw/fni_3.c @@ -0,0 +1,91 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:03 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddleinv 3 */ + +/* + * This function contains 12 FP additions, 4 FP multiplications, + * (or, 10 additions, 2 multiplications, 2 fused multiply/add), + * 12 stack variables, and 12 memory accesses + */ +static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); +static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); + +/* + * Generator Id's : + * $Id: fni_3.c,v 1.1.1.1 2006/05/12 15:15:01 veplaini Exp $ + * $Id: fni_3.c,v 1.1.1.1 2006/05/12 15:15:01 veplaini Exp $ + * $Id: fni_3.c,v 1.1.1.1 2006/05/12 15:15:01 veplaini Exp $ + */ + +void fftwi_no_twiddle_3(const fftw_complex *input, fftw_complex *output, int istride, int ostride) +{ + fftw_real tmp1; + fftw_real tmp6; + fftw_real tmp4; + fftw_real tmp5; + fftw_real tmp9; + fftw_real tmp12; + fftw_real tmp11; + fftw_real tmp10; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(input[0]); + tmp6 = c_im(input[0]); + { + fftw_real tmp2; + fftw_real tmp3; + fftw_real tmp7; + fftw_real tmp8; + ASSERT_ALIGNED_DOUBLE; + tmp2 = c_re(input[istride]); + tmp3 = c_re(input[2 * istride]); + tmp4 = tmp2 + tmp3; + tmp5 = K866025403 * (tmp2 - tmp3); + tmp7 = c_im(input[istride]); + tmp8 = c_im(input[2 * istride]); + tmp9 = tmp7 + tmp8; + tmp12 = K866025403 * (tmp8 - tmp7); + } + c_re(output[0]) = tmp1 + tmp4; + tmp11 = tmp1 - (K500000000 * tmp4); + c_re(output[2 * ostride]) = tmp11 - tmp12; + c_re(output[ostride]) = tmp11 + tmp12; + c_im(output[0]) = tmp6 + tmp9; + tmp10 = tmp6 - (K500000000 * tmp9); + c_im(output[ostride]) = tmp5 + tmp10; + c_im(output[2 * ostride]) = tmp10 - tmp5; +} + +fftw_codelet_desc fftwi_no_twiddle_3_desc = +{ + "fftwi_no_twiddle_3", + (void (*)()) fftwi_no_twiddle_3, + 3, + FFTW_BACKWARD, + FFTW_NOTW, + 78, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fni_32.c b/src/sndobj/rfftw/fni_32.c new file mode 100644 index 0000000..afffec9 --- /dev/null +++ b/src/sndobj/rfftw/fni_32.c @@ -0,0 +1,1042 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:16 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddleinv 32 */ + +/* + * This function contains 372 FP additions, 84 FP multiplications, + * (or, 340 additions, 52 multiplications, 32 fused multiply/add), + * 92 stack variables, and 128 memory accesses + */ +static const fftw_real K195090322 = FFTW_KONST(+0.195090322016128267848284868477022240927691618); +static const fftw_real K980785280 = FFTW_KONST(+0.980785280403230449126182236134239036973933731); +static const fftw_real K831469612 = FFTW_KONST(+0.831469612302545237078788377617905756738560812); +static const fftw_real K555570233 = FFTW_KONST(+0.555570233019602224742830813948532874374937191); +static const fftw_real K382683432 = FFTW_KONST(+0.382683432365089771728459984030398866761344562); +static const fftw_real K923879532 = FFTW_KONST(+0.923879532511286756128183189396788286822416626); +static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); + +/* + * Generator Id's : + * $Id: fni_32.c,v 1.1.1.1 2006/05/12 15:14:51 veplaini Exp $ + * $Id: fni_32.c,v 1.1.1.1 2006/05/12 15:14:51 veplaini Exp $ + * $Id: fni_32.c,v 1.1.1.1 2006/05/12 15:14:51 veplaini Exp $ + */ + +void fftwi_no_twiddle_32(const fftw_complex *input, fftw_complex *output, int istride, int ostride) +{ + fftw_real tmp7; + fftw_real tmp339; + fftw_real tmp70; + fftw_real tmp313; + fftw_real tmp97; + fftw_real tmp215; + fftw_real tmp179; + fftw_real tmp241; + fftw_real tmp14; + fftw_real tmp314; + fftw_real tmp77; + fftw_real tmp340; + fftw_real tmp182; + fftw_real tmp216; + fftw_real tmp104; + fftw_real tmp242; + fftw_real tmp153; + fftw_real tmp236; + fftw_real tmp53; + fftw_real tmp60; + fftw_real tmp287; + fftw_real tmp336; + fftw_real tmp360; + fftw_real tmp290; + fftw_real tmp293; + fftw_real tmp294; + fftw_real tmp170; + fftw_real tmp233; + fftw_real tmp333; + fftw_real tmp359; + fftw_real tmp164; + fftw_real tmp234; + fftw_real tmp173; + fftw_real tmp237; + fftw_real tmp22; + fftw_real tmp318; + fftw_real tmp343; + fftw_real tmp85; + fftw_real tmp112; + fftw_real tmp185; + fftw_real tmp220; + fftw_real tmp245; + fftw_real tmp29; + fftw_real tmp321; + fftw_real tmp342; + fftw_real tmp92; + fftw_real tmp119; + fftw_real tmp184; + fftw_real tmp223; + fftw_real tmp244; + fftw_real tmp126; + fftw_real tmp229; + fftw_real tmp38; + fftw_real tmp45; + fftw_real tmp278; + fftw_real tmp329; + fftw_real tmp357; + fftw_real tmp281; + fftw_real tmp284; + fftw_real tmp285; + fftw_real tmp143; + fftw_real tmp226; + fftw_real tmp326; + fftw_real tmp356; + fftw_real tmp137; + fftw_real tmp227; + fftw_real tmp146; + fftw_real tmp230; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp3; + fftw_real tmp177; + fftw_real tmp66; + fftw_real tmp96; + fftw_real tmp6; + fftw_real tmp95; + fftw_real tmp69; + fftw_real tmp178; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp64; + fftw_real tmp65; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(input[0]); + tmp2 = c_re(input[16 * istride]); + tmp3 = tmp1 + tmp2; + tmp177 = tmp1 - tmp2; + tmp64 = c_im(input[0]); + tmp65 = c_im(input[16 * istride]); + tmp66 = tmp64 + tmp65; + tmp96 = tmp64 - tmp65; + } + { + fftw_real tmp4; + fftw_real tmp5; + fftw_real tmp67; + fftw_real tmp68; + ASSERT_ALIGNED_DOUBLE; + tmp4 = c_re(input[8 * istride]); + tmp5 = c_re(input[24 * istride]); + tmp6 = tmp4 + tmp5; + tmp95 = tmp4 - tmp5; + tmp67 = c_im(input[8 * istride]); + tmp68 = c_im(input[24 * istride]); + tmp69 = tmp67 + tmp68; + tmp178 = tmp67 - tmp68; + } + tmp7 = tmp3 + tmp6; + tmp339 = tmp3 - tmp6; + tmp70 = tmp66 + tmp69; + tmp313 = tmp66 - tmp69; + tmp97 = tmp95 + tmp96; + tmp215 = tmp96 - tmp95; + tmp179 = tmp177 - tmp178; + tmp241 = tmp177 + tmp178; + } + { + fftw_real tmp10; + fftw_real tmp98; + fftw_real tmp73; + fftw_real tmp99; + fftw_real tmp13; + fftw_real tmp102; + fftw_real tmp76; + fftw_real tmp101; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp8; + fftw_real tmp9; + fftw_real tmp71; + fftw_real tmp72; + ASSERT_ALIGNED_DOUBLE; + tmp8 = c_re(input[4 * istride]); + tmp9 = c_re(input[20 * istride]); + tmp10 = tmp8 + tmp9; + tmp98 = tmp8 - tmp9; + tmp71 = c_im(input[4 * istride]); + tmp72 = c_im(input[20 * istride]); + tmp73 = tmp71 + tmp72; + tmp99 = tmp71 - tmp72; + } + { + fftw_real tmp11; + fftw_real tmp12; + fftw_real tmp74; + fftw_real tmp75; + ASSERT_ALIGNED_DOUBLE; + tmp11 = c_re(input[28 * istride]); + tmp12 = c_re(input[12 * istride]); + tmp13 = tmp11 + tmp12; + tmp102 = tmp11 - tmp12; + tmp74 = c_im(input[28 * istride]); + tmp75 = c_im(input[12 * istride]); + tmp76 = tmp74 + tmp75; + tmp101 = tmp74 - tmp75; + } + tmp14 = tmp10 + tmp13; + tmp314 = tmp10 - tmp13; + tmp77 = tmp73 + tmp76; + tmp340 = tmp76 - tmp73; + { + fftw_real tmp180; + fftw_real tmp181; + fftw_real tmp100; + fftw_real tmp103; + ASSERT_ALIGNED_DOUBLE; + tmp180 = tmp98 - tmp99; + tmp181 = tmp102 + tmp101; + tmp182 = K707106781 * (tmp180 + tmp181); + tmp216 = K707106781 * (tmp180 - tmp181); + tmp100 = tmp98 + tmp99; + tmp103 = tmp101 - tmp102; + tmp104 = K707106781 * (tmp100 + tmp103); + tmp242 = K707106781 * (tmp103 - tmp100); + } + } + { + fftw_real tmp49; + fftw_real tmp149; + fftw_real tmp169; + fftw_real tmp288; + fftw_real tmp52; + fftw_real tmp166; + fftw_real tmp152; + fftw_real tmp289; + fftw_real tmp56; + fftw_real tmp154; + fftw_real tmp157; + fftw_real tmp291; + fftw_real tmp59; + fftw_real tmp159; + fftw_real tmp162; + fftw_real tmp292; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp47; + fftw_real tmp48; + fftw_real tmp167; + fftw_real tmp168; + ASSERT_ALIGNED_DOUBLE; + tmp47 = c_re(input[31 * istride]); + tmp48 = c_re(input[15 * istride]); + tmp49 = tmp47 + tmp48; + tmp149 = tmp47 - tmp48; + tmp167 = c_im(input[31 * istride]); + tmp168 = c_im(input[15 * istride]); + tmp169 = tmp167 - tmp168; + tmp288 = tmp167 + tmp168; + } + { + fftw_real tmp50; + fftw_real tmp51; + fftw_real tmp150; + fftw_real tmp151; + ASSERT_ALIGNED_DOUBLE; + tmp50 = c_re(input[7 * istride]); + tmp51 = c_re(input[23 * istride]); + tmp52 = tmp50 + tmp51; + tmp166 = tmp50 - tmp51; + tmp150 = c_im(input[7 * istride]); + tmp151 = c_im(input[23 * istride]); + tmp152 = tmp150 - tmp151; + tmp289 = tmp150 + tmp151; + } + { + fftw_real tmp54; + fftw_real tmp55; + fftw_real tmp155; + fftw_real tmp156; + ASSERT_ALIGNED_DOUBLE; + tmp54 = c_re(input[3 * istride]); + tmp55 = c_re(input[19 * istride]); + tmp56 = tmp54 + tmp55; + tmp154 = tmp54 - tmp55; + tmp155 = c_im(input[3 * istride]); + tmp156 = c_im(input[19 * istride]); + tmp157 = tmp155 - tmp156; + tmp291 = tmp155 + tmp156; + } + { + fftw_real tmp57; + fftw_real tmp58; + fftw_real tmp160; + fftw_real tmp161; + ASSERT_ALIGNED_DOUBLE; + tmp57 = c_re(input[27 * istride]); + tmp58 = c_re(input[11 * istride]); + tmp59 = tmp57 + tmp58; + tmp159 = tmp57 - tmp58; + tmp160 = c_im(input[27 * istride]); + tmp161 = c_im(input[11 * istride]); + tmp162 = tmp160 - tmp161; + tmp292 = tmp160 + tmp161; + } + { + fftw_real tmp334; + fftw_real tmp335; + fftw_real tmp331; + fftw_real tmp332; + ASSERT_ALIGNED_DOUBLE; + tmp153 = tmp149 - tmp152; + tmp236 = tmp149 + tmp152; + tmp53 = tmp49 + tmp52; + tmp60 = tmp56 + tmp59; + tmp287 = tmp53 - tmp60; + tmp334 = tmp49 - tmp52; + tmp335 = tmp292 - tmp291; + tmp336 = tmp334 - tmp335; + tmp360 = tmp334 + tmp335; + tmp290 = tmp288 + tmp289; + tmp293 = tmp291 + tmp292; + tmp294 = tmp290 - tmp293; + tmp170 = tmp166 + tmp169; + tmp233 = tmp169 - tmp166; + tmp331 = tmp288 - tmp289; + tmp332 = tmp56 - tmp59; + tmp333 = tmp331 - tmp332; + tmp359 = tmp332 + tmp331; + { + fftw_real tmp158; + fftw_real tmp163; + fftw_real tmp171; + fftw_real tmp172; + ASSERT_ALIGNED_DOUBLE; + tmp158 = tmp154 - tmp157; + tmp163 = tmp159 + tmp162; + tmp164 = K707106781 * (tmp158 + tmp163); + tmp234 = K707106781 * (tmp158 - tmp163); + tmp171 = tmp154 + tmp157; + tmp172 = tmp162 - tmp159; + tmp173 = K707106781 * (tmp171 + tmp172); + tmp237 = K707106781 * (tmp172 - tmp171); + } + } + } + { + fftw_real tmp18; + fftw_real tmp106; + fftw_real tmp81; + fftw_real tmp110; + fftw_real tmp21; + fftw_real tmp109; + fftw_real tmp84; + fftw_real tmp107; + fftw_real tmp316; + fftw_real tmp317; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp16; + fftw_real tmp17; + fftw_real tmp79; + fftw_real tmp80; + ASSERT_ALIGNED_DOUBLE; + tmp16 = c_re(input[2 * istride]); + tmp17 = c_re(input[18 * istride]); + tmp18 = tmp16 + tmp17; + tmp106 = tmp16 - tmp17; + tmp79 = c_im(input[2 * istride]); + tmp80 = c_im(input[18 * istride]); + tmp81 = tmp79 + tmp80; + tmp110 = tmp79 - tmp80; + } + { + fftw_real tmp19; + fftw_real tmp20; + fftw_real tmp82; + fftw_real tmp83; + ASSERT_ALIGNED_DOUBLE; + tmp19 = c_re(input[10 * istride]); + tmp20 = c_re(input[26 * istride]); + tmp21 = tmp19 + tmp20; + tmp109 = tmp19 - tmp20; + tmp82 = c_im(input[10 * istride]); + tmp83 = c_im(input[26 * istride]); + tmp84 = tmp82 + tmp83; + tmp107 = tmp82 - tmp83; + } + tmp22 = tmp18 + tmp21; + tmp316 = tmp18 - tmp21; + tmp317 = tmp81 - tmp84; + tmp318 = tmp316 - tmp317; + tmp343 = tmp316 + tmp317; + tmp85 = tmp81 + tmp84; + { + fftw_real tmp108; + fftw_real tmp111; + fftw_real tmp218; + fftw_real tmp219; + ASSERT_ALIGNED_DOUBLE; + tmp108 = tmp106 - tmp107; + tmp111 = tmp109 + tmp110; + tmp112 = (K923879532 * tmp108) - (K382683432 * tmp111); + tmp185 = (K923879532 * tmp111) + (K382683432 * tmp108); + tmp218 = tmp106 + tmp107; + tmp219 = tmp110 - tmp109; + tmp220 = (K382683432 * tmp218) - (K923879532 * tmp219); + tmp245 = (K382683432 * tmp219) + (K923879532 * tmp218); + } + } + { + fftw_real tmp25; + fftw_real tmp116; + fftw_real tmp88; + fftw_real tmp114; + fftw_real tmp28; + fftw_real tmp113; + fftw_real tmp91; + fftw_real tmp117; + fftw_real tmp319; + fftw_real tmp320; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp23; + fftw_real tmp24; + fftw_real tmp86; + fftw_real tmp87; + ASSERT_ALIGNED_DOUBLE; + tmp23 = c_re(input[30 * istride]); + tmp24 = c_re(input[14 * istride]); + tmp25 = tmp23 + tmp24; + tmp116 = tmp23 - tmp24; + tmp86 = c_im(input[30 * istride]); + tmp87 = c_im(input[14 * istride]); + tmp88 = tmp86 + tmp87; + tmp114 = tmp86 - tmp87; + } + { + fftw_real tmp26; + fftw_real tmp27; + fftw_real tmp89; + fftw_real tmp90; + ASSERT_ALIGNED_DOUBLE; + tmp26 = c_re(input[6 * istride]); + tmp27 = c_re(input[22 * istride]); + tmp28 = tmp26 + tmp27; + tmp113 = tmp26 - tmp27; + tmp89 = c_im(input[6 * istride]); + tmp90 = c_im(input[22 * istride]); + tmp91 = tmp89 + tmp90; + tmp117 = tmp89 - tmp90; + } + tmp29 = tmp25 + tmp28; + tmp319 = tmp25 - tmp28; + tmp320 = tmp88 - tmp91; + tmp321 = tmp319 + tmp320; + tmp342 = tmp320 - tmp319; + tmp92 = tmp88 + tmp91; + { + fftw_real tmp115; + fftw_real tmp118; + fftw_real tmp221; + fftw_real tmp222; + ASSERT_ALIGNED_DOUBLE; + tmp115 = tmp113 + tmp114; + tmp118 = tmp116 - tmp117; + tmp119 = (K382683432 * tmp115) + (K923879532 * tmp118); + tmp184 = (K923879532 * tmp115) - (K382683432 * tmp118); + tmp221 = tmp114 - tmp113; + tmp222 = tmp116 + tmp117; + tmp223 = (K923879532 * tmp221) + (K382683432 * tmp222); + tmp244 = (K382683432 * tmp221) - (K923879532 * tmp222); + } + } + { + fftw_real tmp34; + fftw_real tmp122; + fftw_real tmp142; + fftw_real tmp279; + fftw_real tmp37; + fftw_real tmp139; + fftw_real tmp125; + fftw_real tmp280; + fftw_real tmp41; + fftw_real tmp127; + fftw_real tmp130; + fftw_real tmp282; + fftw_real tmp44; + fftw_real tmp132; + fftw_real tmp135; + fftw_real tmp283; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp32; + fftw_real tmp33; + fftw_real tmp140; + fftw_real tmp141; + ASSERT_ALIGNED_DOUBLE; + tmp32 = c_re(input[istride]); + tmp33 = c_re(input[17 * istride]); + tmp34 = tmp32 + tmp33; + tmp122 = tmp32 - tmp33; + tmp140 = c_im(input[istride]); + tmp141 = c_im(input[17 * istride]); + tmp142 = tmp140 - tmp141; + tmp279 = tmp140 + tmp141; + } + { + fftw_real tmp35; + fftw_real tmp36; + fftw_real tmp123; + fftw_real tmp124; + ASSERT_ALIGNED_DOUBLE; + tmp35 = c_re(input[9 * istride]); + tmp36 = c_re(input[25 * istride]); + tmp37 = tmp35 + tmp36; + tmp139 = tmp35 - tmp36; + tmp123 = c_im(input[9 * istride]); + tmp124 = c_im(input[25 * istride]); + tmp125 = tmp123 - tmp124; + tmp280 = tmp123 + tmp124; + } + { + fftw_real tmp39; + fftw_real tmp40; + fftw_real tmp128; + fftw_real tmp129; + ASSERT_ALIGNED_DOUBLE; + tmp39 = c_re(input[5 * istride]); + tmp40 = c_re(input[21 * istride]); + tmp41 = tmp39 + tmp40; + tmp127 = tmp39 - tmp40; + tmp128 = c_im(input[5 * istride]); + tmp129 = c_im(input[21 * istride]); + tmp130 = tmp128 - tmp129; + tmp282 = tmp128 + tmp129; + } + { + fftw_real tmp42; + fftw_real tmp43; + fftw_real tmp133; + fftw_real tmp134; + ASSERT_ALIGNED_DOUBLE; + tmp42 = c_re(input[29 * istride]); + tmp43 = c_re(input[13 * istride]); + tmp44 = tmp42 + tmp43; + tmp132 = tmp42 - tmp43; + tmp133 = c_im(input[29 * istride]); + tmp134 = c_im(input[13 * istride]); + tmp135 = tmp133 - tmp134; + tmp283 = tmp133 + tmp134; + } + { + fftw_real tmp327; + fftw_real tmp328; + fftw_real tmp324; + fftw_real tmp325; + ASSERT_ALIGNED_DOUBLE; + tmp126 = tmp122 - tmp125; + tmp229 = tmp122 + tmp125; + tmp38 = tmp34 + tmp37; + tmp45 = tmp41 + tmp44; + tmp278 = tmp38 - tmp45; + tmp327 = tmp34 - tmp37; + tmp328 = tmp283 - tmp282; + tmp329 = tmp327 - tmp328; + tmp357 = tmp327 + tmp328; + tmp281 = tmp279 + tmp280; + tmp284 = tmp282 + tmp283; + tmp285 = tmp281 - tmp284; + tmp143 = tmp139 + tmp142; + tmp226 = tmp142 - tmp139; + tmp324 = tmp279 - tmp280; + tmp325 = tmp41 - tmp44; + tmp326 = tmp324 - tmp325; + tmp356 = tmp325 + tmp324; + { + fftw_real tmp131; + fftw_real tmp136; + fftw_real tmp144; + fftw_real tmp145; + ASSERT_ALIGNED_DOUBLE; + tmp131 = tmp127 - tmp130; + tmp136 = tmp132 + tmp135; + tmp137 = K707106781 * (tmp131 + tmp136); + tmp227 = K707106781 * (tmp131 - tmp136); + tmp144 = tmp127 + tmp130; + tmp145 = tmp135 - tmp132; + tmp146 = K707106781 * (tmp144 + tmp145); + tmp230 = K707106781 * (tmp145 - tmp144); + } + } + } + { + fftw_real tmp277; + fftw_real tmp301; + fftw_real tmp304; + fftw_real tmp306; + fftw_real tmp296; + fftw_real tmp300; + fftw_real tmp299; + fftw_real tmp305; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp275; + fftw_real tmp276; + fftw_real tmp302; + fftw_real tmp303; + ASSERT_ALIGNED_DOUBLE; + tmp275 = tmp70 - tmp77; + tmp276 = tmp22 - tmp29; + tmp277 = tmp275 - tmp276; + tmp301 = tmp276 + tmp275; + tmp302 = tmp278 + tmp285; + tmp303 = tmp294 - tmp287; + tmp304 = K707106781 * (tmp302 + tmp303); + tmp306 = K707106781 * (tmp303 - tmp302); + } + { + fftw_real tmp286; + fftw_real tmp295; + fftw_real tmp297; + fftw_real tmp298; + ASSERT_ALIGNED_DOUBLE; + tmp286 = tmp278 - tmp285; + tmp295 = tmp287 + tmp294; + tmp296 = K707106781 * (tmp286 - tmp295); + tmp300 = K707106781 * (tmp286 + tmp295); + tmp297 = tmp7 - tmp14; + tmp298 = tmp92 - tmp85; + tmp299 = tmp297 + tmp298; + tmp305 = tmp297 - tmp298; + } + c_im(output[28 * ostride]) = tmp277 - tmp296; + c_im(output[12 * ostride]) = tmp277 + tmp296; + c_re(output[20 * ostride]) = tmp299 - tmp300; + c_re(output[4 * ostride]) = tmp299 + tmp300; + c_im(output[20 * ostride]) = tmp301 - tmp304; + c_im(output[4 * ostride]) = tmp301 + tmp304; + c_re(output[28 * ostride]) = tmp305 - tmp306; + c_re(output[12 * ostride]) = tmp305 + tmp306; + } + { + fftw_real tmp31; + fftw_real tmp311; + fftw_real tmp310; + fftw_real tmp312; + fftw_real tmp62; + fftw_real tmp63; + fftw_real tmp94; + fftw_real tmp307; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp15; + fftw_real tmp30; + fftw_real tmp308; + fftw_real tmp309; + ASSERT_ALIGNED_DOUBLE; + tmp15 = tmp7 + tmp14; + tmp30 = tmp22 + tmp29; + tmp31 = tmp15 + tmp30; + tmp311 = tmp15 - tmp30; + tmp308 = tmp281 + tmp284; + tmp309 = tmp290 + tmp293; + tmp310 = tmp308 + tmp309; + tmp312 = tmp309 - tmp308; + } + { + fftw_real tmp46; + fftw_real tmp61; + fftw_real tmp78; + fftw_real tmp93; + ASSERT_ALIGNED_DOUBLE; + tmp46 = tmp38 + tmp45; + tmp61 = tmp53 + tmp60; + tmp62 = tmp46 + tmp61; + tmp63 = tmp46 - tmp61; + tmp78 = tmp70 + tmp77; + tmp93 = tmp85 + tmp92; + tmp94 = tmp78 - tmp93; + tmp307 = tmp78 + tmp93; + } + c_re(output[16 * ostride]) = tmp31 - tmp62; + c_re(output[0]) = tmp31 + tmp62; + c_im(output[8 * ostride]) = tmp63 + tmp94; + c_im(output[24 * ostride]) = tmp94 - tmp63; + c_im(output[16 * ostride]) = tmp307 - tmp310; + c_im(output[0]) = tmp307 + tmp310; + c_re(output[24 * ostride]) = tmp311 - tmp312; + c_re(output[8 * ostride]) = tmp311 + tmp312; + } + { + fftw_real tmp121; + fftw_real tmp189; + fftw_real tmp187; + fftw_real tmp193; + fftw_real tmp148; + fftw_real tmp190; + fftw_real tmp175; + fftw_real tmp191; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp105; + fftw_real tmp120; + fftw_real tmp183; + fftw_real tmp186; + ASSERT_ALIGNED_DOUBLE; + tmp105 = tmp97 - tmp104; + tmp120 = tmp112 - tmp119; + tmp121 = tmp105 - tmp120; + tmp189 = tmp105 + tmp120; + tmp183 = tmp179 - tmp182; + tmp186 = tmp184 - tmp185; + tmp187 = tmp183 + tmp186; + tmp193 = tmp183 - tmp186; + } + { + fftw_real tmp138; + fftw_real tmp147; + fftw_real tmp165; + fftw_real tmp174; + ASSERT_ALIGNED_DOUBLE; + tmp138 = tmp126 - tmp137; + tmp147 = tmp143 - tmp146; + tmp148 = (K555570233 * tmp138) - (K831469612 * tmp147); + tmp190 = (K831469612 * tmp138) + (K555570233 * tmp147); + tmp165 = tmp153 - tmp164; + tmp174 = tmp170 - tmp173; + tmp175 = (K555570233 * tmp165) + (K831469612 * tmp174); + tmp191 = (K555570233 * tmp174) - (K831469612 * tmp165); + } + { + fftw_real tmp176; + fftw_real tmp188; + fftw_real tmp192; + fftw_real tmp194; + ASSERT_ALIGNED_DOUBLE; + tmp176 = tmp148 - tmp175; + c_im(output[29 * ostride]) = tmp121 - tmp176; + c_im(output[13 * ostride]) = tmp121 + tmp176; + tmp188 = tmp148 + tmp175; + c_re(output[21 * ostride]) = tmp187 - tmp188; + c_re(output[5 * ostride]) = tmp187 + tmp188; + tmp192 = tmp190 + tmp191; + c_im(output[21 * ostride]) = tmp189 - tmp192; + c_im(output[5 * ostride]) = tmp189 + tmp192; + tmp194 = tmp191 - tmp190; + c_re(output[29 * ostride]) = tmp193 - tmp194; + c_re(output[13 * ostride]) = tmp193 + tmp194; + } + } + { + fftw_real tmp197; + fftw_real tmp209; + fftw_real tmp207; + fftw_real tmp213; + fftw_real tmp200; + fftw_real tmp210; + fftw_real tmp203; + fftw_real tmp211; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp195; + fftw_real tmp196; + fftw_real tmp205; + fftw_real tmp206; + ASSERT_ALIGNED_DOUBLE; + tmp195 = tmp97 + tmp104; + tmp196 = tmp185 + tmp184; + tmp197 = tmp195 - tmp196; + tmp209 = tmp195 + tmp196; + tmp205 = tmp179 + tmp182; + tmp206 = tmp112 + tmp119; + tmp207 = tmp205 + tmp206; + tmp213 = tmp205 - tmp206; + } + { + fftw_real tmp198; + fftw_real tmp199; + fftw_real tmp201; + fftw_real tmp202; + ASSERT_ALIGNED_DOUBLE; + tmp198 = tmp126 + tmp137; + tmp199 = tmp143 + tmp146; + tmp200 = (K980785280 * tmp198) - (K195090322 * tmp199); + tmp210 = (K195090322 * tmp198) + (K980785280 * tmp199); + tmp201 = tmp153 + tmp164; + tmp202 = tmp170 + tmp173; + tmp203 = (K980785280 * tmp201) + (K195090322 * tmp202); + tmp211 = (K980785280 * tmp202) - (K195090322 * tmp201); + } + { + fftw_real tmp204; + fftw_real tmp208; + fftw_real tmp212; + fftw_real tmp214; + ASSERT_ALIGNED_DOUBLE; + tmp204 = tmp200 - tmp203; + c_im(output[25 * ostride]) = tmp197 - tmp204; + c_im(output[9 * ostride]) = tmp197 + tmp204; + tmp208 = tmp200 + tmp203; + c_re(output[17 * ostride]) = tmp207 - tmp208; + c_re(output[ostride]) = tmp207 + tmp208; + tmp212 = tmp210 + tmp211; + c_im(output[17 * ostride]) = tmp209 - tmp212; + c_im(output[ostride]) = tmp209 + tmp212; + tmp214 = tmp211 - tmp210; + c_re(output[25 * ostride]) = tmp213 - tmp214; + c_re(output[9 * ostride]) = tmp213 + tmp214; + } + } + { + fftw_real tmp323; + fftw_real tmp347; + fftw_real tmp350; + fftw_real tmp352; + fftw_real tmp338; + fftw_real tmp346; + fftw_real tmp345; + fftw_real tmp351; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp315; + fftw_real tmp322; + fftw_real tmp348; + fftw_real tmp349; + ASSERT_ALIGNED_DOUBLE; + tmp315 = tmp313 - tmp314; + tmp322 = K707106781 * (tmp318 - tmp321); + tmp323 = tmp315 + tmp322; + tmp347 = tmp315 - tmp322; + tmp348 = (K382683432 * tmp329) - (K923879532 * tmp326); + tmp349 = (K923879532 * tmp333) + (K382683432 * tmp336); + tmp350 = tmp348 - tmp349; + tmp352 = tmp348 + tmp349; + } + { + fftw_real tmp330; + fftw_real tmp337; + fftw_real tmp341; + fftw_real tmp344; + ASSERT_ALIGNED_DOUBLE; + tmp330 = (K382683432 * tmp326) + (K923879532 * tmp329); + tmp337 = (K382683432 * tmp333) - (K923879532 * tmp336); + tmp338 = tmp330 + tmp337; + tmp346 = tmp337 - tmp330; + tmp341 = tmp339 - tmp340; + tmp344 = K707106781 * (tmp342 - tmp343); + tmp345 = tmp341 - tmp344; + tmp351 = tmp341 + tmp344; + } + c_im(output[22 * ostride]) = tmp323 - tmp338; + c_im(output[6 * ostride]) = tmp323 + tmp338; + c_re(output[30 * ostride]) = tmp345 - tmp346; + c_re(output[14 * ostride]) = tmp345 + tmp346; + c_im(output[30 * ostride]) = tmp347 - tmp350; + c_im(output[14 * ostride]) = tmp347 + tmp350; + c_re(output[22 * ostride]) = tmp351 - tmp352; + c_re(output[6 * ostride]) = tmp351 + tmp352; + } + { + fftw_real tmp355; + fftw_real tmp367; + fftw_real tmp370; + fftw_real tmp372; + fftw_real tmp362; + fftw_real tmp366; + fftw_real tmp365; + fftw_real tmp371; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp353; + fftw_real tmp354; + fftw_real tmp368; + fftw_real tmp369; + ASSERT_ALIGNED_DOUBLE; + tmp353 = tmp314 + tmp313; + tmp354 = K707106781 * (tmp343 + tmp342); + tmp355 = tmp353 + tmp354; + tmp367 = tmp353 - tmp354; + tmp368 = (K923879532 * tmp357) - (K382683432 * tmp356); + tmp369 = (K382683432 * tmp359) + (K923879532 * tmp360); + tmp370 = tmp368 - tmp369; + tmp372 = tmp368 + tmp369; + } + { + fftw_real tmp358; + fftw_real tmp361; + fftw_real tmp363; + fftw_real tmp364; + ASSERT_ALIGNED_DOUBLE; + tmp358 = (K923879532 * tmp356) + (K382683432 * tmp357); + tmp361 = (K923879532 * tmp359) - (K382683432 * tmp360); + tmp362 = tmp358 + tmp361; + tmp366 = tmp361 - tmp358; + tmp363 = tmp339 + tmp340; + tmp364 = K707106781 * (tmp318 + tmp321); + tmp365 = tmp363 - tmp364; + tmp371 = tmp363 + tmp364; + } + c_im(output[18 * ostride]) = tmp355 - tmp362; + c_im(output[2 * ostride]) = tmp355 + tmp362; + c_re(output[26 * ostride]) = tmp365 - tmp366; + c_re(output[10 * ostride]) = tmp365 + tmp366; + c_im(output[26 * ostride]) = tmp367 - tmp370; + c_im(output[10 * ostride]) = tmp367 + tmp370; + c_re(output[18 * ostride]) = tmp371 - tmp372; + c_re(output[2 * ostride]) = tmp371 + tmp372; + } + { + fftw_real tmp225; + fftw_real tmp249; + fftw_real tmp247; + fftw_real tmp253; + fftw_real tmp232; + fftw_real tmp250; + fftw_real tmp239; + fftw_real tmp251; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp217; + fftw_real tmp224; + fftw_real tmp243; + fftw_real tmp246; + ASSERT_ALIGNED_DOUBLE; + tmp217 = tmp215 - tmp216; + tmp224 = tmp220 - tmp223; + tmp225 = tmp217 + tmp224; + tmp249 = tmp217 - tmp224; + tmp243 = tmp241 - tmp242; + tmp246 = tmp244 - tmp245; + tmp247 = tmp243 - tmp246; + tmp253 = tmp243 + tmp246; + } + { + fftw_real tmp228; + fftw_real tmp231; + fftw_real tmp235; + fftw_real tmp238; + ASSERT_ALIGNED_DOUBLE; + tmp228 = tmp226 - tmp227; + tmp231 = tmp229 - tmp230; + tmp232 = (K195090322 * tmp228) + (K980785280 * tmp231); + tmp250 = (K195090322 * tmp231) - (K980785280 * tmp228); + tmp235 = tmp233 - tmp234; + tmp238 = tmp236 - tmp237; + tmp239 = (K195090322 * tmp235) - (K980785280 * tmp238); + tmp251 = (K980785280 * tmp235) + (K195090322 * tmp238); + } + { + fftw_real tmp240; + fftw_real tmp248; + fftw_real tmp252; + fftw_real tmp254; + ASSERT_ALIGNED_DOUBLE; + tmp240 = tmp232 + tmp239; + c_im(output[23 * ostride]) = tmp225 - tmp240; + c_im(output[7 * ostride]) = tmp225 + tmp240; + tmp248 = tmp239 - tmp232; + c_re(output[31 * ostride]) = tmp247 - tmp248; + c_re(output[15 * ostride]) = tmp247 + tmp248; + tmp252 = tmp250 - tmp251; + c_im(output[31 * ostride]) = tmp249 - tmp252; + c_im(output[15 * ostride]) = tmp249 + tmp252; + tmp254 = tmp250 + tmp251; + c_re(output[23 * ostride]) = tmp253 - tmp254; + c_re(output[7 * ostride]) = tmp253 + tmp254; + } + } + { + fftw_real tmp257; + fftw_real tmp269; + fftw_real tmp267; + fftw_real tmp273; + fftw_real tmp260; + fftw_real tmp270; + fftw_real tmp263; + fftw_real tmp271; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp255; + fftw_real tmp256; + fftw_real tmp265; + fftw_real tmp266; + ASSERT_ALIGNED_DOUBLE; + tmp255 = tmp215 + tmp216; + tmp256 = tmp245 + tmp244; + tmp257 = tmp255 + tmp256; + tmp269 = tmp255 - tmp256; + tmp265 = tmp241 + tmp242; + tmp266 = tmp220 + tmp223; + tmp267 = tmp265 - tmp266; + tmp273 = tmp265 + tmp266; + } + { + fftw_real tmp258; + fftw_real tmp259; + fftw_real tmp261; + fftw_real tmp262; + ASSERT_ALIGNED_DOUBLE; + tmp258 = tmp226 + tmp227; + tmp259 = tmp229 + tmp230; + tmp260 = (K831469612 * tmp258) + (K555570233 * tmp259); + tmp270 = (K831469612 * tmp259) - (K555570233 * tmp258); + tmp261 = tmp233 + tmp234; + tmp262 = tmp236 + tmp237; + tmp263 = (K831469612 * tmp261) - (K555570233 * tmp262); + tmp271 = (K555570233 * tmp261) + (K831469612 * tmp262); + } + { + fftw_real tmp264; + fftw_real tmp268; + fftw_real tmp272; + fftw_real tmp274; + ASSERT_ALIGNED_DOUBLE; + tmp264 = tmp260 + tmp263; + c_im(output[19 * ostride]) = tmp257 - tmp264; + c_im(output[3 * ostride]) = tmp257 + tmp264; + tmp268 = tmp263 - tmp260; + c_re(output[27 * ostride]) = tmp267 - tmp268; + c_re(output[11 * ostride]) = tmp267 + tmp268; + tmp272 = tmp270 - tmp271; + c_im(output[27 * ostride]) = tmp269 - tmp272; + c_im(output[11 * ostride]) = tmp269 + tmp272; + tmp274 = tmp270 + tmp271; + c_re(output[19 * ostride]) = tmp273 - tmp274; + c_re(output[3 * ostride]) = tmp273 + tmp274; + } + } +} + +fftw_codelet_desc fftwi_no_twiddle_32_desc = +{ + "fftwi_no_twiddle_32", + (void (*)()) fftwi_no_twiddle_32, + 32, + FFTW_BACKWARD, + FFTW_NOTW, + 716, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fni_4.c b/src/sndobj/rfftw/fni_4.c new file mode 100644 index 0000000..778ea5b --- /dev/null +++ b/src/sndobj/rfftw/fni_4.c @@ -0,0 +1,102 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:03 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddleinv 4 */ + +/* + * This function contains 16 FP additions, 0 FP multiplications, + * (or, 16 additions, 0 multiplications, 0 fused multiply/add), + * 12 stack variables, and 16 memory accesses + */ + +/* + * Generator Id's : + * $Id: fni_4.c,v 1.1.1.1 2006/05/12 15:14:55 veplaini Exp $ + * $Id: fni_4.c,v 1.1.1.1 2006/05/12 15:14:55 veplaini Exp $ + * $Id: fni_4.c,v 1.1.1.1 2006/05/12 15:14:55 veplaini Exp $ + */ + +void fftwi_no_twiddle_4(const fftw_complex *input, fftw_complex *output, int istride, int ostride) +{ + fftw_real tmp3; + fftw_real tmp11; + fftw_real tmp10; + fftw_real tmp15; + fftw_real tmp6; + fftw_real tmp7; + fftw_real tmp14; + fftw_real tmp16; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp8; + fftw_real tmp9; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(input[0]); + tmp2 = c_re(input[2 * istride]); + tmp3 = tmp1 + tmp2; + tmp11 = tmp1 - tmp2; + tmp8 = c_im(input[0]); + tmp9 = c_im(input[2 * istride]); + tmp10 = tmp8 - tmp9; + tmp15 = tmp8 + tmp9; + } + { + fftw_real tmp4; + fftw_real tmp5; + fftw_real tmp12; + fftw_real tmp13; + ASSERT_ALIGNED_DOUBLE; + tmp4 = c_re(input[istride]); + tmp5 = c_re(input[3 * istride]); + tmp6 = tmp4 + tmp5; + tmp7 = tmp4 - tmp5; + tmp12 = c_im(input[istride]); + tmp13 = c_im(input[3 * istride]); + tmp14 = tmp12 - tmp13; + tmp16 = tmp12 + tmp13; + } + c_re(output[2 * ostride]) = tmp3 - tmp6; + c_re(output[0]) = tmp3 + tmp6; + c_im(output[ostride]) = tmp7 + tmp10; + c_im(output[3 * ostride]) = tmp10 - tmp7; + c_re(output[ostride]) = tmp11 - tmp14; + c_re(output[3 * ostride]) = tmp11 + tmp14; + c_im(output[2 * ostride]) = tmp15 - tmp16; + c_im(output[0]) = tmp15 + tmp16; +} + +fftw_codelet_desc fftwi_no_twiddle_4_desc = +{ + "fftwi_no_twiddle_4", + (void (*)()) fftwi_no_twiddle_4, + 4, + FFTW_BACKWARD, + FFTW_NOTW, + 100, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fni_5.c b/src/sndobj/rfftw/fni_5.c new file mode 100644 index 0000000..adcad0c --- /dev/null +++ b/src/sndobj/rfftw/fni_5.c @@ -0,0 +1,146 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:04 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddleinv 5 */ + +/* + * This function contains 32 FP additions, 12 FP multiplications, + * (or, 26 additions, 6 multiplications, 6 fused multiply/add), + * 16 stack variables, and 20 memory accesses + */ +static const fftw_real K250000000 = FFTW_KONST(+0.250000000000000000000000000000000000000000000); +static const fftw_real K951056516 = FFTW_KONST(+0.951056516295153572116439333379382143405698634); +static const fftw_real K587785252 = FFTW_KONST(+0.587785252292473129168705954639072768597652438); +static const fftw_real K559016994 = FFTW_KONST(+0.559016994374947424102293417182819058860154590); + +/* + * Generator Id's : + * $Id: fni_5.c,v 1.1.1.1 2006/05/12 15:14:45 veplaini Exp $ + * $Id: fni_5.c,v 1.1.1.1 2006/05/12 15:14:45 veplaini Exp $ + * $Id: fni_5.c,v 1.1.1.1 2006/05/12 15:14:45 veplaini Exp $ + */ + +void fftwi_no_twiddle_5(const fftw_complex *input, fftw_complex *output, int istride, int ostride) +{ + fftw_real tmp1; + fftw_real tmp27; + fftw_real tmp8; + fftw_real tmp10; + fftw_real tmp21; + fftw_real tmp22; + fftw_real tmp14; + fftw_real tmp28; + fftw_real tmp26; + fftw_real tmp17; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(input[0]); + tmp27 = c_im(input[0]); + { + fftw_real tmp2; + fftw_real tmp3; + fftw_real tmp4; + fftw_real tmp5; + fftw_real tmp6; + fftw_real tmp7; + ASSERT_ALIGNED_DOUBLE; + tmp2 = c_re(input[istride]); + tmp3 = c_re(input[4 * istride]); + tmp4 = tmp2 + tmp3; + tmp5 = c_re(input[2 * istride]); + tmp6 = c_re(input[3 * istride]); + tmp7 = tmp5 + tmp6; + tmp8 = tmp4 + tmp7; + tmp10 = K559016994 * (tmp4 - tmp7); + tmp21 = tmp2 - tmp3; + tmp22 = tmp5 - tmp6; + } + { + fftw_real tmp12; + fftw_real tmp13; + fftw_real tmp24; + fftw_real tmp15; + fftw_real tmp16; + fftw_real tmp25; + ASSERT_ALIGNED_DOUBLE; + tmp12 = c_im(input[istride]); + tmp13 = c_im(input[4 * istride]); + tmp24 = tmp12 + tmp13; + tmp15 = c_im(input[2 * istride]); + tmp16 = c_im(input[3 * istride]); + tmp25 = tmp15 + tmp16; + tmp14 = tmp12 - tmp13; + tmp28 = tmp24 + tmp25; + tmp26 = K559016994 * (tmp24 - tmp25); + tmp17 = tmp15 - tmp16; + } + c_re(output[0]) = tmp1 + tmp8; + { + fftw_real tmp18; + fftw_real tmp20; + fftw_real tmp11; + fftw_real tmp19; + fftw_real tmp9; + ASSERT_ALIGNED_DOUBLE; + tmp18 = (K587785252 * tmp14) - (K951056516 * tmp17); + tmp20 = (K951056516 * tmp14) + (K587785252 * tmp17); + tmp9 = tmp1 - (K250000000 * tmp8); + tmp11 = tmp9 - tmp10; + tmp19 = tmp10 + tmp9; + c_re(output[2 * ostride]) = tmp11 - tmp18; + c_re(output[3 * ostride]) = tmp11 + tmp18; + c_re(output[ostride]) = tmp19 - tmp20; + c_re(output[4 * ostride]) = tmp19 + tmp20; + } + c_im(output[0]) = tmp27 + tmp28; + { + fftw_real tmp23; + fftw_real tmp31; + fftw_real tmp30; + fftw_real tmp32; + fftw_real tmp29; + ASSERT_ALIGNED_DOUBLE; + tmp23 = (K951056516 * tmp21) + (K587785252 * tmp22); + tmp31 = (K587785252 * tmp21) - (K951056516 * tmp22); + tmp29 = tmp27 - (K250000000 * tmp28); + tmp30 = tmp26 + tmp29; + tmp32 = tmp29 - tmp26; + c_im(output[ostride]) = tmp23 + tmp30; + c_im(output[4 * ostride]) = tmp30 - tmp23; + c_im(output[2 * ostride]) = tmp31 + tmp32; + c_im(output[3 * ostride]) = tmp32 - tmp31; + } +} + +fftw_codelet_desc fftwi_no_twiddle_5_desc = +{ + "fftwi_no_twiddle_5", + (void (*)()) fftwi_no_twiddle_5, + 5, + FFTW_BACKWARD, + FFTW_NOTW, + 122, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fni_6.c b/src/sndobj/rfftw/fni_6.c new file mode 100644 index 0000000..1e01cae --- /dev/null +++ b/src/sndobj/rfftw/fni_6.c @@ -0,0 +1,157 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:04 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddleinv 6 */ + +/* + * This function contains 36 FP additions, 8 FP multiplications, + * (or, 32 additions, 4 multiplications, 4 fused multiply/add), + * 20 stack variables, and 24 memory accesses + */ +static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); +static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); + +/* + * Generator Id's : + * $Id: fni_6.c,v 1.1.1.1 2006/05/12 15:15:00 veplaini Exp $ + * $Id: fni_6.c,v 1.1.1.1 2006/05/12 15:15:00 veplaini Exp $ + * $Id: fni_6.c,v 1.1.1.1 2006/05/12 15:15:00 veplaini Exp $ + */ + +void fftwi_no_twiddle_6(const fftw_complex *input, fftw_complex *output, int istride, int ostride) +{ + fftw_real tmp3; + fftw_real tmp11; + fftw_real tmp26; + fftw_real tmp29; + fftw_real tmp6; + fftw_real tmp12; + fftw_real tmp9; + fftw_real tmp13; + fftw_real tmp10; + fftw_real tmp14; + fftw_real tmp18; + fftw_real tmp31; + fftw_real tmp21; + fftw_real tmp30; + fftw_real tmp27; + fftw_real tmp32; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp24; + fftw_real tmp25; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(input[0]); + tmp2 = c_re(input[3 * istride]); + tmp3 = tmp1 - tmp2; + tmp11 = tmp1 + tmp2; + tmp24 = c_im(input[0]); + tmp25 = c_im(input[3 * istride]); + tmp26 = tmp24 - tmp25; + tmp29 = tmp24 + tmp25; + } + { + fftw_real tmp4; + fftw_real tmp5; + fftw_real tmp7; + fftw_real tmp8; + ASSERT_ALIGNED_DOUBLE; + tmp4 = c_re(input[2 * istride]); + tmp5 = c_re(input[5 * istride]); + tmp6 = tmp4 - tmp5; + tmp12 = tmp4 + tmp5; + tmp7 = c_re(input[4 * istride]); + tmp8 = c_re(input[istride]); + tmp9 = tmp7 - tmp8; + tmp13 = tmp7 + tmp8; + } + tmp10 = tmp6 + tmp9; + tmp14 = tmp12 + tmp13; + { + fftw_real tmp16; + fftw_real tmp17; + fftw_real tmp19; + fftw_real tmp20; + ASSERT_ALIGNED_DOUBLE; + tmp16 = c_im(input[4 * istride]); + tmp17 = c_im(input[istride]); + tmp18 = tmp16 - tmp17; + tmp31 = tmp16 + tmp17; + tmp19 = c_im(input[2 * istride]); + tmp20 = c_im(input[5 * istride]); + tmp21 = tmp19 - tmp20; + tmp30 = tmp19 + tmp20; + } + tmp27 = tmp21 + tmp18; + tmp32 = tmp30 + tmp31; + { + fftw_real tmp15; + fftw_real tmp22; + fftw_real tmp35; + fftw_real tmp36; + ASSERT_ALIGNED_DOUBLE; + c_re(output[3 * ostride]) = tmp3 + tmp10; + tmp15 = tmp3 - (K500000000 * tmp10); + tmp22 = K866025403 * (tmp18 - tmp21); + c_re(output[5 * ostride]) = tmp15 - tmp22; + c_re(output[ostride]) = tmp15 + tmp22; + c_re(output[0]) = tmp11 + tmp14; + tmp35 = tmp11 - (K500000000 * tmp14); + tmp36 = K866025403 * (tmp31 - tmp30); + c_re(output[2 * ostride]) = tmp35 - tmp36; + c_re(output[4 * ostride]) = tmp35 + tmp36; + } + { + fftw_real tmp23; + fftw_real tmp28; + fftw_real tmp33; + fftw_real tmp34; + ASSERT_ALIGNED_DOUBLE; + c_im(output[3 * ostride]) = tmp26 + tmp27; + tmp23 = K866025403 * (tmp6 - tmp9); + tmp28 = tmp26 - (K500000000 * tmp27); + c_im(output[ostride]) = tmp23 + tmp28; + c_im(output[5 * ostride]) = tmp28 - tmp23; + c_im(output[0]) = tmp29 + tmp32; + tmp33 = tmp29 - (K500000000 * tmp32); + tmp34 = K866025403 * (tmp12 - tmp13); + c_im(output[2 * ostride]) = tmp33 - tmp34; + c_im(output[4 * ostride]) = tmp34 + tmp33; + } +} + +fftw_codelet_desc fftwi_no_twiddle_6_desc = +{ + "fftwi_no_twiddle_6", + (void (*)()) fftwi_no_twiddle_6, + 6, + FFTW_BACKWARD, + FFTW_NOTW, + 144, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fni_64.c b/src/sndobj/rfftw/fni_64.c new file mode 100644 index 0000000..2dd3376 --- /dev/null +++ b/src/sndobj/rfftw/fni_64.c @@ -0,0 +1,2449 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:17 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddleinv 64 */ + +/* + * This function contains 912 FP additions, 248 FP multiplications, + * (or, 808 additions, 144 multiplications, 104 fused multiply/add), + * 156 stack variables, and 256 memory accesses + */ +static const fftw_real K195090322 = FFTW_KONST(+0.195090322016128267848284868477022240927691618); +static const fftw_real K980785280 = FFTW_KONST(+0.980785280403230449126182236134239036973933731); +static const fftw_real K773010453 = FFTW_KONST(+0.773010453362736960810906609758469800971041293); +static const fftw_real K634393284 = FFTW_KONST(+0.634393284163645498215171613225493370675687095); +static const fftw_real K098017140 = FFTW_KONST(+0.098017140329560601994195563888641845861136673); +static const fftw_real K995184726 = FFTW_KONST(+0.995184726672196886244836953109479921575474869); +static const fftw_real K831469612 = FFTW_KONST(+0.831469612302545237078788377617905756738560812); +static const fftw_real K555570233 = FFTW_KONST(+0.555570233019602224742830813948532874374937191); +static const fftw_real K956940335 = FFTW_KONST(+0.956940335732208864935797886980269969482849206); +static const fftw_real K290284677 = FFTW_KONST(+0.290284677254462367636192375817395274691476278); +static const fftw_real K471396736 = FFTW_KONST(+0.471396736825997648556387625905254377657460319); +static const fftw_real K881921264 = FFTW_KONST(+0.881921264348355029712756863660388349508442621); +static const fftw_real K382683432 = FFTW_KONST(+0.382683432365089771728459984030398866761344562); +static const fftw_real K923879532 = FFTW_KONST(+0.923879532511286756128183189396788286822416626); +static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); + +/* + * Generator Id's : + * $Id: fni_64.c,v 1.1.1.1 2006/05/12 15:14:53 veplaini Exp $ + * $Id: fni_64.c,v 1.1.1.1 2006/05/12 15:14:53 veplaini Exp $ + * $Id: fni_64.c,v 1.1.1.1 2006/05/12 15:14:53 veplaini Exp $ + */ + +void fftwi_no_twiddle_64(const fftw_complex *input, fftw_complex *output, int istride, int ostride) +{ + fftw_real tmp193; + fftw_real tmp471; + fftw_real tmp15; + fftw_real tmp879; + fftw_real tmp719; + fftw_real tmp781; + fftw_real tmp142; + fftw_real tmp853; + fftw_real tmp371; + fftw_real tmp537; + fftw_real tmp637; + fftw_real tmp755; + fftw_real tmp200; + fftw_real tmp538; + fftw_real tmp374; + fftw_real tmp472; + fftw_real tmp109; + fftw_real tmp874; + fftw_real tmp693; + fftw_real tmp776; + fftw_real tmp830; + fftw_real tmp871; + fftw_real tmp710; + fftw_real tmp773; + fftw_real tmp329; + fftw_real tmp432; + fftw_real tmp519; + fftw_real tmp596; + fftw_real tmp362; + fftw_real tmp429; + fftw_real tmp530; + fftw_real tmp593; + fftw_real tmp30; + fftw_real tmp854; + fftw_real tmp640; + fftw_real tmp720; + fftw_real tmp157; + fftw_real tmp880; + fftw_real tmp643; + fftw_real tmp721; + fftw_real tmp208; + fftw_real tmp377; + fftw_real tmp476; + fftw_real tmp541; + fftw_real tmp215; + fftw_real tmp376; + fftw_real tmp479; + fftw_real tmp540; + fftw_real tmp124; + fftw_real tmp872; + fftw_real tmp365; + fftw_real tmp433; + fftw_real tmp352; + fftw_real tmp430; + fftw_real tmp833; + fftw_real tmp875; + fftw_real tmp526; + fftw_real tmp594; + fftw_real tmp533; + fftw_real tmp597; + fftw_real tmp704; + fftw_real tmp774; + fftw_real tmp713; + fftw_real tmp777; + fftw_real tmp46; + fftw_real tmp856; + fftw_real tmp648; + fftw_real tmp758; + fftw_real tmp173; + fftw_real tmp857; + fftw_real tmp651; + fftw_real tmp759; + fftw_real tmp228; + fftw_real tmp414; + fftw_real tmp484; + fftw_real tmp578; + fftw_real tmp235; + fftw_real tmp415; + fftw_real tmp487; + fftw_real tmp579; + fftw_real tmp78; + fftw_real tmp867; + fftw_real tmp666; + fftw_real tmp769; + fftw_real tmp821; + fftw_real tmp864; + fftw_real tmp683; + fftw_real tmp766; + fftw_real tmp274; + fftw_real tmp425; + fftw_real tmp500; + fftw_real tmp589; + fftw_real tmp307; + fftw_real tmp422; + fftw_real tmp511; + fftw_real tmp586; + fftw_real tmp61; + fftw_real tmp859; + fftw_real tmp655; + fftw_real tmp761; + fftw_real tmp188; + fftw_real tmp860; + fftw_real tmp658; + fftw_real tmp762; + fftw_real tmp247; + fftw_real tmp417; + fftw_real tmp491; + fftw_real tmp581; + fftw_real tmp254; + fftw_real tmp418; + fftw_real tmp494; + fftw_real tmp582; + fftw_real tmp93; + fftw_real tmp865; + fftw_real tmp310; + fftw_real tmp426; + fftw_real tmp297; + fftw_real tmp423; + fftw_real tmp824; + fftw_real tmp868; + fftw_real tmp507; + fftw_real tmp587; + fftw_real tmp514; + fftw_real tmp590; + fftw_real tmp677; + fftw_real tmp767; + fftw_real tmp686; + fftw_real tmp770; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp3; + fftw_real tmp369; + fftw_real tmp130; + fftw_real tmp192; + fftw_real tmp6; + fftw_real tmp191; + fftw_real tmp133; + fftw_real tmp370; + fftw_real tmp10; + fftw_real tmp194; + fftw_real tmp137; + fftw_real tmp195; + fftw_real tmp13; + fftw_real tmp198; + fftw_real tmp140; + fftw_real tmp197; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp128; + fftw_real tmp129; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(input[0]); + tmp2 = c_re(input[32 * istride]); + tmp3 = tmp1 + tmp2; + tmp369 = tmp1 - tmp2; + tmp128 = c_im(input[0]); + tmp129 = c_im(input[32 * istride]); + tmp130 = tmp128 + tmp129; + tmp192 = tmp128 - tmp129; + } + { + fftw_real tmp4; + fftw_real tmp5; + fftw_real tmp131; + fftw_real tmp132; + ASSERT_ALIGNED_DOUBLE; + tmp4 = c_re(input[16 * istride]); + tmp5 = c_re(input[48 * istride]); + tmp6 = tmp4 + tmp5; + tmp191 = tmp4 - tmp5; + tmp131 = c_im(input[16 * istride]); + tmp132 = c_im(input[48 * istride]); + tmp133 = tmp131 + tmp132; + tmp370 = tmp131 - tmp132; + } + { + fftw_real tmp8; + fftw_real tmp9; + fftw_real tmp135; + fftw_real tmp136; + ASSERT_ALIGNED_DOUBLE; + tmp8 = c_re(input[8 * istride]); + tmp9 = c_re(input[40 * istride]); + tmp10 = tmp8 + tmp9; + tmp194 = tmp8 - tmp9; + tmp135 = c_im(input[8 * istride]); + tmp136 = c_im(input[40 * istride]); + tmp137 = tmp135 + tmp136; + tmp195 = tmp135 - tmp136; + } + { + fftw_real tmp11; + fftw_real tmp12; + fftw_real tmp138; + fftw_real tmp139; + ASSERT_ALIGNED_DOUBLE; + tmp11 = c_re(input[56 * istride]); + tmp12 = c_re(input[24 * istride]); + tmp13 = tmp11 + tmp12; + tmp198 = tmp11 - tmp12; + tmp138 = c_im(input[56 * istride]); + tmp139 = c_im(input[24 * istride]); + tmp140 = tmp138 + tmp139; + tmp197 = tmp138 - tmp139; + } + { + fftw_real tmp7; + fftw_real tmp14; + fftw_real tmp635; + fftw_real tmp636; + ASSERT_ALIGNED_DOUBLE; + tmp193 = tmp191 + tmp192; + tmp471 = tmp192 - tmp191; + tmp7 = tmp3 + tmp6; + tmp14 = tmp10 + tmp13; + tmp15 = tmp7 + tmp14; + tmp879 = tmp7 - tmp14; + { + fftw_real tmp717; + fftw_real tmp718; + fftw_real tmp134; + fftw_real tmp141; + ASSERT_ALIGNED_DOUBLE; + tmp717 = tmp3 - tmp6; + tmp718 = tmp140 - tmp137; + tmp719 = tmp717 + tmp718; + tmp781 = tmp717 - tmp718; + tmp134 = tmp130 + tmp133; + tmp141 = tmp137 + tmp140; + tmp142 = tmp134 + tmp141; + tmp853 = tmp134 - tmp141; + } + tmp371 = tmp369 - tmp370; + tmp537 = tmp369 + tmp370; + tmp635 = tmp10 - tmp13; + tmp636 = tmp130 - tmp133; + tmp637 = tmp635 + tmp636; + tmp755 = tmp636 - tmp635; + { + fftw_real tmp196; + fftw_real tmp199; + fftw_real tmp372; + fftw_real tmp373; + ASSERT_ALIGNED_DOUBLE; + tmp196 = tmp194 + tmp195; + tmp199 = tmp197 - tmp198; + tmp200 = K707106781 * (tmp196 + tmp199); + tmp538 = K707106781 * (tmp199 - tmp196); + tmp372 = tmp194 - tmp195; + tmp373 = tmp198 + tmp197; + tmp374 = K707106781 * (tmp372 + tmp373); + tmp472 = K707106781 * (tmp372 - tmp373); + } + } + } + { + fftw_real tmp97; + fftw_real tmp313; + fftw_real tmp357; + fftw_real tmp707; + fftw_real tmp100; + fftw_real tmp354; + fftw_real tmp316; + fftw_real tmp708; + fftw_real tmp107; + fftw_real tmp690; + fftw_real tmp327; + fftw_real tmp360; + fftw_real tmp104; + fftw_real tmp691; + fftw_real tmp322; + fftw_real tmp359; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp95; + fftw_real tmp96; + fftw_real tmp314; + fftw_real tmp315; + ASSERT_ALIGNED_DOUBLE; + tmp95 = c_re(input[63 * istride]); + tmp96 = c_re(input[31 * istride]); + tmp97 = tmp95 + tmp96; + tmp313 = tmp95 - tmp96; + { + fftw_real tmp355; + fftw_real tmp356; + fftw_real tmp98; + fftw_real tmp99; + ASSERT_ALIGNED_DOUBLE; + tmp355 = c_im(input[63 * istride]); + tmp356 = c_im(input[31 * istride]); + tmp357 = tmp355 - tmp356; + tmp707 = tmp355 + tmp356; + tmp98 = c_re(input[15 * istride]); + tmp99 = c_re(input[47 * istride]); + tmp100 = tmp98 + tmp99; + tmp354 = tmp98 - tmp99; + } + tmp314 = c_im(input[15 * istride]); + tmp315 = c_im(input[47 * istride]); + tmp316 = tmp314 - tmp315; + tmp708 = tmp314 + tmp315; + { + fftw_real tmp105; + fftw_real tmp106; + fftw_real tmp323; + fftw_real tmp324; + fftw_real tmp325; + fftw_real tmp326; + ASSERT_ALIGNED_DOUBLE; + tmp105 = c_re(input[55 * istride]); + tmp106 = c_re(input[23 * istride]); + tmp323 = tmp105 - tmp106; + tmp324 = c_im(input[55 * istride]); + tmp325 = c_im(input[23 * istride]); + tmp326 = tmp324 - tmp325; + tmp107 = tmp105 + tmp106; + tmp690 = tmp324 + tmp325; + tmp327 = tmp323 + tmp326; + tmp360 = tmp326 - tmp323; + } + { + fftw_real tmp102; + fftw_real tmp103; + fftw_real tmp318; + fftw_real tmp319; + fftw_real tmp320; + fftw_real tmp321; + ASSERT_ALIGNED_DOUBLE; + tmp102 = c_re(input[7 * istride]); + tmp103 = c_re(input[39 * istride]); + tmp318 = tmp102 - tmp103; + tmp319 = c_im(input[7 * istride]); + tmp320 = c_im(input[39 * istride]); + tmp321 = tmp319 - tmp320; + tmp104 = tmp102 + tmp103; + tmp691 = tmp319 + tmp320; + tmp322 = tmp318 - tmp321; + tmp359 = tmp318 + tmp321; + } + } + { + fftw_real tmp101; + fftw_real tmp108; + fftw_real tmp689; + fftw_real tmp692; + ASSERT_ALIGNED_DOUBLE; + tmp101 = tmp97 + tmp100; + tmp108 = tmp104 + tmp107; + tmp109 = tmp101 + tmp108; + tmp874 = tmp101 - tmp108; + tmp689 = tmp97 - tmp100; + tmp692 = tmp690 - tmp691; + tmp693 = tmp689 + tmp692; + tmp776 = tmp689 - tmp692; + } + { + fftw_real tmp828; + fftw_real tmp829; + fftw_real tmp706; + fftw_real tmp709; + ASSERT_ALIGNED_DOUBLE; + tmp828 = tmp707 + tmp708; + tmp829 = tmp691 + tmp690; + tmp830 = tmp828 + tmp829; + tmp871 = tmp828 - tmp829; + tmp706 = tmp104 - tmp107; + tmp709 = tmp707 - tmp708; + tmp710 = tmp706 + tmp709; + tmp773 = tmp709 - tmp706; + } + { + fftw_real tmp317; + fftw_real tmp328; + fftw_real tmp517; + fftw_real tmp518; + ASSERT_ALIGNED_DOUBLE; + tmp317 = tmp313 - tmp316; + tmp328 = K707106781 * (tmp322 + tmp327); + tmp329 = tmp317 - tmp328; + tmp432 = tmp317 + tmp328; + tmp517 = tmp313 + tmp316; + tmp518 = K707106781 * (tmp360 - tmp359); + tmp519 = tmp517 - tmp518; + tmp596 = tmp517 + tmp518; + } + { + fftw_real tmp358; + fftw_real tmp361; + fftw_real tmp528; + fftw_real tmp529; + ASSERT_ALIGNED_DOUBLE; + tmp358 = tmp354 + tmp357; + tmp361 = K707106781 * (tmp359 + tmp360); + tmp362 = tmp358 - tmp361; + tmp429 = tmp358 + tmp361; + tmp528 = tmp357 - tmp354; + tmp529 = K707106781 * (tmp322 - tmp327); + tmp530 = tmp528 - tmp529; + tmp593 = tmp528 + tmp529; + } + } + { + fftw_real tmp18; + fftw_real tmp202; + fftw_real tmp145; + fftw_real tmp206; + fftw_real tmp21; + fftw_real tmp205; + fftw_real tmp148; + fftw_real tmp203; + fftw_real tmp25; + fftw_real tmp212; + fftw_real tmp152; + fftw_real tmp210; + fftw_real tmp28; + fftw_real tmp209; + fftw_real tmp155; + fftw_real tmp213; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp16; + fftw_real tmp17; + fftw_real tmp143; + fftw_real tmp144; + ASSERT_ALIGNED_DOUBLE; + tmp16 = c_re(input[4 * istride]); + tmp17 = c_re(input[36 * istride]); + tmp18 = tmp16 + tmp17; + tmp202 = tmp16 - tmp17; + tmp143 = c_im(input[4 * istride]); + tmp144 = c_im(input[36 * istride]); + tmp145 = tmp143 + tmp144; + tmp206 = tmp143 - tmp144; + } + { + fftw_real tmp19; + fftw_real tmp20; + fftw_real tmp146; + fftw_real tmp147; + ASSERT_ALIGNED_DOUBLE; + tmp19 = c_re(input[20 * istride]); + tmp20 = c_re(input[52 * istride]); + tmp21 = tmp19 + tmp20; + tmp205 = tmp19 - tmp20; + tmp146 = c_im(input[20 * istride]); + tmp147 = c_im(input[52 * istride]); + tmp148 = tmp146 + tmp147; + tmp203 = tmp146 - tmp147; + } + { + fftw_real tmp23; + fftw_real tmp24; + fftw_real tmp150; + fftw_real tmp151; + ASSERT_ALIGNED_DOUBLE; + tmp23 = c_re(input[60 * istride]); + tmp24 = c_re(input[28 * istride]); + tmp25 = tmp23 + tmp24; + tmp212 = tmp23 - tmp24; + tmp150 = c_im(input[60 * istride]); + tmp151 = c_im(input[28 * istride]); + tmp152 = tmp150 + tmp151; + tmp210 = tmp150 - tmp151; + } + { + fftw_real tmp26; + fftw_real tmp27; + fftw_real tmp153; + fftw_real tmp154; + ASSERT_ALIGNED_DOUBLE; + tmp26 = c_re(input[12 * istride]); + tmp27 = c_re(input[44 * istride]); + tmp28 = tmp26 + tmp27; + tmp209 = tmp26 - tmp27; + tmp153 = c_im(input[12 * istride]); + tmp154 = c_im(input[44 * istride]); + tmp155 = tmp153 + tmp154; + tmp213 = tmp153 - tmp154; + } + { + fftw_real tmp22; + fftw_real tmp29; + fftw_real tmp638; + fftw_real tmp639; + ASSERT_ALIGNED_DOUBLE; + tmp22 = tmp18 + tmp21; + tmp29 = tmp25 + tmp28; + tmp30 = tmp22 + tmp29; + tmp854 = tmp22 - tmp29; + tmp638 = tmp18 - tmp21; + tmp639 = tmp145 - tmp148; + tmp640 = tmp638 + tmp639; + tmp720 = tmp638 - tmp639; + } + { + fftw_real tmp149; + fftw_real tmp156; + fftw_real tmp641; + fftw_real tmp642; + ASSERT_ALIGNED_DOUBLE; + tmp149 = tmp145 + tmp148; + tmp156 = tmp152 + tmp155; + tmp157 = tmp149 + tmp156; + tmp880 = tmp156 - tmp149; + tmp641 = tmp152 - tmp155; + tmp642 = tmp25 - tmp28; + tmp643 = tmp641 - tmp642; + tmp721 = tmp642 + tmp641; + } + { + fftw_real tmp204; + fftw_real tmp207; + fftw_real tmp474; + fftw_real tmp475; + ASSERT_ALIGNED_DOUBLE; + tmp204 = tmp202 - tmp203; + tmp207 = tmp205 + tmp206; + tmp208 = (K923879532 * tmp204) - (K382683432 * tmp207); + tmp377 = (K923879532 * tmp207) + (K382683432 * tmp204); + tmp474 = tmp202 + tmp203; + tmp475 = tmp206 - tmp205; + tmp476 = (K382683432 * tmp474) - (K923879532 * tmp475); + tmp541 = (K382683432 * tmp475) + (K923879532 * tmp474); + } + { + fftw_real tmp211; + fftw_real tmp214; + fftw_real tmp477; + fftw_real tmp478; + ASSERT_ALIGNED_DOUBLE; + tmp211 = tmp209 + tmp210; + tmp214 = tmp212 - tmp213; + tmp215 = (K382683432 * tmp211) + (K923879532 * tmp214); + tmp376 = (K923879532 * tmp211) - (K382683432 * tmp214); + tmp477 = tmp210 - tmp209; + tmp478 = tmp212 + tmp213; + tmp479 = (K923879532 * tmp477) + (K382683432 * tmp478); + tmp540 = (K382683432 * tmp477) - (K923879532 * tmp478); + } + } + { + fftw_real tmp112; + fftw_real tmp695; + fftw_real tmp115; + fftw_real tmp696; + fftw_real tmp345; + fftw_real tmp523; + fftw_real tmp350; + fftw_real tmp524; + fftw_real tmp697; + fftw_real tmp694; + fftw_real tmp119; + fftw_real tmp700; + fftw_real tmp122; + fftw_real tmp701; + fftw_real tmp334; + fftw_real tmp520; + fftw_real tmp339; + fftw_real tmp521; + fftw_real tmp702; + fftw_real tmp699; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp346; + fftw_real tmp344; + fftw_real tmp341; + fftw_real tmp349; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp110; + fftw_real tmp111; + fftw_real tmp342; + fftw_real tmp343; + ASSERT_ALIGNED_DOUBLE; + tmp110 = c_re(input[3 * istride]); + tmp111 = c_re(input[35 * istride]); + tmp112 = tmp110 + tmp111; + tmp346 = tmp110 - tmp111; + tmp342 = c_im(input[3 * istride]); + tmp343 = c_im(input[35 * istride]); + tmp344 = tmp342 - tmp343; + tmp695 = tmp342 + tmp343; + } + { + fftw_real tmp113; + fftw_real tmp114; + fftw_real tmp347; + fftw_real tmp348; + ASSERT_ALIGNED_DOUBLE; + tmp113 = c_re(input[19 * istride]); + tmp114 = c_re(input[51 * istride]); + tmp115 = tmp113 + tmp114; + tmp341 = tmp113 - tmp114; + tmp347 = c_im(input[19 * istride]); + tmp348 = c_im(input[51 * istride]); + tmp349 = tmp347 - tmp348; + tmp696 = tmp347 + tmp348; + } + tmp345 = tmp341 + tmp344; + tmp523 = tmp344 - tmp341; + tmp350 = tmp346 - tmp349; + tmp524 = tmp346 + tmp349; + tmp697 = tmp695 - tmp696; + tmp694 = tmp112 - tmp115; + } + { + fftw_real tmp335; + fftw_real tmp333; + fftw_real tmp330; + fftw_real tmp338; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp117; + fftw_real tmp118; + fftw_real tmp331; + fftw_real tmp332; + ASSERT_ALIGNED_DOUBLE; + tmp117 = c_re(input[59 * istride]); + tmp118 = c_re(input[27 * istride]); + tmp119 = tmp117 + tmp118; + tmp335 = tmp117 - tmp118; + tmp331 = c_im(input[59 * istride]); + tmp332 = c_im(input[27 * istride]); + tmp333 = tmp331 - tmp332; + tmp700 = tmp331 + tmp332; + } + { + fftw_real tmp120; + fftw_real tmp121; + fftw_real tmp336; + fftw_real tmp337; + ASSERT_ALIGNED_DOUBLE; + tmp120 = c_re(input[11 * istride]); + tmp121 = c_re(input[43 * istride]); + tmp122 = tmp120 + tmp121; + tmp330 = tmp120 - tmp121; + tmp336 = c_im(input[11 * istride]); + tmp337 = c_im(input[43 * istride]); + tmp338 = tmp336 - tmp337; + tmp701 = tmp336 + tmp337; + } + tmp334 = tmp330 + tmp333; + tmp520 = tmp333 - tmp330; + tmp339 = tmp335 - tmp338; + tmp521 = tmp335 + tmp338; + tmp702 = tmp700 - tmp701; + tmp699 = tmp119 - tmp122; + } + { + fftw_real tmp116; + fftw_real tmp123; + fftw_real tmp363; + fftw_real tmp364; + ASSERT_ALIGNED_DOUBLE; + tmp116 = tmp112 + tmp115; + tmp123 = tmp119 + tmp122; + tmp124 = tmp116 + tmp123; + tmp872 = tmp116 - tmp123; + tmp363 = (K923879532 * tmp350) - (K382683432 * tmp345); + tmp364 = (K382683432 * tmp334) + (K923879532 * tmp339); + tmp365 = tmp363 - tmp364; + tmp433 = tmp363 + tmp364; + } + { + fftw_real tmp340; + fftw_real tmp351; + fftw_real tmp831; + fftw_real tmp832; + ASSERT_ALIGNED_DOUBLE; + tmp340 = (K923879532 * tmp334) - (K382683432 * tmp339); + tmp351 = (K923879532 * tmp345) + (K382683432 * tmp350); + tmp352 = tmp340 - tmp351; + tmp430 = tmp351 + tmp340; + tmp831 = tmp695 + tmp696; + tmp832 = tmp700 + tmp701; + tmp833 = tmp831 + tmp832; + tmp875 = tmp832 - tmp831; + } + { + fftw_real tmp522; + fftw_real tmp525; + fftw_real tmp531; + fftw_real tmp532; + ASSERT_ALIGNED_DOUBLE; + tmp522 = (K382683432 * tmp520) - (K923879532 * tmp521); + tmp525 = (K382683432 * tmp523) + (K923879532 * tmp524); + tmp526 = tmp522 - tmp525; + tmp594 = tmp525 + tmp522; + tmp531 = (K382683432 * tmp524) - (K923879532 * tmp523); + tmp532 = (K923879532 * tmp520) + (K382683432 * tmp521); + tmp533 = tmp531 - tmp532; + tmp597 = tmp531 + tmp532; + } + { + fftw_real tmp698; + fftw_real tmp703; + fftw_real tmp711; + fftw_real tmp712; + ASSERT_ALIGNED_DOUBLE; + tmp698 = tmp694 - tmp697; + tmp703 = tmp699 + tmp702; + tmp704 = K707106781 * (tmp698 + tmp703); + tmp774 = K707106781 * (tmp698 - tmp703); + tmp711 = tmp694 + tmp697; + tmp712 = tmp702 - tmp699; + tmp713 = K707106781 * (tmp711 + tmp712); + tmp777 = K707106781 * (tmp712 - tmp711); + } + } + { + fftw_real tmp34; + fftw_real tmp218; + fftw_real tmp161; + fftw_real tmp230; + fftw_real tmp37; + fftw_real tmp229; + fftw_real tmp164; + fftw_real tmp219; + fftw_real tmp44; + fftw_real tmp233; + fftw_real tmp226; + fftw_real tmp171; + fftw_real tmp41; + fftw_real tmp232; + fftw_real tmp223; + fftw_real tmp168; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp32; + fftw_real tmp33; + fftw_real tmp162; + fftw_real tmp163; + ASSERT_ALIGNED_DOUBLE; + tmp32 = c_re(input[2 * istride]); + tmp33 = c_re(input[34 * istride]); + tmp34 = tmp32 + tmp33; + tmp218 = tmp32 - tmp33; + { + fftw_real tmp159; + fftw_real tmp160; + fftw_real tmp35; + fftw_real tmp36; + ASSERT_ALIGNED_DOUBLE; + tmp159 = c_im(input[2 * istride]); + tmp160 = c_im(input[34 * istride]); + tmp161 = tmp159 + tmp160; + tmp230 = tmp159 - tmp160; + tmp35 = c_re(input[18 * istride]); + tmp36 = c_re(input[50 * istride]); + tmp37 = tmp35 + tmp36; + tmp229 = tmp35 - tmp36; + } + tmp162 = c_im(input[18 * istride]); + tmp163 = c_im(input[50 * istride]); + tmp164 = tmp162 + tmp163; + tmp219 = tmp162 - tmp163; + { + fftw_real tmp42; + fftw_real tmp43; + fftw_real tmp224; + fftw_real tmp169; + fftw_real tmp170; + fftw_real tmp225; + ASSERT_ALIGNED_DOUBLE; + tmp42 = c_re(input[58 * istride]); + tmp43 = c_re(input[26 * istride]); + tmp224 = tmp42 - tmp43; + tmp169 = c_im(input[58 * istride]); + tmp170 = c_im(input[26 * istride]); + tmp225 = tmp169 - tmp170; + tmp44 = tmp42 + tmp43; + tmp233 = tmp225 - tmp224; + tmp226 = tmp224 + tmp225; + tmp171 = tmp169 + tmp170; + } + { + fftw_real tmp39; + fftw_real tmp40; + fftw_real tmp221; + fftw_real tmp166; + fftw_real tmp167; + fftw_real tmp222; + ASSERT_ALIGNED_DOUBLE; + tmp39 = c_re(input[10 * istride]); + tmp40 = c_re(input[42 * istride]); + tmp221 = tmp39 - tmp40; + tmp166 = c_im(input[10 * istride]); + tmp167 = c_im(input[42 * istride]); + tmp222 = tmp166 - tmp167; + tmp41 = tmp39 + tmp40; + tmp232 = tmp221 + tmp222; + tmp223 = tmp221 - tmp222; + tmp168 = tmp166 + tmp167; + } + } + { + fftw_real tmp38; + fftw_real tmp45; + fftw_real tmp646; + fftw_real tmp647; + ASSERT_ALIGNED_DOUBLE; + tmp38 = tmp34 + tmp37; + tmp45 = tmp41 + tmp44; + tmp46 = tmp38 + tmp45; + tmp856 = tmp38 - tmp45; + tmp646 = tmp34 - tmp37; + tmp647 = tmp171 - tmp168; + tmp648 = tmp646 + tmp647; + tmp758 = tmp646 - tmp647; + } + { + fftw_real tmp165; + fftw_real tmp172; + fftw_real tmp649; + fftw_real tmp650; + ASSERT_ALIGNED_DOUBLE; + tmp165 = tmp161 + tmp164; + tmp172 = tmp168 + tmp171; + tmp173 = tmp165 + tmp172; + tmp857 = tmp165 - tmp172; + tmp649 = tmp41 - tmp44; + tmp650 = tmp161 - tmp164; + tmp651 = tmp649 + tmp650; + tmp759 = tmp650 - tmp649; + } + { + fftw_real tmp220; + fftw_real tmp227; + fftw_real tmp482; + fftw_real tmp483; + ASSERT_ALIGNED_DOUBLE; + tmp220 = tmp218 - tmp219; + tmp227 = K707106781 * (tmp223 + tmp226); + tmp228 = tmp220 - tmp227; + tmp414 = tmp220 + tmp227; + tmp482 = tmp218 + tmp219; + tmp483 = K707106781 * (tmp233 - tmp232); + tmp484 = tmp482 - tmp483; + tmp578 = tmp482 + tmp483; + } + { + fftw_real tmp231; + fftw_real tmp234; + fftw_real tmp485; + fftw_real tmp486; + ASSERT_ALIGNED_DOUBLE; + tmp231 = tmp229 + tmp230; + tmp234 = K707106781 * (tmp232 + tmp233); + tmp235 = tmp231 - tmp234; + tmp415 = tmp231 + tmp234; + tmp485 = tmp230 - tmp229; + tmp486 = K707106781 * (tmp223 - tmp226); + tmp487 = tmp485 - tmp486; + tmp579 = tmp485 + tmp486; + } + } + { + fftw_real tmp66; + fftw_real tmp258; + fftw_real tmp302; + fftw_real tmp680; + fftw_real tmp69; + fftw_real tmp299; + fftw_real tmp261; + fftw_real tmp681; + fftw_real tmp76; + fftw_real tmp663; + fftw_real tmp272; + fftw_real tmp305; + fftw_real tmp73; + fftw_real tmp664; + fftw_real tmp267; + fftw_real tmp304; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp64; + fftw_real tmp65; + fftw_real tmp259; + fftw_real tmp260; + ASSERT_ALIGNED_DOUBLE; + tmp64 = c_re(input[istride]); + tmp65 = c_re(input[33 * istride]); + tmp66 = tmp64 + tmp65; + tmp258 = tmp64 - tmp65; + { + fftw_real tmp300; + fftw_real tmp301; + fftw_real tmp67; + fftw_real tmp68; + ASSERT_ALIGNED_DOUBLE; + tmp300 = c_im(input[istride]); + tmp301 = c_im(input[33 * istride]); + tmp302 = tmp300 - tmp301; + tmp680 = tmp300 + tmp301; + tmp67 = c_re(input[17 * istride]); + tmp68 = c_re(input[49 * istride]); + tmp69 = tmp67 + tmp68; + tmp299 = tmp67 - tmp68; + } + tmp259 = c_im(input[17 * istride]); + tmp260 = c_im(input[49 * istride]); + tmp261 = tmp259 - tmp260; + tmp681 = tmp259 + tmp260; + { + fftw_real tmp74; + fftw_real tmp75; + fftw_real tmp268; + fftw_real tmp269; + fftw_real tmp270; + fftw_real tmp271; + ASSERT_ALIGNED_DOUBLE; + tmp74 = c_re(input[57 * istride]); + tmp75 = c_re(input[25 * istride]); + tmp268 = tmp74 - tmp75; + tmp269 = c_im(input[57 * istride]); + tmp270 = c_im(input[25 * istride]); + tmp271 = tmp269 - tmp270; + tmp76 = tmp74 + tmp75; + tmp663 = tmp269 + tmp270; + tmp272 = tmp268 + tmp271; + tmp305 = tmp271 - tmp268; + } + { + fftw_real tmp71; + fftw_real tmp72; + fftw_real tmp263; + fftw_real tmp264; + fftw_real tmp265; + fftw_real tmp266; + ASSERT_ALIGNED_DOUBLE; + tmp71 = c_re(input[9 * istride]); + tmp72 = c_re(input[41 * istride]); + tmp263 = tmp71 - tmp72; + tmp264 = c_im(input[9 * istride]); + tmp265 = c_im(input[41 * istride]); + tmp266 = tmp264 - tmp265; + tmp73 = tmp71 + tmp72; + tmp664 = tmp264 + tmp265; + tmp267 = tmp263 - tmp266; + tmp304 = tmp263 + tmp266; + } + } + { + fftw_real tmp70; + fftw_real tmp77; + fftw_real tmp662; + fftw_real tmp665; + ASSERT_ALIGNED_DOUBLE; + tmp70 = tmp66 + tmp69; + tmp77 = tmp73 + tmp76; + tmp78 = tmp70 + tmp77; + tmp867 = tmp70 - tmp77; + tmp662 = tmp66 - tmp69; + tmp665 = tmp663 - tmp664; + tmp666 = tmp662 + tmp665; + tmp769 = tmp662 - tmp665; + } + { + fftw_real tmp819; + fftw_real tmp820; + fftw_real tmp679; + fftw_real tmp682; + ASSERT_ALIGNED_DOUBLE; + tmp819 = tmp680 + tmp681; + tmp820 = tmp664 + tmp663; + tmp821 = tmp819 + tmp820; + tmp864 = tmp819 - tmp820; + tmp679 = tmp73 - tmp76; + tmp682 = tmp680 - tmp681; + tmp683 = tmp679 + tmp682; + tmp766 = tmp682 - tmp679; + } + { + fftw_real tmp262; + fftw_real tmp273; + fftw_real tmp498; + fftw_real tmp499; + ASSERT_ALIGNED_DOUBLE; + tmp262 = tmp258 - tmp261; + tmp273 = K707106781 * (tmp267 + tmp272); + tmp274 = tmp262 - tmp273; + tmp425 = tmp262 + tmp273; + tmp498 = tmp258 + tmp261; + tmp499 = K707106781 * (tmp305 - tmp304); + tmp500 = tmp498 - tmp499; + tmp589 = tmp498 + tmp499; + } + { + fftw_real tmp303; + fftw_real tmp306; + fftw_real tmp509; + fftw_real tmp510; + ASSERT_ALIGNED_DOUBLE; + tmp303 = tmp299 + tmp302; + tmp306 = K707106781 * (tmp304 + tmp305); + tmp307 = tmp303 - tmp306; + tmp422 = tmp303 + tmp306; + tmp509 = tmp302 - tmp299; + tmp510 = K707106781 * (tmp267 - tmp272); + tmp511 = tmp509 - tmp510; + tmp586 = tmp509 + tmp510; + } + } + { + fftw_real tmp49; + fftw_real tmp237; + fftw_real tmp176; + fftw_real tmp249; + fftw_real tmp52; + fftw_real tmp248; + fftw_real tmp179; + fftw_real tmp238; + fftw_real tmp59; + fftw_real tmp252; + fftw_real tmp245; + fftw_real tmp186; + fftw_real tmp56; + fftw_real tmp251; + fftw_real tmp242; + fftw_real tmp183; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp47; + fftw_real tmp48; + fftw_real tmp177; + fftw_real tmp178; + ASSERT_ALIGNED_DOUBLE; + tmp47 = c_re(input[62 * istride]); + tmp48 = c_re(input[30 * istride]); + tmp49 = tmp47 + tmp48; + tmp237 = tmp47 - tmp48; + { + fftw_real tmp174; + fftw_real tmp175; + fftw_real tmp50; + fftw_real tmp51; + ASSERT_ALIGNED_DOUBLE; + tmp174 = c_im(input[62 * istride]); + tmp175 = c_im(input[30 * istride]); + tmp176 = tmp174 + tmp175; + tmp249 = tmp174 - tmp175; + tmp50 = c_re(input[14 * istride]); + tmp51 = c_re(input[46 * istride]); + tmp52 = tmp50 + tmp51; + tmp248 = tmp50 - tmp51; + } + tmp177 = c_im(input[14 * istride]); + tmp178 = c_im(input[46 * istride]); + tmp179 = tmp177 + tmp178; + tmp238 = tmp177 - tmp178; + { + fftw_real tmp57; + fftw_real tmp58; + fftw_real tmp243; + fftw_real tmp184; + fftw_real tmp185; + fftw_real tmp244; + ASSERT_ALIGNED_DOUBLE; + tmp57 = c_re(input[54 * istride]); + tmp58 = c_re(input[22 * istride]); + tmp243 = tmp57 - tmp58; + tmp184 = c_im(input[54 * istride]); + tmp185 = c_im(input[22 * istride]); + tmp244 = tmp184 - tmp185; + tmp59 = tmp57 + tmp58; + tmp252 = tmp244 - tmp243; + tmp245 = tmp243 + tmp244; + tmp186 = tmp184 + tmp185; + } + { + fftw_real tmp54; + fftw_real tmp55; + fftw_real tmp240; + fftw_real tmp181; + fftw_real tmp182; + fftw_real tmp241; + ASSERT_ALIGNED_DOUBLE; + tmp54 = c_re(input[6 * istride]); + tmp55 = c_re(input[38 * istride]); + tmp240 = tmp54 - tmp55; + tmp181 = c_im(input[6 * istride]); + tmp182 = c_im(input[38 * istride]); + tmp241 = tmp181 - tmp182; + tmp56 = tmp54 + tmp55; + tmp251 = tmp240 + tmp241; + tmp242 = tmp240 - tmp241; + tmp183 = tmp181 + tmp182; + } + } + { + fftw_real tmp53; + fftw_real tmp60; + fftw_real tmp653; + fftw_real tmp654; + ASSERT_ALIGNED_DOUBLE; + tmp53 = tmp49 + tmp52; + tmp60 = tmp56 + tmp59; + tmp61 = tmp53 + tmp60; + tmp859 = tmp53 - tmp60; + tmp653 = tmp56 - tmp59; + tmp654 = tmp176 - tmp179; + tmp655 = tmp653 + tmp654; + tmp761 = tmp654 - tmp653; + } + { + fftw_real tmp180; + fftw_real tmp187; + fftw_real tmp656; + fftw_real tmp657; + ASSERT_ALIGNED_DOUBLE; + tmp180 = tmp176 + tmp179; + tmp187 = tmp183 + tmp186; + tmp188 = tmp180 + tmp187; + tmp860 = tmp180 - tmp187; + tmp656 = tmp49 - tmp52; + tmp657 = tmp186 - tmp183; + tmp658 = tmp656 + tmp657; + tmp762 = tmp656 - tmp657; + } + { + fftw_real tmp239; + fftw_real tmp246; + fftw_real tmp489; + fftw_real tmp490; + ASSERT_ALIGNED_DOUBLE; + tmp239 = tmp237 - tmp238; + tmp246 = K707106781 * (tmp242 + tmp245); + tmp247 = tmp239 - tmp246; + tmp417 = tmp239 + tmp246; + tmp489 = tmp249 - tmp248; + tmp490 = K707106781 * (tmp242 - tmp245); + tmp491 = tmp489 - tmp490; + tmp581 = tmp489 + tmp490; + } + { + fftw_real tmp250; + fftw_real tmp253; + fftw_real tmp492; + fftw_real tmp493; + ASSERT_ALIGNED_DOUBLE; + tmp250 = tmp248 + tmp249; + tmp253 = K707106781 * (tmp251 + tmp252); + tmp254 = tmp250 - tmp253; + tmp418 = tmp250 + tmp253; + tmp492 = tmp237 + tmp238; + tmp493 = K707106781 * (tmp252 - tmp251); + tmp494 = tmp492 - tmp493; + tmp582 = tmp492 + tmp493; + } + } + { + fftw_real tmp81; + fftw_real tmp668; + fftw_real tmp84; + fftw_real tmp669; + fftw_real tmp290; + fftw_real tmp504; + fftw_real tmp295; + fftw_real tmp505; + fftw_real tmp670; + fftw_real tmp667; + fftw_real tmp88; + fftw_real tmp673; + fftw_real tmp91; + fftw_real tmp674; + fftw_real tmp279; + fftw_real tmp501; + fftw_real tmp284; + fftw_real tmp502; + fftw_real tmp675; + fftw_real tmp672; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp291; + fftw_real tmp289; + fftw_real tmp286; + fftw_real tmp294; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp79; + fftw_real tmp80; + fftw_real tmp287; + fftw_real tmp288; + ASSERT_ALIGNED_DOUBLE; + tmp79 = c_re(input[5 * istride]); + tmp80 = c_re(input[37 * istride]); + tmp81 = tmp79 + tmp80; + tmp291 = tmp79 - tmp80; + tmp287 = c_im(input[5 * istride]); + tmp288 = c_im(input[37 * istride]); + tmp289 = tmp287 - tmp288; + tmp668 = tmp287 + tmp288; + } + { + fftw_real tmp82; + fftw_real tmp83; + fftw_real tmp292; + fftw_real tmp293; + ASSERT_ALIGNED_DOUBLE; + tmp82 = c_re(input[21 * istride]); + tmp83 = c_re(input[53 * istride]); + tmp84 = tmp82 + tmp83; + tmp286 = tmp82 - tmp83; + tmp292 = c_im(input[21 * istride]); + tmp293 = c_im(input[53 * istride]); + tmp294 = tmp292 - tmp293; + tmp669 = tmp292 + tmp293; + } + tmp290 = tmp286 + tmp289; + tmp504 = tmp289 - tmp286; + tmp295 = tmp291 - tmp294; + tmp505 = tmp291 + tmp294; + tmp670 = tmp668 - tmp669; + tmp667 = tmp81 - tmp84; + } + { + fftw_real tmp280; + fftw_real tmp278; + fftw_real tmp275; + fftw_real tmp283; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp86; + fftw_real tmp87; + fftw_real tmp276; + fftw_real tmp277; + ASSERT_ALIGNED_DOUBLE; + tmp86 = c_re(input[61 * istride]); + tmp87 = c_re(input[29 * istride]); + tmp88 = tmp86 + tmp87; + tmp280 = tmp86 - tmp87; + tmp276 = c_im(input[61 * istride]); + tmp277 = c_im(input[29 * istride]); + tmp278 = tmp276 - tmp277; + tmp673 = tmp276 + tmp277; + } + { + fftw_real tmp89; + fftw_real tmp90; + fftw_real tmp281; + fftw_real tmp282; + ASSERT_ALIGNED_DOUBLE; + tmp89 = c_re(input[13 * istride]); + tmp90 = c_re(input[45 * istride]); + tmp91 = tmp89 + tmp90; + tmp275 = tmp89 - tmp90; + tmp281 = c_im(input[13 * istride]); + tmp282 = c_im(input[45 * istride]); + tmp283 = tmp281 - tmp282; + tmp674 = tmp281 + tmp282; + } + tmp279 = tmp275 + tmp278; + tmp501 = tmp278 - tmp275; + tmp284 = tmp280 - tmp283; + tmp502 = tmp280 + tmp283; + tmp675 = tmp673 - tmp674; + tmp672 = tmp88 - tmp91; + } + { + fftw_real tmp85; + fftw_real tmp92; + fftw_real tmp308; + fftw_real tmp309; + ASSERT_ALIGNED_DOUBLE; + tmp85 = tmp81 + tmp84; + tmp92 = tmp88 + tmp91; + tmp93 = tmp85 + tmp92; + tmp865 = tmp85 - tmp92; + tmp308 = (K923879532 * tmp295) - (K382683432 * tmp290); + tmp309 = (K382683432 * tmp279) + (K923879532 * tmp284); + tmp310 = tmp308 - tmp309; + tmp426 = tmp308 + tmp309; + } + { + fftw_real tmp285; + fftw_real tmp296; + fftw_real tmp822; + fftw_real tmp823; + ASSERT_ALIGNED_DOUBLE; + tmp285 = (K923879532 * tmp279) - (K382683432 * tmp284); + tmp296 = (K923879532 * tmp290) + (K382683432 * tmp295); + tmp297 = tmp285 - tmp296; + tmp423 = tmp296 + tmp285; + tmp822 = tmp668 + tmp669; + tmp823 = tmp673 + tmp674; + tmp824 = tmp822 + tmp823; + tmp868 = tmp823 - tmp822; + } + { + fftw_real tmp503; + fftw_real tmp506; + fftw_real tmp512; + fftw_real tmp513; + ASSERT_ALIGNED_DOUBLE; + tmp503 = (K382683432 * tmp501) - (K923879532 * tmp502); + tmp506 = (K382683432 * tmp504) + (K923879532 * tmp505); + tmp507 = tmp503 - tmp506; + tmp587 = tmp506 + tmp503; + tmp512 = (K382683432 * tmp505) - (K923879532 * tmp504); + tmp513 = (K923879532 * tmp501) + (K382683432 * tmp502); + tmp514 = tmp512 - tmp513; + tmp590 = tmp512 + tmp513; + } + { + fftw_real tmp671; + fftw_real tmp676; + fftw_real tmp684; + fftw_real tmp685; + ASSERT_ALIGNED_DOUBLE; + tmp671 = tmp667 - tmp670; + tmp676 = tmp672 + tmp675; + tmp677 = K707106781 * (tmp671 + tmp676); + tmp767 = K707106781 * (tmp671 - tmp676); + tmp684 = tmp667 + tmp670; + tmp685 = tmp675 - tmp672; + tmp686 = K707106781 * (tmp684 + tmp685); + tmp770 = K707106781 * (tmp685 - tmp684); + } + } + { + fftw_real tmp63; + fftw_real tmp851; + fftw_real tmp850; + fftw_real tmp852; + fftw_real tmp126; + fftw_real tmp127; + fftw_real tmp190; + fftw_real tmp847; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp31; + fftw_real tmp62; + fftw_real tmp848; + fftw_real tmp849; + ASSERT_ALIGNED_DOUBLE; + tmp31 = tmp15 + tmp30; + tmp62 = tmp46 + tmp61; + tmp63 = tmp31 + tmp62; + tmp851 = tmp31 - tmp62; + tmp848 = tmp821 + tmp824; + tmp849 = tmp830 + tmp833; + tmp850 = tmp848 + tmp849; + tmp852 = tmp849 - tmp848; + } + { + fftw_real tmp94; + fftw_real tmp125; + fftw_real tmp158; + fftw_real tmp189; + ASSERT_ALIGNED_DOUBLE; + tmp94 = tmp78 + tmp93; + tmp125 = tmp109 + tmp124; + tmp126 = tmp94 + tmp125; + tmp127 = tmp94 - tmp125; + tmp158 = tmp142 + tmp157; + tmp189 = tmp173 + tmp188; + tmp190 = tmp158 - tmp189; + tmp847 = tmp158 + tmp189; + } + c_re(output[32 * ostride]) = tmp63 - tmp126; + c_re(output[0]) = tmp63 + tmp126; + c_im(output[16 * ostride]) = tmp127 + tmp190; + c_im(output[48 * ostride]) = tmp190 - tmp127; + c_im(output[32 * ostride]) = tmp847 - tmp850; + c_im(output[0]) = tmp847 + tmp850; + c_re(output[48 * ostride]) = tmp851 - tmp852; + c_re(output[16 * ostride]) = tmp851 + tmp852; + } + { + fftw_real tmp817; + fftw_real tmp841; + fftw_real tmp839; + fftw_real tmp845; + fftw_real tmp826; + fftw_real tmp842; + fftw_real tmp835; + fftw_real tmp843; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp815; + fftw_real tmp816; + fftw_real tmp837; + fftw_real tmp838; + ASSERT_ALIGNED_DOUBLE; + tmp815 = tmp142 - tmp157; + tmp816 = tmp46 - tmp61; + tmp817 = tmp815 - tmp816; + tmp841 = tmp816 + tmp815; + tmp837 = tmp15 - tmp30; + tmp838 = tmp188 - tmp173; + tmp839 = tmp837 + tmp838; + tmp845 = tmp837 - tmp838; + } + { + fftw_real tmp818; + fftw_real tmp825; + fftw_real tmp827; + fftw_real tmp834; + ASSERT_ALIGNED_DOUBLE; + tmp818 = tmp78 - tmp93; + tmp825 = tmp821 - tmp824; + tmp826 = tmp818 - tmp825; + tmp842 = tmp818 + tmp825; + tmp827 = tmp109 - tmp124; + tmp834 = tmp830 - tmp833; + tmp835 = tmp827 + tmp834; + tmp843 = tmp834 - tmp827; + } + { + fftw_real tmp836; + fftw_real tmp840; + fftw_real tmp844; + fftw_real tmp846; + ASSERT_ALIGNED_DOUBLE; + tmp836 = K707106781 * (tmp826 - tmp835); + c_im(output[56 * ostride]) = tmp817 - tmp836; + c_im(output[24 * ostride]) = tmp817 + tmp836; + tmp840 = K707106781 * (tmp826 + tmp835); + c_re(output[40 * ostride]) = tmp839 - tmp840; + c_re(output[8 * ostride]) = tmp839 + tmp840; + tmp844 = K707106781 * (tmp842 + tmp843); + c_im(output[40 * ostride]) = tmp841 - tmp844; + c_im(output[8 * ostride]) = tmp841 + tmp844; + tmp846 = K707106781 * (tmp843 - tmp842); + c_re(output[56 * ostride]) = tmp845 - tmp846; + c_re(output[24 * ostride]) = tmp845 + tmp846; + } + } + { + fftw_real tmp217; + fftw_real tmp391; + fftw_real tmp396; + fftw_real tmp406; + fftw_real tmp399; + fftw_real tmp407; + fftw_real tmp367; + fftw_real tmp387; + fftw_real tmp312; + fftw_real tmp386; + fftw_real tmp379; + fftw_real tmp401; + fftw_real tmp382; + fftw_real tmp392; + fftw_real tmp256; + fftw_real tmp402; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp201; + fftw_real tmp216; + fftw_real tmp394; + fftw_real tmp395; + ASSERT_ALIGNED_DOUBLE; + tmp201 = tmp193 - tmp200; + tmp216 = tmp208 - tmp215; + tmp217 = tmp201 - tmp216; + tmp391 = tmp201 + tmp216; + tmp394 = tmp274 + tmp297; + tmp395 = tmp307 + tmp310; + tmp396 = (K881921264 * tmp394) - (K471396736 * tmp395); + tmp406 = (K471396736 * tmp394) + (K881921264 * tmp395); + } + { + fftw_real tmp397; + fftw_real tmp398; + fftw_real tmp353; + fftw_real tmp366; + ASSERT_ALIGNED_DOUBLE; + tmp397 = tmp329 + tmp352; + tmp398 = tmp362 + tmp365; + tmp399 = (K881921264 * tmp397) + (K471396736 * tmp398); + tmp407 = (K881921264 * tmp398) - (K471396736 * tmp397); + tmp353 = tmp329 - tmp352; + tmp366 = tmp362 - tmp365; + tmp367 = (K290284677 * tmp353) + (K956940335 * tmp366); + tmp387 = (K290284677 * tmp366) - (K956940335 * tmp353); + } + { + fftw_real tmp298; + fftw_real tmp311; + fftw_real tmp375; + fftw_real tmp378; + ASSERT_ALIGNED_DOUBLE; + tmp298 = tmp274 - tmp297; + tmp311 = tmp307 - tmp310; + tmp312 = (K290284677 * tmp298) - (K956940335 * tmp311); + tmp386 = (K956940335 * tmp298) + (K290284677 * tmp311); + tmp375 = tmp371 - tmp374; + tmp378 = tmp376 - tmp377; + tmp379 = tmp375 - tmp378; + tmp401 = tmp375 + tmp378; + } + { + fftw_real tmp380; + fftw_real tmp381; + fftw_real tmp236; + fftw_real tmp255; + ASSERT_ALIGNED_DOUBLE; + tmp380 = (K555570233 * tmp254) - (K831469612 * tmp247); + tmp381 = (K831469612 * tmp228) + (K555570233 * tmp235); + tmp382 = tmp380 - tmp381; + tmp392 = tmp381 + tmp380; + tmp236 = (K555570233 * tmp228) - (K831469612 * tmp235); + tmp255 = (K555570233 * tmp247) + (K831469612 * tmp254); + tmp256 = tmp236 - tmp255; + tmp402 = tmp236 + tmp255; + } + { + fftw_real tmp257; + fftw_real tmp368; + fftw_real tmp383; + fftw_real tmp384; + ASSERT_ALIGNED_DOUBLE; + tmp257 = tmp217 - tmp256; + tmp368 = tmp312 - tmp367; + c_im(output[61 * ostride]) = tmp257 - tmp368; + c_im(output[29 * ostride]) = tmp257 + tmp368; + tmp383 = tmp379 + tmp382; + tmp384 = tmp312 + tmp367; + c_re(output[45 * ostride]) = tmp383 - tmp384; + c_re(output[13 * ostride]) = tmp383 + tmp384; + } + { + fftw_real tmp389; + fftw_real tmp390; + fftw_real tmp385; + fftw_real tmp388; + ASSERT_ALIGNED_DOUBLE; + tmp389 = tmp379 - tmp382; + tmp390 = tmp387 - tmp386; + c_re(output[61 * ostride]) = tmp389 - tmp390; + c_re(output[29 * ostride]) = tmp389 + tmp390; + tmp385 = tmp217 + tmp256; + tmp388 = tmp386 + tmp387; + c_im(output[45 * ostride]) = tmp385 - tmp388; + c_im(output[13 * ostride]) = tmp385 + tmp388; + } + { + fftw_real tmp393; + fftw_real tmp400; + fftw_real tmp403; + fftw_real tmp404; + ASSERT_ALIGNED_DOUBLE; + tmp393 = tmp391 - tmp392; + tmp400 = tmp396 - tmp399; + c_im(output[53 * ostride]) = tmp393 - tmp400; + c_im(output[21 * ostride]) = tmp393 + tmp400; + tmp403 = tmp401 + tmp402; + tmp404 = tmp396 + tmp399; + c_re(output[37 * ostride]) = tmp403 - tmp404; + c_re(output[5 * ostride]) = tmp403 + tmp404; + } + { + fftw_real tmp409; + fftw_real tmp410; + fftw_real tmp405; + fftw_real tmp408; + ASSERT_ALIGNED_DOUBLE; + tmp409 = tmp401 - tmp402; + tmp410 = tmp407 - tmp406; + c_re(output[53 * ostride]) = tmp409 - tmp410; + c_re(output[21 * ostride]) = tmp409 + tmp410; + tmp405 = tmp391 + tmp392; + tmp408 = tmp406 + tmp407; + c_im(output[37 * ostride]) = tmp405 - tmp408; + c_im(output[5 * ostride]) = tmp405 + tmp408; + } + } + { + fftw_real tmp413; + fftw_real tmp451; + fftw_real tmp456; + fftw_real tmp466; + fftw_real tmp459; + fftw_real tmp467; + fftw_real tmp435; + fftw_real tmp447; + fftw_real tmp428; + fftw_real tmp446; + fftw_real tmp439; + fftw_real tmp461; + fftw_real tmp442; + fftw_real tmp452; + fftw_real tmp420; + fftw_real tmp462; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp411; + fftw_real tmp412; + fftw_real tmp454; + fftw_real tmp455; + ASSERT_ALIGNED_DOUBLE; + tmp411 = tmp193 + tmp200; + tmp412 = tmp377 + tmp376; + tmp413 = tmp411 - tmp412; + tmp451 = tmp411 + tmp412; + tmp454 = tmp422 + tmp423; + tmp455 = tmp425 + tmp426; + tmp456 = (K995184726 * tmp454) + (K098017140 * tmp455); + tmp466 = (K995184726 * tmp455) - (K098017140 * tmp454); + } + { + fftw_real tmp457; + fftw_real tmp458; + fftw_real tmp431; + fftw_real tmp434; + ASSERT_ALIGNED_DOUBLE; + tmp457 = tmp429 + tmp430; + tmp458 = tmp432 + tmp433; + tmp459 = (K995184726 * tmp457) - (K098017140 * tmp458); + tmp467 = (K098017140 * tmp457) + (K995184726 * tmp458); + tmp431 = tmp429 - tmp430; + tmp434 = tmp432 - tmp433; + tmp435 = (K634393284 * tmp431) - (K773010453 * tmp434); + tmp447 = (K773010453 * tmp431) + (K634393284 * tmp434); + } + { + fftw_real tmp424; + fftw_real tmp427; + fftw_real tmp437; + fftw_real tmp438; + ASSERT_ALIGNED_DOUBLE; + tmp424 = tmp422 - tmp423; + tmp427 = tmp425 - tmp426; + tmp428 = (K634393284 * tmp424) + (K773010453 * tmp427); + tmp446 = (K634393284 * tmp427) - (K773010453 * tmp424); + tmp437 = tmp371 + tmp374; + tmp438 = tmp208 + tmp215; + tmp439 = tmp437 - tmp438; + tmp461 = tmp437 + tmp438; + } + { + fftw_real tmp440; + fftw_real tmp441; + fftw_real tmp416; + fftw_real tmp419; + ASSERT_ALIGNED_DOUBLE; + tmp440 = (K980785280 * tmp418) - (K195090322 * tmp417); + tmp441 = (K195090322 * tmp414) + (K980785280 * tmp415); + tmp442 = tmp440 - tmp441; + tmp452 = tmp441 + tmp440; + tmp416 = (K980785280 * tmp414) - (K195090322 * tmp415); + tmp419 = (K980785280 * tmp417) + (K195090322 * tmp418); + tmp420 = tmp416 - tmp419; + tmp462 = tmp416 + tmp419; + } + { + fftw_real tmp421; + fftw_real tmp436; + fftw_real tmp443; + fftw_real tmp444; + ASSERT_ALIGNED_DOUBLE; + tmp421 = tmp413 + tmp420; + tmp436 = tmp428 + tmp435; + c_im(output[41 * ostride]) = tmp421 - tmp436; + c_im(output[9 * ostride]) = tmp421 + tmp436; + tmp443 = tmp439 - tmp442; + tmp444 = tmp435 - tmp428; + c_re(output[57 * ostride]) = tmp443 - tmp444; + c_re(output[25 * ostride]) = tmp443 + tmp444; + } + { + fftw_real tmp449; + fftw_real tmp450; + fftw_real tmp445; + fftw_real tmp448; + ASSERT_ALIGNED_DOUBLE; + tmp449 = tmp439 + tmp442; + tmp450 = tmp446 + tmp447; + c_re(output[41 * ostride]) = tmp449 - tmp450; + c_re(output[9 * ostride]) = tmp449 + tmp450; + tmp445 = tmp413 - tmp420; + tmp448 = tmp446 - tmp447; + c_im(output[57 * ostride]) = tmp445 - tmp448; + c_im(output[25 * ostride]) = tmp445 + tmp448; + } + { + fftw_real tmp453; + fftw_real tmp460; + fftw_real tmp463; + fftw_real tmp464; + ASSERT_ALIGNED_DOUBLE; + tmp453 = tmp451 + tmp452; + tmp460 = tmp456 + tmp459; + c_im(output[33 * ostride]) = tmp453 - tmp460; + c_im(output[ostride]) = tmp453 + tmp460; + tmp463 = tmp461 - tmp462; + tmp464 = tmp459 - tmp456; + c_re(output[49 * ostride]) = tmp463 - tmp464; + c_re(output[17 * ostride]) = tmp463 + tmp464; + } + { + fftw_real tmp469; + fftw_real tmp470; + fftw_real tmp465; + fftw_real tmp468; + ASSERT_ALIGNED_DOUBLE; + tmp469 = tmp461 + tmp462; + tmp470 = tmp466 + tmp467; + c_re(output[33 * ostride]) = tmp469 - tmp470; + c_re(output[ostride]) = tmp469 + tmp470; + tmp465 = tmp451 - tmp452; + tmp468 = tmp466 - tmp467; + c_im(output[49 * ostride]) = tmp465 - tmp468; + c_im(output[17 * ostride]) = tmp465 + tmp468; + } + } + { + fftw_real tmp855; + fftw_real tmp893; + fftw_real tmp862; + fftw_real tmp904; + fftw_real tmp884; + fftw_real tmp894; + fftw_real tmp870; + fftw_real tmp888; + fftw_real tmp881; + fftw_real tmp903; + fftw_real tmp898; + fftw_real tmp908; + fftw_real tmp877; + fftw_real tmp889; + fftw_real tmp901; + fftw_real tmp909; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp858; + fftw_real tmp861; + fftw_real tmp896; + fftw_real tmp897; + ASSERT_ALIGNED_DOUBLE; + tmp855 = tmp853 - tmp854; + tmp893 = tmp854 + tmp853; + tmp858 = tmp856 - tmp857; + tmp861 = tmp859 + tmp860; + tmp862 = K707106781 * (tmp858 - tmp861); + tmp904 = K707106781 * (tmp858 + tmp861); + { + fftw_real tmp882; + fftw_real tmp883; + fftw_real tmp866; + fftw_real tmp869; + ASSERT_ALIGNED_DOUBLE; + tmp882 = tmp860 - tmp859; + tmp883 = tmp856 + tmp857; + tmp884 = K707106781 * (tmp882 - tmp883); + tmp894 = K707106781 * (tmp883 + tmp882); + tmp866 = tmp864 - tmp865; + tmp869 = tmp867 - tmp868; + tmp870 = (K382683432 * tmp866) + (K923879532 * tmp869); + tmp888 = (K382683432 * tmp869) - (K923879532 * tmp866); + } + tmp881 = tmp879 - tmp880; + tmp903 = tmp879 + tmp880; + tmp896 = tmp865 + tmp864; + tmp897 = tmp867 + tmp868; + tmp898 = (K923879532 * tmp896) + (K382683432 * tmp897); + tmp908 = (K923879532 * tmp897) - (K382683432 * tmp896); + { + fftw_real tmp873; + fftw_real tmp876; + fftw_real tmp899; + fftw_real tmp900; + ASSERT_ALIGNED_DOUBLE; + tmp873 = tmp871 - tmp872; + tmp876 = tmp874 - tmp875; + tmp877 = (K382683432 * tmp873) - (K923879532 * tmp876); + tmp889 = (K923879532 * tmp873) + (K382683432 * tmp876); + tmp899 = tmp872 + tmp871; + tmp900 = tmp874 + tmp875; + tmp901 = (K923879532 * tmp899) - (K382683432 * tmp900); + tmp909 = (K382683432 * tmp899) + (K923879532 * tmp900); + } + } + { + fftw_real tmp863; + fftw_real tmp878; + fftw_real tmp885; + fftw_real tmp886; + ASSERT_ALIGNED_DOUBLE; + tmp863 = tmp855 + tmp862; + tmp878 = tmp870 + tmp877; + c_im(output[44 * ostride]) = tmp863 - tmp878; + c_im(output[12 * ostride]) = tmp863 + tmp878; + tmp885 = tmp881 - tmp884; + tmp886 = tmp877 - tmp870; + c_re(output[60 * ostride]) = tmp885 - tmp886; + c_re(output[28 * ostride]) = tmp885 + tmp886; + } + { + fftw_real tmp891; + fftw_real tmp892; + fftw_real tmp887; + fftw_real tmp890; + ASSERT_ALIGNED_DOUBLE; + tmp891 = tmp881 + tmp884; + tmp892 = tmp888 + tmp889; + c_re(output[44 * ostride]) = tmp891 - tmp892; + c_re(output[12 * ostride]) = tmp891 + tmp892; + tmp887 = tmp855 - tmp862; + tmp890 = tmp888 - tmp889; + c_im(output[60 * ostride]) = tmp887 - tmp890; + c_im(output[28 * ostride]) = tmp887 + tmp890; + } + { + fftw_real tmp895; + fftw_real tmp902; + fftw_real tmp905; + fftw_real tmp906; + ASSERT_ALIGNED_DOUBLE; + tmp895 = tmp893 + tmp894; + tmp902 = tmp898 + tmp901; + c_im(output[36 * ostride]) = tmp895 - tmp902; + c_im(output[4 * ostride]) = tmp895 + tmp902; + tmp905 = tmp903 - tmp904; + tmp906 = tmp901 - tmp898; + c_re(output[52 * ostride]) = tmp905 - tmp906; + c_re(output[20 * ostride]) = tmp905 + tmp906; + } + { + fftw_real tmp911; + fftw_real tmp912; + fftw_real tmp907; + fftw_real tmp910; + ASSERT_ALIGNED_DOUBLE; + tmp911 = tmp903 + tmp904; + tmp912 = tmp908 + tmp909; + c_re(output[36 * ostride]) = tmp911 - tmp912; + c_re(output[4 * ostride]) = tmp911 + tmp912; + tmp907 = tmp893 - tmp894; + tmp910 = tmp908 - tmp909; + c_im(output[52 * ostride]) = tmp907 - tmp910; + c_im(output[20 * ostride]) = tmp907 + tmp910; + } + } + { + fftw_real tmp757; + fftw_real tmp795; + fftw_real tmp800; + fftw_real tmp810; + fftw_real tmp803; + fftw_real tmp811; + fftw_real tmp779; + fftw_real tmp791; + fftw_real tmp783; + fftw_real tmp805; + fftw_real tmp764; + fftw_real tmp806; + fftw_real tmp786; + fftw_real tmp796; + fftw_real tmp772; + fftw_real tmp790; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp756; + fftw_real tmp798; + fftw_real tmp799; + fftw_real tmp782; + fftw_real tmp760; + fftw_real tmp763; + ASSERT_ALIGNED_DOUBLE; + tmp756 = K707106781 * (tmp720 - tmp721); + tmp757 = tmp755 - tmp756; + tmp795 = tmp755 + tmp756; + tmp798 = tmp766 + tmp767; + tmp799 = tmp769 + tmp770; + tmp800 = (K831469612 * tmp798) + (K555570233 * tmp799); + tmp810 = (K831469612 * tmp799) - (K555570233 * tmp798); + { + fftw_real tmp801; + fftw_real tmp802; + fftw_real tmp775; + fftw_real tmp778; + ASSERT_ALIGNED_DOUBLE; + tmp801 = tmp773 + tmp774; + tmp802 = tmp776 + tmp777; + tmp803 = (K831469612 * tmp801) - (K555570233 * tmp802); + tmp811 = (K555570233 * tmp801) + (K831469612 * tmp802); + tmp775 = tmp773 - tmp774; + tmp778 = tmp776 - tmp777; + tmp779 = (K195090322 * tmp775) - (K980785280 * tmp778); + tmp791 = (K980785280 * tmp775) + (K195090322 * tmp778); + } + tmp782 = K707106781 * (tmp643 - tmp640); + tmp783 = tmp781 - tmp782; + tmp805 = tmp781 + tmp782; + tmp760 = (K382683432 * tmp758) - (K923879532 * tmp759); + tmp763 = (K923879532 * tmp761) + (K382683432 * tmp762); + tmp764 = tmp760 - tmp763; + tmp806 = tmp760 + tmp763; + { + fftw_real tmp784; + fftw_real tmp785; + fftw_real tmp768; + fftw_real tmp771; + ASSERT_ALIGNED_DOUBLE; + tmp784 = (K382683432 * tmp761) - (K923879532 * tmp762); + tmp785 = (K382683432 * tmp759) + (K923879532 * tmp758); + tmp786 = tmp784 - tmp785; + tmp796 = tmp785 + tmp784; + tmp768 = tmp766 - tmp767; + tmp771 = tmp769 - tmp770; + tmp772 = (K195090322 * tmp768) + (K980785280 * tmp771); + tmp790 = (K195090322 * tmp771) - (K980785280 * tmp768); + } + } + { + fftw_real tmp765; + fftw_real tmp780; + fftw_real tmp787; + fftw_real tmp788; + ASSERT_ALIGNED_DOUBLE; + tmp765 = tmp757 + tmp764; + tmp780 = tmp772 + tmp779; + c_im(output[46 * ostride]) = tmp765 - tmp780; + c_im(output[14 * ostride]) = tmp765 + tmp780; + tmp787 = tmp783 - tmp786; + tmp788 = tmp779 - tmp772; + c_re(output[62 * ostride]) = tmp787 - tmp788; + c_re(output[30 * ostride]) = tmp787 + tmp788; + } + { + fftw_real tmp793; + fftw_real tmp794; + fftw_real tmp789; + fftw_real tmp792; + ASSERT_ALIGNED_DOUBLE; + tmp793 = tmp783 + tmp786; + tmp794 = tmp790 + tmp791; + c_re(output[46 * ostride]) = tmp793 - tmp794; + c_re(output[14 * ostride]) = tmp793 + tmp794; + tmp789 = tmp757 - tmp764; + tmp792 = tmp790 - tmp791; + c_im(output[62 * ostride]) = tmp789 - tmp792; + c_im(output[30 * ostride]) = tmp789 + tmp792; + } + { + fftw_real tmp797; + fftw_real tmp804; + fftw_real tmp807; + fftw_real tmp808; + ASSERT_ALIGNED_DOUBLE; + tmp797 = tmp795 + tmp796; + tmp804 = tmp800 + tmp803; + c_im(output[38 * ostride]) = tmp797 - tmp804; + c_im(output[6 * ostride]) = tmp797 + tmp804; + tmp807 = tmp805 - tmp806; + tmp808 = tmp803 - tmp800; + c_re(output[54 * ostride]) = tmp807 - tmp808; + c_re(output[22 * ostride]) = tmp807 + tmp808; + } + { + fftw_real tmp813; + fftw_real tmp814; + fftw_real tmp809; + fftw_real tmp812; + ASSERT_ALIGNED_DOUBLE; + tmp813 = tmp805 + tmp806; + tmp814 = tmp810 + tmp811; + c_re(output[38 * ostride]) = tmp813 - tmp814; + c_re(output[6 * ostride]) = tmp813 + tmp814; + tmp809 = tmp795 - tmp796; + tmp812 = tmp810 - tmp811; + c_im(output[54 * ostride]) = tmp809 - tmp812; + c_im(output[22 * ostride]) = tmp809 + tmp812; + } + } + { + fftw_real tmp645; + fftw_real tmp735; + fftw_real tmp740; + fftw_real tmp750; + fftw_real tmp743; + fftw_real tmp751; + fftw_real tmp715; + fftw_real tmp731; + fftw_real tmp723; + fftw_real tmp745; + fftw_real tmp660; + fftw_real tmp746; + fftw_real tmp726; + fftw_real tmp736; + fftw_real tmp688; + fftw_real tmp730; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp644; + fftw_real tmp738; + fftw_real tmp739; + fftw_real tmp722; + fftw_real tmp652; + fftw_real tmp659; + ASSERT_ALIGNED_DOUBLE; + tmp644 = K707106781 * (tmp640 + tmp643); + tmp645 = tmp637 - tmp644; + tmp735 = tmp637 + tmp644; + tmp738 = tmp666 + tmp677; + tmp739 = tmp683 + tmp686; + tmp740 = (K980785280 * tmp738) - (K195090322 * tmp739); + tmp750 = (K195090322 * tmp738) + (K980785280 * tmp739); + { + fftw_real tmp741; + fftw_real tmp742; + fftw_real tmp705; + fftw_real tmp714; + ASSERT_ALIGNED_DOUBLE; + tmp741 = tmp693 + tmp704; + tmp742 = tmp710 + tmp713; + tmp743 = (K980785280 * tmp741) + (K195090322 * tmp742); + tmp751 = (K980785280 * tmp742) - (K195090322 * tmp741); + tmp705 = tmp693 - tmp704; + tmp714 = tmp710 - tmp713; + tmp715 = (K555570233 * tmp705) + (K831469612 * tmp714); + tmp731 = (K555570233 * tmp714) - (K831469612 * tmp705); + } + tmp722 = K707106781 * (tmp720 + tmp721); + tmp723 = tmp719 - tmp722; + tmp745 = tmp719 + tmp722; + tmp652 = (K923879532 * tmp648) - (K382683432 * tmp651); + tmp659 = (K382683432 * tmp655) + (K923879532 * tmp658); + tmp660 = tmp652 - tmp659; + tmp746 = tmp652 + tmp659; + { + fftw_real tmp724; + fftw_real tmp725; + fftw_real tmp678; + fftw_real tmp687; + ASSERT_ALIGNED_DOUBLE; + tmp724 = (K923879532 * tmp655) - (K382683432 * tmp658); + tmp725 = (K923879532 * tmp651) + (K382683432 * tmp648); + tmp726 = tmp724 - tmp725; + tmp736 = tmp725 + tmp724; + tmp678 = tmp666 - tmp677; + tmp687 = tmp683 - tmp686; + tmp688 = (K555570233 * tmp678) - (K831469612 * tmp687); + tmp730 = (K831469612 * tmp678) + (K555570233 * tmp687); + } + } + { + fftw_real tmp661; + fftw_real tmp716; + fftw_real tmp727; + fftw_real tmp728; + ASSERT_ALIGNED_DOUBLE; + tmp661 = tmp645 - tmp660; + tmp716 = tmp688 - tmp715; + c_im(output[58 * ostride]) = tmp661 - tmp716; + c_im(output[26 * ostride]) = tmp661 + tmp716; + tmp727 = tmp723 + tmp726; + tmp728 = tmp688 + tmp715; + c_re(output[42 * ostride]) = tmp727 - tmp728; + c_re(output[10 * ostride]) = tmp727 + tmp728; + } + { + fftw_real tmp733; + fftw_real tmp734; + fftw_real tmp729; + fftw_real tmp732; + ASSERT_ALIGNED_DOUBLE; + tmp733 = tmp723 - tmp726; + tmp734 = tmp731 - tmp730; + c_re(output[58 * ostride]) = tmp733 - tmp734; + c_re(output[26 * ostride]) = tmp733 + tmp734; + tmp729 = tmp645 + tmp660; + tmp732 = tmp730 + tmp731; + c_im(output[42 * ostride]) = tmp729 - tmp732; + c_im(output[10 * ostride]) = tmp729 + tmp732; + } + { + fftw_real tmp737; + fftw_real tmp744; + fftw_real tmp747; + fftw_real tmp748; + ASSERT_ALIGNED_DOUBLE; + tmp737 = tmp735 - tmp736; + tmp744 = tmp740 - tmp743; + c_im(output[50 * ostride]) = tmp737 - tmp744; + c_im(output[18 * ostride]) = tmp737 + tmp744; + tmp747 = tmp745 + tmp746; + tmp748 = tmp740 + tmp743; + c_re(output[34 * ostride]) = tmp747 - tmp748; + c_re(output[2 * ostride]) = tmp747 + tmp748; + } + { + fftw_real tmp753; + fftw_real tmp754; + fftw_real tmp749; + fftw_real tmp752; + ASSERT_ALIGNED_DOUBLE; + tmp753 = tmp745 - tmp746; + tmp754 = tmp751 - tmp750; + c_re(output[50 * ostride]) = tmp753 - tmp754; + c_re(output[18 * ostride]) = tmp753 + tmp754; + tmp749 = tmp735 + tmp736; + tmp752 = tmp750 + tmp751; + c_im(output[34 * ostride]) = tmp749 - tmp752; + c_im(output[2 * ostride]) = tmp749 + tmp752; + } + } + { + fftw_real tmp481; + fftw_real tmp555; + fftw_real tmp560; + fftw_real tmp570; + fftw_real tmp563; + fftw_real tmp571; + fftw_real tmp535; + fftw_real tmp551; + fftw_real tmp516; + fftw_real tmp550; + fftw_real tmp543; + fftw_real tmp565; + fftw_real tmp546; + fftw_real tmp556; + fftw_real tmp496; + fftw_real tmp566; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp473; + fftw_real tmp480; + fftw_real tmp558; + fftw_real tmp559; + ASSERT_ALIGNED_DOUBLE; + tmp473 = tmp471 - tmp472; + tmp480 = tmp476 - tmp479; + tmp481 = tmp473 - tmp480; + tmp555 = tmp473 + tmp480; + tmp558 = tmp500 + tmp507; + tmp559 = tmp511 + tmp514; + tmp560 = (K773010453 * tmp558) - (K634393284 * tmp559); + tmp570 = (K634393284 * tmp558) + (K773010453 * tmp559); + } + { + fftw_real tmp561; + fftw_real tmp562; + fftw_real tmp527; + fftw_real tmp534; + ASSERT_ALIGNED_DOUBLE; + tmp561 = tmp519 + tmp526; + tmp562 = tmp530 + tmp533; + tmp563 = (K773010453 * tmp561) + (K634393284 * tmp562); + tmp571 = (K773010453 * tmp562) - (K634393284 * tmp561); + tmp527 = tmp519 - tmp526; + tmp534 = tmp530 - tmp533; + tmp535 = (K098017140 * tmp527) + (K995184726 * tmp534); + tmp551 = (K098017140 * tmp534) - (K995184726 * tmp527); + } + { + fftw_real tmp508; + fftw_real tmp515; + fftw_real tmp539; + fftw_real tmp542; + ASSERT_ALIGNED_DOUBLE; + tmp508 = tmp500 - tmp507; + tmp515 = tmp511 - tmp514; + tmp516 = (K098017140 * tmp508) - (K995184726 * tmp515); + tmp550 = (K995184726 * tmp508) + (K098017140 * tmp515); + tmp539 = tmp537 - tmp538; + tmp542 = tmp540 - tmp541; + tmp543 = tmp539 - tmp542; + tmp565 = tmp539 + tmp542; + } + { + fftw_real tmp544; + fftw_real tmp545; + fftw_real tmp488; + fftw_real tmp495; + ASSERT_ALIGNED_DOUBLE; + tmp544 = (K195090322 * tmp491) - (K980785280 * tmp494); + tmp545 = (K195090322 * tmp487) + (K980785280 * tmp484); + tmp546 = tmp544 - tmp545; + tmp556 = tmp545 + tmp544; + tmp488 = (K195090322 * tmp484) - (K980785280 * tmp487); + tmp495 = (K980785280 * tmp491) + (K195090322 * tmp494); + tmp496 = tmp488 - tmp495; + tmp566 = tmp488 + tmp495; + } + { + fftw_real tmp497; + fftw_real tmp536; + fftw_real tmp547; + fftw_real tmp548; + ASSERT_ALIGNED_DOUBLE; + tmp497 = tmp481 - tmp496; + tmp536 = tmp516 - tmp535; + c_im(output[63 * ostride]) = tmp497 - tmp536; + c_im(output[31 * ostride]) = tmp497 + tmp536; + tmp547 = tmp543 + tmp546; + tmp548 = tmp516 + tmp535; + c_re(output[47 * ostride]) = tmp547 - tmp548; + c_re(output[15 * ostride]) = tmp547 + tmp548; + } + { + fftw_real tmp553; + fftw_real tmp554; + fftw_real tmp549; + fftw_real tmp552; + ASSERT_ALIGNED_DOUBLE; + tmp553 = tmp543 - tmp546; + tmp554 = tmp551 - tmp550; + c_re(output[63 * ostride]) = tmp553 - tmp554; + c_re(output[31 * ostride]) = tmp553 + tmp554; + tmp549 = tmp481 + tmp496; + tmp552 = tmp550 + tmp551; + c_im(output[47 * ostride]) = tmp549 - tmp552; + c_im(output[15 * ostride]) = tmp549 + tmp552; + } + { + fftw_real tmp557; + fftw_real tmp564; + fftw_real tmp567; + fftw_real tmp568; + ASSERT_ALIGNED_DOUBLE; + tmp557 = tmp555 - tmp556; + tmp564 = tmp560 - tmp563; + c_im(output[55 * ostride]) = tmp557 - tmp564; + c_im(output[23 * ostride]) = tmp557 + tmp564; + tmp567 = tmp565 + tmp566; + tmp568 = tmp560 + tmp563; + c_re(output[39 * ostride]) = tmp567 - tmp568; + c_re(output[7 * ostride]) = tmp567 + tmp568; + } + { + fftw_real tmp573; + fftw_real tmp574; + fftw_real tmp569; + fftw_real tmp572; + ASSERT_ALIGNED_DOUBLE; + tmp573 = tmp565 - tmp566; + tmp574 = tmp571 - tmp570; + c_re(output[55 * ostride]) = tmp573 - tmp574; + c_re(output[23 * ostride]) = tmp573 + tmp574; + tmp569 = tmp555 + tmp556; + tmp572 = tmp570 + tmp571; + c_im(output[39 * ostride]) = tmp569 - tmp572; + c_im(output[7 * ostride]) = tmp569 + tmp572; + } + } + { + fftw_real tmp577; + fftw_real tmp615; + fftw_real tmp620; + fftw_real tmp630; + fftw_real tmp623; + fftw_real tmp631; + fftw_real tmp599; + fftw_real tmp611; + fftw_real tmp592; + fftw_real tmp610; + fftw_real tmp603; + fftw_real tmp625; + fftw_real tmp606; + fftw_real tmp616; + fftw_real tmp584; + fftw_real tmp626; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp575; + fftw_real tmp576; + fftw_real tmp618; + fftw_real tmp619; + ASSERT_ALIGNED_DOUBLE; + tmp575 = tmp471 + tmp472; + tmp576 = tmp541 + tmp540; + tmp577 = tmp575 - tmp576; + tmp615 = tmp575 + tmp576; + tmp618 = tmp586 + tmp587; + tmp619 = tmp589 + tmp590; + tmp620 = (K956940335 * tmp618) + (K290284677 * tmp619); + tmp630 = (K956940335 * tmp619) - (K290284677 * tmp618); + } + { + fftw_real tmp621; + fftw_real tmp622; + fftw_real tmp595; + fftw_real tmp598; + ASSERT_ALIGNED_DOUBLE; + tmp621 = tmp593 + tmp594; + tmp622 = tmp596 + tmp597; + tmp623 = (K956940335 * tmp621) - (K290284677 * tmp622); + tmp631 = (K290284677 * tmp621) + (K956940335 * tmp622); + tmp595 = tmp593 - tmp594; + tmp598 = tmp596 - tmp597; + tmp599 = (K471396736 * tmp595) - (K881921264 * tmp598); + tmp611 = (K881921264 * tmp595) + (K471396736 * tmp598); + } + { + fftw_real tmp588; + fftw_real tmp591; + fftw_real tmp601; + fftw_real tmp602; + ASSERT_ALIGNED_DOUBLE; + tmp588 = tmp586 - tmp587; + tmp591 = tmp589 - tmp590; + tmp592 = (K471396736 * tmp588) + (K881921264 * tmp591); + tmp610 = (K471396736 * tmp591) - (K881921264 * tmp588); + tmp601 = tmp537 + tmp538; + tmp602 = tmp476 + tmp479; + tmp603 = tmp601 - tmp602; + tmp625 = tmp601 + tmp602; + } + { + fftw_real tmp604; + fftw_real tmp605; + fftw_real tmp580; + fftw_real tmp583; + ASSERT_ALIGNED_DOUBLE; + tmp604 = (K831469612 * tmp581) - (K555570233 * tmp582); + tmp605 = (K831469612 * tmp579) + (K555570233 * tmp578); + tmp606 = tmp604 - tmp605; + tmp616 = tmp605 + tmp604; + tmp580 = (K831469612 * tmp578) - (K555570233 * tmp579); + tmp583 = (K555570233 * tmp581) + (K831469612 * tmp582); + tmp584 = tmp580 - tmp583; + tmp626 = tmp580 + tmp583; + } + { + fftw_real tmp585; + fftw_real tmp600; + fftw_real tmp607; + fftw_real tmp608; + ASSERT_ALIGNED_DOUBLE; + tmp585 = tmp577 + tmp584; + tmp600 = tmp592 + tmp599; + c_im(output[43 * ostride]) = tmp585 - tmp600; + c_im(output[11 * ostride]) = tmp585 + tmp600; + tmp607 = tmp603 - tmp606; + tmp608 = tmp599 - tmp592; + c_re(output[59 * ostride]) = tmp607 - tmp608; + c_re(output[27 * ostride]) = tmp607 + tmp608; + } + { + fftw_real tmp613; + fftw_real tmp614; + fftw_real tmp609; + fftw_real tmp612; + ASSERT_ALIGNED_DOUBLE; + tmp613 = tmp603 + tmp606; + tmp614 = tmp610 + tmp611; + c_re(output[43 * ostride]) = tmp613 - tmp614; + c_re(output[11 * ostride]) = tmp613 + tmp614; + tmp609 = tmp577 - tmp584; + tmp612 = tmp610 - tmp611; + c_im(output[59 * ostride]) = tmp609 - tmp612; + c_im(output[27 * ostride]) = tmp609 + tmp612; + } + { + fftw_real tmp617; + fftw_real tmp624; + fftw_real tmp627; + fftw_real tmp628; + ASSERT_ALIGNED_DOUBLE; + tmp617 = tmp615 + tmp616; + tmp624 = tmp620 + tmp623; + c_im(output[35 * ostride]) = tmp617 - tmp624; + c_im(output[3 * ostride]) = tmp617 + tmp624; + tmp627 = tmp625 - tmp626; + tmp628 = tmp623 - tmp620; + c_re(output[51 * ostride]) = tmp627 - tmp628; + c_re(output[19 * ostride]) = tmp627 + tmp628; + } + { + fftw_real tmp633; + fftw_real tmp634; + fftw_real tmp629; + fftw_real tmp632; + ASSERT_ALIGNED_DOUBLE; + tmp633 = tmp625 + tmp626; + tmp634 = tmp630 + tmp631; + c_re(output[35 * ostride]) = tmp633 - tmp634; + c_re(output[3 * ostride]) = tmp633 + tmp634; + tmp629 = tmp615 - tmp616; + tmp632 = tmp630 - tmp631; + c_im(output[51 * ostride]) = tmp629 - tmp632; + c_im(output[19 * ostride]) = tmp629 + tmp632; + } + } +} + +fftw_codelet_desc fftwi_no_twiddle_64_desc = +{ + "fftwi_no_twiddle_64", + (void (*)()) fftwi_no_twiddle_64, + 64, + FFTW_BACKWARD, + FFTW_NOTW, + 1420, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fni_7.c b/src/sndobj/rfftw/fni_7.c new file mode 100644 index 0000000..32b4a30 --- /dev/null +++ b/src/sndobj/rfftw/fni_7.c @@ -0,0 +1,170 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:05 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddleinv 7 */ + +/* + * This function contains 60 FP additions, 36 FP multiplications, + * (or, 60 additions, 36 multiplications, 0 fused multiply/add), + * 22 stack variables, and 28 memory accesses + */ +static const fftw_real K222520933 = FFTW_KONST(+0.222520933956314404288902564496794759466355569); +static const fftw_real K900968867 = FFTW_KONST(+0.900968867902419126236102319507445051165919162); +static const fftw_real K623489801 = FFTW_KONST(+0.623489801858733530525004884004239810632274731); +static const fftw_real K433883739 = FFTW_KONST(+0.433883739117558120475768332848358754609990728); +static const fftw_real K974927912 = FFTW_KONST(+0.974927912181823607018131682993931217232785801); +static const fftw_real K781831482 = FFTW_KONST(+0.781831482468029808708444526674057750232334519); + +/* + * Generator Id's : + * $Id: fni_7.c,v 1.1.1.1 2006/05/12 15:14:50 veplaini Exp $ + * $Id: fni_7.c,v 1.1.1.1 2006/05/12 15:14:50 veplaini Exp $ + * $Id: fni_7.c,v 1.1.1.1 2006/05/12 15:14:50 veplaini Exp $ + */ + +void fftwi_no_twiddle_7(const fftw_complex *input, fftw_complex *output, int istride, int ostride) +{ + fftw_real tmp1; + fftw_real tmp15; + fftw_real tmp4; + fftw_real tmp11; + fftw_real tmp24; + fftw_real tmp31; + fftw_real tmp7; + fftw_real tmp13; + fftw_real tmp18; + fftw_real tmp33; + fftw_real tmp10; + fftw_real tmp12; + fftw_real tmp21; + fftw_real tmp32; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(input[0]); + tmp15 = c_im(input[0]); + { + fftw_real tmp2; + fftw_real tmp3; + fftw_real tmp22; + fftw_real tmp23; + ASSERT_ALIGNED_DOUBLE; + tmp2 = c_re(input[istride]); + tmp3 = c_re(input[6 * istride]); + tmp4 = tmp2 + tmp3; + tmp11 = tmp2 - tmp3; + tmp22 = c_im(input[istride]); + tmp23 = c_im(input[6 * istride]); + tmp24 = tmp22 + tmp23; + tmp31 = tmp23 - tmp22; + } + { + fftw_real tmp5; + fftw_real tmp6; + fftw_real tmp16; + fftw_real tmp17; + ASSERT_ALIGNED_DOUBLE; + tmp5 = c_re(input[2 * istride]); + tmp6 = c_re(input[5 * istride]); + tmp7 = tmp5 + tmp6; + tmp13 = tmp5 - tmp6; + tmp16 = c_im(input[2 * istride]); + tmp17 = c_im(input[5 * istride]); + tmp18 = tmp16 + tmp17; + tmp33 = tmp17 - tmp16; + } + { + fftw_real tmp8; + fftw_real tmp9; + fftw_real tmp19; + fftw_real tmp20; + ASSERT_ALIGNED_DOUBLE; + tmp8 = c_re(input[3 * istride]); + tmp9 = c_re(input[4 * istride]); + tmp10 = tmp8 + tmp9; + tmp12 = tmp8 - tmp9; + tmp19 = c_im(input[3 * istride]); + tmp20 = c_im(input[4 * istride]); + tmp21 = tmp19 + tmp20; + tmp32 = tmp20 - tmp19; + } + { + fftw_real tmp36; + fftw_real tmp35; + fftw_real tmp26; + fftw_real tmp27; + ASSERT_ALIGNED_DOUBLE; + c_re(output[0]) = tmp1 + tmp4 + tmp7 + tmp10; + tmp36 = (K781831482 * tmp31) + (K974927912 * tmp33) + (K433883739 * tmp32); + tmp35 = tmp1 + (K623489801 * tmp4) - (K900968867 * tmp10) - (K222520933 * tmp7); + c_re(output[6 * ostride]) = tmp35 - tmp36; + c_re(output[ostride]) = tmp35 + tmp36; + { + fftw_real tmp38; + fftw_real tmp37; + fftw_real tmp34; + fftw_real tmp30; + ASSERT_ALIGNED_DOUBLE; + tmp38 = (K433883739 * tmp31) + (K974927912 * tmp32) - (K781831482 * tmp33); + tmp37 = tmp1 + (K623489801 * tmp7) - (K222520933 * tmp10) - (K900968867 * tmp4); + c_re(output[4 * ostride]) = tmp37 - tmp38; + c_re(output[3 * ostride]) = tmp37 + tmp38; + tmp34 = (K974927912 * tmp31) - (K781831482 * tmp32) - (K433883739 * tmp33); + tmp30 = tmp1 + (K623489801 * tmp10) - (K900968867 * tmp7) - (K222520933 * tmp4); + c_re(output[5 * ostride]) = tmp30 - tmp34; + c_re(output[2 * ostride]) = tmp30 + tmp34; + } + c_im(output[0]) = tmp15 + tmp24 + tmp18 + tmp21; + tmp26 = (K781831482 * tmp11) + (K974927912 * tmp13) + (K433883739 * tmp12); + tmp27 = tmp15 + (K623489801 * tmp24) - (K900968867 * tmp21) - (K222520933 * tmp18); + c_im(output[ostride]) = tmp26 + tmp27; + c_im(output[6 * ostride]) = tmp27 - tmp26; + { + fftw_real tmp14; + fftw_real tmp25; + fftw_real tmp28; + fftw_real tmp29; + ASSERT_ALIGNED_DOUBLE; + tmp14 = (K433883739 * tmp11) + (K974927912 * tmp12) - (K781831482 * tmp13); + tmp25 = tmp15 + (K623489801 * tmp18) - (K222520933 * tmp21) - (K900968867 * tmp24); + c_im(output[3 * ostride]) = tmp14 + tmp25; + c_im(output[4 * ostride]) = tmp25 - tmp14; + tmp28 = (K974927912 * tmp11) - (K781831482 * tmp12) - (K433883739 * tmp13); + tmp29 = tmp15 + (K623489801 * tmp21) - (K900968867 * tmp18) - (K222520933 * tmp24); + c_im(output[2 * ostride]) = tmp28 + tmp29; + c_im(output[5 * ostride]) = tmp29 - tmp28; + } + } +} + +fftw_codelet_desc fftwi_no_twiddle_7_desc = +{ + "fftwi_no_twiddle_7", + (void (*)()) fftwi_no_twiddle_7, + 7, + FFTW_BACKWARD, + FFTW_NOTW, + 166, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fni_8.c b/src/sndobj/rfftw/fni_8.c new file mode 100644 index 0000000..75857c5 --- /dev/null +++ b/src/sndobj/rfftw/fni_8.c @@ -0,0 +1,201 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:06 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddleinv 8 */ + +/* + * This function contains 52 FP additions, 4 FP multiplications, + * (or, 52 additions, 4 multiplications, 0 fused multiply/add), + * 26 stack variables, and 32 memory accesses + */ +static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); + +/* + * Generator Id's : + * $Id: fni_8.c,v 1.1.1.1 2006/05/12 15:14:59 veplaini Exp $ + * $Id: fni_8.c,v 1.1.1.1 2006/05/12 15:14:59 veplaini Exp $ + * $Id: fni_8.c,v 1.1.1.1 2006/05/12 15:14:59 veplaini Exp $ + */ + +void fftwi_no_twiddle_8(const fftw_complex *input, fftw_complex *output, int istride, int ostride) +{ + fftw_real tmp3; + fftw_real tmp37; + fftw_real tmp18; + fftw_real tmp23; + fftw_real tmp6; + fftw_real tmp24; + fftw_real tmp21; + fftw_real tmp38; + fftw_real tmp13; + fftw_real tmp49; + fftw_real tmp35; + fftw_real tmp43; + fftw_real tmp10; + fftw_real tmp48; + fftw_real tmp30; + fftw_real tmp42; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp19; + fftw_real tmp20; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(input[0]); + tmp2 = c_re(input[4 * istride]); + tmp3 = tmp1 + tmp2; + tmp37 = tmp1 - tmp2; + { + fftw_real tmp16; + fftw_real tmp17; + fftw_real tmp4; + fftw_real tmp5; + ASSERT_ALIGNED_DOUBLE; + tmp16 = c_im(input[0]); + tmp17 = c_im(input[4 * istride]); + tmp18 = tmp16 + tmp17; + tmp23 = tmp16 - tmp17; + tmp4 = c_re(input[2 * istride]); + tmp5 = c_re(input[6 * istride]); + tmp6 = tmp4 + tmp5; + tmp24 = tmp4 - tmp5; + } + tmp19 = c_im(input[2 * istride]); + tmp20 = c_im(input[6 * istride]); + tmp21 = tmp19 + tmp20; + tmp38 = tmp19 - tmp20; + { + fftw_real tmp11; + fftw_real tmp12; + fftw_real tmp31; + fftw_real tmp32; + fftw_real tmp33; + fftw_real tmp34; + ASSERT_ALIGNED_DOUBLE; + tmp11 = c_re(input[7 * istride]); + tmp12 = c_re(input[3 * istride]); + tmp31 = tmp11 - tmp12; + tmp32 = c_im(input[7 * istride]); + tmp33 = c_im(input[3 * istride]); + tmp34 = tmp32 - tmp33; + tmp13 = tmp11 + tmp12; + tmp49 = tmp32 + tmp33; + tmp35 = tmp31 + tmp34; + tmp43 = tmp34 - tmp31; + } + { + fftw_real tmp8; + fftw_real tmp9; + fftw_real tmp26; + fftw_real tmp27; + fftw_real tmp28; + fftw_real tmp29; + ASSERT_ALIGNED_DOUBLE; + tmp8 = c_re(input[istride]); + tmp9 = c_re(input[5 * istride]); + tmp26 = tmp8 - tmp9; + tmp27 = c_im(input[istride]); + tmp28 = c_im(input[5 * istride]); + tmp29 = tmp27 - tmp28; + tmp10 = tmp8 + tmp9; + tmp48 = tmp27 + tmp28; + tmp30 = tmp26 - tmp29; + tmp42 = tmp26 + tmp29; + } + } + { + fftw_real tmp7; + fftw_real tmp14; + fftw_real tmp15; + fftw_real tmp22; + ASSERT_ALIGNED_DOUBLE; + tmp7 = tmp3 + tmp6; + tmp14 = tmp10 + tmp13; + c_re(output[4 * ostride]) = tmp7 - tmp14; + c_re(output[0]) = tmp7 + tmp14; + tmp15 = tmp10 - tmp13; + tmp22 = tmp18 - tmp21; + c_im(output[2 * ostride]) = tmp15 + tmp22; + c_im(output[6 * ostride]) = tmp22 - tmp15; + } + { + fftw_real tmp47; + fftw_real tmp50; + fftw_real tmp51; + fftw_real tmp52; + ASSERT_ALIGNED_DOUBLE; + tmp47 = tmp18 + tmp21; + tmp50 = tmp48 + tmp49; + c_im(output[4 * ostride]) = tmp47 - tmp50; + c_im(output[0]) = tmp47 + tmp50; + tmp51 = tmp3 - tmp6; + tmp52 = tmp49 - tmp48; + c_re(output[6 * ostride]) = tmp51 - tmp52; + c_re(output[2 * ostride]) = tmp51 + tmp52; + } + { + fftw_real tmp25; + fftw_real tmp36; + fftw_real tmp39; + fftw_real tmp40; + ASSERT_ALIGNED_DOUBLE; + tmp25 = tmp23 - tmp24; + tmp36 = K707106781 * (tmp30 - tmp35); + c_im(output[7 * ostride]) = tmp25 - tmp36; + c_im(output[3 * ostride]) = tmp25 + tmp36; + tmp39 = tmp37 - tmp38; + tmp40 = K707106781 * (tmp30 + tmp35); + c_re(output[5 * ostride]) = tmp39 - tmp40; + c_re(output[ostride]) = tmp39 + tmp40; + } + { + fftw_real tmp45; + fftw_real tmp46; + fftw_real tmp41; + fftw_real tmp44; + ASSERT_ALIGNED_DOUBLE; + tmp45 = tmp37 + tmp38; + tmp46 = K707106781 * (tmp43 - tmp42); + c_re(output[7 * ostride]) = tmp45 - tmp46; + c_re(output[3 * ostride]) = tmp45 + tmp46; + tmp41 = tmp24 + tmp23; + tmp44 = K707106781 * (tmp42 + tmp43); + c_im(output[5 * ostride]) = tmp41 - tmp44; + c_im(output[ostride]) = tmp41 + tmp44; + } +} + +fftw_codelet_desc fftwi_no_twiddle_8_desc = +{ + "fftwi_no_twiddle_8", + (void (*)()) fftwi_no_twiddle_8, + 8, + FFTW_BACKWARD, + FFTW_NOTW, + 188, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/fni_9.c b/src/sndobj/rfftw/fni_9.c new file mode 100644 index 0000000..4ce257e --- /dev/null +++ b/src/sndobj/rfftw/fni_9.c @@ -0,0 +1,275 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:07 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddleinv 9 */ + +/* + * This function contains 80 FP additions, 40 FP multiplications, + * (or, 60 additions, 20 multiplications, 20 fused multiply/add), + * 30 stack variables, and 36 memory accesses + */ +static const fftw_real K642787609 = FFTW_KONST(+0.642787609686539326322643409907263432907559884); +static const fftw_real K766044443 = FFTW_KONST(+0.766044443118978035202392650555416673935832457); +static const fftw_real K939692620 = FFTW_KONST(+0.939692620785908384054109277324731469936208134); +static const fftw_real K342020143 = FFTW_KONST(+0.342020143325668733044099614682259580763083368); +static const fftw_real K984807753 = FFTW_KONST(+0.984807753012208059366743024589523013670643252); +static const fftw_real K173648177 = FFTW_KONST(+0.173648177666930348851716626769314796000375677); +static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); +static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); + +/* + * Generator Id's : + * $Id: fni_9.c,v 1.1.1.1 2006/05/12 15:14:55 veplaini Exp $ + * $Id: fni_9.c,v 1.1.1.1 2006/05/12 15:14:55 veplaini Exp $ + * $Id: fni_9.c,v 1.1.1.1 2006/05/12 15:14:55 veplaini Exp $ + */ + +void fftwi_no_twiddle_9(const fftw_complex *input, fftw_complex *output, int istride, int ostride) +{ + fftw_real tmp5; + fftw_real tmp37; + fftw_real tmp57; + fftw_real tmp22; + fftw_real tmp56; + fftw_real tmp38; + fftw_real tmp10; + fftw_real tmp42; + fftw_real tmp66; + fftw_real tmp27; + fftw_real tmp45; + fftw_real tmp67; + fftw_real tmp15; + fftw_real tmp52; + fftw_real tmp69; + fftw_real tmp32; + fftw_real tmp49; + fftw_real tmp70; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp3; + fftw_real tmp4; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(input[0]); + tmp2 = c_re(input[3 * istride]); + tmp3 = c_re(input[6 * istride]); + tmp4 = tmp2 + tmp3; + tmp5 = tmp1 + tmp4; + tmp37 = tmp1 - (K500000000 * tmp4); + tmp57 = K866025403 * (tmp2 - tmp3); + } + { + fftw_real tmp18; + fftw_real tmp19; + fftw_real tmp20; + fftw_real tmp21; + ASSERT_ALIGNED_DOUBLE; + tmp18 = c_im(input[0]); + tmp19 = c_im(input[3 * istride]); + tmp20 = c_im(input[6 * istride]); + tmp21 = tmp19 + tmp20; + tmp22 = tmp18 + tmp21; + tmp56 = tmp18 - (K500000000 * tmp21); + tmp38 = K866025403 * (tmp20 - tmp19); + } + { + fftw_real tmp6; + fftw_real tmp23; + fftw_real tmp9; + fftw_real tmp44; + fftw_real tmp26; + fftw_real tmp41; + fftw_real tmp40; + fftw_real tmp43; + ASSERT_ALIGNED_DOUBLE; + tmp6 = c_re(input[istride]); + tmp23 = c_im(input[istride]); + { + fftw_real tmp7; + fftw_real tmp8; + fftw_real tmp24; + fftw_real tmp25; + ASSERT_ALIGNED_DOUBLE; + tmp7 = c_re(input[4 * istride]); + tmp8 = c_re(input[7 * istride]); + tmp9 = tmp7 + tmp8; + tmp44 = K866025403 * (tmp7 - tmp8); + tmp24 = c_im(input[4 * istride]); + tmp25 = c_im(input[7 * istride]); + tmp26 = tmp24 + tmp25; + tmp41 = K866025403 * (tmp25 - tmp24); + } + tmp10 = tmp6 + tmp9; + tmp40 = tmp6 - (K500000000 * tmp9); + tmp42 = tmp40 - tmp41; + tmp66 = tmp40 + tmp41; + tmp27 = tmp23 + tmp26; + tmp43 = tmp23 - (K500000000 * tmp26); + tmp45 = tmp43 - tmp44; + tmp67 = tmp44 + tmp43; + } + { + fftw_real tmp11; + fftw_real tmp28; + fftw_real tmp14; + fftw_real tmp48; + fftw_real tmp31; + fftw_real tmp51; + fftw_real tmp50; + fftw_real tmp47; + ASSERT_ALIGNED_DOUBLE; + tmp11 = c_re(input[2 * istride]); + tmp28 = c_im(input[2 * istride]); + { + fftw_real tmp12; + fftw_real tmp13; + fftw_real tmp29; + fftw_real tmp30; + ASSERT_ALIGNED_DOUBLE; + tmp12 = c_re(input[5 * istride]); + tmp13 = c_re(input[8 * istride]); + tmp14 = tmp12 + tmp13; + tmp48 = K866025403 * (tmp12 - tmp13); + tmp29 = c_im(input[5 * istride]); + tmp30 = c_im(input[8 * istride]); + tmp31 = tmp29 + tmp30; + tmp51 = K866025403 * (tmp30 - tmp29); + } + tmp15 = tmp11 + tmp14; + tmp50 = tmp11 - (K500000000 * tmp14); + tmp52 = tmp50 - tmp51; + tmp69 = tmp50 + tmp51; + tmp32 = tmp28 + tmp31; + tmp47 = tmp28 - (K500000000 * tmp31); + tmp49 = tmp47 - tmp48; + tmp70 = tmp48 + tmp47; + } + { + fftw_real tmp36; + fftw_real tmp16; + fftw_real tmp35; + fftw_real tmp17; + fftw_real tmp33; + fftw_real tmp34; + ASSERT_ALIGNED_DOUBLE; + tmp36 = K866025403 * (tmp32 - tmp27); + tmp16 = tmp10 + tmp15; + tmp35 = tmp5 - (K500000000 * tmp16); + c_re(output[0]) = tmp5 + tmp16; + c_re(output[3 * ostride]) = tmp35 + tmp36; + c_re(output[6 * ostride]) = tmp35 - tmp36; + tmp17 = K866025403 * (tmp10 - tmp15); + tmp33 = tmp27 + tmp32; + tmp34 = tmp22 - (K500000000 * tmp33); + c_im(output[3 * ostride]) = tmp17 + tmp34; + c_im(output[6 * ostride]) = tmp34 - tmp17; + c_im(output[0]) = tmp22 + tmp33; + } + { + fftw_real tmp39; + fftw_real tmp61; + fftw_real tmp64; + fftw_real tmp58; + fftw_real tmp54; + fftw_real tmp55; + fftw_real tmp63; + fftw_real tmp62; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp59; + fftw_real tmp60; + fftw_real tmp46; + fftw_real tmp53; + ASSERT_ALIGNED_DOUBLE; + tmp39 = tmp37 - tmp38; + tmp59 = (K173648177 * tmp45) + (K984807753 * tmp42); + tmp60 = (K342020143 * tmp52) - (K939692620 * tmp49); + tmp61 = tmp59 + tmp60; + tmp64 = K866025403 * (tmp60 - tmp59); + tmp58 = tmp56 - tmp57; + tmp46 = (K173648177 * tmp42) - (K984807753 * tmp45); + tmp53 = (K342020143 * tmp49) + (K939692620 * tmp52); + tmp54 = tmp46 - tmp53; + tmp55 = K866025403 * (tmp46 + tmp53); + } + c_re(output[2 * ostride]) = tmp39 + tmp54; + tmp63 = tmp39 - (K500000000 * tmp54); + c_re(output[8 * ostride]) = tmp63 - tmp64; + c_re(output[5 * ostride]) = tmp63 + tmp64; + c_im(output[2 * ostride]) = tmp58 + tmp61; + tmp62 = tmp58 - (K500000000 * tmp61); + c_im(output[5 * ostride]) = tmp55 + tmp62; + c_im(output[8 * ostride]) = tmp62 - tmp55; + } + { + fftw_real tmp65; + fftw_real tmp77; + fftw_real tmp80; + fftw_real tmp74; + fftw_real tmp72; + fftw_real tmp73; + fftw_real tmp79; + fftw_real tmp78; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp75; + fftw_real tmp76; + fftw_real tmp68; + fftw_real tmp71; + ASSERT_ALIGNED_DOUBLE; + tmp65 = tmp37 + tmp38; + tmp75 = (K766044443 * tmp67) + (K642787609 * tmp66); + tmp76 = (K173648177 * tmp70) + (K984807753 * tmp69); + tmp77 = tmp75 + tmp76; + tmp80 = K866025403 * (tmp76 - tmp75); + tmp74 = tmp57 + tmp56; + tmp68 = (K766044443 * tmp66) - (K642787609 * tmp67); + tmp71 = (K173648177 * tmp69) - (K984807753 * tmp70); + tmp72 = tmp68 + tmp71; + tmp73 = K866025403 * (tmp68 - tmp71); + } + c_re(output[ostride]) = tmp65 + tmp72; + tmp79 = tmp65 - (K500000000 * tmp72); + c_re(output[7 * ostride]) = tmp79 - tmp80; + c_re(output[4 * ostride]) = tmp79 + tmp80; + c_im(output[ostride]) = tmp74 + tmp77; + tmp78 = tmp74 - (K500000000 * tmp77); + c_im(output[4 * ostride]) = tmp73 + tmp78; + c_im(output[7 * ostride]) = tmp78 - tmp73; + } +} + +fftw_codelet_desc fftwi_no_twiddle_9_desc = +{ + "fftwi_no_twiddle_9", + (void (*)()) fftwi_no_twiddle_9, + 9, + FFTW_BACKWARD, + FFTW_NOTW, + 210, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/frc_1.c b/src/sndobj/rfftw/frc_1.c new file mode 100644 index 0000000..59c70bb --- /dev/null +++ b/src/sndobj/rfftw/frc_1.c @@ -0,0 +1,59 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:43:52 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -real2hc 1 */ + +/* + * This function contains 0 FP additions, 0 FP multiplications, + * (or, 0 additions, 0 multiplications, 0 fused multiply/add), + * 1 stack variables, and 2 memory accesses + */ + +/* + * Generator Id's : + * $Id: frc_1.c,v 1.1.1.1 2006/05/12 15:14:56 veplaini Exp $ + * $Id: frc_1.c,v 1.1.1.1 2006/05/12 15:14:56 veplaini Exp $ + * $Id: frc_1.c,v 1.1.1.1 2006/05/12 15:14:56 veplaini Exp $ + */ + +void fftw_real2hc_1(const fftw_real *input, fftw_real *real_output, fftw_real *imag_output, int istride, int real_ostride, int imag_ostride) +{ + fftw_real tmp1; + ASSERT_ALIGNED_DOUBLE; + tmp1 = input[0]; + real_output[0] = tmp1; +} + +fftw_codelet_desc fftw_real2hc_1_desc = +{ + "fftw_real2hc_1", + (void (*)()) fftw_real2hc_1, + 1, + FFTW_FORWARD, + FFTW_REAL2HC, + 24, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/frc_10.c b/src/sndobj/rfftw/frc_10.c new file mode 100644 index 0000000..985d92d --- /dev/null +++ b/src/sndobj/rfftw/frc_10.c @@ -0,0 +1,150 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:43:55 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -real2hc 10 */ + +/* + * This function contains 34 FP additions, 12 FP multiplications, + * (or, 28 additions, 6 multiplications, 6 fused multiply/add), + * 22 stack variables, and 20 memory accesses + */ +static const fftw_real K587785252 = FFTW_KONST(+0.587785252292473129168705954639072768597652438); +static const fftw_real K951056516 = FFTW_KONST(+0.951056516295153572116439333379382143405698634); +static const fftw_real K250000000 = FFTW_KONST(+0.250000000000000000000000000000000000000000000); +static const fftw_real K559016994 = FFTW_KONST(+0.559016994374947424102293417182819058860154590); + +/* + * Generator Id's : + * $Id: frc_10.c,v 1.1.1.1 2006/05/12 15:14:48 veplaini Exp $ + * $Id: frc_10.c,v 1.1.1.1 2006/05/12 15:14:48 veplaini Exp $ + * $Id: frc_10.c,v 1.1.1.1 2006/05/12 15:14:48 veplaini Exp $ + */ + +void fftw_real2hc_10(const fftw_real *input, fftw_real *real_output, fftw_real *imag_output, int istride, int real_ostride, int imag_ostride) +{ + fftw_real tmp18; + fftw_real tmp29; + fftw_real tmp10; + fftw_real tmp23; + fftw_real tmp13; + fftw_real tmp24; + fftw_real tmp14; + fftw_real tmp31; + fftw_real tmp3; + fftw_real tmp26; + fftw_real tmp6; + fftw_real tmp27; + fftw_real tmp7; + fftw_real tmp30; + fftw_real tmp16; + fftw_real tmp17; + ASSERT_ALIGNED_DOUBLE; + tmp16 = input[0]; + tmp17 = input[5 * istride]; + tmp18 = tmp16 - tmp17; + tmp29 = tmp16 + tmp17; + { + fftw_real tmp8; + fftw_real tmp9; + fftw_real tmp11; + fftw_real tmp12; + ASSERT_ALIGNED_DOUBLE; + tmp8 = input[4 * istride]; + tmp9 = input[9 * istride]; + tmp10 = tmp8 - tmp9; + tmp23 = tmp8 + tmp9; + tmp11 = input[6 * istride]; + tmp12 = input[istride]; + tmp13 = tmp11 - tmp12; + tmp24 = tmp11 + tmp12; + } + tmp14 = tmp10 + tmp13; + tmp31 = tmp23 + tmp24; + { + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp4; + fftw_real tmp5; + ASSERT_ALIGNED_DOUBLE; + tmp1 = input[2 * istride]; + tmp2 = input[7 * istride]; + tmp3 = tmp1 - tmp2; + tmp26 = tmp1 + tmp2; + tmp4 = input[8 * istride]; + tmp5 = input[3 * istride]; + tmp6 = tmp4 - tmp5; + tmp27 = tmp4 + tmp5; + } + tmp7 = tmp3 + tmp6; + tmp30 = tmp26 + tmp27; + { + fftw_real tmp15; + fftw_real tmp19; + fftw_real tmp20; + fftw_real tmp34; + fftw_real tmp32; + fftw_real tmp33; + ASSERT_ALIGNED_DOUBLE; + tmp15 = K559016994 * (tmp7 - tmp14); + tmp19 = tmp7 + tmp14; + tmp20 = tmp18 - (K250000000 * tmp19); + real_output[real_ostride] = tmp15 + tmp20; + real_output[3 * real_ostride] = tmp20 - tmp15; + real_output[5 * real_ostride] = tmp18 + tmp19; + tmp34 = K559016994 * (tmp30 - tmp31); + tmp32 = tmp30 + tmp31; + tmp33 = tmp29 - (K250000000 * tmp32); + real_output[2 * real_ostride] = tmp33 - tmp34; + real_output[4 * real_ostride] = tmp34 + tmp33; + real_output[0] = tmp29 + tmp32; + } + { + fftw_real tmp21; + fftw_real tmp22; + fftw_real tmp25; + fftw_real tmp28; + ASSERT_ALIGNED_DOUBLE; + tmp21 = tmp3 - tmp6; + tmp22 = tmp10 - tmp13; + imag_output[imag_ostride] = -((K951056516 * tmp21) + (K587785252 * tmp22)); + imag_output[3 * imag_ostride] = (K587785252 * tmp21) - (K951056516 * tmp22); + tmp25 = tmp23 - tmp24; + tmp28 = tmp26 - tmp27; + imag_output[2 * imag_ostride] = (K951056516 * tmp25) - (K587785252 * tmp28); + imag_output[4 * imag_ostride] = (K951056516 * tmp28) + (K587785252 * tmp25); + } +} + +fftw_codelet_desc fftw_real2hc_10_desc = +{ + "fftw_real2hc_10", + (void (*)()) fftw_real2hc_10, + 10, + FFTW_FORWARD, + FFTW_REAL2HC, + 222, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/frc_11.c b/src/sndobj/rfftw/frc_11.c new file mode 100644 index 0000000..2b86e25 --- /dev/null +++ b/src/sndobj/rfftw/frc_11.c @@ -0,0 +1,125 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:43:55 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -real2hc 11 */ + +/* + * This function contains 60 FP additions, 50 FP multiplications, + * (or, 60 additions, 50 multiplications, 0 fused multiply/add), + * 17 stack variables, and 22 memory accesses + */ +static const fftw_real K654860733 = FFTW_KONST(+0.654860733945285064056925072466293553183791199); +static const fftw_real K142314838 = FFTW_KONST(+0.142314838273285140443792668616369668791051361); +static const fftw_real K959492973 = FFTW_KONST(+0.959492973614497389890368057066327699062454848); +static const fftw_real K415415013 = FFTW_KONST(+0.415415013001886425529274149229623203524004910); +static const fftw_real K841253532 = FFTW_KONST(+0.841253532831181168861811648919367717513292498); +static const fftw_real K989821441 = FFTW_KONST(+0.989821441880932732376092037776718787376519372); +static const fftw_real K909631995 = FFTW_KONST(+0.909631995354518371411715383079028460060241051); +static const fftw_real K281732556 = FFTW_KONST(+0.281732556841429697711417915346616899035777899); +static const fftw_real K540640817 = FFTW_KONST(+0.540640817455597582107635954318691695431770608); +static const fftw_real K755749574 = FFTW_KONST(+0.755749574354258283774035843972344420179717445); + +/* + * Generator Id's : + * $Id: frc_11.c,v 1.1.1.1 2006/05/12 15:14:56 veplaini Exp $ + * $Id: frc_11.c,v 1.1.1.1 2006/05/12 15:14:56 veplaini Exp $ + * $Id: frc_11.c,v 1.1.1.1 2006/05/12 15:14:56 veplaini Exp $ + */ + +void fftw_real2hc_11(const fftw_real *input, fftw_real *real_output, fftw_real *imag_output, int istride, int real_ostride, int imag_ostride) +{ + fftw_real tmp1; + fftw_real tmp4; + fftw_real tmp21; + fftw_real tmp16; + fftw_real tmp17; + fftw_real tmp13; + fftw_real tmp18; + fftw_real tmp10; + fftw_real tmp20; + fftw_real tmp7; + fftw_real tmp19; + fftw_real tmp11; + fftw_real tmp12; + ASSERT_ALIGNED_DOUBLE; + tmp1 = input[0]; + { + fftw_real tmp2; + fftw_real tmp3; + fftw_real tmp14; + fftw_real tmp15; + ASSERT_ALIGNED_DOUBLE; + tmp2 = input[2 * istride]; + tmp3 = input[9 * istride]; + tmp4 = tmp2 + tmp3; + tmp21 = tmp3 - tmp2; + tmp14 = input[istride]; + tmp15 = input[10 * istride]; + tmp16 = tmp14 + tmp15; + tmp17 = tmp15 - tmp14; + } + tmp11 = input[3 * istride]; + tmp12 = input[8 * istride]; + tmp13 = tmp11 + tmp12; + tmp18 = tmp12 - tmp11; + { + fftw_real tmp8; + fftw_real tmp9; + fftw_real tmp5; + fftw_real tmp6; + ASSERT_ALIGNED_DOUBLE; + tmp8 = input[5 * istride]; + tmp9 = input[6 * istride]; + tmp10 = tmp8 + tmp9; + tmp20 = tmp9 - tmp8; + tmp5 = input[4 * istride]; + tmp6 = input[7 * istride]; + tmp7 = tmp5 + tmp6; + tmp19 = tmp6 - tmp5; + } + imag_output[4 * imag_ostride] = (K755749574 * tmp17) + (K540640817 * tmp18) + (K281732556 * tmp19) - (K909631995 * tmp20) - (K989821441 * tmp21); + imag_output[imag_ostride] = (K540640817 * tmp17) + (K909631995 * tmp21) + (K989821441 * tmp18) + (K755749574 * tmp19) + (K281732556 * tmp20); + imag_output[5 * imag_ostride] = (K281732556 * tmp17) + (K755749574 * tmp18) + (K989821441 * tmp20) - (K909631995 * tmp19) - (K540640817 * tmp21); + imag_output[2 * imag_ostride] = (K909631995 * tmp17) + (K755749574 * tmp21) - (K540640817 * tmp20) - (K989821441 * tmp19) - (K281732556 * tmp18); + imag_output[3 * imag_ostride] = (K989821441 * tmp17) + (K540640817 * tmp19) + (K755749574 * tmp20) - (K909631995 * tmp18) - (K281732556 * tmp21); + real_output[4 * real_ostride] = tmp1 + (K841253532 * tmp13) + (K415415013 * tmp10) - (K959492973 * tmp7) - (K142314838 * tmp4) - (K654860733 * tmp16); + real_output[5 * real_ostride] = tmp1 + (K841253532 * tmp4) + (K415415013 * tmp7) - (K142314838 * tmp10) - (K654860733 * tmp13) - (K959492973 * tmp16); + real_output[real_ostride] = tmp1 + (K841253532 * tmp16) + (K415415013 * tmp4) - (K959492973 * tmp10) - (K654860733 * tmp7) - (K142314838 * tmp13); + real_output[0] = tmp1 + tmp16 + tmp4 + tmp13 + tmp7 + tmp10; + real_output[3 * real_ostride] = tmp1 + (K415415013 * tmp13) + (K841253532 * tmp7) - (K654860733 * tmp10) - (K959492973 * tmp4) - (K142314838 * tmp16); + real_output[2 * real_ostride] = tmp1 + (K415415013 * tmp16) + (K841253532 * tmp10) - (K142314838 * tmp7) - (K959492973 * tmp13) - (K654860733 * tmp4); +} + +fftw_codelet_desc fftw_real2hc_11_desc = +{ + "fftw_real2hc_11", + (void (*)()) fftw_real2hc_11, + 11, + FFTW_FORWARD, + FFTW_REAL2HC, + 244, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/frc_12.c b/src/sndobj/rfftw/frc_12.c new file mode 100644 index 0000000..3e573bf --- /dev/null +++ b/src/sndobj/rfftw/frc_12.c @@ -0,0 +1,164 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:43:55 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -real2hc 12 */ + +/* + * This function contains 38 FP additions, 8 FP multiplications, + * (or, 34 additions, 4 multiplications, 4 fused multiply/add), + * 18 stack variables, and 24 memory accesses + */ +static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); +static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); + +/* + * Generator Id's : + * $Id: frc_12.c,v 1.1.1.1 2006/05/12 15:14:56 veplaini Exp $ + * $Id: frc_12.c,v 1.1.1.1 2006/05/12 15:14:56 veplaini Exp $ + * $Id: frc_12.c,v 1.1.1.1 2006/05/12 15:14:56 veplaini Exp $ + */ + +void fftw_real2hc_12(const fftw_real *input, fftw_real *real_output, fftw_real *imag_output, int istride, int real_ostride, int imag_ostride) +{ + fftw_real tmp5; + fftw_real tmp25; + fftw_real tmp11; + fftw_real tmp23; + fftw_real tmp30; + fftw_real tmp35; + fftw_real tmp10; + fftw_real tmp26; + fftw_real tmp12; + fftw_real tmp18; + fftw_real tmp29; + fftw_real tmp34; + fftw_real tmp31; + fftw_real tmp32; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp3; + fftw_real tmp4; + ASSERT_ALIGNED_DOUBLE; + tmp1 = input[0]; + tmp2 = input[4 * istride]; + tmp3 = input[8 * istride]; + tmp4 = tmp2 + tmp3; + tmp5 = tmp1 + tmp4; + tmp25 = tmp1 - (K500000000 * tmp4); + tmp11 = tmp3 - tmp2; + } + { + fftw_real tmp19; + fftw_real tmp20; + fftw_real tmp21; + fftw_real tmp22; + ASSERT_ALIGNED_DOUBLE; + tmp19 = input[9 * istride]; + tmp20 = input[istride]; + tmp21 = input[5 * istride]; + tmp22 = tmp20 + tmp21; + tmp23 = tmp19 - (K500000000 * tmp22); + tmp30 = tmp19 + tmp22; + tmp35 = tmp21 - tmp20; + } + { + fftw_real tmp6; + fftw_real tmp7; + fftw_real tmp8; + fftw_real tmp9; + ASSERT_ALIGNED_DOUBLE; + tmp6 = input[6 * istride]; + tmp7 = input[10 * istride]; + tmp8 = input[2 * istride]; + tmp9 = tmp7 + tmp8; + tmp10 = tmp6 + tmp9; + tmp26 = tmp6 - (K500000000 * tmp9); + tmp12 = tmp8 - tmp7; + } + { + fftw_real tmp14; + fftw_real tmp15; + fftw_real tmp16; + fftw_real tmp17; + ASSERT_ALIGNED_DOUBLE; + tmp14 = input[3 * istride]; + tmp15 = input[7 * istride]; + tmp16 = input[11 * istride]; + tmp17 = tmp15 + tmp16; + tmp18 = tmp14 - (K500000000 * tmp17); + tmp29 = tmp14 + tmp17; + tmp34 = tmp16 - tmp15; + } + real_output[3 * real_ostride] = tmp5 - tmp10; + imag_output[3 * imag_ostride] = tmp29 - tmp30; + tmp31 = tmp5 + tmp10; + tmp32 = tmp29 + tmp30; + real_output[6 * real_ostride] = tmp31 - tmp32; + real_output[0] = tmp31 + tmp32; + { + fftw_real tmp37; + fftw_real tmp38; + fftw_real tmp33; + fftw_real tmp36; + ASSERT_ALIGNED_DOUBLE; + tmp37 = tmp34 + tmp35; + tmp38 = tmp11 + tmp12; + imag_output[2 * imag_ostride] = K866025403 * (tmp37 - tmp38); + imag_output[4 * imag_ostride] = K866025403 * (tmp38 + tmp37); + tmp33 = tmp25 - tmp26; + tmp36 = K866025403 * (tmp34 - tmp35); + real_output[5 * real_ostride] = tmp33 - tmp36; + real_output[real_ostride] = tmp33 + tmp36; + } + { + fftw_real tmp27; + fftw_real tmp28; + fftw_real tmp13; + fftw_real tmp24; + ASSERT_ALIGNED_DOUBLE; + tmp27 = tmp25 + tmp26; + tmp28 = tmp18 + tmp23; + real_output[2 * real_ostride] = tmp27 - tmp28; + real_output[4 * real_ostride] = tmp27 + tmp28; + tmp13 = K866025403 * (tmp11 - tmp12); + tmp24 = tmp18 - tmp23; + imag_output[imag_ostride] = tmp13 - tmp24; + imag_output[5 * imag_ostride] = -(tmp13 + tmp24); + } +} + +fftw_codelet_desc fftw_real2hc_12_desc = +{ + "fftw_real2hc_12", + (void (*)()) fftw_real2hc_12, + 12, + FFTW_FORWARD, + FFTW_REAL2HC, + 266, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/frc_128.c b/src/sndobj/rfftw/frc_128.c new file mode 100644 index 0000000..0cef0ac --- /dev/null +++ b/src/sndobj/rfftw/frc_128.c @@ -0,0 +1,2574 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:43:59 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -real2hc 128 */ + +/* + * This function contains 956 FP additions, 330 FP multiplications, + * (or, 812 additions, 186 multiplications, 144 fused multiply/add), + * 156 stack variables, and 256 memory accesses + */ +static const fftw_real K242980179 = FFTW_KONST(+0.242980179903263889948274162077471118320990783); +static const fftw_real K970031253 = FFTW_KONST(+0.970031253194543992603984207286100251456865962); +static const fftw_real K514102744 = FFTW_KONST(+0.514102744193221726593693838968815772608049120); +static const fftw_real K857728610 = FFTW_KONST(+0.857728610000272069902269984284770137042490799); +static const fftw_real K595699304 = FFTW_KONST(+0.595699304492433343467036528829969889511926338); +static const fftw_real K803207531 = FFTW_KONST(+0.803207531480644909806676512963141923879569427); +static const fftw_real K146730474 = FFTW_KONST(+0.146730474455361751658850129646717819706215317); +static const fftw_real K989176509 = FFTW_KONST(+0.989176509964780973451673738016243063983689533); +static const fftw_real K471396736 = FFTW_KONST(+0.471396736825997648556387625905254377657460319); +static const fftw_real K881921264 = FFTW_KONST(+0.881921264348355029712756863660388349508442621); +static const fftw_real K956940335 = FFTW_KONST(+0.956940335732208864935797886980269969482849206); +static const fftw_real K290284677 = FFTW_KONST(+0.290284677254462367636192375817395274691476278); +static const fftw_real K336889853 = FFTW_KONST(+0.336889853392220050689253212619147570477766780); +static const fftw_real K941544065 = FFTW_KONST(+0.941544065183020778412509402599502357185589796); +static const fftw_real K427555093 = FFTW_KONST(+0.427555093430282094320966856888798534304578629); +static const fftw_real K903989293 = FFTW_KONST(+0.903989293123443331586200297230537048710132025); +static const fftw_real K634393284 = FFTW_KONST(+0.634393284163645498215171613225493370675687095); +static const fftw_real K773010453 = FFTW_KONST(+0.773010453362736960810906609758469800971041293); +static const fftw_real K671558954 = FFTW_KONST(+0.671558954847018400625376850427421803228750632); +static const fftw_real K740951125 = FFTW_KONST(+0.740951125354959091175616897495162729728955309); +static const fftw_real K049067674 = FFTW_KONST(+0.049067674327418014254954976942682658314745363); +static const fftw_real K998795456 = FFTW_KONST(+0.998795456205172392714771604759100694443203615); +static const fftw_real K995184726 = FFTW_KONST(+0.995184726672196886244836953109479921575474869); +static const fftw_real K098017140 = FFTW_KONST(+0.098017140329560601994195563888641845861136673); +static const fftw_real K555570233 = FFTW_KONST(+0.555570233019602224742830813948532874374937191); +static const fftw_real K831469612 = FFTW_KONST(+0.831469612302545237078788377617905756738560812); +static const fftw_real K195090322 = FFTW_KONST(+0.195090322016128267848284868477022240927691618); +static const fftw_real K980785280 = FFTW_KONST(+0.980785280403230449126182236134239036973933731); +static const fftw_real K382683432 = FFTW_KONST(+0.382683432365089771728459984030398866761344562); +static const fftw_real K923879532 = FFTW_KONST(+0.923879532511286756128183189396788286822416626); +static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); + +/* + * Generator Id's : + * $Id: frc_128.c,v 1.1.1.1 2006/05/12 15:14:58 veplaini Exp $ + * $Id: frc_128.c,v 1.1.1.1 2006/05/12 15:14:58 veplaini Exp $ + * $Id: frc_128.c,v 1.1.1.1 2006/05/12 15:14:58 veplaini Exp $ + */ + +void fftw_real2hc_128(const fftw_real *input, fftw_real *real_output, fftw_real *imag_output, int istride, int real_ostride, int imag_ostride) +{ + fftw_real tmp783; + fftw_real tmp15; + fftw_real tmp625; + fftw_real tmp862; + fftw_real tmp131; + fftw_real tmp461; + fftw_real tmp364; + fftw_real tmp530; + fftw_real tmp46; + fftw_real tmp626; + fftw_real tmp790; + fftw_real tmp865; + fftw_real tmp148; + fftw_real tmp369; + fftw_real tmp466; + fftw_real tmp533; + fftw_real tmp30; + fftw_real tmp708; + fftw_real tmp786; + fftw_real tmp863; + fftw_real tmp138; + fftw_real tmp531; + fftw_real tmp367; + fftw_real tmp462; + fftw_real tmp307; + fftw_real tmp419; + fftw_real tmp509; + fftw_real tmp583; + fftw_real tmp352; + fftw_real tmp423; + fftw_real tmp520; + fftw_real tmp587; + fftw_real tmp677; + fftw_real tmp747; + fftw_real tmp841; + fftw_real tmp915; + fftw_real tmp852; + fftw_real tmp919; + fftw_real tmp700; + fftw_real tmp748; + fftw_real tmp750; + fftw_real tmp692; + fftw_real tmp701; + fftw_real tmp751; + fftw_real tmp855; + fftw_real tmp916; + fftw_real tmp848; + fftw_real tmp918; + fftw_real tmp324; + fftw_real tmp353; + fftw_real tmp512; + fftw_real tmp521; + fftw_real tmp515; + fftw_real tmp522; + fftw_real tmp341; + fftw_real tmp354; + fftw_real tmp61; + fftw_real tmp627; + fftw_real tmp793; + fftw_real tmp866; + fftw_real tmp157; + fftw_real tmp370; + fftw_real tmp469; + fftw_real tmp534; + fftw_real tmp109; + fftw_real tmp633; + fftw_real tmp809; + fftw_real tmp900; + fftw_real tmp812; + fftw_real tmp901; + fftw_real tmp484; + fftw_real tmp569; + fftw_real tmp193; + fftw_real tmp405; + fftw_real tmp481; + fftw_real tmp568; + fftw_real tmp200; + fftw_real tmp404; + fftw_real tmp124; + fftw_real tmp634; + fftw_real tmp78; + fftw_real tmp630; + fftw_real tmp800; + fftw_real tmp904; + fftw_real tmp803; + fftw_real tmp903; + fftw_real tmp477; + fftw_real tmp571; + fftw_real tmp172; + fftw_real tmp407; + fftw_real tmp474; + fftw_real tmp572; + fftw_real tmp179; + fftw_real tmp408; + fftw_real tmp93; + fftw_real tmp631; + fftw_real tmp230; + fftw_real tmp415; + fftw_real tmp490; + fftw_real tmp579; + fftw_real tmp275; + fftw_real tmp413; + fftw_real tmp501; + fftw_real tmp577; + fftw_real tmp644; + fftw_real tmp740; + fftw_real tmp820; + fftw_real tmp911; + fftw_real tmp831; + fftw_real tmp909; + fftw_real tmp667; + fftw_real tmp741; + fftw_real tmp743; + fftw_real tmp659; + fftw_real tmp668; + fftw_real tmp744; + fftw_real tmp834; + fftw_real tmp912; + fftw_real tmp827; + fftw_real tmp908; + fftw_real tmp247; + fftw_real tmp276; + fftw_real tmp493; + fftw_real tmp502; + fftw_real tmp496; + fftw_real tmp503; + fftw_real tmp264; + fftw_real tmp277; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp3; + fftw_real tmp127; + fftw_real tmp13; + fftw_real tmp129; + fftw_real tmp6; + fftw_real tmp363; + fftw_real tmp10; + fftw_real tmp128; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp11; + fftw_real tmp12; + ASSERT_ALIGNED_DOUBLE; + tmp1 = input[0]; + tmp2 = input[64 * istride]; + tmp3 = tmp1 + tmp2; + tmp127 = tmp1 - tmp2; + tmp11 = input[112 * istride]; + tmp12 = input[48 * istride]; + tmp13 = tmp11 + tmp12; + tmp129 = tmp11 - tmp12; + } + { + fftw_real tmp4; + fftw_real tmp5; + fftw_real tmp8; + fftw_real tmp9; + ASSERT_ALIGNED_DOUBLE; + tmp4 = input[32 * istride]; + tmp5 = input[96 * istride]; + tmp6 = tmp4 + tmp5; + tmp363 = tmp4 - tmp5; + tmp8 = input[16 * istride]; + tmp9 = input[80 * istride]; + tmp10 = tmp8 + tmp9; + tmp128 = tmp8 - tmp9; + } + { + fftw_real tmp7; + fftw_real tmp14; + fftw_real tmp130; + fftw_real tmp362; + ASSERT_ALIGNED_DOUBLE; + tmp783 = tmp3 - tmp6; + tmp7 = tmp3 + tmp6; + tmp14 = tmp10 + tmp13; + tmp15 = tmp7 + tmp14; + tmp625 = tmp7 - tmp14; + tmp862 = tmp13 - tmp10; + tmp130 = K707106781 * (tmp128 + tmp129); + tmp131 = tmp127 + tmp130; + tmp461 = tmp127 - tmp130; + tmp362 = K707106781 * (tmp129 - tmp128); + tmp364 = tmp362 - tmp363; + tmp530 = tmp363 + tmp362; + } + } + { + fftw_real tmp34; + fftw_real tmp140; + fftw_real tmp37; + fftw_real tmp146; + fftw_real tmp41; + fftw_real tmp145; + fftw_real tmp143; + fftw_real tmp44; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp32; + fftw_real tmp33; + fftw_real tmp35; + fftw_real tmp36; + ASSERT_ALIGNED_DOUBLE; + tmp32 = input[4 * istride]; + tmp33 = input[68 * istride]; + tmp34 = tmp32 + tmp33; + tmp140 = tmp32 - tmp33; + tmp35 = input[36 * istride]; + tmp36 = input[100 * istride]; + tmp37 = tmp35 + tmp36; + tmp146 = tmp35 - tmp36; + { + fftw_real tmp39; + fftw_real tmp40; + fftw_real tmp141; + fftw_real tmp42; + fftw_real tmp43; + fftw_real tmp142; + ASSERT_ALIGNED_DOUBLE; + tmp39 = input[20 * istride]; + tmp40 = input[84 * istride]; + tmp141 = tmp39 - tmp40; + tmp42 = input[116 * istride]; + tmp43 = input[52 * istride]; + tmp142 = tmp42 - tmp43; + tmp41 = tmp39 + tmp40; + tmp145 = K707106781 * (tmp142 - tmp141); + tmp143 = K707106781 * (tmp141 + tmp142); + tmp44 = tmp42 + tmp43; + } + } + { + fftw_real tmp38; + fftw_real tmp45; + fftw_real tmp788; + fftw_real tmp789; + ASSERT_ALIGNED_DOUBLE; + tmp38 = tmp34 + tmp37; + tmp45 = tmp41 + tmp44; + tmp46 = tmp38 + tmp45; + tmp626 = tmp38 - tmp45; + tmp788 = tmp34 - tmp37; + tmp789 = tmp44 - tmp41; + tmp790 = (K923879532 * tmp788) + (K382683432 * tmp789); + tmp865 = (K923879532 * tmp789) - (K382683432 * tmp788); + } + { + fftw_real tmp144; + fftw_real tmp147; + fftw_real tmp464; + fftw_real tmp465; + ASSERT_ALIGNED_DOUBLE; + tmp144 = tmp140 + tmp143; + tmp147 = tmp145 - tmp146; + tmp148 = (K980785280 * tmp144) + (K195090322 * tmp147); + tmp369 = (K980785280 * tmp147) - (K195090322 * tmp144); + tmp464 = tmp140 - tmp143; + tmp465 = tmp146 + tmp145; + tmp466 = (K831469612 * tmp464) + (K555570233 * tmp465); + tmp533 = (K831469612 * tmp465) - (K555570233 * tmp464); + } + } + { + fftw_real tmp18; + fftw_real tmp132; + fftw_real tmp28; + fftw_real tmp136; + fftw_real tmp21; + fftw_real tmp133; + fftw_real tmp25; + fftw_real tmp135; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp16; + fftw_real tmp17; + fftw_real tmp26; + fftw_real tmp27; + ASSERT_ALIGNED_DOUBLE; + tmp16 = input[8 * istride]; + tmp17 = input[72 * istride]; + tmp18 = tmp16 + tmp17; + tmp132 = tmp16 - tmp17; + tmp26 = input[24 * istride]; + tmp27 = input[88 * istride]; + tmp28 = tmp26 + tmp27; + tmp136 = tmp26 - tmp27; + } + { + fftw_real tmp19; + fftw_real tmp20; + fftw_real tmp23; + fftw_real tmp24; + ASSERT_ALIGNED_DOUBLE; + tmp19 = input[40 * istride]; + tmp20 = input[104 * istride]; + tmp21 = tmp19 + tmp20; + tmp133 = tmp19 - tmp20; + tmp23 = input[120 * istride]; + tmp24 = input[56 * istride]; + tmp25 = tmp23 + tmp24; + tmp135 = tmp23 - tmp24; + } + { + fftw_real tmp22; + fftw_real tmp29; + fftw_real tmp784; + fftw_real tmp785; + ASSERT_ALIGNED_DOUBLE; + tmp22 = tmp18 + tmp21; + tmp29 = tmp25 + tmp28; + tmp30 = tmp22 + tmp29; + tmp708 = tmp29 - tmp22; + tmp784 = tmp18 - tmp21; + tmp785 = tmp25 - tmp28; + tmp786 = K707106781 * (tmp784 + tmp785); + tmp863 = K707106781 * (tmp785 - tmp784); + } + { + fftw_real tmp134; + fftw_real tmp137; + fftw_real tmp365; + fftw_real tmp366; + ASSERT_ALIGNED_DOUBLE; + tmp134 = (K923879532 * tmp132) - (K382683432 * tmp133); + tmp137 = (K923879532 * tmp135) + (K382683432 * tmp136); + tmp138 = tmp134 + tmp137; + tmp531 = tmp137 - tmp134; + tmp365 = (K382683432 * tmp135) - (K923879532 * tmp136); + tmp366 = (K382683432 * tmp132) + (K923879532 * tmp133); + tmp367 = tmp365 - tmp366; + tmp462 = tmp366 + tmp365; + } + } + { + fftw_real tmp283; + fftw_real tmp671; + fftw_real tmp347; + fftw_real tmp672; + fftw_real tmp290; + fftw_real tmp344; + fftw_real tmp674; + fftw_real tmp675; + fftw_real tmp697; + fftw_real tmp698; + fftw_real tmp298; + fftw_real tmp350; + fftw_real tmp838; + fftw_real tmp694; + fftw_real tmp695; + fftw_real tmp305; + fftw_real tmp349; + fftw_real tmp839; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp281; + fftw_real tmp282; + fftw_real tmp345; + fftw_real tmp346; + ASSERT_ALIGNED_DOUBLE; + tmp281 = input[127 * istride]; + tmp282 = input[63 * istride]; + tmp283 = tmp281 - tmp282; + tmp671 = tmp281 + tmp282; + tmp345 = input[31 * istride]; + tmp346 = input[95 * istride]; + tmp347 = tmp345 - tmp346; + tmp672 = tmp345 + tmp346; + } + { + fftw_real tmp284; + fftw_real tmp285; + fftw_real tmp286; + fftw_real tmp287; + fftw_real tmp288; + fftw_real tmp289; + ASSERT_ALIGNED_DOUBLE; + tmp284 = input[15 * istride]; + tmp285 = input[79 * istride]; + tmp286 = tmp284 - tmp285; + tmp287 = input[111 * istride]; + tmp288 = input[47 * istride]; + tmp289 = tmp287 - tmp288; + tmp290 = K707106781 * (tmp286 + tmp289); + tmp344 = K707106781 * (tmp289 - tmp286); + tmp674 = tmp284 + tmp285; + tmp675 = tmp287 + tmp288; + } + { + fftw_real tmp294; + fftw_real tmp297; + fftw_real tmp301; + fftw_real tmp304; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp292; + fftw_real tmp293; + fftw_real tmp295; + fftw_real tmp296; + ASSERT_ALIGNED_DOUBLE; + tmp292 = input[7 * istride]; + tmp293 = input[71 * istride]; + tmp294 = tmp292 - tmp293; + tmp697 = tmp292 + tmp293; + tmp295 = input[39 * istride]; + tmp296 = input[103 * istride]; + tmp297 = tmp295 - tmp296; + tmp698 = tmp295 + tmp296; + } + tmp298 = (K923879532 * tmp294) - (K382683432 * tmp297); + tmp350 = (K382683432 * tmp294) + (K923879532 * tmp297); + tmp838 = tmp697 - tmp698; + { + fftw_real tmp299; + fftw_real tmp300; + fftw_real tmp302; + fftw_real tmp303; + ASSERT_ALIGNED_DOUBLE; + tmp299 = input[119 * istride]; + tmp300 = input[55 * istride]; + tmp301 = tmp299 - tmp300; + tmp694 = tmp299 + tmp300; + tmp302 = input[23 * istride]; + tmp303 = input[87 * istride]; + tmp304 = tmp302 - tmp303; + tmp695 = tmp302 + tmp303; + } + tmp305 = (K923879532 * tmp301) + (K382683432 * tmp304); + tmp349 = (K382683432 * tmp301) - (K923879532 * tmp304); + tmp839 = tmp694 - tmp695; + } + { + fftw_real tmp291; + fftw_real tmp306; + fftw_real tmp507; + fftw_real tmp508; + ASSERT_ALIGNED_DOUBLE; + tmp291 = tmp283 + tmp290; + tmp306 = tmp298 + tmp305; + tmp307 = tmp291 + tmp306; + tmp419 = tmp291 - tmp306; + tmp507 = tmp283 - tmp290; + tmp508 = tmp350 + tmp349; + tmp509 = tmp507 + tmp508; + tmp583 = tmp507 - tmp508; + } + { + fftw_real tmp348; + fftw_real tmp351; + fftw_real tmp518; + fftw_real tmp519; + ASSERT_ALIGNED_DOUBLE; + tmp348 = tmp344 - tmp347; + tmp351 = tmp349 - tmp350; + tmp352 = tmp348 + tmp351; + tmp423 = tmp351 - tmp348; + tmp518 = tmp347 + tmp344; + tmp519 = tmp305 - tmp298; + tmp520 = tmp518 + tmp519; + tmp587 = tmp519 - tmp518; + } + { + fftw_real tmp673; + fftw_real tmp676; + fftw_real tmp837; + fftw_real tmp840; + ASSERT_ALIGNED_DOUBLE; + tmp673 = tmp671 + tmp672; + tmp676 = tmp674 + tmp675; + tmp677 = tmp673 - tmp676; + tmp747 = tmp673 + tmp676; + tmp837 = tmp671 - tmp672; + tmp840 = K707106781 * (tmp838 + tmp839); + tmp841 = tmp837 + tmp840; + tmp915 = tmp837 - tmp840; + } + { + fftw_real tmp850; + fftw_real tmp851; + fftw_real tmp696; + fftw_real tmp699; + ASSERT_ALIGNED_DOUBLE; + tmp850 = tmp675 - tmp674; + tmp851 = K707106781 * (tmp839 - tmp838); + tmp852 = tmp850 + tmp851; + tmp919 = tmp851 - tmp850; + tmp696 = tmp694 + tmp695; + tmp699 = tmp697 + tmp698; + tmp700 = tmp696 - tmp699; + tmp748 = tmp699 + tmp696; + } + } + { + fftw_real tmp310; + fftw_real tmp842; + fftw_real tmp680; + fftw_real tmp322; + fftw_real tmp334; + fftw_real tmp336; + fftw_real tmp690; + fftw_real tmp846; + fftw_real tmp327; + fftw_real tmp845; + fftw_real tmp687; + fftw_real tmp339; + fftw_real tmp317; + fftw_real tmp319; + fftw_real tmp683; + fftw_real tmp843; + fftw_real tmp510; + fftw_real tmp511; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp308; + fftw_real tmp309; + fftw_real tmp678; + fftw_real tmp320; + fftw_real tmp321; + fftw_real tmp679; + ASSERT_ALIGNED_DOUBLE; + tmp308 = input[3 * istride]; + tmp309 = input[67 * istride]; + tmp678 = tmp308 + tmp309; + tmp320 = input[35 * istride]; + tmp321 = input[99 * istride]; + tmp679 = tmp320 + tmp321; + tmp310 = tmp308 - tmp309; + tmp842 = tmp678 - tmp679; + tmp680 = tmp678 + tmp679; + tmp322 = tmp320 - tmp321; + } + { + fftw_real tmp330; + fftw_real tmp688; + fftw_real tmp333; + fftw_real tmp689; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp328; + fftw_real tmp329; + fftw_real tmp331; + fftw_real tmp332; + ASSERT_ALIGNED_DOUBLE; + tmp328 = input[11 * istride]; + tmp329 = input[75 * istride]; + tmp330 = tmp328 - tmp329; + tmp688 = tmp328 + tmp329; + tmp331 = input[107 * istride]; + tmp332 = input[43 * istride]; + tmp333 = tmp331 - tmp332; + tmp689 = tmp331 + tmp332; + } + tmp334 = K707106781 * (tmp330 + tmp333); + tmp336 = K707106781 * (tmp333 - tmp330); + tmp690 = tmp688 + tmp689; + tmp846 = tmp689 - tmp688; + } + { + fftw_real tmp325; + fftw_real tmp326; + fftw_real tmp685; + fftw_real tmp337; + fftw_real tmp338; + fftw_real tmp686; + ASSERT_ALIGNED_DOUBLE; + tmp325 = input[123 * istride]; + tmp326 = input[59 * istride]; + tmp685 = tmp325 + tmp326; + tmp337 = input[27 * istride]; + tmp338 = input[91 * istride]; + tmp686 = tmp337 + tmp338; + tmp327 = tmp325 - tmp326; + tmp845 = tmp685 - tmp686; + tmp687 = tmp685 + tmp686; + tmp339 = tmp337 - tmp338; + } + { + fftw_real tmp313; + fftw_real tmp681; + fftw_real tmp316; + fftw_real tmp682; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp311; + fftw_real tmp312; + fftw_real tmp314; + fftw_real tmp315; + ASSERT_ALIGNED_DOUBLE; + tmp311 = input[19 * istride]; + tmp312 = input[83 * istride]; + tmp313 = tmp311 - tmp312; + tmp681 = tmp311 + tmp312; + tmp314 = input[115 * istride]; + tmp315 = input[51 * istride]; + tmp316 = tmp314 - tmp315; + tmp682 = tmp314 + tmp315; + } + tmp317 = K707106781 * (tmp313 + tmp316); + tmp319 = K707106781 * (tmp316 - tmp313); + tmp683 = tmp681 + tmp682; + tmp843 = tmp682 - tmp681; + } + { + fftw_real tmp684; + fftw_real tmp691; + fftw_real tmp853; + fftw_real tmp854; + ASSERT_ALIGNED_DOUBLE; + tmp750 = tmp680 + tmp683; + tmp684 = tmp680 - tmp683; + tmp691 = tmp687 - tmp690; + tmp692 = K707106781 * (tmp684 + tmp691); + tmp701 = K707106781 * (tmp691 - tmp684); + tmp751 = tmp687 + tmp690; + tmp853 = (K923879532 * tmp843) - (K382683432 * tmp842); + tmp854 = (K382683432 * tmp845) + (K923879532 * tmp846); + tmp855 = tmp853 + tmp854; + tmp916 = tmp854 - tmp853; + } + { + fftw_real tmp844; + fftw_real tmp847; + fftw_real tmp318; + fftw_real tmp323; + ASSERT_ALIGNED_DOUBLE; + tmp844 = (K923879532 * tmp842) + (K382683432 * tmp843); + tmp847 = (K923879532 * tmp845) - (K382683432 * tmp846); + tmp848 = tmp844 + tmp847; + tmp918 = tmp847 - tmp844; + tmp318 = tmp310 + tmp317; + tmp323 = tmp319 - tmp322; + tmp324 = (K980785280 * tmp318) + (K195090322 * tmp323); + tmp353 = (K980785280 * tmp323) - (K195090322 * tmp318); + } + tmp510 = tmp310 - tmp317; + tmp511 = tmp322 + tmp319; + tmp512 = (K831469612 * tmp510) + (K555570233 * tmp511); + tmp521 = (K831469612 * tmp511) - (K555570233 * tmp510); + { + fftw_real tmp513; + fftw_real tmp514; + fftw_real tmp335; + fftw_real tmp340; + ASSERT_ALIGNED_DOUBLE; + tmp513 = tmp327 - tmp334; + tmp514 = tmp339 + tmp336; + tmp515 = (K831469612 * tmp513) - (K555570233 * tmp514); + tmp522 = (K555570233 * tmp513) + (K831469612 * tmp514); + tmp335 = tmp327 + tmp334; + tmp340 = tmp336 - tmp339; + tmp341 = (K980785280 * tmp335) - (K195090322 * tmp340); + tmp354 = (K195090322 * tmp335) + (K980785280 * tmp340); + } + } + { + fftw_real tmp49; + fftw_real tmp149; + fftw_real tmp52; + fftw_real tmp155; + fftw_real tmp56; + fftw_real tmp154; + fftw_real tmp152; + fftw_real tmp59; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp47; + fftw_real tmp48; + fftw_real tmp50; + fftw_real tmp51; + ASSERT_ALIGNED_DOUBLE; + tmp47 = input[124 * istride]; + tmp48 = input[60 * istride]; + tmp49 = tmp47 + tmp48; + tmp149 = tmp47 - tmp48; + tmp50 = input[28 * istride]; + tmp51 = input[92 * istride]; + tmp52 = tmp50 + tmp51; + tmp155 = tmp50 - tmp51; + { + fftw_real tmp54; + fftw_real tmp55; + fftw_real tmp150; + fftw_real tmp57; + fftw_real tmp58; + fftw_real tmp151; + ASSERT_ALIGNED_DOUBLE; + tmp54 = input[12 * istride]; + tmp55 = input[76 * istride]; + tmp150 = tmp54 - tmp55; + tmp57 = input[108 * istride]; + tmp58 = input[44 * istride]; + tmp151 = tmp57 - tmp58; + tmp56 = tmp54 + tmp55; + tmp154 = K707106781 * (tmp151 - tmp150); + tmp152 = K707106781 * (tmp150 + tmp151); + tmp59 = tmp57 + tmp58; + } + } + { + fftw_real tmp53; + fftw_real tmp60; + fftw_real tmp791; + fftw_real tmp792; + ASSERT_ALIGNED_DOUBLE; + tmp53 = tmp49 + tmp52; + tmp60 = tmp56 + tmp59; + tmp61 = tmp53 + tmp60; + tmp627 = tmp53 - tmp60; + tmp791 = tmp49 - tmp52; + tmp792 = tmp59 - tmp56; + tmp793 = (K923879532 * tmp791) - (K382683432 * tmp792); + tmp866 = (K382683432 * tmp791) + (K923879532 * tmp792); + } + { + fftw_real tmp153; + fftw_real tmp156; + fftw_real tmp467; + fftw_real tmp468; + ASSERT_ALIGNED_DOUBLE; + tmp153 = tmp149 + tmp152; + tmp156 = tmp154 - tmp155; + tmp157 = (K980785280 * tmp153) - (K195090322 * tmp156); + tmp370 = (K195090322 * tmp153) + (K980785280 * tmp156); + tmp467 = tmp149 - tmp152; + tmp468 = tmp155 + tmp154; + tmp469 = (K831469612 * tmp467) - (K555570233 * tmp468); + tmp534 = (K555570233 * tmp467) + (K831469612 * tmp468); + } + } + { + fftw_real tmp97; + fftw_real tmp181; + fftw_real tmp119; + fftw_real tmp122; + fftw_real tmp191; + fftw_real tmp197; + fftw_real tmp807; + fftw_real tmp100; + fftw_real tmp195; + fftw_real tmp104; + fftw_real tmp194; + fftw_real tmp184; + fftw_real tmp107; + fftw_real tmp112; + fftw_real tmp115; + fftw_real tmp188; + fftw_real tmp198; + fftw_real tmp806; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp95; + fftw_real tmp96; + fftw_real tmp189; + fftw_real tmp190; + ASSERT_ALIGNED_DOUBLE; + tmp95 = input[126 * istride]; + tmp96 = input[62 * istride]; + tmp97 = tmp95 + tmp96; + tmp181 = tmp95 - tmp96; + { + fftw_real tmp117; + fftw_real tmp118; + fftw_real tmp120; + fftw_real tmp121; + ASSERT_ALIGNED_DOUBLE; + tmp117 = input[118 * istride]; + tmp118 = input[54 * istride]; + tmp119 = tmp117 + tmp118; + tmp189 = tmp117 - tmp118; + tmp120 = input[22 * istride]; + tmp121 = input[86 * istride]; + tmp122 = tmp120 + tmp121; + tmp190 = tmp120 - tmp121; + } + tmp191 = (K923879532 * tmp189) + (K382683432 * tmp190); + tmp197 = (K382683432 * tmp189) - (K923879532 * tmp190); + tmp807 = tmp119 - tmp122; + } + { + fftw_real tmp98; + fftw_real tmp99; + fftw_real tmp186; + fftw_real tmp187; + ASSERT_ALIGNED_DOUBLE; + tmp98 = input[30 * istride]; + tmp99 = input[94 * istride]; + tmp100 = tmp98 + tmp99; + tmp195 = tmp98 - tmp99; + { + fftw_real tmp102; + fftw_real tmp103; + fftw_real tmp182; + fftw_real tmp105; + fftw_real tmp106; + fftw_real tmp183; + ASSERT_ALIGNED_DOUBLE; + tmp102 = input[14 * istride]; + tmp103 = input[78 * istride]; + tmp182 = tmp102 - tmp103; + tmp105 = input[110 * istride]; + tmp106 = input[46 * istride]; + tmp183 = tmp105 - tmp106; + tmp104 = tmp102 + tmp103; + tmp194 = K707106781 * (tmp183 - tmp182); + tmp184 = K707106781 * (tmp182 + tmp183); + tmp107 = tmp105 + tmp106; + } + { + fftw_real tmp110; + fftw_real tmp111; + fftw_real tmp113; + fftw_real tmp114; + ASSERT_ALIGNED_DOUBLE; + tmp110 = input[6 * istride]; + tmp111 = input[70 * istride]; + tmp112 = tmp110 + tmp111; + tmp186 = tmp110 - tmp111; + tmp113 = input[38 * istride]; + tmp114 = input[102 * istride]; + tmp115 = tmp113 + tmp114; + tmp187 = tmp113 - tmp114; + } + tmp188 = (K923879532 * tmp186) - (K382683432 * tmp187); + tmp198 = (K382683432 * tmp186) + (K923879532 * tmp187); + tmp806 = tmp112 - tmp115; + } + { + fftw_real tmp101; + fftw_real tmp108; + fftw_real tmp805; + fftw_real tmp808; + ASSERT_ALIGNED_DOUBLE; + tmp101 = tmp97 + tmp100; + tmp108 = tmp104 + tmp107; + tmp109 = tmp101 + tmp108; + tmp633 = tmp101 - tmp108; + tmp805 = tmp97 - tmp100; + tmp808 = K707106781 * (tmp806 + tmp807); + tmp809 = tmp805 + tmp808; + tmp900 = tmp805 - tmp808; + } + { + fftw_real tmp810; + fftw_real tmp811; + fftw_real tmp482; + fftw_real tmp483; + ASSERT_ALIGNED_DOUBLE; + tmp810 = tmp107 - tmp104; + tmp811 = K707106781 * (tmp807 - tmp806); + tmp812 = tmp810 + tmp811; + tmp901 = tmp811 - tmp810; + tmp482 = tmp195 + tmp194; + tmp483 = tmp191 - tmp188; + tmp484 = tmp482 + tmp483; + tmp569 = tmp483 - tmp482; + } + { + fftw_real tmp185; + fftw_real tmp192; + fftw_real tmp479; + fftw_real tmp480; + ASSERT_ALIGNED_DOUBLE; + tmp185 = tmp181 + tmp184; + tmp192 = tmp188 + tmp191; + tmp193 = tmp185 + tmp192; + tmp405 = tmp185 - tmp192; + tmp479 = tmp181 - tmp184; + tmp480 = tmp198 + tmp197; + tmp481 = tmp479 + tmp480; + tmp568 = tmp479 - tmp480; + } + { + fftw_real tmp196; + fftw_real tmp199; + fftw_real tmp116; + fftw_real tmp123; + ASSERT_ALIGNED_DOUBLE; + tmp196 = tmp194 - tmp195; + tmp199 = tmp197 - tmp198; + tmp200 = tmp196 + tmp199; + tmp404 = tmp199 - tmp196; + tmp116 = tmp112 + tmp115; + tmp123 = tmp119 + tmp122; + tmp124 = tmp116 + tmp123; + tmp634 = tmp123 - tmp116; + } + } + { + fftw_real tmp66; + fftw_real tmp173; + fftw_real tmp88; + fftw_real tmp91; + fftw_real tmp167; + fftw_real tmp177; + fftw_real tmp798; + fftw_real tmp69; + fftw_real tmp163; + fftw_real tmp73; + fftw_real tmp174; + fftw_real tmp162; + fftw_real tmp76; + fftw_real tmp81; + fftw_real tmp84; + fftw_real tmp170; + fftw_real tmp176; + fftw_real tmp797; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp64; + fftw_real tmp65; + fftw_real tmp165; + fftw_real tmp166; + ASSERT_ALIGNED_DOUBLE; + tmp64 = input[2 * istride]; + tmp65 = input[66 * istride]; + tmp66 = tmp64 + tmp65; + tmp173 = tmp64 - tmp65; + { + fftw_real tmp86; + fftw_real tmp87; + fftw_real tmp89; + fftw_real tmp90; + ASSERT_ALIGNED_DOUBLE; + tmp86 = input[122 * istride]; + tmp87 = input[58 * istride]; + tmp88 = tmp86 + tmp87; + tmp165 = tmp86 - tmp87; + tmp89 = input[26 * istride]; + tmp90 = input[90 * istride]; + tmp91 = tmp89 + tmp90; + tmp166 = tmp89 - tmp90; + } + tmp167 = (K382683432 * tmp165) - (K923879532 * tmp166); + tmp177 = (K923879532 * tmp165) + (K382683432 * tmp166); + tmp798 = tmp88 - tmp91; + } + { + fftw_real tmp67; + fftw_real tmp68; + fftw_real tmp168; + fftw_real tmp169; + ASSERT_ALIGNED_DOUBLE; + tmp67 = input[34 * istride]; + tmp68 = input[98 * istride]; + tmp69 = tmp67 + tmp68; + tmp163 = tmp67 - tmp68; + { + fftw_real tmp71; + fftw_real tmp72; + fftw_real tmp161; + fftw_real tmp74; + fftw_real tmp75; + fftw_real tmp160; + ASSERT_ALIGNED_DOUBLE; + tmp71 = input[18 * istride]; + tmp72 = input[82 * istride]; + tmp161 = tmp71 - tmp72; + tmp74 = input[114 * istride]; + tmp75 = input[50 * istride]; + tmp160 = tmp74 - tmp75; + tmp73 = tmp71 + tmp72; + tmp174 = K707106781 * (tmp161 + tmp160); + tmp162 = K707106781 * (tmp160 - tmp161); + tmp76 = tmp74 + tmp75; + } + { + fftw_real tmp79; + fftw_real tmp80; + fftw_real tmp82; + fftw_real tmp83; + ASSERT_ALIGNED_DOUBLE; + tmp79 = input[10 * istride]; + tmp80 = input[74 * istride]; + tmp81 = tmp79 + tmp80; + tmp168 = tmp79 - tmp80; + tmp82 = input[42 * istride]; + tmp83 = input[106 * istride]; + tmp84 = tmp82 + tmp83; + tmp169 = tmp82 - tmp83; + } + tmp170 = (K382683432 * tmp168) + (K923879532 * tmp169); + tmp176 = (K923879532 * tmp168) - (K382683432 * tmp169); + tmp797 = tmp81 - tmp84; + } + { + fftw_real tmp70; + fftw_real tmp77; + fftw_real tmp796; + fftw_real tmp799; + ASSERT_ALIGNED_DOUBLE; + tmp70 = tmp66 + tmp69; + tmp77 = tmp73 + tmp76; + tmp78 = tmp70 + tmp77; + tmp630 = tmp70 - tmp77; + tmp796 = tmp66 - tmp69; + tmp799 = K707106781 * (tmp797 + tmp798); + tmp800 = tmp796 + tmp799; + tmp904 = tmp796 - tmp799; + } + { + fftw_real tmp801; + fftw_real tmp802; + fftw_real tmp475; + fftw_real tmp476; + ASSERT_ALIGNED_DOUBLE; + tmp801 = tmp76 - tmp73; + tmp802 = K707106781 * (tmp798 - tmp797); + tmp803 = tmp801 + tmp802; + tmp903 = tmp802 - tmp801; + tmp475 = tmp163 + tmp162; + tmp476 = tmp177 - tmp176; + tmp477 = tmp475 + tmp476; + tmp571 = tmp476 - tmp475; + } + { + fftw_real tmp164; + fftw_real tmp171; + fftw_real tmp472; + fftw_real tmp473; + ASSERT_ALIGNED_DOUBLE; + tmp164 = tmp162 - tmp163; + tmp171 = tmp167 - tmp170; + tmp172 = tmp164 + tmp171; + tmp407 = tmp171 - tmp164; + tmp472 = tmp173 - tmp174; + tmp473 = tmp170 + tmp167; + tmp474 = tmp472 + tmp473; + tmp572 = tmp472 - tmp473; + } + { + fftw_real tmp175; + fftw_real tmp178; + fftw_real tmp85; + fftw_real tmp92; + ASSERT_ALIGNED_DOUBLE; + tmp175 = tmp173 + tmp174; + tmp178 = tmp176 + tmp177; + tmp179 = tmp175 + tmp178; + tmp408 = tmp175 - tmp178; + tmp85 = tmp81 + tmp84; + tmp92 = tmp88 + tmp91; + tmp93 = tmp85 + tmp92; + tmp631 = tmp92 - tmp85; + } + } + { + fftw_real tmp206; + fftw_real tmp638; + fftw_real tmp270; + fftw_real tmp639; + fftw_real tmp213; + fftw_real tmp267; + fftw_real tmp641; + fftw_real tmp642; + fftw_real tmp664; + fftw_real tmp665; + fftw_real tmp221; + fftw_real tmp273; + fftw_real tmp817; + fftw_real tmp661; + fftw_real tmp662; + fftw_real tmp228; + fftw_real tmp272; + fftw_real tmp818; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp204; + fftw_real tmp205; + fftw_real tmp268; + fftw_real tmp269; + ASSERT_ALIGNED_DOUBLE; + tmp204 = input[istride]; + tmp205 = input[65 * istride]; + tmp206 = tmp204 - tmp205; + tmp638 = tmp204 + tmp205; + tmp268 = input[33 * istride]; + tmp269 = input[97 * istride]; + tmp270 = tmp268 - tmp269; + tmp639 = tmp268 + tmp269; + } + { + fftw_real tmp207; + fftw_real tmp208; + fftw_real tmp209; + fftw_real tmp210; + fftw_real tmp211; + fftw_real tmp212; + ASSERT_ALIGNED_DOUBLE; + tmp207 = input[17 * istride]; + tmp208 = input[81 * istride]; + tmp209 = tmp207 - tmp208; + tmp210 = input[113 * istride]; + tmp211 = input[49 * istride]; + tmp212 = tmp210 - tmp211; + tmp213 = K707106781 * (tmp209 + tmp212); + tmp267 = K707106781 * (tmp212 - tmp209); + tmp641 = tmp207 + tmp208; + tmp642 = tmp210 + tmp211; + } + { + fftw_real tmp217; + fftw_real tmp220; + fftw_real tmp224; + fftw_real tmp227; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp215; + fftw_real tmp216; + fftw_real tmp218; + fftw_real tmp219; + ASSERT_ALIGNED_DOUBLE; + tmp215 = input[9 * istride]; + tmp216 = input[73 * istride]; + tmp217 = tmp215 - tmp216; + tmp664 = tmp215 + tmp216; + tmp218 = input[41 * istride]; + tmp219 = input[105 * istride]; + tmp220 = tmp218 - tmp219; + tmp665 = tmp218 + tmp219; + } + tmp221 = (K923879532 * tmp217) - (K382683432 * tmp220); + tmp273 = (K382683432 * tmp217) + (K923879532 * tmp220); + tmp817 = tmp664 - tmp665; + { + fftw_real tmp222; + fftw_real tmp223; + fftw_real tmp225; + fftw_real tmp226; + ASSERT_ALIGNED_DOUBLE; + tmp222 = input[121 * istride]; + tmp223 = input[57 * istride]; + tmp224 = tmp222 - tmp223; + tmp661 = tmp222 + tmp223; + tmp225 = input[25 * istride]; + tmp226 = input[89 * istride]; + tmp227 = tmp225 - tmp226; + tmp662 = tmp225 + tmp226; + } + tmp228 = (K923879532 * tmp224) + (K382683432 * tmp227); + tmp272 = (K382683432 * tmp224) - (K923879532 * tmp227); + tmp818 = tmp661 - tmp662; + } + { + fftw_real tmp214; + fftw_real tmp229; + fftw_real tmp488; + fftw_real tmp489; + ASSERT_ALIGNED_DOUBLE; + tmp214 = tmp206 + tmp213; + tmp229 = tmp221 + tmp228; + tmp230 = tmp214 + tmp229; + tmp415 = tmp214 - tmp229; + tmp488 = tmp206 - tmp213; + tmp489 = tmp273 + tmp272; + tmp490 = tmp488 + tmp489; + tmp579 = tmp488 - tmp489; + } + { + fftw_real tmp271; + fftw_real tmp274; + fftw_real tmp499; + fftw_real tmp500; + ASSERT_ALIGNED_DOUBLE; + tmp271 = tmp267 - tmp270; + tmp274 = tmp272 - tmp273; + tmp275 = tmp271 + tmp274; + tmp413 = tmp274 - tmp271; + tmp499 = tmp270 + tmp267; + tmp500 = tmp228 - tmp221; + tmp501 = tmp499 + tmp500; + tmp577 = tmp500 - tmp499; + } + { + fftw_real tmp640; + fftw_real tmp643; + fftw_real tmp816; + fftw_real tmp819; + ASSERT_ALIGNED_DOUBLE; + tmp640 = tmp638 + tmp639; + tmp643 = tmp641 + tmp642; + tmp644 = tmp640 - tmp643; + tmp740 = tmp640 + tmp643; + tmp816 = tmp638 - tmp639; + tmp819 = K707106781 * (tmp817 + tmp818); + tmp820 = tmp816 + tmp819; + tmp911 = tmp816 - tmp819; + } + { + fftw_real tmp829; + fftw_real tmp830; + fftw_real tmp663; + fftw_real tmp666; + ASSERT_ALIGNED_DOUBLE; + tmp829 = tmp642 - tmp641; + tmp830 = K707106781 * (tmp818 - tmp817); + tmp831 = tmp829 + tmp830; + tmp909 = tmp830 - tmp829; + tmp663 = tmp661 + tmp662; + tmp666 = tmp664 + tmp665; + tmp667 = tmp663 - tmp666; + tmp741 = tmp666 + tmp663; + } + } + { + fftw_real tmp233; + fftw_real tmp821; + fftw_real tmp647; + fftw_real tmp245; + fftw_real tmp257; + fftw_real tmp259; + fftw_real tmp657; + fftw_real tmp825; + fftw_real tmp250; + fftw_real tmp824; + fftw_real tmp654; + fftw_real tmp262; + fftw_real tmp240; + fftw_real tmp242; + fftw_real tmp650; + fftw_real tmp822; + fftw_real tmp491; + fftw_real tmp492; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp231; + fftw_real tmp232; + fftw_real tmp645; + fftw_real tmp243; + fftw_real tmp244; + fftw_real tmp646; + ASSERT_ALIGNED_DOUBLE; + tmp231 = input[5 * istride]; + tmp232 = input[69 * istride]; + tmp645 = tmp231 + tmp232; + tmp243 = input[37 * istride]; + tmp244 = input[101 * istride]; + tmp646 = tmp243 + tmp244; + tmp233 = tmp231 - tmp232; + tmp821 = tmp645 - tmp646; + tmp647 = tmp645 + tmp646; + tmp245 = tmp243 - tmp244; + } + { + fftw_real tmp253; + fftw_real tmp655; + fftw_real tmp256; + fftw_real tmp656; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp251; + fftw_real tmp252; + fftw_real tmp254; + fftw_real tmp255; + ASSERT_ALIGNED_DOUBLE; + tmp251 = input[13 * istride]; + tmp252 = input[77 * istride]; + tmp253 = tmp251 - tmp252; + tmp655 = tmp251 + tmp252; + tmp254 = input[109 * istride]; + tmp255 = input[45 * istride]; + tmp256 = tmp254 - tmp255; + tmp656 = tmp254 + tmp255; + } + tmp257 = K707106781 * (tmp253 + tmp256); + tmp259 = K707106781 * (tmp256 - tmp253); + tmp657 = tmp655 + tmp656; + tmp825 = tmp656 - tmp655; + } + { + fftw_real tmp248; + fftw_real tmp249; + fftw_real tmp652; + fftw_real tmp260; + fftw_real tmp261; + fftw_real tmp653; + ASSERT_ALIGNED_DOUBLE; + tmp248 = input[125 * istride]; + tmp249 = input[61 * istride]; + tmp652 = tmp248 + tmp249; + tmp260 = input[29 * istride]; + tmp261 = input[93 * istride]; + tmp653 = tmp260 + tmp261; + tmp250 = tmp248 - tmp249; + tmp824 = tmp652 - tmp653; + tmp654 = tmp652 + tmp653; + tmp262 = tmp260 - tmp261; + } + { + fftw_real tmp236; + fftw_real tmp648; + fftw_real tmp239; + fftw_real tmp649; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp234; + fftw_real tmp235; + fftw_real tmp237; + fftw_real tmp238; + ASSERT_ALIGNED_DOUBLE; + tmp234 = input[21 * istride]; + tmp235 = input[85 * istride]; + tmp236 = tmp234 - tmp235; + tmp648 = tmp234 + tmp235; + tmp237 = input[117 * istride]; + tmp238 = input[53 * istride]; + tmp239 = tmp237 - tmp238; + tmp649 = tmp237 + tmp238; + } + tmp240 = K707106781 * (tmp236 + tmp239); + tmp242 = K707106781 * (tmp239 - tmp236); + tmp650 = tmp648 + tmp649; + tmp822 = tmp649 - tmp648; + } + { + fftw_real tmp651; + fftw_real tmp658; + fftw_real tmp832; + fftw_real tmp833; + ASSERT_ALIGNED_DOUBLE; + tmp743 = tmp647 + tmp650; + tmp651 = tmp647 - tmp650; + tmp658 = tmp654 - tmp657; + tmp659 = K707106781 * (tmp651 + tmp658); + tmp668 = K707106781 * (tmp658 - tmp651); + tmp744 = tmp654 + tmp657; + tmp832 = (K923879532 * tmp822) - (K382683432 * tmp821); + tmp833 = (K382683432 * tmp824) + (K923879532 * tmp825); + tmp834 = tmp832 + tmp833; + tmp912 = tmp833 - tmp832; + } + { + fftw_real tmp823; + fftw_real tmp826; + fftw_real tmp241; + fftw_real tmp246; + ASSERT_ALIGNED_DOUBLE; + tmp823 = (K923879532 * tmp821) + (K382683432 * tmp822); + tmp826 = (K923879532 * tmp824) - (K382683432 * tmp825); + tmp827 = tmp823 + tmp826; + tmp908 = tmp826 - tmp823; + tmp241 = tmp233 + tmp240; + tmp246 = tmp242 - tmp245; + tmp247 = (K980785280 * tmp241) + (K195090322 * tmp246); + tmp276 = (K980785280 * tmp246) - (K195090322 * tmp241); + } + tmp491 = tmp233 - tmp240; + tmp492 = tmp245 + tmp242; + tmp493 = (K831469612 * tmp491) + (K555570233 * tmp492); + tmp502 = (K831469612 * tmp492) - (K555570233 * tmp491); + { + fftw_real tmp494; + fftw_real tmp495; + fftw_real tmp258; + fftw_real tmp263; + ASSERT_ALIGNED_DOUBLE; + tmp494 = tmp250 - tmp257; + tmp495 = tmp262 + tmp259; + tmp496 = (K831469612 * tmp494) - (K555570233 * tmp495); + tmp503 = (K555570233 * tmp494) + (K831469612 * tmp495); + tmp258 = tmp250 + tmp257; + tmp263 = tmp259 - tmp262; + tmp264 = (K980785280 * tmp258) - (K195090322 * tmp263); + tmp277 = (K195090322 * tmp258) + (K980785280 * tmp263); + } + } + { + fftw_real tmp63; + fftw_real tmp739; + fftw_real tmp753; + fftw_real tmp759; + fftw_real tmp126; + fftw_real tmp755; + fftw_real tmp746; + fftw_real tmp758; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp31; + fftw_real tmp62; + fftw_real tmp749; + fftw_real tmp752; + ASSERT_ALIGNED_DOUBLE; + tmp31 = tmp15 + tmp30; + tmp62 = tmp46 + tmp61; + tmp63 = tmp31 + tmp62; + tmp739 = tmp31 - tmp62; + tmp749 = tmp747 + tmp748; + tmp752 = tmp750 + tmp751; + tmp753 = tmp749 - tmp752; + tmp759 = tmp749 + tmp752; + } + { + fftw_real tmp94; + fftw_real tmp125; + fftw_real tmp742; + fftw_real tmp745; + ASSERT_ALIGNED_DOUBLE; + tmp94 = tmp78 + tmp93; + tmp125 = tmp109 + tmp124; + tmp126 = tmp94 + tmp125; + tmp755 = tmp125 - tmp94; + tmp742 = tmp740 + tmp741; + tmp745 = tmp743 + tmp744; + tmp746 = tmp742 - tmp745; + tmp758 = tmp742 + tmp745; + } + { + fftw_real tmp757; + fftw_real tmp760; + fftw_real tmp754; + fftw_real tmp756; + ASSERT_ALIGNED_DOUBLE; + real_output[32 * real_ostride] = tmp63 - tmp126; + tmp757 = tmp63 + tmp126; + tmp760 = tmp758 + tmp759; + real_output[64 * real_ostride] = tmp757 - tmp760; + real_output[0] = tmp757 + tmp760; + imag_output[32 * imag_ostride] = tmp759 - tmp758; + tmp754 = K707106781 * (tmp746 + tmp753); + real_output[48 * real_ostride] = tmp739 - tmp754; + real_output[16 * real_ostride] = tmp739 + tmp754; + tmp756 = K707106781 * (tmp753 - tmp746); + imag_output[16 * imag_ostride] = tmp755 + tmp756; + imag_output[48 * imag_ostride] = tmp756 - tmp755; + } + } + { + fftw_real tmp761; + fftw_real tmp774; + fftw_real tmp764; + fftw_real tmp773; + fftw_real tmp768; + fftw_real tmp778; + fftw_real tmp771; + fftw_real tmp779; + fftw_real tmp762; + fftw_real tmp763; + ASSERT_ALIGNED_DOUBLE; + tmp761 = tmp15 - tmp30; + tmp774 = tmp61 - tmp46; + tmp762 = tmp78 - tmp93; + tmp763 = tmp109 - tmp124; + tmp764 = K707106781 * (tmp762 + tmp763); + tmp773 = K707106781 * (tmp763 - tmp762); + { + fftw_real tmp766; + fftw_real tmp767; + fftw_real tmp769; + fftw_real tmp770; + ASSERT_ALIGNED_DOUBLE; + tmp766 = tmp740 - tmp741; + tmp767 = tmp744 - tmp743; + tmp768 = (K923879532 * tmp766) + (K382683432 * tmp767); + tmp778 = (K923879532 * tmp767) - (K382683432 * tmp766); + tmp769 = tmp747 - tmp748; + tmp770 = tmp751 - tmp750; + tmp771 = (K923879532 * tmp769) - (K382683432 * tmp770); + tmp779 = (K382683432 * tmp769) + (K923879532 * tmp770); + } + { + fftw_real tmp765; + fftw_real tmp772; + fftw_real tmp781; + fftw_real tmp782; + ASSERT_ALIGNED_DOUBLE; + tmp765 = tmp761 + tmp764; + tmp772 = tmp768 + tmp771; + real_output[56 * real_ostride] = tmp765 - tmp772; + real_output[8 * real_ostride] = tmp765 + tmp772; + tmp781 = tmp761 - tmp764; + tmp782 = tmp779 - tmp778; + real_output[40 * real_ostride] = tmp781 - tmp782; + real_output[24 * real_ostride] = tmp781 + tmp782; + } + { + fftw_real tmp777; + fftw_real tmp780; + fftw_real tmp775; + fftw_real tmp776; + ASSERT_ALIGNED_DOUBLE; + tmp777 = tmp774 + tmp773; + tmp780 = tmp778 + tmp779; + imag_output[8 * imag_ostride] = tmp777 + tmp780; + imag_output[56 * imag_ostride] = tmp780 - tmp777; + tmp775 = tmp773 - tmp774; + tmp776 = tmp771 - tmp768; + imag_output[24 * imag_ostride] = tmp775 + tmp776; + imag_output[40 * imag_ostride] = tmp776 - tmp775; + } + } + { + fftw_real tmp159; + fftw_real tmp381; + fftw_real tmp202; + fftw_real tmp391; + fftw_real tmp372; + fftw_real tmp392; + fftw_real tmp361; + fftw_real tmp382; + fftw_real tmp357; + fftw_real tmp377; + fftw_real tmp389; + fftw_real tmp397; + fftw_real tmp280; + fftw_real tmp376; + fftw_real tmp386; + fftw_real tmp396; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp139; + fftw_real tmp158; + fftw_real tmp359; + fftw_real tmp360; + ASSERT_ALIGNED_DOUBLE; + tmp139 = tmp131 + tmp138; + tmp158 = tmp148 + tmp157; + tmp159 = tmp139 + tmp158; + tmp381 = tmp139 - tmp158; + { + fftw_real tmp180; + fftw_real tmp201; + fftw_real tmp368; + fftw_real tmp371; + ASSERT_ALIGNED_DOUBLE; + tmp180 = (K098017140 * tmp172) + (K995184726 * tmp179); + tmp201 = (K995184726 * tmp193) - (K098017140 * tmp200); + tmp202 = tmp180 + tmp201; + tmp391 = tmp201 - tmp180; + tmp368 = tmp364 + tmp367; + tmp371 = tmp369 + tmp370; + tmp372 = tmp368 + tmp371; + tmp392 = tmp371 - tmp368; + } + tmp359 = (K995184726 * tmp172) - (K098017140 * tmp179); + tmp360 = (K995184726 * tmp200) + (K098017140 * tmp193); + tmp361 = tmp359 + tmp360; + tmp382 = tmp360 - tmp359; + { + fftw_real tmp343; + fftw_real tmp387; + fftw_real tmp356; + fftw_real tmp388; + fftw_real tmp342; + fftw_real tmp355; + ASSERT_ALIGNED_DOUBLE; + tmp342 = tmp324 + tmp341; + tmp343 = tmp307 + tmp342; + tmp387 = tmp307 - tmp342; + tmp355 = tmp353 + tmp354; + tmp356 = tmp352 + tmp355; + tmp388 = tmp355 - tmp352; + tmp357 = (K998795456 * tmp343) - (K049067674 * tmp356); + tmp377 = (K049067674 * tmp343) + (K998795456 * tmp356); + tmp389 = (K740951125 * tmp387) - (K671558954 * tmp388); + tmp397 = (K671558954 * tmp387) + (K740951125 * tmp388); + } + { + fftw_real tmp266; + fftw_real tmp384; + fftw_real tmp279; + fftw_real tmp385; + fftw_real tmp265; + fftw_real tmp278; + ASSERT_ALIGNED_DOUBLE; + tmp265 = tmp247 + tmp264; + tmp266 = tmp230 + tmp265; + tmp384 = tmp230 - tmp265; + tmp278 = tmp276 + tmp277; + tmp279 = tmp275 + tmp278; + tmp385 = tmp278 - tmp275; + tmp280 = (K998795456 * tmp266) + (K049067674 * tmp279); + tmp376 = (K998795456 * tmp279) - (K049067674 * tmp266); + tmp386 = (K740951125 * tmp384) + (K671558954 * tmp385); + tmp396 = (K740951125 * tmp385) - (K671558954 * tmp384); + } + } + { + fftw_real tmp203; + fftw_real tmp358; + fftw_real tmp373; + fftw_real tmp374; + ASSERT_ALIGNED_DOUBLE; + tmp203 = tmp159 + tmp202; + tmp358 = tmp280 + tmp357; + real_output[63 * real_ostride] = tmp203 - tmp358; + real_output[real_ostride] = tmp203 + tmp358; + tmp373 = tmp361 - tmp372; + tmp374 = tmp357 - tmp280; + imag_output[31 * imag_ostride] = tmp373 + tmp374; + imag_output[33 * imag_ostride] = tmp374 - tmp373; + } + { + fftw_real tmp375; + fftw_real tmp378; + fftw_real tmp379; + fftw_real tmp380; + ASSERT_ALIGNED_DOUBLE; + tmp375 = tmp372 + tmp361; + tmp378 = tmp376 + tmp377; + imag_output[imag_ostride] = tmp375 + tmp378; + imag_output[63 * imag_ostride] = tmp378 - tmp375; + tmp379 = tmp159 - tmp202; + tmp380 = tmp377 - tmp376; + real_output[33 * real_ostride] = tmp379 - tmp380; + real_output[31 * real_ostride] = tmp379 + tmp380; + } + { + fftw_real tmp383; + fftw_real tmp390; + fftw_real tmp393; + fftw_real tmp394; + ASSERT_ALIGNED_DOUBLE; + tmp383 = tmp381 + tmp382; + tmp390 = tmp386 + tmp389; + real_output[49 * real_ostride] = tmp383 - tmp390; + real_output[15 * real_ostride] = tmp383 + tmp390; + tmp393 = tmp391 - tmp392; + tmp394 = tmp389 - tmp386; + imag_output[17 * imag_ostride] = tmp393 + tmp394; + imag_output[47 * imag_ostride] = tmp394 - tmp393; + } + { + fftw_real tmp395; + fftw_real tmp398; + fftw_real tmp399; + fftw_real tmp400; + ASSERT_ALIGNED_DOUBLE; + tmp395 = tmp392 + tmp391; + tmp398 = tmp396 + tmp397; + imag_output[15 * imag_ostride] = tmp395 + tmp398; + imag_output[49 * imag_ostride] = tmp398 - tmp395; + tmp399 = tmp381 - tmp382; + tmp400 = tmp397 - tmp396; + real_output[47 * real_ostride] = tmp399 - tmp400; + real_output[17 * real_ostride] = tmp399 + tmp400; + } + } + { + fftw_real tmp403; + fftw_real tmp441; + fftw_real tmp410; + fftw_real tmp451; + fftw_real tmp432; + fftw_real tmp452; + fftw_real tmp429; + fftw_real tmp442; + fftw_real tmp425; + fftw_real tmp437; + fftw_real tmp449; + fftw_real tmp457; + fftw_real tmp418; + fftw_real tmp436; + fftw_real tmp446; + fftw_real tmp456; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp401; + fftw_real tmp402; + fftw_real tmp427; + fftw_real tmp428; + ASSERT_ALIGNED_DOUBLE; + tmp401 = tmp131 - tmp138; + tmp402 = tmp370 - tmp369; + tmp403 = tmp401 - tmp402; + tmp441 = tmp401 + tmp402; + { + fftw_real tmp406; + fftw_real tmp409; + fftw_real tmp430; + fftw_real tmp431; + ASSERT_ALIGNED_DOUBLE; + tmp406 = (K773010453 * tmp404) + (K634393284 * tmp405); + tmp409 = (K773010453 * tmp407) - (K634393284 * tmp408); + tmp410 = tmp406 - tmp409; + tmp451 = tmp409 + tmp406; + tmp430 = tmp157 - tmp148; + tmp431 = tmp367 - tmp364; + tmp432 = tmp430 - tmp431; + tmp452 = tmp431 + tmp430; + } + tmp427 = (K773010453 * tmp405) - (K634393284 * tmp404); + tmp428 = (K634393284 * tmp407) + (K773010453 * tmp408); + tmp429 = tmp427 - tmp428; + tmp442 = tmp428 + tmp427; + { + fftw_real tmp421; + fftw_real tmp447; + fftw_real tmp424; + fftw_real tmp448; + fftw_real tmp420; + fftw_real tmp422; + ASSERT_ALIGNED_DOUBLE; + tmp420 = tmp354 - tmp353; + tmp421 = tmp419 - tmp420; + tmp447 = tmp419 + tmp420; + tmp422 = tmp341 - tmp324; + tmp424 = tmp422 - tmp423; + tmp448 = tmp423 + tmp422; + tmp425 = (K903989293 * tmp421) - (K427555093 * tmp424); + tmp437 = (K903989293 * tmp424) + (K427555093 * tmp421); + tmp449 = (K941544065 * tmp447) - (K336889853 * tmp448); + tmp457 = (K941544065 * tmp448) + (K336889853 * tmp447); + } + { + fftw_real tmp414; + fftw_real tmp444; + fftw_real tmp417; + fftw_real tmp445; + fftw_real tmp412; + fftw_real tmp416; + ASSERT_ALIGNED_DOUBLE; + tmp412 = tmp264 - tmp247; + tmp414 = tmp412 - tmp413; + tmp444 = tmp413 + tmp412; + tmp416 = tmp277 - tmp276; + tmp417 = tmp415 - tmp416; + tmp445 = tmp415 + tmp416; + tmp418 = (K427555093 * tmp414) + (K903989293 * tmp417); + tmp436 = (K903989293 * tmp414) - (K427555093 * tmp417); + tmp446 = (K336889853 * tmp444) + (K941544065 * tmp445); + tmp456 = (K941544065 * tmp444) - (K336889853 * tmp445); + } + } + { + fftw_real tmp411; + fftw_real tmp426; + fftw_real tmp433; + fftw_real tmp434; + ASSERT_ALIGNED_DOUBLE; + tmp411 = tmp403 + tmp410; + tmp426 = tmp418 + tmp425; + real_output[55 * real_ostride] = tmp411 - tmp426; + real_output[9 * real_ostride] = tmp411 + tmp426; + tmp433 = tmp429 - tmp432; + tmp434 = tmp425 - tmp418; + imag_output[23 * imag_ostride] = tmp433 + tmp434; + imag_output[41 * imag_ostride] = tmp434 - tmp433; + } + { + fftw_real tmp435; + fftw_real tmp438; + fftw_real tmp439; + fftw_real tmp440; + ASSERT_ALIGNED_DOUBLE; + tmp435 = tmp432 + tmp429; + tmp438 = tmp436 + tmp437; + imag_output[9 * imag_ostride] = tmp435 + tmp438; + imag_output[55 * imag_ostride] = tmp438 - tmp435; + tmp439 = tmp403 - tmp410; + tmp440 = tmp437 - tmp436; + real_output[41 * real_ostride] = tmp439 - tmp440; + real_output[23 * real_ostride] = tmp439 + tmp440; + } + { + fftw_real tmp443; + fftw_real tmp450; + fftw_real tmp453; + fftw_real tmp454; + ASSERT_ALIGNED_DOUBLE; + tmp443 = tmp441 + tmp442; + tmp450 = tmp446 + tmp449; + real_output[57 * real_ostride] = tmp443 - tmp450; + real_output[7 * real_ostride] = tmp443 + tmp450; + tmp453 = tmp451 - tmp452; + tmp454 = tmp449 - tmp446; + imag_output[25 * imag_ostride] = tmp453 + tmp454; + imag_output[39 * imag_ostride] = tmp454 - tmp453; + } + { + fftw_real tmp455; + fftw_real tmp458; + fftw_real tmp459; + fftw_real tmp460; + ASSERT_ALIGNED_DOUBLE; + tmp455 = tmp452 + tmp451; + tmp458 = tmp456 + tmp457; + imag_output[7 * imag_ostride] = tmp455 + tmp458; + imag_output[57 * imag_ostride] = tmp458 - tmp455; + tmp459 = tmp441 - tmp442; + tmp460 = tmp457 - tmp456; + real_output[39 * real_ostride] = tmp459 - tmp460; + real_output[25 * real_ostride] = tmp459 + tmp460; + } + } + { + fftw_real tmp629; + fftw_real tmp719; + fftw_real tmp710; + fftw_real tmp730; + fftw_real tmp636; + fftw_real tmp729; + fftw_real tmp707; + fftw_real tmp720; + fftw_real tmp670; + fftw_real tmp714; + fftw_real tmp724; + fftw_real tmp734; + fftw_real tmp703; + fftw_real tmp715; + fftw_real tmp727; + fftw_real tmp735; + fftw_real tmp628; + fftw_real tmp709; + ASSERT_ALIGNED_DOUBLE; + tmp628 = K707106781 * (tmp626 + tmp627); + tmp629 = tmp625 + tmp628; + tmp719 = tmp625 - tmp628; + tmp709 = K707106781 * (tmp627 - tmp626); + tmp710 = tmp708 + tmp709; + tmp730 = tmp709 - tmp708; + { + fftw_real tmp632; + fftw_real tmp635; + fftw_real tmp705; + fftw_real tmp706; + ASSERT_ALIGNED_DOUBLE; + tmp632 = (K923879532 * tmp630) + (K382683432 * tmp631); + tmp635 = (K923879532 * tmp633) - (K382683432 * tmp634); + tmp636 = tmp632 + tmp635; + tmp729 = tmp635 - tmp632; + tmp705 = (K923879532 * tmp631) - (K382683432 * tmp630); + tmp706 = (K382683432 * tmp633) + (K923879532 * tmp634); + tmp707 = tmp705 + tmp706; + tmp720 = tmp706 - tmp705; + } + { + fftw_real tmp660; + fftw_real tmp669; + fftw_real tmp722; + fftw_real tmp723; + ASSERT_ALIGNED_DOUBLE; + tmp660 = tmp644 + tmp659; + tmp669 = tmp667 + tmp668; + tmp670 = (K980785280 * tmp660) + (K195090322 * tmp669); + tmp714 = (K980785280 * tmp669) - (K195090322 * tmp660); + tmp722 = tmp644 - tmp659; + tmp723 = tmp668 - tmp667; + tmp724 = (K831469612 * tmp722) + (K555570233 * tmp723); + tmp734 = (K831469612 * tmp723) - (K555570233 * tmp722); + } + { + fftw_real tmp693; + fftw_real tmp702; + fftw_real tmp725; + fftw_real tmp726; + ASSERT_ALIGNED_DOUBLE; + tmp693 = tmp677 + tmp692; + tmp702 = tmp700 + tmp701; + tmp703 = (K980785280 * tmp693) - (K195090322 * tmp702); + tmp715 = (K195090322 * tmp693) + (K980785280 * tmp702); + tmp725 = tmp677 - tmp692; + tmp726 = tmp701 - tmp700; + tmp727 = (K831469612 * tmp725) - (K555570233 * tmp726); + tmp735 = (K555570233 * tmp725) + (K831469612 * tmp726); + } + { + fftw_real tmp637; + fftw_real tmp704; + fftw_real tmp711; + fftw_real tmp712; + ASSERT_ALIGNED_DOUBLE; + tmp637 = tmp629 + tmp636; + tmp704 = tmp670 + tmp703; + real_output[60 * real_ostride] = tmp637 - tmp704; + real_output[4 * real_ostride] = tmp637 + tmp704; + tmp711 = tmp707 - tmp710; + tmp712 = tmp703 - tmp670; + imag_output[28 * imag_ostride] = tmp711 + tmp712; + imag_output[36 * imag_ostride] = tmp712 - tmp711; + } + { + fftw_real tmp713; + fftw_real tmp716; + fftw_real tmp717; + fftw_real tmp718; + ASSERT_ALIGNED_DOUBLE; + tmp713 = tmp710 + tmp707; + tmp716 = tmp714 + tmp715; + imag_output[4 * imag_ostride] = tmp713 + tmp716; + imag_output[60 * imag_ostride] = tmp716 - tmp713; + tmp717 = tmp629 - tmp636; + tmp718 = tmp715 - tmp714; + real_output[36 * real_ostride] = tmp717 - tmp718; + real_output[28 * real_ostride] = tmp717 + tmp718; + } + { + fftw_real tmp721; + fftw_real tmp728; + fftw_real tmp731; + fftw_real tmp732; + ASSERT_ALIGNED_DOUBLE; + tmp721 = tmp719 + tmp720; + tmp728 = tmp724 + tmp727; + real_output[52 * real_ostride] = tmp721 - tmp728; + real_output[12 * real_ostride] = tmp721 + tmp728; + tmp731 = tmp729 - tmp730; + tmp732 = tmp727 - tmp724; + imag_output[20 * imag_ostride] = tmp731 + tmp732; + imag_output[44 * imag_ostride] = tmp732 - tmp731; + } + { + fftw_real tmp733; + fftw_real tmp736; + fftw_real tmp737; + fftw_real tmp738; + ASSERT_ALIGNED_DOUBLE; + tmp733 = tmp730 + tmp729; + tmp736 = tmp734 + tmp735; + imag_output[12 * imag_ostride] = tmp733 + tmp736; + imag_output[52 * imag_ostride] = tmp736 - tmp733; + tmp737 = tmp719 - tmp720; + tmp738 = tmp735 - tmp734; + real_output[44 * real_ostride] = tmp737 - tmp738; + real_output[20 * real_ostride] = tmp737 + tmp738; + } + } + { + fftw_real tmp795; + fftw_real tmp877; + fftw_real tmp882; + fftw_real tmp892; + fftw_real tmp885; + fftw_real tmp893; + fftw_real tmp857; + fftw_real tmp873; + fftw_real tmp836; + fftw_real tmp872; + fftw_real tmp861; + fftw_real tmp878; + fftw_real tmp814; + fftw_real tmp887; + fftw_real tmp868; + fftw_real tmp888; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp787; + fftw_real tmp794; + fftw_real tmp880; + fftw_real tmp881; + ASSERT_ALIGNED_DOUBLE; + tmp787 = tmp783 + tmp786; + tmp794 = tmp790 + tmp793; + tmp795 = tmp787 + tmp794; + tmp877 = tmp787 - tmp794; + tmp880 = tmp820 - tmp827; + tmp881 = tmp834 - tmp831; + tmp882 = (K773010453 * tmp880) + (K634393284 * tmp881); + tmp892 = (K773010453 * tmp881) - (K634393284 * tmp880); + } + { + fftw_real tmp883; + fftw_real tmp884; + fftw_real tmp849; + fftw_real tmp856; + ASSERT_ALIGNED_DOUBLE; + tmp883 = tmp841 - tmp848; + tmp884 = tmp855 - tmp852; + tmp885 = (K773010453 * tmp883) - (K634393284 * tmp884); + tmp893 = (K634393284 * tmp883) + (K773010453 * tmp884); + tmp849 = tmp841 + tmp848; + tmp856 = tmp852 + tmp855; + tmp857 = (K995184726 * tmp849) - (K098017140 * tmp856); + tmp873 = (K098017140 * tmp849) + (K995184726 * tmp856); + } + { + fftw_real tmp828; + fftw_real tmp835; + fftw_real tmp859; + fftw_real tmp860; + ASSERT_ALIGNED_DOUBLE; + tmp828 = tmp820 + tmp827; + tmp835 = tmp831 + tmp834; + tmp836 = (K995184726 * tmp828) + (K098017140 * tmp835); + tmp872 = (K995184726 * tmp835) - (K098017140 * tmp828); + tmp859 = (K980785280 * tmp803) - (K195090322 * tmp800); + tmp860 = (K195090322 * tmp809) + (K980785280 * tmp812); + tmp861 = tmp859 + tmp860; + tmp878 = tmp860 - tmp859; + } + { + fftw_real tmp804; + fftw_real tmp813; + fftw_real tmp864; + fftw_real tmp867; + ASSERT_ALIGNED_DOUBLE; + tmp804 = (K980785280 * tmp800) + (K195090322 * tmp803); + tmp813 = (K980785280 * tmp809) - (K195090322 * tmp812); + tmp814 = tmp804 + tmp813; + tmp887 = tmp813 - tmp804; + tmp864 = tmp862 + tmp863; + tmp867 = tmp865 + tmp866; + tmp868 = tmp864 + tmp867; + tmp888 = tmp867 - tmp864; + } + { + fftw_real tmp815; + fftw_real tmp858; + fftw_real tmp869; + fftw_real tmp870; + ASSERT_ALIGNED_DOUBLE; + tmp815 = tmp795 + tmp814; + tmp858 = tmp836 + tmp857; + real_output[62 * real_ostride] = tmp815 - tmp858; + real_output[2 * real_ostride] = tmp815 + tmp858; + tmp869 = tmp861 - tmp868; + tmp870 = tmp857 - tmp836; + imag_output[30 * imag_ostride] = tmp869 + tmp870; + imag_output[34 * imag_ostride] = tmp870 - tmp869; + } + { + fftw_real tmp871; + fftw_real tmp874; + fftw_real tmp875; + fftw_real tmp876; + ASSERT_ALIGNED_DOUBLE; + tmp871 = tmp868 + tmp861; + tmp874 = tmp872 + tmp873; + imag_output[2 * imag_ostride] = tmp871 + tmp874; + imag_output[62 * imag_ostride] = tmp874 - tmp871; + tmp875 = tmp795 - tmp814; + tmp876 = tmp873 - tmp872; + real_output[34 * real_ostride] = tmp875 - tmp876; + real_output[30 * real_ostride] = tmp875 + tmp876; + } + { + fftw_real tmp879; + fftw_real tmp886; + fftw_real tmp889; + fftw_real tmp890; + ASSERT_ALIGNED_DOUBLE; + tmp879 = tmp877 + tmp878; + tmp886 = tmp882 + tmp885; + real_output[50 * real_ostride] = tmp879 - tmp886; + real_output[14 * real_ostride] = tmp879 + tmp886; + tmp889 = tmp887 - tmp888; + tmp890 = tmp885 - tmp882; + imag_output[18 * imag_ostride] = tmp889 + tmp890; + imag_output[46 * imag_ostride] = tmp890 - tmp889; + } + { + fftw_real tmp891; + fftw_real tmp894; + fftw_real tmp895; + fftw_real tmp896; + ASSERT_ALIGNED_DOUBLE; + tmp891 = tmp888 + tmp887; + tmp894 = tmp892 + tmp893; + imag_output[14 * imag_ostride] = tmp891 + tmp894; + imag_output[50 * imag_ostride] = tmp894 - tmp891; + tmp895 = tmp877 - tmp878; + tmp896 = tmp893 - tmp892; + real_output[46 * real_ostride] = tmp895 - tmp896; + real_output[18 * real_ostride] = tmp895 + tmp896; + } + } + { + fftw_real tmp899; + fftw_real tmp937; + fftw_real tmp942; + fftw_real tmp952; + fftw_real tmp945; + fftw_real tmp953; + fftw_real tmp921; + fftw_real tmp933; + fftw_real tmp914; + fftw_real tmp932; + fftw_real tmp925; + fftw_real tmp938; + fftw_real tmp906; + fftw_real tmp947; + fftw_real tmp928; + fftw_real tmp948; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp897; + fftw_real tmp898; + fftw_real tmp940; + fftw_real tmp941; + ASSERT_ALIGNED_DOUBLE; + tmp897 = tmp783 - tmp786; + tmp898 = tmp866 - tmp865; + tmp899 = tmp897 - tmp898; + tmp937 = tmp897 + tmp898; + tmp940 = tmp909 + tmp908; + tmp941 = tmp911 + tmp912; + tmp942 = (K290284677 * tmp940) + (K956940335 * tmp941); + tmp952 = (K956940335 * tmp940) - (K290284677 * tmp941); + } + { + fftw_real tmp943; + fftw_real tmp944; + fftw_real tmp917; + fftw_real tmp920; + ASSERT_ALIGNED_DOUBLE; + tmp943 = tmp915 + tmp916; + tmp944 = tmp919 + tmp918; + tmp945 = (K956940335 * tmp943) - (K290284677 * tmp944); + tmp953 = (K956940335 * tmp944) + (K290284677 * tmp943); + tmp917 = tmp915 - tmp916; + tmp920 = tmp918 - tmp919; + tmp921 = (K881921264 * tmp917) - (K471396736 * tmp920); + tmp933 = (K881921264 * tmp920) + (K471396736 * tmp917); + } + { + fftw_real tmp910; + fftw_real tmp913; + fftw_real tmp923; + fftw_real tmp924; + ASSERT_ALIGNED_DOUBLE; + tmp910 = tmp908 - tmp909; + tmp913 = tmp911 - tmp912; + tmp914 = (K471396736 * tmp910) + (K881921264 * tmp913); + tmp932 = (K881921264 * tmp910) - (K471396736 * tmp913); + tmp923 = (K831469612 * tmp900) - (K555570233 * tmp901); + tmp924 = (K831469612 * tmp904) + (K555570233 * tmp903); + tmp925 = tmp923 - tmp924; + tmp938 = tmp924 + tmp923; + } + { + fftw_real tmp902; + fftw_real tmp905; + fftw_real tmp926; + fftw_real tmp927; + ASSERT_ALIGNED_DOUBLE; + tmp902 = (K555570233 * tmp900) + (K831469612 * tmp901); + tmp905 = (K831469612 * tmp903) - (K555570233 * tmp904); + tmp906 = tmp902 - tmp905; + tmp947 = tmp905 + tmp902; + tmp926 = tmp793 - tmp790; + tmp927 = tmp863 - tmp862; + tmp928 = tmp926 - tmp927; + tmp948 = tmp927 + tmp926; + } + { + fftw_real tmp907; + fftw_real tmp922; + fftw_real tmp929; + fftw_real tmp930; + ASSERT_ALIGNED_DOUBLE; + tmp907 = tmp899 + tmp906; + tmp922 = tmp914 + tmp921; + real_output[54 * real_ostride] = tmp907 - tmp922; + real_output[10 * real_ostride] = tmp907 + tmp922; + tmp929 = tmp925 - tmp928; + tmp930 = tmp921 - tmp914; + imag_output[22 * imag_ostride] = tmp929 + tmp930; + imag_output[42 * imag_ostride] = tmp930 - tmp929; + } + { + fftw_real tmp931; + fftw_real tmp934; + fftw_real tmp935; + fftw_real tmp936; + ASSERT_ALIGNED_DOUBLE; + tmp931 = tmp928 + tmp925; + tmp934 = tmp932 + tmp933; + imag_output[10 * imag_ostride] = tmp931 + tmp934; + imag_output[54 * imag_ostride] = tmp934 - tmp931; + tmp935 = tmp899 - tmp906; + tmp936 = tmp933 - tmp932; + real_output[42 * real_ostride] = tmp935 - tmp936; + real_output[22 * real_ostride] = tmp935 + tmp936; + } + { + fftw_real tmp939; + fftw_real tmp946; + fftw_real tmp949; + fftw_real tmp950; + ASSERT_ALIGNED_DOUBLE; + tmp939 = tmp937 + tmp938; + tmp946 = tmp942 + tmp945; + real_output[58 * real_ostride] = tmp939 - tmp946; + real_output[6 * real_ostride] = tmp939 + tmp946; + tmp949 = tmp947 - tmp948; + tmp950 = tmp945 - tmp942; + imag_output[26 * imag_ostride] = tmp949 + tmp950; + imag_output[38 * imag_ostride] = tmp950 - tmp949; + } + { + fftw_real tmp951; + fftw_real tmp954; + fftw_real tmp955; + fftw_real tmp956; + ASSERT_ALIGNED_DOUBLE; + tmp951 = tmp948 + tmp947; + tmp954 = tmp952 + tmp953; + imag_output[6 * imag_ostride] = tmp951 + tmp954; + imag_output[58 * imag_ostride] = tmp954 - tmp951; + tmp955 = tmp937 - tmp938; + tmp956 = tmp953 - tmp952; + real_output[38 * real_ostride] = tmp955 - tmp956; + real_output[26 * real_ostride] = tmp955 + tmp956; + } + } + { + fftw_real tmp471; + fftw_real tmp545; + fftw_real tmp486; + fftw_real tmp555; + fftw_real tmp536; + fftw_real tmp556; + fftw_real tmp529; + fftw_real tmp546; + fftw_real tmp525; + fftw_real tmp541; + fftw_real tmp553; + fftw_real tmp561; + fftw_real tmp506; + fftw_real tmp540; + fftw_real tmp550; + fftw_real tmp560; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp463; + fftw_real tmp470; + fftw_real tmp527; + fftw_real tmp528; + ASSERT_ALIGNED_DOUBLE; + tmp463 = tmp461 + tmp462; + tmp470 = tmp466 + tmp469; + tmp471 = tmp463 + tmp470; + tmp545 = tmp463 - tmp470; + { + fftw_real tmp478; + fftw_real tmp485; + fftw_real tmp532; + fftw_real tmp535; + ASSERT_ALIGNED_DOUBLE; + tmp478 = (K956940335 * tmp474) + (K290284677 * tmp477); + tmp485 = (K956940335 * tmp481) - (K290284677 * tmp484); + tmp486 = tmp478 + tmp485; + tmp555 = tmp485 - tmp478; + tmp532 = tmp530 + tmp531; + tmp535 = tmp533 + tmp534; + tmp536 = tmp532 + tmp535; + tmp556 = tmp535 - tmp532; + } + tmp527 = (K956940335 * tmp477) - (K290284677 * tmp474); + tmp528 = (K290284677 * tmp481) + (K956940335 * tmp484); + tmp529 = tmp527 + tmp528; + tmp546 = tmp528 - tmp527; + { + fftw_real tmp517; + fftw_real tmp551; + fftw_real tmp524; + fftw_real tmp552; + fftw_real tmp516; + fftw_real tmp523; + ASSERT_ALIGNED_DOUBLE; + tmp516 = tmp512 + tmp515; + tmp517 = tmp509 + tmp516; + tmp551 = tmp509 - tmp516; + tmp523 = tmp521 + tmp522; + tmp524 = tmp520 + tmp523; + tmp552 = tmp523 - tmp520; + tmp525 = (K989176509 * tmp517) - (K146730474 * tmp524); + tmp541 = (K146730474 * tmp517) + (K989176509 * tmp524); + tmp553 = (K803207531 * tmp551) - (K595699304 * tmp552); + tmp561 = (K595699304 * tmp551) + (K803207531 * tmp552); + } + { + fftw_real tmp498; + fftw_real tmp548; + fftw_real tmp505; + fftw_real tmp549; + fftw_real tmp497; + fftw_real tmp504; + ASSERT_ALIGNED_DOUBLE; + tmp497 = tmp493 + tmp496; + tmp498 = tmp490 + tmp497; + tmp548 = tmp490 - tmp497; + tmp504 = tmp502 + tmp503; + tmp505 = tmp501 + tmp504; + tmp549 = tmp504 - tmp501; + tmp506 = (K989176509 * tmp498) + (K146730474 * tmp505); + tmp540 = (K989176509 * tmp505) - (K146730474 * tmp498); + tmp550 = (K803207531 * tmp548) + (K595699304 * tmp549); + tmp560 = (K803207531 * tmp549) - (K595699304 * tmp548); + } + } + { + fftw_real tmp487; + fftw_real tmp526; + fftw_real tmp537; + fftw_real tmp538; + ASSERT_ALIGNED_DOUBLE; + tmp487 = tmp471 + tmp486; + tmp526 = tmp506 + tmp525; + real_output[61 * real_ostride] = tmp487 - tmp526; + real_output[3 * real_ostride] = tmp487 + tmp526; + tmp537 = tmp529 - tmp536; + tmp538 = tmp525 - tmp506; + imag_output[29 * imag_ostride] = tmp537 + tmp538; + imag_output[35 * imag_ostride] = tmp538 - tmp537; + } + { + fftw_real tmp539; + fftw_real tmp542; + fftw_real tmp543; + fftw_real tmp544; + ASSERT_ALIGNED_DOUBLE; + tmp539 = tmp536 + tmp529; + tmp542 = tmp540 + tmp541; + imag_output[3 * imag_ostride] = tmp539 + tmp542; + imag_output[61 * imag_ostride] = tmp542 - tmp539; + tmp543 = tmp471 - tmp486; + tmp544 = tmp541 - tmp540; + real_output[35 * real_ostride] = tmp543 - tmp544; + real_output[29 * real_ostride] = tmp543 + tmp544; + } + { + fftw_real tmp547; + fftw_real tmp554; + fftw_real tmp557; + fftw_real tmp558; + ASSERT_ALIGNED_DOUBLE; + tmp547 = tmp545 + tmp546; + tmp554 = tmp550 + tmp553; + real_output[51 * real_ostride] = tmp547 - tmp554; + real_output[13 * real_ostride] = tmp547 + tmp554; + tmp557 = tmp555 - tmp556; + tmp558 = tmp553 - tmp550; + imag_output[19 * imag_ostride] = tmp557 + tmp558; + imag_output[45 * imag_ostride] = tmp558 - tmp557; + } + { + fftw_real tmp559; + fftw_real tmp562; + fftw_real tmp563; + fftw_real tmp564; + ASSERT_ALIGNED_DOUBLE; + tmp559 = tmp556 + tmp555; + tmp562 = tmp560 + tmp561; + imag_output[13 * imag_ostride] = tmp559 + tmp562; + imag_output[51 * imag_ostride] = tmp562 - tmp559; + tmp563 = tmp545 - tmp546; + tmp564 = tmp561 - tmp560; + real_output[45 * real_ostride] = tmp563 - tmp564; + real_output[19 * real_ostride] = tmp563 + tmp564; + } + } + { + fftw_real tmp567; + fftw_real tmp605; + fftw_real tmp574; + fftw_real tmp615; + fftw_real tmp596; + fftw_real tmp616; + fftw_real tmp593; + fftw_real tmp606; + fftw_real tmp589; + fftw_real tmp601; + fftw_real tmp613; + fftw_real tmp621; + fftw_real tmp582; + fftw_real tmp600; + fftw_real tmp610; + fftw_real tmp620; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp565; + fftw_real tmp566; + fftw_real tmp591; + fftw_real tmp592; + ASSERT_ALIGNED_DOUBLE; + tmp565 = tmp461 - tmp462; + tmp566 = tmp534 - tmp533; + tmp567 = tmp565 - tmp566; + tmp605 = tmp565 + tmp566; + { + fftw_real tmp570; + fftw_real tmp573; + fftw_real tmp594; + fftw_real tmp595; + ASSERT_ALIGNED_DOUBLE; + tmp570 = (K471396736 * tmp568) + (K881921264 * tmp569); + tmp573 = (K881921264 * tmp571) - (K471396736 * tmp572); + tmp574 = tmp570 - tmp573; + tmp615 = tmp573 + tmp570; + tmp594 = tmp469 - tmp466; + tmp595 = tmp531 - tmp530; + tmp596 = tmp594 - tmp595; + tmp616 = tmp595 + tmp594; + } + tmp591 = (K881921264 * tmp568) - (K471396736 * tmp569); + tmp592 = (K881921264 * tmp572) + (K471396736 * tmp571); + tmp593 = tmp591 - tmp592; + tmp606 = tmp592 + tmp591; + { + fftw_real tmp585; + fftw_real tmp611; + fftw_real tmp588; + fftw_real tmp612; + fftw_real tmp584; + fftw_real tmp586; + ASSERT_ALIGNED_DOUBLE; + tmp584 = tmp522 - tmp521; + tmp585 = tmp583 - tmp584; + tmp611 = tmp583 + tmp584; + tmp586 = tmp515 - tmp512; + tmp588 = tmp586 - tmp587; + tmp612 = tmp587 + tmp586; + tmp589 = (K857728610 * tmp585) - (K514102744 * tmp588); + tmp601 = (K857728610 * tmp588) + (K514102744 * tmp585); + tmp613 = (K970031253 * tmp611) - (K242980179 * tmp612); + tmp621 = (K970031253 * tmp612) + (K242980179 * tmp611); + } + { + fftw_real tmp578; + fftw_real tmp608; + fftw_real tmp581; + fftw_real tmp609; + fftw_real tmp576; + fftw_real tmp580; + ASSERT_ALIGNED_DOUBLE; + tmp576 = tmp496 - tmp493; + tmp578 = tmp576 - tmp577; + tmp608 = tmp577 + tmp576; + tmp580 = tmp503 - tmp502; + tmp581 = tmp579 - tmp580; + tmp609 = tmp579 + tmp580; + tmp582 = (K514102744 * tmp578) + (K857728610 * tmp581); + tmp600 = (K857728610 * tmp578) - (K514102744 * tmp581); + tmp610 = (K242980179 * tmp608) + (K970031253 * tmp609); + tmp620 = (K970031253 * tmp608) - (K242980179 * tmp609); + } + } + { + fftw_real tmp575; + fftw_real tmp590; + fftw_real tmp597; + fftw_real tmp598; + ASSERT_ALIGNED_DOUBLE; + tmp575 = tmp567 + tmp574; + tmp590 = tmp582 + tmp589; + real_output[53 * real_ostride] = tmp575 - tmp590; + real_output[11 * real_ostride] = tmp575 + tmp590; + tmp597 = tmp593 - tmp596; + tmp598 = tmp589 - tmp582; + imag_output[21 * imag_ostride] = tmp597 + tmp598; + imag_output[43 * imag_ostride] = tmp598 - tmp597; + } + { + fftw_real tmp599; + fftw_real tmp602; + fftw_real tmp603; + fftw_real tmp604; + ASSERT_ALIGNED_DOUBLE; + tmp599 = tmp596 + tmp593; + tmp602 = tmp600 + tmp601; + imag_output[11 * imag_ostride] = tmp599 + tmp602; + imag_output[53 * imag_ostride] = tmp602 - tmp599; + tmp603 = tmp567 - tmp574; + tmp604 = tmp601 - tmp600; + real_output[43 * real_ostride] = tmp603 - tmp604; + real_output[21 * real_ostride] = tmp603 + tmp604; + } + { + fftw_real tmp607; + fftw_real tmp614; + fftw_real tmp617; + fftw_real tmp618; + ASSERT_ALIGNED_DOUBLE; + tmp607 = tmp605 + tmp606; + tmp614 = tmp610 + tmp613; + real_output[59 * real_ostride] = tmp607 - tmp614; + real_output[5 * real_ostride] = tmp607 + tmp614; + tmp617 = tmp615 - tmp616; + tmp618 = tmp613 - tmp610; + imag_output[27 * imag_ostride] = tmp617 + tmp618; + imag_output[37 * imag_ostride] = tmp618 - tmp617; + } + { + fftw_real tmp619; + fftw_real tmp622; + fftw_real tmp623; + fftw_real tmp624; + ASSERT_ALIGNED_DOUBLE; + tmp619 = tmp616 + tmp615; + tmp622 = tmp620 + tmp621; + imag_output[5 * imag_ostride] = tmp619 + tmp622; + imag_output[59 * imag_ostride] = tmp622 - tmp619; + tmp623 = tmp605 - tmp606; + tmp624 = tmp621 - tmp620; + real_output[37 * real_ostride] = tmp623 - tmp624; + real_output[27 * real_ostride] = tmp623 + tmp624; + } + } +} + +fftw_codelet_desc fftw_real2hc_128_desc = +{ + "fftw_real2hc_128", + (void (*)()) fftw_real2hc_128, + 128, + FFTW_FORWARD, + FFTW_REAL2HC, + 2818, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/frc_13.c b/src/sndobj/rfftw/frc_13.c new file mode 100644 index 0000000..270372f --- /dev/null +++ b/src/sndobj/rfftw/frc_13.c @@ -0,0 +1,271 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:43:56 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -real2hc 13 */ + +/* + * This function contains 76 FP additions, 34 FP multiplications, + * (or, 57 additions, 15 multiplications, 19 fused multiply/add), + * 34 stack variables, and 26 memory accesses + */ +static const fftw_real K083333333 = FFTW_KONST(+0.083333333333333333333333333333333333333333333); +static const fftw_real K075902986 = FFTW_KONST(+0.075902986037193865983102897245103540356428373); +static const fftw_real K251768516 = FFTW_KONST(+0.251768516431883313623436926934233488546674281); +static const fftw_real K503537032 = FFTW_KONST(+0.503537032863766627246873853868466977093348562); +static const fftw_real K113854479 = FFTW_KONST(+0.113854479055790798974654345867655310534642560); +static const fftw_real K265966249 = FFTW_KONST(+0.265966249214837287587521063842185948798330267); +static const fftw_real K387390585 = FFTW_KONST(+0.387390585467617292130675966426762851778775217); +static const fftw_real K300462606 = FFTW_KONST(+0.300462606288665774426601772289207995520941381); +static const fftw_real K258260390 = FFTW_KONST(+0.258260390311744861420450644284508567852516811); +static const fftw_real K132983124 = FFTW_KONST(+0.132983124607418643793760531921092974399165133); +static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); +static const fftw_real K1_732050807 = FFTW_KONST(+1.732050807568877293527446341505872366942805254); +static const fftw_real K156891391 = FFTW_KONST(+0.156891391051584611046832726756003269660212636); +static const fftw_real K256247671 = FFTW_KONST(+0.256247671582936600958684654061725059144125175); +static const fftw_real K011599105 = FFTW_KONST(+0.011599105605768290721655456654083252189827041); +static const fftw_real K300238635 = FFTW_KONST(+0.300238635966332641462884626667381504676006424); +static const fftw_real K174138601 = FFTW_KONST(+0.174138601152135905005660794929264742616964676); +static const fftw_real K575140729 = FFTW_KONST(+0.575140729474003121368385547455453388461001608); +static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); +static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); + +/* + * Generator Id's : + * $Id: frc_13.c,v 1.1.1.1 2006/05/12 15:14:45 veplaini Exp $ + * $Id: frc_13.c,v 1.1.1.1 2006/05/12 15:14:45 veplaini Exp $ + * $Id: frc_13.c,v 1.1.1.1 2006/05/12 15:14:45 veplaini Exp $ + */ + +void fftw_real2hc_13(const fftw_real *input, fftw_real *real_output, fftw_real *imag_output, int istride, int real_ostride, int imag_ostride) +{ + fftw_real tmp65; + fftw_real tmp11; + fftw_real tmp28; + fftw_real tmp37; + fftw_real tmp51; + fftw_real tmp62; + fftw_real tmp22; + fftw_real tmp58; + fftw_real tmp59; + fftw_real tmp66; + fftw_real tmp56; + fftw_real tmp63; + fftw_real tmp35; + fftw_real tmp38; + ASSERT_ALIGNED_DOUBLE; + tmp65 = input[0]; + { + fftw_real tmp3; + fftw_real tmp53; + fftw_real tmp21; + fftw_real tmp30; + fftw_real tmp26; + fftw_real tmp16; + fftw_real tmp29; + fftw_real tmp25; + fftw_real tmp6; + fftw_real tmp32; + fftw_real tmp9; + fftw_real tmp33; + fftw_real tmp10; + fftw_real tmp54; + fftw_real tmp1; + fftw_real tmp2; + ASSERT_ALIGNED_DOUBLE; + tmp1 = input[8 * istride]; + tmp2 = input[5 * istride]; + tmp3 = tmp1 - tmp2; + tmp53 = tmp1 + tmp2; + { + fftw_real tmp17; + fftw_real tmp18; + fftw_real tmp19; + fftw_real tmp20; + ASSERT_ALIGNED_DOUBLE; + tmp17 = input[12 * istride]; + tmp18 = input[4 * istride]; + tmp19 = input[10 * istride]; + tmp20 = tmp18 + tmp19; + tmp21 = tmp17 + tmp20; + tmp30 = tmp17 - (K500000000 * tmp20); + tmp26 = tmp18 - tmp19; + } + { + fftw_real tmp12; + fftw_real tmp13; + fftw_real tmp14; + fftw_real tmp15; + ASSERT_ALIGNED_DOUBLE; + tmp12 = input[istride]; + tmp13 = input[3 * istride]; + tmp14 = input[9 * istride]; + tmp15 = tmp13 + tmp14; + tmp16 = tmp12 + tmp15; + tmp29 = tmp12 - (K500000000 * tmp15); + tmp25 = tmp13 - tmp14; + } + { + fftw_real tmp4; + fftw_real tmp5; + fftw_real tmp7; + fftw_real tmp8; + ASSERT_ALIGNED_DOUBLE; + tmp4 = input[6 * istride]; + tmp5 = input[11 * istride]; + tmp6 = tmp4 - tmp5; + tmp32 = tmp4 + tmp5; + tmp7 = input[2 * istride]; + tmp8 = input[7 * istride]; + tmp9 = tmp7 - tmp8; + tmp33 = tmp7 + tmp8; + } + tmp10 = tmp6 + tmp9; + tmp54 = tmp32 + tmp33; + tmp11 = tmp3 - tmp10; + { + fftw_real tmp24; + fftw_real tmp27; + fftw_real tmp49; + fftw_real tmp50; + ASSERT_ALIGNED_DOUBLE; + tmp24 = tmp3 + (K500000000 * tmp10); + tmp27 = K866025403 * (tmp25 + tmp26); + tmp28 = tmp24 - tmp27; + tmp37 = tmp27 + tmp24; + tmp49 = tmp9 - tmp6; + tmp50 = tmp25 - tmp26; + tmp51 = tmp49 - tmp50; + tmp62 = tmp50 + tmp49; + } + tmp22 = tmp16 - tmp21; + tmp58 = tmp16 + tmp21; + tmp59 = tmp53 + tmp54; + tmp66 = tmp58 + tmp59; + { + fftw_real tmp52; + fftw_real tmp55; + fftw_real tmp31; + fftw_real tmp34; + ASSERT_ALIGNED_DOUBLE; + tmp52 = tmp29 + tmp30; + tmp55 = tmp53 - (K500000000 * tmp54); + tmp56 = tmp52 - tmp55; + tmp63 = tmp52 + tmp55; + tmp31 = tmp29 - tmp30; + tmp34 = K866025403 * (tmp32 - tmp33); + tmp35 = tmp31 + tmp34; + tmp38 = tmp31 - tmp34; + } + } + real_output[0] = tmp65 + tmp66; + { + fftw_real tmp23; + fftw_real tmp45; + fftw_real tmp40; + fftw_real tmp48; + fftw_real tmp44; + fftw_real tmp46; + fftw_real tmp41; + fftw_real tmp47; + ASSERT_ALIGNED_DOUBLE; + tmp23 = (K575140729 * tmp11) - (K174138601 * tmp22); + tmp45 = (K575140729 * tmp22) + (K174138601 * tmp11); + { + fftw_real tmp36; + fftw_real tmp39; + fftw_real tmp42; + fftw_real tmp43; + ASSERT_ALIGNED_DOUBLE; + tmp36 = (K300238635 * tmp28) + (K011599105 * tmp35); + tmp39 = (K256247671 * tmp37) + (K156891391 * tmp38); + tmp40 = tmp36 - tmp39; + tmp48 = K1_732050807 * (tmp39 + tmp36); + tmp42 = (K300238635 * tmp35) - (K011599105 * tmp28); + tmp43 = (K156891391 * tmp37) - (K256247671 * tmp38); + tmp44 = K1_732050807 * (tmp42 - tmp43); + tmp46 = tmp43 + tmp42; + } + imag_output[imag_ostride] = tmp23 + (K2_000000000 * tmp40); + tmp41 = tmp23 - tmp40; + imag_output[3 * imag_ostride] = tmp41 - tmp44; + imag_output[4 * imag_ostride] = -(tmp41 + tmp44); + imag_output[5 * imag_ostride] = -(tmp45 + (K2_000000000 * tmp46)); + tmp47 = tmp46 - tmp45; + imag_output[2 * imag_ostride] = tmp47 - tmp48; + imag_output[6 * imag_ostride] = tmp48 + tmp47; + } + { + fftw_real tmp61; + fftw_real tmp70; + fftw_real tmp74; + fftw_real tmp76; + fftw_real tmp68; + fftw_real tmp69; + fftw_real tmp57; + fftw_real tmp60; + fftw_real tmp71; + fftw_real tmp75; + ASSERT_ALIGNED_DOUBLE; + tmp57 = (K132983124 * tmp51) + (K258260390 * tmp56); + tmp60 = K300462606 * (tmp58 - tmp59); + tmp61 = (K2_000000000 * tmp57) + tmp60; + tmp70 = tmp60 - tmp57; + { + fftw_real tmp72; + fftw_real tmp73; + fftw_real tmp64; + fftw_real tmp67; + ASSERT_ALIGNED_DOUBLE; + tmp72 = (K387390585 * tmp51) - (K265966249 * tmp56); + tmp73 = (K113854479 * tmp62) - (K503537032 * tmp63); + tmp74 = tmp72 + tmp73; + tmp76 = tmp73 - tmp72; + tmp64 = (K251768516 * tmp62) + (K075902986 * tmp63); + tmp67 = tmp65 - (K083333333 * tmp66); + tmp68 = (K2_000000000 * tmp64) + tmp67; + tmp69 = tmp67 - tmp64; + } + real_output[real_ostride] = tmp61 + tmp68; + real_output[5 * real_ostride] = tmp68 - tmp61; + tmp71 = tmp69 - tmp70; + real_output[2 * real_ostride] = tmp71 - tmp74; + real_output[6 * real_ostride] = tmp74 + tmp71; + tmp75 = tmp70 + tmp69; + real_output[3 * real_ostride] = tmp75 - tmp76; + real_output[4 * real_ostride] = tmp76 + tmp75; + } +} + +fftw_codelet_desc fftw_real2hc_13_desc = +{ + "fftw_real2hc_13", + (void (*)()) fftw_real2hc_13, + 13, + FFTW_FORWARD, + FFTW_REAL2HC, + 288, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/frc_14.c b/src/sndobj/rfftw/frc_14.c new file mode 100644 index 0000000..75b1dba --- /dev/null +++ b/src/sndobj/rfftw/frc_14.c @@ -0,0 +1,171 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:43:58 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -real2hc 14 */ + +/* + * This function contains 62 FP additions, 36 FP multiplications, + * (or, 62 additions, 36 multiplications, 0 fused multiply/add), + * 22 stack variables, and 28 memory accesses + */ +static const fftw_real K900968867 = FFTW_KONST(+0.900968867902419126236102319507445051165919162); +static const fftw_real K222520933 = FFTW_KONST(+0.222520933956314404288902564496794759466355569); +static const fftw_real K623489801 = FFTW_KONST(+0.623489801858733530525004884004239810632274731); +static const fftw_real K433883739 = FFTW_KONST(+0.433883739117558120475768332848358754609990728); +static const fftw_real K974927912 = FFTW_KONST(+0.974927912181823607018131682993931217232785801); +static const fftw_real K781831482 = FFTW_KONST(+0.781831482468029808708444526674057750232334519); + +/* + * Generator Id's : + * $Id: frc_14.c,v 1.1.1.1 2006/05/12 15:14:47 veplaini Exp $ + * $Id: frc_14.c,v 1.1.1.1 2006/05/12 15:14:47 veplaini Exp $ + * $Id: frc_14.c,v 1.1.1.1 2006/05/12 15:14:47 veplaini Exp $ + */ + +void fftw_real2hc_14(const fftw_real *input, fftw_real *real_output, fftw_real *imag_output, int istride, int real_ostride, int imag_ostride) +{ + fftw_real tmp3; + fftw_real tmp37; + fftw_real tmp6; + fftw_real tmp31; + fftw_real tmp23; + fftw_real tmp28; + fftw_real tmp20; + fftw_real tmp29; + fftw_real tmp13; + fftw_real tmp34; + fftw_real tmp9; + fftw_real tmp32; + fftw_real tmp16; + fftw_real tmp35; + fftw_real tmp1; + fftw_real tmp2; + ASSERT_ALIGNED_DOUBLE; + tmp1 = input[0]; + tmp2 = input[7 * istride]; + tmp3 = tmp1 - tmp2; + tmp37 = tmp1 + tmp2; + { + fftw_real tmp4; + fftw_real tmp5; + fftw_real tmp21; + fftw_real tmp22; + ASSERT_ALIGNED_DOUBLE; + tmp4 = input[4 * istride]; + tmp5 = input[11 * istride]; + tmp6 = tmp4 - tmp5; + tmp31 = tmp4 + tmp5; + tmp21 = input[12 * istride]; + tmp22 = input[5 * istride]; + tmp23 = tmp21 - tmp22; + tmp28 = tmp21 + tmp22; + } + { + fftw_real tmp18; + fftw_real tmp19; + fftw_real tmp11; + fftw_real tmp12; + ASSERT_ALIGNED_DOUBLE; + tmp18 = input[2 * istride]; + tmp19 = input[9 * istride]; + tmp20 = tmp18 - tmp19; + tmp29 = tmp18 + tmp19; + tmp11 = input[6 * istride]; + tmp12 = input[13 * istride]; + tmp13 = tmp11 - tmp12; + tmp34 = tmp11 + tmp12; + } + { + fftw_real tmp7; + fftw_real tmp8; + fftw_real tmp14; + fftw_real tmp15; + ASSERT_ALIGNED_DOUBLE; + tmp7 = input[10 * istride]; + tmp8 = input[3 * istride]; + tmp9 = tmp7 - tmp8; + tmp32 = tmp7 + tmp8; + tmp14 = input[8 * istride]; + tmp15 = input[istride]; + tmp16 = tmp14 - tmp15; + tmp35 = tmp14 + tmp15; + } + { + fftw_real tmp25; + fftw_real tmp27; + fftw_real tmp26; + fftw_real tmp10; + fftw_real tmp24; + fftw_real tmp17; + ASSERT_ALIGNED_DOUBLE; + tmp25 = tmp23 - tmp20; + tmp27 = tmp16 - tmp13; + tmp26 = tmp9 - tmp6; + imag_output[imag_ostride] = (K781831482 * tmp25) + (K974927912 * tmp26) + (K433883739 * tmp27); + imag_output[5 * imag_ostride] = -((K974927912 * tmp25) - (K781831482 * tmp27) - (K433883739 * tmp26)); + imag_output[3 * imag_ostride] = (K433883739 * tmp25) + (K974927912 * tmp27) - (K781831482 * tmp26); + tmp10 = tmp6 + tmp9; + tmp24 = tmp20 + tmp23; + tmp17 = tmp13 + tmp16; + real_output[3 * real_ostride] = tmp3 + (K623489801 * tmp10) - (K222520933 * tmp17) - (K900968867 * tmp24); + real_output[7 * real_ostride] = tmp3 + tmp24 + tmp10 + tmp17; + real_output[real_ostride] = tmp3 + (K623489801 * tmp24) - (K900968867 * tmp17) - (K222520933 * tmp10); + real_output[5 * real_ostride] = tmp3 + (K623489801 * tmp17) - (K900968867 * tmp10) - (K222520933 * tmp24); + } + { + fftw_real tmp30; + fftw_real tmp36; + fftw_real tmp33; + fftw_real tmp38; + fftw_real tmp40; + fftw_real tmp39; + ASSERT_ALIGNED_DOUBLE; + tmp30 = tmp28 - tmp29; + tmp36 = tmp34 - tmp35; + tmp33 = tmp31 - tmp32; + imag_output[2 * imag_ostride] = (K974927912 * tmp30) + (K433883739 * tmp33) + (K781831482 * tmp36); + imag_output[6 * imag_ostride] = -((K781831482 * tmp30) - (K433883739 * tmp36) - (K974927912 * tmp33)); + imag_output[4 * imag_ostride] = -((K433883739 * tmp30) + (K781831482 * tmp33) - (K974927912 * tmp36)); + tmp38 = tmp29 + tmp28; + tmp40 = tmp31 + tmp32; + tmp39 = tmp34 + tmp35; + real_output[6 * real_ostride] = tmp37 + (K623489801 * tmp38) - (K900968867 * tmp39) - (K222520933 * tmp40); + real_output[2 * real_ostride] = tmp37 + (K623489801 * tmp39) - (K900968867 * tmp40) - (K222520933 * tmp38); + real_output[4 * real_ostride] = tmp37 + (K623489801 * tmp40) - (K222520933 * tmp39) - (K900968867 * tmp38); + real_output[0] = tmp37 + tmp38 + tmp40 + tmp39; + } +} + +fftw_codelet_desc fftw_real2hc_14_desc = +{ + "fftw_real2hc_14", + (void (*)()) fftw_real2hc_14, + 14, + FFTW_FORWARD, + FFTW_REAL2HC, + 310, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/frc_15.c b/src/sndobj/rfftw/frc_15.c new file mode 100644 index 0000000..7f307db --- /dev/null +++ b/src/sndobj/rfftw/frc_15.c @@ -0,0 +1,233 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:43:58 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -real2hc 15 */ + +/* + * This function contains 64 FP additions, 25 FP multiplications, + * (or, 50 additions, 11 multiplications, 14 fused multiply/add), + * 40 stack variables, and 30 memory accesses + */ +static const fftw_real K509036960 = FFTW_KONST(+0.509036960455127183450980863393907648510733164); +static const fftw_real K823639103 = FFTW_KONST(+0.823639103546331925877420039278190003029660514); +static const fftw_real K250000000 = FFTW_KONST(+0.250000000000000000000000000000000000000000000); +static const fftw_real K559016994 = FFTW_KONST(+0.559016994374947424102293417182819058860154590); +static const fftw_real K587785252 = FFTW_KONST(+0.587785252292473129168705954639072768597652438); +static const fftw_real K951056516 = FFTW_KONST(+0.951056516295153572116439333379382143405698634); +static const fftw_real K484122918 = FFTW_KONST(+0.484122918275927110647408174972799951354115213); +static const fftw_real K216506350 = FFTW_KONST(+0.216506350946109661690930792688234045867850657); +static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); +static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); + +/* + * Generator Id's : + * $Id: frc_15.c,v 1.1.1.1 2006/05/12 15:14:58 veplaini Exp $ + * $Id: frc_15.c,v 1.1.1.1 2006/05/12 15:14:58 veplaini Exp $ + * $Id: frc_15.c,v 1.1.1.1 2006/05/12 15:14:58 veplaini Exp $ + */ + +void fftw_real2hc_15(const fftw_real *input, fftw_real *real_output, fftw_real *imag_output, int istride, int real_ostride, int imag_ostride) +{ + fftw_real tmp3; + fftw_real tmp53; + fftw_real tmp47; + fftw_real tmp39; + fftw_real tmp40; + fftw_real tmp10; + fftw_real tmp17; + fftw_real tmp18; + fftw_real tmp57; + fftw_real tmp58; + fftw_real tmp59; + fftw_real tmp31; + fftw_real tmp34; + fftw_real tmp43; + fftw_real tmp54; + fftw_real tmp55; + fftw_real tmp56; + fftw_real tmp24; + fftw_real tmp27; + fftw_real tmp42; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp45; + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp46; + ASSERT_ALIGNED_DOUBLE; + tmp45 = input[0]; + tmp1 = input[10 * istride]; + tmp2 = input[5 * istride]; + tmp46 = tmp2 + tmp1; + tmp3 = tmp1 - tmp2; + tmp53 = tmp45 + tmp46; + tmp47 = tmp45 - (K500000000 * tmp46); + } + { + fftw_real tmp22; + fftw_real tmp29; + fftw_real tmp32; + fftw_real tmp6; + fftw_real tmp23; + fftw_real tmp25; + fftw_real tmp16; + fftw_real tmp33; + fftw_real tmp9; + fftw_real tmp26; + fftw_real tmp13; + fftw_real tmp30; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp4; + fftw_real tmp5; + fftw_real tmp14; + fftw_real tmp15; + ASSERT_ALIGNED_DOUBLE; + tmp22 = input[3 * istride]; + tmp29 = input[6 * istride]; + tmp32 = input[9 * istride]; + tmp4 = input[13 * istride]; + tmp5 = input[8 * istride]; + tmp6 = tmp4 - tmp5; + tmp23 = tmp5 + tmp4; + tmp25 = input[12 * istride]; + tmp14 = input[4 * istride]; + tmp15 = input[14 * istride]; + tmp16 = tmp14 - tmp15; + tmp33 = tmp15 + tmp14; + { + fftw_real tmp7; + fftw_real tmp8; + fftw_real tmp11; + fftw_real tmp12; + ASSERT_ALIGNED_DOUBLE; + tmp7 = input[7 * istride]; + tmp8 = input[2 * istride]; + tmp9 = tmp7 - tmp8; + tmp26 = tmp8 + tmp7; + tmp11 = input[istride]; + tmp12 = input[11 * istride]; + tmp13 = tmp11 - tmp12; + tmp30 = tmp12 + tmp11; + } + } + tmp39 = tmp6 - tmp9; + tmp40 = tmp13 - tmp16; + tmp10 = tmp6 + tmp9; + tmp17 = tmp13 + tmp16; + tmp18 = tmp10 + tmp17; + tmp57 = tmp29 + tmp30; + tmp58 = tmp32 + tmp33; + tmp59 = tmp57 + tmp58; + tmp31 = tmp29 - (K500000000 * tmp30); + tmp34 = tmp32 - (K500000000 * tmp33); + tmp43 = tmp31 + tmp34; + tmp54 = tmp22 + tmp23; + tmp55 = tmp25 + tmp26; + tmp56 = tmp54 + tmp55; + tmp24 = tmp22 - (K500000000 * tmp23); + tmp27 = tmp25 - (K500000000 * tmp26); + tmp42 = tmp24 + tmp27; + } + imag_output[5 * imag_ostride] = -(K866025403 * (tmp3 + tmp18)); + { + fftw_real tmp21; + fftw_real tmp37; + fftw_real tmp36; + fftw_real tmp38; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp19; + fftw_real tmp20; + fftw_real tmp28; + fftw_real tmp35; + ASSERT_ALIGNED_DOUBLE; + tmp19 = (K866025403 * tmp3) - (K216506350 * tmp18); + tmp20 = K484122918 * (tmp10 - tmp17); + tmp21 = tmp19 + tmp20; + tmp37 = tmp20 - tmp19; + tmp28 = tmp24 - tmp27; + tmp35 = tmp31 - tmp34; + tmp36 = (K951056516 * tmp28) + (K587785252 * tmp35); + tmp38 = (K951056516 * tmp35) - (K587785252 * tmp28); + } + imag_output[imag_ostride] = tmp21 - tmp36; + imag_output[4 * imag_ostride] = tmp21 + tmp36; + imag_output[2 * imag_ostride] = tmp37 + tmp38; + imag_output[7 * imag_ostride] = tmp38 - tmp37; + } + { + fftw_real tmp63; + fftw_real tmp64; + fftw_real tmp62; + fftw_real tmp60; + fftw_real tmp61; + ASSERT_ALIGNED_DOUBLE; + tmp63 = tmp54 - tmp55; + tmp64 = tmp57 - tmp58; + imag_output[3 * imag_ostride] = (K587785252 * tmp63) - (K951056516 * tmp64); + imag_output[6 * imag_ostride] = -((K951056516 * tmp63) + (K587785252 * tmp64)); + tmp62 = K559016994 * (tmp56 - tmp59); + tmp60 = tmp56 + tmp59; + tmp61 = tmp53 - (K250000000 * tmp60); + real_output[3 * real_ostride] = tmp61 - tmp62; + real_output[6 * real_ostride] = tmp62 + tmp61; + real_output[0] = tmp53 + tmp60; + { + fftw_real tmp41; + fftw_real tmp52; + fftw_real tmp44; + fftw_real tmp48; + fftw_real tmp49; + fftw_real tmp51; + fftw_real tmp50; + ASSERT_ALIGNED_DOUBLE; + tmp41 = (K823639103 * tmp39) + (K509036960 * tmp40); + tmp52 = (K509036960 * tmp39) - (K823639103 * tmp40); + tmp44 = K559016994 * (tmp42 - tmp43); + tmp48 = tmp42 + tmp43; + tmp49 = tmp47 - (K250000000 * tmp48); + real_output[5 * real_ostride] = tmp47 + tmp48; + tmp51 = tmp49 - tmp44; + real_output[2 * real_ostride] = tmp51 - tmp52; + real_output[7 * real_ostride] = tmp52 + tmp51; + tmp50 = tmp44 + tmp49; + real_output[real_ostride] = tmp41 + tmp50; + real_output[4 * real_ostride] = tmp50 - tmp41; + } + } +} + +fftw_codelet_desc fftw_real2hc_15_desc = +{ + "fftw_real2hc_15", + (void (*)()) fftw_real2hc_15, + 15, + FFTW_FORWARD, + FFTW_REAL2HC, + 332, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/frc_16.c b/src/sndobj/rfftw/frc_16.c new file mode 100644 index 0000000..fc4c6ba --- /dev/null +++ b/src/sndobj/rfftw/frc_16.c @@ -0,0 +1,218 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:43:58 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -real2hc 16 */ + +/* + * This function contains 58 FP additions, 12 FP multiplications, + * (or, 54 additions, 8 multiplications, 4 fused multiply/add), + * 30 stack variables, and 32 memory accesses + */ +static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); +static const fftw_real K923879532 = FFTW_KONST(+0.923879532511286756128183189396788286822416626); +static const fftw_real K382683432 = FFTW_KONST(+0.382683432365089771728459984030398866761344562); + +/* + * Generator Id's : + * $Id: frc_16.c,v 1.1.1.1 2006/05/12 15:14:55 veplaini Exp $ + * $Id: frc_16.c,v 1.1.1.1 2006/05/12 15:14:55 veplaini Exp $ + * $Id: frc_16.c,v 1.1.1.1 2006/05/12 15:14:55 veplaini Exp $ + */ + +void fftw_real2hc_16(const fftw_real *input, fftw_real *real_output, fftw_real *imag_output, int istride, int real_ostride, int imag_ostride) +{ + fftw_real tmp3; + fftw_real tmp6; + fftw_real tmp7; + fftw_real tmp35; + fftw_real tmp18; + fftw_real tmp33; + fftw_real tmp40; + fftw_real tmp48; + fftw_real tmp56; + fftw_real tmp10; + fftw_real tmp13; + fftw_real tmp14; + fftw_real tmp36; + fftw_real tmp17; + fftw_real tmp26; + fftw_real tmp41; + fftw_real tmp51; + fftw_real tmp57; + fftw_real tmp16; + fftw_real tmp15; + fftw_real tmp43; + fftw_real tmp44; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp4; + fftw_real tmp5; + ASSERT_ALIGNED_DOUBLE; + tmp1 = input[0]; + tmp2 = input[8 * istride]; + tmp3 = tmp1 + tmp2; + tmp4 = input[4 * istride]; + tmp5 = input[12 * istride]; + tmp6 = tmp4 + tmp5; + tmp7 = tmp3 + tmp6; + tmp35 = tmp1 - tmp2; + tmp18 = tmp4 - tmp5; + } + { + fftw_real tmp29; + fftw_real tmp46; + fftw_real tmp32; + fftw_real tmp47; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp27; + fftw_real tmp28; + fftw_real tmp30; + fftw_real tmp31; + ASSERT_ALIGNED_DOUBLE; + tmp27 = input[istride]; + tmp28 = input[9 * istride]; + tmp29 = tmp27 - tmp28; + tmp46 = tmp27 + tmp28; + tmp30 = input[5 * istride]; + tmp31 = input[13 * istride]; + tmp32 = tmp30 - tmp31; + tmp47 = tmp30 + tmp31; + } + tmp33 = (K382683432 * tmp29) + (K923879532 * tmp32); + tmp40 = (K923879532 * tmp29) - (K382683432 * tmp32); + tmp48 = tmp46 - tmp47; + tmp56 = tmp46 + tmp47; + } + { + fftw_real tmp8; + fftw_real tmp9; + fftw_real tmp11; + fftw_real tmp12; + ASSERT_ALIGNED_DOUBLE; + tmp8 = input[2 * istride]; + tmp9 = input[10 * istride]; + tmp10 = tmp8 + tmp9; + tmp16 = tmp8 - tmp9; + tmp11 = input[14 * istride]; + tmp12 = input[6 * istride]; + tmp13 = tmp11 + tmp12; + tmp15 = tmp11 - tmp12; + } + tmp14 = tmp10 + tmp13; + tmp36 = K707106781 * (tmp16 + tmp15); + tmp17 = K707106781 * (tmp15 - tmp16); + { + fftw_real tmp22; + fftw_real tmp49; + fftw_real tmp25; + fftw_real tmp50; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp20; + fftw_real tmp21; + fftw_real tmp23; + fftw_real tmp24; + ASSERT_ALIGNED_DOUBLE; + tmp20 = input[15 * istride]; + tmp21 = input[7 * istride]; + tmp22 = tmp20 - tmp21; + tmp49 = tmp20 + tmp21; + tmp23 = input[3 * istride]; + tmp24 = input[11 * istride]; + tmp25 = tmp23 - tmp24; + tmp50 = tmp23 + tmp24; + } + tmp26 = (K382683432 * tmp22) - (K923879532 * tmp25); + tmp41 = (K923879532 * tmp22) + (K382683432 * tmp25); + tmp51 = tmp49 - tmp50; + tmp57 = tmp49 + tmp50; + } + { + fftw_real tmp55; + fftw_real tmp58; + fftw_real tmp53; + fftw_real tmp54; + ASSERT_ALIGNED_DOUBLE; + real_output[4 * real_ostride] = tmp7 - tmp14; + tmp55 = tmp7 + tmp14; + tmp58 = tmp56 + tmp57; + real_output[8 * real_ostride] = tmp55 - tmp58; + real_output[0] = tmp55 + tmp58; + imag_output[4 * imag_ostride] = tmp57 - tmp56; + tmp53 = tmp13 - tmp10; + tmp54 = K707106781 * (tmp51 - tmp48); + imag_output[2 * imag_ostride] = tmp53 + tmp54; + imag_output[6 * imag_ostride] = tmp54 - tmp53; + } + { + fftw_real tmp45; + fftw_real tmp52; + fftw_real tmp39; + fftw_real tmp42; + ASSERT_ALIGNED_DOUBLE; + tmp45 = tmp3 - tmp6; + tmp52 = K707106781 * (tmp48 + tmp51); + real_output[6 * real_ostride] = tmp45 - tmp52; + real_output[2 * real_ostride] = tmp45 + tmp52; + tmp39 = tmp35 + tmp36; + tmp42 = tmp40 + tmp41; + real_output[7 * real_ostride] = tmp39 - tmp42; + real_output[real_ostride] = tmp39 + tmp42; + } + tmp43 = tmp18 + tmp17; + tmp44 = tmp41 - tmp40; + imag_output[3 * imag_ostride] = tmp43 + tmp44; + imag_output[5 * imag_ostride] = tmp44 - tmp43; + { + fftw_real tmp19; + fftw_real tmp34; + fftw_real tmp37; + fftw_real tmp38; + ASSERT_ALIGNED_DOUBLE; + tmp19 = tmp17 - tmp18; + tmp34 = tmp26 - tmp33; + imag_output[imag_ostride] = tmp19 + tmp34; + imag_output[7 * imag_ostride] = tmp34 - tmp19; + tmp37 = tmp35 - tmp36; + tmp38 = tmp33 + tmp26; + real_output[5 * real_ostride] = tmp37 - tmp38; + real_output[3 * real_ostride] = tmp37 + tmp38; + } +} + +fftw_codelet_desc fftw_real2hc_16_desc = +{ + "fftw_real2hc_16", + (void (*)()) fftw_real2hc_16, + 16, + FFTW_FORWARD, + FFTW_REAL2HC, + 354, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/frc_2.c b/src/sndobj/rfftw/frc_2.c new file mode 100644 index 0000000..e4ede7e --- /dev/null +++ b/src/sndobj/rfftw/frc_2.c @@ -0,0 +1,62 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:43:53 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -real2hc 2 */ + +/* + * This function contains 2 FP additions, 0 FP multiplications, + * (or, 2 additions, 0 multiplications, 0 fused multiply/add), + * 2 stack variables, and 4 memory accesses + */ + +/* + * Generator Id's : + * $Id: frc_2.c,v 1.1.1.1 2006/05/12 15:14:48 veplaini Exp $ + * $Id: frc_2.c,v 1.1.1.1 2006/05/12 15:14:48 veplaini Exp $ + * $Id: frc_2.c,v 1.1.1.1 2006/05/12 15:14:48 veplaini Exp $ + */ + +void fftw_real2hc_2(const fftw_real *input, fftw_real *real_output, fftw_real *imag_output, int istride, int real_ostride, int imag_ostride) +{ + fftw_real tmp1; + fftw_real tmp2; + ASSERT_ALIGNED_DOUBLE; + tmp1 = input[0]; + tmp2 = input[istride]; + real_output[real_ostride] = tmp1 - tmp2; + real_output[0] = tmp1 + tmp2; +} + +fftw_codelet_desc fftw_real2hc_2_desc = +{ + "fftw_real2hc_2", + (void (*)()) fftw_real2hc_2, + 2, + FFTW_FORWARD, + FFTW_REAL2HC, + 46, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/frc_3.c b/src/sndobj/rfftw/frc_3.c new file mode 100644 index 0000000..c7ed409 --- /dev/null +++ b/src/sndobj/rfftw/frc_3.c @@ -0,0 +1,69 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:43:53 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -real2hc 3 */ + +/* + * This function contains 4 FP additions, 2 FP multiplications, + * (or, 3 additions, 1 multiplications, 1 fused multiply/add), + * 4 stack variables, and 6 memory accesses + */ +static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); +static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); + +/* + * Generator Id's : + * $Id: frc_3.c,v 1.1.1.1 2006/05/12 15:14:48 veplaini Exp $ + * $Id: frc_3.c,v 1.1.1.1 2006/05/12 15:14:48 veplaini Exp $ + * $Id: frc_3.c,v 1.1.1.1 2006/05/12 15:14:48 veplaini Exp $ + */ + +void fftw_real2hc_3(const fftw_real *input, fftw_real *real_output, fftw_real *imag_output, int istride, int real_ostride, int imag_ostride) +{ + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp3; + fftw_real tmp4; + ASSERT_ALIGNED_DOUBLE; + tmp1 = input[0]; + tmp2 = input[istride]; + tmp3 = input[2 * istride]; + tmp4 = tmp2 + tmp3; + real_output[real_ostride] = tmp1 - (K500000000 * tmp4); + real_output[0] = tmp1 + tmp4; + imag_output[imag_ostride] = K866025403 * (tmp3 - tmp2); +} + +fftw_codelet_desc fftw_real2hc_3_desc = +{ + "fftw_real2hc_3", + (void (*)()) fftw_real2hc_3, + 3, + FFTW_FORWARD, + FFTW_REAL2HC, + 68, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/frc_32.c b/src/sndobj/rfftw/frc_32.c new file mode 100644 index 0000000..32bc892 --- /dev/null +++ b/src/sndobj/rfftw/frc_32.c @@ -0,0 +1,476 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:43:59 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -real2hc 32 */ + +/* + * This function contains 156 FP additions, 42 FP multiplications, + * (or, 140 additions, 26 multiplications, 16 fused multiply/add), + * 46 stack variables, and 64 memory accesses + */ +static const fftw_real K195090322 = FFTW_KONST(+0.195090322016128267848284868477022240927691618); +static const fftw_real K980785280 = FFTW_KONST(+0.980785280403230449126182236134239036973933731); +static const fftw_real K555570233 = FFTW_KONST(+0.555570233019602224742830813948532874374937191); +static const fftw_real K831469612 = FFTW_KONST(+0.831469612302545237078788377617905756738560812); +static const fftw_real K382683432 = FFTW_KONST(+0.382683432365089771728459984030398866761344562); +static const fftw_real K923879532 = FFTW_KONST(+0.923879532511286756128183189396788286822416626); +static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); + +/* + * Generator Id's : + * $Id: frc_32.c,v 1.1.1.1 2006/05/12 15:14:55 veplaini Exp $ + * $Id: frc_32.c,v 1.1.1.1 2006/05/12 15:14:55 veplaini Exp $ + * $Id: frc_32.c,v 1.1.1.1 2006/05/12 15:14:55 veplaini Exp $ + */ + +void fftw_real2hc_32(const fftw_real *input, fftw_real *real_output, fftw_real *imag_output, int istride, int real_ostride, int imag_ostride) +{ + fftw_real tmp7; + fftw_real tmp135; + fftw_real tmp31; + fftw_real tmp83; + fftw_real tmp14; + fftw_real tmp148; + fftw_real tmp34; + fftw_real tmp82; + fftw_real tmp123; + fftw_real tmp143; + fftw_real tmp71; + fftw_real tmp99; + fftw_real tmp126; + fftw_real tmp144; + fftw_real tmp76; + fftw_real tmp100; + fftw_real tmp22; + fftw_real tmp136; + fftw_real tmp38; + fftw_real tmp80; + fftw_real tmp29; + fftw_real tmp137; + fftw_real tmp41; + fftw_real tmp79; + fftw_real tmp116; + fftw_real tmp140; + fftw_real tmp54; + fftw_real tmp96; + fftw_real tmp119; + fftw_real tmp141; + fftw_real tmp59; + fftw_real tmp97; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp3; + fftw_real tmp4; + fftw_real tmp5; + fftw_real tmp6; + ASSERT_ALIGNED_DOUBLE; + tmp1 = input[0]; + tmp2 = input[16 * istride]; + tmp3 = tmp1 + tmp2; + tmp4 = input[8 * istride]; + tmp5 = input[24 * istride]; + tmp6 = tmp4 + tmp5; + tmp7 = tmp3 + tmp6; + tmp135 = tmp3 - tmp6; + tmp31 = tmp1 - tmp2; + tmp83 = tmp4 - tmp5; + } + { + fftw_real tmp10; + fftw_real tmp32; + fftw_real tmp13; + fftw_real tmp33; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp8; + fftw_real tmp9; + fftw_real tmp11; + fftw_real tmp12; + ASSERT_ALIGNED_DOUBLE; + tmp8 = input[4 * istride]; + tmp9 = input[20 * istride]; + tmp10 = tmp8 + tmp9; + tmp32 = tmp8 - tmp9; + tmp11 = input[28 * istride]; + tmp12 = input[12 * istride]; + tmp13 = tmp11 + tmp12; + tmp33 = tmp11 - tmp12; + } + tmp14 = tmp10 + tmp13; + tmp148 = tmp13 - tmp10; + tmp34 = K707106781 * (tmp32 + tmp33); + tmp82 = K707106781 * (tmp33 - tmp32); + } + { + fftw_real tmp63; + fftw_real tmp121; + fftw_real tmp75; + fftw_real tmp122; + fftw_real tmp66; + fftw_real tmp124; + fftw_real tmp69; + fftw_real tmp125; + fftw_real tmp70; + fftw_real tmp72; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp61; + fftw_real tmp62; + fftw_real tmp73; + fftw_real tmp74; + ASSERT_ALIGNED_DOUBLE; + tmp61 = input[31 * istride]; + tmp62 = input[15 * istride]; + tmp63 = tmp61 - tmp62; + tmp121 = tmp61 + tmp62; + tmp73 = input[7 * istride]; + tmp74 = input[23 * istride]; + tmp75 = tmp73 - tmp74; + tmp122 = tmp73 + tmp74; + } + { + fftw_real tmp64; + fftw_real tmp65; + fftw_real tmp67; + fftw_real tmp68; + ASSERT_ALIGNED_DOUBLE; + tmp64 = input[3 * istride]; + tmp65 = input[19 * istride]; + tmp66 = tmp64 - tmp65; + tmp124 = tmp64 + tmp65; + tmp67 = input[27 * istride]; + tmp68 = input[11 * istride]; + tmp69 = tmp67 - tmp68; + tmp125 = tmp67 + tmp68; + } + tmp123 = tmp121 + tmp122; + tmp143 = tmp121 - tmp122; + tmp70 = K707106781 * (tmp66 + tmp69); + tmp71 = tmp63 + tmp70; + tmp99 = tmp63 - tmp70; + tmp126 = tmp124 + tmp125; + tmp144 = tmp125 - tmp124; + tmp72 = K707106781 * (tmp69 - tmp66); + tmp76 = tmp72 - tmp75; + tmp100 = tmp75 + tmp72; + } + { + fftw_real tmp18; + fftw_real tmp36; + fftw_real tmp21; + fftw_real tmp37; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp16; + fftw_real tmp17; + fftw_real tmp19; + fftw_real tmp20; + ASSERT_ALIGNED_DOUBLE; + tmp16 = input[2 * istride]; + tmp17 = input[18 * istride]; + tmp18 = tmp16 + tmp17; + tmp36 = tmp16 - tmp17; + tmp19 = input[10 * istride]; + tmp20 = input[26 * istride]; + tmp21 = tmp19 + tmp20; + tmp37 = tmp19 - tmp20; + } + tmp22 = tmp18 + tmp21; + tmp136 = tmp18 - tmp21; + tmp38 = (K923879532 * tmp36) - (K382683432 * tmp37); + tmp80 = (K382683432 * tmp36) + (K923879532 * tmp37); + } + { + fftw_real tmp25; + fftw_real tmp39; + fftw_real tmp28; + fftw_real tmp40; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp23; + fftw_real tmp24; + fftw_real tmp26; + fftw_real tmp27; + ASSERT_ALIGNED_DOUBLE; + tmp23 = input[30 * istride]; + tmp24 = input[14 * istride]; + tmp25 = tmp23 + tmp24; + tmp39 = tmp23 - tmp24; + tmp26 = input[6 * istride]; + tmp27 = input[22 * istride]; + tmp28 = tmp26 + tmp27; + tmp40 = tmp26 - tmp27; + } + tmp29 = tmp25 + tmp28; + tmp137 = tmp25 - tmp28; + tmp41 = (K923879532 * tmp39) + (K382683432 * tmp40); + tmp79 = (K382683432 * tmp39) - (K923879532 * tmp40); + } + { + fftw_real tmp46; + fftw_real tmp114; + fftw_real tmp58; + fftw_real tmp115; + fftw_real tmp49; + fftw_real tmp117; + fftw_real tmp52; + fftw_real tmp118; + fftw_real tmp53; + fftw_real tmp55; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp44; + fftw_real tmp45; + fftw_real tmp56; + fftw_real tmp57; + ASSERT_ALIGNED_DOUBLE; + tmp44 = input[istride]; + tmp45 = input[17 * istride]; + tmp46 = tmp44 - tmp45; + tmp114 = tmp44 + tmp45; + tmp56 = input[9 * istride]; + tmp57 = input[25 * istride]; + tmp58 = tmp56 - tmp57; + tmp115 = tmp56 + tmp57; + } + { + fftw_real tmp47; + fftw_real tmp48; + fftw_real tmp50; + fftw_real tmp51; + ASSERT_ALIGNED_DOUBLE; + tmp47 = input[5 * istride]; + tmp48 = input[21 * istride]; + tmp49 = tmp47 - tmp48; + tmp117 = tmp47 + tmp48; + tmp50 = input[29 * istride]; + tmp51 = input[13 * istride]; + tmp52 = tmp50 - tmp51; + tmp118 = tmp50 + tmp51; + } + tmp116 = tmp114 + tmp115; + tmp140 = tmp114 - tmp115; + tmp53 = K707106781 * (tmp49 + tmp52); + tmp54 = tmp46 + tmp53; + tmp96 = tmp46 - tmp53; + tmp119 = tmp117 + tmp118; + tmp141 = tmp118 - tmp117; + tmp55 = K707106781 * (tmp52 - tmp49); + tmp59 = tmp55 - tmp58; + tmp97 = tmp58 + tmp55; + } + { + fftw_real tmp15; + fftw_real tmp30; + fftw_real tmp131; + fftw_real tmp132; + fftw_real tmp133; + fftw_real tmp134; + ASSERT_ALIGNED_DOUBLE; + tmp15 = tmp7 + tmp14; + tmp30 = tmp22 + tmp29; + tmp131 = tmp15 + tmp30; + tmp132 = tmp116 + tmp119; + tmp133 = tmp123 + tmp126; + tmp134 = tmp132 + tmp133; + real_output[8 * real_ostride] = tmp15 - tmp30; + imag_output[8 * imag_ostride] = tmp133 - tmp132; + real_output[16 * real_ostride] = tmp131 - tmp134; + real_output[0] = tmp131 + tmp134; + } + { + fftw_real tmp113; + fftw_real tmp129; + fftw_real tmp128; + fftw_real tmp130; + fftw_real tmp120; + fftw_real tmp127; + ASSERT_ALIGNED_DOUBLE; + tmp113 = tmp7 - tmp14; + tmp129 = tmp29 - tmp22; + tmp120 = tmp116 - tmp119; + tmp127 = tmp123 - tmp126; + tmp128 = K707106781 * (tmp120 + tmp127); + tmp130 = K707106781 * (tmp127 - tmp120); + real_output[12 * real_ostride] = tmp113 - tmp128; + real_output[4 * real_ostride] = tmp113 + tmp128; + imag_output[4 * imag_ostride] = tmp129 + tmp130; + imag_output[12 * imag_ostride] = tmp130 - tmp129; + } + { + fftw_real tmp139; + fftw_real tmp155; + fftw_real tmp149; + fftw_real tmp151; + fftw_real tmp146; + fftw_real tmp150; + fftw_real tmp154; + fftw_real tmp156; + fftw_real tmp138; + fftw_real tmp147; + ASSERT_ALIGNED_DOUBLE; + tmp138 = K707106781 * (tmp136 + tmp137); + tmp139 = tmp135 + tmp138; + tmp155 = tmp135 - tmp138; + tmp147 = K707106781 * (tmp137 - tmp136); + tmp149 = tmp147 - tmp148; + tmp151 = tmp148 + tmp147; + { + fftw_real tmp142; + fftw_real tmp145; + fftw_real tmp152; + fftw_real tmp153; + ASSERT_ALIGNED_DOUBLE; + tmp142 = (K923879532 * tmp140) + (K382683432 * tmp141); + tmp145 = (K923879532 * tmp143) - (K382683432 * tmp144); + tmp146 = tmp142 + tmp145; + tmp150 = tmp145 - tmp142; + tmp152 = (K923879532 * tmp141) - (K382683432 * tmp140); + tmp153 = (K382683432 * tmp143) + (K923879532 * tmp144); + tmp154 = tmp152 + tmp153; + tmp156 = tmp153 - tmp152; + } + real_output[14 * real_ostride] = tmp139 - tmp146; + real_output[2 * real_ostride] = tmp139 + tmp146; + imag_output[6 * imag_ostride] = tmp149 + tmp150; + imag_output[10 * imag_ostride] = tmp150 - tmp149; + imag_output[2 * imag_ostride] = tmp151 + tmp154; + imag_output[14 * imag_ostride] = tmp154 - tmp151; + real_output[10 * real_ostride] = tmp155 - tmp156; + real_output[6 * real_ostride] = tmp155 + tmp156; + } + { + fftw_real tmp95; + fftw_real tmp111; + fftw_real tmp110; + fftw_real tmp112; + fftw_real tmp102; + fftw_real tmp106; + fftw_real tmp105; + fftw_real tmp107; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp93; + fftw_real tmp94; + fftw_real tmp108; + fftw_real tmp109; + ASSERT_ALIGNED_DOUBLE; + tmp93 = tmp31 - tmp34; + tmp94 = tmp80 + tmp79; + tmp95 = tmp93 + tmp94; + tmp111 = tmp93 - tmp94; + tmp108 = (K831469612 * tmp97) - (K555570233 * tmp96); + tmp109 = (K555570233 * tmp99) + (K831469612 * tmp100); + tmp110 = tmp108 + tmp109; + tmp112 = tmp109 - tmp108; + } + { + fftw_real tmp98; + fftw_real tmp101; + fftw_real tmp103; + fftw_real tmp104; + ASSERT_ALIGNED_DOUBLE; + tmp98 = (K831469612 * tmp96) + (K555570233 * tmp97); + tmp101 = (K831469612 * tmp99) - (K555570233 * tmp100); + tmp102 = tmp98 + tmp101; + tmp106 = tmp101 - tmp98; + tmp103 = tmp41 - tmp38; + tmp104 = tmp83 + tmp82; + tmp105 = tmp103 - tmp104; + tmp107 = tmp104 + tmp103; + } + real_output[13 * real_ostride] = tmp95 - tmp102; + real_output[3 * real_ostride] = tmp95 + tmp102; + imag_output[5 * imag_ostride] = tmp105 + tmp106; + imag_output[11 * imag_ostride] = tmp106 - tmp105; + imag_output[3 * imag_ostride] = tmp107 + tmp110; + imag_output[13 * imag_ostride] = tmp110 - tmp107; + real_output[11 * real_ostride] = tmp111 - tmp112; + real_output[5 * real_ostride] = tmp111 + tmp112; + } + { + fftw_real tmp43; + fftw_real tmp91; + fftw_real tmp90; + fftw_real tmp92; + fftw_real tmp78; + fftw_real tmp86; + fftw_real tmp85; + fftw_real tmp87; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp35; + fftw_real tmp42; + fftw_real tmp88; + fftw_real tmp89; + ASSERT_ALIGNED_DOUBLE; + tmp35 = tmp31 + tmp34; + tmp42 = tmp38 + tmp41; + tmp43 = tmp35 + tmp42; + tmp91 = tmp35 - tmp42; + tmp88 = (K980785280 * tmp59) - (K195090322 * tmp54); + tmp89 = (K195090322 * tmp71) + (K980785280 * tmp76); + tmp90 = tmp88 + tmp89; + tmp92 = tmp89 - tmp88; + } + { + fftw_real tmp60; + fftw_real tmp77; + fftw_real tmp81; + fftw_real tmp84; + ASSERT_ALIGNED_DOUBLE; + tmp60 = (K980785280 * tmp54) + (K195090322 * tmp59); + tmp77 = (K980785280 * tmp71) - (K195090322 * tmp76); + tmp78 = tmp60 + tmp77; + tmp86 = tmp77 - tmp60; + tmp81 = tmp79 - tmp80; + tmp84 = tmp82 - tmp83; + tmp85 = tmp81 - tmp84; + tmp87 = tmp84 + tmp81; + } + real_output[15 * real_ostride] = tmp43 - tmp78; + real_output[real_ostride] = tmp43 + tmp78; + imag_output[7 * imag_ostride] = tmp85 + tmp86; + imag_output[9 * imag_ostride] = tmp86 - tmp85; + imag_output[imag_ostride] = tmp87 + tmp90; + imag_output[15 * imag_ostride] = tmp90 - tmp87; + real_output[9 * real_ostride] = tmp91 - tmp92; + real_output[7 * real_ostride] = tmp91 + tmp92; + } +} + +fftw_codelet_desc fftw_real2hc_32_desc = +{ + "fftw_real2hc_32", + (void (*)()) fftw_real2hc_32, + 32, + FFTW_FORWARD, + FFTW_REAL2HC, + 706, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/frc_4.c b/src/sndobj/rfftw/frc_4.c new file mode 100644 index 0000000..ff43ac5 --- /dev/null +++ b/src/sndobj/rfftw/frc_4.c @@ -0,0 +1,72 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:43:53 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -real2hc 4 */ + +/* + * This function contains 6 FP additions, 0 FP multiplications, + * (or, 6 additions, 0 multiplications, 0 fused multiply/add), + * 6 stack variables, and 8 memory accesses + */ + +/* + * Generator Id's : + * $Id: frc_4.c,v 1.1.1.1 2006/05/12 15:14:48 veplaini Exp $ + * $Id: frc_4.c,v 1.1.1.1 2006/05/12 15:14:48 veplaini Exp $ + * $Id: frc_4.c,v 1.1.1.1 2006/05/12 15:14:48 veplaini Exp $ + */ + +void fftw_real2hc_4(const fftw_real *input, fftw_real *real_output, fftw_real *imag_output, int istride, int real_ostride, int imag_ostride) +{ + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp3; + fftw_real tmp4; + fftw_real tmp5; + fftw_real tmp6; + ASSERT_ALIGNED_DOUBLE; + tmp1 = input[0]; + tmp2 = input[2 * istride]; + tmp3 = tmp1 + tmp2; + tmp4 = input[istride]; + tmp5 = input[3 * istride]; + tmp6 = tmp4 + tmp5; + real_output[real_ostride] = tmp1 - tmp2; + imag_output[imag_ostride] = -(tmp4 - tmp5); + real_output[2 * real_ostride] = tmp3 - tmp6; + real_output[0] = tmp3 + tmp6; +} + +fftw_codelet_desc fftw_real2hc_4_desc = +{ + "fftw_real2hc_4", + (void (*)()) fftw_real2hc_4, + 4, + FFTW_FORWARD, + FFTW_REAL2HC, + 90, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/frc_5.c b/src/sndobj/rfftw/frc_5.c new file mode 100644 index 0000000..41e9fc9 --- /dev/null +++ b/src/sndobj/rfftw/frc_5.c @@ -0,0 +1,92 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:43:53 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -real2hc 5 */ + +/* + * This function contains 12 FP additions, 6 FP multiplications, + * (or, 9 additions, 3 multiplications, 3 fused multiply/add), + * 12 stack variables, and 10 memory accesses + */ +static const fftw_real K250000000 = FFTW_KONST(+0.250000000000000000000000000000000000000000000); +static const fftw_real K559016994 = FFTW_KONST(+0.559016994374947424102293417182819058860154590); +static const fftw_real K587785252 = FFTW_KONST(+0.587785252292473129168705954639072768597652438); +static const fftw_real K951056516 = FFTW_KONST(+0.951056516295153572116439333379382143405698634); + +/* + * Generator Id's : + * $Id: frc_5.c,v 1.1.1.1 2006/05/12 15:14:56 veplaini Exp $ + * $Id: frc_5.c,v 1.1.1.1 2006/05/12 15:14:56 veplaini Exp $ + * $Id: frc_5.c,v 1.1.1.1 2006/05/12 15:14:56 veplaini Exp $ + */ + +void fftw_real2hc_5(const fftw_real *input, fftw_real *real_output, fftw_real *imag_output, int istride, int real_ostride, int imag_ostride) +{ + fftw_real tmp10; + fftw_real tmp7; + fftw_real tmp8; + fftw_real tmp3; + fftw_real tmp11; + fftw_real tmp6; + fftw_real tmp9; + fftw_real tmp12; + ASSERT_ALIGNED_DOUBLE; + tmp10 = input[0]; + { + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp4; + fftw_real tmp5; + ASSERT_ALIGNED_DOUBLE; + tmp1 = input[istride]; + tmp2 = input[4 * istride]; + tmp7 = tmp1 + tmp2; + tmp4 = input[2 * istride]; + tmp5 = input[3 * istride]; + tmp8 = tmp4 + tmp5; + tmp3 = tmp1 - tmp2; + tmp11 = tmp7 + tmp8; + tmp6 = tmp4 - tmp5; + } + imag_output[imag_ostride] = -((K951056516 * tmp3) + (K587785252 * tmp6)); + imag_output[2 * imag_ostride] = (K951056516 * tmp6) - (K587785252 * tmp3); + real_output[0] = tmp10 + tmp11; + tmp9 = K559016994 * (tmp7 - tmp8); + tmp12 = tmp10 - (K250000000 * tmp11); + real_output[real_ostride] = tmp9 + tmp12; + real_output[2 * real_ostride] = tmp12 - tmp9; +} + +fftw_codelet_desc fftw_real2hc_5_desc = +{ + "fftw_real2hc_5", + (void (*)()) fftw_real2hc_5, + 5, + FFTW_FORWARD, + FFTW_REAL2HC, + 112, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/frc_6.c b/src/sndobj/rfftw/frc_6.c new file mode 100644 index 0000000..1d5b669 --- /dev/null +++ b/src/sndobj/rfftw/frc_6.c @@ -0,0 +1,95 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:43:54 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -real2hc 6 */ + +/* + * This function contains 14 FP additions, 4 FP multiplications, + * (or, 12 additions, 2 multiplications, 2 fused multiply/add), + * 14 stack variables, and 12 memory accesses + */ +static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); +static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); + +/* + * Generator Id's : + * $Id: frc_6.c,v 1.1.1.1 2006/05/12 15:14:59 veplaini Exp $ + * $Id: frc_6.c,v 1.1.1.1 2006/05/12 15:14:59 veplaini Exp $ + * $Id: frc_6.c,v 1.1.1.1 2006/05/12 15:14:59 veplaini Exp $ + */ + +void fftw_real2hc_6(const fftw_real *input, fftw_real *real_output, fftw_real *imag_output, int istride, int real_ostride, int imag_ostride) +{ + fftw_real tmp3; + fftw_real tmp13; + fftw_real tmp9; + fftw_real tmp11; + fftw_real tmp6; + fftw_real tmp12; + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp10; + fftw_real tmp14; + ASSERT_ALIGNED_DOUBLE; + tmp1 = input[0]; + tmp2 = input[3 * istride]; + tmp3 = tmp1 - tmp2; + tmp13 = tmp1 + tmp2; + { + fftw_real tmp7; + fftw_real tmp8; + fftw_real tmp4; + fftw_real tmp5; + ASSERT_ALIGNED_DOUBLE; + tmp7 = input[4 * istride]; + tmp8 = input[istride]; + tmp9 = tmp7 - tmp8; + tmp11 = tmp7 + tmp8; + tmp4 = input[2 * istride]; + tmp5 = input[5 * istride]; + tmp6 = tmp4 - tmp5; + tmp12 = tmp4 + tmp5; + } + imag_output[imag_ostride] = K866025403 * (tmp9 - tmp6); + tmp10 = tmp6 + tmp9; + real_output[real_ostride] = tmp3 - (K500000000 * tmp10); + real_output[3 * real_ostride] = tmp3 + tmp10; + imag_output[2 * imag_ostride] = -(K866025403 * (tmp11 - tmp12)); + tmp14 = tmp12 + tmp11; + real_output[2 * real_ostride] = tmp13 - (K500000000 * tmp14); + real_output[0] = tmp13 + tmp14; +} + +fftw_codelet_desc fftw_real2hc_6_desc = +{ + "fftw_real2hc_6", + (void (*)()) fftw_real2hc_6, + 6, + FFTW_FORWARD, + FFTW_REAL2HC, + 134, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/frc_64.c b/src/sndobj/rfftw/frc_64.c new file mode 100644 index 0000000..71ab867 --- /dev/null +++ b/src/sndobj/rfftw/frc_64.c @@ -0,0 +1,1109 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:43:59 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -real2hc 64 */ + +/* + * This function contains 394 FP additions, 124 FP multiplications, + * (or, 342 additions, 72 multiplications, 52 fused multiply/add), + * 90 stack variables, and 128 memory accesses + */ +static const fftw_real K471396736 = FFTW_KONST(+0.471396736825997648556387625905254377657460319); +static const fftw_real K881921264 = FFTW_KONST(+0.881921264348355029712756863660388349508442621); +static const fftw_real K290284677 = FFTW_KONST(+0.290284677254462367636192375817395274691476278); +static const fftw_real K956940335 = FFTW_KONST(+0.956940335732208864935797886980269969482849206); +static const fftw_real K555570233 = FFTW_KONST(+0.555570233019602224742830813948532874374937191); +static const fftw_real K831469612 = FFTW_KONST(+0.831469612302545237078788377617905756738560812); +static const fftw_real K995184726 = FFTW_KONST(+0.995184726672196886244836953109479921575474869); +static const fftw_real K098017140 = FFTW_KONST(+0.098017140329560601994195563888641845861136673); +static const fftw_real K773010453 = FFTW_KONST(+0.773010453362736960810906609758469800971041293); +static const fftw_real K634393284 = FFTW_KONST(+0.634393284163645498215171613225493370675687095); +static const fftw_real K980785280 = FFTW_KONST(+0.980785280403230449126182236134239036973933731); +static const fftw_real K195090322 = FFTW_KONST(+0.195090322016128267848284868477022240927691618); +static const fftw_real K382683432 = FFTW_KONST(+0.382683432365089771728459984030398866761344562); +static const fftw_real K923879532 = FFTW_KONST(+0.923879532511286756128183189396788286822416626); +static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); + +/* + * Generator Id's : + * $Id: frc_64.c,v 1.1.1.1 2006/05/12 15:14:44 veplaini Exp $ + * $Id: frc_64.c,v 1.1.1.1 2006/05/12 15:14:44 veplaini Exp $ + * $Id: frc_64.c,v 1.1.1.1 2006/05/12 15:14:44 veplaini Exp $ + */ + +void fftw_real2hc_64(const fftw_real *input, fftw_real *real_output, fftw_real *imag_output, int istride, int real_ostride, int imag_ostride) +{ + fftw_real tmp269; + fftw_real tmp7; + fftw_real tmp14; + fftw_real tmp15; + fftw_real tmp320; + fftw_real tmp67; + fftw_real tmp209; + fftw_real tmp179; + fftw_real tmp238; + fftw_real tmp301; + fftw_real tmp361; + fftw_real tmp381; + fftw_real tmp312; + fftw_real tmp143; + fftw_real tmp227; + fftw_real tmp167; + fftw_real tmp230; + fftw_real tmp158; + fftw_real tmp231; + fftw_real tmp162; + fftw_real tmp228; + fftw_real tmp308; + fftw_real tmp313; + fftw_real tmp364; + fftw_real tmp382; + fftw_real tmp22; + fftw_real tmp29; + fftw_real tmp30; + fftw_real tmp272; + fftw_real tmp321; + fftw_real tmp74; + fftw_real tmp239; + fftw_real tmp176; + fftw_real tmp210; + fftw_real tmp284; + fftw_real tmp354; + fftw_real tmp378; + fftw_real tmp295; + fftw_real tmp121; + fftw_real tmp223; + fftw_real tmp127; + fftw_real tmp220; + fftw_real tmp110; + fftw_real tmp221; + fftw_real tmp130; + fftw_real tmp224; + fftw_real tmp291; + fftw_real tmp296; + fftw_real tmp357; + fftw_real tmp379; + fftw_real tmp89; + fftw_real tmp213; + fftw_real tmp92; + fftw_real tmp212; + fftw_real tmp46; + fftw_real tmp374; + fftw_real tmp276; + fftw_real tmp317; + fftw_real tmp80; + fftw_real tmp215; + fftw_real tmp83; + fftw_real tmp216; + fftw_real tmp61; + fftw_real tmp375; + fftw_real tmp279; + fftw_real tmp318; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp3; + fftw_real tmp63; + fftw_real tmp13; + fftw_real tmp65; + fftw_real tmp6; + fftw_real tmp178; + fftw_real tmp10; + fftw_real tmp64; + fftw_real tmp66; + fftw_real tmp177; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp11; + fftw_real tmp12; + ASSERT_ALIGNED_DOUBLE; + tmp1 = input[0]; + tmp2 = input[32 * istride]; + tmp3 = tmp1 + tmp2; + tmp63 = tmp1 - tmp2; + tmp11 = input[56 * istride]; + tmp12 = input[24 * istride]; + tmp13 = tmp11 + tmp12; + tmp65 = tmp11 - tmp12; + } + { + fftw_real tmp4; + fftw_real tmp5; + fftw_real tmp8; + fftw_real tmp9; + ASSERT_ALIGNED_DOUBLE; + tmp4 = input[16 * istride]; + tmp5 = input[48 * istride]; + tmp6 = tmp4 + tmp5; + tmp178 = tmp4 - tmp5; + tmp8 = input[8 * istride]; + tmp9 = input[40 * istride]; + tmp10 = tmp8 + tmp9; + tmp64 = tmp8 - tmp9; + } + tmp269 = tmp3 - tmp6; + tmp7 = tmp3 + tmp6; + tmp14 = tmp10 + tmp13; + tmp15 = tmp7 + tmp14; + tmp320 = tmp13 - tmp10; + tmp66 = K707106781 * (tmp64 + tmp65); + tmp67 = tmp63 + tmp66; + tmp209 = tmp63 - tmp66; + tmp177 = K707106781 * (tmp65 - tmp64); + tmp179 = tmp177 - tmp178; + tmp238 = tmp178 + tmp177; + } + { + fftw_real tmp135; + fftw_real tmp299; + fftw_real tmp166; + fftw_real tmp300; + fftw_real tmp138; + fftw_real tmp311; + fftw_real tmp141; + fftw_real tmp310; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp133; + fftw_real tmp134; + fftw_real tmp164; + fftw_real tmp165; + ASSERT_ALIGNED_DOUBLE; + tmp133 = input[63 * istride]; + tmp134 = input[31 * istride]; + tmp135 = tmp133 - tmp134; + tmp299 = tmp133 + tmp134; + tmp164 = input[15 * istride]; + tmp165 = input[47 * istride]; + tmp166 = tmp164 - tmp165; + tmp300 = tmp164 + tmp165; + } + { + fftw_real tmp136; + fftw_real tmp137; + fftw_real tmp139; + fftw_real tmp140; + ASSERT_ALIGNED_DOUBLE; + tmp136 = input[7 * istride]; + tmp137 = input[39 * istride]; + tmp138 = tmp136 - tmp137; + tmp311 = tmp136 + tmp137; + tmp139 = input[55 * istride]; + tmp140 = input[23 * istride]; + tmp141 = tmp139 - tmp140; + tmp310 = tmp139 + tmp140; + } + { + fftw_real tmp359; + fftw_real tmp360; + fftw_real tmp142; + fftw_real tmp163; + ASSERT_ALIGNED_DOUBLE; + tmp301 = tmp299 - tmp300; + tmp359 = tmp299 + tmp300; + tmp360 = tmp311 + tmp310; + tmp361 = tmp359 + tmp360; + tmp381 = tmp359 - tmp360; + tmp312 = tmp310 - tmp311; + tmp142 = K707106781 * (tmp138 + tmp141); + tmp143 = tmp135 + tmp142; + tmp227 = tmp135 - tmp142; + tmp163 = K707106781 * (tmp141 - tmp138); + tmp167 = tmp163 - tmp166; + tmp230 = tmp166 + tmp163; + } + } + { + fftw_real tmp146; + fftw_real tmp302; + fftw_real tmp156; + fftw_real tmp306; + fftw_real tmp149; + fftw_real tmp303; + fftw_real tmp153; + fftw_real tmp305; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp144; + fftw_real tmp145; + fftw_real tmp154; + fftw_real tmp155; + ASSERT_ALIGNED_DOUBLE; + tmp144 = input[3 * istride]; + tmp145 = input[35 * istride]; + tmp146 = tmp144 - tmp145; + tmp302 = tmp144 + tmp145; + tmp154 = input[11 * istride]; + tmp155 = input[43 * istride]; + tmp156 = tmp154 - tmp155; + tmp306 = tmp154 + tmp155; + } + { + fftw_real tmp147; + fftw_real tmp148; + fftw_real tmp151; + fftw_real tmp152; + ASSERT_ALIGNED_DOUBLE; + tmp147 = input[19 * istride]; + tmp148 = input[51 * istride]; + tmp149 = tmp147 - tmp148; + tmp303 = tmp147 + tmp148; + tmp151 = input[59 * istride]; + tmp152 = input[27 * istride]; + tmp153 = tmp151 - tmp152; + tmp305 = tmp151 + tmp152; + } + { + fftw_real tmp150; + fftw_real tmp157; + fftw_real tmp160; + fftw_real tmp161; + ASSERT_ALIGNED_DOUBLE; + tmp150 = (K923879532 * tmp146) - (K382683432 * tmp149); + tmp157 = (K923879532 * tmp153) + (K382683432 * tmp156); + tmp158 = tmp150 + tmp157; + tmp231 = tmp157 - tmp150; + tmp160 = (K382683432 * tmp153) - (K923879532 * tmp156); + tmp161 = (K382683432 * tmp146) + (K923879532 * tmp149); + tmp162 = tmp160 - tmp161; + tmp228 = tmp161 + tmp160; + } + { + fftw_real tmp304; + fftw_real tmp307; + fftw_real tmp362; + fftw_real tmp363; + ASSERT_ALIGNED_DOUBLE; + tmp304 = tmp302 - tmp303; + tmp307 = tmp305 - tmp306; + tmp308 = K707106781 * (tmp304 + tmp307); + tmp313 = K707106781 * (tmp307 - tmp304); + tmp362 = tmp302 + tmp303; + tmp363 = tmp305 + tmp306; + tmp364 = tmp362 + tmp363; + tmp382 = tmp363 - tmp362; + } + } + { + fftw_real tmp18; + fftw_real tmp68; + fftw_real tmp28; + fftw_real tmp72; + fftw_real tmp21; + fftw_real tmp69; + fftw_real tmp25; + fftw_real tmp71; + fftw_real tmp270; + fftw_real tmp271; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp16; + fftw_real tmp17; + fftw_real tmp26; + fftw_real tmp27; + ASSERT_ALIGNED_DOUBLE; + tmp16 = input[4 * istride]; + tmp17 = input[36 * istride]; + tmp18 = tmp16 + tmp17; + tmp68 = tmp16 - tmp17; + tmp26 = input[12 * istride]; + tmp27 = input[44 * istride]; + tmp28 = tmp26 + tmp27; + tmp72 = tmp26 - tmp27; + } + { + fftw_real tmp19; + fftw_real tmp20; + fftw_real tmp23; + fftw_real tmp24; + ASSERT_ALIGNED_DOUBLE; + tmp19 = input[20 * istride]; + tmp20 = input[52 * istride]; + tmp21 = tmp19 + tmp20; + tmp69 = tmp19 - tmp20; + tmp23 = input[60 * istride]; + tmp24 = input[28 * istride]; + tmp25 = tmp23 + tmp24; + tmp71 = tmp23 - tmp24; + } + tmp22 = tmp18 + tmp21; + tmp29 = tmp25 + tmp28; + tmp30 = tmp22 + tmp29; + tmp270 = tmp18 - tmp21; + tmp271 = tmp25 - tmp28; + tmp272 = K707106781 * (tmp270 + tmp271); + tmp321 = K707106781 * (tmp271 - tmp270); + { + fftw_real tmp70; + fftw_real tmp73; + fftw_real tmp174; + fftw_real tmp175; + ASSERT_ALIGNED_DOUBLE; + tmp70 = (K923879532 * tmp68) - (K382683432 * tmp69); + tmp73 = (K923879532 * tmp71) + (K382683432 * tmp72); + tmp74 = tmp70 + tmp73; + tmp239 = tmp73 - tmp70; + tmp174 = (K382683432 * tmp71) - (K923879532 * tmp72); + tmp175 = (K382683432 * tmp68) + (K923879532 * tmp69); + tmp176 = tmp174 - tmp175; + tmp210 = tmp175 + tmp174; + } + } + { + fftw_real tmp113; + fftw_real tmp293; + fftw_real tmp125; + fftw_real tmp282; + fftw_real tmp116; + fftw_real tmp294; + fftw_real tmp120; + fftw_real tmp283; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp111; + fftw_real tmp112; + fftw_real tmp123; + fftw_real tmp124; + ASSERT_ALIGNED_DOUBLE; + tmp111 = input[57 * istride]; + tmp112 = input[25 * istride]; + tmp113 = tmp111 - tmp112; + tmp293 = tmp111 + tmp112; + tmp123 = input[istride]; + tmp124 = input[33 * istride]; + tmp125 = tmp123 - tmp124; + tmp282 = tmp123 + tmp124; + } + { + fftw_real tmp114; + fftw_real tmp115; + fftw_real tmp118; + fftw_real tmp119; + ASSERT_ALIGNED_DOUBLE; + tmp114 = input[9 * istride]; + tmp115 = input[41 * istride]; + tmp116 = tmp114 - tmp115; + tmp294 = tmp114 + tmp115; + tmp118 = input[17 * istride]; + tmp119 = input[49 * istride]; + tmp120 = tmp118 - tmp119; + tmp283 = tmp118 + tmp119; + } + { + fftw_real tmp352; + fftw_real tmp353; + fftw_real tmp117; + fftw_real tmp126; + ASSERT_ALIGNED_DOUBLE; + tmp284 = tmp282 - tmp283; + tmp352 = tmp282 + tmp283; + tmp353 = tmp294 + tmp293; + tmp354 = tmp352 + tmp353; + tmp378 = tmp352 - tmp353; + tmp295 = tmp293 - tmp294; + tmp117 = K707106781 * (tmp113 - tmp116); + tmp121 = tmp117 - tmp120; + tmp223 = tmp120 + tmp117; + tmp126 = K707106781 * (tmp116 + tmp113); + tmp127 = tmp125 + tmp126; + tmp220 = tmp125 - tmp126; + } + } + { + fftw_real tmp98; + fftw_real tmp288; + fftw_real tmp108; + fftw_real tmp286; + fftw_real tmp101; + fftw_real tmp289; + fftw_real tmp105; + fftw_real tmp285; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp96; + fftw_real tmp97; + fftw_real tmp106; + fftw_real tmp107; + ASSERT_ALIGNED_DOUBLE; + tmp96 = input[61 * istride]; + tmp97 = input[29 * istride]; + tmp98 = tmp96 - tmp97; + tmp288 = tmp96 + tmp97; + tmp106 = input[21 * istride]; + tmp107 = input[53 * istride]; + tmp108 = tmp106 - tmp107; + tmp286 = tmp106 + tmp107; + } + { + fftw_real tmp99; + fftw_real tmp100; + fftw_real tmp103; + fftw_real tmp104; + ASSERT_ALIGNED_DOUBLE; + tmp99 = input[13 * istride]; + tmp100 = input[45 * istride]; + tmp101 = tmp99 - tmp100; + tmp289 = tmp99 + tmp100; + tmp103 = input[5 * istride]; + tmp104 = input[37 * istride]; + tmp105 = tmp103 - tmp104; + tmp285 = tmp103 + tmp104; + } + { + fftw_real tmp102; + fftw_real tmp109; + fftw_real tmp128; + fftw_real tmp129; + ASSERT_ALIGNED_DOUBLE; + tmp102 = (K382683432 * tmp98) - (K923879532 * tmp101); + tmp109 = (K382683432 * tmp105) + (K923879532 * tmp108); + tmp110 = tmp102 - tmp109; + tmp221 = tmp109 + tmp102; + tmp128 = (K923879532 * tmp105) - (K382683432 * tmp108); + tmp129 = (K923879532 * tmp98) + (K382683432 * tmp101); + tmp130 = tmp128 + tmp129; + tmp224 = tmp129 - tmp128; + } + { + fftw_real tmp287; + fftw_real tmp290; + fftw_real tmp355; + fftw_real tmp356; + ASSERT_ALIGNED_DOUBLE; + tmp287 = tmp285 - tmp286; + tmp290 = tmp288 - tmp289; + tmp291 = K707106781 * (tmp287 + tmp290); + tmp296 = K707106781 * (tmp290 - tmp287); + tmp355 = tmp285 + tmp286; + tmp356 = tmp288 + tmp289; + tmp357 = tmp355 + tmp356; + tmp379 = tmp356 - tmp355; + } + } + { + fftw_real tmp34; + fftw_real tmp90; + fftw_real tmp44; + fftw_real tmp85; + fftw_real tmp37; + fftw_real tmp88; + fftw_real tmp41; + fftw_real tmp86; + fftw_real tmp87; + fftw_real tmp91; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp32; + fftw_real tmp33; + fftw_real tmp42; + fftw_real tmp43; + ASSERT_ALIGNED_DOUBLE; + tmp32 = input[2 * istride]; + tmp33 = input[34 * istride]; + tmp34 = tmp32 + tmp33; + tmp90 = tmp32 - tmp33; + tmp42 = input[58 * istride]; + tmp43 = input[26 * istride]; + tmp44 = tmp42 + tmp43; + tmp85 = tmp42 - tmp43; + } + { + fftw_real tmp35; + fftw_real tmp36; + fftw_real tmp39; + fftw_real tmp40; + ASSERT_ALIGNED_DOUBLE; + tmp35 = input[18 * istride]; + tmp36 = input[50 * istride]; + tmp37 = tmp35 + tmp36; + tmp88 = tmp35 - tmp36; + tmp39 = input[10 * istride]; + tmp40 = input[42 * istride]; + tmp41 = tmp39 + tmp40; + tmp86 = tmp39 - tmp40; + } + tmp87 = K707106781 * (tmp85 - tmp86); + tmp89 = tmp87 - tmp88; + tmp213 = tmp88 + tmp87; + tmp91 = K707106781 * (tmp86 + tmp85); + tmp92 = tmp90 + tmp91; + tmp212 = tmp90 - tmp91; + { + fftw_real tmp38; + fftw_real tmp45; + fftw_real tmp274; + fftw_real tmp275; + ASSERT_ALIGNED_DOUBLE; + tmp38 = tmp34 + tmp37; + tmp45 = tmp41 + tmp44; + tmp46 = tmp38 + tmp45; + tmp374 = tmp38 - tmp45; + tmp274 = tmp34 - tmp37; + tmp275 = tmp44 - tmp41; + tmp276 = (K923879532 * tmp274) + (K382683432 * tmp275); + tmp317 = (K923879532 * tmp275) - (K382683432 * tmp274); + } + } + { + fftw_real tmp49; + fftw_real tmp76; + fftw_real tmp59; + fftw_real tmp78; + fftw_real tmp52; + fftw_real tmp82; + fftw_real tmp56; + fftw_real tmp77; + fftw_real tmp79; + fftw_real tmp81; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp47; + fftw_real tmp48; + fftw_real tmp57; + fftw_real tmp58; + ASSERT_ALIGNED_DOUBLE; + tmp47 = input[62 * istride]; + tmp48 = input[30 * istride]; + tmp49 = tmp47 + tmp48; + tmp76 = tmp47 - tmp48; + tmp57 = input[54 * istride]; + tmp58 = input[22 * istride]; + tmp59 = tmp57 + tmp58; + tmp78 = tmp57 - tmp58; + } + { + fftw_real tmp50; + fftw_real tmp51; + fftw_real tmp54; + fftw_real tmp55; + ASSERT_ALIGNED_DOUBLE; + tmp50 = input[14 * istride]; + tmp51 = input[46 * istride]; + tmp52 = tmp50 + tmp51; + tmp82 = tmp50 - tmp51; + tmp54 = input[6 * istride]; + tmp55 = input[38 * istride]; + tmp56 = tmp54 + tmp55; + tmp77 = tmp54 - tmp55; + } + tmp79 = K707106781 * (tmp77 + tmp78); + tmp80 = tmp76 + tmp79; + tmp215 = tmp76 - tmp79; + tmp81 = K707106781 * (tmp78 - tmp77); + tmp83 = tmp81 - tmp82; + tmp216 = tmp82 + tmp81; + { + fftw_real tmp53; + fftw_real tmp60; + fftw_real tmp277; + fftw_real tmp278; + ASSERT_ALIGNED_DOUBLE; + tmp53 = tmp49 + tmp52; + tmp60 = tmp56 + tmp59; + tmp61 = tmp53 + tmp60; + tmp375 = tmp53 - tmp60; + tmp277 = tmp49 - tmp52; + tmp278 = tmp59 - tmp56; + tmp279 = (K923879532 * tmp277) - (K382683432 * tmp278); + tmp318 = (K382683432 * tmp277) + (K923879532 * tmp278); + } + } + { + fftw_real tmp31; + fftw_real tmp62; + fftw_real tmp369; + fftw_real tmp370; + fftw_real tmp371; + fftw_real tmp372; + ASSERT_ALIGNED_DOUBLE; + tmp31 = tmp15 + tmp30; + tmp62 = tmp46 + tmp61; + tmp369 = tmp31 + tmp62; + tmp370 = tmp354 + tmp357; + tmp371 = tmp361 + tmp364; + tmp372 = tmp370 + tmp371; + real_output[16 * real_ostride] = tmp31 - tmp62; + imag_output[16 * imag_ostride] = tmp371 - tmp370; + real_output[32 * real_ostride] = tmp369 - tmp372; + real_output[0] = tmp369 + tmp372; + } + { + fftw_real tmp351; + fftw_real tmp367; + fftw_real tmp366; + fftw_real tmp368; + fftw_real tmp358; + fftw_real tmp365; + ASSERT_ALIGNED_DOUBLE; + tmp351 = tmp15 - tmp30; + tmp367 = tmp61 - tmp46; + tmp358 = tmp354 - tmp357; + tmp365 = tmp361 - tmp364; + tmp366 = K707106781 * (tmp358 + tmp365); + tmp368 = K707106781 * (tmp365 - tmp358); + real_output[24 * real_ostride] = tmp351 - tmp366; + real_output[8 * real_ostride] = tmp351 + tmp366; + imag_output[8 * imag_ostride] = tmp367 + tmp368; + imag_output[24 * imag_ostride] = tmp368 - tmp367; + } + { + fftw_real tmp75; + fftw_real tmp189; + fftw_real tmp94; + fftw_real tmp199; + fftw_real tmp173; + fftw_real tmp190; + fftw_real tmp132; + fftw_real tmp184; + fftw_real tmp180; + fftw_real tmp200; + fftw_real tmp194; + fftw_real tmp204; + fftw_real tmp169; + fftw_real tmp185; + fftw_real tmp197; + fftw_real tmp205; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp84; + fftw_real tmp93; + fftw_real tmp192; + fftw_real tmp193; + ASSERT_ALIGNED_DOUBLE; + tmp75 = tmp67 - tmp74; + tmp189 = tmp67 + tmp74; + tmp84 = (K195090322 * tmp80) + (K980785280 * tmp83); + tmp93 = (K980785280 * tmp89) - (K195090322 * tmp92); + tmp94 = tmp84 - tmp93; + tmp199 = tmp93 + tmp84; + { + fftw_real tmp171; + fftw_real tmp172; + fftw_real tmp122; + fftw_real tmp131; + ASSERT_ALIGNED_DOUBLE; + tmp171 = (K980785280 * tmp80) - (K195090322 * tmp83); + tmp172 = (K980785280 * tmp92) + (K195090322 * tmp89); + tmp173 = tmp171 - tmp172; + tmp190 = tmp172 + tmp171; + tmp122 = tmp110 - tmp121; + tmp131 = tmp127 - tmp130; + tmp132 = (K634393284 * tmp122) + (K773010453 * tmp131); + tmp184 = (K773010453 * tmp122) - (K634393284 * tmp131); + } + tmp180 = tmp176 - tmp179; + tmp200 = tmp179 + tmp176; + tmp192 = tmp121 + tmp110; + tmp193 = tmp127 + tmp130; + tmp194 = (K098017140 * tmp192) + (K995184726 * tmp193); + tmp204 = (K995184726 * tmp192) - (K098017140 * tmp193); + { + fftw_real tmp159; + fftw_real tmp168; + fftw_real tmp195; + fftw_real tmp196; + ASSERT_ALIGNED_DOUBLE; + tmp159 = tmp143 - tmp158; + tmp168 = tmp162 - tmp167; + tmp169 = (K773010453 * tmp159) - (K634393284 * tmp168); + tmp185 = (K773010453 * tmp168) + (K634393284 * tmp159); + tmp195 = tmp143 + tmp158; + tmp196 = tmp167 + tmp162; + tmp197 = (K995184726 * tmp195) - (K098017140 * tmp196); + tmp205 = (K995184726 * tmp196) + (K098017140 * tmp195); + } + } + { + fftw_real tmp95; + fftw_real tmp170; + fftw_real tmp181; + fftw_real tmp182; + ASSERT_ALIGNED_DOUBLE; + tmp95 = tmp75 + tmp94; + tmp170 = tmp132 + tmp169; + real_output[25 * real_ostride] = tmp95 - tmp170; + real_output[7 * real_ostride] = tmp95 + tmp170; + tmp181 = tmp173 - tmp180; + tmp182 = tmp169 - tmp132; + imag_output[9 * imag_ostride] = tmp181 + tmp182; + imag_output[23 * imag_ostride] = tmp182 - tmp181; + } + { + fftw_real tmp183; + fftw_real tmp186; + fftw_real tmp187; + fftw_real tmp188; + ASSERT_ALIGNED_DOUBLE; + tmp183 = tmp180 + tmp173; + tmp186 = tmp184 + tmp185; + imag_output[7 * imag_ostride] = tmp183 + tmp186; + imag_output[25 * imag_ostride] = tmp186 - tmp183; + tmp187 = tmp75 - tmp94; + tmp188 = tmp185 - tmp184; + real_output[23 * real_ostride] = tmp187 - tmp188; + real_output[9 * real_ostride] = tmp187 + tmp188; + } + { + fftw_real tmp191; + fftw_real tmp198; + fftw_real tmp201; + fftw_real tmp202; + ASSERT_ALIGNED_DOUBLE; + tmp191 = tmp189 + tmp190; + tmp198 = tmp194 + tmp197; + real_output[31 * real_ostride] = tmp191 - tmp198; + real_output[real_ostride] = tmp191 + tmp198; + tmp201 = tmp199 - tmp200; + tmp202 = tmp197 - tmp194; + imag_output[15 * imag_ostride] = tmp201 + tmp202; + imag_output[17 * imag_ostride] = tmp202 - tmp201; + } + { + fftw_real tmp203; + fftw_real tmp206; + fftw_real tmp207; + fftw_real tmp208; + ASSERT_ALIGNED_DOUBLE; + tmp203 = tmp200 + tmp199; + tmp206 = tmp204 + tmp205; + imag_output[imag_ostride] = tmp203 + tmp206; + imag_output[31 * imag_ostride] = tmp206 - tmp203; + tmp207 = tmp189 - tmp190; + tmp208 = tmp205 - tmp204; + real_output[17 * real_ostride] = tmp207 - tmp208; + real_output[15 * real_ostride] = tmp207 + tmp208; + } + } + { + fftw_real tmp377; + fftw_real tmp393; + fftw_real tmp387; + fftw_real tmp389; + fftw_real tmp384; + fftw_real tmp388; + fftw_real tmp392; + fftw_real tmp394; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp373; + fftw_real tmp376; + fftw_real tmp385; + fftw_real tmp386; + ASSERT_ALIGNED_DOUBLE; + tmp373 = tmp7 - tmp14; + tmp376 = K707106781 * (tmp374 + tmp375); + tmp377 = tmp373 + tmp376; + tmp393 = tmp373 - tmp376; + tmp385 = K707106781 * (tmp375 - tmp374); + tmp386 = tmp29 - tmp22; + tmp387 = tmp385 - tmp386; + tmp389 = tmp386 + tmp385; + } + { + fftw_real tmp380; + fftw_real tmp383; + fftw_real tmp390; + fftw_real tmp391; + ASSERT_ALIGNED_DOUBLE; + tmp380 = (K923879532 * tmp378) + (K382683432 * tmp379); + tmp383 = (K923879532 * tmp381) - (K382683432 * tmp382); + tmp384 = tmp380 + tmp383; + tmp388 = tmp383 - tmp380; + tmp390 = (K923879532 * tmp379) - (K382683432 * tmp378); + tmp391 = (K382683432 * tmp381) + (K923879532 * tmp382); + tmp392 = tmp390 + tmp391; + tmp394 = tmp391 - tmp390; + } + real_output[28 * real_ostride] = tmp377 - tmp384; + real_output[4 * real_ostride] = tmp377 + tmp384; + imag_output[12 * imag_ostride] = tmp387 + tmp388; + imag_output[20 * imag_ostride] = tmp388 - tmp387; + imag_output[4 * imag_ostride] = tmp389 + tmp392; + imag_output[28 * imag_ostride] = tmp392 - tmp389; + real_output[20 * real_ostride] = tmp393 - tmp394; + real_output[12 * real_ostride] = tmp393 + tmp394; + } + { + fftw_real tmp281; + fftw_real tmp329; + fftw_real tmp323; + fftw_real tmp325; + fftw_real tmp298; + fftw_real tmp326; + fftw_real tmp315; + fftw_real tmp327; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp273; + fftw_real tmp280; + fftw_real tmp319; + fftw_real tmp322; + ASSERT_ALIGNED_DOUBLE; + tmp273 = tmp269 + tmp272; + tmp280 = tmp276 + tmp279; + tmp281 = tmp273 + tmp280; + tmp329 = tmp273 - tmp280; + tmp319 = tmp317 + tmp318; + tmp322 = tmp320 + tmp321; + tmp323 = tmp319 - tmp322; + tmp325 = tmp322 + tmp319; + } + { + fftw_real tmp292; + fftw_real tmp297; + fftw_real tmp309; + fftw_real tmp314; + ASSERT_ALIGNED_DOUBLE; + tmp292 = tmp284 + tmp291; + tmp297 = tmp295 + tmp296; + tmp298 = (K980785280 * tmp292) + (K195090322 * tmp297); + tmp326 = (K980785280 * tmp297) - (K195090322 * tmp292); + tmp309 = tmp301 + tmp308; + tmp314 = tmp312 + tmp313; + tmp315 = (K980785280 * tmp309) - (K195090322 * tmp314); + tmp327 = (K195090322 * tmp309) + (K980785280 * tmp314); + } + { + fftw_real tmp316; + fftw_real tmp324; + fftw_real tmp328; + fftw_real tmp330; + ASSERT_ALIGNED_DOUBLE; + tmp316 = tmp298 + tmp315; + real_output[30 * real_ostride] = tmp281 - tmp316; + real_output[2 * real_ostride] = tmp281 + tmp316; + tmp324 = tmp315 - tmp298; + imag_output[14 * imag_ostride] = tmp323 + tmp324; + imag_output[18 * imag_ostride] = tmp324 - tmp323; + tmp328 = tmp326 + tmp327; + imag_output[2 * imag_ostride] = tmp325 + tmp328; + imag_output[30 * imag_ostride] = tmp328 - tmp325; + tmp330 = tmp327 - tmp326; + real_output[18 * real_ostride] = tmp329 - tmp330; + real_output[14 * real_ostride] = tmp329 + tmp330; + } + } + { + fftw_real tmp333; + fftw_real tmp349; + fftw_real tmp343; + fftw_real tmp345; + fftw_real tmp336; + fftw_real tmp346; + fftw_real tmp339; + fftw_real tmp347; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp331; + fftw_real tmp332; + fftw_real tmp341; + fftw_real tmp342; + ASSERT_ALIGNED_DOUBLE; + tmp331 = tmp269 - tmp272; + tmp332 = tmp318 - tmp317; + tmp333 = tmp331 + tmp332; + tmp349 = tmp331 - tmp332; + tmp341 = tmp279 - tmp276; + tmp342 = tmp321 - tmp320; + tmp343 = tmp341 - tmp342; + tmp345 = tmp342 + tmp341; + } + { + fftw_real tmp334; + fftw_real tmp335; + fftw_real tmp337; + fftw_real tmp338; + ASSERT_ALIGNED_DOUBLE; + tmp334 = tmp284 - tmp291; + tmp335 = tmp296 - tmp295; + tmp336 = (K831469612 * tmp334) + (K555570233 * tmp335); + tmp346 = (K831469612 * tmp335) - (K555570233 * tmp334); + tmp337 = tmp301 - tmp308; + tmp338 = tmp313 - tmp312; + tmp339 = (K831469612 * tmp337) - (K555570233 * tmp338); + tmp347 = (K555570233 * tmp337) + (K831469612 * tmp338); + } + { + fftw_real tmp340; + fftw_real tmp344; + fftw_real tmp348; + fftw_real tmp350; + ASSERT_ALIGNED_DOUBLE; + tmp340 = tmp336 + tmp339; + real_output[26 * real_ostride] = tmp333 - tmp340; + real_output[6 * real_ostride] = tmp333 + tmp340; + tmp344 = tmp339 - tmp336; + imag_output[10 * imag_ostride] = tmp343 + tmp344; + imag_output[22 * imag_ostride] = tmp344 - tmp343; + tmp348 = tmp346 + tmp347; + imag_output[6 * imag_ostride] = tmp345 + tmp348; + imag_output[26 * imag_ostride] = tmp348 - tmp345; + tmp350 = tmp347 - tmp346; + real_output[22 * real_ostride] = tmp349 - tmp350; + real_output[10 * real_ostride] = tmp349 + tmp350; + } + } + { + fftw_real tmp211; + fftw_real tmp249; + fftw_real tmp218; + fftw_real tmp259; + fftw_real tmp237; + fftw_real tmp250; + fftw_real tmp226; + fftw_real tmp244; + fftw_real tmp240; + fftw_real tmp260; + fftw_real tmp254; + fftw_real tmp264; + fftw_real tmp233; + fftw_real tmp245; + fftw_real tmp257; + fftw_real tmp265; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp214; + fftw_real tmp217; + fftw_real tmp252; + fftw_real tmp253; + ASSERT_ALIGNED_DOUBLE; + tmp211 = tmp209 + tmp210; + tmp249 = tmp209 - tmp210; + tmp214 = (K831469612 * tmp212) + (K555570233 * tmp213); + tmp217 = (K831469612 * tmp215) - (K555570233 * tmp216); + tmp218 = tmp214 + tmp217; + tmp259 = tmp217 - tmp214; + { + fftw_real tmp235; + fftw_real tmp236; + fftw_real tmp222; + fftw_real tmp225; + ASSERT_ALIGNED_DOUBLE; + tmp235 = (K831469612 * tmp213) - (K555570233 * tmp212); + tmp236 = (K555570233 * tmp215) + (K831469612 * tmp216); + tmp237 = tmp235 + tmp236; + tmp250 = tmp236 - tmp235; + tmp222 = tmp220 + tmp221; + tmp225 = tmp223 + tmp224; + tmp226 = (K956940335 * tmp222) + (K290284677 * tmp225); + tmp244 = (K956940335 * tmp225) - (K290284677 * tmp222); + } + tmp240 = tmp238 + tmp239; + tmp260 = tmp239 - tmp238; + tmp252 = tmp220 - tmp221; + tmp253 = tmp224 - tmp223; + tmp254 = (K881921264 * tmp252) + (K471396736 * tmp253); + tmp264 = (K881921264 * tmp253) - (K471396736 * tmp252); + { + fftw_real tmp229; + fftw_real tmp232; + fftw_real tmp255; + fftw_real tmp256; + ASSERT_ALIGNED_DOUBLE; + tmp229 = tmp227 + tmp228; + tmp232 = tmp230 + tmp231; + tmp233 = (K956940335 * tmp229) - (K290284677 * tmp232); + tmp245 = (K290284677 * tmp229) + (K956940335 * tmp232); + tmp255 = tmp227 - tmp228; + tmp256 = tmp231 - tmp230; + tmp257 = (K881921264 * tmp255) - (K471396736 * tmp256); + tmp265 = (K471396736 * tmp255) + (K881921264 * tmp256); + } + } + { + fftw_real tmp219; + fftw_real tmp234; + fftw_real tmp241; + fftw_real tmp242; + ASSERT_ALIGNED_DOUBLE; + tmp219 = tmp211 + tmp218; + tmp234 = tmp226 + tmp233; + real_output[29 * real_ostride] = tmp219 - tmp234; + real_output[3 * real_ostride] = tmp219 + tmp234; + tmp241 = tmp237 - tmp240; + tmp242 = tmp233 - tmp226; + imag_output[13 * imag_ostride] = tmp241 + tmp242; + imag_output[19 * imag_ostride] = tmp242 - tmp241; + } + { + fftw_real tmp243; + fftw_real tmp246; + fftw_real tmp247; + fftw_real tmp248; + ASSERT_ALIGNED_DOUBLE; + tmp243 = tmp240 + tmp237; + tmp246 = tmp244 + tmp245; + imag_output[3 * imag_ostride] = tmp243 + tmp246; + imag_output[29 * imag_ostride] = tmp246 - tmp243; + tmp247 = tmp211 - tmp218; + tmp248 = tmp245 - tmp244; + real_output[19 * real_ostride] = tmp247 - tmp248; + real_output[13 * real_ostride] = tmp247 + tmp248; + } + { + fftw_real tmp251; + fftw_real tmp258; + fftw_real tmp261; + fftw_real tmp262; + ASSERT_ALIGNED_DOUBLE; + tmp251 = tmp249 + tmp250; + tmp258 = tmp254 + tmp257; + real_output[27 * real_ostride] = tmp251 - tmp258; + real_output[5 * real_ostride] = tmp251 + tmp258; + tmp261 = tmp259 - tmp260; + tmp262 = tmp257 - tmp254; + imag_output[11 * imag_ostride] = tmp261 + tmp262; + imag_output[21 * imag_ostride] = tmp262 - tmp261; + } + { + fftw_real tmp263; + fftw_real tmp266; + fftw_real tmp267; + fftw_real tmp268; + ASSERT_ALIGNED_DOUBLE; + tmp263 = tmp260 + tmp259; + tmp266 = tmp264 + tmp265; + imag_output[5 * imag_ostride] = tmp263 + tmp266; + imag_output[27 * imag_ostride] = tmp266 - tmp263; + tmp267 = tmp249 - tmp250; + tmp268 = tmp265 - tmp264; + real_output[21 * real_ostride] = tmp267 - tmp268; + real_output[11 * real_ostride] = tmp267 + tmp268; + } + } +} + +fftw_codelet_desc fftw_real2hc_64_desc = +{ + "fftw_real2hc_64", + (void (*)()) fftw_real2hc_64, + 64, + FFTW_FORWARD, + FFTW_REAL2HC, + 1410, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/frc_7.c b/src/sndobj/rfftw/frc_7.c new file mode 100644 index 0000000..3760736 --- /dev/null +++ b/src/sndobj/rfftw/frc_7.c @@ -0,0 +1,98 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:43:54 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -real2hc 7 */ + +/* + * This function contains 24 FP additions, 18 FP multiplications, + * (or, 24 additions, 18 multiplications, 0 fused multiply/add), + * 13 stack variables, and 14 memory accesses + */ +static const fftw_real K222520933 = FFTW_KONST(+0.222520933956314404288902564496794759466355569); +static const fftw_real K900968867 = FFTW_KONST(+0.900968867902419126236102319507445051165919162); +static const fftw_real K623489801 = FFTW_KONST(+0.623489801858733530525004884004239810632274731); +static const fftw_real K433883739 = FFTW_KONST(+0.433883739117558120475768332848358754609990728); +static const fftw_real K781831482 = FFTW_KONST(+0.781831482468029808708444526674057750232334519); +static const fftw_real K974927912 = FFTW_KONST(+0.974927912181823607018131682993931217232785801); + +/* + * Generator Id's : + * $Id: frc_7.c,v 1.1.1.1 2006/05/12 15:15:01 veplaini Exp $ + * $Id: frc_7.c,v 1.1.1.1 2006/05/12 15:15:01 veplaini Exp $ + * $Id: frc_7.c,v 1.1.1.1 2006/05/12 15:15:01 veplaini Exp $ + */ + +void fftw_real2hc_7(const fftw_real *input, fftw_real *real_output, fftw_real *imag_output, int istride, int real_ostride, int imag_ostride) +{ + fftw_real tmp1; + fftw_real tmp10; + fftw_real tmp11; + fftw_real tmp4; + fftw_real tmp13; + fftw_real tmp7; + fftw_real tmp12; + fftw_real tmp8; + fftw_real tmp9; + ASSERT_ALIGNED_DOUBLE; + tmp1 = input[0]; + tmp8 = input[istride]; + tmp9 = input[6 * istride]; + tmp10 = tmp8 + tmp9; + tmp11 = tmp9 - tmp8; + { + fftw_real tmp2; + fftw_real tmp3; + fftw_real tmp5; + fftw_real tmp6; + ASSERT_ALIGNED_DOUBLE; + tmp2 = input[2 * istride]; + tmp3 = input[5 * istride]; + tmp4 = tmp2 + tmp3; + tmp13 = tmp3 - tmp2; + tmp5 = input[3 * istride]; + tmp6 = input[4 * istride]; + tmp7 = tmp5 + tmp6; + tmp12 = tmp6 - tmp5; + } + imag_output[2 * imag_ostride] = (K974927912 * tmp11) - (K781831482 * tmp12) - (K433883739 * tmp13); + imag_output[imag_ostride] = (K781831482 * tmp11) + (K974927912 * tmp13) + (K433883739 * tmp12); + imag_output[3 * imag_ostride] = (K433883739 * tmp11) + (K974927912 * tmp12) - (K781831482 * tmp13); + real_output[2 * real_ostride] = tmp1 + (K623489801 * tmp7) - (K900968867 * tmp4) - (K222520933 * tmp10); + real_output[real_ostride] = tmp1 + (K623489801 * tmp10) - (K900968867 * tmp7) - (K222520933 * tmp4); + real_output[3 * real_ostride] = tmp1 + (K623489801 * tmp4) - (K222520933 * tmp7) - (K900968867 * tmp10); + real_output[0] = tmp1 + tmp10 + tmp4 + tmp7; +} + +fftw_codelet_desc fftw_real2hc_7_desc = +{ + "fftw_real2hc_7", + (void (*)()) fftw_real2hc_7, + 7, + FFTW_FORWARD, + FFTW_REAL2HC, + 156, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/frc_8.c b/src/sndobj/rfftw/frc_8.c new file mode 100644 index 0000000..660c9e1 --- /dev/null +++ b/src/sndobj/rfftw/frc_8.c @@ -0,0 +1,114 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:43:54 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -real2hc 8 */ + +/* + * This function contains 20 FP additions, 2 FP multiplications, + * (or, 20 additions, 2 multiplications, 0 fused multiply/add), + * 12 stack variables, and 16 memory accesses + */ +static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); + +/* + * Generator Id's : + * $Id: frc_8.c,v 1.1.1.1 2006/05/12 15:14:59 veplaini Exp $ + * $Id: frc_8.c,v 1.1.1.1 2006/05/12 15:14:59 veplaini Exp $ + * $Id: frc_8.c,v 1.1.1.1 2006/05/12 15:14:59 veplaini Exp $ + */ + +void fftw_real2hc_8(const fftw_real *input, fftw_real *real_output, fftw_real *imag_output, int istride, int real_ostride, int imag_ostride) +{ + fftw_real tmp3; + fftw_real tmp7; + fftw_real tmp13; + fftw_real tmp19; + fftw_real tmp6; + fftw_real tmp16; + fftw_real tmp10; + fftw_real tmp18; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp2; + fftw_real tmp11; + fftw_real tmp12; + ASSERT_ALIGNED_DOUBLE; + tmp1 = input[0]; + tmp2 = input[4 * istride]; + tmp3 = tmp1 + tmp2; + tmp7 = tmp1 - tmp2; + tmp11 = input[7 * istride]; + tmp12 = input[3 * istride]; + tmp13 = tmp11 - tmp12; + tmp19 = tmp11 + tmp12; + } + { + fftw_real tmp4; + fftw_real tmp5; + fftw_real tmp8; + fftw_real tmp9; + ASSERT_ALIGNED_DOUBLE; + tmp4 = input[2 * istride]; + tmp5 = input[6 * istride]; + tmp6 = tmp4 + tmp5; + tmp16 = tmp4 - tmp5; + tmp8 = input[istride]; + tmp9 = input[5 * istride]; + tmp10 = tmp8 - tmp9; + tmp18 = tmp8 + tmp9; + } + { + fftw_real tmp17; + fftw_real tmp20; + fftw_real tmp14; + fftw_real tmp15; + ASSERT_ALIGNED_DOUBLE; + real_output[2 * real_ostride] = tmp3 - tmp6; + tmp17 = tmp3 + tmp6; + tmp20 = tmp18 + tmp19; + real_output[4 * real_ostride] = tmp17 - tmp20; + real_output[0] = tmp17 + tmp20; + imag_output[2 * imag_ostride] = tmp19 - tmp18; + tmp14 = K707106781 * (tmp10 + tmp13); + real_output[3 * real_ostride] = tmp7 - tmp14; + real_output[real_ostride] = tmp7 + tmp14; + tmp15 = K707106781 * (tmp13 - tmp10); + imag_output[imag_ostride] = tmp15 - tmp16; + imag_output[3 * imag_ostride] = tmp16 + tmp15; + } +} + +fftw_codelet_desc fftw_real2hc_8_desc = +{ + "fftw_real2hc_8", + (void (*)()) fftw_real2hc_8, + 8, + FFTW_FORWARD, + FFTW_REAL2HC, + 178, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/frc_9.c b/src/sndobj/rfftw/frc_9.c new file mode 100644 index 0000000..1e9b2e4 --- /dev/null +++ b/src/sndobj/rfftw/frc_9.c @@ -0,0 +1,146 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:43:55 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -real2hc 9 */ + +/* + * This function contains 38 FP additions, 26 FP multiplications, + * (or, 29 additions, 17 multiplications, 9 fused multiply/add), + * 21 stack variables, and 18 memory accesses + */ +static const fftw_real K342020143 = FFTW_KONST(+0.342020143325668733044099614682259580763083368); +static const fftw_real K813797681 = FFTW_KONST(+0.813797681349373692844693217248393223289101568); +static const fftw_real K939692620 = FFTW_KONST(+0.939692620785908384054109277324731469936208134); +static const fftw_real K296198132 = FFTW_KONST(+0.296198132726023843175338011893050938967728390); +static const fftw_real K852868531 = FFTW_KONST(+0.852868531952443209628250963940074071936020296); +static const fftw_real K173648177 = FFTW_KONST(+0.173648177666930348851716626769314796000375677); +static const fftw_real K556670399 = FFTW_KONST(+0.556670399226419366452912952047023132968291906); +static const fftw_real K766044443 = FFTW_KONST(+0.766044443118978035202392650555416673935832457); +static const fftw_real K984807753 = FFTW_KONST(+0.984807753012208059366743024589523013670643252); +static const fftw_real K150383733 = FFTW_KONST(+0.150383733180435296639271897612501926072238258); +static const fftw_real K642787609 = FFTW_KONST(+0.642787609686539326322643409907263432907559884); +static const fftw_real K663413948 = FFTW_KONST(+0.663413948168938396205421319635891297216863310); +static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); +static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); + +/* + * Generator Id's : + * $Id: frc_9.c,v 1.1.1.1 2006/05/12 15:15:02 veplaini Exp $ + * $Id: frc_9.c,v 1.1.1.1 2006/05/12 15:15:02 veplaini Exp $ + * $Id: frc_9.c,v 1.1.1.1 2006/05/12 15:15:02 veplaini Exp $ + */ + +void fftw_real2hc_9(const fftw_real *input, fftw_real *real_output, fftw_real *imag_output, int istride, int real_ostride, int imag_ostride) +{ + fftw_real tmp1; + fftw_real tmp15; + fftw_real tmp20; + fftw_real tmp19; + fftw_real tmp4; + fftw_real tmp27; + fftw_real tmp10; + fftw_real tmp18; + fftw_real tmp21; + fftw_real tmp2; + fftw_real tmp3; + fftw_real tmp5; + fftw_real tmp16; + ASSERT_ALIGNED_DOUBLE; + tmp1 = input[0]; + { + fftw_real tmp11; + fftw_real tmp12; + fftw_real tmp13; + fftw_real tmp14; + ASSERT_ALIGNED_DOUBLE; + tmp11 = input[2 * istride]; + tmp12 = input[5 * istride]; + tmp13 = input[8 * istride]; + tmp14 = tmp12 + tmp13; + tmp15 = tmp11 + tmp14; + tmp20 = tmp11 - (K500000000 * tmp14); + tmp19 = tmp13 - tmp12; + } + tmp2 = input[3 * istride]; + tmp3 = input[6 * istride]; + tmp4 = tmp2 + tmp3; + tmp27 = tmp3 - tmp2; + { + fftw_real tmp6; + fftw_real tmp7; + fftw_real tmp8; + fftw_real tmp9; + ASSERT_ALIGNED_DOUBLE; + tmp6 = input[istride]; + tmp7 = input[4 * istride]; + tmp8 = input[7 * istride]; + tmp9 = tmp7 + tmp8; + tmp10 = tmp6 + tmp9; + tmp18 = tmp6 - (K500000000 * tmp9); + tmp21 = tmp8 - tmp7; + } + imag_output[3 * imag_ostride] = K866025403 * (tmp15 - tmp10); + tmp5 = tmp1 + tmp4; + tmp16 = tmp10 + tmp15; + real_output[3 * real_ostride] = tmp5 - (K500000000 * tmp16); + real_output[0] = tmp5 + tmp16; + { + fftw_real tmp29; + fftw_real tmp25; + fftw_real tmp26; + fftw_real tmp28; + fftw_real tmp17; + fftw_real tmp22; + fftw_real tmp23; + fftw_real tmp24; + ASSERT_ALIGNED_DOUBLE; + tmp29 = K866025403 * tmp27; + tmp25 = (K663413948 * tmp21) - (K642787609 * tmp18); + tmp26 = (K150383733 * tmp19) - (K984807753 * tmp20); + tmp28 = tmp25 + tmp26; + tmp17 = tmp1 - (K500000000 * tmp4); + tmp22 = (K766044443 * tmp18) + (K556670399 * tmp21); + tmp23 = (K173648177 * tmp20) + (K852868531 * tmp19); + tmp24 = tmp22 + tmp23; + real_output[real_ostride] = tmp17 + tmp24; + real_output[4 * real_ostride] = tmp17 + (K866025403 * (tmp25 - tmp26)) - (K500000000 * tmp24); + real_output[2 * real_ostride] = tmp17 + (K173648177 * tmp18) - (K296198132 * tmp19) - (K939692620 * tmp20) - (K852868531 * tmp21); + imag_output[imag_ostride] = tmp29 + tmp28; + imag_output[4 * imag_ostride] = (K866025403 * (tmp27 + (tmp23 - tmp22))) - (K500000000 * tmp28); + imag_output[2 * imag_ostride] = (K813797681 * tmp19) - (K342020143 * tmp20) - (K150383733 * tmp21) - (K984807753 * tmp18) - tmp29; + } +} + +fftw_codelet_desc fftw_real2hc_9_desc = +{ + "fftw_real2hc_9", + (void (*)()) fftw_real2hc_9, + 9, + FFTW_FORWARD, + FFTW_REAL2HC, + 200, + 0, + (const int *) 0, +}; diff --git a/src/sndobj/rfftw/ftw_10.c b/src/sndobj/rfftw/ftw_10.c new file mode 100644 index 0000000..dc97aae --- /dev/null +++ b/src/sndobj/rfftw/ftw_10.c @@ -0,0 +1,375 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:36 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddle 10 */ + +/* + * This function contains 102 FP additions, 60 FP multiplications, + * (or, 72 additions, 30 multiplications, 30 fused multiply/add), + * 42 stack variables, and 40 memory accesses + */ +static const fftw_real K587785252 = FFTW_KONST(+0.587785252292473129168705954639072768597652438); +static const fftw_real K951056516 = FFTW_KONST(+0.951056516295153572116439333379382143405698634); +static const fftw_real K250000000 = FFTW_KONST(+0.250000000000000000000000000000000000000000000); +static const fftw_real K559016994 = FFTW_KONST(+0.559016994374947424102293417182819058860154590); + +/* + * Generator Id's : + * $Id: ftw_10.c,v 1.1.1.1 2006/05/12 15:14:50 veplaini Exp $ + * $Id: ftw_10.c,v 1.1.1.1 2006/05/12 15:14:50 veplaini Exp $ + * $Id: ftw_10.c,v 1.1.1.1 2006/05/12 15:14:50 veplaini Exp $ + */ + +void fftw_twiddle_10(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_complex *inout; + inout = A; + for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 9) { + fftw_real tmp7; + fftw_real tmp55; + fftw_real tmp100; + fftw_real tmp112; + fftw_real tmp41; + fftw_real tmp52; + fftw_real tmp53; + fftw_real tmp59; + fftw_real tmp60; + fftw_real tmp61; + fftw_real tmp75; + fftw_real tmp78; + fftw_real tmp110; + fftw_real tmp86; + fftw_real tmp87; + fftw_real tmp96; + fftw_real tmp18; + fftw_real tmp29; + fftw_real tmp30; + fftw_real tmp56; + fftw_real tmp57; + fftw_real tmp58; + fftw_real tmp68; + fftw_real tmp71; + fftw_real tmp109; + fftw_real tmp89; + fftw_real tmp90; + fftw_real tmp95; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp99; + fftw_real tmp6; + fftw_real tmp98; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(inout[0]); + tmp99 = c_im(inout[0]); + { + fftw_real tmp3; + fftw_real tmp5; + fftw_real tmp2; + fftw_real tmp4; + ASSERT_ALIGNED_DOUBLE; + tmp3 = c_re(inout[5 * iostride]); + tmp5 = c_im(inout[5 * iostride]); + tmp2 = c_re(W[4]); + tmp4 = c_im(W[4]); + tmp6 = (tmp2 * tmp3) - (tmp4 * tmp5); + tmp98 = (tmp4 * tmp3) + (tmp2 * tmp5); + } + tmp7 = tmp1 - tmp6; + tmp55 = tmp1 + tmp6; + tmp100 = tmp98 + tmp99; + tmp112 = tmp99 - tmp98; + } + { + fftw_real tmp35; + fftw_real tmp73; + fftw_real tmp51; + fftw_real tmp77; + fftw_real tmp40; + fftw_real tmp74; + fftw_real tmp46; + fftw_real tmp76; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp32; + fftw_real tmp34; + fftw_real tmp31; + fftw_real tmp33; + ASSERT_ALIGNED_DOUBLE; + tmp32 = c_re(inout[4 * iostride]); + tmp34 = c_im(inout[4 * iostride]); + tmp31 = c_re(W[3]); + tmp33 = c_im(W[3]); + tmp35 = (tmp31 * tmp32) - (tmp33 * tmp34); + tmp73 = (tmp33 * tmp32) + (tmp31 * tmp34); + } + { + fftw_real tmp48; + fftw_real tmp50; + fftw_real tmp47; + fftw_real tmp49; + ASSERT_ALIGNED_DOUBLE; + tmp48 = c_re(inout[iostride]); + tmp50 = c_im(inout[iostride]); + tmp47 = c_re(W[0]); + tmp49 = c_im(W[0]); + tmp51 = (tmp47 * tmp48) - (tmp49 * tmp50); + tmp77 = (tmp49 * tmp48) + (tmp47 * tmp50); + } + { + fftw_real tmp37; + fftw_real tmp39; + fftw_real tmp36; + fftw_real tmp38; + ASSERT_ALIGNED_DOUBLE; + tmp37 = c_re(inout[9 * iostride]); + tmp39 = c_im(inout[9 * iostride]); + tmp36 = c_re(W[8]); + tmp38 = c_im(W[8]); + tmp40 = (tmp36 * tmp37) - (tmp38 * tmp39); + tmp74 = (tmp38 * tmp37) + (tmp36 * tmp39); + } + { + fftw_real tmp43; + fftw_real tmp45; + fftw_real tmp42; + fftw_real tmp44; + ASSERT_ALIGNED_DOUBLE; + tmp43 = c_re(inout[6 * iostride]); + tmp45 = c_im(inout[6 * iostride]); + tmp42 = c_re(W[5]); + tmp44 = c_im(W[5]); + tmp46 = (tmp42 * tmp43) - (tmp44 * tmp45); + tmp76 = (tmp44 * tmp43) + (tmp42 * tmp45); + } + tmp41 = tmp35 - tmp40; + tmp52 = tmp46 - tmp51; + tmp53 = tmp41 + tmp52; + tmp59 = tmp35 + tmp40; + tmp60 = tmp46 + tmp51; + tmp61 = tmp59 + tmp60; + tmp75 = tmp73 - tmp74; + tmp78 = tmp76 - tmp77; + tmp110 = tmp75 + tmp78; + tmp86 = tmp73 + tmp74; + tmp87 = tmp76 + tmp77; + tmp96 = tmp86 + tmp87; + } + { + fftw_real tmp12; + fftw_real tmp66; + fftw_real tmp28; + fftw_real tmp70; + fftw_real tmp17; + fftw_real tmp67; + fftw_real tmp23; + fftw_real tmp69; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp9; + fftw_real tmp11; + fftw_real tmp8; + fftw_real tmp10; + ASSERT_ALIGNED_DOUBLE; + tmp9 = c_re(inout[2 * iostride]); + tmp11 = c_im(inout[2 * iostride]); + tmp8 = c_re(W[1]); + tmp10 = c_im(W[1]); + tmp12 = (tmp8 * tmp9) - (tmp10 * tmp11); + tmp66 = (tmp10 * tmp9) + (tmp8 * tmp11); + } + { + fftw_real tmp25; + fftw_real tmp27; + fftw_real tmp24; + fftw_real tmp26; + ASSERT_ALIGNED_DOUBLE; + tmp25 = c_re(inout[3 * iostride]); + tmp27 = c_im(inout[3 * iostride]); + tmp24 = c_re(W[2]); + tmp26 = c_im(W[2]); + tmp28 = (tmp24 * tmp25) - (tmp26 * tmp27); + tmp70 = (tmp26 * tmp25) + (tmp24 * tmp27); + } + { + fftw_real tmp14; + fftw_real tmp16; + fftw_real tmp13; + fftw_real tmp15; + ASSERT_ALIGNED_DOUBLE; + tmp14 = c_re(inout[7 * iostride]); + tmp16 = c_im(inout[7 * iostride]); + tmp13 = c_re(W[6]); + tmp15 = c_im(W[6]); + tmp17 = (tmp13 * tmp14) - (tmp15 * tmp16); + tmp67 = (tmp15 * tmp14) + (tmp13 * tmp16); + } + { + fftw_real tmp20; + fftw_real tmp22; + fftw_real tmp19; + fftw_real tmp21; + ASSERT_ALIGNED_DOUBLE; + tmp20 = c_re(inout[8 * iostride]); + tmp22 = c_im(inout[8 * iostride]); + tmp19 = c_re(W[7]); + tmp21 = c_im(W[7]); + tmp23 = (tmp19 * tmp20) - (tmp21 * tmp22); + tmp69 = (tmp21 * tmp20) + (tmp19 * tmp22); + } + tmp18 = tmp12 - tmp17; + tmp29 = tmp23 - tmp28; + tmp30 = tmp18 + tmp29; + tmp56 = tmp12 + tmp17; + tmp57 = tmp23 + tmp28; + tmp58 = tmp56 + tmp57; + tmp68 = tmp66 - tmp67; + tmp71 = tmp69 - tmp70; + tmp109 = tmp68 + tmp71; + tmp89 = tmp66 + tmp67; + tmp90 = tmp69 + tmp70; + tmp95 = tmp89 + tmp90; + } + { + fftw_real tmp63; + fftw_real tmp54; + fftw_real tmp64; + fftw_real tmp80; + fftw_real tmp82; + fftw_real tmp72; + fftw_real tmp79; + fftw_real tmp81; + fftw_real tmp65; + ASSERT_ALIGNED_DOUBLE; + tmp63 = K559016994 * (tmp30 - tmp53); + tmp54 = tmp30 + tmp53; + tmp64 = tmp7 - (K250000000 * tmp54); + tmp72 = tmp68 - tmp71; + tmp79 = tmp75 - tmp78; + tmp80 = (K951056516 * tmp72) + (K587785252 * tmp79); + tmp82 = (K951056516 * tmp79) - (K587785252 * tmp72); + c_re(inout[5 * iostride]) = tmp7 + tmp54; + tmp81 = tmp64 - tmp63; + c_re(inout[7 * iostride]) = tmp81 - tmp82; + c_re(inout[3 * iostride]) = tmp81 + tmp82; + tmp65 = tmp63 + tmp64; + c_re(inout[9 * iostride]) = tmp65 - tmp80; + c_re(inout[iostride]) = tmp65 + tmp80; + } + { + fftw_real tmp111; + fftw_real tmp113; + fftw_real tmp114; + fftw_real tmp118; + fftw_real tmp120; + fftw_real tmp116; + fftw_real tmp117; + fftw_real tmp119; + fftw_real tmp115; + ASSERT_ALIGNED_DOUBLE; + tmp111 = K559016994 * (tmp109 - tmp110); + tmp113 = tmp109 + tmp110; + tmp114 = tmp112 - (K250000000 * tmp113); + tmp116 = tmp18 - tmp29; + tmp117 = tmp41 - tmp52; + tmp118 = (K951056516 * tmp116) + (K587785252 * tmp117); + tmp120 = (K951056516 * tmp117) - (K587785252 * tmp116); + c_im(inout[5 * iostride]) = tmp113 + tmp112; + tmp119 = tmp114 - tmp111; + c_im(inout[3 * iostride]) = tmp119 - tmp120; + c_im(inout[7 * iostride]) = tmp120 + tmp119; + tmp115 = tmp111 + tmp114; + c_im(inout[iostride]) = tmp115 - tmp118; + c_im(inout[9 * iostride]) = tmp118 + tmp115; + } + { + fftw_real tmp84; + fftw_real tmp62; + fftw_real tmp83; + fftw_real tmp92; + fftw_real tmp94; + fftw_real tmp88; + fftw_real tmp91; + fftw_real tmp93; + fftw_real tmp85; + ASSERT_ALIGNED_DOUBLE; + tmp84 = K559016994 * (tmp58 - tmp61); + tmp62 = tmp58 + tmp61; + tmp83 = tmp55 - (K250000000 * tmp62); + tmp88 = tmp86 - tmp87; + tmp91 = tmp89 - tmp90; + tmp92 = (K951056516 * tmp88) - (K587785252 * tmp91); + tmp94 = (K951056516 * tmp91) + (K587785252 * tmp88); + c_re(inout[0]) = tmp55 + tmp62; + tmp93 = tmp84 + tmp83; + c_re(inout[4 * iostride]) = tmp93 - tmp94; + c_re(inout[6 * iostride]) = tmp93 + tmp94; + tmp85 = tmp83 - tmp84; + c_re(inout[2 * iostride]) = tmp85 - tmp92; + c_re(inout[8 * iostride]) = tmp85 + tmp92; + } + { + fftw_real tmp105; + fftw_real tmp97; + fftw_real tmp104; + fftw_real tmp103; + fftw_real tmp107; + fftw_real tmp101; + fftw_real tmp102; + fftw_real tmp108; + fftw_real tmp106; + ASSERT_ALIGNED_DOUBLE; + tmp105 = K559016994 * (tmp95 - tmp96); + tmp97 = tmp95 + tmp96; + tmp104 = tmp100 - (K250000000 * tmp97); + tmp101 = tmp59 - tmp60; + tmp102 = tmp56 - tmp57; + tmp103 = (K951056516 * tmp101) - (K587785252 * tmp102); + tmp107 = (K951056516 * tmp102) + (K587785252 * tmp101); + c_im(inout[0]) = tmp97 + tmp100; + tmp108 = tmp105 + tmp104; + c_im(inout[4 * iostride]) = tmp107 + tmp108; + c_im(inout[6 * iostride]) = tmp108 - tmp107; + tmp106 = tmp104 - tmp105; + c_im(inout[2 * iostride]) = tmp103 + tmp106; + c_im(inout[8 * iostride]) = tmp106 - tmp103; + } + } +} + +static const int twiddle_order[] = +{1, 2, 3, 4, 5, 6, 7, 8, 9}; +fftw_codelet_desc fftw_twiddle_10_desc = +{ + "fftw_twiddle_10", + (void (*)()) fftw_twiddle_10, + 10, + FFTW_FORWARD, + FFTW_TWIDDLE, + 220, + 9, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/ftw_16.c b/src/sndobj/rfftw/ftw_16.c new file mode 100644 index 0000000..722b1f4 --- /dev/null +++ b/src/sndobj/rfftw/ftw_16.c @@ -0,0 +1,611 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:36 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddle 16 */ + +/* + * This function contains 174 FP additions, 84 FP multiplications, + * (or, 136 additions, 46 multiplications, 38 fused multiply/add), + * 50 stack variables, and 64 memory accesses + */ +static const fftw_real K382683432 = FFTW_KONST(+0.382683432365089771728459984030398866761344562); +static const fftw_real K923879532 = FFTW_KONST(+0.923879532511286756128183189396788286822416626); +static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); + +/* + * Generator Id's : + * $Id: ftw_16.c,v 1.1.1.1 2006/05/12 15:14:48 veplaini Exp $ + * $Id: ftw_16.c,v 1.1.1.1 2006/05/12 15:14:48 veplaini Exp $ + * $Id: ftw_16.c,v 1.1.1.1 2006/05/12 15:14:48 veplaini Exp $ + */ + +void fftw_twiddle_16(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_complex *inout; + inout = A; + for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 15) { + fftw_real tmp7; + fftw_real tmp91; + fftw_real tmp180; + fftw_real tmp193; + fftw_real tmp18; + fftw_real tmp194; + fftw_real tmp94; + fftw_real tmp177; + fftw_real tmp77; + fftw_real tmp88; + fftw_real tmp161; + fftw_real tmp128; + fftw_real tmp144; + fftw_real tmp162; + fftw_real tmp163; + fftw_real tmp164; + fftw_real tmp123; + fftw_real tmp143; + fftw_real tmp30; + fftw_real tmp152; + fftw_real tmp100; + fftw_real tmp136; + fftw_real tmp41; + fftw_real tmp153; + fftw_real tmp105; + fftw_real tmp137; + fftw_real tmp54; + fftw_real tmp65; + fftw_real tmp156; + fftw_real tmp117; + fftw_real tmp141; + fftw_real tmp157; + fftw_real tmp158; + fftw_real tmp159; + fftw_real tmp112; + fftw_real tmp140; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp179; + fftw_real tmp6; + fftw_real tmp178; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(inout[0]); + tmp179 = c_im(inout[0]); + { + fftw_real tmp3; + fftw_real tmp5; + fftw_real tmp2; + fftw_real tmp4; + ASSERT_ALIGNED_DOUBLE; + tmp3 = c_re(inout[8 * iostride]); + tmp5 = c_im(inout[8 * iostride]); + tmp2 = c_re(W[7]); + tmp4 = c_im(W[7]); + tmp6 = (tmp2 * tmp3) - (tmp4 * tmp5); + tmp178 = (tmp4 * tmp3) + (tmp2 * tmp5); + } + tmp7 = tmp1 + tmp6; + tmp91 = tmp1 - tmp6; + tmp180 = tmp178 + tmp179; + tmp193 = tmp179 - tmp178; + } + { + fftw_real tmp12; + fftw_real tmp92; + fftw_real tmp17; + fftw_real tmp93; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp9; + fftw_real tmp11; + fftw_real tmp8; + fftw_real tmp10; + ASSERT_ALIGNED_DOUBLE; + tmp9 = c_re(inout[4 * iostride]); + tmp11 = c_im(inout[4 * iostride]); + tmp8 = c_re(W[3]); + tmp10 = c_im(W[3]); + tmp12 = (tmp8 * tmp9) - (tmp10 * tmp11); + tmp92 = (tmp10 * tmp9) + (tmp8 * tmp11); + } + { + fftw_real tmp14; + fftw_real tmp16; + fftw_real tmp13; + fftw_real tmp15; + ASSERT_ALIGNED_DOUBLE; + tmp14 = c_re(inout[12 * iostride]); + tmp16 = c_im(inout[12 * iostride]); + tmp13 = c_re(W[11]); + tmp15 = c_im(W[11]); + tmp17 = (tmp13 * tmp14) - (tmp15 * tmp16); + tmp93 = (tmp15 * tmp14) + (tmp13 * tmp16); + } + tmp18 = tmp12 + tmp17; + tmp194 = tmp12 - tmp17; + tmp94 = tmp92 - tmp93; + tmp177 = tmp92 + tmp93; + } + { + fftw_real tmp71; + fftw_real tmp124; + fftw_real tmp87; + fftw_real tmp121; + fftw_real tmp76; + fftw_real tmp125; + fftw_real tmp82; + fftw_real tmp120; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp68; + fftw_real tmp70; + fftw_real tmp67; + fftw_real tmp69; + ASSERT_ALIGNED_DOUBLE; + tmp68 = c_re(inout[15 * iostride]); + tmp70 = c_im(inout[15 * iostride]); + tmp67 = c_re(W[14]); + tmp69 = c_im(W[14]); + tmp71 = (tmp67 * tmp68) - (tmp69 * tmp70); + tmp124 = (tmp69 * tmp68) + (tmp67 * tmp70); + } + { + fftw_real tmp84; + fftw_real tmp86; + fftw_real tmp83; + fftw_real tmp85; + ASSERT_ALIGNED_DOUBLE; + tmp84 = c_re(inout[11 * iostride]); + tmp86 = c_im(inout[11 * iostride]); + tmp83 = c_re(W[10]); + tmp85 = c_im(W[10]); + tmp87 = (tmp83 * tmp84) - (tmp85 * tmp86); + tmp121 = (tmp85 * tmp84) + (tmp83 * tmp86); + } + { + fftw_real tmp73; + fftw_real tmp75; + fftw_real tmp72; + fftw_real tmp74; + ASSERT_ALIGNED_DOUBLE; + tmp73 = c_re(inout[7 * iostride]); + tmp75 = c_im(inout[7 * iostride]); + tmp72 = c_re(W[6]); + tmp74 = c_im(W[6]); + tmp76 = (tmp72 * tmp73) - (tmp74 * tmp75); + tmp125 = (tmp74 * tmp73) + (tmp72 * tmp75); + } + { + fftw_real tmp79; + fftw_real tmp81; + fftw_real tmp78; + fftw_real tmp80; + ASSERT_ALIGNED_DOUBLE; + tmp79 = c_re(inout[3 * iostride]); + tmp81 = c_im(inout[3 * iostride]); + tmp78 = c_re(W[2]); + tmp80 = c_im(W[2]); + tmp82 = (tmp78 * tmp79) - (tmp80 * tmp81); + tmp120 = (tmp80 * tmp79) + (tmp78 * tmp81); + } + { + fftw_real tmp126; + fftw_real tmp127; + fftw_real tmp119; + fftw_real tmp122; + ASSERT_ALIGNED_DOUBLE; + tmp77 = tmp71 + tmp76; + tmp88 = tmp82 + tmp87; + tmp161 = tmp77 - tmp88; + tmp126 = tmp124 - tmp125; + tmp127 = tmp82 - tmp87; + tmp128 = tmp126 + tmp127; + tmp144 = tmp126 - tmp127; + tmp162 = tmp124 + tmp125; + tmp163 = tmp120 + tmp121; + tmp164 = tmp162 - tmp163; + tmp119 = tmp71 - tmp76; + tmp122 = tmp120 - tmp121; + tmp123 = tmp119 - tmp122; + tmp143 = tmp119 + tmp122; + } + } + { + fftw_real tmp24; + fftw_real tmp96; + fftw_real tmp29; + fftw_real tmp97; + fftw_real tmp98; + fftw_real tmp99; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp21; + fftw_real tmp23; + fftw_real tmp20; + fftw_real tmp22; + ASSERT_ALIGNED_DOUBLE; + tmp21 = c_re(inout[2 * iostride]); + tmp23 = c_im(inout[2 * iostride]); + tmp20 = c_re(W[1]); + tmp22 = c_im(W[1]); + tmp24 = (tmp20 * tmp21) - (tmp22 * tmp23); + tmp96 = (tmp22 * tmp21) + (tmp20 * tmp23); + } + { + fftw_real tmp26; + fftw_real tmp28; + fftw_real tmp25; + fftw_real tmp27; + ASSERT_ALIGNED_DOUBLE; + tmp26 = c_re(inout[10 * iostride]); + tmp28 = c_im(inout[10 * iostride]); + tmp25 = c_re(W[9]); + tmp27 = c_im(W[9]); + tmp29 = (tmp25 * tmp26) - (tmp27 * tmp28); + tmp97 = (tmp27 * tmp26) + (tmp25 * tmp28); + } + tmp30 = tmp24 + tmp29; + tmp152 = tmp96 + tmp97; + tmp98 = tmp96 - tmp97; + tmp99 = tmp24 - tmp29; + tmp100 = tmp98 - tmp99; + tmp136 = tmp99 + tmp98; + } + { + fftw_real tmp35; + fftw_real tmp102; + fftw_real tmp40; + fftw_real tmp103; + fftw_real tmp101; + fftw_real tmp104; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp32; + fftw_real tmp34; + fftw_real tmp31; + fftw_real tmp33; + ASSERT_ALIGNED_DOUBLE; + tmp32 = c_re(inout[14 * iostride]); + tmp34 = c_im(inout[14 * iostride]); + tmp31 = c_re(W[13]); + tmp33 = c_im(W[13]); + tmp35 = (tmp31 * tmp32) - (tmp33 * tmp34); + tmp102 = (tmp33 * tmp32) + (tmp31 * tmp34); + } + { + fftw_real tmp37; + fftw_real tmp39; + fftw_real tmp36; + fftw_real tmp38; + ASSERT_ALIGNED_DOUBLE; + tmp37 = c_re(inout[6 * iostride]); + tmp39 = c_im(inout[6 * iostride]); + tmp36 = c_re(W[5]); + tmp38 = c_im(W[5]); + tmp40 = (tmp36 * tmp37) - (tmp38 * tmp39); + tmp103 = (tmp38 * tmp37) + (tmp36 * tmp39); + } + tmp41 = tmp35 + tmp40; + tmp153 = tmp102 + tmp103; + tmp101 = tmp35 - tmp40; + tmp104 = tmp102 - tmp103; + tmp105 = tmp101 + tmp104; + tmp137 = tmp101 - tmp104; + } + { + fftw_real tmp48; + fftw_real tmp108; + fftw_real tmp64; + fftw_real tmp115; + fftw_real tmp53; + fftw_real tmp109; + fftw_real tmp59; + fftw_real tmp114; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp45; + fftw_real tmp47; + fftw_real tmp44; + fftw_real tmp46; + ASSERT_ALIGNED_DOUBLE; + tmp45 = c_re(inout[iostride]); + tmp47 = c_im(inout[iostride]); + tmp44 = c_re(W[0]); + tmp46 = c_im(W[0]); + tmp48 = (tmp44 * tmp45) - (tmp46 * tmp47); + tmp108 = (tmp46 * tmp45) + (tmp44 * tmp47); + } + { + fftw_real tmp61; + fftw_real tmp63; + fftw_real tmp60; + fftw_real tmp62; + ASSERT_ALIGNED_DOUBLE; + tmp61 = c_re(inout[13 * iostride]); + tmp63 = c_im(inout[13 * iostride]); + tmp60 = c_re(W[12]); + tmp62 = c_im(W[12]); + tmp64 = (tmp60 * tmp61) - (tmp62 * tmp63); + tmp115 = (tmp62 * tmp61) + (tmp60 * tmp63); + } + { + fftw_real tmp50; + fftw_real tmp52; + fftw_real tmp49; + fftw_real tmp51; + ASSERT_ALIGNED_DOUBLE; + tmp50 = c_re(inout[9 * iostride]); + tmp52 = c_im(inout[9 * iostride]); + tmp49 = c_re(W[8]); + tmp51 = c_im(W[8]); + tmp53 = (tmp49 * tmp50) - (tmp51 * tmp52); + tmp109 = (tmp51 * tmp50) + (tmp49 * tmp52); + } + { + fftw_real tmp56; + fftw_real tmp58; + fftw_real tmp55; + fftw_real tmp57; + ASSERT_ALIGNED_DOUBLE; + tmp56 = c_re(inout[5 * iostride]); + tmp58 = c_im(inout[5 * iostride]); + tmp55 = c_re(W[4]); + tmp57 = c_im(W[4]); + tmp59 = (tmp55 * tmp56) - (tmp57 * tmp58); + tmp114 = (tmp57 * tmp56) + (tmp55 * tmp58); + } + { + fftw_real tmp113; + fftw_real tmp116; + fftw_real tmp110; + fftw_real tmp111; + ASSERT_ALIGNED_DOUBLE; + tmp54 = tmp48 + tmp53; + tmp65 = tmp59 + tmp64; + tmp156 = tmp54 - tmp65; + tmp113 = tmp48 - tmp53; + tmp116 = tmp114 - tmp115; + tmp117 = tmp113 - tmp116; + tmp141 = tmp113 + tmp116; + tmp157 = tmp108 + tmp109; + tmp158 = tmp114 + tmp115; + tmp159 = tmp157 - tmp158; + tmp110 = tmp108 - tmp109; + tmp111 = tmp59 - tmp64; + tmp112 = tmp110 + tmp111; + tmp140 = tmp110 - tmp111; + } + } + { + fftw_real tmp107; + fftw_real tmp131; + fftw_real tmp202; + fftw_real tmp204; + fftw_real tmp130; + fftw_real tmp203; + fftw_real tmp134; + fftw_real tmp199; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp95; + fftw_real tmp106; + fftw_real tmp200; + fftw_real tmp201; + ASSERT_ALIGNED_DOUBLE; + tmp95 = tmp91 - tmp94; + tmp106 = K707106781 * (tmp100 - tmp105); + tmp107 = tmp95 + tmp106; + tmp131 = tmp95 - tmp106; + tmp200 = K707106781 * (tmp137 - tmp136); + tmp201 = tmp194 + tmp193; + tmp202 = tmp200 + tmp201; + tmp204 = tmp201 - tmp200; + } + { + fftw_real tmp118; + fftw_real tmp129; + fftw_real tmp132; + fftw_real tmp133; + ASSERT_ALIGNED_DOUBLE; + tmp118 = (K923879532 * tmp112) + (K382683432 * tmp117); + tmp129 = (K382683432 * tmp123) - (K923879532 * tmp128); + tmp130 = tmp118 + tmp129; + tmp203 = tmp129 - tmp118; + tmp132 = (K382683432 * tmp112) - (K923879532 * tmp117); + tmp133 = (K382683432 * tmp128) + (K923879532 * tmp123); + tmp134 = tmp132 - tmp133; + tmp199 = tmp132 + tmp133; + } + c_re(inout[11 * iostride]) = tmp107 - tmp130; + c_re(inout[3 * iostride]) = tmp107 + tmp130; + c_re(inout[15 * iostride]) = tmp131 - tmp134; + c_re(inout[7 * iostride]) = tmp131 + tmp134; + c_im(inout[3 * iostride]) = tmp199 + tmp202; + c_im(inout[11 * iostride]) = tmp202 - tmp199; + c_im(inout[7 * iostride]) = tmp203 + tmp204; + c_im(inout[15 * iostride]) = tmp204 - tmp203; + } + { + fftw_real tmp139; + fftw_real tmp147; + fftw_real tmp196; + fftw_real tmp198; + fftw_real tmp146; + fftw_real tmp197; + fftw_real tmp150; + fftw_real tmp191; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp135; + fftw_real tmp138; + fftw_real tmp192; + fftw_real tmp195; + ASSERT_ALIGNED_DOUBLE; + tmp135 = tmp91 + tmp94; + tmp138 = K707106781 * (tmp136 + tmp137); + tmp139 = tmp135 + tmp138; + tmp147 = tmp135 - tmp138; + tmp192 = K707106781 * (tmp100 + tmp105); + tmp195 = tmp193 - tmp194; + tmp196 = tmp192 + tmp195; + tmp198 = tmp195 - tmp192; + } + { + fftw_real tmp142; + fftw_real tmp145; + fftw_real tmp148; + fftw_real tmp149; + ASSERT_ALIGNED_DOUBLE; + tmp142 = (K382683432 * tmp140) + (K923879532 * tmp141); + tmp145 = (K923879532 * tmp143) - (K382683432 * tmp144); + tmp146 = tmp142 + tmp145; + tmp197 = tmp145 - tmp142; + tmp148 = (K923879532 * tmp140) - (K382683432 * tmp141); + tmp149 = (K923879532 * tmp144) + (K382683432 * tmp143); + tmp150 = tmp148 - tmp149; + tmp191 = tmp148 + tmp149; + } + c_re(inout[9 * iostride]) = tmp139 - tmp146; + c_re(inout[iostride]) = tmp139 + tmp146; + c_re(inout[13 * iostride]) = tmp147 - tmp150; + c_re(inout[5 * iostride]) = tmp147 + tmp150; + c_im(inout[iostride]) = tmp191 + tmp196; + c_im(inout[9 * iostride]) = tmp196 - tmp191; + c_im(inout[5 * iostride]) = tmp197 + tmp198; + c_im(inout[13 * iostride]) = tmp198 - tmp197; + } + { + fftw_real tmp155; + fftw_real tmp167; + fftw_real tmp188; + fftw_real tmp190; + fftw_real tmp166; + fftw_real tmp189; + fftw_real tmp170; + fftw_real tmp185; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp151; + fftw_real tmp154; + fftw_real tmp186; + fftw_real tmp187; + ASSERT_ALIGNED_DOUBLE; + tmp151 = tmp7 - tmp18; + tmp154 = tmp152 - tmp153; + tmp155 = tmp151 + tmp154; + tmp167 = tmp151 - tmp154; + tmp186 = tmp41 - tmp30; + tmp187 = tmp180 - tmp177; + tmp188 = tmp186 + tmp187; + tmp190 = tmp187 - tmp186; + } + { + fftw_real tmp160; + fftw_real tmp165; + fftw_real tmp168; + fftw_real tmp169; + ASSERT_ALIGNED_DOUBLE; + tmp160 = tmp156 + tmp159; + tmp165 = tmp161 - tmp164; + tmp166 = K707106781 * (tmp160 + tmp165); + tmp189 = K707106781 * (tmp165 - tmp160); + tmp168 = tmp159 - tmp156; + tmp169 = tmp161 + tmp164; + tmp170 = K707106781 * (tmp168 - tmp169); + tmp185 = K707106781 * (tmp168 + tmp169); + } + c_re(inout[10 * iostride]) = tmp155 - tmp166; + c_re(inout[2 * iostride]) = tmp155 + tmp166; + c_re(inout[14 * iostride]) = tmp167 - tmp170; + c_re(inout[6 * iostride]) = tmp167 + tmp170; + c_im(inout[2 * iostride]) = tmp185 + tmp188; + c_im(inout[10 * iostride]) = tmp188 - tmp185; + c_im(inout[6 * iostride]) = tmp189 + tmp190; + c_im(inout[14 * iostride]) = tmp190 - tmp189; + } + { + fftw_real tmp43; + fftw_real tmp171; + fftw_real tmp182; + fftw_real tmp184; + fftw_real tmp90; + fftw_real tmp183; + fftw_real tmp174; + fftw_real tmp175; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp19; + fftw_real tmp42; + fftw_real tmp176; + fftw_real tmp181; + ASSERT_ALIGNED_DOUBLE; + tmp19 = tmp7 + tmp18; + tmp42 = tmp30 + tmp41; + tmp43 = tmp19 + tmp42; + tmp171 = tmp19 - tmp42; + tmp176 = tmp152 + tmp153; + tmp181 = tmp177 + tmp180; + tmp182 = tmp176 + tmp181; + tmp184 = tmp181 - tmp176; + } + { + fftw_real tmp66; + fftw_real tmp89; + fftw_real tmp172; + fftw_real tmp173; + ASSERT_ALIGNED_DOUBLE; + tmp66 = tmp54 + tmp65; + tmp89 = tmp77 + tmp88; + tmp90 = tmp66 + tmp89; + tmp183 = tmp89 - tmp66; + tmp172 = tmp157 + tmp158; + tmp173 = tmp162 + tmp163; + tmp174 = tmp172 - tmp173; + tmp175 = tmp172 + tmp173; + } + c_re(inout[8 * iostride]) = tmp43 - tmp90; + c_re(inout[0]) = tmp43 + tmp90; + c_re(inout[12 * iostride]) = tmp171 - tmp174; + c_re(inout[4 * iostride]) = tmp171 + tmp174; + c_im(inout[0]) = tmp175 + tmp182; + c_im(inout[8 * iostride]) = tmp182 - tmp175; + c_im(inout[4 * iostride]) = tmp183 + tmp184; + c_im(inout[12 * iostride]) = tmp184 - tmp183; + } + } +} + +static const int twiddle_order[] = +{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; +fftw_codelet_desc fftw_twiddle_16_desc = +{ + "fftw_twiddle_16", + (void (*)()) fftw_twiddle_16, + 16, + FFTW_FORWARD, + FFTW_TWIDDLE, + 352, + 15, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/ftw_2.c b/src/sndobj/rfftw/ftw_2.c new file mode 100644 index 0000000..a103be2 --- /dev/null +++ b/src/sndobj/rfftw/ftw_2.c @@ -0,0 +1,86 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:30 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddle 2 */ + +/* + * This function contains 6 FP additions, 4 FP multiplications, + * (or, 4 additions, 2 multiplications, 2 fused multiply/add), + * 10 stack variables, and 8 memory accesses + */ + +/* + * Generator Id's : + * $Id: ftw_2.c,v 1.1.1.1 2006/05/12 15:15:01 veplaini Exp $ + * $Id: ftw_2.c,v 1.1.1.1 2006/05/12 15:15:01 veplaini Exp $ + * $Id: ftw_2.c,v 1.1.1.1 2006/05/12 15:15:01 veplaini Exp $ + */ + +void fftw_twiddle_2(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_complex *inout; + inout = A; + for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 1) { + fftw_real tmp1; + fftw_real tmp8; + fftw_real tmp6; + fftw_real tmp7; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(inout[0]); + tmp8 = c_im(inout[0]); + { + fftw_real tmp3; + fftw_real tmp5; + fftw_real tmp2; + fftw_real tmp4; + ASSERT_ALIGNED_DOUBLE; + tmp3 = c_re(inout[iostride]); + tmp5 = c_im(inout[iostride]); + tmp2 = c_re(W[0]); + tmp4 = c_im(W[0]); + tmp6 = (tmp2 * tmp3) - (tmp4 * tmp5); + tmp7 = (tmp4 * tmp3) + (tmp2 * tmp5); + } + c_re(inout[iostride]) = tmp1 - tmp6; + c_re(inout[0]) = tmp1 + tmp6; + c_im(inout[0]) = tmp7 + tmp8; + c_im(inout[iostride]) = tmp8 - tmp7; + } +} + +static const int twiddle_order[] = +{1}; +fftw_codelet_desc fftw_twiddle_2_desc = +{ + "fftw_twiddle_2", + (void (*)()) fftw_twiddle_2, + 2, + FFTW_FORWARD, + FFTW_TWIDDLE, + 44, + 1, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/ftw_3.c b/src/sndobj/rfftw/ftw_3.c new file mode 100644 index 0000000..ddee822 --- /dev/null +++ b/src/sndobj/rfftw/ftw_3.c @@ -0,0 +1,120 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:30 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddle 3 */ + +/* + * This function contains 16 FP additions, 12 FP multiplications, + * (or, 10 additions, 6 multiplications, 6 fused multiply/add), + * 14 stack variables, and 12 memory accesses + */ +static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); +static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); + +/* + * Generator Id's : + * $Id: ftw_3.c,v 1.1.1.1 2006/05/12 15:14:55 veplaini Exp $ + * $Id: ftw_3.c,v 1.1.1.1 2006/05/12 15:14:55 veplaini Exp $ + * $Id: ftw_3.c,v 1.1.1.1 2006/05/12 15:14:55 veplaini Exp $ + */ + +void fftw_twiddle_3(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_complex *inout; + inout = A; + for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 2) { + fftw_real tmp1; + fftw_real tmp18; + fftw_real tmp6; + fftw_real tmp14; + fftw_real tmp11; + fftw_real tmp15; + fftw_real tmp12; + fftw_real tmp17; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(inout[0]); + tmp18 = c_im(inout[0]); + { + fftw_real tmp3; + fftw_real tmp5; + fftw_real tmp2; + fftw_real tmp4; + ASSERT_ALIGNED_DOUBLE; + tmp3 = c_re(inout[iostride]); + tmp5 = c_im(inout[iostride]); + tmp2 = c_re(W[0]); + tmp4 = c_im(W[0]); + tmp6 = (tmp2 * tmp3) - (tmp4 * tmp5); + tmp14 = (tmp4 * tmp3) + (tmp2 * tmp5); + } + { + fftw_real tmp8; + fftw_real tmp10; + fftw_real tmp7; + fftw_real tmp9; + ASSERT_ALIGNED_DOUBLE; + tmp8 = c_re(inout[2 * iostride]); + tmp10 = c_im(inout[2 * iostride]); + tmp7 = c_re(W[1]); + tmp9 = c_im(W[1]); + tmp11 = (tmp7 * tmp8) - (tmp9 * tmp10); + tmp15 = (tmp9 * tmp8) + (tmp7 * tmp10); + } + tmp12 = tmp6 + tmp11; + tmp17 = tmp14 + tmp15; + { + fftw_real tmp13; + fftw_real tmp16; + fftw_real tmp19; + fftw_real tmp20; + ASSERT_ALIGNED_DOUBLE; + c_re(inout[0]) = tmp1 + tmp12; + tmp13 = tmp1 - (K500000000 * tmp12); + tmp16 = K866025403 * (tmp14 - tmp15); + c_re(inout[2 * iostride]) = tmp13 - tmp16; + c_re(inout[iostride]) = tmp13 + tmp16; + c_im(inout[0]) = tmp17 + tmp18; + tmp19 = K866025403 * (tmp11 - tmp6); + tmp20 = tmp18 - (K500000000 * tmp17); + c_im(inout[iostride]) = tmp19 + tmp20; + c_im(inout[2 * iostride]) = tmp20 - tmp19; + } + } +} + +static const int twiddle_order[] = +{1, 2}; +fftw_codelet_desc fftw_twiddle_3_desc = +{ + "fftw_twiddle_3", + (void (*)()) fftw_twiddle_3, + 3, + FFTW_FORWARD, + FFTW_TWIDDLE, + 66, + 2, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/ftw_32.c b/src/sndobj/rfftw/ftw_32.c new file mode 100644 index 0000000..b2cddd4 --- /dev/null +++ b/src/sndobj/rfftw/ftw_32.c @@ -0,0 +1,1384 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:37 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddle 32 */ + +/* + * This function contains 434 FP additions, 208 FP multiplications, + * (or, 340 additions, 114 multiplications, 94 fused multiply/add), + * 90 stack variables, and 128 memory accesses + */ +static const fftw_real K195090322 = FFTW_KONST(+0.195090322016128267848284868477022240927691618); +static const fftw_real K980785280 = FFTW_KONST(+0.980785280403230449126182236134239036973933731); +static const fftw_real K831469612 = FFTW_KONST(+0.831469612302545237078788377617905756738560812); +static const fftw_real K555570233 = FFTW_KONST(+0.555570233019602224742830813948532874374937191); +static const fftw_real K382683432 = FFTW_KONST(+0.382683432365089771728459984030398866761344562); +static const fftw_real K923879532 = FFTW_KONST(+0.923879532511286756128183189396788286822416626); +static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); + +/* + * Generator Id's : + * $Id: ftw_32.c,v 1.1.1.1 2006/05/12 15:14:55 veplaini Exp $ + * $Id: ftw_32.c,v 1.1.1.1 2006/05/12 15:14:55 veplaini Exp $ + * $Id: ftw_32.c,v 1.1.1.1 2006/05/12 15:14:55 veplaini Exp $ + */ + +void fftw_twiddle_32(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_complex *inout; + inout = A; + for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 31) { + fftw_real tmp19; + fftw_real tmp351; + fftw_real tmp472; + fftw_real tmp486; + fftw_real tmp442; + fftw_real tmp456; + fftw_real tmp191; + fftw_real tmp303; + fftw_real tmp161; + fftw_real tmp379; + fftw_real tmp276; + fftw_real tmp326; + fftw_real tmp386; + fftw_real tmp422; + fftw_real tmp259; + fftw_real tmp323; + fftw_real tmp42; + fftw_real tmp455; + fftw_real tmp201; + fftw_real tmp305; + fftw_real tmp354; + fftw_real tmp437; + fftw_real tmp196; + fftw_real tmp304; + fftw_real tmp184; + fftw_real tmp387; + fftw_real tmp382; + fftw_real tmp423; + fftw_real tmp270; + fftw_real tmp327; + fftw_real tmp279; + fftw_real tmp324; + fftw_real tmp66; + fftw_real tmp359; + fftw_real tmp213; + fftw_real tmp309; + fftw_real tmp358; + fftw_real tmp412; + fftw_real tmp208; + fftw_real tmp308; + fftw_real tmp114; + fftw_real tmp373; + fftw_real tmp249; + fftw_real tmp316; + fftw_real tmp370; + fftw_real tmp417; + fftw_real tmp232; + fftw_real tmp319; + fftw_real tmp89; + fftw_real tmp361; + fftw_real tmp224; + fftw_real tmp312; + fftw_real tmp364; + fftw_real tmp413; + fftw_real tmp219; + fftw_real tmp311; + fftw_real tmp137; + fftw_real tmp371; + fftw_real tmp376; + fftw_real tmp418; + fftw_real tmp243; + fftw_real tmp317; + fftw_real tmp252; + fftw_real tmp320; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp440; + fftw_real tmp6; + fftw_real tmp439; + fftw_real tmp12; + fftw_real tmp188; + fftw_real tmp17; + fftw_real tmp189; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(inout[0]); + tmp440 = c_im(inout[0]); + { + fftw_real tmp3; + fftw_real tmp5; + fftw_real tmp2; + fftw_real tmp4; + ASSERT_ALIGNED_DOUBLE; + tmp3 = c_re(inout[16 * iostride]); + tmp5 = c_im(inout[16 * iostride]); + tmp2 = c_re(W[15]); + tmp4 = c_im(W[15]); + tmp6 = (tmp2 * tmp3) - (tmp4 * tmp5); + tmp439 = (tmp4 * tmp3) + (tmp2 * tmp5); + } + { + fftw_real tmp9; + fftw_real tmp11; + fftw_real tmp8; + fftw_real tmp10; + ASSERT_ALIGNED_DOUBLE; + tmp9 = c_re(inout[8 * iostride]); + tmp11 = c_im(inout[8 * iostride]); + tmp8 = c_re(W[7]); + tmp10 = c_im(W[7]); + tmp12 = (tmp8 * tmp9) - (tmp10 * tmp11); + tmp188 = (tmp10 * tmp9) + (tmp8 * tmp11); + } + { + fftw_real tmp14; + fftw_real tmp16; + fftw_real tmp13; + fftw_real tmp15; + ASSERT_ALIGNED_DOUBLE; + tmp14 = c_re(inout[24 * iostride]); + tmp16 = c_im(inout[24 * iostride]); + tmp13 = c_re(W[23]); + tmp15 = c_im(W[23]); + tmp17 = (tmp13 * tmp14) - (tmp15 * tmp16); + tmp189 = (tmp15 * tmp14) + (tmp13 * tmp16); + } + { + fftw_real tmp7; + fftw_real tmp18; + fftw_real tmp470; + fftw_real tmp471; + ASSERT_ALIGNED_DOUBLE; + tmp7 = tmp1 + tmp6; + tmp18 = tmp12 + tmp17; + tmp19 = tmp7 + tmp18; + tmp351 = tmp7 - tmp18; + tmp470 = tmp440 - tmp439; + tmp471 = tmp12 - tmp17; + tmp472 = tmp470 - tmp471; + tmp486 = tmp471 + tmp470; + } + { + fftw_real tmp438; + fftw_real tmp441; + fftw_real tmp187; + fftw_real tmp190; + ASSERT_ALIGNED_DOUBLE; + tmp438 = tmp188 + tmp189; + tmp441 = tmp439 + tmp440; + tmp442 = tmp438 + tmp441; + tmp456 = tmp441 - tmp438; + tmp187 = tmp1 - tmp6; + tmp190 = tmp188 - tmp189; + tmp191 = tmp187 - tmp190; + tmp303 = tmp187 + tmp190; + } + } + { + fftw_real tmp143; + fftw_real tmp272; + fftw_real tmp159; + fftw_real tmp257; + fftw_real tmp148; + fftw_real tmp273; + fftw_real tmp154; + fftw_real tmp256; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp140; + fftw_real tmp142; + fftw_real tmp139; + fftw_real tmp141; + ASSERT_ALIGNED_DOUBLE; + tmp140 = c_re(inout[31 * iostride]); + tmp142 = c_im(inout[31 * iostride]); + tmp139 = c_re(W[30]); + tmp141 = c_im(W[30]); + tmp143 = (tmp139 * tmp140) - (tmp141 * tmp142); + tmp272 = (tmp141 * tmp140) + (tmp139 * tmp142); + } + { + fftw_real tmp156; + fftw_real tmp158; + fftw_real tmp155; + fftw_real tmp157; + ASSERT_ALIGNED_DOUBLE; + tmp156 = c_re(inout[23 * iostride]); + tmp158 = c_im(inout[23 * iostride]); + tmp155 = c_re(W[22]); + tmp157 = c_im(W[22]); + tmp159 = (tmp155 * tmp156) - (tmp157 * tmp158); + tmp257 = (tmp157 * tmp156) + (tmp155 * tmp158); + } + { + fftw_real tmp145; + fftw_real tmp147; + fftw_real tmp144; + fftw_real tmp146; + ASSERT_ALIGNED_DOUBLE; + tmp145 = c_re(inout[15 * iostride]); + tmp147 = c_im(inout[15 * iostride]); + tmp144 = c_re(W[14]); + tmp146 = c_im(W[14]); + tmp148 = (tmp144 * tmp145) - (tmp146 * tmp147); + tmp273 = (tmp146 * tmp145) + (tmp144 * tmp147); + } + { + fftw_real tmp151; + fftw_real tmp153; + fftw_real tmp150; + fftw_real tmp152; + ASSERT_ALIGNED_DOUBLE; + tmp151 = c_re(inout[7 * iostride]); + tmp153 = c_im(inout[7 * iostride]); + tmp150 = c_re(W[6]); + tmp152 = c_im(W[6]); + tmp154 = (tmp150 * tmp151) - (tmp152 * tmp153); + tmp256 = (tmp152 * tmp151) + (tmp150 * tmp153); + } + { + fftw_real tmp149; + fftw_real tmp160; + fftw_real tmp274; + fftw_real tmp275; + ASSERT_ALIGNED_DOUBLE; + tmp149 = tmp143 + tmp148; + tmp160 = tmp154 + tmp159; + tmp161 = tmp149 + tmp160; + tmp379 = tmp149 - tmp160; + tmp274 = tmp272 - tmp273; + tmp275 = tmp154 - tmp159; + tmp276 = tmp274 + tmp275; + tmp326 = tmp274 - tmp275; + } + { + fftw_real tmp384; + fftw_real tmp385; + fftw_real tmp255; + fftw_real tmp258; + ASSERT_ALIGNED_DOUBLE; + tmp384 = tmp272 + tmp273; + tmp385 = tmp256 + tmp257; + tmp386 = tmp384 - tmp385; + tmp422 = tmp384 + tmp385; + tmp255 = tmp143 - tmp148; + tmp258 = tmp256 - tmp257; + tmp259 = tmp255 - tmp258; + tmp323 = tmp255 + tmp258; + } + } + { + fftw_real tmp24; + fftw_real tmp192; + fftw_real tmp40; + fftw_real tmp199; + fftw_real tmp29; + fftw_real tmp193; + fftw_real tmp35; + fftw_real tmp198; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp21; + fftw_real tmp23; + fftw_real tmp20; + fftw_real tmp22; + ASSERT_ALIGNED_DOUBLE; + tmp21 = c_re(inout[4 * iostride]); + tmp23 = c_im(inout[4 * iostride]); + tmp20 = c_re(W[3]); + tmp22 = c_im(W[3]); + tmp24 = (tmp20 * tmp21) - (tmp22 * tmp23); + tmp192 = (tmp22 * tmp21) + (tmp20 * tmp23); + } + { + fftw_real tmp37; + fftw_real tmp39; + fftw_real tmp36; + fftw_real tmp38; + ASSERT_ALIGNED_DOUBLE; + tmp37 = c_re(inout[12 * iostride]); + tmp39 = c_im(inout[12 * iostride]); + tmp36 = c_re(W[11]); + tmp38 = c_im(W[11]); + tmp40 = (tmp36 * tmp37) - (tmp38 * tmp39); + tmp199 = (tmp38 * tmp37) + (tmp36 * tmp39); + } + { + fftw_real tmp26; + fftw_real tmp28; + fftw_real tmp25; + fftw_real tmp27; + ASSERT_ALIGNED_DOUBLE; + tmp26 = c_re(inout[20 * iostride]); + tmp28 = c_im(inout[20 * iostride]); + tmp25 = c_re(W[19]); + tmp27 = c_im(W[19]); + tmp29 = (tmp25 * tmp26) - (tmp27 * tmp28); + tmp193 = (tmp27 * tmp26) + (tmp25 * tmp28); + } + { + fftw_real tmp32; + fftw_real tmp34; + fftw_real tmp31; + fftw_real tmp33; + ASSERT_ALIGNED_DOUBLE; + tmp32 = c_re(inout[28 * iostride]); + tmp34 = c_im(inout[28 * iostride]); + tmp31 = c_re(W[27]); + tmp33 = c_im(W[27]); + tmp35 = (tmp31 * tmp32) - (tmp33 * tmp34); + tmp198 = (tmp33 * tmp32) + (tmp31 * tmp34); + } + { + fftw_real tmp30; + fftw_real tmp41; + fftw_real tmp197; + fftw_real tmp200; + ASSERT_ALIGNED_DOUBLE; + tmp30 = tmp24 + tmp29; + tmp41 = tmp35 + tmp40; + tmp42 = tmp30 + tmp41; + tmp455 = tmp41 - tmp30; + tmp197 = tmp35 - tmp40; + tmp200 = tmp198 - tmp199; + tmp201 = tmp197 + tmp200; + tmp305 = tmp197 - tmp200; + } + { + fftw_real tmp352; + fftw_real tmp353; + fftw_real tmp194; + fftw_real tmp195; + ASSERT_ALIGNED_DOUBLE; + tmp352 = tmp192 + tmp193; + tmp353 = tmp198 + tmp199; + tmp354 = tmp352 - tmp353; + tmp437 = tmp352 + tmp353; + tmp194 = tmp192 - tmp193; + tmp195 = tmp24 - tmp29; + tmp196 = tmp194 - tmp195; + tmp304 = tmp195 + tmp194; + } + } + { + fftw_real tmp166; + fftw_real tmp260; + fftw_real tmp171; + fftw_real tmp261; + fftw_real tmp262; + fftw_real tmp263; + fftw_real tmp177; + fftw_real tmp266; + fftw_real tmp182; + fftw_real tmp267; + fftw_real tmp265; + fftw_real tmp268; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp163; + fftw_real tmp165; + fftw_real tmp162; + fftw_real tmp164; + ASSERT_ALIGNED_DOUBLE; + tmp163 = c_re(inout[3 * iostride]); + tmp165 = c_im(inout[3 * iostride]); + tmp162 = c_re(W[2]); + tmp164 = c_im(W[2]); + tmp166 = (tmp162 * tmp163) - (tmp164 * tmp165); + tmp260 = (tmp164 * tmp163) + (tmp162 * tmp165); + } + { + fftw_real tmp168; + fftw_real tmp170; + fftw_real tmp167; + fftw_real tmp169; + ASSERT_ALIGNED_DOUBLE; + tmp168 = c_re(inout[19 * iostride]); + tmp170 = c_im(inout[19 * iostride]); + tmp167 = c_re(W[18]); + tmp169 = c_im(W[18]); + tmp171 = (tmp167 * tmp168) - (tmp169 * tmp170); + tmp261 = (tmp169 * tmp168) + (tmp167 * tmp170); + } + tmp262 = tmp260 - tmp261; + tmp263 = tmp166 - tmp171; + { + fftw_real tmp174; + fftw_real tmp176; + fftw_real tmp173; + fftw_real tmp175; + ASSERT_ALIGNED_DOUBLE; + tmp174 = c_re(inout[27 * iostride]); + tmp176 = c_im(inout[27 * iostride]); + tmp173 = c_re(W[26]); + tmp175 = c_im(W[26]); + tmp177 = (tmp173 * tmp174) - (tmp175 * tmp176); + tmp266 = (tmp175 * tmp174) + (tmp173 * tmp176); + } + { + fftw_real tmp179; + fftw_real tmp181; + fftw_real tmp178; + fftw_real tmp180; + ASSERT_ALIGNED_DOUBLE; + tmp179 = c_re(inout[11 * iostride]); + tmp181 = c_im(inout[11 * iostride]); + tmp178 = c_re(W[10]); + tmp180 = c_im(W[10]); + tmp182 = (tmp178 * tmp179) - (tmp180 * tmp181); + tmp267 = (tmp180 * tmp179) + (tmp178 * tmp181); + } + tmp265 = tmp177 - tmp182; + tmp268 = tmp266 - tmp267; + { + fftw_real tmp172; + fftw_real tmp183; + fftw_real tmp380; + fftw_real tmp381; + ASSERT_ALIGNED_DOUBLE; + tmp172 = tmp166 + tmp171; + tmp183 = tmp177 + tmp182; + tmp184 = tmp172 + tmp183; + tmp387 = tmp183 - tmp172; + tmp380 = tmp260 + tmp261; + tmp381 = tmp266 + tmp267; + tmp382 = tmp380 - tmp381; + tmp423 = tmp380 + tmp381; + } + { + fftw_real tmp264; + fftw_real tmp269; + fftw_real tmp277; + fftw_real tmp278; + ASSERT_ALIGNED_DOUBLE; + tmp264 = tmp262 - tmp263; + tmp269 = tmp265 + tmp268; + tmp270 = K707106781 * (tmp264 - tmp269); + tmp327 = K707106781 * (tmp264 + tmp269); + tmp277 = tmp265 - tmp268; + tmp278 = tmp263 + tmp262; + tmp279 = K707106781 * (tmp277 - tmp278); + tmp324 = K707106781 * (tmp278 + tmp277); + } + } + { + fftw_real tmp48; + fftw_real tmp204; + fftw_real tmp64; + fftw_real tmp211; + fftw_real tmp53; + fftw_real tmp205; + fftw_real tmp59; + fftw_real tmp210; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp45; + fftw_real tmp47; + fftw_real tmp44; + fftw_real tmp46; + ASSERT_ALIGNED_DOUBLE; + tmp45 = c_re(inout[2 * iostride]); + tmp47 = c_im(inout[2 * iostride]); + tmp44 = c_re(W[1]); + tmp46 = c_im(W[1]); + tmp48 = (tmp44 * tmp45) - (tmp46 * tmp47); + tmp204 = (tmp46 * tmp45) + (tmp44 * tmp47); + } + { + fftw_real tmp61; + fftw_real tmp63; + fftw_real tmp60; + fftw_real tmp62; + ASSERT_ALIGNED_DOUBLE; + tmp61 = c_re(inout[26 * iostride]); + tmp63 = c_im(inout[26 * iostride]); + tmp60 = c_re(W[25]); + tmp62 = c_im(W[25]); + tmp64 = (tmp60 * tmp61) - (tmp62 * tmp63); + tmp211 = (tmp62 * tmp61) + (tmp60 * tmp63); + } + { + fftw_real tmp50; + fftw_real tmp52; + fftw_real tmp49; + fftw_real tmp51; + ASSERT_ALIGNED_DOUBLE; + tmp50 = c_re(inout[18 * iostride]); + tmp52 = c_im(inout[18 * iostride]); + tmp49 = c_re(W[17]); + tmp51 = c_im(W[17]); + tmp53 = (tmp49 * tmp50) - (tmp51 * tmp52); + tmp205 = (tmp51 * tmp50) + (tmp49 * tmp52); + } + { + fftw_real tmp56; + fftw_real tmp58; + fftw_real tmp55; + fftw_real tmp57; + ASSERT_ALIGNED_DOUBLE; + tmp56 = c_re(inout[10 * iostride]); + tmp58 = c_im(inout[10 * iostride]); + tmp55 = c_re(W[9]); + tmp57 = c_im(W[9]); + tmp59 = (tmp55 * tmp56) - (tmp57 * tmp58); + tmp210 = (tmp57 * tmp56) + (tmp55 * tmp58); + } + { + fftw_real tmp54; + fftw_real tmp65; + fftw_real tmp209; + fftw_real tmp212; + ASSERT_ALIGNED_DOUBLE; + tmp54 = tmp48 + tmp53; + tmp65 = tmp59 + tmp64; + tmp66 = tmp54 + tmp65; + tmp359 = tmp54 - tmp65; + tmp209 = tmp48 - tmp53; + tmp212 = tmp210 - tmp211; + tmp213 = tmp209 - tmp212; + tmp309 = tmp209 + tmp212; + } + { + fftw_real tmp356; + fftw_real tmp357; + fftw_real tmp206; + fftw_real tmp207; + ASSERT_ALIGNED_DOUBLE; + tmp356 = tmp204 + tmp205; + tmp357 = tmp210 + tmp211; + tmp358 = tmp356 - tmp357; + tmp412 = tmp356 + tmp357; + tmp206 = tmp204 - tmp205; + tmp207 = tmp59 - tmp64; + tmp208 = tmp206 + tmp207; + tmp308 = tmp206 - tmp207; + } + } + { + fftw_real tmp96; + fftw_real tmp228; + fftw_real tmp112; + fftw_real tmp247; + fftw_real tmp101; + fftw_real tmp229; + fftw_real tmp107; + fftw_real tmp246; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp93; + fftw_real tmp95; + fftw_real tmp92; + fftw_real tmp94; + ASSERT_ALIGNED_DOUBLE; + tmp93 = c_re(inout[iostride]); + tmp95 = c_im(inout[iostride]); + tmp92 = c_re(W[0]); + tmp94 = c_im(W[0]); + tmp96 = (tmp92 * tmp93) - (tmp94 * tmp95); + tmp228 = (tmp94 * tmp93) + (tmp92 * tmp95); + } + { + fftw_real tmp109; + fftw_real tmp111; + fftw_real tmp108; + fftw_real tmp110; + ASSERT_ALIGNED_DOUBLE; + tmp109 = c_re(inout[25 * iostride]); + tmp111 = c_im(inout[25 * iostride]); + tmp108 = c_re(W[24]); + tmp110 = c_im(W[24]); + tmp112 = (tmp108 * tmp109) - (tmp110 * tmp111); + tmp247 = (tmp110 * tmp109) + (tmp108 * tmp111); + } + { + fftw_real tmp98; + fftw_real tmp100; + fftw_real tmp97; + fftw_real tmp99; + ASSERT_ALIGNED_DOUBLE; + tmp98 = c_re(inout[17 * iostride]); + tmp100 = c_im(inout[17 * iostride]); + tmp97 = c_re(W[16]); + tmp99 = c_im(W[16]); + tmp101 = (tmp97 * tmp98) - (tmp99 * tmp100); + tmp229 = (tmp99 * tmp98) + (tmp97 * tmp100); + } + { + fftw_real tmp104; + fftw_real tmp106; + fftw_real tmp103; + fftw_real tmp105; + ASSERT_ALIGNED_DOUBLE; + tmp104 = c_re(inout[9 * iostride]); + tmp106 = c_im(inout[9 * iostride]); + tmp103 = c_re(W[8]); + tmp105 = c_im(W[8]); + tmp107 = (tmp103 * tmp104) - (tmp105 * tmp106); + tmp246 = (tmp105 * tmp104) + (tmp103 * tmp106); + } + { + fftw_real tmp102; + fftw_real tmp113; + fftw_real tmp245; + fftw_real tmp248; + ASSERT_ALIGNED_DOUBLE; + tmp102 = tmp96 + tmp101; + tmp113 = tmp107 + tmp112; + tmp114 = tmp102 + tmp113; + tmp373 = tmp102 - tmp113; + tmp245 = tmp96 - tmp101; + tmp248 = tmp246 - tmp247; + tmp249 = tmp245 - tmp248; + tmp316 = tmp245 + tmp248; + } + { + fftw_real tmp368; + fftw_real tmp369; + fftw_real tmp230; + fftw_real tmp231; + ASSERT_ALIGNED_DOUBLE; + tmp368 = tmp228 + tmp229; + tmp369 = tmp246 + tmp247; + tmp370 = tmp368 - tmp369; + tmp417 = tmp368 + tmp369; + tmp230 = tmp228 - tmp229; + tmp231 = tmp107 - tmp112; + tmp232 = tmp230 + tmp231; + tmp319 = tmp230 - tmp231; + } + } + { + fftw_real tmp71; + fftw_real tmp215; + fftw_real tmp87; + fftw_real tmp222; + fftw_real tmp76; + fftw_real tmp216; + fftw_real tmp82; + fftw_real tmp221; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp68; + fftw_real tmp70; + fftw_real tmp67; + fftw_real tmp69; + ASSERT_ALIGNED_DOUBLE; + tmp68 = c_re(inout[30 * iostride]); + tmp70 = c_im(inout[30 * iostride]); + tmp67 = c_re(W[29]); + tmp69 = c_im(W[29]); + tmp71 = (tmp67 * tmp68) - (tmp69 * tmp70); + tmp215 = (tmp69 * tmp68) + (tmp67 * tmp70); + } + { + fftw_real tmp84; + fftw_real tmp86; + fftw_real tmp83; + fftw_real tmp85; + ASSERT_ALIGNED_DOUBLE; + tmp84 = c_re(inout[22 * iostride]); + tmp86 = c_im(inout[22 * iostride]); + tmp83 = c_re(W[21]); + tmp85 = c_im(W[21]); + tmp87 = (tmp83 * tmp84) - (tmp85 * tmp86); + tmp222 = (tmp85 * tmp84) + (tmp83 * tmp86); + } + { + fftw_real tmp73; + fftw_real tmp75; + fftw_real tmp72; + fftw_real tmp74; + ASSERT_ALIGNED_DOUBLE; + tmp73 = c_re(inout[14 * iostride]); + tmp75 = c_im(inout[14 * iostride]); + tmp72 = c_re(W[13]); + tmp74 = c_im(W[13]); + tmp76 = (tmp72 * tmp73) - (tmp74 * tmp75); + tmp216 = (tmp74 * tmp73) + (tmp72 * tmp75); + } + { + fftw_real tmp79; + fftw_real tmp81; + fftw_real tmp78; + fftw_real tmp80; + ASSERT_ALIGNED_DOUBLE; + tmp79 = c_re(inout[6 * iostride]); + tmp81 = c_im(inout[6 * iostride]); + tmp78 = c_re(W[5]); + tmp80 = c_im(W[5]); + tmp82 = (tmp78 * tmp79) - (tmp80 * tmp81); + tmp221 = (tmp80 * tmp79) + (tmp78 * tmp81); + } + { + fftw_real tmp77; + fftw_real tmp88; + fftw_real tmp220; + fftw_real tmp223; + ASSERT_ALIGNED_DOUBLE; + tmp77 = tmp71 + tmp76; + tmp88 = tmp82 + tmp87; + tmp89 = tmp77 + tmp88; + tmp361 = tmp77 - tmp88; + tmp220 = tmp71 - tmp76; + tmp223 = tmp221 - tmp222; + tmp224 = tmp220 - tmp223; + tmp312 = tmp220 + tmp223; + } + { + fftw_real tmp362; + fftw_real tmp363; + fftw_real tmp217; + fftw_real tmp218; + ASSERT_ALIGNED_DOUBLE; + tmp362 = tmp215 + tmp216; + tmp363 = tmp221 + tmp222; + tmp364 = tmp362 - tmp363; + tmp413 = tmp362 + tmp363; + tmp217 = tmp215 - tmp216; + tmp218 = tmp82 - tmp87; + tmp219 = tmp217 + tmp218; + tmp311 = tmp217 - tmp218; + } + } + { + fftw_real tmp119; + fftw_real tmp239; + fftw_real tmp124; + fftw_real tmp240; + fftw_real tmp238; + fftw_real tmp241; + fftw_real tmp130; + fftw_real tmp234; + fftw_real tmp135; + fftw_real tmp235; + fftw_real tmp233; + fftw_real tmp236; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp116; + fftw_real tmp118; + fftw_real tmp115; + fftw_real tmp117; + ASSERT_ALIGNED_DOUBLE; + tmp116 = c_re(inout[5 * iostride]); + tmp118 = c_im(inout[5 * iostride]); + tmp115 = c_re(W[4]); + tmp117 = c_im(W[4]); + tmp119 = (tmp115 * tmp116) - (tmp117 * tmp118); + tmp239 = (tmp117 * tmp116) + (tmp115 * tmp118); + } + { + fftw_real tmp121; + fftw_real tmp123; + fftw_real tmp120; + fftw_real tmp122; + ASSERT_ALIGNED_DOUBLE; + tmp121 = c_re(inout[21 * iostride]); + tmp123 = c_im(inout[21 * iostride]); + tmp120 = c_re(W[20]); + tmp122 = c_im(W[20]); + tmp124 = (tmp120 * tmp121) - (tmp122 * tmp123); + tmp240 = (tmp122 * tmp121) + (tmp120 * tmp123); + } + tmp238 = tmp119 - tmp124; + tmp241 = tmp239 - tmp240; + { + fftw_real tmp127; + fftw_real tmp129; + fftw_real tmp126; + fftw_real tmp128; + ASSERT_ALIGNED_DOUBLE; + tmp127 = c_re(inout[29 * iostride]); + tmp129 = c_im(inout[29 * iostride]); + tmp126 = c_re(W[28]); + tmp128 = c_im(W[28]); + tmp130 = (tmp126 * tmp127) - (tmp128 * tmp129); + tmp234 = (tmp128 * tmp127) + (tmp126 * tmp129); + } + { + fftw_real tmp132; + fftw_real tmp134; + fftw_real tmp131; + fftw_real tmp133; + ASSERT_ALIGNED_DOUBLE; + tmp132 = c_re(inout[13 * iostride]); + tmp134 = c_im(inout[13 * iostride]); + tmp131 = c_re(W[12]); + tmp133 = c_im(W[12]); + tmp135 = (tmp131 * tmp132) - (tmp133 * tmp134); + tmp235 = (tmp133 * tmp132) + (tmp131 * tmp134); + } + tmp233 = tmp130 - tmp135; + tmp236 = tmp234 - tmp235; + { + fftw_real tmp125; + fftw_real tmp136; + fftw_real tmp374; + fftw_real tmp375; + ASSERT_ALIGNED_DOUBLE; + tmp125 = tmp119 + tmp124; + tmp136 = tmp130 + tmp135; + tmp137 = tmp125 + tmp136; + tmp371 = tmp136 - tmp125; + tmp374 = tmp239 + tmp240; + tmp375 = tmp234 + tmp235; + tmp376 = tmp374 - tmp375; + tmp418 = tmp374 + tmp375; + } + { + fftw_real tmp237; + fftw_real tmp242; + fftw_real tmp250; + fftw_real tmp251; + ASSERT_ALIGNED_DOUBLE; + tmp237 = tmp233 - tmp236; + tmp242 = tmp238 + tmp241; + tmp243 = K707106781 * (tmp237 - tmp242); + tmp317 = K707106781 * (tmp242 + tmp237); + tmp250 = tmp241 - tmp238; + tmp251 = tmp233 + tmp236; + tmp252 = K707106781 * (tmp250 - tmp251); + tmp320 = K707106781 * (tmp250 + tmp251); + } + } + { + fftw_real tmp91; + fftw_real tmp431; + fftw_real tmp444; + fftw_real tmp446; + fftw_real tmp186; + fftw_real tmp445; + fftw_real tmp434; + fftw_real tmp435; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp43; + fftw_real tmp90; + fftw_real tmp436; + fftw_real tmp443; + ASSERT_ALIGNED_DOUBLE; + tmp43 = tmp19 + tmp42; + tmp90 = tmp66 + tmp89; + tmp91 = tmp43 + tmp90; + tmp431 = tmp43 - tmp90; + tmp436 = tmp412 + tmp413; + tmp443 = tmp437 + tmp442; + tmp444 = tmp436 + tmp443; + tmp446 = tmp443 - tmp436; + } + { + fftw_real tmp138; + fftw_real tmp185; + fftw_real tmp432; + fftw_real tmp433; + ASSERT_ALIGNED_DOUBLE; + tmp138 = tmp114 + tmp137; + tmp185 = tmp161 + tmp184; + tmp186 = tmp138 + tmp185; + tmp445 = tmp185 - tmp138; + tmp432 = tmp417 + tmp418; + tmp433 = tmp422 + tmp423; + tmp434 = tmp432 - tmp433; + tmp435 = tmp432 + tmp433; + } + c_re(inout[16 * iostride]) = tmp91 - tmp186; + c_re(inout[0]) = tmp91 + tmp186; + c_re(inout[24 * iostride]) = tmp431 - tmp434; + c_re(inout[8 * iostride]) = tmp431 + tmp434; + c_im(inout[0]) = tmp435 + tmp444; + c_im(inout[16 * iostride]) = tmp444 - tmp435; + c_im(inout[8 * iostride]) = tmp445 + tmp446; + c_im(inout[24 * iostride]) = tmp446 - tmp445; + } + { + fftw_real tmp415; + fftw_real tmp427; + fftw_real tmp450; + fftw_real tmp452; + fftw_real tmp420; + fftw_real tmp428; + fftw_real tmp425; + fftw_real tmp429; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp411; + fftw_real tmp414; + fftw_real tmp448; + fftw_real tmp449; + ASSERT_ALIGNED_DOUBLE; + tmp411 = tmp19 - tmp42; + tmp414 = tmp412 - tmp413; + tmp415 = tmp411 + tmp414; + tmp427 = tmp411 - tmp414; + tmp448 = tmp89 - tmp66; + tmp449 = tmp442 - tmp437; + tmp450 = tmp448 + tmp449; + tmp452 = tmp449 - tmp448; + } + { + fftw_real tmp416; + fftw_real tmp419; + fftw_real tmp421; + fftw_real tmp424; + ASSERT_ALIGNED_DOUBLE; + tmp416 = tmp114 - tmp137; + tmp419 = tmp417 - tmp418; + tmp420 = tmp416 + tmp419; + tmp428 = tmp419 - tmp416; + tmp421 = tmp161 - tmp184; + tmp424 = tmp422 - tmp423; + tmp425 = tmp421 - tmp424; + tmp429 = tmp421 + tmp424; + } + { + fftw_real tmp426; + fftw_real tmp451; + fftw_real tmp430; + fftw_real tmp447; + ASSERT_ALIGNED_DOUBLE; + tmp426 = K707106781 * (tmp420 + tmp425); + c_re(inout[20 * iostride]) = tmp415 - tmp426; + c_re(inout[4 * iostride]) = tmp415 + tmp426; + tmp451 = K707106781 * (tmp425 - tmp420); + c_im(inout[12 * iostride]) = tmp451 + tmp452; + c_im(inout[28 * iostride]) = tmp452 - tmp451; + tmp430 = K707106781 * (tmp428 - tmp429); + c_re(inout[28 * iostride]) = tmp427 - tmp430; + c_re(inout[12 * iostride]) = tmp427 + tmp430; + tmp447 = K707106781 * (tmp428 + tmp429); + c_im(inout[4 * iostride]) = tmp447 + tmp450; + c_im(inout[20 * iostride]) = tmp450 - tmp447; + } + } + { + fftw_real tmp355; + fftw_real tmp395; + fftw_real tmp366; + fftw_real tmp454; + fftw_real tmp398; + fftw_real tmp462; + fftw_real tmp378; + fftw_real tmp392; + fftw_real tmp457; + fftw_real tmp463; + fftw_real tmp402; + fftw_real tmp408; + fftw_real tmp389; + fftw_real tmp393; + fftw_real tmp405; + fftw_real tmp409; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp360; + fftw_real tmp365; + fftw_real tmp400; + fftw_real tmp401; + ASSERT_ALIGNED_DOUBLE; + tmp355 = tmp351 - tmp354; + tmp395 = tmp351 + tmp354; + tmp360 = tmp358 - tmp359; + tmp365 = tmp361 + tmp364; + tmp366 = K707106781 * (tmp360 - tmp365); + tmp454 = K707106781 * (tmp360 + tmp365); + { + fftw_real tmp396; + fftw_real tmp397; + fftw_real tmp372; + fftw_real tmp377; + ASSERT_ALIGNED_DOUBLE; + tmp396 = tmp359 + tmp358; + tmp397 = tmp361 - tmp364; + tmp398 = K707106781 * (tmp396 + tmp397); + tmp462 = K707106781 * (tmp397 - tmp396); + tmp372 = tmp370 - tmp371; + tmp377 = tmp373 - tmp376; + tmp378 = (K923879532 * tmp372) + (K382683432 * tmp377); + tmp392 = (K382683432 * tmp372) - (K923879532 * tmp377); + } + tmp457 = tmp455 + tmp456; + tmp463 = tmp456 - tmp455; + tmp400 = tmp370 + tmp371; + tmp401 = tmp373 + tmp376; + tmp402 = (K382683432 * tmp400) + (K923879532 * tmp401); + tmp408 = (K923879532 * tmp400) - (K382683432 * tmp401); + { + fftw_real tmp383; + fftw_real tmp388; + fftw_real tmp403; + fftw_real tmp404; + ASSERT_ALIGNED_DOUBLE; + tmp383 = tmp379 - tmp382; + tmp388 = tmp386 - tmp387; + tmp389 = (K382683432 * tmp383) - (K923879532 * tmp388); + tmp393 = (K382683432 * tmp388) + (K923879532 * tmp383); + tmp403 = tmp379 + tmp382; + tmp404 = tmp386 + tmp387; + tmp405 = (K923879532 * tmp403) - (K382683432 * tmp404); + tmp409 = (K923879532 * tmp404) + (K382683432 * tmp403); + } + } + { + fftw_real tmp367; + fftw_real tmp390; + fftw_real tmp391; + fftw_real tmp394; + ASSERT_ALIGNED_DOUBLE; + tmp367 = tmp355 + tmp366; + tmp390 = tmp378 + tmp389; + c_re(inout[22 * iostride]) = tmp367 - tmp390; + c_re(inout[6 * iostride]) = tmp367 + tmp390; + tmp391 = tmp355 - tmp366; + tmp394 = tmp392 - tmp393; + c_re(inout[30 * iostride]) = tmp391 - tmp394; + c_re(inout[14 * iostride]) = tmp391 + tmp394; + } + { + fftw_real tmp461; + fftw_real tmp464; + fftw_real tmp465; + fftw_real tmp466; + ASSERT_ALIGNED_DOUBLE; + tmp461 = tmp392 + tmp393; + tmp464 = tmp462 + tmp463; + c_im(inout[6 * iostride]) = tmp461 + tmp464; + c_im(inout[22 * iostride]) = tmp464 - tmp461; + tmp465 = tmp389 - tmp378; + tmp466 = tmp463 - tmp462; + c_im(inout[14 * iostride]) = tmp465 + tmp466; + c_im(inout[30 * iostride]) = tmp466 - tmp465; + } + { + fftw_real tmp399; + fftw_real tmp406; + fftw_real tmp407; + fftw_real tmp410; + ASSERT_ALIGNED_DOUBLE; + tmp399 = tmp395 + tmp398; + tmp406 = tmp402 + tmp405; + c_re(inout[18 * iostride]) = tmp399 - tmp406; + c_re(inout[2 * iostride]) = tmp399 + tmp406; + tmp407 = tmp395 - tmp398; + tmp410 = tmp408 - tmp409; + c_re(inout[26 * iostride]) = tmp407 - tmp410; + c_re(inout[10 * iostride]) = tmp407 + tmp410; + } + { + fftw_real tmp453; + fftw_real tmp458; + fftw_real tmp459; + fftw_real tmp460; + ASSERT_ALIGNED_DOUBLE; + tmp453 = tmp408 + tmp409; + tmp458 = tmp454 + tmp457; + c_im(inout[2 * iostride]) = tmp453 + tmp458; + c_im(inout[18 * iostride]) = tmp458 - tmp453; + tmp459 = tmp405 - tmp402; + tmp460 = tmp457 - tmp454; + c_im(inout[10 * iostride]) = tmp459 + tmp460; + c_im(inout[26 * iostride]) = tmp460 - tmp459; + } + } + { + fftw_real tmp307; + fftw_real tmp335; + fftw_real tmp338; + fftw_real tmp478; + fftw_real tmp473; + fftw_real tmp479; + fftw_real tmp314; + fftw_real tmp468; + fftw_real tmp322; + fftw_real tmp332; + fftw_real tmp342; + fftw_real tmp348; + fftw_real tmp329; + fftw_real tmp333; + fftw_real tmp345; + fftw_real tmp349; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp306; + fftw_real tmp336; + fftw_real tmp337; + fftw_real tmp469; + fftw_real tmp310; + fftw_real tmp313; + ASSERT_ALIGNED_DOUBLE; + tmp306 = K707106781 * (tmp304 + tmp305); + tmp307 = tmp303 - tmp306; + tmp335 = tmp303 + tmp306; + tmp336 = (K382683432 * tmp308) + (K923879532 * tmp309); + tmp337 = (K923879532 * tmp312) - (K382683432 * tmp311); + tmp338 = tmp336 + tmp337; + tmp478 = tmp337 - tmp336; + tmp469 = K707106781 * (tmp196 + tmp201); + tmp473 = tmp469 + tmp472; + tmp479 = tmp472 - tmp469; + tmp310 = (K923879532 * tmp308) - (K382683432 * tmp309); + tmp313 = (K923879532 * tmp311) + (K382683432 * tmp312); + tmp314 = tmp310 - tmp313; + tmp468 = tmp310 + tmp313; + } + { + fftw_real tmp318; + fftw_real tmp321; + fftw_real tmp340; + fftw_real tmp341; + ASSERT_ALIGNED_DOUBLE; + tmp318 = tmp316 - tmp317; + tmp321 = tmp319 - tmp320; + tmp322 = (K555570233 * tmp318) + (K831469612 * tmp321); + tmp332 = (K555570233 * tmp321) - (K831469612 * tmp318); + tmp340 = tmp316 + tmp317; + tmp341 = tmp319 + tmp320; + tmp342 = (K980785280 * tmp340) + (K195090322 * tmp341); + tmp348 = (K980785280 * tmp341) - (K195090322 * tmp340); + } + { + fftw_real tmp325; + fftw_real tmp328; + fftw_real tmp343; + fftw_real tmp344; + ASSERT_ALIGNED_DOUBLE; + tmp325 = tmp323 - tmp324; + tmp328 = tmp326 - tmp327; + tmp329 = (K555570233 * tmp325) - (K831469612 * tmp328); + tmp333 = (K831469612 * tmp325) + (K555570233 * tmp328); + tmp343 = tmp323 + tmp324; + tmp344 = tmp326 + tmp327; + tmp345 = (K980785280 * tmp343) - (K195090322 * tmp344); + tmp349 = (K195090322 * tmp343) + (K980785280 * tmp344); + } + { + fftw_real tmp315; + fftw_real tmp330; + fftw_real tmp331; + fftw_real tmp334; + ASSERT_ALIGNED_DOUBLE; + tmp315 = tmp307 + tmp314; + tmp330 = tmp322 + tmp329; + c_re(inout[21 * iostride]) = tmp315 - tmp330; + c_re(inout[5 * iostride]) = tmp315 + tmp330; + tmp331 = tmp307 - tmp314; + tmp334 = tmp332 - tmp333; + c_re(inout[29 * iostride]) = tmp331 - tmp334; + c_re(inout[13 * iostride]) = tmp331 + tmp334; + } + { + fftw_real tmp477; + fftw_real tmp480; + fftw_real tmp481; + fftw_real tmp482; + ASSERT_ALIGNED_DOUBLE; + tmp477 = tmp332 + tmp333; + tmp480 = tmp478 + tmp479; + c_im(inout[5 * iostride]) = tmp477 + tmp480; + c_im(inout[21 * iostride]) = tmp480 - tmp477; + tmp481 = tmp329 - tmp322; + tmp482 = tmp479 - tmp478; + c_im(inout[13 * iostride]) = tmp481 + tmp482; + c_im(inout[29 * iostride]) = tmp482 - tmp481; + } + { + fftw_real tmp339; + fftw_real tmp346; + fftw_real tmp347; + fftw_real tmp350; + ASSERT_ALIGNED_DOUBLE; + tmp339 = tmp335 + tmp338; + tmp346 = tmp342 + tmp345; + c_re(inout[17 * iostride]) = tmp339 - tmp346; + c_re(inout[iostride]) = tmp339 + tmp346; + tmp347 = tmp335 - tmp338; + tmp350 = tmp348 - tmp349; + c_re(inout[25 * iostride]) = tmp347 - tmp350; + c_re(inout[9 * iostride]) = tmp347 + tmp350; + } + { + fftw_real tmp467; + fftw_real tmp474; + fftw_real tmp475; + fftw_real tmp476; + ASSERT_ALIGNED_DOUBLE; + tmp467 = tmp348 + tmp349; + tmp474 = tmp468 + tmp473; + c_im(inout[iostride]) = tmp467 + tmp474; + c_im(inout[17 * iostride]) = tmp474 - tmp467; + tmp475 = tmp345 - tmp342; + tmp476 = tmp473 - tmp468; + c_im(inout[9 * iostride]) = tmp475 + tmp476; + c_im(inout[25 * iostride]) = tmp476 - tmp475; + } + } + { + fftw_real tmp203; + fftw_real tmp287; + fftw_real tmp290; + fftw_real tmp492; + fftw_real tmp487; + fftw_real tmp493; + fftw_real tmp226; + fftw_real tmp484; + fftw_real tmp254; + fftw_real tmp284; + fftw_real tmp294; + fftw_real tmp300; + fftw_real tmp281; + fftw_real tmp285; + fftw_real tmp297; + fftw_real tmp301; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp202; + fftw_real tmp288; + fftw_real tmp289; + fftw_real tmp485; + fftw_real tmp214; + fftw_real tmp225; + ASSERT_ALIGNED_DOUBLE; + tmp202 = K707106781 * (tmp196 - tmp201); + tmp203 = tmp191 - tmp202; + tmp287 = tmp191 + tmp202; + tmp288 = (K923879532 * tmp208) + (K382683432 * tmp213); + tmp289 = (K382683432 * tmp224) - (K923879532 * tmp219); + tmp290 = tmp288 + tmp289; + tmp492 = tmp289 - tmp288; + tmp485 = K707106781 * (tmp305 - tmp304); + tmp487 = tmp485 + tmp486; + tmp493 = tmp486 - tmp485; + tmp214 = (K382683432 * tmp208) - (K923879532 * tmp213); + tmp225 = (K382683432 * tmp219) + (K923879532 * tmp224); + tmp226 = tmp214 - tmp225; + tmp484 = tmp214 + tmp225; + } + { + fftw_real tmp244; + fftw_real tmp253; + fftw_real tmp292; + fftw_real tmp293; + ASSERT_ALIGNED_DOUBLE; + tmp244 = tmp232 - tmp243; + tmp253 = tmp249 - tmp252; + tmp254 = (K980785280 * tmp244) + (K195090322 * tmp253); + tmp284 = (K195090322 * tmp244) - (K980785280 * tmp253); + tmp292 = tmp232 + tmp243; + tmp293 = tmp249 + tmp252; + tmp294 = (K555570233 * tmp292) + (K831469612 * tmp293); + tmp300 = (K831469612 * tmp292) - (K555570233 * tmp293); + } + { + fftw_real tmp271; + fftw_real tmp280; + fftw_real tmp295; + fftw_real tmp296; + ASSERT_ALIGNED_DOUBLE; + tmp271 = tmp259 - tmp270; + tmp280 = tmp276 - tmp279; + tmp281 = (K195090322 * tmp271) - (K980785280 * tmp280); + tmp285 = (K195090322 * tmp280) + (K980785280 * tmp271); + tmp295 = tmp259 + tmp270; + tmp296 = tmp276 + tmp279; + tmp297 = (K831469612 * tmp295) - (K555570233 * tmp296); + tmp301 = (K831469612 * tmp296) + (K555570233 * tmp295); + } + { + fftw_real tmp227; + fftw_real tmp282; + fftw_real tmp283; + fftw_real tmp286; + ASSERT_ALIGNED_DOUBLE; + tmp227 = tmp203 + tmp226; + tmp282 = tmp254 + tmp281; + c_re(inout[23 * iostride]) = tmp227 - tmp282; + c_re(inout[7 * iostride]) = tmp227 + tmp282; + tmp283 = tmp203 - tmp226; + tmp286 = tmp284 - tmp285; + c_re(inout[31 * iostride]) = tmp283 - tmp286; + c_re(inout[15 * iostride]) = tmp283 + tmp286; + } + { + fftw_real tmp491; + fftw_real tmp494; + fftw_real tmp495; + fftw_real tmp496; + ASSERT_ALIGNED_DOUBLE; + tmp491 = tmp284 + tmp285; + tmp494 = tmp492 + tmp493; + c_im(inout[7 * iostride]) = tmp491 + tmp494; + c_im(inout[23 * iostride]) = tmp494 - tmp491; + tmp495 = tmp281 - tmp254; + tmp496 = tmp493 - tmp492; + c_im(inout[15 * iostride]) = tmp495 + tmp496; + c_im(inout[31 * iostride]) = tmp496 - tmp495; + } + { + fftw_real tmp291; + fftw_real tmp298; + fftw_real tmp299; + fftw_real tmp302; + ASSERT_ALIGNED_DOUBLE; + tmp291 = tmp287 + tmp290; + tmp298 = tmp294 + tmp297; + c_re(inout[19 * iostride]) = tmp291 - tmp298; + c_re(inout[3 * iostride]) = tmp291 + tmp298; + tmp299 = tmp287 - tmp290; + tmp302 = tmp300 - tmp301; + c_re(inout[27 * iostride]) = tmp299 - tmp302; + c_re(inout[11 * iostride]) = tmp299 + tmp302; + } + { + fftw_real tmp483; + fftw_real tmp488; + fftw_real tmp489; + fftw_real tmp490; + ASSERT_ALIGNED_DOUBLE; + tmp483 = tmp300 + tmp301; + tmp488 = tmp484 + tmp487; + c_im(inout[3 * iostride]) = tmp483 + tmp488; + c_im(inout[19 * iostride]) = tmp488 - tmp483; + tmp489 = tmp297 - tmp294; + tmp490 = tmp487 - tmp484; + c_im(inout[11 * iostride]) = tmp489 + tmp490; + c_im(inout[27 * iostride]) = tmp490 - tmp489; + } + } + } +} + +static const int twiddle_order[] = +{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31}; +fftw_codelet_desc fftw_twiddle_32_desc = +{ + "fftw_twiddle_32", + (void (*)()) fftw_twiddle_32, + 32, + FFTW_FORWARD, + FFTW_TWIDDLE, + 704, + 31, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/ftw_4.c b/src/sndobj/rfftw/ftw_4.c new file mode 100644 index 0000000..8c242b9 --- /dev/null +++ b/src/sndobj/rfftw/ftw_4.c @@ -0,0 +1,142 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:31 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddle 4 */ + +/* + * This function contains 22 FP additions, 12 FP multiplications, + * (or, 16 additions, 6 multiplications, 6 fused multiply/add), + * 14 stack variables, and 16 memory accesses + */ + +/* + * Generator Id's : + * $Id: ftw_4.c,v 1.1.1.1 2006/05/12 15:14:48 veplaini Exp $ + * $Id: ftw_4.c,v 1.1.1.1 2006/05/12 15:14:48 veplaini Exp $ + * $Id: ftw_4.c,v 1.1.1.1 2006/05/12 15:14:48 veplaini Exp $ + */ + +void fftw_twiddle_4(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_complex *inout; + inout = A; + for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 3) { + fftw_real tmp1; + fftw_real tmp25; + fftw_real tmp6; + fftw_real tmp24; + fftw_real tmp12; + fftw_real tmp20; + fftw_real tmp17; + fftw_real tmp21; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(inout[0]); + tmp25 = c_im(inout[0]); + { + fftw_real tmp3; + fftw_real tmp5; + fftw_real tmp2; + fftw_real tmp4; + ASSERT_ALIGNED_DOUBLE; + tmp3 = c_re(inout[2 * iostride]); + tmp5 = c_im(inout[2 * iostride]); + tmp2 = c_re(W[1]); + tmp4 = c_im(W[1]); + tmp6 = (tmp2 * tmp3) - (tmp4 * tmp5); + tmp24 = (tmp4 * tmp3) + (tmp2 * tmp5); + } + { + fftw_real tmp9; + fftw_real tmp11; + fftw_real tmp8; + fftw_real tmp10; + ASSERT_ALIGNED_DOUBLE; + tmp9 = c_re(inout[iostride]); + tmp11 = c_im(inout[iostride]); + tmp8 = c_re(W[0]); + tmp10 = c_im(W[0]); + tmp12 = (tmp8 * tmp9) - (tmp10 * tmp11); + tmp20 = (tmp10 * tmp9) + (tmp8 * tmp11); + } + { + fftw_real tmp14; + fftw_real tmp16; + fftw_real tmp13; + fftw_real tmp15; + ASSERT_ALIGNED_DOUBLE; + tmp14 = c_re(inout[3 * iostride]); + tmp16 = c_im(inout[3 * iostride]); + tmp13 = c_re(W[2]); + tmp15 = c_im(W[2]); + tmp17 = (tmp13 * tmp14) - (tmp15 * tmp16); + tmp21 = (tmp15 * tmp14) + (tmp13 * tmp16); + } + { + fftw_real tmp7; + fftw_real tmp18; + fftw_real tmp27; + fftw_real tmp28; + ASSERT_ALIGNED_DOUBLE; + tmp7 = tmp1 + tmp6; + tmp18 = tmp12 + tmp17; + c_re(inout[2 * iostride]) = tmp7 - tmp18; + c_re(inout[0]) = tmp7 + tmp18; + tmp27 = tmp25 - tmp24; + tmp28 = tmp12 - tmp17; + c_im(inout[iostride]) = tmp27 - tmp28; + c_im(inout[3 * iostride]) = tmp28 + tmp27; + } + { + fftw_real tmp23; + fftw_real tmp26; + fftw_real tmp19; + fftw_real tmp22; + ASSERT_ALIGNED_DOUBLE; + tmp23 = tmp20 + tmp21; + tmp26 = tmp24 + tmp25; + c_im(inout[0]) = tmp23 + tmp26; + c_im(inout[2 * iostride]) = tmp26 - tmp23; + tmp19 = tmp1 - tmp6; + tmp22 = tmp20 - tmp21; + c_re(inout[3 * iostride]) = tmp19 - tmp22; + c_re(inout[iostride]) = tmp19 + tmp22; + } + } +} + +static const int twiddle_order[] = +{1, 2, 3}; +fftw_codelet_desc fftw_twiddle_4_desc = +{ + "fftw_twiddle_4", + (void (*)()) fftw_twiddle_4, + 4, + FFTW_FORWARD, + FFTW_TWIDDLE, + 88, + 3, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/ftw_5.c b/src/sndobj/rfftw/ftw_5.c new file mode 100644 index 0000000..af67ce9 --- /dev/null +++ b/src/sndobj/rfftw/ftw_5.c @@ -0,0 +1,194 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:31 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddle 5 */ + +/* + * This function contains 40 FP additions, 28 FP multiplications, + * (or, 26 additions, 14 multiplications, 14 fused multiply/add), + * 26 stack variables, and 20 memory accesses + */ +static const fftw_real K250000000 = FFTW_KONST(+0.250000000000000000000000000000000000000000000); +static const fftw_real K559016994 = FFTW_KONST(+0.559016994374947424102293417182819058860154590); +static const fftw_real K587785252 = FFTW_KONST(+0.587785252292473129168705954639072768597652438); +static const fftw_real K951056516 = FFTW_KONST(+0.951056516295153572116439333379382143405698634); + +/* + * Generator Id's : + * $Id: ftw_5.c,v 1.1.1.1 2006/05/12 15:14:56 veplaini Exp $ + * $Id: ftw_5.c,v 1.1.1.1 2006/05/12 15:14:56 veplaini Exp $ + * $Id: ftw_5.c,v 1.1.1.1 2006/05/12 15:14:56 veplaini Exp $ + */ + +void fftw_twiddle_5(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_complex *inout; + inout = A; + for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 4) { + fftw_real tmp1; + fftw_real tmp40; + fftw_real tmp30; + fftw_real tmp33; + fftw_real tmp37; + fftw_real tmp38; + fftw_real tmp39; + fftw_real tmp45; + fftw_real tmp44; + fftw_real tmp12; + fftw_real tmp23; + fftw_real tmp24; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(inout[0]); + tmp40 = c_im(inout[0]); + { + fftw_real tmp6; + fftw_real tmp28; + fftw_real tmp22; + fftw_real tmp32; + fftw_real tmp11; + fftw_real tmp29; + fftw_real tmp17; + fftw_real tmp31; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp3; + fftw_real tmp5; + fftw_real tmp2; + fftw_real tmp4; + ASSERT_ALIGNED_DOUBLE; + tmp3 = c_re(inout[iostride]); + tmp5 = c_im(inout[iostride]); + tmp2 = c_re(W[0]); + tmp4 = c_im(W[0]); + tmp6 = (tmp2 * tmp3) - (tmp4 * tmp5); + tmp28 = (tmp4 * tmp3) + (tmp2 * tmp5); + } + { + fftw_real tmp19; + fftw_real tmp21; + fftw_real tmp18; + fftw_real tmp20; + ASSERT_ALIGNED_DOUBLE; + tmp19 = c_re(inout[3 * iostride]); + tmp21 = c_im(inout[3 * iostride]); + tmp18 = c_re(W[2]); + tmp20 = c_im(W[2]); + tmp22 = (tmp18 * tmp19) - (tmp20 * tmp21); + tmp32 = (tmp20 * tmp19) + (tmp18 * tmp21); + } + { + fftw_real tmp8; + fftw_real tmp10; + fftw_real tmp7; + fftw_real tmp9; + ASSERT_ALIGNED_DOUBLE; + tmp8 = c_re(inout[4 * iostride]); + tmp10 = c_im(inout[4 * iostride]); + tmp7 = c_re(W[3]); + tmp9 = c_im(W[3]); + tmp11 = (tmp7 * tmp8) - (tmp9 * tmp10); + tmp29 = (tmp9 * tmp8) + (tmp7 * tmp10); + } + { + fftw_real tmp14; + fftw_real tmp16; + fftw_real tmp13; + fftw_real tmp15; + ASSERT_ALIGNED_DOUBLE; + tmp14 = c_re(inout[2 * iostride]); + tmp16 = c_im(inout[2 * iostride]); + tmp13 = c_re(W[1]); + tmp15 = c_im(W[1]); + tmp17 = (tmp13 * tmp14) - (tmp15 * tmp16); + tmp31 = (tmp15 * tmp14) + (tmp13 * tmp16); + } + tmp30 = tmp28 - tmp29; + tmp33 = tmp31 - tmp32; + tmp37 = tmp28 + tmp29; + tmp38 = tmp31 + tmp32; + tmp39 = tmp37 + tmp38; + tmp45 = tmp17 - tmp22; + tmp44 = tmp6 - tmp11; + tmp12 = tmp6 + tmp11; + tmp23 = tmp17 + tmp22; + tmp24 = tmp12 + tmp23; + } + c_re(inout[0]) = tmp1 + tmp24; + { + fftw_real tmp34; + fftw_real tmp36; + fftw_real tmp27; + fftw_real tmp35; + fftw_real tmp25; + fftw_real tmp26; + ASSERT_ALIGNED_DOUBLE; + tmp34 = (K951056516 * tmp30) + (K587785252 * tmp33); + tmp36 = (K951056516 * tmp33) - (K587785252 * tmp30); + tmp25 = K559016994 * (tmp12 - tmp23); + tmp26 = tmp1 - (K250000000 * tmp24); + tmp27 = tmp25 + tmp26; + tmp35 = tmp26 - tmp25; + c_re(inout[4 * iostride]) = tmp27 - tmp34; + c_re(inout[iostride]) = tmp27 + tmp34; + c_re(inout[2 * iostride]) = tmp35 - tmp36; + c_re(inout[3 * iostride]) = tmp35 + tmp36; + } + c_im(inout[0]) = tmp39 + tmp40; + { + fftw_real tmp46; + fftw_real tmp47; + fftw_real tmp43; + fftw_real tmp48; + fftw_real tmp41; + fftw_real tmp42; + ASSERT_ALIGNED_DOUBLE; + tmp46 = (K951056516 * tmp44) + (K587785252 * tmp45); + tmp47 = (K951056516 * tmp45) - (K587785252 * tmp44); + tmp41 = K559016994 * (tmp37 - tmp38); + tmp42 = tmp40 - (K250000000 * tmp39); + tmp43 = tmp41 + tmp42; + tmp48 = tmp42 - tmp41; + c_im(inout[iostride]) = tmp43 - tmp46; + c_im(inout[4 * iostride]) = tmp46 + tmp43; + c_im(inout[2 * iostride]) = tmp47 + tmp48; + c_im(inout[3 * iostride]) = tmp48 - tmp47; + } + } +} + +static const int twiddle_order[] = +{1, 2, 3, 4}; +fftw_codelet_desc fftw_twiddle_5_desc = +{ + "fftw_twiddle_5", + (void (*)()) fftw_twiddle_5, + 5, + FFTW_FORWARD, + FFTW_TWIDDLE, + 110, + 4, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/ftw_6.c b/src/sndobj/rfftw/ftw_6.c new file mode 100644 index 0000000..d239476 --- /dev/null +++ b/src/sndobj/rfftw/ftw_6.c @@ -0,0 +1,219 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:32 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddle 6 */ + +/* + * This function contains 46 FP additions, 28 FP multiplications, + * (or, 32 additions, 14 multiplications, 14 fused multiply/add), + * 22 stack variables, and 24 memory accesses + */ +static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); +static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); + +/* + * Generator Id's : + * $Id: ftw_6.c,v 1.1.1.1 2006/05/12 15:14:48 veplaini Exp $ + * $Id: ftw_6.c,v 1.1.1.1 2006/05/12 15:14:48 veplaini Exp $ + * $Id: ftw_6.c,v 1.1.1.1 2006/05/12 15:14:48 veplaini Exp $ + */ + +void fftw_twiddle_6(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_complex *inout; + inout = A; + for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 5) { + fftw_real tmp7; + fftw_real tmp31; + fftw_real tmp50; + fftw_real tmp54; + fftw_real tmp29; + fftw_real tmp33; + fftw_real tmp41; + fftw_real tmp45; + fftw_real tmp18; + fftw_real tmp32; + fftw_real tmp38; + fftw_real tmp44; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp49; + fftw_real tmp6; + fftw_real tmp48; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(inout[0]); + tmp49 = c_im(inout[0]); + { + fftw_real tmp3; + fftw_real tmp5; + fftw_real tmp2; + fftw_real tmp4; + ASSERT_ALIGNED_DOUBLE; + tmp3 = c_re(inout[3 * iostride]); + tmp5 = c_im(inout[3 * iostride]); + tmp2 = c_re(W[2]); + tmp4 = c_im(W[2]); + tmp6 = (tmp2 * tmp3) - (tmp4 * tmp5); + tmp48 = (tmp4 * tmp3) + (tmp2 * tmp5); + } + tmp7 = tmp1 - tmp6; + tmp31 = tmp1 + tmp6; + tmp50 = tmp48 + tmp49; + tmp54 = tmp49 - tmp48; + } + { + fftw_real tmp23; + fftw_real tmp39; + fftw_real tmp28; + fftw_real tmp40; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp20; + fftw_real tmp22; + fftw_real tmp19; + fftw_real tmp21; + ASSERT_ALIGNED_DOUBLE; + tmp20 = c_re(inout[4 * iostride]); + tmp22 = c_im(inout[4 * iostride]); + tmp19 = c_re(W[3]); + tmp21 = c_im(W[3]); + tmp23 = (tmp19 * tmp20) - (tmp21 * tmp22); + tmp39 = (tmp21 * tmp20) + (tmp19 * tmp22); + } + { + fftw_real tmp25; + fftw_real tmp27; + fftw_real tmp24; + fftw_real tmp26; + ASSERT_ALIGNED_DOUBLE; + tmp25 = c_re(inout[iostride]); + tmp27 = c_im(inout[iostride]); + tmp24 = c_re(W[0]); + tmp26 = c_im(W[0]); + tmp28 = (tmp24 * tmp25) - (tmp26 * tmp27); + tmp40 = (tmp26 * tmp25) + (tmp24 * tmp27); + } + tmp29 = tmp23 - tmp28; + tmp33 = tmp23 + tmp28; + tmp41 = tmp39 - tmp40; + tmp45 = tmp39 + tmp40; + } + { + fftw_real tmp12; + fftw_real tmp36; + fftw_real tmp17; + fftw_real tmp37; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp9; + fftw_real tmp11; + fftw_real tmp8; + fftw_real tmp10; + ASSERT_ALIGNED_DOUBLE; + tmp9 = c_re(inout[2 * iostride]); + tmp11 = c_im(inout[2 * iostride]); + tmp8 = c_re(W[1]); + tmp10 = c_im(W[1]); + tmp12 = (tmp8 * tmp9) - (tmp10 * tmp11); + tmp36 = (tmp10 * tmp9) + (tmp8 * tmp11); + } + { + fftw_real tmp14; + fftw_real tmp16; + fftw_real tmp13; + fftw_real tmp15; + ASSERT_ALIGNED_DOUBLE; + tmp14 = c_re(inout[5 * iostride]); + tmp16 = c_im(inout[5 * iostride]); + tmp13 = c_re(W[4]); + tmp15 = c_im(W[4]); + tmp17 = (tmp13 * tmp14) - (tmp15 * tmp16); + tmp37 = (tmp15 * tmp14) + (tmp13 * tmp16); + } + tmp18 = tmp12 - tmp17; + tmp32 = tmp12 + tmp17; + tmp38 = tmp36 - tmp37; + tmp44 = tmp36 + tmp37; + } + { + fftw_real tmp42; + fftw_real tmp30; + fftw_real tmp35; + fftw_real tmp53; + fftw_real tmp55; + fftw_real tmp56; + ASSERT_ALIGNED_DOUBLE; + tmp42 = K866025403 * (tmp38 - tmp41); + tmp30 = tmp18 + tmp29; + tmp35 = tmp7 - (K500000000 * tmp30); + c_re(inout[3 * iostride]) = tmp7 + tmp30; + c_re(inout[iostride]) = tmp35 + tmp42; + c_re(inout[5 * iostride]) = tmp35 - tmp42; + tmp53 = K866025403 * (tmp29 - tmp18); + tmp55 = tmp38 + tmp41; + tmp56 = tmp54 - (K500000000 * tmp55); + c_im(inout[iostride]) = tmp53 + tmp56; + c_im(inout[5 * iostride]) = tmp56 - tmp53; + c_im(inout[3 * iostride]) = tmp55 + tmp54; + } + { + fftw_real tmp46; + fftw_real tmp34; + fftw_real tmp43; + fftw_real tmp52; + fftw_real tmp47; + fftw_real tmp51; + ASSERT_ALIGNED_DOUBLE; + tmp46 = K866025403 * (tmp44 - tmp45); + tmp34 = tmp32 + tmp33; + tmp43 = tmp31 - (K500000000 * tmp34); + c_re(inout[0]) = tmp31 + tmp34; + c_re(inout[4 * iostride]) = tmp43 + tmp46; + c_re(inout[2 * iostride]) = tmp43 - tmp46; + tmp52 = K866025403 * (tmp33 - tmp32); + tmp47 = tmp44 + tmp45; + tmp51 = tmp50 - (K500000000 * tmp47); + c_im(inout[0]) = tmp47 + tmp50; + c_im(inout[4 * iostride]) = tmp52 + tmp51; + c_im(inout[2 * iostride]) = tmp51 - tmp52; + } + } +} + +static const int twiddle_order[] = +{1, 2, 3, 4, 5}; +fftw_codelet_desc fftw_twiddle_6_desc = +{ + "fftw_twiddle_6", + (void (*)()) fftw_twiddle_6, + 6, + FFTW_FORWARD, + FFTW_TWIDDLE, + 132, + 5, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/ftw_64.c b/src/sndobj/rfftw/ftw_64.c new file mode 100644 index 0000000..32a0e0b --- /dev/null +++ b/src/sndobj/rfftw/ftw_64.c @@ -0,0 +1,3146 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:39 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddle 64 */ + +/* + * This function contains 1038 FP additions, 500 FP multiplications, + * (or, 808 additions, 270 multiplications, 230 fused multiply/add), + * 162 stack variables, and 256 memory accesses + */ +static const fftw_real K290284677 = FFTW_KONST(+0.290284677254462367636192375817395274691476278); +static const fftw_real K956940335 = FFTW_KONST(+0.956940335732208864935797886980269969482849206); +static const fftw_real K881921264 = FFTW_KONST(+0.881921264348355029712756863660388349508442621); +static const fftw_real K471396736 = FFTW_KONST(+0.471396736825997648556387625905254377657460319); +static const fftw_real K555570233 = FFTW_KONST(+0.555570233019602224742830813948532874374937191); +static const fftw_real K831469612 = FFTW_KONST(+0.831469612302545237078788377617905756738560812); +static const fftw_real K773010453 = FFTW_KONST(+0.773010453362736960810906609758469800971041293); +static const fftw_real K634393284 = FFTW_KONST(+0.634393284163645498215171613225493370675687095); +static const fftw_real K098017140 = FFTW_KONST(+0.098017140329560601994195563888641845861136673); +static const fftw_real K995184726 = FFTW_KONST(+0.995184726672196886244836953109479921575474869); +static const fftw_real K980785280 = FFTW_KONST(+0.980785280403230449126182236134239036973933731); +static const fftw_real K195090322 = FFTW_KONST(+0.195090322016128267848284868477022240927691618); +static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); +static const fftw_real K923879532 = FFTW_KONST(+0.923879532511286756128183189396788286822416626); +static const fftw_real K382683432 = FFTW_KONST(+0.382683432365089771728459984030398866761344562); + +/* + * Generator Id's : + * $Id: ftw_64.c,v 1.1.1.1 2006/05/12 15:14:49 veplaini Exp $ + * $Id: ftw_64.c,v 1.1.1.1 2006/05/12 15:14:49 veplaini Exp $ + * $Id: ftw_64.c,v 1.1.1.1 2006/05/12 15:14:49 veplaini Exp $ + */ + +void fftw_twiddle_64(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_complex *inout; + inout = A; + for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 63) { + fftw_real tmp19; + fftw_real tmp791; + fftw_real tmp1109; + fftw_real tmp1139; + fftw_real tmp1047; + fftw_real tmp1077; + fftw_real tmp383; + fftw_real tmp655; + fftw_real tmp66; + fftw_real tmp800; + fftw_real tmp908; + fftw_real tmp956; + fftw_real tmp406; + fftw_real tmp608; + fftw_real tmp662; + fftw_real tmp744; + fftw_real tmp42; + fftw_real tmp1076; + fftw_real tmp794; + fftw_real tmp1042; + fftw_real tmp394; + fftw_real tmp1106; + fftw_real tmp658; + fftw_real tmp1138; + fftw_real tmp329; + fftw_real tmp983; + fftw_real tmp863; + fftw_real tmp927; + fftw_real tmp990; + fftw_real tmp1026; + fftw_real tmp880; + fftw_real tmp930; + fftw_real tmp535; + fftw_real tmp703; + fftw_real tmp576; + fftw_real tmp714; + fftw_real tmp579; + fftw_real tmp704; + fftw_real tmp546; + fftw_real tmp715; + fftw_real tmp376; + fftw_real tmp991; + fftw_real tmp868; + fftw_real tmp882; + fftw_real tmp986; + fftw_real tmp1027; + fftw_real tmp873; + fftw_real tmp881; + fftw_real tmp558; + fftw_real tmp582; + fftw_real tmp708; + fftw_real tmp718; + fftw_real tmp569; + fftw_real tmp581; + fftw_real tmp711; + fftw_real tmp717; + fftw_real tmp89; + fftw_real tmp805; + fftw_real tmp909; + fftw_real tmp957; + fftw_real tmp417; + fftw_real tmp609; + fftw_real tmp665; + fftw_real tmp745; + fftw_real tmp161; + fftw_real tmp184; + fftw_real tmp965; + fftw_real tmp823; + fftw_real tmp915; + fftw_real tmp966; + fftw_real tmp967; + fftw_real tmp968; + fftw_real tmp828; + fftw_real tmp916; + fftw_real tmp451; + fftw_real tmp678; + fftw_real tmp468; + fftw_real tmp675; + fftw_real tmp471; + fftw_real tmp679; + fftw_real tmp462; + fftw_real tmp676; + fftw_real tmp114; + fftw_real tmp137; + fftw_real tmp963; + fftw_real tmp812; + fftw_real tmp912; + fftw_real tmp960; + fftw_real tmp961; + fftw_real tmp962; + fftw_real tmp817; + fftw_real tmp913; + fftw_real tmp424; + fftw_real tmp668; + fftw_real tmp441; + fftw_real tmp671; + fftw_real tmp444; + fftw_real tmp669; + fftw_real tmp435; + fftw_real tmp672; + fftw_real tmp234; + fftw_real tmp977; + fftw_real tmp836; + fftw_real tmp923; + fftw_real tmp974; + fftw_real tmp1021; + fftw_real tmp853; + fftw_real tmp920; + fftw_real tmp480; + fftw_real tmp684; + fftw_real tmp521; + fftw_real tmp695; + fftw_real tmp524; + fftw_real tmp685; + fftw_real tmp491; + fftw_real tmp696; + fftw_real tmp281; + fftw_real tmp975; + fftw_real tmp841; + fftw_real tmp855; + fftw_real tmp980; + fftw_real tmp1022; + fftw_real tmp846; + fftw_real tmp854; + fftw_real tmp503; + fftw_real tmp527; + fftw_real tmp689; + fftw_real tmp699; + fftw_real tmp514; + fftw_real tmp526; + fftw_real tmp692; + fftw_real tmp698; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp1045; + fftw_real tmp6; + fftw_real tmp1044; + fftw_real tmp12; + fftw_real tmp380; + fftw_real tmp17; + fftw_real tmp381; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(inout[0]); + tmp1045 = c_im(inout[0]); + { + fftw_real tmp3; + fftw_real tmp5; + fftw_real tmp2; + fftw_real tmp4; + ASSERT_ALIGNED_DOUBLE; + tmp3 = c_re(inout[32 * iostride]); + tmp5 = c_im(inout[32 * iostride]); + tmp2 = c_re(W[31]); + tmp4 = c_im(W[31]); + tmp6 = (tmp2 * tmp3) - (tmp4 * tmp5); + tmp1044 = (tmp4 * tmp3) + (tmp2 * tmp5); + } + { + fftw_real tmp9; + fftw_real tmp11; + fftw_real tmp8; + fftw_real tmp10; + ASSERT_ALIGNED_DOUBLE; + tmp9 = c_re(inout[16 * iostride]); + tmp11 = c_im(inout[16 * iostride]); + tmp8 = c_re(W[15]); + tmp10 = c_im(W[15]); + tmp12 = (tmp8 * tmp9) - (tmp10 * tmp11); + tmp380 = (tmp10 * tmp9) + (tmp8 * tmp11); + } + { + fftw_real tmp14; + fftw_real tmp16; + fftw_real tmp13; + fftw_real tmp15; + ASSERT_ALIGNED_DOUBLE; + tmp14 = c_re(inout[48 * iostride]); + tmp16 = c_im(inout[48 * iostride]); + tmp13 = c_re(W[47]); + tmp15 = c_im(W[47]); + tmp17 = (tmp13 * tmp14) - (tmp15 * tmp16); + tmp381 = (tmp15 * tmp14) + (tmp13 * tmp16); + } + { + fftw_real tmp7; + fftw_real tmp18; + fftw_real tmp1107; + fftw_real tmp1108; + ASSERT_ALIGNED_DOUBLE; + tmp7 = tmp1 + tmp6; + tmp18 = tmp12 + tmp17; + tmp19 = tmp7 + tmp18; + tmp791 = tmp7 - tmp18; + tmp1107 = tmp1045 - tmp1044; + tmp1108 = tmp12 - tmp17; + tmp1109 = tmp1107 - tmp1108; + tmp1139 = tmp1108 + tmp1107; + } + { + fftw_real tmp1043; + fftw_real tmp1046; + fftw_real tmp379; + fftw_real tmp382; + ASSERT_ALIGNED_DOUBLE; + tmp1043 = tmp380 + tmp381; + tmp1046 = tmp1044 + tmp1045; + tmp1047 = tmp1043 + tmp1046; + tmp1077 = tmp1046 - tmp1043; + tmp379 = tmp1 - tmp6; + tmp382 = tmp380 - tmp381; + tmp383 = tmp379 - tmp382; + tmp655 = tmp379 + tmp382; + } + } + { + fftw_real tmp54; + fftw_real tmp401; + fftw_real tmp398; + fftw_real tmp796; + fftw_real tmp65; + fftw_real tmp399; + fftw_real tmp404; + fftw_real tmp797; + fftw_real tmp798; + fftw_real tmp799; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp48; + fftw_real tmp396; + fftw_real tmp53; + fftw_real tmp397; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp45; + fftw_real tmp47; + fftw_real tmp44; + fftw_real tmp46; + ASSERT_ALIGNED_DOUBLE; + tmp45 = c_re(inout[4 * iostride]); + tmp47 = c_im(inout[4 * iostride]); + tmp44 = c_re(W[3]); + tmp46 = c_im(W[3]); + tmp48 = (tmp44 * tmp45) - (tmp46 * tmp47); + tmp396 = (tmp46 * tmp45) + (tmp44 * tmp47); + } + { + fftw_real tmp50; + fftw_real tmp52; + fftw_real tmp49; + fftw_real tmp51; + ASSERT_ALIGNED_DOUBLE; + tmp50 = c_re(inout[36 * iostride]); + tmp52 = c_im(inout[36 * iostride]); + tmp49 = c_re(W[35]); + tmp51 = c_im(W[35]); + tmp53 = (tmp49 * tmp50) - (tmp51 * tmp52); + tmp397 = (tmp51 * tmp50) + (tmp49 * tmp52); + } + tmp54 = tmp48 + tmp53; + tmp401 = tmp48 - tmp53; + tmp398 = tmp396 - tmp397; + tmp796 = tmp396 + tmp397; + } + { + fftw_real tmp59; + fftw_real tmp402; + fftw_real tmp64; + fftw_real tmp403; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp56; + fftw_real tmp58; + fftw_real tmp55; + fftw_real tmp57; + ASSERT_ALIGNED_DOUBLE; + tmp56 = c_re(inout[20 * iostride]); + tmp58 = c_im(inout[20 * iostride]); + tmp55 = c_re(W[19]); + tmp57 = c_im(W[19]); + tmp59 = (tmp55 * tmp56) - (tmp57 * tmp58); + tmp402 = (tmp57 * tmp56) + (tmp55 * tmp58); + } + { + fftw_real tmp61; + fftw_real tmp63; + fftw_real tmp60; + fftw_real tmp62; + ASSERT_ALIGNED_DOUBLE; + tmp61 = c_re(inout[52 * iostride]); + tmp63 = c_im(inout[52 * iostride]); + tmp60 = c_re(W[51]); + tmp62 = c_im(W[51]); + tmp64 = (tmp60 * tmp61) - (tmp62 * tmp63); + tmp403 = (tmp62 * tmp61) + (tmp60 * tmp63); + } + tmp65 = tmp59 + tmp64; + tmp399 = tmp59 - tmp64; + tmp404 = tmp402 - tmp403; + tmp797 = tmp402 + tmp403; + } + tmp66 = tmp54 + tmp65; + tmp798 = tmp796 - tmp797; + tmp799 = tmp54 - tmp65; + tmp800 = tmp798 - tmp799; + tmp908 = tmp799 + tmp798; + tmp956 = tmp796 + tmp797; + { + fftw_real tmp400; + fftw_real tmp405; + fftw_real tmp660; + fftw_real tmp661; + ASSERT_ALIGNED_DOUBLE; + tmp400 = tmp398 + tmp399; + tmp405 = tmp401 - tmp404; + tmp406 = (K382683432 * tmp400) - (K923879532 * tmp405); + tmp608 = (K923879532 * tmp400) + (K382683432 * tmp405); + tmp660 = tmp398 - tmp399; + tmp661 = tmp401 + tmp404; + tmp662 = (K923879532 * tmp660) - (K382683432 * tmp661); + tmp744 = (K382683432 * tmp660) + (K923879532 * tmp661); + } + } + { + fftw_real tmp24; + fftw_real tmp384; + fftw_real tmp29; + fftw_real tmp385; + fftw_real tmp386; + fftw_real tmp387; + fftw_real tmp35; + fftw_real tmp390; + fftw_real tmp40; + fftw_real tmp391; + fftw_real tmp389; + fftw_real tmp392; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp21; + fftw_real tmp23; + fftw_real tmp20; + fftw_real tmp22; + ASSERT_ALIGNED_DOUBLE; + tmp21 = c_re(inout[8 * iostride]); + tmp23 = c_im(inout[8 * iostride]); + tmp20 = c_re(W[7]); + tmp22 = c_im(W[7]); + tmp24 = (tmp20 * tmp21) - (tmp22 * tmp23); + tmp384 = (tmp22 * tmp21) + (tmp20 * tmp23); + } + { + fftw_real tmp26; + fftw_real tmp28; + fftw_real tmp25; + fftw_real tmp27; + ASSERT_ALIGNED_DOUBLE; + tmp26 = c_re(inout[40 * iostride]); + tmp28 = c_im(inout[40 * iostride]); + tmp25 = c_re(W[39]); + tmp27 = c_im(W[39]); + tmp29 = (tmp25 * tmp26) - (tmp27 * tmp28); + tmp385 = (tmp27 * tmp26) + (tmp25 * tmp28); + } + tmp386 = tmp384 - tmp385; + tmp387 = tmp24 - tmp29; + { + fftw_real tmp32; + fftw_real tmp34; + fftw_real tmp31; + fftw_real tmp33; + ASSERT_ALIGNED_DOUBLE; + tmp32 = c_re(inout[56 * iostride]); + tmp34 = c_im(inout[56 * iostride]); + tmp31 = c_re(W[55]); + tmp33 = c_im(W[55]); + tmp35 = (tmp31 * tmp32) - (tmp33 * tmp34); + tmp390 = (tmp33 * tmp32) + (tmp31 * tmp34); + } + { + fftw_real tmp37; + fftw_real tmp39; + fftw_real tmp36; + fftw_real tmp38; + ASSERT_ALIGNED_DOUBLE; + tmp37 = c_re(inout[24 * iostride]); + tmp39 = c_im(inout[24 * iostride]); + tmp36 = c_re(W[23]); + tmp38 = c_im(W[23]); + tmp40 = (tmp36 * tmp37) - (tmp38 * tmp39); + tmp391 = (tmp38 * tmp37) + (tmp36 * tmp39); + } + tmp389 = tmp35 - tmp40; + tmp392 = tmp390 - tmp391; + { + fftw_real tmp30; + fftw_real tmp41; + fftw_real tmp792; + fftw_real tmp793; + ASSERT_ALIGNED_DOUBLE; + tmp30 = tmp24 + tmp29; + tmp41 = tmp35 + tmp40; + tmp42 = tmp30 + tmp41; + tmp1076 = tmp41 - tmp30; + tmp792 = tmp384 + tmp385; + tmp793 = tmp390 + tmp391; + tmp794 = tmp792 - tmp793; + tmp1042 = tmp792 + tmp793; + } + { + fftw_real tmp388; + fftw_real tmp393; + fftw_real tmp656; + fftw_real tmp657; + ASSERT_ALIGNED_DOUBLE; + tmp388 = tmp386 - tmp387; + tmp393 = tmp389 + tmp392; + tmp394 = K707106781 * (tmp388 - tmp393); + tmp1106 = K707106781 * (tmp388 + tmp393); + tmp656 = tmp387 + tmp386; + tmp657 = tmp389 - tmp392; + tmp658 = K707106781 * (tmp656 + tmp657); + tmp1138 = K707106781 * (tmp657 - tmp656); + } + } + { + fftw_real tmp287; + fftw_real tmp572; + fftw_real tmp292; + fftw_real tmp573; + fftw_real tmp293; + fftw_real tmp876; + fftw_real tmp327; + fftw_real tmp541; + fftw_real tmp544; + fftw_real tmp861; + fftw_real tmp298; + fftw_real tmp532; + fftw_real tmp303; + fftw_real tmp533; + fftw_real tmp304; + fftw_real tmp877; + fftw_real tmp316; + fftw_real tmp539; + fftw_real tmp538; + fftw_real tmp860; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp284; + fftw_real tmp286; + fftw_real tmp283; + fftw_real tmp285; + ASSERT_ALIGNED_DOUBLE; + tmp284 = c_re(inout[63 * iostride]); + tmp286 = c_im(inout[63 * iostride]); + tmp283 = c_re(W[62]); + tmp285 = c_im(W[62]); + tmp287 = (tmp283 * tmp284) - (tmp285 * tmp286); + tmp572 = (tmp285 * tmp284) + (tmp283 * tmp286); + } + { + fftw_real tmp289; + fftw_real tmp291; + fftw_real tmp288; + fftw_real tmp290; + ASSERT_ALIGNED_DOUBLE; + tmp289 = c_re(inout[31 * iostride]); + tmp291 = c_im(inout[31 * iostride]); + tmp288 = c_re(W[30]); + tmp290 = c_im(W[30]); + tmp292 = (tmp288 * tmp289) - (tmp290 * tmp291); + tmp573 = (tmp290 * tmp289) + (tmp288 * tmp291); + } + tmp293 = tmp287 + tmp292; + tmp876 = tmp572 + tmp573; + { + fftw_real tmp321; + fftw_real tmp542; + fftw_real tmp326; + fftw_real tmp543; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp318; + fftw_real tmp320; + fftw_real tmp317; + fftw_real tmp319; + ASSERT_ALIGNED_DOUBLE; + tmp318 = c_re(inout[55 * iostride]); + tmp320 = c_im(inout[55 * iostride]); + tmp317 = c_re(W[54]); + tmp319 = c_im(W[54]); + tmp321 = (tmp317 * tmp318) - (tmp319 * tmp320); + tmp542 = (tmp319 * tmp318) + (tmp317 * tmp320); + } + { + fftw_real tmp323; + fftw_real tmp325; + fftw_real tmp322; + fftw_real tmp324; + ASSERT_ALIGNED_DOUBLE; + tmp323 = c_re(inout[23 * iostride]); + tmp325 = c_im(inout[23 * iostride]); + tmp322 = c_re(W[22]); + tmp324 = c_im(W[22]); + tmp326 = (tmp322 * tmp323) - (tmp324 * tmp325); + tmp543 = (tmp324 * tmp323) + (tmp322 * tmp325); + } + tmp327 = tmp321 + tmp326; + tmp541 = tmp321 - tmp326; + tmp544 = tmp542 - tmp543; + tmp861 = tmp542 + tmp543; + } + { + fftw_real tmp295; + fftw_real tmp297; + fftw_real tmp294; + fftw_real tmp296; + ASSERT_ALIGNED_DOUBLE; + tmp295 = c_re(inout[15 * iostride]); + tmp297 = c_im(inout[15 * iostride]); + tmp294 = c_re(W[14]); + tmp296 = c_im(W[14]); + tmp298 = (tmp294 * tmp295) - (tmp296 * tmp297); + tmp532 = (tmp296 * tmp295) + (tmp294 * tmp297); + } + { + fftw_real tmp300; + fftw_real tmp302; + fftw_real tmp299; + fftw_real tmp301; + ASSERT_ALIGNED_DOUBLE; + tmp300 = c_re(inout[47 * iostride]); + tmp302 = c_im(inout[47 * iostride]); + tmp299 = c_re(W[46]); + tmp301 = c_im(W[46]); + tmp303 = (tmp299 * tmp300) - (tmp301 * tmp302); + tmp533 = (tmp301 * tmp300) + (tmp299 * tmp302); + } + tmp304 = tmp298 + tmp303; + tmp877 = tmp532 + tmp533; + { + fftw_real tmp310; + fftw_real tmp536; + fftw_real tmp315; + fftw_real tmp537; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp307; + fftw_real tmp309; + fftw_real tmp306; + fftw_real tmp308; + ASSERT_ALIGNED_DOUBLE; + tmp307 = c_re(inout[7 * iostride]); + tmp309 = c_im(inout[7 * iostride]); + tmp306 = c_re(W[6]); + tmp308 = c_im(W[6]); + tmp310 = (tmp306 * tmp307) - (tmp308 * tmp309); + tmp536 = (tmp308 * tmp307) + (tmp306 * tmp309); + } + { + fftw_real tmp312; + fftw_real tmp314; + fftw_real tmp311; + fftw_real tmp313; + ASSERT_ALIGNED_DOUBLE; + tmp312 = c_re(inout[39 * iostride]); + tmp314 = c_im(inout[39 * iostride]); + tmp311 = c_re(W[38]); + tmp313 = c_im(W[38]); + tmp315 = (tmp311 * tmp312) - (tmp313 * tmp314); + tmp537 = (tmp313 * tmp312) + (tmp311 * tmp314); + } + tmp316 = tmp310 + tmp315; + tmp539 = tmp310 - tmp315; + tmp538 = tmp536 - tmp537; + tmp860 = tmp536 + tmp537; + } + { + fftw_real tmp305; + fftw_real tmp328; + fftw_real tmp859; + fftw_real tmp862; + ASSERT_ALIGNED_DOUBLE; + tmp305 = tmp293 + tmp304; + tmp328 = tmp316 + tmp327; + tmp329 = tmp305 + tmp328; + tmp983 = tmp305 - tmp328; + tmp859 = tmp293 - tmp304; + tmp862 = tmp860 - tmp861; + tmp863 = tmp859 - tmp862; + tmp927 = tmp859 + tmp862; + } + { + fftw_real tmp988; + fftw_real tmp989; + fftw_real tmp878; + fftw_real tmp879; + ASSERT_ALIGNED_DOUBLE; + tmp988 = tmp876 + tmp877; + tmp989 = tmp860 + tmp861; + tmp990 = tmp988 - tmp989; + tmp1026 = tmp988 + tmp989; + tmp878 = tmp876 - tmp877; + tmp879 = tmp327 - tmp316; + tmp880 = tmp878 - tmp879; + tmp930 = tmp878 + tmp879; + } + { + fftw_real tmp531; + fftw_real tmp534; + fftw_real tmp574; + fftw_real tmp575; + ASSERT_ALIGNED_DOUBLE; + tmp531 = tmp287 - tmp292; + tmp534 = tmp532 - tmp533; + tmp535 = tmp531 - tmp534; + tmp703 = tmp531 + tmp534; + tmp574 = tmp572 - tmp573; + tmp575 = tmp298 - tmp303; + tmp576 = tmp574 + tmp575; + tmp714 = tmp574 - tmp575; + } + { + fftw_real tmp577; + fftw_real tmp578; + fftw_real tmp540; + fftw_real tmp545; + ASSERT_ALIGNED_DOUBLE; + tmp577 = tmp541 - tmp544; + tmp578 = tmp539 + tmp538; + tmp579 = K707106781 * (tmp577 - tmp578); + tmp704 = K707106781 * (tmp578 + tmp577); + tmp540 = tmp538 - tmp539; + tmp545 = tmp541 + tmp544; + tmp546 = K707106781 * (tmp540 - tmp545); + tmp715 = K707106781 * (tmp540 + tmp545); + } + } + { + fftw_real tmp340; + fftw_real tmp553; + fftw_real tmp550; + fftw_real tmp864; + fftw_real tmp374; + fftw_real tmp562; + fftw_real tmp567; + fftw_real tmp871; + fftw_real tmp351; + fftw_real tmp551; + fftw_real tmp556; + fftw_real tmp865; + fftw_real tmp363; + fftw_real tmp564; + fftw_real tmp561; + fftw_real tmp870; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp334; + fftw_real tmp548; + fftw_real tmp339; + fftw_real tmp549; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp331; + fftw_real tmp333; + fftw_real tmp330; + fftw_real tmp332; + ASSERT_ALIGNED_DOUBLE; + tmp331 = c_re(inout[3 * iostride]); + tmp333 = c_im(inout[3 * iostride]); + tmp330 = c_re(W[2]); + tmp332 = c_im(W[2]); + tmp334 = (tmp330 * tmp331) - (tmp332 * tmp333); + tmp548 = (tmp332 * tmp331) + (tmp330 * tmp333); + } + { + fftw_real tmp336; + fftw_real tmp338; + fftw_real tmp335; + fftw_real tmp337; + ASSERT_ALIGNED_DOUBLE; + tmp336 = c_re(inout[35 * iostride]); + tmp338 = c_im(inout[35 * iostride]); + tmp335 = c_re(W[34]); + tmp337 = c_im(W[34]); + tmp339 = (tmp335 * tmp336) - (tmp337 * tmp338); + tmp549 = (tmp337 * tmp336) + (tmp335 * tmp338); + } + tmp340 = tmp334 + tmp339; + tmp553 = tmp334 - tmp339; + tmp550 = tmp548 - tmp549; + tmp864 = tmp548 + tmp549; + } + { + fftw_real tmp368; + fftw_real tmp565; + fftw_real tmp373; + fftw_real tmp566; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp365; + fftw_real tmp367; + fftw_real tmp364; + fftw_real tmp366; + ASSERT_ALIGNED_DOUBLE; + tmp365 = c_re(inout[11 * iostride]); + tmp367 = c_im(inout[11 * iostride]); + tmp364 = c_re(W[10]); + tmp366 = c_im(W[10]); + tmp368 = (tmp364 * tmp365) - (tmp366 * tmp367); + tmp565 = (tmp366 * tmp365) + (tmp364 * tmp367); + } + { + fftw_real tmp370; + fftw_real tmp372; + fftw_real tmp369; + fftw_real tmp371; + ASSERT_ALIGNED_DOUBLE; + tmp370 = c_re(inout[43 * iostride]); + tmp372 = c_im(inout[43 * iostride]); + tmp369 = c_re(W[42]); + tmp371 = c_im(W[42]); + tmp373 = (tmp369 * tmp370) - (tmp371 * tmp372); + tmp566 = (tmp371 * tmp370) + (tmp369 * tmp372); + } + tmp374 = tmp368 + tmp373; + tmp562 = tmp368 - tmp373; + tmp567 = tmp565 - tmp566; + tmp871 = tmp565 + tmp566; + } + { + fftw_real tmp345; + fftw_real tmp554; + fftw_real tmp350; + fftw_real tmp555; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp342; + fftw_real tmp344; + fftw_real tmp341; + fftw_real tmp343; + ASSERT_ALIGNED_DOUBLE; + tmp342 = c_re(inout[19 * iostride]); + tmp344 = c_im(inout[19 * iostride]); + tmp341 = c_re(W[18]); + tmp343 = c_im(W[18]); + tmp345 = (tmp341 * tmp342) - (tmp343 * tmp344); + tmp554 = (tmp343 * tmp342) + (tmp341 * tmp344); + } + { + fftw_real tmp347; + fftw_real tmp349; + fftw_real tmp346; + fftw_real tmp348; + ASSERT_ALIGNED_DOUBLE; + tmp347 = c_re(inout[51 * iostride]); + tmp349 = c_im(inout[51 * iostride]); + tmp346 = c_re(W[50]); + tmp348 = c_im(W[50]); + tmp350 = (tmp346 * tmp347) - (tmp348 * tmp349); + tmp555 = (tmp348 * tmp347) + (tmp346 * tmp349); + } + tmp351 = tmp345 + tmp350; + tmp551 = tmp345 - tmp350; + tmp556 = tmp554 - tmp555; + tmp865 = tmp554 + tmp555; + } + { + fftw_real tmp357; + fftw_real tmp559; + fftw_real tmp362; + fftw_real tmp560; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp354; + fftw_real tmp356; + fftw_real tmp353; + fftw_real tmp355; + ASSERT_ALIGNED_DOUBLE; + tmp354 = c_re(inout[59 * iostride]); + tmp356 = c_im(inout[59 * iostride]); + tmp353 = c_re(W[58]); + tmp355 = c_im(W[58]); + tmp357 = (tmp353 * tmp354) - (tmp355 * tmp356); + tmp559 = (tmp355 * tmp354) + (tmp353 * tmp356); + } + { + fftw_real tmp359; + fftw_real tmp361; + fftw_real tmp358; + fftw_real tmp360; + ASSERT_ALIGNED_DOUBLE; + tmp359 = c_re(inout[27 * iostride]); + tmp361 = c_im(inout[27 * iostride]); + tmp358 = c_re(W[26]); + tmp360 = c_im(W[26]); + tmp362 = (tmp358 * tmp359) - (tmp360 * tmp361); + tmp560 = (tmp360 * tmp359) + (tmp358 * tmp361); + } + tmp363 = tmp357 + tmp362; + tmp564 = tmp357 - tmp362; + tmp561 = tmp559 - tmp560; + tmp870 = tmp559 + tmp560; + } + { + fftw_real tmp352; + fftw_real tmp375; + fftw_real tmp866; + fftw_real tmp867; + ASSERT_ALIGNED_DOUBLE; + tmp352 = tmp340 + tmp351; + tmp375 = tmp363 + tmp374; + tmp376 = tmp352 + tmp375; + tmp991 = tmp375 - tmp352; + tmp866 = tmp864 - tmp865; + tmp867 = tmp340 - tmp351; + tmp868 = tmp866 - tmp867; + tmp882 = tmp867 + tmp866; + } + { + fftw_real tmp984; + fftw_real tmp985; + fftw_real tmp869; + fftw_real tmp872; + ASSERT_ALIGNED_DOUBLE; + tmp984 = tmp864 + tmp865; + tmp985 = tmp870 + tmp871; + tmp986 = tmp984 - tmp985; + tmp1027 = tmp984 + tmp985; + tmp869 = tmp363 - tmp374; + tmp872 = tmp870 - tmp871; + tmp873 = tmp869 + tmp872; + tmp881 = tmp869 - tmp872; + } + { + fftw_real tmp552; + fftw_real tmp557; + fftw_real tmp706; + fftw_real tmp707; + ASSERT_ALIGNED_DOUBLE; + tmp552 = tmp550 + tmp551; + tmp557 = tmp553 - tmp556; + tmp558 = (K382683432 * tmp552) - (K923879532 * tmp557); + tmp582 = (K923879532 * tmp552) + (K382683432 * tmp557); + tmp706 = tmp550 - tmp551; + tmp707 = tmp553 + tmp556; + tmp708 = (K923879532 * tmp706) - (K382683432 * tmp707); + tmp718 = (K382683432 * tmp706) + (K923879532 * tmp707); + } + { + fftw_real tmp563; + fftw_real tmp568; + fftw_real tmp709; + fftw_real tmp710; + ASSERT_ALIGNED_DOUBLE; + tmp563 = tmp561 + tmp562; + tmp568 = tmp564 - tmp567; + tmp569 = (K382683432 * tmp563) + (K923879532 * tmp568); + tmp581 = (K382683432 * tmp568) - (K923879532 * tmp563); + tmp709 = tmp561 - tmp562; + tmp710 = tmp564 + tmp567; + tmp711 = (K923879532 * tmp709) + (K382683432 * tmp710); + tmp717 = (K923879532 * tmp710) - (K382683432 * tmp709); + } + } + { + fftw_real tmp77; + fftw_real tmp412; + fftw_real tmp409; + fftw_real tmp802; + fftw_real tmp88; + fftw_real tmp410; + fftw_real tmp415; + fftw_real tmp803; + fftw_real tmp801; + fftw_real tmp804; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp71; + fftw_real tmp407; + fftw_real tmp76; + fftw_real tmp408; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp68; + fftw_real tmp70; + fftw_real tmp67; + fftw_real tmp69; + ASSERT_ALIGNED_DOUBLE; + tmp68 = c_re(inout[60 * iostride]); + tmp70 = c_im(inout[60 * iostride]); + tmp67 = c_re(W[59]); + tmp69 = c_im(W[59]); + tmp71 = (tmp67 * tmp68) - (tmp69 * tmp70); + tmp407 = (tmp69 * tmp68) + (tmp67 * tmp70); + } + { + fftw_real tmp73; + fftw_real tmp75; + fftw_real tmp72; + fftw_real tmp74; + ASSERT_ALIGNED_DOUBLE; + tmp73 = c_re(inout[28 * iostride]); + tmp75 = c_im(inout[28 * iostride]); + tmp72 = c_re(W[27]); + tmp74 = c_im(W[27]); + tmp76 = (tmp72 * tmp73) - (tmp74 * tmp75); + tmp408 = (tmp74 * tmp73) + (tmp72 * tmp75); + } + tmp77 = tmp71 + tmp76; + tmp412 = tmp71 - tmp76; + tmp409 = tmp407 - tmp408; + tmp802 = tmp407 + tmp408; + } + { + fftw_real tmp82; + fftw_real tmp413; + fftw_real tmp87; + fftw_real tmp414; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp79; + fftw_real tmp81; + fftw_real tmp78; + fftw_real tmp80; + ASSERT_ALIGNED_DOUBLE; + tmp79 = c_re(inout[12 * iostride]); + tmp81 = c_im(inout[12 * iostride]); + tmp78 = c_re(W[11]); + tmp80 = c_im(W[11]); + tmp82 = (tmp78 * tmp79) - (tmp80 * tmp81); + tmp413 = (tmp80 * tmp79) + (tmp78 * tmp81); + } + { + fftw_real tmp84; + fftw_real tmp86; + fftw_real tmp83; + fftw_real tmp85; + ASSERT_ALIGNED_DOUBLE; + tmp84 = c_re(inout[44 * iostride]); + tmp86 = c_im(inout[44 * iostride]); + tmp83 = c_re(W[43]); + tmp85 = c_im(W[43]); + tmp87 = (tmp83 * tmp84) - (tmp85 * tmp86); + tmp414 = (tmp85 * tmp84) + (tmp83 * tmp86); + } + tmp88 = tmp82 + tmp87; + tmp410 = tmp82 - tmp87; + tmp415 = tmp413 - tmp414; + tmp803 = tmp413 + tmp414; + } + tmp89 = tmp77 + tmp88; + tmp801 = tmp77 - tmp88; + tmp804 = tmp802 - tmp803; + tmp805 = tmp801 + tmp804; + tmp909 = tmp801 - tmp804; + tmp957 = tmp802 + tmp803; + { + fftw_real tmp411; + fftw_real tmp416; + fftw_real tmp663; + fftw_real tmp664; + ASSERT_ALIGNED_DOUBLE; + tmp411 = tmp409 + tmp410; + tmp416 = tmp412 - tmp415; + tmp417 = (K382683432 * tmp411) + (K923879532 * tmp416); + tmp609 = (K382683432 * tmp416) - (K923879532 * tmp411); + tmp663 = tmp409 - tmp410; + tmp664 = tmp412 + tmp415; + tmp665 = (K923879532 * tmp663) + (K382683432 * tmp664); + tmp745 = (K923879532 * tmp664) - (K382683432 * tmp663); + } + } + { + fftw_real tmp143; + fftw_real tmp447; + fftw_real tmp148; + fftw_real tmp448; + fftw_real tmp149; + fftw_real tmp819; + fftw_real tmp183; + fftw_real tmp452; + fftw_real tmp455; + fftw_real tmp826; + fftw_real tmp154; + fftw_real tmp465; + fftw_real tmp159; + fftw_real tmp466; + fftw_real tmp160; + fftw_real tmp820; + fftw_real tmp172; + fftw_real tmp457; + fftw_real tmp460; + fftw_real tmp825; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp140; + fftw_real tmp142; + fftw_real tmp139; + fftw_real tmp141; + ASSERT_ALIGNED_DOUBLE; + tmp140 = c_re(inout[62 * iostride]); + tmp142 = c_im(inout[62 * iostride]); + tmp139 = c_re(W[61]); + tmp141 = c_im(W[61]); + tmp143 = (tmp139 * tmp140) - (tmp141 * tmp142); + tmp447 = (tmp141 * tmp140) + (tmp139 * tmp142); + } + { + fftw_real tmp145; + fftw_real tmp147; + fftw_real tmp144; + fftw_real tmp146; + ASSERT_ALIGNED_DOUBLE; + tmp145 = c_re(inout[30 * iostride]); + tmp147 = c_im(inout[30 * iostride]); + tmp144 = c_re(W[29]); + tmp146 = c_im(W[29]); + tmp148 = (tmp144 * tmp145) - (tmp146 * tmp147); + tmp448 = (tmp146 * tmp145) + (tmp144 * tmp147); + } + tmp149 = tmp143 + tmp148; + tmp819 = tmp447 + tmp448; + { + fftw_real tmp177; + fftw_real tmp453; + fftw_real tmp182; + fftw_real tmp454; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp174; + fftw_real tmp176; + fftw_real tmp173; + fftw_real tmp175; + ASSERT_ALIGNED_DOUBLE; + tmp174 = c_re(inout[54 * iostride]); + tmp176 = c_im(inout[54 * iostride]); + tmp173 = c_re(W[53]); + tmp175 = c_im(W[53]); + tmp177 = (tmp173 * tmp174) - (tmp175 * tmp176); + tmp453 = (tmp175 * tmp174) + (tmp173 * tmp176); + } + { + fftw_real tmp179; + fftw_real tmp181; + fftw_real tmp178; + fftw_real tmp180; + ASSERT_ALIGNED_DOUBLE; + tmp179 = c_re(inout[22 * iostride]); + tmp181 = c_im(inout[22 * iostride]); + tmp178 = c_re(W[21]); + tmp180 = c_im(W[21]); + tmp182 = (tmp178 * tmp179) - (tmp180 * tmp181); + tmp454 = (tmp180 * tmp179) + (tmp178 * tmp181); + } + tmp183 = tmp177 + tmp182; + tmp452 = tmp177 - tmp182; + tmp455 = tmp453 - tmp454; + tmp826 = tmp453 + tmp454; + } + { + fftw_real tmp151; + fftw_real tmp153; + fftw_real tmp150; + fftw_real tmp152; + ASSERT_ALIGNED_DOUBLE; + tmp151 = c_re(inout[14 * iostride]); + tmp153 = c_im(inout[14 * iostride]); + tmp150 = c_re(W[13]); + tmp152 = c_im(W[13]); + tmp154 = (tmp150 * tmp151) - (tmp152 * tmp153); + tmp465 = (tmp152 * tmp151) + (tmp150 * tmp153); + } + { + fftw_real tmp156; + fftw_real tmp158; + fftw_real tmp155; + fftw_real tmp157; + ASSERT_ALIGNED_DOUBLE; + tmp156 = c_re(inout[46 * iostride]); + tmp158 = c_im(inout[46 * iostride]); + tmp155 = c_re(W[45]); + tmp157 = c_im(W[45]); + tmp159 = (tmp155 * tmp156) - (tmp157 * tmp158); + tmp466 = (tmp157 * tmp156) + (tmp155 * tmp158); + } + tmp160 = tmp154 + tmp159; + tmp820 = tmp465 + tmp466; + { + fftw_real tmp166; + fftw_real tmp458; + fftw_real tmp171; + fftw_real tmp459; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp163; + fftw_real tmp165; + fftw_real tmp162; + fftw_real tmp164; + ASSERT_ALIGNED_DOUBLE; + tmp163 = c_re(inout[6 * iostride]); + tmp165 = c_im(inout[6 * iostride]); + tmp162 = c_re(W[5]); + tmp164 = c_im(W[5]); + tmp166 = (tmp162 * tmp163) - (tmp164 * tmp165); + tmp458 = (tmp164 * tmp163) + (tmp162 * tmp165); + } + { + fftw_real tmp168; + fftw_real tmp170; + fftw_real tmp167; + fftw_real tmp169; + ASSERT_ALIGNED_DOUBLE; + tmp168 = c_re(inout[38 * iostride]); + tmp170 = c_im(inout[38 * iostride]); + tmp167 = c_re(W[37]); + tmp169 = c_im(W[37]); + tmp171 = (tmp167 * tmp168) - (tmp169 * tmp170); + tmp459 = (tmp169 * tmp168) + (tmp167 * tmp170); + } + tmp172 = tmp166 + tmp171; + tmp457 = tmp166 - tmp171; + tmp460 = tmp458 - tmp459; + tmp825 = tmp458 + tmp459; + } + { + fftw_real tmp821; + fftw_real tmp822; + fftw_real tmp824; + fftw_real tmp827; + ASSERT_ALIGNED_DOUBLE; + tmp161 = tmp149 + tmp160; + tmp184 = tmp172 + tmp183; + tmp965 = tmp161 - tmp184; + tmp821 = tmp819 - tmp820; + tmp822 = tmp183 - tmp172; + tmp823 = tmp821 - tmp822; + tmp915 = tmp821 + tmp822; + tmp966 = tmp819 + tmp820; + tmp967 = tmp825 + tmp826; + tmp968 = tmp966 - tmp967; + tmp824 = tmp149 - tmp160; + tmp827 = tmp825 - tmp826; + tmp828 = tmp824 - tmp827; + tmp916 = tmp824 + tmp827; + } + { + fftw_real tmp449; + fftw_real tmp450; + fftw_real tmp464; + fftw_real tmp467; + ASSERT_ALIGNED_DOUBLE; + tmp449 = tmp447 - tmp448; + tmp450 = tmp154 - tmp159; + tmp451 = tmp449 + tmp450; + tmp678 = tmp449 - tmp450; + tmp464 = tmp143 - tmp148; + tmp467 = tmp465 - tmp466; + tmp468 = tmp464 - tmp467; + tmp675 = tmp464 + tmp467; + } + { + fftw_real tmp469; + fftw_real tmp470; + fftw_real tmp456; + fftw_real tmp461; + ASSERT_ALIGNED_DOUBLE; + tmp469 = tmp460 - tmp457; + tmp470 = tmp452 + tmp455; + tmp471 = K707106781 * (tmp469 - tmp470); + tmp679 = K707106781 * (tmp469 + tmp470); + tmp456 = tmp452 - tmp455; + tmp461 = tmp457 + tmp460; + tmp462 = K707106781 * (tmp456 - tmp461); + tmp676 = K707106781 * (tmp461 + tmp456); + } + } + { + fftw_real tmp96; + fftw_real tmp420; + fftw_real tmp101; + fftw_real tmp421; + fftw_real tmp102; + fftw_real tmp808; + fftw_real tmp136; + fftw_real tmp425; + fftw_real tmp428; + fftw_real tmp815; + fftw_real tmp107; + fftw_real tmp438; + fftw_real tmp112; + fftw_real tmp439; + fftw_real tmp113; + fftw_real tmp809; + fftw_real tmp125; + fftw_real tmp430; + fftw_real tmp433; + fftw_real tmp814; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp93; + fftw_real tmp95; + fftw_real tmp92; + fftw_real tmp94; + ASSERT_ALIGNED_DOUBLE; + tmp93 = c_re(inout[2 * iostride]); + tmp95 = c_im(inout[2 * iostride]); + tmp92 = c_re(W[1]); + tmp94 = c_im(W[1]); + tmp96 = (tmp92 * tmp93) - (tmp94 * tmp95); + tmp420 = (tmp94 * tmp93) + (tmp92 * tmp95); + } + { + fftw_real tmp98; + fftw_real tmp100; + fftw_real tmp97; + fftw_real tmp99; + ASSERT_ALIGNED_DOUBLE; + tmp98 = c_re(inout[34 * iostride]); + tmp100 = c_im(inout[34 * iostride]); + tmp97 = c_re(W[33]); + tmp99 = c_im(W[33]); + tmp101 = (tmp97 * tmp98) - (tmp99 * tmp100); + tmp421 = (tmp99 * tmp98) + (tmp97 * tmp100); + } + tmp102 = tmp96 + tmp101; + tmp808 = tmp420 + tmp421; + { + fftw_real tmp130; + fftw_real tmp426; + fftw_real tmp135; + fftw_real tmp427; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp127; + fftw_real tmp129; + fftw_real tmp126; + fftw_real tmp128; + ASSERT_ALIGNED_DOUBLE; + tmp127 = c_re(inout[58 * iostride]); + tmp129 = c_im(inout[58 * iostride]); + tmp126 = c_re(W[57]); + tmp128 = c_im(W[57]); + tmp130 = (tmp126 * tmp127) - (tmp128 * tmp129); + tmp426 = (tmp128 * tmp127) + (tmp126 * tmp129); + } + { + fftw_real tmp132; + fftw_real tmp134; + fftw_real tmp131; + fftw_real tmp133; + ASSERT_ALIGNED_DOUBLE; + tmp132 = c_re(inout[26 * iostride]); + tmp134 = c_im(inout[26 * iostride]); + tmp131 = c_re(W[25]); + tmp133 = c_im(W[25]); + tmp135 = (tmp131 * tmp132) - (tmp133 * tmp134); + tmp427 = (tmp133 * tmp132) + (tmp131 * tmp134); + } + tmp136 = tmp130 + tmp135; + tmp425 = tmp130 - tmp135; + tmp428 = tmp426 - tmp427; + tmp815 = tmp426 + tmp427; + } + { + fftw_real tmp104; + fftw_real tmp106; + fftw_real tmp103; + fftw_real tmp105; + ASSERT_ALIGNED_DOUBLE; + tmp104 = c_re(inout[18 * iostride]); + tmp106 = c_im(inout[18 * iostride]); + tmp103 = c_re(W[17]); + tmp105 = c_im(W[17]); + tmp107 = (tmp103 * tmp104) - (tmp105 * tmp106); + tmp438 = (tmp105 * tmp104) + (tmp103 * tmp106); + } + { + fftw_real tmp109; + fftw_real tmp111; + fftw_real tmp108; + fftw_real tmp110; + ASSERT_ALIGNED_DOUBLE; + tmp109 = c_re(inout[50 * iostride]); + tmp111 = c_im(inout[50 * iostride]); + tmp108 = c_re(W[49]); + tmp110 = c_im(W[49]); + tmp112 = (tmp108 * tmp109) - (tmp110 * tmp111); + tmp439 = (tmp110 * tmp109) + (tmp108 * tmp111); + } + tmp113 = tmp107 + tmp112; + tmp809 = tmp438 + tmp439; + { + fftw_real tmp119; + fftw_real tmp431; + fftw_real tmp124; + fftw_real tmp432; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp116; + fftw_real tmp118; + fftw_real tmp115; + fftw_real tmp117; + ASSERT_ALIGNED_DOUBLE; + tmp116 = c_re(inout[10 * iostride]); + tmp118 = c_im(inout[10 * iostride]); + tmp115 = c_re(W[9]); + tmp117 = c_im(W[9]); + tmp119 = (tmp115 * tmp116) - (tmp117 * tmp118); + tmp431 = (tmp117 * tmp116) + (tmp115 * tmp118); + } + { + fftw_real tmp121; + fftw_real tmp123; + fftw_real tmp120; + fftw_real tmp122; + ASSERT_ALIGNED_DOUBLE; + tmp121 = c_re(inout[42 * iostride]); + tmp123 = c_im(inout[42 * iostride]); + tmp120 = c_re(W[41]); + tmp122 = c_im(W[41]); + tmp124 = (tmp120 * tmp121) - (tmp122 * tmp123); + tmp432 = (tmp122 * tmp121) + (tmp120 * tmp123); + } + tmp125 = tmp119 + tmp124; + tmp430 = tmp119 - tmp124; + tmp433 = tmp431 - tmp432; + tmp814 = tmp431 + tmp432; + } + { + fftw_real tmp810; + fftw_real tmp811; + fftw_real tmp813; + fftw_real tmp816; + ASSERT_ALIGNED_DOUBLE; + tmp114 = tmp102 + tmp113; + tmp137 = tmp125 + tmp136; + tmp963 = tmp114 - tmp137; + tmp810 = tmp808 - tmp809; + tmp811 = tmp136 - tmp125; + tmp812 = tmp810 - tmp811; + tmp912 = tmp810 + tmp811; + tmp960 = tmp808 + tmp809; + tmp961 = tmp814 + tmp815; + tmp962 = tmp960 - tmp961; + tmp813 = tmp102 - tmp113; + tmp816 = tmp814 - tmp815; + tmp817 = tmp813 - tmp816; + tmp913 = tmp813 + tmp816; + } + { + fftw_real tmp422; + fftw_real tmp423; + fftw_real tmp437; + fftw_real tmp440; + ASSERT_ALIGNED_DOUBLE; + tmp422 = tmp420 - tmp421; + tmp423 = tmp107 - tmp112; + tmp424 = tmp422 + tmp423; + tmp668 = tmp422 - tmp423; + tmp437 = tmp96 - tmp101; + tmp440 = tmp438 - tmp439; + tmp441 = tmp437 - tmp440; + tmp671 = tmp437 + tmp440; + } + { + fftw_real tmp442; + fftw_real tmp443; + fftw_real tmp429; + fftw_real tmp434; + ASSERT_ALIGNED_DOUBLE; + tmp442 = tmp433 - tmp430; + tmp443 = tmp425 + tmp428; + tmp444 = K707106781 * (tmp442 - tmp443); + tmp669 = K707106781 * (tmp442 + tmp443); + tmp429 = tmp425 - tmp428; + tmp434 = tmp430 + tmp433; + tmp435 = K707106781 * (tmp429 - tmp434); + tmp672 = K707106781 * (tmp434 + tmp429); + } + } + { + fftw_real tmp192; + fftw_real tmp476; + fftw_real tmp197; + fftw_real tmp477; + fftw_real tmp198; + fftw_real tmp832; + fftw_real tmp232; + fftw_real tmp481; + fftw_real tmp484; + fftw_real tmp851; + fftw_real tmp203; + fftw_real tmp518; + fftw_real tmp208; + fftw_real tmp519; + fftw_real tmp209; + fftw_real tmp833; + fftw_real tmp221; + fftw_real tmp486; + fftw_real tmp489; + fftw_real tmp850; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp189; + fftw_real tmp191; + fftw_real tmp188; + fftw_real tmp190; + ASSERT_ALIGNED_DOUBLE; + tmp189 = c_re(inout[iostride]); + tmp191 = c_im(inout[iostride]); + tmp188 = c_re(W[0]); + tmp190 = c_im(W[0]); + tmp192 = (tmp188 * tmp189) - (tmp190 * tmp191); + tmp476 = (tmp190 * tmp189) + (tmp188 * tmp191); + } + { + fftw_real tmp194; + fftw_real tmp196; + fftw_real tmp193; + fftw_real tmp195; + ASSERT_ALIGNED_DOUBLE; + tmp194 = c_re(inout[33 * iostride]); + tmp196 = c_im(inout[33 * iostride]); + tmp193 = c_re(W[32]); + tmp195 = c_im(W[32]); + tmp197 = (tmp193 * tmp194) - (tmp195 * tmp196); + tmp477 = (tmp195 * tmp194) + (tmp193 * tmp196); + } + tmp198 = tmp192 + tmp197; + tmp832 = tmp476 + tmp477; + { + fftw_real tmp226; + fftw_real tmp482; + fftw_real tmp231; + fftw_real tmp483; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp223; + fftw_real tmp225; + fftw_real tmp222; + fftw_real tmp224; + ASSERT_ALIGNED_DOUBLE; + tmp223 = c_re(inout[57 * iostride]); + tmp225 = c_im(inout[57 * iostride]); + tmp222 = c_re(W[56]); + tmp224 = c_im(W[56]); + tmp226 = (tmp222 * tmp223) - (tmp224 * tmp225); + tmp482 = (tmp224 * tmp223) + (tmp222 * tmp225); + } + { + fftw_real tmp228; + fftw_real tmp230; + fftw_real tmp227; + fftw_real tmp229; + ASSERT_ALIGNED_DOUBLE; + tmp228 = c_re(inout[25 * iostride]); + tmp230 = c_im(inout[25 * iostride]); + tmp227 = c_re(W[24]); + tmp229 = c_im(W[24]); + tmp231 = (tmp227 * tmp228) - (tmp229 * tmp230); + tmp483 = (tmp229 * tmp228) + (tmp227 * tmp230); + } + tmp232 = tmp226 + tmp231; + tmp481 = tmp226 - tmp231; + tmp484 = tmp482 - tmp483; + tmp851 = tmp482 + tmp483; + } + { + fftw_real tmp200; + fftw_real tmp202; + fftw_real tmp199; + fftw_real tmp201; + ASSERT_ALIGNED_DOUBLE; + tmp200 = c_re(inout[17 * iostride]); + tmp202 = c_im(inout[17 * iostride]); + tmp199 = c_re(W[16]); + tmp201 = c_im(W[16]); + tmp203 = (tmp199 * tmp200) - (tmp201 * tmp202); + tmp518 = (tmp201 * tmp200) + (tmp199 * tmp202); + } + { + fftw_real tmp205; + fftw_real tmp207; + fftw_real tmp204; + fftw_real tmp206; + ASSERT_ALIGNED_DOUBLE; + tmp205 = c_re(inout[49 * iostride]); + tmp207 = c_im(inout[49 * iostride]); + tmp204 = c_re(W[48]); + tmp206 = c_im(W[48]); + tmp208 = (tmp204 * tmp205) - (tmp206 * tmp207); + tmp519 = (tmp206 * tmp205) + (tmp204 * tmp207); + } + tmp209 = tmp203 + tmp208; + tmp833 = tmp518 + tmp519; + { + fftw_real tmp215; + fftw_real tmp487; + fftw_real tmp220; + fftw_real tmp488; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp212; + fftw_real tmp214; + fftw_real tmp211; + fftw_real tmp213; + ASSERT_ALIGNED_DOUBLE; + tmp212 = c_re(inout[9 * iostride]); + tmp214 = c_im(inout[9 * iostride]); + tmp211 = c_re(W[8]); + tmp213 = c_im(W[8]); + tmp215 = (tmp211 * tmp212) - (tmp213 * tmp214); + tmp487 = (tmp213 * tmp212) + (tmp211 * tmp214); + } + { + fftw_real tmp217; + fftw_real tmp219; + fftw_real tmp216; + fftw_real tmp218; + ASSERT_ALIGNED_DOUBLE; + tmp217 = c_re(inout[41 * iostride]); + tmp219 = c_im(inout[41 * iostride]); + tmp216 = c_re(W[40]); + tmp218 = c_im(W[40]); + tmp220 = (tmp216 * tmp217) - (tmp218 * tmp219); + tmp488 = (tmp218 * tmp217) + (tmp216 * tmp219); + } + tmp221 = tmp215 + tmp220; + tmp486 = tmp215 - tmp220; + tmp489 = tmp487 - tmp488; + tmp850 = tmp487 + tmp488; + } + { + fftw_real tmp210; + fftw_real tmp233; + fftw_real tmp834; + fftw_real tmp835; + ASSERT_ALIGNED_DOUBLE; + tmp210 = tmp198 + tmp209; + tmp233 = tmp221 + tmp232; + tmp234 = tmp210 + tmp233; + tmp977 = tmp210 - tmp233; + tmp834 = tmp832 - tmp833; + tmp835 = tmp232 - tmp221; + tmp836 = tmp834 - tmp835; + tmp923 = tmp834 + tmp835; + } + { + fftw_real tmp972; + fftw_real tmp973; + fftw_real tmp849; + fftw_real tmp852; + ASSERT_ALIGNED_DOUBLE; + tmp972 = tmp832 + tmp833; + tmp973 = tmp850 + tmp851; + tmp974 = tmp972 - tmp973; + tmp1021 = tmp972 + tmp973; + tmp849 = tmp198 - tmp209; + tmp852 = tmp850 - tmp851; + tmp853 = tmp849 - tmp852; + tmp920 = tmp849 + tmp852; + } + { + fftw_real tmp478; + fftw_real tmp479; + fftw_real tmp517; + fftw_real tmp520; + ASSERT_ALIGNED_DOUBLE; + tmp478 = tmp476 - tmp477; + tmp479 = tmp203 - tmp208; + tmp480 = tmp478 + tmp479; + tmp684 = tmp478 - tmp479; + tmp517 = tmp192 - tmp197; + tmp520 = tmp518 - tmp519; + tmp521 = tmp517 - tmp520; + tmp695 = tmp517 + tmp520; + } + { + fftw_real tmp522; + fftw_real tmp523; + fftw_real tmp485; + fftw_real tmp490; + ASSERT_ALIGNED_DOUBLE; + tmp522 = tmp489 - tmp486; + tmp523 = tmp481 + tmp484; + tmp524 = K707106781 * (tmp522 - tmp523); + tmp685 = K707106781 * (tmp522 + tmp523); + tmp485 = tmp481 - tmp484; + tmp490 = tmp486 + tmp489; + tmp491 = K707106781 * (tmp485 - tmp490); + tmp696 = K707106781 * (tmp490 + tmp485); + } + } + { + fftw_real tmp245; + fftw_real tmp509; + fftw_real tmp506; + fftw_real tmp843; + fftw_real tmp279; + fftw_real tmp501; + fftw_real tmp496; + fftw_real tmp839; + fftw_real tmp256; + fftw_real tmp507; + fftw_real tmp512; + fftw_real tmp844; + fftw_real tmp268; + fftw_real tmp493; + fftw_real tmp500; + fftw_real tmp838; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp239; + fftw_real tmp504; + fftw_real tmp244; + fftw_real tmp505; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp236; + fftw_real tmp238; + fftw_real tmp235; + fftw_real tmp237; + ASSERT_ALIGNED_DOUBLE; + tmp236 = c_re(inout[5 * iostride]); + tmp238 = c_im(inout[5 * iostride]); + tmp235 = c_re(W[4]); + tmp237 = c_im(W[4]); + tmp239 = (tmp235 * tmp236) - (tmp237 * tmp238); + tmp504 = (tmp237 * tmp236) + (tmp235 * tmp238); + } + { + fftw_real tmp241; + fftw_real tmp243; + fftw_real tmp240; + fftw_real tmp242; + ASSERT_ALIGNED_DOUBLE; + tmp241 = c_re(inout[37 * iostride]); + tmp243 = c_im(inout[37 * iostride]); + tmp240 = c_re(W[36]); + tmp242 = c_im(W[36]); + tmp244 = (tmp240 * tmp241) - (tmp242 * tmp243); + tmp505 = (tmp242 * tmp241) + (tmp240 * tmp243); + } + tmp245 = tmp239 + tmp244; + tmp509 = tmp239 - tmp244; + tmp506 = tmp504 - tmp505; + tmp843 = tmp504 + tmp505; + } + { + fftw_real tmp273; + fftw_real tmp494; + fftw_real tmp278; + fftw_real tmp495; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp270; + fftw_real tmp272; + fftw_real tmp269; + fftw_real tmp271; + ASSERT_ALIGNED_DOUBLE; + tmp270 = c_re(inout[13 * iostride]); + tmp272 = c_im(inout[13 * iostride]); + tmp269 = c_re(W[12]); + tmp271 = c_im(W[12]); + tmp273 = (tmp269 * tmp270) - (tmp271 * tmp272); + tmp494 = (tmp271 * tmp270) + (tmp269 * tmp272); + } + { + fftw_real tmp275; + fftw_real tmp277; + fftw_real tmp274; + fftw_real tmp276; + ASSERT_ALIGNED_DOUBLE; + tmp275 = c_re(inout[45 * iostride]); + tmp277 = c_im(inout[45 * iostride]); + tmp274 = c_re(W[44]); + tmp276 = c_im(W[44]); + tmp278 = (tmp274 * tmp275) - (tmp276 * tmp277); + tmp495 = (tmp276 * tmp275) + (tmp274 * tmp277); + } + tmp279 = tmp273 + tmp278; + tmp501 = tmp273 - tmp278; + tmp496 = tmp494 - tmp495; + tmp839 = tmp494 + tmp495; + } + { + fftw_real tmp250; + fftw_real tmp510; + fftw_real tmp255; + fftw_real tmp511; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp247; + fftw_real tmp249; + fftw_real tmp246; + fftw_real tmp248; + ASSERT_ALIGNED_DOUBLE; + tmp247 = c_re(inout[21 * iostride]); + tmp249 = c_im(inout[21 * iostride]); + tmp246 = c_re(W[20]); + tmp248 = c_im(W[20]); + tmp250 = (tmp246 * tmp247) - (tmp248 * tmp249); + tmp510 = (tmp248 * tmp247) + (tmp246 * tmp249); + } + { + fftw_real tmp252; + fftw_real tmp254; + fftw_real tmp251; + fftw_real tmp253; + ASSERT_ALIGNED_DOUBLE; + tmp252 = c_re(inout[53 * iostride]); + tmp254 = c_im(inout[53 * iostride]); + tmp251 = c_re(W[52]); + tmp253 = c_im(W[52]); + tmp255 = (tmp251 * tmp252) - (tmp253 * tmp254); + tmp511 = (tmp253 * tmp252) + (tmp251 * tmp254); + } + tmp256 = tmp250 + tmp255; + tmp507 = tmp250 - tmp255; + tmp512 = tmp510 - tmp511; + tmp844 = tmp510 + tmp511; + } + { + fftw_real tmp262; + fftw_real tmp498; + fftw_real tmp267; + fftw_real tmp499; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp259; + fftw_real tmp261; + fftw_real tmp258; + fftw_real tmp260; + ASSERT_ALIGNED_DOUBLE; + tmp259 = c_re(inout[61 * iostride]); + tmp261 = c_im(inout[61 * iostride]); + tmp258 = c_re(W[60]); + tmp260 = c_im(W[60]); + tmp262 = (tmp258 * tmp259) - (tmp260 * tmp261); + tmp498 = (tmp260 * tmp259) + (tmp258 * tmp261); + } + { + fftw_real tmp264; + fftw_real tmp266; + fftw_real tmp263; + fftw_real tmp265; + ASSERT_ALIGNED_DOUBLE; + tmp264 = c_re(inout[29 * iostride]); + tmp266 = c_im(inout[29 * iostride]); + tmp263 = c_re(W[28]); + tmp265 = c_im(W[28]); + tmp267 = (tmp263 * tmp264) - (tmp265 * tmp266); + tmp499 = (tmp265 * tmp264) + (tmp263 * tmp266); + } + tmp268 = tmp262 + tmp267; + tmp493 = tmp262 - tmp267; + tmp500 = tmp498 - tmp499; + tmp838 = tmp498 + tmp499; + } + { + fftw_real tmp257; + fftw_real tmp280; + fftw_real tmp837; + fftw_real tmp840; + ASSERT_ALIGNED_DOUBLE; + tmp257 = tmp245 + tmp256; + tmp280 = tmp268 + tmp279; + tmp281 = tmp257 + tmp280; + tmp975 = tmp280 - tmp257; + tmp837 = tmp268 - tmp279; + tmp840 = tmp838 - tmp839; + tmp841 = tmp837 - tmp840; + tmp855 = tmp837 + tmp840; + } + { + fftw_real tmp978; + fftw_real tmp979; + fftw_real tmp842; + fftw_real tmp845; + ASSERT_ALIGNED_DOUBLE; + tmp978 = tmp843 + tmp844; + tmp979 = tmp838 + tmp839; + tmp980 = tmp978 - tmp979; + tmp1022 = tmp978 + tmp979; + tmp842 = tmp245 - tmp256; + tmp845 = tmp843 - tmp844; + tmp846 = tmp842 + tmp845; + tmp854 = tmp845 - tmp842; + } + { + fftw_real tmp497; + fftw_real tmp502; + fftw_real tmp687; + fftw_real tmp688; + ASSERT_ALIGNED_DOUBLE; + tmp497 = tmp493 - tmp496; + tmp502 = tmp500 + tmp501; + tmp503 = (K382683432 * tmp497) - (K923879532 * tmp502); + tmp527 = (K382683432 * tmp502) + (K923879532 * tmp497); + tmp687 = tmp493 + tmp496; + tmp688 = tmp500 - tmp501; + tmp689 = (K923879532 * tmp687) - (K382683432 * tmp688); + tmp699 = (K923879532 * tmp688) + (K382683432 * tmp687); + } + { + fftw_real tmp508; + fftw_real tmp513; + fftw_real tmp690; + fftw_real tmp691; + ASSERT_ALIGNED_DOUBLE; + tmp508 = tmp506 + tmp507; + tmp513 = tmp509 - tmp512; + tmp514 = (K923879532 * tmp508) + (K382683432 * tmp513); + tmp526 = (K382683432 * tmp508) - (K923879532 * tmp513); + tmp690 = tmp506 - tmp507; + tmp691 = tmp509 + tmp512; + tmp692 = (K382683432 * tmp690) + (K923879532 * tmp691); + tmp698 = (K923879532 * tmp690) - (K382683432 * tmp691); + } + } + { + fftw_real tmp91; + fftw_real tmp1015; + fftw_real tmp1038; + fftw_real tmp1039; + fftw_real tmp1049; + fftw_real tmp1055; + fftw_real tmp186; + fftw_real tmp1054; + fftw_real tmp1024; + fftw_real tmp1032; + fftw_real tmp378; + fftw_real tmp1051; + fftw_real tmp1029; + fftw_real tmp1033; + fftw_real tmp1018; + fftw_real tmp1040; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp43; + fftw_real tmp90; + fftw_real tmp1036; + fftw_real tmp1037; + ASSERT_ALIGNED_DOUBLE; + tmp43 = tmp19 + tmp42; + tmp90 = tmp66 + tmp89; + tmp91 = tmp43 + tmp90; + tmp1015 = tmp43 - tmp90; + tmp1036 = tmp1021 + tmp1022; + tmp1037 = tmp1026 + tmp1027; + tmp1038 = tmp1036 - tmp1037; + tmp1039 = tmp1036 + tmp1037; + } + { + fftw_real tmp1041; + fftw_real tmp1048; + fftw_real tmp138; + fftw_real tmp185; + ASSERT_ALIGNED_DOUBLE; + tmp1041 = tmp956 + tmp957; + tmp1048 = tmp1042 + tmp1047; + tmp1049 = tmp1041 + tmp1048; + tmp1055 = tmp1048 - tmp1041; + tmp138 = tmp114 + tmp137; + tmp185 = tmp161 + tmp184; + tmp186 = tmp138 + tmp185; + tmp1054 = tmp185 - tmp138; + } + { + fftw_real tmp1020; + fftw_real tmp1023; + fftw_real tmp282; + fftw_real tmp377; + ASSERT_ALIGNED_DOUBLE; + tmp1020 = tmp234 - tmp281; + tmp1023 = tmp1021 - tmp1022; + tmp1024 = tmp1020 + tmp1023; + tmp1032 = tmp1023 - tmp1020; + tmp282 = tmp234 + tmp281; + tmp377 = tmp329 + tmp376; + tmp378 = tmp282 + tmp377; + tmp1051 = tmp377 - tmp282; + } + { + fftw_real tmp1025; + fftw_real tmp1028; + fftw_real tmp1016; + fftw_real tmp1017; + ASSERT_ALIGNED_DOUBLE; + tmp1025 = tmp329 - tmp376; + tmp1028 = tmp1026 - tmp1027; + tmp1029 = tmp1025 - tmp1028; + tmp1033 = tmp1025 + tmp1028; + tmp1016 = tmp960 + tmp961; + tmp1017 = tmp966 + tmp967; + tmp1018 = tmp1016 - tmp1017; + tmp1040 = tmp1016 + tmp1017; + } + { + fftw_real tmp187; + fftw_real tmp1035; + fftw_real tmp1050; + fftw_real tmp1052; + ASSERT_ALIGNED_DOUBLE; + tmp187 = tmp91 + tmp186; + c_re(inout[32 * iostride]) = tmp187 - tmp378; + c_re(inout[0]) = tmp187 + tmp378; + tmp1035 = tmp91 - tmp186; + c_re(inout[48 * iostride]) = tmp1035 - tmp1038; + c_re(inout[16 * iostride]) = tmp1035 + tmp1038; + { + fftw_real tmp1019; + fftw_real tmp1030; + fftw_real tmp1057; + fftw_real tmp1058; + ASSERT_ALIGNED_DOUBLE; + tmp1019 = tmp1015 + tmp1018; + tmp1030 = K707106781 * (tmp1024 + tmp1029); + c_re(inout[40 * iostride]) = tmp1019 - tmp1030; + c_re(inout[8 * iostride]) = tmp1019 + tmp1030; + tmp1057 = K707106781 * (tmp1029 - tmp1024); + tmp1058 = tmp1055 - tmp1054; + c_im(inout[24 * iostride]) = tmp1057 + tmp1058; + c_im(inout[56 * iostride]) = tmp1058 - tmp1057; + } + tmp1050 = tmp1040 + tmp1049; + c_im(inout[0]) = tmp1039 + tmp1050; + c_im(inout[32 * iostride]) = tmp1050 - tmp1039; + tmp1052 = tmp1049 - tmp1040; + c_im(inout[16 * iostride]) = tmp1051 + tmp1052; + c_im(inout[48 * iostride]) = tmp1052 - tmp1051; + { + fftw_real tmp1053; + fftw_real tmp1056; + fftw_real tmp1031; + fftw_real tmp1034; + ASSERT_ALIGNED_DOUBLE; + tmp1053 = K707106781 * (tmp1032 + tmp1033); + tmp1056 = tmp1054 + tmp1055; + c_im(inout[8 * iostride]) = tmp1053 + tmp1056; + c_im(inout[40 * iostride]) = tmp1056 - tmp1053; + tmp1031 = tmp1015 - tmp1018; + tmp1034 = K707106781 * (tmp1032 - tmp1033); + c_re(inout[56 * iostride]) = tmp1031 - tmp1034; + c_re(inout[24 * iostride]) = tmp1031 + tmp1034; + } + } + } + { + fftw_real tmp959; + fftw_real tmp999; + fftw_real tmp1002; + fftw_real tmp1068; + fftw_real tmp970; + fftw_real tmp1060; + fftw_real tmp1063; + fftw_real tmp1069; + fftw_real tmp982; + fftw_real tmp996; + fftw_real tmp1006; + fftw_real tmp1012; + fftw_real tmp993; + fftw_real tmp997; + fftw_real tmp1009; + fftw_real tmp1013; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp955; + fftw_real tmp958; + fftw_real tmp1000; + fftw_real tmp1001; + ASSERT_ALIGNED_DOUBLE; + tmp955 = tmp19 - tmp42; + tmp958 = tmp956 - tmp957; + tmp959 = tmp955 - tmp958; + tmp999 = tmp955 + tmp958; + tmp1000 = tmp963 + tmp962; + tmp1001 = tmp965 - tmp968; + tmp1002 = K707106781 * (tmp1000 + tmp1001); + tmp1068 = K707106781 * (tmp1001 - tmp1000); + } + { + fftw_real tmp964; + fftw_real tmp969; + fftw_real tmp1061; + fftw_real tmp1062; + ASSERT_ALIGNED_DOUBLE; + tmp964 = tmp962 - tmp963; + tmp969 = tmp965 + tmp968; + tmp970 = K707106781 * (tmp964 - tmp969); + tmp1060 = K707106781 * (tmp964 + tmp969); + tmp1061 = tmp89 - tmp66; + tmp1062 = tmp1047 - tmp1042; + tmp1063 = tmp1061 + tmp1062; + tmp1069 = tmp1062 - tmp1061; + } + { + fftw_real tmp976; + fftw_real tmp981; + fftw_real tmp1004; + fftw_real tmp1005; + ASSERT_ALIGNED_DOUBLE; + tmp976 = tmp974 - tmp975; + tmp981 = tmp977 - tmp980; + tmp982 = (K923879532 * tmp976) + (K382683432 * tmp981); + tmp996 = (K382683432 * tmp976) - (K923879532 * tmp981); + tmp1004 = tmp974 + tmp975; + tmp1005 = tmp977 + tmp980; + tmp1006 = (K382683432 * tmp1004) + (K923879532 * tmp1005); + tmp1012 = (K923879532 * tmp1004) - (K382683432 * tmp1005); + } + { + fftw_real tmp987; + fftw_real tmp992; + fftw_real tmp1007; + fftw_real tmp1008; + ASSERT_ALIGNED_DOUBLE; + tmp987 = tmp983 - tmp986; + tmp992 = tmp990 - tmp991; + tmp993 = (K382683432 * tmp987) - (K923879532 * tmp992); + tmp997 = (K382683432 * tmp992) + (K923879532 * tmp987); + tmp1007 = tmp983 + tmp986; + tmp1008 = tmp990 + tmp991; + tmp1009 = (K923879532 * tmp1007) - (K382683432 * tmp1008); + tmp1013 = (K923879532 * tmp1008) + (K382683432 * tmp1007); + } + { + fftw_real tmp971; + fftw_real tmp994; + fftw_real tmp995; + fftw_real tmp998; + ASSERT_ALIGNED_DOUBLE; + tmp971 = tmp959 + tmp970; + tmp994 = tmp982 + tmp993; + c_re(inout[44 * iostride]) = tmp971 - tmp994; + c_re(inout[12 * iostride]) = tmp971 + tmp994; + tmp995 = tmp959 - tmp970; + tmp998 = tmp996 - tmp997; + c_re(inout[60 * iostride]) = tmp995 - tmp998; + c_re(inout[28 * iostride]) = tmp995 + tmp998; + } + { + fftw_real tmp1067; + fftw_real tmp1070; + fftw_real tmp1071; + fftw_real tmp1072; + ASSERT_ALIGNED_DOUBLE; + tmp1067 = tmp996 + tmp997; + tmp1070 = tmp1068 + tmp1069; + c_im(inout[12 * iostride]) = tmp1067 + tmp1070; + c_im(inout[44 * iostride]) = tmp1070 - tmp1067; + tmp1071 = tmp993 - tmp982; + tmp1072 = tmp1069 - tmp1068; + c_im(inout[28 * iostride]) = tmp1071 + tmp1072; + c_im(inout[60 * iostride]) = tmp1072 - tmp1071; + } + { + fftw_real tmp1003; + fftw_real tmp1010; + fftw_real tmp1011; + fftw_real tmp1014; + ASSERT_ALIGNED_DOUBLE; + tmp1003 = tmp999 + tmp1002; + tmp1010 = tmp1006 + tmp1009; + c_re(inout[36 * iostride]) = tmp1003 - tmp1010; + c_re(inout[4 * iostride]) = tmp1003 + tmp1010; + tmp1011 = tmp999 - tmp1002; + tmp1014 = tmp1012 - tmp1013; + c_re(inout[52 * iostride]) = tmp1011 - tmp1014; + c_re(inout[20 * iostride]) = tmp1011 + tmp1014; + } + { + fftw_real tmp1059; + fftw_real tmp1064; + fftw_real tmp1065; + fftw_real tmp1066; + ASSERT_ALIGNED_DOUBLE; + tmp1059 = tmp1012 + tmp1013; + tmp1064 = tmp1060 + tmp1063; + c_im(inout[4 * iostride]) = tmp1059 + tmp1064; + c_im(inout[36 * iostride]) = tmp1064 - tmp1059; + tmp1065 = tmp1009 - tmp1006; + tmp1066 = tmp1063 - tmp1060; + c_im(inout[20 * iostride]) = tmp1065 + tmp1066; + c_im(inout[52 * iostride]) = tmp1066 - tmp1065; + } + } + { + fftw_real tmp419; + fftw_real tmp591; + fftw_real tmp1155; + fftw_real tmp1161; + fftw_real tmp474; + fftw_real tmp1152; + fftw_real tmp594; + fftw_real tmp1160; + fftw_real tmp530; + fftw_real tmp588; + fftw_real tmp598; + fftw_real tmp604; + fftw_real tmp585; + fftw_real tmp589; + fftw_real tmp601; + fftw_real tmp605; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp395; + fftw_real tmp418; + fftw_real tmp1153; + fftw_real tmp1154; + ASSERT_ALIGNED_DOUBLE; + tmp395 = tmp383 - tmp394; + tmp418 = tmp406 - tmp417; + tmp419 = tmp395 - tmp418; + tmp591 = tmp395 + tmp418; + tmp1153 = tmp609 - tmp608; + tmp1154 = tmp1139 - tmp1138; + tmp1155 = tmp1153 + tmp1154; + tmp1161 = tmp1154 - tmp1153; + } + { + fftw_real tmp446; + fftw_real tmp592; + fftw_real tmp473; + fftw_real tmp593; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp436; + fftw_real tmp445; + fftw_real tmp463; + fftw_real tmp472; + ASSERT_ALIGNED_DOUBLE; + tmp436 = tmp424 - tmp435; + tmp445 = tmp441 - tmp444; + tmp446 = (K195090322 * tmp436) - (K980785280 * tmp445); + tmp592 = (K980785280 * tmp436) + (K195090322 * tmp445); + tmp463 = tmp451 - tmp462; + tmp472 = tmp468 - tmp471; + tmp473 = (K195090322 * tmp463) + (K980785280 * tmp472); + tmp593 = (K195090322 * tmp472) - (K980785280 * tmp463); + } + tmp474 = tmp446 - tmp473; + tmp1152 = tmp446 + tmp473; + tmp594 = tmp592 + tmp593; + tmp1160 = tmp593 - tmp592; + } + { + fftw_real tmp516; + fftw_real tmp596; + fftw_real tmp529; + fftw_real tmp597; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp492; + fftw_real tmp515; + fftw_real tmp525; + fftw_real tmp528; + ASSERT_ALIGNED_DOUBLE; + tmp492 = tmp480 - tmp491; + tmp515 = tmp503 - tmp514; + tmp516 = tmp492 - tmp515; + tmp596 = tmp492 + tmp515; + tmp525 = tmp521 - tmp524; + tmp528 = tmp526 - tmp527; + tmp529 = tmp525 - tmp528; + tmp597 = tmp525 + tmp528; + } + tmp530 = (K995184726 * tmp516) + (K098017140 * tmp529); + tmp588 = (K098017140 * tmp516) - (K995184726 * tmp529); + tmp598 = (K634393284 * tmp596) + (K773010453 * tmp597); + tmp604 = (K773010453 * tmp596) - (K634393284 * tmp597); + } + { + fftw_real tmp571; + fftw_real tmp599; + fftw_real tmp584; + fftw_real tmp600; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp547; + fftw_real tmp570; + fftw_real tmp580; + fftw_real tmp583; + ASSERT_ALIGNED_DOUBLE; + tmp547 = tmp535 - tmp546; + tmp570 = tmp558 - tmp569; + tmp571 = tmp547 - tmp570; + tmp599 = tmp547 + tmp570; + tmp580 = tmp576 - tmp579; + tmp583 = tmp581 - tmp582; + tmp584 = tmp580 - tmp583; + tmp600 = tmp580 + tmp583; + } + tmp585 = (K098017140 * tmp571) - (K995184726 * tmp584); + tmp589 = (K098017140 * tmp584) + (K995184726 * tmp571); + tmp601 = (K773010453 * tmp599) - (K634393284 * tmp600); + tmp605 = (K773010453 * tmp600) + (K634393284 * tmp599); + } + { + fftw_real tmp475; + fftw_real tmp586; + fftw_real tmp587; + fftw_real tmp590; + ASSERT_ALIGNED_DOUBLE; + tmp475 = tmp419 + tmp474; + tmp586 = tmp530 + tmp585; + c_re(inout[47 * iostride]) = tmp475 - tmp586; + c_re(inout[15 * iostride]) = tmp475 + tmp586; + tmp587 = tmp419 - tmp474; + tmp590 = tmp588 - tmp589; + c_re(inout[63 * iostride]) = tmp587 - tmp590; + c_re(inout[31 * iostride]) = tmp587 + tmp590; + } + { + fftw_real tmp1159; + fftw_real tmp1162; + fftw_real tmp1163; + fftw_real tmp1164; + ASSERT_ALIGNED_DOUBLE; + tmp1159 = tmp588 + tmp589; + tmp1162 = tmp1160 + tmp1161; + c_im(inout[15 * iostride]) = tmp1159 + tmp1162; + c_im(inout[47 * iostride]) = tmp1162 - tmp1159; + tmp1163 = tmp585 - tmp530; + tmp1164 = tmp1161 - tmp1160; + c_im(inout[31 * iostride]) = tmp1163 + tmp1164; + c_im(inout[63 * iostride]) = tmp1164 - tmp1163; + } + { + fftw_real tmp595; + fftw_real tmp602; + fftw_real tmp603; + fftw_real tmp606; + ASSERT_ALIGNED_DOUBLE; + tmp595 = tmp591 + tmp594; + tmp602 = tmp598 + tmp601; + c_re(inout[39 * iostride]) = tmp595 - tmp602; + c_re(inout[7 * iostride]) = tmp595 + tmp602; + tmp603 = tmp591 - tmp594; + tmp606 = tmp604 - tmp605; + c_re(inout[55 * iostride]) = tmp603 - tmp606; + c_re(inout[23 * iostride]) = tmp603 + tmp606; + } + { + fftw_real tmp1151; + fftw_real tmp1156; + fftw_real tmp1157; + fftw_real tmp1158; + ASSERT_ALIGNED_DOUBLE; + tmp1151 = tmp604 + tmp605; + tmp1156 = tmp1152 + tmp1155; + c_im(inout[7 * iostride]) = tmp1151 + tmp1156; + c_im(inout[39 * iostride]) = tmp1156 - tmp1151; + tmp1157 = tmp601 - tmp598; + tmp1158 = tmp1155 - tmp1152; + c_im(inout[23 * iostride]) = tmp1157 + tmp1158; + c_im(inout[55 * iostride]) = tmp1158 - tmp1157; + } + } + { + fftw_real tmp611; + fftw_real tmp639; + fftw_real tmp1141; + fftw_real tmp1147; + fftw_real tmp618; + fftw_real tmp1136; + fftw_real tmp642; + fftw_real tmp1146; + fftw_real tmp626; + fftw_real tmp636; + fftw_real tmp646; + fftw_real tmp652; + fftw_real tmp633; + fftw_real tmp637; + fftw_real tmp649; + fftw_real tmp653; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp607; + fftw_real tmp610; + fftw_real tmp1137; + fftw_real tmp1140; + ASSERT_ALIGNED_DOUBLE; + tmp607 = tmp383 + tmp394; + tmp610 = tmp608 + tmp609; + tmp611 = tmp607 - tmp610; + tmp639 = tmp607 + tmp610; + tmp1137 = tmp406 + tmp417; + tmp1140 = tmp1138 + tmp1139; + tmp1141 = tmp1137 + tmp1140; + tmp1147 = tmp1140 - tmp1137; + } + { + fftw_real tmp614; + fftw_real tmp640; + fftw_real tmp617; + fftw_real tmp641; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp612; + fftw_real tmp613; + fftw_real tmp615; + fftw_real tmp616; + ASSERT_ALIGNED_DOUBLE; + tmp612 = tmp424 + tmp435; + tmp613 = tmp441 + tmp444; + tmp614 = (K831469612 * tmp612) - (K555570233 * tmp613); + tmp640 = (K555570233 * tmp612) + (K831469612 * tmp613); + tmp615 = tmp451 + tmp462; + tmp616 = tmp468 + tmp471; + tmp617 = (K831469612 * tmp615) + (K555570233 * tmp616); + tmp641 = (K831469612 * tmp616) - (K555570233 * tmp615); + } + tmp618 = tmp614 - tmp617; + tmp1136 = tmp614 + tmp617; + tmp642 = tmp640 + tmp641; + tmp1146 = tmp641 - tmp640; + } + { + fftw_real tmp622; + fftw_real tmp644; + fftw_real tmp625; + fftw_real tmp645; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp620; + fftw_real tmp621; + fftw_real tmp623; + fftw_real tmp624; + ASSERT_ALIGNED_DOUBLE; + tmp620 = tmp521 + tmp524; + tmp621 = tmp514 + tmp503; + tmp622 = tmp620 - tmp621; + tmp644 = tmp620 + tmp621; + tmp623 = tmp480 + tmp491; + tmp624 = tmp526 + tmp527; + tmp625 = tmp623 - tmp624; + tmp645 = tmp623 + tmp624; + } + tmp626 = (K471396736 * tmp622) + (K881921264 * tmp625); + tmp636 = (K471396736 * tmp625) - (K881921264 * tmp622); + tmp646 = (K956940335 * tmp644) + (K290284677 * tmp645); + tmp652 = (K956940335 * tmp645) - (K290284677 * tmp644); + } + { + fftw_real tmp629; + fftw_real tmp647; + fftw_real tmp632; + fftw_real tmp648; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp627; + fftw_real tmp628; + fftw_real tmp630; + fftw_real tmp631; + ASSERT_ALIGNED_DOUBLE; + tmp627 = tmp535 + tmp546; + tmp628 = tmp582 + tmp581; + tmp629 = tmp627 - tmp628; + tmp647 = tmp627 + tmp628; + tmp630 = tmp576 + tmp579; + tmp631 = tmp558 + tmp569; + tmp632 = tmp630 - tmp631; + tmp648 = tmp630 + tmp631; + } + tmp633 = (K471396736 * tmp629) - (K881921264 * tmp632); + tmp637 = (K881921264 * tmp629) + (K471396736 * tmp632); + tmp649 = (K956940335 * tmp647) - (K290284677 * tmp648); + tmp653 = (K290284677 * tmp647) + (K956940335 * tmp648); + } + { + fftw_real tmp619; + fftw_real tmp634; + fftw_real tmp635; + fftw_real tmp638; + ASSERT_ALIGNED_DOUBLE; + tmp619 = tmp611 + tmp618; + tmp634 = tmp626 + tmp633; + c_re(inout[43 * iostride]) = tmp619 - tmp634; + c_re(inout[11 * iostride]) = tmp619 + tmp634; + tmp635 = tmp611 - tmp618; + tmp638 = tmp636 - tmp637; + c_re(inout[59 * iostride]) = tmp635 - tmp638; + c_re(inout[27 * iostride]) = tmp635 + tmp638; + } + { + fftw_real tmp1145; + fftw_real tmp1148; + fftw_real tmp1149; + fftw_real tmp1150; + ASSERT_ALIGNED_DOUBLE; + tmp1145 = tmp636 + tmp637; + tmp1148 = tmp1146 + tmp1147; + c_im(inout[11 * iostride]) = tmp1145 + tmp1148; + c_im(inout[43 * iostride]) = tmp1148 - tmp1145; + tmp1149 = tmp633 - tmp626; + tmp1150 = tmp1147 - tmp1146; + c_im(inout[27 * iostride]) = tmp1149 + tmp1150; + c_im(inout[59 * iostride]) = tmp1150 - tmp1149; + } + { + fftw_real tmp643; + fftw_real tmp650; + fftw_real tmp651; + fftw_real tmp654; + ASSERT_ALIGNED_DOUBLE; + tmp643 = tmp639 + tmp642; + tmp650 = tmp646 + tmp649; + c_re(inout[35 * iostride]) = tmp643 - tmp650; + c_re(inout[3 * iostride]) = tmp643 + tmp650; + tmp651 = tmp639 - tmp642; + tmp654 = tmp652 - tmp653; + c_re(inout[51 * iostride]) = tmp651 - tmp654; + c_re(inout[19 * iostride]) = tmp651 + tmp654; + } + { + fftw_real tmp1135; + fftw_real tmp1142; + fftw_real tmp1143; + fftw_real tmp1144; + ASSERT_ALIGNED_DOUBLE; + tmp1135 = tmp652 + tmp653; + tmp1142 = tmp1136 + tmp1141; + c_im(inout[3 * iostride]) = tmp1135 + tmp1142; + c_im(inout[35 * iostride]) = tmp1142 - tmp1135; + tmp1143 = tmp649 - tmp646; + tmp1144 = tmp1141 - tmp1136; + c_im(inout[19 * iostride]) = tmp1143 + tmp1144; + c_im(inout[51 * iostride]) = tmp1144 - tmp1143; + } + } + { + fftw_real tmp807; + fftw_real tmp891; + fftw_real tmp830; + fftw_real tmp1090; + fftw_real tmp1093; + fftw_real tmp1099; + fftw_real tmp894; + fftw_real tmp1098; + fftw_real tmp885; + fftw_real tmp889; + fftw_real tmp901; + fftw_real tmp905; + fftw_real tmp858; + fftw_real tmp888; + fftw_real tmp898; + fftw_real tmp904; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp795; + fftw_real tmp806; + fftw_real tmp892; + fftw_real tmp893; + ASSERT_ALIGNED_DOUBLE; + tmp795 = tmp791 - tmp794; + tmp806 = K707106781 * (tmp800 - tmp805); + tmp807 = tmp795 - tmp806; + tmp891 = tmp795 + tmp806; + { + fftw_real tmp818; + fftw_real tmp829; + fftw_real tmp1091; + fftw_real tmp1092; + ASSERT_ALIGNED_DOUBLE; + tmp818 = (K382683432 * tmp812) - (K923879532 * tmp817); + tmp829 = (K382683432 * tmp823) + (K923879532 * tmp828); + tmp830 = tmp818 - tmp829; + tmp1090 = tmp818 + tmp829; + tmp1091 = K707106781 * (tmp909 - tmp908); + tmp1092 = tmp1077 - tmp1076; + tmp1093 = tmp1091 + tmp1092; + tmp1099 = tmp1092 - tmp1091; + } + tmp892 = (K923879532 * tmp812) + (K382683432 * tmp817); + tmp893 = (K382683432 * tmp828) - (K923879532 * tmp823); + tmp894 = tmp892 + tmp893; + tmp1098 = tmp893 - tmp892; + { + fftw_real tmp875; + fftw_real tmp899; + fftw_real tmp884; + fftw_real tmp900; + fftw_real tmp874; + fftw_real tmp883; + ASSERT_ALIGNED_DOUBLE; + tmp874 = K707106781 * (tmp868 - tmp873); + tmp875 = tmp863 - tmp874; + tmp899 = tmp863 + tmp874; + tmp883 = K707106781 * (tmp881 - tmp882); + tmp884 = tmp880 - tmp883; + tmp900 = tmp880 + tmp883; + tmp885 = (K195090322 * tmp875) - (K980785280 * tmp884); + tmp889 = (K195090322 * tmp884) + (K980785280 * tmp875); + tmp901 = (K831469612 * tmp899) - (K555570233 * tmp900); + tmp905 = (K831469612 * tmp900) + (K555570233 * tmp899); + } + { + fftw_real tmp848; + fftw_real tmp896; + fftw_real tmp857; + fftw_real tmp897; + fftw_real tmp847; + fftw_real tmp856; + ASSERT_ALIGNED_DOUBLE; + tmp847 = K707106781 * (tmp841 - tmp846); + tmp848 = tmp836 - tmp847; + tmp896 = tmp836 + tmp847; + tmp856 = K707106781 * (tmp854 - tmp855); + tmp857 = tmp853 - tmp856; + tmp897 = tmp853 + tmp856; + tmp858 = (K980785280 * tmp848) + (K195090322 * tmp857); + tmp888 = (K195090322 * tmp848) - (K980785280 * tmp857); + tmp898 = (K555570233 * tmp896) + (K831469612 * tmp897); + tmp904 = (K831469612 * tmp896) - (K555570233 * tmp897); + } + } + { + fftw_real tmp831; + fftw_real tmp886; + fftw_real tmp887; + fftw_real tmp890; + ASSERT_ALIGNED_DOUBLE; + tmp831 = tmp807 + tmp830; + tmp886 = tmp858 + tmp885; + c_re(inout[46 * iostride]) = tmp831 - tmp886; + c_re(inout[14 * iostride]) = tmp831 + tmp886; + tmp887 = tmp807 - tmp830; + tmp890 = tmp888 - tmp889; + c_re(inout[62 * iostride]) = tmp887 - tmp890; + c_re(inout[30 * iostride]) = tmp887 + tmp890; + } + { + fftw_real tmp1097; + fftw_real tmp1100; + fftw_real tmp1101; + fftw_real tmp1102; + ASSERT_ALIGNED_DOUBLE; + tmp1097 = tmp888 + tmp889; + tmp1100 = tmp1098 + tmp1099; + c_im(inout[14 * iostride]) = tmp1097 + tmp1100; + c_im(inout[46 * iostride]) = tmp1100 - tmp1097; + tmp1101 = tmp885 - tmp858; + tmp1102 = tmp1099 - tmp1098; + c_im(inout[30 * iostride]) = tmp1101 + tmp1102; + c_im(inout[62 * iostride]) = tmp1102 - tmp1101; + } + { + fftw_real tmp895; + fftw_real tmp902; + fftw_real tmp903; + fftw_real tmp906; + ASSERT_ALIGNED_DOUBLE; + tmp895 = tmp891 + tmp894; + tmp902 = tmp898 + tmp901; + c_re(inout[38 * iostride]) = tmp895 - tmp902; + c_re(inout[6 * iostride]) = tmp895 + tmp902; + tmp903 = tmp891 - tmp894; + tmp906 = tmp904 - tmp905; + c_re(inout[54 * iostride]) = tmp903 - tmp906; + c_re(inout[22 * iostride]) = tmp903 + tmp906; + } + { + fftw_real tmp1089; + fftw_real tmp1094; + fftw_real tmp1095; + fftw_real tmp1096; + ASSERT_ALIGNED_DOUBLE; + tmp1089 = tmp904 + tmp905; + tmp1094 = tmp1090 + tmp1093; + c_im(inout[6 * iostride]) = tmp1089 + tmp1094; + c_im(inout[38 * iostride]) = tmp1094 - tmp1089; + tmp1095 = tmp901 - tmp898; + tmp1096 = tmp1093 - tmp1090; + c_im(inout[22 * iostride]) = tmp1095 + tmp1096; + c_im(inout[54 * iostride]) = tmp1096 - tmp1095; + } + } + { + fftw_real tmp911; + fftw_real tmp939; + fftw_real tmp918; + fftw_real tmp1074; + fftw_real tmp1079; + fftw_real tmp1085; + fftw_real tmp942; + fftw_real tmp1084; + fftw_real tmp933; + fftw_real tmp937; + fftw_real tmp949; + fftw_real tmp953; + fftw_real tmp926; + fftw_real tmp936; + fftw_real tmp946; + fftw_real tmp952; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp907; + fftw_real tmp910; + fftw_real tmp940; + fftw_real tmp941; + ASSERT_ALIGNED_DOUBLE; + tmp907 = tmp791 + tmp794; + tmp910 = K707106781 * (tmp908 + tmp909); + tmp911 = tmp907 - tmp910; + tmp939 = tmp907 + tmp910; + { + fftw_real tmp914; + fftw_real tmp917; + fftw_real tmp1075; + fftw_real tmp1078; + ASSERT_ALIGNED_DOUBLE; + tmp914 = (K923879532 * tmp912) - (K382683432 * tmp913); + tmp917 = (K923879532 * tmp915) + (K382683432 * tmp916); + tmp918 = tmp914 - tmp917; + tmp1074 = tmp914 + tmp917; + tmp1075 = K707106781 * (tmp800 + tmp805); + tmp1078 = tmp1076 + tmp1077; + tmp1079 = tmp1075 + tmp1078; + tmp1085 = tmp1078 - tmp1075; + } + tmp940 = (K382683432 * tmp912) + (K923879532 * tmp913); + tmp941 = (K923879532 * tmp916) - (K382683432 * tmp915); + tmp942 = tmp940 + tmp941; + tmp1084 = tmp941 - tmp940; + { + fftw_real tmp929; + fftw_real tmp947; + fftw_real tmp932; + fftw_real tmp948; + fftw_real tmp928; + fftw_real tmp931; + ASSERT_ALIGNED_DOUBLE; + tmp928 = K707106781 * (tmp882 + tmp881); + tmp929 = tmp927 - tmp928; + tmp947 = tmp927 + tmp928; + tmp931 = K707106781 * (tmp868 + tmp873); + tmp932 = tmp930 - tmp931; + tmp948 = tmp930 + tmp931; + tmp933 = (K555570233 * tmp929) - (K831469612 * tmp932); + tmp937 = (K831469612 * tmp929) + (K555570233 * tmp932); + tmp949 = (K980785280 * tmp947) - (K195090322 * tmp948); + tmp953 = (K195090322 * tmp947) + (K980785280 * tmp948); + } + { + fftw_real tmp922; + fftw_real tmp944; + fftw_real tmp925; + fftw_real tmp945; + fftw_real tmp921; + fftw_real tmp924; + ASSERT_ALIGNED_DOUBLE; + tmp921 = K707106781 * (tmp846 + tmp841); + tmp922 = tmp920 - tmp921; + tmp944 = tmp920 + tmp921; + tmp924 = K707106781 * (tmp854 + tmp855); + tmp925 = tmp923 - tmp924; + tmp945 = tmp923 + tmp924; + tmp926 = (K555570233 * tmp922) + (K831469612 * tmp925); + tmp936 = (K555570233 * tmp925) - (K831469612 * tmp922); + tmp946 = (K980785280 * tmp944) + (K195090322 * tmp945); + tmp952 = (K980785280 * tmp945) - (K195090322 * tmp944); + } + } + { + fftw_real tmp919; + fftw_real tmp934; + fftw_real tmp935; + fftw_real tmp938; + ASSERT_ALIGNED_DOUBLE; + tmp919 = tmp911 + tmp918; + tmp934 = tmp926 + tmp933; + c_re(inout[42 * iostride]) = tmp919 - tmp934; + c_re(inout[10 * iostride]) = tmp919 + tmp934; + tmp935 = tmp911 - tmp918; + tmp938 = tmp936 - tmp937; + c_re(inout[58 * iostride]) = tmp935 - tmp938; + c_re(inout[26 * iostride]) = tmp935 + tmp938; + } + { + fftw_real tmp1083; + fftw_real tmp1086; + fftw_real tmp1087; + fftw_real tmp1088; + ASSERT_ALIGNED_DOUBLE; + tmp1083 = tmp936 + tmp937; + tmp1086 = tmp1084 + tmp1085; + c_im(inout[10 * iostride]) = tmp1083 + tmp1086; + c_im(inout[42 * iostride]) = tmp1086 - tmp1083; + tmp1087 = tmp933 - tmp926; + tmp1088 = tmp1085 - tmp1084; + c_im(inout[26 * iostride]) = tmp1087 + tmp1088; + c_im(inout[58 * iostride]) = tmp1088 - tmp1087; + } + { + fftw_real tmp943; + fftw_real tmp950; + fftw_real tmp951; + fftw_real tmp954; + ASSERT_ALIGNED_DOUBLE; + tmp943 = tmp939 + tmp942; + tmp950 = tmp946 + tmp949; + c_re(inout[34 * iostride]) = tmp943 - tmp950; + c_re(inout[2 * iostride]) = tmp943 + tmp950; + tmp951 = tmp939 - tmp942; + tmp954 = tmp952 - tmp953; + c_re(inout[50 * iostride]) = tmp951 - tmp954; + c_re(inout[18 * iostride]) = tmp951 + tmp954; + } + { + fftw_real tmp1073; + fftw_real tmp1080; + fftw_real tmp1081; + fftw_real tmp1082; + ASSERT_ALIGNED_DOUBLE; + tmp1073 = tmp952 + tmp953; + tmp1080 = tmp1074 + tmp1079; + c_im(inout[2 * iostride]) = tmp1073 + tmp1080; + c_im(inout[34 * iostride]) = tmp1080 - tmp1073; + tmp1081 = tmp949 - tmp946; + tmp1082 = tmp1079 - tmp1074; + c_im(inout[18 * iostride]) = tmp1081 + tmp1082; + c_im(inout[50 * iostride]) = tmp1082 - tmp1081; + } + } + { + fftw_real tmp667; + fftw_real tmp727; + fftw_real tmp1125; + fftw_real tmp1131; + fftw_real tmp682; + fftw_real tmp1122; + fftw_real tmp730; + fftw_real tmp1130; + fftw_real tmp702; + fftw_real tmp724; + fftw_real tmp734; + fftw_real tmp740; + fftw_real tmp721; + fftw_real tmp725; + fftw_real tmp737; + fftw_real tmp741; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp659; + fftw_real tmp666; + fftw_real tmp1123; + fftw_real tmp1124; + ASSERT_ALIGNED_DOUBLE; + tmp659 = tmp655 - tmp658; + tmp666 = tmp662 - tmp665; + tmp667 = tmp659 - tmp666; + tmp727 = tmp659 + tmp666; + tmp1123 = tmp745 - tmp744; + tmp1124 = tmp1109 - tmp1106; + tmp1125 = tmp1123 + tmp1124; + tmp1131 = tmp1124 - tmp1123; + } + { + fftw_real tmp674; + fftw_real tmp728; + fftw_real tmp681; + fftw_real tmp729; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp670; + fftw_real tmp673; + fftw_real tmp677; + fftw_real tmp680; + ASSERT_ALIGNED_DOUBLE; + tmp670 = tmp668 - tmp669; + tmp673 = tmp671 - tmp672; + tmp674 = (K555570233 * tmp670) - (K831469612 * tmp673); + tmp728 = (K555570233 * tmp673) + (K831469612 * tmp670); + tmp677 = tmp675 - tmp676; + tmp680 = tmp678 - tmp679; + tmp681 = (K831469612 * tmp677) + (K555570233 * tmp680); + tmp729 = (K555570233 * tmp677) - (K831469612 * tmp680); + } + tmp682 = tmp674 - tmp681; + tmp1122 = tmp674 + tmp681; + tmp730 = tmp728 + tmp729; + tmp1130 = tmp729 - tmp728; + } + { + fftw_real tmp694; + fftw_real tmp732; + fftw_real tmp701; + fftw_real tmp733; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp686; + fftw_real tmp693; + fftw_real tmp697; + fftw_real tmp700; + ASSERT_ALIGNED_DOUBLE; + tmp686 = tmp684 - tmp685; + tmp693 = tmp689 - tmp692; + tmp694 = tmp686 - tmp693; + tmp732 = tmp686 + tmp693; + tmp697 = tmp695 - tmp696; + tmp700 = tmp698 - tmp699; + tmp701 = tmp697 - tmp700; + tmp733 = tmp697 + tmp700; + } + tmp702 = (K956940335 * tmp694) + (K290284677 * tmp701); + tmp724 = (K290284677 * tmp694) - (K956940335 * tmp701); + tmp734 = (K471396736 * tmp732) + (K881921264 * tmp733); + tmp740 = (K881921264 * tmp732) - (K471396736 * tmp733); + } + { + fftw_real tmp713; + fftw_real tmp735; + fftw_real tmp720; + fftw_real tmp736; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp705; + fftw_real tmp712; + fftw_real tmp716; + fftw_real tmp719; + ASSERT_ALIGNED_DOUBLE; + tmp705 = tmp703 - tmp704; + tmp712 = tmp708 - tmp711; + tmp713 = tmp705 - tmp712; + tmp735 = tmp705 + tmp712; + tmp716 = tmp714 - tmp715; + tmp719 = tmp717 - tmp718; + tmp720 = tmp716 - tmp719; + tmp736 = tmp716 + tmp719; + } + tmp721 = (K290284677 * tmp713) - (K956940335 * tmp720); + tmp725 = (K290284677 * tmp720) + (K956940335 * tmp713); + tmp737 = (K881921264 * tmp735) - (K471396736 * tmp736); + tmp741 = (K881921264 * tmp736) + (K471396736 * tmp735); + } + { + fftw_real tmp683; + fftw_real tmp722; + fftw_real tmp723; + fftw_real tmp726; + ASSERT_ALIGNED_DOUBLE; + tmp683 = tmp667 + tmp682; + tmp722 = tmp702 + tmp721; + c_re(inout[45 * iostride]) = tmp683 - tmp722; + c_re(inout[13 * iostride]) = tmp683 + tmp722; + tmp723 = tmp667 - tmp682; + tmp726 = tmp724 - tmp725; + c_re(inout[61 * iostride]) = tmp723 - tmp726; + c_re(inout[29 * iostride]) = tmp723 + tmp726; + } + { + fftw_real tmp1129; + fftw_real tmp1132; + fftw_real tmp1133; + fftw_real tmp1134; + ASSERT_ALIGNED_DOUBLE; + tmp1129 = tmp724 + tmp725; + tmp1132 = tmp1130 + tmp1131; + c_im(inout[13 * iostride]) = tmp1129 + tmp1132; + c_im(inout[45 * iostride]) = tmp1132 - tmp1129; + tmp1133 = tmp721 - tmp702; + tmp1134 = tmp1131 - tmp1130; + c_im(inout[29 * iostride]) = tmp1133 + tmp1134; + c_im(inout[61 * iostride]) = tmp1134 - tmp1133; + } + { + fftw_real tmp731; + fftw_real tmp738; + fftw_real tmp739; + fftw_real tmp742; + ASSERT_ALIGNED_DOUBLE; + tmp731 = tmp727 + tmp730; + tmp738 = tmp734 + tmp737; + c_re(inout[37 * iostride]) = tmp731 - tmp738; + c_re(inout[5 * iostride]) = tmp731 + tmp738; + tmp739 = tmp727 - tmp730; + tmp742 = tmp740 - tmp741; + c_re(inout[53 * iostride]) = tmp739 - tmp742; + c_re(inout[21 * iostride]) = tmp739 + tmp742; + } + { + fftw_real tmp1121; + fftw_real tmp1126; + fftw_real tmp1127; + fftw_real tmp1128; + ASSERT_ALIGNED_DOUBLE; + tmp1121 = tmp740 + tmp741; + tmp1126 = tmp1122 + tmp1125; + c_im(inout[5 * iostride]) = tmp1121 + tmp1126; + c_im(inout[37 * iostride]) = tmp1126 - tmp1121; + tmp1127 = tmp737 - tmp734; + tmp1128 = tmp1125 - tmp1122; + c_im(inout[21 * iostride]) = tmp1127 + tmp1128; + c_im(inout[53 * iostride]) = tmp1128 - tmp1127; + } + } + { + fftw_real tmp747; + fftw_real tmp775; + fftw_real tmp1111; + fftw_real tmp1117; + fftw_real tmp754; + fftw_real tmp1104; + fftw_real tmp778; + fftw_real tmp1116; + fftw_real tmp762; + fftw_real tmp772; + fftw_real tmp782; + fftw_real tmp788; + fftw_real tmp769; + fftw_real tmp773; + fftw_real tmp785; + fftw_real tmp789; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp743; + fftw_real tmp746; + fftw_real tmp1105; + fftw_real tmp1110; + ASSERT_ALIGNED_DOUBLE; + tmp743 = tmp655 + tmp658; + tmp746 = tmp744 + tmp745; + tmp747 = tmp743 - tmp746; + tmp775 = tmp743 + tmp746; + tmp1105 = tmp662 + tmp665; + tmp1110 = tmp1106 + tmp1109; + tmp1111 = tmp1105 + tmp1110; + tmp1117 = tmp1110 - tmp1105; + } + { + fftw_real tmp750; + fftw_real tmp776; + fftw_real tmp753; + fftw_real tmp777; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp748; + fftw_real tmp749; + fftw_real tmp751; + fftw_real tmp752; + ASSERT_ALIGNED_DOUBLE; + tmp748 = tmp668 + tmp669; + tmp749 = tmp671 + tmp672; + tmp750 = (K980785280 * tmp748) - (K195090322 * tmp749); + tmp776 = (K980785280 * tmp749) + (K195090322 * tmp748); + tmp751 = tmp675 + tmp676; + tmp752 = tmp678 + tmp679; + tmp753 = (K195090322 * tmp751) + (K980785280 * tmp752); + tmp777 = (K980785280 * tmp751) - (K195090322 * tmp752); + } + tmp754 = tmp750 - tmp753; + tmp1104 = tmp750 + tmp753; + tmp778 = tmp776 + tmp777; + tmp1116 = tmp777 - tmp776; + } + { + fftw_real tmp758; + fftw_real tmp780; + fftw_real tmp761; + fftw_real tmp781; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp756; + fftw_real tmp757; + fftw_real tmp759; + fftw_real tmp760; + ASSERT_ALIGNED_DOUBLE; + tmp756 = tmp695 + tmp696; + tmp757 = tmp692 + tmp689; + tmp758 = tmp756 - tmp757; + tmp780 = tmp756 + tmp757; + tmp759 = tmp684 + tmp685; + tmp760 = tmp698 + tmp699; + tmp761 = tmp759 - tmp760; + tmp781 = tmp759 + tmp760; + } + tmp762 = (K634393284 * tmp758) + (K773010453 * tmp761); + tmp772 = (K634393284 * tmp761) - (K773010453 * tmp758); + tmp782 = (K995184726 * tmp780) + (K098017140 * tmp781); + tmp788 = (K995184726 * tmp781) - (K098017140 * tmp780); + } + { + fftw_real tmp765; + fftw_real tmp783; + fftw_real tmp768; + fftw_real tmp784; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp763; + fftw_real tmp764; + fftw_real tmp766; + fftw_real tmp767; + ASSERT_ALIGNED_DOUBLE; + tmp763 = tmp703 + tmp704; + tmp764 = tmp718 + tmp717; + tmp765 = tmp763 - tmp764; + tmp783 = tmp763 + tmp764; + tmp766 = tmp714 + tmp715; + tmp767 = tmp708 + tmp711; + tmp768 = tmp766 - tmp767; + tmp784 = tmp766 + tmp767; + } + tmp769 = (K634393284 * tmp765) - (K773010453 * tmp768); + tmp773 = (K773010453 * tmp765) + (K634393284 * tmp768); + tmp785 = (K995184726 * tmp783) - (K098017140 * tmp784); + tmp789 = (K098017140 * tmp783) + (K995184726 * tmp784); + } + { + fftw_real tmp755; + fftw_real tmp770; + fftw_real tmp771; + fftw_real tmp774; + ASSERT_ALIGNED_DOUBLE; + tmp755 = tmp747 + tmp754; + tmp770 = tmp762 + tmp769; + c_re(inout[41 * iostride]) = tmp755 - tmp770; + c_re(inout[9 * iostride]) = tmp755 + tmp770; + tmp771 = tmp747 - tmp754; + tmp774 = tmp772 - tmp773; + c_re(inout[57 * iostride]) = tmp771 - tmp774; + c_re(inout[25 * iostride]) = tmp771 + tmp774; + } + { + fftw_real tmp1115; + fftw_real tmp1118; + fftw_real tmp1119; + fftw_real tmp1120; + ASSERT_ALIGNED_DOUBLE; + tmp1115 = tmp772 + tmp773; + tmp1118 = tmp1116 + tmp1117; + c_im(inout[9 * iostride]) = tmp1115 + tmp1118; + c_im(inout[41 * iostride]) = tmp1118 - tmp1115; + tmp1119 = tmp769 - tmp762; + tmp1120 = tmp1117 - tmp1116; + c_im(inout[25 * iostride]) = tmp1119 + tmp1120; + c_im(inout[57 * iostride]) = tmp1120 - tmp1119; + } + { + fftw_real tmp779; + fftw_real tmp786; + fftw_real tmp787; + fftw_real tmp790; + ASSERT_ALIGNED_DOUBLE; + tmp779 = tmp775 + tmp778; + tmp786 = tmp782 + tmp785; + c_re(inout[33 * iostride]) = tmp779 - tmp786; + c_re(inout[iostride]) = tmp779 + tmp786; + tmp787 = tmp775 - tmp778; + tmp790 = tmp788 - tmp789; + c_re(inout[49 * iostride]) = tmp787 - tmp790; + c_re(inout[17 * iostride]) = tmp787 + tmp790; + } + { + fftw_real tmp1103; + fftw_real tmp1112; + fftw_real tmp1113; + fftw_real tmp1114; + ASSERT_ALIGNED_DOUBLE; + tmp1103 = tmp788 + tmp789; + tmp1112 = tmp1104 + tmp1111; + c_im(inout[iostride]) = tmp1103 + tmp1112; + c_im(inout[33 * iostride]) = tmp1112 - tmp1103; + tmp1113 = tmp785 - tmp782; + tmp1114 = tmp1111 - tmp1104; + c_im(inout[17 * iostride]) = tmp1113 + tmp1114; + c_im(inout[49 * iostride]) = tmp1114 - tmp1113; + } + } + } +} + +static const int twiddle_order[] = +{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63}; +fftw_codelet_desc fftw_twiddle_64_desc = +{ + "fftw_twiddle_64", + (void (*)()) fftw_twiddle_64, + 64, + FFTW_FORWARD, + FFTW_TWIDDLE, + 1408, + 63, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/ftw_7.c b/src/sndobj/rfftw/ftw_7.c new file mode 100644 index 0000000..58c1f9b --- /dev/null +++ b/src/sndobj/rfftw/ftw_7.c @@ -0,0 +1,243 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:33 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddle 7 */ + +/* + * This function contains 72 FP additions, 60 FP multiplications, + * (or, 60 additions, 48 multiplications, 12 fused multiply/add), + * 24 stack variables, and 28 memory accesses + */ +static const fftw_real K222520933 = FFTW_KONST(+0.222520933956314404288902564496794759466355569); +static const fftw_real K900968867 = FFTW_KONST(+0.900968867902419126236102319507445051165919162); +static const fftw_real K623489801 = FFTW_KONST(+0.623489801858733530525004884004239810632274731); +static const fftw_real K433883739 = FFTW_KONST(+0.433883739117558120475768332848358754609990728); +static const fftw_real K974927912 = FFTW_KONST(+0.974927912181823607018131682993931217232785801); +static const fftw_real K781831482 = FFTW_KONST(+0.781831482468029808708444526674057750232334519); + +/* + * Generator Id's : + * $Id: ftw_7.c,v 1.1.1.1 2006/05/12 15:14:50 veplaini Exp $ + * $Id: ftw_7.c,v 1.1.1.1 2006/05/12 15:14:50 veplaini Exp $ + * $Id: ftw_7.c,v 1.1.1.1 2006/05/12 15:14:50 veplaini Exp $ + */ + +void fftw_twiddle_7(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_complex *inout; + inout = A; + for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 6) { + fftw_real tmp1; + fftw_real tmp53; + fftw_real tmp12; + fftw_real tmp54; + fftw_real tmp38; + fftw_real tmp50; + fftw_real tmp23; + fftw_real tmp55; + fftw_real tmp44; + fftw_real tmp51; + fftw_real tmp34; + fftw_real tmp56; + fftw_real tmp41; + fftw_real tmp52; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(inout[0]); + tmp53 = c_im(inout[0]); + { + fftw_real tmp6; + fftw_real tmp36; + fftw_real tmp11; + fftw_real tmp37; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp3; + fftw_real tmp5; + fftw_real tmp2; + fftw_real tmp4; + ASSERT_ALIGNED_DOUBLE; + tmp3 = c_re(inout[iostride]); + tmp5 = c_im(inout[iostride]); + tmp2 = c_re(W[0]); + tmp4 = c_im(W[0]); + tmp6 = (tmp2 * tmp3) - (tmp4 * tmp5); + tmp36 = (tmp4 * tmp3) + (tmp2 * tmp5); + } + { + fftw_real tmp8; + fftw_real tmp10; + fftw_real tmp7; + fftw_real tmp9; + ASSERT_ALIGNED_DOUBLE; + tmp8 = c_re(inout[6 * iostride]); + tmp10 = c_im(inout[6 * iostride]); + tmp7 = c_re(W[5]); + tmp9 = c_im(W[5]); + tmp11 = (tmp7 * tmp8) - (tmp9 * tmp10); + tmp37 = (tmp9 * tmp8) + (tmp7 * tmp10); + } + tmp12 = tmp6 + tmp11; + tmp54 = tmp11 - tmp6; + tmp38 = tmp36 - tmp37; + tmp50 = tmp36 + tmp37; + } + { + fftw_real tmp17; + fftw_real tmp42; + fftw_real tmp22; + fftw_real tmp43; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp14; + fftw_real tmp16; + fftw_real tmp13; + fftw_real tmp15; + ASSERT_ALIGNED_DOUBLE; + tmp14 = c_re(inout[2 * iostride]); + tmp16 = c_im(inout[2 * iostride]); + tmp13 = c_re(W[1]); + tmp15 = c_im(W[1]); + tmp17 = (tmp13 * tmp14) - (tmp15 * tmp16); + tmp42 = (tmp15 * tmp14) + (tmp13 * tmp16); + } + { + fftw_real tmp19; + fftw_real tmp21; + fftw_real tmp18; + fftw_real tmp20; + ASSERT_ALIGNED_DOUBLE; + tmp19 = c_re(inout[5 * iostride]); + tmp21 = c_im(inout[5 * iostride]); + tmp18 = c_re(W[4]); + tmp20 = c_im(W[4]); + tmp22 = (tmp18 * tmp19) - (tmp20 * tmp21); + tmp43 = (tmp20 * tmp19) + (tmp18 * tmp21); + } + tmp23 = tmp17 + tmp22; + tmp55 = tmp22 - tmp17; + tmp44 = tmp42 - tmp43; + tmp51 = tmp42 + tmp43; + } + { + fftw_real tmp28; + fftw_real tmp39; + fftw_real tmp33; + fftw_real tmp40; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp25; + fftw_real tmp27; + fftw_real tmp24; + fftw_real tmp26; + ASSERT_ALIGNED_DOUBLE; + tmp25 = c_re(inout[3 * iostride]); + tmp27 = c_im(inout[3 * iostride]); + tmp24 = c_re(W[2]); + tmp26 = c_im(W[2]); + tmp28 = (tmp24 * tmp25) - (tmp26 * tmp27); + tmp39 = (tmp26 * tmp25) + (tmp24 * tmp27); + } + { + fftw_real tmp30; + fftw_real tmp32; + fftw_real tmp29; + fftw_real tmp31; + ASSERT_ALIGNED_DOUBLE; + tmp30 = c_re(inout[4 * iostride]); + tmp32 = c_im(inout[4 * iostride]); + tmp29 = c_re(W[3]); + tmp31 = c_im(W[3]); + tmp33 = (tmp29 * tmp30) - (tmp31 * tmp32); + tmp40 = (tmp31 * tmp30) + (tmp29 * tmp32); + } + tmp34 = tmp28 + tmp33; + tmp56 = tmp33 - tmp28; + tmp41 = tmp39 - tmp40; + tmp52 = tmp39 + tmp40; + } + { + fftw_real tmp47; + fftw_real tmp46; + fftw_real tmp59; + fftw_real tmp60; + ASSERT_ALIGNED_DOUBLE; + c_re(inout[0]) = tmp1 + tmp12 + tmp23 + tmp34; + tmp47 = (K781831482 * tmp38) + (K974927912 * tmp44) + (K433883739 * tmp41); + tmp46 = tmp1 + (K623489801 * tmp12) - (K900968867 * tmp34) - (K222520933 * tmp23); + c_re(inout[6 * iostride]) = tmp46 - tmp47; + c_re(inout[iostride]) = tmp46 + tmp47; + { + fftw_real tmp49; + fftw_real tmp48; + fftw_real tmp45; + fftw_real tmp35; + ASSERT_ALIGNED_DOUBLE; + tmp49 = (K433883739 * tmp38) + (K974927912 * tmp41) - (K781831482 * tmp44); + tmp48 = tmp1 + (K623489801 * tmp23) - (K222520933 * tmp34) - (K900968867 * tmp12); + c_re(inout[4 * iostride]) = tmp48 - tmp49; + c_re(inout[3 * iostride]) = tmp48 + tmp49; + tmp45 = (K974927912 * tmp38) - (K781831482 * tmp41) - (K433883739 * tmp44); + tmp35 = tmp1 + (K623489801 * tmp34) - (K900968867 * tmp23) - (K222520933 * tmp12); + c_re(inout[5 * iostride]) = tmp35 - tmp45; + c_re(inout[2 * iostride]) = tmp35 + tmp45; + } + c_im(inout[0]) = tmp50 + tmp51 + tmp52 + tmp53; + tmp59 = (K974927912 * tmp54) - (K781831482 * tmp56) - (K433883739 * tmp55); + tmp60 = (K623489801 * tmp52) + tmp53 - (K900968867 * tmp51) - (K222520933 * tmp50); + c_im(inout[2 * iostride]) = tmp59 + tmp60; + c_im(inout[5 * iostride]) = tmp60 - tmp59; + { + fftw_real tmp61; + fftw_real tmp62; + fftw_real tmp57; + fftw_real tmp58; + ASSERT_ALIGNED_DOUBLE; + tmp61 = (K433883739 * tmp54) + (K974927912 * tmp56) - (K781831482 * tmp55); + tmp62 = (K623489801 * tmp51) + tmp53 - (K222520933 * tmp52) - (K900968867 * tmp50); + c_im(inout[3 * iostride]) = tmp61 + tmp62; + c_im(inout[4 * iostride]) = tmp62 - tmp61; + tmp57 = (K781831482 * tmp54) + (K974927912 * tmp55) + (K433883739 * tmp56); + tmp58 = (K623489801 * tmp50) + tmp53 - (K900968867 * tmp52) - (K222520933 * tmp51); + c_im(inout[iostride]) = tmp57 + tmp58; + c_im(inout[6 * iostride]) = tmp58 - tmp57; + } + } + } +} + +static const int twiddle_order[] = +{1, 2, 3, 4, 5, 6}; +fftw_codelet_desc fftw_twiddle_7_desc = +{ + "fftw_twiddle_7", + (void (*)()) fftw_twiddle_7, + 7, + FFTW_FORWARD, + FFTW_TWIDDLE, + 154, + 6, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/ftw_8.c b/src/sndobj/rfftw/ftw_8.c new file mode 100644 index 0000000..a25651d --- /dev/null +++ b/src/sndobj/rfftw/ftw_8.c @@ -0,0 +1,285 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:34 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddle 8 */ + +/* + * This function contains 66 FP additions, 32 FP multiplications, + * (or, 52 additions, 18 multiplications, 14 fused multiply/add), + * 28 stack variables, and 32 memory accesses + */ +static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); + +/* + * Generator Id's : + * $Id: ftw_8.c,v 1.1.1.1 2006/05/12 15:14:45 veplaini Exp $ + * $Id: ftw_8.c,v 1.1.1.1 2006/05/12 15:14:45 veplaini Exp $ + * $Id: ftw_8.c,v 1.1.1.1 2006/05/12 15:14:45 veplaini Exp $ + */ + +void fftw_twiddle_8(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_complex *inout; + inout = A; + for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 7) { + fftw_real tmp7; + fftw_real tmp43; + fftw_real tmp71; + fftw_real tmp76; + fftw_real tmp41; + fftw_real tmp53; + fftw_real tmp56; + fftw_real tmp65; + fftw_real tmp18; + fftw_real tmp77; + fftw_real tmp46; + fftw_real tmp68; + fftw_real tmp30; + fftw_real tmp48; + fftw_real tmp51; + fftw_real tmp64; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp70; + fftw_real tmp6; + fftw_real tmp69; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(inout[0]); + tmp70 = c_im(inout[0]); + { + fftw_real tmp3; + fftw_real tmp5; + fftw_real tmp2; + fftw_real tmp4; + ASSERT_ALIGNED_DOUBLE; + tmp3 = c_re(inout[4 * iostride]); + tmp5 = c_im(inout[4 * iostride]); + tmp2 = c_re(W[3]); + tmp4 = c_im(W[3]); + tmp6 = (tmp2 * tmp3) - (tmp4 * tmp5); + tmp69 = (tmp4 * tmp3) + (tmp2 * tmp5); + } + tmp7 = tmp1 + tmp6; + tmp43 = tmp1 - tmp6; + tmp71 = tmp69 + tmp70; + tmp76 = tmp70 - tmp69; + } + { + fftw_real tmp35; + fftw_real tmp54; + fftw_real tmp40; + fftw_real tmp55; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp32; + fftw_real tmp34; + fftw_real tmp31; + fftw_real tmp33; + ASSERT_ALIGNED_DOUBLE; + tmp32 = c_re(inout[7 * iostride]); + tmp34 = c_im(inout[7 * iostride]); + tmp31 = c_re(W[6]); + tmp33 = c_im(W[6]); + tmp35 = (tmp31 * tmp32) - (tmp33 * tmp34); + tmp54 = (tmp33 * tmp32) + (tmp31 * tmp34); + } + { + fftw_real tmp37; + fftw_real tmp39; + fftw_real tmp36; + fftw_real tmp38; + ASSERT_ALIGNED_DOUBLE; + tmp37 = c_re(inout[3 * iostride]); + tmp39 = c_im(inout[3 * iostride]); + tmp36 = c_re(W[2]); + tmp38 = c_im(W[2]); + tmp40 = (tmp36 * tmp37) - (tmp38 * tmp39); + tmp55 = (tmp38 * tmp37) + (tmp36 * tmp39); + } + tmp41 = tmp35 + tmp40; + tmp53 = tmp35 - tmp40; + tmp56 = tmp54 - tmp55; + tmp65 = tmp54 + tmp55; + } + { + fftw_real tmp12; + fftw_real tmp44; + fftw_real tmp17; + fftw_real tmp45; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp9; + fftw_real tmp11; + fftw_real tmp8; + fftw_real tmp10; + ASSERT_ALIGNED_DOUBLE; + tmp9 = c_re(inout[2 * iostride]); + tmp11 = c_im(inout[2 * iostride]); + tmp8 = c_re(W[1]); + tmp10 = c_im(W[1]); + tmp12 = (tmp8 * tmp9) - (tmp10 * tmp11); + tmp44 = (tmp10 * tmp9) + (tmp8 * tmp11); + } + { + fftw_real tmp14; + fftw_real tmp16; + fftw_real tmp13; + fftw_real tmp15; + ASSERT_ALIGNED_DOUBLE; + tmp14 = c_re(inout[6 * iostride]); + tmp16 = c_im(inout[6 * iostride]); + tmp13 = c_re(W[5]); + tmp15 = c_im(W[5]); + tmp17 = (tmp13 * tmp14) - (tmp15 * tmp16); + tmp45 = (tmp15 * tmp14) + (tmp13 * tmp16); + } + tmp18 = tmp12 + tmp17; + tmp77 = tmp12 - tmp17; + tmp46 = tmp44 - tmp45; + tmp68 = tmp44 + tmp45; + } + { + fftw_real tmp24; + fftw_real tmp49; + fftw_real tmp29; + fftw_real tmp50; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp21; + fftw_real tmp23; + fftw_real tmp20; + fftw_real tmp22; + ASSERT_ALIGNED_DOUBLE; + tmp21 = c_re(inout[iostride]); + tmp23 = c_im(inout[iostride]); + tmp20 = c_re(W[0]); + tmp22 = c_im(W[0]); + tmp24 = (tmp20 * tmp21) - (tmp22 * tmp23); + tmp49 = (tmp22 * tmp21) + (tmp20 * tmp23); + } + { + fftw_real tmp26; + fftw_real tmp28; + fftw_real tmp25; + fftw_real tmp27; + ASSERT_ALIGNED_DOUBLE; + tmp26 = c_re(inout[5 * iostride]); + tmp28 = c_im(inout[5 * iostride]); + tmp25 = c_re(W[4]); + tmp27 = c_im(W[4]); + tmp29 = (tmp25 * tmp26) - (tmp27 * tmp28); + tmp50 = (tmp27 * tmp26) + (tmp25 * tmp28); + } + tmp30 = tmp24 + tmp29; + tmp48 = tmp24 - tmp29; + tmp51 = tmp49 - tmp50; + tmp64 = tmp49 + tmp50; + } + { + fftw_real tmp19; + fftw_real tmp42; + fftw_real tmp63; + fftw_real tmp66; + ASSERT_ALIGNED_DOUBLE; + tmp19 = tmp7 + tmp18; + tmp42 = tmp30 + tmp41; + c_re(inout[4 * iostride]) = tmp19 - tmp42; + c_re(inout[0]) = tmp19 + tmp42; + { + fftw_real tmp73; + fftw_real tmp74; + fftw_real tmp67; + fftw_real tmp72; + ASSERT_ALIGNED_DOUBLE; + tmp73 = tmp41 - tmp30; + tmp74 = tmp71 - tmp68; + c_im(inout[2 * iostride]) = tmp73 + tmp74; + c_im(inout[6 * iostride]) = tmp74 - tmp73; + tmp67 = tmp64 + tmp65; + tmp72 = tmp68 + tmp71; + c_im(inout[0]) = tmp67 + tmp72; + c_im(inout[4 * iostride]) = tmp72 - tmp67; + } + tmp63 = tmp7 - tmp18; + tmp66 = tmp64 - tmp65; + c_re(inout[6 * iostride]) = tmp63 - tmp66; + c_re(inout[2 * iostride]) = tmp63 + tmp66; + { + fftw_real tmp59; + fftw_real tmp78; + fftw_real tmp62; + fftw_real tmp75; + fftw_real tmp60; + fftw_real tmp61; + ASSERT_ALIGNED_DOUBLE; + tmp59 = tmp43 - tmp46; + tmp78 = tmp76 - tmp77; + tmp60 = tmp51 - tmp48; + tmp61 = tmp53 + tmp56; + tmp62 = K707106781 * (tmp60 - tmp61); + tmp75 = K707106781 * (tmp60 + tmp61); + c_re(inout[7 * iostride]) = tmp59 - tmp62; + c_re(inout[3 * iostride]) = tmp59 + tmp62; + c_im(inout[iostride]) = tmp75 + tmp78; + c_im(inout[5 * iostride]) = tmp78 - tmp75; + } + { + fftw_real tmp47; + fftw_real tmp80; + fftw_real tmp58; + fftw_real tmp79; + fftw_real tmp52; + fftw_real tmp57; + ASSERT_ALIGNED_DOUBLE; + tmp47 = tmp43 + tmp46; + tmp80 = tmp77 + tmp76; + tmp52 = tmp48 + tmp51; + tmp57 = tmp53 - tmp56; + tmp58 = K707106781 * (tmp52 + tmp57); + tmp79 = K707106781 * (tmp57 - tmp52); + c_re(inout[5 * iostride]) = tmp47 - tmp58; + c_re(inout[iostride]) = tmp47 + tmp58; + c_im(inout[3 * iostride]) = tmp79 + tmp80; + c_im(inout[7 * iostride]) = tmp80 - tmp79; + } + } + } +} + +static const int twiddle_order[] = +{1, 2, 3, 4, 5, 6, 7}; +fftw_codelet_desc fftw_twiddle_8_desc = +{ + "fftw_twiddle_8", + (void (*)()) fftw_twiddle_8, + 8, + FFTW_FORWARD, + FFTW_TWIDDLE, + 176, + 7, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/ftw_9.c b/src/sndobj/rfftw/ftw_9.c new file mode 100644 index 0000000..05a01b7 --- /dev/null +++ b/src/sndobj/rfftw/ftw_9.c @@ -0,0 +1,370 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:35 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddle 9 */ + +/* + * This function contains 96 FP additions, 72 FP multiplications, + * (or, 60 additions, 36 multiplications, 36 fused multiply/add), + * 34 stack variables, and 36 memory accesses + */ +static const fftw_real K939692620 = FFTW_KONST(+0.939692620785908384054109277324731469936208134); +static const fftw_real K342020143 = FFTW_KONST(+0.342020143325668733044099614682259580763083368); +static const fftw_real K984807753 = FFTW_KONST(+0.984807753012208059366743024589523013670643252); +static const fftw_real K173648177 = FFTW_KONST(+0.173648177666930348851716626769314796000375677); +static const fftw_real K642787609 = FFTW_KONST(+0.642787609686539326322643409907263432907559884); +static const fftw_real K766044443 = FFTW_KONST(+0.766044443118978035202392650555416673935832457); +static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); +static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); + +/* + * Generator Id's : + * $Id: ftw_9.c,v 1.1.1.1 2006/05/12 15:14:52 veplaini Exp $ + * $Id: ftw_9.c,v 1.1.1.1 2006/05/12 15:14:52 veplaini Exp $ + * $Id: ftw_9.c,v 1.1.1.1 2006/05/12 15:14:52 veplaini Exp $ + */ + +void fftw_twiddle_9(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_complex *inout; + inout = A; + for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 8) { + fftw_real tmp1; + fftw_real tmp99; + fftw_real tmp52; + fftw_real tmp98; + fftw_real tmp105; + fftw_real tmp104; + fftw_real tmp12; + fftw_real tmp49; + fftw_real tmp47; + fftw_real tmp69; + fftw_real tmp86; + fftw_real tmp95; + fftw_real tmp74; + fftw_real tmp85; + fftw_real tmp30; + fftw_real tmp58; + fftw_real tmp82; + fftw_real tmp94; + fftw_real tmp63; + fftw_real tmp83; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp6; + fftw_real tmp50; + fftw_real tmp11; + fftw_real tmp51; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(inout[0]); + tmp99 = c_im(inout[0]); + { + fftw_real tmp3; + fftw_real tmp5; + fftw_real tmp2; + fftw_real tmp4; + ASSERT_ALIGNED_DOUBLE; + tmp3 = c_re(inout[3 * iostride]); + tmp5 = c_im(inout[3 * iostride]); + tmp2 = c_re(W[2]); + tmp4 = c_im(W[2]); + tmp6 = (tmp2 * tmp3) - (tmp4 * tmp5); + tmp50 = (tmp4 * tmp3) + (tmp2 * tmp5); + } + { + fftw_real tmp8; + fftw_real tmp10; + fftw_real tmp7; + fftw_real tmp9; + ASSERT_ALIGNED_DOUBLE; + tmp8 = c_re(inout[6 * iostride]); + tmp10 = c_im(inout[6 * iostride]); + tmp7 = c_re(W[5]); + tmp9 = c_im(W[5]); + tmp11 = (tmp7 * tmp8) - (tmp9 * tmp10); + tmp51 = (tmp9 * tmp8) + (tmp7 * tmp10); + } + tmp52 = K866025403 * (tmp50 - tmp51); + tmp98 = tmp50 + tmp51; + tmp105 = tmp99 - (K500000000 * tmp98); + tmp104 = K866025403 * (tmp11 - tmp6); + tmp12 = tmp6 + tmp11; + tmp49 = tmp1 - (K500000000 * tmp12); + } + { + fftw_real tmp35; + fftw_real tmp71; + fftw_real tmp40; + fftw_real tmp66; + fftw_real tmp45; + fftw_real tmp67; + fftw_real tmp46; + fftw_real tmp72; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp32; + fftw_real tmp34; + fftw_real tmp31; + fftw_real tmp33; + ASSERT_ALIGNED_DOUBLE; + tmp32 = c_re(inout[2 * iostride]); + tmp34 = c_im(inout[2 * iostride]); + tmp31 = c_re(W[1]); + tmp33 = c_im(W[1]); + tmp35 = (tmp31 * tmp32) - (tmp33 * tmp34); + tmp71 = (tmp33 * tmp32) + (tmp31 * tmp34); + } + { + fftw_real tmp37; + fftw_real tmp39; + fftw_real tmp36; + fftw_real tmp38; + ASSERT_ALIGNED_DOUBLE; + tmp37 = c_re(inout[5 * iostride]); + tmp39 = c_im(inout[5 * iostride]); + tmp36 = c_re(W[4]); + tmp38 = c_im(W[4]); + tmp40 = (tmp36 * tmp37) - (tmp38 * tmp39); + tmp66 = (tmp38 * tmp37) + (tmp36 * tmp39); + } + { + fftw_real tmp42; + fftw_real tmp44; + fftw_real tmp41; + fftw_real tmp43; + ASSERT_ALIGNED_DOUBLE; + tmp42 = c_re(inout[8 * iostride]); + tmp44 = c_im(inout[8 * iostride]); + tmp41 = c_re(W[7]); + tmp43 = c_im(W[7]); + tmp45 = (tmp41 * tmp42) - (tmp43 * tmp44); + tmp67 = (tmp43 * tmp42) + (tmp41 * tmp44); + } + tmp46 = tmp40 + tmp45; + tmp72 = tmp66 + tmp67; + { + fftw_real tmp65; + fftw_real tmp68; + fftw_real tmp70; + fftw_real tmp73; + ASSERT_ALIGNED_DOUBLE; + tmp47 = tmp35 + tmp46; + tmp65 = tmp35 - (K500000000 * tmp46); + tmp68 = K866025403 * (tmp66 - tmp67); + tmp69 = tmp65 + tmp68; + tmp86 = tmp65 - tmp68; + tmp95 = tmp71 + tmp72; + tmp70 = K866025403 * (tmp45 - tmp40); + tmp73 = tmp71 - (K500000000 * tmp72); + tmp74 = tmp70 + tmp73; + tmp85 = tmp73 - tmp70; + } + } + { + fftw_real tmp18; + fftw_real tmp60; + fftw_real tmp23; + fftw_real tmp55; + fftw_real tmp28; + fftw_real tmp56; + fftw_real tmp29; + fftw_real tmp61; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp15; + fftw_real tmp17; + fftw_real tmp14; + fftw_real tmp16; + ASSERT_ALIGNED_DOUBLE; + tmp15 = c_re(inout[iostride]); + tmp17 = c_im(inout[iostride]); + tmp14 = c_re(W[0]); + tmp16 = c_im(W[0]); + tmp18 = (tmp14 * tmp15) - (tmp16 * tmp17); + tmp60 = (tmp16 * tmp15) + (tmp14 * tmp17); + } + { + fftw_real tmp20; + fftw_real tmp22; + fftw_real tmp19; + fftw_real tmp21; + ASSERT_ALIGNED_DOUBLE; + tmp20 = c_re(inout[4 * iostride]); + tmp22 = c_im(inout[4 * iostride]); + tmp19 = c_re(W[3]); + tmp21 = c_im(W[3]); + tmp23 = (tmp19 * tmp20) - (tmp21 * tmp22); + tmp55 = (tmp21 * tmp20) + (tmp19 * tmp22); + } + { + fftw_real tmp25; + fftw_real tmp27; + fftw_real tmp24; + fftw_real tmp26; + ASSERT_ALIGNED_DOUBLE; + tmp25 = c_re(inout[7 * iostride]); + tmp27 = c_im(inout[7 * iostride]); + tmp24 = c_re(W[6]); + tmp26 = c_im(W[6]); + tmp28 = (tmp24 * tmp25) - (tmp26 * tmp27); + tmp56 = (tmp26 * tmp25) + (tmp24 * tmp27); + } + tmp29 = tmp23 + tmp28; + tmp61 = tmp55 + tmp56; + { + fftw_real tmp54; + fftw_real tmp57; + fftw_real tmp59; + fftw_real tmp62; + ASSERT_ALIGNED_DOUBLE; + tmp30 = tmp18 + tmp29; + tmp54 = tmp18 - (K500000000 * tmp29); + tmp57 = K866025403 * (tmp55 - tmp56); + tmp58 = tmp54 + tmp57; + tmp82 = tmp54 - tmp57; + tmp94 = tmp60 + tmp61; + tmp59 = K866025403 * (tmp28 - tmp23); + tmp62 = tmp60 - (K500000000 * tmp61); + tmp63 = tmp59 + tmp62; + tmp83 = tmp62 - tmp59; + } + } + { + fftw_real tmp96; + fftw_real tmp13; + fftw_real tmp48; + fftw_real tmp93; + ASSERT_ALIGNED_DOUBLE; + tmp96 = K866025403 * (tmp94 - tmp95); + tmp13 = tmp1 + tmp12; + tmp48 = tmp30 + tmp47; + tmp93 = tmp13 - (K500000000 * tmp48); + c_re(inout[0]) = tmp13 + tmp48; + c_re(inout[3 * iostride]) = tmp93 + tmp96; + c_re(inout[6 * iostride]) = tmp93 - tmp96; + } + { + fftw_real tmp101; + fftw_real tmp97; + fftw_real tmp100; + fftw_real tmp102; + ASSERT_ALIGNED_DOUBLE; + tmp101 = K866025403 * (tmp47 - tmp30); + tmp97 = tmp94 + tmp95; + tmp100 = tmp98 + tmp99; + tmp102 = tmp100 - (K500000000 * tmp97); + c_im(inout[0]) = tmp97 + tmp100; + c_im(inout[6 * iostride]) = tmp102 - tmp101; + c_im(inout[3 * iostride]) = tmp101 + tmp102; + } + { + fftw_real tmp53; + fftw_real tmp106; + fftw_real tmp76; + fftw_real tmp107; + fftw_real tmp80; + fftw_real tmp103; + fftw_real tmp77; + fftw_real tmp108; + ASSERT_ALIGNED_DOUBLE; + tmp53 = tmp49 + tmp52; + tmp106 = tmp104 + tmp105; + { + fftw_real tmp64; + fftw_real tmp75; + fftw_real tmp78; + fftw_real tmp79; + ASSERT_ALIGNED_DOUBLE; + tmp64 = (K766044443 * tmp58) + (K642787609 * tmp63); + tmp75 = (K173648177 * tmp69) + (K984807753 * tmp74); + tmp76 = tmp64 + tmp75; + tmp107 = K866025403 * (tmp75 - tmp64); + tmp78 = (K766044443 * tmp63) - (K642787609 * tmp58); + tmp79 = (K173648177 * tmp74) - (K984807753 * tmp69); + tmp80 = K866025403 * (tmp78 - tmp79); + tmp103 = tmp78 + tmp79; + } + c_re(inout[iostride]) = tmp53 + tmp76; + tmp77 = tmp53 - (K500000000 * tmp76); + c_re(inout[7 * iostride]) = tmp77 - tmp80; + c_re(inout[4 * iostride]) = tmp77 + tmp80; + c_im(inout[iostride]) = tmp103 + tmp106; + tmp108 = tmp106 - (K500000000 * tmp103); + c_im(inout[4 * iostride]) = tmp107 + tmp108; + c_im(inout[7 * iostride]) = tmp108 - tmp107; + } + { + fftw_real tmp81; + fftw_real tmp110; + fftw_real tmp88; + fftw_real tmp111; + fftw_real tmp92; + fftw_real tmp109; + fftw_real tmp89; + fftw_real tmp112; + ASSERT_ALIGNED_DOUBLE; + tmp81 = tmp49 - tmp52; + tmp110 = tmp105 - tmp104; + { + fftw_real tmp84; + fftw_real tmp87; + fftw_real tmp90; + fftw_real tmp91; + ASSERT_ALIGNED_DOUBLE; + tmp84 = (K173648177 * tmp82) + (K984807753 * tmp83); + tmp87 = (K342020143 * tmp85) - (K939692620 * tmp86); + tmp88 = tmp84 + tmp87; + tmp111 = K866025403 * (tmp87 - tmp84); + tmp90 = (K173648177 * tmp83) - (K984807753 * tmp82); + tmp91 = (K342020143 * tmp86) + (K939692620 * tmp85); + tmp92 = K866025403 * (tmp90 + tmp91); + tmp109 = tmp90 - tmp91; + } + c_re(inout[2 * iostride]) = tmp81 + tmp88; + tmp89 = tmp81 - (K500000000 * tmp88); + c_re(inout[8 * iostride]) = tmp89 - tmp92; + c_re(inout[5 * iostride]) = tmp89 + tmp92; + c_im(inout[2 * iostride]) = tmp109 + tmp110; + tmp112 = tmp110 - (K500000000 * tmp109); + c_im(inout[5 * iostride]) = tmp111 + tmp112; + c_im(inout[8 * iostride]) = tmp112 - tmp111; + } + } +} + +static const int twiddle_order[] = +{1, 2, 3, 4, 5, 6, 7, 8}; +fftw_codelet_desc fftw_twiddle_9_desc = +{ + "fftw_twiddle_9", + (void (*)()) fftw_twiddle_9, + 9, + FFTW_FORWARD, + FFTW_TWIDDLE, + 198, + 8, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/ftwi_10.c b/src/sndobj/rfftw/ftwi_10.c new file mode 100644 index 0000000..7a9595c --- /dev/null +++ b/src/sndobj/rfftw/ftwi_10.c @@ -0,0 +1,375 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:59 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddleinv 10 */ + +/* + * This function contains 102 FP additions, 60 FP multiplications, + * (or, 72 additions, 30 multiplications, 30 fused multiply/add), + * 42 stack variables, and 40 memory accesses + */ +static const fftw_real K951056516 = FFTW_KONST(+0.951056516295153572116439333379382143405698634); +static const fftw_real K587785252 = FFTW_KONST(+0.587785252292473129168705954639072768597652438); +static const fftw_real K250000000 = FFTW_KONST(+0.250000000000000000000000000000000000000000000); +static const fftw_real K559016994 = FFTW_KONST(+0.559016994374947424102293417182819058860154590); + +/* + * Generator Id's : + * $Id: ftwi_10.c,v 1.1.1.1 2006/05/12 15:14:56 veplaini Exp $ + * $Id: ftwi_10.c,v 1.1.1.1 2006/05/12 15:14:56 veplaini Exp $ + * $Id: ftwi_10.c,v 1.1.1.1 2006/05/12 15:14:56 veplaini Exp $ + */ + +void fftwi_twiddle_10(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_complex *inout; + inout = A; + for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 9) { + fftw_real tmp7; + fftw_real tmp55; + fftw_real tmp100; + fftw_real tmp115; + fftw_real tmp41; + fftw_real tmp52; + fftw_real tmp53; + fftw_real tmp59; + fftw_real tmp60; + fftw_real tmp61; + fftw_real tmp75; + fftw_real tmp78; + fftw_real tmp113; + fftw_real tmp89; + fftw_real tmp90; + fftw_real tmp96; + fftw_real tmp18; + fftw_real tmp29; + fftw_real tmp30; + fftw_real tmp56; + fftw_real tmp57; + fftw_real tmp58; + fftw_real tmp68; + fftw_real tmp71; + fftw_real tmp112; + fftw_real tmp86; + fftw_real tmp87; + fftw_real tmp95; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp99; + fftw_real tmp6; + fftw_real tmp98; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(inout[0]); + tmp99 = c_im(inout[0]); + { + fftw_real tmp3; + fftw_real tmp5; + fftw_real tmp2; + fftw_real tmp4; + ASSERT_ALIGNED_DOUBLE; + tmp3 = c_re(inout[5 * iostride]); + tmp5 = c_im(inout[5 * iostride]); + tmp2 = c_re(W[4]); + tmp4 = c_im(W[4]); + tmp6 = (tmp2 * tmp3) + (tmp4 * tmp5); + tmp98 = (tmp2 * tmp5) - (tmp4 * tmp3); + } + tmp7 = tmp1 - tmp6; + tmp55 = tmp1 + tmp6; + tmp100 = tmp98 + tmp99; + tmp115 = tmp99 - tmp98; + } + { + fftw_real tmp35; + fftw_real tmp73; + fftw_real tmp51; + fftw_real tmp77; + fftw_real tmp40; + fftw_real tmp74; + fftw_real tmp46; + fftw_real tmp76; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp32; + fftw_real tmp34; + fftw_real tmp31; + fftw_real tmp33; + ASSERT_ALIGNED_DOUBLE; + tmp32 = c_re(inout[4 * iostride]); + tmp34 = c_im(inout[4 * iostride]); + tmp31 = c_re(W[3]); + tmp33 = c_im(W[3]); + tmp35 = (tmp31 * tmp32) + (tmp33 * tmp34); + tmp73 = (tmp31 * tmp34) - (tmp33 * tmp32); + } + { + fftw_real tmp48; + fftw_real tmp50; + fftw_real tmp47; + fftw_real tmp49; + ASSERT_ALIGNED_DOUBLE; + tmp48 = c_re(inout[iostride]); + tmp50 = c_im(inout[iostride]); + tmp47 = c_re(W[0]); + tmp49 = c_im(W[0]); + tmp51 = (tmp47 * tmp48) + (tmp49 * tmp50); + tmp77 = (tmp47 * tmp50) - (tmp49 * tmp48); + } + { + fftw_real tmp37; + fftw_real tmp39; + fftw_real tmp36; + fftw_real tmp38; + ASSERT_ALIGNED_DOUBLE; + tmp37 = c_re(inout[9 * iostride]); + tmp39 = c_im(inout[9 * iostride]); + tmp36 = c_re(W[8]); + tmp38 = c_im(W[8]); + tmp40 = (tmp36 * tmp37) + (tmp38 * tmp39); + tmp74 = (tmp36 * tmp39) - (tmp38 * tmp37); + } + { + fftw_real tmp43; + fftw_real tmp45; + fftw_real tmp42; + fftw_real tmp44; + ASSERT_ALIGNED_DOUBLE; + tmp43 = c_re(inout[6 * iostride]); + tmp45 = c_im(inout[6 * iostride]); + tmp42 = c_re(W[5]); + tmp44 = c_im(W[5]); + tmp46 = (tmp42 * tmp43) + (tmp44 * tmp45); + tmp76 = (tmp42 * tmp45) - (tmp44 * tmp43); + } + tmp41 = tmp35 - tmp40; + tmp52 = tmp46 - tmp51; + tmp53 = tmp41 + tmp52; + tmp59 = tmp35 + tmp40; + tmp60 = tmp46 + tmp51; + tmp61 = tmp59 + tmp60; + tmp75 = tmp73 - tmp74; + tmp78 = tmp76 - tmp77; + tmp113 = tmp75 + tmp78; + tmp89 = tmp73 + tmp74; + tmp90 = tmp76 + tmp77; + tmp96 = tmp89 + tmp90; + } + { + fftw_real tmp12; + fftw_real tmp66; + fftw_real tmp28; + fftw_real tmp70; + fftw_real tmp17; + fftw_real tmp67; + fftw_real tmp23; + fftw_real tmp69; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp9; + fftw_real tmp11; + fftw_real tmp8; + fftw_real tmp10; + ASSERT_ALIGNED_DOUBLE; + tmp9 = c_re(inout[2 * iostride]); + tmp11 = c_im(inout[2 * iostride]); + tmp8 = c_re(W[1]); + tmp10 = c_im(W[1]); + tmp12 = (tmp8 * tmp9) + (tmp10 * tmp11); + tmp66 = (tmp8 * tmp11) - (tmp10 * tmp9); + } + { + fftw_real tmp25; + fftw_real tmp27; + fftw_real tmp24; + fftw_real tmp26; + ASSERT_ALIGNED_DOUBLE; + tmp25 = c_re(inout[3 * iostride]); + tmp27 = c_im(inout[3 * iostride]); + tmp24 = c_re(W[2]); + tmp26 = c_im(W[2]); + tmp28 = (tmp24 * tmp25) + (tmp26 * tmp27); + tmp70 = (tmp24 * tmp27) - (tmp26 * tmp25); + } + { + fftw_real tmp14; + fftw_real tmp16; + fftw_real tmp13; + fftw_real tmp15; + ASSERT_ALIGNED_DOUBLE; + tmp14 = c_re(inout[7 * iostride]); + tmp16 = c_im(inout[7 * iostride]); + tmp13 = c_re(W[6]); + tmp15 = c_im(W[6]); + tmp17 = (tmp13 * tmp14) + (tmp15 * tmp16); + tmp67 = (tmp13 * tmp16) - (tmp15 * tmp14); + } + { + fftw_real tmp20; + fftw_real tmp22; + fftw_real tmp19; + fftw_real tmp21; + ASSERT_ALIGNED_DOUBLE; + tmp20 = c_re(inout[8 * iostride]); + tmp22 = c_im(inout[8 * iostride]); + tmp19 = c_re(W[7]); + tmp21 = c_im(W[7]); + tmp23 = (tmp19 * tmp20) + (tmp21 * tmp22); + tmp69 = (tmp19 * tmp22) - (tmp21 * tmp20); + } + tmp18 = tmp12 - tmp17; + tmp29 = tmp23 - tmp28; + tmp30 = tmp18 + tmp29; + tmp56 = tmp12 + tmp17; + tmp57 = tmp23 + tmp28; + tmp58 = tmp56 + tmp57; + tmp68 = tmp66 - tmp67; + tmp71 = tmp69 - tmp70; + tmp112 = tmp68 + tmp71; + tmp86 = tmp66 + tmp67; + tmp87 = tmp69 + tmp70; + tmp95 = tmp86 + tmp87; + } + { + fftw_real tmp64; + fftw_real tmp54; + fftw_real tmp63; + fftw_real tmp80; + fftw_real tmp82; + fftw_real tmp72; + fftw_real tmp79; + fftw_real tmp81; + fftw_real tmp65; + ASSERT_ALIGNED_DOUBLE; + tmp64 = K559016994 * (tmp30 - tmp53); + tmp54 = tmp30 + tmp53; + tmp63 = tmp7 - (K250000000 * tmp54); + tmp72 = tmp68 - tmp71; + tmp79 = tmp75 - tmp78; + tmp80 = (K587785252 * tmp72) - (K951056516 * tmp79); + tmp82 = (K951056516 * tmp72) + (K587785252 * tmp79); + c_re(inout[5 * iostride]) = tmp7 + tmp54; + tmp81 = tmp64 + tmp63; + c_re(inout[iostride]) = tmp81 - tmp82; + c_re(inout[9 * iostride]) = tmp81 + tmp82; + tmp65 = tmp63 - tmp64; + c_re(inout[7 * iostride]) = tmp65 - tmp80; + c_re(inout[3 * iostride]) = tmp65 + tmp80; + } + { + fftw_real tmp114; + fftw_real tmp116; + fftw_real tmp117; + fftw_real tmp111; + fftw_real tmp120; + fftw_real tmp109; + fftw_real tmp110; + fftw_real tmp119; + fftw_real tmp118; + ASSERT_ALIGNED_DOUBLE; + tmp114 = K559016994 * (tmp112 - tmp113); + tmp116 = tmp112 + tmp113; + tmp117 = tmp115 - (K250000000 * tmp116); + tmp109 = tmp18 - tmp29; + tmp110 = tmp41 - tmp52; + tmp111 = (K951056516 * tmp109) + (K587785252 * tmp110); + tmp120 = (K587785252 * tmp109) - (K951056516 * tmp110); + c_im(inout[5 * iostride]) = tmp116 + tmp115; + tmp119 = tmp117 - tmp114; + c_im(inout[3 * iostride]) = tmp119 - tmp120; + c_im(inout[7 * iostride]) = tmp120 + tmp119; + tmp118 = tmp114 + tmp117; + c_im(inout[iostride]) = tmp111 + tmp118; + c_im(inout[9 * iostride]) = tmp118 - tmp111; + } + { + fftw_real tmp84; + fftw_real tmp62; + fftw_real tmp83; + fftw_real tmp92; + fftw_real tmp94; + fftw_real tmp88; + fftw_real tmp91; + fftw_real tmp93; + fftw_real tmp85; + ASSERT_ALIGNED_DOUBLE; + tmp84 = K559016994 * (tmp58 - tmp61); + tmp62 = tmp58 + tmp61; + tmp83 = tmp55 - (K250000000 * tmp62); + tmp88 = tmp86 - tmp87; + tmp91 = tmp89 - tmp90; + tmp92 = (K587785252 * tmp88) - (K951056516 * tmp91); + tmp94 = (K951056516 * tmp88) + (K587785252 * tmp91); + c_re(inout[0]) = tmp55 + tmp62; + tmp93 = tmp84 + tmp83; + c_re(inout[6 * iostride]) = tmp93 - tmp94; + c_re(inout[4 * iostride]) = tmp93 + tmp94; + tmp85 = tmp83 - tmp84; + c_re(inout[2 * iostride]) = tmp85 - tmp92; + c_re(inout[8 * iostride]) = tmp85 + tmp92; + } + { + fftw_real tmp105; + fftw_real tmp97; + fftw_real tmp104; + fftw_real tmp103; + fftw_real tmp108; + fftw_real tmp101; + fftw_real tmp102; + fftw_real tmp107; + fftw_real tmp106; + ASSERT_ALIGNED_DOUBLE; + tmp105 = K559016994 * (tmp95 - tmp96); + tmp97 = tmp95 + tmp96; + tmp104 = tmp100 - (K250000000 * tmp97); + tmp101 = tmp56 - tmp57; + tmp102 = tmp59 - tmp60; + tmp103 = (K587785252 * tmp101) - (K951056516 * tmp102); + tmp108 = (K951056516 * tmp101) + (K587785252 * tmp102); + c_im(inout[0]) = tmp97 + tmp100; + tmp107 = tmp105 + tmp104; + c_im(inout[4 * iostride]) = tmp107 - tmp108; + c_im(inout[6 * iostride]) = tmp108 + tmp107; + tmp106 = tmp104 - tmp105; + c_im(inout[2 * iostride]) = tmp103 + tmp106; + c_im(inout[8 * iostride]) = tmp106 - tmp103; + } + } +} + +static const int twiddle_order[] = +{1, 2, 3, 4, 5, 6, 7, 8, 9}; +fftw_codelet_desc fftwi_twiddle_10_desc = +{ + "fftwi_twiddle_10", + (void (*)()) fftwi_twiddle_10, + 10, + FFTW_BACKWARD, + FFTW_TWIDDLE, + 231, + 9, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/ftwi_16.c b/src/sndobj/rfftw/ftwi_16.c new file mode 100644 index 0000000..65cd1e3 --- /dev/null +++ b/src/sndobj/rfftw/ftwi_16.c @@ -0,0 +1,611 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:45:01 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddleinv 16 */ + +/* + * This function contains 174 FP additions, 84 FP multiplications, + * (or, 136 additions, 46 multiplications, 38 fused multiply/add), + * 50 stack variables, and 64 memory accesses + */ +static const fftw_real K382683432 = FFTW_KONST(+0.382683432365089771728459984030398866761344562); +static const fftw_real K923879532 = FFTW_KONST(+0.923879532511286756128183189396788286822416626); +static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); + +/* + * Generator Id's : + * $Id: ftwi_16.c,v 1.1.1.1 2006/05/12 15:14:52 veplaini Exp $ + * $Id: ftwi_16.c,v 1.1.1.1 2006/05/12 15:14:52 veplaini Exp $ + * $Id: ftwi_16.c,v 1.1.1.1 2006/05/12 15:14:52 veplaini Exp $ + */ + +void fftwi_twiddle_16(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_complex *inout; + inout = A; + for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 15) { + fftw_real tmp7; + fftw_real tmp91; + fftw_real tmp180; + fftw_real tmp194; + fftw_real tmp18; + fftw_real tmp193; + fftw_real tmp94; + fftw_real tmp177; + fftw_real tmp77; + fftw_real tmp88; + fftw_real tmp161; + fftw_real tmp117; + fftw_real tmp141; + fftw_real tmp162; + fftw_real tmp163; + fftw_real tmp164; + fftw_real tmp112; + fftw_real tmp140; + fftw_real tmp30; + fftw_real tmp153; + fftw_real tmp100; + fftw_real tmp137; + fftw_real tmp41; + fftw_real tmp152; + fftw_real tmp105; + fftw_real tmp136; + fftw_real tmp54; + fftw_real tmp65; + fftw_real tmp156; + fftw_real tmp128; + fftw_real tmp144; + fftw_real tmp157; + fftw_real tmp158; + fftw_real tmp159; + fftw_real tmp123; + fftw_real tmp143; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp179; + fftw_real tmp6; + fftw_real tmp178; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(inout[0]); + tmp179 = c_im(inout[0]); + { + fftw_real tmp3; + fftw_real tmp5; + fftw_real tmp2; + fftw_real tmp4; + ASSERT_ALIGNED_DOUBLE; + tmp3 = c_re(inout[8 * iostride]); + tmp5 = c_im(inout[8 * iostride]); + tmp2 = c_re(W[7]); + tmp4 = c_im(W[7]); + tmp6 = (tmp2 * tmp3) + (tmp4 * tmp5); + tmp178 = (tmp2 * tmp5) - (tmp4 * tmp3); + } + tmp7 = tmp1 + tmp6; + tmp91 = tmp1 - tmp6; + tmp180 = tmp178 + tmp179; + tmp194 = tmp179 - tmp178; + } + { + fftw_real tmp12; + fftw_real tmp92; + fftw_real tmp17; + fftw_real tmp93; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp9; + fftw_real tmp11; + fftw_real tmp8; + fftw_real tmp10; + ASSERT_ALIGNED_DOUBLE; + tmp9 = c_re(inout[4 * iostride]); + tmp11 = c_im(inout[4 * iostride]); + tmp8 = c_re(W[3]); + tmp10 = c_im(W[3]); + tmp12 = (tmp8 * tmp9) + (tmp10 * tmp11); + tmp92 = (tmp8 * tmp11) - (tmp10 * tmp9); + } + { + fftw_real tmp14; + fftw_real tmp16; + fftw_real tmp13; + fftw_real tmp15; + ASSERT_ALIGNED_DOUBLE; + tmp14 = c_re(inout[12 * iostride]); + tmp16 = c_im(inout[12 * iostride]); + tmp13 = c_re(W[11]); + tmp15 = c_im(W[11]); + tmp17 = (tmp13 * tmp14) + (tmp15 * tmp16); + tmp93 = (tmp13 * tmp16) - (tmp15 * tmp14); + } + tmp18 = tmp12 + tmp17; + tmp193 = tmp12 - tmp17; + tmp94 = tmp92 - tmp93; + tmp177 = tmp92 + tmp93; + } + { + fftw_real tmp71; + fftw_real tmp108; + fftw_real tmp87; + fftw_real tmp115; + fftw_real tmp76; + fftw_real tmp109; + fftw_real tmp82; + fftw_real tmp114; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp68; + fftw_real tmp70; + fftw_real tmp67; + fftw_real tmp69; + ASSERT_ALIGNED_DOUBLE; + tmp68 = c_re(inout[15 * iostride]); + tmp70 = c_im(inout[15 * iostride]); + tmp67 = c_re(W[14]); + tmp69 = c_im(W[14]); + tmp71 = (tmp67 * tmp68) + (tmp69 * tmp70); + tmp108 = (tmp67 * tmp70) - (tmp69 * tmp68); + } + { + fftw_real tmp84; + fftw_real tmp86; + fftw_real tmp83; + fftw_real tmp85; + ASSERT_ALIGNED_DOUBLE; + tmp84 = c_re(inout[11 * iostride]); + tmp86 = c_im(inout[11 * iostride]); + tmp83 = c_re(W[10]); + tmp85 = c_im(W[10]); + tmp87 = (tmp83 * tmp84) + (tmp85 * tmp86); + tmp115 = (tmp83 * tmp86) - (tmp85 * tmp84); + } + { + fftw_real tmp73; + fftw_real tmp75; + fftw_real tmp72; + fftw_real tmp74; + ASSERT_ALIGNED_DOUBLE; + tmp73 = c_re(inout[7 * iostride]); + tmp75 = c_im(inout[7 * iostride]); + tmp72 = c_re(W[6]); + tmp74 = c_im(W[6]); + tmp76 = (tmp72 * tmp73) + (tmp74 * tmp75); + tmp109 = (tmp72 * tmp75) - (tmp74 * tmp73); + } + { + fftw_real tmp79; + fftw_real tmp81; + fftw_real tmp78; + fftw_real tmp80; + ASSERT_ALIGNED_DOUBLE; + tmp79 = c_re(inout[3 * iostride]); + tmp81 = c_im(inout[3 * iostride]); + tmp78 = c_re(W[2]); + tmp80 = c_im(W[2]); + tmp82 = (tmp78 * tmp79) + (tmp80 * tmp81); + tmp114 = (tmp78 * tmp81) - (tmp80 * tmp79); + } + { + fftw_real tmp113; + fftw_real tmp116; + fftw_real tmp110; + fftw_real tmp111; + ASSERT_ALIGNED_DOUBLE; + tmp77 = tmp71 + tmp76; + tmp88 = tmp82 + tmp87; + tmp161 = tmp77 - tmp88; + tmp113 = tmp71 - tmp76; + tmp116 = tmp114 - tmp115; + tmp117 = tmp113 - tmp116; + tmp141 = tmp113 + tmp116; + tmp162 = tmp108 + tmp109; + tmp163 = tmp114 + tmp115; + tmp164 = tmp162 - tmp163; + tmp110 = tmp108 - tmp109; + tmp111 = tmp82 - tmp87; + tmp112 = tmp110 + tmp111; + tmp140 = tmp110 - tmp111; + } + } + { + fftw_real tmp24; + fftw_real tmp97; + fftw_real tmp29; + fftw_real tmp98; + fftw_real tmp96; + fftw_real tmp99; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp21; + fftw_real tmp23; + fftw_real tmp20; + fftw_real tmp22; + ASSERT_ALIGNED_DOUBLE; + tmp21 = c_re(inout[2 * iostride]); + tmp23 = c_im(inout[2 * iostride]); + tmp20 = c_re(W[1]); + tmp22 = c_im(W[1]); + tmp24 = (tmp20 * tmp21) + (tmp22 * tmp23); + tmp97 = (tmp20 * tmp23) - (tmp22 * tmp21); + } + { + fftw_real tmp26; + fftw_real tmp28; + fftw_real tmp25; + fftw_real tmp27; + ASSERT_ALIGNED_DOUBLE; + tmp26 = c_re(inout[10 * iostride]); + tmp28 = c_im(inout[10 * iostride]); + tmp25 = c_re(W[9]); + tmp27 = c_im(W[9]); + tmp29 = (tmp25 * tmp26) + (tmp27 * tmp28); + tmp98 = (tmp25 * tmp28) - (tmp27 * tmp26); + } + tmp30 = tmp24 + tmp29; + tmp153 = tmp97 + tmp98; + tmp96 = tmp24 - tmp29; + tmp99 = tmp97 - tmp98; + tmp100 = tmp96 - tmp99; + tmp137 = tmp96 + tmp99; + } + { + fftw_real tmp35; + fftw_real tmp102; + fftw_real tmp40; + fftw_real tmp103; + fftw_real tmp101; + fftw_real tmp104; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp32; + fftw_real tmp34; + fftw_real tmp31; + fftw_real tmp33; + ASSERT_ALIGNED_DOUBLE; + tmp32 = c_re(inout[14 * iostride]); + tmp34 = c_im(inout[14 * iostride]); + tmp31 = c_re(W[13]); + tmp33 = c_im(W[13]); + tmp35 = (tmp31 * tmp32) + (tmp33 * tmp34); + tmp102 = (tmp31 * tmp34) - (tmp33 * tmp32); + } + { + fftw_real tmp37; + fftw_real tmp39; + fftw_real tmp36; + fftw_real tmp38; + ASSERT_ALIGNED_DOUBLE; + tmp37 = c_re(inout[6 * iostride]); + tmp39 = c_im(inout[6 * iostride]); + tmp36 = c_re(W[5]); + tmp38 = c_im(W[5]); + tmp40 = (tmp36 * tmp37) + (tmp38 * tmp39); + tmp103 = (tmp36 * tmp39) - (tmp38 * tmp37); + } + tmp41 = tmp35 + tmp40; + tmp152 = tmp102 + tmp103; + tmp101 = tmp35 - tmp40; + tmp104 = tmp102 - tmp103; + tmp105 = tmp101 + tmp104; + tmp136 = tmp104 - tmp101; + } + { + fftw_real tmp48; + fftw_real tmp119; + fftw_real tmp64; + fftw_real tmp126; + fftw_real tmp53; + fftw_real tmp120; + fftw_real tmp59; + fftw_real tmp125; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp45; + fftw_real tmp47; + fftw_real tmp44; + fftw_real tmp46; + ASSERT_ALIGNED_DOUBLE; + tmp45 = c_re(inout[iostride]); + tmp47 = c_im(inout[iostride]); + tmp44 = c_re(W[0]); + tmp46 = c_im(W[0]); + tmp48 = (tmp44 * tmp45) + (tmp46 * tmp47); + tmp119 = (tmp44 * tmp47) - (tmp46 * tmp45); + } + { + fftw_real tmp61; + fftw_real tmp63; + fftw_real tmp60; + fftw_real tmp62; + ASSERT_ALIGNED_DOUBLE; + tmp61 = c_re(inout[13 * iostride]); + tmp63 = c_im(inout[13 * iostride]); + tmp60 = c_re(W[12]); + tmp62 = c_im(W[12]); + tmp64 = (tmp60 * tmp61) + (tmp62 * tmp63); + tmp126 = (tmp60 * tmp63) - (tmp62 * tmp61); + } + { + fftw_real tmp50; + fftw_real tmp52; + fftw_real tmp49; + fftw_real tmp51; + ASSERT_ALIGNED_DOUBLE; + tmp50 = c_re(inout[9 * iostride]); + tmp52 = c_im(inout[9 * iostride]); + tmp49 = c_re(W[8]); + tmp51 = c_im(W[8]); + tmp53 = (tmp49 * tmp50) + (tmp51 * tmp52); + tmp120 = (tmp49 * tmp52) - (tmp51 * tmp50); + } + { + fftw_real tmp56; + fftw_real tmp58; + fftw_real tmp55; + fftw_real tmp57; + ASSERT_ALIGNED_DOUBLE; + tmp56 = c_re(inout[5 * iostride]); + tmp58 = c_im(inout[5 * iostride]); + tmp55 = c_re(W[4]); + tmp57 = c_im(W[4]); + tmp59 = (tmp55 * tmp56) + (tmp57 * tmp58); + tmp125 = (tmp55 * tmp58) - (tmp57 * tmp56); + } + { + fftw_real tmp124; + fftw_real tmp127; + fftw_real tmp121; + fftw_real tmp122; + ASSERT_ALIGNED_DOUBLE; + tmp54 = tmp48 + tmp53; + tmp65 = tmp59 + tmp64; + tmp156 = tmp54 - tmp65; + tmp124 = tmp48 - tmp53; + tmp127 = tmp125 - tmp126; + tmp128 = tmp124 - tmp127; + tmp144 = tmp124 + tmp127; + tmp157 = tmp119 + tmp120; + tmp158 = tmp125 + tmp126; + tmp159 = tmp157 - tmp158; + tmp121 = tmp119 - tmp120; + tmp122 = tmp59 - tmp64; + tmp123 = tmp121 + tmp122; + tmp143 = tmp121 - tmp122; + } + } + { + fftw_real tmp107; + fftw_real tmp131; + fftw_real tmp196; + fftw_real tmp198; + fftw_real tmp130; + fftw_real tmp191; + fftw_real tmp134; + fftw_real tmp197; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp95; + fftw_real tmp106; + fftw_real tmp192; + fftw_real tmp195; + ASSERT_ALIGNED_DOUBLE; + tmp95 = tmp91 - tmp94; + tmp106 = K707106781 * (tmp100 + tmp105); + tmp107 = tmp95 - tmp106; + tmp131 = tmp95 + tmp106; + tmp192 = K707106781 * (tmp137 + tmp136); + tmp195 = tmp193 + tmp194; + tmp196 = tmp192 + tmp195; + tmp198 = tmp195 - tmp192; + } + { + fftw_real tmp118; + fftw_real tmp129; + fftw_real tmp132; + fftw_real tmp133; + ASSERT_ALIGNED_DOUBLE; + tmp118 = (K923879532 * tmp112) - (K382683432 * tmp117); + tmp129 = (K923879532 * tmp123) + (K382683432 * tmp128); + tmp130 = tmp118 - tmp129; + tmp191 = tmp129 + tmp118; + tmp132 = (K923879532 * tmp128) - (K382683432 * tmp123); + tmp133 = (K382683432 * tmp112) + (K923879532 * tmp117); + tmp134 = tmp132 + tmp133; + tmp197 = tmp132 - tmp133; + } + c_re(inout[13 * iostride]) = tmp107 - tmp130; + c_re(inout[5 * iostride]) = tmp107 + tmp130; + c_re(inout[9 * iostride]) = tmp131 - tmp134; + c_re(inout[iostride]) = tmp131 + tmp134; + c_im(inout[iostride]) = tmp191 + tmp196; + c_im(inout[9 * iostride]) = tmp196 - tmp191; + c_im(inout[5 * iostride]) = tmp197 + tmp198; + c_im(inout[13 * iostride]) = tmp198 - tmp197; + } + { + fftw_real tmp139; + fftw_real tmp147; + fftw_real tmp202; + fftw_real tmp204; + fftw_real tmp146; + fftw_real tmp199; + fftw_real tmp150; + fftw_real tmp203; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp135; + fftw_real tmp138; + fftw_real tmp200; + fftw_real tmp201; + ASSERT_ALIGNED_DOUBLE; + tmp135 = tmp91 + tmp94; + tmp138 = K707106781 * (tmp136 - tmp137); + tmp139 = tmp135 - tmp138; + tmp147 = tmp135 + tmp138; + tmp200 = K707106781 * (tmp100 - tmp105); + tmp201 = tmp194 - tmp193; + tmp202 = tmp200 + tmp201; + tmp204 = tmp201 - tmp200; + } + { + fftw_real tmp142; + fftw_real tmp145; + fftw_real tmp148; + fftw_real tmp149; + ASSERT_ALIGNED_DOUBLE; + tmp142 = (K382683432 * tmp140) - (K923879532 * tmp141); + tmp145 = (K382683432 * tmp143) + (K923879532 * tmp144); + tmp146 = tmp142 - tmp145; + tmp199 = tmp145 + tmp142; + tmp148 = (K382683432 * tmp144) - (K923879532 * tmp143); + tmp149 = (K923879532 * tmp140) + (K382683432 * tmp141); + tmp150 = tmp148 + tmp149; + tmp203 = tmp148 - tmp149; + } + c_re(inout[15 * iostride]) = tmp139 - tmp146; + c_re(inout[7 * iostride]) = tmp139 + tmp146; + c_re(inout[11 * iostride]) = tmp147 - tmp150; + c_re(inout[3 * iostride]) = tmp147 + tmp150; + c_im(inout[3 * iostride]) = tmp199 + tmp202; + c_im(inout[11 * iostride]) = tmp202 - tmp199; + c_im(inout[7 * iostride]) = tmp203 + tmp204; + c_im(inout[15 * iostride]) = tmp204 - tmp203; + } + { + fftw_real tmp155; + fftw_real tmp167; + fftw_real tmp188; + fftw_real tmp190; + fftw_real tmp166; + fftw_real tmp189; + fftw_real tmp170; + fftw_real tmp185; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp151; + fftw_real tmp154; + fftw_real tmp186; + fftw_real tmp187; + ASSERT_ALIGNED_DOUBLE; + tmp151 = tmp7 - tmp18; + tmp154 = tmp152 - tmp153; + tmp155 = tmp151 + tmp154; + tmp167 = tmp151 - tmp154; + tmp186 = tmp30 - tmp41; + tmp187 = tmp180 - tmp177; + tmp188 = tmp186 + tmp187; + tmp190 = tmp187 - tmp186; + } + { + fftw_real tmp160; + fftw_real tmp165; + fftw_real tmp168; + fftw_real tmp169; + ASSERT_ALIGNED_DOUBLE; + tmp160 = tmp156 - tmp159; + tmp165 = tmp161 + tmp164; + tmp166 = K707106781 * (tmp160 + tmp165); + tmp189 = K707106781 * (tmp160 - tmp165); + tmp168 = tmp164 - tmp161; + tmp169 = tmp156 + tmp159; + tmp170 = K707106781 * (tmp168 - tmp169); + tmp185 = K707106781 * (tmp169 + tmp168); + } + c_re(inout[10 * iostride]) = tmp155 - tmp166; + c_re(inout[2 * iostride]) = tmp155 + tmp166; + c_re(inout[14 * iostride]) = tmp167 - tmp170; + c_re(inout[6 * iostride]) = tmp167 + tmp170; + c_im(inout[2 * iostride]) = tmp185 + tmp188; + c_im(inout[10 * iostride]) = tmp188 - tmp185; + c_im(inout[6 * iostride]) = tmp189 + tmp190; + c_im(inout[14 * iostride]) = tmp190 - tmp189; + } + { + fftw_real tmp43; + fftw_real tmp171; + fftw_real tmp182; + fftw_real tmp184; + fftw_real tmp90; + fftw_real tmp183; + fftw_real tmp174; + fftw_real tmp175; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp19; + fftw_real tmp42; + fftw_real tmp176; + fftw_real tmp181; + ASSERT_ALIGNED_DOUBLE; + tmp19 = tmp7 + tmp18; + tmp42 = tmp30 + tmp41; + tmp43 = tmp19 + tmp42; + tmp171 = tmp19 - tmp42; + tmp176 = tmp153 + tmp152; + tmp181 = tmp177 + tmp180; + tmp182 = tmp176 + tmp181; + tmp184 = tmp181 - tmp176; + } + { + fftw_real tmp66; + fftw_real tmp89; + fftw_real tmp172; + fftw_real tmp173; + ASSERT_ALIGNED_DOUBLE; + tmp66 = tmp54 + tmp65; + tmp89 = tmp77 + tmp88; + tmp90 = tmp66 + tmp89; + tmp183 = tmp66 - tmp89; + tmp172 = tmp162 + tmp163; + tmp173 = tmp157 + tmp158; + tmp174 = tmp172 - tmp173; + tmp175 = tmp173 + tmp172; + } + c_re(inout[8 * iostride]) = tmp43 - tmp90; + c_re(inout[0]) = tmp43 + tmp90; + c_re(inout[12 * iostride]) = tmp171 - tmp174; + c_re(inout[4 * iostride]) = tmp171 + tmp174; + c_im(inout[0]) = tmp175 + tmp182; + c_im(inout[8 * iostride]) = tmp182 - tmp175; + c_im(inout[4 * iostride]) = tmp183 + tmp184; + c_im(inout[12 * iostride]) = tmp184 - tmp183; + } + } +} + +static const int twiddle_order[] = +{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; +fftw_codelet_desc fftwi_twiddle_16_desc = +{ + "fftwi_twiddle_16", + (void (*)()) fftwi_twiddle_16, + 16, + FFTW_BACKWARD, + FFTW_TWIDDLE, + 363, + 15, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/ftwi_2.c b/src/sndobj/rfftw/ftwi_2.c new file mode 100644 index 0000000..c4d8468 --- /dev/null +++ b/src/sndobj/rfftw/ftwi_2.c @@ -0,0 +1,86 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:57 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddleinv 2 */ + +/* + * This function contains 6 FP additions, 4 FP multiplications, + * (or, 4 additions, 2 multiplications, 2 fused multiply/add), + * 10 stack variables, and 8 memory accesses + */ + +/* + * Generator Id's : + * $Id: ftwi_2.c,v 1.1.1.1 2006/05/12 15:14:56 veplaini Exp $ + * $Id: ftwi_2.c,v 1.1.1.1 2006/05/12 15:14:56 veplaini Exp $ + * $Id: ftwi_2.c,v 1.1.1.1 2006/05/12 15:14:56 veplaini Exp $ + */ + +void fftwi_twiddle_2(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_complex *inout; + inout = A; + for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 1) { + fftw_real tmp1; + fftw_real tmp8; + fftw_real tmp6; + fftw_real tmp7; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(inout[0]); + tmp8 = c_im(inout[0]); + { + fftw_real tmp3; + fftw_real tmp5; + fftw_real tmp2; + fftw_real tmp4; + ASSERT_ALIGNED_DOUBLE; + tmp3 = c_re(inout[iostride]); + tmp5 = c_im(inout[iostride]); + tmp2 = c_re(W[0]); + tmp4 = c_im(W[0]); + tmp6 = (tmp2 * tmp3) + (tmp4 * tmp5); + tmp7 = (tmp2 * tmp5) - (tmp4 * tmp3); + } + c_re(inout[iostride]) = tmp1 - tmp6; + c_re(inout[0]) = tmp1 + tmp6; + c_im(inout[0]) = tmp7 + tmp8; + c_im(inout[iostride]) = tmp8 - tmp7; + } +} + +static const int twiddle_order[] = +{1}; +fftw_codelet_desc fftwi_twiddle_2_desc = +{ + "fftwi_twiddle_2", + (void (*)()) fftwi_twiddle_2, + 2, + FFTW_BACKWARD, + FFTW_TWIDDLE, + 55, + 1, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/ftwi_3.c b/src/sndobj/rfftw/ftwi_3.c new file mode 100644 index 0000000..154f030 --- /dev/null +++ b/src/sndobj/rfftw/ftwi_3.c @@ -0,0 +1,120 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:57 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddleinv 3 */ + +/* + * This function contains 16 FP additions, 12 FP multiplications, + * (or, 10 additions, 6 multiplications, 6 fused multiply/add), + * 14 stack variables, and 12 memory accesses + */ +static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); +static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); + +/* + * Generator Id's : + * $Id: ftwi_3.c,v 1.1.1.1 2006/05/12 15:14:54 veplaini Exp $ + * $Id: ftwi_3.c,v 1.1.1.1 2006/05/12 15:14:54 veplaini Exp $ + * $Id: ftwi_3.c,v 1.1.1.1 2006/05/12 15:14:54 veplaini Exp $ + */ + +void fftwi_twiddle_3(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_complex *inout; + inout = A; + for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 2) { + fftw_real tmp1; + fftw_real tmp18; + fftw_real tmp6; + fftw_real tmp15; + fftw_real tmp11; + fftw_real tmp14; + fftw_real tmp12; + fftw_real tmp17; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(inout[0]); + tmp18 = c_im(inout[0]); + { + fftw_real tmp3; + fftw_real tmp5; + fftw_real tmp2; + fftw_real tmp4; + ASSERT_ALIGNED_DOUBLE; + tmp3 = c_re(inout[iostride]); + tmp5 = c_im(inout[iostride]); + tmp2 = c_re(W[0]); + tmp4 = c_im(W[0]); + tmp6 = (tmp2 * tmp3) + (tmp4 * tmp5); + tmp15 = (tmp2 * tmp5) - (tmp4 * tmp3); + } + { + fftw_real tmp8; + fftw_real tmp10; + fftw_real tmp7; + fftw_real tmp9; + ASSERT_ALIGNED_DOUBLE; + tmp8 = c_re(inout[2 * iostride]); + tmp10 = c_im(inout[2 * iostride]); + tmp7 = c_re(W[1]); + tmp9 = c_im(W[1]); + tmp11 = (tmp7 * tmp8) + (tmp9 * tmp10); + tmp14 = (tmp7 * tmp10) - (tmp9 * tmp8); + } + tmp12 = tmp6 + tmp11; + tmp17 = tmp15 + tmp14; + { + fftw_real tmp13; + fftw_real tmp16; + fftw_real tmp19; + fftw_real tmp20; + ASSERT_ALIGNED_DOUBLE; + c_re(inout[0]) = tmp1 + tmp12; + tmp13 = tmp1 - (K500000000 * tmp12); + tmp16 = K866025403 * (tmp14 - tmp15); + c_re(inout[2 * iostride]) = tmp13 - tmp16; + c_re(inout[iostride]) = tmp13 + tmp16; + c_im(inout[0]) = tmp17 + tmp18; + tmp19 = K866025403 * (tmp6 - tmp11); + tmp20 = tmp18 - (K500000000 * tmp17); + c_im(inout[iostride]) = tmp19 + tmp20; + c_im(inout[2 * iostride]) = tmp20 - tmp19; + } + } +} + +static const int twiddle_order[] = +{1, 2}; +fftw_codelet_desc fftwi_twiddle_3_desc = +{ + "fftwi_twiddle_3", + (void (*)()) fftwi_twiddle_3, + 3, + FFTW_BACKWARD, + FFTW_TWIDDLE, + 77, + 2, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/ftwi_32.c b/src/sndobj/rfftw/ftwi_32.c new file mode 100644 index 0000000..33a1241 --- /dev/null +++ b/src/sndobj/rfftw/ftwi_32.c @@ -0,0 +1,1384 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:45:01 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddleinv 32 */ + +/* + * This function contains 434 FP additions, 208 FP multiplications, + * (or, 340 additions, 114 multiplications, 94 fused multiply/add), + * 90 stack variables, and 128 memory accesses + */ +static const fftw_real K555570233 = FFTW_KONST(+0.555570233019602224742830813948532874374937191); +static const fftw_real K831469612 = FFTW_KONST(+0.831469612302545237078788377617905756738560812); +static const fftw_real K980785280 = FFTW_KONST(+0.980785280403230449126182236134239036973933731); +static const fftw_real K195090322 = FFTW_KONST(+0.195090322016128267848284868477022240927691618); +static const fftw_real K923879532 = FFTW_KONST(+0.923879532511286756128183189396788286822416626); +static const fftw_real K382683432 = FFTW_KONST(+0.382683432365089771728459984030398866761344562); +static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); + +/* + * Generator Id's : + * $Id: ftwi_32.c,v 1.1.1.1 2006/05/12 15:14:52 veplaini Exp $ + * $Id: ftwi_32.c,v 1.1.1.1 2006/05/12 15:14:52 veplaini Exp $ + * $Id: ftwi_32.c,v 1.1.1.1 2006/05/12 15:14:52 veplaini Exp $ + */ + +void fftwi_twiddle_32(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_complex *inout; + inout = A; + for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 31) { + fftw_real tmp19; + fftw_real tmp387; + fftw_real tmp472; + fftw_real tmp486; + fftw_real tmp442; + fftw_real tmp456; + fftw_real tmp191; + fftw_real tmp303; + fftw_real tmp161; + fftw_real tmp403; + fftw_real tmp276; + fftw_real tmp316; + fftw_real tmp372; + fftw_real tmp400; + fftw_real tmp259; + fftw_real tmp319; + fftw_real tmp42; + fftw_real tmp455; + fftw_real tmp201; + fftw_real tmp304; + fftw_real tmp390; + fftw_real tmp437; + fftw_real tmp196; + fftw_real tmp305; + fftw_real tmp184; + fftw_real tmp401; + fftw_real tmp375; + fftw_real tmp404; + fftw_real tmp270; + fftw_real tmp317; + fftw_real tmp279; + fftw_real tmp320; + fftw_real tmp66; + fftw_real tmp395; + fftw_real tmp224; + fftw_real tmp312; + fftw_real tmp357; + fftw_real tmp396; + fftw_real tmp219; + fftw_real tmp311; + fftw_real tmp114; + fftw_real tmp410; + fftw_real tmp249; + fftw_real tmp323; + fftw_real tmp363; + fftw_real tmp407; + fftw_real tmp232; + fftw_real tmp326; + fftw_real tmp89; + fftw_real tmp393; + fftw_real tmp213; + fftw_real tmp309; + fftw_real tmp354; + fftw_real tmp392; + fftw_real tmp208; + fftw_real tmp308; + fftw_real tmp137; + fftw_real tmp408; + fftw_real tmp366; + fftw_real tmp411; + fftw_real tmp243; + fftw_real tmp324; + fftw_real tmp252; + fftw_real tmp327; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp440; + fftw_real tmp6; + fftw_real tmp439; + fftw_real tmp12; + fftw_real tmp188; + fftw_real tmp17; + fftw_real tmp189; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(inout[0]); + tmp440 = c_im(inout[0]); + { + fftw_real tmp3; + fftw_real tmp5; + fftw_real tmp2; + fftw_real tmp4; + ASSERT_ALIGNED_DOUBLE; + tmp3 = c_re(inout[16 * iostride]); + tmp5 = c_im(inout[16 * iostride]); + tmp2 = c_re(W[15]); + tmp4 = c_im(W[15]); + tmp6 = (tmp2 * tmp3) + (tmp4 * tmp5); + tmp439 = (tmp2 * tmp5) - (tmp4 * tmp3); + } + { + fftw_real tmp9; + fftw_real tmp11; + fftw_real tmp8; + fftw_real tmp10; + ASSERT_ALIGNED_DOUBLE; + tmp9 = c_re(inout[8 * iostride]); + tmp11 = c_im(inout[8 * iostride]); + tmp8 = c_re(W[7]); + tmp10 = c_im(W[7]); + tmp12 = (tmp8 * tmp9) + (tmp10 * tmp11); + tmp188 = (tmp8 * tmp11) - (tmp10 * tmp9); + } + { + fftw_real tmp14; + fftw_real tmp16; + fftw_real tmp13; + fftw_real tmp15; + ASSERT_ALIGNED_DOUBLE; + tmp14 = c_re(inout[24 * iostride]); + tmp16 = c_im(inout[24 * iostride]); + tmp13 = c_re(W[23]); + tmp15 = c_im(W[23]); + tmp17 = (tmp13 * tmp14) + (tmp15 * tmp16); + tmp189 = (tmp13 * tmp16) - (tmp15 * tmp14); + } + { + fftw_real tmp7; + fftw_real tmp18; + fftw_real tmp470; + fftw_real tmp471; + ASSERT_ALIGNED_DOUBLE; + tmp7 = tmp1 + tmp6; + tmp18 = tmp12 + tmp17; + tmp19 = tmp7 + tmp18; + tmp387 = tmp7 - tmp18; + tmp470 = tmp12 - tmp17; + tmp471 = tmp440 - tmp439; + tmp472 = tmp470 + tmp471; + tmp486 = tmp471 - tmp470; + } + { + fftw_real tmp438; + fftw_real tmp441; + fftw_real tmp187; + fftw_real tmp190; + ASSERT_ALIGNED_DOUBLE; + tmp438 = tmp188 + tmp189; + tmp441 = tmp439 + tmp440; + tmp442 = tmp438 + tmp441; + tmp456 = tmp441 - tmp438; + tmp187 = tmp1 - tmp6; + tmp190 = tmp188 - tmp189; + tmp191 = tmp187 - tmp190; + tmp303 = tmp187 + tmp190; + } + } + { + fftw_real tmp143; + fftw_real tmp272; + fftw_real tmp159; + fftw_real tmp257; + fftw_real tmp148; + fftw_real tmp273; + fftw_real tmp154; + fftw_real tmp256; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp140; + fftw_real tmp142; + fftw_real tmp139; + fftw_real tmp141; + ASSERT_ALIGNED_DOUBLE; + tmp140 = c_re(inout[31 * iostride]); + tmp142 = c_im(inout[31 * iostride]); + tmp139 = c_re(W[30]); + tmp141 = c_im(W[30]); + tmp143 = (tmp139 * tmp140) + (tmp141 * tmp142); + tmp272 = (tmp139 * tmp142) - (tmp141 * tmp140); + } + { + fftw_real tmp156; + fftw_real tmp158; + fftw_real tmp155; + fftw_real tmp157; + ASSERT_ALIGNED_DOUBLE; + tmp156 = c_re(inout[23 * iostride]); + tmp158 = c_im(inout[23 * iostride]); + tmp155 = c_re(W[22]); + tmp157 = c_im(W[22]); + tmp159 = (tmp155 * tmp156) + (tmp157 * tmp158); + tmp257 = (tmp155 * tmp158) - (tmp157 * tmp156); + } + { + fftw_real tmp145; + fftw_real tmp147; + fftw_real tmp144; + fftw_real tmp146; + ASSERT_ALIGNED_DOUBLE; + tmp145 = c_re(inout[15 * iostride]); + tmp147 = c_im(inout[15 * iostride]); + tmp144 = c_re(W[14]); + tmp146 = c_im(W[14]); + tmp148 = (tmp144 * tmp145) + (tmp146 * tmp147); + tmp273 = (tmp144 * tmp147) - (tmp146 * tmp145); + } + { + fftw_real tmp151; + fftw_real tmp153; + fftw_real tmp150; + fftw_real tmp152; + ASSERT_ALIGNED_DOUBLE; + tmp151 = c_re(inout[7 * iostride]); + tmp153 = c_im(inout[7 * iostride]); + tmp150 = c_re(W[6]); + tmp152 = c_im(W[6]); + tmp154 = (tmp150 * tmp151) + (tmp152 * tmp153); + tmp256 = (tmp150 * tmp153) - (tmp152 * tmp151); + } + { + fftw_real tmp149; + fftw_real tmp160; + fftw_real tmp274; + fftw_real tmp275; + ASSERT_ALIGNED_DOUBLE; + tmp149 = tmp143 + tmp148; + tmp160 = tmp154 + tmp159; + tmp161 = tmp149 + tmp160; + tmp403 = tmp149 - tmp160; + tmp274 = tmp272 - tmp273; + tmp275 = tmp154 - tmp159; + tmp276 = tmp274 + tmp275; + tmp316 = tmp274 - tmp275; + } + { + fftw_real tmp370; + fftw_real tmp371; + fftw_real tmp255; + fftw_real tmp258; + ASSERT_ALIGNED_DOUBLE; + tmp370 = tmp272 + tmp273; + tmp371 = tmp256 + tmp257; + tmp372 = tmp370 + tmp371; + tmp400 = tmp370 - tmp371; + tmp255 = tmp143 - tmp148; + tmp258 = tmp256 - tmp257; + tmp259 = tmp255 - tmp258; + tmp319 = tmp255 + tmp258; + } + } + { + fftw_real tmp24; + fftw_real tmp193; + fftw_real tmp40; + fftw_real tmp199; + fftw_real tmp29; + fftw_real tmp194; + fftw_real tmp35; + fftw_real tmp198; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp21; + fftw_real tmp23; + fftw_real tmp20; + fftw_real tmp22; + ASSERT_ALIGNED_DOUBLE; + tmp21 = c_re(inout[4 * iostride]); + tmp23 = c_im(inout[4 * iostride]); + tmp20 = c_re(W[3]); + tmp22 = c_im(W[3]); + tmp24 = (tmp20 * tmp21) + (tmp22 * tmp23); + tmp193 = (tmp20 * tmp23) - (tmp22 * tmp21); + } + { + fftw_real tmp37; + fftw_real tmp39; + fftw_real tmp36; + fftw_real tmp38; + ASSERT_ALIGNED_DOUBLE; + tmp37 = c_re(inout[12 * iostride]); + tmp39 = c_im(inout[12 * iostride]); + tmp36 = c_re(W[11]); + tmp38 = c_im(W[11]); + tmp40 = (tmp36 * tmp37) + (tmp38 * tmp39); + tmp199 = (tmp36 * tmp39) - (tmp38 * tmp37); + } + { + fftw_real tmp26; + fftw_real tmp28; + fftw_real tmp25; + fftw_real tmp27; + ASSERT_ALIGNED_DOUBLE; + tmp26 = c_re(inout[20 * iostride]); + tmp28 = c_im(inout[20 * iostride]); + tmp25 = c_re(W[19]); + tmp27 = c_im(W[19]); + tmp29 = (tmp25 * tmp26) + (tmp27 * tmp28); + tmp194 = (tmp25 * tmp28) - (tmp27 * tmp26); + } + { + fftw_real tmp32; + fftw_real tmp34; + fftw_real tmp31; + fftw_real tmp33; + ASSERT_ALIGNED_DOUBLE; + tmp32 = c_re(inout[28 * iostride]); + tmp34 = c_im(inout[28 * iostride]); + tmp31 = c_re(W[27]); + tmp33 = c_im(W[27]); + tmp35 = (tmp31 * tmp32) + (tmp33 * tmp34); + tmp198 = (tmp31 * tmp34) - (tmp33 * tmp32); + } + { + fftw_real tmp30; + fftw_real tmp41; + fftw_real tmp197; + fftw_real tmp200; + ASSERT_ALIGNED_DOUBLE; + tmp30 = tmp24 + tmp29; + tmp41 = tmp35 + tmp40; + tmp42 = tmp30 + tmp41; + tmp455 = tmp30 - tmp41; + tmp197 = tmp35 - tmp40; + tmp200 = tmp198 - tmp199; + tmp201 = tmp197 + tmp200; + tmp304 = tmp200 - tmp197; + } + { + fftw_real tmp388; + fftw_real tmp389; + fftw_real tmp192; + fftw_real tmp195; + ASSERT_ALIGNED_DOUBLE; + tmp388 = tmp198 + tmp199; + tmp389 = tmp193 + tmp194; + tmp390 = tmp388 - tmp389; + tmp437 = tmp389 + tmp388; + tmp192 = tmp24 - tmp29; + tmp195 = tmp193 - tmp194; + tmp196 = tmp192 - tmp195; + tmp305 = tmp192 + tmp195; + } + } + { + fftw_real tmp166; + fftw_real tmp261; + fftw_real tmp171; + fftw_real tmp262; + fftw_real tmp260; + fftw_real tmp263; + fftw_real tmp177; + fftw_real tmp266; + fftw_real tmp182; + fftw_real tmp267; + fftw_real tmp265; + fftw_real tmp268; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp163; + fftw_real tmp165; + fftw_real tmp162; + fftw_real tmp164; + ASSERT_ALIGNED_DOUBLE; + tmp163 = c_re(inout[3 * iostride]); + tmp165 = c_im(inout[3 * iostride]); + tmp162 = c_re(W[2]); + tmp164 = c_im(W[2]); + tmp166 = (tmp162 * tmp163) + (tmp164 * tmp165); + tmp261 = (tmp162 * tmp165) - (tmp164 * tmp163); + } + { + fftw_real tmp168; + fftw_real tmp170; + fftw_real tmp167; + fftw_real tmp169; + ASSERT_ALIGNED_DOUBLE; + tmp168 = c_re(inout[19 * iostride]); + tmp170 = c_im(inout[19 * iostride]); + tmp167 = c_re(W[18]); + tmp169 = c_im(W[18]); + tmp171 = (tmp167 * tmp168) + (tmp169 * tmp170); + tmp262 = (tmp167 * tmp170) - (tmp169 * tmp168); + } + tmp260 = tmp166 - tmp171; + tmp263 = tmp261 - tmp262; + { + fftw_real tmp174; + fftw_real tmp176; + fftw_real tmp173; + fftw_real tmp175; + ASSERT_ALIGNED_DOUBLE; + tmp174 = c_re(inout[27 * iostride]); + tmp176 = c_im(inout[27 * iostride]); + tmp173 = c_re(W[26]); + tmp175 = c_im(W[26]); + tmp177 = (tmp173 * tmp174) + (tmp175 * tmp176); + tmp266 = (tmp173 * tmp176) - (tmp175 * tmp174); + } + { + fftw_real tmp179; + fftw_real tmp181; + fftw_real tmp178; + fftw_real tmp180; + ASSERT_ALIGNED_DOUBLE; + tmp179 = c_re(inout[11 * iostride]); + tmp181 = c_im(inout[11 * iostride]); + tmp178 = c_re(W[10]); + tmp180 = c_im(W[10]); + tmp182 = (tmp178 * tmp179) + (tmp180 * tmp181); + tmp267 = (tmp178 * tmp181) - (tmp180 * tmp179); + } + tmp265 = tmp177 - tmp182; + tmp268 = tmp266 - tmp267; + { + fftw_real tmp172; + fftw_real tmp183; + fftw_real tmp373; + fftw_real tmp374; + ASSERT_ALIGNED_DOUBLE; + tmp172 = tmp166 + tmp171; + tmp183 = tmp177 + tmp182; + tmp184 = tmp172 + tmp183; + tmp401 = tmp172 - tmp183; + tmp373 = tmp261 + tmp262; + tmp374 = tmp266 + tmp267; + tmp375 = tmp373 + tmp374; + tmp404 = tmp374 - tmp373; + } + { + fftw_real tmp264; + fftw_real tmp269; + fftw_real tmp277; + fftw_real tmp278; + ASSERT_ALIGNED_DOUBLE; + tmp264 = tmp260 - tmp263; + tmp269 = tmp265 + tmp268; + tmp270 = K707106781 * (tmp264 + tmp269); + tmp317 = K707106781 * (tmp264 - tmp269); + tmp277 = tmp260 + tmp263; + tmp278 = tmp268 - tmp265; + tmp279 = K707106781 * (tmp277 + tmp278); + tmp320 = K707106781 * (tmp278 - tmp277); + } + } + { + fftw_real tmp48; + fftw_real tmp215; + fftw_real tmp64; + fftw_real tmp222; + fftw_real tmp53; + fftw_real tmp216; + fftw_real tmp59; + fftw_real tmp221; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp45; + fftw_real tmp47; + fftw_real tmp44; + fftw_real tmp46; + ASSERT_ALIGNED_DOUBLE; + tmp45 = c_re(inout[2 * iostride]); + tmp47 = c_im(inout[2 * iostride]); + tmp44 = c_re(W[1]); + tmp46 = c_im(W[1]); + tmp48 = (tmp44 * tmp45) + (tmp46 * tmp47); + tmp215 = (tmp44 * tmp47) - (tmp46 * tmp45); + } + { + fftw_real tmp61; + fftw_real tmp63; + fftw_real tmp60; + fftw_real tmp62; + ASSERT_ALIGNED_DOUBLE; + tmp61 = c_re(inout[26 * iostride]); + tmp63 = c_im(inout[26 * iostride]); + tmp60 = c_re(W[25]); + tmp62 = c_im(W[25]); + tmp64 = (tmp60 * tmp61) + (tmp62 * tmp63); + tmp222 = (tmp60 * tmp63) - (tmp62 * tmp61); + } + { + fftw_real tmp50; + fftw_real tmp52; + fftw_real tmp49; + fftw_real tmp51; + ASSERT_ALIGNED_DOUBLE; + tmp50 = c_re(inout[18 * iostride]); + tmp52 = c_im(inout[18 * iostride]); + tmp49 = c_re(W[17]); + tmp51 = c_im(W[17]); + tmp53 = (tmp49 * tmp50) + (tmp51 * tmp52); + tmp216 = (tmp49 * tmp52) - (tmp51 * tmp50); + } + { + fftw_real tmp56; + fftw_real tmp58; + fftw_real tmp55; + fftw_real tmp57; + ASSERT_ALIGNED_DOUBLE; + tmp56 = c_re(inout[10 * iostride]); + tmp58 = c_im(inout[10 * iostride]); + tmp55 = c_re(W[9]); + tmp57 = c_im(W[9]); + tmp59 = (tmp55 * tmp56) + (tmp57 * tmp58); + tmp221 = (tmp55 * tmp58) - (tmp57 * tmp56); + } + { + fftw_real tmp54; + fftw_real tmp65; + fftw_real tmp220; + fftw_real tmp223; + ASSERT_ALIGNED_DOUBLE; + tmp54 = tmp48 + tmp53; + tmp65 = tmp59 + tmp64; + tmp66 = tmp54 + tmp65; + tmp395 = tmp54 - tmp65; + tmp220 = tmp48 - tmp53; + tmp223 = tmp221 - tmp222; + tmp224 = tmp220 - tmp223; + tmp312 = tmp220 + tmp223; + } + { + fftw_real tmp355; + fftw_real tmp356; + fftw_real tmp217; + fftw_real tmp218; + ASSERT_ALIGNED_DOUBLE; + tmp355 = tmp215 + tmp216; + tmp356 = tmp221 + tmp222; + tmp357 = tmp355 + tmp356; + tmp396 = tmp355 - tmp356; + tmp217 = tmp215 - tmp216; + tmp218 = tmp59 - tmp64; + tmp219 = tmp217 + tmp218; + tmp311 = tmp217 - tmp218; + } + } + { + fftw_real tmp96; + fftw_real tmp245; + fftw_real tmp112; + fftw_real tmp230; + fftw_real tmp101; + fftw_real tmp246; + fftw_real tmp107; + fftw_real tmp229; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp93; + fftw_real tmp95; + fftw_real tmp92; + fftw_real tmp94; + ASSERT_ALIGNED_DOUBLE; + tmp93 = c_re(inout[iostride]); + tmp95 = c_im(inout[iostride]); + tmp92 = c_re(W[0]); + tmp94 = c_im(W[0]); + tmp96 = (tmp92 * tmp93) + (tmp94 * tmp95); + tmp245 = (tmp92 * tmp95) - (tmp94 * tmp93); + } + { + fftw_real tmp109; + fftw_real tmp111; + fftw_real tmp108; + fftw_real tmp110; + ASSERT_ALIGNED_DOUBLE; + tmp109 = c_re(inout[25 * iostride]); + tmp111 = c_im(inout[25 * iostride]); + tmp108 = c_re(W[24]); + tmp110 = c_im(W[24]); + tmp112 = (tmp108 * tmp109) + (tmp110 * tmp111); + tmp230 = (tmp108 * tmp111) - (tmp110 * tmp109); + } + { + fftw_real tmp98; + fftw_real tmp100; + fftw_real tmp97; + fftw_real tmp99; + ASSERT_ALIGNED_DOUBLE; + tmp98 = c_re(inout[17 * iostride]); + tmp100 = c_im(inout[17 * iostride]); + tmp97 = c_re(W[16]); + tmp99 = c_im(W[16]); + tmp101 = (tmp97 * tmp98) + (tmp99 * tmp100); + tmp246 = (tmp97 * tmp100) - (tmp99 * tmp98); + } + { + fftw_real tmp104; + fftw_real tmp106; + fftw_real tmp103; + fftw_real tmp105; + ASSERT_ALIGNED_DOUBLE; + tmp104 = c_re(inout[9 * iostride]); + tmp106 = c_im(inout[9 * iostride]); + tmp103 = c_re(W[8]); + tmp105 = c_im(W[8]); + tmp107 = (tmp103 * tmp104) + (tmp105 * tmp106); + tmp229 = (tmp103 * tmp106) - (tmp105 * tmp104); + } + { + fftw_real tmp102; + fftw_real tmp113; + fftw_real tmp247; + fftw_real tmp248; + ASSERT_ALIGNED_DOUBLE; + tmp102 = tmp96 + tmp101; + tmp113 = tmp107 + tmp112; + tmp114 = tmp102 + tmp113; + tmp410 = tmp102 - tmp113; + tmp247 = tmp245 - tmp246; + tmp248 = tmp107 - tmp112; + tmp249 = tmp247 + tmp248; + tmp323 = tmp247 - tmp248; + } + { + fftw_real tmp361; + fftw_real tmp362; + fftw_real tmp228; + fftw_real tmp231; + ASSERT_ALIGNED_DOUBLE; + tmp361 = tmp245 + tmp246; + tmp362 = tmp229 + tmp230; + tmp363 = tmp361 + tmp362; + tmp407 = tmp361 - tmp362; + tmp228 = tmp96 - tmp101; + tmp231 = tmp229 - tmp230; + tmp232 = tmp228 - tmp231; + tmp326 = tmp228 + tmp231; + } + } + { + fftw_real tmp71; + fftw_real tmp204; + fftw_real tmp87; + fftw_real tmp211; + fftw_real tmp76; + fftw_real tmp205; + fftw_real tmp82; + fftw_real tmp210; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp68; + fftw_real tmp70; + fftw_real tmp67; + fftw_real tmp69; + ASSERT_ALIGNED_DOUBLE; + tmp68 = c_re(inout[30 * iostride]); + tmp70 = c_im(inout[30 * iostride]); + tmp67 = c_re(W[29]); + tmp69 = c_im(W[29]); + tmp71 = (tmp67 * tmp68) + (tmp69 * tmp70); + tmp204 = (tmp67 * tmp70) - (tmp69 * tmp68); + } + { + fftw_real tmp84; + fftw_real tmp86; + fftw_real tmp83; + fftw_real tmp85; + ASSERT_ALIGNED_DOUBLE; + tmp84 = c_re(inout[22 * iostride]); + tmp86 = c_im(inout[22 * iostride]); + tmp83 = c_re(W[21]); + tmp85 = c_im(W[21]); + tmp87 = (tmp83 * tmp84) + (tmp85 * tmp86); + tmp211 = (tmp83 * tmp86) - (tmp85 * tmp84); + } + { + fftw_real tmp73; + fftw_real tmp75; + fftw_real tmp72; + fftw_real tmp74; + ASSERT_ALIGNED_DOUBLE; + tmp73 = c_re(inout[14 * iostride]); + tmp75 = c_im(inout[14 * iostride]); + tmp72 = c_re(W[13]); + tmp74 = c_im(W[13]); + tmp76 = (tmp72 * tmp73) + (tmp74 * tmp75); + tmp205 = (tmp72 * tmp75) - (tmp74 * tmp73); + } + { + fftw_real tmp79; + fftw_real tmp81; + fftw_real tmp78; + fftw_real tmp80; + ASSERT_ALIGNED_DOUBLE; + tmp79 = c_re(inout[6 * iostride]); + tmp81 = c_im(inout[6 * iostride]); + tmp78 = c_re(W[5]); + tmp80 = c_im(W[5]); + tmp82 = (tmp78 * tmp79) + (tmp80 * tmp81); + tmp210 = (tmp78 * tmp81) - (tmp80 * tmp79); + } + { + fftw_real tmp77; + fftw_real tmp88; + fftw_real tmp209; + fftw_real tmp212; + ASSERT_ALIGNED_DOUBLE; + tmp77 = tmp71 + tmp76; + tmp88 = tmp82 + tmp87; + tmp89 = tmp77 + tmp88; + tmp393 = tmp77 - tmp88; + tmp209 = tmp71 - tmp76; + tmp212 = tmp210 - tmp211; + tmp213 = tmp209 - tmp212; + tmp309 = tmp209 + tmp212; + } + { + fftw_real tmp352; + fftw_real tmp353; + fftw_real tmp206; + fftw_real tmp207; + ASSERT_ALIGNED_DOUBLE; + tmp352 = tmp204 + tmp205; + tmp353 = tmp210 + tmp211; + tmp354 = tmp352 + tmp353; + tmp392 = tmp352 - tmp353; + tmp206 = tmp204 - tmp205; + tmp207 = tmp82 - tmp87; + tmp208 = tmp206 + tmp207; + tmp308 = tmp206 - tmp207; + } + } + { + fftw_real tmp119; + fftw_real tmp234; + fftw_real tmp124; + fftw_real tmp235; + fftw_real tmp233; + fftw_real tmp236; + fftw_real tmp130; + fftw_real tmp239; + fftw_real tmp135; + fftw_real tmp240; + fftw_real tmp238; + fftw_real tmp241; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp116; + fftw_real tmp118; + fftw_real tmp115; + fftw_real tmp117; + ASSERT_ALIGNED_DOUBLE; + tmp116 = c_re(inout[5 * iostride]); + tmp118 = c_im(inout[5 * iostride]); + tmp115 = c_re(W[4]); + tmp117 = c_im(W[4]); + tmp119 = (tmp115 * tmp116) + (tmp117 * tmp118); + tmp234 = (tmp115 * tmp118) - (tmp117 * tmp116); + } + { + fftw_real tmp121; + fftw_real tmp123; + fftw_real tmp120; + fftw_real tmp122; + ASSERT_ALIGNED_DOUBLE; + tmp121 = c_re(inout[21 * iostride]); + tmp123 = c_im(inout[21 * iostride]); + tmp120 = c_re(W[20]); + tmp122 = c_im(W[20]); + tmp124 = (tmp120 * tmp121) + (tmp122 * tmp123); + tmp235 = (tmp120 * tmp123) - (tmp122 * tmp121); + } + tmp233 = tmp119 - tmp124; + tmp236 = tmp234 - tmp235; + { + fftw_real tmp127; + fftw_real tmp129; + fftw_real tmp126; + fftw_real tmp128; + ASSERT_ALIGNED_DOUBLE; + tmp127 = c_re(inout[29 * iostride]); + tmp129 = c_im(inout[29 * iostride]); + tmp126 = c_re(W[28]); + tmp128 = c_im(W[28]); + tmp130 = (tmp126 * tmp127) + (tmp128 * tmp129); + tmp239 = (tmp126 * tmp129) - (tmp128 * tmp127); + } + { + fftw_real tmp132; + fftw_real tmp134; + fftw_real tmp131; + fftw_real tmp133; + ASSERT_ALIGNED_DOUBLE; + tmp132 = c_re(inout[13 * iostride]); + tmp134 = c_im(inout[13 * iostride]); + tmp131 = c_re(W[12]); + tmp133 = c_im(W[12]); + tmp135 = (tmp131 * tmp132) + (tmp133 * tmp134); + tmp240 = (tmp131 * tmp134) - (tmp133 * tmp132); + } + tmp238 = tmp130 - tmp135; + tmp241 = tmp239 - tmp240; + { + fftw_real tmp125; + fftw_real tmp136; + fftw_real tmp364; + fftw_real tmp365; + ASSERT_ALIGNED_DOUBLE; + tmp125 = tmp119 + tmp124; + tmp136 = tmp130 + tmp135; + tmp137 = tmp125 + tmp136; + tmp408 = tmp125 - tmp136; + tmp364 = tmp234 + tmp235; + tmp365 = tmp239 + tmp240; + tmp366 = tmp364 + tmp365; + tmp411 = tmp365 - tmp364; + } + { + fftw_real tmp237; + fftw_real tmp242; + fftw_real tmp250; + fftw_real tmp251; + ASSERT_ALIGNED_DOUBLE; + tmp237 = tmp233 - tmp236; + tmp242 = tmp238 + tmp241; + tmp243 = K707106781 * (tmp237 + tmp242); + tmp324 = K707106781 * (tmp237 - tmp242); + tmp250 = tmp233 + tmp236; + tmp251 = tmp241 - tmp238; + tmp252 = K707106781 * (tmp250 + tmp251); + tmp327 = K707106781 * (tmp251 - tmp250); + } + } + { + fftw_real tmp91; + fftw_real tmp383; + fftw_real tmp444; + fftw_real tmp446; + fftw_real tmp186; + fftw_real tmp445; + fftw_real tmp386; + fftw_real tmp435; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp43; + fftw_real tmp90; + fftw_real tmp436; + fftw_real tmp443; + ASSERT_ALIGNED_DOUBLE; + tmp43 = tmp19 + tmp42; + tmp90 = tmp66 + tmp89; + tmp91 = tmp43 + tmp90; + tmp383 = tmp43 - tmp90; + tmp436 = tmp357 + tmp354; + tmp443 = tmp437 + tmp442; + tmp444 = tmp436 + tmp443; + tmp446 = tmp443 - tmp436; + } + { + fftw_real tmp138; + fftw_real tmp185; + fftw_real tmp384; + fftw_real tmp385; + ASSERT_ALIGNED_DOUBLE; + tmp138 = tmp114 + tmp137; + tmp185 = tmp161 + tmp184; + tmp186 = tmp138 + tmp185; + tmp445 = tmp138 - tmp185; + tmp384 = tmp372 + tmp375; + tmp385 = tmp363 + tmp366; + tmp386 = tmp384 - tmp385; + tmp435 = tmp385 + tmp384; + } + c_re(inout[16 * iostride]) = tmp91 - tmp186; + c_re(inout[0]) = tmp91 + tmp186; + c_re(inout[24 * iostride]) = tmp383 - tmp386; + c_re(inout[8 * iostride]) = tmp383 + tmp386; + c_im(inout[0]) = tmp435 + tmp444; + c_im(inout[16 * iostride]) = tmp444 - tmp435; + c_im(inout[8 * iostride]) = tmp445 + tmp446; + c_im(inout[24 * iostride]) = tmp446 - tmp445; + } + { + fftw_real tmp359; + fftw_real tmp379; + fftw_real tmp450; + fftw_real tmp452; + fftw_real tmp368; + fftw_real tmp381; + fftw_real tmp377; + fftw_real tmp380; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp351; + fftw_real tmp358; + fftw_real tmp448; + fftw_real tmp449; + ASSERT_ALIGNED_DOUBLE; + tmp351 = tmp19 - tmp42; + tmp358 = tmp354 - tmp357; + tmp359 = tmp351 + tmp358; + tmp379 = tmp351 - tmp358; + tmp448 = tmp66 - tmp89; + tmp449 = tmp442 - tmp437; + tmp450 = tmp448 + tmp449; + tmp452 = tmp449 - tmp448; + } + { + fftw_real tmp360; + fftw_real tmp367; + fftw_real tmp369; + fftw_real tmp376; + ASSERT_ALIGNED_DOUBLE; + tmp360 = tmp114 - tmp137; + tmp367 = tmp363 - tmp366; + tmp368 = tmp360 - tmp367; + tmp381 = tmp360 + tmp367; + tmp369 = tmp161 - tmp184; + tmp376 = tmp372 - tmp375; + tmp377 = tmp369 + tmp376; + tmp380 = tmp376 - tmp369; + } + { + fftw_real tmp378; + fftw_real tmp451; + fftw_real tmp382; + fftw_real tmp447; + ASSERT_ALIGNED_DOUBLE; + tmp378 = K707106781 * (tmp368 + tmp377); + c_re(inout[20 * iostride]) = tmp359 - tmp378; + c_re(inout[4 * iostride]) = tmp359 + tmp378; + tmp451 = K707106781 * (tmp368 - tmp377); + c_im(inout[12 * iostride]) = tmp451 + tmp452; + c_im(inout[28 * iostride]) = tmp452 - tmp451; + tmp382 = K707106781 * (tmp380 - tmp381); + c_re(inout[28 * iostride]) = tmp379 - tmp382; + c_re(inout[12 * iostride]) = tmp379 + tmp382; + tmp447 = K707106781 * (tmp381 + tmp380); + c_im(inout[4 * iostride]) = tmp447 + tmp450; + c_im(inout[20 * iostride]) = tmp450 - tmp447; + } + } + { + fftw_real tmp391; + fftw_real tmp419; + fftw_real tmp398; + fftw_real tmp454; + fftw_real tmp422; + fftw_real tmp462; + fftw_real tmp406; + fftw_real tmp417; + fftw_real tmp457; + fftw_real tmp463; + fftw_real tmp426; + fftw_real tmp433; + fftw_real tmp413; + fftw_real tmp416; + fftw_real tmp429; + fftw_real tmp432; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp394; + fftw_real tmp397; + fftw_real tmp424; + fftw_real tmp425; + ASSERT_ALIGNED_DOUBLE; + tmp391 = tmp387 - tmp390; + tmp419 = tmp387 + tmp390; + tmp394 = tmp392 - tmp393; + tmp397 = tmp395 + tmp396; + tmp398 = K707106781 * (tmp394 - tmp397); + tmp454 = K707106781 * (tmp397 + tmp394); + { + fftw_real tmp420; + fftw_real tmp421; + fftw_real tmp402; + fftw_real tmp405; + ASSERT_ALIGNED_DOUBLE; + tmp420 = tmp395 - tmp396; + tmp421 = tmp393 + tmp392; + tmp422 = K707106781 * (tmp420 + tmp421); + tmp462 = K707106781 * (tmp420 - tmp421); + tmp402 = tmp400 - tmp401; + tmp405 = tmp403 - tmp404; + tmp406 = (K382683432 * tmp402) - (K923879532 * tmp405); + tmp417 = (K923879532 * tmp402) + (K382683432 * tmp405); + } + tmp457 = tmp455 + tmp456; + tmp463 = tmp456 - tmp455; + tmp424 = tmp400 + tmp401; + tmp425 = tmp403 + tmp404; + tmp426 = (K923879532 * tmp424) - (K382683432 * tmp425); + tmp433 = (K382683432 * tmp424) + (K923879532 * tmp425); + { + fftw_real tmp409; + fftw_real tmp412; + fftw_real tmp427; + fftw_real tmp428; + ASSERT_ALIGNED_DOUBLE; + tmp409 = tmp407 - tmp408; + tmp412 = tmp410 - tmp411; + tmp413 = (K382683432 * tmp409) + (K923879532 * tmp412); + tmp416 = (K382683432 * tmp412) - (K923879532 * tmp409); + tmp427 = tmp407 + tmp408; + tmp428 = tmp410 + tmp411; + tmp429 = (K923879532 * tmp427) + (K382683432 * tmp428); + tmp432 = (K923879532 * tmp428) - (K382683432 * tmp427); + } + } + { + fftw_real tmp399; + fftw_real tmp414; + fftw_real tmp415; + fftw_real tmp418; + ASSERT_ALIGNED_DOUBLE; + tmp399 = tmp391 - tmp398; + tmp414 = tmp406 - tmp413; + c_re(inout[30 * iostride]) = tmp399 - tmp414; + c_re(inout[14 * iostride]) = tmp399 + tmp414; + tmp415 = tmp391 + tmp398; + tmp418 = tmp416 + tmp417; + c_re(inout[22 * iostride]) = tmp415 - tmp418; + c_re(inout[6 * iostride]) = tmp415 + tmp418; + } + { + fftw_real tmp465; + fftw_real tmp466; + fftw_real tmp461; + fftw_real tmp464; + ASSERT_ALIGNED_DOUBLE; + tmp465 = tmp416 - tmp417; + tmp466 = tmp463 - tmp462; + c_im(inout[14 * iostride]) = tmp465 + tmp466; + c_im(inout[30 * iostride]) = tmp466 - tmp465; + tmp461 = tmp413 + tmp406; + tmp464 = tmp462 + tmp463; + c_im(inout[6 * iostride]) = tmp461 + tmp464; + c_im(inout[22 * iostride]) = tmp464 - tmp461; + } + { + fftw_real tmp423; + fftw_real tmp430; + fftw_real tmp431; + fftw_real tmp434; + ASSERT_ALIGNED_DOUBLE; + tmp423 = tmp419 - tmp422; + tmp430 = tmp426 - tmp429; + c_re(inout[26 * iostride]) = tmp423 - tmp430; + c_re(inout[10 * iostride]) = tmp423 + tmp430; + tmp431 = tmp419 + tmp422; + tmp434 = tmp432 + tmp433; + c_re(inout[18 * iostride]) = tmp431 - tmp434; + c_re(inout[2 * iostride]) = tmp431 + tmp434; + } + { + fftw_real tmp459; + fftw_real tmp460; + fftw_real tmp453; + fftw_real tmp458; + ASSERT_ALIGNED_DOUBLE; + tmp459 = tmp432 - tmp433; + tmp460 = tmp457 - tmp454; + c_im(inout[10 * iostride]) = tmp459 + tmp460; + c_im(inout[26 * iostride]) = tmp460 - tmp459; + tmp453 = tmp429 + tmp426; + tmp458 = tmp454 + tmp457; + c_im(inout[2 * iostride]) = tmp453 + tmp458; + c_im(inout[18 * iostride]) = tmp458 - tmp453; + } + } + { + fftw_real tmp307; + fftw_real tmp335; + fftw_real tmp338; + fftw_real tmp492; + fftw_real tmp487; + fftw_real tmp493; + fftw_real tmp314; + fftw_real tmp484; + fftw_real tmp322; + fftw_real tmp333; + fftw_real tmp342; + fftw_real tmp349; + fftw_real tmp329; + fftw_real tmp332; + fftw_real tmp345; + fftw_real tmp348; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp306; + fftw_real tmp336; + fftw_real tmp337; + fftw_real tmp485; + fftw_real tmp310; + fftw_real tmp313; + ASSERT_ALIGNED_DOUBLE; + tmp306 = K707106781 * (tmp304 - tmp305); + tmp307 = tmp303 - tmp306; + tmp335 = tmp303 + tmp306; + tmp336 = (K382683432 * tmp312) - (K923879532 * tmp311); + tmp337 = (K923879532 * tmp308) + (K382683432 * tmp309); + tmp338 = tmp336 + tmp337; + tmp492 = tmp336 - tmp337; + tmp485 = K707106781 * (tmp196 - tmp201); + tmp487 = tmp485 + tmp486; + tmp493 = tmp486 - tmp485; + tmp310 = (K382683432 * tmp308) - (K923879532 * tmp309); + tmp313 = (K382683432 * tmp311) + (K923879532 * tmp312); + tmp314 = tmp310 - tmp313; + tmp484 = tmp313 + tmp310; + } + { + fftw_real tmp318; + fftw_real tmp321; + fftw_real tmp340; + fftw_real tmp341; + ASSERT_ALIGNED_DOUBLE; + tmp318 = tmp316 - tmp317; + tmp321 = tmp319 - tmp320; + tmp322 = (K195090322 * tmp318) - (K980785280 * tmp321); + tmp333 = (K980785280 * tmp318) + (K195090322 * tmp321); + tmp340 = tmp316 + tmp317; + tmp341 = tmp319 + tmp320; + tmp342 = (K831469612 * tmp340) - (K555570233 * tmp341); + tmp349 = (K555570233 * tmp340) + (K831469612 * tmp341); + } + { + fftw_real tmp325; + fftw_real tmp328; + fftw_real tmp343; + fftw_real tmp344; + ASSERT_ALIGNED_DOUBLE; + tmp325 = tmp323 - tmp324; + tmp328 = tmp326 - tmp327; + tmp329 = (K195090322 * tmp325) + (K980785280 * tmp328); + tmp332 = (K195090322 * tmp328) - (K980785280 * tmp325); + tmp343 = tmp323 + tmp324; + tmp344 = tmp326 + tmp327; + tmp345 = (K831469612 * tmp343) + (K555570233 * tmp344); + tmp348 = (K831469612 * tmp344) - (K555570233 * tmp343); + } + { + fftw_real tmp315; + fftw_real tmp330; + fftw_real tmp331; + fftw_real tmp334; + ASSERT_ALIGNED_DOUBLE; + tmp315 = tmp307 - tmp314; + tmp330 = tmp322 - tmp329; + c_re(inout[31 * iostride]) = tmp315 - tmp330; + c_re(inout[15 * iostride]) = tmp315 + tmp330; + tmp331 = tmp307 + tmp314; + tmp334 = tmp332 + tmp333; + c_re(inout[23 * iostride]) = tmp331 - tmp334; + c_re(inout[7 * iostride]) = tmp331 + tmp334; + } + { + fftw_real tmp495; + fftw_real tmp496; + fftw_real tmp491; + fftw_real tmp494; + ASSERT_ALIGNED_DOUBLE; + tmp495 = tmp332 - tmp333; + tmp496 = tmp493 - tmp492; + c_im(inout[15 * iostride]) = tmp495 + tmp496; + c_im(inout[31 * iostride]) = tmp496 - tmp495; + tmp491 = tmp329 + tmp322; + tmp494 = tmp492 + tmp493; + c_im(inout[7 * iostride]) = tmp491 + tmp494; + c_im(inout[23 * iostride]) = tmp494 - tmp491; + } + { + fftw_real tmp339; + fftw_real tmp346; + fftw_real tmp347; + fftw_real tmp350; + ASSERT_ALIGNED_DOUBLE; + tmp339 = tmp335 - tmp338; + tmp346 = tmp342 - tmp345; + c_re(inout[27 * iostride]) = tmp339 - tmp346; + c_re(inout[11 * iostride]) = tmp339 + tmp346; + tmp347 = tmp335 + tmp338; + tmp350 = tmp348 + tmp349; + c_re(inout[19 * iostride]) = tmp347 - tmp350; + c_re(inout[3 * iostride]) = tmp347 + tmp350; + } + { + fftw_real tmp489; + fftw_real tmp490; + fftw_real tmp483; + fftw_real tmp488; + ASSERT_ALIGNED_DOUBLE; + tmp489 = tmp348 - tmp349; + tmp490 = tmp487 - tmp484; + c_im(inout[11 * iostride]) = tmp489 + tmp490; + c_im(inout[27 * iostride]) = tmp490 - tmp489; + tmp483 = tmp345 + tmp342; + tmp488 = tmp484 + tmp487; + c_im(inout[3 * iostride]) = tmp483 + tmp488; + c_im(inout[19 * iostride]) = tmp488 - tmp483; + } + } + { + fftw_real tmp203; + fftw_real tmp287; + fftw_real tmp290; + fftw_real tmp478; + fftw_real tmp473; + fftw_real tmp479; + fftw_real tmp226; + fftw_real tmp468; + fftw_real tmp254; + fftw_real tmp285; + fftw_real tmp294; + fftw_real tmp301; + fftw_real tmp281; + fftw_real tmp284; + fftw_real tmp297; + fftw_real tmp300; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp202; + fftw_real tmp288; + fftw_real tmp289; + fftw_real tmp469; + fftw_real tmp214; + fftw_real tmp225; + ASSERT_ALIGNED_DOUBLE; + tmp202 = K707106781 * (tmp196 + tmp201); + tmp203 = tmp191 - tmp202; + tmp287 = tmp191 + tmp202; + tmp288 = (K923879532 * tmp224) - (K382683432 * tmp219); + tmp289 = (K382683432 * tmp208) + (K923879532 * tmp213); + tmp290 = tmp288 + tmp289; + tmp478 = tmp288 - tmp289; + tmp469 = K707106781 * (tmp305 + tmp304); + tmp473 = tmp469 + tmp472; + tmp479 = tmp472 - tmp469; + tmp214 = (K923879532 * tmp208) - (K382683432 * tmp213); + tmp225 = (K923879532 * tmp219) + (K382683432 * tmp224); + tmp226 = tmp214 - tmp225; + tmp468 = tmp225 + tmp214; + } + { + fftw_real tmp244; + fftw_real tmp253; + fftw_real tmp292; + fftw_real tmp293; + ASSERT_ALIGNED_DOUBLE; + tmp244 = tmp232 - tmp243; + tmp253 = tmp249 - tmp252; + tmp254 = (K555570233 * tmp244) - (K831469612 * tmp253); + tmp285 = (K831469612 * tmp244) + (K555570233 * tmp253); + tmp292 = tmp232 + tmp243; + tmp293 = tmp249 + tmp252; + tmp294 = (K980785280 * tmp292) - (K195090322 * tmp293); + tmp301 = (K195090322 * tmp292) + (K980785280 * tmp293); + } + { + fftw_real tmp271; + fftw_real tmp280; + fftw_real tmp295; + fftw_real tmp296; + ASSERT_ALIGNED_DOUBLE; + tmp271 = tmp259 - tmp270; + tmp280 = tmp276 - tmp279; + tmp281 = (K555570233 * tmp271) + (K831469612 * tmp280); + tmp284 = (K555570233 * tmp280) - (K831469612 * tmp271); + tmp295 = tmp259 + tmp270; + tmp296 = tmp276 + tmp279; + tmp297 = (K980785280 * tmp295) + (K195090322 * tmp296); + tmp300 = (K980785280 * tmp296) - (K195090322 * tmp295); + } + { + fftw_real tmp227; + fftw_real tmp282; + fftw_real tmp283; + fftw_real tmp286; + ASSERT_ALIGNED_DOUBLE; + tmp227 = tmp203 + tmp226; + tmp282 = tmp254 + tmp281; + c_re(inout[21 * iostride]) = tmp227 - tmp282; + c_re(inout[5 * iostride]) = tmp227 + tmp282; + tmp283 = tmp203 - tmp226; + tmp286 = tmp284 - tmp285; + c_re(inout[29 * iostride]) = tmp283 - tmp286; + c_re(inout[13 * iostride]) = tmp283 + tmp286; + } + { + fftw_real tmp477; + fftw_real tmp480; + fftw_real tmp481; + fftw_real tmp482; + ASSERT_ALIGNED_DOUBLE; + tmp477 = tmp285 + tmp284; + tmp480 = tmp478 + tmp479; + c_im(inout[5 * iostride]) = tmp477 + tmp480; + c_im(inout[21 * iostride]) = tmp480 - tmp477; + tmp481 = tmp254 - tmp281; + tmp482 = tmp479 - tmp478; + c_im(inout[13 * iostride]) = tmp481 + tmp482; + c_im(inout[29 * iostride]) = tmp482 - tmp481; + } + { + fftw_real tmp291; + fftw_real tmp298; + fftw_real tmp299; + fftw_real tmp302; + ASSERT_ALIGNED_DOUBLE; + tmp291 = tmp287 + tmp290; + tmp298 = tmp294 + tmp297; + c_re(inout[17 * iostride]) = tmp291 - tmp298; + c_re(inout[iostride]) = tmp291 + tmp298; + tmp299 = tmp287 - tmp290; + tmp302 = tmp300 - tmp301; + c_re(inout[25 * iostride]) = tmp299 - tmp302; + c_re(inout[9 * iostride]) = tmp299 + tmp302; + } + { + fftw_real tmp467; + fftw_real tmp474; + fftw_real tmp475; + fftw_real tmp476; + ASSERT_ALIGNED_DOUBLE; + tmp467 = tmp301 + tmp300; + tmp474 = tmp468 + tmp473; + c_im(inout[iostride]) = tmp467 + tmp474; + c_im(inout[17 * iostride]) = tmp474 - tmp467; + tmp475 = tmp294 - tmp297; + tmp476 = tmp473 - tmp468; + c_im(inout[9 * iostride]) = tmp475 + tmp476; + c_im(inout[25 * iostride]) = tmp476 - tmp475; + } + } + } +} + +static const int twiddle_order[] = +{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31}; +fftw_codelet_desc fftwi_twiddle_32_desc = +{ + "fftwi_twiddle_32", + (void (*)()) fftwi_twiddle_32, + 32, + FFTW_BACKWARD, + FFTW_TWIDDLE, + 715, + 31, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/ftwi_4.c b/src/sndobj/rfftw/ftwi_4.c new file mode 100644 index 0000000..dcdcb8e --- /dev/null +++ b/src/sndobj/rfftw/ftwi_4.c @@ -0,0 +1,142 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:57 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddleinv 4 */ + +/* + * This function contains 22 FP additions, 12 FP multiplications, + * (or, 16 additions, 6 multiplications, 6 fused multiply/add), + * 14 stack variables, and 16 memory accesses + */ + +/* + * Generator Id's : + * $Id: ftwi_4.c,v 1.1.1.1 2006/05/12 15:14:45 veplaini Exp $ + * $Id: ftwi_4.c,v 1.1.1.1 2006/05/12 15:14:45 veplaini Exp $ + * $Id: ftwi_4.c,v 1.1.1.1 2006/05/12 15:14:45 veplaini Exp $ + */ + +void fftwi_twiddle_4(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_complex *inout; + inout = A; + for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 3) { + fftw_real tmp1; + fftw_real tmp25; + fftw_real tmp6; + fftw_real tmp24; + fftw_real tmp12; + fftw_real tmp20; + fftw_real tmp17; + fftw_real tmp21; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(inout[0]); + tmp25 = c_im(inout[0]); + { + fftw_real tmp3; + fftw_real tmp5; + fftw_real tmp2; + fftw_real tmp4; + ASSERT_ALIGNED_DOUBLE; + tmp3 = c_re(inout[2 * iostride]); + tmp5 = c_im(inout[2 * iostride]); + tmp2 = c_re(W[1]); + tmp4 = c_im(W[1]); + tmp6 = (tmp2 * tmp3) + (tmp4 * tmp5); + tmp24 = (tmp2 * tmp5) - (tmp4 * tmp3); + } + { + fftw_real tmp9; + fftw_real tmp11; + fftw_real tmp8; + fftw_real tmp10; + ASSERT_ALIGNED_DOUBLE; + tmp9 = c_re(inout[iostride]); + tmp11 = c_im(inout[iostride]); + tmp8 = c_re(W[0]); + tmp10 = c_im(W[0]); + tmp12 = (tmp8 * tmp9) + (tmp10 * tmp11); + tmp20 = (tmp8 * tmp11) - (tmp10 * tmp9); + } + { + fftw_real tmp14; + fftw_real tmp16; + fftw_real tmp13; + fftw_real tmp15; + ASSERT_ALIGNED_DOUBLE; + tmp14 = c_re(inout[3 * iostride]); + tmp16 = c_im(inout[3 * iostride]); + tmp13 = c_re(W[2]); + tmp15 = c_im(W[2]); + tmp17 = (tmp13 * tmp14) + (tmp15 * tmp16); + tmp21 = (tmp13 * tmp16) - (tmp15 * tmp14); + } + { + fftw_real tmp7; + fftw_real tmp18; + fftw_real tmp27; + fftw_real tmp28; + ASSERT_ALIGNED_DOUBLE; + tmp7 = tmp1 + tmp6; + tmp18 = tmp12 + tmp17; + c_re(inout[2 * iostride]) = tmp7 - tmp18; + c_re(inout[0]) = tmp7 + tmp18; + tmp27 = tmp12 - tmp17; + tmp28 = tmp25 - tmp24; + c_im(inout[iostride]) = tmp27 + tmp28; + c_im(inout[3 * iostride]) = tmp28 - tmp27; + } + { + fftw_real tmp23; + fftw_real tmp26; + fftw_real tmp19; + fftw_real tmp22; + ASSERT_ALIGNED_DOUBLE; + tmp23 = tmp20 + tmp21; + tmp26 = tmp24 + tmp25; + c_im(inout[0]) = tmp23 + tmp26; + c_im(inout[2 * iostride]) = tmp26 - tmp23; + tmp19 = tmp1 - tmp6; + tmp22 = tmp20 - tmp21; + c_re(inout[iostride]) = tmp19 - tmp22; + c_re(inout[3 * iostride]) = tmp19 + tmp22; + } + } +} + +static const int twiddle_order[] = +{1, 2, 3}; +fftw_codelet_desc fftwi_twiddle_4_desc = +{ + "fftwi_twiddle_4", + (void (*)()) fftwi_twiddle_4, + 4, + FFTW_BACKWARD, + FFTW_TWIDDLE, + 99, + 3, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/ftwi_5.c b/src/sndobj/rfftw/ftwi_5.c new file mode 100644 index 0000000..322f116 --- /dev/null +++ b/src/sndobj/rfftw/ftwi_5.c @@ -0,0 +1,194 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:57 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddleinv 5 */ + +/* + * This function contains 40 FP additions, 28 FP multiplications, + * (or, 26 additions, 14 multiplications, 14 fused multiply/add), + * 26 stack variables, and 20 memory accesses + */ +static const fftw_real K559016994 = FFTW_KONST(+0.559016994374947424102293417182819058860154590); +static const fftw_real K250000000 = FFTW_KONST(+0.250000000000000000000000000000000000000000000); +static const fftw_real K951056516 = FFTW_KONST(+0.951056516295153572116439333379382143405698634); +static const fftw_real K587785252 = FFTW_KONST(+0.587785252292473129168705954639072768597652438); + +/* + * Generator Id's : + * $Id: ftwi_5.c,v 1.1.1.1 2006/05/12 15:14:55 veplaini Exp $ + * $Id: ftwi_5.c,v 1.1.1.1 2006/05/12 15:14:55 veplaini Exp $ + * $Id: ftwi_5.c,v 1.1.1.1 2006/05/12 15:14:55 veplaini Exp $ + */ + +void fftwi_twiddle_5(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_complex *inout; + inout = A; + for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 4) { + fftw_real tmp1; + fftw_real tmp40; + fftw_real tmp30; + fftw_real tmp33; + fftw_real tmp37; + fftw_real tmp38; + fftw_real tmp39; + fftw_real tmp42; + fftw_real tmp41; + fftw_real tmp12; + fftw_real tmp23; + fftw_real tmp24; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(inout[0]); + tmp40 = c_im(inout[0]); + { + fftw_real tmp6; + fftw_real tmp28; + fftw_real tmp22; + fftw_real tmp32; + fftw_real tmp11; + fftw_real tmp29; + fftw_real tmp17; + fftw_real tmp31; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp3; + fftw_real tmp5; + fftw_real tmp2; + fftw_real tmp4; + ASSERT_ALIGNED_DOUBLE; + tmp3 = c_re(inout[iostride]); + tmp5 = c_im(inout[iostride]); + tmp2 = c_re(W[0]); + tmp4 = c_im(W[0]); + tmp6 = (tmp2 * tmp3) + (tmp4 * tmp5); + tmp28 = (tmp2 * tmp5) - (tmp4 * tmp3); + } + { + fftw_real tmp19; + fftw_real tmp21; + fftw_real tmp18; + fftw_real tmp20; + ASSERT_ALIGNED_DOUBLE; + tmp19 = c_re(inout[3 * iostride]); + tmp21 = c_im(inout[3 * iostride]); + tmp18 = c_re(W[2]); + tmp20 = c_im(W[2]); + tmp22 = (tmp18 * tmp19) + (tmp20 * tmp21); + tmp32 = (tmp18 * tmp21) - (tmp20 * tmp19); + } + { + fftw_real tmp8; + fftw_real tmp10; + fftw_real tmp7; + fftw_real tmp9; + ASSERT_ALIGNED_DOUBLE; + tmp8 = c_re(inout[4 * iostride]); + tmp10 = c_im(inout[4 * iostride]); + tmp7 = c_re(W[3]); + tmp9 = c_im(W[3]); + tmp11 = (tmp7 * tmp8) + (tmp9 * tmp10); + tmp29 = (tmp7 * tmp10) - (tmp9 * tmp8); + } + { + fftw_real tmp14; + fftw_real tmp16; + fftw_real tmp13; + fftw_real tmp15; + ASSERT_ALIGNED_DOUBLE; + tmp14 = c_re(inout[2 * iostride]); + tmp16 = c_im(inout[2 * iostride]); + tmp13 = c_re(W[1]); + tmp15 = c_im(W[1]); + tmp17 = (tmp13 * tmp14) + (tmp15 * tmp16); + tmp31 = (tmp13 * tmp16) - (tmp15 * tmp14); + } + tmp30 = tmp28 - tmp29; + tmp33 = tmp31 - tmp32; + tmp37 = tmp28 + tmp29; + tmp38 = tmp31 + tmp32; + tmp39 = tmp37 + tmp38; + tmp42 = tmp17 - tmp22; + tmp41 = tmp6 - tmp11; + tmp12 = tmp6 + tmp11; + tmp23 = tmp17 + tmp22; + tmp24 = tmp12 + tmp23; + } + c_re(inout[0]) = tmp1 + tmp24; + { + fftw_real tmp34; + fftw_real tmp36; + fftw_real tmp27; + fftw_real tmp35; + fftw_real tmp25; + fftw_real tmp26; + ASSERT_ALIGNED_DOUBLE; + tmp34 = (K587785252 * tmp30) - (K951056516 * tmp33); + tmp36 = (K951056516 * tmp30) + (K587785252 * tmp33); + tmp25 = tmp1 - (K250000000 * tmp24); + tmp26 = K559016994 * (tmp12 - tmp23); + tmp27 = tmp25 - tmp26; + tmp35 = tmp26 + tmp25; + c_re(inout[2 * iostride]) = tmp27 - tmp34; + c_re(inout[3 * iostride]) = tmp27 + tmp34; + c_re(inout[iostride]) = tmp35 - tmp36; + c_re(inout[4 * iostride]) = tmp35 + tmp36; + } + c_im(inout[0]) = tmp39 + tmp40; + { + fftw_real tmp43; + fftw_real tmp47; + fftw_real tmp46; + fftw_real tmp48; + fftw_real tmp44; + fftw_real tmp45; + ASSERT_ALIGNED_DOUBLE; + tmp43 = (K951056516 * tmp41) + (K587785252 * tmp42); + tmp47 = (K587785252 * tmp41) - (K951056516 * tmp42); + tmp44 = K559016994 * (tmp37 - tmp38); + tmp45 = tmp40 - (K250000000 * tmp39); + tmp46 = tmp44 + tmp45; + tmp48 = tmp45 - tmp44; + c_im(inout[iostride]) = tmp43 + tmp46; + c_im(inout[4 * iostride]) = tmp46 - tmp43; + c_im(inout[2 * iostride]) = tmp47 + tmp48; + c_im(inout[3 * iostride]) = tmp48 - tmp47; + } + } +} + +static const int twiddle_order[] = +{1, 2, 3, 4}; +fftw_codelet_desc fftwi_twiddle_5_desc = +{ + "fftwi_twiddle_5", + (void (*)()) fftwi_twiddle_5, + 5, + FFTW_BACKWARD, + FFTW_TWIDDLE, + 121, + 4, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/ftwi_6.c b/src/sndobj/rfftw/ftwi_6.c new file mode 100644 index 0000000..17aa81b --- /dev/null +++ b/src/sndobj/rfftw/ftwi_6.c @@ -0,0 +1,219 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:57 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddleinv 6 */ + +/* + * This function contains 46 FP additions, 28 FP multiplications, + * (or, 32 additions, 14 multiplications, 14 fused multiply/add), + * 22 stack variables, and 24 memory accesses + */ +static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); +static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); + +/* + * Generator Id's : + * $Id: ftwi_6.c,v 1.1.1.1 2006/05/12 15:14:52 veplaini Exp $ + * $Id: ftwi_6.c,v 1.1.1.1 2006/05/12 15:14:52 veplaini Exp $ + * $Id: ftwi_6.c,v 1.1.1.1 2006/05/12 15:14:52 veplaini Exp $ + */ + +void fftwi_twiddle_6(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_complex *inout; + inout = A; + for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 5) { + fftw_real tmp7; + fftw_real tmp31; + fftw_real tmp50; + fftw_real tmp54; + fftw_real tmp29; + fftw_real tmp33; + fftw_real tmp38; + fftw_real tmp44; + fftw_real tmp18; + fftw_real tmp32; + fftw_real tmp41; + fftw_real tmp45; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp49; + fftw_real tmp6; + fftw_real tmp48; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(inout[0]); + tmp49 = c_im(inout[0]); + { + fftw_real tmp3; + fftw_real tmp5; + fftw_real tmp2; + fftw_real tmp4; + ASSERT_ALIGNED_DOUBLE; + tmp3 = c_re(inout[3 * iostride]); + tmp5 = c_im(inout[3 * iostride]); + tmp2 = c_re(W[2]); + tmp4 = c_im(W[2]); + tmp6 = (tmp2 * tmp3) + (tmp4 * tmp5); + tmp48 = (tmp2 * tmp5) - (tmp4 * tmp3); + } + tmp7 = tmp1 - tmp6; + tmp31 = tmp1 + tmp6; + tmp50 = tmp48 + tmp49; + tmp54 = tmp49 - tmp48; + } + { + fftw_real tmp23; + fftw_real tmp36; + fftw_real tmp28; + fftw_real tmp37; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp20; + fftw_real tmp22; + fftw_real tmp19; + fftw_real tmp21; + ASSERT_ALIGNED_DOUBLE; + tmp20 = c_re(inout[4 * iostride]); + tmp22 = c_im(inout[4 * iostride]); + tmp19 = c_re(W[3]); + tmp21 = c_im(W[3]); + tmp23 = (tmp19 * tmp20) + (tmp21 * tmp22); + tmp36 = (tmp19 * tmp22) - (tmp21 * tmp20); + } + { + fftw_real tmp25; + fftw_real tmp27; + fftw_real tmp24; + fftw_real tmp26; + ASSERT_ALIGNED_DOUBLE; + tmp25 = c_re(inout[iostride]); + tmp27 = c_im(inout[iostride]); + tmp24 = c_re(W[0]); + tmp26 = c_im(W[0]); + tmp28 = (tmp24 * tmp25) + (tmp26 * tmp27); + tmp37 = (tmp24 * tmp27) - (tmp26 * tmp25); + } + tmp29 = tmp23 - tmp28; + tmp33 = tmp23 + tmp28; + tmp38 = tmp36 - tmp37; + tmp44 = tmp36 + tmp37; + } + { + fftw_real tmp12; + fftw_real tmp39; + fftw_real tmp17; + fftw_real tmp40; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp9; + fftw_real tmp11; + fftw_real tmp8; + fftw_real tmp10; + ASSERT_ALIGNED_DOUBLE; + tmp9 = c_re(inout[2 * iostride]); + tmp11 = c_im(inout[2 * iostride]); + tmp8 = c_re(W[1]); + tmp10 = c_im(W[1]); + tmp12 = (tmp8 * tmp9) + (tmp10 * tmp11); + tmp39 = (tmp8 * tmp11) - (tmp10 * tmp9); + } + { + fftw_real tmp14; + fftw_real tmp16; + fftw_real tmp13; + fftw_real tmp15; + ASSERT_ALIGNED_DOUBLE; + tmp14 = c_re(inout[5 * iostride]); + tmp16 = c_im(inout[5 * iostride]); + tmp13 = c_re(W[4]); + tmp15 = c_im(W[4]); + tmp17 = (tmp13 * tmp14) + (tmp15 * tmp16); + tmp40 = (tmp13 * tmp16) - (tmp15 * tmp14); + } + tmp18 = tmp12 - tmp17; + tmp32 = tmp12 + tmp17; + tmp41 = tmp39 - tmp40; + tmp45 = tmp39 + tmp40; + } + { + fftw_real tmp42; + fftw_real tmp30; + fftw_real tmp35; + fftw_real tmp53; + fftw_real tmp55; + fftw_real tmp56; + ASSERT_ALIGNED_DOUBLE; + tmp42 = K866025403 * (tmp38 - tmp41); + tmp30 = tmp18 + tmp29; + tmp35 = tmp7 - (K500000000 * tmp30); + c_re(inout[3 * iostride]) = tmp7 + tmp30; + c_re(inout[iostride]) = tmp35 + tmp42; + c_re(inout[5 * iostride]) = tmp35 - tmp42; + tmp53 = K866025403 * (tmp18 - tmp29); + tmp55 = tmp41 + tmp38; + tmp56 = tmp54 - (K500000000 * tmp55); + c_im(inout[iostride]) = tmp53 + tmp56; + c_im(inout[5 * iostride]) = tmp56 - tmp53; + c_im(inout[3 * iostride]) = tmp55 + tmp54; + } + { + fftw_real tmp46; + fftw_real tmp34; + fftw_real tmp43; + fftw_real tmp52; + fftw_real tmp47; + fftw_real tmp51; + ASSERT_ALIGNED_DOUBLE; + tmp46 = K866025403 * (tmp44 - tmp45); + tmp34 = tmp32 + tmp33; + tmp43 = tmp31 - (K500000000 * tmp34); + c_re(inout[0]) = tmp31 + tmp34; + c_re(inout[4 * iostride]) = tmp43 + tmp46; + c_re(inout[2 * iostride]) = tmp43 - tmp46; + tmp52 = K866025403 * (tmp32 - tmp33); + tmp47 = tmp45 + tmp44; + tmp51 = tmp50 - (K500000000 * tmp47); + c_im(inout[0]) = tmp47 + tmp50; + c_im(inout[4 * iostride]) = tmp52 + tmp51; + c_im(inout[2 * iostride]) = tmp51 - tmp52; + } + } +} + +static const int twiddle_order[] = +{1, 2, 3, 4, 5}; +fftw_codelet_desc fftwi_twiddle_6_desc = +{ + "fftwi_twiddle_6", + (void (*)()) fftwi_twiddle_6, + 6, + FFTW_BACKWARD, + FFTW_TWIDDLE, + 143, + 5, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/ftwi_64.c b/src/sndobj/rfftw/ftwi_64.c new file mode 100644 index 0000000..8b49da0 --- /dev/null +++ b/src/sndobj/rfftw/ftwi_64.c @@ -0,0 +1,3146 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:45:03 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddleinv 64 */ + +/* + * This function contains 1038 FP additions, 500 FP multiplications, + * (or, 808 additions, 270 multiplications, 230 fused multiply/add), + * 162 stack variables, and 256 memory accesses + */ +static const fftw_real K098017140 = FFTW_KONST(+0.098017140329560601994195563888641845861136673); +static const fftw_real K995184726 = FFTW_KONST(+0.995184726672196886244836953109479921575474869); +static const fftw_real K773010453 = FFTW_KONST(+0.773010453362736960810906609758469800971041293); +static const fftw_real K634393284 = FFTW_KONST(+0.634393284163645498215171613225493370675687095); +static const fftw_real K195090322 = FFTW_KONST(+0.195090322016128267848284868477022240927691618); +static const fftw_real K980785280 = FFTW_KONST(+0.980785280403230449126182236134239036973933731); +static const fftw_real K471396736 = FFTW_KONST(+0.471396736825997648556387625905254377657460319); +static const fftw_real K881921264 = FFTW_KONST(+0.881921264348355029712756863660388349508442621); +static const fftw_real K956940335 = FFTW_KONST(+0.956940335732208864935797886980269969482849206); +static const fftw_real K290284677 = FFTW_KONST(+0.290284677254462367636192375817395274691476278); +static const fftw_real K831469612 = FFTW_KONST(+0.831469612302545237078788377617905756738560812); +static const fftw_real K555570233 = FFTW_KONST(+0.555570233019602224742830813948532874374937191); +static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); +static const fftw_real K382683432 = FFTW_KONST(+0.382683432365089771728459984030398866761344562); +static const fftw_real K923879532 = FFTW_KONST(+0.923879532511286756128183189396788286822416626); + +/* + * Generator Id's : + * $Id: ftwi_64.c,v 1.1.1.1 2006/05/12 15:15:00 veplaini Exp $ + * $Id: ftwi_64.c,v 1.1.1.1 2006/05/12 15:15:00 veplaini Exp $ + * $Id: ftwi_64.c,v 1.1.1.1 2006/05/12 15:15:00 veplaini Exp $ + */ + +void fftwi_twiddle_64(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_complex *inout; + inout = A; + for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 63) { + fftw_real tmp19; + fftw_real tmp791; + fftw_real tmp1109; + fftw_real tmp1139; + fftw_real tmp1047; + fftw_real tmp1077; + fftw_real tmp383; + fftw_real tmp655; + fftw_real tmp66; + fftw_real tmp800; + fftw_real tmp909; + fftw_real tmp993; + fftw_real tmp417; + fftw_real tmp608; + fftw_real tmp665; + fftw_real tmp744; + fftw_real tmp42; + fftw_real tmp1076; + fftw_real tmp794; + fftw_real tmp1042; + fftw_real tmp394; + fftw_real tmp1138; + fftw_real tmp658; + fftw_real tmp1106; + fftw_real tmp329; + fftw_real tmp1007; + fftw_real tmp863; + fftw_real tmp923; + fftw_real tmp976; + fftw_real tmp1004; + fftw_real tmp880; + fftw_real tmp920; + fftw_real tmp535; + fftw_real tmp703; + fftw_real tmp576; + fftw_real tmp714; + fftw_real tmp579; + fftw_real tmp704; + fftw_real tmp546; + fftw_real tmp715; + fftw_real tmp376; + fftw_real tmp1005; + fftw_real tmp868; + fftw_real tmp881; + fftw_real tmp979; + fftw_real tmp1008; + fftw_real tmp873; + fftw_real tmp882; + fftw_real tmp558; + fftw_real tmp582; + fftw_real tmp708; + fftw_real tmp718; + fftw_real tmp569; + fftw_real tmp581; + fftw_real tmp711; + fftw_real tmp717; + fftw_real tmp89; + fftw_real tmp805; + fftw_real tmp908; + fftw_real tmp992; + fftw_real tmp406; + fftw_real tmp609; + fftw_real tmp662; + fftw_real tmp745; + fftw_real tmp161; + fftw_real tmp184; + fftw_real tmp997; + fftw_real tmp812; + fftw_real tmp912; + fftw_real tmp956; + fftw_real tmp957; + fftw_real tmp996; + fftw_real tmp817; + fftw_real tmp913; + fftw_real tmp424; + fftw_real tmp668; + fftw_real tmp441; + fftw_real tmp671; + fftw_real tmp444; + fftw_real tmp669; + fftw_real tmp435; + fftw_real tmp672; + fftw_real tmp114; + fftw_real tmp137; + fftw_real tmp999; + fftw_real tmp823; + fftw_real tmp915; + fftw_real tmp959; + fftw_real tmp960; + fftw_real tmp1000; + fftw_real tmp828; + fftw_real tmp916; + fftw_real tmp451; + fftw_real tmp678; + fftw_real tmp468; + fftw_real tmp675; + fftw_real tmp471; + fftw_real tmp679; + fftw_real tmp462; + fftw_real tmp676; + fftw_real tmp234; + fftw_real tmp1014; + fftw_real tmp836; + fftw_real tmp930; + fftw_real tmp967; + fftw_real tmp1011; + fftw_real tmp853; + fftw_real tmp927; + fftw_real tmp480; + fftw_real tmp684; + fftw_real tmp521; + fftw_real tmp695; + fftw_real tmp524; + fftw_real tmp685; + fftw_real tmp491; + fftw_real tmp696; + fftw_real tmp281; + fftw_real tmp1012; + fftw_real tmp841; + fftw_real tmp854; + fftw_real tmp970; + fftw_real tmp1015; + fftw_real tmp846; + fftw_real tmp855; + fftw_real tmp503; + fftw_real tmp527; + fftw_real tmp689; + fftw_real tmp699; + fftw_real tmp514; + fftw_real tmp526; + fftw_real tmp692; + fftw_real tmp698; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp1045; + fftw_real tmp6; + fftw_real tmp1044; + fftw_real tmp12; + fftw_real tmp380; + fftw_real tmp17; + fftw_real tmp381; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(inout[0]); + tmp1045 = c_im(inout[0]); + { + fftw_real tmp3; + fftw_real tmp5; + fftw_real tmp2; + fftw_real tmp4; + ASSERT_ALIGNED_DOUBLE; + tmp3 = c_re(inout[32 * iostride]); + tmp5 = c_im(inout[32 * iostride]); + tmp2 = c_re(W[31]); + tmp4 = c_im(W[31]); + tmp6 = (tmp2 * tmp3) + (tmp4 * tmp5); + tmp1044 = (tmp2 * tmp5) - (tmp4 * tmp3); + } + { + fftw_real tmp9; + fftw_real tmp11; + fftw_real tmp8; + fftw_real tmp10; + ASSERT_ALIGNED_DOUBLE; + tmp9 = c_re(inout[16 * iostride]); + tmp11 = c_im(inout[16 * iostride]); + tmp8 = c_re(W[15]); + tmp10 = c_im(W[15]); + tmp12 = (tmp8 * tmp9) + (tmp10 * tmp11); + tmp380 = (tmp8 * tmp11) - (tmp10 * tmp9); + } + { + fftw_real tmp14; + fftw_real tmp16; + fftw_real tmp13; + fftw_real tmp15; + ASSERT_ALIGNED_DOUBLE; + tmp14 = c_re(inout[48 * iostride]); + tmp16 = c_im(inout[48 * iostride]); + tmp13 = c_re(W[47]); + tmp15 = c_im(W[47]); + tmp17 = (tmp13 * tmp14) + (tmp15 * tmp16); + tmp381 = (tmp13 * tmp16) - (tmp15 * tmp14); + } + { + fftw_real tmp7; + fftw_real tmp18; + fftw_real tmp1107; + fftw_real tmp1108; + ASSERT_ALIGNED_DOUBLE; + tmp7 = tmp1 + tmp6; + tmp18 = tmp12 + tmp17; + tmp19 = tmp7 + tmp18; + tmp791 = tmp7 - tmp18; + tmp1107 = tmp12 - tmp17; + tmp1108 = tmp1045 - tmp1044; + tmp1109 = tmp1107 + tmp1108; + tmp1139 = tmp1108 - tmp1107; + } + { + fftw_real tmp1043; + fftw_real tmp1046; + fftw_real tmp379; + fftw_real tmp382; + ASSERT_ALIGNED_DOUBLE; + tmp1043 = tmp380 + tmp381; + tmp1046 = tmp1044 + tmp1045; + tmp1047 = tmp1043 + tmp1046; + tmp1077 = tmp1046 - tmp1043; + tmp379 = tmp1 - tmp6; + tmp382 = tmp380 - tmp381; + tmp383 = tmp379 - tmp382; + tmp655 = tmp379 + tmp382; + } + } + { + fftw_real tmp54; + fftw_real tmp412; + fftw_real tmp409; + fftw_real tmp797; + fftw_real tmp65; + fftw_real tmp410; + fftw_real tmp415; + fftw_real tmp798; + fftw_real tmp796; + fftw_real tmp799; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp48; + fftw_real tmp407; + fftw_real tmp53; + fftw_real tmp408; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp45; + fftw_real tmp47; + fftw_real tmp44; + fftw_real tmp46; + ASSERT_ALIGNED_DOUBLE; + tmp45 = c_re(inout[4 * iostride]); + tmp47 = c_im(inout[4 * iostride]); + tmp44 = c_re(W[3]); + tmp46 = c_im(W[3]); + tmp48 = (tmp44 * tmp45) + (tmp46 * tmp47); + tmp407 = (tmp44 * tmp47) - (tmp46 * tmp45); + } + { + fftw_real tmp50; + fftw_real tmp52; + fftw_real tmp49; + fftw_real tmp51; + ASSERT_ALIGNED_DOUBLE; + tmp50 = c_re(inout[36 * iostride]); + tmp52 = c_im(inout[36 * iostride]); + tmp49 = c_re(W[35]); + tmp51 = c_im(W[35]); + tmp53 = (tmp49 * tmp50) + (tmp51 * tmp52); + tmp408 = (tmp49 * tmp52) - (tmp51 * tmp50); + } + tmp54 = tmp48 + tmp53; + tmp412 = tmp48 - tmp53; + tmp409 = tmp407 - tmp408; + tmp797 = tmp407 + tmp408; + } + { + fftw_real tmp59; + fftw_real tmp413; + fftw_real tmp64; + fftw_real tmp414; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp56; + fftw_real tmp58; + fftw_real tmp55; + fftw_real tmp57; + ASSERT_ALIGNED_DOUBLE; + tmp56 = c_re(inout[20 * iostride]); + tmp58 = c_im(inout[20 * iostride]); + tmp55 = c_re(W[19]); + tmp57 = c_im(W[19]); + tmp59 = (tmp55 * tmp56) + (tmp57 * tmp58); + tmp413 = (tmp55 * tmp58) - (tmp57 * tmp56); + } + { + fftw_real tmp61; + fftw_real tmp63; + fftw_real tmp60; + fftw_real tmp62; + ASSERT_ALIGNED_DOUBLE; + tmp61 = c_re(inout[52 * iostride]); + tmp63 = c_im(inout[52 * iostride]); + tmp60 = c_re(W[51]); + tmp62 = c_im(W[51]); + tmp64 = (tmp60 * tmp61) + (tmp62 * tmp63); + tmp414 = (tmp60 * tmp63) - (tmp62 * tmp61); + } + tmp65 = tmp59 + tmp64; + tmp410 = tmp59 - tmp64; + tmp415 = tmp413 - tmp414; + tmp798 = tmp413 + tmp414; + } + tmp66 = tmp54 + tmp65; + tmp796 = tmp54 - tmp65; + tmp799 = tmp797 - tmp798; + tmp800 = tmp796 - tmp799; + tmp909 = tmp796 + tmp799; + tmp993 = tmp797 + tmp798; + { + fftw_real tmp411; + fftw_real tmp416; + fftw_real tmp663; + fftw_real tmp664; + ASSERT_ALIGNED_DOUBLE; + tmp411 = tmp409 + tmp410; + tmp416 = tmp412 - tmp415; + tmp417 = (K923879532 * tmp411) + (K382683432 * tmp416); + tmp608 = (K923879532 * tmp416) - (K382683432 * tmp411); + tmp663 = tmp409 - tmp410; + tmp664 = tmp412 + tmp415; + tmp665 = (K382683432 * tmp663) + (K923879532 * tmp664); + tmp744 = (K382683432 * tmp664) - (K923879532 * tmp663); + } + } + { + fftw_real tmp24; + fftw_real tmp385; + fftw_real tmp29; + fftw_real tmp386; + fftw_real tmp384; + fftw_real tmp387; + fftw_real tmp35; + fftw_real tmp390; + fftw_real tmp40; + fftw_real tmp391; + fftw_real tmp389; + fftw_real tmp392; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp21; + fftw_real tmp23; + fftw_real tmp20; + fftw_real tmp22; + ASSERT_ALIGNED_DOUBLE; + tmp21 = c_re(inout[8 * iostride]); + tmp23 = c_im(inout[8 * iostride]); + tmp20 = c_re(W[7]); + tmp22 = c_im(W[7]); + tmp24 = (tmp20 * tmp21) + (tmp22 * tmp23); + tmp385 = (tmp20 * tmp23) - (tmp22 * tmp21); + } + { + fftw_real tmp26; + fftw_real tmp28; + fftw_real tmp25; + fftw_real tmp27; + ASSERT_ALIGNED_DOUBLE; + tmp26 = c_re(inout[40 * iostride]); + tmp28 = c_im(inout[40 * iostride]); + tmp25 = c_re(W[39]); + tmp27 = c_im(W[39]); + tmp29 = (tmp25 * tmp26) + (tmp27 * tmp28); + tmp386 = (tmp25 * tmp28) - (tmp27 * tmp26); + } + tmp384 = tmp24 - tmp29; + tmp387 = tmp385 - tmp386; + { + fftw_real tmp32; + fftw_real tmp34; + fftw_real tmp31; + fftw_real tmp33; + ASSERT_ALIGNED_DOUBLE; + tmp32 = c_re(inout[56 * iostride]); + tmp34 = c_im(inout[56 * iostride]); + tmp31 = c_re(W[55]); + tmp33 = c_im(W[55]); + tmp35 = (tmp31 * tmp32) + (tmp33 * tmp34); + tmp390 = (tmp31 * tmp34) - (tmp33 * tmp32); + } + { + fftw_real tmp37; + fftw_real tmp39; + fftw_real tmp36; + fftw_real tmp38; + ASSERT_ALIGNED_DOUBLE; + tmp37 = c_re(inout[24 * iostride]); + tmp39 = c_im(inout[24 * iostride]); + tmp36 = c_re(W[23]); + tmp38 = c_im(W[23]); + tmp40 = (tmp36 * tmp37) + (tmp38 * tmp39); + tmp391 = (tmp36 * tmp39) - (tmp38 * tmp37); + } + tmp389 = tmp35 - tmp40; + tmp392 = tmp390 - tmp391; + { + fftw_real tmp30; + fftw_real tmp41; + fftw_real tmp792; + fftw_real tmp793; + ASSERT_ALIGNED_DOUBLE; + tmp30 = tmp24 + tmp29; + tmp41 = tmp35 + tmp40; + tmp42 = tmp30 + tmp41; + tmp1076 = tmp30 - tmp41; + tmp792 = tmp390 + tmp391; + tmp793 = tmp385 + tmp386; + tmp794 = tmp792 - tmp793; + tmp1042 = tmp793 + tmp792; + } + { + fftw_real tmp388; + fftw_real tmp393; + fftw_real tmp656; + fftw_real tmp657; + ASSERT_ALIGNED_DOUBLE; + tmp388 = tmp384 - tmp387; + tmp393 = tmp389 + tmp392; + tmp394 = K707106781 * (tmp388 + tmp393); + tmp1138 = K707106781 * (tmp388 - tmp393); + tmp656 = tmp392 - tmp389; + tmp657 = tmp384 + tmp387; + tmp658 = K707106781 * (tmp656 - tmp657); + tmp1106 = K707106781 * (tmp657 + tmp656); + } + } + { + fftw_real tmp287; + fftw_real tmp572; + fftw_real tmp292; + fftw_real tmp573; + fftw_real tmp293; + fftw_real tmp876; + fftw_real tmp327; + fftw_real tmp541; + fftw_real tmp544; + fftw_real tmp860; + fftw_real tmp298; + fftw_real tmp532; + fftw_real tmp303; + fftw_real tmp533; + fftw_real tmp304; + fftw_real tmp877; + fftw_real tmp316; + fftw_real tmp536; + fftw_real tmp539; + fftw_real tmp861; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp284; + fftw_real tmp286; + fftw_real tmp283; + fftw_real tmp285; + ASSERT_ALIGNED_DOUBLE; + tmp284 = c_re(inout[63 * iostride]); + tmp286 = c_im(inout[63 * iostride]); + tmp283 = c_re(W[62]); + tmp285 = c_im(W[62]); + tmp287 = (tmp283 * tmp284) + (tmp285 * tmp286); + tmp572 = (tmp283 * tmp286) - (tmp285 * tmp284); + } + { + fftw_real tmp289; + fftw_real tmp291; + fftw_real tmp288; + fftw_real tmp290; + ASSERT_ALIGNED_DOUBLE; + tmp289 = c_re(inout[31 * iostride]); + tmp291 = c_im(inout[31 * iostride]); + tmp288 = c_re(W[30]); + tmp290 = c_im(W[30]); + tmp292 = (tmp288 * tmp289) + (tmp290 * tmp291); + tmp573 = (tmp288 * tmp291) - (tmp290 * tmp289); + } + tmp293 = tmp287 + tmp292; + tmp876 = tmp572 + tmp573; + { + fftw_real tmp321; + fftw_real tmp542; + fftw_real tmp326; + fftw_real tmp543; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp318; + fftw_real tmp320; + fftw_real tmp317; + fftw_real tmp319; + ASSERT_ALIGNED_DOUBLE; + tmp318 = c_re(inout[55 * iostride]); + tmp320 = c_im(inout[55 * iostride]); + tmp317 = c_re(W[54]); + tmp319 = c_im(W[54]); + tmp321 = (tmp317 * tmp318) + (tmp319 * tmp320); + tmp542 = (tmp317 * tmp320) - (tmp319 * tmp318); + } + { + fftw_real tmp323; + fftw_real tmp325; + fftw_real tmp322; + fftw_real tmp324; + ASSERT_ALIGNED_DOUBLE; + tmp323 = c_re(inout[23 * iostride]); + tmp325 = c_im(inout[23 * iostride]); + tmp322 = c_re(W[22]); + tmp324 = c_im(W[22]); + tmp326 = (tmp322 * tmp323) + (tmp324 * tmp325); + tmp543 = (tmp322 * tmp325) - (tmp324 * tmp323); + } + tmp327 = tmp321 + tmp326; + tmp541 = tmp321 - tmp326; + tmp544 = tmp542 - tmp543; + tmp860 = tmp542 + tmp543; + } + { + fftw_real tmp295; + fftw_real tmp297; + fftw_real tmp294; + fftw_real tmp296; + ASSERT_ALIGNED_DOUBLE; + tmp295 = c_re(inout[15 * iostride]); + tmp297 = c_im(inout[15 * iostride]); + tmp294 = c_re(W[14]); + tmp296 = c_im(W[14]); + tmp298 = (tmp294 * tmp295) + (tmp296 * tmp297); + tmp532 = (tmp294 * tmp297) - (tmp296 * tmp295); + } + { + fftw_real tmp300; + fftw_real tmp302; + fftw_real tmp299; + fftw_real tmp301; + ASSERT_ALIGNED_DOUBLE; + tmp300 = c_re(inout[47 * iostride]); + tmp302 = c_im(inout[47 * iostride]); + tmp299 = c_re(W[46]); + tmp301 = c_im(W[46]); + tmp303 = (tmp299 * tmp300) + (tmp301 * tmp302); + tmp533 = (tmp299 * tmp302) - (tmp301 * tmp300); + } + tmp304 = tmp298 + tmp303; + tmp877 = tmp532 + tmp533; + { + fftw_real tmp310; + fftw_real tmp537; + fftw_real tmp315; + fftw_real tmp538; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp307; + fftw_real tmp309; + fftw_real tmp306; + fftw_real tmp308; + ASSERT_ALIGNED_DOUBLE; + tmp307 = c_re(inout[7 * iostride]); + tmp309 = c_im(inout[7 * iostride]); + tmp306 = c_re(W[6]); + tmp308 = c_im(W[6]); + tmp310 = (tmp306 * tmp307) + (tmp308 * tmp309); + tmp537 = (tmp306 * tmp309) - (tmp308 * tmp307); + } + { + fftw_real tmp312; + fftw_real tmp314; + fftw_real tmp311; + fftw_real tmp313; + ASSERT_ALIGNED_DOUBLE; + tmp312 = c_re(inout[39 * iostride]); + tmp314 = c_im(inout[39 * iostride]); + tmp311 = c_re(W[38]); + tmp313 = c_im(W[38]); + tmp315 = (tmp311 * tmp312) + (tmp313 * tmp314); + tmp538 = (tmp311 * tmp314) - (tmp313 * tmp312); + } + tmp316 = tmp310 + tmp315; + tmp536 = tmp310 - tmp315; + tmp539 = tmp537 - tmp538; + tmp861 = tmp537 + tmp538; + } + { + fftw_real tmp305; + fftw_real tmp328; + fftw_real tmp859; + fftw_real tmp862; + ASSERT_ALIGNED_DOUBLE; + tmp305 = tmp293 + tmp304; + tmp328 = tmp316 + tmp327; + tmp329 = tmp305 + tmp328; + tmp1007 = tmp305 - tmp328; + tmp859 = tmp293 - tmp304; + tmp862 = tmp860 - tmp861; + tmp863 = tmp859 + tmp862; + tmp923 = tmp859 - tmp862; + } + { + fftw_real tmp974; + fftw_real tmp975; + fftw_real tmp878; + fftw_real tmp879; + ASSERT_ALIGNED_DOUBLE; + tmp974 = tmp876 + tmp877; + tmp975 = tmp861 + tmp860; + tmp976 = tmp974 + tmp975; + tmp1004 = tmp974 - tmp975; + tmp878 = tmp876 - tmp877; + tmp879 = tmp316 - tmp327; + tmp880 = tmp878 + tmp879; + tmp920 = tmp878 - tmp879; + } + { + fftw_real tmp531; + fftw_real tmp534; + fftw_real tmp574; + fftw_real tmp575; + ASSERT_ALIGNED_DOUBLE; + tmp531 = tmp287 - tmp292; + tmp534 = tmp532 - tmp533; + tmp535 = tmp531 - tmp534; + tmp703 = tmp531 + tmp534; + tmp574 = tmp572 - tmp573; + tmp575 = tmp298 - tmp303; + tmp576 = tmp574 + tmp575; + tmp714 = tmp574 - tmp575; + } + { + fftw_real tmp577; + fftw_real tmp578; + fftw_real tmp540; + fftw_real tmp545; + ASSERT_ALIGNED_DOUBLE; + tmp577 = tmp536 + tmp539; + tmp578 = tmp544 - tmp541; + tmp579 = K707106781 * (tmp577 + tmp578); + tmp704 = K707106781 * (tmp578 - tmp577); + tmp540 = tmp536 - tmp539; + tmp545 = tmp541 + tmp544; + tmp546 = K707106781 * (tmp540 + tmp545); + tmp715 = K707106781 * (tmp540 - tmp545); + } + } + { + fftw_real tmp340; + fftw_real tmp564; + fftw_real tmp561; + fftw_real tmp865; + fftw_real tmp374; + fftw_real tmp551; + fftw_real tmp556; + fftw_real tmp871; + fftw_real tmp351; + fftw_real tmp562; + fftw_real tmp567; + fftw_real tmp866; + fftw_real tmp363; + fftw_real tmp553; + fftw_real tmp550; + fftw_real tmp870; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp334; + fftw_real tmp559; + fftw_real tmp339; + fftw_real tmp560; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp331; + fftw_real tmp333; + fftw_real tmp330; + fftw_real tmp332; + ASSERT_ALIGNED_DOUBLE; + tmp331 = c_re(inout[3 * iostride]); + tmp333 = c_im(inout[3 * iostride]); + tmp330 = c_re(W[2]); + tmp332 = c_im(W[2]); + tmp334 = (tmp330 * tmp331) + (tmp332 * tmp333); + tmp559 = (tmp330 * tmp333) - (tmp332 * tmp331); + } + { + fftw_real tmp336; + fftw_real tmp338; + fftw_real tmp335; + fftw_real tmp337; + ASSERT_ALIGNED_DOUBLE; + tmp336 = c_re(inout[35 * iostride]); + tmp338 = c_im(inout[35 * iostride]); + tmp335 = c_re(W[34]); + tmp337 = c_im(W[34]); + tmp339 = (tmp335 * tmp336) + (tmp337 * tmp338); + tmp560 = (tmp335 * tmp338) - (tmp337 * tmp336); + } + tmp340 = tmp334 + tmp339; + tmp564 = tmp334 - tmp339; + tmp561 = tmp559 - tmp560; + tmp865 = tmp559 + tmp560; + } + { + fftw_real tmp368; + fftw_real tmp554; + fftw_real tmp373; + fftw_real tmp555; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp365; + fftw_real tmp367; + fftw_real tmp364; + fftw_real tmp366; + ASSERT_ALIGNED_DOUBLE; + tmp365 = c_re(inout[11 * iostride]); + tmp367 = c_im(inout[11 * iostride]); + tmp364 = c_re(W[10]); + tmp366 = c_im(W[10]); + tmp368 = (tmp364 * tmp365) + (tmp366 * tmp367); + tmp554 = (tmp364 * tmp367) - (tmp366 * tmp365); + } + { + fftw_real tmp370; + fftw_real tmp372; + fftw_real tmp369; + fftw_real tmp371; + ASSERT_ALIGNED_DOUBLE; + tmp370 = c_re(inout[43 * iostride]); + tmp372 = c_im(inout[43 * iostride]); + tmp369 = c_re(W[42]); + tmp371 = c_im(W[42]); + tmp373 = (tmp369 * tmp370) + (tmp371 * tmp372); + tmp555 = (tmp369 * tmp372) - (tmp371 * tmp370); + } + tmp374 = tmp368 + tmp373; + tmp551 = tmp368 - tmp373; + tmp556 = tmp554 - tmp555; + tmp871 = tmp554 + tmp555; + } + { + fftw_real tmp345; + fftw_real tmp565; + fftw_real tmp350; + fftw_real tmp566; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp342; + fftw_real tmp344; + fftw_real tmp341; + fftw_real tmp343; + ASSERT_ALIGNED_DOUBLE; + tmp342 = c_re(inout[19 * iostride]); + tmp344 = c_im(inout[19 * iostride]); + tmp341 = c_re(W[18]); + tmp343 = c_im(W[18]); + tmp345 = (tmp341 * tmp342) + (tmp343 * tmp344); + tmp565 = (tmp341 * tmp344) - (tmp343 * tmp342); + } + { + fftw_real tmp347; + fftw_real tmp349; + fftw_real tmp346; + fftw_real tmp348; + ASSERT_ALIGNED_DOUBLE; + tmp347 = c_re(inout[51 * iostride]); + tmp349 = c_im(inout[51 * iostride]); + tmp346 = c_re(W[50]); + tmp348 = c_im(W[50]); + tmp350 = (tmp346 * tmp347) + (tmp348 * tmp349); + tmp566 = (tmp346 * tmp349) - (tmp348 * tmp347); + } + tmp351 = tmp345 + tmp350; + tmp562 = tmp345 - tmp350; + tmp567 = tmp565 - tmp566; + tmp866 = tmp565 + tmp566; + } + { + fftw_real tmp357; + fftw_real tmp548; + fftw_real tmp362; + fftw_real tmp549; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp354; + fftw_real tmp356; + fftw_real tmp353; + fftw_real tmp355; + ASSERT_ALIGNED_DOUBLE; + tmp354 = c_re(inout[59 * iostride]); + tmp356 = c_im(inout[59 * iostride]); + tmp353 = c_re(W[58]); + tmp355 = c_im(W[58]); + tmp357 = (tmp353 * tmp354) + (tmp355 * tmp356); + tmp548 = (tmp353 * tmp356) - (tmp355 * tmp354); + } + { + fftw_real tmp359; + fftw_real tmp361; + fftw_real tmp358; + fftw_real tmp360; + ASSERT_ALIGNED_DOUBLE; + tmp359 = c_re(inout[27 * iostride]); + tmp361 = c_im(inout[27 * iostride]); + tmp358 = c_re(W[26]); + tmp360 = c_im(W[26]); + tmp362 = (tmp358 * tmp359) + (tmp360 * tmp361); + tmp549 = (tmp358 * tmp361) - (tmp360 * tmp359); + } + tmp363 = tmp357 + tmp362; + tmp553 = tmp357 - tmp362; + tmp550 = tmp548 - tmp549; + tmp870 = tmp548 + tmp549; + } + { + fftw_real tmp352; + fftw_real tmp375; + fftw_real tmp864; + fftw_real tmp867; + ASSERT_ALIGNED_DOUBLE; + tmp352 = tmp340 + tmp351; + tmp375 = tmp363 + tmp374; + tmp376 = tmp352 + tmp375; + tmp1005 = tmp352 - tmp375; + tmp864 = tmp340 - tmp351; + tmp867 = tmp865 - tmp866; + tmp868 = tmp864 - tmp867; + tmp881 = tmp864 + tmp867; + } + { + fftw_real tmp977; + fftw_real tmp978; + fftw_real tmp869; + fftw_real tmp872; + ASSERT_ALIGNED_DOUBLE; + tmp977 = tmp865 + tmp866; + tmp978 = tmp870 + tmp871; + tmp979 = tmp977 + tmp978; + tmp1008 = tmp978 - tmp977; + tmp869 = tmp363 - tmp374; + tmp872 = tmp870 - tmp871; + tmp873 = tmp869 + tmp872; + tmp882 = tmp872 - tmp869; + } + { + fftw_real tmp552; + fftw_real tmp557; + fftw_real tmp706; + fftw_real tmp707; + ASSERT_ALIGNED_DOUBLE; + tmp552 = tmp550 + tmp551; + tmp557 = tmp553 - tmp556; + tmp558 = (K923879532 * tmp552) - (K382683432 * tmp557); + tmp582 = (K382683432 * tmp552) + (K923879532 * tmp557); + tmp706 = tmp550 - tmp551; + tmp707 = tmp553 + tmp556; + tmp708 = (K382683432 * tmp706) - (K923879532 * tmp707); + tmp718 = (K923879532 * tmp706) + (K382683432 * tmp707); + } + { + fftw_real tmp563; + fftw_real tmp568; + fftw_real tmp709; + fftw_real tmp710; + ASSERT_ALIGNED_DOUBLE; + tmp563 = tmp561 + tmp562; + tmp568 = tmp564 - tmp567; + tmp569 = (K923879532 * tmp563) + (K382683432 * tmp568); + tmp581 = (K923879532 * tmp568) - (K382683432 * tmp563); + tmp709 = tmp561 - tmp562; + tmp710 = tmp564 + tmp567; + tmp711 = (K382683432 * tmp709) + (K923879532 * tmp710); + tmp717 = (K382683432 * tmp710) - (K923879532 * tmp709); + } + } + { + fftw_real tmp77; + fftw_real tmp401; + fftw_real tmp398; + fftw_real tmp802; + fftw_real tmp88; + fftw_real tmp399; + fftw_real tmp404; + fftw_real tmp803; + fftw_real tmp801; + fftw_real tmp804; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp71; + fftw_real tmp396; + fftw_real tmp76; + fftw_real tmp397; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp68; + fftw_real tmp70; + fftw_real tmp67; + fftw_real tmp69; + ASSERT_ALIGNED_DOUBLE; + tmp68 = c_re(inout[60 * iostride]); + tmp70 = c_im(inout[60 * iostride]); + tmp67 = c_re(W[59]); + tmp69 = c_im(W[59]); + tmp71 = (tmp67 * tmp68) + (tmp69 * tmp70); + tmp396 = (tmp67 * tmp70) - (tmp69 * tmp68); + } + { + fftw_real tmp73; + fftw_real tmp75; + fftw_real tmp72; + fftw_real tmp74; + ASSERT_ALIGNED_DOUBLE; + tmp73 = c_re(inout[28 * iostride]); + tmp75 = c_im(inout[28 * iostride]); + tmp72 = c_re(W[27]); + tmp74 = c_im(W[27]); + tmp76 = (tmp72 * tmp73) + (tmp74 * tmp75); + tmp397 = (tmp72 * tmp75) - (tmp74 * tmp73); + } + tmp77 = tmp71 + tmp76; + tmp401 = tmp71 - tmp76; + tmp398 = tmp396 - tmp397; + tmp802 = tmp396 + tmp397; + } + { + fftw_real tmp82; + fftw_real tmp402; + fftw_real tmp87; + fftw_real tmp403; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp79; + fftw_real tmp81; + fftw_real tmp78; + fftw_real tmp80; + ASSERT_ALIGNED_DOUBLE; + tmp79 = c_re(inout[12 * iostride]); + tmp81 = c_im(inout[12 * iostride]); + tmp78 = c_re(W[11]); + tmp80 = c_im(W[11]); + tmp82 = (tmp78 * tmp79) + (tmp80 * tmp81); + tmp402 = (tmp78 * tmp81) - (tmp80 * tmp79); + } + { + fftw_real tmp84; + fftw_real tmp86; + fftw_real tmp83; + fftw_real tmp85; + ASSERT_ALIGNED_DOUBLE; + tmp84 = c_re(inout[44 * iostride]); + tmp86 = c_im(inout[44 * iostride]); + tmp83 = c_re(W[43]); + tmp85 = c_im(W[43]); + tmp87 = (tmp83 * tmp84) + (tmp85 * tmp86); + tmp403 = (tmp83 * tmp86) - (tmp85 * tmp84); + } + tmp88 = tmp82 + tmp87; + tmp399 = tmp82 - tmp87; + tmp404 = tmp402 - tmp403; + tmp803 = tmp402 + tmp403; + } + tmp89 = tmp77 + tmp88; + tmp801 = tmp77 - tmp88; + tmp804 = tmp802 - tmp803; + tmp805 = tmp801 + tmp804; + tmp908 = tmp804 - tmp801; + tmp992 = tmp802 + tmp803; + { + fftw_real tmp400; + fftw_real tmp405; + fftw_real tmp660; + fftw_real tmp661; + ASSERT_ALIGNED_DOUBLE; + tmp400 = tmp398 + tmp399; + tmp405 = tmp401 - tmp404; + tmp406 = (K923879532 * tmp400) - (K382683432 * tmp405); + tmp609 = (K382683432 * tmp400) + (K923879532 * tmp405); + tmp660 = tmp398 - tmp399; + tmp661 = tmp401 + tmp404; + tmp662 = (K382683432 * tmp660) - (K923879532 * tmp661); + tmp745 = (K923879532 * tmp660) + (K382683432 * tmp661); + } + } + { + fftw_real tmp143; + fftw_real tmp420; + fftw_real tmp148; + fftw_real tmp421; + fftw_real tmp149; + fftw_real tmp808; + fftw_real tmp183; + fftw_real tmp433; + fftw_real tmp432; + fftw_real tmp814; + fftw_real tmp154; + fftw_real tmp438; + fftw_real tmp159; + fftw_real tmp439; + fftw_real tmp160; + fftw_real tmp809; + fftw_real tmp172; + fftw_real tmp425; + fftw_real tmp428; + fftw_real tmp815; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp140; + fftw_real tmp142; + fftw_real tmp139; + fftw_real tmp141; + ASSERT_ALIGNED_DOUBLE; + tmp140 = c_re(inout[62 * iostride]); + tmp142 = c_im(inout[62 * iostride]); + tmp139 = c_re(W[61]); + tmp141 = c_im(W[61]); + tmp143 = (tmp139 * tmp140) + (tmp141 * tmp142); + tmp420 = (tmp139 * tmp142) - (tmp141 * tmp140); + } + { + fftw_real tmp145; + fftw_real tmp147; + fftw_real tmp144; + fftw_real tmp146; + ASSERT_ALIGNED_DOUBLE; + tmp145 = c_re(inout[30 * iostride]); + tmp147 = c_im(inout[30 * iostride]); + tmp144 = c_re(W[29]); + tmp146 = c_im(W[29]); + tmp148 = (tmp144 * tmp145) + (tmp146 * tmp147); + tmp421 = (tmp144 * tmp147) - (tmp146 * tmp145); + } + tmp149 = tmp143 + tmp148; + tmp808 = tmp420 + tmp421; + { + fftw_real tmp177; + fftw_real tmp430; + fftw_real tmp182; + fftw_real tmp431; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp174; + fftw_real tmp176; + fftw_real tmp173; + fftw_real tmp175; + ASSERT_ALIGNED_DOUBLE; + tmp174 = c_re(inout[54 * iostride]); + tmp176 = c_im(inout[54 * iostride]); + tmp173 = c_re(W[53]); + tmp175 = c_im(W[53]); + tmp177 = (tmp173 * tmp174) + (tmp175 * tmp176); + tmp430 = (tmp173 * tmp176) - (tmp175 * tmp174); + } + { + fftw_real tmp179; + fftw_real tmp181; + fftw_real tmp178; + fftw_real tmp180; + ASSERT_ALIGNED_DOUBLE; + tmp179 = c_re(inout[22 * iostride]); + tmp181 = c_im(inout[22 * iostride]); + tmp178 = c_re(W[21]); + tmp180 = c_im(W[21]); + tmp182 = (tmp178 * tmp179) + (tmp180 * tmp181); + tmp431 = (tmp178 * tmp181) - (tmp180 * tmp179); + } + tmp183 = tmp177 + tmp182; + tmp433 = tmp177 - tmp182; + tmp432 = tmp430 - tmp431; + tmp814 = tmp430 + tmp431; + } + { + fftw_real tmp151; + fftw_real tmp153; + fftw_real tmp150; + fftw_real tmp152; + ASSERT_ALIGNED_DOUBLE; + tmp151 = c_re(inout[14 * iostride]); + tmp153 = c_im(inout[14 * iostride]); + tmp150 = c_re(W[13]); + tmp152 = c_im(W[13]); + tmp154 = (tmp150 * tmp151) + (tmp152 * tmp153); + tmp438 = (tmp150 * tmp153) - (tmp152 * tmp151); + } + { + fftw_real tmp156; + fftw_real tmp158; + fftw_real tmp155; + fftw_real tmp157; + ASSERT_ALIGNED_DOUBLE; + tmp156 = c_re(inout[46 * iostride]); + tmp158 = c_im(inout[46 * iostride]); + tmp155 = c_re(W[45]); + tmp157 = c_im(W[45]); + tmp159 = (tmp155 * tmp156) + (tmp157 * tmp158); + tmp439 = (tmp155 * tmp158) - (tmp157 * tmp156); + } + tmp160 = tmp154 + tmp159; + tmp809 = tmp438 + tmp439; + { + fftw_real tmp166; + fftw_real tmp426; + fftw_real tmp171; + fftw_real tmp427; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp163; + fftw_real tmp165; + fftw_real tmp162; + fftw_real tmp164; + ASSERT_ALIGNED_DOUBLE; + tmp163 = c_re(inout[6 * iostride]); + tmp165 = c_im(inout[6 * iostride]); + tmp162 = c_re(W[5]); + tmp164 = c_im(W[5]); + tmp166 = (tmp162 * tmp163) + (tmp164 * tmp165); + tmp426 = (tmp162 * tmp165) - (tmp164 * tmp163); + } + { + fftw_real tmp168; + fftw_real tmp170; + fftw_real tmp167; + fftw_real tmp169; + ASSERT_ALIGNED_DOUBLE; + tmp168 = c_re(inout[38 * iostride]); + tmp170 = c_im(inout[38 * iostride]); + tmp167 = c_re(W[37]); + tmp169 = c_im(W[37]); + tmp171 = (tmp167 * tmp168) + (tmp169 * tmp170); + tmp427 = (tmp167 * tmp170) - (tmp169 * tmp168); + } + tmp172 = tmp166 + tmp171; + tmp425 = tmp166 - tmp171; + tmp428 = tmp426 - tmp427; + tmp815 = tmp426 + tmp427; + } + { + fftw_real tmp810; + fftw_real tmp811; + fftw_real tmp813; + fftw_real tmp816; + ASSERT_ALIGNED_DOUBLE; + tmp161 = tmp149 + tmp160; + tmp184 = tmp172 + tmp183; + tmp997 = tmp161 - tmp184; + tmp810 = tmp808 - tmp809; + tmp811 = tmp172 - tmp183; + tmp812 = tmp810 + tmp811; + tmp912 = tmp810 - tmp811; + tmp956 = tmp808 + tmp809; + tmp957 = tmp815 + tmp814; + tmp996 = tmp956 - tmp957; + tmp813 = tmp149 - tmp160; + tmp816 = tmp814 - tmp815; + tmp817 = tmp813 + tmp816; + tmp913 = tmp813 - tmp816; + } + { + fftw_real tmp422; + fftw_real tmp423; + fftw_real tmp437; + fftw_real tmp440; + ASSERT_ALIGNED_DOUBLE; + tmp422 = tmp420 - tmp421; + tmp423 = tmp154 - tmp159; + tmp424 = tmp422 + tmp423; + tmp668 = tmp422 - tmp423; + tmp437 = tmp143 - tmp148; + tmp440 = tmp438 - tmp439; + tmp441 = tmp437 - tmp440; + tmp671 = tmp437 + tmp440; + } + { + fftw_real tmp442; + fftw_real tmp443; + fftw_real tmp429; + fftw_real tmp434; + ASSERT_ALIGNED_DOUBLE; + tmp442 = tmp425 - tmp428; + tmp443 = tmp433 + tmp432; + tmp444 = K707106781 * (tmp442 + tmp443); + tmp669 = K707106781 * (tmp442 - tmp443); + tmp429 = tmp425 + tmp428; + tmp434 = tmp432 - tmp433; + tmp435 = K707106781 * (tmp429 + tmp434); + tmp672 = K707106781 * (tmp434 - tmp429); + } + } + { + fftw_real tmp96; + fftw_real tmp464; + fftw_real tmp101; + fftw_real tmp465; + fftw_real tmp102; + fftw_real tmp819; + fftw_real tmp136; + fftw_real tmp457; + fftw_real tmp460; + fftw_real tmp825; + fftw_real tmp107; + fftw_real tmp448; + fftw_real tmp112; + fftw_real tmp449; + fftw_real tmp113; + fftw_real tmp820; + fftw_real tmp125; + fftw_real tmp452; + fftw_real tmp455; + fftw_real tmp826; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp93; + fftw_real tmp95; + fftw_real tmp92; + fftw_real tmp94; + ASSERT_ALIGNED_DOUBLE; + tmp93 = c_re(inout[2 * iostride]); + tmp95 = c_im(inout[2 * iostride]); + tmp92 = c_re(W[1]); + tmp94 = c_im(W[1]); + tmp96 = (tmp92 * tmp93) + (tmp94 * tmp95); + tmp464 = (tmp92 * tmp95) - (tmp94 * tmp93); + } + { + fftw_real tmp98; + fftw_real tmp100; + fftw_real tmp97; + fftw_real tmp99; + ASSERT_ALIGNED_DOUBLE; + tmp98 = c_re(inout[34 * iostride]); + tmp100 = c_im(inout[34 * iostride]); + tmp97 = c_re(W[33]); + tmp99 = c_im(W[33]); + tmp101 = (tmp97 * tmp98) + (tmp99 * tmp100); + tmp465 = (tmp97 * tmp100) - (tmp99 * tmp98); + } + tmp102 = tmp96 + tmp101; + tmp819 = tmp464 + tmp465; + { + fftw_real tmp130; + fftw_real tmp458; + fftw_real tmp135; + fftw_real tmp459; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp127; + fftw_real tmp129; + fftw_real tmp126; + fftw_real tmp128; + ASSERT_ALIGNED_DOUBLE; + tmp127 = c_re(inout[58 * iostride]); + tmp129 = c_im(inout[58 * iostride]); + tmp126 = c_re(W[57]); + tmp128 = c_im(W[57]); + tmp130 = (tmp126 * tmp127) + (tmp128 * tmp129); + tmp458 = (tmp126 * tmp129) - (tmp128 * tmp127); + } + { + fftw_real tmp132; + fftw_real tmp134; + fftw_real tmp131; + fftw_real tmp133; + ASSERT_ALIGNED_DOUBLE; + tmp132 = c_re(inout[26 * iostride]); + tmp134 = c_im(inout[26 * iostride]); + tmp131 = c_re(W[25]); + tmp133 = c_im(W[25]); + tmp135 = (tmp131 * tmp132) + (tmp133 * tmp134); + tmp459 = (tmp131 * tmp134) - (tmp133 * tmp132); + } + tmp136 = tmp130 + tmp135; + tmp457 = tmp130 - tmp135; + tmp460 = tmp458 - tmp459; + tmp825 = tmp458 + tmp459; + } + { + fftw_real tmp104; + fftw_real tmp106; + fftw_real tmp103; + fftw_real tmp105; + ASSERT_ALIGNED_DOUBLE; + tmp104 = c_re(inout[18 * iostride]); + tmp106 = c_im(inout[18 * iostride]); + tmp103 = c_re(W[17]); + tmp105 = c_im(W[17]); + tmp107 = (tmp103 * tmp104) + (tmp105 * tmp106); + tmp448 = (tmp103 * tmp106) - (tmp105 * tmp104); + } + { + fftw_real tmp109; + fftw_real tmp111; + fftw_real tmp108; + fftw_real tmp110; + ASSERT_ALIGNED_DOUBLE; + tmp109 = c_re(inout[50 * iostride]); + tmp111 = c_im(inout[50 * iostride]); + tmp108 = c_re(W[49]); + tmp110 = c_im(W[49]); + tmp112 = (tmp108 * tmp109) + (tmp110 * tmp111); + tmp449 = (tmp108 * tmp111) - (tmp110 * tmp109); + } + tmp113 = tmp107 + tmp112; + tmp820 = tmp448 + tmp449; + { + fftw_real tmp119; + fftw_real tmp453; + fftw_real tmp124; + fftw_real tmp454; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp116; + fftw_real tmp118; + fftw_real tmp115; + fftw_real tmp117; + ASSERT_ALIGNED_DOUBLE; + tmp116 = c_re(inout[10 * iostride]); + tmp118 = c_im(inout[10 * iostride]); + tmp115 = c_re(W[9]); + tmp117 = c_im(W[9]); + tmp119 = (tmp115 * tmp116) + (tmp117 * tmp118); + tmp453 = (tmp115 * tmp118) - (tmp117 * tmp116); + } + { + fftw_real tmp121; + fftw_real tmp123; + fftw_real tmp120; + fftw_real tmp122; + ASSERT_ALIGNED_DOUBLE; + tmp121 = c_re(inout[42 * iostride]); + tmp123 = c_im(inout[42 * iostride]); + tmp120 = c_re(W[41]); + tmp122 = c_im(W[41]); + tmp124 = (tmp120 * tmp121) + (tmp122 * tmp123); + tmp454 = (tmp120 * tmp123) - (tmp122 * tmp121); + } + tmp125 = tmp119 + tmp124; + tmp452 = tmp119 - tmp124; + tmp455 = tmp453 - tmp454; + tmp826 = tmp453 + tmp454; + } + { + fftw_real tmp821; + fftw_real tmp822; + fftw_real tmp824; + fftw_real tmp827; + ASSERT_ALIGNED_DOUBLE; + tmp114 = tmp102 + tmp113; + tmp137 = tmp125 + tmp136; + tmp999 = tmp114 - tmp137; + tmp821 = tmp819 - tmp820; + tmp822 = tmp125 - tmp136; + tmp823 = tmp821 + tmp822; + tmp915 = tmp821 - tmp822; + tmp959 = tmp819 + tmp820; + tmp960 = tmp826 + tmp825; + tmp1000 = tmp959 - tmp960; + tmp824 = tmp102 - tmp113; + tmp827 = tmp825 - tmp826; + tmp828 = tmp824 + tmp827; + tmp916 = tmp824 - tmp827; + } + { + fftw_real tmp447; + fftw_real tmp450; + fftw_real tmp466; + fftw_real tmp467; + ASSERT_ALIGNED_DOUBLE; + tmp447 = tmp96 - tmp101; + tmp450 = tmp448 - tmp449; + tmp451 = tmp447 - tmp450; + tmp678 = tmp447 + tmp450; + tmp466 = tmp464 - tmp465; + tmp467 = tmp107 - tmp112; + tmp468 = tmp466 + tmp467; + tmp675 = tmp466 - tmp467; + } + { + fftw_real tmp469; + fftw_real tmp470; + fftw_real tmp456; + fftw_real tmp461; + ASSERT_ALIGNED_DOUBLE; + tmp469 = tmp452 + tmp455; + tmp470 = tmp460 - tmp457; + tmp471 = K707106781 * (tmp469 + tmp470); + tmp679 = K707106781 * (tmp470 - tmp469); + tmp456 = tmp452 - tmp455; + tmp461 = tmp457 + tmp460; + tmp462 = K707106781 * (tmp456 + tmp461); + tmp676 = K707106781 * (tmp456 - tmp461); + } + } + { + fftw_real tmp192; + fftw_real tmp517; + fftw_real tmp197; + fftw_real tmp518; + fftw_real tmp198; + fftw_real tmp849; + fftw_real tmp232; + fftw_real tmp486; + fftw_real tmp489; + fftw_real tmp833; + fftw_real tmp203; + fftw_real tmp477; + fftw_real tmp208; + fftw_real tmp478; + fftw_real tmp209; + fftw_real tmp850; + fftw_real tmp221; + fftw_real tmp481; + fftw_real tmp484; + fftw_real tmp834; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp189; + fftw_real tmp191; + fftw_real tmp188; + fftw_real tmp190; + ASSERT_ALIGNED_DOUBLE; + tmp189 = c_re(inout[iostride]); + tmp191 = c_im(inout[iostride]); + tmp188 = c_re(W[0]); + tmp190 = c_im(W[0]); + tmp192 = (tmp188 * tmp189) + (tmp190 * tmp191); + tmp517 = (tmp188 * tmp191) - (tmp190 * tmp189); + } + { + fftw_real tmp194; + fftw_real tmp196; + fftw_real tmp193; + fftw_real tmp195; + ASSERT_ALIGNED_DOUBLE; + tmp194 = c_re(inout[33 * iostride]); + tmp196 = c_im(inout[33 * iostride]); + tmp193 = c_re(W[32]); + tmp195 = c_im(W[32]); + tmp197 = (tmp193 * tmp194) + (tmp195 * tmp196); + tmp518 = (tmp193 * tmp196) - (tmp195 * tmp194); + } + tmp198 = tmp192 + tmp197; + tmp849 = tmp517 + tmp518; + { + fftw_real tmp226; + fftw_real tmp487; + fftw_real tmp231; + fftw_real tmp488; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp223; + fftw_real tmp225; + fftw_real tmp222; + fftw_real tmp224; + ASSERT_ALIGNED_DOUBLE; + tmp223 = c_re(inout[57 * iostride]); + tmp225 = c_im(inout[57 * iostride]); + tmp222 = c_re(W[56]); + tmp224 = c_im(W[56]); + tmp226 = (tmp222 * tmp223) + (tmp224 * tmp225); + tmp487 = (tmp222 * tmp225) - (tmp224 * tmp223); + } + { + fftw_real tmp228; + fftw_real tmp230; + fftw_real tmp227; + fftw_real tmp229; + ASSERT_ALIGNED_DOUBLE; + tmp228 = c_re(inout[25 * iostride]); + tmp230 = c_im(inout[25 * iostride]); + tmp227 = c_re(W[24]); + tmp229 = c_im(W[24]); + tmp231 = (tmp227 * tmp228) + (tmp229 * tmp230); + tmp488 = (tmp227 * tmp230) - (tmp229 * tmp228); + } + tmp232 = tmp226 + tmp231; + tmp486 = tmp226 - tmp231; + tmp489 = tmp487 - tmp488; + tmp833 = tmp487 + tmp488; + } + { + fftw_real tmp200; + fftw_real tmp202; + fftw_real tmp199; + fftw_real tmp201; + ASSERT_ALIGNED_DOUBLE; + tmp200 = c_re(inout[17 * iostride]); + tmp202 = c_im(inout[17 * iostride]); + tmp199 = c_re(W[16]); + tmp201 = c_im(W[16]); + tmp203 = (tmp199 * tmp200) + (tmp201 * tmp202); + tmp477 = (tmp199 * tmp202) - (tmp201 * tmp200); + } + { + fftw_real tmp205; + fftw_real tmp207; + fftw_real tmp204; + fftw_real tmp206; + ASSERT_ALIGNED_DOUBLE; + tmp205 = c_re(inout[49 * iostride]); + tmp207 = c_im(inout[49 * iostride]); + tmp204 = c_re(W[48]); + tmp206 = c_im(W[48]); + tmp208 = (tmp204 * tmp205) + (tmp206 * tmp207); + tmp478 = (tmp204 * tmp207) - (tmp206 * tmp205); + } + tmp209 = tmp203 + tmp208; + tmp850 = tmp477 + tmp478; + { + fftw_real tmp215; + fftw_real tmp482; + fftw_real tmp220; + fftw_real tmp483; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp212; + fftw_real tmp214; + fftw_real tmp211; + fftw_real tmp213; + ASSERT_ALIGNED_DOUBLE; + tmp212 = c_re(inout[9 * iostride]); + tmp214 = c_im(inout[9 * iostride]); + tmp211 = c_re(W[8]); + tmp213 = c_im(W[8]); + tmp215 = (tmp211 * tmp212) + (tmp213 * tmp214); + tmp482 = (tmp211 * tmp214) - (tmp213 * tmp212); + } + { + fftw_real tmp217; + fftw_real tmp219; + fftw_real tmp216; + fftw_real tmp218; + ASSERT_ALIGNED_DOUBLE; + tmp217 = c_re(inout[41 * iostride]); + tmp219 = c_im(inout[41 * iostride]); + tmp216 = c_re(W[40]); + tmp218 = c_im(W[40]); + tmp220 = (tmp216 * tmp217) + (tmp218 * tmp219); + tmp483 = (tmp216 * tmp219) - (tmp218 * tmp217); + } + tmp221 = tmp215 + tmp220; + tmp481 = tmp215 - tmp220; + tmp484 = tmp482 - tmp483; + tmp834 = tmp482 + tmp483; + } + { + fftw_real tmp210; + fftw_real tmp233; + fftw_real tmp832; + fftw_real tmp835; + ASSERT_ALIGNED_DOUBLE; + tmp210 = tmp198 + tmp209; + tmp233 = tmp221 + tmp232; + tmp234 = tmp210 + tmp233; + tmp1014 = tmp210 - tmp233; + tmp832 = tmp198 - tmp209; + tmp835 = tmp833 - tmp834; + tmp836 = tmp832 + tmp835; + tmp930 = tmp832 - tmp835; + } + { + fftw_real tmp965; + fftw_real tmp966; + fftw_real tmp851; + fftw_real tmp852; + ASSERT_ALIGNED_DOUBLE; + tmp965 = tmp849 + tmp850; + tmp966 = tmp834 + tmp833; + tmp967 = tmp965 + tmp966; + tmp1011 = tmp965 - tmp966; + tmp851 = tmp849 - tmp850; + tmp852 = tmp221 - tmp232; + tmp853 = tmp851 + tmp852; + tmp927 = tmp851 - tmp852; + } + { + fftw_real tmp476; + fftw_real tmp479; + fftw_real tmp519; + fftw_real tmp520; + ASSERT_ALIGNED_DOUBLE; + tmp476 = tmp192 - tmp197; + tmp479 = tmp477 - tmp478; + tmp480 = tmp476 - tmp479; + tmp684 = tmp476 + tmp479; + tmp519 = tmp517 - tmp518; + tmp520 = tmp203 - tmp208; + tmp521 = tmp519 + tmp520; + tmp695 = tmp519 - tmp520; + } + { + fftw_real tmp522; + fftw_real tmp523; + fftw_real tmp485; + fftw_real tmp490; + ASSERT_ALIGNED_DOUBLE; + tmp522 = tmp481 + tmp484; + tmp523 = tmp489 - tmp486; + tmp524 = K707106781 * (tmp522 + tmp523); + tmp685 = K707106781 * (tmp523 - tmp522); + tmp485 = tmp481 - tmp484; + tmp490 = tmp486 + tmp489; + tmp491 = K707106781 * (tmp485 + tmp490); + tmp696 = K707106781 * (tmp485 - tmp490); + } + } + { + fftw_real tmp245; + fftw_real tmp509; + fftw_real tmp506; + fftw_real tmp838; + fftw_real tmp279; + fftw_real tmp496; + fftw_real tmp501; + fftw_real tmp844; + fftw_real tmp256; + fftw_real tmp507; + fftw_real tmp512; + fftw_real tmp839; + fftw_real tmp268; + fftw_real tmp498; + fftw_real tmp495; + fftw_real tmp843; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp239; + fftw_real tmp504; + fftw_real tmp244; + fftw_real tmp505; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp236; + fftw_real tmp238; + fftw_real tmp235; + fftw_real tmp237; + ASSERT_ALIGNED_DOUBLE; + tmp236 = c_re(inout[5 * iostride]); + tmp238 = c_im(inout[5 * iostride]); + tmp235 = c_re(W[4]); + tmp237 = c_im(W[4]); + tmp239 = (tmp235 * tmp236) + (tmp237 * tmp238); + tmp504 = (tmp235 * tmp238) - (tmp237 * tmp236); + } + { + fftw_real tmp241; + fftw_real tmp243; + fftw_real tmp240; + fftw_real tmp242; + ASSERT_ALIGNED_DOUBLE; + tmp241 = c_re(inout[37 * iostride]); + tmp243 = c_im(inout[37 * iostride]); + tmp240 = c_re(W[36]); + tmp242 = c_im(W[36]); + tmp244 = (tmp240 * tmp241) + (tmp242 * tmp243); + tmp505 = (tmp240 * tmp243) - (tmp242 * tmp241); + } + tmp245 = tmp239 + tmp244; + tmp509 = tmp239 - tmp244; + tmp506 = tmp504 - tmp505; + tmp838 = tmp504 + tmp505; + } + { + fftw_real tmp273; + fftw_real tmp499; + fftw_real tmp278; + fftw_real tmp500; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp270; + fftw_real tmp272; + fftw_real tmp269; + fftw_real tmp271; + ASSERT_ALIGNED_DOUBLE; + tmp270 = c_re(inout[13 * iostride]); + tmp272 = c_im(inout[13 * iostride]); + tmp269 = c_re(W[12]); + tmp271 = c_im(W[12]); + tmp273 = (tmp269 * tmp270) + (tmp271 * tmp272); + tmp499 = (tmp269 * tmp272) - (tmp271 * tmp270); + } + { + fftw_real tmp275; + fftw_real tmp277; + fftw_real tmp274; + fftw_real tmp276; + ASSERT_ALIGNED_DOUBLE; + tmp275 = c_re(inout[45 * iostride]); + tmp277 = c_im(inout[45 * iostride]); + tmp274 = c_re(W[44]); + tmp276 = c_im(W[44]); + tmp278 = (tmp274 * tmp275) + (tmp276 * tmp277); + tmp500 = (tmp274 * tmp277) - (tmp276 * tmp275); + } + tmp279 = tmp273 + tmp278; + tmp496 = tmp273 - tmp278; + tmp501 = tmp499 - tmp500; + tmp844 = tmp499 + tmp500; + } + { + fftw_real tmp250; + fftw_real tmp510; + fftw_real tmp255; + fftw_real tmp511; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp247; + fftw_real tmp249; + fftw_real tmp246; + fftw_real tmp248; + ASSERT_ALIGNED_DOUBLE; + tmp247 = c_re(inout[21 * iostride]); + tmp249 = c_im(inout[21 * iostride]); + tmp246 = c_re(W[20]); + tmp248 = c_im(W[20]); + tmp250 = (tmp246 * tmp247) + (tmp248 * tmp249); + tmp510 = (tmp246 * tmp249) - (tmp248 * tmp247); + } + { + fftw_real tmp252; + fftw_real tmp254; + fftw_real tmp251; + fftw_real tmp253; + ASSERT_ALIGNED_DOUBLE; + tmp252 = c_re(inout[53 * iostride]); + tmp254 = c_im(inout[53 * iostride]); + tmp251 = c_re(W[52]); + tmp253 = c_im(W[52]); + tmp255 = (tmp251 * tmp252) + (tmp253 * tmp254); + tmp511 = (tmp251 * tmp254) - (tmp253 * tmp252); + } + tmp256 = tmp250 + tmp255; + tmp507 = tmp250 - tmp255; + tmp512 = tmp510 - tmp511; + tmp839 = tmp510 + tmp511; + } + { + fftw_real tmp262; + fftw_real tmp493; + fftw_real tmp267; + fftw_real tmp494; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp259; + fftw_real tmp261; + fftw_real tmp258; + fftw_real tmp260; + ASSERT_ALIGNED_DOUBLE; + tmp259 = c_re(inout[61 * iostride]); + tmp261 = c_im(inout[61 * iostride]); + tmp258 = c_re(W[60]); + tmp260 = c_im(W[60]); + tmp262 = (tmp258 * tmp259) + (tmp260 * tmp261); + tmp493 = (tmp258 * tmp261) - (tmp260 * tmp259); + } + { + fftw_real tmp264; + fftw_real tmp266; + fftw_real tmp263; + fftw_real tmp265; + ASSERT_ALIGNED_DOUBLE; + tmp264 = c_re(inout[29 * iostride]); + tmp266 = c_im(inout[29 * iostride]); + tmp263 = c_re(W[28]); + tmp265 = c_im(W[28]); + tmp267 = (tmp263 * tmp264) + (tmp265 * tmp266); + tmp494 = (tmp263 * tmp266) - (tmp265 * tmp264); + } + tmp268 = tmp262 + tmp267; + tmp498 = tmp262 - tmp267; + tmp495 = tmp493 - tmp494; + tmp843 = tmp493 + tmp494; + } + { + fftw_real tmp257; + fftw_real tmp280; + fftw_real tmp837; + fftw_real tmp840; + ASSERT_ALIGNED_DOUBLE; + tmp257 = tmp245 + tmp256; + tmp280 = tmp268 + tmp279; + tmp281 = tmp257 + tmp280; + tmp1012 = tmp257 - tmp280; + tmp837 = tmp245 - tmp256; + tmp840 = tmp838 - tmp839; + tmp841 = tmp837 - tmp840; + tmp854 = tmp837 + tmp840; + } + { + fftw_real tmp968; + fftw_real tmp969; + fftw_real tmp842; + fftw_real tmp845; + ASSERT_ALIGNED_DOUBLE; + tmp968 = tmp838 + tmp839; + tmp969 = tmp843 + tmp844; + tmp970 = tmp968 + tmp969; + tmp1015 = tmp969 - tmp968; + tmp842 = tmp268 - tmp279; + tmp845 = tmp843 - tmp844; + tmp846 = tmp842 + tmp845; + tmp855 = tmp845 - tmp842; + } + { + fftw_real tmp497; + fftw_real tmp502; + fftw_real tmp687; + fftw_real tmp688; + ASSERT_ALIGNED_DOUBLE; + tmp497 = tmp495 + tmp496; + tmp502 = tmp498 - tmp501; + tmp503 = (K923879532 * tmp497) - (K382683432 * tmp502); + tmp527 = (K382683432 * tmp497) + (K923879532 * tmp502); + tmp687 = tmp495 - tmp496; + tmp688 = tmp498 + tmp501; + tmp689 = (K382683432 * tmp687) - (K923879532 * tmp688); + tmp699 = (K923879532 * tmp687) + (K382683432 * tmp688); + } + { + fftw_real tmp508; + fftw_real tmp513; + fftw_real tmp690; + fftw_real tmp691; + ASSERT_ALIGNED_DOUBLE; + tmp508 = tmp506 + tmp507; + tmp513 = tmp509 - tmp512; + tmp514 = (K923879532 * tmp508) + (K382683432 * tmp513); + tmp526 = (K923879532 * tmp513) - (K382683432 * tmp508); + tmp690 = tmp506 - tmp507; + tmp691 = tmp509 + tmp512; + tmp692 = (K382683432 * tmp690) + (K923879532 * tmp691); + tmp698 = (K382683432 * tmp691) - (K923879532 * tmp690); + } + } + { + fftw_real tmp91; + fftw_real tmp955; + fftw_real tmp990; + fftw_real tmp1039; + fftw_real tmp1049; + fftw_real tmp1055; + fftw_real tmp186; + fftw_real tmp1054; + fftw_real tmp972; + fftw_real tmp985; + fftw_real tmp378; + fftw_real tmp1051; + fftw_real tmp981; + fftw_real tmp984; + fftw_real tmp962; + fftw_real tmp1040; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp43; + fftw_real tmp90; + fftw_real tmp988; + fftw_real tmp989; + ASSERT_ALIGNED_DOUBLE; + tmp43 = tmp19 + tmp42; + tmp90 = tmp66 + tmp89; + tmp91 = tmp43 + tmp90; + tmp955 = tmp43 - tmp90; + tmp988 = tmp976 + tmp979; + tmp989 = tmp967 + tmp970; + tmp990 = tmp988 - tmp989; + tmp1039 = tmp989 + tmp988; + } + { + fftw_real tmp1041; + fftw_real tmp1048; + fftw_real tmp138; + fftw_real tmp185; + ASSERT_ALIGNED_DOUBLE; + tmp1041 = tmp993 + tmp992; + tmp1048 = tmp1042 + tmp1047; + tmp1049 = tmp1041 + tmp1048; + tmp1055 = tmp1048 - tmp1041; + tmp138 = tmp114 + tmp137; + tmp185 = tmp161 + tmp184; + tmp186 = tmp138 + tmp185; + tmp1054 = tmp138 - tmp185; + } + { + fftw_real tmp964; + fftw_real tmp971; + fftw_real tmp282; + fftw_real tmp377; + ASSERT_ALIGNED_DOUBLE; + tmp964 = tmp234 - tmp281; + tmp971 = tmp967 - tmp970; + tmp972 = tmp964 - tmp971; + tmp985 = tmp964 + tmp971; + tmp282 = tmp234 + tmp281; + tmp377 = tmp329 + tmp376; + tmp378 = tmp282 + tmp377; + tmp1051 = tmp282 - tmp377; + } + { + fftw_real tmp973; + fftw_real tmp980; + fftw_real tmp958; + fftw_real tmp961; + ASSERT_ALIGNED_DOUBLE; + tmp973 = tmp329 - tmp376; + tmp980 = tmp976 - tmp979; + tmp981 = tmp973 + tmp980; + tmp984 = tmp980 - tmp973; + tmp958 = tmp956 + tmp957; + tmp961 = tmp959 + tmp960; + tmp962 = tmp958 - tmp961; + tmp1040 = tmp961 + tmp958; + } + { + fftw_real tmp187; + fftw_real tmp987; + fftw_real tmp1050; + fftw_real tmp1052; + ASSERT_ALIGNED_DOUBLE; + tmp187 = tmp91 + tmp186; + c_re(inout[32 * iostride]) = tmp187 - tmp378; + c_re(inout[0]) = tmp187 + tmp378; + tmp987 = tmp91 - tmp186; + c_re(inout[48 * iostride]) = tmp987 - tmp990; + c_re(inout[16 * iostride]) = tmp987 + tmp990; + { + fftw_real tmp963; + fftw_real tmp982; + fftw_real tmp1057; + fftw_real tmp1058; + ASSERT_ALIGNED_DOUBLE; + tmp963 = tmp955 + tmp962; + tmp982 = K707106781 * (tmp972 + tmp981); + c_re(inout[40 * iostride]) = tmp963 - tmp982; + c_re(inout[8 * iostride]) = tmp963 + tmp982; + tmp1057 = K707106781 * (tmp972 - tmp981); + tmp1058 = tmp1055 - tmp1054; + c_im(inout[24 * iostride]) = tmp1057 + tmp1058; + c_im(inout[56 * iostride]) = tmp1058 - tmp1057; + } + tmp1050 = tmp1040 + tmp1049; + c_im(inout[0]) = tmp1039 + tmp1050; + c_im(inout[32 * iostride]) = tmp1050 - tmp1039; + tmp1052 = tmp1049 - tmp1040; + c_im(inout[16 * iostride]) = tmp1051 + tmp1052; + c_im(inout[48 * iostride]) = tmp1052 - tmp1051; + { + fftw_real tmp1053; + fftw_real tmp1056; + fftw_real tmp983; + fftw_real tmp986; + ASSERT_ALIGNED_DOUBLE; + tmp1053 = K707106781 * (tmp985 + tmp984); + tmp1056 = tmp1054 + tmp1055; + c_im(inout[8 * iostride]) = tmp1053 + tmp1056; + c_im(inout[40 * iostride]) = tmp1056 - tmp1053; + tmp983 = tmp955 - tmp962; + tmp986 = K707106781 * (tmp984 - tmp985); + c_re(inout[56 * iostride]) = tmp983 - tmp986; + c_re(inout[24 * iostride]) = tmp983 + tmp986; + } + } + } + { + fftw_real tmp995; + fftw_real tmp1023; + fftw_real tmp1026; + fftw_real tmp1068; + fftw_real tmp1002; + fftw_real tmp1060; + fftw_real tmp1063; + fftw_real tmp1069; + fftw_real tmp1010; + fftw_real tmp1021; + fftw_real tmp1030; + fftw_real tmp1037; + fftw_real tmp1017; + fftw_real tmp1020; + fftw_real tmp1033; + fftw_real tmp1036; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp991; + fftw_real tmp994; + fftw_real tmp1024; + fftw_real tmp1025; + ASSERT_ALIGNED_DOUBLE; + tmp991 = tmp19 - tmp42; + tmp994 = tmp992 - tmp993; + tmp995 = tmp991 - tmp994; + tmp1023 = tmp991 + tmp994; + tmp1024 = tmp999 - tmp1000; + tmp1025 = tmp997 + tmp996; + tmp1026 = K707106781 * (tmp1024 + tmp1025); + tmp1068 = K707106781 * (tmp1024 - tmp1025); + } + { + fftw_real tmp998; + fftw_real tmp1001; + fftw_real tmp1061; + fftw_real tmp1062; + ASSERT_ALIGNED_DOUBLE; + tmp998 = tmp996 - tmp997; + tmp1001 = tmp999 + tmp1000; + tmp1002 = K707106781 * (tmp998 - tmp1001); + tmp1060 = K707106781 * (tmp1001 + tmp998); + tmp1061 = tmp66 - tmp89; + tmp1062 = tmp1047 - tmp1042; + tmp1063 = tmp1061 + tmp1062; + tmp1069 = tmp1062 - tmp1061; + } + { + fftw_real tmp1006; + fftw_real tmp1009; + fftw_real tmp1028; + fftw_real tmp1029; + ASSERT_ALIGNED_DOUBLE; + tmp1006 = tmp1004 - tmp1005; + tmp1009 = tmp1007 - tmp1008; + tmp1010 = (K382683432 * tmp1006) - (K923879532 * tmp1009); + tmp1021 = (K923879532 * tmp1006) + (K382683432 * tmp1009); + tmp1028 = tmp1004 + tmp1005; + tmp1029 = tmp1007 + tmp1008; + tmp1030 = (K923879532 * tmp1028) - (K382683432 * tmp1029); + tmp1037 = (K382683432 * tmp1028) + (K923879532 * tmp1029); + } + { + fftw_real tmp1013; + fftw_real tmp1016; + fftw_real tmp1031; + fftw_real tmp1032; + ASSERT_ALIGNED_DOUBLE; + tmp1013 = tmp1011 - tmp1012; + tmp1016 = tmp1014 - tmp1015; + tmp1017 = (K382683432 * tmp1013) + (K923879532 * tmp1016); + tmp1020 = (K382683432 * tmp1016) - (K923879532 * tmp1013); + tmp1031 = tmp1011 + tmp1012; + tmp1032 = tmp1014 + tmp1015; + tmp1033 = (K923879532 * tmp1031) + (K382683432 * tmp1032); + tmp1036 = (K923879532 * tmp1032) - (K382683432 * tmp1031); + } + { + fftw_real tmp1003; + fftw_real tmp1018; + fftw_real tmp1019; + fftw_real tmp1022; + ASSERT_ALIGNED_DOUBLE; + tmp1003 = tmp995 - tmp1002; + tmp1018 = tmp1010 - tmp1017; + c_re(inout[60 * iostride]) = tmp1003 - tmp1018; + c_re(inout[28 * iostride]) = tmp1003 + tmp1018; + tmp1019 = tmp995 + tmp1002; + tmp1022 = tmp1020 + tmp1021; + c_re(inout[44 * iostride]) = tmp1019 - tmp1022; + c_re(inout[12 * iostride]) = tmp1019 + tmp1022; + } + { + fftw_real tmp1071; + fftw_real tmp1072; + fftw_real tmp1067; + fftw_real tmp1070; + ASSERT_ALIGNED_DOUBLE; + tmp1071 = tmp1020 - tmp1021; + tmp1072 = tmp1069 - tmp1068; + c_im(inout[28 * iostride]) = tmp1071 + tmp1072; + c_im(inout[60 * iostride]) = tmp1072 - tmp1071; + tmp1067 = tmp1017 + tmp1010; + tmp1070 = tmp1068 + tmp1069; + c_im(inout[12 * iostride]) = tmp1067 + tmp1070; + c_im(inout[44 * iostride]) = tmp1070 - tmp1067; + } + { + fftw_real tmp1027; + fftw_real tmp1034; + fftw_real tmp1035; + fftw_real tmp1038; + ASSERT_ALIGNED_DOUBLE; + tmp1027 = tmp1023 - tmp1026; + tmp1034 = tmp1030 - tmp1033; + c_re(inout[52 * iostride]) = tmp1027 - tmp1034; + c_re(inout[20 * iostride]) = tmp1027 + tmp1034; + tmp1035 = tmp1023 + tmp1026; + tmp1038 = tmp1036 + tmp1037; + c_re(inout[36 * iostride]) = tmp1035 - tmp1038; + c_re(inout[4 * iostride]) = tmp1035 + tmp1038; + } + { + fftw_real tmp1065; + fftw_real tmp1066; + fftw_real tmp1059; + fftw_real tmp1064; + ASSERT_ALIGNED_DOUBLE; + tmp1065 = tmp1036 - tmp1037; + tmp1066 = tmp1063 - tmp1060; + c_im(inout[20 * iostride]) = tmp1065 + tmp1066; + c_im(inout[52 * iostride]) = tmp1066 - tmp1065; + tmp1059 = tmp1033 + tmp1030; + tmp1064 = tmp1060 + tmp1063; + c_im(inout[4 * iostride]) = tmp1059 + tmp1064; + c_im(inout[36 * iostride]) = tmp1064 - tmp1059; + } + } + { + fftw_real tmp419; + fftw_real tmp591; + fftw_real tmp1125; + fftw_real tmp1131; + fftw_real tmp474; + fftw_real tmp1122; + fftw_real tmp594; + fftw_real tmp1130; + fftw_real tmp530; + fftw_real tmp589; + fftw_real tmp598; + fftw_real tmp605; + fftw_real tmp585; + fftw_real tmp588; + fftw_real tmp601; + fftw_real tmp604; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp395; + fftw_real tmp418; + fftw_real tmp1123; + fftw_real tmp1124; + ASSERT_ALIGNED_DOUBLE; + tmp395 = tmp383 - tmp394; + tmp418 = tmp406 - tmp417; + tmp419 = tmp395 - tmp418; + tmp591 = tmp395 + tmp418; + tmp1123 = tmp608 - tmp609; + tmp1124 = tmp1109 - tmp1106; + tmp1125 = tmp1123 + tmp1124; + tmp1131 = tmp1124 - tmp1123; + } + { + fftw_real tmp446; + fftw_real tmp593; + fftw_real tmp473; + fftw_real tmp592; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp436; + fftw_real tmp445; + fftw_real tmp463; + fftw_real tmp472; + ASSERT_ALIGNED_DOUBLE; + tmp436 = tmp424 - tmp435; + tmp445 = tmp441 - tmp444; + tmp446 = (K555570233 * tmp436) - (K831469612 * tmp445); + tmp593 = (K555570233 * tmp445) + (K831469612 * tmp436); + tmp463 = tmp451 - tmp462; + tmp472 = tmp468 - tmp471; + tmp473 = (K831469612 * tmp463) + (K555570233 * tmp472); + tmp592 = (K555570233 * tmp463) - (K831469612 * tmp472); + } + tmp474 = tmp446 - tmp473; + tmp1122 = tmp473 + tmp446; + tmp594 = tmp592 + tmp593; + tmp1130 = tmp592 - tmp593; + } + { + fftw_real tmp516; + fftw_real tmp596; + fftw_real tmp529; + fftw_real tmp597; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp492; + fftw_real tmp515; + fftw_real tmp525; + fftw_real tmp528; + ASSERT_ALIGNED_DOUBLE; + tmp492 = tmp480 - tmp491; + tmp515 = tmp503 - tmp514; + tmp516 = tmp492 - tmp515; + tmp596 = tmp492 + tmp515; + tmp525 = tmp521 - tmp524; + tmp528 = tmp526 - tmp527; + tmp529 = tmp525 - tmp528; + tmp597 = tmp525 + tmp528; + } + tmp530 = (K290284677 * tmp516) - (K956940335 * tmp529); + tmp589 = (K956940335 * tmp516) + (K290284677 * tmp529); + tmp598 = (K881921264 * tmp596) - (K471396736 * tmp597); + tmp605 = (K471396736 * tmp596) + (K881921264 * tmp597); + } + { + fftw_real tmp571; + fftw_real tmp599; + fftw_real tmp584; + fftw_real tmp600; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp547; + fftw_real tmp570; + fftw_real tmp580; + fftw_real tmp583; + ASSERT_ALIGNED_DOUBLE; + tmp547 = tmp535 - tmp546; + tmp570 = tmp558 - tmp569; + tmp571 = tmp547 - tmp570; + tmp599 = tmp547 + tmp570; + tmp580 = tmp576 - tmp579; + tmp583 = tmp581 - tmp582; + tmp584 = tmp580 - tmp583; + tmp600 = tmp580 + tmp583; + } + tmp585 = (K290284677 * tmp571) + (K956940335 * tmp584); + tmp588 = (K290284677 * tmp584) - (K956940335 * tmp571); + tmp601 = (K881921264 * tmp599) + (K471396736 * tmp600); + tmp604 = (K881921264 * tmp600) - (K471396736 * tmp599); + } + { + fftw_real tmp475; + fftw_real tmp586; + fftw_real tmp587; + fftw_real tmp590; + ASSERT_ALIGNED_DOUBLE; + tmp475 = tmp419 + tmp474; + tmp586 = tmp530 + tmp585; + c_re(inout[45 * iostride]) = tmp475 - tmp586; + c_re(inout[13 * iostride]) = tmp475 + tmp586; + tmp587 = tmp419 - tmp474; + tmp590 = tmp588 - tmp589; + c_re(inout[61 * iostride]) = tmp587 - tmp590; + c_re(inout[29 * iostride]) = tmp587 + tmp590; + } + { + fftw_real tmp1129; + fftw_real tmp1132; + fftw_real tmp1133; + fftw_real tmp1134; + ASSERT_ALIGNED_DOUBLE; + tmp1129 = tmp589 + tmp588; + tmp1132 = tmp1130 + tmp1131; + c_im(inout[13 * iostride]) = tmp1129 + tmp1132; + c_im(inout[45 * iostride]) = tmp1132 - tmp1129; + tmp1133 = tmp530 - tmp585; + tmp1134 = tmp1131 - tmp1130; + c_im(inout[29 * iostride]) = tmp1133 + tmp1134; + c_im(inout[61 * iostride]) = tmp1134 - tmp1133; + } + { + fftw_real tmp595; + fftw_real tmp602; + fftw_real tmp603; + fftw_real tmp606; + ASSERT_ALIGNED_DOUBLE; + tmp595 = tmp591 + tmp594; + tmp602 = tmp598 + tmp601; + c_re(inout[37 * iostride]) = tmp595 - tmp602; + c_re(inout[5 * iostride]) = tmp595 + tmp602; + tmp603 = tmp591 - tmp594; + tmp606 = tmp604 - tmp605; + c_re(inout[53 * iostride]) = tmp603 - tmp606; + c_re(inout[21 * iostride]) = tmp603 + tmp606; + } + { + fftw_real tmp1121; + fftw_real tmp1126; + fftw_real tmp1127; + fftw_real tmp1128; + ASSERT_ALIGNED_DOUBLE; + tmp1121 = tmp605 + tmp604; + tmp1126 = tmp1122 + tmp1125; + c_im(inout[5 * iostride]) = tmp1121 + tmp1126; + c_im(inout[37 * iostride]) = tmp1126 - tmp1121; + tmp1127 = tmp598 - tmp601; + tmp1128 = tmp1125 - tmp1122; + c_im(inout[21 * iostride]) = tmp1127 + tmp1128; + c_im(inout[53 * iostride]) = tmp1128 - tmp1127; + } + } + { + fftw_real tmp611; + fftw_real tmp639; + fftw_real tmp1111; + fftw_real tmp1117; + fftw_real tmp618; + fftw_real tmp1104; + fftw_real tmp642; + fftw_real tmp1116; + fftw_real tmp626; + fftw_real tmp637; + fftw_real tmp646; + fftw_real tmp653; + fftw_real tmp633; + fftw_real tmp636; + fftw_real tmp649; + fftw_real tmp652; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp607; + fftw_real tmp610; + fftw_real tmp1105; + fftw_real tmp1110; + ASSERT_ALIGNED_DOUBLE; + tmp607 = tmp383 + tmp394; + tmp610 = tmp608 + tmp609; + tmp611 = tmp607 - tmp610; + tmp639 = tmp607 + tmp610; + tmp1105 = tmp417 + tmp406; + tmp1110 = tmp1106 + tmp1109; + tmp1111 = tmp1105 + tmp1110; + tmp1117 = tmp1110 - tmp1105; + } + { + fftw_real tmp614; + fftw_real tmp641; + fftw_real tmp617; + fftw_real tmp640; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp612; + fftw_real tmp613; + fftw_real tmp615; + fftw_real tmp616; + ASSERT_ALIGNED_DOUBLE; + tmp612 = tmp424 + tmp435; + tmp613 = tmp441 + tmp444; + tmp614 = (K980785280 * tmp612) - (K195090322 * tmp613); + tmp641 = (K980785280 * tmp613) + (K195090322 * tmp612); + tmp615 = tmp451 + tmp462; + tmp616 = tmp468 + tmp471; + tmp617 = (K195090322 * tmp615) + (K980785280 * tmp616); + tmp640 = (K980785280 * tmp615) - (K195090322 * tmp616); + } + tmp618 = tmp614 - tmp617; + tmp1104 = tmp617 + tmp614; + tmp642 = tmp640 + tmp641; + tmp1116 = tmp640 - tmp641; + } + { + fftw_real tmp622; + fftw_real tmp644; + fftw_real tmp625; + fftw_real tmp645; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp620; + fftw_real tmp621; + fftw_real tmp623; + fftw_real tmp624; + ASSERT_ALIGNED_DOUBLE; + tmp620 = tmp576 + tmp579; + tmp621 = tmp569 + tmp558; + tmp622 = tmp620 - tmp621; + tmp644 = tmp620 + tmp621; + tmp623 = tmp535 + tmp546; + tmp624 = tmp581 + tmp582; + tmp625 = tmp623 - tmp624; + tmp645 = tmp623 + tmp624; + } + tmp626 = (K634393284 * tmp622) - (K773010453 * tmp625); + tmp637 = (K773010453 * tmp622) + (K634393284 * tmp625); + tmp646 = (K995184726 * tmp644) - (K098017140 * tmp645); + tmp653 = (K098017140 * tmp644) + (K995184726 * tmp645); + } + { + fftw_real tmp629; + fftw_real tmp647; + fftw_real tmp632; + fftw_real tmp648; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp627; + fftw_real tmp628; + fftw_real tmp630; + fftw_real tmp631; + ASSERT_ALIGNED_DOUBLE; + tmp627 = tmp521 + tmp524; + tmp628 = tmp514 + tmp503; + tmp629 = tmp627 - tmp628; + tmp647 = tmp627 + tmp628; + tmp630 = tmp480 + tmp491; + tmp631 = tmp526 + tmp527; + tmp632 = tmp630 - tmp631; + tmp648 = tmp630 + tmp631; + } + tmp633 = (K634393284 * tmp629) + (K773010453 * tmp632); + tmp636 = (K634393284 * tmp632) - (K773010453 * tmp629); + tmp649 = (K995184726 * tmp647) + (K098017140 * tmp648); + tmp652 = (K995184726 * tmp648) - (K098017140 * tmp647); + } + { + fftw_real tmp619; + fftw_real tmp634; + fftw_real tmp635; + fftw_real tmp638; + ASSERT_ALIGNED_DOUBLE; + tmp619 = tmp611 - tmp618; + tmp634 = tmp626 - tmp633; + c_re(inout[57 * iostride]) = tmp619 - tmp634; + c_re(inout[25 * iostride]) = tmp619 + tmp634; + tmp635 = tmp611 + tmp618; + tmp638 = tmp636 + tmp637; + c_re(inout[41 * iostride]) = tmp635 - tmp638; + c_re(inout[9 * iostride]) = tmp635 + tmp638; + } + { + fftw_real tmp1119; + fftw_real tmp1120; + fftw_real tmp1115; + fftw_real tmp1118; + ASSERT_ALIGNED_DOUBLE; + tmp1119 = tmp636 - tmp637; + tmp1120 = tmp1117 - tmp1116; + c_im(inout[25 * iostride]) = tmp1119 + tmp1120; + c_im(inout[57 * iostride]) = tmp1120 - tmp1119; + tmp1115 = tmp633 + tmp626; + tmp1118 = tmp1116 + tmp1117; + c_im(inout[9 * iostride]) = tmp1115 + tmp1118; + c_im(inout[41 * iostride]) = tmp1118 - tmp1115; + } + { + fftw_real tmp643; + fftw_real tmp650; + fftw_real tmp651; + fftw_real tmp654; + ASSERT_ALIGNED_DOUBLE; + tmp643 = tmp639 - tmp642; + tmp650 = tmp646 - tmp649; + c_re(inout[49 * iostride]) = tmp643 - tmp650; + c_re(inout[17 * iostride]) = tmp643 + tmp650; + tmp651 = tmp639 + tmp642; + tmp654 = tmp652 + tmp653; + c_re(inout[33 * iostride]) = tmp651 - tmp654; + c_re(inout[iostride]) = tmp651 + tmp654; + } + { + fftw_real tmp1113; + fftw_real tmp1114; + fftw_real tmp1103; + fftw_real tmp1112; + ASSERT_ALIGNED_DOUBLE; + tmp1113 = tmp652 - tmp653; + tmp1114 = tmp1111 - tmp1104; + c_im(inout[17 * iostride]) = tmp1113 + tmp1114; + c_im(inout[49 * iostride]) = tmp1114 - tmp1113; + tmp1103 = tmp649 + tmp646; + tmp1112 = tmp1104 + tmp1111; + c_im(inout[iostride]) = tmp1103 + tmp1112; + c_im(inout[33 * iostride]) = tmp1112 - tmp1103; + } + } + { + fftw_real tmp807; + fftw_real tmp891; + fftw_real tmp830; + fftw_real tmp1074; + fftw_real tmp1079; + fftw_real tmp1085; + fftw_real tmp894; + fftw_real tmp1084; + fftw_real tmp885; + fftw_real tmp888; + fftw_real tmp901; + fftw_real tmp904; + fftw_real tmp858; + fftw_real tmp889; + fftw_real tmp898; + fftw_real tmp905; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp795; + fftw_real tmp806; + fftw_real tmp892; + fftw_real tmp893; + ASSERT_ALIGNED_DOUBLE; + tmp795 = tmp791 + tmp794; + tmp806 = K707106781 * (tmp800 + tmp805); + tmp807 = tmp795 - tmp806; + tmp891 = tmp795 + tmp806; + { + fftw_real tmp818; + fftw_real tmp829; + fftw_real tmp1075; + fftw_real tmp1078; + ASSERT_ALIGNED_DOUBLE; + tmp818 = (K923879532 * tmp812) - (K382683432 * tmp817); + tmp829 = (K923879532 * tmp823) + (K382683432 * tmp828); + tmp830 = tmp818 - tmp829; + tmp1074 = tmp829 + tmp818; + tmp1075 = K707106781 * (tmp909 + tmp908); + tmp1078 = tmp1076 + tmp1077; + tmp1079 = tmp1075 + tmp1078; + tmp1085 = tmp1078 - tmp1075; + } + tmp892 = (K923879532 * tmp828) - (K382683432 * tmp823); + tmp893 = (K382683432 * tmp812) + (K923879532 * tmp817); + tmp894 = tmp892 + tmp893; + tmp1084 = tmp892 - tmp893; + { + fftw_real tmp875; + fftw_real tmp899; + fftw_real tmp884; + fftw_real tmp900; + fftw_real tmp874; + fftw_real tmp883; + ASSERT_ALIGNED_DOUBLE; + tmp874 = K707106781 * (tmp868 + tmp873); + tmp875 = tmp863 - tmp874; + tmp899 = tmp863 + tmp874; + tmp883 = K707106781 * (tmp881 + tmp882); + tmp884 = tmp880 - tmp883; + tmp900 = tmp880 + tmp883; + tmp885 = (K555570233 * tmp875) + (K831469612 * tmp884); + tmp888 = (K555570233 * tmp884) - (K831469612 * tmp875); + tmp901 = (K980785280 * tmp899) + (K195090322 * tmp900); + tmp904 = (K980785280 * tmp900) - (K195090322 * tmp899); + } + { + fftw_real tmp848; + fftw_real tmp896; + fftw_real tmp857; + fftw_real tmp897; + fftw_real tmp847; + fftw_real tmp856; + ASSERT_ALIGNED_DOUBLE; + tmp847 = K707106781 * (tmp841 + tmp846); + tmp848 = tmp836 - tmp847; + tmp896 = tmp836 + tmp847; + tmp856 = K707106781 * (tmp854 + tmp855); + tmp857 = tmp853 - tmp856; + tmp897 = tmp853 + tmp856; + tmp858 = (K555570233 * tmp848) - (K831469612 * tmp857); + tmp889 = (K831469612 * tmp848) + (K555570233 * tmp857); + tmp898 = (K980785280 * tmp896) - (K195090322 * tmp897); + tmp905 = (K195090322 * tmp896) + (K980785280 * tmp897); + } + } + { + fftw_real tmp831; + fftw_real tmp886; + fftw_real tmp887; + fftw_real tmp890; + ASSERT_ALIGNED_DOUBLE; + tmp831 = tmp807 + tmp830; + tmp886 = tmp858 + tmp885; + c_re(inout[42 * iostride]) = tmp831 - tmp886; + c_re(inout[10 * iostride]) = tmp831 + tmp886; + tmp887 = tmp807 - tmp830; + tmp890 = tmp888 - tmp889; + c_re(inout[58 * iostride]) = tmp887 - tmp890; + c_re(inout[26 * iostride]) = tmp887 + tmp890; + } + { + fftw_real tmp1083; + fftw_real tmp1086; + fftw_real tmp1087; + fftw_real tmp1088; + ASSERT_ALIGNED_DOUBLE; + tmp1083 = tmp889 + tmp888; + tmp1086 = tmp1084 + tmp1085; + c_im(inout[10 * iostride]) = tmp1083 + tmp1086; + c_im(inout[42 * iostride]) = tmp1086 - tmp1083; + tmp1087 = tmp858 - tmp885; + tmp1088 = tmp1085 - tmp1084; + c_im(inout[26 * iostride]) = tmp1087 + tmp1088; + c_im(inout[58 * iostride]) = tmp1088 - tmp1087; + } + { + fftw_real tmp895; + fftw_real tmp902; + fftw_real tmp903; + fftw_real tmp906; + ASSERT_ALIGNED_DOUBLE; + tmp895 = tmp891 + tmp894; + tmp902 = tmp898 + tmp901; + c_re(inout[34 * iostride]) = tmp895 - tmp902; + c_re(inout[2 * iostride]) = tmp895 + tmp902; + tmp903 = tmp891 - tmp894; + tmp906 = tmp904 - tmp905; + c_re(inout[50 * iostride]) = tmp903 - tmp906; + c_re(inout[18 * iostride]) = tmp903 + tmp906; + } + { + fftw_real tmp1073; + fftw_real tmp1080; + fftw_real tmp1081; + fftw_real tmp1082; + ASSERT_ALIGNED_DOUBLE; + tmp1073 = tmp905 + tmp904; + tmp1080 = tmp1074 + tmp1079; + c_im(inout[2 * iostride]) = tmp1073 + tmp1080; + c_im(inout[34 * iostride]) = tmp1080 - tmp1073; + tmp1081 = tmp898 - tmp901; + tmp1082 = tmp1079 - tmp1074; + c_im(inout[18 * iostride]) = tmp1081 + tmp1082; + c_im(inout[50 * iostride]) = tmp1082 - tmp1081; + } + } + { + fftw_real tmp911; + fftw_real tmp939; + fftw_real tmp918; + fftw_real tmp1090; + fftw_real tmp1093; + fftw_real tmp1099; + fftw_real tmp942; + fftw_real tmp1098; + fftw_real tmp933; + fftw_real tmp936; + fftw_real tmp949; + fftw_real tmp952; + fftw_real tmp926; + fftw_real tmp937; + fftw_real tmp946; + fftw_real tmp953; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp907; + fftw_real tmp910; + fftw_real tmp940; + fftw_real tmp941; + ASSERT_ALIGNED_DOUBLE; + tmp907 = tmp791 - tmp794; + tmp910 = K707106781 * (tmp908 - tmp909); + tmp911 = tmp907 - tmp910; + tmp939 = tmp907 + tmp910; + { + fftw_real tmp914; + fftw_real tmp917; + fftw_real tmp1091; + fftw_real tmp1092; + ASSERT_ALIGNED_DOUBLE; + tmp914 = (K382683432 * tmp912) - (K923879532 * tmp913); + tmp917 = (K382683432 * tmp915) + (K923879532 * tmp916); + tmp918 = tmp914 - tmp917; + tmp1090 = tmp917 + tmp914; + tmp1091 = K707106781 * (tmp800 - tmp805); + tmp1092 = tmp1077 - tmp1076; + tmp1093 = tmp1091 + tmp1092; + tmp1099 = tmp1092 - tmp1091; + } + tmp940 = (K382683432 * tmp916) - (K923879532 * tmp915); + tmp941 = (K923879532 * tmp912) + (K382683432 * tmp913); + tmp942 = tmp940 + tmp941; + tmp1098 = tmp940 - tmp941; + { + fftw_real tmp929; + fftw_real tmp947; + fftw_real tmp932; + fftw_real tmp948; + fftw_real tmp928; + fftw_real tmp931; + ASSERT_ALIGNED_DOUBLE; + tmp928 = K707106781 * (tmp841 - tmp846); + tmp929 = tmp927 - tmp928; + tmp947 = tmp927 + tmp928; + tmp931 = K707106781 * (tmp855 - tmp854); + tmp932 = tmp930 - tmp931; + tmp948 = tmp930 + tmp931; + tmp933 = (K195090322 * tmp929) + (K980785280 * tmp932); + tmp936 = (K195090322 * tmp932) - (K980785280 * tmp929); + tmp949 = (K831469612 * tmp947) + (K555570233 * tmp948); + tmp952 = (K831469612 * tmp948) - (K555570233 * tmp947); + } + { + fftw_real tmp922; + fftw_real tmp944; + fftw_real tmp925; + fftw_real tmp945; + fftw_real tmp921; + fftw_real tmp924; + ASSERT_ALIGNED_DOUBLE; + tmp921 = K707106781 * (tmp868 - tmp873); + tmp922 = tmp920 - tmp921; + tmp944 = tmp920 + tmp921; + tmp924 = K707106781 * (tmp882 - tmp881); + tmp925 = tmp923 - tmp924; + tmp945 = tmp923 + tmp924; + tmp926 = (K195090322 * tmp922) - (K980785280 * tmp925); + tmp937 = (K980785280 * tmp922) + (K195090322 * tmp925); + tmp946 = (K831469612 * tmp944) - (K555570233 * tmp945); + tmp953 = (K555570233 * tmp944) + (K831469612 * tmp945); + } + } + { + fftw_real tmp919; + fftw_real tmp934; + fftw_real tmp935; + fftw_real tmp938; + ASSERT_ALIGNED_DOUBLE; + tmp919 = tmp911 - tmp918; + tmp934 = tmp926 - tmp933; + c_re(inout[62 * iostride]) = tmp919 - tmp934; + c_re(inout[30 * iostride]) = tmp919 + tmp934; + tmp935 = tmp911 + tmp918; + tmp938 = tmp936 + tmp937; + c_re(inout[46 * iostride]) = tmp935 - tmp938; + c_re(inout[14 * iostride]) = tmp935 + tmp938; + } + { + fftw_real tmp1101; + fftw_real tmp1102; + fftw_real tmp1097; + fftw_real tmp1100; + ASSERT_ALIGNED_DOUBLE; + tmp1101 = tmp936 - tmp937; + tmp1102 = tmp1099 - tmp1098; + c_im(inout[30 * iostride]) = tmp1101 + tmp1102; + c_im(inout[62 * iostride]) = tmp1102 - tmp1101; + tmp1097 = tmp933 + tmp926; + tmp1100 = tmp1098 + tmp1099; + c_im(inout[14 * iostride]) = tmp1097 + tmp1100; + c_im(inout[46 * iostride]) = tmp1100 - tmp1097; + } + { + fftw_real tmp943; + fftw_real tmp950; + fftw_real tmp951; + fftw_real tmp954; + ASSERT_ALIGNED_DOUBLE; + tmp943 = tmp939 - tmp942; + tmp950 = tmp946 - tmp949; + c_re(inout[54 * iostride]) = tmp943 - tmp950; + c_re(inout[22 * iostride]) = tmp943 + tmp950; + tmp951 = tmp939 + tmp942; + tmp954 = tmp952 + tmp953; + c_re(inout[38 * iostride]) = tmp951 - tmp954; + c_re(inout[6 * iostride]) = tmp951 + tmp954; + } + { + fftw_real tmp1095; + fftw_real tmp1096; + fftw_real tmp1089; + fftw_real tmp1094; + ASSERT_ALIGNED_DOUBLE; + tmp1095 = tmp952 - tmp953; + tmp1096 = tmp1093 - tmp1090; + c_im(inout[22 * iostride]) = tmp1095 + tmp1096; + c_im(inout[54 * iostride]) = tmp1096 - tmp1095; + tmp1089 = tmp949 + tmp946; + tmp1094 = tmp1090 + tmp1093; + c_im(inout[6 * iostride]) = tmp1089 + tmp1094; + c_im(inout[38 * iostride]) = tmp1094 - tmp1089; + } + } + { + fftw_real tmp667; + fftw_real tmp727; + fftw_real tmp1155; + fftw_real tmp1161; + fftw_real tmp682; + fftw_real tmp1152; + fftw_real tmp730; + fftw_real tmp1160; + fftw_real tmp702; + fftw_real tmp725; + fftw_real tmp734; + fftw_real tmp741; + fftw_real tmp721; + fftw_real tmp724; + fftw_real tmp737; + fftw_real tmp740; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp659; + fftw_real tmp666; + fftw_real tmp1153; + fftw_real tmp1154; + ASSERT_ALIGNED_DOUBLE; + tmp659 = tmp655 - tmp658; + tmp666 = tmp662 - tmp665; + tmp667 = tmp659 - tmp666; + tmp727 = tmp659 + tmp666; + tmp1153 = tmp744 - tmp745; + tmp1154 = tmp1139 - tmp1138; + tmp1155 = tmp1153 + tmp1154; + tmp1161 = tmp1154 - tmp1153; + } + { + fftw_real tmp674; + fftw_real tmp729; + fftw_real tmp681; + fftw_real tmp728; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp670; + fftw_real tmp673; + fftw_real tmp677; + fftw_real tmp680; + ASSERT_ALIGNED_DOUBLE; + tmp670 = tmp668 - tmp669; + tmp673 = tmp671 - tmp672; + tmp674 = (K195090322 * tmp670) - (K980785280 * tmp673); + tmp729 = (K980785280 * tmp670) + (K195090322 * tmp673); + tmp677 = tmp675 - tmp676; + tmp680 = tmp678 - tmp679; + tmp681 = (K195090322 * tmp677) + (K980785280 * tmp680); + tmp728 = (K195090322 * tmp680) - (K980785280 * tmp677); + } + tmp682 = tmp674 - tmp681; + tmp1152 = tmp681 + tmp674; + tmp730 = tmp728 + tmp729; + tmp1160 = tmp728 - tmp729; + } + { + fftw_real tmp694; + fftw_real tmp732; + fftw_real tmp701; + fftw_real tmp733; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp686; + fftw_real tmp693; + fftw_real tmp697; + fftw_real tmp700; + ASSERT_ALIGNED_DOUBLE; + tmp686 = tmp684 - tmp685; + tmp693 = tmp689 - tmp692; + tmp694 = tmp686 - tmp693; + tmp732 = tmp686 + tmp693; + tmp697 = tmp695 - tmp696; + tmp700 = tmp698 - tmp699; + tmp701 = tmp697 - tmp700; + tmp733 = tmp697 + tmp700; + } + tmp702 = (K098017140 * tmp694) - (K995184726 * tmp701); + tmp725 = (K995184726 * tmp694) + (K098017140 * tmp701); + tmp734 = (K773010453 * tmp732) - (K634393284 * tmp733); + tmp741 = (K634393284 * tmp732) + (K773010453 * tmp733); + } + { + fftw_real tmp713; + fftw_real tmp735; + fftw_real tmp720; + fftw_real tmp736; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp705; + fftw_real tmp712; + fftw_real tmp716; + fftw_real tmp719; + ASSERT_ALIGNED_DOUBLE; + tmp705 = tmp703 - tmp704; + tmp712 = tmp708 - tmp711; + tmp713 = tmp705 - tmp712; + tmp735 = tmp705 + tmp712; + tmp716 = tmp714 - tmp715; + tmp719 = tmp717 - tmp718; + tmp720 = tmp716 - tmp719; + tmp736 = tmp716 + tmp719; + } + tmp721 = (K098017140 * tmp713) + (K995184726 * tmp720); + tmp724 = (K098017140 * tmp720) - (K995184726 * tmp713); + tmp737 = (K773010453 * tmp735) + (K634393284 * tmp736); + tmp740 = (K773010453 * tmp736) - (K634393284 * tmp735); + } + { + fftw_real tmp683; + fftw_real tmp722; + fftw_real tmp723; + fftw_real tmp726; + ASSERT_ALIGNED_DOUBLE; + tmp683 = tmp667 + tmp682; + tmp722 = tmp702 + tmp721; + c_re(inout[47 * iostride]) = tmp683 - tmp722; + c_re(inout[15 * iostride]) = tmp683 + tmp722; + tmp723 = tmp667 - tmp682; + tmp726 = tmp724 - tmp725; + c_re(inout[63 * iostride]) = tmp723 - tmp726; + c_re(inout[31 * iostride]) = tmp723 + tmp726; + } + { + fftw_real tmp1159; + fftw_real tmp1162; + fftw_real tmp1163; + fftw_real tmp1164; + ASSERT_ALIGNED_DOUBLE; + tmp1159 = tmp725 + tmp724; + tmp1162 = tmp1160 + tmp1161; + c_im(inout[15 * iostride]) = tmp1159 + tmp1162; + c_im(inout[47 * iostride]) = tmp1162 - tmp1159; + tmp1163 = tmp702 - tmp721; + tmp1164 = tmp1161 - tmp1160; + c_im(inout[31 * iostride]) = tmp1163 + tmp1164; + c_im(inout[63 * iostride]) = tmp1164 - tmp1163; + } + { + fftw_real tmp731; + fftw_real tmp738; + fftw_real tmp739; + fftw_real tmp742; + ASSERT_ALIGNED_DOUBLE; + tmp731 = tmp727 + tmp730; + tmp738 = tmp734 + tmp737; + c_re(inout[39 * iostride]) = tmp731 - tmp738; + c_re(inout[7 * iostride]) = tmp731 + tmp738; + tmp739 = tmp727 - tmp730; + tmp742 = tmp740 - tmp741; + c_re(inout[55 * iostride]) = tmp739 - tmp742; + c_re(inout[23 * iostride]) = tmp739 + tmp742; + } + { + fftw_real tmp1151; + fftw_real tmp1156; + fftw_real tmp1157; + fftw_real tmp1158; + ASSERT_ALIGNED_DOUBLE; + tmp1151 = tmp741 + tmp740; + tmp1156 = tmp1152 + tmp1155; + c_im(inout[7 * iostride]) = tmp1151 + tmp1156; + c_im(inout[39 * iostride]) = tmp1156 - tmp1151; + tmp1157 = tmp734 - tmp737; + tmp1158 = tmp1155 - tmp1152; + c_im(inout[23 * iostride]) = tmp1157 + tmp1158; + c_im(inout[55 * iostride]) = tmp1158 - tmp1157; + } + } + { + fftw_real tmp747; + fftw_real tmp775; + fftw_real tmp1141; + fftw_real tmp1147; + fftw_real tmp754; + fftw_real tmp1136; + fftw_real tmp778; + fftw_real tmp1146; + fftw_real tmp762; + fftw_real tmp773; + fftw_real tmp782; + fftw_real tmp789; + fftw_real tmp769; + fftw_real tmp772; + fftw_real tmp785; + fftw_real tmp788; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp743; + fftw_real tmp746; + fftw_real tmp1137; + fftw_real tmp1140; + ASSERT_ALIGNED_DOUBLE; + tmp743 = tmp655 + tmp658; + tmp746 = tmp744 + tmp745; + tmp747 = tmp743 - tmp746; + tmp775 = tmp743 + tmp746; + tmp1137 = tmp665 + tmp662; + tmp1140 = tmp1138 + tmp1139; + tmp1141 = tmp1137 + tmp1140; + tmp1147 = tmp1140 - tmp1137; + } + { + fftw_real tmp750; + fftw_real tmp777; + fftw_real tmp753; + fftw_real tmp776; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp748; + fftw_real tmp749; + fftw_real tmp751; + fftw_real tmp752; + ASSERT_ALIGNED_DOUBLE; + tmp748 = tmp668 + tmp669; + tmp749 = tmp671 + tmp672; + tmp750 = (K831469612 * tmp748) - (K555570233 * tmp749); + tmp777 = (K555570233 * tmp748) + (K831469612 * tmp749); + tmp751 = tmp675 + tmp676; + tmp752 = tmp678 + tmp679; + tmp753 = (K831469612 * tmp751) + (K555570233 * tmp752); + tmp776 = (K831469612 * tmp752) - (K555570233 * tmp751); + } + tmp754 = tmp750 - tmp753; + tmp1136 = tmp753 + tmp750; + tmp778 = tmp776 + tmp777; + tmp1146 = tmp776 - tmp777; + } + { + fftw_real tmp758; + fftw_real tmp780; + fftw_real tmp761; + fftw_real tmp781; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp756; + fftw_real tmp757; + fftw_real tmp759; + fftw_real tmp760; + ASSERT_ALIGNED_DOUBLE; + tmp756 = tmp714 + tmp715; + tmp757 = tmp711 + tmp708; + tmp758 = tmp756 - tmp757; + tmp780 = tmp756 + tmp757; + tmp759 = tmp703 + tmp704; + tmp760 = tmp717 + tmp718; + tmp761 = tmp759 - tmp760; + tmp781 = tmp759 + tmp760; + } + tmp762 = (K471396736 * tmp758) - (K881921264 * tmp761); + tmp773 = (K881921264 * tmp758) + (K471396736 * tmp761); + tmp782 = (K956940335 * tmp780) - (K290284677 * tmp781); + tmp789 = (K290284677 * tmp780) + (K956940335 * tmp781); + } + { + fftw_real tmp765; + fftw_real tmp783; + fftw_real tmp768; + fftw_real tmp784; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp763; + fftw_real tmp764; + fftw_real tmp766; + fftw_real tmp767; + ASSERT_ALIGNED_DOUBLE; + tmp763 = tmp695 + tmp696; + tmp764 = tmp692 + tmp689; + tmp765 = tmp763 - tmp764; + tmp783 = tmp763 + tmp764; + tmp766 = tmp684 + tmp685; + tmp767 = tmp698 + tmp699; + tmp768 = tmp766 - tmp767; + tmp784 = tmp766 + tmp767; + } + tmp769 = (K471396736 * tmp765) + (K881921264 * tmp768); + tmp772 = (K471396736 * tmp768) - (K881921264 * tmp765); + tmp785 = (K956940335 * tmp783) + (K290284677 * tmp784); + tmp788 = (K956940335 * tmp784) - (K290284677 * tmp783); + } + { + fftw_real tmp755; + fftw_real tmp770; + fftw_real tmp771; + fftw_real tmp774; + ASSERT_ALIGNED_DOUBLE; + tmp755 = tmp747 - tmp754; + tmp770 = tmp762 - tmp769; + c_re(inout[59 * iostride]) = tmp755 - tmp770; + c_re(inout[27 * iostride]) = tmp755 + tmp770; + tmp771 = tmp747 + tmp754; + tmp774 = tmp772 + tmp773; + c_re(inout[43 * iostride]) = tmp771 - tmp774; + c_re(inout[11 * iostride]) = tmp771 + tmp774; + } + { + fftw_real tmp1149; + fftw_real tmp1150; + fftw_real tmp1145; + fftw_real tmp1148; + ASSERT_ALIGNED_DOUBLE; + tmp1149 = tmp772 - tmp773; + tmp1150 = tmp1147 - tmp1146; + c_im(inout[27 * iostride]) = tmp1149 + tmp1150; + c_im(inout[59 * iostride]) = tmp1150 - tmp1149; + tmp1145 = tmp769 + tmp762; + tmp1148 = tmp1146 + tmp1147; + c_im(inout[11 * iostride]) = tmp1145 + tmp1148; + c_im(inout[43 * iostride]) = tmp1148 - tmp1145; + } + { + fftw_real tmp779; + fftw_real tmp786; + fftw_real tmp787; + fftw_real tmp790; + ASSERT_ALIGNED_DOUBLE; + tmp779 = tmp775 - tmp778; + tmp786 = tmp782 - tmp785; + c_re(inout[51 * iostride]) = tmp779 - tmp786; + c_re(inout[19 * iostride]) = tmp779 + tmp786; + tmp787 = tmp775 + tmp778; + tmp790 = tmp788 + tmp789; + c_re(inout[35 * iostride]) = tmp787 - tmp790; + c_re(inout[3 * iostride]) = tmp787 + tmp790; + } + { + fftw_real tmp1143; + fftw_real tmp1144; + fftw_real tmp1135; + fftw_real tmp1142; + ASSERT_ALIGNED_DOUBLE; + tmp1143 = tmp788 - tmp789; + tmp1144 = tmp1141 - tmp1136; + c_im(inout[19 * iostride]) = tmp1143 + tmp1144; + c_im(inout[51 * iostride]) = tmp1144 - tmp1143; + tmp1135 = tmp785 + tmp782; + tmp1142 = tmp1136 + tmp1141; + c_im(inout[3 * iostride]) = tmp1135 + tmp1142; + c_im(inout[35 * iostride]) = tmp1142 - tmp1135; + } + } + } +} + +static const int twiddle_order[] = +{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63}; +fftw_codelet_desc fftwi_twiddle_64_desc = +{ + "fftwi_twiddle_64", + (void (*)()) fftwi_twiddle_64, + 64, + FFTW_BACKWARD, + FFTW_TWIDDLE, + 1419, + 63, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/ftwi_7.c b/src/sndobj/rfftw/ftwi_7.c new file mode 100644 index 0000000..1162b4a --- /dev/null +++ b/src/sndobj/rfftw/ftwi_7.c @@ -0,0 +1,243 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:58 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddleinv 7 */ + +/* + * This function contains 72 FP additions, 60 FP multiplications, + * (or, 60 additions, 48 multiplications, 12 fused multiply/add), + * 24 stack variables, and 28 memory accesses + */ +static const fftw_real K222520933 = FFTW_KONST(+0.222520933956314404288902564496794759466355569); +static const fftw_real K900968867 = FFTW_KONST(+0.900968867902419126236102319507445051165919162); +static const fftw_real K623489801 = FFTW_KONST(+0.623489801858733530525004884004239810632274731); +static const fftw_real K433883739 = FFTW_KONST(+0.433883739117558120475768332848358754609990728); +static const fftw_real K974927912 = FFTW_KONST(+0.974927912181823607018131682993931217232785801); +static const fftw_real K781831482 = FFTW_KONST(+0.781831482468029808708444526674057750232334519); + +/* + * Generator Id's : + * $Id: ftwi_7.c,v 1.1.1.1 2006/05/12 15:15:01 veplaini Exp $ + * $Id: ftwi_7.c,v 1.1.1.1 2006/05/12 15:15:01 veplaini Exp $ + * $Id: ftwi_7.c,v 1.1.1.1 2006/05/12 15:15:01 veplaini Exp $ + */ + +void fftwi_twiddle_7(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_complex *inout; + inout = A; + for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 6) { + fftw_real tmp1; + fftw_real tmp53; + fftw_real tmp12; + fftw_real tmp54; + fftw_real tmp38; + fftw_real tmp50; + fftw_real tmp23; + fftw_real tmp55; + fftw_real tmp44; + fftw_real tmp51; + fftw_real tmp34; + fftw_real tmp56; + fftw_real tmp41; + fftw_real tmp52; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(inout[0]); + tmp53 = c_im(inout[0]); + { + fftw_real tmp6; + fftw_real tmp37; + fftw_real tmp11; + fftw_real tmp36; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp3; + fftw_real tmp5; + fftw_real tmp2; + fftw_real tmp4; + ASSERT_ALIGNED_DOUBLE; + tmp3 = c_re(inout[iostride]); + tmp5 = c_im(inout[iostride]); + tmp2 = c_re(W[0]); + tmp4 = c_im(W[0]); + tmp6 = (tmp2 * tmp3) + (tmp4 * tmp5); + tmp37 = (tmp2 * tmp5) - (tmp4 * tmp3); + } + { + fftw_real tmp8; + fftw_real tmp10; + fftw_real tmp7; + fftw_real tmp9; + ASSERT_ALIGNED_DOUBLE; + tmp8 = c_re(inout[6 * iostride]); + tmp10 = c_im(inout[6 * iostride]); + tmp7 = c_re(W[5]); + tmp9 = c_im(W[5]); + tmp11 = (tmp7 * tmp8) + (tmp9 * tmp10); + tmp36 = (tmp7 * tmp10) - (tmp9 * tmp8); + } + tmp12 = tmp6 + tmp11; + tmp54 = tmp6 - tmp11; + tmp38 = tmp36 - tmp37; + tmp50 = tmp37 + tmp36; + } + { + fftw_real tmp17; + fftw_real tmp43; + fftw_real tmp22; + fftw_real tmp42; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp14; + fftw_real tmp16; + fftw_real tmp13; + fftw_real tmp15; + ASSERT_ALIGNED_DOUBLE; + tmp14 = c_re(inout[2 * iostride]); + tmp16 = c_im(inout[2 * iostride]); + tmp13 = c_re(W[1]); + tmp15 = c_im(W[1]); + tmp17 = (tmp13 * tmp14) + (tmp15 * tmp16); + tmp43 = (tmp13 * tmp16) - (tmp15 * tmp14); + } + { + fftw_real tmp19; + fftw_real tmp21; + fftw_real tmp18; + fftw_real tmp20; + ASSERT_ALIGNED_DOUBLE; + tmp19 = c_re(inout[5 * iostride]); + tmp21 = c_im(inout[5 * iostride]); + tmp18 = c_re(W[4]); + tmp20 = c_im(W[4]); + tmp22 = (tmp18 * tmp19) + (tmp20 * tmp21); + tmp42 = (tmp18 * tmp21) - (tmp20 * tmp19); + } + tmp23 = tmp17 + tmp22; + tmp55 = tmp17 - tmp22; + tmp44 = tmp42 - tmp43; + tmp51 = tmp43 + tmp42; + } + { + fftw_real tmp28; + fftw_real tmp40; + fftw_real tmp33; + fftw_real tmp39; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp25; + fftw_real tmp27; + fftw_real tmp24; + fftw_real tmp26; + ASSERT_ALIGNED_DOUBLE; + tmp25 = c_re(inout[3 * iostride]); + tmp27 = c_im(inout[3 * iostride]); + tmp24 = c_re(W[2]); + tmp26 = c_im(W[2]); + tmp28 = (tmp24 * tmp25) + (tmp26 * tmp27); + tmp40 = (tmp24 * tmp27) - (tmp26 * tmp25); + } + { + fftw_real tmp30; + fftw_real tmp32; + fftw_real tmp29; + fftw_real tmp31; + ASSERT_ALIGNED_DOUBLE; + tmp30 = c_re(inout[4 * iostride]); + tmp32 = c_im(inout[4 * iostride]); + tmp29 = c_re(W[3]); + tmp31 = c_im(W[3]); + tmp33 = (tmp29 * tmp30) + (tmp31 * tmp32); + tmp39 = (tmp29 * tmp32) - (tmp31 * tmp30); + } + tmp34 = tmp28 + tmp33; + tmp56 = tmp28 - tmp33; + tmp41 = tmp39 - tmp40; + tmp52 = tmp40 + tmp39; + } + { + fftw_real tmp47; + fftw_real tmp46; + fftw_real tmp59; + fftw_real tmp60; + ASSERT_ALIGNED_DOUBLE; + c_re(inout[0]) = tmp1 + tmp12 + tmp23 + tmp34; + tmp47 = (K781831482 * tmp38) + (K974927912 * tmp44) + (K433883739 * tmp41); + tmp46 = tmp1 + (K623489801 * tmp12) - (K900968867 * tmp34) - (K222520933 * tmp23); + c_re(inout[6 * iostride]) = tmp46 - tmp47; + c_re(inout[iostride]) = tmp46 + tmp47; + { + fftw_real tmp49; + fftw_real tmp48; + fftw_real tmp45; + fftw_real tmp35; + ASSERT_ALIGNED_DOUBLE; + tmp49 = (K433883739 * tmp38) + (K974927912 * tmp41) - (K781831482 * tmp44); + tmp48 = tmp1 + (K623489801 * tmp23) - (K222520933 * tmp34) - (K900968867 * tmp12); + c_re(inout[4 * iostride]) = tmp48 - tmp49; + c_re(inout[3 * iostride]) = tmp48 + tmp49; + tmp45 = (K974927912 * tmp38) - (K781831482 * tmp41) - (K433883739 * tmp44); + tmp35 = tmp1 + (K623489801 * tmp34) - (K900968867 * tmp23) - (K222520933 * tmp12); + c_re(inout[5 * iostride]) = tmp35 - tmp45; + c_re(inout[2 * iostride]) = tmp35 + tmp45; + } + c_im(inout[0]) = tmp50 + tmp51 + tmp52 + tmp53; + tmp59 = (K974927912 * tmp54) - (K781831482 * tmp56) - (K433883739 * tmp55); + tmp60 = (K623489801 * tmp52) + tmp53 - (K900968867 * tmp51) - (K222520933 * tmp50); + c_im(inout[2 * iostride]) = tmp59 + tmp60; + c_im(inout[5 * iostride]) = tmp60 - tmp59; + { + fftw_real tmp61; + fftw_real tmp62; + fftw_real tmp57; + fftw_real tmp58; + ASSERT_ALIGNED_DOUBLE; + tmp61 = (K433883739 * tmp54) + (K974927912 * tmp56) - (K781831482 * tmp55); + tmp62 = (K623489801 * tmp51) + tmp53 - (K222520933 * tmp52) - (K900968867 * tmp50); + c_im(inout[3 * iostride]) = tmp61 + tmp62; + c_im(inout[4 * iostride]) = tmp62 - tmp61; + tmp57 = (K781831482 * tmp54) + (K974927912 * tmp55) + (K433883739 * tmp56); + tmp58 = (K623489801 * tmp50) + tmp53 - (K900968867 * tmp52) - (K222520933 * tmp51); + c_im(inout[iostride]) = tmp57 + tmp58; + c_im(inout[6 * iostride]) = tmp58 - tmp57; + } + } + } +} + +static const int twiddle_order[] = +{1, 2, 3, 4, 5, 6}; +fftw_codelet_desc fftwi_twiddle_7_desc = +{ + "fftwi_twiddle_7", + (void (*)()) fftwi_twiddle_7, + 7, + FFTW_BACKWARD, + FFTW_TWIDDLE, + 165, + 6, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/ftwi_8.c b/src/sndobj/rfftw/ftwi_8.c new file mode 100644 index 0000000..a8fd4b8 --- /dev/null +++ b/src/sndobj/rfftw/ftwi_8.c @@ -0,0 +1,285 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:58 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddleinv 8 */ + +/* + * This function contains 66 FP additions, 32 FP multiplications, + * (or, 52 additions, 18 multiplications, 14 fused multiply/add), + * 28 stack variables, and 32 memory accesses + */ +static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); + +/* + * Generator Id's : + * $Id: ftwi_8.c,v 1.1.1.1 2006/05/12 15:14:50 veplaini Exp $ + * $Id: ftwi_8.c,v 1.1.1.1 2006/05/12 15:14:50 veplaini Exp $ + * $Id: ftwi_8.c,v 1.1.1.1 2006/05/12 15:14:50 veplaini Exp $ + */ + +void fftwi_twiddle_8(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_complex *inout; + inout = A; + for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 7) { + fftw_real tmp7; + fftw_real tmp43; + fftw_real tmp71; + fftw_real tmp77; + fftw_real tmp41; + fftw_real tmp53; + fftw_real tmp56; + fftw_real tmp64; + fftw_real tmp18; + fftw_real tmp76; + fftw_real tmp46; + fftw_real tmp68; + fftw_real tmp30; + fftw_real tmp48; + fftw_real tmp51; + fftw_real tmp65; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp1; + fftw_real tmp70; + fftw_real tmp6; + fftw_real tmp69; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(inout[0]); + tmp70 = c_im(inout[0]); + { + fftw_real tmp3; + fftw_real tmp5; + fftw_real tmp2; + fftw_real tmp4; + ASSERT_ALIGNED_DOUBLE; + tmp3 = c_re(inout[4 * iostride]); + tmp5 = c_im(inout[4 * iostride]); + tmp2 = c_re(W[3]); + tmp4 = c_im(W[3]); + tmp6 = (tmp2 * tmp3) + (tmp4 * tmp5); + tmp69 = (tmp2 * tmp5) - (tmp4 * tmp3); + } + tmp7 = tmp1 + tmp6; + tmp43 = tmp1 - tmp6; + tmp71 = tmp69 + tmp70; + tmp77 = tmp70 - tmp69; + } + { + fftw_real tmp35; + fftw_real tmp54; + fftw_real tmp40; + fftw_real tmp55; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp32; + fftw_real tmp34; + fftw_real tmp31; + fftw_real tmp33; + ASSERT_ALIGNED_DOUBLE; + tmp32 = c_re(inout[7 * iostride]); + tmp34 = c_im(inout[7 * iostride]); + tmp31 = c_re(W[6]); + tmp33 = c_im(W[6]); + tmp35 = (tmp31 * tmp32) + (tmp33 * tmp34); + tmp54 = (tmp31 * tmp34) - (tmp33 * tmp32); + } + { + fftw_real tmp37; + fftw_real tmp39; + fftw_real tmp36; + fftw_real tmp38; + ASSERT_ALIGNED_DOUBLE; + tmp37 = c_re(inout[3 * iostride]); + tmp39 = c_im(inout[3 * iostride]); + tmp36 = c_re(W[2]); + tmp38 = c_im(W[2]); + tmp40 = (tmp36 * tmp37) + (tmp38 * tmp39); + tmp55 = (tmp36 * tmp39) - (tmp38 * tmp37); + } + tmp41 = tmp35 + tmp40; + tmp53 = tmp35 - tmp40; + tmp56 = tmp54 - tmp55; + tmp64 = tmp54 + tmp55; + } + { + fftw_real tmp12; + fftw_real tmp44; + fftw_real tmp17; + fftw_real tmp45; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp9; + fftw_real tmp11; + fftw_real tmp8; + fftw_real tmp10; + ASSERT_ALIGNED_DOUBLE; + tmp9 = c_re(inout[2 * iostride]); + tmp11 = c_im(inout[2 * iostride]); + tmp8 = c_re(W[1]); + tmp10 = c_im(W[1]); + tmp12 = (tmp8 * tmp9) + (tmp10 * tmp11); + tmp44 = (tmp8 * tmp11) - (tmp10 * tmp9); + } + { + fftw_real tmp14; + fftw_real tmp16; + fftw_real tmp13; + fftw_real tmp15; + ASSERT_ALIGNED_DOUBLE; + tmp14 = c_re(inout[6 * iostride]); + tmp16 = c_im(inout[6 * iostride]); + tmp13 = c_re(W[5]); + tmp15 = c_im(W[5]); + tmp17 = (tmp13 * tmp14) + (tmp15 * tmp16); + tmp45 = (tmp13 * tmp16) - (tmp15 * tmp14); + } + tmp18 = tmp12 + tmp17; + tmp76 = tmp12 - tmp17; + tmp46 = tmp44 - tmp45; + tmp68 = tmp44 + tmp45; + } + { + fftw_real tmp24; + fftw_real tmp49; + fftw_real tmp29; + fftw_real tmp50; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp21; + fftw_real tmp23; + fftw_real tmp20; + fftw_real tmp22; + ASSERT_ALIGNED_DOUBLE; + tmp21 = c_re(inout[iostride]); + tmp23 = c_im(inout[iostride]); + tmp20 = c_re(W[0]); + tmp22 = c_im(W[0]); + tmp24 = (tmp20 * tmp21) + (tmp22 * tmp23); + tmp49 = (tmp20 * tmp23) - (tmp22 * tmp21); + } + { + fftw_real tmp26; + fftw_real tmp28; + fftw_real tmp25; + fftw_real tmp27; + ASSERT_ALIGNED_DOUBLE; + tmp26 = c_re(inout[5 * iostride]); + tmp28 = c_im(inout[5 * iostride]); + tmp25 = c_re(W[4]); + tmp27 = c_im(W[4]); + tmp29 = (tmp25 * tmp26) + (tmp27 * tmp28); + tmp50 = (tmp25 * tmp28) - (tmp27 * tmp26); + } + tmp30 = tmp24 + tmp29; + tmp48 = tmp24 - tmp29; + tmp51 = tmp49 - tmp50; + tmp65 = tmp49 + tmp50; + } + { + fftw_real tmp19; + fftw_real tmp42; + fftw_real tmp63; + fftw_real tmp66; + ASSERT_ALIGNED_DOUBLE; + tmp19 = tmp7 + tmp18; + tmp42 = tmp30 + tmp41; + c_re(inout[4 * iostride]) = tmp19 - tmp42; + c_re(inout[0]) = tmp19 + tmp42; + { + fftw_real tmp73; + fftw_real tmp74; + fftw_real tmp67; + fftw_real tmp72; + ASSERT_ALIGNED_DOUBLE; + tmp73 = tmp30 - tmp41; + tmp74 = tmp71 - tmp68; + c_im(inout[2 * iostride]) = tmp73 + tmp74; + c_im(inout[6 * iostride]) = tmp74 - tmp73; + tmp67 = tmp65 + tmp64; + tmp72 = tmp68 + tmp71; + c_im(inout[0]) = tmp67 + tmp72; + c_im(inout[4 * iostride]) = tmp72 - tmp67; + } + tmp63 = tmp7 - tmp18; + tmp66 = tmp64 - tmp65; + c_re(inout[6 * iostride]) = tmp63 - tmp66; + c_re(inout[2 * iostride]) = tmp63 + tmp66; + { + fftw_real tmp59; + fftw_real tmp78; + fftw_real tmp62; + fftw_real tmp75; + fftw_real tmp60; + fftw_real tmp61; + ASSERT_ALIGNED_DOUBLE; + tmp59 = tmp43 + tmp46; + tmp78 = tmp76 + tmp77; + tmp60 = tmp56 - tmp53; + tmp61 = tmp48 + tmp51; + tmp62 = K707106781 * (tmp60 - tmp61); + tmp75 = K707106781 * (tmp61 + tmp60); + c_re(inout[7 * iostride]) = tmp59 - tmp62; + c_re(inout[3 * iostride]) = tmp59 + tmp62; + c_im(inout[iostride]) = tmp75 + tmp78; + c_im(inout[5 * iostride]) = tmp78 - tmp75; + } + { + fftw_real tmp47; + fftw_real tmp80; + fftw_real tmp58; + fftw_real tmp79; + fftw_real tmp52; + fftw_real tmp57; + ASSERT_ALIGNED_DOUBLE; + tmp47 = tmp43 - tmp46; + tmp80 = tmp77 - tmp76; + tmp52 = tmp48 - tmp51; + tmp57 = tmp53 + tmp56; + tmp58 = K707106781 * (tmp52 + tmp57); + tmp79 = K707106781 * (tmp52 - tmp57); + c_re(inout[5 * iostride]) = tmp47 - tmp58; + c_re(inout[iostride]) = tmp47 + tmp58; + c_im(inout[3 * iostride]) = tmp79 + tmp80; + c_im(inout[7 * iostride]) = tmp80 - tmp79; + } + } + } +} + +static const int twiddle_order[] = +{1, 2, 3, 4, 5, 6, 7}; +fftw_codelet_desc fftwi_twiddle_8_desc = +{ + "fftwi_twiddle_8", + (void (*)()) fftwi_twiddle_8, + 8, + FFTW_BACKWARD, + FFTW_TWIDDLE, + 187, + 7, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/ftwi_9.c b/src/sndobj/rfftw/ftwi_9.c new file mode 100644 index 0000000..efdb9a4 --- /dev/null +++ b/src/sndobj/rfftw/ftwi_9.c @@ -0,0 +1,370 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* This file was automatically generated --- DO NOT EDIT */ +/* Generated on Sun Nov 7 20:44:59 EST 1999 */ + +#include +#include + +/* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddleinv 9 */ + +/* + * This function contains 96 FP additions, 72 FP multiplications, + * (or, 60 additions, 36 multiplications, 36 fused multiply/add), + * 34 stack variables, and 36 memory accesses + */ +static const fftw_real K642787609 = FFTW_KONST(+0.642787609686539326322643409907263432907559884); +static const fftw_real K766044443 = FFTW_KONST(+0.766044443118978035202392650555416673935832457); +static const fftw_real K939692620 = FFTW_KONST(+0.939692620785908384054109277324731469936208134); +static const fftw_real K342020143 = FFTW_KONST(+0.342020143325668733044099614682259580763083368); +static const fftw_real K984807753 = FFTW_KONST(+0.984807753012208059366743024589523013670643252); +static const fftw_real K173648177 = FFTW_KONST(+0.173648177666930348851716626769314796000375677); +static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); +static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); + +/* + * Generator Id's : + * $Id: ftwi_9.c,v 1.1.1.1 2006/05/12 15:14:49 veplaini Exp $ + * $Id: ftwi_9.c,v 1.1.1.1 2006/05/12 15:14:49 veplaini Exp $ + * $Id: ftwi_9.c,v 1.1.1.1 2006/05/12 15:14:49 veplaini Exp $ + */ + +void fftwi_twiddle_9(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) +{ + int i; + fftw_complex *inout; + inout = A; + for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 8) { + fftw_real tmp1; + fftw_real tmp99; + fftw_real tmp64; + fftw_real tmp98; + fftw_real tmp105; + fftw_real tmp104; + fftw_real tmp12; + fftw_real tmp61; + fftw_real tmp47; + fftw_real tmp78; + fftw_real tmp89; + fftw_real tmp54; + fftw_real tmp75; + fftw_real tmp90; + fftw_real tmp30; + fftw_real tmp68; + fftw_real tmp86; + fftw_real tmp59; + fftw_real tmp71; + fftw_real tmp87; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp6; + fftw_real tmp63; + fftw_real tmp11; + fftw_real tmp62; + ASSERT_ALIGNED_DOUBLE; + tmp1 = c_re(inout[0]); + tmp99 = c_im(inout[0]); + { + fftw_real tmp3; + fftw_real tmp5; + fftw_real tmp2; + fftw_real tmp4; + ASSERT_ALIGNED_DOUBLE; + tmp3 = c_re(inout[3 * iostride]); + tmp5 = c_im(inout[3 * iostride]); + tmp2 = c_re(W[2]); + tmp4 = c_im(W[2]); + tmp6 = (tmp2 * tmp3) + (tmp4 * tmp5); + tmp63 = (tmp2 * tmp5) - (tmp4 * tmp3); + } + { + fftw_real tmp8; + fftw_real tmp10; + fftw_real tmp7; + fftw_real tmp9; + ASSERT_ALIGNED_DOUBLE; + tmp8 = c_re(inout[6 * iostride]); + tmp10 = c_im(inout[6 * iostride]); + tmp7 = c_re(W[5]); + tmp9 = c_im(W[5]); + tmp11 = (tmp7 * tmp8) + (tmp9 * tmp10); + tmp62 = (tmp7 * tmp10) - (tmp9 * tmp8); + } + tmp64 = K866025403 * (tmp62 - tmp63); + tmp98 = tmp63 + tmp62; + tmp105 = tmp99 - (K500000000 * tmp98); + tmp104 = K866025403 * (tmp6 - tmp11); + tmp12 = tmp6 + tmp11; + tmp61 = tmp1 - (K500000000 * tmp12); + } + { + fftw_real tmp35; + fftw_real tmp50; + fftw_real tmp40; + fftw_real tmp51; + fftw_real tmp45; + fftw_real tmp52; + fftw_real tmp46; + fftw_real tmp53; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp32; + fftw_real tmp34; + fftw_real tmp31; + fftw_real tmp33; + ASSERT_ALIGNED_DOUBLE; + tmp32 = c_re(inout[2 * iostride]); + tmp34 = c_im(inout[2 * iostride]); + tmp31 = c_re(W[1]); + tmp33 = c_im(W[1]); + tmp35 = (tmp31 * tmp32) + (tmp33 * tmp34); + tmp50 = (tmp31 * tmp34) - (tmp33 * tmp32); + } + { + fftw_real tmp37; + fftw_real tmp39; + fftw_real tmp36; + fftw_real tmp38; + ASSERT_ALIGNED_DOUBLE; + tmp37 = c_re(inout[5 * iostride]); + tmp39 = c_im(inout[5 * iostride]); + tmp36 = c_re(W[4]); + tmp38 = c_im(W[4]); + tmp40 = (tmp36 * tmp37) + (tmp38 * tmp39); + tmp51 = (tmp36 * tmp39) - (tmp38 * tmp37); + } + { + fftw_real tmp42; + fftw_real tmp44; + fftw_real tmp41; + fftw_real tmp43; + ASSERT_ALIGNED_DOUBLE; + tmp42 = c_re(inout[8 * iostride]); + tmp44 = c_im(inout[8 * iostride]); + tmp41 = c_re(W[7]); + tmp43 = c_im(W[7]); + tmp45 = (tmp41 * tmp42) + (tmp43 * tmp44); + tmp52 = (tmp41 * tmp44) - (tmp43 * tmp42); + } + tmp46 = tmp40 + tmp45; + tmp53 = tmp51 + tmp52; + { + fftw_real tmp76; + fftw_real tmp77; + fftw_real tmp73; + fftw_real tmp74; + ASSERT_ALIGNED_DOUBLE; + tmp47 = tmp35 + tmp46; + tmp76 = tmp35 - (K500000000 * tmp46); + tmp77 = K866025403 * (tmp52 - tmp51); + tmp78 = tmp76 - tmp77; + tmp89 = tmp76 + tmp77; + tmp54 = tmp50 + tmp53; + tmp73 = tmp50 - (K500000000 * tmp53); + tmp74 = K866025403 * (tmp40 - tmp45); + tmp75 = tmp73 - tmp74; + tmp90 = tmp74 + tmp73; + } + } + { + fftw_real tmp18; + fftw_real tmp55; + fftw_real tmp23; + fftw_real tmp56; + fftw_real tmp28; + fftw_real tmp57; + fftw_real tmp29; + fftw_real tmp58; + ASSERT_ALIGNED_DOUBLE; + { + fftw_real tmp15; + fftw_real tmp17; + fftw_real tmp14; + fftw_real tmp16; + ASSERT_ALIGNED_DOUBLE; + tmp15 = c_re(inout[iostride]); + tmp17 = c_im(inout[iostride]); + tmp14 = c_re(W[0]); + tmp16 = c_im(W[0]); + tmp18 = (tmp14 * tmp15) + (tmp16 * tmp17); + tmp55 = (tmp14 * tmp17) - (tmp16 * tmp15); + } + { + fftw_real tmp20; + fftw_real tmp22; + fftw_real tmp19; + fftw_real tmp21; + ASSERT_ALIGNED_DOUBLE; + tmp20 = c_re(inout[4 * iostride]); + tmp22 = c_im(inout[4 * iostride]); + tmp19 = c_re(W[3]); + tmp21 = c_im(W[3]); + tmp23 = (tmp19 * tmp20) + (tmp21 * tmp22); + tmp56 = (tmp19 * tmp22) - (tmp21 * tmp20); + } + { + fftw_real tmp25; + fftw_real tmp27; + fftw_real tmp24; + fftw_real tmp26; + ASSERT_ALIGNED_DOUBLE; + tmp25 = c_re(inout[7 * iostride]); + tmp27 = c_im(inout[7 * iostride]); + tmp24 = c_re(W[6]); + tmp26 = c_im(W[6]); + tmp28 = (tmp24 * tmp25) + (tmp26 * tmp27); + tmp57 = (tmp24 * tmp27) - (tmp26 * tmp25); + } + tmp29 = tmp23 + tmp28; + tmp58 = tmp56 + tmp57; + { + fftw_real tmp66; + fftw_real tmp67; + fftw_real tmp69; + fftw_real tmp70; + ASSERT_ALIGNED_DOUBLE; + tmp30 = tmp18 + tmp29; + tmp66 = tmp18 - (K500000000 * tmp29); + tmp67 = K866025403 * (tmp57 - tmp56); + tmp68 = tmp66 - tmp67; + tmp86 = tmp66 + tmp67; + tmp59 = tmp55 + tmp58; + tmp69 = tmp55 - (K500000000 * tmp58); + tmp70 = K866025403 * (tmp23 - tmp28); + tmp71 = tmp69 - tmp70; + tmp87 = tmp70 + tmp69; + } + } + { + fftw_real tmp60; + fftw_real tmp13; + fftw_real tmp48; + fftw_real tmp49; + ASSERT_ALIGNED_DOUBLE; + tmp60 = K866025403 * (tmp54 - tmp59); + tmp13 = tmp1 + tmp12; + tmp48 = tmp30 + tmp47; + tmp49 = tmp13 - (K500000000 * tmp48); + c_re(inout[0]) = tmp13 + tmp48; + c_re(inout[3 * iostride]) = tmp49 + tmp60; + c_re(inout[6 * iostride]) = tmp49 - tmp60; + } + { + fftw_real tmp101; + fftw_real tmp97; + fftw_real tmp100; + fftw_real tmp102; + ASSERT_ALIGNED_DOUBLE; + tmp101 = K866025403 * (tmp30 - tmp47); + tmp97 = tmp59 + tmp54; + tmp100 = tmp98 + tmp99; + tmp102 = tmp100 - (K500000000 * tmp97); + c_im(inout[0]) = tmp97 + tmp100; + c_im(inout[6 * iostride]) = tmp102 - tmp101; + c_im(inout[3 * iostride]) = tmp101 + tmp102; + } + { + fftw_real tmp65; + fftw_real tmp110; + fftw_real tmp80; + fftw_real tmp111; + fftw_real tmp84; + fftw_real tmp109; + fftw_real tmp81; + fftw_real tmp112; + ASSERT_ALIGNED_DOUBLE; + tmp65 = tmp61 - tmp64; + tmp110 = tmp105 - tmp104; + { + fftw_real tmp72; + fftw_real tmp79; + fftw_real tmp82; + fftw_real tmp83; + ASSERT_ALIGNED_DOUBLE; + tmp72 = (K173648177 * tmp68) - (K984807753 * tmp71); + tmp79 = (K342020143 * tmp75) + (K939692620 * tmp78); + tmp80 = tmp72 - tmp79; + tmp111 = K866025403 * (tmp72 + tmp79); + tmp82 = (K342020143 * tmp78) - (K939692620 * tmp75); + tmp83 = (K173648177 * tmp71) + (K984807753 * tmp68); + tmp84 = K866025403 * (tmp82 - tmp83); + tmp109 = tmp83 + tmp82; + } + c_re(inout[2 * iostride]) = tmp65 + tmp80; + tmp81 = tmp65 - (K500000000 * tmp80); + c_re(inout[8 * iostride]) = tmp81 - tmp84; + c_re(inout[5 * iostride]) = tmp81 + tmp84; + c_im(inout[2 * iostride]) = tmp109 + tmp110; + tmp112 = tmp110 - (K500000000 * tmp109); + c_im(inout[5 * iostride]) = tmp111 + tmp112; + c_im(inout[8 * iostride]) = tmp112 - tmp111; + } + { + fftw_real tmp85; + fftw_real tmp106; + fftw_real tmp92; + fftw_real tmp107; + fftw_real tmp96; + fftw_real tmp103; + fftw_real tmp93; + fftw_real tmp108; + ASSERT_ALIGNED_DOUBLE; + tmp85 = tmp61 + tmp64; + tmp106 = tmp104 + tmp105; + { + fftw_real tmp88; + fftw_real tmp91; + fftw_real tmp94; + fftw_real tmp95; + ASSERT_ALIGNED_DOUBLE; + tmp88 = (K766044443 * tmp86) - (K642787609 * tmp87); + tmp91 = (K173648177 * tmp89) - (K984807753 * tmp90); + tmp92 = tmp88 + tmp91; + tmp107 = K866025403 * (tmp88 - tmp91); + tmp94 = (K173648177 * tmp90) + (K984807753 * tmp89); + tmp95 = (K766044443 * tmp87) + (K642787609 * tmp86); + tmp96 = K866025403 * (tmp94 - tmp95); + tmp103 = tmp95 + tmp94; + } + c_re(inout[iostride]) = tmp85 + tmp92; + tmp93 = tmp85 - (K500000000 * tmp92); + c_re(inout[7 * iostride]) = tmp93 - tmp96; + c_re(inout[4 * iostride]) = tmp93 + tmp96; + c_im(inout[iostride]) = tmp103 + tmp106; + tmp108 = tmp106 - (K500000000 * tmp103); + c_im(inout[4 * iostride]) = tmp107 + tmp108; + c_im(inout[7 * iostride]) = tmp108 - tmp107; + } + } +} + +static const int twiddle_order[] = +{1, 2, 3, 4, 5, 6, 7, 8}; +fftw_codelet_desc fftwi_twiddle_9_desc = +{ + "fftwi_twiddle_9", + (void (*)()) fftwi_twiddle_9, + 9, + FFTW_BACKWARD, + FFTW_TWIDDLE, + 209, + 8, + twiddle_order, +}; diff --git a/src/sndobj/rfftw/generic.c b/src/sndobj/rfftw/generic.c new file mode 100644 index 0000000..e0a2435 --- /dev/null +++ b/src/sndobj/rfftw/generic.c @@ -0,0 +1,102 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* + * + * generic.c -- "generic" codelets. They work for all n (and they are + * slow) + */ +#include +#include + +void fftw_twiddle_generic(fftw_complex *A, const fftw_complex *W, + int m, int r, int n, int stride) +{ + int i, j, k; + const fftw_complex *jp; + fftw_complex *kp; + fftw_complex *tmp = (fftw_complex *) + fftw_malloc(r * sizeof(fftw_complex)); + + for (i = 0; i < m; ++i) { + for (k = 0, kp = tmp; k < r; ++k, kp++) { + fftw_real r0, i0, rt, it, rw, iw; + int l1 = i + m * k; + int l0; + + r0 = i0 = 0.0; + for (j = 0, jp = A + i * stride, l0 = 0; j < r; ++j, + jp += m * stride) { + rw = c_re(W[l0]); + iw = c_im(W[l0]); + rt = c_re(*jp); + it = c_im(*jp); + r0 += rt * rw - it * iw; + i0 += rt * iw + it * rw; + l0 += l1; + if (l0 >= n) + l0 -= n; + } + c_re(*kp) = r0; + c_im(*kp) = i0; + } + for (k = 0, kp = A + i * stride; k < r; ++k, kp += m * stride) + *kp = tmp[k]; + } + + fftw_free(tmp); +} + +void fftwi_twiddle_generic(fftw_complex *A, const fftw_complex *W, + int m, int r, int n, int stride) +{ + int i, j, k; + const fftw_complex *jp; + fftw_complex *kp; + fftw_complex *tmp = (fftw_complex *) + fftw_malloc(r * sizeof(fftw_complex)); + + for (i = 0; i < m; ++i) { + for (k = 0, kp = tmp; k < r; ++k, kp++) { + fftw_real r0, i0, rt, it, rw, iw; + int l1 = i + m * k; + int l0; + + r0 = i0 = 0.0; + for (j = 0, jp = A + i * stride, l0 = 0; j < r; ++j, + jp += m * stride) { + rw = c_re(W[l0]); + iw = c_im(W[l0]); + rt = c_re(*jp); + it = c_im(*jp); + r0 += rt * rw + it * iw; + i0 += it * rw - rt * iw; + l0 += l1; + if (l0 >= n) + l0 -= n; + } + c_re(*kp) = r0; + c_im(*kp) = i0; + } + for (k = 0, kp = A + i * stride; k < r; ++k, kp += m * stride) + *kp = tmp[k]; + } + + fftw_free(tmp); +} diff --git a/src/sndobj/rfftw/malloc.c b/src/sndobj/rfftw/malloc.c new file mode 100644 index 0000000..0c2f8fc --- /dev/null +++ b/src/sndobj/rfftw/malloc.c @@ -0,0 +1,245 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* + * malloc.c -- memory allocation related functions + */ + +/* $Id: malloc.c,v 1.1.1.1 2006/05/12 15:14:55 veplaini Exp $ */ +#ifdef FFTW_USING_CILK +#include +#include +#endif + +#include +#include +#include + +#ifdef HAVE_MALLOC_H +#include +#endif + +fftw_malloc_type_function fftw_malloc_hook = 0; +fftw_free_type_function fftw_free_hook = 0; +fftw_die_type_function fftw_die_hook = 0; + +/********************************************************** + * DEBUGGING CODE + **********************************************************/ +#ifdef FFTW_DEBUG +static int fftw_malloc_cnt = 0; + +/* + * debugging malloc/free. Initialize every malloced and freed area to + * random values, just to make sure we are not using uninitialized + * pointers. Also check for writes past the ends of allocated blocks, + * and a couple of other things. + * + * This code is a quick and dirty hack -- use at your own risk. + */ + +static int fftw_malloc_total = 0, fftw_malloc_max = 0, fftw_malloc_cnt_max = 0; + +#define MAGIC 0xABadCafe +#define PAD_FACTOR 2 +#define TWOINTS (2 * sizeof(int)) + +#define VERBOSE_ALLOCATION 0 + +#if VERBOSE_ALLOCATION +#define WHEN_VERBOSE(a) a +#else +#define WHEN_VERBOSE(a) +#endif + +void *fftw_malloc(size_t n) +{ + char *p; + int i; + + fftw_malloc_total += n; + + if (fftw_malloc_total > fftw_malloc_max) + fftw_malloc_max = fftw_malloc_total; + + p = (char *) malloc(PAD_FACTOR * n + TWOINTS); + if (!p) + fftw_die("fftw_malloc: out of memory\n"); + + /* store the size in a known position */ + ((int *) p)[0] = n; + ((int *) p)[1] = MAGIC; + for (i = 0; i < PAD_FACTOR * n; ++i) + p[i + TWOINTS] = (char) (i ^ 0xDEADBEEF); + + ++fftw_malloc_cnt; + + if (fftw_malloc_cnt > fftw_malloc_cnt_max) + fftw_malloc_cnt_max = fftw_malloc_cnt; + + /* skip the size we stored previously */ + return (void *) (p + TWOINTS); +} + +void fftw_free(void *p) +{ + char *q; + + if (!p) + return; + + q = ((char *) p) - TWOINTS; + if (!q) + fftw_die("fftw_free: tried to free NULL+TWOINTS pointer!\n"); + + { + int n = ((int *) q)[0]; + int magic = ((int *) q)[1]; + int i; + + WHEN_VERBOSE( { + printf("FFTW_FREE %d\n", n); + fflush(stdout); + }) + + *((int *) q) = 0; /* set to zero to detect duplicate free's */ + + if (magic != MAGIC) + fftw_die("Wrong magic in fftw_free()!\n"); + ((int *) q)[1] = ~MAGIC; + + if (n < 0) + fftw_die("Tried to free block with corrupt size descriptor!\n"); + + fftw_malloc_total -= n; + + if (fftw_malloc_total < 0) + fftw_die("fftw_malloc_total went negative!\n"); + + /* check for writing past end of array: */ + for (i = n; i < PAD_FACTOR * n; ++i) + if (q[i + TWOINTS] != (char) (i ^ 0xDEADBEEF)) { + fflush(stdout); + fprintf(stderr, "Byte %d past end of array has changed!\n", + i - n + 1); + fftw_die("Array bounds overwritten!\n"); + } + for (i = 0; i < PAD_FACTOR * n; ++i) + q[i + TWOINTS] = (char) (i ^ 0xBEEFDEAD); + + --fftw_malloc_cnt; + + if (fftw_malloc_cnt < 0) + fftw_die("fftw_malloc_cnt went negative!\n"); + + if (fftw_malloc_cnt == 0 && fftw_malloc_total > 0 || + fftw_malloc_cnt > 0 && fftw_malloc_total == 0) + fftw_die("fftw_malloc_cnt/total not zero at the same time!\n"); + + free(q); + } +} + +#else +/********************************************************** + * NON DEBUGGING CODE + **********************************************************/ +/* production version, no hacks */ + +void *fftw_malloc(size_t n) +{ + void *p; + + if (fftw_malloc_hook) + return fftw_malloc_hook(n); + + if (n == 0) + n = 1; + + p = malloc(n); + + if (!p) + fftw_die("fftw_malloc: out of memory\n"); + + return p; +} + +void fftw_free(void *p) +{ + if (p) { + if (fftw_free_hook) { + fftw_free_hook(p); + return; + } + free(p); + } +} + +#endif + +/* die when fatal errors occur */ +void fftw_die(const char *s) +{ + if (fftw_die_hook) + fftw_die_hook(s); + + fflush(stdout); + fprintf(stderr, "fftw: %s", s); + exit(EXIT_FAILURE); +} + +/* check for memory leaks when debugging */ +void fftw_check_memory_leaks(void) +{ + extern int fftw_node_cnt, fftw_plan_cnt, fftw_twiddle_size; + +#ifdef FFTW_DEBUG + if (fftw_malloc_cnt || fftw_malloc_total || + fftw_node_cnt || fftw_plan_cnt || fftw_twiddle_size) { + fflush(stdout); + fprintf(stderr, + "MEMORY LEAK!!!\n" + "fftw_malloc = %d" + " node=%d plan=%d twiddle=%d\n" + "fftw_malloc_total = %d\n", + fftw_malloc_cnt, + fftw_node_cnt, fftw_plan_cnt, fftw_twiddle_size, + fftw_malloc_total); + exit(EXIT_FAILURE); + } +#else + if (fftw_node_cnt || fftw_plan_cnt || fftw_twiddle_size) { + fflush(stdout); + fprintf(stderr, + "MEMORY LEAK!!!\n" + " node=%d plan=%d twiddle=%d\n", + fftw_node_cnt, fftw_plan_cnt, fftw_twiddle_size); + exit(EXIT_FAILURE); + } +#endif +} + +void fftw_print_max_memory_usage(void) +{ +#ifdef FFTW_DEBUG + printf("\nMaximum number of blocks allocated = %d\n" + "Maximum number of bytes allocated = %0.3f kB\n", + fftw_malloc_cnt_max, fftw_malloc_max / 1024.0); +#endif +} diff --git a/src/sndobj/rfftw/planner.c b/src/sndobj/rfftw/planner.c new file mode 100644 index 0000000..dab545c --- /dev/null +++ b/src/sndobj/rfftw/planner.c @@ -0,0 +1,480 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* + * planner.c -- find the optimal plan + */ + +/* $Id: planner.c,v 1.1.1.1 2006/05/12 15:14:56 veplaini Exp $ */ +#ifdef FFTW_USING_CILK +#include +#include +#endif + +#include +#include +#include + +extern fftw_generic_codelet fftw_twiddle_generic; +extern fftw_generic_codelet fftwi_twiddle_generic; +extern fftw_codelet_desc *fftw_config[]; + +fftw_plan_hook_ptr fftw_plan_hook = (fftw_plan_hook_ptr) NULL; + +static void init_test_array(fftw_complex *arr, int stride, int n) +{ + int j; + + for (j = 0; j < n; ++j) { + c_re(arr[stride * j]) = 0.0; + c_im(arr[stride * j]) = 0.0; + } +} + +/* + * The timer keeps doubling the number of iterations + * until the program runs for more than FFTW_TIME_MIN + */ +static double fftw_measure_runtime(fftw_plan plan, + fftw_complex *in, int istride, + fftw_complex *out, int ostride) +{ + fftw_time begin, end, start; + double t, tmax, tmin; + int i, iter; + int n; + int repeat; + int howmany = plan->vector_size; + + n = plan->n; + + iter = 1; + + for (;;) { + tmin = 1.0E10; + tmax = -1.0E10; + init_test_array(in, istride, n * howmany); + + start = fftw_get_time(); + /* repeat the measurement FFTW_TIME_REPEAT times */ + for (repeat = 0; repeat < FFTW_TIME_REPEAT; ++repeat) { + begin = fftw_get_time(); + for (i = 0; i < iter; ++i) { + fftw(plan, howmany, in, istride, istride, + out, ostride, ostride); + } + end = fftw_get_time(); + + t = fftw_time_to_sec(fftw_time_diff(end, begin)); + if (t < tmin) + tmin = t; + if (t > tmax) + tmax = t; + + /* do not run for too long */ + t = fftw_time_to_sec(fftw_time_diff(end, start)); + if (t > FFTW_TIME_LIMIT) + break; + } + + if (tmin >= FFTW_TIME_MIN) + break; + + iter *= 2; + } + + tmin /= (double) iter; + tmax /= (double) iter; + + return tmin; +} + +/* auxiliary functions */ +static void compute_cost(fftw_plan plan, + fftw_complex *in, int istride, + fftw_complex *out, int ostride) +{ + if (plan->flags & FFTW_MEASURE) + plan->cost = fftw_measure_runtime(plan, in, istride, out, ostride); + else { + double c; + c = plan->n * fftw_estimate_node(plan->root) * plan->vector_size; + plan->cost = c; + } +} + +static void run_plan_hooks(fftw_plan p) +{ + if (fftw_plan_hook && p) { + fftw_complete_twiddle(p->root, p->n); + fftw_plan_hook(p); + } +} + + +/* macrology */ +#define FOR_ALL_CODELETS(p) \ + fftw_codelet_desc **__q, *p; \ + for (__q = &fftw_config[0]; (p = (*__q)); ++__q) + +/****************************************** + * Recursive planner * + ******************************************/ +static fftw_plan planner(fftw_plan *table, int n, fftw_direction dir, + int flags, int vector_size, + fftw_complex *, int, fftw_complex *, int); + +/* + * the planner consists of two parts: one that tries to + * use accumulated wisdom, and one that does not. + * A small driver invokes both parts in sequence + */ + +/* planner with wisdom: look up the codelet suggested by the wisdom */ +static fftw_plan planner_wisdom(fftw_plan *table, int n, + fftw_direction dir, int flags, + int vector_size, + fftw_complex *in, int istride, + fftw_complex *out, int ostride) +{ + fftw_plan best = (fftw_plan) 0; + fftw_plan_node *node; + int have_wisdom; + enum fftw_node_type wisdom_type; + int wisdom_signature; + fftw_recurse_kind wisdom_recurse_kind; + + /* see if we remember any wisdom for this case */ + have_wisdom = fftw_wisdom_lookup(n, flags, dir, FFTW_WISDOM, + istride, ostride, + &wisdom_type, &wisdom_signature, + &wisdom_recurse_kind, 0); + + if (!have_wisdom) + return best; + + if (wisdom_type == FFTW_NOTW) { + FOR_ALL_CODELETS(p) { + if (p->dir == dir && p->type == wisdom_type) { + /* see if wisdom applies */ + if (wisdom_signature == p->signature && + p->size == n) { + node = fftw_make_node_notw(n, p); + best = fftw_make_plan(n, dir, node, flags, + p->type, p->signature, + FFTW_NORMAL_RECURSE, + vector_size); + fftw_use_plan(best); + run_plan_hooks(best); + return best; + } + } + } + } + if (wisdom_type == FFTW_TWIDDLE) { + FOR_ALL_CODELETS(p) { + if (p->dir == dir && p->type == wisdom_type) { + + /* see if wisdom applies */ + if (wisdom_signature == p->signature && + p->size > 1 && + (n % p->size) == 0) { + fftw_plan r = planner(table, n / p->size, dir, + flags | FFTW_NO_VECTOR_RECURSE, + wisdom_recurse_kind == + FFTW_VECTOR_RECURSE ? + p->size : vector_size, + in, istride, out, ostride); + node = fftw_make_node_twiddle(n, p, + r->root, flags); + best = fftw_make_plan(n, dir, node, flags, + p->type, p->signature, + wisdom_recurse_kind, + vector_size); + fftw_use_plan(best); + run_plan_hooks(best); + fftw_destroy_plan_internal(r); + return best; + } + } + } + } + /* + * BUG (or: TODO) Can we have generic wisdom? This is probably + * an academic question + */ + + return best; +} + +/* + * planner with no wisdom: try all combinations and pick + * the best + */ +static fftw_plan planner_normal(fftw_plan *table, int n, fftw_direction dir, + int flags, int vector_size, + fftw_complex *in, int istride, + fftw_complex *out, int ostride) +{ + fftw_plan best = (fftw_plan) 0; + fftw_plan newplan; + fftw_plan_node *node; + + /* see if we have any codelet that solves the problem */ + { + FOR_ALL_CODELETS(p) { + if (p->dir == dir && p->type == FFTW_NOTW) { + if (p->size == n) { + node = fftw_make_node_notw(n, p); + newplan = fftw_make_plan(n, dir, node, flags, + p->type, p->signature, + FFTW_NORMAL_RECURSE, + vector_size); + fftw_use_plan(newplan); + compute_cost(newplan, in, istride, out, ostride); + run_plan_hooks(newplan); + best = fftw_pick_better(newplan, best); + } + } + } + } + + /* Then, try all available twiddle codelets */ + { + FOR_ALL_CODELETS(p) { + if (p->dir == dir && p->type == FFTW_TWIDDLE) { + if ((n % p->size) == 0 && + p->size > 1 && + (!best || n != p->size)) { + fftw_plan r = planner(table, n / p->size, dir, + flags | FFTW_NO_VECTOR_RECURSE, + vector_size, + in, istride, out, ostride); + node = fftw_make_node_twiddle(n, p, + r->root, flags); + newplan = fftw_make_plan(n, dir, node, flags, + p->type, p->signature, + FFTW_NORMAL_RECURSE, + vector_size); + fftw_use_plan(newplan); + fftw_destroy_plan_internal(r); + compute_cost(newplan, in, istride, out, ostride); + run_plan_hooks(newplan); + best = fftw_pick_better(newplan, best); + } + } + } + } + + /* try vector recursion unless prohibited by the flags: */ + if (! (flags & FFTW_NO_VECTOR_RECURSE)) { + FOR_ALL_CODELETS(p) { + if (p->dir == dir && p->type == FFTW_TWIDDLE) { + if ((n % p->size) == 0 && + p->size > 1 && + (!best || n != p->size)) { + fftw_plan r = planner(table, n / p->size, dir, + flags | FFTW_NO_VECTOR_RECURSE, + p->size, + in, istride, out, ostride); + node = fftw_make_node_twiddle(n, p, + r->root, flags); + newplan = fftw_make_plan(n, dir, node, flags, + p->type, p->signature, + FFTW_VECTOR_RECURSE, + vector_size); + fftw_use_plan(newplan); + fftw_destroy_plan_internal(r); + compute_cost(newplan, in, istride, out, ostride); + run_plan_hooks(newplan); + best = fftw_pick_better(newplan, best); + } + } + } + } + + /* + * resort to generic or rader codelets for unknown factors + */ + { + fftw_generic_codelet *codelet = (dir == FFTW_FORWARD ? + fftw_twiddle_generic : + fftwi_twiddle_generic); + int size, prev_size = 0, remaining_factors = n; + fftw_plan r; + + while (remaining_factors > 1) { + size = fftw_factor(remaining_factors); + remaining_factors /= size; + + /* don't try the same factor more than once */ + if (size == prev_size) + continue; + prev_size = size; + + /* Look for codelets corresponding to this factor. */ + { + FOR_ALL_CODELETS(p) { + if (p->dir == dir && p->type == FFTW_TWIDDLE + && p->size == size) { + size = 0; + break; + } + } + } + + /* + * only try a generic/rader codelet if there were no + * twiddle codelets for this factor + */ + if (!size) + continue; + + r = planner(table, n / size, dir, + flags | FFTW_NO_VECTOR_RECURSE, + vector_size, + in, istride, out, ostride); + + /* Try Rader codelet: */ + node = fftw_make_node_rader(n, size, dir, r->root, flags); + newplan = fftw_make_plan(n, dir, node, flags, FFTW_RADER, 0, + FFTW_NORMAL_RECURSE, vector_size); + fftw_use_plan(newplan); + compute_cost(newplan, in, istride, out, ostride); + run_plan_hooks(newplan); + best = fftw_pick_better(newplan, best); + + if (size < 100) { /* + * only try generic for small + * sizes + */ + /* Try generic codelet: */ + node = fftw_make_node_generic(n, size, codelet, + r->root, flags); + newplan = fftw_make_plan(n, dir, node, flags, + FFTW_GENERIC, 0, + FFTW_NORMAL_RECURSE, vector_size); + fftw_use_plan(newplan); + compute_cost(newplan, in, istride, out, ostride); + run_plan_hooks(newplan); + best = fftw_pick_better(newplan, best); + } + fftw_destroy_plan_internal(r); + } + } + + if (!best) + fftw_die("bug in planner\n"); + + return best; +} + +static fftw_plan planner(fftw_plan *table, int n, fftw_direction dir, + int flags, int vector_size, + fftw_complex *in, int istride, + fftw_complex *out, int ostride) +{ + fftw_plan best = (fftw_plan) 0; + + if (vector_size > 1) + flags |= FFTW_NO_VECTOR_RECURSE; + + /* see if plan has already been computed */ + best = fftw_lookup(table, n, flags, vector_size); + if (best) { + fftw_use_plan(best); + return best; + } + /* try a wise plan */ + best = planner_wisdom(table, n, dir, flags, vector_size, + in, istride, out, ostride); + + if (!best) { + /* No wisdom. Plan normally. */ + best = planner_normal(table, n, dir, flags, + vector_size, + in, istride, out, ostride); + } + if (best) { + fftw_insert(table, best); + + /* remember the wisdom */ + fftw_wisdom_add(n, flags, dir, FFTW_WISDOM, istride, ostride, + best->wisdom_type, + best->wisdom_signature, + best->recurse_kind); + } + return best; +} + +fftw_plan fftw_create_plan_specific(int n, fftw_direction dir, int flags, + fftw_complex *in, int istride, + fftw_complex *out, int ostride) +{ + fftw_plan table; + fftw_plan p1; + + /* validate parameters */ + if (n <= 0) + return (fftw_plan) 0; + +#ifndef FFTW_ENABLE_VECTOR_RECURSE + /* TEMPORARY: disable vector recursion until it is more tested. */ + flags |= FFTW_NO_VECTOR_RECURSE; +#endif + + if ((dir != FFTW_FORWARD) && (dir != FFTW_BACKWARD)) + return (fftw_plan) 0; + + fftw_make_empty_table(&table); + p1 = planner(&table, n, dir, flags, 1, + in, istride, out, ostride); + fftw_destroy_table(&table); + + if (p1) + fftw_complete_twiddle(p1->root, n); + return p1; +} + +fftw_plan fftw_create_plan(int n, fftw_direction dir, int flags) +{ + fftw_complex *tmp_in, *tmp_out; + fftw_plan p; + + if (flags & FFTW_MEASURE) { + tmp_in = (fftw_complex *) fftw_malloc(2 * n * sizeof(fftw_complex)); + if (!tmp_in) + return 0; + tmp_out = tmp_in + n; + + p = fftw_create_plan_specific(n, dir, flags, + tmp_in, 1, tmp_out, 1); + + fftw_free(tmp_in); + } else + p = fftw_create_plan_specific(n, dir, flags, + (fftw_complex *) 0, 1, (fftw_complex *) 0, 1); + + return p; +} + +void fftw_destroy_plan(fftw_plan plan) +{ + fftw_destroy_plan_internal(plan); +} diff --git a/src/sndobj/rfftw/putils.c b/src/sndobj/rfftw/putils.c new file mode 100644 index 0000000..f696e4c --- /dev/null +++ b/src/sndobj/rfftw/putils.c @@ -0,0 +1,560 @@ + +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* + * putils.c -- plan utilities shared by planner.c and rplanner.c + */ + +/* $Id: putils.c,v 1.1.1.1 2006/05/12 15:14:46 veplaini Exp $ */ +#ifdef FFTW_USING_CILK +#include +#include +#endif + +#include +#include +#include + +int fftw_node_cnt = 0; +int fftw_plan_cnt = 0; + +/* + * These two constants are used for the FFTW_ESTIMATE flag to help + * create a heuristic plan. They don't affect FFTW_MEASURE. + */ +#define NOTW_OPTIMAL_SIZE 32 +#define TWIDDLE_OPTIMAL_SIZE 12 + +#define IS_POWER_OF_TWO(n) (((n) & ((n) - 1)) == 0) + +/* constructors --- I wish I had ML */ +fftw_plan_node *fftw_make_node(void) +{ + fftw_plan_node *p = (fftw_plan_node *) + fftw_malloc(sizeof(fftw_plan_node)); + p->refcnt = 0; + fftw_node_cnt++; + return p; +} + +void fftw_use_node(fftw_plan_node *p) +{ + ++p->refcnt; +} + +fftw_plan_node *fftw_make_node_notw(int size, const fftw_codelet_desc *config) +{ + fftw_plan_node *p = fftw_make_node(); + + p->type = config->type; + p->nodeu.notw.size = size; + p->nodeu.notw.codelet = (fftw_notw_codelet *) config->codelet; + p->nodeu.notw.codelet_desc = config; + return p; +} + +fftw_plan_node *fftw_make_node_real2hc(int size, + const fftw_codelet_desc *config) +{ + fftw_plan_node *p = fftw_make_node(); + + p->type = config->type; + p->nodeu.real2hc.size = size; + p->nodeu.real2hc.codelet = (fftw_real2hc_codelet *) config->codelet; + p->nodeu.real2hc.codelet_desc = config; + return p; +} + +fftw_plan_node *fftw_make_node_hc2real(int size, + const fftw_codelet_desc *config) +{ + fftw_plan_node *p = fftw_make_node(); + + p->type = config->type; + p->nodeu.hc2real.size = size; + p->nodeu.hc2real.codelet = (fftw_hc2real_codelet *) config->codelet; + p->nodeu.hc2real.codelet_desc = config; + return p; +} + +fftw_plan_node *fftw_make_node_twiddle(int n, + const fftw_codelet_desc *config, + fftw_plan_node *recurse, + int flags) +{ + fftw_plan_node *p = fftw_make_node(); + + p->type = config->type; + p->nodeu.twiddle.size = config->size; + p->nodeu.twiddle.codelet = (fftw_twiddle_codelet *) config->codelet; + p->nodeu.twiddle.recurse = recurse; + p->nodeu.twiddle.codelet_desc = config; + fftw_use_node(recurse); + if (flags & FFTW_MEASURE) + p->nodeu.twiddle.tw = fftw_create_twiddle(n, config); + else + p->nodeu.twiddle.tw = 0; + return p; +} + +fftw_plan_node *fftw_make_node_hc2hc(int n, fftw_direction dir, + const fftw_codelet_desc *config, + fftw_plan_node *recurse, + int flags) +{ + fftw_plan_node *p = fftw_make_node(); + + p->type = config->type; + p->nodeu.hc2hc.size = config->size; + p->nodeu.hc2hc.dir = dir; + p->nodeu.hc2hc.codelet = (fftw_hc2hc_codelet *) config->codelet; + p->nodeu.hc2hc.recurse = recurse; + p->nodeu.hc2hc.codelet_desc = config; + fftw_use_node(recurse); + if (flags & FFTW_MEASURE) + p->nodeu.hc2hc.tw = fftw_create_twiddle(n, config); + else + p->nodeu.hc2hc.tw = 0; + return p; +} + +fftw_plan_node *fftw_make_node_generic(int n, int size, + fftw_generic_codelet *codelet, + fftw_plan_node *recurse, + int flags) +{ + fftw_plan_node *p = fftw_make_node(); + + p->type = FFTW_GENERIC; + p->nodeu.generic.size = size; + p->nodeu.generic.codelet = codelet; + p->nodeu.generic.recurse = recurse; + fftw_use_node(recurse); + + if (flags & FFTW_MEASURE) + p->nodeu.generic.tw = fftw_create_twiddle(n, + (const fftw_codelet_desc *) 0); + else + p->nodeu.generic.tw = 0; + return p; +} + +fftw_plan_node *fftw_make_node_rgeneric(int n, int size, + fftw_direction dir, + fftw_rgeneric_codelet *codelet, + fftw_plan_node *recurse, + int flags) +{ + fftw_plan_node *p = fftw_make_node(); + + if (size % 2 == 0 || (n / size) % 2 == 0) + fftw_die("invalid size for rgeneric codelet\n"); + + p->type = FFTW_RGENERIC; + p->nodeu.rgeneric.size = size; + p->nodeu.rgeneric.dir = dir; + p->nodeu.rgeneric.codelet = codelet; + p->nodeu.rgeneric.recurse = recurse; + fftw_use_node(recurse); + + if (flags & FFTW_MEASURE) + p->nodeu.rgeneric.tw = fftw_create_twiddle(n, + (const fftw_codelet_desc *) 0); + else + p->nodeu.rgeneric.tw = 0; + return p; +} + +/* + * Note that these two Rader-related things must go here, rather than + * in rader.c, in order that putils.c (and rplanner.c) won't depend + * upon rader.c. + */ + +fftw_rader_data *fftw_rader_top = NULL; + +static void fftw_destroy_rader(fftw_rader_data * d) +{ + if (d) { + d->refcount--; + if (d->refcount <= 0) { + fftw_rader_data *cur = fftw_rader_top, *prev = NULL; + + while (cur && cur != d) { + prev = cur; + cur = cur->next; + } + if (!cur) + fftw_die("invalid Rader data pointer\n"); + + if (prev) + prev->next = d->next; + else + fftw_rader_top = d->next; + + fftw_destroy_plan_internal(d->plan); + fftw_free(d->omega); + fftw_free(d->cdesc); + fftw_free(d); + } + } +} + +static void destroy_tree(fftw_plan_node *p) +{ + if (p) { + --p->refcnt; + if (p->refcnt == 0) { + switch (p->type) { + case FFTW_NOTW: + case FFTW_REAL2HC: + case FFTW_HC2REAL: + break; + + case FFTW_TWIDDLE: + if (p->nodeu.twiddle.tw) + fftw_destroy_twiddle(p->nodeu.twiddle.tw); + destroy_tree(p->nodeu.twiddle.recurse); + break; + + case FFTW_HC2HC: + if (p->nodeu.hc2hc.tw) + fftw_destroy_twiddle(p->nodeu.hc2hc.tw); + destroy_tree(p->nodeu.hc2hc.recurse); + break; + + case FFTW_GENERIC: + if (p->nodeu.generic.tw) + fftw_destroy_twiddle(p->nodeu.generic.tw); + destroy_tree(p->nodeu.generic.recurse); + break; + + case FFTW_RADER: + if (p->nodeu.rader.tw) + fftw_destroy_twiddle(p->nodeu.rader.tw); + if (p->nodeu.rader.rader_data) + fftw_destroy_rader(p->nodeu.rader.rader_data); + destroy_tree(p->nodeu.rader.recurse); + break; + + case FFTW_RGENERIC: + if (p->nodeu.rgeneric.tw) + fftw_destroy_twiddle(p->nodeu.rgeneric.tw); + destroy_tree(p->nodeu.rgeneric.recurse); + break; + } + + fftw_free(p); + fftw_node_cnt--; + } + } +} + +/* create a plan with twiddle factors, and other bells and whistles */ +fftw_plan fftw_make_plan(int n, fftw_direction dir, + fftw_plan_node *root, int flags, + enum fftw_node_type wisdom_type, + int wisdom_signature, + fftw_recurse_kind recurse_kind, int vector_size) +{ + fftw_plan p = (fftw_plan) fftw_malloc(sizeof(struct fftw_plan_struct)); + + p->n = n; + p->dir = dir; + p->flags = flags; + fftw_use_node(root); + p->root = root; + p->cost = 0.0; + p->wisdom_type = wisdom_type; + p->wisdom_signature = wisdom_signature; + p->recurse_kind = recurse_kind; + p->vector_size = vector_size; + if (recurse_kind == FFTW_VECTOR_RECURSE && vector_size > 1) + fftw_die("invalid vector-recurse plan attempted\n"); + p->next = (fftw_plan) 0; + p->refcnt = 0; + fftw_plan_cnt++; + return p; +} + +/* + * complete with twiddle factors (because nodes don't have + * them when FFTW_ESTIMATE is set) + */ +void fftw_complete_twiddle(fftw_plan_node *p, int n) +{ + int r; + switch (p->type) { + case FFTW_NOTW: + case FFTW_REAL2HC: + case FFTW_HC2REAL: + break; + + case FFTW_TWIDDLE: + r = p->nodeu.twiddle.size; + if (!p->nodeu.twiddle.tw) + p->nodeu.twiddle.tw = + fftw_create_twiddle(n, p->nodeu.twiddle.codelet_desc); + fftw_complete_twiddle(p->nodeu.twiddle.recurse, n / r); + break; + + case FFTW_HC2HC: + r = p->nodeu.hc2hc.size; + if (!p->nodeu.hc2hc.tw) + p->nodeu.hc2hc.tw = + fftw_create_twiddle(n, p->nodeu.hc2hc.codelet_desc); + fftw_complete_twiddle(p->nodeu.hc2hc.recurse, n / r); + break; + + case FFTW_GENERIC: + r = p->nodeu.generic.size; + if (!p->nodeu.generic.tw) + p->nodeu.generic.tw = + fftw_create_twiddle(n, (const fftw_codelet_desc *) 0); + fftw_complete_twiddle(p->nodeu.generic.recurse, n / r); + break; + + case FFTW_RADER: + r = p->nodeu.rader.size; + if (!p->nodeu.rader.tw) + p->nodeu.rader.tw = + fftw_create_twiddle(n, p->nodeu.rader.rader_data->cdesc); + fftw_complete_twiddle(p->nodeu.rader.recurse, n / r); + break; + + case FFTW_RGENERIC: + r = p->nodeu.rgeneric.size; + if (!p->nodeu.rgeneric.tw) + p->nodeu.rgeneric.tw = + fftw_create_twiddle(n, (const fftw_codelet_desc *) 0); + fftw_complete_twiddle(p->nodeu.rgeneric.recurse, n / r); + break; + + } +} + +void fftw_use_plan(fftw_plan p) +{ + ++p->refcnt; +} + +void fftw_destroy_plan_internal(fftw_plan p) +{ + --p->refcnt; + + if (p->refcnt == 0) { + destroy_tree(p->root); + fftw_plan_cnt--; + fftw_free(p); + } +} + +/* end of constructors */ + +/* management of plan tables */ +void fftw_make_empty_table(fftw_plan *table) +{ + *table = (fftw_plan) 0; +} + +void fftw_insert(fftw_plan *table, fftw_plan this_plan) +{ + fftw_use_plan(this_plan); + this_plan->next = *table; + *table = this_plan; +} + +fftw_plan fftw_lookup(fftw_plan *table, int n, int flags, int vector_size) +{ + fftw_plan p; + + for (p = *table; p && + (p->n != n || p->flags != flags || p->vector_size != vector_size); + p = p->next); + + return p; +} + +void fftw_destroy_table(fftw_plan *table) +{ + fftw_plan p, q; + + for (p = *table; p; p = q) { + q = p->next; + fftw_destroy_plan_internal(p); + } +} + +double fftw_estimate_node(fftw_plan_node *p) +{ + int k; + + switch (p->type) { + case FFTW_NOTW: + k = p->nodeu.notw.size; + goto common1; + + case FFTW_REAL2HC: + k = p->nodeu.real2hc.size; + goto common1; + + case FFTW_HC2REAL: + k = p->nodeu.hc2real.size; + common1: + return 1.0 + 0.1 * (k - NOTW_OPTIMAL_SIZE) * + (k - NOTW_OPTIMAL_SIZE); + + case FFTW_TWIDDLE: + k = p->nodeu.twiddle.size; + return 1.0 + 0.1 * (k - TWIDDLE_OPTIMAL_SIZE) * + (k - TWIDDLE_OPTIMAL_SIZE) + + fftw_estimate_node(p->nodeu.twiddle.recurse); + + case FFTW_HC2HC: + k = p->nodeu.hc2hc.size; + return 1.0 + 0.1 * (k - TWIDDLE_OPTIMAL_SIZE) * + (k - TWIDDLE_OPTIMAL_SIZE) + + fftw_estimate_node(p->nodeu.hc2hc.recurse); + + case FFTW_GENERIC: + k = p->nodeu.generic.size; + return 10.0 + k * k + + fftw_estimate_node(p->nodeu.generic.recurse); + + case FFTW_RADER: + k = p->nodeu.rader.size; + return 10.0 + 10 * k + + fftw_estimate_node(p->nodeu.rader.recurse); + + case FFTW_RGENERIC: + k = p->nodeu.rgeneric.size; + return 10.0 + k * k + + fftw_estimate_node(p->nodeu.rgeneric.recurse); + } + return 1.0E20; +} + +/* pick the better of two plans and destroy the other one. */ +fftw_plan fftw_pick_better(fftw_plan p1, fftw_plan p2) +{ + if (!p1) + return p2; + + if (!p2) + return p1; + + if (p1->cost > p2->cost) { + fftw_destroy_plan_internal(p1); + return p2; + } else { + fftw_destroy_plan_internal(p2); + return p1; + } +} + +/* find the smallest prime factor of n */ +int fftw_factor(int n) +{ + int r; + + /* try 2 */ + if ((n & 1) == 0) + return 2; + + /* try odd numbers up to sqrt(n) */ + for (r = 3; r * r <= n; r += 2) + if (n % r == 0) + return r; + + /* n is prime */ + return n; +} + +static void print_node(FILE *f, fftw_plan_node *p, int indent) +{ + if (p) { + switch (p->type) { + case FFTW_NOTW: + fprintf(f, "%*sFFTW_NOTW %d\n", indent, "", + p->nodeu.notw.size); + break; + case FFTW_REAL2HC: + fprintf(f, "%*sFFTW_REAL2HC %d\n", indent, "", + p->nodeu.real2hc.size); + break; + case FFTW_HC2REAL: + fprintf(f, "%*sFFTW_HC2REAL %d\n", indent, "", + p->nodeu.hc2real.size); + break; + case FFTW_TWIDDLE: + fprintf(f, "%*sFFTW_TWIDDLE %d\n", indent, "", + p->nodeu.twiddle.size); + print_node(f, p->nodeu.twiddle.recurse, indent); + break; + case FFTW_HC2HC: + fprintf(f, "%*sFFTW_HC2HC %d\n", indent, "", + p->nodeu.hc2hc.size); + print_node(f, p->nodeu.hc2hc.recurse, indent); + break; + case FFTW_GENERIC: + fprintf(f, "%*sFFTW_GENERIC %d\n", indent, "", + p->nodeu.generic.size); + print_node(f, p->nodeu.generic.recurse, indent); + break; + case FFTW_RADER: + fprintf(f, "%*sFFTW_RADER %d\n", indent, "", + p->nodeu.rader.size); + + fprintf(f, "%*splan for size %d convolution:\n", + indent + 4, "", p->nodeu.rader.size - 1); + print_node(f, p->nodeu.rader.rader_data->plan->root, + indent + 6); + + print_node(f, p->nodeu.rader.recurse, indent); + break; + case FFTW_RGENERIC: + fprintf(f, "%*sFFTW_RGENERIC %d\n", indent, "", + p->nodeu.rgeneric.size); + print_node(f, p->nodeu.rgeneric.recurse, indent); + break; + } + } +} + +void fftw_fprint_plan(FILE *f, fftw_plan p) +{ + + fprintf(f, "plan: (cost = %e)\n", p->cost); + if (p->recurse_kind == FFTW_VECTOR_RECURSE) + fprintf(f, "(vector recursion)\n"); + else if (p->vector_size > 1) + fprintf(f, "(vector-size %d)\n", p->vector_size); + print_node(f, p->root, 0); +} + +void fftw_print_plan(fftw_plan p) +{ + fftw_fprint_plan(stdout, p); +} + +size_t fftw_sizeof_fftw_real(void) +{ + return(sizeof(fftw_real)); +} diff --git a/src/sndobj/rfftw/rader.c b/src/sndobj/rfftw/rader.c new file mode 100644 index 0000000..6783580 --- /dev/null +++ b/src/sndobj/rfftw/rader.c @@ -0,0 +1,370 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* + * Compute transforms of prime sizes using Rader's trick: turn them + * into convolutions of size n - 1, which you then perform via a pair + * of FFTs. + */ + +#include +#include + +#include + +#ifdef FFTW_USING_CILK +#include +#include +#endif + +#ifdef FFTW_DEBUG +#define WHEN_DEBUG(a) a +#else +#define WHEN_DEBUG(a) +#endif + +/* compute n^m mod p, where m >= 0 and p > 0. */ +static int power_mod(int n, int m, int p) +{ + if (m == 0) + return 1; + else if (m % 2 == 0) { + int x = power_mod(n, m / 2, p); + return MULMOD(x, x, p); + } + else + return MULMOD(n, power_mod(n, m - 1, p), p); +} + +/* + * Find the period of n in the multiplicative group mod p (p prime). + * That is, return the smallest m such that n^m == 1 mod p. + */ +static int period(int n, int p) +{ + int prod = n, period = 1; + + while (prod != 1) { + prod = MULMOD(prod, n, p); + ++period; + if (prod == 0) + fftw_die("non-prime order in Rader\n"); + } + return period; +} + +/* find a generator for the multiplicative group mod p, where p is prime */ +static int find_generator(int p) +{ + int g; + + for (g = 1; g < p; ++g) + if (period(g, p) == p - 1) + break; + if (g == p) + fftw_die("couldn't find generator for Rader\n"); + return g; +} + +/***************************************************************************/ + +static fftw_rader_data *create_rader_aux(int p, int flags) +{ + fftw_complex *omega, *work; + int g, ginv, gpower; + int i; + FFTW_TRIG_REAL twoPiOverN; + fftw_real scale = 1.0 / (p - 1); /* for convolution */ + fftw_plan plan; + fftw_rader_data *d; + + if (p < 2) + fftw_die("non-prime order in Rader\n"); + + flags &= ~FFTW_IN_PLACE; + + d = (fftw_rader_data *) fftw_malloc(sizeof(fftw_rader_data)); + + g = find_generator(p); + ginv = power_mod(g, p - 2, p); + + omega = (fftw_complex *) fftw_malloc((p - 1) * sizeof(fftw_complex)); + + plan = fftw_create_plan(p - 1, FFTW_FORWARD, + flags & ~FFTW_NO_VECTOR_RECURSE); + + work = (fftw_complex *) fftw_malloc((p - 1) * sizeof(fftw_complex)); + + twoPiOverN = FFTW_K2PI / (FFTW_TRIG_REAL) p; + gpower = 1; + for (i = 0; i < p - 1; ++i) { + c_re(work[i]) = scale * FFTW_TRIG_COS(twoPiOverN * gpower); + c_im(work[i]) = FFTW_FORWARD * scale * FFTW_TRIG_SIN(twoPiOverN + * gpower); + gpower = MULMOD(gpower, ginv, p); + } + + /* fft permuted roots of unity */ + fftw_executor_simple(p - 1, work, omega, plan->root, 1, 1, + plan->recurse_kind); + + fftw_free(work); + + d->plan = plan; + d->omega = omega; + d->g = g; + d->ginv = ginv; + d->p = p; + d->flags = flags; + d->refcount = 1; + d->next = NULL; + + d->cdesc = (fftw_codelet_desc *) fftw_malloc(sizeof(fftw_codelet_desc)); + d->cdesc->name = NULL; + d->cdesc->codelet = NULL; + d->cdesc->size = p; + d->cdesc->dir = FFTW_FORWARD; + d->cdesc->type = FFTW_RADER; + d->cdesc->signature = g; + d->cdesc->ntwiddle = 0; + d->cdesc->twiddle_order = NULL; + return d; +} + +/***************************************************************************/ + +static fftw_rader_data *fftw_create_rader(int p, int flags) +{ + fftw_rader_data *d = fftw_rader_top; + + flags &= ~FFTW_IN_PLACE; + while (d && (d->p != p || d->flags != flags)) + d = d->next; + if (d) { + d->refcount++; + return d; + } + d = create_rader_aux(p, flags); + d->next = fftw_rader_top; + fftw_rader_top = d; + return d; +} + +/***************************************************************************/ + +/* Compute the prime FFTs, premultiplied by twiddle factors. Below, we + * extensively use the identity that fft(x*)* = ifft(x) in order to + * share data between forward and backward transforms and to obviate + * the necessity of having separate forward and backward plans. */ + +void fftw_twiddle_rader(fftw_complex *A, const fftw_complex *W, + int m, int r, int stride, + fftw_rader_data * d) +{ + fftw_complex *tmp = (fftw_complex *) + fftw_malloc((r - 1) * sizeof(fftw_complex)); + int i, k, gpower = 1, g = d->g, ginv = d->ginv; + fftw_real a0r, a0i; + fftw_complex *omega = d->omega; + + for (i = 0; i < m; ++i, A += stride, W += r - 1) { + /* + * Here, we fft W[k-1] * A[k*(m*stride)], using Rader. + * (Actually, W is pre-permuted to match the permutation that we + * will do on A.) + */ + + /* First, permute the input and multiply by W, storing in tmp: */ + /* gpower == g^k mod r in the following loop */ + for (k = 0; k < r - 1; ++k, gpower = MULMOD(gpower, g, r)) { + fftw_real rA, iA, rW, iW; + rW = c_re(W[k]); + iW = c_im(W[k]); + rA = c_re(A[gpower * (m * stride)]); + iA = c_im(A[gpower * (m * stride)]); + c_re(tmp[k]) = rW * rA - iW * iA; + c_im(tmp[k]) = rW * iA + iW * rA; + } + + WHEN_DEBUG( { + if (gpower != 1) + fftw_die("incorrect generator in Rader\n"); + } + ); + + /* FFT tmp to A: */ + fftw_executor_simple(r - 1, tmp, A + (m * stride), + d->plan->root, 1, m * stride, + d->plan->recurse_kind); + + /* set output DC component: */ + a0r = c_re(A[0]); + a0i = c_im(A[0]); + c_re(A[0]) += c_re(A[(m * stride)]); + c_im(A[0]) += c_im(A[(m * stride)]); + + /* now, multiply by omega: */ + for (k = 0; k < r - 1; ++k) { + fftw_real rA, iA, rW, iW; + rW = c_re(omega[k]); + iW = c_im(omega[k]); + rA = c_re(A[(k + 1) * (m * stride)]); + iA = c_im(A[(k + 1) * (m * stride)]); + c_re(A[(k + 1) * (m * stride)]) = rW * rA - iW * iA; + c_im(A[(k + 1) * (m * stride)]) = -(rW * iA + iW * rA); + } + + /* this will add A[0] to all of the outputs after the ifft */ + c_re(A[(m * stride)]) += a0r; + c_im(A[(m * stride)]) -= a0i; + + /* inverse FFT: */ + fftw_executor_simple(r - 1, A + (m * stride), tmp, + d->plan->root, m * stride, 1, + d->plan->recurse_kind); + + /* finally, do inverse permutation to unshuffle the output: */ + for (k = 0; k < r - 1; ++k, gpower = MULMOD(gpower, ginv, r)) { + c_re(A[gpower * (m * stride)]) = c_re(tmp[k]); + c_im(A[gpower * (m * stride)]) = -c_im(tmp[k]); + } + + WHEN_DEBUG( { + if (gpower != 1) + fftw_die("incorrect generator in Rader\n"); + } + ); + + } + + fftw_free(tmp); +} + +void fftwi_twiddle_rader(fftw_complex *A, const fftw_complex *W, + int m, int r, int stride, + fftw_rader_data * d) +{ + fftw_complex *tmp = (fftw_complex *) + fftw_malloc((r - 1) * sizeof(fftw_complex)); + int i, k, gpower = 1, g = d->g, ginv = d->ginv; + fftw_real a0r, a0i; + fftw_complex *omega = d->omega; + + for (i = 0; i < m; ++i, A += stride, W += r - 1) { + /* + * Here, we fft W[k-1]* * A[k*(m*stride)], using Rader. + * (Actually, W is pre-permuted to match the permutation that + * we will do on A.) + */ + + /* First, permute the input and multiply by W*, storing in tmp: */ + /* gpower == g^k mod r in the following loop */ + for (k = 0; k < r - 1; ++k, gpower = MULMOD(gpower, g, r)) { + fftw_real rA, iA, rW, iW; + rW = c_re(W[k]); + iW = c_im(W[k]); + rA = c_re(A[gpower * (m * stride)]); + iA = c_im(A[gpower * (m * stride)]); + c_re(tmp[k]) = rW * rA + iW * iA; + c_im(tmp[k]) = iW * rA - rW * iA; + } + + WHEN_DEBUG( { + if (gpower != 1) + fftw_die("incorrect generator in Rader\n"); + } + ); + + /* FFT tmp to A: */ + fftw_executor_simple(r - 1, tmp, A + (m * stride), + d->plan->root, 1, m * stride, + d->plan->recurse_kind); + + /* set output DC component: */ + a0r = c_re(A[0]); + a0i = c_im(A[0]); + c_re(A[0]) += c_re(A[(m * stride)]); + c_im(A[0]) -= c_im(A[(m * stride)]); + + /* now, multiply by omega: */ + for (k = 0; k < r - 1; ++k) { + fftw_real rA, iA, rW, iW; + rW = c_re(omega[k]); + iW = c_im(omega[k]); + rA = c_re(A[(k + 1) * (m * stride)]); + iA = c_im(A[(k + 1) * (m * stride)]); + c_re(A[(k + 1) * (m * stride)]) = rW * rA - iW * iA; + c_im(A[(k + 1) * (m * stride)]) = -(rW * iA + iW * rA); + } + + /* this will add A[0] to all of the outputs after the ifft */ + c_re(A[(m * stride)]) += a0r; + c_im(A[(m * stride)]) += a0i; + + /* inverse FFT: */ + fftw_executor_simple(r - 1, A + (m * stride), tmp, + d->plan->root, m * stride, 1, + d->plan->recurse_kind); + + /* finally, do inverse permutation to unshuffle the output: */ + for (k = 0; k < r - 1; ++k, gpower = MULMOD(gpower, ginv, r)) { + A[gpower * (m * stride)] = tmp[k]; + } + + WHEN_DEBUG( { + if (gpower != 1) + fftw_die("incorrect generator in Rader\n"); + } + ); + } + + fftw_free(tmp); +} + +/***************************************************************************/ + +/* + * Make an FFTW_RADER plan node. Note that this function must go + * here, rather than in putils.c, because it indirectly calls the + * fftw_planner. If we included it in putils.c, which is also used + * by rfftw, then any program using rfftw would be linked with all + * of the FFTW codelets, even if they were not needed. I wish that the + * darn linkers operated on a function rather than a file granularity. + */ +fftw_plan_node *fftw_make_node_rader(int n, int size, fftw_direction dir, + fftw_plan_node *recurse, + int flags) +{ + fftw_plan_node *p = fftw_make_node(); + + p->type = FFTW_RADER; + p->nodeu.rader.size = size; + p->nodeu.rader.codelet = dir == FFTW_FORWARD ? + fftw_twiddle_rader : fftwi_twiddle_rader; + p->nodeu.rader.rader_data = fftw_create_rader(size, flags); + p->nodeu.rader.recurse = recurse; + fftw_use_node(recurse); + + if (flags & FFTW_MEASURE) + p->nodeu.rader.tw = + fftw_create_twiddle(n, p->nodeu.rader.rader_data->cdesc); + else + p->nodeu.rader.tw = 0; + return p; +} diff --git a/src/sndobj/rfftw/rconfig.c b/src/sndobj/rfftw/rconfig.c new file mode 100644 index 0000000..417c471 --- /dev/null +++ b/src/sndobj/rfftw/rconfig.c @@ -0,0 +1,181 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* rconfig.c -- this file contains all the real-complex codelets + * the system knows about */ + +#include +#include + +#define NOTW_CODELET(x) \ + &fftw_real2hc_##x##_desc +#define NOTWI_CODELET(x) \ + &fftw_hc2real_##x##_desc + +#define TWIDDLE_CODELET(x) \ + &fftw_hc2hc_forward_##x##_desc +#define TWIDDLEI_CODELET(x) \ + &fftw_hc2hc_backward_##x##_desc + +/* automatically-generated list of codelets */ + +extern fftw_codelet_desc fftw_real2hc_1_desc; +extern fftw_codelet_desc fftw_hc2real_1_desc; +extern fftw_codelet_desc fftw_real2hc_2_desc; +extern fftw_codelet_desc fftw_hc2real_2_desc; +extern fftw_codelet_desc fftw_real2hc_3_desc; +extern fftw_codelet_desc fftw_hc2real_3_desc; +extern fftw_codelet_desc fftw_real2hc_4_desc; +extern fftw_codelet_desc fftw_hc2real_4_desc; +extern fftw_codelet_desc fftw_real2hc_5_desc; +extern fftw_codelet_desc fftw_hc2real_5_desc; +extern fftw_codelet_desc fftw_real2hc_6_desc; +extern fftw_codelet_desc fftw_hc2real_6_desc; +extern fftw_codelet_desc fftw_real2hc_7_desc; +extern fftw_codelet_desc fftw_hc2real_7_desc; +extern fftw_codelet_desc fftw_real2hc_8_desc; +extern fftw_codelet_desc fftw_hc2real_8_desc; +extern fftw_codelet_desc fftw_real2hc_9_desc; +extern fftw_codelet_desc fftw_hc2real_9_desc; +extern fftw_codelet_desc fftw_real2hc_10_desc; +extern fftw_codelet_desc fftw_hc2real_10_desc; +extern fftw_codelet_desc fftw_real2hc_11_desc; +extern fftw_codelet_desc fftw_hc2real_11_desc; +extern fftw_codelet_desc fftw_real2hc_12_desc; +extern fftw_codelet_desc fftw_hc2real_12_desc; +extern fftw_codelet_desc fftw_real2hc_13_desc; +extern fftw_codelet_desc fftw_hc2real_13_desc; +extern fftw_codelet_desc fftw_real2hc_14_desc; +extern fftw_codelet_desc fftw_hc2real_14_desc; +extern fftw_codelet_desc fftw_real2hc_15_desc; +extern fftw_codelet_desc fftw_hc2real_15_desc; +extern fftw_codelet_desc fftw_real2hc_16_desc; +extern fftw_codelet_desc fftw_hc2real_16_desc; +extern fftw_codelet_desc fftw_real2hc_32_desc; +extern fftw_codelet_desc fftw_hc2real_32_desc; +extern fftw_codelet_desc fftw_real2hc_64_desc; +extern fftw_codelet_desc fftw_hc2real_64_desc; +extern fftw_codelet_desc fftw_real2hc_128_desc; +extern fftw_codelet_desc fftw_hc2real_128_desc; +extern fftw_codelet_desc fftw_hc2hc_forward_2_desc; +extern fftw_codelet_desc fftw_hc2hc_backward_2_desc; +extern fftw_codelet_desc fftw_hc2hc_forward_3_desc; +extern fftw_codelet_desc fftw_hc2hc_backward_3_desc; +extern fftw_codelet_desc fftw_hc2hc_forward_4_desc; +extern fftw_codelet_desc fftw_hc2hc_backward_4_desc; +extern fftw_codelet_desc fftw_hc2hc_forward_5_desc; +extern fftw_codelet_desc fftw_hc2hc_backward_5_desc; +extern fftw_codelet_desc fftw_hc2hc_forward_6_desc; +extern fftw_codelet_desc fftw_hc2hc_backward_6_desc; +extern fftw_codelet_desc fftw_hc2hc_forward_7_desc; +extern fftw_codelet_desc fftw_hc2hc_backward_7_desc; +extern fftw_codelet_desc fftw_hc2hc_forward_8_desc; +extern fftw_codelet_desc fftw_hc2hc_backward_8_desc; +extern fftw_codelet_desc fftw_hc2hc_forward_9_desc; +extern fftw_codelet_desc fftw_hc2hc_backward_9_desc; +extern fftw_codelet_desc fftw_hc2hc_forward_10_desc; +extern fftw_codelet_desc fftw_hc2hc_backward_10_desc; +extern fftw_codelet_desc fftw_hc2hc_forward_16_desc; +extern fftw_codelet_desc fftw_hc2hc_backward_16_desc; +extern fftw_codelet_desc fftw_hc2hc_forward_32_desc; +extern fftw_codelet_desc fftw_hc2hc_backward_32_desc; + +fftw_codelet_desc *rfftw_config[] = +{ + NOTW_CODELET(1), + NOTWI_CODELET(1), + NOTW_CODELET(2), + NOTWI_CODELET(2), + NOTW_CODELET(3), + NOTWI_CODELET(3), + NOTW_CODELET(4), + NOTWI_CODELET(4), + NOTW_CODELET(5), + NOTWI_CODELET(5), + NOTW_CODELET(6), + NOTWI_CODELET(6), + NOTW_CODELET(7), + NOTWI_CODELET(7), + NOTW_CODELET(8), + NOTWI_CODELET(8), + NOTW_CODELET(9), + NOTWI_CODELET(9), + NOTW_CODELET(10), + NOTWI_CODELET(10), + NOTW_CODELET(11), + NOTWI_CODELET(11), + NOTW_CODELET(12), + NOTWI_CODELET(12), + NOTW_CODELET(13), + NOTWI_CODELET(13), + NOTW_CODELET(14), + NOTWI_CODELET(14), + NOTW_CODELET(15), + NOTWI_CODELET(15), + NOTW_CODELET(16), + NOTWI_CODELET(16), + NOTW_CODELET(32), + NOTWI_CODELET(32), + NOTW_CODELET(64), + NOTWI_CODELET(64), + NOTW_CODELET(128), + NOTWI_CODELET(128), + TWIDDLE_CODELET(2), + TWIDDLEI_CODELET(2), + TWIDDLE_CODELET(3), + TWIDDLEI_CODELET(3), + TWIDDLE_CODELET(4), + TWIDDLEI_CODELET(4), + TWIDDLE_CODELET(5), + TWIDDLEI_CODELET(5), + TWIDDLE_CODELET(6), + TWIDDLEI_CODELET(6), + TWIDDLE_CODELET(7), + TWIDDLEI_CODELET(7), + TWIDDLE_CODELET(8), + TWIDDLEI_CODELET(8), + TWIDDLE_CODELET(9), + TWIDDLEI_CODELET(9), + TWIDDLE_CODELET(10), + TWIDDLEI_CODELET(10), + TWIDDLE_CODELET(16), + TWIDDLEI_CODELET(16), + TWIDDLE_CODELET(32), + TWIDDLEI_CODELET(32), + (fftw_codelet_desc *) 0 +}; diff --git a/src/sndobj/rfftw/rexec.c b/src/sndobj/rfftw/rexec.c new file mode 100644 index 0000000..b92beb1 --- /dev/null +++ b/src/sndobj/rfftw/rexec.c @@ -0,0 +1,535 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* + * rexec.c -- execute the fft + */ + +/* $Id: rexec.c,v 1.1.1.1 2006/05/12 15:14:54 veplaini Exp $ */ +#include +#include + +#include +#include + +void rfftw_strided_copy(int n, fftw_real *in, int ostride, + fftw_real *out) +{ + int i; + fftw_real r0, r1, r2, r3; + + i = 0; + for (; i < (n & 3); ++i) { + out[i * ostride] = in[i]; + } + for (; i < n; i += 4) { + r0 = in[i]; + r1 = in[i + 1]; + r2 = in[i + 2]; + r3 = in[i + 3]; + out[i * ostride] = r0; + out[(i + 1) * ostride] = r1; + out[(i + 2) * ostride] = r2; + out[(i + 3) * ostride] = r3; + } +} + +static void rexecutor_many(int n, fftw_real *in, + fftw_real *out, + fftw_plan_node *p, + int istride, + int ostride, + int howmany, int idist, int odist, + fftw_recurse_kind recurse_kind) +{ + int s; + + switch (p->type) { + case FFTW_REAL2HC: + { + fftw_real2hc_codelet *codelet = p->nodeu.real2hc.codelet; + + HACK_ALIGN_STACK_ODD; + for (s = 0; s < howmany; ++s) + codelet(in + s * idist, out + s * odist, + out + n * ostride + s * odist, + istride, ostride, -ostride); + break; + } + + case FFTW_HC2REAL: + { + fftw_hc2real_codelet *codelet = p->nodeu.hc2real.codelet; + + HACK_ALIGN_STACK_ODD; + for (s = 0; s < howmany; ++s) + codelet(in + s * idist, in + n * istride + s * idist, + out + s * odist, + istride, -istride, ostride); + break; + } + + default: + for (s = 0; s < howmany; ++s) + rfftw_executor_simple(n, in + s * idist, + out + s * odist, + p, istride, ostride, + recurse_kind); + } +} + +#ifdef FFTW_ENABLE_VECTOR_RECURSE + +/* rexecutor_many_vector is like rexecutor_many, but it pushes the + howmany loop down to the leaves of the transform: */ +static void rexecutor_many_vector(int n, fftw_real *in, + fftw_real *out, + fftw_plan_node *p, + int istride, + int ostride, + int howmany, int idist, int odist) +{ + switch (p->type) { + case FFTW_REAL2HC: + { + fftw_real2hc_codelet *codelet = p->nodeu.real2hc.codelet; + int s; + + HACK_ALIGN_STACK_ODD; + for (s = 0; s < howmany; ++s) + codelet(in + s * idist, out + s * odist, + out + n * ostride + s * odist, + istride, ostride, -ostride); + break; + } + + case FFTW_HC2REAL: + { + fftw_hc2real_codelet *codelet = p->nodeu.hc2real.codelet; + int s; + + HACK_ALIGN_STACK_ODD; + for (s = 0; s < howmany; ++s) + codelet(in + s * idist, in + n * istride + s * idist, + out + s * odist, + istride, -istride, ostride); + break; + } + + case FFTW_HC2HC: + { + int r = p->nodeu.hc2hc.size; + int m = n / r; + int i; + fftw_hc2hc_codelet *codelet; + fftw_complex *W; + + switch (p->nodeu.hc2hc.dir) { + case FFTW_REAL_TO_COMPLEX: + for (i = 0; i < r; ++i) + rexecutor_many_vector(m, in + i * istride, + out + i * (m*ostride), + p->nodeu.hc2hc.recurse, + istride * r, ostride, + howmany, idist, odist); + + W = p->nodeu.hc2hc.tw->twarray; + codelet = p->nodeu.hc2hc.codelet; + HACK_ALIGN_STACK_EVEN; + for (i = 0; i < howmany; ++i) + codelet(out + i * odist, + W, m * ostride, m, ostride); + break; + case FFTW_COMPLEX_TO_REAL: + W = p->nodeu.hc2hc.tw->twarray; + codelet = p->nodeu.hc2hc.codelet; + HACK_ALIGN_STACK_EVEN; + for (i = 0; i < howmany; ++i) + codelet(in + i * idist, + W, m * istride, m, istride); + + for (i = 0; i < r; ++i) + rexecutor_many_vector(m, in + i * (m*istride), + out + i * ostride, + p->nodeu.hc2hc.recurse, + istride, ostride * r, + howmany, idist, odist); + break; + default: + goto bug; + } + + break; + } + + case FFTW_RGENERIC: + { + int r = p->nodeu.rgeneric.size; + int m = n / r; + int i; + fftw_rgeneric_codelet *codelet = p->nodeu.rgeneric.codelet; + fftw_complex *W = p->nodeu.rgeneric.tw->twarray; + + switch (p->nodeu.rgeneric.dir) { + case FFTW_REAL_TO_COMPLEX: + for (i = 0; i < r; ++i) + rexecutor_many_vector(m, in + i * istride, + out + i * (m * ostride), + p->nodeu.rgeneric.recurse, + istride * r, ostride, + howmany, idist, odist); + + for (i = 0; i < howmany; ++i) + codelet(out + i * odist, W, m, r, n, ostride); + break; + case FFTW_COMPLEX_TO_REAL: + for (i = 0; i < howmany; ++i) + codelet(in + i * idist, W, m, r, n, istride); + + for (i = 0; i < r; ++i) + rexecutor_many_vector(m, in + i * m * istride, + out + i * ostride, + p->nodeu.rgeneric.recurse, + istride, ostride * r, + howmany, idist, odist); + break; + default: + goto bug; + } + + break; + } + + default: + bug: + fftw_die("BUG in rexecutor: invalid plan\n"); + break; + } +} + +#endif /* FFTW_ENABLE_VECTOR_RECURSE */ + +void rfftw_executor_simple(int n, fftw_real *in, + fftw_real *out, + fftw_plan_node *p, + int istride, + int ostride, + fftw_recurse_kind recurse_kind) +{ + switch (p->type) { + case FFTW_REAL2HC: + HACK_ALIGN_STACK_ODD; + (p->nodeu.real2hc.codelet) (in, out, out + n * ostride, + istride, ostride, -ostride); + break; + + case FFTW_HC2REAL: + HACK_ALIGN_STACK_ODD; + (p->nodeu.hc2real.codelet) (in, in + n * istride, out, + istride, -istride, ostride); + break; + + case FFTW_HC2HC: + { + int r = p->nodeu.hc2hc.size; + int m = n / r; + /* + * please do resist the temptation of initializing + * these variables here. Doing so forces the + * compiler to keep a live variable across the + * recursive call. + */ + fftw_hc2hc_codelet *codelet; + fftw_complex *W; + + switch (p->nodeu.hc2hc.dir) { + case FFTW_REAL_TO_COMPLEX: +#ifdef FFTW_ENABLE_VECTOR_RECURSE + if (recurse_kind == FFTW_NORMAL_RECURSE) +#endif + rexecutor_many(m, in, out, + p->nodeu.hc2hc.recurse, + istride * r, ostride, + r, istride, m * ostride, + FFTW_NORMAL_RECURSE); +#ifdef FFTW_ENABLE_VECTOR_RECURSE + else + rexecutor_many_vector(m, in, out, + p->nodeu.hc2hc.recurse, + istride * r, ostride, + r, istride, m * ostride); +#endif + + W = p->nodeu.hc2hc.tw->twarray; + codelet = p->nodeu.hc2hc.codelet; + HACK_ALIGN_STACK_EVEN; + codelet(out, W, m * ostride, m, ostride); + break; + case FFTW_COMPLEX_TO_REAL: + W = p->nodeu.hc2hc.tw->twarray; + codelet = p->nodeu.hc2hc.codelet; + HACK_ALIGN_STACK_EVEN; + codelet(in, W, m * istride, m, istride); + +#ifdef FFTW_ENABLE_VECTOR_RECURSE + if (recurse_kind == FFTW_NORMAL_RECURSE) +#endif + rexecutor_many(m, in, out, + p->nodeu.hc2hc.recurse, + istride, ostride * r, + r, m * istride, ostride, + FFTW_NORMAL_RECURSE); +#ifdef FFTW_ENABLE_VECTOR_RECURSE + else + rexecutor_many_vector(m, in, out, + p->nodeu.hc2hc.recurse, + istride, ostride * r, + r, m * istride, ostride); +#endif + break; + default: + goto bug; + } + + break; + } + + case FFTW_RGENERIC: + { + int r = p->nodeu.rgeneric.size; + int m = n / r; + fftw_rgeneric_codelet *codelet = p->nodeu.rgeneric.codelet; + fftw_complex *W = p->nodeu.rgeneric.tw->twarray; + + switch (p->nodeu.rgeneric.dir) { + case FFTW_REAL_TO_COMPLEX: +#ifdef FFTW_ENABLE_VECTOR_RECURSE + if (recurse_kind == FFTW_NORMAL_RECURSE) +#endif + rexecutor_many(m, in, out, + p->nodeu.rgeneric.recurse, + istride * r, ostride, + r, istride, m * ostride, + FFTW_NORMAL_RECURSE); +#ifdef FFTW_ENABLE_VECTOR_RECURSE + else + rexecutor_many_vector(m, in, out, + p->nodeu.rgeneric.recurse, + istride * r, ostride, + r, istride, m * ostride); +#endif + + codelet(out, W, m, r, n, ostride); + break; + case FFTW_COMPLEX_TO_REAL: + codelet(in, W, m, r, n, istride); + +#ifdef FFTW_ENABLE_VECTOR_RECURSE + if (recurse_kind == FFTW_NORMAL_RECURSE) +#endif + rexecutor_many(m, in, out, + p->nodeu.rgeneric.recurse, + istride, ostride * r, + r, m * istride, ostride, + FFTW_NORMAL_RECURSE); +#ifdef FFTW_ENABLE_VECTOR_RECURSE + else + rexecutor_many_vector(m, in, out, + p->nodeu.rgeneric.recurse, + istride, ostride * r, + r, m * istride, ostride); +#endif + break; + default: + goto bug; + } + + break; + } + + default: + bug: + fftw_die("BUG in rexecutor: invalid plan\n"); + break; + } +} + +static void rexecutor_simple_inplace(int n, fftw_real *in, + fftw_real *out, + fftw_plan_node *p, + int istride, + fftw_recurse_kind recurse_kind) +{ + switch (p->type) { + case FFTW_REAL2HC: + HACK_ALIGN_STACK_ODD; + (p->nodeu.real2hc.codelet) (in, in, in + n * istride, + istride, istride, -istride); + break; + + case FFTW_HC2REAL: + HACK_ALIGN_STACK_ODD; + (p->nodeu.hc2real.codelet) (in, in + n * istride, in, + istride, -istride, istride); + break; + + default: + { + fftw_real *tmp; + + if (out) + tmp = out; + else + tmp = (fftw_real *) fftw_malloc(n * sizeof(fftw_real)); + + rfftw_executor_simple(n, in, tmp, p, istride, 1, + recurse_kind); + rfftw_strided_copy(n, tmp, istride, in); + + if (!out) + fftw_free(tmp); + } + } +} + +static void rexecutor_many_inplace(int n, fftw_real *in, + fftw_real *out, + fftw_plan_node *p, + int istride, + int howmany, int idist, + fftw_recurse_kind recurse_kind) +{ + switch (p->type) { + case FFTW_REAL2HC: + { + fftw_real2hc_codelet *codelet = p->nodeu.real2hc.codelet; + int s; + + HACK_ALIGN_STACK_ODD; + for (s = 0; s < howmany; ++s) + codelet(in + s * idist, in + s * idist, + in + n * istride + s * idist, + istride, istride, -istride); + + break; + } + + case FFTW_HC2REAL: + { + fftw_hc2real_codelet *codelet = p->nodeu.hc2real.codelet; + int s; + + HACK_ALIGN_STACK_ODD; + for (s = 0; s < howmany; ++s) + codelet(in + s * idist, in + n * istride + s * idist, + in + s * idist, + istride, -istride, istride); + + break; + } + + default: + { + int s; + fftw_real *tmp; + if (out) + tmp = out; + else + tmp = (fftw_real *) fftw_malloc(n * sizeof(fftw_real)); + + for (s = 0; s < howmany; ++s) { + rfftw_executor_simple(n, + in + s * idist, + tmp, + p, istride, 1, recurse_kind); + rfftw_strided_copy(n, tmp, istride, in + s * idist); + } + + if (!out) + fftw_free(tmp); + } + } +} + +/* user interface */ +void rfftw(fftw_plan plan, int howmany, fftw_real *in, int istride, + int idist, fftw_real *out, int ostride, int odist) +{ + int n = plan->n; + + if (plan->flags & FFTW_IN_PLACE) { + if (howmany == 1) { + rexecutor_simple_inplace(n, in, out, plan->root, istride, + plan->recurse_kind); + } else { + rexecutor_many_inplace(n, in, out, plan->root, istride, howmany, + idist, plan->recurse_kind); + } + } else { + if (howmany == 1) { + rfftw_executor_simple(n, in, out, plan->root, istride, ostride, + plan->recurse_kind); + } else { +#ifdef FFTW_ENABLE_VECTOR_RECURSE + int vector_size = plan->vector_size; + if (vector_size <= 1) +#endif + rexecutor_many(n, in, out, plan->root, istride, ostride, + howmany, idist, odist, + plan->recurse_kind); +#ifdef FFTW_ENABLE_VECTOR_RECURSE + else { + int s; + int num_vects = howmany / vector_size; + fftw_plan_node *root = plan->root; + + for (s = 0; s < num_vects; ++s) + rexecutor_many_vector(n, + in + s * (vector_size * idist), + out + s * (vector_size * odist), + root, + istride, ostride, + vector_size, idist, odist); + + s = howmany % vector_size; + if (s > 0) + rexecutor_many(n, + in + num_vects * (vector_size*idist), + out + num_vects * (vector_size*odist), + root, + istride, ostride, + s, idist, odist, + FFTW_NORMAL_RECURSE); + } +#endif + } + } +} + +void rfftw_one(fftw_plan plan, fftw_real *in, fftw_real *out) +{ + int n = plan->n; + + if (plan->flags & FFTW_IN_PLACE) + rexecutor_simple_inplace(n, in, out, plan->root, 1, + plan->recurse_kind); + else + rfftw_executor_simple(n, in, out, plan->root, 1, 1, + plan->recurse_kind); +} diff --git a/src/sndobj/rfftw/rexec2.c b/src/sndobj/rfftw/rexec2.c new file mode 100644 index 0000000..ffdcf00 --- /dev/null +++ b/src/sndobj/rfftw/rexec2.c @@ -0,0 +1,232 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* $Id: rexec2.c,v 1.1.1.1 2006/05/12 15:14:52 veplaini Exp $ */ +/* + * rexec2.c -- alternate rfftw executor, specifically designed for the + * multidimensional transforms. Given an extra work array, + * expects complex data in FFTW_COMPLEX format, and does + * not destroy the input in hc2real transforms. + */ + +#include +#include + +/* copies halfcomplex array in (contiguous) to fftw_complex array out. */ +void rfftw_hc2c(int n, fftw_real *in, fftw_complex *out, int ostride) +{ + int n2 = (n + 1) / 2; + int i = 1; + + c_re(out[0]) = in[0]; + c_im(out[0]) = 0.0; + for (; i < ((n2 - 1) & 3) + 1; ++i) { + c_re(out[i * ostride]) = in[i]; + c_im(out[i * ostride]) = in[n - i]; + } + for (; i < n2; i += 4) { + fftw_real r0, r1, r2, r3; + fftw_real i0, i1, i2, i3; + r0 = in[i]; + r1 = in[i + 1]; + r2 = in[i + 2]; + r3 = in[i + 3]; + i3 = in[n - (i + 3)]; + i2 = in[n - (i + 2)]; + i1 = in[n - (i + 1)]; + i0 = in[n - i]; + c_re(out[i * ostride]) = r0; + c_im(out[i * ostride]) = i0; + c_re(out[(i + 1) * ostride]) = r1; + c_im(out[(i + 1) * ostride]) = i1; + c_re(out[(i + 2) * ostride]) = r2; + c_im(out[(i + 2) * ostride]) = i2; + c_re(out[(i + 3) * ostride]) = r3; + c_im(out[(i + 3) * ostride]) = i3; + } + if ((n & 1) == 0) { /* store the Nyquist frequency */ + c_re(out[n2 * ostride]) = in[n2]; + c_im(out[n2 * ostride]) = 0.0; + } +} + +/* reverse of rfftw_hc2c */ +void rfftw_c2hc(int n, fftw_complex *in, int istride, fftw_real *out) +{ + int n2 = (n + 1) / 2; + int i = 1; + + out[0] = c_re(in[0]); + for (; i < ((n2 - 1) & 3) + 1; ++i) { + out[i] = c_re(in[i * istride]); + out[n - i] = c_im(in[i * istride]); + } + for (; i < n2; i += 4) { + fftw_real r0, r1, r2, r3; + fftw_real i0, i1, i2, i3; + r0 = c_re(in[i * istride]); + i0 = c_im(in[i * istride]); + r1 = c_re(in[(i + 1) * istride]); + i1 = c_im(in[(i + 1) * istride]); + r2 = c_re(in[(i + 2) * istride]); + i2 = c_im(in[(i + 2) * istride]); + r3 = c_re(in[(i + 3) * istride]); + i3 = c_im(in[(i + 3) * istride]); + out[i] = r0; + out[i + 1] = r1; + out[i + 2] = r2; + out[i + 3] = r3; + out[n - (i + 3)] = i3; + out[n - (i + 2)] = i2; + out[n - (i + 1)] = i1; + out[n - i] = i0; + } + if ((n & 1) == 0) /* store the Nyquist frequency */ + out[n2] = c_re(in[n2 * istride]); +} + +/* + * in: array of n real numbers (* howmany). + * out: array of n/2 + 1 complex numbers (* howmany). + * work: array of n real numbers (stride 1) + * + * We must have out != in if dist < stride. + */ +void rfftw_real2c_aux(fftw_plan plan, int howmany, + fftw_real *in, int istride, int idist, + fftw_complex *out, int ostride, int odist, + fftw_real *work) +{ + fftw_plan_node *p = plan->root; + int j; + + switch (p->type) { + case FFTW_REAL2HC: + { + fftw_real2hc_codelet *codelet = p->nodeu.real2hc.codelet; + int n = plan->n; + int n2 = (n & 1) ? 0 : (n + 1) / 2; + + HACK_ALIGN_STACK_ODD; + for (j = 0; j < howmany; ++j, out += odist) { + codelet(in + j * idist, + &c_re(*out), + &c_im(*out), + istride, ostride * 2, ostride * 2); + c_im(out[0]) = 0.0; + c_im(out[n2 * ostride]) = 0.0; + } + break; + } + + default: + { + int n = plan->n; + fftw_recurse_kind recurse_kind = plan->recurse_kind; + + for (j = 0; j < howmany; ++j, in += idist, out += odist) { + rfftw_executor_simple(n, in, work, p, istride, 1, + recurse_kind); + rfftw_hc2c(n, work, out, ostride); + } + break; + } + } +} + +/* + * in: array of n/2 + 1 complex numbers (* howmany). + * out: array of n real numbers (* howmany). + * work: array of n real numbers (stride 1) + * + * We must have out != in if dist < stride. + */ +void rfftw_c2real_aux(fftw_plan plan, int howmany, + fftw_complex *in, int istride, int idist, + fftw_real *out, int ostride, int odist, + fftw_real *work) +{ + fftw_plan_node *p = plan->root; + + switch (p->type) { + case FFTW_HC2REAL: + { + fftw_hc2real_codelet *codelet = p->nodeu.hc2real.codelet; + int j; + + HACK_ALIGN_STACK_ODD; + for (j = 0; j < howmany; ++j) + codelet(&c_re(*(in + j * idist)), + &c_im(*(in + j * idist)), + out + j * odist, + istride * 2, istride * 2, ostride); + break; + } + + default: + { + int j, n = plan->n; + fftw_recurse_kind recurse_kind = plan->recurse_kind; + + for (j = 0; j < howmany; ++j, in += idist, out += odist) { + rfftw_c2hc(n, in, istride, work); + rfftw_executor_simple(n, work, out, p, 1, ostride, + recurse_kind); + } + break; + } + } +} + +/* + * The following two functions are similar to the ones above, BUT: + * + * work must contain n * howmany elements (stride 1) + * + * Can handle out == in for any stride/dist. + */ +void rfftw_real2c_overlap_aux(fftw_plan plan, int howmany, + fftw_real *in, int istride, int idist, + fftw_complex *out, int ostride, int odist, + fftw_real *work) +{ + int n = plan->n; + int j; + + rfftw(plan, howmany, in, istride, idist, work, 1, n); + + /* copy from work to out: */ + for (j = 0; j < howmany; ++j, work += n, out += odist) + rfftw_hc2c(n, work, out, ostride); +} + +void rfftw_c2real_overlap_aux(fftw_plan plan, int howmany, + fftw_complex *in, int istride, int idist, + fftw_real *out, int ostride, int odist, + fftw_real *work) +{ + int n = plan->n; + int j; + + /* copy from in to work: */ + for (j = 0; j < howmany; ++j, in += idist) + rfftw_c2hc(n, in, istride, work + j * n); + + rfftw(plan, howmany, work, 1, n, out, ostride, odist); +} diff --git a/src/sndobj/rfftw/rfftw.h b/src/sndobj/rfftw/rfftw.h new file mode 100644 index 0000000..5af4b87 --- /dev/null +++ b/src/sndobj/rfftw/rfftw.h @@ -0,0 +1,99 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* rfftw.h -- system-wide definitions for rfftw */ +#ifndef RFFTW_H +#define RFFTW_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/****************************************************************************/ + +#define RFFTW_V2 + +typedef fftw_plan rfftw_plan; +typedef fftwnd_plan rfftwnd_plan; + +#define FFTW_REAL_TO_COMPLEX FFTW_FORWARD +#define FFTW_COMPLEX_TO_REAL FFTW_BACKWARD + +extern void rfftw(rfftw_plan plan, int howmany, fftw_real *in, int istride, + int idist, fftw_real *out, int ostride, int odist); +extern void rfftw_one(rfftw_plan plan, fftw_real *in, fftw_real *out); + +extern rfftw_plan rfftw_create_plan_specific(int n, fftw_direction dir, + int flags, + fftw_real *in, int istride, + fftw_real *out, int ostride); + +extern rfftw_plan rfftw_create_plan(int n, fftw_direction dir, int flags); +extern void rfftw_destroy_plan(rfftw_plan plan); + +extern void rfftw_fprint_plan(FILE *f, rfftw_plan p); +extern void rfftw_print_plan(rfftw_plan p); + +extern void rfftw_executor_simple(int n, fftw_real *in, + fftw_real *out, + fftw_plan_node *p, + int istride, + int ostride, + fftw_recurse_kind recurse_kind); + +extern rfftwnd_plan rfftwnd_create_plan_specific(int rank, const int *n, + fftw_direction dir, int flags, + fftw_real *in, int istride, + fftw_real *out, int ostride); +extern rfftwnd_plan rfftw2d_create_plan_specific(int nx, int ny, + fftw_direction dir, int flags, + fftw_real *in, int istride, + fftw_real *out, int ostride); +extern rfftwnd_plan rfftw3d_create_plan_specific(int nx, int ny, int nz, + fftw_direction dir, int flags, + fftw_real *in, int istride, + fftw_real *out, int ostride); +extern rfftwnd_plan rfftwnd_create_plan(int rank, const int *n, + fftw_direction dir, int flags); +extern rfftwnd_plan rfftw2d_create_plan(int nx, int ny, + fftw_direction dir, int flags); +extern rfftwnd_plan rfftw3d_create_plan(int nx, int ny, int nz, + fftw_direction dir, int flags); +extern void rfftwnd_destroy_plan(rfftwnd_plan plan); +extern void rfftwnd_fprint_plan(FILE *f, rfftwnd_plan plan); +extern void rfftwnd_print_plan(rfftwnd_plan plan); +extern void rfftwnd_real_to_complex(rfftwnd_plan p, int howmany, + fftw_real *in, int istride, int idist, + fftw_complex *out, int ostride, int odist); +extern void rfftwnd_complex_to_real(rfftwnd_plan p, int howmany, + fftw_complex *in, int istride, int idist, + fftw_real *out, int ostride, int odist); +extern void rfftwnd_one_real_to_complex(rfftwnd_plan p, + fftw_real *in, fftw_complex *out); +extern void rfftwnd_one_complex_to_real(rfftwnd_plan p, + fftw_complex *in, fftw_real *out); + +/****************************************************************************/ + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ +#endif /* RFFTW_H */ diff --git a/src/sndobj/rfftw/rfftwf77.c b/src/sndobj/rfftw/rfftwf77.c new file mode 100644 index 0000000..23d2eda --- /dev/null +++ b/src/sndobj/rfftw/rfftwf77.c @@ -0,0 +1,130 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include +#include + +#ifdef F77_FUNC_ /* only compile wrappers if fortran mangling is known */ + +/* rfftwf77.c: FORTRAN-callable "wrappers" for some of the RFFTW routines. + + See also fftwf77.c. */ + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/************************************************************************/ + +void F77_FUNC_(rfftw_f77_create_plan,RFFTW_F77_CREATE_PLAN) +(fftw_plan *p, int *n, int *idir, int *flags) +{ + fftw_direction dir = *idir < 0 ? FFTW_FORWARD : FFTW_BACKWARD; + + *p = rfftw_create_plan(*n,dir,*flags); +} + +void F77_FUNC_(rfftw_f77_destroy_plan,RFFTW_F77_DESTROY_PLAN) +(fftw_plan *p) +{ + rfftw_destroy_plan(*p); +} + +void F77_FUNC_(rfftw_f77,RFFTW_F77) +(fftw_plan *p, int *howmany, fftw_real *in, int *istride, int *idist, + fftw_real *out, int *ostride, int *odist) +{ + rfftw(*p,*howmany,in,*istride,*idist,out,*ostride,*odist); +} + +void F77_FUNC_(rfftw_f77_one,RFFTW_F77_ONE) +(fftw_plan *p, fftw_real *in, fftw_real *out) +{ + rfftw_one(*p,in,out); +} + +extern void fftw_reverse_int_array(int *a, int n); + +void F77_FUNC_(rfftwnd_f77_create_plan,RFFTWND_F77_CREATE_PLAN) +(fftwnd_plan *p, int *rank, int *n, int *idir, int *flags) +{ + fftw_direction dir = *idir < 0 ? FFTW_FORWARD : FFTW_BACKWARD; + + fftw_reverse_int_array(n,*rank); /* column-major -> row-major */ + *p = rfftwnd_create_plan(*rank,n,dir,*flags); + fftw_reverse_int_array(n,*rank); /* reverse back */ +} + +void F77_FUNC_(rfftw2d_f77_create_plan,RFFTW2D_F77_CREATE_PLAN) +(fftwnd_plan *p, int *nx, int *ny, int *idir, int *flags) +{ + fftw_direction dir = *idir < 0 ? FFTW_FORWARD : FFTW_BACKWARD; + + *p = rfftw2d_create_plan(*ny,*nx,dir,*flags); +} + +void F77_FUNC_(rfftw3d_f77_create_plan,RFFTW3D_F77_CREATE_PLAN) +(fftwnd_plan *p, int *nx, int *ny, int *nz, int *idir, int *flags) +{ + fftw_direction dir = *idir < 0 ? FFTW_FORWARD : FFTW_BACKWARD; + + *p = rfftw3d_create_plan(*nz,*ny,*nx,dir,*flags); +} + +void F77_FUNC_(rfftwnd_f77_destroy_plan,RFFTWND_F77_DESTROY_PLAN) +(fftwnd_plan *p) +{ + rfftwnd_destroy_plan(*p); +} + +void F77_FUNC_(rfftwnd_f77_real_to_complex,RFFTWND_F77_REAL_TO_COMPLEX) +(fftwnd_plan *p, int *howmany, fftw_real *in, int *istride, int *idist, + fftw_complex *out, int *ostride, int *odist) +{ + rfftwnd_real_to_complex(*p,*howmany,in,*istride,*idist, + out,*ostride,*odist); +} + +void F77_FUNC_(rfftwnd_f77_one_real_to_complex,RFFTWND_F77_ONE_REAL_TO_COMPLEX) +(fftwnd_plan *p, fftw_real *in, fftw_complex *out) +{ + rfftwnd_one_real_to_complex(*p,in,out); +} + +void F77_FUNC_(rfftwnd_f77_complex_to_real,RFFTWND_F77_COMPLEX_TO_REAL) +(fftwnd_plan *p, int *howmany, fftw_complex *in, int *istride, int *idist, + fftw_real *out, int *ostride, int *odist) +{ + rfftwnd_complex_to_real(*p,*howmany,in,*istride,*idist, + out,*ostride,*odist); +} + +void F77_FUNC_(rfftwnd_f77_one_complex_to_real,RFFTWND_F77_ONE_COMPLEX_TO_REAL) +(fftwnd_plan *p, fftw_complex *in, fftw_real *out) +{ + rfftwnd_one_complex_to_real(*p,in,out); +} + +/****************************************************************************/ + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* defined(F77_FUNC_) */ diff --git a/src/sndobj/rfftw/rfftwnd.c b/src/sndobj/rfftw/rfftwnd.c new file mode 100644 index 0000000..91814f9 --- /dev/null +++ b/src/sndobj/rfftw/rfftwnd.c @@ -0,0 +1,570 @@ + +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* $Id: rfftwnd.c,v 1.1.1.1 2006/05/12 15:14:48 veplaini Exp $ */ + +#include +#include + +/********************** prototypes for rexec2 routines **********************/ + +extern void rfftw_real2c_aux(fftw_plan plan, int howmany, + fftw_real *in, int istride, int idist, + fftw_complex *out, int ostride, int odist, + fftw_real *work); +extern void rfftw_c2real_aux(fftw_plan plan, int howmany, + fftw_complex *in, int istride, int idist, + fftw_real *out, int ostride, int odist, + fftw_real *work); +extern void rfftw_real2c_overlap_aux(fftw_plan plan, int howmany, + fftw_real *in, int istride, int idist, + fftw_complex *out, int ostride, int odist, + fftw_real *work); +extern void rfftw_c2real_overlap_aux(fftw_plan plan, int howmany, + fftw_complex *in, int istride, int idist, + fftw_real *out, int ostride, int odist, + fftw_real *work); + +/********************** Initializing the RFFTWND Plan ***********************/ + +/* + * Create an fftwnd_plan specialized for specific arrays. (These + * arrays are ignored, however, if they are NULL or if the flags + * do not include FFTW_MEASURE.) The main advantage of being + * provided arrays like this is that we can do runtime timing + * measurements of our options, without worrying about allocating + * excessive scratch space. + */ +fftwnd_plan rfftwnd_create_plan_specific(int rank, const int *n, + fftw_direction dir, int flags, + fftw_real *in, int istride, + fftw_real *out, int ostride) +{ + fftwnd_plan p; + int i; + int rflags = flags & ~FFTW_IN_PLACE; + /* note that we always do rfftw transforms out-of-place in rexec2.c */ + + if (flags & FFTW_IN_PLACE) { + out = NULL; + ostride = istride; + } + istride = ostride = 1; /* + * strides don't work yet, since it is not + * clear whether they apply to real + * or complex data + */ + + if (!(p = fftwnd_create_plan_aux(rank, n, dir, flags))) + return 0; + + for (i = 0; i < rank - 1; ++i) + p->n_after[i] = (n[rank - 1]/2 + 1) * (p->n_after[i] / n[rank - 1]); + if (rank > 0) + p->n[rank - 1] = n[rank - 1] / 2 + 1; + + p->plans = fftwnd_new_plan_array(rank); + if (rank > 0 && !p->plans) { + rfftwnd_destroy_plan(p); + return 0; + } + if (rank > 0) { + p->plans[rank - 1] = rfftw_create_plan(n[rank - 1], dir, rflags); + if (!p->plans[rank - 1]) { + rfftwnd_destroy_plan(p); + return 0; + } + } + if (rank > 1) { + if (!(flags & FFTW_MEASURE) || in == 0 + || (!p->is_in_place && out == 0)) { + if (!fftwnd_create_plans_generic(p->plans, rank - 1, n, + dir, flags | FFTW_IN_PLACE)) { + rfftwnd_destroy_plan(p); + return 0; + } + } else if (dir == FFTW_COMPLEX_TO_REAL || (flags & FFTW_IN_PLACE)) { + if (!fftwnd_create_plans_specific(p->plans, rank - 1, n, + p->n_after, + dir, flags | FFTW_IN_PLACE, + (fftw_complex *) in, + istride, + 0, 0)) { + rfftwnd_destroy_plan(p); + return 0; + } + } else { + if (!fftwnd_create_plans_specific(p->plans, rank - 1, n, + p->n_after, + dir, flags | FFTW_IN_PLACE, + (fftw_complex *) out, + ostride, + 0, 0)) { + rfftwnd_destroy_plan(p); + return 0; + } + } + } + p->nbuffers = 0; + p->nwork = fftwnd_work_size(rank, p->n, flags | FFTW_IN_PLACE, + p->nbuffers + 1); + if (p->nwork && !(flags & FFTW_THREADSAFE)) { + p->work = (fftw_complex *) fftw_malloc(p->nwork + * sizeof(fftw_complex)); + if (!p->work) { + rfftwnd_destroy_plan(p); + return 0; + } + } + return p; +} + +fftwnd_plan rfftw2d_create_plan_specific(int nx, int ny, + fftw_direction dir, int flags, + fftw_real *in, int istride, + fftw_real *out, int ostride) +{ + int n[2]; + + n[0] = nx; + n[1] = ny; + + return rfftwnd_create_plan_specific(2, n, dir, flags, + in, istride, out, ostride); +} + +fftwnd_plan rfftw3d_create_plan_specific(int nx, int ny, int nz, + fftw_direction dir, int flags, + fftw_real *in, int istride, + fftw_real *out, int ostride) +{ + int n[3]; + + n[0] = nx; + n[1] = ny; + n[2] = nz; + + return rfftwnd_create_plan_specific(3, n, dir, flags, + in, istride, out, ostride); +} + +/* Create a generic fftwnd plan: */ + +fftwnd_plan rfftwnd_create_plan(int rank, const int *n, + fftw_direction dir, int flags) +{ + return rfftwnd_create_plan_specific(rank, n, dir, flags, 0, 1, 0, 1); +} + +fftwnd_plan rfftw2d_create_plan(int nx, int ny, + fftw_direction dir, int flags) +{ + return rfftw2d_create_plan_specific(nx, ny, dir, flags, 0, 1, 0, 1); +} + +fftwnd_plan rfftw3d_create_plan(int nx, int ny, int nz, + fftw_direction dir, int flags) +{ + return rfftw3d_create_plan_specific(nx, ny, nz, dir, flags, 0, 1, 0, 1); +} + +/************************ Freeing the RFFTWND Plan ************************/ + +void rfftwnd_destroy_plan(fftwnd_plan plan) +{ + fftwnd_destroy_plan(plan); +} + +/************************ Printing the RFFTWND Plan ************************/ + +void rfftwnd_fprint_plan(FILE *f, fftwnd_plan plan) +{ + fftwnd_fprint_plan(f, plan); +} + +void rfftwnd_print_plan(fftwnd_plan plan) +{ + rfftwnd_fprint_plan(stdout, plan); +} + +/*********** Computing the N-Dimensional FFT: Auxiliary Routines ************/ + +void rfftwnd_real2c_aux(fftwnd_plan p, int cur_dim, + fftw_real *in, int istride, + fftw_complex *out, int ostride, + fftw_real *work) +{ + int n_after = p->n_after[cur_dim], n = p->n[cur_dim]; + + if (cur_dim == p->rank - 2) { + /* just do the last dimension directly: */ + if (p->is_in_place) + rfftw_real2c_aux(p->plans[p->rank - 1], n, + in, istride, (n_after * istride) * 2, + out, istride, n_after * istride, + work); + else + rfftw_real2c_aux(p->plans[p->rank - 1], n, + in, istride, p->plans[p->rank - 1]->n * istride, + out, ostride, n_after * ostride, + work); + } else { /* we have at least two dimensions to go */ + int nr = p->plans[p->rank - 1]->n; + int n_after_r = p->is_in_place ? n_after * 2 + : nr * (n_after / (nr/2 + 1)); + int i; + + /* + * process the subsequent dimensions recursively, in hyperslabs, + * to get maximum locality: + */ + for (i = 0; i < n; ++i) + rfftwnd_real2c_aux(p, cur_dim + 1, + in + i * n_after_r * istride, istride, + out + i * n_after * ostride, ostride, work); + } + + /* do the current dimension (in-place): */ + fftw(p->plans[cur_dim], n_after, + out, n_after * ostride, ostride, + (fftw_complex *) work, 1, 0); + /* I hate this cast */ +} + +void rfftwnd_c2real_aux(fftwnd_plan p, int cur_dim, + fftw_complex *in, int istride, + fftw_real *out, int ostride, + fftw_real *work) +{ + int n_after = p->n_after[cur_dim], n = p->n[cur_dim]; + + /* do the current dimension (in-place): */ + fftw(p->plans[cur_dim], n_after, + in, n_after * istride, istride, + (fftw_complex *) work, 1, 0); + + if (cur_dim == p->rank - 2) { + /* just do the last dimension directly: */ + if (p->is_in_place) + rfftw_c2real_aux(p->plans[p->rank - 1], n, + in, istride, n_after * istride, + out, istride, (n_after * istride) * 2, + work); + else + rfftw_c2real_aux(p->plans[p->rank - 1], n, + in, istride, n_after * istride, + out, ostride, p->plans[p->rank - 1]->n * ostride, + work); + } else { /* we have at least two dimensions to go */ + int nr = p->plans[p->rank - 1]->n; + int n_after_r = p->is_in_place ? n_after * 2 : + nr * (n_after / (nr/2 + 1)); + int i; + + /* + * process the subsequent dimensions recursively, in hyperslabs, + * to get maximum locality: + */ + for (i = 0; i < n; ++i) + rfftwnd_c2real_aux(p, cur_dim + 1, + in + i * n_after * istride, istride, + out + i * n_after_r * ostride, ostride, work); + } +} + +/* + * alternate version of rfftwnd_aux -- this version pushes the howmany + * loop down to the leaves of the computation, for greater locality + * in cases where dist < stride. It is also required for correctness + * if in==out, and we must call a special version of the executor. + * Note that work must point to 'howmany' copies of its data + * if in == out. + */ + +void rfftwnd_real2c_aux_howmany(fftwnd_plan p, int cur_dim, + int howmany, + fftw_real *in, int istride, int idist, + fftw_complex *out, int ostride, int odist, + fftw_complex *work) +{ + int n_after = p->n_after[cur_dim], n = p->n[cur_dim]; + int k; + + if (cur_dim == p->rank - 2) { + /* just do the last dimension directly: */ + if (p->is_in_place) + for (k = 0; k < n; ++k) + rfftw_real2c_overlap_aux(p->plans[p->rank - 1], howmany, + in + (k * n_after * istride) * 2, + istride, idist, + out + (k * n_after * ostride), + ostride, odist, + (fftw_real *) work); + else { + int nlast = p->plans[p->rank - 1]->n; + for (k = 0; k < n; ++k) + rfftw_real2c_aux(p->plans[p->rank - 1], howmany, + in + k * nlast * istride, + istride, idist, + out + k * n_after * ostride, + ostride, odist, + (fftw_real *) work); + } + } else { /* we have at least two dimensions to go */ + int nr = p->plans[p->rank - 1]->n; + int n_after_r = p->is_in_place ? n_after * 2 : + nr * (n_after / (nr/2 + 1)); + int i; + + /* + * process the subsequent dimensions recursively, in hyperslabs, + * to get maximum locality: + */ + for (i = 0; i < n; ++i) + rfftwnd_real2c_aux_howmany(p, cur_dim + 1, howmany, + in + i * n_after_r * istride, istride, idist, + out + i * n_after * ostride, ostride, odist, + work); + } + + /* do the current dimension (in-place): */ + for (k = 0; k < n_after; ++k) + fftw(p->plans[cur_dim], howmany, + out + k * ostride, n_after * ostride, odist, + work, 1, 0); +} + +void rfftwnd_c2real_aux_howmany(fftwnd_plan p, int cur_dim, + int howmany, + fftw_complex *in, int istride, int idist, + fftw_real *out, int ostride, int odist, + fftw_complex *work) +{ + int n_after = p->n_after[cur_dim], n = p->n[cur_dim]; + int k; + + /* do the current dimension (in-place): */ + for (k = 0; k < n_after; ++k) + fftw(p->plans[cur_dim], howmany, + in + k * istride, n_after * istride, idist, + work, 1, 0); + + if (cur_dim == p->rank - 2) { + /* just do the last dimension directly: */ + if (p->is_in_place) + for (k = 0; k < n; ++k) + rfftw_c2real_overlap_aux(p->plans[p->rank - 1], howmany, + in + (k * n_after * istride), + istride, idist, + out + (k * n_after * ostride) * 2, + ostride, odist, + (fftw_real *) work); + else { + int nlast = p->plans[p->rank - 1]->n; + for (k = 0; k < n; ++k) + rfftw_c2real_aux(p->plans[p->rank - 1], howmany, + in + k * n_after * istride, + istride, idist, + out + k * nlast * ostride, + ostride, odist, + (fftw_real *) work); + } + } else { /* we have at least two dimensions to go */ + int nr = p->plans[p->rank - 1]->n; + int n_after_r = p->is_in_place ? n_after * 2 + : nr * (n_after / (nr/2 + 1)); + int i; + + /* + * process the subsequent dimensions recursively, in hyperslabs, + * to get maximum locality: + */ + for (i = 0; i < n; ++i) + rfftwnd_c2real_aux_howmany(p, cur_dim + 1, howmany, + in + i * n_after * istride, istride, idist, + out + i * n_after_r * ostride, ostride, odist, + work); + } +} + +/********** Computing the N-Dimensional FFT: User-Visible Routines **********/ + +void rfftwnd_real_to_complex(fftwnd_plan p, int howmany, + fftw_real *in, int istride, int idist, + fftw_complex *out, int ostride, int odist) +{ + fftw_complex *work = p->work; + int rank = p->rank; + int free_work = 0; + + if (p->dir != FFTW_REAL_TO_COMPLEX) + fftw_die("rfftwnd_real_to_complex with complex-to-real plan"); + +#ifdef FFTW_DEBUG + if (p->rank > 0 && (p->plans[0]->flags & FFTW_THREADSAFE) + && p->nwork && p->work) + fftw_die("bug with FFTW_THREADSAFE flag"); +#endif + + if (p->is_in_place) { + ostride = istride; + odist = (idist == 1 && idist < istride) ? 1 : (idist / 2); /* ugh */ + out = (fftw_complex *) in; + if (howmany > 1 && istride > idist && rank > 0) { + int new_nwork; + + new_nwork = p->n[rank - 1] * howmany; + if (new_nwork > p->nwork) { + work = (fftw_complex *) + fftw_malloc(sizeof(fftw_complex) * new_nwork); + if (!work) + fftw_die("error allocating work array"); + free_work = 1; + } + } + } + if (p->nwork && !work) { + work = (fftw_complex *) fftw_malloc(sizeof(fftw_complex) * p->nwork); + free_work = 1; + } + switch (rank) { + case 0: + break; + case 1: + if (p->is_in_place && howmany > 1 && istride > idist) + rfftw_real2c_overlap_aux(p->plans[0], howmany, + in, istride, idist, + out, ostride, odist, + (fftw_real *) work); + else + rfftw_real2c_aux(p->plans[0], howmany, + in, istride, idist, + out, ostride, odist, + (fftw_real *) work); + break; + default: /* rank >= 2 */ + { + if (howmany > 1 && ostride > odist) + rfftwnd_real2c_aux_howmany(p, 0, howmany, + in, istride, idist, + out, ostride, odist, + work); + else { + int i; + + for (i = 0; i < howmany; ++i) + rfftwnd_real2c_aux(p, 0, + in + i * idist, istride, + out + i * odist, ostride, + (fftw_real *) work); + } + } + } + + if (free_work) + fftw_free(work); +} + +void rfftwnd_complex_to_real(fftwnd_plan p, int howmany, + fftw_complex *in, int istride, int idist, + fftw_real *out, int ostride, int odist) +{ + fftw_complex *work = p->work; + int rank = p->rank; + int free_work = 0; + + if (p->dir != FFTW_COMPLEX_TO_REAL) + fftw_die("rfftwnd_complex_to_real with real-to-complex plan"); + +#ifdef FFTW_DEBUG + if (p->rank > 0 && (p->plans[0]->flags & FFTW_THREADSAFE) + && p->nwork && p->work) + fftw_die("bug with FFTW_THREADSAFE flag"); +#endif + + if (p->is_in_place) { + ostride = istride; + odist = idist; + odist = (idist == 1 && idist < istride) ? 1 : (idist * 2); /* ugh */ + out = (fftw_real *) in; + if (howmany > 1 && istride > idist && rank > 0) { + int new_nwork = p->n[rank - 1] * howmany; + if (new_nwork > p->nwork) { + work = (fftw_complex *) + fftw_malloc(sizeof(fftw_complex) * new_nwork); + if (!work) + fftw_die("error allocating work array"); + free_work = 1; + } + } + } + if (p->nwork && !work) { + work = (fftw_complex *) fftw_malloc(sizeof(fftw_complex) * p->nwork); + free_work = 1; + } + switch (rank) { + case 0: + break; + case 1: + if (p->is_in_place && howmany > 1 && istride > idist) + rfftw_c2real_overlap_aux(p->plans[0], howmany, + in, istride, idist, + out, ostride, odist, + (fftw_real *) work); + else + rfftw_c2real_aux(p->plans[0], howmany, + in, istride, idist, + out, ostride, odist, + (fftw_real *) work); + break; + default: /* rank >= 2 */ + { + if (howmany > 1 && ostride > odist) + rfftwnd_c2real_aux_howmany(p, 0, howmany, + in, istride, idist, + out, ostride, odist, + work); + else { + int i; + + for (i = 0; i < howmany; ++i) + rfftwnd_c2real_aux(p, 0, + in + i * idist, istride, + out + i * odist, ostride, + (fftw_real *) work); + } + } + } + + if (free_work) + fftw_free(work); +} + +void rfftwnd_one_real_to_complex(fftwnd_plan p, + fftw_real *in, fftw_complex *out) +{ + rfftwnd_real_to_complex(p, 1, in, 1, 1, out, 1, 1); +} + +void rfftwnd_one_complex_to_real(fftwnd_plan p, + fftw_complex *in, fftw_real *out) +{ + rfftwnd_complex_to_real(p, 1, in, 1, 1, out, 1, 1); +} diff --git a/src/sndobj/rfftw/rgeneric.c b/src/sndobj/rfftw/rgeneric.c new file mode 100644 index 0000000..7feb92d --- /dev/null +++ b/src/sndobj/rfftw/rgeneric.c @@ -0,0 +1,188 @@ + +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* + * rgeneric.c -- "generic" rfftw codelets. They work for all n (and + * they are slow) + */ +#include +#include + +/* this code assumes that r and m are both odd */ +void fftw_hc2hc_forward_generic(fftw_real *A, const fftw_complex *W, + int m, int r, int n, int dist) +{ + int i, j, k; + fftw_complex *tmp = (fftw_complex *) + fftw_malloc(r * sizeof(fftw_complex)); + fftw_real rsum, isum; + fftw_real *X, *YO, *YI; + int wp, wincr; + int iostride = m * dist; + X = A; + YO = A + r * iostride; + YI = A + iostride; + + /* compute the transform of the r 0th elements (which are real) */ + for (i = 0; i + i < r; ++i) { + rsum = 0.0; + isum = 0.0; + wincr = m * i; + for (j = 0, wp = 0; j < r; ++j) { + fftw_real tw_r = c_re(W[wp]); + fftw_real tw_i = c_im(W[wp]); + fftw_real re = X[j * iostride]; + rsum += re * tw_r; + isum += re * tw_i; + wp += wincr; + if (wp >= n) + wp -= n; + } + c_re(tmp[i]) = rsum; + c_im(tmp[i]) = isum; + } + + /* store the transform back onto the A array */ + X[0] = c_re(tmp[0]); + for (i = 1; i + i < r; ++i) { + X[i * iostride] = c_re(tmp[i]); + YO[-i * iostride] = c_im(tmp[i]); + } + + X += dist; + YI -= dist; + YO -= dist; + + /* compute the transform of the middle elements (which are complex) */ + for (k = 1; k + k < m; ++k, X += dist, YI -= dist, YO -= dist) { + for (i = 0; i < r; ++i) { + rsum = 0.0; + isum = 0.0; + wincr = k + m * i; + for (j = 0, wp = 0; j < r; ++j) { + fftw_real tw_r = c_re(W[wp]); + fftw_real tw_i = c_im(W[wp]); + fftw_real re = X[j * iostride]; + fftw_real im = YI[j * iostride]; + rsum += re * tw_r - im * tw_i; + isum += re * tw_i + im * tw_r; + wp += wincr; + if (wp >= n) + wp -= n; + } + c_re(tmp[i]) = rsum; + c_im(tmp[i]) = isum; + } + + /* store the transform back onto the A array */ + for (i = 0; i + i < r; ++i) { + X[i * iostride] = c_re(tmp[i]); + YO[-i * iostride] = c_im(tmp[i]); + } + for (; i < r; ++i) { + X[i * iostride] = -c_im(tmp[i]); + YO[-i * iostride] = c_re(tmp[i]); + } + } + + /* no final element, since m is odd */ + fftw_free(tmp); +} + +void fftw_hc2hc_backward_generic(fftw_real *A, const fftw_complex *W, + int m, int r, int n, int dist) +{ + int i, j, k; + int wp, wincr; + fftw_complex *tmp = (fftw_complex *) + fftw_malloc(r * sizeof(fftw_complex)); + fftw_real rsum, isum; + fftw_real *X, *YO, *YI; + int iostride = m * dist; + X = A; + YO = A + iostride; + YI = A + r * iostride; + + /* + * compute the transform of the r 0th elements (which are halfcomplex) + * yielding real numbers + */ + /* copy the input into the temporary array */ + c_re(tmp[0]) = X[0]; + for (i = 1; i + i < r; ++i) { + c_re(tmp[i]) = X[i * iostride]; + c_im(tmp[i]) = YI[-i * iostride]; + } + + for (i = 0; i < r; ++i) { + rsum = 0.0; + wincr = m * i; + for (j = 1, wp = wincr; j + j < r; ++j) { + fftw_real tw_r = c_re(W[wp]); + fftw_real tw_i = c_im(W[wp]); + fftw_real re = c_re(tmp[j]); + fftw_real im = c_im(tmp[j]); + rsum += re * tw_r + im * tw_i; + wp += wincr; + if (wp >= n) + wp -= n; + } + X[i * iostride] = 2.0 * rsum + c_re(tmp[0]); + } + + X += dist; + YI -= dist; + YO -= dist; + + /* compute the transform of the middle elements (which are complex) */ + for (k = 1; k + k < m; ++k, X += dist, YI -= dist, YO -= dist) { + /* copy the input into the temporary array */ + for (i = 0; i + i < r; ++i) { + c_re(tmp[i]) = X[i * iostride]; + c_im(tmp[i]) = YI[-i * iostride]; + } + for (; i < r; ++i) { + c_im(tmp[i]) = -X[i * iostride]; + c_re(tmp[i]) = YI[-i * iostride]; + } + + for (i = 0; i < r; ++i) { + rsum = 0.0; + isum = 0.0; + wincr = m * i; + for (j = 0, wp = k * i; j < r; ++j) { + fftw_real tw_r = c_re(W[wp]); + fftw_real tw_i = c_im(W[wp]); + fftw_real re = c_re(tmp[j]); + fftw_real im = c_im(tmp[j]); + rsum += re * tw_r + im * tw_i; + isum += im * tw_r - re * tw_i; + wp += wincr; + if (wp >= n) + wp -= n; + } + X[i * iostride] = rsum; + YO[i * iostride] = isum; + } + } + + /* no final element, since m is odd */ + fftw_free(tmp); +} diff --git a/src/sndobj/rfftw/rplanner.c b/src/sndobj/rfftw/rplanner.c new file mode 100644 index 0000000..643dc02 --- /dev/null +++ b/src/sndobj/rfftw/rplanner.c @@ -0,0 +1,471 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* + * planner.c -- find the optimal plan + */ + +/* $Id: rplanner.c,v 1.1.1.1 2006/05/12 15:14:53 veplaini Exp $ */ +#ifdef FFTW_USING_CILK +#include +#include +#endif + +#include +#include + +#include +#include + +extern fftw_codelet_desc *rfftw_config[]; /* global from rconfig.c */ +extern fftw_rgeneric_codelet fftw_hc2hc_forward_generic; +extern fftw_rgeneric_codelet fftw_hc2hc_backward_generic; + +fftw_plan_hook_ptr rfftw_plan_hook = (fftw_plan_hook_ptr) NULL; + +/* timing rfftw plans: */ +static double rfftw_measure_runtime(fftw_plan plan, + fftw_real *in, int istride, + fftw_real *out, int ostride) +{ + fftw_time begin, end, start; + double t, tmin; + int i, iter; + int n; + int repeat; + int howmany = plan->vector_size; + + n = plan->n; + + iter = 1; + + for (;;) { + tmin = 1.0E10; + for (i = 0; i < n * howmany; ++i) + in[istride * i] = 0.0; + + start = fftw_get_time(); + /* repeat the measurement FFTW_TIME_REPEAT times */ + for (repeat = 0; repeat < FFTW_TIME_REPEAT; ++repeat) { + begin = fftw_get_time(); + for (i = 0; i < iter; ++i) + rfftw(plan, howmany, in, istride, istride, + out, ostride, ostride); + end = fftw_get_time(); + + t = fftw_time_to_sec(fftw_time_diff(end, begin)); + if (t < tmin) + tmin = t; + + /* do not run for too long */ + t = fftw_time_to_sec(fftw_time_diff(end, start)); + if (t > FFTW_TIME_LIMIT) + break; + } + + if (tmin >= FFTW_TIME_MIN) + break; + + iter *= 2; + } + + tmin /= (double) iter; + return tmin; +} + +/* auxiliary functions */ +static void rcompute_cost(fftw_plan plan, + fftw_real *in, int istride, + fftw_real *out, int ostride) +{ + if (plan->flags & FFTW_MEASURE) + plan->cost = rfftw_measure_runtime(plan, in, istride, out, ostride); + else { + double c; + c = plan->n * fftw_estimate_node(plan->root) * plan->vector_size; + plan->cost = c; + } +} + +static void run_plan_hooks(fftw_plan p) +{ + if (rfftw_plan_hook && p) { + fftw_complete_twiddle(p->root, p->n); + rfftw_plan_hook(p); + } +} + +/* macrology */ +#define FOR_ALL_RCODELETS(p) \ + fftw_codelet_desc **__q, *p; \ + for (__q = &rfftw_config[0]; (p = (*__q)); ++__q) + +/****************************************** + * Recursive planner * + ******************************************/ +static fftw_plan rplanner(fftw_plan *table, int n, + fftw_direction dir, int flags, int vector_size, + fftw_real *, int, fftw_real *, int); + +/* + * the planner consists of two parts: one that tries to + * use accumulated wisdom, and one that does not. + * A small driver invokes both parts in sequence + */ + +/* planner with wisdom: look up the codelet suggested by the wisdom */ +static fftw_plan rplanner_wisdom(fftw_plan *table, int n, + fftw_direction dir, int flags, + int vector_size, + fftw_real *in, int istride, + fftw_real *out, int ostride) +{ + fftw_plan best = (fftw_plan) 0; + fftw_plan_node *node; + int have_wisdom; + enum fftw_node_type wisdom_type; + int wisdom_signature; + fftw_recurse_kind wisdom_recurse_kind; + + /* see if we remember any wisdom for this case */ + have_wisdom = fftw_wisdom_lookup(n, flags, dir, RFFTW_WISDOM, + istride, ostride, + &wisdom_type, &wisdom_signature, + &wisdom_recurse_kind, 0); + + if (!have_wisdom) + return best; + + if (wisdom_type == FFTW_REAL2HC || wisdom_type == FFTW_HC2REAL) { + FOR_ALL_RCODELETS(p) { + if (p->dir == dir && p->type == wisdom_type) { + /* see if wisdom applies */ + if (wisdom_signature == p->signature && + p->size == n) { + if (wisdom_type == FFTW_REAL2HC) + node = fftw_make_node_real2hc(n, p); + else + node = fftw_make_node_hc2real(n, p); + best = fftw_make_plan(n, dir, node, flags, + p->type, p->signature, + FFTW_NORMAL_RECURSE, + vector_size); + fftw_use_plan(best); + run_plan_hooks(best); + return best; + } + } + } + } + if (wisdom_type == FFTW_HC2HC) { + FOR_ALL_RCODELETS(p) { + if (p->dir == dir && p->type == wisdom_type) { + + /* see if wisdom applies */ + if (wisdom_signature == p->signature && + p->size > 1 && + (n % p->size) == 0) { + fftw_plan r = rplanner(table, n / p->size, dir, + flags | FFTW_NO_VECTOR_RECURSE, + wisdom_recurse_kind == + FFTW_VECTOR_RECURSE ? + p->size : vector_size, + in, istride, out, + ostride); + if (!r) + continue; + node = fftw_make_node_hc2hc(n, dir, p, + r->root, flags); + best = fftw_make_plan(n, dir, node, flags, + p->type, p->signature, + wisdom_recurse_kind, + vector_size); + fftw_use_plan(best); + run_plan_hooks(best); + fftw_destroy_plan_internal(r); + return best; + } + } + } + } + /* + * BUG (or: TODO) Can we have generic wisdom? This is probably + * an academic question + */ + + return best; +} + +/* + * planner with no wisdom: try all combinations and pick + * the best + */ + +static fftw_plan rplanner_normal(fftw_plan *table, int n, fftw_direction dir, + int flags, int vector_size, + fftw_real *in, int istride, + fftw_real *out, int ostride) +{ + fftw_plan best = (fftw_plan) 0; + fftw_plan newplan; + fftw_plan_node *node; + + /* see if we have any codelet that solves the problem */ + { + FOR_ALL_RCODELETS(p) { + if (p->dir == dir && + (p->type == FFTW_REAL2HC || p->type == FFTW_HC2REAL)) { + if (p->size == n) { + if (p->type == FFTW_REAL2HC) + node = fftw_make_node_real2hc(n, p); + else + node = fftw_make_node_hc2real(n, p); + newplan = fftw_make_plan(n, dir, node, flags, + p->type, p->signature, + FFTW_NORMAL_RECURSE, + vector_size); + fftw_use_plan(newplan); + run_plan_hooks(newplan); + rcompute_cost(newplan, in, istride, out, ostride); + best = fftw_pick_better(newplan, best); + } + } + } + } + + /* Then, try all available twiddle codelets */ + { + FOR_ALL_RCODELETS(p) { + if (p->dir == dir && p->type == FFTW_HC2HC) { + if ((n % p->size) == 0 && + p->size > 1 && + (!best || n != p->size)) { + fftw_plan r = rplanner(table, n / p->size, dir, + flags | FFTW_NO_VECTOR_RECURSE, + vector_size, + in, istride, out, ostride); + if (!r) + continue; + node = fftw_make_node_hc2hc(n, dir, p, + r->root, flags); + newplan = fftw_make_plan(n, dir, node, flags, + p->type, p->signature, + FFTW_NORMAL_RECURSE, + vector_size); + fftw_use_plan(newplan); + run_plan_hooks(newplan); + fftw_destroy_plan_internal(r); + rcompute_cost(newplan, in, istride, out, ostride); + best = fftw_pick_better(newplan, best); + } + } + } + } + + /* try vector recursion unless prohibited by the flags: */ + if (! (flags & FFTW_NO_VECTOR_RECURSE)) { + FOR_ALL_RCODELETS(p) { + if (p->dir == dir && p->type == FFTW_HC2HC) { + if ((n % p->size) == 0 && + p->size > 1 && + (!best || n != p->size)) { + fftw_plan r = rplanner(table, n / p->size, dir, + flags | FFTW_NO_VECTOR_RECURSE, + p->size, + in, istride, out, ostride); + if (!r) + continue; + node = fftw_make_node_hc2hc(n, dir, p, + r->root, flags); + newplan = fftw_make_plan(n, dir, node, flags, + p->type, p->signature, + FFTW_VECTOR_RECURSE, + vector_size); + fftw_use_plan(newplan); + run_plan_hooks(newplan); + fftw_destroy_plan_internal(r); + rcompute_cost(newplan, in, istride, out, ostride); + best = fftw_pick_better(newplan, best); + } + } + } + } + + /* + * Resort to generic codelets for unknown factors, but only if + * n is odd--the rgeneric codelets can't handle even n's. + */ + if (n % 2 != 0) { + fftw_rgeneric_codelet *codelet = (dir == FFTW_FORWARD ? + fftw_hc2hc_forward_generic : + fftw_hc2hc_backward_generic); + int size, prev_size = 0, remaining_factors = n; + fftw_plan r; + + while (remaining_factors > 1) { + size = fftw_factor(remaining_factors); + remaining_factors /= size; + + /* don't try the same factor more than once */ + if (size == prev_size) + continue; + prev_size = size; + + /* Look for codelets corresponding to this factor. */ + { + FOR_ALL_RCODELETS(p) { + if (p->dir == dir && p->type == FFTW_HC2HC + && p->size == size) { + size = 0; + break; + } + } + } + + /* + * only try a generic/rader codelet if there were no + * twiddle codelets for this factor + */ + if (!size) + continue; + + r = rplanner(table, n / size, dir, + flags | FFTW_NO_VECTOR_RECURSE, + vector_size, + in, istride, out, ostride); + + node = fftw_make_node_rgeneric(n, size, dir, codelet, + r->root, flags); + newplan = fftw_make_plan(n, dir, node, flags, FFTW_RGENERIC, 0, + FFTW_NORMAL_RECURSE, vector_size); + fftw_use_plan(newplan); + run_plan_hooks(newplan); + fftw_destroy_plan_internal(r); + rcompute_cost(newplan, in, istride, out, ostride); + best = fftw_pick_better(newplan, best); + } + } + return best; +} + +static fftw_plan rplanner(fftw_plan *table, int n, fftw_direction dir, + int flags, int vector_size, + fftw_real *in, int istride, + fftw_real *out, int ostride) +{ + fftw_plan best = (fftw_plan) 0; + + if (vector_size > 1) + flags |= FFTW_NO_VECTOR_RECURSE; + + /* see if plan has already been computed */ + best = fftw_lookup(table, n, flags, vector_size); + if (best) { + fftw_use_plan(best); + return best; + } + /* try a wise plan */ + best = rplanner_wisdom(table, n, dir, flags, vector_size, + in, istride, out, ostride); + + if (!best) { + /* No wisdom. Plan normally. */ + best = rplanner_normal(table, n, dir, flags, + vector_size, + in, istride, out, ostride); + } + if (best) { + fftw_insert(table, best); + + /* remember the wisdom */ + fftw_wisdom_add(n, flags, dir, RFFTW_WISDOM, + istride, ostride, + best->wisdom_type, + best->wisdom_signature, + best->recurse_kind); + } + return best; +} + +fftw_plan rfftw_create_plan_specific(int n, fftw_direction dir, int flags, + fftw_real *in, int istride, + fftw_real *out, int ostride) +{ + fftw_plan table; + fftw_plan p1; + + /* validate parameters */ + if (n <= 0) + return (fftw_plan) 0; + +#ifndef FFTW_ENABLE_VECTOR_RECURSE + /* TEMPORARY: disable vector recursion until it is more tested. */ + flags |= FFTW_NO_VECTOR_RECURSE; +#endif + + if ((dir != FFTW_FORWARD) && (dir != FFTW_BACKWARD)) + return (fftw_plan) 0; + + fftw_make_empty_table(&table); + p1 = rplanner(&table, n, dir, flags, 1, + in, istride, out, ostride); + fftw_destroy_table(&table); + + if (p1) + fftw_complete_twiddle(p1->root, n); + return p1; +} + +fftw_plan rfftw_create_plan(int n, fftw_direction dir, int flags) +{ + fftw_real *tmp_in; + fftw_real *tmp_out; + fftw_plan p; + + if (flags & FFTW_MEASURE) { + tmp_in = (fftw_real *) fftw_malloc(2 * n * sizeof(fftw_real)); + if (!tmp_in) + return 0; + tmp_out = tmp_in + n; + + p = rfftw_create_plan_specific(n, dir, flags, + tmp_in, 1, tmp_out, 1); + + fftw_free(tmp_in); + } else + p = rfftw_create_plan_specific(n, dir, flags, + (fftw_real *) 0, 1, (fftw_real *) 0, 1); + + return p; +} + +void rfftw_destroy_plan(fftw_plan plan) +{ + fftw_destroy_plan_internal(plan); +} + +void rfftw_fprint_plan(FILE *f, fftw_plan p) +{ + fftw_fprint_plan(f, p); +} + +void rfftw_print_plan(fftw_plan p) +{ + rfftw_fprint_plan(stdout, p); +} diff --git a/src/sndobj/rfftw/timer.c b/src/sndobj/rfftw/timer.c new file mode 100644 index 0000000..642a7f2 --- /dev/null +++ b/src/sndobj/rfftw/timer.c @@ -0,0 +1,164 @@ + +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* + * timer.c -- this file measures the execution time of + * ffts. This information is used by the planner. + */ + +/* $Id: timer.c,v 1.1.1.1 2006/05/12 15:14:53 veplaini Exp $ */ + +#include +#include +#include +#include + +/********************* System-specific Timing Support *********************/ + +#if defined(HAVE_MAC_TIMER) && !defined(HAVE_MAC_PCI_TIMER) + +/* Use Macintosh Time Manager to get the time: */ + +/* + * make sure compiler (CW) recognizes the pascal keywords that are in + * Timer.h + */ +#pragma only_std_keywords off + +#include + +#pragma only_std_keywords reset + +fftw_time get_Mac_microseconds(void) +{ + fftw_time t; + UnsignedWide microsec; /* + * microsec.lo and microsec.hi are + * unsigned long's, and are the two parts + * of a 64 bit unsigned integer + */ + + Microseconds(µsec); /* get time in microseconds */ + + /* store lo and hi words into our structure: */ + t.lo = microsec.lo; + t.hi = microsec.hi; + + return t; +} + +fftw_time fftw_time_diff(fftw_time t1, fftw_time t2) +/* + * This function takes the difference t1 - t2 of two 64 bit + * integers, represented by the 32 bit lo and hi words. + * if t1 < t2, returns 0. + */ +{ + fftw_time diff; + + if (t1.hi < t2.hi) { /* something is wrong...t1 < t2! */ + diff.hi = diff.lo = 0; + return diff; + } else + diff.hi = t1.hi - t2.hi; + + if (t1.lo < t2.lo) { + if (diff.hi > 0) + diff.hi -= 1; /* carry */ + else { /* something is wrong...t1 < t2! */ + diff.hi = diff.lo = 0; + return diff; + } + } + diff.lo = t1.lo - t2.lo; + + return diff; +} + +#endif + +#ifdef HAVE_WIN32_TIMER +#include + +static LARGE_INTEGER gFreq; +static int gHaveHiResTimer = 0; +static int gFirstTime = 1; + +unsigned long GetPerfTime(void) +{ + LARGE_INTEGER lCounter; + + if (gFirstTime) { + gFirstTime = 0; + + if (QueryPerformanceFrequency(&gFreq)) { + gHaveHiResTimer = 1; + } + } + if (gHaveHiResTimer) { + QueryPerformanceCounter(&lCounter); + return lCounter.u.LowPart; + } else { + return (unsigned long) clock(); + } +} + +double GetPerfSec(double pTime) +{ + if (gHaveHiResTimer) { + return pTime / gFreq.u.LowPart; // assumes HighPart==0 + + } else { + return pTime / CLOCKS_PER_SEC; + } +} + +#endif /* HAVE_WIN32_TIMER */ + +#if defined(FFTW_USE_GETTIMEOFDAY) + +/* timer support routines for systems having gettimeofday */ + +#if defined(HAVE_BSDGETTIMEOFDAY) && ! defined(HAVE_GETTIMEOFDAY) +#define gettimeofday BSDgettimeofday +#endif + +fftw_time fftw_gettimeofday_get_time(void) +{ + struct timeval tv; + gettimeofday(&tv, 0); + return tv; +} + +fftw_time fftw_gettimeofday_time_diff(fftw_time t1, fftw_time t2) +{ + fftw_time diff; + + diff.tv_sec = t1.tv_sec - t2.tv_sec; + diff.tv_usec = t1.tv_usec - t2.tv_usec; + /* normalize */ + while (diff.tv_usec < 0) { + diff.tv_usec += 1000000L; + diff.tv_sec -= 1; + } + + return diff; +} +#endif diff --git a/src/sndobj/rfftw/twiddle.c b/src/sndobj/rfftw/twiddle.c new file mode 100644 index 0000000..46938f6 --- /dev/null +++ b/src/sndobj/rfftw/twiddle.c @@ -0,0 +1,223 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* + * twiddle.c -- compute twiddle factors + * These are the twiddle factors for *direct* fft. Flip sign to get + * the inverse + */ + +/* $Id: twiddle.c,v 1.1.1.1 2006/05/12 15:14:43 veplaini Exp $ */ +#ifdef FFTW_USING_CILK +#include +#include +#endif + +#include +#include +#include +#include + +#ifndef TRUE +#define TRUE (1 == 1) +#endif + +#ifndef FALSE +#define FALSE (1 == 0) +#endif + +#ifdef USE_FFTW_SAFE_MULMOD +/* compute (x * y) mod p, but watch out for integer overflows; we must + have x, y >= 0, p > 0. This routine is slow. */ +int fftw_safe_mulmod(int x, int y, int p) +{ + if (y == 0 || x <= INT_MAX / y) + return((x * y) % p); + else { + int y2 = y/2; + return((fftw_safe_mulmod(x, y2, p) + + fftw_safe_mulmod(x, y - y2, p)) % p); + } +} +#endif /* USE_FFTW_SAFE_MULMOD */ + +static fftw_complex *fftw_compute_rader_twiddle(int n, int r, int g) +{ + FFTW_TRIG_REAL twoPiOverN; + int m = n / r; + int i, j, gpower; + fftw_complex *W; + + twoPiOverN = FFTW_K2PI / (FFTW_TRIG_REAL) n; + W = (fftw_complex *) fftw_malloc((r - 1) * m * sizeof(fftw_complex)); + for (i = 0; i < m; ++i) + for (gpower = 1, j = 0; j < r - 1; ++j, + gpower = MULMOD(gpower, g, r)) { + int k = i * (r - 1) + j; + FFTW_TRIG_REAL + ij = (FFTW_TRIG_REAL) (i * gpower); + c_re(W[k]) = FFTW_TRIG_COS(twoPiOverN * ij); + c_im(W[k]) = FFTW_FORWARD * FFTW_TRIG_SIN(twoPiOverN * ij); + } + + return W; +} + +/* + * compute the W coefficients (that is, powers of the root of 1) + * and store them into an array. + */ +static fftw_complex *fftw_compute_twiddle(int n, const fftw_codelet_desc *d) +{ + FFTW_TRIG_REAL twoPiOverN; + int i, j; + fftw_complex *W; + + twoPiOverN = FFTW_K2PI / (FFTW_TRIG_REAL) n; + + if (!d) { + /* generic codelet, needs all twiddles in order */ + W = (fftw_complex *) fftw_malloc(n * sizeof(fftw_complex)); + for (i = 0; i < n; ++i) { + c_re(W[i]) = FFTW_TRIG_COS(twoPiOverN * (FFTW_TRIG_REAL) i); + c_im(W[i]) = FFTW_FORWARD * FFTW_TRIG_SIN(twoPiOverN * (FFTW_TRIG_REAL) i); + } + } else if (d->type == FFTW_RADER) + W = fftw_compute_rader_twiddle(n, d->size, d->signature); + else { + int r = d->size; + int m = n / r, m_alloc; + int r1 = d->ntwiddle; + int istart; + + if (d->type == FFTW_TWIDDLE) { + istart = 0; + m_alloc = m; + } else if (d->type == FFTW_HC2HC) { + /* + * This is tricky, do not change lightly. + */ + m = (m + 1) / 2; + m_alloc = m - 1; + istart = 1; + } else { + fftw_die("compute_twiddle: invalid argument\n"); + /* paranoia for gcc */ + m_alloc = 0; + istart = 0; + } + + W = (fftw_complex *) fftw_malloc(r1 * m_alloc * sizeof(fftw_complex)); + for (i = istart; i < m; ++i) + for (j = 0; j < r1; ++j) { + int k = (i - istart) * r1 + j; + FFTW_TRIG_REAL + ij = (FFTW_TRIG_REAL) (i * d->twiddle_order[j]); + c_re(W[k]) = FFTW_TRIG_COS(twoPiOverN * ij); + c_im(W[k]) = FFTW_FORWARD * FFTW_TRIG_SIN(twoPiOverN * ij); + } + } + + return W; +} + +/* + * these routines implement a simple reference-count-based + * management of twiddle structures + */ +static fftw_twiddle *twlist = (fftw_twiddle *) 0; +int fftw_twiddle_size = 0; /* total allocated size, for debugging */ + +/* true if the two codelets can share the same twiddle factors */ +static int compatible(const fftw_codelet_desc *d1, const fftw_codelet_desc *d2) +{ + int i; + + /* true if they are the same codelet */ + if (d1 == d2) + return TRUE; + + /* false if one is null and the other is not */ + if (!d1 || !d2) + return FALSE; + + /* false if size is different */ + if (d1->size != d2->size) + return FALSE; + + /* false if different types (FFTW_TWIDDLE/FFTW_HC2HC/FFTW_RADER) */ + if (d1->type != d2->type) + return FALSE; + + /* false if they need different # of twiddles */ + if (d1->ntwiddle != d2->ntwiddle) + return FALSE; + + /* false if the twiddle orders are different */ + for (i = 0; i < d1->ntwiddle; ++i) + if (d1->twiddle_order[i] != d2->twiddle_order[i]) + return FALSE; + + return TRUE; +} + +fftw_twiddle *fftw_create_twiddle(int n, const fftw_codelet_desc *d) +{ + fftw_twiddle *tw; + + /* lookup this n in the twiddle list */ + for (tw = twlist; tw; tw = tw->next) + if (n == tw->n && compatible(d, tw->cdesc)) { + ++tw->refcnt; + return tw; + } + /* not found --- allocate a new struct twiddle */ + tw = (fftw_twiddle *) fftw_malloc(sizeof(fftw_twiddle)); + fftw_twiddle_size += n; + + tw->n = n; + tw->cdesc = d; + tw->twarray = fftw_compute_twiddle(n, d); + tw->refcnt = 1; + + /* enqueue the new struct */ + tw->next = twlist; + twlist = tw; + + return tw; +} + +void fftw_destroy_twiddle(fftw_twiddle * tw) +{ + fftw_twiddle **p; + --tw->refcnt; + + if (tw->refcnt == 0) { + /* remove from the list of known twiddle factors */ + for (p = &twlist; p; p = &((*p)->next)) + if (*p == tw) { + *p = tw->next; + fftw_twiddle_size -= tw->n; + fftw_free(tw->twarray); + fftw_free(tw); + return; + } + fftw_die("BUG in fftw_destroy_twiddle\n"); + } +} diff --git a/src/sndobj/rfftw/wisdom.c b/src/sndobj/rfftw/wisdom.c new file mode 100644 index 0000000..f6f1adf --- /dev/null +++ b/src/sndobj/rfftw/wisdom.c @@ -0,0 +1,317 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* + * wisdom.c -- manage the wisdom + */ + +#include +#include +#include +#include + +struct wisdom { + int n; + int flags; + fftw_direction dir; + enum fftw_wisdom_category category; + int istride; + int ostride; + int vector_size; + enum fftw_node_type type; /* this is the wisdom */ + int signature; /* this is the wisdom */ + fftw_recurse_kind recurse_kind; /* this is the wisdom */ + struct wisdom *next; +}; + +/* list of wisdom */ +static struct wisdom *wisdom_list = (struct wisdom *) 0; + +int fftw_wisdom_lookup(int n, int flags, fftw_direction dir, + enum fftw_wisdom_category category, + int istride, int ostride, + enum fftw_node_type *type, + int *signature, fftw_recurse_kind *recurse_kind, + int replacep) +{ + struct wisdom *p; + + if (!(flags & FFTW_USE_WISDOM)) + return 0; /* simply ignore if wisdom is disabled */ + + flags |= FFTW_MEASURE; /* + * always use (only) wisdom from + * measurements + */ + + for (p = wisdom_list; p; p = p->next) { + if (p->n == n && p->flags == flags && p->dir == dir && + p->istride == istride && p->ostride == ostride && + p->category == category) { + /* found wisdom */ + if (replacep) { + /* replace old wisdom with new */ + p->type = *type; + p->signature = *signature; + p->recurse_kind = *recurse_kind; + } else { + *type = p->type; + *signature = p->signature; + *recurse_kind = p->recurse_kind; + } + return 1; + } + } + + return 0; +} + +void fftw_wisdom_add(int n, int flags, fftw_direction dir, + enum fftw_wisdom_category category, + int istride, int ostride, + enum fftw_node_type type, + int signature, + fftw_recurse_kind recurse_kind) +{ + struct wisdom *p; + + if ((flags & FFTW_NO_VECTOR_RECURSE) && + recurse_kind == FFTW_VECTOR_RECURSE) + fftw_die("bug in planner (conflicting plan options)\n"); + + if (!(flags & FFTW_USE_WISDOM)) + return; /* simply ignore if wisdom is disabled */ + + if (!(flags & FFTW_MEASURE)) + return; /* only measurements produce wisdom */ + + if (fftw_wisdom_lookup(n, flags, dir, category, istride, ostride, + &type, &signature, &recurse_kind, 1)) + return; /* wisdom overwrote old wisdom */ + + p = (struct wisdom *) fftw_malloc(sizeof(struct wisdom)); + + p->n = n; + p->flags = flags; + p->dir = dir; + p->category = category; + p->istride = istride; + p->ostride = ostride; + p->type = type; + p->signature = signature; + p->recurse_kind = recurse_kind; + + /* remember this wisdom */ + p->next = wisdom_list; + wisdom_list = p; +} + +void fftw_forget_wisdom(void) +{ + while (wisdom_list) { + struct wisdom *p; + + p = wisdom_list; + wisdom_list = wisdom_list->next; + fftw_free(p); + } +} + +/* + * user-visible routines, to convert wisdom into strings etc. + */ +static const char *WISDOM_FORMAT_VERSION = "FFTW-";// FFTW_VERSION; + +static void (*emit) (char c, void *data); + +static void emit_string(const char *s, void *data) +{ + while (*s) + emit(*s++, data); +} + +static void emit_int(int n, void *data) +{ + char buf[128]; + + sprintf(buf, "%d", n); + emit_string(buf, data); +} + +/* dump wisdom in lisp-like format */ +void fftw_export_wisdom(void (*emitter) (char c, void *), void *data) +{ + struct wisdom *p; + + /* install the output handler */ + emit = emitter; + + emit('(', data); + emit_string(WISDOM_FORMAT_VERSION, data); + + for (p = wisdom_list; p; p = p->next) { + emit(' ', data); /* separator to make the output nicer */ + emit('(', data); + emit_int((int) p->n, data); + emit(' ', data); + emit_int((int) p->flags, data); + emit(' ', data); + emit_int((int) p->dir, data); + emit(' ', data); + emit_int((int) p->category, data); + emit(' ', data); + emit_int((int) p->istride, data); + emit(' ', data); + emit_int((int) p->ostride, data); + emit(' ', data); + emit_int((int) p->type, data); + emit(' ', data); + emit_int((int) p->signature, data); + emit(' ', data); + emit_int((int) p->recurse_kind, data); + emit(')', data); + } + emit(')', data); +} + +/* input part */ +static int next_char; +static int (*get_input) (void *data); +static fftw_status input_error; + +static void read_char(void *data) +{ + next_char = get_input(data); + if (next_char == 0 || + next_char == EOF) + input_error = FFTW_FAILURE; +} + +/* skip blanks, newlines, tabs, etc */ +static void eat_blanks(void *data) +{ + while (isspace(next_char)) + read_char(data); +} + +static int read_int(void *data) +{ + int sign = 1; + int n = 0; + + eat_blanks(data); + if (next_char == '-') { + sign = -1; + read_char(data); + eat_blanks(data); + } + if (!isdigit(next_char)) { + /* error, no digit */ + input_error = FFTW_FAILURE; + return 0; + } + while (isdigit(next_char)) { + n = n * 10 + (next_char - '0'); + read_char(data); + } + + return sign * n; +} + +#define EXPECT(c) \ +{ \ + eat_blanks(data); \ + if (input_error == FFTW_FAILURE || \ + next_char != c) \ + return FFTW_FAILURE; \ + read_char(data); \ +} + +#define EXPECT_INT(n) \ +{ \ + n = read_int(data); \ + if (input_error == FFTW_FAILURE) \ + return FFTW_FAILURE; \ +} + +#define EXPECT_STRING(s) \ +{ \ + const char *s1 = s; \ + while (*s1) { \ + EXPECT(*s1); \ + ++s1; \ + } \ +} + +fftw_status fftw_import_wisdom(int (*g) (void *), void *data) +{ + int n; + int flags; + fftw_direction dir; + int dir_int; + enum fftw_wisdom_category category; + int category_int; + enum fftw_node_type type; + int recurse_kind_int; + fftw_recurse_kind recurse_kind; + int type_int; + int signature; + int istride, ostride; + + get_input = g; + input_error = FFTW_SUCCESS; + + read_char(data); + + eat_blanks(data); + EXPECT('('); + eat_blanks(data); + EXPECT_STRING(WISDOM_FORMAT_VERSION); + eat_blanks(data); + + while (next_char != ')') { + EXPECT('('); + EXPECT_INT(n); + EXPECT_INT(flags); + /* paranoid respect for enumerated types */ + EXPECT_INT(dir_int); + dir = (fftw_direction) dir_int; + EXPECT_INT(category_int); + category = (enum fftw_wisdom_category) category_int; + EXPECT_INT(istride); + EXPECT_INT(ostride); + EXPECT_INT(type_int); + type = (enum fftw_node_type) type_int; + EXPECT_INT(signature); + EXPECT_INT(recurse_kind_int); + recurse_kind = (fftw_recurse_kind) recurse_kind_int; + eat_blanks(data); + EXPECT(')'); + + /* the wisdom has been read properly. Add it */ + fftw_wisdom_add(n, flags, dir, category, + istride, ostride, + type, signature, recurse_kind); + + /* prepare for next morsel of wisdom */ + eat_blanks(data); + } + + return FFTW_SUCCESS; +} diff --git a/src/sndobj/rfftw/wisdomio.c b/src/sndobj/rfftw/wisdomio.c new file mode 100644 index 0000000..5762166 --- /dev/null +++ b/src/sndobj/rfftw/wisdomio.c @@ -0,0 +1,104 @@ +/* + * Copyright (c) 1997-1999 Massachusetts Institute of Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include +#include + +#include + +/**************** import/export using file ***************/ + +static void file_emitter(char c, void *data) +{ + putc(c, (FILE *) data); +} + +void fftw_export_wisdom_to_file(FILE *output_file) +{ + if (output_file) + fftw_export_wisdom(file_emitter, (void *) output_file); +} + +static int file_get_input(void *data) +{ + return getc((FILE *) data); +} + +fftw_status fftw_import_wisdom_from_file(FILE *input_file) +{ + if (!input_file) + return FFTW_FAILURE; + return fftw_import_wisdom(file_get_input, (void *) input_file); +} + +/*************** import/export using string **************/ + +static void emission_counter(char c, void *data) +{ + int *counter = (int *) data; + + ++*counter; +} + +static void string_emitter(char c, void *data) +{ + char **output_string = (char **) data; + + *((*output_string)++) = c; + **output_string = 0; +} + +char *fftw_export_wisdom_to_string(void) +{ + int string_length = 0; + char *s, *s2; + + fftw_export_wisdom(emission_counter, (void *) &string_length); + + s = (char *) fftw_malloc(sizeof(char) * (string_length + 1)); + if (!s) + return 0; + s2 = s; + + fftw_export_wisdom(string_emitter, (void *) &s2); + + if (s + string_length != s2) + fftw_die("Unexpected output string length!\n"); + + return s; +} + +static int string_get_input(void *data) +{ + char **input_string = (char **) data; + + if (**input_string) + return *((*input_string)++); + else + return 0; +} + +fftw_status fftw_import_wisdom_from_string(const char *input_string) +{ + const char *s = input_string; + + if (!input_string) + return FFTW_FAILURE; + return fftw_import_wisdom(string_get_input, (void *) &s); +} -- cgit v1.2.3