SndObj-2.6.7/000755 000766 000024 00000000000 12062711574 013364 5ustar00victorstaff000000 000000 SndObj-2.6.7/build.txt000644 000766 000024 00000001573 12062673766 015244 0ustar00victorstaff000000 000000 The Sound Object Library Build instructions 1. Requirements a. ANSI C/C++ compilers (such as gcc/g++) b. Python (www.python.org) c. Scons (www.scons.org) d. For realtime audio: On Linux either OSS (www.4front-tech.com) or AlSA (www.alsa-project.org), and/or JACK (jack.sf.net) On OSX and SGI, the library uses the supplied system audio drivers. On Windows (under MSVC/mingw) ASIO is also used 2. On the top-level directory, run 'scons'. If on Linux and using OSS, add option OSS=true 3. For more options, including install directory prefix, etc, try 'scons -H' (basic options) and 'scons -h' (SndObj-specific options) The build system has been tested on Linux, OSX and Windows (under MSVC and mingw; but is untested under cygwin) Thanks to Tim Blechmann for the original SConstruct code. VL, 2006 SndObj-2.6.7/change.log000644 000766 000024 00000002760 12062673766 015333 0ustar00victorstaff000000 000000 26/05/2008 veplaini : * SinSyn.cpp: fixed initialisation bug * SConstruct: added options to SConstruct and fixed installation for fedora packaging 14/08/07 veplaini : * SndCoreAudio.cpp: tidied up behaviour. Now it should be able to open two separate devices for in/out as well as full-duplex 12/08/07 veplaini : * Tapi.cpp: Fixed bugs in Tapi * Mixer.cpp: Fixed bug 05/02/07 veplaini : * SndBuffer.cpp: Fixed + improved SndBuffer 24/01/07 veplaini : * SndCoreAudio.cpp: Fixed non-interleaved audio on SndCoreAudio * python/*.py: Added some python examples * SConstruct: fixed windows-MSVC build 19/01/07 veplaini : * SndThread.cpp: added SndRTThread class (also to PySndObj) * SndCoreAudio.cpp: fixed SndCoreAudio to allow for calling Write() only(without Read()) * SConstruct: Added CFFI module target to SConstruct (however the CFFI interface is not building at the moment) 18/01/07 veplaini : * SndThread.cpp: implemented Python callbacks for SndThread. * SndObj.h/SndIO.h: implemented dynamic vector size change in SndObj and SndIO * SndThread.cpp: added vectorsize and sr setting methods to SndThread. 15/01/07 veplaini : * SndThread.h: fixed some issues in SndThread regarding list position * Change.log started 15/01/07 (please add changes at the top) SndObj-2.6.7/debian/000755 000766 000024 00000000000 12062673766 014620 5ustar00victorstaff000000 000000 SndObj-2.6.7/fedora/000755 000766 000024 00000000000 12062673766 014636 5ustar00victorstaff000000 000000 SndObj-2.6.7/include/000755 000766 000024 00000000000 12062673766 015021 5ustar00victorstaff000000 000000 SndObj-2.6.7/java/000755 000766 000024 00000000000 12062711536 014303 5ustar00victorstaff000000 000000 SndObj-2.6.7/java-readme.txt000644 000766 000024 00000000476 12062707752 016313 0ustar00victorstaff000000 000000 To build the java module on OSX: $ scons javamodule=1 this should build a jsndobj.jar and a dynamic module lib_jsndobj.jnilib as well as lib/libsndobj.dylib. A simple test is in src/examples/test.java: $ javac -classpath jsndobj.jar src/examples/test.java $ java -classpath jsndobj.jar:src/examples test 440 VL SndObj-2.6.7/lib/000755 000766 000024 00000000000 12062711470 014125 5ustar00victorstaff000000 000000 SndObj-2.6.7/License.txt000644 000766 000024 00000043110 12062673766 015520 0ustar00victorstaff000000 000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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 Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. SndObj-2.6.7/python/000755 000766 000024 00000000000 12062673766 014717 5ustar00victorstaff000000 000000 SndObj-2.6.7/SConstruct000644 000766 000024 00000066737 12062711211 015425 0ustar00victorstaff000000 000000 #################################################################### # 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 # # # scons build system for SndObj # # Copyright (C) 2005 by Tim Blechmann and Victor Lazzarini # # See License.txt for for a disclaimer of all warranties # and licensing information import sys import os import distutils.sysconfig env = Environment(ENV = {'PATH' : os.environ['PATH']}) env.SConsignFile() # env.CacheDir('./obj') ###################################################################### # # general configuration def getVersion(): return sys.version[:3] def getPlatform(): if sys.platform[:5] == 'linux': return 'linux' elif sys.platform[:3] == 'win': if env['PLATFORM'] == 'win32': return 'win' else: return 'cygwin' elif sys.platform[:6] == 'darwin': return 'macosx' elif sys.platform[:4] == 'irix' : return 'sgi' else: return 'unsupported' opt = Options(['options.cache']) opt.AddOptions( BoolOption('alsa', 'on linux, build with alsa support', True), BoolOption('oss', 'on unix or linux, build with OSS support', False), BoolOption('jack', 'on linux or OSX, build with Jack support', True), ('flags', 'additional compile flags', ""), ('prefix', 'install prefix of headers, static lib and shared lib', '/usr/local'), ('instdir', 'base directory', ''), ('pddir', 'PD directory on windows', 'C:\\PureData'), BoolOption('nostaticlib', 'do not build static library', True), BoolOption('pythonmodule', 'build python module', False), BoolOption('numpy', 'include support for numpy arrays', False), BoolOption('javamodule', 'build java module', False), BoolOption('lispmodule', 'build CFFI module', False), BoolOption('examples', 'build C++ examples', False), BoolOption('no_rtio', 'No RT IO', False), BoolOption('useASIO', 'Use ASIO, requires ASIO SDK files to be place in ./src/asio', False), ('install_name', 'on OSX, the dynamic library full install pathname (before installation)', 'lib/libsndobj.dylib'), ('pythonpath', 'python include path (defaults to usual places)', ''), ('pythonlibpath', 'python lib path (WIN only,defaults to usual places)', ''), ('javapath', 'java headers path (defaults to usual places)', ''), ('customCPPPATH', '',''), ('customCCFLAGS', '',''), ('customCXXFLAGS','',''), ('customLIBS','',''), ('customLIBPATH','',''), ('customSHLINKFLAGS','',''), ('customSWIGFLAGS','',''), ('version', 'library version','2.6.5') ) opt.Update(env) opt.Save('options.cache',env) Help(opt.GenerateHelpText(env)) version = env['version'] print "SndObj Library version is " + version customCPPPATH = env['customCPPPATH'] env.Prepend(CPPPATH = customCPPPATH) customCCFLAGS = env['customCCFLAGS'] env.Prepend(CCFLAGS = customCCFLAGS) customCXXFLAGS = env['customCXXFLAGS'] env.Prepend(CXXFLAGS = customCXXFLAGS) customLIBS = env['customLIBS'] env.Prepend(LIBS = customLIBS) customLIBPATH = env['customLIBPATH'] env.Prepend(LIBPATH = customLIBPATH) customSHLINKFLAGS = env['customSHLINKFLAGS'] env.Prepend(SHLINKFLAGS = customSHLINKFLAGS) customSWIGFLAGS = env['customSWIGFLAGS'] env.Prepend(SWIGFLAGS = customSWIGFLAGS) print "Building the Sound Object Library" configure = env.Configure() buildasio = 0 print "scons tools in this system: ", env['TOOLS'] cffipath = '' pythonlibpath = [] print "Checking for Realtime IO support..." if not env['no_rtio']: if getPlatform() == 'linux': msvctools = False print "OS is Linux..." hdrs = env.Command('include/SndObj/AudioDefs.h', 'src/AudioDefs.h', "cp -f src/*.h include/SndObj") perms = env.Command('perms', 'src/AudioDefs.h', "chmod a-x include/SndObj/*.h") Depends(perms,hdrs) swigdef = [] alsaFound = configure.CheckHeader("alsa/asoundlib.h", language = "C") ossFound = configure.CheckHeader("soundcard.h", language="C") jackFound = configure.CheckHeader("jack/jack.h", language = "C") if alsaFound and env['alsa']: env.Append(CPPDEFINES="ALSA") swigdef.append('-DALSA') env.Append(LIBS=['asound']) print "The library realtime IO (class SndRTIO) will be configured for ALSA" rtio = True elif ossFound and env['oss']: env.Append(CPPDEFINES="OSS") print "The library realtime IO (class SndRTIO) will be configured for OSS" rtio = True else: print "No alsa or OSS RT support" rtio = False if jackFound: env.Append(CPPDEFINES=Split('JACK')) env.Append(LIBS=['jack']) swigdef.append('-DJACK') print "The library will include support for Jack (Class SndJackIO)" pythonincpath = ['/usr/include/python' + getVersion(), env['pythonpath']] javapath = ['/usr/lib/java/jvm/include', env['javapath']] if getPlatform() == 'win': print "OS is Windows, environment is win32..." env.Append(CPPDEFINES="WIN") swigdef = ['-DWIN', '-DSWIGFIX', '-D_MSBC'] if 'msvc'in env['TOOLS']: # MSVC msvctools = True hdrs = env.Command('include/SndObj/AudioDefs.h', 'src/AudioDefs.h', "copy src\\*.h include\\SndObj") separateLibs = False print 'using MSVC...' includes = ["C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\Include", "C:\\pthreads\\pthreads.2", \ "C:\\Python%c%c\\Lib\\site-packages\\numpy\\core\\include\\" % (getVersion()[0], getVersion()[2])] libs = ["C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\Lib"] env.Append(CPPPATH=['msvc9.0']) pythonlib='' env.Append(LIBS=['pthreadVC', 'advapi32', 'user32']) else: # mingw ? Set any outstanding mingwin paths here msvctools = False hdrs = env.Command('include/SndObj/AudioDefs.h', 'src/AudioDefs.h', "cp -f src/*.h include/SndObj") separateLibs = True print 'using MINGW...' env.Append(CPPDEFINES=['GCC', 'USE_WIN32THREADS']) swigdef.append(['-DUSE_WIN32THREADS']) includes = '' libs = '' pythonlib = 'python%c%c'% (getVersion()[0], getVersion()[2]) env.Append(CPPPATH=includes) env.Append(LIBPATH=libs) env.Append(LIBPATH=['lib']) env.Append(LIBS=['winmm']) if env['buildASIO']: buildasio = 1 rtio = True jackFound = False pythonincpath = ['c:\\Python%c%c\include' % (getVersion()[0], getVersion()[2]), env['pythonpath']] pythonlibpath.append('c:\\Python%c%c\libs' % (getVersion()[0], getVersion()[2])) pythonlibpath.append(env['pythonlibpath']) javapath = ["C:\\Program Files\\Java\\jdk1.5.0_05",env['javapath']] if getPlatform() == 'cygwin': print "OS is Windows, environment is Cygwin..." msvctools = False env.Append(CPPDEFINES=['WIN', 'GCC']) swigdef = ['-DWIN', '-DSWIGFIX', '-D_MBCS'] env.Append(LIBS=['winmm', 'pthread']) env.Append(LIBPATH=['lib']) rtio = True jackFound = False pythonincpath = ['/usr/include/python' + getVersion(), env['pythonpath']] javapath = ['/usr/lib/java/jvm/include', env['javapath']] if getPlatform() == 'macosx': print "OS is MacOSX" msvctools = False hdrs = env.Command('include/SndObj/AudioDefs.h', 'src/AudioDefs.h', "cp -f src/*.h include/SndObj") env.Append(CPPDEFINES="MACOSX") swigdef = ['-DMACOSX'] env.Append(CPPPATH=["/system/library/Frameworks/CoreAudio.framework/Headers"]) env.Append(LINKFLAGS= ['-framework', 'coreaudio']) jackFound = configure.CheckHeader("jack/jack.h", language = "C") if jackFound: env.Append(CPPDEFINES=Split('JACK')) env.Append(LIBS=Split('jack')) swigdef.append('-DJACK') print "The library will include support for Jack (Class SndJackIO)" rtio = True pythonincpath = [env['pythonpath'], '/Library/Frameworks/Python.framework/Headers', '/System/Library/Frameworks/Python.framework/Headers'] javapath = ['/System/Library/Frameworks/JavaVM.framework', env['javapath']] if getPlatform() == 'sgi': print "OS is SGI/Irix..." msvctools = False hdrs = env.Command('include/SndObj/AudioDefs.h', 'src/AudioDefs.h', "cp -f src/*.h include/SndObj") env.Append(CPPDEFINES="SGI") swigdef = ['-DSGI'] env.Append(LIBS=['audio', 'midi', 'pthread']) rtio = True jackFound = False pythonincpath = ['/usr/include/python' + getVersion(), env['pythonpath']] javapath = ['/usr/lib/java/jvm/include', env['javapath']] if getPlatform() == 'unsupported': print "Realtime IO not supported on this platform: %s" % sys.platform env['no_rtio'] = True if env['no_rtio']: hdrs = env.Command('include/SndObj/AudioDefs.h', 'src/AudioDefs.h', "cp -f src/*.h include/SndObj") rtio = False swigdef = ['-DNO_RTIO'] env.Append(LIBS=['pthread']) msvctools = False jackFound = False pythonincpath = ['/usr/include/python%c%c' % (getVersion()[0], getVersion()[2]), env['pythonpath']] javapath = ['/usr/java/include', env['javapath']] if getPlatform() == 'macosx': pythonincpath = [env['pythonpath'], '/Library/Frameworks/Python.framework/Headers', '/System/Library/Frameworks/Python.framework/Headers'] javapath = ['/System/Library/Frameworks/JavaVM.framework', env['javapath']] if not msvctools: flags = "-O2" + env['flags'] else: flags = "-EHsc -O2" + env['flags'] #check endianness if sys.byteorder == "big": print "Host is big endian" env.Append(CPPFLAGS="-DWORDS_BIGENDIAN") else: print "Host is little endian" if not rtio: env.Prepend(CPPDEFINES=['NO_RTIO']) swigdef = ['-DNO_RTIO'] env.Prepend(CPPPATH= ['include','include/rfftw']) swigcheck = 'swig' in env['TOOLS'] print 'swig %s' % (["doesn't exist", "exists..."][int(swigcheck)]) pythonh = configure.CheckHeader("Python.h", language = "C") if not pythonh: for i in pythonincpath: pythonh = configure.CheckHeader("%s/Python.h" % i, language = "C") if pythonh: print "Python version is " + getVersion() break if not pythonh: print "Python headers are missing... cannot build python module" pysndobj = env.Clone() jsndobj = env.Clone() cffisndobj = env.Clone() examples = env.Clone() if getPlatform() == 'linux': env.Append(SHLINKFLAGS=['-Wl,-soname=libsndobj.so.%s'% version]) ###################################################################### # # sources sndobjsources = Split("""Oscil.cpp Oscilt.cpp Oscili.cpp PhOscili.cpp ADSR.cpp IADSR.cpp Buzz.cpp Balance.cpp DelayLine.cpp Tap.cpp Tapi.cpp Comb.cpp Allpass.cpp StringFlt.cpp Pluck.cpp VDelay.cpp Pitch.cpp Loop.cpp Filter.cpp Reson.cpp Lp.cpp ButtBP.cpp ButtBR.cpp ButtHP.cpp ButtLP.cpp Mix.cpp Pan.cpp Gain.cpp SyncGrain.cpp Interp.cpp Phase.cpp Lookup.cpp Lookupi.cpp Ring.cpp Rand.cpp Randh.cpp Randi.cpp Unit.cpp Ap.cpp Hilb.cpp SndIn.cpp SndObj.cpp MidiIn.cpp MidiMap.cpp Bend.cpp Fir.cpp FFT.cpp IFFT.cpp Convol.cpp FastOsc.cpp Osc.cpp Osci.cpp PVA.cpp IFGram.cpp HiPass.cpp LowPass.cpp TpTz.cpp PVS.cpp PVMorph.cpp PVFilter.cpp PVMask.cpp PVMix.cpp PVTransp.cpp PVBlur.cpp PVRead.cpp SinAnal.cpp SinSyn.cpp AdSyn.cpp ReSyn.cpp IFAdd.cpp SndRead.cpp SpecIn.cpp SpecMult.cpp SpecCart.cpp SpecCombine.cpp SpecInterp.cpp SpecPolar.cpp SpecSplit.cpp SpecThresh.cpp SpecVoc.cpp Ptrack.cpp""") sndiosources = Split("""SndIO.cpp SndRTIO.cpp SndFIO.cpp SndWave.cpp SndAiff.cpp SndBuffer.cpp SndMidi.cpp SndMidiIn.cpp SndWaveX.cpp SndPVOCEX.cpp SndSinIO.cpp SndCoreAudio.cpp SndJackIO.cpp """) if buildasio == 1: sndiosources.append(" SndASIO.cpp "); tablesources = Split("""HarmTable.cpp UsrHarmTable.cpp TrisegTable.cpp SndTable.cpp PlnTable.cpp HammingTable.cpp NoteTable.cpp UsrDefTable.cpp LoPassTable.cpp ImpulseTable.cpp SpecEnvTable.cpp EnvTable.cpp PVEnvTable.cpp PVTable.cpp""") sndthrsources = Split("""SndThread.cpp SndRTThread.cpp""") fftwsources = Split("""config.c fcr_9.c fhf_6.c fn_8.c frc_1.c ftw_16.c ftwi_7.c \ executor.c fftwnd.c fhf_7.c fn_9.c frc_10.c ftw_2.c ftwi_8.c fcr_1.c fhb_10.c fhf_8.c fni_1.c frc_11.c ftw_3.c ftwi_9.c fcr_10.c fhb_16.c fhf_9.c fni_10.c frc_12.c ftw_32.c generic.c fcr_11.c fhb_2.c fn_1.c fni_11.c frc_128.c ftw_4.c malloc.c fcr_12.c fhb_3.c fn_10.c fni_12.c frc_13.c ftw_5.c planner.c fcr_128.c fhb_32.c fn_11.c fni_13.c frc_14.c ftw_6.c putils.c fcr_13.c fhb_4.c fn_12.c fni_14.c frc_15.c ftw_64.c rader.c fcr_14.c fhb_5.c fn_13.c fni_15.c frc_16.c ftw_7.c rconfig.c fcr_15.c fhb_6.c fn_14.c fni_16.c frc_2.c ftw_8.c rexec.c fcr_16.c fhb_7.c fn_15.c fni_2.c frc_3.c ftw_9.c rexec2.c fcr_2.c fhb_8.c fn_16.c fni_3.c frc_32.c ftwi_10.c rfftwf77.c fcr_3.c fhb_9.c fn_2.c fni_32.c frc_4.c ftwi_16.c rfftwnd.c fcr_32.c fhf_10.c fn_3.c fni_4.c frc_5.c ftwi_2.c rgeneric.c fcr_4.c fhf_16.c fn_32.c fni_5.c frc_6.c ftwi_3.c rplanner.c fcr_5.c fhf_2.c fn_4.c fni_6.c frc_64.c ftwi_32.c timer.c fcr_6.c fhf_3.c fn_5.c fni_64.c frc_7.c ftwi_4.c twiddle.c fcr_64.c fhf_32.c fn_6.c fni_7.c frc_8.c ftwi_5.c wisdom.c fcr_7.c fhf_4.c fn_64.c fni_8.c frc_9.c ftwi_6.c wisdomio.c fcr_8.c fhf_5.c fn_7.c fni_9.c ftw_10.c ftwi_64.c cfft.c""") asios = Split("""iasiothiscallresolver.cpp asiodrivers.cpp asio.cpp asiolist.cpp""") sndsources = map(lambda x: './src/' + x, sndobjsources + sndiosources \ + tablesources + sndthrsources) rfftsources = map(lambda x: './src/rfftw/' + x, fftwsources) asiosources = map(lambda x: './src/asio/' + x, asios) ###################################################################### # # build if getPlatform() != 'win': sources = sndsources + rfftsources env.Prepend(CCFLAGS = flags) if getPlatform() == 'macosx': env.Append(LINKFLAGS=['-install_name', env['install_name']]) sndobjlib = env.SharedLibrary(env['install_name'], sources) else: sndobjlib = env.SharedLibrary('lib/libsndobj.so' + '.' + version, sources, SHLIBPREFIX = '', SHLIBSUFFIX = '') os.spawnvp(os.P_WAIT, 'rm', ['rm', '-f', 'lib/libsndobj.so']) os.symlink('libsndobj.so' + '.' + version, 'lib/libsndobj.so') sndobjlink = 'lib/libsndobj.so' deplibs = [sndobjlib] baselibs = ['sndobj'] if not env['nostaticlib']: sndobjliba = env.Library('lib/sndobj',sources) deplibs.append([sndobjliba]) Depends(sndobjliba, hdrs) else: if separateLibs: rfftwlib = env.Library('lib/rfftw', rfftsources, CCFLAGS=flags) if buildasio == 1: sndobjlib = env.Library('lib/sndobj', sndsources+asiosources, CCFLAGS=flags) else: sndobjlib = env.Library('lib/sndobj', sndsources, CCFLAGS=flags) deplibs = [sndobjlib, rfftwlib] baselibs = ['sndobj', 'rfftw'] libdest = 'libsndobj.a' else: sndobjlib = env.Library('lib/sndobj', sndsources+rfftsources+asiosources, CCFLAGS=flags) deplibs = [sndobjlib] baselibs = ['sndobj'] Depends(sndobjlib, hdrs) #################################################################### # # Python module if swigcheck and env['pythonmodule'] and pythonh: pswigdef = swigdef[:] pswigdef.append(['-lcarrays.i', '-c++', '-python','-Isrc', '-v']) if env['numpy']: pswigdef.append('-DNUMPY') pysndobj.Append(SWIGFLAGS=pswigdef) pysndobj.Append(LIBPATH='./lib') pysndobj.Append(CPPDEFINES=['SWIG','PYTHON_WRAP']) pysndobj.Prepend(LIBS=baselibs) pysndobj.Prepend(CPPPATH=['src']) pysndobj.Prepend(CCFLAGS=flags) if getPlatform() == 'macosx': for i in pythonincpath: if i != '': pysndobj.Prepend(CPPPATH=[i]) pysndobj.Prepend(LINKFLAGS=['-bundle', '-framework', 'python']) pywrap = pysndobj.SharedObject('python/AudioDefs.i') pymod = pysndobj.Program('python/_sndobj.so', pywrap) #pysndobj.Command('python/sndobj.py', 'sndobj.py', 'cp sndobj.py python/sndobj.py') if env['install_name'] == 'lib/libsndobj.dylib': pysndobj.Command('link', 'lib/libsndobj.dylib', 'cd python/lib; ln -sf ../../lib/libsndobj.dylib libsndobj.dylib') else: pysndobj.Command('link', 'lib/libsndobj.dylib', 'cd python/lib; ln -sf %s libsndobj.dylib' % env['install_name']) elif getPlatform() == 'win' or getPlatform() == 'cygwin': for i in pythonincpath: if i != '': pysndobj.Prepend(CPPPATH=[i]) for i in pythonlibpath: if i != '': pysndobj.Prepend(LIBPATH=[i]) pysndobj.Append(LIBS=[pythonlib, 'ole32']) pywrap = pysndobj.SharedObject('python/AudioDefs.i') pymod = pysndobj.SharedLibrary('python/sndobj', pywrap, SHLIBPREFIX='_', SHLIBSUFFIX='.pyd') else: #pysndobj.Prepend(SWIGFLAGS=['-outdir', '.']) for i in pythonincpath: if i != '': pysndobj.Prepend(CPPPATH=[i]) pysndobj.Prepend(LIBS=['python'+getVersion()]) pymod = pysndobj.SharedLibrary('sndobj', 'python/AudioDefs.i', SHLIBPREFIX='_') Depends(pymod,sndobjlib) #################################################################### # # Java module if swigcheck and env['javamodule']: jswigdef = swigdef[:] jswigdef.append(['-lcarrays.i', '-c++', '-java','-Isrc', '-Iinclude', '-v']) jsndobj.Append(SWIGFLAGS=jswigdef) jsndobj.Append(SWIGFLAGS=['-package', 'JSndObj']) jsndobj.Append(LIBPATH='./lib') jsndobj.Prepend(LIBS=baselibs) jsndobj.Prepend(CPPPATH=['src']) if getPlatform() == 'macosx': for i in javapath: if i != '': jsndobj.Prepend(CPPPATH=["%s/Headers" % i, 'src']) jsndobj.Prepend(LINKFLAGS=['-bundle', '-framework', 'JavaVM']) jwrap = jsndobj.SharedObject('java/AudioDefs.i', CCFLAGS=flags) jmod = jsndobj.Program('lib_jsndobj.jnilib', jwrap) jcode = jsndobj.Java(target = 'JSndObj', source = 'java') jwrapJar = jsndobj.Jar( 'jsndobj.jar', ['JSndObj'], JARCHDIR = 'JSndObj') Depends(jwrapJar, jcode) elif getPlatform() == 'win': for i in javapath: if i != '': jsndobj.Prepend(CPPPATH=[i+'\\include',i+'\\include\win32']) jsndobj.Prepend(LIBPATH=[javapath+'\\libs']) jwrap = jsndobj.SharedObject('java/AudioDefs.i', CCFLAGS=flags) jmod = jsndobj.SharedLibrary('java/jsndobj', jwrap, SHLIBPREFIX='_') jcode = jsndobj.Java(target = 'JSndObj', source = 'java') jwrapJar = jsndobj.Jar( 'jsndobj.jar', ['JSndObj'], JARCHDIR = 'JSndObj') Depends(jwrapJar, jcode) else: for i in javapath: if i != '': jsndobj.Prepend(CPPPATH=[i]) jwrap = jsndobj.SharedObject('java/AudioDefs.i', CCFLAGS=flags) jmod = jsndobj.SharedLibrary('java/sndobj', jwrap, SHLIBPREFIX='lib_') Depends(jmod,sndobjlib) #try: # sos.mkdir('java/JSndObj', 0755) #sexcept: # pass #sjcode = jsndobj.Java(target = './java/JSndObj', source = './java') #sndobjar = jsndobj.Jar('sndobj.jar', ['.'], JARCHDIR = './java/JSndObj') #Depends(sndobjar, jcode) ################################################################### # Common Lisp - CFFI module # if swigcheck and env['lispmodule']: lswigdef = swigdef lswigdef.append(['-lcarrays.i', '-c++', '-cffi','-Isrc', '-Iinclude', '-v']) cffisndobj.Append(SWIGFLAGS=lswigdef) cffisndobj.Append(CPPDEFINES=['SWIG','SWIGCFFI']) cffisndobj.Append(LIBPATH='./lib') cffisndobj.Prepend(LIBS=baselibs) if getPlatform() == 'macosx': cffisndobj.Prepend(CCFLAGS='-fpascal-strings') cffisndobj.Prepend(CPPPATH=["%s/Headers" % lisppath, 'src']) cffisndobj.Prepend(LINKFLAGS=['-framework', 'Carbon', '-framework', 'CoreMIDI', '-framework', 'OpenGL', '-framework', 'AGL', '-framework', 'QuickTime']) cffiwrap = cffisndobj.SharedObject('cffi/AudioDefs.i', CCFLAGS=flags) cffimod = cffisndobj.ShareLibrary('cffi/sndobj', cffiwrap) if env['install_name'] == 'lib/libsndobj.dylib': jsndobj.Command('link', 'lib/libsndobj.dylib', 'cd cffi/lib; ln -sf ../../lib/libsndobj.dylib libsndobj.dylib') else: jsndobj.Command('link', 'lib/libsndobj.dylib', 'cd cffi/lib; ln -sf %s libsndobj.dylib' % env['install_name']) elif getPlatform() == 'win': cffisndobj.Prepend(CPPPATH=[cffipath+'\\include', 'src',cffipath+'\\include\win32']) cffisndobj.Prepend(LIBPATH=[cffipath+'\\libs']) cffiwrap = cffisndobj.SharedObject('cffi/AudioDefs.i', CCFLAGS=flags) cffimod = cffisndobj.SharedLibrary('cffi/sndobj', cffiwrap, SHLIBPREFIX='_') else: cffisndobj.Prepend(CPPPATH=[cffipath, 'src']) cffiwrap = cffisndobj.SharedObject('cffi/AudioDefs.i', CCFLAGS=flags) cffimod = cffisndobj.SharedLibrary('cffi/sndobj', cffiwrap, SHLIBPREFIX='lib_') Depends(cffimod,sndobjlib) #################################################################### # # example programs examples.Append(LIBPATH='./lib') examples.Prepend(LIBS=baselibs) def BuildExample(prog, example, source): if env['examples']: obj = examples.Object(example, source, CCFLAGS=flags) prg = examples.Program(prog, example) Depends(prg, obj) return obj else: return None # jack examples if jackFound: examples.Append(LIBS= ['jack']) schroeder_jack = BuildExample('./bin/jack_schroeder','./obj/jack_schroeder.o', 'src/examples/jack_schroeder.cpp') examples.Depends(schroeder_jack, deplibs) streson_jack = BuildExample('./bin/jack_streson', './obj/jack_streson.o', 'src/examples/jack_streson.cpp') Depends(streson_jack, deplibs) # realtime IO examples if rtio: rtschroeder = BuildExample('./bin/rtschroeder','./obj/rtschroeder.o', 'src/examples/rtschroeder.cpp') Depends(rtschroeder, deplibs) streson = BuildExample('./bin/streson','./obj/streson.o', 'src/examples/streson.cpp') Depends(streson, deplibs) blurring = BuildExample('./bin/blurring','./obj/blurring.o', 'src/examples/blurring.cpp') Depends(blurring, deplibs) harmonise = BuildExample('./bin/harmonise','./obj/harmonise.o', 'src/examples/harmonise.cpp') Depends(harmonise, deplibs) transpose = BuildExample('./bin/transpose','./obj/transpose.o', 'src/examples/transpose.cpp') Depends(transpose, deplibs) # schroeder schroeder = BuildExample('./bin/schroeder','./obj/schroeder.o', 'src/examples/schroeder.cpp') Depends(schroeder, deplibs) # cvoc cvoc = BuildExample('./bin/cvoc','./obj/cvoc.o', 'src/examples/cvoc.cpp') Depends(cvoc, deplibs) # denoiser denoiser = BuildExample('./bin/denoiser','./obj/denoiser.o', 'src/examples/denoiser.cpp') Depends(denoiser, deplibs) # FIR fir = BuildExample('./bin/fir','./obj/fir.o', 'src/examples/fir.cpp') Depends(fir, deplibs) # sinus sinus = BuildExample('./bin/sinus','./obj/sinus.o', 'src/examples/sinus.cpp') Depends(sinus, deplibs) # morph PD class if configure.CheckHeader("m_pd.h", language="C") and env['examples']: if getPlatform() == 'linux': morph = examples.SharedLibrary('./bin/morph~','src/examples/morph_tilde.cpp', SHLIBPREFIX = '', SHLIBSUFFIX= '.pd_linux', CCFLAGS=flags) elif getPlatform() == 'macosx': morphex = examples.Copy() morphex.Append(LINKFLAGS=['-bundle', '-flat_namespace', '-undefined', 'suppress']) morpho = morphex.Object('obj/morph_tilde.obj', 'src/examples/morph_tilde.cpp', CCFLAGS=flags) morph = morphex.Program('bin/morph~.pd_darwin', 'obj/morph_tilde.obj') Depends(morpho, deplibs) Depends(morph,morpho) elif getPlatform() == 'win': pdbin = env['pddir'] + "//bin" examples.Append(LIBPATH=Split(pdbin)) examples.Append(LIBS=Split("pd")) morph = examples.SharedLibrary('./bin/morph~', 'src/examples/morph_tilde.cpp', CCFLAGS=flags) Depends(morph, deplibs) # LADSPA plugin example if configure.CheckHeader("ladspa.h", language="C") and getPlatform() == 'linux' and env['examples']: ladspa_srcs = ['src/examples/Ladspaplug.cpp', 'src/examples/ladspa_example.cpp'] ladspa = examples.SharedLibrary('bin/ladspaex', ladspa_srcs, CCFLAGS=flags) Depends(ladspa, deplibs) ###################################################################### # # install pydest = env['instdir'] + distutils.sysconfig.get_python_lib() prefix = env['instdir'] + env['prefix'] print env['instdir'] if msvctools: prefix = '' if env['pythonmodule']: print "installing python module in %s" % pydest f = open('python/__init__.py', 'wt') f.write('from sndobj import *') f.close() pytems = ['python/sndobj.py', 'python/_sndobj.pyd', 'python/sndobj.exp', \ 'python/sndobj.lib', 'python/__init__.py', 'lib/pthreadVC.dll', \ 'lib/pthreadVC.lib'] for i in pytems: env.InstallAs(os.path.join(pydest, 'sndobj', os.path.basename(i)), i) else: if getPlatform() == 'macosx': libdest = prefix+'/lib/libsndobj.dylib' inst = env.Command('libsndobj.dylib', sndobjlib, "cp lib/libsndobj.dylib libsndobj.dylib;install_name_tool -id %s %s" % (libdest, 'libsndobj.dylib')) env.InstallAs(libdest, inst) if env['pythonmodule']: pytems = [ 'sndobj.py', '_sndobj.so'] for i in pytems: env.Install(pydest,os.path.join('python/',i)) elif getPlatform() == 'win' or getPlatform() == 'cygwin': if not msvctools: libdest = prefix+'/lib/libsndobj.a' env.InstallAs(libdest, sndobjlib) if separateLibs: rfftwlibdest = prefix+'/lib/librfftw.a' env.InstallAs(rfftwlibdest, rfftwlib) if env['pythonmodule']: print "installing python module in %s" % pydest pytems = [ 'python/sndobj.py', 'python/_sndobj.pyd'] for i in pytems: env.InstallAs(os.path.join(pydest, i),i) # Linux or other OSs (unix-like) else: libdest = prefix + '/lib/libsndobj.so' instl = env.InstallAs(libdest + '.' + version, sndobjlib) linkl = env.Command(libdest,libdest + '.' + version, 'cd %s;ln -sf libsndobj.so.%s libsndobj.so' % (prefix+'/lib', version)) print "installing python module in %s" % pydest if env['pythonmodule']: print "installing python module in %s" % pydest pytems = [ 'python/sndobj.py', '_sndobj.so'] for i in pytems: env.InstallAs(os.path.join(pydest, os.path.basename(i)), i) #licensedest = prefix + '/share/SndObj/License.txt' #env.InstallAs(licensedest, 'License.txt') if not env['nostaticlib']: env.Install(libdest, sndobjliba) incdest = prefix + '/include/SndObj/' headers = map(lambda x: './include/SndObj/' + x, os.listdir('./include/SndObj')) for header in headers: if(header != './include/SndObj/CVS' and header[17] != '.'): #env.Execute(Chmod(header, 0555)) env.Install(incdest, header) rfftw_headers = map(lambda x: './include/rfftw/' + x, os.listdir('./include/rfftw')) rfftw_incdest = prefix + '/include/rfftw/' for header in rfftw_headers: if(header != './include/rfftw/CVS'): #env.Execute(Chmod(header, 0555)) env.Install(rfftw_incdest, header) if getPlatform() == 'win': other_headers = map(lambda x: './include/' + x, os.listdir('./include/')) other_incdest = prefix + '/include/' for header in other_headers: #env.Execute(Chmod(header, 0555) if(header != './include/rfftw'): if(header != './include/CVS'): if(header != './include/SndObj'): env.Install(other_incdest, header) env.Alias('install', [prefix,pydest]) SndObj-2.6.7/src/000755 000766 000024 00000000000 12062711467 014154 5ustar00victorstaff000000 000000 SndObj-2.6.7/trane/000755 000766 000024 00000000000 12062673766 014507 5ustar00victorstaff000000 000000 SndObj-2.6.7/trane/Instrument.cpp000644 000766 000024 00000004666 12062673766 017377 0ustar00victorstaff000000 000000 #include "Instrument.h" Instrument::Instrument() { int i; /* input */ #ifndef MACOSX input = new SndRTIO(2, SND_INPUT, 1024, 4); #else input = new SndCoreAudio(2); #endif sound = new SndIn(input, 1); /* strings */ fr[0] = 73.4f; dec[0] = 12.f; fr[1] = 130.8f; dec[1] = 12.f; fr[2] = 233.0f; dec[2] = 12.f; fr[3] = 392.0f; dec[3] = 12.f; strmix = new Mixer; for (i = 0; i < 4; i++){ string[i] = new StringFlt(fr[i], sound, dec[i]); gstr[i] = 0.5f; value[i] = new Unit(0.5f, UNIT_STEP); lp[i] = new LoPass(10.f, value[i]); strgain[i] = new Ring(lp[i], string[i]); strmix->AddObj(strgain[i]); StringOff(i); } /* loops */ loop[0] = new SndLoop(.15f, .8f, sound); loop[1] = new SndLoop(.5f, 2.4f, sound); loop[2] = new SndLoop(.8f, 4.8f, sound); loop[3] = new SndLoop(1.2f, 9.f, sound); loopmix = new Mixer; for (i = 0; i < 4; i++){ gloop[i] = 0.f; loopgain[i] = new Gain(gloop[i], loop[i]); loopmix->AddObj(loopgain[i]); LoopOff(i); } ap[0] = new Allpass(.6f, .05f, loopmix); ap[1] = new Allpass(.75f, .09f, ap[0]); /* output */ outchannel[0] = strmix; outchannel[1] = ap[1]; #ifndef MACOSX output = new SndRTIO(2,SND_OUTPUT, 1024, 4, SHORTSAM, outchannel); #else output = input; output->SetOutput(1, strmix); output->SetOutput(2, ap[1]); #endif /* processing thread */ thread = new SndThread(); thread->AddObj(sound); for(i=0; i<4; i++){ thread->AddObj(value[i]); thread->AddObj(lp[i]); thread->AddObj(string[i]); thread->AddObj(strgain[i]); thread->AddObj(loop[i]); thread->AddObj(loopgain[i]); } thread->AddObj(strmix); thread->AddObj(loopmix); thread->AddObj(ap[0]); thread->AddObj(ap[1]); thread->AddObj(input, SNDIO_IN); thread->AddObj(output, SNDIO_OUT); process_on = false; } Instrument::~Instrument() { ProcessOff(); delete input; for(int i=0;i <4; i++){ delete string[i]; delete value[i]; delete lp[i]; delete strgain[i]; delete loop[i]; delete loopgain[i]; } delete ap[0]; delete ap[1]; delete strmix; delete loopmix; delete thread; #ifndef MACOSX delete output; #endif } void Instrument::ProcessOn() { if(!process_on){ thread->ProcOn(); process_on = true; } } void Instrument::ProcessOff() { if(process_on){ thread->ProcOff(); process_on = false; for(int i = 0; i < 4; i++) { StringOff(i); LoopOff(i); } } } SndObj-2.6.7/trane/Instrument.h000644 000766 000024 00000004023 12062673766 017027 0ustar00victorstaff000000 000000 #ifndef INSTRUMENT_H #define INSTRUMENT_H #include "SndObj/AudioDefs.h" class Instrument { float dec[4]; float fr[4]; float gloop[4]; float gstr[4]; bool process_on; // SndObjs StringFlt *string[4]; Unit *value[4]; LoPass *lp[4]; Ring *strgain[4]; Gain *loopgain[4]; Mixer *strmix; Mixer *loopmix; SndIn *sound; SndLoop *loop[4]; Allpass *ap[2]; SndIO *input; SndIO *output; SndObj *outchannel[2]; SndThread *thread; public: void ReSample(int no){ if(no >= 0 && no < 4) loop[no]->ReSample(); } void LoopOff(int no){ if(no >= 0 && no < 4){ loopgain[no]->Disable(); loop[no]->Disable(); } } void LoopOn(int no){ if(no >= 0 && no < 4){ loopgain[no]->Enable(); loop[no]->Enable(); } } void StringOff(int no){ if(no >= 0 && no < 4){ value[no]->Disable(); lp[no]->Disable(); strgain[no]->Disable(); string[no]->Disable(); } } void StringOn(int no){ if(no >= 0 && no < 4){ value[no]->Enable(); lp[no]->Enable(); strgain[no]->Enable(); string[no]->Enable(); } } void SetPitch(int no, float pitch){ if(no >= 0 && no < 4) loop[no]->SetPitch(pitch); } void SetLoopGain(int no, float gain){ if(no >= 0 && no < 4) loopgain[no]->SetGain(gloop[no] = gain); } void SetStrGain(int no, float gain){ if(no >= 0 && no < 4) value[no]->SetAmp(gstr[no] = gain); } void SetDec(int no, float re){ if(no >= 0 && no < 4) { string[no]->SetDecay(dec[no] = re); } } void SetFreq(int no, float freq){ if(no >= 0 && no < 4) string[no]->SetFreq(fr[no] = freq); } float GetFreq(int no){ if(no<4 && no >= 0) return fr[no]; } float GetDec(int no){ if(no<4 && no >= 0) return dec[no]; } float GetLoopGain(int no){ if(no<4 && no >= 0) return gloop[no]; } float GetStrGain(int no){ if(no<4 && no >= 0) return gstr[no]; } void ProcessOff(); void ProcessOn(); Instrument(); virtual ~Instrument(); }; #endif SndObj-2.6.7/trane/main.cpp000644 000766 000024 00000011644 12062673766 016145 0ustar00victorstaff000000 000000 #include #include #include #include #include #include #include #include #include "Instrument.h" struct InstData { Instrument trane; Fl_Value_Slider *str_fr[4], *loop_gain[4]; Fl_Dial *str_gain[4], *decay[4]; Fl_Light_Button *str_bt[4], *loop_bt[4]; Fl_Button *resamp_bt[4]; }; static void fr_callback(Fl_Widget* o, void* d) { InstData *p = (InstData *) d; for(int i=0; i < 4; i++) if(o == p->str_fr[i]){ p->trane.SetFreq(i,((Fl_Value_Slider *)o)->value()); } } static void str_callback(Fl_Widget* o, void* d) { InstData *p = (InstData *) d; for(int i=0; i < 4; i++) if(o == p->str_bt[i]){ if(((Fl_Button *)o)->value()) p->trane.StringOn(i); else p->trane.StringOff(i); } } static void loop_callback(Fl_Widget* o, void* d) { InstData *p = (InstData *) d; for(int i=0; i < 4; i++) if(o == p->loop_bt[i]){ if(((Fl_Button *)o)->value()) p->trane.LoopOn(i); else p->trane.LoopOff(i); } } static void resample_callback(Fl_Widget* o, void *d) { InstData *p = (InstData *) d; for(int i=0; i < 4; i++) if(o == p->resamp_bt[i]) p->trane.ReSample(i); } static void sgain_callback(Fl_Widget* o, void *d) { InstData *p = (InstData *) d; for(int i=0; i < 4; i++) if(o == p->str_gain[i]) p->trane.SetStrGain(i,((Fl_Dial *)o)->value()); } static void sdecay_callback(Fl_Widget* o, void *d) { InstData *p = (InstData *) d; for(int i=0; i < 4; i++) if(o == p->decay[i]) p->trane.SetDec(i,-((Fl_Dial *)o)->value()); } static void lgain_callback(Fl_Widget* o, void *d) { InstData *p = (InstData *) d; for(int i=0; i < 4; i++) if(o == p->loop_gain[i]) p->trane.SetLoopGain(i,((Fl_Value_Slider *)o)->value()); } int main(int argc, char **argv) { InstData inst; char mess1[4][10], mess2[4][10]; int red = fl_rgb_color(200,10,40); int redish = fl_rgb_color(180, 60, 60); Fl_Window *window = new Fl_Window(460,660, "The Trane Thing Computer Instrument"); window->color(FL_DARK_BLUE); Fl_Group *strings = new Fl_Group(5,15,450,245); strings->box(FL_ENGRAVED_BOX); strings->color(red); strings->end(); Fl_Group *loops = new Fl_Group(5,270,450,385); loops->box(FL_ENGRAVED_BOX); loops->color(red); loops->end(); for(int i=0; i < 4; i++) { // strings sprintf(mess1[i], "string %d", i+1); inst.str_bt[i] = new Fl_Light_Button(15,25+i*60, 70, 30, mess1[i]); inst.str_bt[i]->type(FL_TOGGLE_BUTTON); inst.str_bt[i]->color(redish); inst.str_bt[i]->callback((Fl_Callback*)str_callback, (void *) &inst); strings->add(inst.str_bt[i]); if(i==3) inst.str_fr[i] = new Fl_Value_Slider(105, 20+i*60, 230, 40, "frequency"); else inst.str_fr[i] = new Fl_Value_Slider(105, 20+i*60, 230, 40); inst.str_fr[i]->range(inst.trane.GetFreq(i),inst.trane.GetFreq(i)*4); inst.str_fr[i]->value(inst.trane.GetFreq(i)); inst.str_fr[i]->type(5); inst.str_fr[i]->callback((Fl_Callback*)fr_callback, (void *)&inst); inst.str_fr[i]->color(red); inst.str_fr[i]->box(FL_FLAT_BOX); strings->add(inst.str_fr[i]); if(i==3) inst.str_gain[i] = new Fl_Dial(355, 20+i*60, 40, 40, "Gain"); else inst.str_gain[i] = new Fl_Dial(355, 20+i*60, 40, 40); inst.str_gain[i]->callback((Fl_Callback*)sgain_callback, (void *)&inst); inst.str_gain[i]->range(0,1.0); inst.str_gain[i]->value(inst.trane.GetStrGain(i)); inst.str_gain[i]->box(FL_ROUND_UP_BOX); strings->add(inst.str_gain[i]); if(i==3) inst.decay[i] = new Fl_Dial(405, 20+i*60, 40, 40, "Decay"); else inst.decay[i] = new Fl_Dial(405, 20+i*60, 40, 40); inst.decay[i]->callback((Fl_Callback*)sdecay_callback, (void *)&inst); inst.decay[i]->range(-48.0,-6.0); inst.decay[i]->value(-inst.trane.GetDec(i)); inst.decay[i]->box(FL_ROUND_UP_BOX); strings->add(inst.str_gain[i]); // loops sprintf(mess2[i], "sample %d", i+1); inst.loop_bt[i] = new Fl_Light_Button(15+i*115,280, 80, 30, mess2[i]); inst.loop_bt[i]->type(FL_TOGGLE_BUTTON); inst.loop_bt[i]->color(redish); inst.loop_bt[i]->callback((Fl_Callback*)loop_callback, (void *) &inst); loops->add(inst.loop_bt[i]); inst.loop_gain[i] = new Fl_Value_Slider(35+i*115,330, 40, 250, "gain(dB)"); inst.loop_gain[i]->range(24,-24); inst.loop_gain[i]->color(redish); inst.loop_gain[i]->type(FL_VERT_NICE_SLIDER); inst.loop_gain[i]->callback((Fl_Callback*)lgain_callback, (void *)&inst); loops->add(inst.loop_gain[i]); inst.resamp_bt[i] = new Fl_Button(15+i*115,600, 80, 30, "resample"); inst.resamp_bt[i]->box(FL_ROUND_UP_BOX); inst.resamp_bt[i]->type(0); inst.resamp_bt[i]->callback((Fl_Callback*)resample_callback, (void *) &inst); loops->add(inst.resamp_bt[i]); } window->end(); window->show(); inst.trane.ProcessOn(); Fl::run(); return 0; } SndObj-2.6.7/trane/SConstruct000644 000766 000024 00000010013 12062673766 016534 0ustar00victorstaff000000 000000 import sys import os env = Environment(ENV = {'PATH' : os.environ['PATH']}) env.SConsignFile() def getVersion(): return sys.version[:3] def getPlatform(): if sys.platform[:5] == 'linux': return 'linux' elif sys.platform[:3] == 'win': if env['PLATFORM'] == 'win32': return 'win' else: return 'cygwin' elif sys.platform[:6] == 'darwin': return 'macosx' else: return 'unsupported' print "Building The Trane Thing instrument" configure = env.Configure() env.Append(LIBS=['sndobj', 'fltk']) if getPlatform() == 'linux': print "OS is Linux..." alsaFound = configure.CheckHeader("alsa/asoundlib.h", language = "C") ossFound = configure.CheckHeader("soundcard.h", language="C") env.Append(CPPPATH=['/usr/local/include', '../include']) env.Append(LIBPATH=['/usr/local/lib', '../lib']) if alsaFound: env.Append(CPPDEFINES="ALSA") env.Append(LIBS=['asound']) print "using ALSA" elif ossFound: env.Append(CPPDEFINES="OSS") print "using OSS" fltkFound = configure.CheckHeader("Fl/Fl.H", language = "C++") sources = Split("""main.cpp Instrument.cpp""") if not fltkFound: print "No FLTK... exiting" sys.exit(0) elif getPlatform() == 'win': print "OS is Windows, environment is win32..." env.Append(CPPDEFINES="WIN") if 'msvc'in env['TOOLS']: # MSVC includes = "C:\\Program Files\\Microsoft Visual Studio\\VC98\\include" libs = "C:\\Program Files\\Microsoft Visual Studio\\VC98\\lib" env.Append(CPPPATH=['msvc6.0']) env.Append(LIBS=['pthreadVC']) sources = Split("""main.cpp Instrument.cpp""") else: # mingw print 'using MINGW...' env.Append(CPPDEFINES=['GCC', 'USE_WIN32THREADS']) includes = 'c:/msys/1.0/local/include' libs = 'c:/msys/1.0/local/lib' env.Append(LINKFLAGS='-mwindows') env.Append(LIBS=['pthreadVC', 'uuid', 'wsock32', 'comctl32', 'ole32']) res = env.Command("trane_res.o", "trane.rc", "windres -o trane_res.o trane.rc") sources = Split("""main.cpp Instrument.cpp trane_res.o""") env.Append(CPPPATH=[includes, '../include']) env.Append(LIBPATH=[libs]) env.Append(LIBPATH=['../lib']) env.Append(LIBS=['winmm']) fltkFound = configure.CheckHeader("FL/Fl.H", language = "C++") if not fltkFound: print "No FLTK... exiting" sys.exit(0) elif getPlatform() == 'macosx': print "OS is MacOSX" env.Append(CPPDEFINES="MACOSX") swigdef = ['-DMACOSX'] env.Append(CPPPATH=['/usr/local/include', '../include']) env.Append(LIBPATH=['/usr/local/lib', '../lib']) env.Append(CPPPATH=["/system/library/Frameworks/CoreAudio.framework/Headers"]) env.Append(LINKFLAGS= ['-framework', 'coreaudio']) fltkFound = configure.CheckHeader("Fl/Fl.H", language = "C++") sources = Split("""main.cpp Instrument.cpp""") if not fltkFound: print "No FLTK... exiting" sys.exit(0) else: print "Unsupported platform..." sys.exit(0) trane = env.Program('trane', sources) if getPlatform() == 'macosx': env.Command('trane.app/Contents/MacOS/trane', 'trane', 'cp -f trane trane.app/Contents/MacOS/;install_name_tool -change lib/libsndobj.dylib @executable_path/../Resources/libsndobj.dylib trane.app/Contents/MacOS/trane; install_name_tool -change /usr/local/lib/libfltk1.1.dylib @executable_path/../Resources/libfltk1.1.dylib trane.app/Contents/MacOS/trane') env.Command('trane.app/Contents/Resources/libsndobj.dylib', '../lib/libsndobj.dylib', 'cp -f ../lib/libsndobj.dylib trane.app/Contents/Resources;install_name_tool -id libsndobj.dylib trane.app/Contents/Resources/libsndobj.dylib') env.Command('trane.app/Contents/Resources/libfltk.1.1.dylib', '/usr/local/lib/libfltk.1.1.dylib', 'cp -f /usr/local/lib/libfltk.1.1.dylib trane.app/Contents/Resources;install_name_tool -id libfltk.1.1.dylib trane.app/Contents/Resources/libfltk.1.1.dylib') SndObj-2.6.7/trane/trane.app/000755 000766 000024 00000000000 12062673766 016377 5ustar00victorstaff000000 000000 SndObj-2.6.7/trane/trane.ico000644 000766 000024 00000000241 12062673766 016311 0ustar00victorstaff000000 000000  ¨ ( @IIeeeMMMLLLKKKKKKJJJIIIIIIIIIIIIIIIgggxxx„„„www’’’………‘‘‘ŸŸŸ¼¼¼¬¬¬¤¤¤žžžFFFKKKRRRdddOOORRRWWW[[[999SndObj-2.6.7/trane/trane.rc000644 000766 000024 00000000360 12062673766 016145 0ustar00victorstaff000000 000000 // Version Resource Script // #include // // Icon // // The icon whose name or resource ID is lexigraphically first, is used // as the application's icon. // app ICON DISCARDABLE "trane.ico" SndObj-2.6.7/trane/trane.tif000644 000766 000024 00000000005 12062673766 016317 0ustar00victorstaff000000 000000 II*äSndObj-2.6.7/trane/trane.app/Contents/000755 000766 000024 00000000000 12062673766 020174 5ustar00victorstaff000000 000000 SndObj-2.6.7/trane/trane.app/Contents/Info.plist000644 000766 000024 00000001623 12062673766 022146 0ustar00victorstaff000000 000000 CFBundleInfoDictionaryVersion 1.0 CFBundleExecutable trane CFBundleIdentifier org.sndobj.trane CFBundleVersion 1.0 CFBundleDevelopmentRegion English NSHumanReadableCopyright Copyright 1997-2006 by VLazzarini CFAppleHelpAnchor help CFBundleName trane CFBundlePackageType APPL CFBundleSignature TRANE CFBundleIconFile trane.icns CFBundleShortVersionString 1.0 CFBundleGetInfoString 1.0, Copyright 1997-2006 by VLazzarini SndObj-2.6.7/trane/trane.app/Contents/MacOS/000755 000766 000024 00000000000 12062673766 021136 5ustar00victorstaff000000 000000 SndObj-2.6.7/trane/trane.app/Contents/PkgInfo000644 000766 000024 00000000013 12062673766 021446 0ustar00victorstaff000000 000000 TRANETrane SndObj-2.6.7/trane/trane.app/Contents/Resources/000755 000766 000024 00000000000 12062673766 022146 5ustar00victorstaff000000 000000 SndObj-2.6.7/trane/trane.app/Contents/Resources/trane.icns000644 000766 000024 00000202477 12062673766 024151 0ustar00victorstaff000000 000000 icns?ics#His32{PRTTRSQOOQPLMItQ€"IT #" LS 'pŠO( €LS\ë´B LSsØ‘4  LSeˆ$ JS.&# JS%$‡6=( JRQs   FO:U @NA9 C-?N)0>N'4 2@J#©r *8ElmnonoÜŠ€Œ‹‰c•{PRTTRSQOOQPLMItQ€"IT #" LS 'pŠO( €LS\ë´B LSsØ‘4  LSeˆ$ JS.&# JS%$‡6=( JRQs   FO:U @NA9 C-?N)0>N'4 2@J#©r *8ElmnonoÜŠ€Œ‹‰c•{PRTTRSQOOQPLMItQ€"IT #" LS 'pŠO( €LS\ë´B LSsØ‘4  LSeˆ$ JS.&# JS%$‡6=( JRQs   FO:U @NA9 C-?N)0>N'4 2@J#©r *8ElmnonoÜŠ€Œ‹‰c•s8mkÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿICN#@@il32 ÒˆYZ[\[\]]\YZZ[ZY€XWWXZYUU€VUR[  € S] ! "€#€$ # €]U] "$%#$(% U] "#$'*% U] ""+-"!    €U\! #$+:ip{iJ0*€ ] U\! $)C¿øß¯\=0   U\ ! $:”ð÷Ït?*%  U\ !#]·àê­fH:$ €  U\!!"f´ÍÚ®a3 U\!!\›ØÉšS&   U\ Z¯Ãw7    T\^ƒc@   !  S\-  € <S\%?PQ2A#  S\%A‡/3DA2   € < S\"1µŒ#&S?   S\$GLĆ>665   € !' UZIv|( #+ƒ -QY.ƒC   ‚  9LXNgo0 „: LX!Zy`„  19 KX€$?&„86KXFR€€ '-7JX(€P '.8%JX$  #&0<%KX"!V   &1?MX€?«Ý5 "(77 QX€€=këµ3! /*08L$ ST€)S™ÿy,@12;IO  Z {||{{|}|}~–Ÿèå‘‹š§‘’˜¡šsuw©ˆYZ[\[\]]\YZZ[ZY€XWWXZYUU€VUR[  € S] ! "€#€$ # €]U] "$%#$(% U] "#$'*% U] ""+-"!    €U\! #$+:ip{iJ0*€ ] U\! $)C¿øß¯\=0   U\ ! $:”ð÷Ït?*%  U\ !#]·àê­fH:$ €  U\!!"f´ÍÚ®a3 U\!!\›ØÉšS&   U\ Z¯Ãw7    T\^ƒc@   !  S\-  € <S\%?PQ2A#  S\%A‡/3DA2   € < S\"1µŒ#&S?   S\$GLĆ>665   € !' UZIv|( #+ƒ -QY.ƒC   ‚  9LXNgo0 „: LX!Zy`„  19 KX€$?&„86KXFR€€ '-7JX(€P '.8%JX$  #&0<%KX"!V   &1?MX€?«Ý5 "(77 QX€€=këµ3! /*08L$ ST€)S™ÿy,@12;IO  Z {||{{|}|}~–Ÿèå‘‹š§‘’˜¡šsuw©ˆYZ[\[\]]\YZZ[ZY€XWWXZYUU€VUR[  € S] ! "€#€$ # €]U] "$%#$(% U] "#$'*% U] ""+-"!    €U\! #$+:ip{iJ0*€ ] U\! $)C¿øß¯\=0   U\ ! $:”ð÷Ït?*%  U\ !#]·àê­fH:$ €  U\!!"f´ÍÚ®a3 U\!!\›ØÉšS&   U\ Z¯Ãw7    T\^ƒc@   !  S\-  € <S\%?PQ2A#  S\%A‡/3DA2   € < S\"1µŒ#&S?   S\$GLĆ>665   € !' UZIv|( #+ƒ -QY.ƒC   ‚  9LXNgo0 „: LX!Zy`„  19 KX€$?&„86KXFR€€ '-7JX(€P '.8%JX$  #&0<%KX"!V   &1?MX€?«Ý5 "(77 QX€€=këµ3! /*08L$ ST€)S™ÿy,@12;IO  Z {||{{|}|}~–Ÿèå‘‹š§‘’˜¡šsuw©l8mkÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿich#Hih32s”bcbc€dcdecb‚cba`‚a `_`abca^]^_ ^]\[Žd€ !  € \f €! "#! ##!!   ^f €! "†#$# /^f  !!#%$#%((*$ !€ ^f  !"$%€#((#  ‚ ^f  !"€#'*)&#  !   ‚)^f  !""$),,(&!  ƒ)^f  !"!&11'"%#(-&!"  ƒ&^e! !$"./+HUYluo\H//*    €-^e! ! ##(/$iÓâÒάsUE50&    €^e€!v "'.2|æü÷Þ”S;5.%     ^e!! !! )1W³ìôòá¥c@4,+     ^e!! !!"'L”¹ßýè¿€]J.%% ‚   ^e!!"%$Y¡ÆÕìÛ¸[OEF/    ^e! !! %e ÃÆÙÜ«ˆ|kN1   ^e! !&c„²ÍÑÐˉ5zV  '    ^e!!  %^y®Ùس“P2  € ^   ^e$XÀѪ]E     ]e"Sœ«˜rG5  %    \eYŒXQL,      \e1:"   \e (. )    € \e€"QP# <¨> .AQ4!  € € \e€ JK( UÓ^37=KD6/% €  \e€"!‹×V-#*LQD. €   \e€!-%J§Ôb!GUD) €   \e!(I>X·ße=Y8 #A;" €  € '  <]d!$ UIa®¬8-/78 ‡  C"_c@lˆx=€', † &C Zb'kL  †  -;€VaH…O=+  … &<,Va!"c^‰v5"  ˆ E#Va2[ƒvdO ‰  .F#Ua€ @\h_ Š 9=)Ua -;  ‰,870 Ua "-mT ‰  ,-44 Ua€€€EW'€€  &)-37Sa€!    &)/49&Ta€€  #%(/6<*Ua€3(  € #$)09>Ua€€' XA    $*1;>  Ua„"#>œÿ• !$.2C+[a„"$Yoçñf,& #!%&'/:F Za„€#!M]•þÚY2# 4-)/06?MA  ]a„€#BbaÛÿºI1$1?036 .AQ4!  € € \e€ JK( UÓ^37=KD6/% €  \e€"!‹×V-#*LQD. €   \e€!-%J§Ôb!GUD) €   \e!(I>X·ße=Y8 #A;" €  € '  <]d!$ UIa®¬8-/78 ‡  C"_c@lˆx=€', † &C Zb'kL  †  -;€VaH…O=+  … &<,Va!"c^‰v5"  ˆ E#Va2[ƒvdO ‰  .F#Ua€ @\h_ Š 9=)Ua -;  ‰,870 Ua "-mT ‰  ,-44 Ua€€€EW'€€  &)-37Sa€!    &)/49&Ta€€  #%(/6<*Ua€3(  € #$)09>Ua€€' XA    $*1;>  Ua„"#>œÿ• !$.2C+[a„"$Yoçñf,& #!%&'/:F Za„€#!M]•þÚY2# 4-)/06?MA  ]a„€#BbaÛÿºI1$1?036 .AQ4!  € € \e€ JK( UÓ^37=KD6/% €  \e€"!‹×V-#*LQD. €   \e€!-%J§Ôb!GUD) €   \e!(I>X·ße=Y8 #A;" €  € '  <]d!$ UIa®¬8-/78 ‡  C"_c@lˆx=€', † &C Zb'kL  †  -;€VaH…O=+  … &<,Va!"c^‰v5"  ˆ E#Va2[ƒvdO ‰  .F#Ua€ @\h_ Š 9=)Ua -;  ‰,870 Ua "-mT ‰  ,-44 Ua€€€EW'€€  &)-37Sa€!    &)/49&Ta€€  #%(/6<*Ua€3(  € #$)09>Ua€€' XA    $*1;>  Ua„"#>œÿ• !$.2C+[a„"$Yoçñf,& #!%&'/:F Za„€#!M]•þÚY2# 4-)/06?MA  ]a„€#BbaÛÿºI1$1?036=96.+((''%! ‚ …  €  €You`‡ :!"#%$!!$&,/56744122018=CJNTY^cfj_TOK<3*((/-)   Š  €€€…You`‡ :!"#$#" )365'"4@ctƒ{y|€†”™”Ž€zobUQM?6/./1/,!  ‹   €€…You`‡ !"#$#"€ ,+775!=O€–©Ÿ››Ÿ£¬°°¨ˆ~paTQM@810030-!  Œ  €€…You`‡ -! !"$##!").2*&-?|™ÑáìàÛÖÕÔÓÏÁ«•}seZOLH@:4€0 ,'   Š  €€…You`‰ !"$.&00.((5Uu±ÊëñõîéßÙÔÎȳ†pfZPGDB;61/.+'!  Š  ‚€€…You` 4!!$$%&)71*).T‚¬âõÿûöõóâÙÏŽ§yaWME?<;41/+*%!  Š  ‚€€…You`‰ 4 !#$'(*110HY•¼ÞóùöòïóòàÓÈÀº¨”}bT@;9540.-(&   Š  ‚€€…You`† € 4!!#%(++/24Ui¦Éæó÷óòðóñáÕʽµ ‹v[N<87420.-(&  Š € ‚€€…You`† € !!€ ""%)./-8Bk»Ôèëìíò÷ðîèÝж¨‚mYG?7531/€. (&  Š € ‚€€…You`†  €!€ 2"$*.1>M]“·ÌÞîôøöõëçåÖœˆ^OB=<95/,*(()$!  Š   €€…You`†  €!€ 2!$*/4G[nŽ·ÉÙîöûöñëçà̶|[QKEC=4-(&%&'    Š   €€…You`†  !""€ 2!$+07\x“®¸»ÆÐîøÿóçëêÒ¶˜wjbgkb[B4%!   Š    €€…You`† ; %#!#)'#.9j©²¹ÁÉæñþóéßÖ·¨šˆo^OC?91+-//,( „‚ ‡ ‚…You`† 6 &#!%,)!.:nª³»ÁÇâîûòèÚѲ¦”ŒoZH?;6425782, „‚ ƒ  ‚…You`† 5 %" #*(!1>p…—µÁÍÎÎÜâêáÙ×Õϼ¦zfNWcc_@FNLKA8. € € €  € € €…You`† €# $!"(&"2@tˆ˜¶ÁÍËÉÕÚäàÛÜÙ¾«˜ƒygeda^€R MI;0&€ ‚  €  ŠYou`Š +"! &&"5Dz‹˜µÀËÈÄÍÑÞßÞâܬ˜ŠŽŽ„sb]\b[QID2(€€€ €  € „ŠYou`‡ " "  €#>8H€‹’©³ÁÁÀÇËØÛÜØÒµ£‘ˆ…{rl`M90+ $$ €  €‡You`‡ <" ! "##:Jˆ¤®¾ÁÂÇÊÔÖÖÒÎÀ­›ˆ€~€‚tlTA0'"$('€ €  €  ‡You`‡ @" !""=Mz€—¢¼ÃÈÌÍÏÊÅÈËÙȳ‡wq‹wg1'  "(,/,€#    ‡You`‡ 5!  !>Morsˆ”²ÀËÔ××ÏÇÐÓͺ¦Š~rkbI; „  €  €…You`ˆ 4 !?Mlnnƒ¯¾ËØÝÚÐÇÏÐİ›‚wi]O6*  €ƒ  ‚  €…You`†   )@Nimo„‘¯¿ÍÛßÝÎÁ´®¥rM=1-*  € € ƒ   € €  €…You`†  ‚ )@Nmtx’ž¼ÈÓÛÜо¬…~iR6+!  €€  "     €…You_‡€ !€ #=Lp{‚ž¬ÇÐÖ×Ô¿§‘i[WG4"  €€ € (     …You` €€. "'+6kxœ©¾ÄÈÅÀ£„gLFR@+    € €      …Wmu_€ "'*3j{ˆ£­¹¹¸²«‘u]KFM9"   ##€ €    € …Wmu_€. "')2i~§°°«¥–~hUIEF1   ",., „  €€€  ‡Wmu_€ "%'1qˆš¤¥’Š‚zucUI?:7' ‚ $  Š ƒ …Wmu_€ "$'2u‰™™•~vpnk[OE840# €  € ‡ ƒ€€  …Wmu_„€ #$1}‹’}qQNOVWMD<(!  €    ‚€  €€ €   €   …Wmu_„€. !#,gnpVI*-2?C>6/   € €  ƒ     …Wmu_ƒ% !(Y]_D7%484-' €  €  ƒ      …Wmu_€€4 "/13&  !   € ‚ €   „   …Wmu_€€*!"#      † ‚ ‚  €  €…Wmu_€…'   "-!  ! € €  ‡Wmu_€‚I%   $>VE: +04.+$$   …Wmu_€€€‚$%$(("  FmeZ$€#$(6;>52# %% €  …Wmu_Ž59UfhP;(   R¡²«Q6!#*19=KORE@+$"" ‰ Š   †Wmu_%,CXdeSF;'  [¬Ã¾iP;1./49>AMQTID1)€"  ‰ Š   …Wmu_6,AT__QF<*! d¶ÌÇtYD8437;>AINRJF6/)('&$! ‰ ‰   …Wmu_Ž1EPRC8."uÇ×Ðw\E8404€8?DIKJB>:870-(! ‰ ‰ €  …Wmu_!165&  ?ŒÖÚÎoQ91.€/,+-3:DFJIHFD;5/# ‰ ‹  …Wmu_#)+) "L–ÜÜÌmN6.+.+)%$%+2@C€NJH?81$  ‰ Š  „Wmu_6!" !!3Bi§âÛËuV=2.-$&.'!!8?QTSLJC;3" ‰ ‰  €  …Wmu_Ž "$#+,,€#(Pdƒ²ßÖÉ€^A*  6=RUVMKB:0! ‰ ‰  „Wmu_/#%'(-20/*.3]o·ßØË„_>) %,#'.GNQMJ?6- € ‰ ‰ €   -1„Wmu_/#$&*1887258_q»âÛÎ…a@.(,7A4,%?GMHF=4+ € ‰ ‰    4:„Wmu_%!"")8GLMDCCaq—ÃíäÕ‹gGAARdr\N( *4€= 91( ‰ Š *EK„Wmt^†€‚€5 "!3J`bA:7]p˜ÅíÜÉuT=5-%  š 2HL#  Ypt^†€:! $%*:YaSV[{‡”—yf/  %1771*#  ™  9EF  Vms^†€!#&3T``js†Œ‚{qRA €€(//.(   – @B?  Tlr]†€€ !)JYnŠ…q[D( €   $%'" ‚–€ )J<5 Rir]†€!"">Lj“ŠƒfI-   %&! €– "0M7-  Qir]†€  ""€4@b|’‰_= && €– *6N2'€Phr\‡€ €(2RpЉ‚Z; €  €€– 2;J+Ohr\‡€$,Li„ˆ‚Y>'! €  €€– 5=H(€Ohq[Š€%#;ZwYI?LOC1   € ‚–  !(<@A"Qjq[Š€/#&)FbuwWVYx‚w^F:3    ‚– &0>@= Qjq[Š.#'!;TosXYa‡”ŠnQB:"   € ‚˜ *3AA; Qiq[‡€€€„ _q`Z[–rN71=6.! ¤  2:JG9Pgq[‡€‚ŠO_[]b‚ŽsUIGRI>-% ¦ !3:HF8Pgq[‡€ŠHOLI:- ¤ !#.03..46:/* Pgq[‡€Š€)!Waf^YB1 ¤ ##$.00-,46:0+ Pgq[‡€€Š+'#-=‹ˆ}k`=%€¤*('*,,))47<2, Pgq[‡‹!$4Asl_MB$ €& ((')+,,-35840Nfq[ˆ€Š"7ATK>," €   € Š&  !&''(*,/034576"Meq[ˆ€Š€#)0<2&  ‰&!%''(*-/034676( Meq[ˆ€Š$)1(  €   ‰& !%''(*-/044677*! Meq[ˆ€Œ%     ‹€ !#%''(*-0144788/%Ogq[ˆ€Š€€   €‹$ "$%&&(*-12678;;1(Ogq[ˆ€Š(  ‰&   #$%&&(*-12679;;1(Ogq[ˆ€‹#'    Š "#$$&&)+.2378€; /&Ogq[ˆ€Š€%+/,)    ‹$  ""#$&&)+.2378;<<)  Ogq[ˆ€Š …(0631!  €   ‹$  !""#$&&)+.248:<><#  Ogq[ˆ€Š € '--+    ‰&  ! !$&&)+/248:=?= Ogq[ˆ€Š&"''&  *)"‹ € !$&&)+/248:=?=  Pgq[ˆ€Œ€   %?egY< ‰ !$&&)+/359;>?<Ofq[‡„Ž‚€€€G *!)h ÔæÜº}@   "),-/411>CN% Ukq[‡—Œ€G )86@†¼ïùìÀ€@   ! "),-/422@EM  Ukq[‡—ŠN#JQVer¹ßÿûæªn6#    !" #')./246CD@ Ukq[‡—ŠN$#3=`[W„•ÙïþðÔ[/,+)"   ! #$%#$%')012:>GB. Ukq[‡—Š&%>Hg^W£åõþêÌT€/*.&  !"! !%&'$$'')233=AIA%   €Tkq[‡—Š€'!-RY`UP¡¶ìõøÚ¹mL264/(!  .+*%#"&'€*()/-.8:9HML>  Tlq[‡—ŒL.?X]`^b¶ÊõøõÕ´iM862*%   %40-'&&(*,--,.532>@@MPI9 Umq[‡—Š0*>P^__hwÎßýûôήfN>40&!  -<30)((-.02;89DEGQTE5  Wpq[‡—ŠN52/147768;ACEIJNR_QJ `yq[‡—ŒLBKba^WZn³õþÿùêÕy^743016/% ;DQF<42/378879=EFEJLMRbNC  c{q[‡—ŠN#IQb_ZW[}¾þÿþõàÅjP2011381( (DKSG<43148::9;?FGGLOOUfJ= d}q[‡Š—N1CQROMNWeµÙ÷þüä±{F;2454331-,SjfSJA?=899?@CDEFHOQS^dq:%    "kƒŽ‡aŠ`—acc__hu‰‰ƒ…ˆ“žÚíûüøá¼˜|vsrq€t rnUVa€ž£œ‡‚~{z€wz|€ƒˆ‰Š’–ufUV\XVSW`][X[g™ªÉÁ†¨Š§™¨*©¨©°¸¾¿¿¹½ÂÏÖûþÿúöÝ˼µ´´±¯³´¶²®£©¼ÐâÚÒ¼»º¸·€¶·¸º€»¼¿¿ÀÄÄǰ©¡¡¤£¢£¤§¥¥¤¦¬ÇЪ‚u‚tŠuŠv‘tss–rs ttuutsrqop€oŒpop„o—¥~‚K‚IŠKŠLJ‰I‚JIHGŠF‚EFG‚HIJKIHFEDCD…CxŠva!€ €Š Š"‰€! Š€€€„Yova!€ €Š Š"‰ €#" €Š„ƒ€„Yova!€ €Š Š"‰ !$$#"! Š‚ƒ€„Yova!€ €Š Š" ‰ "$$#"! ‰  !!  €€„Yova!€ €Š Š" ‰ "$$#"!‰€  €€€„Yova!€ €Š Š"Š "$$#" ‹€€€„Yova!€ €Š ˜"€# ! Š€€„Yova!€ €Š Š"Œ# "" Š € €„Yova!€ † ‡"€!#‰$ #"!! ‰  € €„Yova!€   !!€"$$% $#! '*(''(),++'&  €ƒ  !€‹…Yova!€ „ !!€"$$%($#! (+)(''(*)($!  ’Yova!€ „ !!€"ƒ$(##""!! )+(&$$##!ƒ €’Yova!€ „ !!€"ƒ$#$$%)*(&$! €‚ ‚ ‡’Yova!€ „ !!€"†#$&&'(('%#  €€ƒ € €   €ƒ’Yova!€ „ !!€"##€" #$%'()*+('&%$#"!  %$$" €  € €  €’Yova!€ „ !!‚"€#$%'()€+'&%%$#" €€ ƒ   €”Yova!€ „ !!‚"##$&'(**+,,(&%%$" €€€ ƒ   €”Yova!€ „ !!€" !"#%')*++,€+$'&&%$! €  €  € ‚’Yova!€ „ !!€"1!#$'(,,-,,+*)'&&%%! €  €  €’Yova!€ „ !!€".!#$)*/00.-*('&&''&"   ƒ € € ’Yova!€ „ !!€" "%*-/01/.)'€%'€('#$%)+/11.,&%%&&$! ‚  ‚  ’Yova!ƒ  €" !! "%*-1230/,*€(,-0010249;?>=96.+((''%! ‚ …  €  €You`‡ :!"#%$!!$&,/56744122018=CJNTY^cfj_TOK<3*((/-)   Š  €€€…You`‡ :!"#$#" )365'"4@ctƒ{y|€†”™”Ž€zobUQM?6/./1/,!  ‹   €€…You`‡ !"#$#"€ ,+775!=O€–©Ÿ››Ÿ£¬°°¨ˆ~paTQM@810030-!  Œ  €€…You`‡ -! !"$##!").2*&-?|™ÑáìàÛÖÕÔÓÏÁ«•}seZOLH@:4€0 ,'   Š  €€…You`‰ !"$.&00.((5Uu±ÊëñõîéßÙÔÎȳ†pfZPGDB;61/.+'!  Š  ‚€€…You` 4!!$$%&)71*).T‚¬âõÿûöõóâÙÏŽ§yaWME?<;41/+*%!  Š  ‚€€…You`‰ 4 !#$'(*110HY•¼ÞóùöòïóòàÓÈÀº¨”}bT@;9540.-(&   Š  ‚€€…You`† € 4!!#%(++/24Ui¦Éæó÷óòðóñáÕʽµ ‹v[N<87420.-(&  Š € ‚€€…You`† € !!€ ""%)./-8Bk»Ôèëìíò÷ðîèÝж¨‚mYG?7531/€. (&  Š € ‚€€…You`†  €!€ 2"$*.1>M]“·ÌÞîôøöõëçåÖœˆ^OB=<95/,*(()$!  Š   €€…You`†  €!€ 2!$*/4G[nŽ·ÉÙîöûöñëçà̶|[QKEC=4-(&%&'    Š   €€…You`†  !""€ 2!$+07\x“®¸»ÆÐîøÿóçëêÒ¶˜wjbgkb[B4%!   Š    €€…You`† ; %#!#)'#.9j©²¹ÁÉæñþóéßÖ·¨šˆo^OC?91+-//,( „‚ ‡ ‚…You`† 6 &#!%,)!.:nª³»ÁÇâîûòèÚѲ¦”ŒoZH?;6425782, „‚ ƒ  ‚…You`† 5 %" #*(!1>p…—µÁÍÎÎÜâêáÙ×Õϼ¦zfNWcc_@FNLKA8. € € €  € € €…You`† €# $!"(&"2@tˆ˜¶ÁÍËÉÕÚäàÛÜÙ¾«˜ƒygeda^€R MI;0&€ ‚  €  ŠYou`Š +"! &&"5Dz‹˜µÀËÈÄÍÑÞßÞâܬ˜ŠŽŽ„sb]\b[QID2(€€€ €  € „ŠYou`‡ " "  €#>8H€‹’©³ÁÁÀÇËØÛÜØÒµ£‘ˆ…{rl`M90+ $$ €  €‡You`‡ <" ! "##:Jˆ¤®¾ÁÂÇÊÔÖÖÒÎÀ­›ˆ€~€‚tlTA0'"$('€ €  €  ‡You`‡ @" !""=Mz€—¢¼ÃÈÌÍÏÊÅÈËÙȳ‡wq‹wg1'  "(,/,€#    ‡You`‡ 5!  !>Morsˆ”²ÀËÔ××ÏÇÐÓͺ¦Š~rkbI; „  €  €…You`ˆ 4 !?Mlnnƒ¯¾ËØÝÚÐÇÏÐİ›‚wi]O6*  €ƒ  ‚  €…You`†   )@Nimo„‘¯¿ÍÛßÝÎÁ´®¥rM=1-*  € € ƒ   € €  €…You`†  ‚ )@Nmtx’ž¼ÈÓÛÜо¬…~iR6+!  €€  "     €…You_‡€ !€ #=Lp{‚ž¬ÇÐÖ×Ô¿§‘i[WG4"  €€ € (     …You` €€. "'+6kxœ©¾ÄÈÅÀ£„gLFR@+    € €      …Wmu_€ "'*3j{ˆ£­¹¹¸²«‘u]KFM9"   ##€ €    € …Wmu_€. "')2i~§°°«¥–~hUIEF1   ",., „  €€€  ‡Wmu_€ "%'1qˆš¤¥’Š‚zucUI?:7' ‚ $  Š ƒ …Wmu_€ "$'2u‰™™•~vpnk[OE840# €  € ‡ ƒ€€  …Wmu_„€ #$1}‹’}qQNOVWMD<(!  €    ‚€  €€ €   €   …Wmu_„€. !#,gnpVI*-2?C>6/   € €  ƒ     …Wmu_ƒ% !(Y]_D7%484-' €  €  ƒ      …Wmu_€€4 "/13&  !   € ‚ €   „   …Wmu_€€*!"#      † ‚ ‚  €  €…Wmu_€…'   "-!  ! € €  ‡Wmu_€‚I%   $>VE: +04.+$$   …Wmu_€€€‚$%$(("  FmeZ$€#$(6;>52# %% €  …Wmu_Ž59UfhP;(   R¡²«Q6!#*19=KORE@+$"" ‰ Š   †Wmu_%,CXdeSF;'  [¬Ã¾iP;1./49>AMQTID1)€"  ‰ Š   …Wmu_6,AT__QF<*! d¶ÌÇtYD8437;>AINRJF6/)('&$! ‰ ‰   …Wmu_Ž1EPRC8."uÇ×Ðw\E8404€8?DIKJB>:870-(! ‰ ‰ €  …Wmu_!165&  ?ŒÖÚÎoQ91.€/,+-3:DFJIHFD;5/# ‰ ‹  …Wmu_#)+) "L–ÜÜÌmN6.+.+)%$%+2@C€NJH?81$  ‰ Š  „Wmu_6!" !!3Bi§âÛËuV=2.-$&.'!!8?QTSLJC;3" ‰ ‰  €  …Wmu_Ž "$#+,,€#(Pdƒ²ßÖÉ€^A*  6=RUVMKB:0! ‰ ‰  „Wmu_/#%'(-20/*.3]o·ßØË„_>) %,#'.GNQMJ?6- € ‰ ‰ €   -1„Wmu_/#$&*1887258_q»âÛÎ…a@.(,7A4,%?GMHF=4+ € ‰ ‰    4:„Wmu_%!"")8GLMDCCaq—ÃíäÕ‹gGAARdr\N( *4€= 91( ‰ Š *EK„Wmt^†€‚€5 "!3J`bA:7]p˜ÅíÜÉuT=5-%  š 2HL#  Ypt^†€:! $%*:YaSV[{‡”—yf/  %1771*#  ™  9EF  Vms^†€!#&3T``js†Œ‚{qRA €€(//.(   – @B?  Tlr]†€€ !)JYnŠ…q[D( €   $%'" ‚–€ )J<5 Rir]†€!"">Lj“ŠƒfI-   %&! €– "0M7-  Qir]†€  ""€4@b|’‰_= && €– *6N2'€Phr\‡€ €(2RpЉ‚Z; €  €€– 2;J+Ohr\‡€$,Li„ˆ‚Y>'! €  €€– 5=H(€Ohq[Š€%#;ZwYI?LOC1   € ‚–  !(<@A"Qjq[Š€/#&)FbuwWVYx‚w^F:3    ‚– &0>@= Qjq[Š.#'!;TosXYa‡”ŠnQB:"   € ‚˜ *3AA; Qiq[‡€€€„ _q`Z[–rN71=6.! ¤  2:JG9Pgq[‡€‚ŠO_[]b‚ŽsUIGRI>-% ¦ !3:HF8Pgq[‡€ŠHOLI:- ¤ !#.03..46:/* Pgq[‡€Š€)!Waf^YB1 ¤ ##$.00-,46:0+ Pgq[‡€€Š+'#-=‹ˆ}k`=%€¤*('*,,))47<2, Pgq[‡‹!$4Asl_MB$ €& ((')+,,-35840Nfq[ˆ€Š"7ATK>," €   € Š&  !&''(*,/034576"Meq[ˆ€Š€#)0<2&  ‰&!%''(*-/034676( Meq[ˆ€Š$)1(  €   ‰& !%''(*-/044677*! Meq[ˆ€Œ%     ‹€ !#%''(*-0144788/%Ogq[ˆ€Š€€   €‹$ "$%&&(*-12678;;1(Ogq[ˆ€Š(  ‰&   #$%&&(*-12679;;1(Ogq[ˆ€‹#'    Š "#$$&&)+.2378€; /&Ogq[ˆ€Š€%+/,)    ‹$  ""#$&&)+.2378;<<)  Ogq[ˆ€Š …(0631!  €   ‹$  !""#$&&)+.248:<><#  Ogq[ˆ€Š € '--+    ‰&  ! !$&&)+/248:=?= Ogq[ˆ€Š&"''&  *)"‹ € !$&&)+/248:=?=  Pgq[ˆ€Œ€   %?egY< ‰ !$&&)+/359;>?<Ofq[‡„Ž‚€€€G *!)h ÔæÜº}@   "),-/411>CN% Ukq[‡—Œ€G )86@†¼ïùìÀ€@   ! "),-/422@EM  Ukq[‡—ŠN#JQVer¹ßÿûæªn6#    !" #')./246CD@ Ukq[‡—ŠN$#3=`[W„•ÙïþðÔ[/,+)"   ! #$%#$%')012:>GB. Ukq[‡—Š&%>Hg^W£åõþêÌT€/*.&  !"! !%&'$$'')233=AIA%   €Tkq[‡—Š€'!-RY`UP¡¶ìõøÚ¹mL264/(!  .+*%#"&'€*()/-.8:9HML>  Tlq[‡—ŒL.?X]`^b¶ÊõøõÕ´iM862*%   %40-'&&(*,--,.532>@@MPI9 Umq[‡—Š0*>P^__hwÎßýûôήfN>40&!  -<30)((-.02;89DEGQTE5  Wpq[‡—ŠN52/147768;ACEIJNR_QJ `yq[‡—ŒLBKba^WZn³õþÿùêÕy^743016/% ;DQF<42/378879=EFEJLMRbNC  c{q[‡—ŠN#IQb_ZW[}¾þÿþõàÅjP2011381( (DKSG<43148::9;?FGGLOOUfJ= d}q[‡Š—N1CQROMNWeµÙ÷þüä±{F;2454331-,SjfSJA?=899?@CDEFHOQS^dq:%    "kƒŽ‡aŠ`—acc__hu‰‰ƒ…ˆ“žÚíûüøá¼˜|vsrq€t rnUVa€ž£œ‡‚~{z€wz|€ƒˆ‰Š’–ufUV\XVSW`][X[g™ªÉÁ†¨Š§™¨*©¨©°¸¾¿¿¹½ÂÏÖûþÿúöÝ˼µ´´±¯³´¶²®£©¼ÐâÚÒ¼»º¸·€¶·¸º€»¼¿¿ÀÄÄǰ©¡¡¤£¢£¤§¥¥¤¦¬ÇЪ‚u‚tŠuŠv‘tss–rs ttuutsrqop€oŒpop„o—¥~‚K‚IŠKŠLJ‰I‚JIHGŠF‚EFG‚HIJKIHFEDCD…CxŠva!€ €Š Š"‰€! Š€€€„Yova!€ €Š Š"‰ €#" €Š„ƒ€„Yova!€ €Š Š"‰ !$$#"! Š‚ƒ€„Yova!€ €Š Š" ‰ "$$#"! ‰  !!  €€„Yova!€ €Š Š" ‰ "$$#"!‰€  €€€„Yova!€ €Š Š"Š "$$#" ‹€€€„Yova!€ €Š ˜"€# ! Š€€„Yova!€ €Š Š"Œ# "" Š € €„Yova!€ † ‡"€!#‰$ #"!! ‰  € €„Yova!€   !!€"$$% $#! '*(''(),++'&  €ƒ  !€‹…Yova!€ „ !!€"$$%($#! (+)(''(*)($!  ’Yova!€ „ !!€"ƒ$(##""!! )+(&$$##!ƒ €’Yova!€ „ !!€"ƒ$#$$%)*(&$! €‚ ‚ ‡’Yova!€ „ !!€"†#$&&'(('%#  €€ƒ € €   €ƒ’Yova!€ „ !!€"##€" #$%'()*+('&%$#"!  %$$" €  € €  €’Yova!€ „ !!‚"€#$%'()€+'&%%$#" €€ ƒ   €”Yova!€ „ !!‚"##$&'(**+,,(&%%$" €€€ ƒ   €”Yova!€ „ !!€" !"#%')*++,€+$'&&%$! €  €  € ‚’Yova!€ „ !!€"1!#$'(,,-,,+*)'&&%%! €  €  €’Yova!€ „ !!€".!#$)*/00.-*('&&''&"   ƒ € € ’Yova!€ „ !!€" "%*-/01/.)'€%'€('#$%)+/11.,&%%&&$! ‚  ‚  ’Yova!ƒ  €" !! "%*-1230/,*€(,-0010249;?>=96.+((''%! ‚ …  €  €You`‡ :!"#%$!!$&,/56744122018=CJNTY^cfj_TOK<3*((/-)   Š  €€€…You`‡ :!"#$#" )365'"4@ctƒ{y|€†”™”Ž€zobUQM?6/./1/,!  ‹   €€…You`‡ !"#$#"€ ,+775!=O€–©Ÿ››Ÿ£¬°°¨ˆ~paTQM@810030-!  Œ  €€…You`‡ -! !"$##!").2*&-?|™ÑáìàÛÖÕÔÓÏÁ«•}seZOLH@:4€0 ,'   Š  €€…You`‰ !"$.&00.((5Uu±ÊëñõîéßÙÔÎȳ†pfZPGDB;61/.+'!  Š  ‚€€…You` 4!!$$%&)71*).T‚¬âõÿûöõóâÙÏŽ§yaWME?<;41/+*%!  Š  ‚€€…You`‰ 4 !#$'(*110HY•¼ÞóùöòïóòàÓÈÀº¨”}bT@;9540.-(&   Š  ‚€€…You`† € 4!!#%(++/24Ui¦Éæó÷óòðóñáÕʽµ ‹v[N<87420.-(&  Š € ‚€€…You`† € !!€ ""%)./-8Bk»Ôèëìíò÷ðîèÝж¨‚mYG?7531/€. (&  Š € ‚€€…You`†  €!€ 2"$*.1>M]“·ÌÞîôøöõëçåÖœˆ^OB=<95/,*(()$!  Š   €€…You`†  €!€ 2!$*/4G[nŽ·ÉÙîöûöñëçà̶|[QKEC=4-(&%&'    Š   €€…You`†  !""€ 2!$+07\x“®¸»ÆÐîøÿóçëêÒ¶˜wjbgkb[B4%!   Š    €€…You`† ; %#!#)'#.9j©²¹ÁÉæñþóéßÖ·¨šˆo^OC?91+-//,( „‚ ‡ ‚…You`† 6 &#!%,)!.:nª³»ÁÇâîûòèÚѲ¦”ŒoZH?;6425782, „‚ ƒ  ‚…You`† 5 %" #*(!1>p…—µÁÍÎÎÜâêáÙ×Õϼ¦zfNWcc_@FNLKA8. € € €  € € €…You`† €# $!"(&"2@tˆ˜¶ÁÍËÉÕÚäàÛÜÙ¾«˜ƒygeda^€R MI;0&€ ‚  €  ŠYou`Š +"! &&"5Dz‹˜µÀËÈÄÍÑÞßÞâܬ˜ŠŽŽ„sb]\b[QID2(€€€ €  € „ŠYou`‡ " "  €#>8H€‹’©³ÁÁÀÇËØÛÜØÒµ£‘ˆ…{rl`M90+ $$ €  €‡You`‡ <" ! "##:Jˆ¤®¾ÁÂÇÊÔÖÖÒÎÀ­›ˆ€~€‚tlTA0'"$('€ €  €  ‡You`‡ @" !""=Mz€—¢¼ÃÈÌÍÏÊÅÈËÙȳ‡wq‹wg1'  "(,/,€#    ‡You`‡ 5!  !>Morsˆ”²ÀËÔ××ÏÇÐÓͺ¦Š~rkbI; „  €  €…You`ˆ 4 !?Mlnnƒ¯¾ËØÝÚÐÇÏÐİ›‚wi]O6*  €ƒ  ‚  €…You`†   )@Nimo„‘¯¿ÍÛßÝÎÁ´®¥rM=1-*  € € ƒ   € €  €…You`†  ‚ )@Nmtx’ž¼ÈÓÛÜо¬…~iR6+!  €€  "     €…You_‡€ !€ #=Lp{‚ž¬ÇÐÖ×Ô¿§‘i[WG4"  €€ € (     …You` €€. "'+6kxœ©¾ÄÈÅÀ£„gLFR@+    € €      …Wmu_€ "'*3j{ˆ£­¹¹¸²«‘u]KFM9"   ##€ €    € …Wmu_€. "')2i~§°°«¥–~hUIEF1   ",., „  €€€  ‡Wmu_€ "%'1qˆš¤¥’Š‚zucUI?:7' ‚ $  Š ƒ …Wmu_€ "$'2u‰™™•~vpnk[OE840# €  € ‡ ƒ€€  …Wmu_„€ #$1}‹’}qQNOVWMD<(!  €    ‚€  €€ €   €   …Wmu_„€. !#,gnpVI*-2?C>6/   € €  ƒ     …Wmu_ƒ% !(Y]_D7%484-' €  €  ƒ      …Wmu_€€4 "/13&  !   € ‚ €   „   …Wmu_€€*!"#      † ‚ ‚  €  €…Wmu_€…'   "-!  ! € €  ‡Wmu_€‚I%   $>VE: +04.+$$   …Wmu_€€€‚$%$(("  FmeZ$€#$(6;>52# %% €  …Wmu_Ž59UfhP;(   R¡²«Q6!#*19=KORE@+$"" ‰ Š   †Wmu_%,CXdeSF;'  [¬Ã¾iP;1./49>AMQTID1)€"  ‰ Š   …Wmu_6,AT__QF<*! d¶ÌÇtYD8437;>AINRJF6/)('&$! ‰ ‰   …Wmu_Ž1EPRC8."uÇ×Ðw\E8404€8?DIKJB>:870-(! ‰ ‰ €  …Wmu_!165&  ?ŒÖÚÎoQ91.€/,+-3:DFJIHFD;5/# ‰ ‹  …Wmu_#)+) "L–ÜÜÌmN6.+.+)%$%+2@C€NJH?81$  ‰ Š  „Wmu_6!" !!3Bi§âÛËuV=2.-$&.'!!8?QTSLJC;3" ‰ ‰  €  …Wmu_Ž "$#+,,€#(Pdƒ²ßÖÉ€^A*  6=RUVMKB:0! ‰ ‰  „Wmu_/#%'(-20/*.3]o·ßØË„_>) %,#'.GNQMJ?6- € ‰ ‰ €   -1„Wmu_/#$&*1887258_q»âÛÎ…a@.(,7A4,%?GMHF=4+ € ‰ ‰    4:„Wmu_%!"")8GLMDCCaq—ÃíäÕ‹gGAARdr\N( *4€= 91( ‰ Š *EK„Wmt^†€‚€5 "!3J`bA:7]p˜ÅíÜÉuT=5-%  š 2HL#  Ypt^†€:! $%*:YaSV[{‡”—yf/  %1771*#  ™  9EF  Vms^†€!#&3T``js†Œ‚{qRA €€(//.(   – @B?  Tlr]†€€ !)JYnŠ…q[D( €   $%'" ‚–€ )J<5 Rir]†€!"">Lj“ŠƒfI-   %&! €– "0M7-  Qir]†€  ""€4@b|’‰_= && €– *6N2'€Phr\‡€ €(2RpЉ‚Z; €  €€– 2;J+Ohr\‡€$,Li„ˆ‚Y>'! €  €€– 5=H(€Ohq[Š€%#;ZwYI?LOC1   € ‚–  !(<@A"Qjq[Š€/#&)FbuwWVYx‚w^F:3    ‚– &0>@= Qjq[Š.#'!;TosXYa‡”ŠnQB:"   € ‚˜ *3AA; Qiq[‡€€€„ _q`Z[–rN71=6.! ¤  2:JG9Pgq[‡€‚ŠO_[]b‚ŽsUIGRI>-% ¦ !3:HF8Pgq[‡€ŠHOLI:- ¤ !#.03..46:/* Pgq[‡€Š€)!Waf^YB1 ¤ ##$.00-,46:0+ Pgq[‡€€Š+'#-=‹ˆ}k`=%€¤*('*,,))47<2, Pgq[‡‹!$4Asl_MB$ €& ((')+,,-35840Nfq[ˆ€Š"7ATK>," €   € Š&  !&''(*,/034576"Meq[ˆ€Š€#)0<2&  ‰&!%''(*-/034676( Meq[ˆ€Š$)1(  €   ‰& !%''(*-/044677*! Meq[ˆ€Œ%     ‹€ !#%''(*-0144788/%Ogq[ˆ€Š€€   €‹$ "$%&&(*-12678;;1(Ogq[ˆ€Š(  ‰&   #$%&&(*-12679;;1(Ogq[ˆ€‹#'    Š "#$$&&)+.2378€; /&Ogq[ˆ€Š€%+/,)    ‹$  ""#$&&)+.2378;<<)  Ogq[ˆ€Š …(0631!  €   ‹$  !""#$&&)+.248:<><#  Ogq[ˆ€Š € '--+    ‰&  ! !$&&)+/248:=?= Ogq[ˆ€Š&"''&  *)"‹ € !$&&)+/248:=?=  Pgq[ˆ€Œ€   %?egY< ‰ !$&&)+/359;>?<Ofq[‡„Ž‚€€€G *!)h ÔæÜº}@   "),-/411>CN% Ukq[‡—Œ€G )86@†¼ïùìÀ€@   ! "),-/422@EM  Ukq[‡—ŠN#JQVer¹ßÿûæªn6#    !" #')./246CD@ Ukq[‡—ŠN$#3=`[W„•ÙïþðÔ[/,+)"   ! #$%#$%')012:>GB. Ukq[‡—Š&%>Hg^W£åõþêÌT€/*.&  !"! !%&'$$'')233=AIA%   €Tkq[‡—Š€'!-RY`UP¡¶ìõøÚ¹mL264/(!  .+*%#"&'€*()/-.8:9HML>  Tlq[‡—ŒL.?X]`^b¶ÊõøõÕ´iM862*%   %40-'&&(*,--,.532>@@MPI9 Umq[‡—Š0*>P^__hwÎßýûôήfN>40&!  -<30)((-.02;89DEGQTE5  Wpq[‡—ŠN52/147768;ACEIJNR_QJ `yq[‡—ŒLBKba^WZn³õþÿùêÕy^743016/% ;DQF<42/378879=EFEJLMRbNC  c{q[‡—ŠN#IQb_ZW[}¾þÿþõàÅjP2011381( (DKSG<43148::9;?FGGLOOUfJ= d}q[‡Š—N1CQROMNWeµÙ÷þüä±{F;2454331-,SjfSJA?=899?@CDEFHOQS^dq:%    "kƒŽ‡aŠ`—acc__hu‰‰ƒ…ˆ“žÚíûüøá¼˜|vsrq€t rnUVa€ž£œ‡‚~{z€wz|€ƒˆ‰Š’–ufUV\XVSW`][X[g™ªÉÁ†¨Š§™¨*©¨©°¸¾¿¿¹½ÂÏÖûþÿúöÝ˼µ´´±¯³´¶²®£©¼ÐâÚÒ¼»º¸·€¶·¸º€»¼¿¿ÀÄÄǰ©¡¡¤£¢£¤§¥¥¤¦¬ÇÐt8mk@ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿSndObj-2.6.7/trane/trane.app/Contents/MacOS/thisis000644 000766 000024 00000000026 12062673766 022362 0ustar00victorstaff000000 000000 this is a placeholder SndObj-2.6.7/src/ADSR.cpp000644 000766 000024 00000010173 12062673766 015424 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // ADSR.cpp: implementation of the ADSR class // // Attack - Decay - Sustain - Release // // envelope, for amplitude shaping // // // //************************************************************// #include "ADSR.h" //////////////// CONSTRUCTION / DESTRUCTION //////////////////// ADSR::ADSR(){ Enable(); m_att = m_maxamp = m_dec = m_sus = m_rel = 0.f; m_sustain = 0; m_count = m_dur = 0; AddMsg("attack", 21); AddMsg("decay", 22); AddMsg("sustain", 23); AddMsg("release", 24); AddMsg("maxamp", 25); AddMsg("duration", 26); AddMsg("go to release", 27); AddMsg("lock to sustain", 28); AddMsg("restart", 29); } ADSR::ADSR(float att, float maxamp, float dec, float sus, float rel, float dur, SndObj* InObj, int vecsize, float sr): SndObj(InObj, vecsize, sr){ Enable(); m_maxamp = maxamp; m_sus = sus; m_sustain = 0; m_count = 0; m_att = att*m_sr; m_dec = dec*m_sr; m_rel = rel*m_sr; m_dur = (unsigned long) (dur*m_sr); AddMsg("attack", 21); AddMsg("decay", 22); AddMsg("sustain", 23); AddMsg("release", 24); AddMsg("maxamp", 25); AddMsg("duration", 26); AddMsg("go to release", 27); AddMsg("lock to sustain", 28); AddMsg("restart", 29); } ADSR::~ADSR(){ } ////////////////// OPERATIONS /////////////////////////////// void ADSR::SetADSR(float att, float dec, float sus, float rel) { m_att = m_sr*att; m_dec = m_sr*dec; m_sus = sus; m_rel = m_sr*rel; } void ADSR::SetSr(float sr){ m_att = (sr/m_sr)*m_att; m_dec = (sr/m_sr)*m_dec; m_rel = (sr/m_sr)*m_rel; m_dur = (unsigned long) ( (sr/m_sr)*m_dur); m_sr = sr; } int ADSR::Set(char* mess, float value){ switch (FindMsg(mess)){ case 21: SetADSR(value,m_dec,m_sus,m_rel); return 1; case 22: SetADSR(m_att,value,m_sus,m_rel); return 1; case 23: SetADSR(m_att,m_dec,value,m_rel); return 1; case 24: SetADSR(m_att,m_dec,m_sus,value); return 1; case 25: SetMaxAmp(value); return 1; case 26: SetDur(value); return 1; case 27: Release(); return 1; case 28: Sustain(); return 1; case 29: Restart(); return 1; case 1: SetSr(value); return 1; default: return SndObj::Set(mess,value); } } short ADSR::DoProcess() { if(!m_error){ float a = 0.f; for(m_vecpos=0; m_vecpos < m_vecsize; m_vecpos++){ if(m_enable){ if(m_count == m_dur) m_count=0; if(m_count < m_att) a = (m_maxamp/m_att)*m_count; if(m_count >= m_att && m_count < (m_att+m_dec)) a = ((m_sus - m_maxamp)/m_dec)*(m_count - m_att) + m_maxamp; if(m_count >= (m_att+m_dec) && m_count <= (m_dur - m_rel)) a = m_sus; if (m_count > (m_dur - m_rel)){ if(!m_sustain){ a = ((0 - m_sus)/m_rel)*(m_count - (m_dur - m_rel)) + m_sus; m_count++; } else a = m_sus; } else m_count++; if(m_input) m_output[m_vecpos] = m_input->Output(m_vecpos)*a; else m_output[m_vecpos] = a; } else m_output[m_vecpos] = 0.f ; } return 1; } return 0; } SndObj-2.6.7/src/ADSR.h000644 000766 000024 00000004726 12062673766 015100 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //***********************************************************// // ADSR.h: interface of the ADSR class // // // // // // // //***********************************************************// #ifndef _ADSR_H #define _ADSR_H #include "SndObj.h" class ADSR : public SndObj{ protected: unsigned long m_count; // keeps track of the time in samples float m_att; // attack time float m_maxamp; // max amplitude float m_dec; // decay time float m_sus; // sustain amplitude float m_rel; // release time unsigned long m_dur; // env duration short m_sustain; // sustain flag: 1= ON, 0= OFF public: ADSR(); ADSR(float att, float maxamp, float dec, float sus, float rel, float dur, SndObj* InObj = 0, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~ADSR(); void SetSr(float sr); void SetMaxAmp (float maxamp){ m_maxamp = maxamp; } void Sustain(){ m_sustain = 1; } void Release(){ m_sustain = 0; m_count = (unsigned long)(m_dur - m_rel) + 1; } void Restart() { m_count = 0; } void SetADSR(float att, float dec, float sus, float rel); void SetDur(float dur){ m_dur = (unsigned long) (m_sr*dur); m_count = 0; } int Set(char* mess, float value); short DoProcess(); }; #endif SndObj-2.6.7/src/AdSyn.cpp000644 000766 000024 00000006356 12062673766 015721 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 "AdSyn.h" AdSyn::AdSyn(){ } AdSyn::AdSyn(SinAnal* input, int maxtracks, Table* table, float pitch, float scale, int vecsize, float sr) :ReSyn(input, maxtracks, table, pitch, scale, 1.f, vecsize, sr){ } AdSyn::~AdSyn(){ } short AdSyn::DoProcess() { if(m_input){ float ampnext,amp,freq,freqnext,phase; int i3, i, j, ID, track; int notcontin = 0; bool contin = false; int oldtracks = m_tracks; float* tab = m_ptable->GetTable(); if((m_tracks = ((SinAnal *)m_input)->GetTracks()) > m_maxtracks) m_tracks = m_maxtracks; memset(m_output, 0, sizeof(float)*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 float 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; } } SndObj-2.6.7/src/AdSyn.h000644 000766 000024 00000002345 12062673766 015360 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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, float pitch = 1.f, float scale=1.f, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~AdSyn(); short DoProcess(); }; #endif SndObj-2.6.7/src/Allpass.cpp000644 000766 000024 00000004035 12062673766 016272 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //***********************************************************// // Allpass.cpp: Implementation of the Allpass Object // // (Allpass filter) // // // // // //***********************************************************// #include "Allpass.h" //////////CONSTRUCTION ///////////////////// Allpass::Allpass(){} Allpass::Allpass(float gain, float delaytime, SndObj* InObj, int vecsize, float sr) : Comb(gain, delaytime, InObj, vecsize, sr) {} Allpass::~Allpass() {} ////////////////////OPERATIONS//////////////////// short Allpass::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)*(-m_gain) + GetSample(); PutSample(m_input->Output(m_vecpos) + this->Output(m_vecpos)*m_gain); } else *m_output = 0.f; } return 1; } else{ m_error = 1; return 0; } } else return 0; } SndObj-2.6.7/src/Allpass.h000644 000766 000024 00000003217 12062673766 015740 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Allpass.h: interface of the Allpass class // // (Allpass filter) // // // // // //************************************************************// #ifndef _ALLPASS_H #define _ALLPASS_H #include "Comb.h" class Allpass : public Comb { protected: public: Allpass(); Allpass(float gain, float delaytime, SndObj* InObj, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Allpass(); short DoProcess(); }; #endif SndObj-2.6.7/src/Ap.cpp000644 000766 000024 00000006301 12062673766 015231 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 "Ap.h" Ap::Ap(){ m_inputfr = 0; m_inputR = 0; SetAPParams(m_fr, m_bw); AddMsg("pole frequency", 31); AddMsg("pole radius", 32); } Ap::Ap(float fr, float R, SndObj* input, SndObj* inputfreq, SndObj* inputR, int vecsize, float sr): TpTz(0.,0.,0., 0., 0., input, vecsize, sr){ m_fr = fr; m_bw = R; m_inputfr = inputfreq; m_inputR = inputR; SetAPParams(fr, R); AddMsg("pole frequency", 31); AddMsg("pole radius", 32); } Ap::~Ap(){ } int Ap::Set(char* mess, float value){ switch (FindMsg(mess)){ case 31: SetFreq(value,0); return 1; case 32: SetR(value); return 1; case 1: SetSr(value); return 1; default: return SndObj::Set(mess,value); } } int Ap::Connect(char* mess, void* input){ switch (FindMsg(mess)){ case 31: m_inputfr = (SndObj *) input; return 1; case 32: m_inputR = (SndObj *) input; return 1; default: return SndObj::Connect(mess,input); } } void Ap::SetFreq(float fr, SndObj* inputfreq){ if(!(m_inputfr = inputfreq)) SetAPParams(fr, m_bw); m_fr = fr; } void Ap::SetR(float r, SndObj* inputR){ if(!(m_inputR = inputR)) SetAPParams(m_fr, r); m_bw = r; } short Ap::DoProcess(){ if(!m_error){ if(m_input){ double out = 0., w = 0.; float fr, R; for(m_vecpos=0;m_vecpos < m_vecsize;m_vecpos++){ if(m_enable){ if(m_inputfr || m_inputR){ fr = m_fr + (m_inputfr == 0 ? 0 : m_inputfr->Output(m_vecpos)); R = m_bw + (m_inputR== 0 ? 0 : m_inputR->Output(m_vecpos)); // set params SetAPParams(fr, R); } // filtering w = m_a*(m_input->Output(m_vecpos)) - m_b1*m_delay[0] - m_b2*m_delay[1]; out = w + m_a1*m_delay[0] + m_a2*m_delay[1]; m_delay[1] = m_delay [0]; m_delay[0] = w; m_output[m_vecpos] = out; } else m_output[m_vecpos] = 0.f; } return 1; } else { m_error = 3; return 0; } } else return 0; } char* Ap::ErrorMessage(){ char* message; switch(m_error){ // handle your error codes here case 21: message = "Memory allocation error\n"; break; default: message = Filter::ErrorMessage(); break; } return message; } SndObj-2.6.7/src/Ap.h000644 000766 000024 00000004156 12062673766 014704 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Ap.h: interface of the Ap class (2nd order // // butterworth band-pass filter). // // // // // //************************************************************// #ifndef _AP_H #define _AP_H #include "TpTz.h" class Ap: public TpTz { protected: void inline SetAPParams(float fr, float R); SndObj* m_inputR; SndObj* m_inputfr; public: Ap(); Ap(float fr, float R, SndObj* inObj, SndObj* inputfreq = 0, SndObj* inputR=0, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Ap(); void SetFreq(float fr, SndObj* InFrObj); void SetR(float r, SndObj* InRObj=0); void SetSr(float sr){ m_sr = sr; SetAPParams(m_fr, m_bw); } int Set(char* mess, float value); int Connect(char* mess, void* input); short DoProcess(); char* ErrorMessage(); }; void Ap::SetAPParams(float fr, float R){ R= 1.f/R; double thecos = cos((2*PI*fr)/m_sr); m_a1 = -2*R*thecos; m_a2 = R*R; m_b1 = (-2/R)*thecos; m_b2 = 1/m_a2; m_a = 1; } #endif SndObj-2.6.7/src/asio/000755 000766 000024 00000000000 12062673766 015120 5ustar00victorstaff000000 000000 SndObj-2.6.7/src/AudioDefs.h000644 000766 000024 00000012674 12062673766 016213 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 // AudioDefs.h SndObj Library Defines & Headers // Base Classes #ifndef NOPTHREAD #include "SndThread.h" // needs thread support #include "SndRTThread.h" #endif #include "SndObj.h" #include "SndIO.h" #include "Table.h" // SndObj-derived #include "Oscil.h" // Oscillators #include "Oscilt.h" #include "Oscili.h" #include "FastOsc.h" #include "Osc.h" #include "Osci.h" #include "SndIn.h" // Sound input #include "SndRead.h" // audio file input #include "MidiIn.h" // Midi input #include "Bend.h" // pitch bend #include "MidiMap.h" #include "ADSR.h" // Envelopes #include "IADSR.h" #include "Buzz.h" // Buzzer #include "Balance.h" // Balance of signals #include "DelayLine.h" // Delay line #include "Tap.h" // Truncating tap #include "Tapi.h" // Time-varying tap #include "Comb.h" // Comb filter #include "Allpass.h" // Allpass filter #include "StringFlt.h" // String filter #include "Pluck.h" // Karplus-Strong #include "VDelay.h" // Variable delay #include "Pitch.h" // Pitch transposer #include "Loop.h" // Looping #include "Fir.h" // direct convolution #include "Filter.h" // Fixed-freq/BW reson #include "TpTz.h" // Two-pole Two-zero #include "Reson.h" // Variable reson #include "Lp.h" // Variable LP with resonance #include "ButtBP.h" // Butterworth filters #include "ButtBR.h" #include "ButtHP.h" #include "ButtLP.h" #include "Ap.h" // 2nd order all-pass #include "LowPass.h" // 1st order LP #include "HiPass.h" // 1st order HP #include "Hilb.h" // Hilbert transformer #include "SyncGrain.h" // granular synthesis #include "Mix.h" // Mixer #include "Pan.h" // panning #include "Gain.h" // gain #include "Interp.h" // curve segments #include "Phase.h" // phase accumulator #include "Ring.h" // general-purpose multiplier #include "Unit.h" // test signals #include "Lookup.h" // table lookup #include "Lookupi.h" #include "Rand.h" // Noise #include "Randh.h" // Band-limited noise #include "Randi.h" // interpolated // Spectral stuff #include "FFT.h" // windowed overlapping FFT #include "IFFT.h" // overlap-add IFFT #include "PVA.h" // pvoc analysis/synthesis #include "PVS.h" #include "PVRead.h" #include "IFGram.h" #include "SinAnal.h" // sinusoidal analysis #include "SinSyn.h" // sinusoidal resynthesis #include "AdSyn.h" // additive resynthesis #include "ReSyn.h" // additive resynthesis #include "IFAdd.h" // additive resynthesis #include "SpecMult.h" // spectral multiplication #include "SpecInterp.h" // spectral interpolation #include "PVMask.h" // spectral masking #include "PVTransp.h" // transposition #include "PVMix.h" // mixing #include "PVBlur.h" // blurring #include "PVFilter.h" // mag filtering #include "PVMorph.h" // pvoc morphing #include "SpecPolar.h" // polar converstion #include "SpecSplit.h" // polar conversion & split #include "SpecThresh.h" // threshold filter #include "SpecVoc.h" // impose magnitudes #include "SpecCart.h" // cartesian conversion #include "SpecCombine.h" // combine phases & mags #include "SpecIn.h" // spectral file input #include "Convol.h" // table-based convolution #include "Ptrack.h" // pitch tracker // SndIO-derived #include "SndFIO.h" // Raw file IO #include "SndWave.h" // RIFF-Wave #include "SndWaveX.h" // waveformatextensible #include "SndPVOCEX.h" // pvocex #include "SndSinIO.h" // sinusex #include "SndAiff.h" // AIFF #include "SndBuffer.h" // memory buffer #include "SndMidi.h" // midi IO #include "SndMidiIn.h" #include "SndRTIO.h" // WinMME/OSS/SGI RT IO #ifdef _MBCS #include "SndAsio.h" // ASIO-driver IO #endif #ifdef JACK #include "SndJackIO.h" // Jack IO #endif #ifdef MACOSX #include "SndCoreAudio.h" // Core Audio support #endif // Table-derived #include "HarmTable.h" // wavetables #include "UsrHarmTable.h" #include "TrisegTable.h" // envelope #include "EnvTable.h" // envelope curves #include "SndTable.h" // soundfile input #include "PlnTable.h" // Polynomials #include "HammingTable.h" // Windows #include "NoteTable.h" // midi note conversion #include "UsrDefTable.h" // user-definable #include "LoPassTable.h" // lowpass impulse response #include "SpecEnvTable.h" // spectral envelope #include "PVEnvTable.h" // PV envelope #include "PVTable.h" // PV frame #include "ImpulseTable.h" // linear FIR coeffs SndObj-2.6.7/src/Balance.cpp000644 000766 000024 00000011350 12062673766 016216 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Balance.cpp: Implemenation of the balance object // // // // // // // //************************************************************// #include "Balance.h" Balance::Balance(){ m_comp = 0; m_fr = 10.f; m_pow = m_pow1 = m_pow2 = 0.; if(!(m_delay = new double[4])){ m_error = 12; #ifdef DEBUG cout << ErrorMessage(); #endif return; } if(!(m_delay2 = new double[4])){ m_error = 12; #ifdef DEBUG cout << ErrorMessage(); #endif return; } m_delay[0] = m_delay[1]= m_delay[2] = m_delay [3] = 0.; m_delay2[0] = m_delay2[1]= m_delay2[2] = m_delay2[3] = 0.; // coeff vars double C = 1/(tan(PI*m_fr/m_sr)); m_a0 = 1/(1 + sqrt(2.0)*C + (C*C)); m_a1 = 2*m_a0; m_b1 = 2*(1 - (C*C))*m_a0; m_b2 = (1 - sqrt(2.0)*C + (C*C))*m_a0; AddMsg("lowpass frequency", 21); AddMsg("comparator", 23); } Balance::Balance(SndObj* input1, SndObj* input2, float fr, int vecsize, float sr): SndObj(input1, vecsize, sr){ m_comp = input2; m_fr = fr; m_pow = m_pow1 = m_pow2 = 0.; if(!(m_delay = new double[4])){ m_error = 12; #ifdef DEBUG cout << ErrorMessage(); #endif return; } if(!(m_delay2 = new double[4])){ m_error = 12; #ifdef DEBUG cout << ErrorMessage(); #endif return; } m_delay[0] = m_delay[1]= m_delay[2] = m_delay2[3] = 0.; m_delay2[1] = m_delay2[1]= m_delay2[2] = m_delay2[3] = 0.; // coef vars double C = 1/(tan(PI*m_fr/m_sr)); m_a0 = 1/(1 + sqrt(2.0)*C + (C*C)); m_a1 = 2*m_a0; m_b1 = 2*(1 - (C*C))*m_a0; m_b2 = (1 - sqrt(2.0)*C + (C*C))*m_a0; AddMsg("lowpass frequency", 21); AddMsg("comparator", 23); } Balance::~Balance(){ delete[] m_delay; delete[] m_delay2; } //////////////////// OPERATIONS //////////////////////////// void Balance::SetLPFreq(float fr){ m_fr = fr; // coef vars double C = 1/(tan(PI*m_fr/m_sr)); m_a0 = 1/(1 + sqrt(2.0)*C + (C*C)); m_a1 = 2*m_a0; m_b1 = 2*(1 - (C*C))*m_a0; m_b2 = (1 - sqrt(2.0)*C + (C*C))*m_a0; } void Balance::SetSr(float sr){ m_sr = sr; // coef vars double C = 1/(tan(PI*m_fr/m_sr)); m_a0 = 1/(1 + sqrt(2.0)*C + (C*C)); m_a1 = 2*m_a0; m_b1 = 2*(1 - (C*C))*m_a0; m_b2 = (1 - sqrt(2.0)*C + (C*C))*m_a0; } int Balance::Set(char* mess, float value){ switch (FindMsg(mess)){ case 21: SetLPFreq(value); return 1; case 1: SetSr(value); return 1; default: return SndObj::Set(mess,value); } } int Balance::Connect(char* mess, void* input){ switch (FindMsg(mess)){ case 23: m_comp = (SndObj *) input; return 1; default: return SndObj::Connect(mess,input); } } short Balance::DoProcess(){ if(!m_error){ if(m_input && m_comp){ for(m_vecpos=0;m_vecpos < m_vecsize; m_vecpos++){ if(m_enable){ m_pow2 = filter(rectify(m_input->Output(m_vecpos)), m_delay); m_pow1 = filter(rectify(m_comp->Output(m_vecpos)), m_delay2); if(m_pow2>0){ m_pow = m_pow1/m_pow2; } else m_pow = HUGE_VAL; m_output[m_vecpos] = (float) (m_input->Output(m_vecpos)*m_pow); } else m_output[m_vecpos] = 0.f; } return 1; } else { m_error = 11; return 0; } } else return 0; } char* Balance::ErrorMessage(){ char* message; switch(m_error){ case 11: message = "DoProcess() failed. No input object(s).\n"; break; case 12: message = "Error allocating memory.\n"; break; default: message = SndObj::ErrorMessage(); break; } return message; } SndObj-2.6.7/src/Balance.h000644 000766 000024 00000005057 12062673766 015672 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Balance.h: interface of the Balance class // // // // // // // //************************************************************// #ifndef _BALANCE_H #define _BALANCE_H #include "SndObj.h" class Balance : public SndObj { protected: float m_fr; double m_pow; double m_pow1; double m_pow2; double m_a0, m_a1, m_b1, m_b2; double* m_delay2; double* m_delay; SndObj* m_comp; float rectify(float val){ return (val < 0 ? val*-1 : val); } double filter(double in, double* delay); public: void SetInput(SndObj* input1, SndObj* input2){ m_comp = input2; m_input = input1; } void SetLPFreq(float fr); void SetSr(float sr); int Set(char* mess, float value); Balance(); Balance(SndObj* input1, SndObj* input2, float fr=10.f, int vecsize=DEF_VECSIZE, float sr = DEF_SR); ~Balance(); char* ErrorMessage(); short DoProcess(); int Connect(char* mess, void* input); }; double inline Balance::filter(double in, double* delay) { double out = 0.f; // output // filtering out = m_a0*in + m_a1*delay[2] + m_a0*delay[3] - m_b1*delay[0] - m_b2*delay[1]; // recirculate the delay line delay[3] = delay[2]; // past inputs delay[2] = in; delay[1] = delay[0]; // past outputs delay[0] = out; return(out); // output the float value } #endif SndObj-2.6.7/src/Bend.cpp000644 000766 000024 00000004361 12062673766 015545 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 /***************************************************/ // Bend.cpp: implementation of the Bend class, / // MIDI pitchbend input processing / // / /***************************************************/ #include "Bend.h" Bend::Bend(){ m_message = 0; m_bend = 0; m_range = 0; AddMsg("range", 31); } Bend::Bend(SndObj* InObj, SndMidiIn* input, float range, short channel, int vecsize, float sr) : MidiIn (input, 0, channel, vecsize, sr) { m_input = InObj; m_range = range; m_bend = 0; AddMsg("range", 31); } Bend::~Bend(){ } int Bend::Set(char* mess, float value){ switch(FindMsg(mess)){ case 31: SetRange(value); return 1; default: return MidiIn::Set(mess, value); } } short Bend::DoProcess(){ if(!m_error) { if(m_ioinput && m_input){ for(m_vecpos = 0; m_vecpos < m_vecsize; m_vecpos++){ if(m_enable){ if(m_message == m_ioinput->GetMessage(m_channel+1)) m_bend = m_input->Output(m_vecpos)*( ((m_ioinput->Output(m_channel) - 64.f)*(m_range/100))/ 64.f); m_output[m_vecpos] = m_input->Output(m_vecpos) + m_bend; } else m_output[m_vecpos] = 0.f; } return 1; } else{ m_error = 11; return 0; } } else return 0; } SndObj-2.6.7/src/Bend.h000644 000766 000024 00000003154 12062673766 015211 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 /***************************************************/ // Bend.cpp: implementation of the Bend class, / // MIDI pitchbend input processing / // / /***************************************************/ #ifndef _BEND_H #define _BEND_H #include "MidiIn.h" class Bend : public MidiIn { protected: float m_bend; float m_range; public: Bend(); Bend(SndObj* InObj, SndMidiIn* input, float range, short channel = 1, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Bend(); void SetRange(float range){ m_range = range;} int Set(char* mess, float value); short DoProcess(); }; #endif SndObj-2.6.7/src/ButtBP.cpp000644 000766 000024 00000006740 12062673766 016040 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // ButtBP.cpp : implementation of the ButtBP class // // (2nd order band-pass filter). // // // // // //************************************************************// #include "ButtBP.h" /////////////// CONSTRUCTION / DESTRUCTION ///////////////////// ButtBP::ButtBP(){ m_inputbw = 0; m_inputfr = 0; m_type = 1; SetParam(m_fr, m_bw, m_type); } ButtBP::ButtBP(float fr, float bw, SndObj* inObj, SndObj* inputfreq, SndObj* inputbw, int vecsize, float sr) : TpTz (0., 0., 0., 0., 0., inObj, vecsize, sr){ m_fr = fr; m_bw = bw; m_inputbw = inputbw; m_inputfr = inputfreq; m_type = 1; SetParam(m_fr, m_bw, 1); } ButtBP::~ButtBP(){ } ///////////// OPERATIONS ///////////////////////////////////////// int ButtBP::Set(char* mess, float value){ switch (FindMsg(mess)){ case 21: SetFreq(value); return 1; case 22: SetBW(value); return 1; case 23: SetSr(value); return 1; default: return SndObj::Set(mess,value); } } int ButtBP::Connect(char* mess, void* input){ switch (FindMsg(mess)){ case 21: m_inputfr = (SndObj *) input; return 1; case 22: m_inputbw = (SndObj *) input; return 1; default: return SndObj::Connect(mess,input); } } void ButtBP::SetFreq(float fr, SndObj* InFrObj){ m_fr = fr; if(!(m_inputfr = InFrObj)) SetParam(m_fr, m_bw, m_type); } void ButtBP::SetBW(float bw, SndObj* InBWObj){ m_bw = bw; if(!(m_inputbw = InBWObj)) SetParam(m_fr, m_bw, m_type); } short ButtBP::DoProcess(){ if(!m_error){ if(m_input) { double out = 0. ,w = 0.; float fr, bw; for(m_vecpos=0;m_vecpos < m_vecsize;m_vecpos++){ if(m_enable){ if(m_inputfr || m_inputbw){ fr = m_fr + (m_inputfr == 0 ? 0 : m_inputfr->Output(m_vecpos)); bw = m_bw + (m_inputbw== 0 ? 0 : m_inputbw->Output(m_vecpos)); // set params SetParam(fr,bw,m_type); } // filtering // w = m_a*(m_input->Output(m_vecpos)) - m_b1*m_delay[0] - m_b2*m_delay[1]; out = w + m_a1*m_delay[0] + m_a2*m_delay[1]; m_delay[1] = m_delay [0]; m_delay[0] = w; m_output[m_vecpos] = out; } else m_output[m_vecpos] = 0.f; } return 1; } else { m_error = 11; return 0; } } else return 0; } SndObj-2.6.7/src/ButtBP.h000644 000766 000024 00000005720 12062673766 015502 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // ButtBP.h: interface of the ButtBP class (2nd order // // butterworth band-pass filter). // // // // // //************************************************************// #ifndef _ButtBP_H #define _ButtBP_H #include "TpTz.h" class ButtBP: public TpTz { protected: void inline SetParam(float fr, float bw, int type); int m_type; SndObj* m_inputbw; SndObj* m_inputfr; public: ButtBP(); ButtBP(float fr, float bw, SndObj* inObj, SndObj* inputfreq = 0, SndObj* inputbw = 0, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~ButtBP(); int Set(char* mess, float value); void SetFreq(float fr){ SetFreq(fr,m_inputfr);} void SetBW(float bw){ SetBW(bw,m_inputbw);} void SetFreq(float fr, SndObj* InFrObj); void SetBW(float bw, SndObj* InBWObj); void SetSr(float sr){ m_sr = sr; SetParam(m_fr, m_bw, m_type); } int Connect(char* mess, void* input); short DoProcess(); }; void ButtBP::SetParam(float fr, float bw, int type){ double C, D; switch(type){ case 1: // BP C = 1/(tan(PI*bw/m_sr)); D = 2*cos((2*PI*fr)/m_sr); m_a = (1/(1+C)); m_a1 = 0.f; m_a2 = -m_a; m_b1 = -(C*D*m_a); m_b2 = (C - 1)*m_a; break; case 2: // BR C = (tan(PI*bw/m_sr)); D = 2*cos((2*PI*fr)/m_sr); m_a = 1/(1+C); m_a1 = -(D*m_a); m_a2 = m_a; m_b1 = -(D*m_a); m_b2 = (1 - C)*m_a; break; case 3: // HP C = tan(PI*fr/m_sr); m_a = 1/(1 + sqrt(2.0)*C + (C*C)); // a2 = a0 m_a1 = - 2*m_a; m_a2 = m_a; m_b1 = 2*((C*C) - 1)*m_a; m_b2 = (1 - sqrt(2.0)*C + (C*C))*m_a; break; case 4: C = 1/(tan(PI*fr/m_sr)); m_a = 1/(1 + sqrt(2.0)*C + (C*C)); // a2 = a0 m_a1 = 2*m_a; m_a2 = m_a; m_b1 = 2*(1 - (C*C))*m_a; m_b2 = (1 - sqrt(2.0)*C + (C*C))*m_a; break; } } #endif SndObj-2.6.7/src/ButtBR.cpp000644 000766 000024 00000003364 12062673766 016041 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // ButtBR.cpp : implementation of the ButtBR class // // (2nd order band-reject filter). // // // // // //************************************************************// #include "ButtBR.h" /////////////// CONSTRUCTION / DESTRUCTION ///////////////////// ButtBR::ButtBR(){ m_type = 2; SetParam(m_fr, m_bw, m_type); } ButtBR::ButtBR(float fr, float bw, SndObj* inObj, SndObj* inputfreq, SndObj* inputbw, int vecsize, float sr) : ButtBP (fr, bw, inObj, inputfreq, inputbw, vecsize, sr){ m_type = 2; SetParam(m_fr, m_bw, m_type); } ButtBR::~ButtBR(){ } SndObj-2.6.7/src/ButtBR.h000644 000766 000024 00000003154 12062673766 015503 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // ButtBR.h: interface of the ButtBR class (2nd order // // butterworth band-reject filter). // // // // // //************************************************************// #ifndef _ButtBR_H #define _ButtBR_H #include "ButtBP.h" class ButtBR : public ButtBP { protected: public: ButtBR(); ButtBR(float fr, float bw, SndObj* inObj, SndObj* inputfreq = 0, SndObj* inputbw = 0, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~ButtBR(); }; #endif SndObj-2.6.7/src/ButtHP.cpp000644 000766 000024 00000003266 12062673766 016046 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // ButtHP.cpp : implementation of the ButtHP class // // (2nd order band-pass filter). // // // // // //************************************************************// #include "ButtHP.h" /////////////// CONSTRUCTION / DESTRUCTION ///////////////////// ButtHP::ButtHP(){ m_type = 3; SetParam(m_fr, 0, m_type); } ButtHP::ButtHP(float fr, SndObj* inObj, SndObj* inputfreq, int vecsize, float sr) : ButtBP (fr, 0.f, inObj, inputfreq, 0, vecsize, sr){ m_type = 3; SetParam(m_fr, 0, m_type); } ButtHP::~ButtHP(){ } SndObj-2.6.7/src/ButtHP.h000644 000766 000024 00000003114 12062673766 015503 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // ButtHP.h: interface of the ButtHP class (2nd order // // butterworth high-pass filter). // // // // // //************************************************************// #ifndef _ButtHP_H #define _ButtHP_H #include "ButtBP.h" class ButtHP: public ButtBP { protected: public: ButtHP(); ButtHP(float fr, SndObj* inObj, SndObj* inputfreq = 0, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~ButtHP(); }; #endif SndObj-2.6.7/src/ButtLP.cpp000644 000766 000024 00000003267 12062673766 016053 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // ButtLP.cpp : implementation of the ButtLP class // // (2nd order band-pass filter). // // // // // //************************************************************// #include "ButtLP.h" /////////////// CONSTRUCTION / DESTRUCTION ///////////////////// ButtLP::ButtLP(){ m_type = 4; SetParam(m_fr, 0, m_type); } ButtLP::ButtLP(float fr, SndObj* inObj, SndObj* inputfreq, int vecsize, float sr) : ButtBP (fr, 0.f, inObj, inputfreq, 0, vecsize, sr){ m_type = 4; SetParam(m_fr, 0, m_type); } ButtLP::~ButtLP(){ } SndObj-2.6.7/src/ButtLP.h000644 000766 000024 00000003112 12062673766 015505 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // ButtLP.h: interface of the ButtLP class (2nd order // // butterworth low-pass filter). // // // // // //************************************************************// #ifndef _ButtLP_H #define _ButtLP_H #include "ButtBP.h" class ButtLP: public ButtBP { protected: public: ButtLP(); ButtLP(float fr, SndObj* inObj, SndObj* inputfreq = 0, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~ButtLP(); }; #endif SndObj-2.6.7/src/Buzz.cpp000644 000766 000024 00000010751 12062673766 015627 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 "Buzz.h" #include Buzz::Buzz(){ m_fr = 440.f; m_amp = 1.f; m_harm = 10; if(!(m_ptable = new HarmTable(2048, 1, SINE))){ m_error = 12; #ifdef DEBUG cout << ErrorMessage(); #endif return; } if(!(oscil1 = new Oscili(m_ptable, m_fr*((2*m_harm+1)/2.f), 1.f, 0,0,1))){ m_error = 11; cout << ErrorMessage(); return; } if(!(oscil2 = new Oscili(m_ptable, m_fr/2.f, 1.f,0,0,1))){ m_error = 11; #ifdef DEBUG cout << ErrorMessage(); #endif return; } m_inputamp = 0; AddMsg("frequency", 21); AddMsg("amplitude", 22); AddMsg("harmonics", 23); } Buzz::Buzz(float fr, float amp, short harms, SndObj* inputfreq, SndObj* inputamp, int vecsize, float sr): SndObj(inputfreq, vecsize, sr){ m_fr = fr; m_amp = amp; m_harm = harms; m_inputamp = inputamp; if(!(m_ptable = new HarmTable((long)m_sr/10, 1, SINE))){ m_error = 12; #ifdef DEBUG cout << ErrorMessage(); #endif return; } if(!(oscil1 = new Oscili(m_ptable, m_fr*((2*m_harm)+1)/2, 1.f, 0, 0, 1, m_sr))){ m_error = 11; #ifdef DEBUG cout << ErrorMessage(); #endif return; } if(!(oscil2 = new Oscili(m_ptable, m_fr/2, 1.f, 0, 0, 1, m_sr))){ m_error = 11; #ifdef DEBUG cout << ErrorMessage(); #endif return; } AddMsg("frequency", 21); AddMsg("amplitude", 22); AddMsg("harmonics", 23); } Buzz::~Buzz(){ delete m_ptable; delete oscil1; delete oscil2; } void Buzz::SetSr(float sr){ m_sr = sr; oscil1->SetSr(m_sr); oscil2->SetSr(m_sr); } void Buzz::SetHarm(int harm){ m_harm = harm; oscil1->SetFreq(m_fr*((2*m_harm+1)/2.f)); oscil1->SetPhase(0.f); oscil2->SetPhase(0.f); } void Buzz::SetFreq(float fr, SndObj* InFrObj){ m_fr = fr; if(!(m_input = InFrObj)){ oscil1->SetFreq(fr*((2*m_harm+1)/2.f)); oscil2->SetFreq(fr/2.f); } } int Buzz::Set(char* mess, float value){ switch (FindMsg(mess)){ case 21: SetFreq(value); return 1; case 22: SetAmp(value); return 1; case 23: SetHarm((int)value); return 1; case 1: SetSr(value); return 1; default: return SndObj::Set(mess,value); } } int Buzz::Connect(char* mess, void* input){ switch (FindMsg(mess)){ case 21: m_input = (SndObj *) input; return 1; case 22: m_inputamp = (SndObj *) input; return 1; default: return SndObj::Connect(mess,input); } } short Buzz :: DoProcess(){ if(!m_error){ float a; float b; float fr; float amp; for(m_vecpos=0; m_vecpos < m_vecsize; m_vecpos++){ if(m_enable){ amp = m_amp + (m_inputamp == 0 ? 0 : m_inputamp->Output(m_vecpos)); if(m_input){ fr = m_fr+m_input->Output(m_vecpos); oscil1->SetFreq(fr*((2*m_harm+1)/2.f)); oscil2->SetFreq(fr/2.f); } oscil1->DoProcess(); oscil2->DoProcess(); a = oscil1->Output(0); b = oscil2->Output(0); if(b != 0) m_output[m_vecpos] = (amp/(2*m_harm))*((a/b)-1); else m_output[m_vecpos] = amp; // a simple limiter to avoid occasional big pops if(fabs((double)m_output[m_vecpos]) > amp) m_output[m_vecpos] = (m_output[m_vecpos] > 0 ? amp : -amp); } else m_output[m_vecpos] = 0.f; } return 1; } else return 0; } char* Buzz::ErrorMessage(){ char* message; switch(m_error){ case 11: message = "Error allocating memory for oscillator objects\n"; break; case 12: message = "Error allocating memory for table object\n"; break; default: message = SndObj::ErrorMessage(); break; } return message; } SndObj-2.6.7/src/Buzz.h000644 000766 000024 00000003351 12062673766 015272 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 _BUZZ_H #define _BUZZ_H #include "SndObj.h" #include "HarmTable.h" #include "Oscili.h" class Buzz : public SndObj { protected: HarmTable* m_ptable; // reference to a Table obj Oscili* oscil1; Oscili* oscil2; float m_fr; float m_amp; short m_harm; SndObj* m_inputamp; public: Buzz(); Buzz(float fr, float amp, short harms, SndObj* InFrObj=0, SndObj* InAmpObj=0, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Buzz(); void SetFreq(float fr, SndObj* InFrObj=0); void SetAmp(float amp, SndObj* InAmpObj=0){ m_amp = amp; m_inputamp = InAmpObj; } void SetSr(float sr); void SetHarm(int harm); int Set(char* mess, float value); int Connect(char* mess, void* input); char* ErrorMessage(); short DoProcess(); }; #endif SndObj-2.6.7/src/Comb.cpp000644 000766 000024 00000004431 12062673766 015553 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //***********************************************************// // Comb.cpp: Implementation of the Comb Object // // (comb filter) // // // // // //***********************************************************// #include "Comb.h" //////////CONSTRUCTION ///////////////////// Comb::Comb(){ m_gain = 0.f; AddMsg("gain", 31); } Comb::Comb(float gain, float delaytime, SndObj* InObj, int vecsize, float sr) : DelayLine(delaytime, InObj, vecsize, sr) { m_gain = gain; AddMsg("gain", 31); } Comb::~Comb() { } ////////////////////OPERATIONS//////////////////// int Comb::Set(char* mess, float value){ switch (FindMsg(mess)){ case 31: SetGain(value); return 1; default: return DelayLine::Set(mess,value); } } void Comb::SetGain(float gain){ m_gain = gain; } short Comb::DoProcess(){ if(!m_error){ if(m_input){ for(m_vecpos=0;m_vecpos < m_vecsize;m_vecpos++){ if(m_enable){ m_output[m_vecpos] = GetSample(); PutSample(m_input->Output(m_vecpos) + m_output[m_vecpos]*m_gain); } else *m_output = 0.f; } return 1; } else { m_error = 1; return 0; } } else return 0; } SndObj-2.6.7/src/Comb.h000644 000766 000024 00000003344 12062673766 015222 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Comb.h: interface of the comb class // // (comb filter) // // // // // //************************************************************// #ifndef _COMB_H #define _COMB_H #include "DelayLine.h" class Comb : public DelayLine { protected: float m_gain; // comb gain public: Comb(); Comb(float gain, float delaytime, SndObj* InObj, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Comb(); void SetGain(float gain); int Set(char* mess, float value); short DoProcess(); }; #endif SndObj-2.6.7/src/Convol.cpp000644 000766 000024 00000012255 12062673766 016136 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 /////////////////////////////////////////////// // Convol.cpp: Fast convolution using a tabulated // impulse response // // VL, 2003 ///////////////////////////////////////////// #include "Convol.h" void Convol::fft(float* in, float* out){ // FFT function rfftw_one(m_fwd, in, out); } void Convol::ifft(float* in, float* out) { // Inverse FFT function rfftw_one(m_inv, in, out); } void Convol::mult(float *a, float *b, float *res){ float re1, re2, im1, im2; int halfsize = m_fftsize/2; for(int i=2, i2=1; i < m_fftsize; i+=2){ i2 = i/2; re1 = a[i2]; re2 = b[i2]; im1 = a[m_fftsize-(i2)]; im2 = b[m_fftsize-(i2)]; res[i2] = re1*re2 - im1*im2; res[m_fftsize-(i2)]= re1*im2 + im1*re2; } res[0] = a[0]*b[0]; res[halfsize] = a[halfsize]*b[halfsize]; } Convol::Convol(){ m_table = 0; m_impulse = 0; m_overlap =0; m_sigframe = 0; m_outframe = 0; m_count = 0; AddMsg("impulse" ,21); AddMsg("scale" ,22); m_fwd = 0; m_inv = 0; } Convol::Convol(Table* impulse, SndObj* input, float scale, int vecsize, float sr): SndObj(input, vecsize, sr){ m_table = impulse; m_scale = scale; m_L = m_table->GetLen(); for(m_fftsize=1; m_fftsize < 2*m_L - 1; m_fftsize *=2); m_impulse = new float[m_fftsize]; m_overlap = new float[m_L-1]; m_sigframe = new float[m_fftsize]; m_outframe = new float[m_fftsize]; m_fwd = rfftw_create_plan(m_fftsize, FFTW_REAL_TO_COMPLEX, FFTW_ESTIMATE); m_inv = rfftw_create_plan(m_fftsize, FFTW_COMPLEX_TO_REAL, FFTW_ESTIMATE); for(int i=0; iLookup(i)*m_scale/m_fftsize; else m_sigframe[i] = 0.f; m_outframe[i] =0.f; if(i< m_L-1)m_overlap[i] =0.f; } fft(m_sigframe, m_impulse); m_count = 0; AddMsg("impulse" ,21); AddMsg("scale" ,22); } Convol::~Convol(){ delete[] m_impulse; delete[] m_sigframe; delete[] m_overlap; delete[] m_outframe; rfftw_destroy_plan(m_fwd); rfftw_destroy_plan(m_inv); } int Convol::Connect(char* mess, void* input){ switch(FindMsg(mess)){ case 21: SetImpulse((Table *) input, m_scale); return 1; default: return SndObj::Connect(mess, input); } } int Convol::Set(char* mess, float value){ switch(FindMsg(mess)){ case 21: SetImpulse(m_table, value); return 1; default: return SndObj::Set(mess, value); } } void Convol::SetImpulse(Table* impulse, float scale){ if(impulse == m_table){ m_scale = scale; if(m_table){ for(int i=0;iGetLen(); for(m_fftsize=1; m_fftsize < 2*m_L - 1; m_fftsize *=2); m_impulse = new float[m_fftsize]; m_overlap = new float[m_L-1]; m_sigframe = new float[m_fftsize]; m_outframe = new float[m_fftsize]; m_fwd = rfftw_create_plan(m_fftsize, FFTW_REAL_TO_COMPLEX, FFTW_ESTIMATE); m_inv = rfftw_create_plan(m_fftsize, FFTW_COMPLEX_TO_REAL, FFTW_ESTIMATE); for(int i=0; iLookup(i)*m_scale/m_fftsize; else m_sigframe[i] = 0.f; m_outframe[i] =0.f; if(i< m_L-1)m_overlap[i] =0.f; } fft(m_sigframe, m_impulse); m_count = 0; } short Convol::DoProcess(){ if(!m_error){ if(m_input && m_table){ int i; for(m_vecpos = 0; m_vecpos < m_vecsize; m_vecpos++) { if(m_enable) { if(m_count == m_L){ // perform the convolution for(i=0;iOutput(m_vecpos)/m_fftsize; // overlap-add m_output[m_vecpos] = m_outframe[m_count] + (m_count < m_L-1 ? m_overlap[m_count] : 0); m_count++; } else m_output[m_vecpos] = 0.f; } return 1; } else { m_error = 3; return 0; } } else return 0; } SndObj-2.6.7/src/Convol.h000644 000766 000024 00000003704 12062673766 015602 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 /////////////////////////////////////////////// // Convol.h: Fast convolution using a tabulated // impulse response // // VL, 2003 ///////////////////////////////////////////// #ifndef _CONVOL_H #define _CONVOL_H #include "SndObj.h" #include "Table.h" #include class Convol: public SndObj { protected: Table* m_table; float* m_impulse; float* m_sigframe; float* m_outframe; float* m_overlap; int m_L; int m_count; int m_fftsize; float m_scale; rfftw_plan m_fwd; rfftw_plan m_inv; void inline mult(float* a, float* b, float* res); void inline fft(float* in, float* out); void inline ifft(float* in, float* out); public: // constructors / destructor Convol(); Convol(Table* impulse, SndObj* input, float scale=1.f, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Convol(); int Connect(char* mess, void* input); int Set(char* mess, float value); void SetImpulse(Table* impulse, float scale); short DoProcess(); }; #endif SndObj-2.6.7/src/DelayLine.cpp000644 000766 000024 00000007075 12062673766 016550 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //***********************************************************// // DelayLine.cpp: Implementation of the DelayLine Object // // (simple delay line) // // // // // //***********************************************************// #include "DelayLine.h" //////////CONSTRUCTION ///////////////////// DelayLine::DelayLine(){ m_delaytime = 0.f; m_size = 0; m_delay = 0; m_wpointer = 0; m_rpointer = 0; AddMsg("max delaytime", 21); } DelayLine::DelayLine(float delaytime, SndObj* InObj, int vecsize, float sr): SndObj(InObj, vecsize, sr) { m_delaytime = delaytime; m_size = (long)(delaytime*m_sr); if(!(m_delay = new float[m_size])){ m_error = 13; #ifdef DEBUG cout << ErrorMessage(); #endif return; } m_wpointer = 0; m_rpointer = 1; Reset(); AddMsg("max delaytime", 21); } DelayLine::~DelayLine() { delete[] m_delay; } //////////////////OPERATIONS ////////////////////// int DelayLine::Set(char* mess, float value){ switch (FindMsg(mess)){ case 21: SetDelayTime(value); return 1; case 1: SetSr(value); return 1; default: return SndObj::Set(mess,value); } } void DelayLine::SetSr(float sr){ m_sr = sr; if(m_delay) delete[] m_delay; m_size = (long)(m_delaytime*m_sr); if(!(m_delay = new float[m_size])){ m_error = 13; #ifdef DEBUG cout << ErrorMessage(); #endif return; } Reset(); } void DelayLine::Reset(){ for(int n = 0; n < m_size; n++) PutSample(0.f); } void DelayLine::SetDelayTime(float delaytime) { m_delaytime = delaytime; m_size = (long)(delaytime*m_sr); if(m_delay) delete[] m_delay; if(!(m_delay = new float[m_size])){ m_error = 13; #ifdef DEBUG cout << ErrorMessage(); #endif return; } Reset(); } short DelayLine::DoProcess(){ if(!m_error){ if(m_input){ for(m_vecpos=0; m_vecpos < m_vecsize;m_vecpos++){ if(m_enable){ m_output[m_vecpos] = GetSample(); PutSample(m_input->Output(m_vecpos)); } else m_output[m_vecpos] = 0.f; } return 1; } else { m_error = 11; return 0; } } else return 0; } //////////// ERROR HANDLING ////////////////////////////////// char* DelayLine::ErrorMessage(){ char* message; switch(m_error){ case 11: message = "DoProcess() failed. No input object."; break; case 13: message = "Delay line allocation error."; break; default: message = SndObj::ErrorMessage(); break; } return message; } SndObj-2.6.7/src/DelayLine.h000644 000766 000024 00000005163 12062673766 016211 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // DelayLine.h: interface of the Delayline class // // // // // // // //************************************************************// #ifndef _DELAYLINE_H #define _DELAYLINE_H #include "SndObj.h" class DelayLine : public SndObj { protected: float* m_delay; // delay line float m_delaytime; // delay time long m_size; // delay line size in samples long m_wpointer; // write pointer long m_rpointer; // read pointer void PutSample(float sample){ m_delay[m_wpointer] = sample; m_wpointer = (m_wpointer != m_size-1 ? m_wpointer+1 : 0); } float GetSample(){ float out; out = m_delay[(m_rpointer%=m_size)]; m_rpointer++; return out; } float GetSample(float pos){ int p = (int) pos, pp1 = (p == m_size-1 ? 0 : p+1); float frac = pos - p; return m_delay[p] + frac*(m_delay[pp1] - m_delay[p]); } float GetSample(long pos){ return m_delay[pos]; } public: DelayLine(); DelayLine(float delaytime, SndObj* InObj, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~DelayLine(); float* Buffer() { return m_delay; } long GetWritePointerPos() { return m_wpointer; } float GetDelayTime() { return m_size/m_sr; } void SetSr(float sr); void Reset(); virtual void SetDelayTime(float delaytime); int Set(char* mess, float value); short DoProcess(); char* ErrorMessage(); }; #endif SndObj-2.6.7/src/EnvTable.cpp000644 000766 000024 00000007277 12062673766 016406 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 "EnvTable.h" EnvTable :: EnvTable(){ m_L = 512; m_segments = 1; m_seglen = new int[1]; m_seglen[0] = 512; m_segp = new float[2]; m_segp[0] = 0.f; m_segp[1] = 1.f; m_typec = 0.f; m_table = new float[m_L+1]; MakeTable(); } EnvTable :: EnvTable(long L, int segments, float start, float* points, float* lengths, float type){ int i; m_L = L; m_typec = type; m_segments = segments; m_segp = new float[m_segments+1]; m_seglen = new int[m_segments]; if( (m_segp[0] = start) <=0.f && m_typec != 0.f) m_segp[0] = 0.00000001f; for(i=0; i < segments; i++){ if( (m_segp[i+1] = points[i]) <= 0.f && m_typec != 0.f) m_segp[i+1] = 0.00000001f; } float total=0; for(i=0; i < segments; i++) total += lengths[i]; for(i=0; i < segments; i++) m_seglen[i] = (int) (m_L*lengths[i]/total); m_table = new float [m_L+1]; MakeTable(); } void EnvTable::SetEnvelope(int segments, float start, float* points, float* lengths, float type) { int i; m_typec = type; m_segments = segments; m_segp = new float[m_segments+1]; m_seglen = new int[m_segments]; if( (m_segp[0] = start) <=0.f && m_typec != 0.f) m_segp[0] = 0.00000001f; for(i=0; i < segments; i++){ if( (m_segp[i+1] = points[i]) <= 0.f && m_typec != 0.f) m_segp[i+1] = 0.00000001f; } float total=0; for(i=0; i < segments; i++) total += lengths[i]; for(i=0; i < segments; i++) m_seglen[i] = (int) (m_L*lengths[i]/total); MakeTable(); } EnvTable::~EnvTable(){ delete[] m_table; delete[] m_segp; delete[] m_seglen; } short EnvTable :: MakeTable(){ int i, j, tpos; float max = 1.f; if(m_typec == 0.f){ for(j=0,i=0,tpos=0;jGetLen(); int lobits = 0; for(int len = m_size; (len & maxlength)==0; lobits++, len<<=1); m_lobits = lobits; } else m_size = 0; m_factor = (float)maxlength/m_sr; m_amp = amp; m_fr = fr; AddMsg("frequency", 21); AddMsg("amplitude", 22); AddMsg("phase", 23); AddMsg("table", 24); } FastOsc::~FastOsc(){ } void FastOsc::SetSr(float sr) { SndObj::SetSr(sr); m_factor = maxlength/m_sr; } int FastOsc::Connect(char* mess, void* input){ switch (FindMsg(mess)){ case 23: SetTable((Table *) input); return 1; default: return SndObj::Connect(mess,input); } } void FastOsc::SetTable(Table *table) { m_ptable = table; m_size = m_ptable->GetLen(); m_phase = 0; int lobits =0; for(int len = m_size; (len & maxlength)==0; lobits++, len<<=1); m_lobits = lobits; } int FastOsc::Set(char* mess, float value){ switch (FindMsg(mess)){ case 1: SetSr(value); return 1; case 21: SetFreq(value); return 1; case 22: SetAmp(value); return 1; case 23: SetPhase(value); return 1; default: return SndObj::Set(mess,value); } } short FastOsc::DoProcess(){ if(!m_error){ if(!m_ptable){ m_error = 1; // empty table object return 0; } long incr = (long) (m_fr * m_factor); float amp = m_amp; long ph = m_phase; float *tab = m_ptable->GetTable(); // wrapping loop for(m_vecpos = 0; m_vecpos < m_vecsize; m_vecpos++){ if(m_enable){ m_output[m_vecpos] = *(tab+(ph>>m_lobits)) * amp ; ph += incr; ph &= phasemask; } else { // if disabled m_output[m_vecpos] = 0.f; } } // end wrapping loop m_phase = ph; return 1; } else return 0; } SndObj-2.6.7/src/FastOsc.h000644 000766 000024 00000003336 12062673766 015705 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 informationc #ifndef _FASTOSC_H #define _FASTOSC_H #include "SndObj.h" #include "Table.h" const long phasemask = 0x0FFFFFFL; const long maxlength = 0x1000000L; class FastOsc : public SndObj { protected: long m_phase; long m_size; float m_factor; long m_lobits; float m_amp; float m_fr; Table* m_ptable; public: FastOsc(); FastOsc(Table* table, float fr, float amp, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~FastOsc(); void SetFreq(float fr) { m_fr = fr;} void SetAmp(float amp) { m_amp = amp;} void SetPhase(float phase){m_phase = (long)(maxlength*phase);} virtual void SetTable(Table* table); int Set(char* mess, float value); int Connect(char* mess, void* input); void SetSr(float sr); short DoProcess(); }; #endif SndObj-2.6.7/src/FFT.cpp000644 000766 000024 00000013661 12062673766 015317 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 float*[m_frames]; m_ffttmp = new float[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(float)); int i; for(i = 0; i < m_frames; i++){ m_sigframe[i] = new float[m_fftsize]; memset(m_sigframe[i], 0, m_fftsize*sizeof(float)); 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, float scale, int fftsize, int hopsize, float sr): SndObj(input, fftsize, sr){ m_table = window; m_hopsize = hopsize; m_fftsize = fftsize; m_frames = m_fftsize/m_hopsize; m_sigframe = new float*[m_frames]; m_ffttmp = new float[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(float)); int i; for(i = 0; i < m_frames; i++){ m_sigframe[i] = new float[m_fftsize]; memset(m_sigframe[i], 0, m_fftsize*sizeof(float)); 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 float[m_vecsize])){ m_error = 1; #ifdef DEBUG cout << ErrorMessage(); #endif return; } m_frames = m_fftsize/m_hopsize; m_sigframe = new float*[m_frames]; m_ffttmp = new float[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 float[m_fftsize]; memset(m_sigframe[i], 0, m_fftsize*sizeof(float)); 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, float 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; float 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(float* 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 float m_fund; float m_scale; // scaling factor float m_norm; // norm factor int m_frames; // frame overlaps float** m_sigframe; // signal frames float* 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(float* signal); // reset memory and initialisation void ReInit(); public: FFT(); FFT(Table* window, SndObj* input, float scale=1.f, int fftsize=DEF_FFTSIZE, int hopsize=DEF_VECSIZE, float 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, float value); void SetScale(float scale){ m_scale = scale; m_norm = m_fftsize/m_scale;} virtual void SetFFTSize(int fftsize); virtual void SetHopSize(int hopsize); short DoProcess(); }; #endif SndObj-2.6.7/src/FFT_alt.cpp000644 000766 000024 00000016541 12062673766 016157 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 // ///////////////////////////////////////////////// // 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 // since SndObj has already allocated the output // we have to de-allocate m_fftsize = DEF_FFTSIZE; SetVectorSize(DEF_FFTSIZE); m_hopsize = DEF_VECSIZE; delete[] m_output; if(!(m_output = new float[m_vecsize])){ m_error = 1; cout << ErrorMessage(); return; } m_frames = m_fftsize/m_hopsize; m_sigframe = new float*[m_frames]; m_ffttmp = new float[m_fftsize]; m_counter = new int[m_frames]; m_halfsize = m_fftsize/2; int i; for(i = 0; i < m_frames; i++){ m_sigframe[i] = new float[m_fftsize]; memset(m_sigframe[i], 0, m_fftsize*sizeof(float)); 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, float scale, int fftsize, int hopsize, int vecsize, float sr): SndObj(input, vecsize, sr){ m_table = window; m_hopsize = hopsize; m_fftsize = fftsize; m_frames = m_fftsize/m_hopsize; m_sigframe = new float*[m_frames]; m_ffttmp = new float[m_fftsize]; m_counter = new int[m_frames]; m_halfsize = m_fftsize/2; int i; for(i = 0; i < m_frames; i++){ m_sigframe[i] = new float[m_fftsize]; memset(m_sigframe[i], 0, m_fftsize*sizeof(float)); 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(){ rfftw_destroy_plan(m_plan); 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 float[m_vecsize])){ m_error = 1; cout << ErrorMessage(); return; } m_frames = m_fftsize/m_hopsize; m_sigframe = new float*[m_frames]; m_ffttmp = new float[m_fftsize]; m_counter = new int[m_frames]; m_halfsize = m_fftsize/2; int i; for(i = 0; i < m_frames; i++){ m_sigframe[i] = new float[m_fftsize]; memset(m_sigframe[i], 0, m_fftsize*sizeof(float)); 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, float 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 32: SetWindow((Table *) input); return 1; default: return SndObj::Connect(mess, input); } } short FFT::DoProcess(){ if(!m_error){ if(m_input){ if(m_enable){ int i; float 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(float* signal){ // FFT function for(int i=0; i < m_fftsize; i++) m_output[i] = signal[i]/m_norm; rfft(signal, m_fftsize/2, 1); } void bitreverse(float x[], int N){ float rtemp, itemp; int i, j, m; for(i = j = 0 ; i < N ; i += 2 , j += m) { if(j > i) { rtemp = x[j]; itemp = x[j+1]; /*complex exchange*/ x[j] = x[i] ; x[j+1] = x[i+1]; x[i] = rtemp ; x[i+1] = itemp; } for (m = N>>1; m >= 2 && j >= m; m >>= 1 ) j -= m ; } } void cfft(float x[], int NC, int forward){ float wr, wpr, wi, wpi, theta, scale; int mmax, ND, m, i, j, delta; ND = NC << 1; bitreverse(x, ND); for(mmax = 2; mmax < ND; mmax = delta) { delta = mmax<<1; theta = TWOPI/(forward? mmax : -mmax); wpr = (float) (-2.*pow(sin(0.5*theta), 2.)); wpi = (float)sin(theta); wr = 1. ; wi = 0. ; for(m = 0; m< mmax ; m += 2){ float rtemp, itemp; for(i = m; i < ND; i += delta){ j = i + mmax; rtemp = wr*x[j] - wi*x[j+1]; itemp = wr*x[j+1]+ wi*x[j]; x[j] = x[i] - rtemp; x[j+1] = x[i+1] - itemp; x[i] += rtemp; x[i+1] += itemp; } wr = (rtemp = wr)*wpr - wi*wpi + wr; wi = wi*wpr + rtemp*wpi + wi; } } /* * *scale output * * */ scale = (float)(forward ? 1./ND : 1.) ; for (i=0; i < ND; i++) x[i] *= scale; } /**********************************************/ /* FFT function */ /**********************************************/ void FFT::rfft(float x[], int N, int forward){ float c1, c2, h1r, h1i, h2r, h2i, wr, wi, wpr; float wpi, temp, theta, xr, xi; int i, i1, i2, i3, i4, N2p1 ; theta = PI/N; wr= 1. ; wi = 0. ; c1 = 0.5 ; if (forward){ c2 = -0.5 ; cfft(x, N, forward); xr = x[0]; xi = x[1]; }else { c2 = 0.5 ; theta = -theta ; xr = x[1] ; xi = 0. ; x[1] = 0. ; } wpr = (float)(-2.*pow(sin(0.5*theta), 2.)); wpi = (float)sin(theta); N2p1 = (N<<1) + 1; for(i=0; i<= N>>1 ; i++){ i1 = i<<1 ; i2 = i1 + 1 ; i3 = N2p1 - i2 ; i4 = i3 + 1; if(i == 0){ h1r = c1*(x[i1] + xr); h1i = c1*(x[i2] - xi); h2r = -c2*(x[i2] + xi); h2i = c2*(x[i1] - xr); x[i1] = h1r + wr*h2r - wi*h2i ; x[i2] = h1i + wr*h2i + wi*h2r ; xr = h1r - wr*h2r + wi*h2i; xi = -h1i + wr*h2i + wi*h2r; } else { h1r = c1*(x[i1] + x[i3] ) ; h1i = c1*(x[i2] - x[i4] ) ; h2r = -c2*(x[i2] + x[i4] ) ; h2i = c2*(x[i1] - x[i3] ) ; x[i1] = h1r + wr*h2r - wi*h2i ; x[i2] = h2i + wr*h2i + wi*h2r ; x[i3] = h1r - wr*h2r + wi*h2i ; x[i4] = -h1i + wr*h2i + wi*h2r ; } wr = (temp = wr)*wpr - wi*wpi + wr ; wi = wi*wpr + temp*wpi + wi; } if(forward) x[1] = xr ; else cfft(x, N, forward); } SndObj-2.6.7/src/FFT_alt.h000644 000766 000024 00000004753 12062673766 015626 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 // ////////////////////////////////////////////////////// // FFT_alternative.h : a self-contained alternative // to the FFT class, not using FFTW, using its own // FFT functions. Slower, but independent, // Victor Lazzarini, 2003 ///////////////////////////////////////////////////////// #ifndef _FFT_H #define _FFT_H #include "SndObj.h" #include "Table.h" 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 float m_scale; // scaling factor float m_norm; // norm factor int m_frames; // frame overlaps float** m_sigframe; // signal frames float* m_ffttmp; // tmp vector for fft transform int m_cur; // index into current frame Table* m_table; // window // fft wrapper method void inline fft(float* signal); // reset memory and initialisation void ReInit(); void rfft(float* x, int N, int forward); public: FFT(); FFT(Table* window, SndObj* input, float scale=1.f, int fftsize=DEF_FFTSIZE, int hopsize=DEF_VECSIZE, int vecsize=DEF_FFTSIZE, float 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, float value); void SetScale(float scale){ m_scale = scale; m_norm = m_fftsize/m_scale;} virtual void SetFFTSize(int fftsize); virtual void SetHopSize(int hopsize); short DoProcess(); }; #endif SndObj-2.6.7/src/Filter.cpp000644 000766 000024 00000006102 12062673766 016115 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Filter.cpp : implementation of the Filter base class // // // // // // // //************************************************************// #include "Filter.h" Filter::Filter(){ m_fr = 1000.f; m_bw = 250.f; m_delay = new double[2]; m_delay[0] = m_delay[1] = 0.f; SetParam(m_fr, m_bw); AddMsg("frequency", 21); AddMsg("bandwidth", 22); } Filter::Filter(float fr, float bw, SndObj* inObj, int vecsize, float sr): SndObj(inObj, vecsize, sr){ m_fr = fr; m_bw = bw; m_delay = new double[2]; m_delay[0] = m_delay[1] = 0.f; SetParam(m_fr, m_bw); AddMsg("frequency", 21); AddMsg("bandwidth", 22); } Filter::~Filter(){ delete[] m_delay; } int Filter::Set(char* mess, float value){ switch (FindMsg(mess)){ case 21: SetFreq(value); return 1; case 22: SetBW(value); return 1; case 1: SetSr(value); return 1; default: return SndObj::Set(mess,value); } } void Filter::SetBW(float bw){ m_bw = bw; SetParam(m_fr, m_bw); } void Filter::SetFreq(float fr){ m_fr = fr; SetParam(m_fr, m_bw); } short Filter::DoProcess(){ if(!m_error){ if(m_input) { double out = 0.; for(m_vecpos=0;m_vecpos < m_vecsize;m_vecpos++){ if(m_enable){ out = (m_a*(m_input->Output(m_vecpos)) + m_b1*m_delay[0] - m_b2*m_delay[1]); m_delay[1] = m_delay [0]; // recirculate the delay line m_delay[0] = out; m_output[m_vecpos] = out; } else m_output[m_vecpos] = 0.f; } return 1; } else { m_error = 11; return 0; } } else return 0; } ///////////// ERROR HANDLING ////////////////////////////////// char* Filter::ErrorMessage(){ char* message; switch(m_error){ case 11: message = "DoProcess() failed. No input object."; break; default: message = SndObj::ErrorMessage(); break; } return message; } SndObj-2.6.7/src/Filter.h000644 000766 000024 00000004340 12062673766 015564 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // filter.h: interface of the Filter abstract base class // // // // // // // //************************************************************// #ifndef _FILTER_H #define _FILTER_H #include "SndObj.h" class Filter : public SndObj { protected: float m_fr; float m_bw; double* m_delay; // filter delay void inline SetParam(float fr, float bw); double m_a; double m_b1; double m_b2; public: Filter(); Filter(float fr, float bw, SndObj* inObj, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Filter(); virtual void SetFreq(float fr); virtual void SetBW(float bw); int Set(char* mess, float value); void SetSr(float sr){ m_sr = sr; SetParam(m_fr, m_bw); } char* ErrorMessage(); short DoProcess(); }; void Filter::SetParam(float fr, float bw){ double R, thecos, rsq, rr; // coefficient vars rr = 2*(R = (1 - PI*(bw/m_sr))); rsq = R*R; thecos = (rr/(1+(rsq)))*cos(PI*(fr/(m_sr/2))); m_a = (1 - (rsq))*sin(acos(thecos)); m_b1 = rr*thecos; m_b2 = rsq; } #endif SndObj-2.6.7/src/Fir.cpp000644 000766 000024 00000006427 12062673766 015422 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //////////////////////////////////////////////// // FIR.cpp: implementation of the FIR class // Finite Impulse Response filter // by direct convolution //////////////////////////////////////////////// #include "Fir.h" #include "UsrDefTable.h" FIR::FIR(){ m_table = 0; m_newtable = false; AddMsg("impulse", 31); AddMsg("impulse size", 32); AddMsg("table", 33); } FIR::FIR(Table* coeftable, SndObj* input, int vecsize, float sr) : DelayLine(coeftable->GetLen()/sr, input, vecsize, sr){ m_table = coeftable; m_newtable = false; AddMsg("impulse", 31); AddMsg("impulse size", 32); AddMsg("table", 33); } FIR::FIR(float* impulse, int impulsesize, SndObj* input, int vecsize, float sr) : DelayLine(impulsesize/sr, input, vecsize, sr){ m_table = new UsrDefTable(impulsesize, impulse); m_newtable = true; AddMsg("impulse", 31); AddMsg("impulse size", 32); AddMsg("table", 33); } FIR::~FIR(){ if(m_newtable) delete m_table; } void FIR::SetImpulse(float* impulse, int impulsesize){ if(m_newtable) delete m_table; m_table = new UsrDefTable(impulsesize, impulse); SetDelayTime(impulsesize*m_sr); m_newtable = true; } short FIR::DoProcess(){ if(!m_error){ if(m_input){ float out; int i; for(m_vecpos=0; m_vecpos < m_vecsize;m_vecpos++){ if(m_enable){ PutSample(m_input->Output(m_vecpos)); // wpointer is already incremented, so that the // current sample is at wpointer - 1 // and oldest sample at wpointer - m_size for(i=1,out=0.f; i <= m_size; i++){ m_rpointer = m_wpointer - i; if(m_rpointer < 0) m_rpointer += m_size; out += GetSample(m_rpointer)*m_table->Lookup(i); } m_output[m_vecpos] = out; } else m_output[m_vecpos] = 0.f; } return 1; } else { m_error = 11; return 0; } } else return 0; } int FIR::Set(char *mess, float value) { switch(FindMsg(mess)){ case 21: SetDelayTime(value); return 1; case 32: m_size = (int) value; return 1; default: return DelayLine::Set(mess, value); } } int FIR::Connect(char *mess, void *input) { switch(FindMsg(mess)){ case 33: SetTable((Table *)input); return 1; case 31: SetImpulse((float *) input, m_size); default: return SndObj::Connect(mess, input); } } SndObj-2.6.7/src/Fir.h000644 000766 000024 00000003315 12062673766 015060 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 _FIR_H #define _FIR_H #include "DelayLine.h" #include "Table.h" class FIR : public DelayLine { protected: Table* m_table; bool m_newtable; public: int Connect(char* mess, void* input); int Set(char* mess, float value); FIR(); FIR(Table* coeftable, SndObj* input, int vecsize=DEF_VECSIZE, float sr=DEF_SR); FIR(float* impulse, int impulsesize, SndObj* input, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~FIR(); void SetTable(Table* coeftable){ m_table = coeftable; m_newtable = false; SetDelayTime(m_table->GetLen()/m_sr);} void SetImpulse(float* impulse, int impulsesize); void SetDelayTime(float dtime){ if(m_newtable) DelayLine::SetDelayTime(dtime); else return; } short DoProcess(); }; #endif SndObj-2.6.7/src/Gain.cpp000644 000766 000024 00000004700 12062673766 015550 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Gain.cpp: implementation of the Gain class // // (Sound Object gain manipulator) // // // // // //************************************************************// #include "Gain.h" #include //////////////// CONSTRUCTION / DESTRUCTION //////////////////// Gain::Gain(){ m_gain = 0.f; AddMsg("gain", 21); AddMsg("multiplier", 22); } Gain::Gain(float gain, SndObj* InObj, int vecsize, float sr): SndObj(InObj, vecsize, sr) { m_gain = dBToAmp(gain); AddMsg("gain", 21); AddMsg("multiplier", 22); } Gain::~Gain(){ } ////////////////// OPERATIONS /////////////////////////////// float Gain::dBToAmp(float amp) { amp = (float) pow(10.0, (double) (amp/20)); return amp; } int Gain::Set(char* mess, float value){ switch(FindMsg(mess)){ case 21: SetGain(value); return 1; case 22: SetGainM(value); return 1; default: return SndObj::Set(mess, value); } } void Gain::SetGain(float gain) { m_gain = dBToAmp(gain); } short Gain::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)*m_gain; else m_output[m_vecpos] = 0.f; } return 1; } else { m_error=3; return 0; } } else return 0; } SndObj-2.6.7/src/Gain.h000644 000766 000024 00000003576 12062673766 015227 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Gain.h: interface of the gain class // // // // // // // //************************************************************// #ifndef _GAIN_H #define _GAIN_H #include "SndObj.h" class Gain : public SndObj{ protected: float m_gain; // gain factor in dB public: Gain(); Gain(float gain, SndObj* InObj, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Gain(); int Set(char* mess, float value); void SetGain(float gain); void SetGainM(float gain_multiplier) { m_gain = gain_multiplier; } float dBToAmp(float amp); // changes amp in dB to amp multiplier short DoProcess(); // change gain }; #endif SndObj-2.6.7/src/HammingTable.cpp000644 000766 000024 00000004621 12062673766 017224 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 float[m_L+1]; MakeTable(); } HammingTable :: HammingTable(long L, float alpha){ m_L = L; m_alpha = alpha; m_table = new float [m_L+1]; MakeTable(); } HammingTable :: ~HammingTable(){ delete[] m_table; } ///////////// OPERATIONS //////////////////////////////////// void HammingTable :: SetParam(long L, float alpha){ m_alpha = alpha; m_L = L; delete[] m_table; m_table = new float[m_L+1]; } short HammingTable :: MakeTable(){ for(long n = 0; n < m_L; n++) m_table[n]= (float)(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; } SndObj-2.6.7/src/HammingTable.h000644 000766 000024 00000003223 12062673766 016666 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 : float m_alpha; public: void SetParam(long L, float alpha=.54); char* ErrorMessage(); short MakeTable(); HammingTable(); HammingTable(long L, float alpha); ~HammingTable(); }; #endif SndObj-2.6.7/src/HarmTable.cpp000644 000766 000024 00000007030 12062673766 016530 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 float[m_L+1]; MakeTable(); } HarmTable :: HarmTable(long L, int harm, int type, float phase){ m_L = L; m_harm = harm; m_typew = type; m_phase = (float)(phase*TWOPI); m_table = new float [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(){ float 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] = (float)(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] += (float)((1/(float)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] += (float)((1/(float)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] += (float) 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; } SndObj-2.6.7/src/HarmTable.h000644 000766 000024 00000003445 12062673766 016203 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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; float m_phase; int m_typew; public: void SetHarm(int harm, int type); char* ErrorMessage(); short MakeTable(); HarmTable(); void SetPhase(float phase){ m_phase = (float)(phase*TWOPI); } HarmTable(long L, int harm, int type, float phase=0.f); ~HarmTable(); }; #endif SndObj-2.6.7/src/Hilb.cpp000644 000766 000024 00000010642 12062673766 015552 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //////////////////////////////////////////////// // Hilbert Transform filter implementation // // VL, 2001 ///////////////////////////////////////////////// #include "Hilb.h" Hilb::Hilb(){ if(!(m_channel = new SndObj[2])){ m_error = 11; return; } real = &m_channel[0]; imag = &m_channel[1]; m_channel[0].SetInput(this); m_channel[1].SetInput(this); if(!(m_delay = new double[24])){ m_error = 12; return; } if(!(m_coef = new double[12])){ m_error = 12; return; } for(int i = 0; i<24; i++) m_delay[i] = 0.0; m_delay1 = m_delay; // first allpass delay m_delay2 = &m_delay[4]; // second allpass delay m_delay3 = &m_delay[8]; // 1-sample delay m_delay4 = &m_delay[12]; // third allpass delay double polefreq[12], rc[12], alpha[12];; // calculate coefficients for allpass filters, // based on sampling rate for(int j=0; j<12; j++) { polefreq[j] = poles[j] * 15.0; rc[j] = 1.0 / (2.0 * PI * polefreq[j]); alpha[j] = 1.0 / rc[j]; m_coef[j] = - (1.0 - (alpha[j] / (2.0 * m_sr))) / (1.0 + (alpha[j] / (2.0 * m_sr))); } } Hilb::Hilb(SndObj* input, int vecsize, float sr): SndObj(input, vecsize, sr){ if(!(m_channel = new SndObj[2])){ m_error = 11; return; } real = &m_channel[0]; imag = &m_channel[1]; if(vecsize != DEF_VECSIZE){ m_channel[0].SetVectorSize(vecsize); m_channel[1].SetVectorSize(vecsize); } m_channel[0].SetInput(this); m_channel[1].SetInput(this); if(!(m_coef = new double[12])){ m_error = 12; return; } if(!(m_delay = new double[24])){ m_error = 12; return; } for(int i = 0; i<24; i++) m_delay[i] = 0.0; m_delay1 = m_delay; // first allpass delay m_delay2 = &m_delay[4]; // second allpass delay m_delay3 = &m_delay[8]; // 1-sample delay m_delay4 = &m_delay[12]; // third allpass delay double polefreq[12], rc[12], alpha[12]; // calculate coefficients for allpass filters, // based on sampling rate for(int j=0; j<12; j++) { polefreq[j] = poles[j] * 15.0; rc[j] = 1.0 / (2.0 * PI * polefreq[j]); alpha[j] = 1.0 / rc[j]; m_coef[j] = - (1.0 - (alpha[j] / (2.0 * m_sr))) / (1.0 + (alpha[j] / (2.0 * m_sr))); } } Hilb::~Hilb(){ delete[] m_delay; delete[] m_coef; delete[] m_channel; } short Hilb::DoProcess(){ if(!m_error){ if(m_input){ int i, j; double sig; if(m_enable) { for(m_vecpos = 0; m_vecpos < m_vecsize; m_vecpos++) { sig = (double) m_input->Output(m_vecpos); for(i=j=0; i<6; i++, j = i*2){ sig = allpass(sig,&m_delay[j],m_coef[i]); } m_output[m_vecpos] = (float) sig; } real->DoProcess(); for(m_vecpos = 0; m_vecpos < m_vecsize; m_vecpos++) { sig = m_input->Output(m_vecpos); for(i=6,j=12; i<12; i++, j=i*2){ sig = allpass(sig,&m_delay[j],m_coef[i]); } m_output[m_vecpos] += (float) sig; } imag->DoProcess(); } else { // if !m_enable for(m_vecpos = 0; m_vecpos < m_vecsize; m_vecpos++) m_output[m_vecpos] = 0.0; real->DoProcess(); imag->DoProcess(); } return 1; } else { m_error = 3; return 0; } } else return 0; } char* Hilb::ErrorMessage(){ char* message; switch(m_error){ // handle your error codes here case 11: message = "Error allocating SndObj memory\n"; break; case 12: message = "Error allocating memory \n"; break; default: message = SndObj::ErrorMessage(); break; } return message; } SndObj-2.6.7/src/Hilb.h000644 000766 000024 00000004213 12062673766 015214 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 ///////////////////////////////////////////////////// // Hilbert Transform filter // // VL, 2001 ////////////////////////////////////////////////////// #ifndef _HILB_H #define _HILB_H #include "SndObj.h" const float c1 = -0.190696f; const float c2 = -0.860735f; const float c3 = -0.5531f; const double poles[12] = {.3609, 2.7412, 11.1573, 44.7581, 179.6242, 798.4578, 1.2524, 5.5671, 22.3423, 89.6271, 364.7914, 2770.1114}; class Hilb : public SndObj { protected: SndObj* m_channel; // pointers to the memory locations double* m_delay1; double* m_delay2; double* m_delay3; double* m_delay4; // memory double* m_delay; double* m_coef; inline double allpass(double in, double* delay, double coef); public: SndObj* real; SndObj* imag; // constructors / destructor Hilb(); Hilb(SndObj* input, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Hilb(); short DoProcess(); char* ErrorMessage(); }; double Hilb::allpass(double in, double* delay, double coef1){ double out = coef1*(in - delay[1]) + delay[0]; // recirculate the delay line delay[0] = in; return (delay[1] = out); } #endif SndObj-2.6.7/src/HiPass.cpp000644 000766 000024 00000003500 12062673766 016056 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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)Rory Walsh, 2003 // See License.txt for a disclaimer of all warranties // and licensing information //*************************************************************// // HiPass.cpp : implementation of a High Pass filter // // // Rory Walsh May 2003 // // // //*************************************************************// #include "HiPass.h" HiPass::HiPass() { double C = 2 - cos(2*PI*m_fr/m_sr); m_b1 = C - sqrt((C*C) - 1); m_a = 1 - m_b1; } HiPass::HiPass(float freq, SndObj* inObj, int vecsize, float sr): LoPass(freq, inObj,vecsize,sr) { double C = 2 - cos(2*PI*m_fr/m_sr); m_b1 = C - sqrt((C*C) - 1); m_a = 1 - m_b1; } HiPass::~HiPass(){ } int HiPass::Set(char* mess, float value){ switch (FindMsg(mess)){ case 21: SetFreq(value); return 1; case 23: SetSr(value); return 1; default: return SndObj::Set(mess,value); } } SndObj-2.6.7/src/HiPass.h000644 000766 000024 00000003500 12062673766 015523 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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)Rory Walsh May 2003 // See License.txt for a disclaimer of all warranties // and licensing information //*************************************************************// // HiPass.h : 1st order high pass filter // // // // Rory Walsh May 2003 // // // //*************************************************************// #ifndef _HIPASS_H #define _HIPASS_H #include "LowPass.h" class HiPass : public LoPass { protected: public: HiPass(); HiPass(float freq, SndObj* inObj, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~HiPass(); void SetFreq(float fr){ m_fr = fr; double C = 2 - cos(2*PI*m_fr/m_sr); m_b1 = C - sqrt((C*C) - 1); m_a = 1 - m_b1; } void SetSr(float sr){ m_sr = sr; double C = 2 - cos(2*PI*m_fr/m_sr); m_b1 = C - sqrt((C*C) - 1); m_a = 1 - m_b1; } int Set(char* mess, float value); }; #endif SndObj-2.6.7/src/IADSR.cpp000644 000766 000024 00000005602 12062673766 015536 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // IADSR.cpp: implementation of the IADSR class // // ADSR with init and end values // // // // // //************************************************************// #include "IADSR.h" //////////////// CONSTRUCTION / DESTRUCTION //////////////////// IADSR::IADSR(){ m_init = m_end = 0.f; AddMsg("init", 31); AddMsg("end", 32); } IADSR::IADSR(float init, float att, float maxamp, float dec, float sus, float rel, float end, float dur, SndObj* InObj, int vecsize, float sr) : ADSR(att, maxamp, dec, sus, rel,dur,InObj, vecsize, sr) { m_init = init; m_end = end; AddMsg("init", 31); AddMsg("end", 32); } IADSR::~IADSR(){ } ////////////////// OPERATIONS /////////////////////////////// int IADSR::Set(char* mess, float value){ switch (FindMsg(mess)){ case 31: SetInit(value); return 1; case 32: SetEnd(value); return 1; default: return ADSR::Set(mess,value); } } short IADSR::DoProcess() { if(!m_error){ float a = 0.f; for(m_vecpos=0; m_vecpos < m_vecsize; m_vecpos++){ if(m_enable){ if(m_count == m_dur)m_count=0; if(m_count < m_att) a = ((m_maxamp - m_init)/m_att)*m_count + m_init; if(m_count >= m_att && m_count < (m_att+m_dec)) a = ((m_sus - m_maxamp)/m_dec)*(m_count - m_att) + m_maxamp; if(m_count >= (m_att+m_dec) && m_count <= (m_dur - m_rel)) a = m_sus; if (m_count > (m_dur - m_rel)) { if( !m_sustain){ a = ((m_end - m_sus)/m_rel)*(m_count - (m_dur - m_rel)) + m_sus; m_count++; } else a = m_sus; } else m_count++; if(m_input) m_output[m_vecpos] = m_input->Output(m_vecpos)*a; else m_output[m_vecpos] = a; } else m_output[m_vecpos] = 0.f ; } return 1; } else return 0; } SndObj-2.6.7/src/IADSR.h000644 000766 000024 00000003551 12062673766 015204 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //***********************************************************// // IADSR.h: interface of the IADSR class // // ADSR with user-defined init and end values // // // // // //***********************************************************// #ifndef _IADSR_H #define _IADSR_H #include "ADSR.h" class IADSR : public ADSR{ protected: float m_init; float m_end; public: IADSR(); IADSR(float init, float att, float maxamp, float dec, float sus, float rel, float end, float dur, SndObj* InObj = 0, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~IADSR(); void SetInit(float init){ m_init = init;} void SetEnd(float end){ m_end = end; } int Set(char* mess, float value); short DoProcess(); // change gain }; #endif SndObj-2.6.7/src/IFAdd.cpp000644 000766 000024 00000006536 12062673766 015612 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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, float pitch, float scale, float tscal, int vecsize, float sr) : ReSyn((SinAnal *)input, bins, table, pitch, scale, tscal, vecsize, sr){ } IFAdd::~IFAdd(){ } short IFAdd::DoProcess() { if(m_input){ float ampnext,amp,freq, freqnext, phase; float inc1, inc2, a, ph, cnt, frac; float a2, a3, phasediff, phasenext, cph, shf; bool lock; int i2, i, bins = m_maxtracks, ndx; float* tab = m_ptable->GetTable(); memset(m_output, 0, sizeof(float)*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; } } SndObj-2.6.7/src/IFAdd.h000644 000766 000024 00000002427 12062673766 015252 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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, float pitch=1.f, float scale=1.f, float tscal=1.f, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~IFAdd(); short DoProcess(); }; #endif SndObj-2.6.7/src/IFFT.cpp000644 000766 000024 00000013017 12062673766 015423 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 float*[m_frames]; m_ffttmp = new float[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(float)); for(i = 0; i < m_frames; i++){ m_sigframe[i] = new float[m_fftsize]; memset(m_sigframe[i], 0, m_fftsize*sizeof(float)); 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, float 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 float*[m_frames]; m_ffttmp = new float[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(float)); int i; for(i = 0; i < m_frames; i++){ m_sigframe[i] = new float[m_fftsize]; memset(m_sigframe[i], 0, m_fftsize*sizeof(float)); 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 float[m_vecsize])){ m_error = 1; #ifdef DEBUG cout << ErrorMessage(); #endif return; } m_frames = m_fftsize/m_hopsize; m_sigframe = new float*[m_frames]; m_ffttmp = new float[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 float[m_fftsize]; memset(m_sigframe[i], 0, m_fftsize*sizeof(float)); 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, float 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; float 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] = (float) 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(float* 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); } SndObj-2.6.7/src/IFFT.h000644 000766 000024 00000004626 12062673766 015076 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 float m_fund; int m_frames; // frame overlaps float** m_sigframe; // signal frames float* 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(float* signal); public: IFFT(); IFFT(Table* window, SndObj* input, int fftsize = DEF_FFTSIZE, int hopsize=DEF_VECSIZE, float 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, float value); virtual void SetFFTSize(int fftsize); virtual void SetHopSize(int hopsize); short DoProcess(); }; #endif SndObj-2.6.7/src/IFFT_alt.cpp000644 000766 000024 00000005141 12062673766 016262 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 // //////////////////////////////////////////////////////// // IFFT_alternative.cpp : a self-contained alternative // to the IFFT class, not using FFTW, using its own // FFT functions. Slower, but not depending on other code. // Victor Lazzarini, 2003 ///////////////////////////////////////////////////////// #include "IFFT.h" IFFT::IFFT(){ rfftw_destroy_plan(m_plan); m_plan = rfftw_create_plan(m_fftsize, FFTW_COMPLEX_TO_REAL, FFTW_ESTIMATE); } IFFT::IFFT(Table* window, SndObj* input, int fftsize, int hopsize, int vecsize, float sr): FFT(window, input, 1.f, fftsize, hopsize, vecsize, sr) { rfftw_destroy_plan(m_plan); m_plan = rfftw_create_plan(m_fftsize, FFTW_COMPLEX_TO_REAL, FFTW_ESTIMATE); } IFFT::~IFFT(){ } short IFFT::DoProcess(){ if(!m_error){ if(m_input){ if(m_enable){ int i; float 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] = (float) 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(float* signal) { // Inverse FFT function for(int i; i < m_fftsize; i++) signal[i] = m_input->Output(i); rfft(signal, m_fftsize/2, 0); } SndObj-2.6.7/src/IFFT_alt.h000644 000766 000024 00000002773 12062673766 015737 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 // //////////////////////////////////////////////////////// // IFFT_alternative.cpp : a self-contained alternative // to the IFFT class, not using FFTW, using its own // FFT functions. Slower, but not depending on other code. // Victor Lazzarini, 2003 ///////////////////////////////////////////////////////// #ifndef _IFFT_H #define _IFFT_H #include "FFT.h" class IFFT : public FFT { protected: void inline ifft(float* signal); public: IFFT::IFFT(); IFFT::IFFT(Table* window, SndObj* input, int fftsize = DEF_FFTSIZE, int hopsize=DEF_VECSIZE, int vecsize = DEF_VECSIZE, float sr=DEF_SR); IFFT::~IFFT(); short DoProcess(); }; #endif SndObj-2.6.7/src/IFGram.cpp000644 000766 000024 00000011503 12062673766 015776 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 float[m_fftsize]; m_fftdiff = new float[m_fftsize]; m_diffsig = new float[m_fftsize]; m_factor = m_sr/TWOPI; m_pdiff = new float[m_halfsize]; } IFGram::IFGram(Table* window, SndObj* input, float scale, int fftsize, int hopsize, float sr) :PVA(window, input, scale, fftsize, hopsize, sr) { m_diffwin = new float[m_fftsize]; m_fftdiff = new float[m_fftsize]; m_diffsig = new float[m_fftsize]; m_pdiff = new float[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, float 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 float[m_fftsize]; m_fftdiff = new float[m_fftsize]; m_phases = new float[m_halfsize]; for(int i=0; iLookup(i) - m_table->Lookup(i+1); } void IFGram::IFAnalysis(float* signal){ double powerspec, da,db, a, b, ph,d; int i2, i; for(i=0; iLookup(i); } float 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; float 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]]= (float) 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; } SndObj-2.6.7/src/IFGram.h000644 000766 000024 00000003356 12062673766 015452 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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: float* m_diffwin; // difference window float* m_fftdiff; // holds fft of diff window float* m_diffsig; float* m_pdiff; private: void inline IFAnalysis(float* signal); public: IFGram(); IFGram(Table* window, SndObj* input, float scale=1.f, int fftsize=DEF_FFTSIZE, int hopsize=DEF_VECSIZE, float sr=DEF_SR); ~IFGram(); int Set(char* mess, float value); int Connect(char* mess, void* input); void SetFFTSize(int fftsize); short DoProcess(); }; #endif SndObj-2.6.7/src/ImpulseTable.cpp000644 000766 000024 00000004225 12062673766 017262 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 "ImpulseTable.h" ImpulseTable :: ImpulseTable() { m_window = 0; m_plan = rfftw_create_plan(m_L, FFTW_COMPLEX_TO_REAL, FFTW_ESTIMATE); m_ffttmp = new float[m_L+1]; MakeTable(); } ImpulseTable :: ImpulseTable(long L, int segments, float start, float* points, float* lengths, float type, Table* window, float nyquistamp) : SpecEnvTable(L,segments,start,points,lengths,type,nyquistamp) { m_window = window; m_plan = rfftw_create_plan(m_L, FFTW_COMPLEX_TO_REAL, FFTW_ESTIMATE); m_ffttmp = new float[m_L+1]; MakeTable(); } ImpulseTable::~ImpulseTable(){ delete[] m_ffttmp; rfftw_destroy_plan(m_plan); } short ImpulseTable :: MakeTable(){ SpecEnvTable::MakeTable(); int i, i2; // get input FFT frame and // prepare data for fftw m_ffttmp[0] = m_table[0]; m_ffttmp[m_L/2] = m_table[1]; for(i=2, i2=1; iGetLen() == m_L)) for(i=0; iLookup(i); m_table[m_L] = m_table[m_L-1]; return 1; } SndObj-2.6.7/src/ImpulseTable.h000644 000766 000024 00000003646 12062673766 016735 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // ImpulseTable.h: interface of the ImpulseTable class // // // // // // // //************************************************************// #ifndef _ImpulseTable_H #define _ImpulseTable_H #include "SpecEnvTable.h" #include class ImpulseTable : public SpecEnvTable { protected: Table* m_window; rfftw_plan m_plan; // FFTW initialisation float* m_ffttmp; public: void SetWindow(Table* window){ m_window = window->GetLen() == m_L ? window : 0; MakeTable(); } short MakeTable(); ImpulseTable(); ImpulseTable(long L, int segments, float start, float* points, float* lengths,float type = 0.f, Table* window=0, float nyquistamp=0.f); ~ImpulseTable(); }; #endif SndObj-2.6.7/src/Interp.cpp000644 000766 000024 00000005505 12062673766 016137 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 // //***********************************************************// // Interp.cpp : implementation of the Interp object // (interpolation object) // //***********************************************************// #include "Interp.h" Interp::Interp(){ m_initial = m_fin = 0.f; m_count = m_dur = 0; m_typec = 0.f; AddMsg("initial", 21); AddMsg("fin", 22); AddMsg("type", 23); AddMsg("duration", 24); } Interp::Interp(float initial, float fin, float dur, float type, int vecsize, float sr): SndObj(0, vecsize, sr){ m_count = 0; m_typec = type; m_initial = initial; m_fin = fin; m_dur = (unsigned long) (dur*m_sr); AddMsg("initial", 21); AddMsg("fin", 22); AddMsg("type", 23); AddMsg("duration", 24); } Interp::~Interp(){ } int Interp::Set(char* mess, float value){ switch(FindMsg(mess)){ case 21: SetCurve(value, m_fin, m_typec); return 1; case 22: SetCurve(m_initial, value, m_typec); return 1; case 23: SetCurve(m_initial, m_fin, value); return 1; case 24: SetDur(value); return 1; case 1: SetSr(value); return 1; default: return SndObj::Set(mess, value); } } void Interp::SetCurve(float initial, float fin, float m_typec){ m_initial = initial; m_fin = fin; m_typec = 0.f; m_count = 0; } void Interp::SetSr(float sr){ m_dur = (unsigned long)((sr/m_sr)*m_dur); m_sr = sr; } short Interp::DoProcess(){ if(!m_error){ for(m_vecpos = 0; m_vecpos < m_vecsize; m_vecpos++){ if(m_enable){ if(m_count == m_dur) m_output[m_vecpos] = m_fin; else { if(m_typec == 0.f){ // linear m_output[m_vecpos] = m_initial + ((m_fin - m_initial)/m_dur)*m_count; } else { // exponential m_output[m_vecpos] = m_initial + (m_fin - m_initial)*(float) ((1.f - exp(((double)m_count/m_dur)*m_typec))/ (1.f - exp((double)m_typec))); } m_count++; } } else m_output[m_vecpos] = 0.f; } return 1; } else return 0; } SndObj-2.6.7/src/Interp.h000644 000766 000024 00000003546 12062673766 015607 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //***********************************************************// // Interp.h : interface of the Interp Class // (interpolation object) // //***********************************************************// #ifndef _INTERP_H #define _INTERP_H #include "SndObj.h" class Interp : public SndObj { protected: float m_initial; // initial value float m_fin; // fin value float m_typec; // type of curve 0 = LINEAR, EXP < 0 < INV EXP unsigned long m_dur; unsigned long m_count; public: Interp(); Interp(float initial, float fin, float dur, float type = 0.f, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Interp(); int Set(char* mess, float value); void SetSr(float sr); void Restart(){ m_count = 0; }; void SetCurve(float initial, float fin, float m_typec = 0.f); void SetDur(float dur){ m_dur = (unsigned long) (m_sr*dur); m_count = 0; } short DoProcess(); }; #endif SndObj-2.6.7/src/Lookup.cpp000644 000766 000024 00000006165 12062673766 016152 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //*******************************************************// // Lookup.cpp : implementation of the Lookup object // truncated table lookup // // //*******************************************************// #include "Lookup.h" //////////////// CONSTRUCTION / DESTRUCTION //////////////// Lookup::Lookup(){ m_ptable = 0; m_size = 0; m_offset = 0; m_mode = 0; m_normal = 0; AddMsg("read mode", 21); AddMsg("index type", 22); AddMsg("offset", 23); AddMsg("table", 24); } Lookup::Lookup(Table* table, long offset, SndObj* InObj, int mode, int normal,int vecsize, float sr): SndObj(InObj, vecsize, sr) { m_ptable = table; m_offset = offset; m_size = m_ptable->GetLen(); m_mode = mode; m_normal = normal; AddMsg("read mode", 21); AddMsg("index type", 22); AddMsg("offset", 23); AddMsg("table", 24); } Lookup::~Lookup(){ } /////////// OPERATIONS //////////////////////////////// int Lookup::Set(char* mess, float value){ switch(FindMsg(mess)){ case 21: SetMode((int) value, m_normal); return 1; case 22: SetMode(m_mode, (int) value); return 1; case 23: Offset((int)value); return 1; default: return SndObj::Set(mess, value); } } int Lookup::Connect(char* mess, void* input){ switch(FindMsg(mess)){ case 24: m_ptable = (Table *) input; return 1; default: return SndObj::Connect(mess, input); } } void Lookup::SetTable(Table* table){ m_ptable = table; m_size = m_ptable->GetLen(); } short Lookup::DoProcess() { if(!m_error){ if(m_ptable && m_input){ float i; for(m_vecpos = 0; m_vecpos < m_vecsize; m_vecpos++){ if(m_enable){ i = m_input->Output(m_vecpos); if(m_normal) i *= m_size; // if normalised // modulus if(m_mode){ while(i >= m_size) i -= m_size; while (i < 0) i += m_size; } else if(i >= m_size || i > 0) i = (i >= m_size) ? m_size - 1.f : 0.f; // truncating lookup : m_output[m_vecpos] = m_ptable->GetTable()[Ftoi(i) + m_offset]; } else m_output[m_vecpos] = 0.f; } return 1; } else { m_error = 3; return 0; } } else return 0; } SndObj-2.6.7/src/Lookup.h000644 000766 000024 00000003626 12062673766 015616 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //*******************************************************// // Lookup.h : interface of the Lookup class // truncated table lookup // //*******************************************************// #ifndef _LOOKUP_H #define _LOOKUP_H #include "SndObj.h" #include "Table.h" enum { RAW_VALUE=0, NORMALISED}; enum { LIMIT=0, WRAP_AROUND}; class Lookup : public SndObj { protected: Table* m_ptable; // reference to a Table obj long m_offset; long m_size; int m_mode; int m_normal; public: Lookup(); Lookup(Table* table, long offset, SndObj* InObj, int mode = WRAP_AROUND, int normal=RAW_VALUE, int vecsize=DEF_VECSIZE, float sr=DEF_SR); void SetMode(int mode, int normal){ m_mode = mode; m_normal = normal; } ~Lookup(); void Offset(long offset){ m_offset = offset; } void SetTable(Table* table); int Set(char* mess, float value); int Connect(char* mess, void* input); short DoProcess(); }; #endif SndObj-2.6.7/src/Lookupi.cpp000644 000766 000024 00000004446 12062673766 016323 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //*******************************************************// // Lookupi.cpp : implementation of the Lookup object // interpolated table lookup // // //*******************************************************// #include "Lookupi.h" //////////////// CONSTRUCTION / DESTRUCTION //////////////// Lookupi::Lookupi(){ } Lookupi::Lookupi(Table* table, long offset, SndObj* InObj, int mode, int normal,int vecsize, float sr): Lookup(table, offset, InObj, mode, normal, vecsize, sr) { } Lookupi::~Lookupi(){ } /////////// OPERATIONS //////////////////////////////// short Lookupi::DoProcess(){ if(!m_error){ if(m_ptable && m_input){ float i; int ps; for(m_vecpos = 0; m_vecpos < m_vecsize; m_vecpos++){ if(m_enable){ i = m_input->Output(m_vecpos); if(m_normal) i *= m_size; // if normalised // modulus if(m_mode){ while(i >= m_size) i -= m_size; while (i < 0) i += m_size; } else if(i >= m_size || i > 0) i = (i >= m_size) ? m_size - 1.f : 0.f; // interpolating lookup : ps = Ftoi(i); m_output[m_vecpos] = m_ptable->GetTable()[ps] + ((m_ptable->GetTable()[ps] - m_ptable->GetTable()[ps+1])*(ps - i)); } else m_output[m_vecpos] = 0.f; } return 1; } else { m_error = 3; return 0; } } else return 0; } SndObj-2.6.7/src/Lookupi.h000644 000766 000024 00000002757 12062673766 015773 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //*******************************************************// // Lookupi.h : interface of the Lookup class // interpolated table lookup // // //*******************************************************// #ifndef _LOOKUPI_H #define _LOOKUPI_H #include "Lookup.h" #include "Table.h" class Lookupi : public Lookup { public: Lookupi(); Lookupi(Table* table, long offset, SndObj* InObj, int mode = WRAP_AROUND, int normal=RAW_VALUE, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Lookupi(); short DoProcess(); }; #endif SndObj-2.6.7/src/Loop.cpp000644 000766 000024 00000006275 12062673766 015614 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //***********************************************************// // Loop.cpp: Implementation of the SndLoop Object // // (loop) // // // // // //***********************************************************// #include "Loop.h" //////////CONSTRUCTION ///////////////////// SndLoop::SndLoop(){ m_xfade = 0; m_count = 0; m_point = (float) m_rpointer; m_pitch = 1; AddMsg("pitch", 31); AddMsg("crossfade", 32); AddMsg("resample", 33); } SndLoop::SndLoop(float xfadetime, float looptime, SndObj* InObj, float pitch, int vecsize, float sr) : DelayLine(looptime, InObj, vecsize, sr) { Enable(); m_xfade = (xfadetime*m_sr); m_sample = 1; m_count = 0; m_pitch = pitch; m_point = (float) m_rpointer; AddMsg("pitch", 31); AddMsg("crossfade", 32); AddMsg("resample", 33); } SndLoop::~SndLoop() { } ////////////////////OPERATIONS//////////////////// int SndLoop::Set(char* mess, float value){ switch (FindMsg(mess)){ case 31: SetPitch(value); return 1; case 32: SetXFade(value); case 33: ReSample(); return 1; default: return DelayLine::Set(mess,value); } } short SndLoop::DoProcess(){ if(!m_error){ if(m_input){ for(m_vecpos=0; m_vecposOutput(m_vecpos)*(m_count/m_xfade))); else PutSample((m_output[m_vecpos] = m_input->Output(m_vecpos))); } else PutSample((m_output[m_vecpos] = GetSample() + m_input->Output(m_vecpos)*((m_xfade - (m_count - m_size))/m_xfade))); if(m_count < m_size + m_xfade) m_count++; else m_sample = 0; } else { m_output[m_vecpos] = GetSample(); m_point += m_pitch; m_rpointer = (long)m_point; while(m_point >= m_size) m_point -= m_size; while(m_point < 0) m_point += m_size; } } else m_output[m_vecpos] = 0.f; } return 1; } else { m_error = 11; return 0; } } else return 0; } SndObj-2.6.7/src/Loop.h000644 000766 000024 00000004015 12062673766 015247 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Loop.h: interface of the SndLoop class // // (comb filter) // // // // // //************************************************************// #ifndef _LOOP_H #define _LOOP_H #include "DelayLine.h" class SndLoop : public DelayLine { protected: float m_xfade; // crossfade time in samples float m_count; // count short m_sample; // sample on/off double m_point; float m_pitch; public: SndLoop(); SndLoop(float xfadetime, float looptime, SndObj* InObj, float pitch = 1.f, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~SndLoop(); void SetXFade(float xfadetime){ m_xfade = (xfadetime*m_sr); } void SetPitch(float pitch){ m_pitch = pitch; } void ReSample(){ m_sample = 1; m_count = 0; } int Set(char* mess, float value); short DoProcess(); }; #endif SndObj-2.6.7/src/LoPassTable.cpp000644 000766 000024 00000003740 12062673766 017046 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 // LoPassTable.cpp: implementation of the LoPassTable class. // ////////////////////////////////////////////////////////////////////// #include "LoPassTable.h" ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// LoPassTable::LoPassTable() { m_sr = 44100.f; m_fr = 1000.f; m_L = 11; m_table = new float[m_L]; MakeTable(); } LoPassTable::~LoPassTable() { delete[] m_table; } LoPassTable::LoPassTable(int impulsesize, float fr, float sr) { m_sr = sr; m_fr = fr; // make impulsesize odd impulsesize = ((impulsesize/2)*2)+1; m_L = impulsesize; m_table = new float[m_L]; MakeTable(); } short LoPassTable::MakeTable() { double Pi = TWOPI/2.; ZeroTable(); for(int i = 0; i < m_L; i++){ m_table[i] = (float) ((sin(TWOPI*(i-m_L/2.)*(m_fr/m_sr)) / (Pi*(i-m_L/2.))) * (0.54+0.64*cos((Pi*(i-m_L/2.))/m_L))); } return 1; } char* LoPassTable::ErrorMessage() { return "no error"; } SndObj-2.6.7/src/LoPassTable.h000644 000766 000024 00000002743 12062673766 016515 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 // LoPassTable.h: interface for the LoPassTable class. // ////////////////////////////////////////////////////////////////////// #ifndef _LOPASSTABLE_H #define _LOPASSTABLE_H #include "Table.h" class LoPassTable : public Table { protected: float m_fr; float m_sr; public: char* ErrorMessage(); short MakeTable(); void SetFreq(float fr) { m_fr=fr ; } void SetSr(float sr) { m_sr =sr; } LoPassTable(int impulsesize, float fr, float sr=44100); LoPassTable(); virtual ~LoPassTable(); }; #endif SndObj-2.6.7/src/LowPass.cpp000644 000766 000024 00000004257 12062673766 016271 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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)Rory Walsh 2003 // See License.txt for a disclaimer of all warranties // and licensing information //*************************************************************// // LowPass.cpp : implementation of a Low Pass filter dervied from // Filter Base Class // Rory Walsh May 2003 //*************************************************************// #include "LowPass.h" LoPass::LoPass() { double C = 2 - cos(2*PI*m_fr/m_sr); m_b1 = sqrt((C*C) - 1) - C; m_a = 1 + m_b1; } LoPass::LoPass(float freq, SndObj* inObj, int vecsize, float sr): Filter(freq, 1, inObj,vecsize,sr) { double C = 2 - cos(2*PI*m_fr/m_sr); m_b1 = sqrt((C*C) - 1) - C; m_a = 1 + m_b1; } LoPass::~LoPass(){ } int LoPass::Set(char* mess, float value){ switch (FindMsg(mess)){ case 21: SetFreq(value); return 1; case 23: SetSr(value); return 1; default: return SndObj::Set(mess,value); } } short LoPass::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_delay[0] = m_a*m_input->Output(m_vecpos) - m_b1*m_delay[0]; } else m_output[m_vecpos] = 0.f; } return 1; } else { m_error = 11; return 0; } } else return 0; } SndObj-2.6.7/src/LowPass.h000644 000766 000024 00000003471 12062673766 015733 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // LowPass.h: 1st order lowpass filter // // // // //************************************************************// #ifndef _LOWPASS_H #define _LOWPASS_H #include "Filter.h" class LoPass : public Filter { protected: public: LoPass(); LoPass(float freq, SndObj* inObj, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~LoPass(); void SetFreq(float fr){ m_fr = fr; double C = 2 - cos(2*PI*m_fr/m_sr); m_b1 = sqrt((C*C) - 1) - C; m_a = 1 + m_b1; } void SetSr(float sr){ m_sr = sr; double C = 2 - cos(2*PI*m_fr/m_sr); m_b1 = sqrt((C*C) - 1) - C; m_a = 1 + m_b1; } int Set(char* mess, float value); short DoProcess(); }; #endif SndObj-2.6.7/src/Lp.cpp000644 000766 000024 00000004332 12062673766 015246 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 ////////////////////////////////////////////////// // Lowpass resonant filter implementation // VL, 2002 // ////////////////////////////////////////////////// #include "Lp.h" Lp::Lp(){ } Lp::Lp(float fr, float bw, SndObj* inObj, SndObj* inputfreq, SndObj* inputBW, int vecsize, float sr): Reson(fr, bw, inObj, inputfreq, inputBW, vecsize, sr){ } Lp::~Lp(){ } int Lp::Set(char* mess, float value){ switch (FindMsg(mess)){ case 23: SetSr(value); return 1; default: return Filter::Set(mess,value); } } short Lp::DoProcess(){ if(!m_error){ if(m_input) { float out = 0.f; float fr, bw; for(m_vecpos=0;m_vecpos < m_vecsize;m_vecpos++){ if(m_enable){ fr = m_fr + (m_inputfr == 0 ? 0 : m_inputfr->Output(m_vecpos)); bw = m_bw + (m_inputbw == 0 ? 0 : m_inputbw->Output(m_vecpos)); SetLPparam(fr, bw); out = (float) ((m_input->Output(m_vecpos) + (m_b1 + 2*m_b2)*m_delay[0] - m_b2*m_delay[1])/m_a); m_delay[1] = m_delay [0]; // recirculate the delay line m_delay[0] = out; m_output[m_vecpos] = out; } else m_output[m_vecpos] = 0.f; } return 1; } else { m_error = 11; return 0; } } else return 0; } SndObj-2.6.7/src/Lp.h000644 000766 000024 00000003262 12062673766 014714 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //////////////////////////////////////////////// // Low-pass resonant filter // // VL, 2002 //////////////////////////////////////////////// #ifndef _Lp_H #define _Lp_H #include "Reson.h" class Lp: public Reson { protected: void inline SetLPparam(float fr, float bw); public: // constructors / destructor Lp(); Lp(float fr, float BW, SndObj* inObj, SndObj* inputfreq = 0, SndObj* inputBW = 0, int vecisize=DEF_VECSIZE, float sr=DEF_SR); ~Lp(); void SetSr(float sr){ m_sr = sr; SetLPparam(m_fr, m_bw); } int Set(char* mess, float value); short DoProcess(); }; void Lp::SetLPparam(float fr, float bw){ float Q = fr/bw; m_b1 = (100./Q*sqrt(fr))-1.; m_b2 = 100./fr; m_a = 1 + m_b1 + m_b2; } #endif SndObj-2.6.7/src/Makefile000644 000766 000024 00000007657 12062673766 015644 0ustar00victorstaff000000 000000 ############################################################## # SndObj 2.5 multiplatform Makefile # # makes: lib (library) # ############################################################## # Choose the compiler # On Linux or Cygwin use gnu gcc (CC = gcc) # On Irix use MipsPRO if you have it (CC = CC) CC = gcc # Choose one of the options for REALTIME audio & midi: # for RT on CYGWIN: -DWIN # for RT on Linux (etc...) with OSS: -DOSS # for RT on Linux with ALSA: -DALSA # for RT on Irix: -DSGI # for RT on Mac OS X: -DMACOSX # -I/system/library/Frameworks/CoreAudio.framework/Headers # for other OSs: realtime not supported (leave it blank) RTDEFS = ############################################################# # DO NOT EDIT BELOW THIS LINE ################################ ############################################################## libDir = ../lib Bin = ../bin iDir = ../include LIBNAME = $(libDir)/libsndobj.a # Flags for includes and libraries CFLAGS = -O2 -I$(iDir) $(RTDEFS) LFLAGS = -O2 # Core Library object files SNDOBJS = Oscil.o Oscilt.o Oscili.o \ PhOscili.o ADSR.o IADSR.o Buzz.o \ Balance.o DelayLine.o Tap.o Tapi.o \ Comb.o Allpass.o StringFlt.o Pluck.o \ VDelay.o Pitch.o Loop.o Filter.o \ Reson.o Lp.o ButtBP.o ButtBR.o \ ButtHP.o ButtLP.o Mix.o Pan.o \ Gain.o SyncGrain.o Interp.o Phase.o \ Lookup.o Lookupi.o Ring.o Rand.o \ Randh.o Randi.o Unit.o Ap.o \ Hilb.o SndIn.o SndObj.o MidiIn.o \ MidiMap.o Bend.o Fir.o FFT.o \ IFFT.o Convol.o FastOsc.o Osc.o \ Osci.o PVA.o IFGram.o HiPass.o \ LowPass.o TpTz.o PVS.o PVMorph.o \ PVFilter.o PVMask.o PVMix.o \ PVTransp.o PVBlur.o PVRead.o \ SinAnal.o SinSyn.o AdSyn.o \ SndRead.o SpecIn.o SpecMult.o \ SpecCart.o SpecCombine.o SpecInterp.o \ SpecPolar.o SpecSplit.o SpecThresh.o \ SpecVoc.o SNDIOBJS = SndIO.o SndRTIO.o SndFIO.o \ SndWave.o SndAiff.o SndBuffer.o \ SndMidi.o SndMidiIn.o SndWaveX.o \ SndPVOCEX.o SndSinIO.o SndCoreAudio.o TABLEOBJS = HarmTable.o UsrHarmTable.o \ TrisegTable.o SndTable.o PlnTable.o \ HammingTable.o NoteTable.o UsrDefTable.o \ LoPassTable.o ImpulseTable.o \ SpecEnvTable.o EnvTable.o PVEnvTable.o PVTable.o SNDTHROBJ = SndThread.o # fftw library v-2.1.3 FFTWOBJS = \ config.o fcr_9.o fhf_6.o fn_8.o frc_1.o ftw_16.o ftwi_7.o \ executor.o fftwnd.o fhf_7.o fn_9.o frc_10.o ftw_2.o ftwi_8.o \ fcr_1.o fhb_10.o fhf_8.o fni_1.o frc_11.o ftw_3.o ftwi_9.o \ fcr_10.o fhb_16.o fhf_9.o fni_10.o frc_12.o ftw_32.o generic.o \ fcr_11.o fhb_2.o fn_1.o fni_11.o frc_128.o ftw_4.o malloc.o \ fcr_12.o fhb_3.o fn_10.o fni_12.o frc_13.o ftw_5.o planner.o \ fcr_128.o fhb_32.o fn_11.o fni_13.o frc_14.o ftw_6.o putils.o \ fcr_13.o fhb_4.o fn_12.o fni_14.o frc_15.o ftw_64.o rader.o \ fcr_14.o fhb_5.o fn_13.o fni_15.o frc_16.o ftw_7.o rconfig.o \ fcr_15.o fhb_6.o fn_14.o fni_16.o frc_2.o ftw_8.o rexec.o \ fcr_16.o fhb_7.o fn_15.o fni_2.o frc_3.o ftw_9.o rexec2.o \ fcr_2.o fhb_8.o fn_16.o fni_3.o frc_32.o ftwi_10.o rfftwf77.o \ fcr_3.o fhb_9.o fn_2.o fni_32.o frc_4.o ftwi_16.o rfftwnd.o \ fcr_32.o fhf_10.o fn_3.o fni_4.o frc_5.o ftwi_2.o rgeneric.o \ fcr_4.o fhf_16.o fn_32.o fni_5.o frc_6.o ftwi_3.o rplanner.o \ fcr_5.o fhf_2.o fn_4.o fni_6.o frc_64.o ftwi_32.o timer.o \ fcr_6.o fhf_3.o fn_5.o fni_64.o frc_7.o ftwi_4.o twiddle.o \ fcr_64.o fhf_32.o fn_6.o fni_7.o frc_8.o ftwi_5.o wisdom.o \ fcr_7.o fhf_4.o fn_64.o fni_8.o frc_9.o ftwi_6.o wisdomio.o \ fcr_8.o fhf_5.o fn_7.o fni_9.o ftw_10.o ftwi_64.o LIBOBJS = $(SNDOBJS) $(SNDIOBJS) $(TABLEOBJS) $(SNDTHROBJ) all: AudioDefs lib AudioDefs: AudioDefs.h *.h cp *.h $(iDir)/SndObj lib: $(LIBNAME) clean: rm *.o rm $(LIBNAME) $(LIBNAME): $(FFTWOBJS) $(LIBOBJS) ar -rcs $@ *.o $(FFTWOBJS): %.o: rfftw/%.c $(CC) $(CFLAGS) -c $< -o $@ $(LIBOBJS): %.o: %.cpp $(CC) $(CFLAGS) -c $< -o $@ SndObj-2.6.7/src/Makefile.alsa000644 000766 000024 00000007116 12062673766 016551 0ustar00victorstaff000000 000000 ############################################################## # SndObj 2.5 alsa Makefile # # makes: lib (library) # ############################################################## CC = gcc # for JACK support, if you have jackd & header files # (possibly in /usr/include/jack) add -DJACK RTDEFS = -DALSA # -DJACK ############################################################# # DO NOT EDIT BELOW THIS LINE ################################ ############################################################## libDir = ../lib Bin = ../bin iDir = ../include LIBNAME = $(libDir)/libsndobj.a # Flags for includes and libraries CFLAGS = -O2 -I$(iDir) $(RTDEFS) LFLAGS = -O2 # Core Library object files SNDOBJS = Oscil.o Oscilt.o Oscili.o \ PhOscili.o ADSR.o IADSR.o Buzz.o \ Balance.o DelayLine.o Tap.o Tapi.o \ Comb.o Allpass.o StringFlt.o Pluck.o \ VDelay.o Pitch.o Loop.o Filter.o \ Reson.o Lp.o ButtBP.o ButtBR.o \ ButtHP.o ButtLP.o Mix.o Pan.o \ Gain.o SyncGrain.o Interp.o Phase.o \ Lookup.o Lookupi.o Ring.o Rand.o \ Randh.o Randi.o Unit.o Ap.o \ Hilb.o SndIn.o SndObj.o MidiIn.o \ MidiMap.o Bend.o Fir.o FFT.o \ IFFT.o Convol.o FastOsc.o Osc.o \ Osci.o PVA.o IFGram.o HiPass.o \ LowPass.o TpTz.o PVS.o PVMorph.o \ PVFilter.o PVMask.o PVMix.o \ PVTransp.o PVBlur.o PVRead.o \ SinAnal.o SinSyn.o AdSyn.o \ SndRead.o SpecIn.o SpecMult.o \ SpecCart.o SpecCombine.o SpecInterp.o \ SpecPolar.o SpecSplit.o SpecThresh.o \ SpecVoc.o SNDIOBJS = SndIO.o SndRTIO.o SndFIO.o \ SndWave.o SndAiff.o SndBuffer.o \ SndMidi.o SndMidiIn.o SndWaveX.o \ SndPVOCEX.o SndSinIO.o SndCoreAudio.o TABLEOBJS = HarmTable.o UsrHarmTable.o \ TrisegTable.o SndTable.o PlnTable.o \ HammingTable.o NoteTable.o UsrDefTable.o \ LoPassTable.o ImpulseTable.o \ SpecEnvTable.o EnvTable.o PVEnvTable.o PVTable.o SNDTHROBJ = SndThread.o # fftw library v-2.1.3 FFTWOBJS = \ config.o fcr_9.o fhf_6.o fn_8.o frc_1.o ftw_16.o ftwi_7.o \ executor.o fftwnd.o fhf_7.o fn_9.o frc_10.o ftw_2.o ftwi_8.o \ fcr_1.o fhb_10.o fhf_8.o fni_1.o frc_11.o ftw_3.o ftwi_9.o \ fcr_10.o fhb_16.o fhf_9.o fni_10.o frc_12.o ftw_32.o generic.o \ fcr_11.o fhb_2.o fn_1.o fni_11.o frc_128.o ftw_4.o malloc.o \ fcr_12.o fhb_3.o fn_10.o fni_12.o frc_13.o ftw_5.o planner.o \ fcr_128.o fhb_32.o fn_11.o fni_13.o frc_14.o ftw_6.o putils.o \ fcr_13.o fhb_4.o fn_12.o fni_14.o frc_15.o ftw_64.o rader.o \ fcr_14.o fhb_5.o fn_13.o fni_15.o frc_16.o ftw_7.o rconfig.o \ fcr_15.o fhb_6.o fn_14.o fni_16.o frc_2.o ftw_8.o rexec.o \ fcr_16.o fhb_7.o fn_15.o fni_2.o frc_3.o ftw_9.o rexec2.o \ fcr_2.o fhb_8.o fn_16.o fni_3.o frc_32.o ftwi_10.o rfftwf77.o \ fcr_3.o fhb_9.o fn_2.o fni_32.o frc_4.o ftwi_16.o rfftwnd.o \ fcr_32.o fhf_10.o fn_3.o fni_4.o frc_5.o ftwi_2.o rgeneric.o \ fcr_4.o fhf_16.o fn_32.o fni_5.o frc_6.o ftwi_3.o rplanner.o \ fcr_5.o fhf_2.o fn_4.o fni_6.o frc_64.o ftwi_32.o timer.o \ fcr_6.o fhf_3.o fn_5.o fni_64.o frc_7.o ftwi_4.o twiddle.o \ fcr_64.o fhf_32.o fn_6.o fni_7.o frc_8.o ftwi_5.o wisdom.o \ fcr_7.o fhf_4.o fn_64.o fni_8.o frc_9.o ftwi_6.o wisdomio.o \ fcr_8.o fhf_5.o fn_7.o fni_9.o ftw_10.o ftwi_64.o LIBOBJS = $(SNDOBJS) $(SNDIOBJS) $(TABLEOBJS) $(SNDTHROBJ) all: AudioDefs lib AudioDefs: AudioDefs.h *.h cp *.h $(iDir)/SndObj lib: $(LIBNAME) clean: rm *.o rm $(LIBNAME) $(LIBNAME): $(FFTWOBJS) $(LIBOBJS) ar -rcs $@ *.o $(FFTWOBJS): %.o: rfftw/%.c $(CC) $(CFLAGS) -c $< -o $@ $(LIBOBJS): %.o: %.cpp $(CC) $(CFLAGS) -c $< -o $@ SndObj-2.6.7/src/Makefile.mosx000644 000766 000024 00000007031 12062673766 016613 0ustar00victorstaff000000 000000 ############################################################## # SndObj 2.5 OSX Makefile # # makes: lib (library) # ############################################################## CC = gcc RTDEFS = -DMACOSX -I/system/library/Frameworks/CoreAudio.framework/Headers ############################################################# # DO NOT EDIT BELOW THIS LINE ################################ ############################################################## libDir = ../lib Bin = ../bin iDir = ../include LIBNAME = $(libDir)/libsndobj.a # Flags for includes and libraries CFLAGS = -O2 -I$(iDir) $(RTDEFS) LFLAGS = -O2 # Core Library object files SNDOBJS = Oscil.o Oscilt.o Oscili.o \ PhOscili.o ADSR.o IADSR.o Buzz.o \ Balance.o DelayLine.o Tap.o Tapi.o \ Comb.o Allpass.o StringFlt.o Pluck.o \ VDelay.o Pitch.o Loop.o Filter.o \ Reson.o Lp.o ButtBP.o ButtBR.o \ ButtHP.o ButtLP.o Mix.o Pan.o \ Gain.o SyncGrain.o Interp.o Phase.o \ Lookup.o Lookupi.o Ring.o Rand.o \ Randh.o Randi.o Unit.o Ap.o \ Hilb.o SndIn.o SndObj.o MidiIn.o \ MidiMap.o Bend.o Fir.o FFT.o \ IFFT.o Convol.o FastOsc.o Osc.o \ Osci.o PVA.o IFGram.o HiPass.o \ LowPass.o TpTz.o PVS.o PVMorph.o \ PVFilter.o PVMask.o PVMix.o \ PVTransp.o PVBlur.o PVRead.o \ SinAnal.o SinSyn.o AdSyn.o \ SndRead.o SpecIn.o SpecMult.o \ SpecCart.o SpecCombine.o SpecInterp.o \ SpecPolar.o SpecSplit.o SpecThresh.o \ SpecVoc.o SNDIOBJS = SndIO.o SndRTIO.o SndFIO.o \ SndWave.o SndAiff.o SndBuffer.o \ SndMidi.o SndMidiIn.o SndWaveX.o \ SndPVOCEX.o SndSinIO.o SndCoreAudio.o TABLEOBJS = HarmTable.o UsrHarmTable.o \ TrisegTable.o SndTable.o PlnTable.o \ HammingTable.o NoteTable.o UsrDefTable.o \ LoPassTable.o ImpulseTable.o \ SpecEnvTable.o EnvTable.o PVEnvTable.o PVTable.o SNDTHROBJ = SndThread.o # fftw library v-2.1.3 FFTWOBJS = \ config.o fcr_9.o fhf_6.o fn_8.o frc_1.o ftw_16.o ftwi_7.o \ executor.o fftwnd.o fhf_7.o fn_9.o frc_10.o ftw_2.o ftwi_8.o \ fcr_1.o fhb_10.o fhf_8.o fni_1.o frc_11.o ftw_3.o ftwi_9.o \ fcr_10.o fhb_16.o fhf_9.o fni_10.o frc_12.o ftw_32.o generic.o \ fcr_11.o fhb_2.o fn_1.o fni_11.o frc_128.o ftw_4.o malloc.o \ fcr_12.o fhb_3.o fn_10.o fni_12.o frc_13.o ftw_5.o planner.o \ fcr_128.o fhb_32.o fn_11.o fni_13.o frc_14.o ftw_6.o putils.o \ fcr_13.o fhb_4.o fn_12.o fni_14.o frc_15.o ftw_64.o rader.o \ fcr_14.o fhb_5.o fn_13.o fni_15.o frc_16.o ftw_7.o rconfig.o \ fcr_15.o fhb_6.o fn_14.o fni_16.o frc_2.o ftw_8.o rexec.o \ fcr_16.o fhb_7.o fn_15.o fni_2.o frc_3.o ftw_9.o rexec2.o \ fcr_2.o fhb_8.o fn_16.o fni_3.o frc_32.o ftwi_10.o rfftwf77.o \ fcr_3.o fhb_9.o fn_2.o fni_32.o frc_4.o ftwi_16.o rfftwnd.o \ fcr_32.o fhf_10.o fn_3.o fni_4.o frc_5.o ftwi_2.o rgeneric.o \ fcr_4.o fhf_16.o fn_32.o fni_5.o frc_6.o ftwi_3.o rplanner.o \ fcr_5.o fhf_2.o fn_4.o fni_6.o frc_64.o ftwi_32.o timer.o \ fcr_6.o fhf_3.o fn_5.o fni_64.o frc_7.o ftwi_4.o twiddle.o \ fcr_64.o fhf_32.o fn_6.o fni_7.o frc_8.o ftwi_5.o wisdom.o \ fcr_7.o fhf_4.o fn_64.o fni_8.o frc_9.o ftwi_6.o wisdomio.o \ fcr_8.o fhf_5.o fn_7.o fni_9.o ftw_10.o ftwi_64.o LIBOBJS = $(SNDOBJS) $(SNDIOBJS) $(TABLEOBJS) $(SNDTHROBJ) all: AudioDefs lib AudioDefs: AudioDefs.h *.h cp *.h $(iDir)/SndObj lib: $(LIBNAME) clean: rm *.o rm $(LIBNAME) $(LIBNAME): $(FFTWOBJS) $(LIBOBJS) ar -rcs $@ *.o $(FFTWOBJS): %.o: rfftw/%.c $(CC) $(CFLAGS) -c $< -o $@ $(LIBOBJS): %.o: %.cpp $(CC) $(CFLAGS) -c $< -o $@ SndObj-2.6.7/src/Makefile.txt000644 000766 000024 00000003110 12062673766 016436 0ustar00victorstaff000000 000000 # Spectral examples makefile CFLAGS = -O2 FFTWOBJS = \ config.o fcr_9.o fhf_6.o fn_8.o frc_1.o ftw_16.o ftwi_7.o \ executor.o fftwnd.o fhf_7.o fn_9.o frc_10.o ftw_2.o ftwi_8.o \ fcr_1.o fhb_10.o fhf_8.o fni_1.o frc_11.o ftw_3.o ftwi_9.o \ fcr_10.o fhb_16.o fhf_9.o fni_10.o frc_12.o ftw_32.o generic.o \ fcr_11.o fhb_2.o fn_1.o fni_11.o frc_128.o ftw_4.o malloc.o \ fcr_12.o fhb_3.o fn_10.o fni_12.o frc_13.o ftw_5.o planner.o \ fcr_128.o fhb_32.o fn_11.o fni_13.o frc_14.o ftw_6.o putils.o \ fcr_13.o fhb_4.o fn_12.o fni_14.o frc_15.o ftw_64.o rader.o \ fcr_14.o fhb_5.o fn_13.o fni_15.o frc_16.o ftw_7.o rconfig.o \ fcr_15.o fhb_6.o fn_14.o fni_16.o frc_2.o ftw_8.o rexec.o \ fcr_16.o fhb_7.o fn_15.o fni_2.o frc_3.o ftw_9.o rexec2.o \ fcr_2.o fhb_8.o fn_16.o fni_3.o frc_32.o ftwi_10.o rfftwf77.o \ fcr_3.o fhb_9.o fn_2.o fni_32.o frc_4.o ftwi_16.o rfftwnd.o \ fcr_32.o fhf_10.o fn_3.o fni_4.o frc_5.o ftwi_2.o rgeneric.o \ fcr_4.o fhf_16.o fn_32.o fni_5.o frc_6.o ftwi_3.o rplanner.o \ fcr_5.o fhf_2.o fn_4.o fni_6.o frc_64.o ftwi_32.o timer.o \ fcr_6.o fhf_3.o fn_5.o fni_64.o frc_7.o ftwi_4.o twiddle.o \ fcr_64.o fhf_32.o fn_6.o fni_7.o frc_8.o ftwi_5.o wisdom.o \ fcr_7.o fhf_4.o fn_64.o fni_8.o frc_9.o ftwi_6.o wisdomio.o \ fcr_8.o fhf_5.o fn_7.o fni_9.o ftw_10.o ftwi_64.o all: rfftw dft convolution cross ifd pdiff pv pvmorph \ simpflt speccomb specreson stft $(FFTWOBJS): %.o: rfftw/%.c $(CC) $(CFLAGS) -c $< -o $@ rfftw: librfft.a $(FFTWOBJS) ar ar -rcs $@ rfftw/*.o dft: $(CC) $(CFLAGS) dft.c -o $@ SndObj-2.6.7/src/Makefile.win000644 000766 000024 00000006742 12062673766 016432 0ustar00victorstaff000000 000000 ############################################################## # SndObj 2.5 CYGWIN Makefile # # makes: lib (library) # ############################################################## CC = gcc RTDEFS = -DWIN ############################################################## # DO NOT EDIT BELOW THIS LINE ################################ ############################################################## libDir = ../lib Bin = ../bin iDir = ../include LIBNAME = $(libDir)/libsndobj.a # Flags for includes and libraries CFLAGS = -O2 -I$(iDir) $(RTDEFS) LFLAGS = -O2 # Core Library object files SNDOBJS = Oscil.o Oscilt.o Oscili.o \ PhOscili.o ADSR.o IADSR.o Buzz.o \ Balance.o DelayLine.o Tap.o Tapi.o \ Comb.o Allpass.o StringFlt.o Pluck.o \ VDelay.o Pitch.o Loop.o Filter.o \ Reson.o Lp.o ButtBP.o ButtBR.o \ ButtHP.o ButtLP.o Mix.o Pan.o \ Gain.o SyncGrain.o Interp.o Phase.o \ Lookup.o Lookupi.o Ring.o Rand.o \ Randh.o Randi.o Unit.o Ap.o \ Hilb.o SndIn.o SndObj.o MidiIn.o \ MidiMap.o Bend.o Fir.o FFT.o \ IFFT.o Convol.o FastOsc.o Osc.o \ Osci.o PVA.o IFGram.o HiPass.o \ LowPass.o TpTz.o PVS.o PVMorph.o \ PVFilter.o PVMask.o PVMix.o \ PVTransp.o PVBlur.o PVRead.o \ SinAnal.o SinSyn.o AdSyn.o \ SndRead.o SpecIn.o SpecMult.o \ SpecCart.o SpecCombine.o SpecInterp.o \ SpecPolar.o SpecSplit.o SpecThresh.o \ SpecVoc.o SNDIOBJS = SndIO.o SndRTIO.o SndFIO.o \ SndWave.o SndAiff.o SndBuffer.o \ SndMidi.o SndMidiIn.o SndWaveX.o \ SndPVOCEX.o SndSinIO.o SndCoreAudio.o TABLEOBJS = HarmTable.o UsrHarmTable.o \ TrisegTable.o SndTable.o PlnTable.o \ HammingTable.o NoteTable.o UsrDefTable.o \ LoPassTable.o ImpulseTable.o \ SpecEnvTable.o EnvTable.o PVEnvTable.o PVTable.o SNDTHROBJ = SndThread.o # fftw library v-2.1.3 FFTWOBJS = \ config.o fcr_9.o fhf_6.o fn_8.o frc_1.o ftw_16.o ftwi_7.o \ executor.o fftwnd.o fhf_7.o fn_9.o frc_10.o ftw_2.o ftwi_8.o \ fcr_1.o fhb_10.o fhf_8.o fni_1.o frc_11.o ftw_3.o ftwi_9.o \ fcr_10.o fhb_16.o fhf_9.o fni_10.o frc_12.o ftw_32.o generic.o \ fcr_11.o fhb_2.o fn_1.o fni_11.o frc_128.o ftw_4.o malloc.o \ fcr_12.o fhb_3.o fn_10.o fni_12.o frc_13.o ftw_5.o planner.o \ fcr_128.o fhb_32.o fn_11.o fni_13.o frc_14.o ftw_6.o putils.o \ fcr_13.o fhb_4.o fn_12.o fni_14.o frc_15.o ftw_64.o rader.o \ fcr_14.o fhb_5.o fn_13.o fni_15.o frc_16.o ftw_7.o rconfig.o \ fcr_15.o fhb_6.o fn_14.o fni_16.o frc_2.o ftw_8.o rexec.o \ fcr_16.o fhb_7.o fn_15.o fni_2.o frc_3.o ftw_9.o rexec2.o \ fcr_2.o fhb_8.o fn_16.o fni_3.o frc_32.o ftwi_10.o rfftwf77.o \ fcr_3.o fhb_9.o fn_2.o fni_32.o frc_4.o ftwi_16.o rfftwnd.o \ fcr_32.o fhf_10.o fn_3.o fni_4.o frc_5.o ftwi_2.o rgeneric.o \ fcr_4.o fhf_16.o fn_32.o fni_5.o frc_6.o ftwi_3.o rplanner.o \ fcr_5.o fhf_2.o fn_4.o fni_6.o frc_64.o ftwi_32.o timer.o \ fcr_6.o fhf_3.o fn_5.o fni_64.o frc_7.o ftwi_4.o twiddle.o \ fcr_64.o fhf_32.o fn_6.o fni_7.o frc_8.o ftwi_5.o wisdom.o \ fcr_7.o fhf_4.o fn_64.o fni_8.o frc_9.o ftwi_6.o wisdomio.o \ fcr_8.o fhf_5.o fn_7.o fni_9.o ftw_10.o ftwi_64.o LIBOBJS = $(SNDOBJS) $(SNDIOBJS) $(TABLEOBJS) $(SNDTHROBJ) all: AudioDefs lib AudioDefs: AudioDefs.h *.h cp *.h $(iDir)/SndObj lib: $(LIBNAME) clean: rm *.o rm $(LIBNAME) $(LIBNAME): $(FFTWOBJS) $(LIBOBJS) ar -rcs $@ *.o $(FFTWOBJS): %.o: rfftw/%.c $(CC) $(CFLAGS) -c $< -o $@ $(LIBOBJS): %.o: %.cpp $(CC) $(CFLAGS) -c $< -o $@ SndObj-2.6.7/src/MidiIn.cpp000644 000766 000024 00000006633 12062673766 016052 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 /***************************************************/ // MidiIn.cpp: implementation of the MidiIn / // class, SndObj MIDI input / // / /***************************************************/ #include "MidiIn.h" #include MidiIn::MidiIn(){ m_ioinput = 0; m_message = NOTE_MESSAGE; m_channel = 0; m_readvel = 0; AddMsg("message type", 21); AddMsg("channel", 22); AddMsg("midi input", 23); } MidiIn::MidiIn(SndMidiIn* input, short message, short channel, int vecsize, float sr): SndObj (0, vecsize, sr){ m_ioinput = input; if((message != VELOCITY_MESSAGE) && (message != POLYAFTOUCH_MESSAGE)){ m_readvel = m_readaft = 0; m_message = message; } else{ if(message == VELOCITY_MESSAGE){ m_readaft = 0; m_readvel = 1; m_message = NOTE_MESSAGE; } if(message == POLYAFTOUCH_MESSAGE) { m_readaft = 1; m_readvel = 0; m_message = NOTE_MESSAGE; } } m_channel = channel-1; AddMsg("message type", 21); AddMsg("channel", 22); AddMsg("midi input", 23); } MidiIn::~MidiIn(){ } int MidiIn::Set(char* mess, float value){ switch(FindMsg(mess)){ case 21: SetMessage((short) value); return 1; case 22: SetChannel((short) value); return 1; default: return SndObj::Set(mess, value); } } int MidiIn::Connect(char* mess, void* input){ switch(FindMsg(mess)){ case 23: m_ioinput = (SndMidiIn *) input; return 1; default: return SndObj::Connect(mess, input); } } short MidiIn::DoProcess(){ if(!m_error) { if(m_ioinput){ if(m_message == m_ioinput->GetMessage(m_channel+1)){ for(m_vecpos = 0; m_vecpos < m_vecsize; m_vecpos++){ if(m_enable){ if(!m_readvel && !m_readaft) m_output[m_vecpos] = m_ioinput->Output(m_channel); else { if(m_readvel)m_output[m_vecpos] = m_ioinput->LastNoteVelocity(); if(m_readaft)m_output[m_vecpos] = m_ioinput->LastNoteAftertouch(); } } else m_output[m_vecpos] = 0.f; } return 1; } else return 1; } else{ m_error = 11; return 0; } } else return 0; } char* MidiIn::ErrorMessage(){ char* message; switch(m_error){ case 0: message = "No error."; break; case 11: message = "DoProcess() failed. No input object(s)."; break; default: message = "Undefined error"; break; } return message; } SndObj-2.6.7/src/MidiIn.h000644 000766 000024 00000004534 12062673766 015515 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 /***************************************************/ // MidiIn.h: interface of the MidiIn / // class, SndObj MIDI input / // / /***************************************************/ #ifndef _MIDIIN_H #define _MIDIIN_H #include "SndObj.h" #include "SndMidiIn.h" class MidiIn : public SndObj { protected: SndMidiIn* m_ioinput; short m_message; short m_channel; short m_readvel; // if 1 MidiIn outputs the velocity byte short m_readaft; // same, with afttouch public: void SetMessage(short message){ if((message != VELOCITY_MESSAGE) && (message != POLYAFTOUCH_MESSAGE)){ m_readvel = m_readaft = 0; m_message = message; return; } else{ if(message == VELOCITY_MESSAGE){ m_readaft = 0; m_readvel = 1; m_message = NOTE_MESSAGE; return; } if(message == POLYAFTOUCH_MESSAGE) { m_readaft = 1; m_readvel = 0; m_message = NOTE_MESSAGE; return; } } } void SetChannel(short channel){ m_channel = channel;} void SetMidiInput(SndMidiIn* input){ m_ioinput = input; } int Set(char* mess, float value); int Connect(char* mess, void* input); MidiIn(); MidiIn(SndMidiIn* input, short message = NOTE_MESSAGE, short channel = 1, int vecsize = DEF_VECSIZE, float sr = DEF_SR); ~MidiIn(); short DoProcess(); char* ErrorMessage(); }; #endif SndObj-2.6.7/src/MidiMap.cpp000644 000766 000024 00000007617 12062673766 016224 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 /***************************************************/ // MidiMap.cpp: implementation of the MidiMap / // class, SndObj MIDI input / // / /***************************************************/ #include "MidiMap.h" #include MidiMap::MidiMap(){ m_maptable = 0; m_min = 0.f; m_max = 0.f; if(!(m_map = new float[128])){ m_error = 31; } AddMsg("range min", 31); AddMsg("range max", 32); AddMsg("map table", 33); MapReset(); } MidiMap::MidiMap(SndMidiIn* input, Table* maptable, short message, short channel, int vecsize, float sr): MidiIn (input, message, channel, vecsize, sr){ m_maptable = maptable; m_min = 0.f; m_max = 0.f; m_map = 0; AddMsg("range min", 31); AddMsg("range max", 32); AddMsg("map table", 33); } MidiMap::MidiMap(SndMidiIn* input, float max, float min, short message, short channel, int vecsize, float sr): MidiIn (input, message, channel, vecsize, sr){ m_max = max; m_min = min; if(!(m_map = new float[128])){ m_error = 31; } MapReset(); m_maptable = 0; AddMsg("range min", 31); AddMsg("range max", 32); } MidiMap::~MidiMap(){ delete[] m_map; } int MidiMap::Set(char* mess, float value){ switch (FindMsg(mess)){ case 31: SetRange(value, m_max); return 1; case 32: SetRange(m_min, value); return 1; default: return MidiIn::Set(mess,value); } } int MidiMap::Connect(char* mess, void* input){ switch (FindMsg(mess)){ case 33: m_maptable = (Table *) input; return 1; default: return MidiIn::Connect(mess,input); } } short MidiMap::DoProcess(){ if(!m_error) { if(m_ioinput){ if(m_ioinput->NewMessage(m_channel+1) && (m_message == m_ioinput->GetMessage(m_channel+1))){ for(m_vecpos = 0; m_vecpos < m_vecsize; m_vecpos++){ if(m_enable){ if(!m_readvel && !m_readaft){ if(m_maptable) m_output[m_vecpos] = m_maptable->GetTable()[Ftoi(m_ioinput->Output(m_channel))]; else m_output[m_vecpos] = m_map[Ftoi(m_ioinput->Output(m_channel))]; } else { if(m_readvel){ if(m_maptable) m_output[m_vecpos] = m_maptable->GetTable()[Ftoi((float)m_ioinput->LastNoteVelocity())]; else m_output[m_vecpos] = m_map[Ftoi((float)m_ioinput->LastNoteVelocity())]; } if(m_readaft){ if(m_maptable) m_output[m_vecpos] = m_maptable->GetTable()[Ftoi((float)m_ioinput->LastNoteAftertouch())]; else m_output[m_vecpos] = m_map[Ftoi((float)m_ioinput->LastNoteAftertouch())]; } } } else m_output[m_vecpos] = 0.f; } return 1; } else return 1; } else{ m_error = 11; return 0; } } else return 0; } char* MidiMap::ErrorMessage(){ char* message; switch(m_error){ case 31: message = "Error allocating map table"; break; default: message = MidiIn::ErrorMessage(); break; } return message; } SndObj-2.6.7/src/MidiMap.h000644 000766 000024 00000004227 12062673766 015663 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 /***************************************************/ // MidiMap.h: interface of the MidiMap / // class, SndObj MIDI input / // / /***************************************************/ #ifndef _MIDIMAP_H #define _MIDIMAP_H #include "MidiIn.h" #include "Table.h" class MidiMap : public MidiIn { protected: Table* m_maptable; float m_min; float m_max; float* m_map; void MapReset() { if(m_map) { for(int i =0; i < 128; i++) m_map[i] = ((m_max-m_min)/127)*i + m_min; } } public: void SetTable(Table* maptable){ m_maptable = maptable;} void SetRange(float min, float max){ m_min = min; m_max = max; m_maptable = 0; MapReset(); } int Set(char* mess, float value); int Connect(char* mess, void* input); MidiMap(); MidiMap(SndMidiIn* input, Table* maptable, short message = NOTE_MESSAGE, short channel = 1, int vecsize = DEF_VECSIZE, float sr = DEF_SR); MidiMap(SndMidiIn* input, float min, float max, short message = NOTE_MESSAGE, short channel = 1, int vecsize = DEF_VECSIZE, float sr = DEF_SR); ~MidiMap(); short DoProcess(); char* ErrorMessage(); }; #endif SndObj-2.6.7/src/Mix.cpp000644 000766 000024 00000007744 12062673766 015442 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Mix.cpp: implementation of the Mixer class // // (Sound Object mixer). // // // // // //************************************************************// #include "Mix.h" //////////////// CONSTRUCTION / DESTRUCTION //////////////////// Mixer::Mixer(){ m_ObjNo = 0; m_InObj = 0; AddMsg("mix", 21); AddMsg("disconnect", 22); } Mixer::Mixer(int ObjNo, SndObj** InObjs, int vecsize, float sr): SndObj(0, vecsize, sr){ int i; SndObjList* temp; m_ObjNo = 0; m_InObj = 0; for(i = 0; i < ObjNo; i++) { if(InObjs[i]->GetSr() == m_sr){ temp = m_InObj; // first is last on list m_InObj = new SndObjList; m_InObj->obj = InObjs[i]; m_InObj->next = temp; m_ObjNo++; } else m_error = 12; } AddMsg("mix", 21); AddMsg("disconnect", 22); } Mixer::~Mixer(){ SndObjList* temp; while(m_InObj){ temp = m_InObj; m_InObj = temp->next; delete temp; } } ////////////////// OPERATIONS /////////////////////////////// short Mixer::AddObj(SndObj* InObj){ if(m_sr != InObj->GetSr()){ m_error = 12; return 0; } m_sr = InObj->GetSr(); SndObjList* temp; temp = m_InObj; m_InObj = new SndObjList; m_InObj->obj = InObj; m_InObj->next = temp; m_ObjNo++; return 1; } short Mixer::DeleteObj(SndObj* InObj){ SndObjList* temp; SndObjList* previous = 0; temp = m_InObj; while(temp){ if(temp->obj == InObj){ if(previous){ previous->next = temp->next; /* m_InObj = previous; */ } else m_InObj = temp->next; m_ObjNo--; delete temp; return 1; } else{ previous = temp; temp = temp->next; } } m_error = 13; return 0; } int Mixer::Connect(char* mess, void* input){ switch (FindMsg(mess)){ case 21: AddObj((SndObj *) input); return 1; case 22: DeleteObj((SndObj *) input); return 1; default: return SndObj::Connect(mess,input); } } short Mixer::DoProcess(){ if(!m_error){ if(m_ObjNo){ SndObjList* temp; for(m_vecpos=0;m_vecpos < m_vecsize; m_vecpos++){ m_output[m_vecpos] = 0.f; if(m_enable){ temp = m_InObj; while(temp){ m_output[m_vecpos] += (temp->obj)->Output(m_vecpos); temp = temp->next; } } } return 1; } else { m_error = 11; return 0; } } else return 0; } char* Mixer::ErrorMessage(){ char *message; switch(m_error){ case 11: message = "DoProcess() failed, no input objects\n"; break; case 12 : message = "Cannot add object: incompatible sampling rate\n"; break; case 13: message = "Cannot delete object: obj not present in the input list\n"; default : message = SndObj::ErrorMessage(); break; } return message; } SndObj-2.6.7/src/Mix.h000644 000766 000024 00000004071 12062673766 015075 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Mix.h: interface of the mixer class // // // // // // // //************************************************************// #ifndef _MIX_H #define _MIX_H #include "SndObj.h" struct SndObjList{ SndObj* obj; SndObjList* next; }; class Mixer : public SndObj{ protected: SndObjList* m_InObj; // pointer to a linked list of SndObj int m_ObjNo; // number of input objects public: Mixer(); Mixer(int ObjNo, SndObj** InObjs, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Mixer(); int GetObjNo() { return m_ObjNo; } // return number of inputs short AddObj(SndObj* InObj); // add a SndObj to the input list short DeleteObj(SndObj* InObj); // delete a SndObj short DoProcess(); // MIX int Connect(char* mess, void* input); char* ErrorMessage(); }; #endif SndObj-2.6.7/src/NoteTable.cpp000644 000766 000024 00000004237 12062673766 016554 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 "NoteTable.h" NoteTable::NoteTable(){ m_L = 127; m_lowernote = 69; m_uppernote = 81; m_upperfreq = 880.f; m_lowerfreq = 440.f; m_table = new float[m_L+1]; MakeTable(); } NoteTable::NoteTable(short lowernote, short uppernote, float lowerfreq, float upperfreq){ m_L = 127; m_lowernote = lowernote; m_uppernote = uppernote; m_lowerfreq = lowerfreq; m_upperfreq = upperfreq; m_table = new float[m_L+1]; MakeTable(); } NoteTable::~NoteTable(){ delete[] m_table; } void NoteTable::SetFreqInterval(float lowerfreq, float upperfreq){ m_lowerfreq = lowerfreq; m_upperfreq = upperfreq; } void NoteTable::SetNoteInterval(short lowernote, short uppernote){ m_lowernote = lowernote; m_uppernote = uppernote; } short NoteTable::MakeTable(){ for(int i=0; i<127; i++) m_table[i] = (float)( m_lowerfreq + (m_upperfreq - m_lowerfreq) * (pow(2., (i - (double)m_lowernote)/(m_uppernote - m_lowernote)) - 1.)); return 1; } char* NoteTable::ErrorMessage(){ char* message; switch(m_error){ case 0: message = "No error."; break; case 1: message = ""; break; default: message = "Undefined error"; break; } return message; } SndObj-2.6.7/src/NoteTable.h000644 000766 000024 00000002703 12062673766 016215 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 _NOTETABLE_H #define _NOTETABLE_H #include "Table.h" class NoteTable : public Table { protected: short m_lowernote; short m_uppernote; float m_lowerfreq; float m_upperfreq; public: void SetFreqInterval(float lowerfreq, float upperfreq); void SetNoteInterval(short lowernote, short uppernote); NoteTable(); NoteTable(short lowernote, short uppernote, float lowerfreq, float upperfreq); ~NoteTable(); short MakeTable(); char* ErrorMessage(); }; #endif SndObj-2.6.7/src/Osc.cpp000644 000766 000024 00000004260 12062673766 015417 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 "Osc.h" Osc::Osc(){ m_inputamp = m_inputfr = 0; } Osc::Osc(Table* table, float fr, float amp, SndObj* inputfr, SndObj* inputamp, int vecsize, float sr) : FastOsc(table, fr, amp,vecsize, sr){ m_inputamp = inputamp; m_inputfr = inputfr; } Osc::~Osc(){ } int Osc::Connect(char* mess, void* input){ switch (FindMsg(mess)){ case 21: SetFreq((SndObj*) input); return 1; case 22: SetAmp((SndObj*) input); return 1; default: return FastOsc::Connect(mess,input); } } short Osc::DoProcess(){ if(!m_error){ if(!m_ptable){ m_error = 1; // empty table object return 0; } long incr; float amp, fr; long ph = m_phase; float *tab = m_ptable->GetTable(); // wrapping loop for(m_vecpos = 0; m_vecpos < m_vecsize; m_vecpos++){ if(m_enable){ fr = m_fr + (m_inputfr == 0 ? 0 : m_input->Output(m_vecpos)); amp = m_amp + (m_inputamp == 0 ? 0 : m_inputamp->Output(m_vecpos)); m_output[m_vecpos] = amp*tab[ph>>m_lobits] ; incr = (long)(fr * m_factor); ph += incr; ph &= phasemask; } else { // if disabled m_output[m_vecpos] = 0.f; } } // end wrapping loop m_phase = ph; return 1; } else return 0; } SndObj-2.6.7/src/Osc.h000644 000766 000024 00000002662 12062673766 015070 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 _OSC_H #define _OSC_H #include "FastOsc.h" class Osc : public FastOsc { protected: SndObj* m_inputfr; SndObj* m_inputamp; public: Osc(); Osc(Table* table, float fr, float amp, SndObj* inputfr, SndObj* inputamp = 0, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Osc(); void SetFreq(SndObj* inputfr){ m_inputfr = inputfr; } void SetAmp(SndObj* inputamp) { m_inputamp = inputamp; } int Connect(char* mess, void* input); short DoProcess(); }; #endif SndObj-2.6.7/src/Osci.cpp000644 000766 000024 00000004654 12062673766 015577 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 "Osci.h" Osci::Osci(){ } Osci::Osci(Table* table, float fr, float amp, SndObj* inputfr, SndObj* inputamp, int vecsize, float sr) : Osc(table, fr, amp,inputfr, inputamp, vecsize, sr){ long lomod = maxlength/m_size; m_lomask = lomod-1; m_lodiv = 1.f/(float)lomod; } Osci::~Osci(){ } void Osci::SetTable(Table* table){ FastOsc::SetTable(table); long lomod = maxlength/m_size; m_lomask = lomod-1; m_lodiv = 1.f/(float)lomod; } int Osci::Connect(char* mess, void* input){ switch (FindMsg(mess)){ case 23: SetTable((Table *) input); return 1; default: return SndObj::Connect(mess,input); } } short Osci::DoProcess(){ if(!m_error){ if(!m_ptable){ m_error = 1; // empty table object return 0; } long incr, pos; float amp, fr, frac, entry; long ph = m_phase; float *tab = m_ptable->GetTable(); // wrapping loop for(m_vecpos = 0; m_vecpos < m_vecsize; m_vecpos++){ if(m_enable){ fr = m_fr + (m_inputfr == 0 ? 0 : m_input->Output(m_vecpos)); amp = m_amp + (m_inputamp == 0 ? 0 : m_inputamp->Output(m_vecpos)); frac = (float)(ph & m_lomask)*m_lodiv; pos = ph>>m_lobits; entry = tab[pos]; m_output[m_vecpos] = amp*(entry + (entry - tab[pos+1])*-frac); incr = (long)(fr * m_factor); ph += incr; ph &= phasemask; } else { // if disabled m_output[m_vecpos] = 0.f; } } // end wrapping loop m_phase = ph; return 1; } else return 0; } SndObj-2.6.7/src/Osci.h000644 000766 000024 00000002524 12062673766 015236 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 _OSCI_H #define _OSCI_H #include "Osc.h" class Osci : public Osc { protected: long m_lomask; float m_lodiv; public: Osci(); Osci(Table* table, float fr, float amp, SndObj* inputfr, SndObj* inputamp = 0, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Osci(); void SetTable(Table *table); int Connect(char* mess, void* input); short DoProcess(); }; #endif SndObj-2.6.7/src/Oscil.cpp000644 000766 000024 00000007464 12062673766 015755 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Oscil.cpp : implementation of the Oscil base class // // // // // // // //************************************************************// #include "Oscil.h" Oscil::Oscil(){ // initialise all values m_ptable = 0; m_fr = 440.f; m_amp = 1.f; m_inputamp = 0; m_index = 0.; m_size = 0; AddMsg("frequency", 21); AddMsg("amplitude", 22); AddMsg("phase", 23); AddMsg("table", 24); m_factor = m_size/m_sr; } Oscil::Oscil(Table* table, float fr, float amp, SndObj* inputfreq, SndObj* inputamp, int vecsize, float sr) : SndObj(inputfreq, vecsize, sr) { m_ptable = table; m_size = m_ptable->GetLen(); m_fr = fr; m_amp = amp; m_index = 0.; m_inputamp = inputamp; AddMsg("frequency", 21); AddMsg("amplitude", 22); AddMsg("phase", 23); AddMsg("table", 24); m_factor = m_size/m_sr; } Oscil::~Oscil(){} int Oscil::Connect(char* mess, void* input){ switch (FindMsg(mess)){ case 21: m_input = (SndObj *) input; return 1; case 22: m_inputamp = (SndObj *) input; return 1; case 23: SetTable((Table *) input); return 1; default: return SndObj::Connect(mess,input); } } int Oscil::Set(char* mess, float value){ switch (FindMsg(mess)){ case 1: SetSr(value); return 1; case 21: SetFreq(value); return 1; case 22: SetAmp(value); return 1; case 23: SetPhase(value); return 1; default: return SndObj::Set(mess,value); } } short Oscil :: DoProcess(){ if(!m_error){ float fr; float amp; if(!m_ptable){ m_error = 1; // empty table object return 0; } // control signal sampled at a lower rate fr = m_fr + (m_input == 0 ? 0 : m_input->Output(0)); amp = m_amp + (m_inputamp == 0 ? 0 : m_inputamp->Output(0)); // wrapping loop for(m_vecpos = 0; m_vecpos < m_vecsize; m_vecpos++){ if(m_enable){ // truncating lookup m_output[m_vecpos] = amp*m_ptable->Lookup(Ftoi(m_index)); m_incr = (fr * m_factor); m_index += m_incr; while(m_index >= m_size) m_index -= m_size; while(m_index < 0) m_index += m_size; } else { // if disabled m_output[m_vecpos] = 0.f; } } // end wrapping loop return 1; } else return 0; } void Oscil::SetTable(Table* table){ m_ptable = table; m_size = m_ptable->GetLen(); m_factor = m_size/m_sr; } short Oscil::SetPhase(float phase){ if(m_ptable) { m_index = m_size*phase; return 1; } else { m_error = 2; // empty table return 0; } } void Oscil::SetSr(float sr) { SndObj::SetSr(sr); m_factor = m_size/m_sr; } SndObj-2.6.7/src/Oscil.h000644 000766 000024 00000004552 12062673766 015415 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Oscil.h: interface of the Oscil abstract base class // // // // // // // //************************************************************// #ifndef _OSCIL_H #define _OSCIL_H #include "SndObj.h" #include "Table.h" class Oscil : public SndObj { protected: Table* m_ptable; // reference to a Table obj float m_fr; float m_amp; double m_index; double m_incr; long m_size; SndObj* m_inputamp; public: void SetSr(float sr); float m_factor; Oscil(); Oscil(Table* table, float fr=440.f, float amp=1.f, SndObj* inputfreq = 0, SndObj* inputamp = 0, int vecsize = DEF_VECSIZE, float sr=DEF_SR); ~Oscil(); short SetPhase(float phase); // returns error void SetTable(Table* table); void SetFreq(float fr, SndObj* InFrObj= 0){ m_fr = fr; if(InFrObj) m_input = InFrObj; } void SetAmp(float amp, SndObj* InAmpObj= 0){ m_amp = amp; if(InAmpObj) m_inputamp = InAmpObj; } void SetFreq(SndObj* inputfr){ m_input = inputfr; } void SetAmp(SndObj* inputamp) { m_inputamp = inputamp; } int Connect(char* mess, void* input); int Set(char* mess, float value); short DoProcess(); }; #endif SndObj-2.6.7/src/Oscili.cpp000644 000766 000024 00000005206 12062673766 016116 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Oscilt.cpp : implementation of the Oscili class // // (interpolating oscillator). // // // // // //************************************************************// #include "Oscili.h" //////////// CONSTRUCTION / DESTRUCTION //////////////////////// Oscili::Oscili(){} Oscili::Oscili(Table* table, float fr, float amp, SndObj* inputfreq, SndObj* inputamp, int vecsize, float sr) : Oscil(table, fr, amp, inputfreq, inputamp, vecsize, sr){ } Oscili::~Oscili(){} ////////////////// OPERATIONS //////////////////////////////////// short Oscili :: DoProcess(){ if(!m_error) { // wrapping loop float fr; float amp; if(!m_ptable){ m_error = 1; // empty table object return 0; } float* tab = m_ptable->GetTable(); int i; for(m_vecpos = 0; m_vecpos < m_vecsize; m_vecpos++){ if(m_enable){ fr = m_fr + (m_input == 0 ? 0 : m_input->Output(m_vecpos)); amp = m_amp + (m_inputamp== 0 ? 0 : m_inputamp->Output(m_vecpos)); i = Ftoi(m_index); m_output[m_vecpos] = amp*(tab[i] + ((tab[i] - tab[i+1])*(i - m_index))); m_incr = fr * m_factor; m_index += m_incr; // increment m_index while(m_index >= m_size) m_index -= m_size; // modulus while (m_index < 0) m_index += m_size; }else { m_output[m_vecpos] = 0.f; } } // end wrapping loop return 1; } else return 0; } SndObj-2.6.7/src/Oscili.h000644 000766 000024 00000003202 12062673766 015555 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Oscili.h: interface of the Oscili class (interpolating // // oscillator). // // // // // //************************************************************// #ifndef _OSCILI_H #define _OSCILI_H #include "Oscil.h" class Oscili : public Oscil { public: Oscili(); Oscili(Table* table, float fr=440.f, float amp=1.f, SndObj* inputfreq = 0, SndObj* inputamp = 0, int vecsize= DEF_VECSIZE, float sr=DEF_SR); ~Oscili(); short DoProcess(); }; #endif SndObj-2.6.7/src/Oscilt.cpp000644 000766 000024 00000005132 12062673766 016127 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Oscilt.cpp : implementation of the Oscili class // // (interpolating oscillator). // // // // // //************************************************************// #include "Oscilt.h" //////////// CONSTRUCTION / DESTRUCTION //////////////////////// Oscilt::Oscilt(){} Oscilt::Oscilt(Table* table, float fr, float amp, SndObj* inputfreq, SndObj* inputamp, int vecsize, float sr) : Oscil(table, fr, amp, inputfreq, inputamp, vecsize, sr){ } Oscilt::~Oscilt(){} ////////////////// OPERATIONS //////////////////////////////////// short Oscilt :: DoProcess(){ if(!m_error) { // wrapping loop float fr; float amp; if(!m_ptable){ m_error = 1; // empty table object return 0; } float* tab = m_ptable->GetTable(); int i; for(m_vecpos = 0; m_vecpos < m_vecsize; m_vecpos++){ if(m_enable){ fr = m_fr + (m_input == 0 ? 0 : m_input->Output(m_vecpos)); amp = m_amp + (m_inputamp== 0 ? 0 : m_inputamp->Output(m_vecpos)); i = Ftoi(m_index); m_output[m_vecpos] = amp*(tab[i]); m_incr = fr * m_factor; m_index += m_incr; // increment m_index while(m_index >= m_size) m_index -= m_size; // modulus while (m_index < 0) m_index += m_size; }else { m_output[m_vecpos] = 0.f; } } // end wrapping loop return 1; } else return 0; } SndObj-2.6.7/src/Oscilt.h000644 000766 000024 00000003211 12062673766 015570 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Oscilt.h: interface of the Oscilt class (truncating // // oscillator). // // // // // //************************************************************// #ifndef _OSCILT_H #define _OSCILT_H #include "Oscil.h" class Oscilt : public Oscil { public: Oscilt(); Oscilt(Table* table, float fr=440.f, float amp=1.f, SndObj* inputfreq = 0, SndObj* inputamp = 0, int vecsize = DEF_VECSIZE, float sr=DEF_SR); ~Oscilt(); short DoProcess(); }; #endif SndObj-2.6.7/src/Pan.cpp000644 000766 000024 00000007155 12062673766 015417 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 "Pan.h" //////////////// CONSTRUCTION / DESTRUCTION //////////////////// Pan::Pan(){ m_pan = 0.f; m_channel = new SndObj[2]; m_inputpan = 0; left = &m_channel[0]; right = &m_channel[1]; m_channel[0].SetInput(this); m_channel[1].SetInput(this); m_inputpan = 0; m_res = 512; m_panpos = new float[m_res*2]; float pan; for(int i = 0; i < m_res*2; i++){ pan = ((float)i/m_res) - 1; m_panpos[i] = (float)(squrt2o2*(1-pan)/sqrt(1+(pan*pan))); } AddMsg("pan position", 21); } Pan::Pan(float pan, SndObj* InObj, SndObj* InPan, int res, int vecsize, float sr): SndObj(InObj, vecsize, sr){ m_pan = pan; m_inputpan = InPan; m_channel = new SndObj[2]; if(vecsize != DEF_VECSIZE){ m_channel[0].SetVectorSize(vecsize); m_channel[1].SetVectorSize(vecsize); } m_channel[0].SetInput(this); m_channel[1].SetInput(this); left = &m_channel[0]; right = &m_channel[1]; m_res = res/2; m_panpos = new float[res]; float panval; for(int i = 0; i < res; i++){ panval = ((float)i/m_res) - 1; m_panpos[i] = (float)(squrt2o2*(1-panval)/sqrt(1+(panval*panval))); } AddMsg("pan position", 21); } Pan::~Pan(){ delete[] m_channel; } ////////////////// OPERATIONS /////////////////////////////// float Pan::Panning(float pan, int chan){ if(pan >= -1 && pan <= 1){ if(!chan) return m_panpos[Ftoi(m_res*(1+pan))]; else return m_panpos[Ftoi(m_res*(1-pan))]; } else { if (pan < -1) { if(!chan) return m_panpos[0]; else return 0.f; } else { if(!chan) return 0.f; else return m_panpos[0]; } } } int Pan::Set(char* mess, float value){ switch(FindMsg(mess)){ case 21: SetPan(value); return 1; default: return SndObj::Set(mess, value); } } int Pan::Connect(char* mess, void* input){ switch(FindMsg(mess)){ case 21: m_inputpan = (SndObj *) input; return 1; default: return SndObj::Connect(mess, input); } } short Pan::DoProcess() { if(!m_error){ if(m_input){ float pan; for(int i=0; i < 2; i++){ for(m_vecpos = 0; m_vecpos < m_vecsize; m_vecpos++){ if(m_enable) { pan = m_pan + (m_inputpan == 0 ? 0 : m_inputpan->Output(m_vecpos)); m_output[m_vecpos] = m_input->Output(m_vecpos)*Panning(pan,i); } else m_output[m_vecpos] = 0.f; } m_channel[i].DoProcess(); } return 1; } else { m_error=11; return 0; } } else return 0; } char* Pan::ErrorMessage(){ char *message; switch(m_error){ case 11: message = "DoProcess() failed, no input object\n"; break; default : message = SndObj::ErrorMessage(); break; } return message; } SndObj-2.6.7/src/Pan.h000644 000766 000024 00000003314 12062673766 015055 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 _PAN_H #define _PAN_H #include "SndObj.h" #include const double squrt2o2 = sqrt(2.) / 2.; class Pan : public SndObj{ protected: SndObj* m_channel; float m_pan; int m_res; float* m_panpos; SndObj* m_inputpan; inline float Panning(float pan, int chan); public: SndObj* left; SndObj* right; Pan(); Pan(float pan, SndObj* InObj, SndObj* InPan = 0, int res=1024, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Pan(); void SetPan(float pan, SndObj* InPan = 0){ m_pan = pan; m_inputpan = InPan; } int Set(char* mess, float value); int Connect(char* mess, void* input); short DoProcess(); char* ErrorMessage(); }; #endif SndObj-2.6.7/src/Phase.cpp000644 000766 000024 00000004153 12062673766 015734 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 "Phase.h" Phase::Phase(){ m_freq = m_offset = 0.f; AddMsg("frequency", 21); AddMsg("phase", 22); } Phase::Phase(float freq, SndObj* FreqInput, float offset, int vecsize, float sr): SndObj(FreqInput, vecsize, sr) { m_freq = freq; m_offset = offset; AddMsg("frequency", 21); AddMsg("phase", 22); } Phase:: ~Phase(){ } int Phase::Set(char* mess, float value){ switch (FindMsg(mess)){ case 21: SetFreq(value); return 1; case 22: SetPhase(value); return 1; default: return SndObj::Set(mess,value); } } int Phase::Connect(char* mess, void* input){ switch (FindMsg(mess)){ case 21: m_input = (SndObj *) input; return 1; default: return SndObj::Connect(mess,input); } } short Phase::DoProcess(){ if(!m_error){ float s; float freq; for(m_vecpos = 0; m_vecpos < m_vecsize; m_vecpos++){ if(m_enable){ freq = m_freq + (m_input == 0 ? 0 : m_input->Output(m_vecpos)); s = m_offset + freq/m_sr; while(s > 1) s -= 1.; while(s < 0) s += 1.; m_output[m_vecpos] = m_offset = s; } else m_output[m_vecpos] = 0.f; } return 1; } else return 0; } SndObj-2.6.7/src/Phase.h000644 000766 000024 00000003561 12062673766 015403 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Phase.h: interface of the Phase class. // // // // // // // //************************************************************// #ifndef _Phase_H #define _Phase_H #include "SndObj.h" class Phase : public SndObj { protected: float m_freq; float m_offset; public: Phase(); Phase(float freq, SndObj* FreqInput = 0 , float offset = 0.f, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Phase(); void SetFreq(float freq, SndObj* FreqInput = 0){ m_freq = freq; m_input = FreqInput; } void SetPhase(float offset){ m_offset = offset; } int Set(char* mess, float value); int Connect(char* mess, void* input); short DoProcess(); }; #endif SndObj-2.6.7/src/PhOscili.cpp000644 000766 000024 00000006421 12062673766 016406 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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) Frank Barknecht 2002 // See License.txt for a disclaimer of all warranties // and licensing information //************************************************************// // PhOscili.cpp: implementation of the PhOscili class // // (interpolating oscillator with phase input). // // // // Frank Barknecht , 2002 // // // //************************************************************// #include "PhOscili.h" //////////// CONSTRUCTION / DESTRUCTION //////////////////////// PhOscili::PhOscili(){ } PhOscili::PhOscili( Table* table, float fr, float amp, SndObj* inputfreq, SndObj* inputamp, SndObj* inputphase, int vecsize, float sr ) : Oscil(table, fr, amp, inputfreq, inputamp, vecsize, sr) { m_inputphase = inputphase; } PhOscili::~PhOscili(){} ////////////////// OPERATIONS //////////////////////////////////// int PhOscili::Connect(char* mess, void* input){ switch (FindMsg(mess)){ case 23: m_inputphase = (SndObj *) input; return 1; default: return Oscil::Connect(mess,input); } } short PhOscili :: DoProcess(){ if(!m_error) { // wrapping loop float fr; float amp; if(!m_ptable) { m_error = 1; // empty table object return 0; } float* tab = m_ptable->GetTable(); float i; for(m_vecpos = 0; m_vecpos < m_vecsize; m_vecpos++) { if(m_enable) { int ps; fr = m_fr + (m_input == 0 ? 0 : m_input->Output(m_vecpos)); amp = m_amp + (m_inputamp == 0 ? 0 : m_inputamp->Output(m_vecpos)); i = (m_index + (m_inputphase == 0 ? 0 : m_size * m_inputphase->Output(m_vecpos))); // modulo while(i >= m_size) i -= m_size; while (i < 0) i += m_size; ps = Ftoi(i); m_output[m_vecpos] = amp * ( tab[ps] + ( (tab[ps] - tab[ps+1]) * ( ps - i ) ) ); m_incr = fr * m_factor; m_index += m_incr; // increment m_index while(m_index >= m_size) m_index -= m_size; // modulus while (m_index < 0) m_index += m_size; } else { m_output[m_vecpos] = 0.f; } } // end wrapping loop return 1; } else return 0; } SndObj-2.6.7/src/PhOscili.h000644 000766 000024 00000003514 12062673766 016053 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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)Frank Barknecht, 2003 // See License.txt for a disclaimer of all warranties // and licensing information //************************************************************// // PhOscili.h: interface of the PhOscili class (interpolating // // oscillator with phase input). // // // // Frank Barknecht , 2002 // // // //************************************************************// #ifndef _PhOscili_H #define _PhOscili_H #include "Oscil.h" class PhOscili : public Oscil { protected: SndObj* m_inputphase; public: PhOscili(); PhOscili( Table* table, float fr, float amp, SndObj* inputfreq = 0, SndObj* inputamp = 0, SndObj* inputphase = 0, int vecsize= DEF_VECSIZE, float sr=DEF_SR ); ~PhOscili(); int Connect(char* mess, void* input); short DoProcess(); }; #endif SndObj-2.6.7/src/Pitch.cpp000644 000766 000024 00000007413 12062673766 015745 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //***********************************************************// // Pitch.cpp: Implementation of the Pitch Object // // // // // // // //***********************************************************// #include "Pitch.h" #include //////////CONSTRUCTION ///////////////////// Pitch::Pitch(){ m_pointer1 = (float) m_rpointer; m_pointer3 = (float) m_rpointer+(m_size/2); m_pitch = 1; m_incr = 0; sintab = 0; AddMsg("multiplier", 21); AddMsg("semitones", 22); } Pitch::Pitch(float delaytime, SndObj* InObj, float pitch, int vecsize, float sr) : DelayLine(delaytime, InObj, vecsize, sr) { m_pointer1 = (float) m_rpointer; m_pointer3 = (float) m_rpointer+(m_size/2); m_pitch = pitch; m_incr = 0; sintab = new float[m_size/2+1]; for(int i = 0; i <= m_size/2; i++) sintab[i] = sin(i*PI/m_size); AddMsg("multiplier", 31); AddMsg("semitones", 32); } Pitch::Pitch(float delaytime, SndObj* InObj, int semitones, int vecsize, float sr) : DelayLine(delaytime, InObj, vecsize, sr) { sintab = new float[m_size/2+1]; for(int i = 0; i <= m_size/2; i++) sintab[i] = sin(i*PI/m_size); m_pointer1 = (float) m_rpointer; m_pointer3 = (float) m_rpointer+(m_size/2); m_pitch = (float) pow(2., semitones/12.); m_incr = 0; AddMsg("multiplier", 31); AddMsg("semitones", 32); } Pitch::~Pitch() { delete[] sintab; } ////////////////////OPERATIONS//////////////////// int Pitch::Set(char* mess, float value){ switch (FindMsg(mess)){ case 31: SetPitch(value); return 1; case 32: SetPitch((int) value); return 1; default: return DelayLine::Set(mess,value); } } short Pitch::DoProcess(){ if(!m_error){ if(m_input){ float s1, s3; float absdiff; int halfsize; for(m_vecpos=0; m_vecpos 0 ? absdiff : -absdiff; if(absdiff > halfsize){ if(m_pointer1 > m_wpointer) absdiff = m_wpointer+m_size - m_pointer1; else absdiff = m_pointer1+m_size - m_wpointer; } absdiff = sintab ? sintab[Ftoi(absdiff)] : sin(PI*absdiff/m_size); s1 = GetSample(m_pointer1); s3 = GetSample(m_pointer3); PutSample(m_input->Output(m_vecpos)); m_output[m_vecpos] = absdiff*s1+ (1.f - absdiff)*s3; m_incr += m_pitch; while(m_incr >= m_size) m_incr -= m_size; m_pointer1 = m_incr; m_pointer3 = m_pointer1+m_size/2; while(m_pointer3 >= m_size) m_pointer3 -= m_size; } else m_output[m_vecpos] = 0.f; } return 1; } else{ m_error = 11; return 0; } } else return 0; } SndObj-2.6.7/src/Pitch.h000644 000766 000024 00000003757 12062673766 015421 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Pitch.h: interface of the Pitch class // // // // // // // //************************************************************// #ifndef _PITCH_H #define _PITCH_H #include "DelayLine.h" class Pitch : public DelayLine { protected: float* sintab; float m_pointer1; float m_pointer3; float m_pitch; float m_incr; public: Pitch(); Pitch(float delaytime, SndObj* InObj, float pitch = 1.f, int vecsize=DEF_VECSIZE, float sr=DEF_SR); Pitch(float delaytime, SndObj* InObj, int semitones = 0, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Pitch(); void SetPitch(float pitch){ m_pitch = pitch; } void SetPitch(int semitones){ m_pitch = (float) pow(2., semitones/12.); } int Set(char* mess, float value); short DoProcess(); }; #endif SndObj-2.6.7/src/PlnTable.cpp000644 000766 000024 00000005446 12062673766 016403 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // PlnTable.cpp: implementationof the PlnTable obj // // (Polynomial function table) // // // // // //************************************************************// #include "PlnTable.h" /////////////// CONSTRUCTION / DESTRUCTION ///////////////////// PlnTable :: PlnTable(){ m_L = 1024; m_order = 1; m_coefs = new double[1]; m_coefs[0] = 1.; m_range = 1.f; m_table = new float[m_L+1]; MakeTable(); } PlnTable :: PlnTable(long L, int order, double* coefs, float range){ m_L = L; m_order = order; m_coefs = new double[m_order+1]; m_range = range; for(int i = 0; i <= m_order; i++) m_coefs[i] = coefs[i]; m_table = new float[m_L+1]; MakeTable(); } PlnTable :: ~PlnTable(){ delete[] m_table; delete[] m_coefs; } ///////////// OPERATIONS //////////////////////////////////// void PlnTable::SetPln(int order, double* coefs, float range) { delete[] m_coefs; m_order = order; m_coefs = new double[m_order+1]; m_range = range; for(int i = 0; i <= m_order; i++) m_coefs[i] = coefs[i]; MakeTable(); } short PlnTable :: MakeTable(){ double x = 2.*m_range/m_L; ZeroTable(); for(int n=0; n <= m_L; n++){ m_table[n] = (float) m_coefs[0]; for(int i=1; i <= m_order; i++) m_table[n] += (float)(m_coefs[i]*pow((x*n)-m_range, (double)i)); } return 1; } ///////////////// ERROR HANDLING /////////////////////////////// char* PlnTable::ErrorMessage(){ char* message; switch(m_error){ case 0: message = "No error."; break; case 1: message = ""; break; default: message = "Undefined error"; break; } return message; } SndObj-2.6.7/src/PlnTable.h000644 000766 000024 00000003313 12062673766 016037 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // PlnTable.h: interface of the PlnTable class // // (Polynomial function table) // // // // // //************************************************************// #ifndef _PLNTABLE_H #define _PLNTABLE_H #include "Table.h" class PlnTable : public Table { protected : int m_order; double* m_coefs; float m_range; public: void SetPln(int order, double* coefs, float range=1.f); char* ErrorMessage(); short MakeTable(); PlnTable(); PlnTable(long L, int order, double* coefs, float range=1.f); ~PlnTable(); }; #endif SndObj-2.6.7/src/Pluck.cpp000644 000766 000024 00000011600 12062673766 015745 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //***********************************************************// // Pluck.cpp: Implementation of the Pluck Object // // // // // // // //***********************************************************// #include "Pluck.h" //////////CONSTRUCTION ///////////////////// Pluck::Pluck(){ m_inputfr = 0; m_amp = 1.f; m_fr= 440.f; m_maxscale = 32767.f; m_s = 0.5f; float tdelay = m_sr/m_fr; int delay = (int)tdelay; delay = ((delay+m_s) > (tdelay) ? delay - 1: delay); float fracdelay = (tdelay - (delay + m_s)); m_vdtime = m_size - tdelay; m_a = (1-fracdelay)/(1+fracdelay); m_input = new Randh((m_amp*10000.f/m_maxscale), m_amp, 0, 0, 1, m_sr); m_fdbgain = 0.9f; AddMsg("amplitude", 41); AddMsg("maxscale", 42); AddMsg("repluck", 43); } Pluck::Pluck(float fr, float amp, float fdbgain, SndObj* InFrObj, float maxscale, int vecsize, float sr) :StringFlt(fr, fdbgain, 0, InFrObj, vecsize, sr) { m_amp = amp; m_maxscale = maxscale; m_input = new Randh((m_amp*10000.f/m_maxscale), m_amp, 0, 0, 1, m_sr); FillDelay(); AddMsg("amplitude", 41); AddMsg("maxscale", 42);; AddMsg("repluck", 43); } Pluck::Pluck(float fr, float amp, SndObj* InFrObj, float decay, float maxscale, int vecsize, float sr) :StringFlt(fr, 0, decay, InFrObj, vecsize, sr) { m_amp = amp; m_maxscale = maxscale; m_input = new Randh((m_amp*10000.f/m_maxscale), m_amp, 0, 0, 1, m_sr); FillDelay(); AddMsg("amplitude", 41); AddMsg("maxscale", 42);; AddMsg("repluck", 43); } Pluck::~Pluck() { delete m_input; } //////////////////OPERATIONS ////////////////////// void Pluck::FillDelay(){ for(int n=0; n< m_size;n++){ m_input->DoProcess(); PutSample(m_input->Output(0)); } m_wpointer = 0; } int Pluck::Set(char* mess, float value){ switch (FindMsg(mess)){ case 41: SetAmp(value, m_maxscale); return 1; case 42: SetAmp(m_amp, value); return 1; case 43: RePluck(); return 1; default: return StringFlt::Set(mess,value); } } void Pluck::RePluck(){ Disable(); FillDelay(); Enable(); } short Pluck::DoProcess(){ if(!m_error){ float fr, pos, tdelay, fracdelay, w, s, output; float g, gf; int delay; for(m_vecpos=0; m_vecposOutput(m_vecpos); if(fr < 20.f) fr = 20.f; tdelay = m_sr/fr; delay = (int)(tdelay - .5); fracdelay = (tdelay - (delay +.5f)); m_vdtime = m_size - tdelay; m_a = (1-fracdelay)/(1+fracdelay); } */ if(m_inputfr){ fr = m_fr + m_inputfr->Output(m_vecpos); if(fr < 20.f) fr = 20.f; tdelay = m_sr/fr; if(m_decay){ gf = pow(10., (double)(-m_decay/(20*m_fr))); g = cos(PI*fr/m_sr); if(gf < g) m_fdbgain = gf/g; else { double a,b,c,d,s1,s2; double icosfun = cos(2*PI*m_fr/m_sr); a = 2 - 2*icosfun; b = 2*icosfun - 2; c = 1 - gf*gf ; d = sqrt(b*b - 4*a*c); s1 = (-b + d)/(a*2); s2 = (-b - d)/(a*2); m_s = (s1 < s2 ? s1 : s2); } } delay = Ftoi(tdelay); delay = ((delay+m_s) > (tdelay) ? delay - 1: delay); // delay = (int)(tdelay - .5); // fracdelay = (tdelay - (delay +.5f)); fracdelay = (tdelay - (delay + m_s)); m_vdtime = m_size - tdelay; m_a = (1-fracdelay)/(1+fracdelay); } pos = m_wpointer + m_vdtime; while(pos >= m_size) pos -= m_size; while(pos < 0) pos += m_size; w = GetSample(pos); s = m_LPDelay*(1-m_s) + w*m_s; m_LPDelay = w; output = m_APDelay + s*(m_a); m_APDelay = s + output*(-m_a); PutSample(output*m_fdbgain); m_output[m_vecpos] = output; } else m_output[m_vecpos] = 0.f; } return 1; } else return 0; } SndObj-2.6.7/src/Pluck.h000644 000766 000024 00000004243 12062673766 015417 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Pluck.h: interface of the Pluck class // // // // // // // //************************************************************// #ifndef _PLUCK_H #define _PLUCK_H #include "StringFlt.h" #include "Randh.h" class Pluck : public StringFlt { protected: float m_amp; float m_maxscale; void FillDelay(); public: Pluck(); Pluck(float fr, float amp, float fdbgain, SndObj* InFrObj=0, float maxscale=32767.f, int vecsize=DEF_VECSIZE, float sr=DEF_SR); Pluck(float fr, float amp, SndObj* InFrObj=0, float decay=20.f, float maxscale=32767.f, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Pluck(); void RePluck(); int Set(char* mess, float value); void SetAmp(float amp, float maxscale=32767.f){ m_amp = amp; ((Randh*)m_input)->SetFreq((m_amp*10000.f/maxscale), 0); ((Randh*)m_input)->SetAmp(m_amp); m_APDelay = m_LPDelay = 0.f; FillDelay(); } short DoProcess(); }; #endif SndObj-2.6.7/src/Ptrack.cpp000644 000766 000024 00000027241 12062673766 016123 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 // #include #include "Ptrack.h" #define MINFREQINBINS 5 #define MAXHIST 3 #define MAXWINSIZ 8192 #define MINWINSIZ 128 #define DEFAULTWINSIZ 1024 #define MAXPEAKNOS 100 #define DEFAULTPEAKNOS 20 #define MINBW 0.03f #define BINPEROCT 48 #define BPEROOVERLOG2 69.24936196f #define FACTORTOBINS (4/0.0145453) #define BINGUARD 10 #define PARTIALDEVIANCE (0.023) #define DBSCAL 3.333 #define DBOFFSET (-92.3) #define MINBIN 3 #define MINAMPS 40 #define MAXAMPS 50 #define THRSH (10.) static float partialonset[] = { 0, 48, 76.0782000346154967102, 96, 111.45254855459339269887, 124.07820003461549671089, 134.75303625876499715823, 144, 152.15640006923099342109, 159.45254855459339269887, 166.05271769459026829915, 172.07820003461549671088, 177.62110647077242370064, 182.75303625876499715892, 187.53074858920888940907, 192, }; #define NPARTIALONSET ((int)(sizeof(partialonset)/sizeof(float))) #define COEF1 ((float)(.5 * 1.227054)) #define COEF2 ((float)(.5 * -0.302385)) #define COEF3 ((float)(.5 * 0.095326)) #define COEF4 ((float)(.5 * -0.022748)) #define COEF5 ((float)(.5 * 0.002533)) #define FLTLEN 5 #define OK 1 extern "C" { void ComplexFFT(float *s, int N); } void Ptrack::pitchtrack() { Histopeak histpeak; int i, j, k, n = 2*hop, npeak, logn = -1, count, tmp; float totalpower, totalloudness, totaldb; float maxbin, *histogram = spectmp + BINGUARD; float hzperbin = m_sr / (2.0f * n); int indx, halfhop = hop>>1; float best; float cumpow = 0, cumstrength = 0, freqnum = 0, freqden = 0; int npartials = 0, nbelow8 = 0; float putfreq; count = histcnt + 1; if (count == NPREV) count = 0; histcnt = count; tmp = n; while(tmp){ tmp >>= 1; logn++; } maxbin = BINPEROCT * (logn-2); for (i = 0, k = 0; i < hop; i++, k += 2){ spec[k] = sig[i] * sinus[k]; spec[k+1] = sig[i] * sinus[k+1]; } ComplexFFT(spec, hop); for (i = 0, k = 2*FLTLEN; i < hop; i+=2, k += 4){ spectmp[k] = spec[i]; spectmp[k+1] = spec[i+1]; } for (i = n - 2, k = 2*FLTLEN+2; i >= 0; i-=2, k += 4){ spectmp[k] = spec[i]; spectmp[k+1] = -spec[i+1]; } for (i = (2*FLTLEN), k = (2*FLTLEN-2);i=0; i-=2, k+=2){ spectmp[k] = spectmp[i]; spectmp[k+1] = -spectmp[k+1]; } for (i = j = 0, k = 2*FLTLEN; i < halfhop; i++, j+=8, k+=2) { float re, im; re= COEF1 * ( prev[k-2] - prev[k+1] + spectmp[k-2] - prev[k+1]) + COEF2 * ( prev[k-3] - prev[k+2] + spectmp[k-3] - spectmp[ 2]) + COEF3 * (-prev[k-6] +prev[k+5] -spectmp[k-6] +spectmp[k+5]) + COEF4 * (-prev[k-7] +prev[k+6] -spectmp[k-7] +spectmp[k+6]) + COEF5 * ( prev[k-10] -prev[k+9] +spectmp[k-10] -spectmp[k+9]); im= COEF1 * ( prev[k-1] +prev[k] +spectmp[k-1] +spectmp[k]) + COEF2 * (-prev[k-4] -prev[k+3] -spectmp[k-4] -spectmp[k+3]) + COEF3 * (-prev[k-5] -prev[k+4] -spectmp[k-5] -spectmp[k+4]) + COEF4 * ( prev[k-8] +prev[k+7] +spectmp[k-8] +spectmp[k+7]) + COEF5 * ( prev[k-9] +prev[k+8] +spectmp[k-9] +spectmp[k+8]); spec[j] = 0.7071f * (re + im); spec[j+1] = 0.7071f * (im - re); spec[j+4] = prev[k] + spectmp[k+1]; spec[j+5] = prev[k+1] - spectmp[k]; j += 8; k += 2; re= COEF1 * ( prev[k-2] -prev[k+1] -spectmp[k-2] +spectmp[k+1]) + COEF2 * ( prev[k-3] -prev[k+2] -spectmp[k-3] +spectmp[k+2]) + COEF3 * (-prev[k-6] +prev[k+5] +spectmp[k-6] -spectmp[k+5]) + COEF4 * (-prev[k-7] +prev[k+6] +spectmp[k-7] -spectmp[k+6]) + COEF5 * ( prev[k-10] -prev[k+9] -spectmp[k-10] +spectmp[k+9]); im= COEF1 * ( prev[k-1] +prev[k] -spectmp[k-1] -spectmp[k]) + COEF2 * (-prev[k-4] -prev[k+3] +spectmp[k-4] +spectmp[k+3]) + COEF3 * (-prev[k-5] -prev[k+4] +spectmp[k-5] +spectmp[k+4]) + COEF4 * ( prev[k-8] +prev[k+7] -spectmp[k-8] -spectmp[k+7]) + COEF5 * ( prev[k-9] +prev[k+8] -spectmp[k-9] -spectmp[k+8]); spec[j] = 0.7071f * (re + im); spec[j+1] = 0.7071f * (im - re); spec[j+4] = prev[k] - spectmp[k+1]; spec[j+5] = prev[k+1] + spectmp[k]; } for (i = 0; i < n + 4*FLTLEN; i++) prev[i] = spectmp[i]; for (i = 0; i < MINBIN; i++) spec[4*i + 2] = spec[4*i + 3] = 0; for (i = 4*MINBIN, totalpower = 0; i < (n-2)*4; i += 4) { float re = spec[i] - 0.5f * (spec[i-8] + spec[i+8]); float im = spec[i+1] - 0.5f * (spec[i-7] + spec[i+9]); spec[i+3] = (totalpower += (spec[i+2] = re * re + im * im)); } if (totalpower > 1e-9f) { totaldb = DBSCAL * log(totalpower/n); totalloudness = sqrt(sqrt(totalpower)); if (totaldb < 0) totaldb = 0; } else totaldb = totalloudness = 0; dbs[count] = totaldb + DBOFFSET; if (totaldb >= amplo) { npeak = 0; for (i = 4*MINBIN;i < (4*(n-2)) && npeak < numpks; i+=4) { float height = spec[i+2], h1 = spec[i-2], h2 = spec[i+6]; float totalfreq, peakfr, tmpfr1, tmpfr2, m, var, stdev; if (height < h1 || height < h2 || h1 < 0.00001f*totalpower || h2 < 0.00001f*totalpower) continue; peakfr= ((spec[i-8] - spec[i+8]) * (2.0f * spec[i] - spec[i+8] - spec[i-8]) + (spec[i-7] - spec[i+9]) * (2.0f * spec[i+1] - spec[i+9] - spec[i-7])) / (2.0f * height); tmpfr1= ((spec[i-12] - spec[i+4]) * (2.0f * spec[i-4] - spec[i+4] - spec[i-12]) + (spec[i-11] - spec[i+5]) * (2.0f * spec[i-3] - spec[i+5] - spec[i-11])) / (2.0f * h1) - 1; tmpfr2= ((spec[i-4] - spec[i+12]) * (2.0f * spec[i+4] - spec[i+12] - spec[i-4]) + (spec[i-3] - spec[i+13]) * (2.0f * spec[i+5] - spec[i+13] - spec[i-3])) / (2.0f * h2) + 1; m = 0.333333f * (peakfr + tmpfr1 + tmpfr2); var = 0.5f * ((peakfr-m)*(peakfr-m) + (tmpfr1-m)*(tmpfr1-m) + (tmpfr2-m)*(tmpfr2-m)); totalfreq = (i>>2) + m; if (var * totalpower > THRSH * height || var < 1e-30) continue; stdev = sqrt(var); if (totalfreq < 4) totalfreq = 4; peakarray[npeak].pwidth = stdev; peakarray[npeak].ppow = height; peakarray[npeak].ploudness = sqrt(sqrt(height)); peakarray[npeak].pfreq = totalfreq; npeak++; } if (npeak > numpks) npeak = numpks; for (i = 0; i < maxbin; i++) histogram[i] = 0; for (i = 0; i < npeak; i++) { float pit = BPEROOVERLOG2 * log(peakarray[i].pfreq) - 96.0f; float binbandwidth = FACTORTOBINS * peakarray[i].pwidth/peakarray[i].pfreq; float putbandwidth = (binbandwidth < 2 ? 2 : binbandwidth); float weightbandwidth = (binbandwidth < 1.0f ? 1.0f : binbandwidth); float weightamp = 4. * peakarray[i].ploudness / totalloudness; for (j = 0; j < NPARTIALONSET; j++) { float bin = pit - partialonset[j]; if (bin < maxbin) { float para, pphase, score = 30.0f * weightamp / ((j+npartial) * weightbandwidth); int firstbin = (int) (bin + 0.5f - 0.5f * putbandwidth); int lastbin = (int) (bin + 0.5f + 0.5f * putbandwidth); int ibw = lastbin - firstbin; if (firstbin < -BINGUARD) break; para = 1.0f / (putbandwidth * putbandwidth); for (k = 0, pphase = firstbin-bin; k <= ibw; k++,pphase += 1.0f) histogram[k+firstbin] += score * (1.0f - para * pphase * pphase); } } } for (best = 0, indx = -1, j=0; j < maxbin; j++) if (histogram[j] > best) indx = j, best = histogram[j]; histpeak.hvalue = best; histpeak.hindex = indx; putfreq = exp((1.0f / BPEROOVERLOG2) * (histpeak.hindex + 96.0f)); for (j = 0; j < npeak; j++) { float fpnum = peakarray[j].pfreq/putfreq; int pnum = (int)(fpnum + 0.5f); float fipnum = pnum; float deviation; if (pnum > 16 || pnum < 1) continue; deviation = 1.0f - fpnum/fipnum; if (deviation > -PARTIALDEVIANCE && deviation < PARTIALDEVIANCE) { float stdev, weight; npartials++; if (pnum < 8) nbelow8++; cumpow += peakarray[j].ppow; cumstrength += sqrt(sqrt(peakarray[j].ppow)); stdev = (peakarray[j].pwidth > MINBW ? peakarray[j].pwidth : MINBW); weight = 1.0f / ((stdev*fipnum) * (stdev*fipnum)); freqden += weight; freqnum += weight * peakarray[j].pfreq/fipnum; } } if ((nbelow8 < 4 || npartials < 7) && cumpow < 0.01f * totalpower) histpeak.hvalue = 0; else { float pitchpow = (cumstrength * cumstrength) * (cumstrength * cumstrength); float freqinbins = freqnum/freqden; if (freqinbins < MINFREQINBINS) histpeak.hvalue = 0; else { cps = histpeak.hpitch = hzperbin * freqnum/freqden; histpeak.hloud = (DBSCAL) * log(pitchpow/n); } } } } void Ptrack::SetPeaks(int peak) { if(peak == 0 || peak > MAXPEAKNOS) numpks = DEFAULTPEAKNOS; else numpks = peak; peakarray = new Peak[(numpks+1)]; } void Ptrack::SetHopsize(int siz){ int i, winsize = siz*2, powtwo, tmp; float *tmpb; if (winsize < MINWINSIZ || winsize > MAXWINSIZ) winsize = DEFAULTWINSIZ; tmp = winsize; powtwo = -1; while (tmp){ tmp >>= 1; powtwo++; } if (winsize != (1 << powtwo)) winsize = (1 << powtwo); hop = siz; sig = new float[hop]; prev = new float[(hop*2 + 4*FLTLEN)]; sinus = new float[(hop*2)]; spectmp = new float[(winsize*4 + 4*FLTLEN)]; spec = new float[(winsize*4)]; for (i = 0, tmpb = sig; i < hop; i++) tmpb[i] = 0; for (i = 0, tmpb = prev; i < winsize + 4 * FLTLEN; i++) tmpb[i] = 0; for (i = 0, tmpb = sinus; i < hop; i++){ tmpb[2*i] = cos((3.14159*i)/(winsize)); tmpb[2*i+1] = -sin((3.14159*i)/(winsize)); } } Ptrack::Ptrack(){ cnt = 0; histcnt = 0; pitch = new SndObj(0, 1, m_sr); amp = new SndObj(0, 1, m_sr); for (int i = 0; i < NPREV; i++) dbs[i] = 0; amplo = MINAMPS; amphi = MAXAMPS; npartial = 7; } Ptrack::Ptrack(SndObj *in, int siz, int peak, float scale, int vecsize, float sr): SndObj(in, vecsize, sr) { SetHopsize(siz); SetPeaks(peak); pitch = new SndObj(0, 1, m_sr); amp = new SndObj(0, 1, m_sr); m_scale = scale; cnt = 0; histcnt = 0; for (int i = 0; i < NPREV; i++) dbs[i] = 0; amplo = MINAMPS; amphi = MAXAMPS; npartial = 7; } Ptrack::~Ptrack(){ delete[] sig; delete[] prev; delete[] spec; delete[] spectmp; delete[] sinus; delete[] peakarray; delete pitch; delete amp; } short Ptrack::DoProcess(){ for(int i=0;iOutput(i)*m_scale; } return 1; } SndObj-2.6.7/src/Ptrack.h000644 000766 000024 00000004010 12062673766 015555 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 // #ifndef _PTRACK_H #define _PTRACK_H #include "SndObj.h" #define NPREV 20 struct Peak { float pfreq; float pwidth; float ppow; float ploudness; }; struct Histopeak { float hpitch; float hvalue; float hloud; int hindex; int hused; }; class Ptrack : public SndObj { protected: float *sig, *prev, *sinus, *spec, *spectmp; Peak *peakarray; int numpks; int cnt; int histcnt; int hop; float sr; float cps; float dbs[NPREV]; float amplo; float amphi; float npartial; float dbfs; int vecsize; float m_scale; void pitchtrack(); public: SndObj *pitch, *amp; Ptrack(); Ptrack(SndObj *in, int siz=1024, int peak=10, float scale=1.0, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Ptrack(); void SetHopsize(int siz); void SetPeaks(int peaks); void SetScale(float scale) { m_scale = scale; } short DoProcess(); }; #endif SndObj-2.6.7/src/PVA.cpp000644 000766 000024 00000007331 12062673766 015323 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 float[m_halfsize]; memset(m_phases, 0, sizeof(float)*m_halfsize); m_factor = m_sr/(m_hopsize*TWOPI); } PVA::PVA(Table* window, SndObj* input, float scale, int fftsize, int hopsize, float sr) :FFT(window, input, scale, fftsize, hopsize, sr) { m_rotcount = 0; m_phases = new float[m_halfsize]; memset(m_phases, 0, sizeof(float)*m_halfsize); m_factor = m_sr/(m_hopsize*TWOPI); } PVA::~PVA(){ delete[] m_phases; } int PVA::Set(char* mess, float 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(float* 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] = (float) diff*m_factor + i2*m_fund; } } short PVA::DoProcess(){ if(!m_error){ if(m_input){ if(m_enable){ int i; float 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]= (float) 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; } SndObj-2.6.7/src/PVA.h000644 000766 000024 00000003411 12062673766 014763 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 float m_factor; // conversion factor float* m_phases; private: void inline pvanalysis(float* signal); public: PVA(); PVA(Table* window, SndObj* input, float scale=1.f, int fftsize=DEF_FFTSIZE, int hopsize=DEF_VECSIZE, float sr=DEF_SR); ~PVA(); float Outphases(int pos){ return m_phases[pos]; } // reads phase output. int Set(char* mess, float value); void SetFFTSize(int fftsize); void SetHopSize(int hopsize); short DoProcess(); }; #endif SndObj-2.6.7/src/PVBlur.cpp000644 000766 000024 00000006357 12062673766 016056 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 // // PVBlur.cpp: implementation of the PVBlur class. // ////////////////////////////////////////////////////////////////////// #include "PVBlur.h" PVBlur::PVBlur(){ m_hopsize = DEF_VECSIZE; m_time = 0.1f; m_framenos = (int)(m_time*m_sr/m_hopsize); m_frame = new float*[m_framenos]; for(int n=0; n < m_framenos; n++){ m_frame[n] = new float[m_vecsize]; m_frame[n][0] = m_frame[n][1] = 0.f; for(int i = 2; i < m_vecsize; i += 2){ m_frame[n][i] = 0.f; m_frame[n][i+1] = (i/2)*m_sr/m_vecsize; } } AddMsg("blur time", 31); m_cur = 0; } PVBlur::PVBlur(SndObj* input, float blurtime, int hopsize, int vecsize, float sr) : SpecMult(input, 0, vecsize, sr){ m_hopsize = hopsize; m_time = blurtime; m_framenos = (int) (int)(m_time*m_sr/m_hopsize); m_frame = new float*[m_framenos]; for(int n=0; n < m_framenos; n++){ m_frame[n] = new float[m_vecsize]; m_frame[n][0] = m_frame[n][1] = 0.f; for(int i = 2; i < m_vecsize; i += 2){ m_frame[n][i] = 0.f; m_frame[n][i+1] = (i/2)*m_sr/m_vecsize; } } AddMsg("blur time", 31); m_cur = 0; } PVBlur::~PVBlur(){ delete[] m_frame; } void PVBlur::SetBlurTime(float time){ m_time = time; delete[] m_frame; m_framenos = (int)(m_time*m_sr/m_hopsize); m_frame = new float*[m_framenos]; for(int n=0; n < m_framenos; n++){ m_frame[n] = new float[m_vecsize]; m_frame[n][0] = m_frame[n][1] = 0.f; for(int i = 2; i < m_vecsize; i += 2){ m_frame[n][i] = 0.f; m_frame[n][i+1] = (i/2)*m_sr/m_vecsize; } } m_cur = 0; } int PVBlur::Set(char* mess, float value){ switch(FindMsg(mess)){ case 31: SetBlurTime(value); return 1; default: return SpecMult::Set(mess,value); } } short PVBlur::DoProcess(){ if(!m_error){ if(m_input){ double sum = 0.0, in; for(m_vecpos=0; m_vecpos < m_vecsize; m_vecpos++){ if(m_enable) { m_frame[m_cur][m_vecpos] = m_input->Output(m_vecpos); for(int n=0; n < m_framenos; n++){ in = m_frame[n][m_vecpos]; sum += (in >= 0 ? in : -in); } m_output[m_vecpos] = sum/m_framenos; sum = 0.f; } else m_output[m_vecpos] = 0.f; } m_cur++; m_cur %= m_framenos; return 1; } else m_error = 3; return 0; } return 0; } SndObj-2.6.7/src/PVBlur.h000644 000766 000024 00000003107 12062673766 015511 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 // // PVBlur.h: interface for the PVBlur class. // ////////////////////////////////////////////////////////////////////// #ifndef _PVBlur_H #define _PVBlur_H #include "SpecMult.h" class PVBlur : public SpecMult { protected: float **m_frame; float m_time; int m_framenos; int m_hopsize; int m_cur; public: int Set(char* mess, float value); void SetBlurTime(float time); void SetHopsize(int hopsize){ m_hopsize = hopsize; SetBlurTime(m_time); } PVBlur(); PVBlur(SndObj* input, float blurtime, int hopsize=DEF_VECSIZE, int vecsize=DEF_FFTSIZE, float sr=DEF_SR); ~PVBlur(); short DoProcess(); }; #endif SndObj-2.6.7/src/PVEnvTable.cpp000644 000766 000024 00000007765 12062673766 016656 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 "PVEnvTable.h" PVEnvTable :: PVEnvTable(){ m_L = 512; m_segments = 1; m_seglen = new int[1]; m_seglen[0] = 256; m_segp = new float[2]; m_segp[0] = 0.f; m_segp[1] = 1.f; m_typec = 0.f; m_table = new float[m_L+1]; m_sr = 44100.f; m_table[0] = 0.f; m_table[1] = m_sr/2; for(int i=1; i < m_L/2; i++) m_table[(i*2)+1] = (m_sr/m_L)*i; m_table[1] = 0.f; MakeTable(); } PVEnvTable :: PVEnvTable(long L, int segments, float start, float* points, float* lengths, float type, float sr, float nyquistamp){ int i; m_L = L; m_typec = type; m_segments = segments; m_segp = new float[m_segments+1]; m_seglen = new int[m_segments]; if( (m_segp[0] = start) <=0.f && m_typec != 0.f) m_segp[0] = 0.00000001f; for(i=0; i < segments; i++){ if( (m_segp[i+1] = points[i]) <= 0.f && m_typec != 0.f) m_segp[i+1] = 0.00000001f; } float total=0; for(i=0; i < segments; i++) total += lengths[i]; for(i=0; i < segments; i++) m_seglen[i] = (int) (m_L*lengths[i]/(2*total)); m_table = new float [m_L+1]; m_sr = sr; m_table[1] = nyquistamp; for(i=1; i < m_L/2; i++) m_table[(i*2)+1] = (m_sr/m_L)*i; MakeTable(); } void PVEnvTable::SetEnvelope(int segments, float start, float* points, float* lengths, float type, float nyquistamp) { int i; m_typec = type; m_segments = segments; m_segp = new float[m_segments+1]; m_seglen = new int[m_segments]; if( (m_segp[0] = start) <=0.f && m_typec != 0.f) m_segp[0] = 0.00000001f; for(i=0; i < segments; i++){ if( (m_segp[i+1] = points[i]) <= 0.f && m_typec != 0.f) m_segp[i+1] = 0.00000001f; } float total=0; for(i=0; i < segments; i++) total += lengths[i]; for(i=0; i < segments; i++) m_seglen[i] = (int) (m_L*lengths[i]/(2*total)); m_table[1] = nyquistamp; MakeTable(); } void PVEnvTable::SetSr(float sr){ m_sr = sr; m_table[0] = 0.f; m_table[1] = m_sr/2; for(int i=1; i < m_L/2; i++) m_table[(i*2)+1] = (m_sr/m_L)*i; } PVEnvTable::~PVEnvTable(){ delete[] m_table; delete[] m_segp; delete[] m_seglen; } short PVEnvTable :: MakeTable(){ int i, j, tpos; if(m_typec == 0.f){ for(j=0,i=0,tpos=0;jGetLen() >= vecsize){ m_dynamic = false; m_spectable = filtable; } else m_dynamic = true; AddMsg("mask gain", 41); AddMsg("mask input", 42); AddMsg("mask table", 43); } PVFilter::~PVFilter(){ } int PVFilter::Connect(char* mess, void* input){ switch(FindMsg(mess)){ case 41: SetAmount(m_amnt, (SndObj*) input); return 1; case 42: SetFilterInput((SndObj*)input); return 1; case 43: SetFilterTable((Table*)input); return 1; default: return SpecInterp::Connect(mess, input); } } int PVFilter::Set(char* mess, float value){ switch(FindMsg(mess)){ case 41: SetAmount(value, m_interpobj); return 1; default: return SpecInterp::Set(mess, value); } } short PVFilter::DoProcess(){ if(!m_error){ if(m_input && (m_input2 || !m_dynamic)){ float mag, fil, freq, amnt; amnt = m_amnt + (m_interpobj ? m_interpobj->Output(0) : 0.f); amnt = amnt > 1 ? 1.f : (amnt ? amnt : 0.f); if(m_dynamic){ fil = m_input2->Output(0); } else fil = m_spectable->Lookup(0); mag = m_input->Output(0); m_output[m_vecpos] = mag*(1-amnt)+mag*fil*amnt; if(m_dynamic){ fil = m_input2->Output(1); } else fil = m_spectable->Lookup(1); mag = m_input->Output(1); m_output[m_vecpos] = mag*(1-amnt)+mag*fil*amnt; for(m_vecpos=2; m_vecpos < m_vecsize; m_vecpos+=2){ mag = m_input->Output(m_vecpos); freq = m_input->Output(m_vecpos+1); if(m_dynamic) { fil = m_input2->Output(m_vecpos); } else fil = m_spectable->Lookup(m_vecpos); m_output[m_vecpos] = mag*(1-amnt)+mag*fil*amnt; m_output[m_vecpos+1] = freq; } return 1; } else { m_error = 3; return 0; } } else return 0; } SndObj-2.6.7/src/PVFilter.h000644 000766 000024 00000003305 12062673766 016032 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 _PVFilter_H #define _PVFilter_H #include "SpecInterp.h" class PVFilter : public SpecInterp { protected: float m_amnt; public: PVFilter(); PVFilter(SndObj* input, SndObj* filspec, float amnt=1.f, SndObj* amntobj=0, int vecsize=DEF_FFTSIZE, float sr=DEF_SR); PVFilter(Table* filtertable, SndObj* input, float amnt=1.f, SndObj* amntobj=0, int vecsize=DEF_FFTSIZE, float sr=DEF_SR ); ~PVFilter(); int Connect(char* mess, void* input); int Set(char* mess, float value); void SetFilterInput(SndObj* filobj){ SetInput2(filobj);} void SetFilterTable(Table* filtab) { SetTable(filtab);} void SetAmount(float amnt, SndObj* amntobj=0){ m_amnt = amnt; m_interpobj = amntobj; } short DoProcess(); }; #endif SndObj-2.6.7/src/PVMask.cpp000644 000766 000024 00000006670 12062673766 016043 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 "PVMask.h" PVMask::PVMask(){ m_maskgain = 0.f; m_dynamic = false; AddMsg("mask gain", 41); AddMsg("mask input", 42); AddMsg("mask table", 43); } PVMask::PVMask(float maskgain, SndObj* input, SndObj* mask, SndObj* inmaskgobj, int vecsize, float sr) :SpecInterp(maskgain, input, inmaskgobj, inmaskgobj, vecsize, sr) { m_maskgain = maskgain; m_dynamic = true; AddMsg("mask gain", 41); AddMsg("mask input", 42); AddMsg("mask table", 43); } PVMask::PVMask(float maskgain, Table* masktable, SndObj* input, SndObj* inmaskgobj, int vecsize, float sr) :SpecInterp(maskgain, input, 0, inmaskgobj, vecsize, sr) { m_maskgain = maskgain; if(masktable->GetLen() >= vecsize){ m_dynamic = false; m_spectable = masktable; } else m_dynamic = true; AddMsg("mask gain", 41); AddMsg("mask input", 42); AddMsg("mask table", 43); } PVMask::~PVMask(){ } int PVMask::Connect(char* mess, void* input){ switch(FindMsg(mess)){ case 41: SetMaskGain(m_maskgain, (SndObj*) input); return 1; case 42: SetMaskInput((SndObj*)input); return 1; case 43: SetMaskTable((Table*)input); return 1; default: return SpecInterp::Connect(mess, input); } } int PVMask::Set(char* mess, float value){ switch(FindMsg(mess)){ case 41: SetMaskGain(value, m_interpobj); return 1; default: return SpecInterp::Set(mess, value); } } short PVMask::DoProcess(){ if(!m_error){ if(m_input && (m_input2 || !m_dynamic)){ float mag, magmask, freq, maskgain; maskgain = m_maskgain + (m_interpobj ? m_interpobj->Output(0) : 0.f); mag = m_input->Output(0); if(m_dynamic) magmask = m_input2->Output(0); else magmask = m_spectable->Lookup(0); m_output[m_vecpos] = (mag > magmask ? mag : mag*maskgain); if(m_dynamic) magmask = m_input2->Output(1); else magmask = m_spectable->Lookup(1); mag = m_input->Output(1); m_output[m_vecpos] = (mag > magmask ? mag : mag*maskgain); for(m_vecpos=2; m_vecpos < m_vecsize; m_vecpos+=2){ mag = m_input->Output(m_vecpos); freq = m_input->Output(m_vecpos+1); if(m_dynamic) magmask = m_input2->Output(m_vecpos); else magmask = m_spectable->Lookup(m_vecpos); m_output[m_vecpos] = (mag > magmask ? mag : mag*maskgain); m_output[m_vecpos+1] = freq; } return 1; } else { m_error = 3; return 0; } } else return 0; } SndObj-2.6.7/src/PVMask.h000644 000766 000024 00000003265 12062673766 015505 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 _PVMask_H #define _PVMask_H #include "SpecInterp.h" class PVMask : public SpecInterp { protected: float m_maskgain; public: PVMask(); PVMask(float maskgain, SndObj* input, SndObj* mask, SndObj* inmaskgobj=0, int vecsize=DEF_FFTSIZE, float sr=DEF_SR); PVMask(float maskgain, Table* masktable, SndObj* input, SndObj* inmaskgobj=0, int vecsize=DEF_FFTSIZE, float sr=DEF_SR ); ~PVMask(); int Connect(char* mess, void* input); int Set(char* mess, float value); void SetMaskInput(SndObj* mask){ SetInput2(mask);} void SetMaskTable(Table *mask) { SetTable(mask);} void SetMaskGain(float maskgain, SndObj* inmaskg=0){ m_maskgain = maskgain; m_interpobj = inmaskg; } short DoProcess(); }; #endif SndObj-2.6.7/src/PVMix.cpp000644 000766 000024 00000004262 12062673766 015700 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 // // PVMix.cpp: implementation of the PVMix class. // ////////////////////////////////////////////////////////////////////// #include "PVMix.h" ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// PVMix::PVMix() { } PVMix::PVMix(SndObj* input, SndObj* input2, int vecsize,float sr): SpecMult(input, input2, vecsize, sr){ } PVMix::~PVMix() { } short PVMix::DoProcess(){ if(!m_error){ if(m_input && m_input2){ if(m_enable){ float amp1, amp2; amp1 = m_input->Output(0); amp2 = m_input2->Output(0); m_output[0] = amp1 > amp2 ? amp2 : amp1; amp1 = m_input->Output(1); amp2 = m_input2->Output(1); m_output[1] = amp1 > amp2 ? amp2 : amp1; for(m_vecpos=2;m_vecpos < m_vecsize; m_vecpos+=2){ amp1 = m_input->Output(m_vecpos); amp2 = m_input2->Output(m_vecpos); if(amp2>amp1){ m_output[m_vecpos] = amp2; m_output[m_vecpos+1] = m_input2->Output(m_vecpos+1); } else { m_output[m_vecpos] = amp1; m_output[m_vecpos+1] = m_input->Output(m_vecpos+1); } } } return 1; } else { m_error = 3; return 0; } } else return 0; } SndObj-2.6.7/src/PVMix.h000644 000766 000024 00000002500 12062673766 015336 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 // // PVMix.h: interface for the PVMix class. // ////////////////////////////////////////////////////////////////////// #ifndef _PVMix_H #define _PVMix_H #include "SpecMult.h" class PVMix : public SpecMult { protected: public: PVMix(); PVMix(SndObj* input, SndObj* input2=0, int vecsize=DEF_FFTSIZE, float sr=DEF_SR); ~PVMix(); short DoProcess(); }; #endif SndObj-2.6.7/src/PVMorph.cpp000644 000766 000024 00000006640 12062673766 016232 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 "PVMorph.h" PVMorph::PVMorph(){ m_offset2 = 0.f; m_interpobj2 = 0; AddMsg("frequency morph", 41); AddMsg("amplitude morph", 41); } PVMorph::PVMorph(float morphfr, float morpha, SndObj* input1, SndObj* input2, SndObj* inmorphfr, SndObj* inmorpha, int vecsize, float sr) :SpecInterp(morphfr, input1, input2, inmorphfr, vecsize, sr) { m_offset2 = morpha; m_interpobj2 = inmorpha; AddMsg("frequency morph", 41); AddMsg("amplitude morph", 41); } PVMorph::~PVMorph(){ } int PVMorph::Connect(char* mess, void* input){ switch(FindMsg(mess)){ case 41: SetFreqMorph(m_offset, (SndObj*) input); return 1; case 42: SetAmpMorph(m_offset2, (SndObj*) input); return 1; default: return SpecInterp::Connect(mess, input); } } int PVMorph::Set(char* mess, float value){ switch(FindMsg(mess)){ case 41: SetFreqMorph(value, m_interpobj); return 1; case 42: SetAmpMorph(value, m_interpobj2); return 1; default: return SpecInterp::Set(mess, value); } } short PVMorph::DoProcess(){ if(!m_error){ if(m_input && m_input2){ float morphfr,fr1, fr2; double ratio; float morpha, amp1, amp2; morphfr = m_offset + (m_interpobj ? m_interpobj->Output(0) : 0); morpha = m_offset2 + (m_interpobj2 ? m_interpobj2->Output(0) : 0); morpha = morpha > 1 ? 1 : (morpha < 0 ? 0 : morpha); morphfr = morphfr > 1 ? 1 : (morphfr < 0 ? 0 : morphfr); for(m_vecpos = 2; m_vecpos < m_vecsize; m_vecpos+=2) { if(m_enable) { // interpolate amps amp1 =m_input->Output(m_vecpos); amp2 =m_input2->Output(m_vecpos); m_output[m_vecpos] = amp1 + (amp2-amp1)*morpha; // interpolate frs fr1 = m_input->Output(m_vecpos+1); fr2 = m_input2->Output(m_vecpos+1); ratio = fr1 ? fr2/fr1 : HUGE_VAL; ratio = ratio > 0 ? ratio : -ratio; m_output[m_vecpos+1] = fr1 * pow((double)ratio, (double)morphfr); // fudge against NaN-type result if(!m_output[m_vecpos+1]) m_output[m_vecpos+1] = (m_vecpos/2)*m_sr/m_vecsize; } else m_output[0] = m_output[1] = m_output[m_vecpos+1] = m_output[m_vecpos] = 0.f; } amp1 =m_input->Output(0); amp2 =m_input2->Output(0); m_output[m_vecpos] = amp1 + (amp2-amp1)*morpha; amp1 =m_input->Output(1); amp2 =m_input2->Output(1); m_output[m_vecpos] = amp1 + (amp2-amp1)*morpha; return 1; } else { m_error = 3; return 0; } } else return 0; } SndObj-2.6.7/src/PVMorph.h000644 000766 000024 00000003176 12062673766 015700 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 _PVMorph_H #define _PVMorph_H #include "SpecInterp.h" class PVMorph : public SpecInterp { protected: float m_offset2; SndObj* m_interpobj2; public: PVMorph(); PVMorph(float morphfr, float morpha, SndObj* input1, SndObj* input2, SndObj* inmorphfr=0, SndObj* inmorpha=0, int vecsize=DEF_FFTSIZE, float sr=DEF_SR); ~PVMorph(); int Connect(char* mess, void* input); int Set(char* mess, float value); void SetFreqMorph(float morphfr, SndObj* inmorphfr=0){ m_offset = morphfr; m_interpobj = inmorphfr; } void SetAmpMorph(float morpha, SndObj* inmorpha=0){ m_offset2 = morpha; m_interpobj2 = inmorpha; } short DoProcess(); }; #endif SndObj-2.6.7/src/PVRead.cpp000644 000766 000024 00000020313 12062673766 016011 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 "PVRead.h" PVRead::PVRead(){ m_ioinput = 0; m_plan = 0; m_fftsize = 0; m_winsize = 0; m_channels = 0; m_hopsize = 0; m_maxbuffs =0; m_hopsize = 0; delete[] m_counter; delete[] m_ffttmp; m_count = 0; m_rotcount = 0; m_first = 0; m_last = 0; delete[] m_sigframe; m_outobj = 0; m_win = 0; AddMsg("timescale", 41); } PVRead::PVRead(char* name, float timescale, int vecsize, float sr): PVS(0, 0, 0, vecsize, sr) { m_ioinput = new SndPVOCEX(name, READ); if(m_ioinput->IsPvocex()){ m_fftsize = m_ioinput->GetFFTSize(); m_winsize = m_ioinput->GetWindowLength(); m_channels = m_ioinput->GetChannels(); m_hopsize = m_ioinput->GetHopSize(); m_maxbuffs = 4*(m_winsize/m_hopsize); m_hopsize = (int)(m_hopsize/timescale); m_count = 0; m_ffttmp = new float[m_fftsize]; m_counter = new int[m_channels*m_maxbuffs]; m_halfsize = m_fftsize/2; m_fund = m_sr/m_fftsize; m_first = new int[m_channels]; m_last = new int[m_channels]; m_phases = new float[m_halfsize]; memset(m_phases, 0, sizeof(float)*m_halfsize); m_sigframe = new float*[m_channels*m_maxbuffs]; m_outobj = new SndObj*[m_channels]; m_win = new float[m_winsize]; m_plan = rfftw_create_plan(m_fftsize, FFTW_COMPLEX_TO_REAL, FFTW_ESTIMATE); int i; for(i =0; i < m_channels*m_maxbuffs; i++){ m_sigframe[i] = new float[m_fftsize]; memset(m_sigframe[i], 0, sizeof(float)*m_fftsize); } for(i=0; i < m_channels; i++){ m_first[i] = m_last[i] = i*m_maxbuffs; m_outobj[i] = new SndObj(0, vecsize, sr); } m_rotcount = 0; m_factor = (m_hopsize*TWOPI)/m_sr; float alpha = (m_ioinput->GetWindowType() == HAMMING ? 0.54f : 0.5f); m_table = new HammingTable(m_winsize, alpha); float x = - (m_winsize-1)/2.; for(i=0; iLookup(i)* ((m_winsize > m_fftsize) && ( x != 0.) ? (m_hopsize*sin(PI*x/m_hopsize)/(PI*x)): 1.) ; } else { m_error = 41; delete m_ioinput; m_ioinput = 0; } AddMsg("timescale", 41); } PVRead::~PVRead(){ if(m_ioinput) { delete m_ioinput; delete[] m_first; delete[] m_last; delete[] m_outobj; delete[] m_table; delete[] m_win; } } int PVRead::Set(char* mess, float value){ switch (FindMsg(mess)){ case 41: SetTimescale(value); return 1; default: return SndObj::Set(mess,value); } } void PVRead:: SetTimescale(float timescale){ if(m_ioinput){ m_hopsize = (int)(m_ioinput->GetHopSize()/timescale); m_factor = (m_hopsize*TWOPI)/m_sr; if(m_winsize > m_fftsize){ float* tmp = m_win; float x = - (m_winsize-1)/2.; float* newin = new float[m_winsize]; for(int i=0; iLookup(i)* ((m_winsize > m_fftsize) && ( x != 0.) ? (m_hopsize*sin(PI*x/m_hopsize)/(PI*x)): 1.); m_win = newin; delete[] tmp; } } } void PVRead:: SetInput(char* name){ if(m_ioinput){ delete[] m_table; delete[] m_win; delete[] m_ffttmp; delete[] m_first; delete[] m_last; delete[] m_counter; delete[] m_outobj; delete m_ioinput; rfftw_destroy_plan(m_plan); } m_ioinput = new SndPVOCEX(name, READ); if(m_ioinput->IsPvocex()){ m_enable = 1; m_fftsize = m_ioinput->GetFFTSize(); m_winsize = m_ioinput->GetWindowLength(); m_channels = m_ioinput->GetChannels(); m_hopsize = m_ioinput->GetHopSize(); m_maxbuffs = 4*(m_winsize/m_hopsize); m_hopsize = (int)(m_hopsize); m_count = 0; m_ffttmp = new float[m_fftsize]; m_counter = new int[m_channels*m_maxbuffs]; m_halfsize = m_fftsize/2; m_fund = m_sr/m_fftsize; m_phases = new float[m_halfsize]; memset(m_phases, 0, sizeof(float)*m_halfsize); m_first = new int[m_channels]; m_last = new int[m_channels]; m_sigframe = new float*[m_channels*m_maxbuffs]; m_outobj = new SndObj*[m_channels]; m_win = new float[m_winsize]; m_plan = rfftw_create_plan(m_fftsize, FFTW_COMPLEX_TO_REAL, FFTW_ESTIMATE); int i; for(i =0; i < m_channels*m_maxbuffs; i++){ m_sigframe[i] = new float[m_winsize]; memset(m_sigframe[i], 0, sizeof(float)*m_fftsize); } for(i=0; i < m_channels; i++){ m_first[i] = m_last[i] = i*m_maxbuffs; m_outobj[i] = new SndObj(0, m_vecsize, m_sr); } m_rotcount = 0; m_factor = (m_hopsize*TWOPI)/m_sr; float alpha = (m_ioinput->GetWindowType() == HAMMING ? 0.54f : 0.5f); m_table = new HammingTable(m_winsize, alpha); float x = - (m_winsize-1)/2.; for(i=0; iLookup(i)* ((m_winsize > m_fftsize) && ( x != 0.) ? (m_hopsize*sin(PI*x/m_hopsize)/(PI*x)): 1.) ; } else{ m_error = 41; delete m_ioinput; m_ioinput = 0; } } void PVRead::synthesis(float* signal){ double pha; int i2; m_ffttmp[0] = signal[0]; m_ffttmp[m_halfsize] = signal[1]; for(int i=0;iRead(); for(i=0; i < m_fftsize; i++) m_sigframe[m_last[chan]][i] = m_ioinput->Output(i*(chan+1)); // re-synthesise synthesis(m_sigframe[m_last[chan]]); // set the frame counter to 0; m_counter[m_last[chan]] = 0; } // overlap-add, using the time index pointer // to unrotate the frame into the output // multiplying it by the synthesis window // and unfolding it for(i=m_first[chan]; ; i++){ if(i == m_maxbuffs*(chan+1)) i = m_maxbuffs*chan; out += m_sigframe[i][m_rotcount]*m_win[m_counter[i]]; m_counter[i]++; if(i == m_last[chan]) break; } // frame counter counts up to the // window size. If the window size is // larger than the fftsize, then the // frame will be unfolded (basically windowed // by a sync window and written) if(m_counter[m_first[chan]] == m_winsize){ m_first[chan]++; if(m_first[chan] == m_maxbuffs*(chan+1)) m_first[chan] = m_maxbuffs*chan; } *(m_outobj[chan]) << out; outsum += out; out = 0.f; } m_count++; m_rotcount++; if(m_rotcount==m_fftsize) m_rotcount=0; m_output[m_vecpos] = outsum; outsum = 0.f; } else { for(chan=0; chan < m_channels; chan++) *(m_outobj[chan]) << 0.f; m_output[m_vecpos] = 0.f; } } return 1; } m_error =1; } return 0; } SndObj-2.6.7/src/PVRead.h000644 000766 000024 00000003176 12062673766 015466 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 PVRead_h_ #define PVRead_h_ #include "PVS.h" #include "HammingTable.h" #include "SndPVOCEX.h" class PVRead : public PVS { protected: SndPVOCEX* m_ioinput; int* m_last; int* m_first; int m_count; int m_channels; int m_winsize; int m_maxbuffs; float* m_win; SndObj** m_outobj; private: void inline synthesis(float* signal); public: SndObj* Outchannel(int channel){ return m_outobj[channel%m_channels];} int Set(char* mess, float value); void SetInput(char* name); void SetTimescale(float timescale); PVRead(); PVRead(char* name, float timescale=1.0,int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~PVRead(); short DoProcess(); }; #endif SndObj-2.6.7/src/PVS.cpp000644 000766 000024 00000007225 12062673766 015347 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 float[m_halfsize]; memset(m_phases, 0, sizeof(float)*m_halfsize); m_factor = (m_hopsize*TWOPI)/m_sr; m_first = true; } PVS::PVS(Table* window, SndObj* input, int fftsize, int hopsize, float sr) :IFFT(window, input,fftsize,hopsize,sr) { m_rotcount = m_vecsize; if(m_halfsize){ m_phases = new float[m_halfsize]; memset(m_phases, 0, sizeof(float)*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, float 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(float* 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; float 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] = (float) 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; } SndObj-2.6.7/src/PVS.h000644 000766 000024 00000003272 12062673766 015012 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 float m_factor; // conversion factor float* m_phases; // old phases private: void inline pvsynthesis(float* signal); bool m_first; public: PVS(); PVS(Table* window, SndObj* input, int fftsize=DEF_FFTSIZE, int hopsize=DEF_VECSIZE, float sr=DEF_SR); ~PVS(); int Set(char* mess, float value); void SetFFTSize(int fftsize); void SetHopSize(int hopsize); short DoProcess(); }; #endif SndObj-2.6.7/src/PVTable.cpp000644 000766 000024 00000006117 12062673766 016173 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 "PVTable.h" PVTable::PVTable(){ m_L = 1024; m_file = 0; m_sr = 44100.f; m_start = m_end = 0; m_in = 0; m_analysis = 0; m_table = new float[m_L+1]; m_amps = new double[m_L]; m_freqs = new double[m_L]; MakeTable(); } PVTable::PVTable(int L, SndFIO* soundfile, Table* window, float start, float end){ m_L = L; m_file = soundfile; m_vecsize = m_file->GetVectorSize(); m_sr = m_file->GetSr(); m_end = (unsigned long)(end*m_sr/m_vecsize); m_start = start; m_file->SetPos(m_start); m_in = new SndIn(m_file, 1, m_vecsize, m_sr); m_analysis = new PVA(window, m_in, 1.f, m_L, m_vecsize, m_sr); m_framecount = 0; m_amps = new double[m_L/2]; m_freqs = new double[m_L/2]; m_table = new float[m_L+1]; MakeTable(); } PVTable::~PVTable(){ delete m_in; delete m_analysis; delete[] m_table; delete[] m_amps; delete[] m_freqs; } void PVTable::SetTable(SndFIO* soundfile, Table* window, float start, float end){ m_file = soundfile; m_vecsize = m_file->GetVectorSize(); m_sr = m_file->GetSr(); m_end = (unsigned long) (end*m_sr/m_vecsize); m_start = start; m_file->SetPos(m_start); m_in = new SndIn(m_file, 1, m_vecsize, m_sr); m_analysis = new PVA(window, m_in, 1.f, m_L, m_vecsize, m_sr); m_framecount = 0; MakeTable(); } short PVTable::MakeTable() { int i,j; if(m_file) { float freq, amp; for(i=0; i < (int) m_end && !m_file->Eof(); i++){ // analysis m_file->Read(); m_in->DoProcess(); m_analysis->DoProcess(); m_framecount++; for(i=0, j=0;iOutput(i); freq = m_analysis->Output(i+1); m_amps[j] += amp; m_freqs[j] += (freq >= 0 ? freq : -freq); } } for(i=0, j=0;iOutput(0) : 0.f); m_output[0] = m_input->Output(0); m_output[1] = m_input->Output(1); for(m_vecpos=2,chan=1;m_vecpos < m_vecsize; m_vecpos+=2,chan++){ newchan = Ftoi(chan*pitch)*2; if(newchan < m_vecsize-1 && newchan > 0){ if(m_keepform) m_output[newchan] = m_input->Output(newchan); else m_output[newchan] = m_input->Output(m_vecpos); m_output[newchan+1] = m_input->Output(m_vecpos+1)*pitch; } } } return 1; } else { m_error = 3; return 0; } } else return 0; } SndObj-2.6.7/src/PVTransp.h000644 000766 000024 00000003232 12062673766 016053 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 // // PVTransp.h: interface for the PVTransp class. // ////////////////////////////////////////////////////////////////////// #ifndef _PVTRANSP_H #define _PVTRANSP_H enum { NORMAL_TRANSP=0, KEEP_FORMANT}; #include "SpecMult.h" class PVTransp : public SpecMult { protected: float m_base; float m_pitch; float m_keepform; public: int Set(char* mess, float value); int Connect(char* mess, void* input); void SetPitch(float pitch, SndObj* inpitch=0); void SetMode(int mode){ m_keepform= mode ? true : false;} PVTransp(); PVTransp(SndObj* input, float pitch, int mode=NORMAL_TRANSP, SndObj* inpitch=0, int vecsize=DEF_FFTSIZE, float sr=DEF_SR); ~PVTransp(); short DoProcess(); }; #endif SndObj-2.6.7/src/Rand.cpp000644 000766 000024 00000004655 12062673766 015567 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Rand.cpp : implementation of the Rand class // // // // // // // //************************************************************// #include "Rand.h" #include Rand::Rand(){ m_amp = 1.f; m_input = 0; srand((unsigned)time(0)); AddMsg("amplitude",21); } Rand::Rand(float amp, SndObj* InAmpObj, int vecsize, float sr): SndObj(InAmpObj, vecsize, sr){ m_amp = amp; m_sr = sr; srand((unsigned)time(0)); AddMsg("amplitude",21); } Rand::~Rand(){} ///////////// OPERATIONS //////////////////////////////////////// int Rand::Set(char* mess, float value){ switch (FindMsg(mess)){ case 21: SetAmp(value); return 1; default: return SndObj::Set(mess,value); } } int Rand::Connect(char* mess, void* input){ switch (FindMsg(mess)){ case 21: m_input = (SndObj *) input; return 1; default: return SndObj::Connect(mess,input); } } short Rand :: DoProcess(){ if(!m_error){ float amp; for(m_vecpos=0; m_vecposOutput(m_vecsize)); m_output[m_vecpos] = (((float)rand() - MAXR)/MAXR)*amp; } else { m_output[m_vecpos] = 0.f; } } return 1; } else return 0; } SndObj-2.6.7/src/Rand.h000644 000766 000024 00000003534 12062673766 015227 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Rand.h: interface of the Rand class // // // // // // // //************************************************************// #ifndef _RAND_H #define _RAND_H #include "SndObj.h" #include const float MAXR = float(RAND_MAX/2); class Rand : public SndObj { protected: float m_amp; public: Rand(); Rand(float amp, SndObj* InAmpObj = 0, int vecsize=DEF_VECSIZE, float sr = DEF_SR); ~Rand(); void SetAmp(float amp, SndObj* InAmpObj = 0){ m_amp = amp; m_input = InAmpObj; } int Set(char* mess, float value); int Connect(char* mess, void* input); short DoProcess(); }; #endif SndObj-2.6.7/src/Randh.cpp000644 000766 000024 00000006015 12062673766 015727 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Randh.cpp : implementation of the Randh class // // // // // // // //************************************************************// #include "Randh.h" Randh::Randh(){ m_inputfr = 0; m_period = 1; m_count = 1; AddMsg("frequency", 31); } Randh::Randh(float fr,float amp, SndObj* InFrObj, SndObj* InAmpObj, int vecsize, float sr) : Rand(amp, InAmpObj, vecsize, sr) { m_fr = fr; m_period = (long) (m_fr > 0.1 ? m_sr/m_fr : m_sr/.1); m_count = m_period; m_inputfr = InFrObj; AddMsg("frequency", 31); } Randh ::~Randh(){ } /////////////// OPERATIONS ////////////////////////////////////// void Randh::SetSr(float sr){ m_sr = sr; m_period = (long) (m_fr > 0.1 ? m_sr/m_fr : sr/.1); m_count = m_period; } int Randh::Set(char* mess, float value){ switch (FindMsg(mess)){ case 31: SetFreq(value); return 1; case 1: SetSr(value); return 1; default: return Rand::Set(mess,value); } } int Randh::Connect(char* mess, void* input){ switch (FindMsg(mess)){ case 31: m_inputfr = (SndObj *) input; return 1; default: return Rand::Connect(mess,input); } } short Randh::DoProcess(){ if(!m_error){ long oldper; float freq, amp; for(m_vecpos=0; m_vecposOutput(m_vecpos)); amp = m_amp + (m_input== 0 ? 0 : m_input->Output(m_vecpos)); m_period = (long) ( freq > .1 ? m_sr/freq : m_sr/.1 ); if((m_count-1) > 0 ) { m_count = (m_count--)+(m_period - oldper); m_output[m_vecpos] = Output(m_vecpos-1); } else{ m_output[m_vecpos] = amp*((rand()-MAXR)/MAXR); m_count = m_period; } } else m_output[m_vecsize] = 0.f ; } return 1; } else return 0; } SndObj-2.6.7/src/Randh.h000644 000766 000024 00000003750 12062673766 015377 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Randh.h: interface of the Randh class // // // // // // // //************************************************************// #ifndef _RANDH_H #define _RANDH_H #include "Rand.h" class Randh : public Rand { protected: float m_fr; long m_period; long m_count; SndObj* m_inputfr; public: Randh(); Randh(float fr,float amp,SndObj* InFrObj=0, SndObj* InAmpObj=0, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Randh(); int Connect(char* mess, void* input); void SetSr(float sr); void SetFreq(float fr, SndObj* InFrObj = 0){ m_fr = fr; m_period = (long) (m_fr > .1 ? m_sr/m_fr : m_sr/.1); m_count = m_period; m_inputfr = InFrObj; } int Set(char* mess, float value); short DoProcess(); }; #endif SndObj-2.6.7/src/Randi.cpp000644 000766 000024 00000004642 12062673766 015734 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Randi.cpp : implementation of the Randi class // // // // // // // //************************************************************// #include "Randi.h" Randi::Randi(){ m_target = m_start = 0; } Randi::Randi(float fr,float amp, SndObj* InFrObj, SndObj* InAmpObj, int vecsize, float sr) : Randh(fr, amp, InFrObj, InAmpObj, vecsize, sr) { m_target = m_start = 0; } Randi ::~Randi(){ } /////////////// OPERATIONS ////////////////////////////////////// short Randi::DoProcess(){ if(!m_error){ float freq, amp, out; for(m_vecpos=0; m_vecposOutput(m_vecpos)); amp = m_amp + (m_input== 0 ? 0 : m_input->Output(m_vecpos)); out = ((m_target - m_start)*freq*m_count)/m_sr + m_start; if((m_target-m_start) >= 0) { if(out >= m_target){ m_start = m_target; m_target = ((float)rand() - MAXR)/MAXR; m_count = 0; } } else{ if(out <= m_target){ m_start = m_target; m_target = ((float)rand() - MAXR)/MAXR; m_count = 0; } } m_count++; m_output[m_vecpos] = amp*out; } else m_output[m_vecpos] = 0.f; } return 1; } else return 0; } SndObj-2.6.7/src/Randi.h000644 000766 000024 00000003370 12062673766 015376 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Randi.: interface of the Randi class // // // // // // // //************************************************************// #ifndef _RANDI_H #define _RANDI_H #include "Randh.h" class Randi : public Randh { protected: //float m_fr; //long m_period; //long m_count; //SndObj* m_inputfr; float m_target; float m_start; public: Randi(); Randi(float fr,float amp,SndObj* InFrObj=0, SndObj* InAmpObj=0, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Randi(); short DoProcess(); }; #endif SndObj-2.6.7/src/Reson.cpp000644 000766 000024 00000005671 12062673766 015770 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Reson.cpp : implementation of the Reson class // // (2nd order band-pass filter). // // // // // //************************************************************// #include "Reson.h" /////////////// CONSTRUCTION / DESTRUCTION ///////////////////// Reson::Reson(){ m_inputfr=m_inputbw=0; } Reson::Reson(float fr, float bw, SndObj* inObj, SndObj* inputfreq, SndObj* inputbw, int vecsize, float sr) : Filter (fr, bw, inObj, vecsize, sr){ m_inputbw = inputbw; m_inputfr = inputfreq; } Reson::~Reson(){ } ///////////// OPERATIONS ///////////////////////////////////////// void Reson::SetFreq(float fr, SndObj* InFrObj){ m_fr = fr; m_inputfr = InFrObj; } void Reson::SetBW(float bw, SndObj* InBWObj){ m_bw = bw; m_inputbw = InBWObj; } int Reson::Connect(char* mess, void* input){ switch (FindMsg(mess)){ case 21: m_inputfr = (SndObj *) input; return 1; case 22: m_inputbw = (SndObj *) input; return 1; default: return SndObj::Connect(mess,input); } } short Reson::DoProcess(){ if(!m_error){ if(m_input) { double out = 0.; float fr, bw; for(m_vecpos=0;m_vecpos < m_vecsize;m_vecpos++){ if(m_enable){ fr = m_fr + (m_inputfr == 0 ? 0 : m_inputfr->Output(m_vecpos)); bw = m_bw + (m_inputbw== 0 ? 0 : m_inputbw->Output(m_vecpos)); SetParam(fr, bw); out = (m_a*(m_input->Output(m_vecpos)) + m_b1*m_delay[0] - m_b2*m_delay[1]); m_delay[1] = m_delay [0]; // recirculate the delay line m_delay[0] = out; m_output[m_vecpos] = out; } else m_output[m_vecpos] = 0.f; } return 1; } else { m_error = 11; return 0; } } else return 0; } SndObj-2.6.7/src/Reson.h000644 000766 000024 00000003455 12062673766 015433 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Reson.h: interface of the Reson class (2nd order // // band-pass filter). // // // // // //************************************************************// #ifndef _RESON_H #define _RESON_H #include "Filter.h" class Reson : public Filter { protected: SndObj* m_inputfr; SndObj* m_inputbw; public: Reson(); Reson(float fr, float bw, SndObj* inObj, SndObj* inputfreq = 0, SndObj* inputbw = 0, int vecsize=DEF_VECSIZE, float sr=DEF_SR); void SetFreq(float fr, SndObj* InFrObj=NULL); void SetBW(float bw, SndObj* InBWObj=NULL); ~Reson(); int Connect(char* mess, void* input); short DoProcess(); }; #endif SndObj-2.6.7/src/ReSyn.cpp000644 000766 000024 00000010436 12062673766 015735 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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, float pitch, float scale, float tscal, int vecsize, float sr) : SinSyn(input, maxtracks, table, scale, vecsize, sr){ m_pitch = pitch; AddMsg("pitch", 31); AddMsg("timescale", 32); } ReSyn::~ReSyn(){ } int ReSyn::Set(char* mess, float 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){ float ampnext,amp,freq, freqnext, phase,phasenext; float a2, a3, phasediff, cph; int i3, i, j, ID; int notcontin = 0; bool contin = false; int oldtracks = m_tracks; float* tab = m_ptable->GetTable(); if((m_tracks = ((SinAnal *)m_input)->GetTracks()) > m_maxtracks) m_tracks = m_maxtracks; memset(m_output, 0, sizeof(float)*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 float 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; } } SndObj-2.6.7/src/ReSyn.h000644 000766 000024 00000002662 12062673766 015404 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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: float m_pitch; float m_tscal; public: ReSyn(); ReSyn(SinAnal* input, int maxtracks, Table* table, float pitch=1.f, float scale=1.f, float tscal=1.f, int vecsize=DEF_VECSIZE, float sr=DEF_SR); void SetPitch(float pitch){ m_pitch = pitch; } void SetTimeScale(float scale) { m_tscal = scale; } int Set(char* mess, float value); ~ReSyn(); short DoProcess(); }; #endif SndObj-2.6.7/src/rfftw/000755 000766 000024 00000000000 12062711470 015276 5ustar00victorstaff000000 000000 SndObj-2.6.7/src/Ring.cpp000644 000766 000024 00000004405 12062673766 015573 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Ring.cpp: implementation of the Ring class // // (ring modulator) // // // // // //************************************************************// #include "Ring.h" //////////////// CONSTRUCTION / DESTRUCTION //////////////////// Ring::Ring(){ m_input2 = 0; AddMsg("input 2", 21); } Ring::Ring(SndObj* InObj1, SndObj* InObj2, int vecsize, float sr): SndObj(InObj1, vecsize, sr) { m_input2 = InObj2; AddMsg("input 2", 21); } Ring::~Ring(){ } ////////////////// OPERATIONS /////////////////////////////// int Ring::Connect(char* mess, void* input){ switch (FindMsg(mess)){ case 21: m_input2 = (SndObj *) input; return 1; default: return SndObj::Connect(mess,input); } } short Ring::DoProcess(){ if(!m_error){ if(m_input2 && m_input){ for(m_vecpos = 0; m_vecpos < m_vecsize; m_vecpos++){ if(m_enable){ m_output[m_vecpos] = (m_input->Output(m_vecpos))*(m_input2->Output(m_vecpos)); } else { m_output[m_vecpos] = 0.f ; } } return 1; } else { m_error = 3; return 0; } } else return 0; } SndObj-2.6.7/src/Ring.h000644 000766 000024 00000003451 12062673766 015240 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Ring.h: interface of the ring class // // // // // // // //************************************************************// #ifndef _RING_H #define _RING_H #include "SndObj.h" class Ring : public SndObj{ protected: SndObj* m_input2; public: Ring(); Ring(SndObj* InObj1, SndObj* InObj2, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Ring(); void SetInput1(SndObj* InObj){m_input=InObj; } void SetInput2(SndObj* InObj){m_input2=InObj;} short DoProcess(); // ring modulator int Connect(char* mess, void* input); }; #endif SndObj-2.6.7/src/SinAnal.cpp000644 000766 000024 00000032505 12062673766 016223 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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_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_trndx = 0; m_binmax = m_magmax = m_diffs = 0; m_maxix = 0; m_contflag = 0; m_minpoints = 0; m_maxgap = 3; AddMsg("max tracks", 21); AddMsg("threshold", 22); } SinAnal::SinAnal(SndObj* input, float threshold, int maxtracks, int minpoints, int maxgap, float sr) :SndObj(input,maxtracks*3,sr){ m_minpoints = (minpoints > 1 ? minpoints : 1) - 1; m_thresh = threshold; m_maxtracks = maxtracks; m_tracks = 0; m_prev = 1; m_cur = 0; m_accum = 0; m_maxgap = maxgap; m_numbins = ((FFT *)m_input)->GetFFTSize()/2 + 1; m_bndx = new float*[minpoints+2]; m_pkmags = new float*[minpoints+2]; m_adthresh = new float*[minpoints+2]; m_tstart = new unsigned int*[minpoints+2]; m_lastpk = new unsigned int*[minpoints+2]; m_trkid = new unsigned int*[minpoints+2]; int i; for(i=0; iGetFFTSize()/2 + 1; m_phases = new float[m_numbins]; m_freqs = new float[m_numbins]; m_mags = new float[m_numbins]; m_binmax = new float[m_numbins]; m_magmax = new float[m_numbins]; m_diffs = new float[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, float 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); } } void SinAnal::sinanalysis(){ float startupThresh, logthresh; int bestix, count=0, i =0, n = 0, j = 0; float max = 0.f,dbstep; 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] = (float) (rmax - 1. + b/2.); m_magmax[i] = (float) exp(ftmp - a*b*b/4.); } // end QuadInterp; // track-secting // reset allowcont flags for(i=0; i 0){ // check for peaks; n will be > 0 float 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 float 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 float tmp1 = dbstep*1.5f; float 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 if(count < m_maxtracks){ // if we have not exceeded available tracks. // 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; } // now current arrays are the compressed previous // arrays // create new tracks for all new peaks for(j=0; j< m_numbins && count < m_maxtracks; j++){ if(m_magmax[j] > 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; float 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 // a = m_phases[ndx]; // b = (m_bins[pos] < m_numbins-1 ? (m_phases[ndx - a) : 0); m_output[m_vecpos+2] = m_phases[ndx];;// a + frac*b; } 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; } SndObj-2.6.7/src/SinAnal.h000644 000766 000024 00000005046 12062673766 015670 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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: float** m_bndx; // bin indexes float** m_pkmags; // peak mags float** m_adthresh; // thresholds unsigned int** m_tstart; // start times unsigned int** m_lastpk; // end times unsigned int** m_trkid; // track ids float* m_phases; // phases float* m_freqs; // frequencies float* m_mags; // magnitudes float* m_bins; // track bin indexes int* m_trndx; // track IDs float* m_binmax; // peak bin indexes float* m_magmax; // peak mags float* 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 float 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 private: void inline sinanalysis(); public: SinAnal(); SinAnal(SndObj* input, float threshold, int maxtracks, int minpoints=1, int maxgap=3, float sr=DEF_SR); ~SinAnal(); int GetTrackID(int track){ return m_trndx[track]; } int GetTracks(){ return m_tracks;} int Set(char* mess, float value); int Connect(char* mess, void* input); void SetThreshold(float threshold){ m_thresh = threshold; } void SetIFGram(SndObj* input); void SetMaxTracks(int maxtracks); short DoProcess(); }; #endif SndObj-2.6.7/src/SinSyn.cpp000644 000766 000024 00000013445 12062673766 016123 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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, float scale, int vecsize, float 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 float[m_maxtracks]; m_amps = new float[m_maxtracks]; m_phases = new float[m_maxtracks]; m_trackID = new int[m_maxtracks]; memset(m_phases, 0, sizeof(float)*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, float 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 float[m_maxtracks]; m_amps = new float[m_maxtracks]; m_phases = new float[m_maxtracks]; m_trackID = new int[m_maxtracks]; } short SinSyn::DoProcess() { if(m_input){ float ampnext,amp,freq, freqnext, phase,phasenext; float a2, a3, phasediff, cph; int i3, i, j, ID, track; int notcontin = 0; bool contin = false; int oldtracks = m_tracks; float* tab = m_ptable->GetTable(); if((m_tracks = ((SinAnal *)m_input)->GetTracks()) > m_maxtracks) m_tracks = m_maxtracks; memset(m_output, 0, sizeof(float)*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 float 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; } } SndObj-2.6.7/src/SinSyn.h000644 000766 000024 00000003317 12062673766 015565 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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: float m_size; Table* m_ptable; float m_factor; float m_facsqr; float m_LoTWOPI; float m_scale; float m_incr; float m_ratio; int m_tracks; int* m_trackID; int m_maxtracks; float* m_phases; float* m_freqs; float* m_amps; public: SinSyn(); SinSyn(SinAnal* input, int maxtracks, Table* table, float scale=1.f, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~SinSyn(); void SetTable(Table* table); void SetMaxTracks(int maxtracks); void SetScale(float scale) { m_scale = scale; } int Set(char* mess, float value); int Connect(char* mess, void* input); short DoProcess(); }; #endif SndObj-2.6.7/src/SndAiff.cpp000644 000766 000024 00000033014 12062673766 016204 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // SndAiff.cpp: implementation of the SndAiff // // class // // // // // //************************************************************// #include "SndAiff.h" #include SndAiff::SndAiff(char* name, short mode, short channels, short bits, SndObj** inputlist, float spos, int vecsize, float sr): SndFIO(name, mode, channels, bits, inputlist, spos, vecsize, sr) { m_selfdesc = 1; // yes, this is a self-describing format !!!! m_isaiff = false; if(m_mode != READ){ // OUTPUT m_framesize = (short)((m_bits/8)*m_channels); m_header = PutHeader(); if(m_mode != APPEND){ fwrite((char *)&m_form, sizFormHdr, 1, m_file); fwrite((char *)&m_comm1, sizCommChunk1, 1, m_file); fwrite((char *)&m_comm2, sizCommChunk2, 1, m_file); fwrite((char *)&m_ssnd, sizSoundDataHdr, 1, m_file); m_datapos = ftell(m_file); if(spos > 0) SetPos(spos); } } // OUTPUT else { // INPUT if(m_filestat==SFERROR) { m_dataframes = 0; m_sr = 0.f; m_bits = 0; m_channels = 0; m_error = 21; return; } int IDchk; fread(&IDchk, 4, 1, m_file); if(!is_aiff_form(IDchk)){ m_filestat = SFERROR; m_sr = 0.f; m_bits = 0; m_channels = 0; m_dataframes = 0; m_error = 25; return; } fseek(m_file, 4, SEEK_CUR); fread(&IDchk, 4, 1, m_file); if(IDchk != *(int *) FORM_TYPE){ m_filestat = SFERROR; m_sr = 0.f; m_bits = 0; m_channels = 0; m_dataframes =0; m_error = 26; m_output = 0; return; } fseek(m_file, 0, SEEK_SET); if(!ReadHeader()){ m_dataframes = 0; m_error = 27; m_output = 0; return; } m_bits = m_header.size; m_channels = m_header.nchns; m_dataframes = m_header.numSampleFrames; int datasize = m_dataframes*m_channels*m_sampsize; m_isaiff = true; m_itemsleft = (datasize%m_buffsize)/m_sampsize; m_spos=spos; m_datapos = ftell(m_file); if(spos > 0) SetPos(spos); delete[] m_output; delete[] m_buffer; m_samples = m_vecsize*m_channels; if(!(m_output = new float[m_samples])){ m_error = 1; cout << ErrorMessage(); return; } m_buffsize = (m_bits/8)*m_samples; if(!(m_buffer = new char[m_buffsize])){ m_error = 11; cout << ErrorMessage(); return; } // these are the pointers used to read the buffer m_cp = (unsigned char *) m_buffer; m_sp = (short *) m_buffer; m_lp = (int *) m_buffer; m_s24p = (_24Bit *) m_buffer; } // INPUT } SndAiff::~SndAiff(){ if(m_mode != READ){ // OUPUT if(m_filestat==SFOPEN){ unsigned int datasize; #ifndef WIN unsigned int endpos, startpos; fseek(m_file, 0, SEEK_END); endpos = ftell(m_file); fseek(m_file, sizFormHdr, SEEK_SET); fseek(m_file, sizCommChunk1, SEEK_CUR); fseek(m_file, sizCommChunk2, SEEK_CUR); fseek(m_file,sizSoundDataHdr, SEEK_CUR); startpos = ftell(m_file); #endif #ifdef WIN fpos_t endpos, startpos; fseek(m_file, 0, SEEK_END); fgetpos(m_file, &endpos); fseek(m_file, sizFormHdr, SEEK_SET); fseek(m_file, sizCommChunk1, SEEK_CUR); fseek(m_file, sizCommChunk2, SEEK_CUR); fseek(m_file,sizSoundDataHdr, SEEK_CUR); fgetpos(m_file, &startpos); #endif datasize = (unsigned int) (endpos - startpos); double_to_ieee_80((double)m_sr,(unsigned char*)m_comm2.sampleRate); m_header.ckSize1 = m_form.ckHdr.ckSize = LONG_BE(datasize + sizeof(aiff_head) - sizeof(CkHdr)); m_header.numSampleFrames = m_comm2.numSampleFrames = LONG_BE(datasize / m_framesize); m_ssnd.ckHdr.ckSize = LONG_BE(datasize + (2*sizeof(int))); if(m_mode == APPEND){ fclose(m_file); if(!(m_file = fopen(m_name, "r+b"))) m_error = 23; cout << ErrorMessage(); } fseek(m_file,0, SEEK_SET); fwrite((char *)&m_form, sizFormHdr, 1, m_file); fwrite((char *)&m_comm1, sizCommChunk1, 1, m_file); fwrite((char *)&m_comm2, sizCommChunk2, 1, m_file); fwrite((char *)&m_ssnd, sizSoundDataHdr, 1, m_file); } } //OUTPUT } aiff_head SndAiff::PutHeader() { aiff_head form; form.ckID1 = m_form.ckHdr.ckID = *(int *) FORM_ID; form.ckSize1 = m_form.ckHdr.ckSize = 0; // leave for destructor form.formType = m_form.formType = *(int *) FORM_TYPE; form.ckID2 = m_comm1.ckHdr.ckID = *(int *) COMM_ID; form.ckSize2 = m_comm1.ckHdr.ckSize = LONG_BE((int)sizeof(short) + sizCommChunk2); form.nchns = m_comm1.numChannels = SHORT_BE((short)m_channels); form.numSampleFrames = m_comm2.numSampleFrames = 0; // leave for destructor form.size = m_comm2.sampleSize = SHORT_BE((short)(m_bits)); // insert 80-bit srate double_to_ieee_80((double)m_sr,(unsigned char*)m_comm2.sampleRate); form.rate = LONG_BE((int)m_sr); m_ssnd.ckHdr.ckID = *(int *) SSND_ID; m_ssnd.ckHdr.ckSize = 0; // leave for destructor m_ssnd.offset = 0; m_ssnd.blockSize = 0; return form; } short SndAiff::ReadHeader(){ fread(&m_form, sizeof(FormHdr), 1, m_file); m_header.ckID1 = m_form.ckHdr.ckID; m_header.ckSize1 = m_form.ckHdr.ckSize = LONG_BE(m_form.ckHdr.ckSize); m_header.formType = m_form.formType; char temp[4]; short find=0; do { fread(&temp[find],1,1,m_file); if (temp[find]==COMM_ID[find]) find++; else find=0; if(feof(m_file)) return 0; } while (find<4); m_header.ckID2 = m_comm1.ckHdr.ckID = LONG_BE(*(int *) temp); fread(&m_comm1.ckHdr.ckSize, 4, 1, m_file); fread(&m_comm1.numChannels, 2, 1, m_file); fread(&m_comm2, sizeof(CommChunk2), 1, m_file); m_header.ckSize2 = m_comm1.ckHdr.ckSize = LONG_BE(m_comm1.ckHdr.ckSize); m_header.nchns = m_comm1.numChannels = SHORT_BE(m_comm1.numChannels); m_header.numSampleFrames = m_comm2.numSampleFrames = LONG_BE(m_comm2.numSampleFrames); m_header.size = m_comm2.sampleSize = SHORT_BE(m_comm2.sampleSize); m_sr = (float)ieee_80_to_double((unsigned char*)m_comm2.sampleRate); find = 0; do { fread(&temp[find],1,1,m_file); if (temp[find]==SSND_ID[find]) find++; else find=0; if(feof(m_file)) return 0; } while (find<4); m_ssnd.ckHdr.ckID = *(int *)temp; fread(&m_ssnd.ckHdr.ckSize, 4, 1, m_file); fread(&m_ssnd.offset, 4, 1, m_file); fread(&m_ssnd.blockSize, 4, 1, m_file); m_ssnd.ckHdr.ckSize = LONG_BE(m_ssnd.ckHdr.ckSize); m_ssnd.offset = LONG_BE(m_ssnd.offset); m_ssnd.blockSize = LONG_BE(m_ssnd.blockSize); return 1; } short SndAiff::Read(){ if(!m_error && (m_mode == READ) && !feof(m_file)){ int i; short items; items = fread(m_buffer, 1, m_buffsize, m_file); items = (items < m_buffsize ? m_itemsleft : items/m_sampsize); switch(m_bits) { case 16: for(m_vecpos=0; m_vecpos < m_samples; m_vecpos+=m_channels) for(i=0; i < m_channels; i++) m_output[m_vecpos+i] = (m_vecpos+i < items ? (float) SHORT_BE(m_sp[m_vecpos+i]) : 0.f); break; case 8: for(m_vecpos=0; m_vecpos < m_samples; m_vecpos+=m_channels) for(i=0; i < m_channels; i++) m_output[m_vecpos+i] = (m_vecpos+i < items ? (float) m_cp[m_vecpos+i] : 0.f); break; case 32: for(m_vecpos=0; m_vecpos < m_samples; m_vecpos+=m_channels) for(i=0; i < m_channels; i++) m_output[m_vecpos+i] = (m_vecpos+i < items ? (float) LONG_BE(m_lp[m_vecpos+i]) : 0.f); break; case 24: char tmp[4]; for(m_vecpos=0; m_vecpos < m_samples; m_vecpos+=m_channels) for(i=0; i < m_channels; i++){ if(m_vecpos+i < items ){ tmp[0] = m_s24p[m_vecpos+i].s[0]; tmp[1] = m_s24p[m_vecpos+i].s[1]; tmp[2] = m_s24p[m_vecpos+i].s[2]; tmp[3] = 0; m_output[m_vecpos+i] = (float) LONG_BE(*(int *) tmp); }else m_output[m_vecpos+i] = 0.f; } } return items; } for(m_vecpos=0; m_vecpos < m_samples; m_vecpos++) m_output[m_vecpos] = 0.f; return 0; } short SndAiff::Write(){ if(!m_error && (m_mode != READ)){ int i,n; switch(m_bits){ case 16: for(m_vecpos=n=0; m_vecpos < m_samples; m_vecpos+=m_channels, n++) for(i = 0; i < m_channels; i++) if(m_IOobjs[i]) m_sp[m_vecpos+i] = SHORT_BE((short)m_IOobjs[i]->Output(n)); return (short) fwrite(m_sp, m_buffsize, 1, m_file); case 8: for(m_vecpos=n=0; m_vecpos < m_samples; m_vecpos+=m_channels, n++) for(i = 0; i < m_channels; i++) if(m_IOobjs[i]) m_cp[m_vecpos+i] = (char) m_IOobjs[i]->Output(n); return (short) fwrite(m_cp, m_buffsize, 1, m_file); case 32: for(m_vecpos=n=0; m_vecpos < m_samples; m_vecpos+=m_channels, n++) for(i = 0; i < m_channels; i++) if(m_IOobjs[i]) m_lp[m_vecpos+i] = LONG_BE((int) m_IOobjs[i]->Output(n)); return (short) fwrite(m_lp, m_buffsize, 1, m_file); case 24: for(m_vecpos=n=0; m_vecpos < m_samples; m_vecpos+=m_channels, n++) for(i = 0; i < m_channels; i++) if(m_IOobjs[i]){ *(int *)m_s24p[m_vecpos+i].s = LONG_BE((int)m_IOobjs[i]->Output(n)); } return (short) fwrite(m_s24p, m_buffsize, 1, m_file); } } return 0; } // IEEE conversions taken from Csound sources (thanks to its developers) static double myUlongToDouble(unsigned int ul) { double val; if(ul & ULPOW2TO31) val = DPOW2TO31 + (ul & (~ULPOW2TO31)); else val = ul; return val; } static unsigned int myDoubleToUlong(double val) { unsigned int ul; // cannot cast negative numbers into unsigned longs if(val < 0) { //err_printf("IEEE80:DoubleToUlong: val < 0\n"); exit(-1); } // in ultrix 4.1's cc, double -> unsigned long loses the top bit, // so we do the conversion only on the bottom 31 bits and set the // last one by hand, if val is truly that big // should maybe test for val > (double)(unsigned long)0xFFFFFFFF ? if(val < DPOW2TO31) ul = (unsigned int)val; else ul = ULPOW2TO31 | (unsigned int)(val-DPOW2TO31); return ul; } // Convert IEEE 80 bit floating point to double. // Should be portable to all C compilers. double SndAiff::ieee_80_to_double(unsigned char *p) { char sign; short exp = 0; unsigned int mant1 = 0; unsigned int mant0 = 0; double val; exp = *p++; exp <<= 8; exp |= *p++; sign = (exp & 0x8000) ? 1 : 0; exp &= 0x7FFF; mant1 = *p++; mant1 <<= 8; mant1 |= *p++; mant1 <<= 8; mant1 |= *p++; mant1 <<= 8; mant1 |= *p++; mant0 = *p++; mant0 <<= 8; mant0 |= *p++; mant0 <<= 8; mant0 |= *p++; mant0 <<= 8; mant0 |= *p++; // special test for all bits zero meaning zero // - else pow(2,-16383) bombs if(mant1 == 0 && mant0 == 0 && exp == 0 && sign == 0) return 0.0; else{ val = myUlongToDouble(mant0) * pow(2.0,-63.0); val += myUlongToDouble(mant1) * pow(2.0,-31.0); val *= pow(2.0,((double) exp) - 16383.0); return sign ? -val : val; } } // Convert double to IEEE 80 bit floating point void SndAiff::double_to_ieee_80(double val, unsigned char *p) { char sign = 0; short exp = 0; unsigned int mant1 = 0; unsigned int mant0 = 0; if(val < 0.0) { sign = 1; val = -val; } if(val != 0.0) // val identically zero -> all elements zero { exp = (short)(log(val)/log(2.0) + 16383.0); val *= pow(2.0, 31.0+16383.0-(double)exp); mant1 = myDoubleToUlong(val); val -= myUlongToDouble(mant1); val *= pow(2.0, 32.0); mant0 = myDoubleToUlong(val); } *p++ = ((sign<<7)|(exp>>8)); *p++ = (unsigned char)(0xFF & exp); *p++ = (unsigned char)(0xFF & (mant1>>24)); *p++ = (unsigned char)(0xFF & (mant1>>16)); *p++ = (unsigned char)(0xFF & (mant1>> 8)); *p++ = (unsigned char)(0xFF & (mant1)); *p++ = (unsigned char)(0xFF & (mant0>>24)); *p++ = (unsigned char)(0xFF & (mant0>>16)); *p++ = (unsigned char)(0xFF & (mant0>> 8)); *p++ = (unsigned char)(0xFF & (mant0)); } char* SndAiff::ErrorMessage() { char* message; switch(m_error){ case 21: message = "File open error."; break; case 23: message = "Error opening file to update header."; break; case 25: message = "bad AIF ID."; break; case 26: message = "this is not an AIFF file."; break; case 27: message = "could not read header."; break; default: message = SndFIO::ErrorMessage(); break; } return message; } SndObj-2.6.7/src/SndAiff.h000644 000766 000024 00000010525 12062673766 015653 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // SndAiff.h: interface of the SndAiff abstract base class. // // // // // // // //************************************************************// #ifndef _SNDAIFF_H #define _SNDAIFF_H #include "SndFIO.h" const char FORM_ID[4] = {'F','O','R','M'}; const char COMM_ID[4] = {'C','O','M','M'}; const char MARK_ID[4] = {'M','A','R','K'}; const char INST_ID[4] = {'I','N','S','T'}; const char SSND_ID[4] = {'S','S','N','D'}; const char FORM_TYPE[4] = {'A','I','F','F'}; typedef unsigned int ID; // chunk ID typedef short MrkrID; // Marker ID struct CkHdr{ ID ckID; long ckSize; }; struct FormHdr{ CkHdr ckHdr; ID formType; }; struct CommChunk1{ CkHdr ckHdr; // CommonChunk in 2 parts to avoid short numChannels; // this short rounded up to long }; struct CommChunk2{ int numSampleFrames; // ... to accomodate this long short sampleSize; char sampleRate[10]; // 80-bit extended value }; struct Loop{ short playMode; MrkrID beginLoop; MrkrID endLoop; }; struct InstrChunk{ CkHdr ckHdr; char baseNote; char detune; char lowNote; char highNote; char lowVelocity; char highVelocity; short gain; Loop sustainLoop; Loop releaseLoop; }; struct SoundDataHdr{ CkHdr ckHdr; int offset; int blockSize; }; struct aiff_head{ ID ckID1; // 'FORM' int ckSize1; ID formType; // 'AIFF' ID ckID2; // 'COMM' int ckSize2; short nchns; int numSampleFrames; short size; int rate; }; const int sizFormHdr = sizeof(FormHdr); const int sizCommChunk1 = sizeof(CkHdr) + sizeof(short); const int sizCommChunk2 = sizeof(CommChunk2); const int sizSoundDataHdr = sizeof(SoundDataHdr); const int aiffhdrsiz = sizeof(FormHdr) + sizeof(CkHdr) + sizeof(short) + sizeof(CommChunk2) + sizeof(SoundDataHdr); const double onept = 1.021975; // A440 tuning factor const double log10d20 = 0.11512925; // for db to ampfac const unsigned long ULPOW2TO31 = ((unsigned long)0x80000000L); const double DPOW2TO31 = ((double)2147483648.0); /* 2^31 */ class SndAiff : public SndFIO { protected: FormHdr m_form; CommChunk1 m_comm1; // CommonChunk split CommChunk2 m_comm2; // to avoid xtra space SoundDataHdr m_ssnd; InstrChunk m_instr; aiff_head m_header; short m_framesize; short ReadHeader(); aiff_head PutHeader(); aiff_head GetHeader(){ return m_header; } double ieee_80_to_double(unsigned char *p); void double_to_ieee_80(double val, unsigned char *p); int is_aiff_form(long firstlong){ // test a form return (firstlong == *(long *)FORM_ID); } bool m_isaiff; public: bool IsAiff(){ return m_isaiff; } SndAiff(char* name, short mode, short channels=1, short bits=16, SndObj** inputlist=0, float spos= 0.f, int vecsize = DEF_VECSIZE, float sr = DEF_SR); ~SndAiff(); short Read(); short Write(); char* ErrorMessage(); }; #endif SndObj-2.6.7/src/SndASIO.cpp000644 000766 000024 00000027600 12062673766 016076 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 #ifdef WIN #include "SndASIO.h" #include extern AsioDrivers* asioDrivers; // static unsigned long icount = 0; static float** outsndbuff; static float** insndbuff; static int buffs; static ASIOBufferInfo* bufferinfos; static long buffsize; static int currentbuffer = 0, ocurrentbuffer=1; static int encoding; static long ochannels; static long ichannels; static bool optimise; SndASIO::SndASIO(int channels, int mode, char* driver, int numbuffs, SndObj** inputs, int vecsize, float sr) : SndIO(channels,16,inputs,vecsize, sr){ int i; m_numbuffs = numbuffs; m_mode = mode; m_running = false; m_driver = driver; m_ocurrentbuffer = m_icurrentbuffer = 1; m_icount = m_ocount = 0; memset(&m_driverinfo, 0, sizeof(ASIODriverInfo)); m_asiocallbacks.bufferSwitch = &bufferSwitch; m_asiocallbacks.sampleRateDidChange = &sampleRateChanged; m_asiocallbacks.asioMessage = &asioMessages; m_asiocallbacks.bufferSwitchTimeInfo = &bufferSwitchTimeInfo; // Allocate the memory for BufferInfos if(!(bufferinfos = new ASIOBufferInfo[(m_channels+2)*2])){ m_error = 21; return; } if(!asioDrivers) asioDrivers = new AsioDrivers; if(asioDrivers->loadDriver(m_driver)){ if(ASIOInit(&m_driverinfo) == ASE_OK){ if(ASIOCanSampleRate(m_sr) == ASE_OK) ASIOSetSampleRate(m_sr); else ASIOGetSampleRate((double *)&m_sr); // set buffer size long dump1, dump2, dump3; ASIOGetBufferSize(&dump1, &dump2, &buffsize, &dump3); // get number of channels ASIOGetChannels(&ichannels, &ochannels); if(ichannels < m_channels){ m_channels = (short) ichannels; m_samples = m_vecsize*m_channels; } else ichannels = m_channels; if(ochannels < m_channels){ m_channels = (short) ochannels; m_samples = m_vecsize*m_channels; } else ochannels = m_channels; if(m_mode == SND_OUTPUT) ichannels = 0; if(m_mode == SND_INPUT) ochannels = 0; // Set the channel infos if(!(m_channelinfos = new ASIOChannelInfo[m_channels*2])){ m_error = 22; return; } if((m_mode == SND_IO) || (m_mode == SND_OUTPUT)){ outsndbuff = new float*[m_numbuffs]; for(i = 0; i< m_numbuffs; i++){ if(!(outsndbuff[i] = new float[buffsize*m_channels])){ m_error =14; return; } } for(i = 0; i < m_channels; i++){ bufferinfos[i].isInput = ASIOFalse; bufferinfos[i].channelNum = i; bufferinfos[i].buffers[0] = bufferinfos[i].buffers[1] = 0; m_channelinfos[i].channel = bufferinfos[i].channelNum; m_channelinfos[i].isInput = bufferinfos[i].isInput; ASIOGetChannelInfo(&m_channelinfos[i]); switch(m_channelinfos[i].type){ case ASIOSTInt16LSB: encoding = SHORTSAM; m_bits = 16; break; case ASIOSTInt24LSB: encoding = S24LE; m_bits = 24; break; case ASIOSTInt32LSB: encoding = LONGSAM; m_bits = 32; break; default: encoding = SHORTSAM; break; } } } if((m_mode == SND_IO) || (m_mode == SND_INPUT)){ insndbuff = new float*[m_numbuffs]; for(i = 0; i< m_numbuffs; i++){ if(!(insndbuff[i] = new float[buffsize*m_channels])){ m_error =14; return; } } for(i = 0; i < m_channels; i++){ bufferinfos[i+ochannels].isInput = ASIOTrue; bufferinfos[i+ochannels].channelNum = i; bufferinfos[i+ochannels].buffers[0] = bufferinfos[i+ochannels].buffers[1] = 0; m_channelinfos[i+ochannels].channel = bufferinfos[i+ochannels].channelNum; m_channelinfos[i+ochannels].isInput = bufferinfos[i+ochannels].isInput; ASIOGetChannelInfo(&m_channelinfos[i+ochannels]); switch(m_channelinfos[i+ochannels].type){ case ASIOSTInt16LSB: encoding = SHORTSAM; m_bits = 16; break; case ASIOSTInt24LSB: encoding = S24LE; m_bits = 24; break; case ASIOSTInt32LSB: encoding = LONGSAM; m_bits = 32; break; default: encoding = SHORTSAM; break; } } } if(!(ASIOCreateBuffers(bufferinfos, ichannels+ochannels, buffsize, &m_asiocallbacks)== ASE_OK)){ m_error = 25; return; } if(ASIOOutputReady() == ASE_OK) optimise = true; else optimise = false; // printf("channels: %d\n", m_channels); m_outsndbuff = outsndbuff; m_insndbuff = insndbuff; m_encoding = encoding; m_bufferinfos = bufferinfos; m_ichannels = ichannels; m_ochannels = ochannels; m_buffsize = buffsize; currentbuffer = 0; m_called_read = false; buffs = m_numbuffs; } else { // could not initialise m_error = 24; return; } } else { // if driver could not be loaded m_error = 23; return; } #ifdef DEBUG cout << m_bits; #endif } SndASIO::~SndASIO() { ASIOStop(); m_running = false; ASIODisposeBuffers(); ASIOExit(); asioDrivers->removeCurrentDriver(); delete asioDrivers; delete[] m_channelinfos; delete[] m_outsndbuff; delete[] m_insndbuff; delete[] m_bufferinfos; } short SndASIO::Read(){ if((!m_error) && (m_mode != SND_OUTPUT)){ if(!m_running) if(ASIOStart() == ASE_OK) m_running = true; int i; m_called_read = true; for(i = 0; i < m_samples; i++, m_icount++){ if(m_icount == m_buffsize*m_channels){ m_icurrentbuffer = (m_icurrentbuffer+1)%m_numbuffs; m_icount = 0; // thread synchronisation while(m_icurrentbuffer == currentbuffer) Sleep(1); } m_output[i] = m_insndbuff[m_icurrentbuffer][m_icount]; } return 1; } else return 0; } short SndASIO::Write(){ if((!m_error) && (m_mode != SND_INPUT)){ if(!m_running) if(ASIOStart() == ASE_OK) m_running = true; for(m_vecpos = 0; m_vecpos < m_vecsize; m_vecpos++){ if(m_ocount == m_buffsize*m_channels){ m_ocurrentbuffer = (m_ocurrentbuffer+1)%m_numbuffs; m_ocount = 0; if(m_called_read == false) while(m_ocurrentbuffer == currentbuffer){ Sleep(1); } ocurrentbuffer = m_ocurrentbuffer; } // this one makes sure that we did not call // Read() before Write() so that the thread sync // is done only once. for(int n=0;n < m_channels; n++){ m_outsndbuff[m_ocurrentbuffer][m_ocount] = (m_IOobjs[n] ? m_IOobjs[n]->Output(m_vecpos): 0.f); m_ocount++; } } m_called_read = false; return 1; } else return 0; } char* SndASIO::ErrorMessage(){ char* message; switch(m_error){ case 14: message = "Memory allocation error. \n"; break; case 21: message = "Error allocating memory for bufferinfos\n"; break; case 22: message = "Error allocating memory for channelinfos\n"; break; case 23: message = "Could not load driver.\n"; break; case 24: message = "Could not initialise driver.\n"; break; case 25: message = "Could not initialise driver.\n"; break; default: message = SndIO::ErrorMessage(); break; } return message; } void bufferSwitch(long index, ASIOBool processNow){ ASIOTime time; bufferSwitchTimeInfo(&time, index, processNow); } ASIOTime* bufferSwitchTimeInfo(ASIOTime *timeInfo, long index, ASIOBool processNow){ short* sigshort; long* siglong; _24Bit* sig24; int n,j; // we do the channel interleaving here for(int i = 0; i < ichannels+ochannels; i++){ if(bufferinfos[i].isInput == ASIOFalse){ // while(ocurrentbuffer == currentbuffer) { // Sleep(1); // } switch(encoding){ case SHORTSAM: sigshort = (short *)bufferinfos[i].buffers[index]; for(n = bufferinfos[i].channelNum, j = 0; n < buffsize*ochannels; n+=ochannels, j++){ sigshort[j] = (short) outsndbuff[currentbuffer][n]; } break; case S24LE: union { char c[4]; long l;} tmp; sig24 = (_24Bit *)bufferinfos[i].buffers[index]; for(n = bufferinfos[i].channelNum, j = 0; n < buffsize*ochannels; n+=ochannels, j++){ tmp.l = (long) outsndbuff[currentbuffer][n]; sig24[j].s[0] = tmp.c[1]; sig24[j].s[1] = tmp.c[2]; sig24[j].s[2] = tmp.c[3]; } break; case LONGSAM: siglong = (long *)bufferinfos[i].buffers[index]; for(n = bufferinfos[i].channelNum, j = 0; n < buffsize*ochannels; n+=ochannels, j++) siglong[j] = (long) outsndbuff[currentbuffer][n]; break; } } else{ switch(encoding){ case SHORTSAM: sigshort = (short *)bufferinfos[i].buffers[index]; for(n = bufferinfos[i].channelNum, j = 0; n < buffsize*ichannels; n+=ichannels, j++) insndbuff[currentbuffer][n] = (float) sigshort[j]; break; case S24LE: char tmp[4]; sig24 = (_24Bit *)bufferinfos[i].buffers[index]; for(n = bufferinfos[i].channelNum, j = 0; n < buffsize*ichannels; n+=ichannels, j++) { tmp[1] = sig24[j].s[0]; tmp[2] = sig24[j].s[1]; tmp[3] = sig24[j].s[2]; tmp[0] = 0; insndbuff[currentbuffer][n] = (float)(*(long *)tmp); } break; case LONGSAM: siglong = (long *)bufferinfos[i].buffers[index]; for(n = bufferinfos[i].channelNum, j = 0; n < buffsize*ichannels; n+=ichannels, j++) insndbuff[currentbuffer][n] = (float) siglong[j]; break; } } } if(optimise)ASIOOutputReady(); memset(outsndbuff[currentbuffer], 0, sizeof(float)*buffsize*ochannels); currentbuffer= (currentbuffer+1)%buffs; return timeInfo; } void sampleRateChanged(ASIOSampleRate sRate){ } long asioMessages(long selector, long value, void *message, double *opt){ long ret = 0; switch(selector) { case kAsioSelectorSupported: if(value == kAsioResetRequest || value == kAsioEngineVersion || value == kAsioResyncRequest || value == kAsioLatenciesChanged || value == kAsioSupportsTimeInfo || value == kAsioSupportsTimeCode || value == kAsioSupportsInputMonitor) ret = 1L; break; case kAsioResetRequest: ret = 1L; break; case kAsioResyncRequest: ret = 1L; break; case kAsioLatenciesChanged: ret = 1L; break; case kAsioEngineVersion: ret = 2L; break; case kAsioSupportsTimeInfo: ret = 1; break; case kAsioSupportsTimeCode: ret = 0; break; } return ret; } void DriverList(){ // display driver names char** drivernames = new char*[10]; int numdrivers,i; for(i = 0; i < 10; i++) drivernames[i] = new char[32]; if(!asioDrivers) asioDrivers = new AsioDrivers; numdrivers = asioDrivers->getDriverNames(drivernames, 10); cout << "ASIO drivers in this system:\n"; for(i = 0; i < numdrivers; i++){ cout << i << ":" << drivernames[i] << "\n"; } delete[] drivernames; }; char* DriverName(int num, char* name){ char** drivernames = new char*[10]; int i; for(i = 0; i < 10; i++) drivernames[i] = new char[32]; if(!asioDrivers) asioDrivers = new AsioDrivers; asioDrivers->getDriverNames(drivernames, 10); if(num >= 0 && num < 10) strcpy(name, drivernames[num]); else name = NULL; delete[] drivernames; return name; } #endif SndObj-2.6.7/src/SndASIO.h000644 000766 000024 00000004573 12062673766 015547 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 #ifdef WIN #ifndef _SNDASIO_H #define _SNDASIO_H #include "SndIO.h" #include #include #include #include class SndASIO : public SndIO { protected: int m_numbuffs; float **m_insndbuff; // app buffers to store audio float **m_outsndbuff; long m_buffsize; // needed in callbacks long m_encoding; char* m_driver; int m_mode; int m_ocount; int m_icount; int m_ocurrentbuffer; int m_icurrentbuffer; bool m_called_read; bool m_running; long m_ichannels; long m_ochannels; ASIOBufferInfo* m_bufferinfos; // ASIO buffer structures ASIODriverInfo m_driverinfo; // ASIO Driver information ASIOChannelInfo* m_channelinfos; // ASIO channel information ASIOCallbacks m_asiocallbacks; // ASIO callbacks public: SndASIO(int channels, int mode = SND_IO, char* driver = "ASIO Multimedia Driver", int numbuffs=4, SndObj** inputs = 0, int vecsize = DEF_VECSIZE, float sr=DEF_SR); ~SndASIO(); short Write(); short Read(); char* ErrorMessage(); }; void DriverList(); char* DriverName(int num, char* name); void bufferSwitch(long index, ASIOBool processNow); ASIOTime *bufferSwitchTimeInfo(ASIOTime *timeInfo, long index, ASIOBool processNow); void sampleRateChanged(ASIOSampleRate sRate); long asioMessages(long selector, long value, void* message, double* opt); #endif #endif SndObj-2.6.7/src/SndBuffer.cpp000644 000766 000024 00000005605 12062673766 016555 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //////////////////////////////////////// // SndBuffer.cpp: // Implementation of the SndBuffer class // // VL, 2001 /////////////////////////////////////// #include "SndBuffer.h" SndBuffer::SndBuffer(short channels, int buffsize, SndObj **inputlist, int vecsize, float sr): SndIO(channels, 32, inputlist, vecsize, sr){ m_elements = m_wpointer = m_rpointer = 0; m_buffsize = buffsize*m_channels; if(!(m_buff = new float[m_buffsize])){ m_error = 11; #ifdef DEBUG cout << ErrorMessage(); #endif } wlock = rlock = 0; } SndBuffer::~SndBuffer(){ } short SndBuffer::Read(){ if(!m_error) { while(1){ // retrieve a sample from the buffer // if there is not enough new samples (elements < m_samples), block if (m_elements >= m_samples){ int n; while(wlock) wait_here(); rlock = 1; for(m_vecpos=0; m_vecpos < m_samples; m_vecpos+=m_channels) for(n=0; n < m_channels; n++){ m_output[m_vecpos+n] = m_buff[m_rpointer]; m_rpointer=(m_rpointer+1)%m_buffsize; m_elements--; } rlock = 0; return 1 ; } else wait_here(); } } else return 0; } short SndBuffer::Write(){ if(!m_error) { while(1){ // put a sample in the buffer // if there is no space left, block if(m_elements < m_buffsize) { int n; while(rlock) wait_here(); wlock = 1; for(m_vecpos=0; m_vecpos < m_samples; m_vecpos+=m_channels) for(n=0; n < m_channels; n++){ if(m_IOobjs[n]) m_buff[m_wpointer]= m_IOobjs[n]->Output(m_vecpos); else m_buff[m_wpointer] = 0.f; m_wpointer=(m_wpointer+1)%m_buffsize; m_elements++; } wlock = 0; return 1; } else wait_here(); } } else return 0; } char* SndBuffer::ErrorMessage(){ char* message; switch(m_error){ case 11: message = "Error allocating buffer memory."; break; default: message = SndIO::ErrorMessage(); break; } return message; } SndObj-2.6.7/src/SndBuffer.h000644 000766 000024 00000003221 12062673766 016212 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 /////////////////////////////////////// // SndBuffer.h: // IO buffer for interthread/process // communication // // VL, 2001 /////////////////////////////////////// #ifndef _SNDBUFIO_H #define _SNDBUFIO_H #include "SndIO.h" #ifdef WIN #include #endif class SndBuffer : public SndIO { int m_buffsize; int m_wpointer; int m_rpointer; int m_elements; int wlock, rlock; float* m_buff; public: SndBuffer(short channels, int buffsize=DEF_VECSIZE, SndObj** inputlist=0, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~SndBuffer(); short Write(); short Read(); void wait_here(){ #ifdef WIN Sleep(1); #else usleep(1); #endif } char* ErrorMessage(); }; #endif SndObj-2.6.7/src/SndCoreAudio.cpp000644 000766 000024 00000023006 12062673766 017211 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 // // SndCoreAudio.cpp: // Core Audio Realtime IO implementation // // #ifdef MACOSX #include "SndCoreAudio.h" OSStatus SndCoreAudio::ADIOProc(AudioDeviceID indev, const AudioTimeStamp *inN, const AudioBufferList *input, const AudioTimeStamp *inT, AudioBufferList *output, const AudioTimeStamp *inOT, void* p){ SndCoreAudio *cdata = (SndCoreAudio *)p; int chans = cdata->m_channels; int buff = cdata->m_iocurbuff; float *ibufp = cdata->m_inbuffs[buff]; float *obufp = cdata->m_outbuffs[buff]; int no_input = cdata->m_dont_use_input; int no_output = cdata->m_dont_use_output; if (input->mNumberBuffers > 1) cdata->m_interleaved = false; if(cdata->m_interleaved) { int items = cdata->m_buffitems,i,maxi; maxi = input->mBuffers[0].mDataByteSize/sizeof(float); output->mNumberBuffers = 1; output->mBuffers[0].mDataByteSize = cdata->m_buffsize; output->mBuffers[0].mNumberChannels = chans; float *outp = (float *) output->mBuffers[0].mData; float *inp = (float *) input->mBuffers[0].mData; for(i = 0; i < items; i++){ if(!no_output) outp[i] = obufp[i]; if(i < maxi && !no_input) ibufp[i] = inp[i]; else ibufp[i] = 0.f; obufp[i] = 0; } } else { int nibuffs = input->mNumberBuffers, buffs, i, j, cnt; int nobuffs = output->mNumberBuffers; int items = cdata->m_bufframes * chans; buffs = nibuffs > nobuffs ? nibuffs : nobuffs; output->mNumberBuffers = buffs; chans = chans > buffs ? buffs : chans; float *outp, *inp; for (j = 0; j < chans; j++) { if(!no_output) outp = (float *) output[0].mBuffers[j].mData; if(!no_input) inp = (float *) input[0].mBuffers[j].mData; for (i = j, cnt = 0; i < items; i += chans, cnt++) { if(!no_output) outp[cnt] = obufp[i]; obufp[i] = 0.0f; if(!no_input) ibufp[i] = inp[cnt]; } output->mBuffers[j].mDataByteSize = input[0].mBuffers[j].mDataByteSize; output->mBuffers[j].mNumberChannels = 1; } } cdata->m_outused[buff] = cdata->m_inused[buff] = true; buff++; if(buff == cdata->m_buffnos) buff=0; cdata->m_iocurbuff = buff; return 0; } OSStatus SndObj_IOProcEntry(AudioDeviceID indev, const AudioTimeStamp *inN, const AudioBufferList *input, const AudioTimeStamp *inT, AudioBufferList *output, const AudioTimeStamp *inOT, void* cdata){ return ((SndCoreAudio *)cdata)->ADIOProc(indev,inN,input,inT,output,inOT,cdata); } int SndCoreAudio::OpenDevice(bool isInput){ UInt32 psize, bufframes; double rsr; OSStatus err; AudioStreamBasicDescription format; // set the buffersize psize = sizeof(UInt32); bufframes = m_bufframes; err = AudioDeviceSetProperty(m_dev,NULL,0,isInput, kAudioDevicePropertyBufferFrameSize, psize, &m_bufframes); if(!err) err = AudioDeviceGetProperty(m_dev,0,isInput, kAudioDevicePropertyBufferFrameSize, &psize, &bufframes); if(bufframes != m_bufframes) m_error = 21; psize = sizeof(double); rsr = m_sr; err = AudioDeviceSetProperty(m_dev, NULL, 0, isInput, kAudioDevicePropertyNominalSampleRate, psize, &rsr); if(!err) err = AudioDeviceGetProperty(m_dev, 0, isInput, kAudioDevicePropertyNominalSampleRate, &psize, &rsr); if(rsr != m_sr) m_error = 22; psize = sizeof(AudioStreamBasicDescription); AudioDeviceGetProperty(m_dev,0,isInput, kAudioDevicePropertyStreamFormat, &psize, &format); m_interleaved = true; m_format.mSampleRate = m_sr; m_format.mFormatID = kAudioFormatLinearPCM; m_format.mFormatFlags = format.mFormatFlags; m_format.mBytesPerPacket = sizeof(float)*m_channels; m_format.mFramesPerPacket = 1; m_format.mBytesPerFrame = format.mBytesPerPacket; m_format.mChannelsPerFrame = m_channels; m_format.mBitsPerChannel = sizeof(float)*8; err = AudioDeviceSetProperty(m_dev,NULL,0,isInput, kAudioDevicePropertyStreamFormat, psize, &m_format); if(!err) AudioDeviceGetProperty(m_dev,0,isInput, kAudioDevicePropertyStreamFormat, &psize, &format); //cout << format.mSampleRate << "\n"; //if(memcmp(m_format, format,psize)!=0) m_error = 25; return err; } SndCoreAudio::SndCoreAudio(int channels,int bufframes, int buffnos, float norm, SndObj** inObjs, int dev, int vecsize, float sr): SndIO((channels < 2 ? 2 : channels), sizeof(float)*8, inObjs, vecsize, sr) { UInt32 psize; int i; m_norm = norm ? norm : 1.f; m_called_read = false; m_stopped = true; if(dev==DEF_DEV){ psize = sizeof(AudioDeviceID); AudioHardwareGetProperty(kAudioHardwarePropertyDefaultOutputDevice, &psize, &m_dev); } else m_dev = dev; m_sleept = 5; m_bufframes = bufframes; m_buffsize = bufframes*sizeof(float)*m_channels; m_buffitems = bufframes*m_channels; m_buffnos = buffnos; m_dont_use_input = OpenDevice(); m_dont_use_output = OpenDevice(false); m_outbuffs = new float*[m_buffnos]; m_inbuffs = new float*[m_buffnos]; m_inused = new bool[m_buffnos]; m_outused = new bool[m_buffnos]; for(i=0; i < m_buffnos; i++){ if(!(m_inbuffs[i] = new float[m_bufframes*m_channels])){ m_error = 24; return; } if(!(m_outbuffs[i] = new float[m_bufframes*m_channels])){ m_error = 25; return; } memset(m_outbuffs[i], 0, m_bufframes*m_channels*sizeof(float)); memset(m_inbuffs[i], 0, m_bufframes*m_channels*sizeof(float)); m_inused[i] = m_outused[i] = false; } m_incurbuff = m_outcurbuff = m_iocurbuff = 0; m_incount = m_outcount = m_buffitems; if(AudioDeviceAddIOProc(m_dev, SndObj_IOProcEntry, this) != 0) { m_error = 26; return; } } SndCoreAudio::~SndCoreAudio(){ AudioDeviceStop(m_dev, SndObj_IOProcEntry); AudioDeviceRemoveIOProc(m_dev, SndObj_IOProcEntry); delete[] m_outbuffs; delete[] m_inbuffs; delete[] m_inused; delete[] m_outused; } short SndCoreAudio::Write(){ if(!m_error){ int i; if(m_stopped){ AudioDeviceStart(m_dev, SndObj_IOProcEntry); m_stopped = false; } if(!m_called_read) Read(); for(m_vecpos = 0; m_vecpos < m_vecsize; m_vecpos++){ if(m_outcount == m_buffitems){ m_outused[m_outcurbuff] = false; m_outcurbuff++; if(m_outcurbuff == m_buffnos) m_outcurbuff=0; m_outcount = 0; while(!m_outused[m_outcurbuff]) usleep(m_sleept); } for(i = 0; i < m_channels; i++){ m_outbuffs[m_outcurbuff][m_outcount+i] = (m_IOobjs[i] ? m_IOobjs[i]->Output(m_vecpos)/m_norm: 0.f); } m_outcount+=m_channels; } // for m_called_read = false; return 1; } // if no error return 0; } short SndCoreAudio::Read(){ if(!m_error){ if(m_stopped){ if(AudioDeviceStart(m_dev, SndObj_IOProcEntry)==0) m_stopped = false; else { m_error = 26; return 0; } } for(m_vecpos = 0; m_vecpos < m_vecsize*m_channels; m_vecpos++){ if(m_incount == m_buffitems){ m_inused[m_incurbuff] = false; m_incurbuff++; if(m_incurbuff == m_buffnos) m_incurbuff = 0; m_incount = 0; while(!m_inused[m_incurbuff]) usleep(m_sleept); } m_output[m_vecpos] = m_inbuffs[m_incurbuff][m_incount]*m_norm; m_inbuffs[m_incurbuff][m_incount] = 0.f; m_incount++; } // for m_called_read = true; return 1; } // if no error return 0; } char* SndCoreAudio::ErrorMessage(){ char* mess; switch(m_error){ case 21: mess="cannot set the requested buffer size \n"; break; case 22: mess="error setting the sampling rate \n"; break; case 23: mess="error setting the number of channels \n"; break; case 24: mess="error allocating memory for input\n"; break; case 25: mess="error allocating memory for output\n"; break; case 26: mess="can't start device"; break; default: return SndIO::ErrorMessage(); } return mess; } int ListDevices(char **devs, int devnos){ UInt32 psize; AudioHardwareGetPropertyInfo(kAudioHardwarePropertyDevices, &psize, NULL); UInt32 *list = new UInt32[psize/4]; AudioHardwareGetProperty(kAudioHardwarePropertyDevices, &psize, list); for(int i=0; i < psize/4 && i < devnos; i++){ AudioDeviceGetPropertyInfo(list[i], 0, 0, kAudioDevicePropertyDeviceName, &psize, NULL); char *name = new char[psize]; char *name2 = new char[psize+10]; sprintf(name2, "%u: ", list[i]); AudioDeviceGetProperty(list[i], 0, 0, kAudioDevicePropertyDeviceName, &psize, name); strcat(name2, name); devs[i] = name2; delete[] name; } return psize/4; } void PrintDevices(){ char *devs[50]; int devn = ListDevices(devs); for(int i=0; i < devn; i++) { cout << devs[i] << "\n"; delete[] devs[i]; } } #endif SndObj-2.6.7/src/SndCoreAudio.h000644 000766 000024 00000004703 12062673766 016661 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 // //////////////////////////////////////////////////////// // SndCoreAudio.h: Interface of the SndCoreAudio class // realtime audio IO with Mac OSX Core Audio // // #ifdef MACOSX #ifndef SndCoreAudio_H_ #define SndCoreAudio_H_ #include #include "SndIO.h" const int DEF_BSIZE = 512; const int DEF_PERIOD = 4; const int DEF_DEV = 0xFFFFFFFF; class SndCoreAudio : public SndIO { AudioDeviceID m_dev; float** m_inbuffs; float** m_outbuffs; int m_sleept; int m_dont_use_input; int m_dont_use_output; AudioStreamBasicDescription m_format; unsigned int m_bufframes; unsigned int m_buffsize; unsigned int m_buffitems; unsigned int m_buffnos; unsigned int m_outcurbuff; unsigned int m_incurbuff; unsigned int m_iocurbuff; unsigned int m_outcount; unsigned int m_incount; bool* m_inused; bool* m_outused; bool m_interleaved; bool m_stopped; bool m_called_read; float m_norm; int OpenDevice(bool isInput=true); public: SndCoreAudio(int channels=2,int bufframes=DEF_BSIZE, int buffnos=DEF_PERIOD, float norm=32767.f, SndObj** inObjs=0, int dev=DEF_DEV, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~SndCoreAudio(); OSStatus ADIOProc(AudioDeviceID indev, const AudioTimeStamp *inN, const AudioBufferList *input, const AudioTimeStamp *inT, AudioBufferList *output, const AudioTimeStamp *inOT, void* cdata); void Stop(){ m_stopped = true; } short Read(); short Write(); void SetSleepTime(int t) { m_sleept = t; } char* ErrorMessage(); }; int ListDevices(char **d, int devs=50); void PrintDevices(); #endif #endif SndObj-2.6.7/src/SndFIO.cpp000644 000766 000024 00000012570 12062673766 015760 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 /////////////////////////////////////////// // SndFIO.cpp // // /////////////////////////////////////////// #include "SndFIO.h" SndFIO::SndFIO(char* name, short mode, short channels, short bits, SndObj** inputlist, float spos, int vecsize, float sr) : SndIO(channels, bits,inputlist,vecsize,sr){ m_name = name; m_mode = mode; m_spos = spos; m_datapos = 0; m_filestat = WAITOPEN; m_selfdesc = 0; m_eof=0; char* s_temp; switch (mode){ // open modes case INSERT: s_temp="r+b"; break; case OVERWRITE: s_temp="wb"; break; case APPEND: s_temp="ab"; m_datapos = 0; break; case READ: s_temp= "rb"; if(!m_selfdesc) m_bits = bits; else m_bits = 0; break; default: m_error = 8; #ifdef DEBUG cout << ErrorMessage(); #endif return; } // open file if ((m_file = fopen(name,s_temp)) != NULL) m_filestat=SFOPEN; else{ m_filestat=SFERROR; m_error=12; #ifdef DEBUG cout << ErrorMessage(); #endif return; } if(m_bits>0){ m_buffsize = (m_bits/8)*m_samples; if(!(m_buffer = new char[m_buffsize])){ m_error = 11; #ifdef DEBUG cout << ErrorMessage(); #endif return; } // these are the pointers used to read/write to the buffer m_cp = (unsigned char *) m_buffer; m_sp = (short *) m_buffer; m_lp = (int *) m_buffer; m_s24p = (_24Bit*) m_buffer; } else { m_buffsize = 0; m_buffer = 0; m_cp = 0; m_sp = 0; m_lp = 0; } if(m_bits != 16 && m_bits != 8 && m_bits != 32 && m_bits != 24){ m_error = 13; #ifdef DEBUG cout << ErrorMessage(); #endif } if(spos > 0) SetPos(spos); m_safe = m_file; } SndFIO::~SndFIO(){ if(m_filestat==SFOPEN) { delete[] m_buffer; fclose(m_file); } } short SndFIO::Read(){ if(!m_error && (m_mode == READ) && !feof(m_file)){ int i; short items; items = fread(m_buffer, 1, m_buffsize, m_file); items /= m_sampsize; switch(m_bits) { case 16: for(m_vecpos=0; m_vecpos < m_samples; m_vecpos+=m_channels) for(i=0; i < m_channels; i++) m_output[m_vecpos+i] = (m_vecpos+i < items ? (float) m_sp[m_vecpos+i] : 0.f); break; case 8: for(m_vecpos=0; m_vecpos < m_samples; m_vecpos+=m_channels) for(i=0; i < m_channels; i++) m_output[m_vecpos+i] = (m_vecpos+i < items ? (float) m_cp[m_vecpos+i] : 0.f); break; case 32: for(m_vecpos=0; m_vecpos < m_samples; m_vecpos+=m_channels) for(i=0; i < m_channels; i++) m_output[m_vecpos+i] = (m_vecpos+i < items ? (float) m_lp[m_vecpos+i] : 0.f); break; case 24: for(m_vecpos=0; m_vecpos < m_samples; m_vecpos+=m_channels) for(i=0; i < m_channels; i++) m_output[m_vecpos+i] = (m_vecpos+i < items ? (float) (*(long *)m_s24p[m_vecpos+i].s) : 0.f); } return items; } for(m_vecpos=0; m_vecpos < m_samples; m_vecpos++) m_output[m_vecpos] = 0.f; return 0; } short SndFIO::Write(){ if(!m_error && (m_mode != READ)){ int i,n; switch(m_bits){ case 16: for(m_vecpos=n=0; m_vecpos < m_samples; m_vecpos+=m_channels, n++) for(i = 0; i < m_channels; i++) if(m_IOobjs[i]) m_sp[m_vecpos+i] = (short) m_IOobjs[i]->Output(n); return (short) fwrite(m_sp, m_buffsize, 1, m_file); case 8: for(m_vecpos=n=0; m_vecpos < m_samples; m_vecpos+=m_channels, n++) for(i = 0; i < m_channels; i++) if(m_IOobjs[i]) m_cp[m_vecpos+i] = (char) m_IOobjs[i]->Output(n); return (short) fwrite(m_cp, m_buffsize, 1, m_file); case 32: for(m_vecpos=n=0; m_vecpos < m_samples; m_vecpos+=m_channels, n++) for(i = 0; i < m_channels; i++) if(m_IOobjs[i]) m_lp[m_vecpos+i] = (long) m_IOobjs[i]->Output(n); return (short) fwrite(m_lp, m_buffsize, 1, m_file); case 24: for(m_vecpos=n=0; m_vecpos < m_samples; m_vecpos+=m_channels, n++) for(i = 0; i < m_channels; i++) if(m_IOobjs[i]){ (*(long *)m_s24p[m_vecpos+i].s) = (long) m_IOobjs[i]->Output(n); } return (short) fwrite(m_s24p, m_buffsize, 1, m_file); } } return 0; } char* SndFIO::ErrorMessage(){ char* message; switch(m_error){ case 11: message = "Failed to allocate buffer memory\n"; break; case 12: message = "File open error\n"; break; case 13: message = "Unsupported precision."; break; default: message = SndIO:: ErrorMessage(); break; } return message; } SndObj-2.6.7/src/SndFIO.h000644 000766 000024 00000012053 12062673766 015421 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // SndFIO.h: interface of the SndFIO class. // // // // // // // //************************************************************// #ifndef _SNDFIO_H #define _SNDFIO_H #include #include #include "SndIO.h" enum {OVERWRITE,APPEND,INSERT,READ }; enum {WAITOPEN=10,SFOPEN,SFERROR}; class SndFIO : public SndIO{ protected: char* m_name; FILE* m_file; FILE* m_safe; short m_filestat; short m_mode; float m_spos; long m_datapos; long m_buffsize; // size of buffer in bytes char* m_buffer; unsigned char* m_cp; short* m_sp; int* m_lp; _24Bit* m_s24p; short m_selfdesc; // self-describing header present long m_dataframes; int m_eof; // end of file indicator short m_itemsleft; /* Byte Swapping Functions */ short SwapShort(short inv); int SwapInt(int inv); float SwapFloat32( float inv ); double SwapDouble( double inv ); public: FILE *GetFile(){return m_safe; } short GetMode(){ return m_mode; } void SetPos(float pos){ m_spos = pos; if(!fseek(m_safe,(long)(m_spos*m_sr)*m_channels*(m_bits/8)+ m_datapos, SEEK_SET)) m_eof=0; } void SetPos(long pos){ if(!fseek(m_safe, pos + m_datapos, SEEK_SET)){ if(m_sr && m_channels && m_bits) m_spos = pos/(m_sr*m_channels*(m_bits/8)); m_eof=0; } } int Eof() { return (m_eof = feof(m_file));} long GetDataFrames(){ return m_dataframes;} float GetPos(){ return m_spos; } short GetStatus(){ return m_filestat; } SndFIO(char* name, short mode, short channels=1, short bits=16, SndObj** inputlist=0, float spos= 0.f, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~SndFIO(); short Read(); short Write(); char* ErrorMessage(); }; inline short SndFIO::SwapShort (short inv) { union shortconv { short us; unsigned char uc[2]; } *inp, outv; inp = (union shortconv *)&inv; outv.uc[0] = inp->uc[1]; outv.uc[1] = inp->uc[0]; return( outv.us); } inline int SndFIO::SwapInt (int inv) { union intconv { int ul; unsigned char uc[4]; } *inp, outv; inp = (union intconv *)&inv; outv.uc[0] = inp->uc[3]; outv.uc[1] = inp->uc[2]; outv.uc[2] = inp->uc[1]; outv.uc[3] = inp->uc[0]; return( outv.ul); } inline float SndFIO::SwapFloat32( float inv ) { union floatconv { float uf; unsigned char uc[4]; } *inp, outv; inp = (union floatconv *)&inv; outv.uc[0] = inp->uc[3]; outv.uc[1] = inp->uc[2]; outv.uc[2] = inp->uc[1]; outv.uc[3] = inp->uc[0]; return( outv.uf ); } inline double SndFIO::SwapDouble( double inv ) { union doubleconv { double ud; unsigned char uc[8]; } *inp, outv; inp = (union doubleconv *)&inv; outv.uc[0] = inp->uc[7]; outv.uc[1] = inp->uc[6]; outv.uc[2] = inp->uc[5]; outv.uc[3] = inp->uc[4]; outv.uc[4] = inp->uc[3]; outv.uc[5] = inp->uc[2]; outv.uc[6] = inp->uc[1]; outv.uc[7] = inp->uc[0]; return( outv.ud ); } /* Maybe not the best way, but these deal with endian issues for any type of io use the macro around what type is expected to be written or read. if this is already the processors native form it will do nothing, if not it will swap bytes. so, when reading or writing a LE type on a BE machine, SHORT_LE( n ) will swap bytes for reading and writing. when reading or writing a LE type on a LE machine, it does nothing */ #ifdef WORDS_BIGENDIAN #define SHORT_LE(x) SwapShort(x) #define LONG_LE(x) SwapInt(x) #define FLOAT32_LE(x) SwapFloat32(x) #define DOUBLE_LE(x) SwapDouble(x) #define SHORT_BE(x) x #define LONG_BE(x) x #define FLOAT32_BE(x) x #define DOUBLE_BE(x) x #else #define SHORT_LE(x) x #define LONG_LE(x) x #define FLOAT32_LE(x) x #define DOUBLE_LE(x) x #define SHORT_BE(x) SwapShort(x) #define LONG_BE(x) SwapInt(x) #define FLOAT32_BE(x) SwapFloat32(x) #define DOUBLE_BE(x) SwapDouble(x) #endif #endif SndObj-2.6.7/src/SndIn.cpp000644 000766 000024 00000005306 12062673766 015710 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // SndIn.cpp: implementation of the SndIn class. // // // // // // // //************************************************************// #include "SndIn.h" SndIn::SndIn(){ m_ioinput = 0; m_channel = 1; m_sr = 44100.f; m_enable = 1; AddMsg("channel", 22); } SndIn::SndIn(SndIO *input, short channel, int vecsize, float sr): SndObj(0, vecsize, sr){ m_ioinput = input; m_channel = channel; AddMsg("channel", 22); } SndIn::~SndIn(){ } int SndIn::Connect(char* mess, void* input){ switch (FindMsg(mess)){ case 3: SetInput((SndIO *) input); return 1; default: return SndObj::Connect(mess,input); } } int SndIn::Set(char* mess, float value){ switch (FindMsg(mess)){ case 22: m_channel = (short) value; return 1; default: return SndObj::Set(mess,value); } } short SndIn::DoProcess(){ if(!m_error){ for(m_vecpos=0;m_vecpos < m_vecsize; m_vecpos++){ if(m_enable){ if(m_ioinput){ m_output[m_vecpos] = m_ioinput->Output(m_vecpos, m_channel); } else{ m_error = 10; return 0; } } else m_output[m_vecpos] = 0.f; } return 1; } else return 0; } ///////////// ERROR HANDLING ////////////////////////////////// char* SndIn::ErrorMessage(){ char* message; switch(m_error){ case 0: message = "No error."; break; case 10: message = "DoProcess() failed. No SndIO input object."; break; default: message = SndObj::ErrorMessage(); break; } return message; } SndObj-2.6.7/src/SndIn.h000644 000766 000024 00000003516 12062673766 015356 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // SndIn.h: interface of the SndIn class. // // // // // // // //************************************************************// #ifndef _SNDIN_H #define _SNDIN_H #include "SndObj.h" #include "SndIO.h" class SndIn : public SndObj { protected: SndIO* m_ioinput; short m_channel; public: SndIn(); SndIn(SndIO *input, short channel=1, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~SndIn(); void SetInput(SndIO *input, short channel=1){ m_ioinput = input; m_channel = channel; } int Connect(char* mess, void* input); int Set(char* mess, float value); short DoProcess(); char* ErrorMessage(); }; #endif SndObj-2.6.7/src/SndIO.cpp000644 000766 000024 00000006455 12062673766 015657 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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, float 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; } SndObj-2.6.7/src/SndIO.h000644 000766 000024 00000006756 12062673766 015330 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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; float* m_output; float 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; float 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; } float Output(int pos){ return m_output[pos]; } float 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, float sr = DEF_SR); virtual ~SndIO(); virtual short Read(); virtual short Write(); virtual char* ErrorMessage(); int Error() { return m_error; } }; #endif SndObj-2.6.7/src/SndJackIO.cpp000644 000766 000024 00000020712 12062673766 016440 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 // ////////////////////////////////////////////////////// // SndJackIO.cpp: implementation of the SndJackIO class // Jack IO client support // // #ifdef JACK #include #include #include "SndJackIO.h" int jprocess_callback(jack_nframes_t n_frames, void *arg){ return ((SndJackIO *)arg)->JProcess(n_frames); } void jshutdown_callback(void *arg){ ((SndJackIO *)arg)->JShutdown(); } int jbuffersize_callback(jack_nframes_t n_frames, void *arg){ return ((SndJackIO *)arg)->BufferResize(n_frames); } SndJackIO::SndJackIO(char* name, int channels, int mode, int buffno, SndObj** inObjs, int vecsize, float sr) : SndIO(channels,16,inObjs,vecsize, sr) { int i, portno, portmax; char port_name[10]; const char **iports; const char **oports; m_outused = new bool[buffno]; m_inused = new bool[buffno]; m_mode = mode; if((m_client = jack_client_open (name, JackNullOption, NULL)) == 0){ m_error = 11; return; } m_bufframes = jack_get_buffer_size(m_client); m_buffno = buffno; m_items = m_bufframes*m_channels; jack_set_process_callback(m_client, jprocess_callback, (void *)this); jack_on_shutdown(m_client, jshutdown_callback, (void *)this); jack_set_buffer_size_callback(m_client,jbuffersize_callback, (void *) this); if(jack_activate(m_client)){ m_error = 17; return; } if(m_mode == SND_IO || m_mode == SND_INPUT){ // register & connect inputs m_inbuff = new float*[m_buffno]; for(i=0; i < m_buffno; i++){ if(!(m_inbuff[i] = new float[m_items])){ m_error = 12; return; } m_inused[i] = true; } if((iports = jack_get_ports(m_client,0,0, JackPortIsPhysical | JackPortIsOutput))==0){ m_error = 13; } portmax = 24; m_inport = new jack_port_t*[m_channels]; for(i=0; i < m_channels; i++){ sprintf(port_name, "in%d", i+1); m_inport[i] = jack_port_register (m_client,port_name,JACK_DEFAULT_AUDIO_TYPE, JackPortIsInput,0); if(i<=portmax) portno = i; else portno = portmax; if(jack_connect(m_client,iports[portno], jack_port_name(m_inport[i]))){ m_error = 14; } } free(iports); } if(m_mode == SND_IO || m_mode == SND_OUTPUT){ // register & connect outputs m_outbuff = new float*[m_buffno]; for(i=0; i < m_buffno; i++){ if(!(m_outbuff[i] = new float[m_items])){ m_error = 12; return; } m_outused[i] = true; } if((oports = jack_get_ports(m_client,0,0, JackPortIsPhysical | JackPortIsInput))==0){ m_error = 15; } portmax = 24; m_outport = new jack_port_t*[m_channels]; for(i=0; i < m_channels; i++){ sprintf(port_name, "out%d", i+1); m_outport[i] = jack_port_register (m_client,port_name,JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput,0); if(i<=portmax) portno = i; else portno = portmax; if(jack_connect(m_client, jack_port_name(m_outport[i]), oports[portno])){ m_error = 16; } } free(oports); } m_outcount = m_incount = 0; m_outcurbuff = m_incurbuff = m_curbuff = 0; } SndJackIO::~SndJackIO(){ jack_client_close(m_client); if(m_outbuff) delete[] m_outbuff; if(m_inbuff) delete[] m_inbuff; delete[] m_outused; delete[] m_inused; } void SndJackIO::JShutdown(){ m_error = 18; } int SndJackIO::BufferResize(jack_nframes_t nframes){ m_bufframes = nframes; m_items = m_bufframes*m_channels; if(m_mode == SND_IO || m_mode == SND_INPUT){ delete[] m_inbuff; m_inbuff = new float*[m_buffno]; for(int i=0; i < m_buffno; i++){ if(!(m_inbuff[i] = new float[m_items])){ m_error = 12; return 0; } m_inused[i] = true; } } if(m_mode == SND_IO || m_mode == SND_OUTPUT){ delete[] m_outbuff; m_outbuff = new float*[m_buffno]; m_outused = new bool[m_buffno]; for(int i=0; i < m_buffno; i++){ if(!(m_outbuff[i] = new float[m_items])){ m_error = 12; return 0; } m_outused[i] = true; } } m_outcount = m_incount = 0; m_outcurbuff = m_incurbuff = m_curbuff = 0; return 1; } int SndJackIO::ConnectIn(int channel, char* port){ if( (m_mode != SND_OUTPUT) && (channel < 1) && (channel <= m_channels) && (jack_connect(m_client,port, jack_port_name(m_inport[channel-1])) != 0 )) return 0; else return 1; } int SndJackIO::DisconnectIn(int channel, char* port){ if((m_mode != SND_OUTPUT) && (channel < 1) && (channel <= m_channels) && (jack_disconnect(m_client,port, jack_port_name(m_inport[channel-1])) != 0)) return 0; else return 1; } int SndJackIO::ConnectOut(int channel, char* port){ if((m_mode != SND_INPUT) && (channel < 1) && (channel <= m_channels) && (jack_connect(m_client,jack_port_name(m_outport[channel-1]), port) != 0)) return 0; else return 1; } int SndJackIO::DisconnectOut(int channel, char* port){ if((m_mode != SND_INPUT) && (channel < 1) && (channel <= m_channels) && (jack_disconnect(m_client,jack_port_name(m_outport[channel-1]), port) != 0)) return 0; else return 1; } int SndJackIO::JProcess(jack_nframes_t nframes){ int i,j,k; jack_default_audio_sample_t *sigin; jack_default_audio_sample_t *sigout; for(i=0; i < m_channels; i++){ if(m_mode != SND_OUTPUT) sigin = (jack_default_audio_sample_t *) jack_port_get_buffer(m_inport[i], nframes); if(m_mode != SND_INPUT) sigout = (jack_default_audio_sample_t *) jack_port_get_buffer(m_outport[i], nframes); for(j=i, k=0; j < m_items; j+=m_channels, k++){ if(m_mode != SND_OUTPUT) m_inbuff[m_curbuff][j] = sigin[k]; if(m_mode != SND_INPUT){ sigout[k] = m_outbuff[m_curbuff][j]; m_outbuff[m_curbuff][j] = 0.f; } } } m_outused[m_curbuff] = m_inused[m_curbuff] = true; m_curbuff++; m_curbuff %= m_buffno; return 0; } short SndJackIO::Write(){ if(!m_error){ int i; for(m_vecpos = 0; m_vecpos < m_vecsize; m_vecpos++){ for(i=0; i < m_channels; i++) m_outbuff[m_outcurbuff][m_outcount+i] = (m_IOobjs[i] ? m_IOobjs[i]->Output(m_vecpos) : 0.f); m_outcount+=m_channels; if(m_outcount == m_items){ m_outused[m_outcurbuff] = false; m_outcurbuff++; m_outcurbuff %= m_buffno; m_outcount = 0; while(!m_outused[m_outcurbuff]) usleep(100); } } return 1; } return 0; } short SndJackIO::Read(){ if(!m_error){ for(m_vecpos=0; m_vecpos < m_vecsize*m_channels;m_vecpos++){ m_output[m_vecpos] = m_inbuff[m_incurbuff][m_incount]; m_inbuff[m_incurbuff][m_incount] = 0.f; m_incount++; if(m_incount == m_items){ m_inused[m_incurbuff] = false; m_incurbuff++; m_incurbuff %= m_buffno; m_incount = 0; while(!m_inused[m_incurbuff]) usleep(100); } } return 1; } return 0; } char* SndJackIO::ErrorMessage(){ char* message; switch(m_error){ case 11: message = "Error initialising the Jack Client\n"; break; case 12: message = "Failed to allocate buffer memory\n"; break; case 13: message = "Failed to find any physical input ports\n"; break; case 14: message = "Failed to connect to physical input port\n"; break; case 15: message = "Failed to find any physical output ports\n"; break; case 16: message = "Failed to connect to physical output port\n"; break; case 17: message = "Failed to activate Jack client\n"; break; case 18: message = "Jack server has shut down\n"; break; default: return SndIO::ErrorMessage(); break; } return message; } #endif SndObj-2.6.7/src/SndJackIO.h000644 000766 000024 00000004275 12062673766 016113 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 // //////////////////////////////////////////////// // SndJackIO.h : interface of the SndJackIO class // jack IO client support // // #ifndef _SNDJACKIO_H #define _SNDJACKIO_H #include "SndIO.h" #include class SndJackIO : public SndIO { protected: float **m_inbuff; float **m_outbuff; bool *m_inused; bool *m_outused; int m_curbuff; int m_outcurbuff; int m_incurbuff; int m_incount; int m_outcount; int m_buffno; jack_nframes_t m_bufframes; int m_items; jack_client_t *m_client; jack_port_t **m_inport; // arrays of ports jack_port_t **m_outport; // one per channel int m_mode; public: SndJackIO(char* name, int channels=2, int mode=SND_IO, int buffnos=2, SndObj** inObjs=0, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~SndJackIO(); int ConnectIn(int channel, char* port); int ConnectOut(int channel, char* port); int DisconnectIn(int channel, char* port); int DisconnectOut(int channel, char* port); jack_client_t *GetClient() { return m_client; } jack_port_t *GetInPort(int channel) { return m_inport[channel-1];} jack_port_t *GetOutPort(int channel) { return m_outport[channel-1];} short Read(); short Write(); char *ErrorMessage(); int JProcess(jack_nframes_t nframes); void JShutdown(); int BufferResize(jack_nframes_t nframes); }; #endif // _SNDJACKIO_H SndObj-2.6.7/src/SndMidi.cpp000644 000766 000024 00000006235 12062673766 016226 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //////////////////////////// // SndMidi.cpp // // // #if defined (SGI) || defined (OSS) || defined (WIN) #include "SndMidi.h" SndMidi::SndMidi(int buffsize, float sr): SndIO (1, 0, 0, 1, sr) { int i; m_buffsize = buffsize; m_channels = 16; delete[] m_output; m_vel = new unsigned char[128]; m_aft = new unsigned char[128]; for(i = 0; i < 127; i++) m_vel[i] = m_aft[i] = 0; #if defined(OSS) || defined(SGI) if(!(m_event = new MDevent[m_buffsize])){ m_error =14; #ifdef DEBUG cout << ErrorMessage(); #endif return; } #endif #ifdef WIN if(!(m_event = new MIDI_event[m_buffsize])){ m_error =14; #ifdef DEBUG cout << ErrorMessage(); #endif return; } #endif if(!(m_output = new float[m_channels])){ m_error = 15; #ifdef DEBUG cout << ErrorMessage(); #endif return; } if(!(m_message = new short[m_channels])){ m_error = 15; #ifdef DEBUG cout << ErrorMessage(); #endif return; } m_note = 0; m_noteon = m_noteoff = 0; m_read = 0; m_count = 0; for(i = 0; i < m_channels; i++) { m_output[i] = 0.f; m_message[i] = 0; } } SndMidi::~SndMidi(){ delete[] m_message; delete[] m_event; delete[] m_vel; } short SndMidi::NoteOn(){ if(m_noteon) { m_noteon = 0; return m_note; } else return -1; } short SndMidi::NoteOff(){ if(m_noteoff) { m_noteoff = 0; return m_note; } else return -1; } char* SndMidi::ErrorMessage(){ char* message; switch(m_error){ case 14: message = "Error allocating buffer memory."; break; case 15: message = "Error allocating memory."; break; default: message = SndIO::ErrorMessage(); break; } return message; } #ifdef WIN void MidiDeviceList(){ MIDIINCAPS incaps; unsigned int j; cout << "MIDI Input devices:\ndevice ID: device name\n"; for(j = 0; j < midiInGetNumDevs(); j++){ midiInGetDevCaps(j, &incaps, sizeof(incaps)); cout << j << " : "<< incaps.szPname << "\n"; } } char* MidiInputDeviceName(int dev, char* name){ MIDIINCAPS incaps; if(dev >= 0 && dev < (int) midiInGetNumDevs()){ midiInGetDevCaps(dev, &incaps, sizeof(incaps)); return strcpy(name, incaps.szPname); } else return 0; } #endif #endif SndObj-2.6.7/src/SndMidi.h000644 000766 000024 00000007407 12062673766 015675 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 /***************************************************/ // SndMidi.h: interface of the SndMidi / // (LINUX/CYGWIN/SGI)abstract class, MIDI IO / // / /***************************************************/ #ifndef _SNDMIDI_H #define _SNDMIDI_H #include "SndIO.h" #if defined(OSS) || defined (SGI) #include #include #ifndef SGI #include #endif #ifndef OSS #include #endif #endif // OSS SGI #ifdef WIN #include #include void MidiDeviceList(); char* MidiInputDeviceName(int dev, char* name); #endif enum { NOTE_MESSAGE = -1, PBEND_MESSAGE, MOD_MESSAGE, BREATH_MESSAGE, FREE1, FOOT_MESSAGE, PORT_MESSAGE, VOL_MESSAGE, BAL_MESSAGE, FREE2, PAN_MESSAGE, EXPR_MESSAGE }; const int POLYAFTOUCH_MESSAGE = 129; const int PROGRAM_MESSAGE = 130; const int AFTOUCH_MESSAGE = 128; const int VELOCITY_MESSAGE = 255; const int NOTEOFF_MESSAGE = 256; const int OUTOFRANGE = -128; #ifdef OSS typedef struct __mdevent{ // SGI's midi event struc, borrowed for compat unsigned char msg[4]; // message bytes char* sysexmsg; // system excl (currently not supported) unsigned long long stamp; // time stamp (not used) int msglen; // system excl msg length } MDevent; #endif #ifdef WIN typedef struct { unsigned char msg[4]; } MIDI_event; typedef union { MIDI_event event; DWORD dword; } midi_msg; #endif class SndMidi : public SndIO { protected: short m_noteon; short m_noteoff; unsigned char *m_vel; unsigned char *m_aft; short* m_message; unsigned char m_status; unsigned char m_type; unsigned char m_note; int m_read; int m_count; int m_buffsize; short m_chans; // channels in the range of 0-15 short m_msgflag; // flag to check for new messages #if defined(OSS) || defined(SGI) // OSS& SGI MIDI int m_fd; #ifndef SGI char* m_port; // midi device #endif #ifndef OSS MDport m_port; #endif MDevent* m_event; pollfd m_midifd; #endif // OSS & SGI MIDI #ifdef WIN // Windows MME MIDI MIDI_event* m_event; #endif // Windows MME MIDI public: short NoteOn(); short NoteOff(); char LastNote() { return m_note; } char Velocity(char note){ return m_vel[note];} char LastNoteVelocity(){ return m_vel[m_note];} char Aftertouch(char note) { return m_aft[note]; } char LastNoteAftertouch(){ return m_aft[m_note];} short GetMessage(short channel) { if(channel > 0 && channel <= 16) return m_message[channel-1]; else return OUTOFRANGE;} bool NewMessage(short channel){ channel--; if((1<msg[0]; m_chans = m_status & 15; m_type = m_status >> 4; m_msgflag = (1<msg[1]] = 0; m_note = cur->msg[1]; m_output[m_chans] = (float) m_note; break; case 9: // Note ON if((m_vel[cur->msg[1]] = cur->msg[2]) > 0){ m_message[m_chans] = NOTE_MESSAGE; m_noteon = 1; } else{ m_message[m_chans] = NOTEOFF_MESSAGE; m_noteoff = 1; } m_note = cur->msg[1]; m_output[m_chans] = (float) m_note; break; case 10: // Aftertouch (POLY), m_message[m_chans] = POLYAFTOUCH_MESSAGE; m_aft[cur->msg[1]] = cur->msg[2]; m_output[m_chans] = (float) cur->msg[2]; break; case 11: // Control change m_message[m_chans] = cur->msg[1]; m_output[m_chans] = (float) cur->msg[2]; break; case 12: // Program change m_message[m_chans] = PROGRAM_MESSAGE; m_output[m_chans] = (float) cur->msg[1]; break; case 13: // Aftertouch (MONO) m_message[m_chans] = AFTOUCH_MESSAGE; m_output[m_chans] = (float) cur->msg[1]; break; case 14: // Pitch bend, seems to be byte-reversed... m_message[m_chans] = 0; m_output[m_chans] = (float) cur->msg[2]; m_output[m_chans] += (float)cur->msg[1]*.0078125f; break; default: break; } } #endif short SndMidiIn::Read(){ if(!m_error){ #ifdef WIN if(m_error == MMSYSERR_NOERROR){ if(m_count == m_read) return 0; else { MIDI_event temp = ReadBuf(); PutOutput(&temp); return 1; } } else return 0; #endif #ifdef SGI if(m_count == m_read){ // if all items are sent, poll input if( poll(&m_midifd, 1, 0)){ m_read = mdReceive(m_port, m_event, m_buffsize); m_count = 0; PutOutput(&m_event[m_count]); } else return 0; } else PutOutput(&m_event[m_count]); m_count++; return m_read; #endif #ifdef OSS unsigned char temp[2]; if(poll(&m_midifd, 1, 0)){ read(m_fd, temp, 1); m_event->msg[0] = temp[0]; m_status = m_event->msg[0]; m_chans = m_status & 15; m_type = m_status >> 4; m_msgflag = (1<msg[1] = temp[0]; read(m_fd, temp, 1); m_event->msg[2] = temp[0]; m_message[m_chans] = NOTEOFF_MESSAGE; m_noteoff = 1; m_vel[m_event->msg[1]] = 0; m_output[m_chans] = m_note = m_event->msg[1]; break; case 9: // Note ON read(m_fd, temp, 1); m_event->msg[1] = temp[0]; read(m_fd, temp, 1); m_event->msg[2] = temp[0]; m_vel[m_event->msg[1]] = m_event->msg[2]; if(m_event->msg[2] > 0){ m_message[m_chans] = NOTE_MESSAGE; m_noteon = 1; } else{ m_message[m_chans] = NOTEOFF_MESSAGE; m_noteoff = 1; } m_output[m_chans] = m_note = m_event->msg[1]; break; case 10: // Aftertouch (POLY) read(m_fd, temp, 1); m_event->msg[1] = temp[0]; read(m_fd, temp, 1); m_event->msg[2] = temp[0]; m_vel[m_event->msg[1]] = m_event->msg[2]; m_message[m_chans] = POLYAFTOUCH_MESSAGE; m_aft[m_event->msg[1]] = m_event->msg[2]; m_output[m_chans] = (float) m_event->msg[2]; break; case 11: // Control change read(m_fd, temp, 1); m_event->msg[1] = temp[0]; read(m_fd, temp, 1); m_event->msg[2] = temp[0]; m_vel[m_event->msg[1]] = m_event->msg[2]; m_message[m_chans] = m_event->msg[1]; m_output[m_chans] = (float) m_event->msg[2]; break; case 12: // Program change read(m_fd, temp, 1); m_event->msg[1] = temp[0]; m_message[m_chans] = PROGRAM_MESSAGE; m_output[m_chans] = (float) m_event->msg[1]; break; case 13: // Aftertouch (MONO) read(m_fd, temp, 1); m_event->msg[1] = temp[0]; m_message[m_chans] = AFTOUCH_MESSAGE; m_output[m_chans] = (float) m_event->msg[1]; break; case 14: // Pitch bend, seems to be byte-reversed... read(m_fd, temp, 1); m_event->msg[1] = temp[0]; read(m_fd, temp, 1); m_event->msg[2] = temp[0]; m_vel[m_event->msg[1]] = m_event->msg[2]; m_message[m_chans] = 0; m_output[m_chans] = (float)m_event->msg[2]; m_output[m_chans] += (float)m_event->msg[1]*.0078125; break; default: break; } // endswitch } // endif return 1; #endif } else return 0; } #ifdef WIN void #ifdef VISUALC static #endif CALLBACK midiInputHandler(HMIDIIN hmin, UINT wMsg, DWORD dwInstance, DWORD dwParam1, DWORD dwParam2){ midi_msg msg; SndMidiIn* midi; midi = (SndMidiIn *) dwInstance; switch (wMsg) { case MIM_DATA: msg.dword = dwParam1; midi->WriteBuf(msg.event); break; default: break; } } MIDI_event SndMidiIn::ReadBuf(){ MIDI_event cur = m_event[m_read]; m_read++; m_read %= m_buffsize; return cur; } void SndMidiIn::WriteBuf(MIDI_event event){ m_event[m_count] = event; m_count++; m_count %= m_buffsize; } #endif char* SndMidiIn::ErrorMessage(){ char* message; switch(m_error){ case 21: #ifdef SGI message = "mdOpenInPort() failed."; #endif #ifdef OSS message = "open() failed."; #endif #ifdef WIN switch(m_result){ case MMSYSERR_ALLOCATED: message = "The specified resource is already allocated."; break; case MMSYSERR_BADDEVICEID: message = "The specified device identifier is out of range."; break; case MMSYSERR_INVALFLAG: message = "The flags specified by dwFlags are invalid."; break; case MMSYSERR_INVALPARAM: message = "The specified pointer or structure is invalid. "; break; case MMSYSERR_NOMEM: message = "The system is unable to allocate or lock memory. "; break; default: message = "Undefined Midi Input Open error."; break; } #endif break; case 22: #ifdef WIN message = "midiInStart() failed."; #endif #ifdef SGI message = "mdGetFd() failed."; #endif break; default: message = SndMidi::ErrorMessage(); break; } return message; } #endif SndObj-2.6.7/src/SndMidiIn.h000644 000766 000024 00000004140 12062673766 016153 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 /***************************************************/ // SndMidiIn.h: interface of the SndMidiIn / // (LINUX/CYGWIN/SGI) class, MIDI input / // / /***************************************************/ #ifndef _SNDMIDIIN_H #define _SNDMIDIIN_H #include "SndMidi.h" #ifdef OSS #include #include #include #endif class SndMidiIn : public SndMidi { protected: #ifdef SGI void PutOutput(MDevent* cur); #endif #ifdef WIN HMIDIIN m_handle; MMRESULT m_result; inline void PutOutput(MIDI_event*cur); void WriteBuf(MIDI_event event); MIDI_event ReadBuf(); private: friend #ifdef VISUALC static #endif void #ifndef SWIGFIX CALLBACK #endif midiInputHandler(HMIDIIN, UINT wMsg, DWORD dwInstance, DWORD dwParam1, DWORD dwParam2); #endif public: SndMidiIn(); #if defined (OSS) || defined (SGI) SndMidiIn(char* port, int buffsize = 64); #endif #ifdef WIN SndMidiIn(int port, int buffsize = 64); #endif ~SndMidiIn(); short Read(); char* ErrorMessage(); }; #endif SndObj-2.6.7/src/SndObj.cpp000644 000766 000024 00000011164 12062673766 016053 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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, float 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, float 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 float[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 float DEF_SR = 44100.f; struct msg_link { string msg; int ID; msg_link *previous; }; class SndObj { protected: float* m_output; // output samples SndObj* m_input; // input object float 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(float x){ union { float 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(float fval) { return (int) fval; } int Ftoi(double 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+=(float val){ for(int n = 0; n < m_vecsize; n++) m_output[n] = m_output[n]+val; return *this; } SndObj& operator-=(float val){ for(int n = 0; n < m_vecsize; n++) m_output[n] = m_output[n]-val; return *this; } SndObj& operator*=(float 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+(float 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-(float 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*(float 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<<(float val){ if(m_vecpos >= m_vecsize) m_vecpos=0; m_output[m_vecpos++] = val; } void operator<<(float* vector){ for(m_vecpos=0;m_vecpos>(SndIO& out); void operator<<(SndIO& in); #endif int PushIn(float *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(float *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(float *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; } float 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; } float GetSr(){ return m_sr;} virtual void SetSr(float sr){ m_sr = sr;} virtual int Set(char* mess, float 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, float 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 SndObj-2.6.7/src/SndPVOCEX.cpp000644 000766 000024 00000020014 12062673766 016337 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 "SndPVOCEX.h" SndPVOCEX::SndPVOCEX(char* name, short mode, int analformat, int windowtype, short channels, int channelmask, short bits, int format, SndObj** inputlist, float framepos, int hopsize, int fftsize, float sr): SndWaveX(name,mode,channels,channelmask, bits, format, inputlist,framepos,fftsize+2, sr) { short cbsize; m_len = 80; m_format = WAVE_FORMAT_EXTENSIBLE; m_hdrsize = 100; // printf("bits %i mode %i fftsize %i\n", bits, mode, fftsize); if(mode != READ){ // if output int mask; short sbits; m_hopsize = hopsize; SetVectorSize (fftsize); GUID subfmt; cbsize = SHORT_LE((short)62); PutHeader(0,m_hdrsize,m_len, m_format); sbits = SHORT_LE((short)bits); m_bits = bits; // mask = LONG_LE((long) (m_ChannelMask = channelmask)); subfmt.Data1 = LONG_LE(0x8312B9C2); subfmt.Data2 = SHORT_LE(0x2E6E); subfmt.Data3 = SHORT_LE(0x11d4); subfmt.Data4[0] = 0xA8; subfmt.Data4[1] =0x24; subfmt.Data4[2] = 0xDE; subfmt.Data4[3] = 0x5B; subfmt.Data4[4] = 0x96; subfmt.Data4[5] = 0xC3; subfmt.Data4[6] = 0xAB; subfmt.Data4[7] = 0x21; m_SubFormat = subfmt; m_pvheader.dwVersion = LONG_LE(1); m_pvheader.dwDataSize = LONG_LE(32L); m_pvheader.data.wWordFormat = SHORT_LE((short)(m_bits != 64 ? IEEE_FLOAT_T : IEEE_DOUBLE_T)); m_pvheader.data.wAnalFormat = SHORT_LE((short)analformat); m_pvheader.data.wSourceFormat = SHORT_LE((short)m_subformat); m_pvheader.data.wWindowType = SHORT_LE((short)windowtype); m_pvheader.data.nAnalysisBins = LONG_LE((long)(fftsize/2) + 1); m_pvheader.data.dwWinlen = LONG_LE((long)fftsize); m_pvheader.data.dwOverlap = LONG_LE((long)m_hopsize); m_pvheader.data.dwFrameAlign = LONG_LE((long)((fftsize/2)+1)*2*m_bits); //m_bits m_pvheader.data.fAnalysisRate = FLOAT32_LE(m_sr/m_hopsize); m_pvheader.data.fWindowParam = FLOAT32_LE(0.f); if(mode != APPEND){ fseek(m_file, sizeof(wave_head), SEEK_SET); fwrite(&cbsize, sizeof(short), 1, m_file); fwrite(&sbits, sizeof(short), 1, m_file); fwrite(&mask, sizeof(int), 1, m_file); fwrite(&subfmt, sizeof(GUID), 1, m_file); fwrite(&m_pvheader, sizeof(pvocex), 1, m_file); m_wchkpos = ftell(m_file); fwrite(&m_wdata, sizeof(wave_data), 1, m_file); m_datapos = ftell(m_file); if(framepos > 0) SetTimePos(framepos); } else m_wchkpos = sizeof(wave_head) + 22 + sizeof(pvocex) + 2; } // output else { // if INPUT fseek(m_file, sizeof(wave_head)+2+22, SEEK_SET); fread(&m_pvheader, sizeof(pvocex),1, m_file); if(GUIDcheck(KSDATAFORMAT_SUBTYPE_PVOC)){ // check for GUID m_pvheader.dwVersion = LONG_LE(m_pvheader.dwVersion ); m_pvheader.dwDataSize = LONG_LE( m_pvheader.dwDataSize ); m_pvheader.data.wWordFormat = SHORT_LE(m_pvheader.data.wWordFormat ); m_pvheader.data.wAnalFormat = SHORT_LE(m_pvheader.data.wAnalFormat); m_pvheader.data.wSourceFormat = SHORT_LE(m_pvheader.data.wSourceFormat); m_pvheader.data.wWindowType = SHORT_LE(m_pvheader.data.wWindowType ); m_pvheader.data.nAnalysisBins = LONG_LE(m_pvheader.data.nAnalysisBins ); m_pvheader.data.dwWinlen = LONG_LE(m_pvheader.data.dwWinlen ); m_pvheader.data.dwOverlap = LONG_LE(m_pvheader.data.dwOverlap ); m_pvheader.data.dwFrameAlign = LONG_LE(m_pvheader.data.dwFrameAlign ); m_pvheader.data.fAnalysisRate = FLOAT32_LE(m_pvheader.data.fAnalysisRate); m_pvheader.data.fWindowParam = FLOAT32_LE(m_pvheader.data.fWindowParam); m_ispvocex = true; } else { m_ispvocex = false; m_error = 61; } fseek(m_file, 108, SEEK_SET); if(framepos > 0) SetTimePos(framepos); } // INPUT } SndPVOCEX::~SndPVOCEX(){ } void SndPVOCEX::GetHeader(WAVEFORMATPVOCEX* pheader){ SndWaveX::GetHeader((WAVEFORMATEXTENSIBLE*) pheader); pheader->pvocformat_ext.dwVersion = m_pvheader.dwVersion; pheader->pvocformat_ext.dwDataSize = m_pvheader.dwDataSize; pheader->pvocformat_ext.data.wWordFormat = m_pvheader.data.wWordFormat; pheader->pvocformat_ext.data.wAnalFormat = m_pvheader.data.wAnalFormat; pheader->pvocformat_ext.data.wSourceFormat = m_pvheader.data.wSourceFormat; pheader->pvocformat_ext.data.wWindowType = m_pvheader.data.wWindowType; pheader->pvocformat_ext.data.nAnalysisBins = m_pvheader.data.nAnalysisBins; pheader->pvocformat_ext.data.dwWinlen = m_pvheader.data.dwWinlen; pheader->pvocformat_ext.data.dwOverlap = m_pvheader.data.dwOverlap; pheader->pvocformat_ext.data.dwFrameAlign = m_pvheader.data.dwFrameAlign; pheader->pvocformat_ext.data.fAnalysisRate = m_pvheader.data.fAnalysisRate; pheader->pvocformat_ext.data.fWindowParam = m_pvheader.data.fWindowParam; } void SndPVOCEX::SetTimePos(float pos){ int framep = (int)(pos*m_sr/m_hopsize); framep *= (GetFFTSize()+2)*m_channels*(m_bits/8); if(!fseek(m_file,m_datapos+framep, SEEK_SET)) m_eof = 0; else m_eof=1; } short SndPVOCEX::Write(){ if(!m_error && (m_mode != READ)){ int i,n; switch(m_bits){ case 32: for(i = 0, n= 0; i < m_channels; i++){ if(m_IOobjs[i]){ m_fp[n++] = FLOAT32_LE(m_IOobjs[i]->Output(0)); m_fp[n++] = FLOAT32_LE(0.f); for(m_vecpos=2; m_vecpos < m_vecsize-2; m_vecpos++, n++) m_fp[n] = FLOAT32_LE(m_IOobjs[i]->Output(m_vecpos)); m_fp[n++] = FLOAT32_LE(m_IOobjs[i]->Output(1)); m_fp[n++] = FLOAT32_LE(m_sr/2); } else for(m_vecpos=0; m_vecpos < m_vecsize; m_vecpos++, n++) m_fp[n] = FLOAT32_LE(0.f); } return (short) fwrite(m_fp, m_buffsize, 1, m_file); case 64: for(i = 0, n= 0; i < m_channels; i++){ if(m_IOobjs[i]){ m_dp[n++] = DOUBLE_LE(m_IOobjs[i]->Output(0)); m_dp[n++] = DOUBLE_LE(0.0); for(m_vecpos=2; m_vecpos < m_vecsize-2; m_vecpos++, n++) m_dp[n] = DOUBLE_LE(m_IOobjs[i]->Output(m_vecpos)); m_dp[n++] = DOUBLE_LE(m_IOobjs[i]->Output(1)); m_dp[n++] = DOUBLE_LE(m_sr/2); } else for(m_vecpos=0; m_vecpos < m_vecsize; m_vecpos++, n++) m_dp[n] = DOUBLE_LE(0.0); } return (short) fwrite(m_dp, m_buffsize, 1, m_file); } } return 0; } short SndPVOCEX::Read(){ if(!m_error && (m_mode == READ) && !feof(m_file)){ int i,n; short items; items = fread(m_buffer, 1, m_buffsize, m_file); items /= m_sampsize; switch(m_bits) { case 32: for(n=0, i=0; i < m_channels; i++){ m_output[n] = FLOAT32_LE(m_fp[n]); n++; m_output[n] = FLOAT32_LE(m_fp[(m_vecsize-2)+n]); n++; for(m_vecpos=2; m_vecpos < m_vecsize-2; m_vecpos++, n++) m_output[n] = FLOAT32_LE(m_fp[n]); } break; case 64: for(n=0, i=0; i < m_channels; i++){ m_output[n] = FLOAT32_LE((float)m_dp[n]); n++; m_output[n] = FLOAT32_LE((float)m_dp[(m_vecsize-2)+n]); n++; for(m_vecpos=2; m_vecpos < m_vecsize-2; m_vecpos++, n++) m_output[n] = FLOAT32_LE((float)m_dp[n]); } break; } return items; } else for(m_vecpos=0; m_vecpos < m_vecsize; m_vecpos++) m_output[m_vecpos] = 0.f; return 0; } SndObj-2.6.7/src/SndPVOCEX.h000644 000766 000024 00000006557 12062673766 016024 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 _SNDPVOCEX_H #define _SNDPVOCEX_H #include "SndWaveX.h" struct pvoc_data { short wWordFormat; /* IEEE_FLOAT or IEEE_DOUBLE */ short wAnalFormat; /*PVOC_AMP_FREQ, PVOC_AMP_PHASE, PVOC_COMPLEX */ short wSourceFormat; /* WAVE_FORMAT_PCM or WAVE_FORMAT_IEEE_FLOAT*/ short wWindowType; /* defines the standard analysis window used, or a custom window */ int nAnalysisBins; /* number of analysis channels. The FFT window size is derived from this */ int dwWinlen; /* analysis window length, in samples */ int dwOverlap; /* window overlap length in samples (decimation) */ int dwFrameAlign; /* usually nAnalysisBins * 2 * sizeof(float) */ float fAnalysisRate; /* sample rate / Overlap */ float fWindowParam; /* parameter associated with some window types: default 0.0f unless needed */ }; struct pvocex{ int dwVersion; /* initial version is 1*/ int dwDataSize; /* sizeof PVOCDATA data block */ pvoc_data data; /* 32 byte block */ }; enum pvoc_datatype {IEEE_FLOAT_T, IEEE_DOUBLE_T}; enum pvoc_frametype {PVOC_AMP_FREQ=0, PVOC_AMP_PHASE,PVOC_COMPLEX}; enum pvoc_windowtype {DEFAULT=0, HAMMING, HANNING, KAISER, RECTANGULAR, CUSTOM }; struct WAVEFORMATPVOCEX { wave_head waveformatex; wav_ex waveformat_ext; pvocex pvocformat_ext; }; const GUID KSDATAFORMAT_SUBTYPE_PVOC = { 0x8312b9c2, 0x2e6e, 0x11d4, { 0xa8, 0x24, 0xde, 0x5b, 0x96, 0xc3, 0xab, 0x21 } }; class SndPVOCEX : public SndWaveX { protected: pvocex m_pvheader; int m_hopsize; bool m_ispvocex; public: SndPVOCEX(char* name, short mode = OVERWRITE, int analformat=PVOC_AMP_FREQ, int windowtype=HANNING, short channels=1, int channelmask=0, short bits=32, int format=PCM, SndObj** inputlist=0, float framepos= 0.f, int hopsize = DEF_VECSIZE, int fftsize = DEF_FFTSIZE, float sr = DEF_SR); ~SndPVOCEX(); int GetFFTSize(){ return (m_pvheader.data.nAnalysisBins-1)*2;} int GetHopSize(){ return m_pvheader.data.dwOverlap; } int GetWindowType() { return m_pvheader.data.wWindowType; } int GetWindowLength() { return m_pvheader.data.dwWinlen; } void GetHeader(WAVEFORMATPVOCEX* pheader); void SetTimePos(float pos); short Read(); short Write(); bool IsPvocex(){ return m_ispvocex; } }; #endif SndObj-2.6.7/src/SndRead.cpp000644 000766 000024 00000011363 12062673766 016215 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 "SndRead.h" #include "SndWave.h" #include "SndAiff.h" SndRead::SndRead(){ m_pitch = 1.f; m_pos = 0.; m_scale = 1.f; m_ioinput = 0; m_outobj = 0; m_channels = 0; m_count = 0; m_fileopen = false; AddMsg("pitch", 21); AddMsg("scale", 22); } SndRead::SndRead(char* name, float pitch, float scale, int vecsize, float sr) : SndObj(0, vecsize, sr) { m_pitch= fabs(pitch); m_count = 0; m_pos = 0.; m_scale = scale; m_fileopen = false; int i; int type = 0; int size = strlen(name); if((name[size-3] == 'w') && (name[size-2] == 'a') && (name[size-1] == 'v')) type = 1; else if((name[size-3] == 'a') && (name[size-2] == 'i') && (name[size-1] == 'f')) type = 2; switch (type){ case 1: m_ioinput = new SndWave(name, READ, 1, 16,0,0,vecsize*2); if(!((SndWave *)m_ioinput)->IsWave()) m_error = 21; break; case 2: m_ioinput = new SndAiff(name, READ, 1, 16,0,0,vecsize*2); if(!((SndAiff *)m_ioinput)->IsAiff()) m_error = 21; break; default: m_ioinput = new SndFIO(name, READ, 1, 16,0,0,vecsize*2); break; } if(m_ioinput->Error() != 0){ m_error = 23; delete m_ioinput; } else { m_fileopen = true; if(m_sr != m_ioinput->GetSr()) m_error = 22; m_channels = m_ioinput->GetChannels(); m_outobj = new SndObj*[m_channels]; for(i=0;i< m_channels; i++) m_outobj[i] = new SndObj(0,vecsize,sr); } AddMsg("pitch", 21); AddMsg("scale", 22); } SndRead::~SndRead(){ if(m_fileopen == true){ delete m_ioinput; delete[] m_outobj; } } int SndRead::Set(char* mess, float value){ switch (FindMsg(mess)){ case 21: m_pitch = value; return 1; case 22: m_scale = value; return 1; default: return SndObj::Set(mess,value); } } void SndRead::SetInput(char* name){ if(m_ioinput) { delete m_ioinput; delete[] m_outobj; } int type = 0; int i; for(i = 0; name[i] == '.' || name[i] == '\0'; i++); if((name[i] != '\0') && (name[i+1] == 'w') && (name[i+2] == 'a') && (name[i+3] == 'v')) type = 1; else if((name[i] != '\0') && (name[i+1] == 'a') && (name[i+2] == 'i') && (name[i+3] == 'f')) type = 2; switch (type){ case 1: m_ioinput = new SndWave(name, READ, 1, 16,0,0,m_vecsize*2); if(!((SndWave *)m_ioinput)->IsWave()) m_error = 21; break; case 2: m_ioinput = new SndAiff(name, READ, 1, 16,0,0,m_vecsize*2); if(!((SndAiff *)m_ioinput)->IsAiff()) m_error = 21; break; default: m_ioinput = new SndFIO(name, READ, 1, 16,0,0,m_vecsize*2); break; } if(m_ioinput->Error() != 0){ m_error = 23; delete m_ioinput; } else { m_fileopen = true; if(m_sr != m_ioinput->GetSr()) m_error = 22; m_channels = m_ioinput->GetChannels(); m_outobj = new SndObj*[m_channels]; for(i=0;i< m_channels; i++) m_outobj[i] = new SndObj(0,m_vecsize, m_sr); } } short SndRead::DoProcess(){ if(!m_error && m_ioinput){ if(!m_ioinput->Eof()) { float out, outsum= 0.f; for(m_vecpos = 0; m_vecpos < m_vecsize; m_vecpos++){ if(m_pos >= m_count/m_channels){ m_pos -= (m_count/m_channels); m_count = m_ioinput->Read(); } if(m_count && m_enable){ for(int i=0; i < m_channels; i++){ out = m_scale*m_ioinput->Output(Ftoi(m_pos), i+1); outsum += out; *(m_outobj[i]) << out; } m_output[m_vecpos] = outsum/m_channels; m_pos += m_pitch; outsum = 0.f; } else { for(int i=0; i < m_channels; i++) *(m_outobj[i]) << 0.f; m_output[m_vecpos] = 0; } } } else { for(m_vecpos = 0; m_vecpos < m_vecsize; m_vecpos++) { for(int i=0; i < m_channels; i++) *(m_outobj[i]) << 0.f; m_output[m_vecpos] = 0; } } return 1; } return 0; } SndObj-2.6.7/src/SndRead.h000644 000766 000024 00000003173 12062673766 015662 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 SndRead_h_ #define SndRead_h_ #include "SndObj.h" #include "SndFIO.h" class SndRead : public SndObj { protected: SndFIO* m_ioinput; SndObj** m_outobj; float m_pitch; double m_pos; float m_scale; int m_channels; int m_count; bool m_fileopen; public: SndObj* Outchannel(int channel){ return m_outobj[channel%m_channels];} SndRead(); SndRead(char* name, float pitch=1.f, float scale=1.f, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~SndRead(); void SetInput(char* name); void SetScale(float scale){ m_scale = scale; } void SetPitch(float pitch) { m_pitch = fabs(pitch); } int Set(char* mess, float value); short DoProcess(); }; #endif SndObj-2.6.7/src/SndRTIO.cpp000644 000766 000024 00000100157 12062673766 016117 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 ///////////////////////////////////////////////////// // SndRTIO.cpp: implementation of the SndRTIO class // realtime audio IO // currently supported on Irix, Linux (with OSS), Mac OSX (CoreAudio) // and Windows // #ifndef NO_RTIO #if defined (SGI) || defined (OSS) || defined (WIN) || defined (ALSA) #include "SndRTIO.h" void SndRTIO :: SndRTIO_init(short channels, int mode, int buffsize, #if defined (WIN) || defined (ALSA) int buffno, #endif #ifdef SGI int DACQueue, #endif #ifdef OSS int DMAbuffsize, #endif int encoding, SndObj** inputs, int vecsize, float sr, #if defined (WIN) || defined (SGI) int dev) #endif #if defined (OSS) || defined (ALSA) char* device) #endif { m_mode = mode; #ifdef WIN short bytes_per_sample = encoding; int n; m_buffsize = buffsize; m_buffno = buffno; m_encoding = encoding; m_ndx = 0; m_dev = dev; m_firsttime = true; m_items = buffsize*m_channels; m_count = buffsize*m_channels; m_wfx = new WAVEFORMATEX; m_hData = new HANDLE[m_buffno]; m_pwhdr = new WAVEHDR*[m_buffno]; m_hwhdr = new HGLOBAL[m_buffno]; m_buffer = new void*[m_buffno]; for(n = 0; n < m_buffno; n++){ m_hData[n] = GlobalAlloc(GMEM_MOVEABLE | GMEM_SHARE, buffsize*bytes_per_sample*m_channels); if(!(m_buffer[n] = GlobalLock(m_hData[n]))){ m_error = 14; return; } m_hwhdr[n] = GlobalAlloc(GMEM_MOVEABLE | GMEM_SHARE, sizeof(WAVEHDR)); if(!(m_pwhdr[n] = (WAVEHDR *)GlobalLock(m_hwhdr[n]))){ m_error = 14; return; } m_pwhdr[n]->lpData = (char *) m_buffer[n]; m_pwhdr[n]->dwBufferLength = m_buffsize*bytes_per_sample*m_channels; m_pwhdr[n]->dwLoops = 0; m_pwhdr[n]->dwFlags = 0; memset(m_buffer[n], 0, m_pwhdr[n]->dwBufferLength); } m_sp = (short *) m_buffer[m_ndx]; m_cp = (char *) m_buffer[m_ndx]; // fill formatex structure m_wfx->wFormatTag = WAVE_FORMAT_PCM; m_wfx->nChannels = m_channels; m_wfx->nSamplesPerSec = (long) m_sr; m_wfx->nBlockAlign = (unsigned short)(m_channels*m_encoding); m_wfx->nAvgBytesPerSec = (long)(m_sr*m_encoding*m_channels); m_wfx->wBitsPerSample = m_encoding*8; if(m_mode == SND_INPUT){ MMRESULT result; m_cur = 0; // open output and prepare header if(result = waveInOpen(&m_hwi, m_dev, m_wfx, 0, 0, CALLBACK_NULL)) switch (result){ case MMSYSERR_NOERROR: break; case MMSYSERR_ALLOCATED: //Specified resource is already allocated. m_error = 21; #ifdef DEBUG cout << ErrorMessage(); #endif return ; case MMSYSERR_BADDEVICEID: //Specified device identifier is out of range. m_error = 22; #ifdef DEBUG cout << ErrorMessage(); #endif return ; case MMSYSERR_NODRIVER: //No device driver is present. m_error = 23; #ifdef DEBUG cout << ErrorMessage(); #endif return ; case MMSYSERR_NOMEM: //Unable to allocate or lock memory. m_error = 24; #ifdef DEBUG cout << ErrorMessage(); #endif return ; case WAVERR_BADFORMAT: //Attempted to open with an unsupported waveform-audio format. m_error = 25; #ifdef DEBUG cout << ErrorMessage(); #endif return ; default: return; } for(int n = 0; n < m_buffno; n++){ if(result = waveInPrepareHeader(m_hwi, m_pwhdr[n], sizeof(WAVEHDR))) switch (result){ case MMSYSERR_NODRIVER: //No device driver is present. m_error = 23; #ifdef DEBUG cout << ErrorMessage(); #endif return ; case MMSYSERR_NOMEM: //Unable to allocate or lock memory. m_error = 24; #ifdef DEBUG cout << ErrorMessage(); #endif return ; default: return ; } //switch } //for waveInStart(m_hwi); } else { // if OUTPUT MMRESULT result; // open output and prepare header if(result = waveOutOpen(&m_hwo, m_dev, m_wfx, 0, 0, CALLBACK_NULL)) switch (result){ case MMSYSERR_NOERROR: break; case MMSYSERR_ALLOCATED: //Specified resource is already allocated. m_error = 21; #ifdef DEBUG cout << ErrorMessage(); #endif return ; case MMSYSERR_BADDEVICEID: //Specified device identifier is out of range. m_error = 22; #ifdef DEBUG cout << ErrorMessage(); #endif return ; case MMSYSERR_NODRIVER: //No device driver is present. m_error = 23;cout << ErrorMessage(); return ; case MMSYSERR_NOMEM: //Unable to allocate or lock memory. m_error = 24; #ifdef DEBUG cout << ErrorMessage(); #endif return ; case WAVERR_BADFORMAT: //Attempted to open with an unsupported waveform-audio format. m_error = 25; #ifdef DEBUG cout << ErrorMessage(); #endif return ; default: return; } for(int n = 0; n < m_buffno; n++){ if(result = waveOutPrepareHeader(m_hwo, m_pwhdr[n], sizeof(WAVEHDR))) switch (result){ case MMSYSERR_NODRIVER: //No device driver is present. m_error = 23; #ifdef DEBUG cout << ErrorMessage(); #endif return ; case MMSYSERR_NOMEM: //Unable to allocate or lock memory. m_error = 24; #ifdef DEBUG cout << ErrorMessage(); #endif return ; default: return ; } //switch } //for } #endif // if defined WIN !!!!!!!!!!!!!!! #ifdef SGI int wsize, fmt; m_channels = channels; m_encoding = encoding; // set the encoding format switch(m_encoding) { case FLOATSAM: fmt = AL_SAMPFMT_FLOAT; m_buffsize = buffsize; if(!(m_buffer = new float[m_buffsize*m_channels])){ m_error = 14; return; } m_fp = (float *)m_buffer; break; case BYTESAM: fmt = AL_SAMPFMT_TWOSCOMP; wsize = AL_SAMPLE_8; m_buffsize = buffsize; if(!(m_buffer = new char[m_buffsize*m_channels])){ m_error = 11; return; } m_cp = (char *)m_buffer; break; case SHORTSAM: fmt = AL_SAMPFMT_TWOSCOMP; wsize = AL_SAMPLE_16; m_buffsize = buffsize; if(!(m_buffer = new short[m_buffsize*m_channels])){ m_error = 11; return; } m_sp = (short *)m_buffer; break; case LONGSAM: fmt = AL_SAMPFMT_TWOSCOMP; wsize = AL_SAMPLE_24; m_buffsize = buffsize; if(!(m_buffer = new long[m_buffsize*m_channels])){ m_error = 11; return; } m_lp = (long *)m_buffer; break; default: m_error = 12; //bad sample encoding return; } m_dev = dev; // get new config if(!(m_config = alNewConfig())) { m_error = 13; // message = "alNewConfig() failed." return; } // set the new config if (alSetQueueSize(m_config, DACqueue) < 0) { m_error = 14; // message = "alSetQueueSize() failed." return; } if (alSetChannels(m_config, m_channels) < 0) { m_error = 15; // message = "alSetChannels() failed." return; } if (alSetSampFmt(m_config, fmt) < 0) { m_error = 16; // message = "alSetSampFmt() failed." return; } if(m_encoding){ if (alSetWidth(m_config, wsize) < 0) { m_error = 17; // message = "alSetWidth() failed" return; } } ALpv rpv[2]; rpv[0].param = AL_RATE; rpv[0].value.ll = alDoubleToFixed((double)m_sr); rpv[1].param = AL_MASTER_CLOCK; rpv[1].value.i = AL_CRYSTAL_MCLK_TYPE; if(m_mode == SND_INPUT){ if(m_dev == AL_DEFAULT) m_dev = AL_DEFAULT_INPUT; if(alSetDevice(m_config, m_dev) < 0) { m_error = 18; // message = "alSetDevice() failed" return; } if (alSetParams(m_dev, rpv, 2) < 0) { m_error = 19; // message = "alSetParams() failed" return; } m_port = alOpenPort("SndIO audio input", "r", m_config); if (!m_port) { m_error = 21; // message = "alOpenPort() failed" return; } m_items = buffsize*m_channels; m_count = buffsize*m_channels; } else { if(alSetDevice(m_config, m_dev) < 0) { m_error = 18; // message = "alSetDevice() failed" return; } if (alSetParams(m_dev, rpv, 2) < 0) { m_error = 19; // message = "alSetParams() failed" return; } m_port = alOpenPort("SndIO audio output", "w", m_config); if (!m_port) { m_error = 21; // message = "alOpenPort() failed" return; } m_items = buffsize*m_channels; m_count = 0; } #endif // if defined SGI !!!!!!!!!!!!!!!! #ifdef OSS int fmt, param; m_channels = channels; m_encoding = encoding; // set the encoding format switch(m_encoding) { case BYTESAM: fmt = AFMT_U8; m_buffsize = buffsize*m_channels; if(!(m_buffer = new char[buffsize*m_channels])){ m_error = 11; return; } m_cp = (char *)m_buffer; break; case SHORTSAM_LE: fmt = AFMT_S16_LE; m_buffsize = buffsize*2*m_channels; if(!( m_buffer = new short[buffsize*m_channels])){ m_error = 11; return; } m_sp = (short *)m_buffer; break; case SHORTSAM_BE: fmt = AFMT_S16_BE; m_buffsize = buffsize*2*m_channels; if(!(m_buffer = new short[buffsize*m_channels])){ m_error = 11; return; } m_sp = (short *)m_buffer; break; default: m_error = 10; //bad sample encoding return; } if(m_mode == SND_INPUT){ if((m_dev = open(device, O_RDONLY)) == -1){ m_error = 12; // open failed return; } m_items = buffsize*m_channels; m_count = buffsize*m_channels; } else { if((m_dev = open(device, O_WRONLY)) == -1){ m_error = 12; // open failed return; } m_items = buffsize*m_channels; m_count = 0; } int fragsize = 1; param = 0; while (fragsize < DMAbuffsize){ fragsize <<= 1; param++; } param |= 0x00ff0000; if(ioctl(m_dev, SNDCTL_DSP_SETFRAGMENT, ¶m) == -1){ m_error = 13; // couldn't set the DMA buffer size return; }; param = fmt; if(ioctl(m_dev, SNDCTL_DSP_SETFMT, ¶m) == -1) { m_error = 15; // couldn't set the output format return; } param = m_channels; if( ioctl(m_dev, SNDCTL_DSP_CHANNELS, ¶m) == -1) { m_error = 14; // couldn't set the output channel number return; } param = (int) m_sr; if(ioctl(m_dev, SNDCTL_DSP_SPEED, ¶m) == -1) { m_error = 16; // couldn't st the output sample rate return; } #endif // if defined OSS !!!!!!!!!!!!!!!!!!! #ifdef ALSA // alsa IO snd_pcm_format_t fmt; snd_pcm_stream_t stream; snd_pcm_hw_params_t *hwparams; m_channels = channels; m_encoding = encoding; // set the encoding format switch(m_encoding) { case BYTESAM: fmt = SND_PCM_FORMAT_U8; m_buffsize = buffsize*m_channels; if(!(m_buffer = new char[buffsize*m_channels])){ m_error = 11; return; } m_cp = (char *)m_buffer; break; case SHORTSAM_LE: fmt = SND_PCM_FORMAT_S16_LE; m_buffsize = buffsize*2*m_channels; if(!( m_buffer = new short[buffsize*m_channels])){ m_error = 11; return; } m_sp = (short *)m_buffer; m_encoding = SHORTSAM; break; case SHORTSAM_BE: fmt = SND_PCM_FORMAT_S16_BE; m_buffsize = buffsize*2*m_channels; if(!(m_buffer = new short[buffsize*m_channels])){ m_error = 11; return; } m_sp = (short *)m_buffer; m_encoding = SHORTSAM; break; case TWENTYFOUR_LE: fmt = SND_PCM_FORMAT_S24_LE; m_buffsize = buffsize*4*m_channels; if(!(m_buffer = new short[buffsize*m_channels])){ m_error = 11; return; } m_lp = (long *)m_buffer; break; case TWENTYFOUR_BE: fmt = SND_PCM_FORMAT_S24_BE; m_buffsize = buffsize*4*m_channels; if(!(m_buffer = new short[buffsize*m_channels])){ m_error = 11; return; } m_lp = (long *)m_buffer; break; case LONGSAM_LE: fmt = SND_PCM_FORMAT_S32_LE; m_buffsize = buffsize*4*m_channels; if(!(m_buffer = new short[buffsize*m_channels])){ m_error = 11; return; } m_lp = (long *)m_buffer; break; case LONGSAM_BE: fmt = SND_PCM_FORMAT_S32_BE; m_buffsize = buffsize*4*m_channels; if(!(m_buffer = new short[buffsize*m_channels])){ m_error = 11; return; } m_lp = (long *)m_buffer; break; default: m_error = 10; //bad sample encoding return; } if(m_mode == SND_INPUT){ stream = SND_PCM_STREAM_CAPTURE; if((snd_pcm_open(&m_dev, device, stream, 0)) < 0){ m_error = 12; // open failed return; } m_items = buffsize*m_channels; m_count = buffsize*m_channels; } else { stream = SND_PCM_STREAM_PLAYBACK; if((snd_pcm_open(&m_dev, device, stream, 0)) < 0){ m_error = 12; // open failed return; } m_items = buffsize*m_channels; m_count = 0; } snd_pcm_hw_params_alloca(&hwparams); if(snd_pcm_hw_params_any(m_dev, hwparams) < 0){ cerr << "cannot configure device\n"; return; } if(snd_pcm_hw_params_set_access(m_dev, hwparams, SND_PCM_ACCESS_RW_INTERLEAVED) < 0) { m_error = 18; // couldn't st the access return; } if(snd_pcm_hw_params_set_format(m_dev, hwparams, fmt) < 0) { m_error = 15; // couldn't set the output format //return; } if(snd_pcm_hw_params_set_rate(m_dev, hwparams, (int)m_sr, 0) < 0) { m_error = 16; // couldn't st the output sample rate //return; } if( snd_pcm_hw_params_set_channels(m_dev, hwparams, m_channels) < 0) { m_error = 14; // couldn't set the output channel number //return; } if(snd_pcm_hw_params_set_periods(m_dev, hwparams, buffno, 0) < 0){ m_error = 13; //return; } // buffsize is number of buffer frames ! if(snd_pcm_hw_params_set_buffer_size(m_dev, hwparams, buffsize*buffno) < 0) { m_error = 17; // couldn't set the buffer size //return; } if(snd_pcm_hw_params(m_dev, hwparams) < 0) { m_error = 19; // couldn't st the params return; } /* snd_pcm_sw_params_t *swparams; snd_pcm_sw_params_current(m_dev, swparams); snd_pcm_sw_params_set_start_threshold(m_dev,swparams,buffsize); snd_pcm_sw_params_set_avail_min(m_dev,swparams, buffsize); snd_pcm_sw_params_set_xfer_align(m_dev,swparams,1); snd_pcm_sw_params(m_dev,swparams); */ #endif // if defined ALSA !!!!!!!!!!!!!!!!!!! m_error = 0; } SndRTIO::~SndRTIO(){ #ifdef WIN if(m_mode == SND_INPUT){ waveInStop(m_hwi); waveInReset(m_hwi); for(int n = 0; n < m_buffno; n++){ // while(!(m_pwhdr[n]->dwFlags & WHDR_DONE)) Sleep(1); waveInUnprepareHeader(m_hwi,m_pwhdr[n], sizeof(WAVEHDR)); GlobalFree(m_hData[n]); GlobalFree(m_hwhdr[n]); } waveInClose(m_hwi); } else { for (int n = 0; n < m_buffno; n++){ // while(!(m_pwhdr[n]->dwFlags & WHDR_DONE)) Sleep(1); waveOutUnprepareHeader(m_hwo,m_pwhdr[n], sizeof(WAVEHDR)); GlobalFree(m_hData[n]); GlobalFree(m_hwhdr[n]); } waveOutReset(m_hwo); waveOutClose(m_hwo); } delete[] m_hwhdr; delete[] m_pwhdr; delete[] m_hData; delete[] m_buffer; #endif // WIN #ifdef SGI alClosePort(m_port); delete[] m_buffer; #endif // SGI #ifdef OSS close(m_dev); if(m_encoding == BYTESAM) delete[] m_cp; else delete[] m_sp; #endif // OSS #ifdef ALSA if(m_encoding == SND_OUTPUT) snd_pcm_drain(m_dev); snd_pcm_close(m_dev); delete[] (char *)m_buffer; #endif // alsa } #ifdef WIN void inline SndRTIO::Reads(){ if(m_count == m_items){ if(m_firsttime || (m_pwhdr[m_cur]->dwFlags & WHDR_DONE)){ waveInAddBuffer(m_hwi, m_pwhdr[m_cur], sizeof(WAVEHDR)); m_cur++; if(m_cur == m_buffno) m_cur = 0; } m_sp = (short *) m_buffer[m_ndx]; m_ndx++; m_count = 0; if(m_ndx == m_buffno){ m_ndx = 0; m_firsttime = false; } } if(!m_firsttime) while(!(m_pwhdr[m_ndx]->dwFlags & WHDR_DONE)) Sleep(1); for(int n = 0; n < m_channels; n++) m_output[m_vecpos+n] = (float) m_sp[n+m_count]; return; } void inline SndRTIO::Readc(){ if(m_count == m_items){ if(m_firsttime || (m_pwhdr[m_cur]->dwFlags & WHDR_DONE)){ waveInAddBuffer(m_hwi, m_pwhdr[m_cur], sizeof(WAVEHDR)); m_cur++; if(m_cur == m_buffno) m_cur = 0; } m_cp = (char *) m_buffer[m_ndx]; m_ndx++; m_count = 0; if(m_ndx == m_buffno){ m_ndx = 0; m_firsttime = false; } } if(!m_firsttime) while(!(m_pwhdr[m_ndx]->dwFlags & WHDR_DONE)) Sleep(1); for(int n = 0; n < m_channels; n++) m_output[m_vecpos+n] = (float) m_cp[n+m_count]; return; } short SndRTIO::Read(){ // remember: m_vecsize is measured in frames! if(!m_error && m_mode == SND_INPUT){ for(m_vecpos = 0; m_vecpos < m_samples; m_vecpos+=m_channels){ (m_encoding == SHORTSAM ? Reads() : Readc()); m_count+=m_channels; } return 1; } else return 0; } void inline SndRTIO::Writes(){ if(m_count == m_items){ if(!m_firsttime) while(!(m_pwhdr[m_ndx]->dwFlags & WHDR_DONE)) Sleep(1); waveOutWrite(m_hwo, m_pwhdr[m_ndx], sizeof(WAVEHDR)); m_count = 0; m_ndx++; if(m_ndx == m_buffno) { m_ndx = 0; m_firsttime = false; } m_sp = (short *)m_buffer[m_ndx]; if(!m_firsttime) while(!(m_pwhdr[m_ndx]->dwFlags & WHDR_DONE)) Sleep(1); for(int n = 0; n < m_channels; n++) if(m_IOobjs[n]) m_sp[n+m_count] = (short) m_IOobjs[n]->Output(m_vecpos); } else{ if(!m_firsttime) while(!(m_pwhdr[m_ndx]->dwFlags & WHDR_DONE)) Sleep(1); for(int n = 0; n < m_channels; n++) if(m_IOobjs[n]) m_sp[n+m_count] = (short) m_IOobjs[n]->Output(m_vecpos); return; } } void inline SndRTIO::Writec(){ if(m_count == m_items){ if(!m_firsttime) while(!(m_pwhdr[m_ndx]->dwFlags & WHDR_DONE)) Sleep(1); waveOutWrite(m_hwo, m_pwhdr[m_ndx], sizeof(WAVEHDR)); m_count = 0; m_ndx++; if(m_ndx == m_buffno) { m_ndx = 0; m_firsttime = false; } m_cp = (char *) m_buffer[m_ndx]; if(!m_firsttime) while(!(m_pwhdr[m_ndx]->dwFlags & WHDR_DONE)) Sleep(1); for(int n = 0; n < m_channels; n++) if(m_IOobjs[n]) m_cp[n+m_count] = (char) m_IOobjs[n]->Output(m_vecpos); } else { if(!m_firsttime) while(!(m_pwhdr[m_ndx]->dwFlags & WHDR_DONE)) Sleep(1); for(int n = 0; n < m_channels; n++) if(m_IOobjs[n]) m_cp[n+m_count] = (char) m_IOobjs[n]->Output(m_vecpos); } return; } short SndRTIO::Write(){ if(!m_error && m_mode == SND_OUTPUT){ for(m_vecpos = 0; m_vecpos < m_vecsize; m_vecpos++){ (m_encoding == SHORTSAM ? Writes() : Writec()); m_count+=m_channels; } return 1; } else return 0; } #endif // WIN #ifdef SGI void inline SndRTIO::Readf(){ if(m_count == m_items){ alReadFrames(m_port, m_fp, m_buffsize); m_count = 0; for(int n = 0; n < m_channels; n++) m_output[n+m_vecpos] = m_fp[n+m_count]; } else for(int n = 0; n < m_channels; n++) m_output[n+m_vecpos] = m_fp[n+m_count]; } void inline SndRTIO::Readc(){ if(m_count == m_items){ alReadFrames(m_port, m_cp, m_buffsize); m_count = 0; for(int n = 0; n < m_channels; n++) m_output[n+m_vecpos] = (float) m_cp[n+m_count]; } else for(int n = 0; n < m_channels; n++) m_output[n+m_vecpos] = (float) m_cp[n+m_count]; } void inline SndRTIO::Reads(){ if(m_count == m_items){ alReadFrames(m_port, m_sp, m_buffsize); m_count = 0; for(int n = 0; n < m_channels; n++) m_output[n+m_vecpos] = (float) m_sp[n+m_count]; } else for(int n = 0; n < m_channels; n++) m_output[n+m_vecpos] = (float) m_sp[n+m_count]; } void inline SndRTIO::Readl(){ if(m_count == m_items){ alReadFrames(m_port, m_lp, m_buffsize); m_count = 0; for(int n = 0; n < m_channels; n++) m_output[n+m_vecpos] = (float) m_lp[n+m_count]; } else for(int n = 0; n < m_channels; n++) m_output[n+m_vecpos] = (float) m_lp[n+m_count]; } short SndRTIO::Read(){ if(!m_error && m_mode == SND_INPUT){ // remember: m_vecsize is measured in frames! for(m_vecpos = 0; m_vecpos < m_samples; m_vecpos+=m_channels){ (m_encoding == FLOATSAM ? Readf() : (m_encoding == SHORTSAM ? Reads() : (m_encoding == LONGSAM ? Readl() : Readc()))); m_count+=m_channels; } return 1; } else return 0; } void inline SndRTIO::Writef(){ if(m_count == m_items){ alWriteFrames(m_port, m_fp, m_buffsize); m_count = 0; for(int n = 0; n < m_channels; n++) if(m_IOobjs[n]) m_fp[n+m_count] = m_IOobjs[n]->Output(m_vecpos); } else for(int n = 0; n < m_channels; n++) if(m_IOobjs[n]) m_fp[n+m_count] = m_IOobjs[n]->Output(m_vecpos); } void inline SndRTIO::Writec(){ if(m_count == m_items){ alWriteFrames(m_port, m_cp, m_buffsize); m_count = 0; for(int n = 0; n < m_channels; n++) if(m_IOobjs[n]) m_cp[n+m_count] = (char)m_IOobjs[n]->Output(m_vecpos); } else for(int n = 0; n < m_channels; n++) if(m_IOobjs[n]) m_cp[n+m_count] = (char)m_IOobjs[n]->Output(m_vecpos); } void inline SndRTIO::Writes(){ if(m_count == m_items){ alWriteFrames(m_port, m_sp, m_buffsize); m_count = 0; for(int n = 0; n < m_channels; n++) if(m_IOobjs[n]) m_sp[n+m_count] = (short) m_IOobjs[n]->Output(m_vecpos); } else for(int n = 0; n < m_channels; n++) if(m_IOobjs[n]) m_sp[n+m_count] = (short) m_IOobjs[n]->Output(m_vecpos); } void inline SndRTIO::Writel(){ if(m_count == m_items){ alWriteFrames(m_port, m_lp, m_buffsize); m_count = 0; for(int n = 0; n < m_channels; n++) if(m_IOobjs[n]) m_lp[n+m_count] = (long) m_IOobjs[n]->Output(m_vecpos); } else for(int n = 0; n < m_channels; n++) if(m_IOobjs[n]) m_lp[n+m_count] = (long) m_IOobjs[n]->Output(m_vecpos); } short SndRTIO::Write(){ if(!m_error && m_mode == SND_OUTPUT){ for(m_vecpos = 0; m_vecpos < m_vecsize; m_vecpos++){ (m_encoding == FLOATSAM ? Writef() : (m_encoding == SHORTSAM ? Writes() : (m_encoding == LONGSAM ? Writel() : Writec()))); m_count+=m_channels; } return 1; } else return 0; } #endif // SGI #ifdef OSS void inline SndRTIO::Readc(){ if(m_count == m_items){ m_items = read(m_dev, m_cp, m_buffsize); m_count = 0; for(int n = 0; n < m_channels; n++) m_output[n+m_vecpos] = (float) (m_cp[n+m_count] - 128); } else for(int n = 0; n < m_channels; n++) m_output[n+m_vecpos] = (float) (m_cp[n+m_count] - 128); } void inline SndRTIO::Reads(){ if(m_count == m_items){ m_items = read(m_dev, m_sp, m_buffsize); m_items /= 2; m_count = 0; for(int n = 0; n < m_channels; n++) m_output[n+m_vecpos] = (float) m_sp[n+m_count]; } else for(int n = 0; n < m_channels; n++) m_output[n+m_vecpos] = (float) m_sp[n+m_count]; } short SndRTIO::Read(){ if(!m_error && m_mode == SND_INPUT){ for(m_vecpos = 0; m_vecpos < m_samples; m_vecpos+=m_channels){ (m_encoding == BYTESAM ? Readc() : Reads()); m_count+=m_channels; } return 1; } else return 0; } void inline SndRTIO::Writec(){ if(m_count == m_items){ write(m_dev, m_cp, m_buffsize); m_count = 0; for(int n = 0; n < m_channels; n++) if(m_IOobjs[n]) m_cp[n+m_count] = (char) (m_IOobjs[n]->Output(m_vecpos) + 128); } else for(int n = 0; n < m_channels; n++) if(m_IOobjs[n]) m_cp[n+m_count] = (char)( m_IOobjs[n]->Output(m_vecpos) + 128); } void inline SndRTIO::Writes(){ if(m_count == m_items){ write(m_dev, m_sp, m_buffsize); m_count = 0; for(int n = 0; n < m_channels; n++) if(m_IOobjs[n]) m_sp[n+m_count] = (short) m_IOobjs[n]->Output(m_vecpos); } else for(int n = 0; n < m_channels; n++) if(m_IOobjs[n]) m_sp[n+m_count] = (short) m_IOobjs[n]->Output(m_vecpos); } short SndRTIO::Write(){ if(!m_error && m_mode == SND_OUTPUT){ for(m_vecpos = 0; m_vecpos < m_vecsize; m_vecpos++){ (m_encoding == BYTESAM ? Writec() : Writes() ); m_count+=m_channels; } return 1; } else return 0; } #endif // OSS #ifdef ALSA void inline SndRTIO::Readc(){ if(m_count == m_items){ int err; while((err = snd_pcm_readi(m_dev, m_cp, m_items/m_channels))< 0){ if (err == -EPIPE) { err = snd_pcm_prepare(m_dev); if(err<0){ m_error = 100; return; } else continue; } else if (err == -ESTRPIPE) { while (snd_pcm_resume(m_dev) == -EAGAIN) sleep(1); snd_pcm_prepare(m_dev); } else if(err == -EAGAIN) continue; } m_count = 0; for(int n = 0; n < m_channels; n++) m_output[n+m_vecpos] = (float) (m_cp[n+m_count] - 128); } else for(int n = 0; n < m_channels; n++) m_output[n+m_vecpos] = (float) (m_cp[n+m_count] - 128); } void inline SndRTIO::Reads(){ if(m_count == m_items){ int err; while((err = snd_pcm_readi(m_dev, m_sp, m_items/m_channels))< 0){ if (err == -EPIPE) { err= snd_pcm_prepare(m_dev); if(err<0){ m_error = 100; return; } else continue; } else if (err == -ESTRPIPE) { while (snd_pcm_resume(m_dev) == -EAGAIN) sleep(1); snd_pcm_prepare(m_dev); } else if(err == -EAGAIN) continue; } m_count = 0; for(int n = 0; n < m_channels; n++) m_output[n+m_vecpos] = (float) m_sp[n+m_count]; } else for(int n = 0; n < m_channels; n++) m_output[n+m_vecpos] = (float) m_sp[n+m_count]; } void inline SndRTIO::Readl(){ if(m_count == m_items){ int err; while((err = snd_pcm_readi(m_dev, m_lp, m_items/m_channels))< 0){ if (err == -EPIPE) { int err = snd_pcm_prepare(m_dev); if(err<0){ m_error = 100; return; } else continue; } else if (err == -ESTRPIPE) { while (snd_pcm_resume(m_dev) == -EAGAIN) sleep(1); snd_pcm_prepare(m_dev); } else if(err == -EAGAIN) continue; } m_count = 0; for(int n = 0; n < m_channels; n++) m_output[n+m_vecpos] = (float) m_lp[n+m_count]; } else for(int n = 0; n < m_channels; n++) m_output[n+m_vecpos] = (float) m_lp[n+m_count]; } short SndRTIO::Read(){ if(!m_error && m_mode == SND_INPUT){ for(m_vecpos = 0; m_vecpos < m_samples; m_vecpos+=m_channels){ m_encoding == BYTESAM ? Readc() : (m_encoding == SHORTSAM ? Reads() : Readl() ); m_count+=m_channels; } return 1; } else return 0; } void inline SndRTIO::Writec(){ int err; if(m_count == m_items){ while((err = snd_pcm_writei(m_dev, m_cp, m_items/m_channels)) < 0){ if (err == -EPIPE) { err = snd_pcm_prepare(m_dev); if(err<0){ m_error = 100; return; } else continue; } else if (err == -ESTRPIPE) { while (snd_pcm_resume(m_dev) == -EAGAIN) usleep(1); snd_pcm_prepare(m_dev); } else if(err == -EAGAIN) continue; } m_count = 0; for(int n = 0; n < m_channels; n++) if(m_IOobjs[n]) m_cp[n+m_count] = (char) (m_IOobjs[n]->Output(m_vecpos) + 128); } else for(int n = 0; n < m_channels; n++) if(m_IOobjs[n]) m_cp[n+m_count] = (char)( m_IOobjs[n]->Output(m_vecpos) + 128); } void inline SndRTIO::Writes(){ int err; if(m_count == m_items){ while((err = snd_pcm_writei(m_dev, m_sp, m_items/m_channels)) < 0){ if (err == -EPIPE) { err = snd_pcm_prepare(m_dev); if(err<0){ m_error = 100; return; } else continue; } else if (err == -ESTRPIPE) { while (snd_pcm_resume(m_dev) == -EAGAIN) usleep(1); snd_pcm_prepare(m_dev); } else if(err == -EAGAIN) continue; } m_count = 0; for(int n = 0; n < m_channels; n++) if(m_IOobjs[n]) m_sp[n+m_count] = (short) m_IOobjs[n]->Output(m_vecpos); } else for(int n = 0; n < m_channels; n++) if(m_IOobjs[n]) m_sp[n+m_count] = (short) m_IOobjs[n]->Output(m_vecpos); } void inline SndRTIO::Writel(){ int err; if(m_count == m_items){ while((err = snd_pcm_writei(m_dev, m_lp, m_items/m_channels)) < 0){ if (err == -EPIPE) { err = snd_pcm_prepare(m_dev); if(err<0){ m_error = 100; return; } else continue; } else if (err == -ESTRPIPE) { while (snd_pcm_resume(m_dev) == -EAGAIN) usleep(1); snd_pcm_prepare(m_dev); } else if(err == -EAGAIN) continue; } m_count = 0; for(int n = 0; n < m_channels; n++) if(m_IOobjs[n]) m_sp[n+m_count] = (short) m_IOobjs[n]->Output(m_vecpos); } else for(int n = 0; n < m_channels; n++) if(m_IOobjs[n]) m_sp[n+m_count] = (short) m_IOobjs[n]->Output(m_vecpos); } short SndRTIO::Write(){ if(!m_error && m_mode == SND_OUTPUT){ for(m_vecpos = 0; m_vecpos < m_vecsize; m_vecpos++){ m_encoding == BYTESAM ? Writec() : (m_encoding == SHORTSAM ? Writes() : Writel() ); m_count+=m_channels; } return 1; } else return 0; } #endif // !!!!!!! ALSA char* SndRTIO::ErrorMessage(){ char* message; switch(m_error){ #ifdef WIN case 14: message = "Memory allocation error. \n"; break; case 21: message = "Device is already allocated.\n"; break; case 22: message = "Bad device ID. \n"; break; case 23: message = "No driver. \n"; break; case 24: message = "No memory.\n"; break; case 25: message = "Bad audio format. \n"; break; #endif #ifdef SGI case 11: message = "Error allocating DAC buffer memory.\n"; break; case 12: message = "Bad encoding format\n"; break; case 13: message = "alNewConfig() failed.\n"; break; case 14: message = "alSetQueueSize() failed.\n"; break; case 15: message = "alSetChannels() failed.\n"; break; case 16: message = "alSetSampFmt() failed.\n"; break; case 17: message = "alSetWidth() failed.\n"; break; case 18: message = "alSetDevice() failed.\n"; break; case 19: message = "alSetParams() failed.\n"; break; case 21: message = "Error opening audio device.\n"; break; #endif #ifdef OSS case 10: message = "Bad output format."; break; case 11: message = "Error allocating buffer memory."; break; case 12: message = "device open error."; break; case 13: message = "DMA buffer size error"; break; case 14: message = "could not select number of output channels."; break; case 15: message = "could not set output format"; break; case 16: message = "could not set output SR"; break; #endif #ifdef ALSA case 10: message = "Bad output format."; break; case 11: message = "Error allocating buffer memory."; break; case 12: message = "device open error."; break; case 13: message = "error setting periods"; break; case 14: message = "could not select number of output channels."; break; case 15: message = "could not set output format"; break; case 16: message = "could not set output SR"; break; case 17: message = "error setting buffersize"; break; case 18: message = "error setting access"; break; #endif default: message = SndIO::ErrorMessage(); break; } return message; } #ifdef WIN void ListDevices(){ WAVEOUTCAPS outcaps; WAVEINCAPS incaps; unsigned int j; cout << "Input devices:\ndevice ID: device name\n"; for(j = 0; j < waveInGetNumDevs(); j++){ waveInGetDevCaps(j, &incaps, sizeof(incaps)); cout << j << " : "<< incaps.szPname; if(incaps.wChannels == 2) cout << " stereo\n"; else { if(incaps.wChannels == 1) cout << " mono\n"; else cout << "\n"; } } cout << "Output devices:\ndevice ID: device name\n"; for(j = 0; j < waveOutGetNumDevs(); j++){ waveOutGetDevCaps(j, &outcaps, sizeof(outcaps)); cout << j << " : "<< outcaps.szPname; if(outcaps.wChannels == 2) cout << " stereo\n"; else { if(outcaps.wChannels == 1) cout << " mono\n"; else cout << "\n"; } } } char* InputDeviceName(int dev, char* name){ WAVEINCAPS incaps; if(dev >= 0 && dev < (int)waveInGetNumDevs()){ waveInGetDevCaps(dev, &incaps, sizeof(incaps)); return strcpy(name, incaps.szPname); } else return 0; } char* OutputDeviceName(int dev, char* name){ WAVEOUTCAPS outcaps; if(dev >= 0 && dev < (int)waveOutGetNumDevs()){ waveOutGetDevCaps(dev, &outcaps, sizeof(outcaps)); return strcpy(name, outcaps.szPname); } else return 0; } #endif // alsa #endif // win sgi oss alsa #endif // NO_RTIO SndObj-2.6.7/src/SndRTIO.h000644 000766 000024 00000013102 12062673766 015555 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 /////////////////////////////////////////////////// // SndRTIO.h: interface of the SndRTIO class // realtime audio IO // currently supported on Irix, Linux (with OSS), MAC OSX (CoreAudio) // and Windows // #ifndef _SNDRTIO_H #define _SNDRTIO_H #ifndef NO_RTIO #include "SndIO.h" #ifdef MACOSX // Mac CoreAudio #include #include "SndCoreAudio.h" #endif #ifdef OSS // Open Sound System (Linux, etc...) #include #include #include typedef int AudioDeviceID; #define DEF_DEV "/dev/dsp" const int DEF_BSIZE = 512; const int DEF_PERIOD = 512; #endif #ifdef ALSA #include typedef snd_pcm_t * AudioDeviceID; #define DEF_DEV "plughw:0,0" const int DEF_BSIZE = 1024; const int DEF_PERIOD = 2; #endif #ifdef SGI // SGI on Irix #include const int AL_DEFAULT = AL_DEFAULT_OUTPUT; typedef int AudioDeviceID; const int DEF_DEV = AL_DEFAULT; const int DEF_BSIZE = 512; const int DEF_PERIOD = 512; #endif #ifdef WIN // Windows MME #include #include typedef int AudioDeviceID; void ListDevices(); char* InputDeviceName(int dev, char* name); char* OutputDeviceName(int dev, char* name); const int DEF_DEV = WAVE_MAPPER; const int DEF_BSIZE = 1024; const int DEF_PERIOD = 4; #endif #ifdef MACOSX class SndRTIO : public SndCoreAudio { #else class SndRTIO : public SndIO { protected: char* m_cp; short* m_sp; // pointers to the buffer int m_count; // counter int m_buffsize; // buffer size int m_items; // items int m_encoding; // encoding AudioDeviceID m_dev; // device ID int m_mode; #endif #if defined (SGI) || defined (OSS) || defined (ALSA) void* m_buffer; // IO buffer #endif // SGI or OSS or ALSA #ifdef WIN WAVEFORMATEX* m_wfx; // formatex structure WAVEHDR** m_pwhdr; // header structures, one for each data block HGLOBAL* m_hwhdr; // header strructures handles HANDLE* m_hData; // data blocks handles void** m_buffer; // buffers (data blocks) int m_buffno; // number of buffers int m_ndx; // buffer index HWAVEOUT m_hwo; // output device handle HWAVEIN m_hwi; // output device handle int m_cur; int m_status; bool m_firsttime; #endif #ifdef SGI long* m_lp; // long & float pointers float* m_fp; // supported only on Irix ALconfig m_config; // Audio Library config ALport m_port; // AL IO port void Writef(); // write functions for different sample formats; void Writel(); void Readf(); // read functions for different sample formats void Readl(); #endif #ifdef ALSA long* m_lp; void Writel(); void Readl(); #endif #ifndef MACOSX void Writec(); // write functions for different sample formats; void Writes(); void Reads(); // read functions void Readc(); void SndRTIO_init(short, int, int=DEF_BSIZE, int=DEF_PERIOD,int=SHORTSAM, SndObj** =0,int=DEF_VECSIZE, float=DEF_SR, #if defined (OSS) || defined (ALSA) char* = (char *)DEF_DEV); #else AudioDeviceID=DEF_DEV); #endif #endif // MACOSX public: SndRTIO(short ch, int mode, int bsize = DEF_BSIZE, int period = DEF_PERIOD, int encoding = SHORTSAM, SndObj** input=0, int vsize= DEF_VECSIZE, float sr=DEF_SR, #if defined(OSS) || defined(ALSA) char* dev = (char *)DEF_DEV) #else int dev = DEF_DEV) #endif #ifndef MACOSX : SndIO(ch, encoding*8,input,vsize, sr) { SndRTIO_init(ch,mode,bsize,period,encoding,input,vsize,sr,dev); } #else : SndCoreAudio((ch < 2 ? 2 : ch), bsize, period, 32768.0,input, dev, vsize, sr) { }; #endif SndRTIO() #ifndef MACOSX : SndIO(1,16,0,DEF_VECSIZE,DEF_SR){ SndRTIO_init(1, SND_OUTPUT); } #else : SndCoreAudio() { }; #endif SndRTIO(short channels, SndObj** input=0) #ifndef MACOSX : SndIO(channels,16,input,DEF_VECSIZE,DEF_SR) { SndRTIO_init(channels,SND_OUTPUT,DEF_BSIZE,DEF_PERIOD,SHORTSAM,input); } #else : SndCoreAudio((channels < 2 ? 2 : channels),DEF_BSIZE, DEF_PERIOD, 32768.0,input) { }; #endif SndRTIO(SndObj *p) #ifndef MACOSX : SndIO(1,16,0,DEF_VECSIZE,DEF_SR) { SndRTIO_init(1, SND_OUTPUT); SetOutput(1, p); } #else : SndCoreAudio(){ SetOutput(1, p); SetOutput(2, p); } #endif SndRTIO(SndObj *pl, SndObj *pr) #ifndef MACOSX : SndIO(2,16,0,DEF_VECSIZE,DEF_SR) { SndRTIO_init(2, SND_OUTPUT); SetOutput(1, pl); SetOutput(2, pr); } #else : SndCoreAudio(){ SetOutput(1, pl); SetOutput(2, pr); } #endif #ifndef MACOSX ~SndRTIO(); short Write(); short Read(); char* ErrorMessage(); #endif }; #endif /* ifndef NO_RTIO */ #endif SndObj-2.6.7/src/SndRTThread.cpp000644 000766 000024 00000011714 12062673766 017017 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 // #ifndef NO_RTIO #include "SndRTThread.h" #include "SndRTIO.h" #include "SndCoreAudio.h" SndRTThread::SndRTThread() { m_channels = 2; #ifdef MACOSX in = new SndCoreAudio(m_channels); out = in; #else in = new SndRTIO(m_channels, SND_INPUT); out = new SndRTIO(m_channels, SND_OUTPUT); #endif sound = new SndIn*[m_channels]; sound[0] = new SndIn(in, 1); sound[1] = new SndIn(in, 2); ochannel = new Mixer*[m_channels]; ochannel[0] = new Mixer; ochannel[1] = new Mixer; out->SetOutput(1, ochannel[0]); out->SetOutput(2, ochannel[1]); AddObj(in, SNDIO_IN); AddObj(out, SNDIO_OUT); SndProcessThread = rtthreadfunc; } SndRTThread::SndRTThread(int channels, int buffsize, int periods) : SndThread(){ m_channels = channels; m_buffsize = buffsize; m_periods = periods; Init(); } int SndRTThread::AddOutput(int channel, SndObj *in){ if(channel > 0 && channel <= m_channels){ int res = AddObj(in); if(res) ochannel[channel-1]->AddObj(in); return res; } else return 0; } int SndRTThread::DeleteOutput(int channel, SndObj *in){ if(channel > 0 && channel <= m_channels){ int res = DeleteObj(in); if(res) ochannel[channel-1]->DeleteObj(in); return res; } else return 0; } SndRTThread::SndRTThread(int n, SndObj** objlist, int channels, int buffsize, int periods) : SndThread(n,objlist,0){ m_channels = channels; m_buffsize = buffsize; m_periods = periods; Init(); } SndObj *SndRTThread::GetInput(int channel) { if(channel > 0 && channel <= m_channels) return sound[channel-1]; else return NULL; } void SndRTThread::Direct(int channel, bool yes){ if(channel > 0 && channel <= m_channels) if(yes) ochannel[channel-1]->AddObj(sound[channel-1]); else ochannel[channel-1]->DeleteObj(sound[channel-1]); } void SndRTThread::ConnectOutput(int channel, SndObj *in){ if(channel > 0 && channel <= m_channels) ochannel[channel-1]->AddObj(in); } void SndRTThread::DisconnectOutput(int channel, SndObj *in){ if(channel > 0 && channel <= m_channels) ochannel[channel-1]->DeleteObj(in); } void SndRTThread::Init(){ int i; #ifdef MACOSX in = new SndCoreAudio(m_channels,m_buffsize,m_periods); out = in; #else in = new SndRTIO(m_channels, SND_INPUT, m_buffsize,m_periods); out = new SndRTIO(m_channels, SND_OUTPUT, m_buffsize,m_periods); #endif sound = new SndIn*[m_channels]; for(i=0; i < m_channels; i++) sound[i] = new SndIn(in, i+1); ochannel = new Mixer*[m_channels]; for(i=0; i < m_channels; i++){ ochannel[i] = new Mixer(); out->SetOutput(i+1, ochannel[i]); } AddObj(in, SNDIO_IN); AddObj(out, SNDIO_OUT); SndProcessThread = rtthreadfunc; } SndRTThread::~SndRTThread(){ delete[] ochannel; delete[] sound; delete in; #ifndef MACOSX delete out; #endif } void rtthreadfunc(void* data){ int i, channels; //, objno, inputno, outputno; SndRTThread *sndthread = (SndRTThread *) data; SndLink* temp; SndLink* itemp; SndLink* otemp; channels = sndthread->m_channels; SndIn **sound = sndthread->sound; Mixer **ochannel = sndthread->ochannel; while(sndthread->status){ //... processing loop... temp = sndthread->last; itemp = sndthread->input; otemp = sndthread->output; sndthread->Update(); for(i = 0; i < sndthread->InputNo; i++){ itemp->obj->Read(); itemp = itemp->next; } // callback if(sndthread->ProcessCallback != NULL) sndthread->ProcessCallback(sndthread->callbackdata); // sound processing // inputs for(i = 0; i < channels; i++) sound[i]->DoProcess(); sndthread->processing = true; for(i = 0; i < sndthread->SndObjNo; i++){ temp = temp->next; temp->obj->DoProcess(); } sndthread->processing = false; // outputs for(i = 0; i < channels; i++) ochannel[i]->DoProcess(); // output processing for(i = 0; i < sndthread->OutputNo; i++){ otemp->obj->Write(); otemp = otemp->next; } } #ifndef USE_WIN32THREADS return; #else _endthread(); #endif } #endif SndObj-2.6.7/src/SndRTThread.h000644 000766 000024 00000004117 12062673766 016463 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 and Rory Walsh, 1997-2006 // See License.txt for a disclaimer of all warranties // and licensing information // // SndRTThread.h // Class SndRTThread: // Multithreading support for the SndObj Library // with Realtime audio IO // Victor Lazzarini, 2001 // Win32 thread code by Rory Walsh, 2006 #ifndef NO_RTIO #ifndef _SNDRTTHREAD_H #define _SNDRTTHREAD_H #ifndef NO_RTIO #include "SndThread.h" #include "Mix.h" #include "SndIn.h" class SndRTThread : public SndThread { SndIO *in; SndIO *out; Mixer **ochannel; SndIn **sound; int m_channels; int m_buffsize; int m_periods; void Init(); public: #ifdef PYTHON_WRAP PyThreadState *_tstate1; pycallbackdata pydata1; #endif SndRTThread(); SndRTThread(int channels, int buffsize=1024, int periods=4); SndRTThread(int n, SndObj** objlist, int channels=2, int buffsize=1024, int periods=4); ~SndRTThread(); int AddOutput(int channel, SndObj *in); int DeleteOutput(int channel, SndObj *in); void DisconnectOutput(int channel, SndObj *in); void ConnectOutput(int channel, SndObj *in); SndObj *GetInput(int channel); void Direct(int channel, bool yes=true); friend void rtthreadfunc(void *); }; void rtthreadfunc(void *); #endif #endif #endif SndObj-2.6.7/src/SndSinIO.cpp000644 000766 000024 00000020125 12062673766 016317 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 "SndSinIO.h" #include "SinAnal.h" SndSinIO::SndSinIO(char* name, int maxtracks, float threshold, int windowtype, short mode, short channels, int channelmask, short bits, int format, SndObj** inputlist, float framepos, int hopsize, int fftsize, float sr): SndWaveX(name,mode,channels,channelmask, bits, format, inputlist,framepos, maxtracks*3, sr) { short cbsize; m_len = 64; m_format = WAVE_FORMAT_EXTENSIBLE; m_hdrsize = 84; if(mode != READ){ // if output int mask; short sbits; m_hopsize = hopsize; SetVectorSize(maxtracks*3); GUID subfmt; cbsize = SHORT_LE((short)46); PutHeader(0,m_hdrsize,m_len, m_format); sbits = SHORT_LE((short)m_bits); mask = LONG_LE((long) (m_ChannelMask = channelmask)); subfmt.Data1 = LONG_LE(0x443a4b58); subfmt.Data2 = SHORT_LE(0x21a2); subfmt.Data2 = SHORT_LE(0x324b); subfmt.Data4[0] = 0x00; subfmt.Data4[1] =0x00; subfmt.Data4[2] = 0x00; subfmt.Data4[3] = 0x01; subfmt.Data4[4] = 0xAA; subfmt.Data4[5] = 0x02; subfmt.Data4[6] = 0xBB; subfmt.Data4[7] = 0x03; m_SubFormat = subfmt; m_sinheader.dwVersion = LONG_LE(1); m_sinheader.data.wWordFormat = SHORT_LE((short)(m_bits != 64 ? IEEE_FLOAT_T : IEEE_DOUBLE_T)); m_sinheader.data.wWindowType = SHORT_LE((short)windowtype); m_sinheader.data.dwWindowSize = LONG_LE((long)fftsize); m_sinheader.data.wMaxtracks =SHORT_LE((short) maxtracks); m_sinheader.data.wHopsize = LONG_LE((long)m_hopsize); m_sinheader.data.fAnalysisRate = FLOAT32_LE(m_sr/m_hopsize); m_sinheader.data.fThreshold = FLOAT32_LE(threshold); if(mode != APPEND){ fseek(m_file, sizeof(wave_head), SEEK_SET); fwrite(&cbsize, sizeof(short), 1, m_file); fwrite(&sbits, sizeof(short), 1, m_file); fwrite(&mask, sizeof(int), 1, m_file); fwrite(&subfmt, sizeof(GUID), 1, m_file); fwrite(&m_sinheader, sizeof(sinusex), 1, m_file); m_wchkpos = ftell(m_file); fwrite(&m_wdata, sizeof(wave_data), 1, m_file); m_datapos = ftell(m_file); } else m_wchkpos = sizeof(wave_head) + 22 + sizeof(sinusex) + 2; } // output else { // if INPUT m_tracks = new int[m_channels]; m_trkindx = new int*[m_channels]; fseek(m_file, sizeof(wave_head)+2+22, SEEK_SET); fread(&m_sinheader, sizeof(sinusex),1, m_file); if(GUIDcheck(KSDATAFORMAT_SUBTYPE_SINUS)){ // check for GUID m_sinheader.dwVersion = LONG_LE(m_sinheader.dwVersion ); m_sinheader.data.wWordFormat = SHORT_LE(m_sinheader.data.wWordFormat ); m_sinheader.data.wHopsize = SHORT_LE(m_sinheader.data.wHopsize ); m_sinheader.data.wWindowType = SHORT_LE(m_sinheader.data.wWindowType ); m_sinheader.data.wMaxtracks = SHORT_LE(m_sinheader.data.wMaxtracks); m_sinheader.data.dwWindowSize = LONG_LE(m_sinheader.data.dwWindowSize ); m_sinheader.data.fThreshold = FLOAT32_LE(m_sinheader.data.fThreshold); } fseek(m_file, m_datapos, SEEK_SET); if(framepos > 0) SetTimePos(framepos); m_maxtracks = m_sinheader.data.wMaxtracks; for(int i = 0; i < m_channels; i++) m_trkindx[i] = new int[m_maxtracks]; } // INPUT } SndSinIO::~SndSinIO(){ if(m_mode == READ) delete[] m_tracks; } void SndSinIO::GetHeader(WAVEFORMATSINUSEX* pheader){ SndWaveX::GetHeader((WAVEFORMATEXTENSIBLE*) pheader); pheader->sinusformat_ext.dwVersion = m_sinheader.dwVersion; pheader->sinusformat_ext.data.wWordFormat = m_sinheader.data.wWordFormat; pheader->sinusformat_ext.data.wHopsize = m_sinheader.data.wHopsize; pheader->sinusformat_ext.data.wWindowType = m_sinheader.data.wWindowType; pheader->sinusformat_ext.data.wMaxtracks = m_sinheader.data.wMaxtracks; pheader->sinusformat_ext.data.dwWindowSize = m_sinheader.data.dwWindowSize; pheader->sinusformat_ext.data.fAnalysisRate = m_sinheader.data.fAnalysisRate; pheader->sinusformat_ext.data.fThreshold = m_sinheader.data.fThreshold; } void SndSinIO::SetTimePos(float pos){ int framep = (int)(pos*m_sr/m_hopsize); int count; if(m_mode == READ){ fseek(m_file,m_datapos, SEEK_SET); while(framep) fread(&count, sizeof(int), 1, m_file); fseek(m_file, count*(m_bits/8)*3, SEEK_CUR); framep--; } } short SndSinIO::Write(){ if(!m_error && (m_mode != READ)){ int i, tracks, items = 0; switch(m_bits){ case 32: for(i = 0; i < m_channels; i++){ if(m_IOobjs[i]){ int pos, tpos; tracks = LONG_LE (((SinAnal *)m_IOobjs[i])->GetTracks()); items += fwrite(&tracks, sizeof(int), 1, m_file); for(m_vecpos=0, pos=0, tpos=0; m_vecpos < tracks;m_vecpos+=4, tpos+=3, pos++) m_fp[m_vecpos] = FLOAT32_LE((float)(((SinAnal *)m_IOobjs[i])->GetTrackID(pos))); m_fp[m_vecpos+1] = FLOAT32_LE(m_IOobjs[i]->Output(tpos)); m_fp[m_vecpos+2] = FLOAT32_LE(m_IOobjs[i]->Output(tpos+1)); m_fp[m_vecpos+3] = FLOAT32_LE(m_IOobjs[i]->Output(tpos+2)); } else for(m_vecpos=0; m_vecpos < tracks;m_vecpos++) m_fp[m_vecpos] = FLOAT32_LE(0.f); items += fwrite(m_fp, sizeof(float), tracks*4, m_file); } return (short) items; case 64: for(i = 0; i < m_channels; i++){ if(m_IOobjs[i]){ int pos, tpos; tracks = LONG_LE (((SinAnal *)m_IOobjs[i])->GetTracks()); items += fwrite(&tracks, sizeof(int), 1, m_file); for(m_vecpos=0, pos=0, tpos=0; m_vecpos < tracks;m_vecpos+=4, tpos+=3, pos++) m_dp[m_vecpos] = DOUBLE_LE((double)(((SinAnal *)m_IOobjs[i])->GetTrackID(pos))); m_dp[m_vecpos+1] = DOUBLE_LE(m_IOobjs[i]->Output(tpos)); m_dp[m_vecpos+2] = DOUBLE_LE(m_IOobjs[i]->Output(tpos+1)); m_dp[m_vecpos+3] = DOUBLE_LE(m_IOobjs[i]->Output(tpos+2)); } else for(m_vecpos=0; m_vecpos < tracks;m_vecpos++) m_dp[m_vecpos] = DOUBLE_LE(0.0); items += fwrite(m_dp, sizeof(double), tracks*4, m_file); } return (short) items; } } return 0; } short SndSinIO::Read(){ if(!m_error && (m_mode == READ) && !feof(m_file)){ int i,tracks; short items=0; switch(m_bits) { case 32: for(i=0; i < m_channels; i++){ int pos, tpos; items += fread(&tracks, sizeof(int), 1, m_file); m_tracks[i] = LONG_LE((long)tracks); items += fread(m_buffer, sizeof(float), tracks*4, m_file); for(m_vecpos=0, pos=0, tpos=0; m_vecpos < m_tracks[i]; m_vecpos+=4, tpos+=3, pos++){ m_trkindx[i][pos] = (int) FLOAT32_LE(m_fp[m_vecpos]); m_output[(i+1)*tpos] = FLOAT32_LE(m_fp[m_vecpos+1]); m_output[(i+1)*tpos+2] = FLOAT32_LE(m_fp[m_vecpos+2]); m_output[(i+1)*tpos+3] = FLOAT32_LE(m_fp[m_vecpos+3]); } } return items; case 64: for(i=0; i < m_channels; i++){ int pos, tpos; items += fread(&tracks, sizeof(int), 1, m_file); m_tracks[i] = LONG_LE((long)tracks); items += fread(m_buffer, sizeof(double), tracks*4, m_file); for(m_vecpos=0, pos=0, tpos=0; m_vecpos < m_tracks[i]; m_vecpos+=4, tpos+=3, pos++){ m_trkindx[i][pos] = (int) DOUBLE_LE(m_dp[m_vecpos]); m_output[(i+1)*tpos] = DOUBLE_LE(m_dp[m_vecpos+1]); m_output[(i+1)*tpos+2] = DOUBLE_LE(m_dp[m_vecpos+2]); m_output[(i+1)*tpos+3] = DOUBLE_LE(m_dp[m_vecpos+3]); } } return items; } } return 0; } SndObj-2.6.7/src/SndSinIO.h000644 000766 000024 00000004757 12062673766 016001 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 _SndSinIO_h #define _SndSinIO_h #include "SndWaveX.h" #include "SndPVOCEX.h" struct sinus_data { short wWordFormat; short wHopsize; short wWindowType; short wMaxtracks; int dwWindowSize; float fThreshold; float fAnalysisRate; }; struct sinusex { int dwVersion; sinus_data data; }; struct WAVEFORMATSINUSEX { wave_head waveformatex; wav_ex waveformat_ext; sinusex sinusformat_ext; }; const GUID KSDATAFORMAT_SUBTYPE_SINUS = { 0x443a4b58, 0x21a2, 0x324b, { 0x00, 0x01, 0xAA, 0x02, 0x11, 0x03, 0xBB, 0x04 } }; class SndSinIO : public SndWaveX { protected: sinusex m_sinheader; int m_hopsize; int* m_tracks; int** m_trkindx; int m_maxtracks; public: SndSinIO(char* name, int maxtracks, float threshold=0.01f, int windowtype=HANNING, short mode = OVERWRITE, short channels=1, int channelmask=0, short bits=32, int format=PCM, SndObj** inputlist=0, float framepos= 0.f, int hopsize = DEF_VECSIZE, int fftsize = DEF_FFTSIZE, float sr = DEF_SR); ~SndSinIO(); short Write(); short Read(); int GetTrackID(int track, int channel) { return m_trkindx[channel][track];} int GetTracks(int channel) { return m_tracks[channel]; } int GetFFTSize(){ return m_sinheader.data.dwWindowSize;} int GetHopSize(){ return m_sinheader.data.wHopsize; } int GetWindowType() { return m_sinheader.data.wWindowType; } int GetMaxTracks() { return m_sinheader.data.wMaxtracks; } void GetHeader(WAVEFORMATSINUSEX* pheader); void SetTimePos(float pos); }; #endif SndObj-2.6.7/src/SndTable.cpp000644 000766 000024 00000005550 12062673766 016372 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // SndTable.cpp: implementation of the SndTable object // // (soundfile function table) // // // // // //************************************************************// #include "SndTable.h" //////////construction / destruction /////////////////////// SndTable :: SndTable(){ m_L = 1; m_channel = 0; m_input = 0; m_table = new float[m_L]; MakeTable(); } SndTable :: SndTable(long L, SndFIO* input, short channel){ m_L = L; m_channel = channel; m_input = input; m_table = new float [m_L]; MakeTable(); } SndTable :: ~SndTable(){ delete[] m_table; } ///////////// OPERATIONS //////////////////////////////////// void SndTable :: SetInput(long L, SndFIO* input, short channel){ m_input = input; m_channel = channel; m_L = L; delete[] m_table; m_table = new float[m_L]; } short SndTable :: MakeTable(){ if(!m_input){ m_error = 1; return 0; } else { int n, i; float max = 0.f; // short chan = m_input->GetChannels(); long size = m_input->GetVectorSize(); for(n = 0; n < m_L; n+=size){ m_input->Read(); for(i = 0; (i < size) && (n+i < m_L); i++){ m_table[n+i] = m_input->Output(i, m_channel); max = (fabs((double)max) < fabs((double)m_table[n+i])) ? m_table[n+i] : max; } } m_input->SetPos(0.f); if(max) for (n = 0; n < m_L; n++) m_table[n] /= max; return 1; } } ///////////////// ERROR HANDLING /////////////////////////////// char* SndTable::ErrorMessage(){ char* message; switch(m_error){ case 0: message = "No error."; break; case 1: message = "MakeTable() failed. No input obj.."; break; default: message = "Undefined error"; break; } return message; } SndObj-2.6.7/src/SndTable.h000644 000766 000024 00000003306 12062673766 016034 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // SndTable.h: interface of the SndTable class // // (soundfile function table) // // // // // //************************************************************// #ifndef _SNDTABLE_H #define _SNDTABLE_H #include "Table.h" #include "SndFIO.h" class SndTable : public Table { protected : SndFIO* m_input; short m_channel; public: void SetInput(long L, SndFIO* input, short channel=1); char* ErrorMessage(); short MakeTable(); SndTable(); SndTable(long L, SndFIO* input, short channel=1); ~SndTable(); }; #endif SndObj-2.6.7/src/SndThread.cpp000644 000766 000024 00000020773 12062673766 016556 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 and Rory Walsh, 1997-2004 // See License.txt for a disclaimer of all warranties // and licensing information // SndThread.cpp // Implementation of the SndThread class // // Victor Lazzarini, 2001 // #ifndef NOPTHREAD // needs pthread library #include "SndThread.h" SndThread::SndThread(){ SndObjNo = 0; InputNo = 0; OutputNo = 0; last = 0; input = 0; output = 0; status = OFF; #ifndef USE_WIN32THREADS pthread_attr_init(&attrib); #endif ProcessCallback = NULL; SndProcessThread = threadfunc; m_changed = m_parid[0] = m_parid[1] = m_parid[2] = m_parid[3] = false; processing = false; } SndThread::SndThread(int n, SndObj** objs, SndIO *out, SndIO *in){ SndObjNo = 0; InputNo = 0; OutputNo = 0; last = 0; input = 0; output = 0; for(int i=0; i < n; i++)AddObj(objs[i]); if(in) AddObj(in, SNDIO_IN); if(out) AddObj(out, SNDIO_OUT); status = OFF; #ifndef USE_WIN32THREADS pthread_attr_init(&attrib); #endif ProcessCallback = NULL; SndProcessThread = threadfunc; m_changed = m_parid[0] = m_parid[1] = m_parid[2] = m_parid[3] = false; processing = false; } SndThread::~SndThread(){ SndLink* temp; SndLink* iotemp; int i; if(status != OFF) ProcOff(); for(i = 0; i < SndObjNo; i++){ temp = last->next; DeleteObj(temp->obj); } for(i = 0; i < InputNo; i++){ iotemp = input->next; DeleteObj(iotemp->obj, SNDIO_IN); } for(i = 0; i < OutputNo; i++){ iotemp = output->next; DeleteObj(iotemp->obj, SNDIO_OUT); } } int SndThread::AddObj(SndObj* obj){ SndLink *NewLink, *temp; if(!( NewLink = new SndLink)) return 0; // failed to allocate memory temp = last; last = NewLink; // NewLink is always last last->obj = obj; if(SndObjNo>0) { // if at least 1 link exists last->next = temp->next; // last always points to 1st temp->next = last; // next to last points to last } else last->next = last; // points to itself (1st) SndObjNo++; // increment the number of SndObjs return 1; // Added Link will always be at the end } int SndThread::AddObj(SndIO* obj, int iolist){ SndLink* NewLink; if(!( NewLink = new SndLink)) return 0; // failed to allocate memory NewLink->obj = obj; switch(iolist){ // adding to input list case SNDIO_IN: if(InputNo>0) NewLink->next = input->next; else input = NewLink; input->next = NewLink; InputNo++; return 1; // adding to output list case SNDIO_OUT: if(OutputNo>0) NewLink->next = output->next; else output = NewLink; output->next = NewLink; OutputNo++; return 1; default: delete NewLink; return 0; } } int SndThread::DeleteObj(SndObj* obj){ SndLink* temp1; SndLink* temp2; // search start from last // temp1 is the link to be deleted temp1 = last->next; // temp2 is the link before it temp2 = last; // search loop while(temp1->obj != obj){ // temp2 & temp1 move to the next links temp2 = temp1; temp1 = temp1->next; // if the search is back at the last, return if(temp1 == last->next) return 0; } // link the previous to the next if(temp1 == last) last = temp2; temp2->next = temp1->next; SndObjNo--; // delete the link delete temp1; return 1; } int SndThread::DeleteObj(SndIO* obj, int iolist){ SndLink* temp1; SndLink* temp2; switch(iolist){ case SNDIO_IN: temp1 = input->next; temp2 = input; while(temp1->obj != obj){ temp2 = temp1; temp1 = temp1->next; if(temp1 == input->next) return 0; } if(temp1 == input) input = temp2; temp2->next = temp1->next; delete temp1; InputNo--; return 1; case SNDIO_OUT: temp1 = output->next; temp2 = output; while(temp1->obj != obj){ temp2 = temp1; temp1 = temp1->next; if(temp1 == output->next) return 0; } if(temp1 == output) output = temp2; temp2->next = temp1->next; delete temp1; OutputNo--; return 1; default: return 0; } } int SndThread::Insert(SndObj* obj, SndObj* prev){ SndLink* temp; SndLink* InsertLink; int pos = 0; if(!( InsertLink = new SndLink)) return 0; // failed to allocate memory InsertLink->obj = obj; // search start from last // temp is the link in front of // which the inserted link will be temp = last; // search loop while(temp->obj != prev){ temp = temp->next; pos++; // position counter (0 is last, 1 is top) // if the search is back at the top, return if(temp == last) return 0; } InsertLink->next = temp->next; temp->next = InsertLink; SndObjNo++; return pos+1; // returns inserted link position } int SndThread::ProcOn(){ status = ON; #ifndef USE_WIN32THREADS if(pthread_create(&thread, &attrib, (void * (*)(void *)) SndProcessThread, (void *)this)) return status; #else if(hThread = _beginthread( (void(*)(void *))SndProcessThread, 4096, (void *)this) ) return status; #endif return 0; } int SndThread::ProcOff(){ status = OFF; return status; } void SndThread::UpdateSr(){ int i; SndLink* temp = last; for(i = 0; i < SndObjNo; i++){ temp->obj->SetSr(m_sr); temp = temp->next; } } void SndThread::UpdateVecsize(){ int i; SndLink* temp = last; SndLink* itemp = input; SndLink* otemp = output; for(i = 0; i < InputNo; i++){ itemp->obj->SetVectorSize(m_vecsize_max); itemp = itemp->next; } for(i = 0; i < SndObjNo; i++){ temp->obj->SetVectorSize(m_vecsize_max); temp = temp->next; } for(i = 0; i < OutputNo; i++){ otemp->obj->SetVectorSize(m_vecsize_max); otemp = otemp->next; } } void SndThread::UpdateLimit(){ int i; SndLink* temp = last; SndLink* itemp = input; SndLink* otemp = output; for(i = 0; i < InputNo; i++){ itemp->obj->LimitVectorSize(m_vecsize); itemp = itemp->next; } for(i = 0; i < SndObjNo; i++){ temp->obj->LimitVectorSize(m_vecsize); temp = temp->next; } for(i = 0; i < OutputNo; i++){ otemp->obj->LimitVectorSize(m_vecsize); otemp = otemp->next; } } void SndThread::UpdateRestore(){ int i; SndLink* temp = last; SndLink* itemp = input; SndLink* otemp = output; for(i = 0; i < InputNo; i++){ itemp->obj->RestoreVectorSize(); itemp = itemp->next; } for(i = 0; i < SndObjNo; i++){ temp->obj->RestoreVectorSize(); temp = temp->next; } for(i = 0; i < OutputNo; i++){ otemp->obj->RestoreVectorSize(); otemp = otemp->next; } } void threadfunc(void* data){ int i; SndThread *sndthread = (SndThread *) data; SndLink* temp; SndLink* itemp; SndLink* otemp; while(sndthread->status){ temp = sndthread->last; itemp = sndthread->input; otemp = sndthread->output; //... processing loop... sndthread->Update(); for(i = 0; i < sndthread->InputNo; i++){ itemp->obj->Read(); itemp = itemp->next; } // callback if(sndthread->ProcessCallback != NULL) sndthread->ProcessCallback(sndthread->callbackdata); // sound processing sndthread->processing = true; for(i = 0; i < sndthread->SndObjNo; i++){ temp = temp->next; temp->obj->DoProcess(); } sndthread->processing = false; // output processing for(i = 0; i < sndthread->OutputNo; i++){ otemp->obj->Write(); otemp = otemp->next; } } #ifndef USE_WIN32THREADS return; #else _endthread(); #endif } #endif SndObj-2.6.7/src/SndThread.h000644 000766 000024 00000011033 12062673766 016210 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 and Rory Walsh, 1997-2006 // See License.txt for a disclaimer of all warranties // and licensing information // // SndThread.h // Class SndThread: // Multithreading support for the SndObj Library // // Victor Lazzarini, 2001 // Win32 thread code by Rory Walsh, 2006 #ifndef _SNDTHREAD_H #define _SNDTHREAD_H #include "SndObj.h" #include "SndIO.h" #ifdef WINPTHREAD #include #elif USE_WIN32THREADS #include #include #else #include #endif template struct SndLink{ // SndObj / SndIO lists links SndLink* next; // next link s* obj; // object pointed at by the link }; enum { SNDIO_IN, SNDIO_OUT }; // IO list names enum { OFF=0, ON }; // processing status #ifdef PYTHON_WRAP struct pycallbackdata { PyObject *func; PyObject *data; }; #endif class SndThread { protected: // three circular lists are declared: // one for processing and two for IO SndLink* last; // pointer to last element SndLink* input; // input list SndLink* output; // output list int SndObjNo; // number of SndObjs in the list int InputNo; // etc inputs int OutputNo; // etc outputs // used to control the processing loop int status; // processing status ON, OFF void (*ProcessCallback)(void *callbackdata); void (*SndProcessThread)(void *data); void *callbackdata; bool processing; // pthread-related member variables #ifndef USE_WIN32THREADS pthread_attr_t attrib; pthread_t thread; #else uintptr_t hThread; #endif int m_vecsize; int m_vecsize_max; float m_sr; bool m_changed; bool m_parid[4]; void UpdateSr(); void UpdateVecsize(); void UpdateLimit(); void UpdateRestore(); void Update(){ if(m_changed){ if(m_parid[0]){ UpdateSr(); m_parid[0] = false; } if(m_parid[1]){ UpdateVecsize(); m_parid[1] = false; } if(m_parid[2]){ UpdateLimit(); m_parid[2] = false; } if(m_parid[3]){ UpdateRestore(); m_parid[3] = false; } m_changed = false; } } public: #ifdef PYTHON_WRAP PyThreadState *_tstate; pycallbackdata pydata; #endif void *GetProcessCallback() { return (void *)ProcessCallback; } SndThread(); SndThread(int n, SndObj** objlist, SndIO *out, SndIO *in=0); virtual ~SndThread(); int AddObj(SndObj *obj); // add to lists int AddObj(SndIO *obj, int iolist); // insert after a particular SndObj int Insert(SndObj *obj, SndObj* prev); int DeleteObj(SndObj *obj); // delete from lists int DeleteObj(SndIO *obj, int iolist); void SetProcessCallback(void (*Callback)(void *), void *cbdata){ ProcessCallback = Callback; callbackdata = cbdata; } int GetStatus() { return status; } int GetSndObjNo() { return SndObjNo; } int GetInputNo() { return InputNo; } int GetOutputNo() { return OutputNo; } #ifndef USE_WIN32THREADS pthread_attr_t GetAttrib() { return attrib; } void SetAttrib(pthread_attr_t att) { attrib = att; } #endif void SetVectorSize(int vecsize){ m_vecsize_max = vecsize; m_changed = m_parid[1] = true; if(status==OFF) Update(); } void LimitVectorSize(int limit){ m_vecsize = limit; m_changed = m_parid[2] = true; if(status==OFF) Update(); } void RestoreVectorSize(){ m_changed = m_parid[3] = true; if(status==OFF) Update(); } void SetSr(float sr){ m_sr = sr; m_changed = m_parid[0] = true; if(status==OFF) Update(); }; int ProcOn(); // start processing thread int ProcOff(); // kill processing thread // external thread function friend void threadfunc(void* sndthread); }; void threadfunc(void* sndthread); #endif SndObj-2.6.7/src/SndWave.cpp000644 000766 000024 00000024432 12062673766 016245 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // SndWave.cpp: implementaion of the Sndwave // // base class // // // // // //************************************************************// #include "SndWave.h" SndWave::SndWave(char* name, short mode, short channels, short bits, SndObj** inputlist, float spos, int vecsize, float sr) : SndFIO(name, mode, channels, bits, inputlist, spos, vecsize, sr){ m_selfdesc = 1; // yes, this is a self-describing format! m_len = 16; m_hdrsize = 36; m_format = 1; if(m_mode != READ){ // OUTPUT if(m_mode != APPEND){ fwrite(&m_header, sizeof(wave_head), 1, m_file); m_wchkpos = ftell(m_file); fwrite(&m_wdata, sizeof(wave_data), 1, m_file); m_datapos = ftell(m_file); if(spos > 0) SetPos(spos); } else m_wchkpos = sizeof(wave_head); m_header = PutHeader(); m_wdata.magic3 = *((long*)DATA_ID); m_wdata.datasize = 0; } // OUTPUT else { // INPUT if(m_filestat == SFERROR) { m_dataframes = 0; m_sr = 0.f; m_bits = 0; m_channels = 0; m_error = 21; m_output =0; #ifdef DEBUG cout << ErrorMessage(); #endif return; } int IDchk; fread(&IDchk, 4, 1, m_file); if(IDchk != *(int *)RIFF_ID){ m_error = 25; m_dataframes = 0; m_sr = 0.f; m_bits = 0; m_channels = 0; m_output = 0; m_iswave = false; #ifdef DEBUG cout << ErrorMessage(); #endif return; } fseek(m_file, 4, SEEK_CUR); fread(&IDchk, 4, 1, m_file); if(IDchk != *(int *)WAVE_ID){ m_error = 26; m_dataframes = 0; m_sr = 0.f; m_bits = 0; m_channels = 0; m_output = 0; m_iswave = false; #ifdef DEBUG cout << ErrorMessage(); #endif return; } fseek(m_file ,0, SEEK_SET); if(!ReadHeader()){ m_error = 27; m_dataframes = 0; m_output = 0; m_iswave = false; #ifdef DEBUG cout << ErrorMessage(); #endif return; } m_sr = (float) m_header.rate; m_bits = m_header.size; m_channels = m_header.nchns; if(!(m_IOobjs = new SndObj*[m_channels])){ m_error = 2; #ifdef DEBUG cout << ErrorMessage(); #endif return; } m_samples = m_vecsize*m_channels; delete[] m_output; delete[] m_buffer; if(!(m_output = new float[m_samples])){ m_error = 1; #ifdef DEBUG cout << ErrorMessage(); #endif return; } m_buffsize = (m_bits/8)*m_samples; if(!(m_buffer = new char[m_buffsize])){ m_error = 11; #ifdef DEBUG cout << ErrorMessage(); #endif return; } // these are the pointers used to read the buffer m_cp = (unsigned char *) m_buffer; m_sp = (short *) m_buffer; m_lp = (int *) m_buffer; m_s24p = (_24Bit *) m_buffer; m_dataframes = (m_wdata.datasize*8)/(m_channels*m_bits); m_itemsleft = ((m_wdata.datasize)%m_buffsize)/m_sampsize; m_spos=spos; m_datapos = ftell(m_file); if(spos > 0) SetPos(spos); m_iswave = true; } // INPUT m_safe = m_file; } SndWave::~SndWave(){ if(m_mode != READ) { // OUTPUT if(m_filestat==SFOPEN){ unsigned int databytes; #ifndef WIN unsigned int endpos, startpos; fseek(m_file, 0, SEEK_END); endpos = ftell(m_file); fseek(m_file, m_wchkpos, SEEK_SET); fseek(m_file, sizeof(wave_data), SEEK_CUR); startpos = ftell(m_file); // find the size of written data and write it #endif #ifdef WIN fpos_t endpos, startpos; fseek(m_file, 0, SEEK_END); fgetpos(m_file, &endpos); fseek(m_file, m_wchkpos, SEEK_SET); fseek(m_file, sizeof(wave_data), SEEK_CUR); fgetpos(m_file, &startpos); #endif databytes = (unsigned int) (endpos - startpos); m_wdata.datasize = LONG_LE(databytes); m_header = PutHeader(databytes, m_hdrsize, m_len, m_format); fseek(m_file, 0, SEEK_SET); // rewrite the header fwrite(&m_header, sizeof(wave_head), 1, m_file); fseek(m_file, m_wchkpos, SEEK_SET); fwrite(&m_wdata, sizeof(wave_data), 1, m_file); } } // OUTPUT // nothing to do for INPUT } wave_head SndWave::PutHeader(int databytes, int hdrsize, int len, int format) { wave_head form; form.magic = *((int *)RIFF_ID); form.len0 = LONG_LE(((int)(hdrsize + databytes))); form.magic1 = *((int *)WAVE_ID); form.magic2 = *((int *)FMT_ID); form.len = LONG_LE((int)len); // length of format chunk form.format = SHORT_LE((short)format); // PCM == 1 form.nchns = SHORT_LE((short)m_channels); form.rate = LONG_LE((int)m_sr); // sampling rate // bytes per sec form.aver = LONG_LE((int)(m_sr*(m_bits/8)*m_channels)); // bytes per frame form.nBlockAlign = SHORT_LE((short)((m_bits/8)*m_channels)); form.size = SHORT_LE((short)m_bits); // bits per sample return form; } short SndWave::ReadHeader(){ fread(&m_header, sizeof(wave_head), 1, m_file); m_header.len0 = LONG_LE(m_header.len0); m_header.len = LONG_LE(m_header.len); m_header.format = SHORT_LE(m_header.format); // PCM == 1 m_header.nchns = SHORT_LE(m_header.nchns); m_header.rate = LONG_LE(m_header.rate); // sampling rate m_header.aver = LONG_LE(m_header.aver);// bytes per sec m_header.nBlockAlign = SHORT_LE(m_header.nBlockAlign); // bytes per frame m_header.size = SHORT_LE(m_header.size); // bits per sample fseek(m_file,m_header.len+20,SEEK_SET); char chunk_id[4]; int chunksize; fread(&chunk_id,sizeof(char), 4, m_file); fread(&chunksize,sizeof(int), 1, m_file); chunksize = LONG_LE(chunksize); while (*(int*)chunk_id != *(int*)DATA_ID) { fseek(m_file,chunksize,SEEK_CUR); fread(&chunk_id,sizeof(char), 4, m_file); fread(&chunksize,sizeof(int), 1, m_file); chunksize = LONG_LE(chunksize); } m_wdata.datasize = chunksize; return 1; } short SndWave::Read(){ if(!m_error && (m_mode == READ) && !feof(m_file)){ int i; short items; items = fread(m_buffer, 1, m_buffsize, m_file); items = (items < m_buffsize ? m_itemsleft : items/m_sampsize); switch(m_bits) { case 16: for(m_vecpos=0; m_vecpos < m_samples; m_vecpos+=m_channels) for(i=0; i < m_channels; i++) m_output[m_vecpos+i] = (m_vecpos+i < items ? (float) SHORT_LE(m_sp[m_vecpos+i]) : 0.f); break; case 8: for(m_vecpos=0; m_vecpos < m_samples; m_vecpos+=m_channels) for(i=0; i < m_channels; i++) m_output[m_vecpos+i] = (m_vecpos+i < items ? (float) m_cp[m_vecpos+i] : 0.f); break; case 32: for(m_vecpos=0; m_vecpos < m_samples; m_vecpos+=m_channels) for(i=0; i < m_channels; i++) m_output[m_vecpos+i] = (m_vecpos+i < items ? (float) LONG_LE(m_lp[m_vecpos+i]) : 0.f); break; case 24: char tmp[4]; for(m_vecpos=0; m_vecpos < m_samples; m_vecpos+=m_channels) for(i=0; i < m_channels; i++){ if(m_vecpos+i < items ){ tmp[1] = m_s24p[m_vecpos+i].s[0]; tmp[2] = m_s24p[m_vecpos+i].s[1]; tmp[3] = m_s24p[m_vecpos+i].s[2]; tmp[0] = 0; m_output[m_vecpos+i] = (float) LONG_LE(*(int *) tmp); }else m_output[m_vecpos+i] = 0.f; } break; } return items; } for(m_vecpos=0; m_vecpos < m_samples; m_vecpos++) m_output[m_vecpos] = 0.f; return 0; } short SndWave::Write(){ if(!m_error && (m_mode != READ)){ int i,n; switch(m_bits){ case 16: for(m_vecpos=n=0; m_vecpos < m_samples; m_vecpos+=m_channels, n++) for(i = 0; i < m_channels; i++) if(m_IOobjs[i]) m_sp[m_vecpos+i] = SHORT_LE((short)m_IOobjs[i]->Output(n)); return (short) fwrite(m_sp, m_buffsize, 1, m_file); case 8: for(m_vecpos=n=0; m_vecpos < m_samples; m_vecpos+=m_channels, n++) for(i = 0; i < m_channels; i++) if(m_IOobjs[i]) m_cp[m_vecpos+i] = (char) m_IOobjs[i]->Output(n); return (short) fwrite(m_cp, m_buffsize, 1, m_file); case 32: for(m_vecpos=n=0; m_vecpos < m_samples; m_vecpos+=m_channels, n++) for(i = 0; i < m_channels; i++) if(m_IOobjs[i]) m_lp[m_vecpos+i] = LONG_LE((int) m_IOobjs[i]->Output(n)); return (short) fwrite(m_lp, m_buffsize, 1, m_file); case 24: union { char c[4]; int l;} tmp; for(m_vecpos=n=0; m_vecpos < m_samples; m_vecpos+=m_channels, n++) for(i = 0; i < m_channels; i++) if(m_IOobjs[i]){ tmp.l = LONG_LE((int)m_IOobjs[i]->Output(n)); m_s24p[m_vecpos+i].s[0] = tmp.c[1]; m_s24p[m_vecpos+i].s[1] = tmp.c[2]; m_s24p[m_vecpos+i].s[2] = tmp.c[3]; } return (short) fwrite(m_s24p, m_buffsize, 1, m_file); } } return 0; } char* SndWave::ErrorMessage() { char* message; switch(m_error){ case 21: message = "File open error."; break; case 23: message = "Error opening file to update header."; break; case 25: message = "bad RIFF ID."; break; case 26: message = "this is not a WAVE file."; break; case 27: message = "could not find data chunk ID."; break; default: message = SndFIO::ErrorMessage(); break; } return message; } SndObj-2.6.7/src/SndWave.h000644 000766 000024 00000005351 12062673766 015711 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // SndWave.h: interface of the Sndwave base class. // // // // // // // //************************************************************// #ifndef _SNDWAVE_H #define _SNDWAVE_H #include "SndFIO.h" const char RIFF_ID[4] = {'R','I','F','F'}; const char WAVE_ID[4] = {'W','A','V','E'}; const char FMT_ID[4] = {'f','m','t',' '}; const char DATA_ID[4] = {'d','a','t','a'}; struct wave_head{ int magic; // 'RIFF' int len0; // Chunk size = len + 8 + 16 + 12 int magic1; // 'WAVE' int magic2; // 'fmt ' int len; // length of header (16) short format;// 1 is PCM (the only format supported) short nchns; // Number of channels int rate; // sampling frequency int aver; // Average bytes/sec !! short nBlockAlign; // (rate*nch +7)/8 short size; // size of each sample (8,16,32) }; struct wave_data { int magic3; // 'data' int datasize; // data chunk size }; class SndWave : public SndFIO { protected: bool m_iswave; int m_wchkpos; int m_len; int m_format; int m_hdrsize; wave_head m_header; wave_data m_wdata; short ReadHeader(); wave_head PutHeader(int databytes=0, int hdrsize=36, int len=16, int format=1); public: wave_head GetHeader(){ return m_header;} SndWave(char* name, short mode = OVERWRITE, short channels=1, short bits=16, SndObj** inputlist=0, float spos= 0.f, int vecsize = DEF_VECSIZE, float sr = DEF_SR); ~SndWave(); short Read(); short Write(); bool IsWave(){ return m_iswave;} char* ErrorMessage(); }; #endif SndObj-2.6.7/src/SndWaveX.cpp000644 000766 000024 00000016246 12062673766 016401 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 "SndWaveX.h" SndWaveX::SndWaveX(char* name, short mode, short channels, int channelmask, short bits, short format, SndObj** inputlist, float spos, int vecsize, float sr): SndWave(name,mode,channels, bits,inputlist,spos,vecsize,sr){ short cbsize; m_len = 40; m_format = WAVE_FORMAT_EXTENSIBLE; m_hdrsize = 60; m_subformat = format; m_fp = (float *)m_buffer; m_dp = (double *)m_buffer; cbsize = SHORT_LE((short)22); if(mode != READ){ GUID subfmt; short sbits; int mask; PutHeader(0,m_hdrsize,m_len, m_format); sbits = SHORT_LE((short)m_bits); mask = LONG_LE((long) (m_ChannelMask = channelmask)); subfmt.Data1 = LONG_LE((long)format); subfmt.Data2 = SHORT_LE((short)0x0000); subfmt.Data3 = SHORT_LE((short)0x0010); subfmt.Data4[0] = 0x80; subfmt.Data4[1] =0x00; subfmt.Data4[2] = 0x00; subfmt.Data4[3] = 0xaa; subfmt.Data4[4] = 0x00; subfmt.Data4[5] = 0x38; subfmt.Data4[6] = 0x9b; subfmt.Data4[7] = 0x71; m_SubFormat = subfmt; if(mode != APPEND){ fseek(m_file, sizeof(wave_head), SEEK_SET); fwrite(&cbsize, sizeof(short), 1, m_file); fwrite(&sbits, sizeof(short), 1, m_file); fwrite(&mask, sizeof(int), 1, m_file); fwrite(&subfmt, sizeof(GUID), 1, m_file); m_wchkpos = ftell(m_file); fwrite(&m_wdata, sizeof(wave_data), 1, m_file); m_datapos = ftell(m_file); if(spos > 0) SetPos(spos); } else m_wchkpos = sizeof(wave_head) + 22 + 2; } else { // if this is a format extensible if(m_header.format == -2){ fseek(m_file, sizeof(wave_head), SEEK_SET); fread(&cbsize,sizeof(short),1, m_file); cbsize = SHORT_LE((short)cbsize); fread(&m_bits,sizeof(short),1, m_file); m_bits = SHORT_LE((short)m_bits); fread(&m_ChannelMask,sizeof(int),1, m_file); m_ChannelMask = LONG_LE((long) m_ChannelMask); fread(&m_SubFormat, sizeof(GUID), 1, m_file); m_subformat = m_SubFormat.Data1 = LONG_LE((long) m_SubFormat.Data1 ); m_SubFormat.Data2 = SHORT_LE((short) m_SubFormat.Data2 ); m_SubFormat.Data3 = SHORT_LE((short) m_SubFormat.Data3 ); m_iswavex = true; } else m_iswavex = false; fseek(m_file, m_datapos, SEEK_SET); if(spos > 0) SetPos(spos); } } SndWaveX::~SndWaveX(){ } void SndWaveX::GetHeader(WAVEFORMATEXTENSIBLE* pheader){ pheader->waveformatex.len0 = m_header.len0; pheader->waveformatex.len = m_header.len; pheader->waveformatex.format = m_header.format; // PCM == 1 pheader->waveformatex.nchns = m_header.nchns; pheader->waveformatex.rate = m_header.rate; // sampling rate pheader->waveformatex.aver = m_header.aver;// bytes per sec pheader->waveformatex.nBlockAlign = m_header.nBlockAlign; // bytes per frame pheader->waveformatex.size = m_header.size; // bits per sample pheader->waveformat_ext.wValidBitsPerSample = m_bits; pheader->waveformat_ext.dwChannelMask = m_ChannelMask; pheader->waveformat_ext.SubFormat = m_SubFormat; } short SndWaveX::Read(){ if(!m_error && (m_mode == READ) && !feof(m_file)){ int i; short items; items = fread(m_buffer, 1, m_buffsize, m_file); items = (items < m_buffsize ? m_itemsleft : items/m_sampsize); switch(m_bits) { case 16: for(m_vecpos=0; m_vecpos < m_samples; m_vecpos+=m_channels) for(i=0; i < m_channels; i++) m_output[m_vecpos+i] = (m_vecpos+i < items ? (float) SHORT_LE(m_sp[m_vecpos+i]) : 0.f); break; case 8: for(m_vecpos=0; m_vecpos < m_samples; m_vecpos+=m_channels) for(i=0; i < m_channels; i++) m_output[m_vecpos+i] = (m_vecpos+i < items ? (float) m_cp[m_vecpos+i] : 0.f); break; case 32: if(m_subformat == PCM) for(m_vecpos=0; m_vecpos < m_samples; m_vecpos+=m_channels) for(i=0; i < m_channels; i++) m_output[m_vecpos+i] = (m_vecpos+i < items ? (float) LONG_LE(m_lp[m_vecpos+i]) : 0.f); else for(m_vecpos=0; m_vecpos < m_samples; m_vecpos+=m_channels) for(i=0; i < m_channels; i++) m_output[m_vecpos+i] = (m_vecpos+i < items ? m_fp[m_vecpos+i] : 0.f); case 24: for(m_vecpos=0; m_vecpos < m_samples; m_vecpos+=m_channels) for(i=0; i < m_channels; i++) m_output[m_vecpos+i] = (m_vecpos+i < items ? (float) LONG_LE( (*(long *)m_s24p[m_vecpos+i].s)) : 0.f); case 64: for(m_vecpos=0; m_vecpos < m_samples; m_vecpos+=m_channels) for(i=0; i < m_channels; i++) m_output[m_vecpos+i] = (float) (m_vecpos+i < items ? m_dp[m_vecpos+i] : 0.); break; } return items; } for(m_vecpos=0; m_vecpos < m_samples; m_vecpos++) m_output[m_vecpos] = 0.f; return 0; } short SndWaveX::Write(){ if(!m_error && (m_mode != READ)){ int i,n; switch(m_bits){ case 16: for(m_vecpos=n=0; m_vecpos < m_samples; m_vecpos+=m_channels, n++) for(i = 0; i < m_channels; i++) if(m_IOobjs[i]) m_sp[m_vecpos+i] = SHORT_LE((short)m_IOobjs[i]->Output(n)); return (short) fwrite(m_sp, m_buffsize, 1, m_file); case 8: for(m_vecpos=n=0; m_vecpos < m_samples; m_vecpos+=m_channels, n++) for(i = 0; i < m_channels; i++) if(m_IOobjs[i]) m_cp[m_vecpos+i] = (char) m_IOobjs[i]->Output(n); return (short) fwrite(m_cp, m_buffsize, 1, m_file); case 32: for(m_vecpos=n=0; m_vecpos < m_samples; m_vecpos+=m_channels, n++) for(i = 0; i < m_channels; i++) if(m_IOobjs[i]){ if(m_subformat == PCM) m_lp[m_vecpos+i] = LONG_LE((long) m_IOobjs[i]->Output(n)); else m_fp[m_vecpos+i] = m_IOobjs[i]->Output(n); } return (short) fwrite(m_buffer, m_buffsize, 1, m_file); case 24: for(m_vecpos=n=0; m_vecpos < m_samples; m_vecpos+=m_channels, n++) for(i = 0; i < m_channels; i++) if(m_IOobjs[i]){ (*(long *)m_s24p[m_vecpos+i].s) = LONG_LE((long) m_IOobjs[i]->Output(n)); } return (short) fwrite(m_s24p, m_buffsize, 1, m_file); case 64: for(m_vecpos=n=0; m_vecpos < m_samples; m_vecpos+=m_channels, n++) for(i = 0; i < m_channels; i++) if(m_IOobjs[i]) m_dp[m_vecpos+i] = (double) m_IOobjs[i]->Output(n); return (short) fwrite(m_buffer, m_buffsize, 1, m_file); } } return 0; } SndObj-2.6.7/src/SndWaveX.h000644 000766 000024 00000007102 12062673766 016035 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 /////////////////////////////////////////////// // SndWaveX.h: Interface of the SndWaveX // // wave format extensible file IO // //////////////////////////////////////////////// #ifndef _SNDWAVEX_H #define _SNDWAVEX_H #ifdef WIN #include #endif #include "SndWave.h" #define WAVE_FORMAT_EXTENSIBLE (0xFFFE) #ifndef WIN #define WAVE_FORMAT_PCM (0x0001) #endif #define WAVE_FORMAT_IEEE_FLOAT (0x0003) #define SPEAKER_FRONT_LEFT 0x1 #define SPEAKER_FRONT_RIGHT 0x2 #define SPEAKER_FRONT_CENTER 0x4 #define SPEAKER_LOW_FREQUENCY 0x8 #define SPEAKER_BACK_LEFT 0x10 #define SPEAKER_BACK_RIGHT 0x20 #define SPEAKER_FRONT_LEFT_OF_CENTER 0x40 #define SPEAKER_FRONT_RIGHT_OF_CENTER 0x80 #define SPEAKER_BACK_CENTER 0x100 #define SPEAKER_SIDE_LEFT 0x200 #define SPEAKER_SIDE_RIGHT 0x400 #define SPEAKER_TOP_CENTER 0x800 #define SPEAKER_TOP_FRONT_LEFT 0x1000 #define SPEAKER_TOP_FRONT_CENTER 0x2000 #define SPEAKER_TOP_FRONT_RIGHT 0x4000 #define SPEAKER_TOP_BACK_LEFT 0x8000 #define SPEAKER_TOP_BACK_CENTER 0x10000 #define SPEAKER_TOP_BACK_RIGHT 0x20000 #define SPEAKER_RESERVED 0x80000000 #ifndef WIN struct GUID { int Data1; short Data2; short Data3; unsigned char Data4[8]; }; #endif struct wav_ex { short wValidBitsPerSample; int dwChannelMask; GUID SubFormat; }; struct WAVEFORMATEXTENSIBLE { wave_head waveformatex; wav_ex waveformat_ext; }; const int PCM = WAVE_FORMAT_PCM; const int IEEE_FLOAT = WAVE_FORMAT_IEEE_FLOAT; const GUID KSDATAFORMAT_SUBTYPE_PCM = { 0x00000001, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} }; const GUID KSDATAFORMAT_SUBTYPE_IEEE_FLOAT = { 0x00000003, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} }; class SndWaveX : public SndWave { protected: inline bool GUIDcheck(GUID ID); int m_ChannelMask; GUID m_SubFormat; int m_subformat; float* m_fp; double* m_dp; bool m_iswavex; public: SndWaveX(char* name, short mode = OVERWRITE, short channels=1, int channelmask=0, short bits=16, short format=PCM, SndObj** inputlist=0, float spos= 0.f, int vecsize = DEF_VECSIZE, float sr = DEF_SR); ~SndWaveX(); void GetHeader(WAVEFORMATEXTENSIBLE* pheader); int GetChannelMask(){ return m_ChannelMask;} short Read(); short Write(); bool IsWaveExtensible(){ return m_iswavex; } }; bool SndWaveX::GUIDcheck(GUID ID){ if( (m_SubFormat.Data1 == ID.Data1) && (m_SubFormat.Data2 == ID.Data2) && (m_SubFormat.Data3 == ID.Data3) ){ for(int i=0; i < 8; i++) if(m_SubFormat.Data4[i] != ID.Data4[i]) return false; return true; } else return false; } #endif SndObj-2.6.7/src/SpecCart.cpp000644 000766 000024 00000003235 12062673766 016400 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 "SpecCart.h" SpecCart::SpecCart(){ } SpecCart::SpecCart(SndObj *input, int vecsize, float sr) :SpecMult(input, 0, vecsize, sr){ } SpecCart::~SpecCart(){ } short SpecCart::DoProcess(){ if(!m_error){ if(m_input){ float a, b; for(m_vecpos = 1; m_vecpos < m_vecsize; m_vecpos+=2) { // every complex pair except 0 and nyquist if(m_enable) { // convert a = m_input->Output(m_vecpos); b = m_input->Output(m_vecpos+1); convert(&a, &b); m_output[m_vecpos] = a; m_output[m_vecpos+1] = b; } else m_output[m_vecpos+1] = m_output[m_vecpos] = 0.f; } return 1; } else { m_error = 3; return 0; } } else return 0; } SndObj-2.6.7/src/SpecCart.h000644 000766 000024 00000002563 12062673766 016050 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 _SpecCart_H #define _SpecCart_H #include "SpecMult.h" class SpecCart : public SpecMult { protected: void inline convert(float* a, float* b); public: SpecCart(); SpecCart(SndObj* input,int vecsize=DEF_FFTSIZE, float sr=DEF_SR); ~SpecCart(); short DoProcess(); }; void SpecCart::convert(float* a, float* b){ float re, im; re = (*a)*cos(*b); im = (*a)*sin(*b); *a=re; *b=im; } #endif SndObj-2.6.7/src/SpecCombine.cpp000644 000766 000024 00000004333 12062673766 017063 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 "SpecCombine.h" SpecCombine::SpecCombine(){ m_halfsize = m_vecsize/2; AddMsg("magnitude input", 33); AddMsg("phase input", 34); } SpecCombine::SpecCombine(SndObj *magin, SndObj* phasin, int vecsize, float sr) :SpecCart(magin, vecsize, sr){ m_input2 = phasin; m_halfsize = m_vecsize/2; AddMsg("magnitude input", 33); AddMsg("phase input", 34); } SpecCombine::~SpecCombine(){ } int SpecCombine::Connect(char* mess, void *input){ switch (FindMsg(mess)){ case 33: m_input = (SndObj *) input; return 1; case 34: m_input2 = (SndObj *) input; return 1; default: return 0; } } short SpecCombine::DoProcess(){ if(!m_error){ if(m_input && m_input2){ float a, b; int p; m_output[0] = m_input->Output(0); m_output[1] = m_input->Output(m_halfsize); if(m_enable) { for(m_vecpos = 1; m_vecpos < m_halfsize; m_vecpos++) { p = m_vecpos*2; a = m_input->Output(m_vecpos); b = m_input2->Output(m_vecpos); convert(&a, &b); m_output[p] = a; m_output[p+1] = b; } } else for(m_vecpos = 0; m_vecpos < m_halfsize; m_vecpos++) m_output[m_vecpos] = m_output[m_vecpos+m_halfsize] = 0.f; return 1; } else { m_error = 3; return 0; } } else return 0; } SndObj-2.6.7/src/SpecCombine.h000644 000766 000024 00000002641 12062673766 016530 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 _SpecCombine_H #define _SpecCombine_H #include "SpecCart.h" class SpecCombine : public SpecCart { protected: int m_halfsize; public: SpecCombine(); SpecCombine(SndObj* magin, SndObj* phasin, int vecsize=DEF_FFTSIZE, float sr=DEF_SR); ~SpecCombine(); void SetPhaseInput(SndObj* phasin){ m_input2 = phasin; } void SetMagInput(SndObj* magin) { m_input = magin; } int Connect(char* mess, void* input); short DoProcess(); }; #endif SndObj-2.6.7/src/SpecEnvTable.cpp000644 000766 000024 00000004226 12062673766 017210 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 "SpecEnvTable.h" SpecEnvTable :: SpecEnvTable() : m_pi(8 * atan(1.)){ double phi = 0.f; double delay = (m_L-1)/2; double re, im; for(int i=2, j=2; i < m_L; i+=2, j++){ phi = -(delay*j*2*m_pi)/m_L; re = m_table[i]*cos(phi); im = m_table[i]*sin(phi); m_table[i] = (float)re; m_table[i+1] = (float)im; } } SpecEnvTable :: SpecEnvTable(long L, int segments, float start, float* points, float* lengths, float type, float nyquistamp) : PVEnvTable(L,segments,start,points,lengths,type,44100.f,nyquistamp), m_pi(8 * atan(1.)) { double phi = 0.f; double delay = (m_L-1)/2; double re, im; for(int i=2, j=2; i < m_L; i+=2, j++){ phi = -(delay*j*2*m_pi)/m_L; re = m_table[i]*cos(phi); im = m_table[i]*sin(phi); m_table[i] = (float)re; m_table[i+1] = (float)im; } } SpecEnvTable::~SpecEnvTable(){ } short SpecEnvTable :: MakeTable(){ PVEnvTable::MakeTable(); double phi = 0.f; double delay = (m_L-1)/2; double re, im; for(int i=2, j=2; i < m_L; i+=2, j++){ phi = -(delay*j*2*m_pi)/m_L; re = m_table[i]*cos(phi); im = m_table[i]*sin(phi); m_table[i] = (float)re; m_table[i+1] = (float)im; } return 1; } SndObj-2.6.7/src/SpecEnvTable.h000644 000766 000024 00000003301 12062673766 016646 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // SpecEnvTable.h: interface of the SpecEnvTable class // // // // // // // //************************************************************// #ifndef _SpecEnvTable_H #define _SpecEnvTable_H #include "PVEnvTable.h" class SpecEnvTable : public PVEnvTable { protected: const double m_pi; public: short MakeTable(); SpecEnvTable(); SpecEnvTable(long L, int segments, float start, float* points, float* lengths,float type = 0.f, float nyquistamp=0.f); ~SpecEnvTable(); }; #endif SndObj-2.6.7/src/SpecIn.cpp000644 000766 000024 00000005410 12062673766 016052 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // SpecIn.cpp: implementation of the SpecIn class. // // // // // // // //************************************************************// #include "SpecIn.h" SpecIn::SpecIn(){ m_ioinput = 0; m_channel = 1; m_sr = 44100.f; m_enable = 1; m_initpos= 0; AddMsg("channel", 22); } SpecIn::SpecIn(SndFIO *input, short channel, int vecsize, float sr): SndObj(0, vecsize, sr){ m_ioinput = input; m_channel = channel; m_initpos = (m_channel-1)*vecsize; AddMsg("channel", 22); } SpecIn::~SpecIn(){ } int SpecIn::Connect(char* mess, void* input){ switch (FindMsg(mess)){ case 3: SetInput((SndIO *) input); return 1; default: return SndObj::Connect(mess,input); } } int SpecIn::Set(char* mess, float value){ switch (FindMsg(mess)){ case 22: m_channel = (short) value; return 1; default: return SndObj::Set(mess,value); } } short SpecIn::DoProcess(){ if(!m_error){ for(m_vecpos=0;m_vecpos < m_vecsize; m_vecpos++){ if(m_enable){ if(m_ioinput){ m_output[m_vecpos] = m_ioinput->Output(m_vecpos+m_initpos); } else{ m_error = 10; return 0; } } else m_output[m_vecpos] = 0.f; } return 1; } else return 0; } ///////////// ERROR HANDLING ////////////////////////////////// char* SpecIn::ErrorMessage(){ char* message; switch(m_error){ case 0: message = "No error."; break; case 10: message = "DoProcess() failed. No SndIO input object."; break; default: message = SndObj::ErrorMessage(); break; } return message; } SndObj-2.6.7/src/SpecIn.h000644 000766 000024 00000003621 12062673766 015521 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // SpecIn.h: interface of the SpecIn class. // // // // // // // //************************************************************// #ifndef _SpecIn_H #define _SpecIn_H #include "SndObj.h" #include "SndFIO.h" class SpecIn : public SndObj { protected: SndIO* m_ioinput; short m_channel; int m_initpos; public: SpecIn(); SpecIn(SndFIO *input, short channel=1, int vecsize=DEF_FFTSIZE, float sr=DEF_SR); ~SpecIn(); void SetInput(SndIO *input, short channel=1){ m_ioinput = input; m_channel = channel; m_initpos = (m_channel-1)*m_vecsize; } int Connect(char* mess, void* input); int Set(char* mess, float value); short DoProcess(); char* ErrorMessage(); }; #endif SndObj-2.6.7/src/SpecInterp.cpp000644 000766 000024 00000004503 12062673766 016747 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 "SpecInterp.h" SpecInterp::SpecInterp(){ m_offset = 0.f; m_interpobj = 0; AddMsg("interpolation", 31); } SpecInterp::SpecInterp(float i_offset, SndObj *input1, SndObj* input2, SndObj* interpobj, int vecsize, float sr) :SpecMult(input1, input2, vecsize, sr) { m_offset = i_offset; m_interpobj = interpobj; AddMsg("interpolation", 31); } SpecInterp::~SpecInterp(){ } int SpecInterp::Connect(char* mess, void* input){ switch(FindMsg(mess)){ case 31: SetInterp(m_offset, (SndObj*) input); return 1; default: return SpecMult::Connect(mess, input); } } int SpecInterp::Set(char* mess, float value){ switch(FindMsg(mess)){ case 31: SetInterp(value, m_interpobj); return 1; default: return SndObj::Set(mess, value); } } short SpecInterp::DoProcess(){ if(!m_error){ if(m_input && m_input2){ float interp, val; interp = m_offset + (m_interpobj ? m_interpobj->Output(0) : 0); interp = interp < 0 ? 0 : (interp <= 1 ? interp : 1); for(m_vecpos = 0; m_vecpos < m_vecsize; m_vecpos++) { if(m_enable) { // interpolate val = m_input->Output(m_vecpos); m_output[m_vecpos] = val + (m_input2->Output(m_vecpos) - val)*interp; } else m_output[m_vecpos] = 0.f; } return 1; } else { m_error = 3; return 0; } } else return 0; } SndObj-2.6.7/src/SpecInterp.h000644 000766 000024 00000002777 12062673766 016427 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 _SPECINTERP_H #define _SPECINTERP_H #include "SpecMult.h" class SpecInterp : public SpecMult { protected: float m_offset; SndObj* m_interpobj; public: SpecInterp(); SpecInterp(float i_offset, SndObj* input1, SndObj* input2, SndObj* interpobj=0, int vecsize=DEF_FFTSIZE, float sr=DEF_SR); ~SpecInterp(); int Connect(char* mess, void* input); int Set(char* mess, float value); void SetInterp(float i_offset, SndObj* interpobj=0){ m_offset = i_offset; m_interpobj = interpobj; } short DoProcess(); }; #endif SndObj-2.6.7/src/SpecMult.cpp000644 000766 000024 00000005643 12062673766 016435 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 "SpecMult.h" SpecMult::SpecMult(){ SetVectorSize(DEF_FFTSIZE); m_input2 = 0; AddMsg("input 2", 21); AddMsg("table", 22); } SpecMult::SpecMult(SndObj* input1, SndObj* input2, int vecsize, float sr) : SndObj(input1, vecsize, sr){ m_input2 = input2; AddMsg("input 2", 21); AddMsg("table", 22); m_dynamic = true; } SpecMult::SpecMult(Table* spectab, SndObj* input1, int vecsize, float sr) : SndObj(input1, vecsize, sr){ m_input2 = 0; AddMsg("input 2", 21); AddMsg("table", 22); if(spectab->GetLen() >= vecsize) { m_spectable = spectab; } m_dynamic = false; } SpecMult::~SpecMult(){ } int SpecMult::Connect(char* mess, void* input){ switch(FindMsg(mess)){ case 21: SetInput2((SndObj*) input); return 1; case 22: SetTable((Table*) input); return 1; default: return SndObj::Connect(mess, input); } } short SpecMult::DoProcess(){ if(!m_error){ if(m_input && (m_input2 || !m_dynamic)){ float re1,re2,im1,im2; for(m_vecpos = 2; m_vecpos < m_vecsize; m_vecpos+=2) { // every complex pair except 0 and nyquist if(m_enable) { re1 = m_input->Output(m_vecpos); if(m_dynamic){ re2 = m_input2->Output(m_vecpos); } else re2 = m_spectable->Lookup(m_vecpos); im1 = m_input->Output(m_vecpos+1); if(m_dynamic) { im2 = m_input2->Output(m_vecpos+1); } else im2 = m_spectable->Lookup(m_vecpos+1); // complex multiplication (a+ib)*(c+id) // (ac - bd) - i(ad + bc) m_output[m_vecpos] = re1*re2 - im1*im2; m_output[m_vecpos+1] = re1*im2 + im1*re2; } else m_output[m_vecpos+1] = m_output[m_vecpos] = 0.f; } m_output[0] = m_input->Output(0)*(m_dynamic ? m_input2->Output(0) : m_spectable->Lookup(0)); m_output[1] = m_input->Output(1)*(m_dynamic ? m_input2->Output(1) : m_spectable->Lookup(1)); return 1; } else { m_error = 3; return 0; } } else return 0; } SndObj-2.6.7/src/SpecMult.h000644 000766 000024 00000003177 12062673766 016102 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 _SPECMULT_H #define _SPECMULT_H #include "SndObj.h" #include "Table.h" class SpecMult : public SndObj{ protected: SndObj* m_input2; Table* m_spectable; bool m_dynamic; public: SpecMult(); SpecMult(SndObj* input1, SndObj* input2, int vecsize=DEF_FFTSIZE, float sr=DEF_SR); SpecMult(Table* spectab, SndObj* input1, int vecsize=DEF_FFTSIZE, float sr=DEF_SR); ~SpecMult(); int Connect(char* mess, void* input); void SetInput2(SndObj* input2){ m_input2 = input2; m_dynamic = true; } void SetTable(Table *spectab) { if(spectab->GetLen() >= m_vecsize){ m_spectable = spectab; m_dynamic = false; } } short DoProcess(); }; #endif SndObj-2.6.7/src/SpecPolar.cpp000644 000766 000024 00000003220 12062673766 016556 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 "SpecPolar.h" SpecPolar::SpecPolar(){ } SpecPolar::SpecPolar(SndObj *input, int vecsize, float sr) :SpecMult(input, 0, vecsize, sr){ } SpecPolar::~SpecPolar(){ } short SpecPolar::DoProcess(){ if(!m_error){ if(m_input){ float a, b; for(m_vecpos = 1; m_vecpos < m_vecsize; m_vecpos+=2) { // every complex pair if(m_enable) { // convert a = m_input->Output(m_vecpos); b = m_input->Output(m_vecpos+1); convert(&a, &b); m_output[m_vecpos] = a; m_output[m_vecpos+1] = b; } else m_output[m_vecpos+1] = m_output[m_vecpos] = 0.f; } return 1; } else { m_error = 3; return 0; } } else return 0; } SndObj-2.6.7/src/SpecPolar.h000644 000766 000024 00000002624 12062673766 016232 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 _SPECPOLAR_H #define _SPECPOLAR_H #include "SpecMult.h" class SpecPolar : public SpecMult { protected: void inline convert(float* a, float* b); public: SpecPolar(); SpecPolar(SndObj* input,int vecsize=DEF_FFTSIZE, float sr=DEF_SR); ~SpecPolar(); short DoProcess(); }; void SpecPolar::convert(float* a, float* b){ float mag, pha; mag = sqrt((*a)*(*a) + (*b)*(*b)); pha = atan2((*b),(*a)); *a=mag; *b=pha; } #endif SndObj-2.6.7/src/SpecSplit.cpp000644 000766 000024 00000005334 12062673766 016604 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 "SpecSplit.h" SpecSplit::SpecSplit(){ // outputs fftsize/2+1 pairs of values m_channel = new SndObj[2]; SetVectorSize(DEF_FFTSIZE+2); m_halfsize = m_vecsize/2; m_channel[0].SetVectorSize(m_halfsize); m_channel[1].SetVectorSize(m_halfsize); magnitude = &m_channel[0]; phase = &m_channel[1]; } SpecSplit::SpecSplit(SndObj *input, int vecsize, float sr) :SpecPolar(input,vecsize, sr){ m_channel = new SndObj[2]; m_halfsize = m_vecsize/2; m_channel[0].SetVectorSize(m_halfsize); m_channel[1].SetVectorSize(m_halfsize); magnitude = &m_channel[0]; phase = &m_channel[1]; } SpecSplit::~SpecSplit(){ delete[] m_channel; } short SpecSplit::DoProcess(){ if(!m_error){ if(m_input){ if(m_enable) { float a, b; // float* start = m_output; int p; // mag[0] -> pos 0 m_output[0] = m_input->Output(0); // mag[nyquist] -> pos fftsize/2 m_output[m_halfsize-1] = m_input->Output(1); // pha[0] -> pos fftsize/2 + 1 m_output[m_halfsize] = 0.f; // pha[nyquist] pos fftsize + 1 m_output[m_vecsize-1] = 0.f; // ignore the 0,nyquist pair // and go all the way to FFTSIZE/2 // halfsize is (FFTSIZE+2)/2 for(m_vecpos = 1; m_vecpos < m_halfsize-1; m_vecpos++) { // every complex pair // convert p = m_vecpos*2; a = m_input->Output(p); b = m_input->Output(p+1); convert(&a, &b); m_output[m_vecpos] = a; m_output[m_vecpos+m_halfsize] = b; } // split the mags and phases m_channel[0].PushIn(m_output, m_halfsize); m_channel[1].PushIn(m_output + m_halfsize, m_halfsize); } else for(m_vecpos = 0; m_vecpos < m_halfsize; m_vecpos++) m_output[m_vecpos] = m_output[m_vecpos+m_halfsize] = 0.f; return 1; } else { m_error = 3; return 0; } } else return 0; } SndObj-2.6.7/src/SpecSplit.h000644 000766 000024 00000002447 12062673766 016253 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 _SpecSplit_H #define _SpecSplit_H #include "SpecPolar.h" class SpecSplit : public SpecPolar { protected: SndObj* m_channel; int m_halfsize; public: SndObj* magnitude; SndObj* phase; SpecSplit(); SpecSplit(SndObj* input,int vecsize=DEF_FFTSIZE+2, float sr=DEF_SR); ~SpecSplit(); short DoProcess(); }; #endif SndObj-2.6.7/src/SpecThresh.cpp000644 000766 000024 00000005004 12062673766 016740 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 "SpecThresh.h" SpecThresh::SpecThresh(){ m_thresh = 0; AddMsg("threshold", 41); } SpecThresh::SpecThresh(float threshold, SndObj *input, int vecsize, float sr) :SpecPolar(input,vecsize, sr){ m_thresh = threshold; AddMsg("threshold", 41); } SpecThresh::~SpecThresh(){ } int SpecThresh::Set(char* mess, float value){ switch (FindMsg(mess)){ case 41: SetThreshold(value); return 1; default: return SpecPolar::Set(mess,value); } } short SpecThresh::DoProcess(){ if(!m_error){ if(m_input){ if(m_enable) { float a, b, max=0.f; for(m_vecpos = 2; m_vecpos < m_vecsize; m_vecpos+=2){ a = m_input->Output(m_vecpos); b = m_input->Output(m_vecpos+1); convert(&a, &b); max = (max < a ? a : max); m_output[m_vecpos] = a; m_output[m_vecpos+1] = b; } max = (max < m_input->Output(0) ? m_input->Output(0) : max); max = (max < m_input->Output(1) ? m_input->Output(1) : max); for(m_vecpos = 2; m_vecpos < m_vecsize; m_vecpos+=2){ a = (m_output[m_vecpos] > max*m_thresh ? m_output[m_vecpos] : 0.f); b = m_output[m_vecpos+1]; m_output[m_vecpos] = a*cos(b); m_output[m_vecpos+1] = a*sin(b); } m_output[1] = (m_output[1] > max*m_thresh ? m_output[1] : 0.f); m_output[0] = (m_output[0] > max*m_thresh ? m_output[0] : 0.f); } else for(m_vecpos = 0; m_vecpos < m_vecsize; m_vecpos+=2) m_output[m_vecpos] = m_output[m_vecpos+1] = 0.f; return 1; } else { m_error = 3; return 0; } } else return 0; } SndObj-2.6.7/src/SpecThresh.h000644 000766 000024 00000002540 12062673766 016407 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 _SpecThresh_H #define _SpecThresh_H #include "SpecPolar.h" class SpecThresh : public SpecPolar { protected: float m_thresh; public: void SetThreshold(float thresh){ m_thresh = thresh; } int Set(char* mess, float value); SpecThresh(); SpecThresh(float threshold, SndObj* input, int vecsize=DEF_FFTSIZE, float sr=DEF_SR); ~SpecThresh(); short DoProcess(); }; #endif SndObj-2.6.7/src/SpecVoc.cpp000644 000766 000024 00000003546 12062673766 016243 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 "SpecVoc.h" SpecVoc::SpecVoc(){ } SpecVoc::SpecVoc(SndObj *input, SndObj *input2, int vecsize, float sr) :SpecPolar(input,vecsize, sr){ m_input2 = input2; } SpecVoc::~SpecVoc(){ } short SpecVoc::DoProcess(){ if(!m_error){ if(m_input && m_input2){ if(m_enable) { float a, b, c, d; for(m_vecpos = 2; m_vecpos < m_vecsize; m_vecpos+=2){ a = m_input->Output(m_vecpos); b = m_input->Output(m_vecpos+1); c = m_input2->Output(m_vecpos); d = m_input2->Output(m_vecpos+1); convert(&a, &b); convert(&c, &d); m_output[m_vecpos] = a*cos(d); m_output[m_vecpos+1] = a*sin(d); } m_output[1] = m_input->Output(1); m_output[0] = m_input->Output(0); } else for(m_vecpos = 0; m_vecpos < m_vecsize; m_vecpos+=2) m_output[m_vecpos] = m_output[m_vecpos+1] = 0.f; return 1; } else { m_error = 3; return 0; } } else return 0; } SndObj-2.6.7/src/SpecVoc.h000644 000766 000024 00000002331 12062673766 015677 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 _SpecVoc_H #define _SpecVoc_H #include "SpecPolar.h" class SpecVoc : public SpecPolar { protected: public: SpecVoc(); SpecVoc(SndObj* input, SndObj* input2, int vecsize=DEF_FFTSIZE, float sr=DEF_SR); ~SpecVoc(); short DoProcess(); }; #endif SndObj-2.6.7/src/StringFlt.cpp000644 000766 000024 00000020001 12062673766 016576 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //***********************************************************// // StringFlt.cpp: Implementation of the StringFlt Object // // // // // // // //***********************************************************// #include "StringFlt.h" //////////CONSTRUCTION ///////////////////// StringFlt::StringFlt(){ m_vdtime = 0.f; m_decay = 0.f; m_fdbgain = 0.f; m_fr = 0.f; m_a = 0.f; m_delaytime = .05f; m_size = (long) 2205; if(!(m_delay = new float[m_size])){ m_error = 13; #ifdef DEBUG cout << ErrorMessage(); #endif return; } m_s = 0.5f; m_APDelay = m_LPDelay = 0.f; Reset(); AddMsg("feedback gain", 31); AddMsg("frequency", 32); AddMsg("decay factor", 33); } StringFlt::StringFlt(float fr, float fdbgain, SndObj* inObj, SndObj* InFrObj, int vecsize, float sr) : DelayLine(.05f, inObj, vecsize, sr) { m_decay = 0.f; m_inputfr = InFrObj; m_fr = fr; if(fr && fr < 20) m_fr = 20.f; m_s = 0.5f; float tdelay = m_sr/m_fr; int delay = (int)tdelay; delay = ((delay+m_s) > (tdelay) ? delay - 1: delay); float fracdelay = (tdelay - (delay + m_s)); m_vdtime = m_size - tdelay; m_a = (1-fracdelay)/(1+fracdelay); m_rpointer = 0; m_fdbgain = fdbgain; m_APDelay = m_LPDelay = 0.f; AddMsg("feedback gain", 31); AddMsg("frequency", 32); AddMsg("decay factor", 33); } StringFlt::StringFlt(float fr, SndObj* inObj, float decay, SndObj* InFrObj, int vecsize, float sr) : DelayLine(.05f, inObj, vecsize, sr) { m_s = 0.5f; m_inputfr = InFrObj; m_fr = fr; if(fr && fr < 20) m_fr = 20.f; m_decay = decay; double gf = pow(10., (double)(-m_decay/(20*m_fr))); double g = cos(PI*fr/m_sr); if(gf <= g) m_fdbgain = gf/g; else { double a,b,c,d,s1,s2; double icosfun = cos(2*PI*m_fr/m_sr); a = 2 - 2*icosfun; b = 2*icosfun - 2; c = 1 - gf*gf ; d = sqrt(b*b - 4*a*c); s1 = (-b + d)/(a*2); s2 = (-b - d)/(a*2); m_s = (s1 < s2 ? s1 : s2); } float tdelay = m_sr/m_fr; int delay = (int)tdelay; delay = ((delay+m_s) > (tdelay) ? delay - 1: delay); float fracdelay = (tdelay - (delay + m_s)); m_vdtime = m_size - tdelay; m_a = (1-fracdelay)/(1+fracdelay); m_rpointer = 0; m_APDelay = m_LPDelay = 0.f; AddMsg("feedback gain", 31); AddMsg("frequency", 32); AddMsg("decay factor", 33); } StringFlt::~StringFlt() { } //////////////////OPERATIONS ////////////////////// void StringFlt::SetDecay(float decay){ m_decay = decay; double gf = pow(10., (double)(-m_decay/(20*m_fr))); double g = cos(PI*m_fr/m_sr); if(gf <= g) m_fdbgain = gf/g; else { double a,b,c,d,s1,s2; double icosfun = cos(2*PI*m_fr/m_sr); a = 2 - 2*icosfun; b = 2*icosfun - 2; c = 1 - gf*gf ; d = sqrt(b*b - 4*a*c); s1 = (-b + d)/(a*2); s2 = (-b - d)/(a*2); m_s = (s1 < s2 ? s1 : s2); } float tdelay = m_sr/m_fr; int delay = (int)tdelay; delay = ((delay+m_s) > (tdelay) ? delay - 1: delay); float fracdelay = (tdelay - (delay + m_s)); m_vdtime = m_size - tdelay; m_a = (1-fracdelay)/(1+fracdelay); } void StringFlt::SetSr(float sr){ m_sr = sr; if(m_decay){ double gf = pow(10., (double)(-m_decay/(20*m_fr))); double g = cos(PI*m_fr/m_sr); if(gf <= g) m_fdbgain = gf/g; else { double a,b,c,d,s1,s2; double icosfun = cos(2*PI*m_fr/m_sr); a = 2 - 2*icosfun; b = 2*icosfun - 2; c = 1 - gf*gf ; d = sqrt(b*b - 4*a*c); s1 = (-b + d)/(a*2); s2 = (-b - d)/(a*2); m_s = (s1 < s2 ? s1 : s2); } } else m_s = 0.5f; float tdelay = m_sr/m_fr; int delay = (int)tdelay; delay = ((delay+m_s) > (tdelay) ? delay - 1: delay); // delay = (int)(tdelay - .5); // fracdelay = (tdelay - (delay +.5f)); float fracdelay = (tdelay - (delay + m_s)); m_vdtime = m_size - tdelay; m_a = (1-fracdelay)/(1+fracdelay); if(m_delay)delete[] m_delay; if(!(m_delay = new float[m_size])){ m_error = 13; #ifdef DEBUG cout << ErrorMessage(); #endif } return; } void StringFlt::SetFreq(float fr, SndObj* InFrObj){ m_fr = fr; if(fr < 20)m_fr = 20.f; m_inputfr = InFrObj; if(m_decay){ double gf = pow(10., (double)(-m_decay/(20*m_fr))); double g = cos(PI*m_fr/m_sr); if(gf <= g) m_fdbgain = gf/g; else { double a,b,c,d,s1,s2; double icosfun = cos(2*PI*m_fr/m_sr); a = 2 - 2*icosfun; b = 2*icosfun - 2; c = 1 - gf*gf ; d = sqrt(b*b - 4*a*c); s1 = (-b + d)/(a*2); s2 = (-b - d)/(a*2); m_s = (s1 < s2 ? s1 : s2); } } else m_s = 0.5f; float tdelay = m_sr/m_fr; int delay = (int)tdelay; delay = ((delay+m_s) > (tdelay) ? delay - 1: delay); // delay = (int)(tdelay - .5); // fracdelay = (tdelay - (delay +.5f)); float fracdelay = (tdelay - (delay + m_s)); m_vdtime = m_size - tdelay; m_a = (1-fracdelay)/(1+fracdelay); } int StringFlt::Set(char* mess, float value){ switch (FindMsg(mess)){ case 31: SetFdbgain(value); return 1; case 32: SetFreq(value); return 1; case 33: SetDecay(value); return 1; case 1: SetSr(value); return 1; default: return DelayLine::Set(mess,value); } } int StringFlt::Connect(char* mess, void* input){ switch (FindMsg(mess)){ case 32: m_inputfr = (SndObj *) input; return 1; default: return SndObj::Connect(mess,input); } } short StringFlt::DoProcess(){ if(!m_error){ if(m_input){ float fr, pos, tdelay, fracdelay, w, y, output; float g, gf; int delay; for(m_vecpos=0; m_vecposOutput(m_vecpos); if(fr < 20.f) fr = 20.f; tdelay = m_sr/fr; if(m_decay){ gf = pow(10., (double)(-m_decay/(20*m_fr))); g = cos(PI*fr/m_sr); if(gf <= g) m_fdbgain = gf/g; else { double a,b,c,d,s1,s2; double icosfun = cos(2*PI*m_fr/m_sr); a = 2 - 2*icosfun; b = 2*icosfun - 2; c = 1 - gf*gf ; d = sqrt(b*b - 4*a*c); s1 = (-b + d)/(a*2); s2 = (-b - d)/(a*2); m_s = (s1 < s2 ? s1 : s2); } } delay = Ftoi(tdelay); delay = ((delay+m_s) > (tdelay) ? delay - 1: delay); // delay = (int)(tdelay - .5); // fracdelay = (tdelay - (delay +.5f)); fracdelay = (tdelay - (delay + m_s)); m_vdtime = m_size - tdelay; m_a = (1-fracdelay)/(1+fracdelay); } pos = m_wpointer + m_vdtime; while(pos >= m_size) pos -= m_size; while(pos < 0) pos += m_size; w = GetSample(pos) + m_input->Output(m_vecpos); y = m_LPDelay*(1-m_s) + w*m_s; m_LPDelay = w; output = m_APDelay + y*(m_a); m_APDelay = y + output*(-m_a); PutSample(output*m_fdbgain); m_output[m_vecpos] = output; } else m_output[m_vecpos] = 0.f; } return 1; } else { m_error =11; return 0; } } else return 0; } SndObj-2.6.7/src/StringFlt.h000644 000766 000024 00000004340 12062673766 016253 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // StringFlt.h: interface of the StringFlt class // // // // // // // //************************************************************// #ifndef _StringFlt_H #define _StringFlt_H #include "DelayLine.h" class StringFlt : public DelayLine { protected: float m_vdtime; float m_fdbgain; float m_fr; float m_a; float m_LPDelay; float m_APDelay; float m_s; float m_decay; SndObj* m_inputfr; public: StringFlt(); StringFlt(float fr, float fdbgain, SndObj* inObj, SndObj* InFrObj=0, int vecsize=DEF_VECSIZE, float sr=DEF_SR); StringFlt(float fr, SndObj* inObj, float decay, SndObj* InFrObj=0, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~StringFlt(); void SetSr(float sr); void SetDecay(float decay); void SetFreq(float fr, SndObj* InFrObj=0); void SetFdbgain(float fdbgain){ if(m_decay == 0.f) m_fdbgain = fdbgain; } int Set(char* mess, float value); int Connect(char* mess, void* input); short DoProcess(); }; #endif SndObj-2.6.7/src/SyncGrain.cpp000644 000766 000024 00000016530 12062673766 016573 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 ////////////////////////////////////////////////// // SyncGrain implementation // VL, 2002 // ////////////////////////////////////////////////// #include "SyncGrain.h" SyncGrain::SyncGrain(){ m_table = 0; // wavetable m_envtable = 0; // envelope table m_amp = 1.f; // overall amp m_inputamp =0; m_fr = 440.f; // fundamental freq m_inputfr = 0; m_pitch = 1.f; // grain pitch m_inputpitch = 0; m_grsize = 0.f; // size of grains (msecs) m_inputgrsize = 0; m_olaps = 100; // max number of streams (overlaps) m_point = 0; if(!(m_index = new double[m_olaps])){ m_error = 11; return; // index into wavetable } if(!(m_envindex = new double[m_olaps])){ m_error = 11; return; } // index into envtable if(!(m_streamon = new short[m_olaps])){ m_error = 11; return; } m_count = 0; // sampling period counter m_numstreams = 0; // curr num of streams m_firststream = 0; // streams index (first stream) m_tablesize = 0; // size of wavetable m_envtablesize = 0; // size of envtable for(int i = 0; i < m_olaps; i++) { m_streamon[i] = 0; m_index[i] = m_envindex[i] = 0.f; } m_start = 0.f; m_frac = 0.f; AddMsg("frequency", 21); AddMsg("grain size", 22); AddMsg("grain pitch", 23); AddMsg("pointer rate", 24); AddMsg("amplitude", 25); AddMsg("source table", 26); AddMsg("envelope table", 27); } SyncGrain::SyncGrain(Table* wavetable, Table* envtable, float fr, float amp, float pitch, float grsize, float prate, SndObj* inputfr, SndObj* inputamp, SndObj* inputpitch, SndObj* inputgrsize, int olaps, int vecsize, float sr): SndObj(inputfr, vecsize, sr){ m_table = wavetable; // wavetable m_envtable = envtable; // envelope table m_amp = amp; // overall amp m_inputamp = inputamp; m_fr = fr; // fundamental freq m_inputfr = inputfr; m_pitch = pitch; // grain pitch m_inputpitch = inputpitch; m_grsize = grsize; // size of grains (msecs) m_inputgrsize = inputgrsize; m_olaps = olaps; // max number of streams (overlaps) if(!(m_index = new double[m_olaps])){ m_error = 11; return; // index into wavetable } if(!(m_envindex = new double[m_olaps])){ m_error = 11; return; } // index into envtable if(!(m_streamon = new short[m_olaps])){ m_error = 11; return; } m_count = 0xFFFFFFFF; // sampling period counter m_numstreams = 0; // curr num of streams m_firststream = 0; // streams index (first stream) m_tablesize = m_table->GetLen(); // size of wavetable m_envtablesize = m_envtable->GetLen(); // size of envtable for(int i = 0; i < olaps; i++){ m_streamon[i] = 0; m_index[i] = m_envindex[i] = 0.; } m_start = 0.f; m_point = prate; m_frac = 0.f; AddMsg("frequency", 21); AddMsg("grain size", 22); AddMsg("grain pitch", 23); AddMsg("pointer rate", 24); AddMsg("amplitude", 25); AddMsg("source table", 26); AddMsg("envelope table", 27); } SyncGrain::~SyncGrain(){ // perform any necessary de-allocation etc // here delete[] m_index; delete[] m_envindex; delete[] m_streamon; } int SyncGrain::Set(char* mess, float value){ switch (FindMsg(mess)){ case 21: SetFreq(value); return 1; case 22: SetGrainSize(value); return 1; case 23: SetPitch(value); return 1; case 24: SetPointerRate(value); return 1; case 25: SetAmp(value); return 1; default: return SndObj::Set(mess,value); } } int SyncGrain::Connect(char* mess, void* input){ switch (FindMsg(mess)){ case 21: m_inputfr = (SndObj *) input; return 1; case 22: m_inputgrsize = (SndObj *) input; return 1; case 23: m_inputpitch = (SndObj *) input; return 1; case 25: m_inputamp = (SndObj *) input; return 1; case 26: m_table = (Table *) input; return 1; case 27: m_envtable = (Table *) input; return 1; default: return SndObj::Connect(mess, input); } } short SyncGrain::DoProcess(){ if(!m_error){ float sig, pitch, amp, grsize, envincr, period; for(m_vecpos = 0; m_vecpos < m_vecsize; m_vecpos++) { if(m_enable) { // set the control parameters // (amp, fund period, grain pitch and size, in samples) sig = 0.f; pitch = m_pitch + (m_inputpitch ? m_inputpitch->Output(m_vecpos) : 0); period = m_frac + m_sr/(m_fr + (m_inputfr ? m_inputfr->Output(m_vecpos) : 0)); amp = m_amp + (m_inputamp ? m_inputamp->Output(m_vecpos) : 0); grsize = (m_sr * (m_grsize + (m_inputgrsize ? m_inputgrsize->Output(m_vecpos) : 0))); envincr = m_envtablesize/grsize; // if a grain has finished, clean up if((!m_streamon[m_firststream]) && (m_numstreams) ){ m_numstreams--; // decrease the no of streams m_firststream=(m_firststream+1)%m_olaps; // first stream is the next } // if a fund period has elapsed // start a new grain if(m_count >= period){ m_frac = m_count - period; // frac part to be accummulated int newstream =(m_firststream+m_numstreams)%m_olaps; m_streamon[newstream] = 1; // turn the stream on m_envindex[newstream] = 0.f; m_index[newstream] = m_start; m_numstreams++; // increase the stream count m_count = 0; m_start += m_point*grsize; while (m_start > m_tablesize) m_start-=m_tablesize; while (m_start < 0) m_start += m_tablesize; } for(int i=m_numstreams, j=m_firststream; i; i--, j=(j+1)%m_olaps){ // modulus while(m_index[j] > m_tablesize) m_index[j] -= m_tablesize; while(m_index[j] < 0) m_index[j] += m_tablesize; // sum all the grain streams sig += m_table->GetTable()[Ftoi(m_index[j])] *m_envtable->GetTable()[Ftoi(m_envindex[j])]; // increment the indexes // for each grain m_index[j] += pitch; m_envindex[j] += envincr; // if the envelope is finished // the grain is also finished if(m_envindex[j] > m_envtablesize) m_streamon[j] = 0; } // increment the period counter m_count++; // scale the output m_output[m_vecpos] = sig*amp; } else m_output[m_vecpos] = 0.f; } return 1; } else return 0; } char* SyncGrain::ErrorMessage(){ char* message; switch(m_error){ // handle your error codes here case 11: message = "Memory allocation error\n"; break; default: message = SndObj::ErrorMessage(); break; } return message; } SndObj-2.6.7/src/SyncGrain.h000644 000766 000024 00000007405 12062673766 016241 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 /////////////////////////////////////////////// // SyncGrain.h: synchronous granular synthesis // based on wavetable lookup // VL, 2002 /////////////////////////////////////////////// #ifndef _SyncGrain_H #define _SyncGrain_H #include "SndObj.h" #include "Table.h" class SyncGrain: public SndObj { protected: Table* m_table; // wavetable Table* m_envtable; // envelope table float m_amp; // overall amp SndObj* m_inputamp; float m_fr; // fundamental freq float m_frac; // fractional part SndObj* m_inputfr; float m_pitch; // grain pitch SndObj* m_inputpitch; double* m_index; // index into wavetable double* m_envindex; // index into envtable float m_start; // grain start index float m_grsize; // size of grains (secs) SndObj* m_inputgrsize; int m_olaps; // max number of streams (overlaps) float m_point; // grain start offset int m_count; // sampling period counter int m_numstreams; // curr num of streams int m_firststream; // streams index (first stream) int m_tablesize; // size of wavetable int m_envtablesize; // size of envtable short* m_streamon; // keeps track of the active streams public: // constructors / destructor SyncGrain(); SyncGrain(Table* wavetable, Table* envtable, float fr, float amp, float pitch, float grsize, float prate=1.f, SndObj* inputfr=0, SndObj* inputamp=0, SndObj* inputpitch=0, SndObj* inputgrsize=0, int olaps=100, int vecisize=DEF_VECSIZE, float sr=DEF_SR); ~SyncGrain(); // Set... void Offset(int pos){ m_start = pos; } void Offset(float secs){ m_start = secs*m_sr; } void SetWaveTable(Table* wavetable){ m_table = wavetable; m_tablesize = wavetable->GetLen(); } void SetEnvelopeTable(Table* envtable){ m_envtable = envtable; m_envtablesize = envtable->GetLen(); } void SetFreq(float fr, SndObj* inputfr=0){ m_fr = fr; // fundamental freq m_inputfr = inputfr; } void SetAmp(float amp, SndObj* inputamp=0){ m_amp = amp; // overall amp m_inputamp = inputamp; } void SetPitch(float pitch, SndObj* inputpitch=0){ m_pitch = pitch; // grain pitch m_inputpitch = inputpitch; } void SetGrainSize(float grsize, SndObj* inputgrsize=0){ m_grsize = grsize; // size of grains (secs) m_inputgrsize = inputgrsize; } void SetPointerRate(float prate){ m_point = prate; } // sets the reading // pointer rate in relation to grain size: // a value of 1 will make the read pointer read // the wavetable skiping grainsize positions // along it. A value of 0 will make the table be // read always at the start. int Set(char* mess, float value); int Connect(char* mess, void* input); short DoProcess(); char* ErrorMessage(); }; #endif SndObj-2.6.7/src/Table.h000644 000766 000024 00000003572 12062673766 015374 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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; float* m_table; // table int m_error; // error code void ZeroTable () { int i; for(i=0;iGetDelayTime()) m_delaytime = delaytime; else { m_delaytime = m_DLine->GetDelayTime(); m_error = 20; } delete[] m_delay; m_delay = m_DLine->Buffer(); m_size = (long) (m_DLine->GetDelayTime()*m_sr); m_delaysamples = (long) (m_delaytime*m_sr); m_rpointer = m_DLine->GetWritePointerPos() + (m_size-m_delaysamples); AddMsg("delaytime", 31); AddMsg("delay line", 32); } Tap::~Tap() { m_delay = new float[1]; // just so that DelayLine destructor // has something to destroy. } //////////////////OPERATIONS ////////////////////// void Tap::SetDelayTime(float delaytime){ m_delaytime = delaytime; if(m_delaytime > m_DLine->GetDelayTime()) { m_delaytime = m_DLine->GetDelayTime(); m_error = 20; } m_size = (long) (m_DLine->GetDelayTime()*m_sr); m_delaysamples = (long)(m_delaytime*m_sr); m_rpointer = m_DLine->GetWritePointerPos() + (m_size-m_delaysamples); } void Tap::SetDelayTap(DelayLine *DLine){ m_DLine = DLine; if(m_delaytime > m_DLine->GetDelayTime()) { m_delaytime = m_DLine->GetDelayTime(); m_error = 20; } m_delay = m_DLine->Buffer(); m_sr = m_DLine->GetSr(); m_size = (long) (m_DLine->GetDelayTime()*m_sr); m_delaysamples = (long)(m_delaytime*m_sr); m_rpointer = m_DLine->GetWritePointerPos() + (m_size-m_delaysamples); } int Tap::Set(char* mess, float value){ switch (FindMsg(mess)){ case 31: SetDelayTime(value); return 1; default: return DelayLine::Set(mess,value); } } int Tap::Connect(char* mess, void* input){ switch (FindMsg(mess)){ case 32: SetDelayTap((DelayLine *) input); return 1; default: return SndObj::Connect(mess,input); } } short Tap::DoProcess(){ if(!m_error){ if(m_DLine){ for(m_vecpos=0; m_vecposOutput(m_vecpos); pos = m_DLine->GetWritePointerPos() - (m_delaytime*m_sr) - m_vecsize + m_vecpos; while(pos > m_size) pos -= m_size; while(pos < 0) pos += m_size; m_output[m_vecpos] = GetSample(pos); } else m_output[m_vecpos] = 0.f; } return 1; } else { m_error = 1; return 0; } } else return 0; } SndObj-2.6.7/src/Tapi.h000644 000766 000024 00000003275 12062673766 015242 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Tapi.h: interface of the Tapi class // // // // // // // //************************************************************// #ifndef _TAPI_H #define _TAPI_H #include "Tap.h" class Tapi : public Tap { public: Tapi(); Tapi(SndObj* delayinput, DelayLine* DLine, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Tapi(); void SetDelayInput(SndObj* delayinput){ m_input = delayinput; } int Connect(char* mess, void* input); short DoProcess(); }; #endif SndObj-2.6.7/src/templates/000755 000766 000024 00000000000 12062673766 016163 5ustar00victorstaff000000 000000 SndObj-2.6.7/src/TpTz.cpp000644 000766 000024 00000005407 12062673766 015600 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 ///////////////////////////////////// // TpTz.cpp: implementation of the Two-pole Two-zero // filter class //////////////////////////////////////// #include "TpTz.h" TpTz::TpTz(){ m_a1 = m_a2 = m_b1 = m_b2 = m_a = 0.0; AddMsg("coefficient a0", 21); AddMsg("coefficient a1", 22); AddMsg("coefficient a2", 23); AddMsg("coefficient b1", 24); AddMsg("coefficient b2", 25); } TpTz::TpTz(double a, double a1, double a2, double b1, double b2, SndObj* input, int vecsize, float sr) : Filter(0.f, 0.f, input, vecsize, sr){ m_a = a; m_a1 = a1; m_a2 = a2; m_b2 = b2; m_b1 = b1; AddMsg("coefficient a0", 21); AddMsg("coefficient a1", 22); AddMsg("coefficient a2", 23); AddMsg("coefficient b1", 24); AddMsg("coefficient b2", 25); } TpTz::~TpTz(){ } int TpTz::Set(char* mess, float value){ switch (FindMsg(mess)){ case 21: SetParam((double)value,m_a1,m_a2,m_b1, m_b2); return 1; case 22: SetParam(m_a,(double)value,m_a2,m_b1, m_b2); return 1; case 23: SetParam(m_a,m_a1,(double)value,m_b1, m_b2); return 1; case 24: SetParam(m_a,m_a1,m_a2,(double)value, m_b2); return 1; case 25: SetParam(m_a,m_a1,m_a2,m_b1, (double)value); return 1; default: return Filter::Set(mess,value); } } short TpTz::DoProcess(){ if(!m_error){ if(m_input) { double out = 0.f, w = 0.f; for(m_vecpos=0;m_vecpos < m_vecsize;m_vecpos++){ if(m_enable){ w = m_a*(m_input->Output(m_vecpos)) - m_b1*m_delay[0] - m_b2*m_delay[1]; out = w + m_a1*m_delay[0] + m_a2*m_delay[1]; m_delay[1] = m_delay [0]; m_delay[0] = w; m_output[m_vecpos] = (float) out; } else m_output[m_vecpos] = 0.f; } return 1; } else { m_error = 11; return 0; } } else return 0; } SndObj-2.6.7/src/TpTz.h000644 000766 000024 00000003215 12062673766 015240 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //////////////////////////////////////////////// // TpTz.h: interface for the TpTz class // two-pole two-zero filter. // /////////////////////////////////////////////// #ifndef _TPTZ_H #define _TPTZ_H #include "Filter.h" class TpTz: public Filter { protected: double m_a1; double m_a2; public: TpTz(); TpTz(double a, double a1, double a2, double b1, double b2, SndObj* input, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~TpTz(); void SetParam(double a, double a1, double a2, double b1, double b2){ m_a = a; m_a1 = a1; m_a2 = a2; m_b2 = b2; m_b1 = b1; } int Set(char* mess, float value); short DoProcess(); }; #endif SndObj-2.6.7/src/TrisegTable.cpp000644 000766 000024 00000012400 12062673766 017073 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // TrisegTable.cpp: implementation of the TrisegTable class // // (three-segment function table). // // // // // //************************************************************// #include "TrisegTable.h" //////////// CONSTRUCTION / DESTRUCTION //////////////////////// TrisegTable :: TrisegTable(){ m_L = 512; m_initial = 0.f; m_point1 = 1.f; m_point2 = 1.f; m_fin = 0.f; m_seg1 = .25f; m_seg2 = .5f; m_seg3 = .25f; m_typec = 0.f; m_table = new float[m_L+1]; MakeTable(); } TrisegTable :: TrisegTable(long L, float init, float seg1, float p1, float seg2, float p2, float seg3, float fin, float type){ m_L = L; m_typec = type; m_initial = init; m_point1 = p1; m_point2 = p2; m_fin = fin; m_seg1 = seg1; m_seg2 = seg2; m_seg3 = seg3; m_table = new float [m_L+1]; MakeTable(); } TrisegTable::TrisegTable(long L, float* TSPoints, float type) { m_L = L; m_typec = type; m_initial = TSPoints[0]; m_point1 = TSPoints[2]; m_point2 = TSPoints[4]; m_fin = TSPoints[6]; m_seg1 = TSPoints[1]; m_seg2 = TSPoints[3]; m_seg3 = TSPoints[5]; m_table = new float [m_L+1]; MakeTable(); } TrisegTable::~TrisegTable(){ delete[] m_table; } void TrisegTable::SetCurve(float init, float seg1, float p1, float seg2, float p2, float seg3, float fin, float type) { m_initial = init; m_point1 = p1; m_point2 = p2; m_fin = fin; m_seg1 = seg1; m_seg2 = seg2; m_seg3 = seg3; m_typec = type; MakeTable(); } ////////////// OPERATIONS ////////////////////////////////////// void TrisegTable::SetCurve(float* TSPoints, float type){ m_typec = type; m_initial = TSPoints[0]; m_point1 = TSPoints[2]; m_point2 = TSPoints[4]; m_fin = TSPoints[6]; m_seg1 = TSPoints[1]; m_seg2 = TSPoints[3]; m_seg3 = TSPoints[5]; m_table = new float [m_L+1]; MakeTable(); } short TrisegTable :: MakeTable(){ int i; float max = 1.f; // normalize the seg lenghts to the table lenght: float total=m_seg1+m_seg2+m_seg3; int seg1 = (int)((m_seg1/total)*m_L); int seg2 = (int)((m_seg2/total)*m_L); int seg3 = (int)((m_seg3/total)*m_L); if(m_typec == 0.f){ //LINEAR for(i=0;iOutput(m_vecpos)); fwdgain = m_fwdgain + (m_inputfwdg == 0 ? 0 : m_inputfwdg->Output(m_vecpos)); dirgain = m_dirgain + (m_inputdirg == 0 ? 0 : m_inputdirg->Output(m_vecpos)); vdsamp = (m_vdtime + (m_inputvdt == 0 ? 0 : m_inputvdt->Output(m_vecpos)))*m_sr; if(vdsamp < 0) vdsamp = 0; else if (vdsamp > m_size) vdsamp = m_size; pos = m_wpointer - vdsamp; while(pos > m_size) pos -= m_size; while(pos < 0) pos += m_size; dir = m_input->Output(m_vecpos); del = GetSample(pos); w = dir + fdbgain*del; PutSample(w); m_output[m_vecpos] = w + fwdgain*del + dir*dirgain; } else m_output[m_vecpos] = 0.f; } return 1; } else { m_error = 11; return 0; } } else return 0; } SndObj-2.6.7/src/VDelay.h000644 000766 000024 00000005475 12062673766 015535 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // VDelay.h: interface of the VDelay class // // // // // // // //************************************************************// #ifndef _VDELAY_H #define _VDELAY_H #include "DelayLine.h" class VDelay : public DelayLine { protected: float m_dirgain; float m_fdbgain; float m_fwdgain; float m_vdtime; double m_vrpointer; SndObj* m_inputvdt; SndObj* m_inputfdbg; SndObj* m_inputfwdg; SndObj* m_inputdirg; public: VDelay(); VDelay(float maxdelaytime, float fdbgain, float fwdgain, float dirgain, SndObj* InObj, SndObj* InVdtime, SndObj* InFdbgain=0, SndObj* InFwdgain=0, SndObj* InDirgain=0, int vecsize=DEF_VECSIZE, float sr=DEF_SR); VDelay(float maxdelaytime, float delaytime, float fdbgain, float fwdgain, float dirgain, SndObj* InObj, SndObj* InVdtime = 0, SndObj* InFdbgain=0, SndObj* InFwdgain=0, SndObj* InDirgain=0, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~VDelay(); int Set(char* mess, float value); int Connect(char* mess, void* input); void SetMaxDelayTime(float MaxDelaytime){ DelayLine::SetDelayTime(MaxDelaytime); } void SetDelayTime(float delaytime){ m_vdtime = delaytime; } void SetVdtInput(SndObj* InVdtime){ m_inputvdt = InVdtime; } void SetFdbgain(float fdbgain, SndObj* InFdbgain=0){ m_fdbgain = fdbgain; m_inputfdbg = InFdbgain; } void SetFwdgain(float fwdgain, SndObj* InFwdgain=0){ m_fwdgain = fwdgain; m_inputfwdg = InFwdgain; } void SetDirgain(float dirgain, SndObj* InDirgain=0){ m_dirgain = dirgain; m_inputdirg = InDirgain; } short DoProcess(); }; #endif SndObj-2.6.7/src/templates/application_template.cpp000644 000766 000024 00000001675 12062673766 023076 0ustar00victorstaff000000 000000 /////////////////////////////////////////////////////////// // Application template using SndThread // // Victor Lazzarini, 2001 /////////////////////////////////////////////////////////// #include #include int main(int argc, char** argv){ char command[10]; int status; SndThread thread; // declare your SndObj, SndIO & Table // objects here // use thread.AddObj() to add the // objects to the processing thread status = thread.GetStatus(); while(1){ cout << "Type a command: on, off or end\n"; cin >> command; if(!strcmp(command, "on") && !status) status = thread.ProcOn();// processing ON if(!strcmp(command, "off")) // processing OFF status = thread.ProcOff(); if(!strcmp(command, "end")){ // exit if(status) // if processing still ON thread.ProcOff(); break; } } return 1; } SndObj-2.6.7/src/templates/class_template.cpp000644 000766 000024 00000003364 12062673766 021675 0ustar00victorstaff000000 000000 ////////////////////////////////////////////////// // SndObj-derived class template // VL, 2001 // ////////////////////////////////////////////////// #include "MyClass.h" MyClass::MyClass(){ // Default constructor // initialise your member variables // here to the default values // perform any other necessary // initialisation (i.e. memory allocation, // etc.) // use m_error to set values for ErrorMessage(); // if needed } MyClass::MyClass(SndObj* input, /* include here any extra parameters needed */ int vecsize, float sr): SndObj(input, vecsize, sr){ // initialise your member variables here // and perform any other necessary // initialisation (i.e. memory allocation, // etc.) // use m_error to set values for ErrorMessage(); // if needed } MyClass::~MyClass(){ // perform any necessary de-allocation etc // here } short MyClass::DoProcess(){ if(!m_error){ if(m_input){ for(m_vecpos = 0; m_vecpos < m_vecsize; m_vecpos++) { if(m_enable) { // implement your processing algorithm here // to obtain an input signal use: // m_input->Output(m_vecpos); // place the resulting samples in m_ouput as in: // m_output[m_vecpos] = processing_result; // e.g. m_output[m_vecpos] = m_input->Output(m_vecpos); // copies the input into the output } else m_output[m_vecpos] = 0.f; } return 1; } else { m_error = 3; return 0; } } else return 0; } char* MyClass::ErrorMessage(){ char* message; switch(m_error){ // handle your error codes here default: message = SndObj::ErrorMessage(); break; } return message; } SndObj-2.6.7/src/templates/class_template.h000644 000766 000024 00000001050 12062673766 021330 0ustar00victorstaff000000 000000 #ifndef _MYCLASS_H #define _MY_CLASS_H #include "SndObj.h" class MyClass: public SndObj { protected: // Place your variable declarations here // as well as any internal-operation methods public: // constructors / destructor MyClass(); MyClass(SndObj* input,/* place any other construction parameters here */ int vecisize=DEF_VECSIZE, float sr=DEF_SR); ~MyClass(); // you need to re-define at least these short DoProcess(); char* ErrorMessage(); }; #endif SndObj-2.6.7/src/rfftw/cfft.c000644 000766 000024 00000102106 12062673766 016403 0ustar00victorstaff000000 000000 /* * 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 /* 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; } SndObj-2.6.7/src/rfftw/config.c000644 000766 000024 00000013411 12062673766 016726 0ustar00victorstaff000000 000000 /* * 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 }; SndObj-2.6.7/src/rfftw/executor.c000644 000766 000024 00000027410 12062673766 017323 0ustar00victorstaff000000 000000 /* * 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); } SndObj-2.6.7/src/rfftw/fcr_1.c000644 000766 000024 00000003636 12062673766 016463 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fcr_10.c000644 000766 000024 00000011703 12062673766 016535 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fcr_11.c000644 000766 000024 00000013235 12062673766 016540 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fcr_12.c000644 000766 000024 00000012064 12062673766 016540 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fcr_128.c000644 000766 000024 00000236365 12062673766 016644 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fcr_13.c000644 000766 000024 00000022662 12062673766 016546 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fcr_14.c000644 000766 000024 00000014456 12062673766 016551 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fcr_15.c000644 000766 000024 00000016332 12062673766 016545 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fcr_16.c000644 000766 000024 00000015423 12062673766 016546 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fcr_2.c000644 000766 000024 00000004007 12062673766 016455 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fcr_3.c000644 000766 000024 00000004660 12062673766 016463 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fcr_32.c000644 000766 000024 00000035365 12062673766 016553 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fcr_4.c000644 000766 000024 00000005040 12062673766 016455 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fcr_5.c000644 000766 000024 00000006434 12062673766 016466 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fcr_6.c000644 000766 000024 00000006145 12062673766 016466 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fcr_64.c000644 000766 000024 00000104533 12062673766 016552 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fcr_7.c000644 000766 000024 00000007621 12062673766 016467 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fcr_8.c000644 000766 000024 00000007353 12062673766 016472 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fcr_9.c000644 000766 000024 00000013011 12062673766 016457 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fftwnd.c000644 000766 000024 00000051271 12062673766 016757 0ustar00victorstaff000000 000000 /* * 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); } SndObj-2.6.7/src/rfftw/fhb_10.c000644 000766 000024 00000042673 12062673766 016534 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fhb_16.c000644 000766 000024 00000071410 12062673766 016531 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fhb_2.c000644 000766 000024 00000006023 12062673766 016442 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fhb_3.c000644 000766 000024 00000011362 12062673766 016445 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fhb_32.c000644 000766 000024 00000207657 12062673766 016545 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fhb_4.c000644 000766 000024 00000013060 12062673766 016443 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fhb_5.c000644 000766 000024 00000021025 12062673766 016444 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fhb_6.c000644 000766 000024 00000021350 12062673766 016446 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fhb_7.c000644 000766 000024 00000026176 12062673766 016462 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fhb_8.c000644 000766 000024 00000030065 12062673766 016453 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fhb_9.c000644 000766 000024 00000044745 12062673766 016466 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fhf_10.c000644 000766 000024 00000041233 12062673766 016527 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fhf_16.c000644 000766 000024 00000071046 12062673766 016542 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fhf_2.c000644 000766 000024 00000005751 12062673766 016455 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fhf_3.c000644 000766 000024 00000010646 12062673766 016455 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fhf_32.c000644 000766 000024 00000210220 12062673766 016525 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fhf_4.c000644 000766 000024 00000012313 12062673766 016447 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fhf_5.c000644 000766 000024 00000017673 12062673766 016466 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fhf_6.c000644 000766 000024 00000021000 12062673766 016442 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fhf_7.c000644 000766 000024 00000025164 12062673766 016462 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fhf_8.c000644 000766 000024 00000027360 12062673766 016463 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fhf_9.c000644 000766 000024 00000043340 12062673766 016460 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fn_1.c000644 000766 000024 00000003712 12062673766 016307 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fn_10.c000644 000766 000024 00000020436 12062673766 016371 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fn_11.c000644 000766 000024 00000023443 12062673766 016373 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fn_12.c000644 000766 000024 00000022174 12062673766 016374 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fn_13.c000644 000766 000024 00000041707 12062673766 016400 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fn_14.c000644 000766 000024 00000027215 12062673766 016377 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fn_15.c000644 000766 000024 00000032654 12062673766 016403 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fn_16.c000644 000766 000024 00000031311 12062673766 016371 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fn_2.c000644 000766 000024 00000004240 12062673766 016305 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fn_3.c000644 000766 000024 00000005675 12062673766 016323 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fn_32.c000644 000766 000024 00000076113 12062673766 016400 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fn_4.c000644 000766 000024 00000006026 12062673766 016313 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fn_5.c000644 000766 000024 00000011036 12062673766 016311 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fn_6.c000644 000766 000024 00000011206 12062673766 016311 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fn_64.c000644 000766 000024 00000223155 12062673766 016405 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fn_7.c000644 000766 000024 00000013723 12062673766 016320 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fn_8.c000644 000766 000024 00000013447 12062673766 016324 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fn_9.c000644 000766 000024 00000021123 12062673766 016313 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fni_1.c000644 000766 000024 00000003725 12062673766 016464 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fni_10.c000644 000766 000024 00000020451 12062673766 016537 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fni_11.c000644 000766 000024 00000023456 12062673766 016550 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fni_12.c000644 000766 000024 00000022207 12062673766 016542 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fni_13.c000644 000766 000024 00000041722 12062673766 016546 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fni_14.c000644 000766 000024 00000027230 12062673766 016545 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fni_15.c000644 000766 000024 00000032667 12062673766 016560 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fni_16.c000644 000766 000024 00000031324 12062673766 016546 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fni_2.c000644 000766 000024 00000004253 12062673766 016462 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fni_3.c000644 000766 000024 00000005710 12062673766 016462 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fni_32.c000644 000766 000024 00000076126 12062673766 016555 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fni_4.c000644 000766 000024 00000006042 12062673766 016462 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fni_5.c000644 000766 000024 00000011051 12062673766 016457 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fni_6.c000644 000766 000024 00000011221 12062673766 016457 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fni_64.c000644 000766 000024 00000223170 12062673766 016553 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fni_7.c000644 000766 000024 00000013736 12062673766 016475 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fni_8.c000644 000766 000024 00000013462 12062673766 016472 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/fni_9.c000644 000766 000024 00000021150 12062673766 016464 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/frc_1.c000644 000766 000024 00000003630 12062673766 016455 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/frc_10.c000644 000766 000024 00000011303 12062673766 016531 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/frc_11.c000644 000766 000024 00000012766 12062673766 016550 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/frc_12.c000644 000766 000024 00000011500 12062673766 016532 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/frc_128.c000644 000766 000024 00000236052 12062673766 016635 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/frc_13.c000644 000766 000024 00000022560 12062673766 016543 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/frc_14.c000644 000766 000024 00000013715 12062673766 016546 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/frc_15.c000644 000766 000024 00000017133 12062673766 016545 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/frc_16.c000644 000766 000024 00000014616 12062673766 016551 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/frc_2.c000644 000766 000024 00000004001 12062673766 016447 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/frc_3.c000644 000766 000024 00000004573 12062673766 016466 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/frc_32.c000644 000766 000024 00000034203 12062673766 016541 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/frc_4.c000644 000766 000024 00000004464 12062673766 016466 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/frc_5.c000644 000766 000024 00000006225 12062673766 016464 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/frc_6.c000644 000766 000024 00000006126 12062673766 016465 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/frc_64.c000644 000766 000024 00000103544 12062673766 016553 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/frc_7.c000644 000766 000024 00000007413 12062673766 016466 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/frc_8.c000644 000766 000024 00000006634 12062673766 016473 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/frc_9.c000644 000766 000024 00000013137 12062673766 016470 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/ftw_10.c000644 000766 000024 00000027006 12062673766 016566 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/ftw_16.c000644 000766 000024 00000044040 12062673766 016571 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/ftw_2.c000644 000766 000024 00000005133 12062673766 016504 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/ftw_3.c000644 000766 000024 00000007410 12062673766 016505 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/ftw_32.c000644 000766 000024 00000121717 12062673766 016576 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/ftw_4.c000644 000766 000024 00000010335 12062673766 016506 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/ftw_5.c000644 000766 000024 00000014127 12062673766 016512 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/ftw_6.c000644 000766 000024 00000015126 12062673766 016513 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/ftw_64.c000644 000766 000024 00000270553 12062673766 016606 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/ftw_7.c000644 000766 000024 00000020115 12062673766 016506 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/ftw_8.c000644 000766 000024 00000020341 12062673766 016510 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/ftw_9.c000644 000766 000024 00000027123 12062673766 016516 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/ftwi_10.c000644 000766 000024 00000027021 12062673766 016734 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/ftwi_16.c000644 000766 000024 00000044053 12062673766 016746 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/ftwi_2.c000644 000766 000024 00000005146 12062673766 016661 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/ftwi_3.c000644 000766 000024 00000007423 12062673766 016662 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/ftwi_32.c000644 000766 000024 00000121732 12062673766 016744 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/ftwi_4.c000644 000766 000024 00000010350 12062673766 016654 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/ftwi_5.c000644 000766 000024 00000014142 12062673766 016660 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/ftwi_6.c000644 000766 000024 00000015141 12062673766 016661 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/ftwi_64.c000644 000766 000024 00000270566 12062673766 016763 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/ftwi_7.c000644 000766 000024 00000020130 12062673766 016654 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/ftwi_8.c000644 000766 000024 00000020354 12062673766 016665 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/ftwi_9.c000644 000766 000024 00000027136 12062673766 016673 0ustar00victorstaff000000 000000 /* * 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, }; SndObj-2.6.7/src/rfftw/generic.c000644 000766 000024 00000005466 12062673766 017110 0ustar00victorstaff000000 000000 /* * 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); } SndObj-2.6.7/src/rfftw/malloc.c000644 000766 000024 00000014050 12062673766 016730 0ustar00victorstaff000000 000000 /* * 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 } SndObj-2.6.7/src/rfftw/planner.c000644 000766 000024 00000032170 12062673766 017123 0ustar00victorstaff000000 000000 /* * 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); } SndObj-2.6.7/src/rfftw/putils.c000644 000766 000024 00000034506 12062673766 017011 0ustar00victorstaff000000 000000 /* * 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)); } SndObj-2.6.7/src/rfftw/rader.c000644 000766 000024 00000025452 12062673766 016566 0ustar00victorstaff000000 000000 /* * 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; } SndObj-2.6.7/src/rfftw/rconfig.c000644 000766 000024 00000014747 12062673766 017125 0ustar00victorstaff000000 000000 /* * 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 }; SndObj-2.6.7/src/rfftw/rexec.c000644 000766 000024 00000033333 12062673766 016574 0ustar00victorstaff000000 000000 /* * 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); } SndObj-2.6.7/src/rfftw/rexec2.c000644 000766 000024 00000015047 12062673766 016660 0ustar00victorstaff000000 000000 /* * 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); } SndObj-2.6.7/src/rfftw/rfftwf77.c000644 000766 000024 00000010144 12062673766 017135 0ustar00victorstaff000000 000000 /* * 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_) */ SndObj-2.6.7/src/rfftw/rfftwnd.c000644 000766 000024 00000041554 12062673766 017144 0ustar00victorstaff000000 000000 /* * 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); } SndObj-2.6.7/src/rfftw/rgeneric.c000644 000766 000024 00000012452 12062673766 017263 0ustar00victorstaff000000 000000 /* * 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); } SndObj-2.6.7/src/rfftw/rplanner.c000644 000766 000024 00000031676 12062673766 017317 0ustar00victorstaff000000 000000 /* * 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); } SndObj-2.6.7/src/rfftw/timer.c000644 000766 000024 00000007557 12062673766 016617 0ustar00victorstaff000000 000000 /* * 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 SndObj-2.6.7/src/rfftw/twiddle.c000644 000766 000024 00000014151 12062673766 017117 0ustar00victorstaff000000 000000 /* * 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"); } } SndObj-2.6.7/src/rfftw/wisdom.c000644 000766 000024 00000017741 12062673766 016775 0ustar00victorstaff000000 000000 /* * 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; } SndObj-2.6.7/src/rfftw/wisdomio.c000644 000766 000024 00000005105 12062673766 017314 0ustar00victorstaff000000 000000 /* * 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); } SndObj-2.6.7/src/examples/blurring.cpp000644 000766 000024 00000001764 12062673766 020343 0ustar00victorstaff000000 000000 #include #include void Usage(char* progr); int main(int argc, char** argv){ float dur, time; if(argc == 3){ dur = (float) atof(argv[1]); time = (float) atof(argv[2]); } else { Usage(argv[0]); exit(1); } #ifndef MACOSX SndRTIO output(1, SND_OUTPUT); SndRTIO input(1, SND_INPUT); #else SndCoreAudio io(1); #define input io #define output io #endif HammingTable window(1024, 0.54f); SndIn in(&input); PVA anal(&window, &in); PVBlur blur(&anal, time); PVS synth(&window, &blur); output.SetOutput(1, &synth); int end = (int)(dur*DEF_SR/DEF_VECSIZE); for(int i=0; i #include #include void usage(); main(int argc, char *argv[]){ int nfltrs; float Q; float gain; float* fr; SndWave *input1; SndWave *input2; SndWave *output; if(argc == 4){ // prompt for parameters cout << "Enter number of filters: "; cin >> nfltrs; cout << "Enter Q: "; cin >> Q; cout << "Enter gain cut/boost(dB): "; cin >> gain; fr = new float[nfltrs]; for(int i=0; i> fr[i]; } } else { if(argc == 5){ // get the parameters from file ifstream datafile(argv[4]); datafile >> nfltrs; datafile >> Q; datafile >> gain; fr = new float[nfltrs]; for(int i=0;i> fr[i]; } else { usage(); return 0; } } // RIFF-Wave file IO objects input1 = new SndWave(argv[1], READ); input2 = new SndWave(argv[2], READ); if((input1->GetSr() != 44100.f) || (input2->GetSr() != 44100.f)){ cout << "Use ONLY 44100 KHz files\n"; delete input1; delete input2; return 0; } output = new SndWave(argv[3], OVERWRITE); // Sound input, filters, balance, mix and atten SndIn sound1(input1, 1); // control input SndIn sound2(input2, 1); // audio input ButtBP* Infilters = new ButtBP[nfltrs]; ButtBP* Outfilters = new ButtBP[nfltrs]; Balance* bln = new Balance[nfltrs]; Mixer mix; // Filters for(int i=0;iSetOutput(1, &atten); // processing loop unsigned long n, end = (unsigned long)(input1->GetDataFrames()/DEF_VECSIZE); for(n=0; n < end; n++){ input1->Read(); // input from file input2->Read(); // input from file sound1.DoProcess(); // sound input sound2.DoProcess(); // sound input for(int i=0; i < nfltrs; i++){ Infilters[i].DoProcess(); // input filters Outfilters[i].DoProcess(); // output filters bln[i].DoProcess(); // env follower } mix.DoProcess(); // mixer atten.DoProcess(); // attenuation output->Write(); // output to file } delete input1; delete input2; delete output; return 1; } void usage(){ cout << "\n" << "//******************************************************//" << "\n" << "// CVOC //" << "\n" << "// Sample application using SndObj classes. //" << "\n" << "// N-filter channel vocoder using //" << "\n" << "// Butterworth-response filters //" << "\n" << "// Victor Lazzarini, 1998 //" << "\n" << "//******************************************************//" << "\n"; cout << "\nusage:" << "\ncvoc infile1.wav infile2.wav outfile.wav [datafile]\n\n" << "imposes the spectrum of infile1, measured by the\n" << "bank of N filters, onto infile2.\n" << "Datafile is an optional text file containing\n" << "the following parameters:\n" << "number_of_filters \nQ factor\ncut/boost(dB)\n" << "filter1_freq \nfilter2_freq \n... \nfilterN_freq \n\n"; return; } SndObj-2.6.7/src/examples/cvoc.txt000644 000766 000024 00000000242 12062673766 017474 0ustar00victorstaff000000 000000 25 500 20 760 980 1040 1280 1400 1600 1800 2080 2300 2560 2700 3200 3600 4000 4800 5500 6400 7000 7500 8000 8600 9200 10000 12000 15000SndObj-2.6.7/src/examples/denoiser.cpp000644 000766 000024 00000002525 12062673766 020323 0ustar00victorstaff000000 000000 // Copyright (c)Victor Lazzarini, 1997-2004 // See License.txt for a disclaimer of all warranties // and licensing information #include #include void Usage(int argc, char** argv); int main(int argc, char** argv){ if(argc != 5){ Usage(argc,argv); return 1; } // amount of mask attenuation (dB) float amount = (float)pow(10, atof(argv[4])/20.f); // masking file SndWave inmask(argv[2], READ); // input file SndWave infile(argv[1], READ); // Hamming window HammingTable window(DEF_FFTSIZE, 0.54f); // masking table PVTable table2(DEF_FFTSIZE,&inmask,&window, 0.f, 1.f); // input signal SndIn in(&infile); // PV analysis PVA anal(&window, &in, 0.6f); // Masking PVMask mask(amount, &table2, &anal); // PV synthesis PVS synth(&window, &mask); // output file SndWave output(argv[3], OVERWRITE, 1); output.SetOutput(1, &synth); // processing loop while(!infile.Eof()){ infile.Read(); in.DoProcess(); anal.DoProcess(); mask.DoProcess(); synth.DoProcess(); output.Write(); } return 0; } void Usage(int argc, char** argv){ std::cout << "Wrong number of arguments: " << argc << ".\n"; std::cout << "Usage:\n" << argv[0] << " input.wav mask.wav output.wav noise_atten(dB)\n"; } SndObj-2.6.7/src/examples/example1.cpp000644 000766 000024 00000000577 12062673766 020234 0ustar00victorstaff000000 000000 #include int main(int argc, char** argv){ SndWave infile("pianoc2.wav", READ); SndIn sig(&infile); PVA spec(&window, sig) Pitch pitch(0.1f, &sig, 1.5f); SndASIO output(1, SND_OUTPUT); output.SetOutput(1, &pitch); while(!infile.Eof()){ infile.Read(); pitch.DoProcess(); sig.DoProcess(); output.Write(); } return 0; } SndObj-2.6.7/src/examples/example2.cpp000644 000766 000024 00000001166 12062673766 020230 0ustar00victorstaff000000 000000 // Example2.cpp // A dirty reverb showing the use of // standard operators (+, <<, >>) // VL, 2001 #include int main(int argc, char** argv){ int dur = 60; SndRTIO input(1, SND_INPUT); SndObj audio; Allpass ap1(.1f, .005f, &audio); Allpass ap2(.55f, .013f, &ap1); Allpass ap3(.6f, .022f, &ap2); Allpass ap4(.7f, .035f, &ap3); SndRTIO output(1, SND_OUTPUT); for(int i=0; i>output; } return 1; } SndObj-2.6.7/src/examples/example3.cpp000644 000766 000024 00000003126 12062673766 020227 0ustar00victorstaff000000 000000 // Example3.cpp // MIDI-controlled synthesizer using // control & audio rates // VL, 2001 #include #include #include int main(int argc, char** argv){ int i; float dur = 30.f; // dur in secs float sr = DEF_SR; // sampling rate int vecsize = 100; // DSP vector size float kr = sr/vecsize; // control rate short cur_note = 0; // current note float cur_amp = 0.f; // table objects NoteTable ptable; HarmTable table1(1024,20,SAW); // midi input SndMidiIn midi; // control-rate objects MidiIn note(&midi,NOTE_MESSAGE,1,1,kr); Lookup conversion(&ptable,0,¬e,WRAP_AROUND,RAW_VALUE,1,kr); Bend pitch(&conversion, &midi, 10.f, 1, 1, kr); Interp amp(0.f, cur_amp, .05f, 0.f, 1, kr); // audio-rate objects Oscil oscil(&table1, 0.f, 0.f, &pitch, &, vecsize, sr); SndRTIO output(1, SND_OUTPUT, 128, 10, SHORTSAM,0, vecsize, sr); output.SetOutput(1, &oscil); for(i=0; i int main(int argc, char** argv){ SndWave infile(argv[1], READ); SndIn sig1(&infile,1); SndIn sig2(&infile,2); SndAiff output1(argv[2], OVERWRITE); SndAiff output2(argv[3], OVERWRITE); output1.SetOutput(1, &sig1); output2.SetOutput(1, &sig1); while(!infile.Eof()){ infile.Read(); sig1.DoProcess(); sig2.DoProcess(); output1.Write(); output2.Write(); } return 0; } SndObj-2.6.7/src/examples/fir.cpp000644 000766 000024 00000002267 12062673766 017276 0ustar00victorstaff000000 000000 // Copyright (c)Victor Lazzarini, 1997-2004 // See License.txt for a disclaimer of all warranties // and licensing information ///////////////////////// // fir.cpp : FIR filter example, using // an impulse table.derived // from a spectral magnitude // curve. #include int main(int argc, char** argv) { // lowpass response // cf = sr/10 // trans bw = sr/10 float max = 1.f; float min = 0.f; float cf = 0.1f; float tbw = 0.1f; // magnitude response curve float points[3]= {max,min,min}; float lens[3]= {cf,tbw,1-(cf+tbw)}; // using Hamming window // filter order = 3.33*sr/tbw int order = 333; HammingTable window(order, 0.54f); ImpulseTable imp(order,3, 1.f, points, lens, 0.f,&window); // test signal wavetable HarmTable t1(1024, 50, SAW); SndWave output("test.wav", OVERWRITE); /* output */ Oscili oscil(&t1, 100.f, 32767.f); /* test signal */ Convol fil(&imp, &oscil, 16.f); /* filter */ int dur = 5; for(int i=0; i> output; } return 0; } SndObj-2.6.7/src/examples/harmonise.cpp000644 000766 000024 00000002206 12062673766 020474 0ustar00victorstaff000000 000000 #include #include void Usage(char* progr); int main(int argc, char** argv){ float dur, pitch; int formants; if(argc == 4){ dur = (float) atof(argv[1]); pitch = (float) atof(argv[2]); formants = atoi(argv[3]); } else { Usage(argv[0]); exit(1); } #ifndef MACOSX SndRTIO output(1, SND_OUTPUT); SndRTIO input(1, SND_INPUT); #else SndCoreAudio io(1); #define input io #define output io #endif HammingTable window(1024, 0.54f); SndIn in(&input); PVA anal(&window, &in); PVTransp trans(&anal, pitch,formants); PVMix mix(&trans, &anal); PVS synth(&window, &mix); output.SetOutput(1, &synth); int end = (int)(dur*DEF_SR/DEF_VECSIZE); for(int i=0; i 1=keep formants 0=ignore formants\n"; } SndObj-2.6.7/src/examples/jack_schroeder.cpp000644 000766 000024 00000006424 12062673766 021463 0ustar00victorstaff000000 000000 //******************************************************// // RTSCHROEDER.cpp (realtime version) // // Sample application using SndObj classes. // // Standard reverberator for simulation of // // medium-sized halls, as designed by M R Schroeder. // // Victor Lazzarini, 1998 // //******************************************************// #include #include #include void usage(); main(int argc, char* argv[]){ float rvt, rvgain, dur; float kr = DEF_SR/DEF_VECSIZE; if(argc == 1){ cout << "schroeder: standard reverberator based on Schroeder design.\n\n"; cout << "duration(s):"; cin >> dur; cout << "reverb time(secs.):"; cin >> rvt; cout << "reverb gain(dB):"; cin >> rvgain; } else { if(argc != 4){ usage(); return 0; } // command line args rvt = (float) atof(argv[2]); rvgain = (float) atof(argv[3]); dur =(float) atof(argv[1]); } // comb filter g's float g1 = (float) pow(.001,.0297/rvt); float g2 = (float) pow(.001,.0371/rvt); float g3 = (float) pow(.001,.0411/rvt); float g4 = (float) pow(.001,.0437/rvt); SndJackIO jack("schroeder"); // comb, allpass, mixers and gain objects SndIn insound(&jack, 1); Comb c1(g1, .0297f, &insound); Comb c2(g2, .0371f, &insound); Comb c3(g3, .0411f, &insound); Comb c4(g4, .0437f, &insound); Mixer mix, mix2; // set the two mixer objs inputs mix.AddObj(&c1); mix.AddObj(&c2); mix.AddObj(&c3); mix.AddObj(&c4); Allpass a1(.7f,0.01f, &mix); Allpass a2(.7f,0.0017f, &a1); Gain direct(-6.f,&insound); Gain reverb(rvgain-6.f, &a2); mix2.AddObj(&direct); mix2.AddObj(&reverb); // set the output jack.SetOutput(1, &mix2); jack.SetOutput(2, &mix2); // loop counter and end unsigned long n, end = (long) (kr*(dur+rvt)); // processing loop for(n=0; n < end; n++){ if(n == (unsigned long) dur*kr) insound.Disable(); // switch off input jack.Read(); // file input insound.DoProcess(); // input sound c1.DoProcess(); // 4 comb filter units c2.DoProcess(); c3.DoProcess(); c4.DoProcess(); mix.DoProcess(); // comb's mixer a1.DoProcess(); // 2 allpass filter units a2.DoProcess(); direct.DoProcess(); // direct sound reverb.DoProcess(); // reverb sound mix2.DoProcess(); // final mix jack.Write(); // file output } return 1; } void usage(){ cout << "\n" << "//******************************************************//" << "\n" << "// SCHROEDER (realtime version) //" << "\n" << "// Sample application using SndObj classes. //" << "\n" << "// Standard reverberator for simulation of //" << "\n" << "// medium-sized halls, as designed by M R Schroeder. //" << "\n" << "// Victor Lazzarini, 1999 //" << "\n" << "//******************************************************//" << "\n"; cout << "\nusage:\nschroeder [dur(s) rev_time(s) rev_gain(dB)]\n\n"; return; } SndObj-2.6.7/src/examples/jack_streson.cpp000644 000766 000024 00000006626 12062673766 021206 0ustar00victorstaff000000 000000 //******************************************************// // rtstreson.cpp (new realtime version) // // Sample application using SndObj classes. // // Simulates a N-string "string resonator" // // // // Victor Lazzarini, 1998 // //******************************************************// #include #include #include void usage(); main(int argc, char *argv[]){ int nstrs, i; float fdbgain; float gain; float* fr; float dur, sr=44100.f; ifstream datafile; switch(argc){ case 1: cout << "streson: string resonator \n\n"; // prompt for parameters cout << "Enter number of strings: "; cin >> nstrs; cout << "Enter feedback gain (0 < fbd < 1): "; cin >> fdbgain; cout << "Enter gain attenuation(dB): "; cin >> gain; fr = new float[nstrs]; for(i=0; i> fr[i]; } cout << "enter duration: "; cin >> dur; break; case 3: // get the parameters from file dur = (float) (atof(argv[1])); datafile.open(argv[3]); datafile >> nstrs; datafile >> fdbgain; datafile >> gain; fr = new float[nstrs]; for(i=0;i> fr[i]; datafile.close(); break; default: usage(); return 0; } //input = new SndRTIO(1, SND_INPUT); //output= new SndRTIO(1, SND_OUTPUT); SndJackIO *jack = new SndJackIO("streson"); // Sound input, attenuation, string filters SndIn* sound = new SndIn(jack); // String Filters StringFlt** strings = new StringFlt*[nstrs]; for(i=0;iSetOutput(1, atten); jack->SetOutput(2, atten); // processing loop unsigned long n, end = (unsigned long)(dur*(sr/DEF_VECSIZE)); for(n=0; n < end; n++){ jack->Read(); // input from ADC sound->DoProcess(); // sound input for(i=0; i < nstrs; i++){ strings[i]->DoProcess(); // string filters } mix->DoProcess(); // mixer atten->DoProcess(); // attenuation jack->Write(); } delete jack; delete atten; delete mix; delete[] strings; delete sound; return 1; } void usage(){ cout << "\n" << "//******************************************************//" << "\n" << "// STRESON (new realtime version) //" << "\n" << "// Sample application using SndObj classes. //" << "\n" << "// Simulates a n-string 'string resonator', //" << "\n" << "// tuned to user-defined frequencies //" << "\n" << "// Victor Lazzarini, 1998 //" << "\n" << "//******************************************************//" << "\n"; cout << "\nusage:" << "\nstreson [dur datafile]\n\n" << "where datafile is an optional text file containing\n" << "the following parameters:\n" << "number_of_strings \nfeedback_gain \nattenuation(dB)\n" << "string1_freq \nstring2_freq \n... \nstringN_freq \n\n"; return; } SndObj-2.6.7/src/examples/ladspa_example.cpp000644 000766 000024 00000012602 12062673766 021467 0ustar00victorstaff000000 000000 /////////////////////////////////////////////////////// // ladspa_example.cpp: // this is an example of a // LADSPA plugin using SndObj classes // that makes use of a LADSPAplug object // This models a LADSPA plugin, // which takes one SndObj as its main // processing object. // In this case, a StringFlt object is // used (I'm found of that sound!) // // VL, 2004 #include #include "Ladspaplug.h" static LADSPA_Descriptor* plug_descriptor = NULL; LADSPA_Handle Instantiate(const LADSPA_Descriptor *Descriptor, unsigned long SampleRate) { // default SndObj vector size int vecsize = DEF_VECSIZE; // this is the processing object // it is allocated here, but the plugin object will // destroy it when it's all over StringFlt *procobj = new StringFlt(129.f, 0.99f, 0,0,vecsize,SampleRate); // 2 controls int controls = 2; // control messages char** messages = new char*[2]; messages[0] = strdup("frequency"); messages[1] = strdup("feedback gain"); // this is the plugin object LADSPAplug *plugin = new LADSPAplug(procobj, controls, messages, vecsize, SampleRate); // return the plugin instance return (LADSPA_Handle) plugin; } void CleanUp(LADSPA_Handle handle){ // destroy the plugin delete (LADSPAplug *)handle; } void ConnectPort(LADSPA_Handle Instance, unsigned long Port, LADSPA_Data * DataLocation){ LADSPAplug *plugin = (LADSPAplug *)Instance; switch(Port){ case 0: // input port plugin->ConnectInput(DataLocation); break; case 1: // output port plugin->ConnectOutput(DataLocation); break; // we have set up some controls, so we'll // connect them case 2: // frequency plugin->ConnectControl(DataLocation, 0); break; case 3: // feedback gain plugin->ConnectControl(DataLocation, 1); break; } } void Run(LADSPA_Handle handle, unsigned long blocksize){ // LADSPAplug::Process() is the plugin "run" method ((LADSPAplug *)handle)->Process(blocksize); } // this is the standard plugin library entry point. const LADSPA_Descriptor* ladspa_descriptor(unsigned long index) { if(index != 0) return NULL; if(plug_descriptor != NULL) return plug_descriptor; plug_descriptor = new LADSPA_Descriptor; if(plug_descriptor == NULL) return NULL; // We'll initialise the descriptor // see ladspa.h for a description of the struct fields plug_descriptor->Maker = strdup("Victor Lazzarini"); plug_descriptor->Name = strdup("SndObj plugin example"); plug_descriptor->Label = strdup("SndObj_plugin"); plug_descriptor->UniqueID = 180969; plug_descriptor->Copyright = strdup("Victor Lazzarini, 2004"); plug_descriptor->Properties = LADSPA_PROPERTY_HARD_RT_CAPABLE; plug_descriptor->PortCount = 4; plug_descriptor->instantiate = Instantiate; plug_descriptor->connect_port = ConnectPort; plug_descriptor->activate = NULL; plug_descriptor->run = Run; plug_descriptor->run_adding = NULL; plug_descriptor->set_run_adding_gain = NULL; plug_descriptor->deactivate = NULL; plug_descriptor->cleanup = CleanUp; LADSPA_PortDescriptor *PortDescriptors = new LADSPA_PortDescriptor[plug_descriptor->PortCount]; char **PortNames = new char*[plug_descriptor->PortCount]; LADSPA_PortRangeHint *PortRangeHints = new LADSPA_PortRangeHint[plug_descriptor->PortCount]; PortNames[0] = strdup("input"); PortDescriptors[0] = LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO; PortNames[1] = strdup("output"); PortDescriptors[1] = LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO; PortNames[2] = strdup("frequency(Hz)"); PortDescriptors[2] = LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL; PortNames[3] = strdup("feedback(0-1)"); PortDescriptors[3] = LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL; PortRangeHints[2].HintDescriptor = LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_LOGARITHMIC | LADSPA_HINT_INTEGER | LADSPA_HINT_DEFAULT_440; PortRangeHints[2].LowerBound = 22.5f; PortRangeHints[2].UpperBound = 3520.f; PortRangeHints[3].HintDescriptor = LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_DEFAULT_MIDDLE; PortRangeHints[3].LowerBound = 0.9f; PortRangeHints[3].UpperBound = 0.9999f; plug_descriptor->PortRangeHints = (const LADSPA_PortRangeHint *) PortRangeHints; plug_descriptor->PortNames = (const char **)PortNames; plug_descriptor->PortDescriptors = (const LADSPA_PortDescriptor *)PortDescriptors; return plug_descriptor; } // this is the descriptor clean-up function // called when we are done with the plugin void _fini() { if (plug_descriptor != NULL) { delete[] plug_descriptor->PortNames; delete[] plug_descriptor->PortDescriptors; delete[] plug_descriptor->PortRangeHints; delete[] plug_descriptor->Label; delete[] plug_descriptor->Name; delete[] plug_descriptor->Copyright; delete[] plug_descriptor->Maker; delete plug_descriptor; plug_descriptor = NULL; } } SndObj-2.6.7/src/examples/Ladspaplug.cpp000644 000766 000024 00000005551 12062673766 020611 0ustar00victorstaff000000 000000 ////////////////////////////////////////////////// // LADSPAplug.cpp: implementation of the LADSPAplug // Linux Audio Developers // Simple Plugin API // Model #include "Ladspaplug.h" #include LADSPAplug::LADSPAplug(SndObj *procobj, int controls, char **message, int vecsize, float sr) { // initialise members m_sndobj_vecsize = vecsize; m_sr = sr; m_pos = 0; // instantiate input SndObj m_inobj = new SndObj(0,m_sndobj_vecsize,m_sr); // set processing object m_procobj = procobj; procobj->Connect("input", m_inobj); // set controls m_controls = controls; // if there are any controls if(m_controls){ m_message = new char*[m_controls]; m_value = new float[m_controls]; m_parameter = new LADSPA_Data*[m_controls]; for(int i = 0; i < m_controls; i++){ m_message[i] = strdup(message[i]); m_value[i] = 0.f; } } } LADSPAplug::~LADSPAplug(){ // dispose of dynamic objects // including the processing SndObj delete[] m_message; delete[] m_parameter; delete[] m_value; delete m_procobj; delete m_inobj; } void LADSPAplug::Process(unsigned long blocksize){ // if the blocksize is bigger than the // SndObj vectorsize than we will have to // loop to create the output // otherwise, we will process input only when // the SndObj input buffer is full // The only requirement is that one // is a factor of the other. // One way of guarateeing this for all cases // is to set sndobj_vecsize to 1, which is // very unefficient. // However, it is reasonable to assume blocksizes // to be power-of-two sizes, so we can set // sndobj_vecsize to a power-of-two (say 256, // the default). int i; int samples = blocksize < m_sndobj_vecsize ? blocksize : m_sndobj_vecsize; // set the control values for(i=0; i < m_controls;i++){ if(m_value[i] != *m_parameter[i]) { m_value[i] = *m_parameter[i]; m_procobj->Set(m_message[i], m_value[i]); } } // process loop for(int i = 0; i < blocksize; i += m_sndobj_vecsize){ // this will only loop if the input blocksize is // bigger than the SndObj vectorsize // if so, we will read along different positions of // the input buffer // otherwise, it will only execute once m_pos = m_inobj->PushIn(m_insig+i, samples); // DoProcess() will always be called if the // blocksize is bigger than the SndObj vectorsize // otherwise it will only be called if the sndobj // input buffer is full if(m_pos == m_sndobj_vecsize) m_procobj->DoProcess(); // if the input blocksize is bigger than the SndObj // vectorsize we will write to different positions // along the output buffer // otherwise, we will write a single whole buffer m_procobj->PopOut(m_outsig+i, samples); } } SndObj-2.6.7/src/examples/Ladspaplug.h000644 000766 000024 00000003121 12062673766 020245 0ustar00victorstaff000000 000000 ////////////////////////////////////////////////////////// // LADSPAplug class: this class models a LADSPA plugin // and is designed to act as an interface for building // plugins with SndObj classes // // This class supports plugins based on single SndObj objects, // but can be extended to support larger SndObj processing // chains. #ifndef _LADSPAPLUG_H #define _LADSPAPLUG_H #include #include class LADSPAplug { protected: // sndobjs SndObj *m_inobj; SndObj *m_procobj; // controls int m_controls; float *m_value; char **m_message; LADSPA_Data **m_parameter; // data ports LADSPA_Data *m_insig; LADSPA_Data *m_outsig; // SndObj vectorsize etc... int m_sndobj_vecsize; float m_sr; int m_pos; public: LADSPAplug(SndObj *procobj, int controls, char **message, int vecsize, float sr); ~LADSPAplug(); // these methods connect the audio IO ports void ConnectInput(LADSPA_Data *p) { m_insig = p; } void ConnectOutput(LADSPA_Data *p) { m_outsig = p; } // this method connects the control ports (if there are any) bool ConnectControl(LADSPA_Data *p, int control) { if((control >= 0) && (control < m_controls)){ m_parameter[control] = p; return true; } else return false; } // this is the processing ("run") method // It is overridable, so that it can be tailored // to suit any arrangement of SndObjs virtual void Process(unsigned long bsize); }; #endif SndObj-2.6.7/src/examples/midisynth.cpp000644 000766 000024 00000010672 12062673766 020525 0ustar00victorstaff000000 000000 // Copyright (c)Victor Lazzarini, 1997-2004 // See License.txt for a disclaimer of all warranties // and licensing information //***********************************************************// // MIDISYNTH // // Sample application using Sound Object Classes // // to synthesize a cascading harmonics drone // // Victor Lazzarini, 2001 // //***********************************************************// #include #include void usage(); main(int argc, char* argv[]){ float duration; int harmonics; #ifdef WIN // port is int on WIN int port; #endif #if defined(SGI) || defined(OSS) char* port; // port is char on OSS/Irix #endif if(argc == 1){ cout << "midisynth: MIDI-controlled cascading harmonics synth based on JC Risset design.\n\n"; cout << "duration (secs.): "; cin >> duration; cout << "harmonics: "; cin >> harmonics; #ifdef WIN MidiDeviceList(); // List devices (only on WIN) #endif cout << "Enter MIDI port: "; #ifndef WIN port = new char[50]; #endif cin >> port; } else { if(argc != 4){ usage(); return 0; } duration = (float)atof(argv[1]); // duration. harmonics = atoi(argv[2]); // no of harmonics port = #ifdef WIN atoi #endif (argv[3]); // port } // wavetable HarmTable table1(1024, harmonics, SQUARE); // conversion table (12-note equal tempered, A3 = 440Hz) NoteTable ptable; // midi stuff: note (midi note), conversion (equiv. in tempered Hz) // and pitch (bends the conversion output) SndMidiIn midi(port, 10); MidiIn note(&midi); Lookup conversion(&ptable, 0, ¬e); Bend pitch(&conversion, &midi, 10.f); char cur_note = 0; // 9 interpolating oscillator objects, slightly mistuned Oscili oscil1(&table1, 0.f, 32767.f, &pitch); Oscili oscil2(&table1, .03f, 32767.f, &pitch); Oscili oscil3(&table1, .06f, 32767.f, &pitch); Oscili oscil4(&table1, .09f, 32767.f, &pitch); Oscili oscil5(&table1, .12f, 32767.f, &pitch); Oscili oscil6(&table1, -.03f, 32767.f, &pitch); Oscili oscil7(&table1, -.06f, 32767.f, &pitch); Oscili oscil8(&table1, -.09f, 32767.f, &pitch); Oscili oscil9(&table1, -.12f, 32767.f, &pitch); // Mixer & gain objects, Mixer mix; // Add the oscili objects to the mixer input mix.AddObj(&oscil1); mix.AddObj(&oscil2); mix.AddObj(&oscil3); mix.AddObj(&oscil4); mix.AddObj(&oscil5); mix.AddObj(&oscil6); mix.AddObj(&oscil7); mix.AddObj(&oscil8); mix.AddObj(&oscil9); Gain gain(-90.f,&mix); // DAC output SndRTIO output(1, SND_OUTPUT); output.SetOutput(1, &gain); // synthesis loop, 'dur' is the duration in samples unsigned long dur = (unsigned long)(duration*mix.GetSr())/mix.GetVectorSize(); for(unsigned long n=0; n < dur; n++){ midi.Read(); note.DoProcess(); if(cur_note == midi.NoteOff()) // if current note is gain.SetGain(-90.f); // switched off if(midi.NoteOn() != -1){ // if a new note is detected cur_note = midi.LastNote(); // set the cur_note to its value gain.SetGain(midi.Velocity(cur_note) - 130.f); // and the gain } conversion.DoProcess(); // convert to tempered freq pitch.DoProcess(); // bend it oscil1.DoProcess(); // oscillators oscil2.DoProcess(); oscil3.DoProcess(); oscil4.DoProcess(); oscil5.DoProcess(); oscil6.DoProcess(); oscil7.DoProcess(); oscil8.DoProcess(); oscil9.DoProcess(); mix.DoProcess(); // mix gain.DoProcess(); // gain attenuation output.Write(); // file output } cout << "Synthesis OFF \n"; return 1; } void usage(){ cout << "\n" << "//******************************************************//" << "\n" << "// MIDISYNTH //" << "\n" << "// sample application using SndObj classes, //" << "\n" << "// synthesizes a cascading harmonics drone //" << "\n" << "// as designed by JC Risset (MIDI controlled) //" << "\n" << "// Victor Lazzarini, 2001 //" << "\n" << "//******************************************************//" << "\n"; cout << "\nusage:\nmidisynth [dur(s) no_of_harmonics MIDI_input_port]\n\n"; return; } SndObj-2.6.7/src/examples/morph_tilde.cpp000644 000766 000024 00000007227 12062673766 021025 0ustar00victorstaff000000 000000 // Copyright (c)Victor Lazzarini, 1997-2004 // See License.txt for a disclaimer of all warranties // and licensing information #include #include #include extern "C"{ void morph_tilde_setup(); } static t_class *morph_tilde_class; struct t_morph_tilde { t_object x_obj; HammingTable* window; SndObj* inobj1; SndObj* inobj2; PVA* spec1; PVA* spec2; PVS* synth; PVMorph* morph; t_float f; }; t_int *morph_tilde_perform(t_int *w){ t_sample *in1 = (t_sample *) w[1]; t_sample *in2 = (t_sample *) w[2]; t_sample *out = (t_sample *) w[3]; t_int size = (t_int) w[4]; t_morph_tilde *x = (t_morph_tilde *) w[5]; int pos = x->inobj1->PushIn(in1, size); x->inobj2->PushIn(in2, size); x->synth->PopOut(out, size); if(pos == DEF_VECSIZE){ x->spec1->DoProcess(); x->spec2->DoProcess(); x->morph->DoProcess(); x->synth->DoProcess(); } return (w+6); } void morph_tilde_dsp(t_morph_tilde *x, t_signal **sp){ dsp_add(morph_tilde_perform, 5, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, sp[0]->s_n, x); } void *morph_tilde_new(t_symbol *s, int argc, t_atom *argv){ float sr; float morpha, morphfr; int i; t_morph_tilde *x = (t_morph_tilde *) pd_new(morph_tilde_class); sr = sys_getsr(); switch (argc) { case 1: morpha = (atom_getfloat(&argv[0])); morphfr = 0.f; break; case 2: morpha = (atom_getfloat(&argv[0])); morphfr = (atom_getfloat(&argv[1])); break; default: morpha = morphfr = 0.f; } morpha = morpha < 1 ? (morpha > 0 ? morpha : 0.f) : 1.f; morphfr = morphfr < 1 ? (morphfr > 0 ? morphfr : 0.f) : 1.f; inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_float, gensym("frequency factor")); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_float, gensym("amplitude factor")); x->window = new HammingTable(1024, 0.5); x->inobj1 = new SndObj(0, DEF_VECSIZE, sr); x->inobj2 = new SndObj(0, DEF_VECSIZE, sr); x->spec1 = new PVA(x->window, x->inobj1, .5f, DEF_FFTSIZE, DEF_VECSIZE, sr); x->spec2 = new PVA(x->window, x->inobj2, .5f, DEF_FFTSIZE, DEF_VECSIZE, sr); x->morph = new PVMorph(morphfr, morpha, x->spec1, x->spec2, 0,0,DEF_FFTSIZE, sr); x->synth = new PVS(x->window, x->morph, DEF_FFTSIZE, DEF_VECSIZE, sr); outlet_new(&x->x_obj, &s_signal); return (void *) x; } void morph_tilde_destroy(t_morph_tilde *x){ delete x->synth; delete x->spec1; delete x->spec2; delete x->inobj1; delete x->inobj2; delete x->window; } void morph_tilde_amp(t_morph_tilde *x, t_floatarg amp){ float morpha = amp < 1 ? (amp > 0 ? amp : 0.f) : 1.f; x->morph->SetAmpMorph((float) morpha); } void morph_tilde_freq(t_morph_tilde *x, t_floatarg freq){ float morphfr = freq < 1 ? (freq > 0 ? freq : 0.f) : 1.f; x->morph->SetFreqMorph((float) morphfr); } void morph_tilde_setup(void) { morph_tilde_class = class_new(gensym("morph~"), (t_newmethod)morph_tilde_new, (t_method)morph_tilde_destroy, sizeof(t_morph_tilde), CLASS_DEFAULT, A_GIMME, 0); class_addmethod(morph_tilde_class, (t_method) morph_tilde_dsp, gensym("dsp"), (t_atomtype) 0); class_addmethod(morph_tilde_class, (t_method) morph_tilde_amp, gensym("amplitude factor"), A_DEFFLOAT, 0); class_addmethod(morph_tilde_class, (t_method) morph_tilde_freq, gensym("frequency factor"), A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(morph_tilde_class,t_morph_tilde,f); post("\nmorph~ 1.0\n Based on SndObj library spectral classes"); post("(c) V Lazzarini, 2004\n"); } SndObj-2.6.7/src/examples/pluck.cpp000644 000766 000024 00000006450 12062673766 017632 0ustar00victorstaff000000 000000 // Copyright (c)Victor Lazzarini, 1997-2004 // See License.txt for a disclaimer of all warranties // and licensing information //******************************************************// // pluck.cpp // // Sample application using SndObj classes. // // Synthesizes a plucked string sound, using // // an implementation of the Karplus-Strong algorithm. // // Victor Lazzarini, 2001 // //******************************************************// #include #include #include void usage(); int main(int argc, char* argv[]){ float dur, res; #ifdef WIN // port is int on WIN int port; #endif #if defined(SGI) || defined(OSS) char port[50]; // port is char on OSS/Irix #endif if(argc > 1) { usage(); return 0; } cout << "pluck: MIDI-controlled string emulation using Karplus-Strong-based object.\n\n"; cout << "duration (secs.): "; cin >> dur; cout << "sustain factor (0 - 1.0): "; cin >> res; #ifdef WINMIDI cout << MidiDeviceList(); #endif cout << "Enter MIDI port: "; cin >> port; // conversion table (12-note equal tempered, A3 = 440Hz) NoteTable ptable; // midi stuff: note (midi note), conversion (equiv. in tempered Hz) // and pitch (bends the conversion output) SndMidiIn* midi = new SndMidiIn(port, 10); MidiIn* note = new MidiIn(midi); Lookup* conversion = new Lookup(&ptable, 0, note); Bend* pitch = new Bend(conversion, midi, 10.f); char cur_note = 0; // Envelope and Pluck objects Pluck* pluck = new Pluck(0.f, 32767.f, res, pitch); Gain* gain = new Gain(-90.f, pluck); // set the output SndRTIO* output = new SndRTIO(1, SND_OUTPUT); output->SetOutput(1, gain); // processing loop unsigned long n, end = (long)(dur*gain->GetSr())/gain->GetVectorSize(); for(n=0; n < end; n++){ midi->Read(); note->DoProcess(); if(cur_note == midi->NoteOff()) // if current note is gain->SetGain(-90.f); // switched off if(midi->NoteOn() != -1){ // if a new note is detected cur_note = midi->LastNote(); // set the cur_note to its value pluck->RePluck(); gain->SetGain(midi->Velocity(cur_note) - 127.f); // and the gain } conversion->DoProcess(); // convert to tempered freq pitch->DoProcess(); // bend it pluck->DoProcess(); // Pluck generator gain->DoProcess(); output->Write(); } delete output; delete gain; delete pluck; delete pitch; delete conversion; delete note; delete midi; cout << "Synthesis OFF \n"; return 1; } void usage(){ cout << "\n" << "//******************************************************//" << "\n" << "// pluck //" << "\n" << "// Sample application using SndObj classes. //" << "\n" << "// Synthesizes a plucked-string sound using an //" << "\n" << "// implementation of the Karplus-Strong algorithm. //" << "\n" << "// Victor Lazzarini, 1998 //" << "\n" << "//******************************************************//" << "\n"; cout << "\nusage:" << "\npluck\n"; return; } SndObj-2.6.7/src/examples/rtschroeder.cpp000644 000766 000024 00000007051 12062673766 021036 0ustar00victorstaff000000 000000 // Copyright (c)Victor Lazzarini, 1997-2004 // See License.txt for a disclaimer of all warranties // and licensing information //******************************************************// // RTSCHROEDER.cpp (realtime version) // // Sample application using SndObj classes. // // Standard reverberator for simulation of // // medium-sized halls, as designed by M R Schroeder. // // Victor Lazzarini, 1998 // //******************************************************// #include #include #include void usage(); main(int argc, char* argv[]){ float rvt, rvgain, dur; float kr = DEF_SR/DEF_VECSIZE; #ifndef MACOSX SndRTIO output(1, SND_OUTPUT); SndRTIO input(1, SND_INPUT); #else SndCoreAudio io(1); #define input io #define output io #endif if(argc == 1){ cout << "schroeder: standard reverberator based on Schroeder design.\n\n"; cout << "duration(s):"; cin >> dur; cout << "reverb time(secs.):"; cin >> rvt; cout << "reverb gain(dB):"; cin >> rvgain; } else { if(argc != 4){ usage(); return 0; } // command line args rvt = (float) atof(argv[2]); rvgain = (float) atof(argv[3]); dur =(float) atof(argv[1]); } // comb filter g's float g1 = (float) pow(.001,.0297/rvt); float g2 = (float) pow(.001,.0371/rvt); float g3 = (float) pow(.001,.0411/rvt); float g4 = (float) pow(.001,.0437/rvt); // comb, allpass, mixers and gain objects SndIn insound(&input, 1); Comb c1(g1, .0297f, &insound); Comb c2(g2, .0371f, &insound); Comb c3(g3, .0411f, &insound); Comb c4(g4, .0437f, &insound); Mixer mix, mix2; // set the two mixer objs inputs mix.AddObj(&c1); mix.AddObj(&c2); mix.AddObj(&c3); mix.AddObj(&c4); Allpass a1(.7f,0.01f, &mix); Allpass a2(.7f,0.0017f, &a1); Gain direct(-6.f,&insound); Gain reverb(rvgain-6.f, &a2); mix2.AddObj(&direct); mix2.AddObj(&reverb); // set the output output.SetOutput(1, &mix2); // loop counter and end unsigned long n, end = (long) (kr*(dur+rvt)); // processing loop for(n=0; n < end; n++){ if(n == (unsigned long) dur*kr) insound.Disable(); // switch off input input.Read(); // signal input insound.DoProcess(); // input sound c1.DoProcess(); // 4 comb filter units c2.DoProcess(); c3.DoProcess(); c4.DoProcess(); mix.DoProcess(); // comb's mixer a1.DoProcess(); // 2 allpass filter units a2.DoProcess(); direct.DoProcess(); // direct sound reverb.DoProcess(); // reverb sound mix2.DoProcess(); // final mix output.Write(); // file output } //delete output; //delete input; return 1; } void usage(){ cout << "\n" << "//******************************************************//" << "\n" << "// SCHROEDER (realtime version) //" << "\n" << "// Sample application using SndObj classes. //" << "\n" << "// Standard reverberator for simulation of //" << "\n" << "// medium-sized halls, as designed by M R Schroeder. //" << "\n" << "// Victor Lazzarini, 1999 //" << "\n" << "//******************************************************//" << "\n"; cout << "\nusage:\nschroeder [dur(s) rev_time(s) rev_gain(dB)]\n\n"; return; } SndObj-2.6.7/src/examples/schroeder.cpp000644 000766 000024 00000007273 12062673766 020476 0ustar00victorstaff000000 000000 // Copyright (c)Victor Lazzarini, 1997-2004 // See License.txt for a disclaimer of all warranties // and licensing information //******************************************************// // SCHROEDER.cpp (sndfile version) // // Sample application using SndObj classes. // // Standard reverberator for simulation of // // medium-sized halls, as designed by M R Schroeder. // // Victor Lazzarini, 1998 // //******************************************************// #include #include #include void usage(); main(int argc, char* argv[]){ float rvt, rvgain, dur; float kr = DEF_SR/DEF_VECSIZE; char infile[128], outfile[128]; if(argc == 1){ cout << "schroeder: standard reverberator based on Schroeder design.\n\n"; cout << "input filename (WAV)"; cin >> infile; cout << "output filename (WAV)"; cin >> outfile; cout << "duration(s):"; cin >> dur; cout << "reverb time(secs.):"; cin >> rvt; cout << "reverb gain(dB):"; cin >> rvgain; } else { if(argc != 4){ usage(); return 0; } // command line args strcpy(infile, argv[1]); strcpy(outfile, argv[2]); rvt = (float) atof(argv[4]); rvgain = (float) atof(argv[5]); dur =(float) atof(argv[3]); } SndWave input(infile, READ); SndWave output(outfile, OVERWRITE); // comb filter g's float g1 = (float) pow(.001,.0297/rvt); float g2 = (float) pow(.001,.0371/rvt); float g3 = (float) pow(.001,.0411/rvt); float g4 = (float) pow(.001,.0437/rvt); // comb, allpass, mixers and gain objects SndIn insound(&input, 1); Comb c1(g1, .0297f, &insound); Comb c2(g2, .0371f, &insound); Comb c3(g3, .0411f, &insound); Comb c4(g4, .0437f, &insound); Mixer mix, mix2; // set the two mixer objs inputs mix.AddObj(&c1); mix.AddObj(&c2); mix.AddObj(&c3); mix.AddObj(&c4); Allpass a1(.7f,0.01f, &mix); Allpass a2(.7f,0.0017f, &a1); Gain direct(-6.f,&insound); Gain reverb(rvgain-6.f, &a2); mix2.AddObj(&direct); mix2.AddObj(&reverb); // set the output output.SetOutput(1, &mix2); // loop counter and end unsigned long n, end = (long) (kr*(dur+rvt)); // processing loop for(n=0; n < end; n++){ if(n == (unsigned long) dur*kr) insound.Disable(); // switch off input input.Read(); // file input insound.DoProcess(); // input sound c1.DoProcess(); // 4 comb filter units c2.DoProcess(); c3.DoProcess(); c4.DoProcess(); mix.DoProcess(); // comb's mixer a1.DoProcess(); // 2 allpass filter units a2.DoProcess(); direct.DoProcess(); // direct sound reverb.DoProcess(); // reverb sound mix2.DoProcess(); // final mix output.Write(); // file output } //delete output; //delete input; return 1; } void usage(){ cout << "\n" << "//******************************************************//" << "\n" << "// SCHROEDER (sndfile version) //" << "\n" << "// Sample application using SndObj classes. //" << "\n" << "// Standard reverberator for simulation of //" << "\n" << "// medium-sized halls, as designed by M R Schroeder. //" << "\n" << "// Victor Lazzarini, 1999 //" << "\n" << "//******************************************************//" << "\n"; cout << "\nusage:\nschroeder [infile.wav outfile.wav dur(s) rev_time(s) rev_gain(dB)]\n\n"; return; } SndObj-2.6.7/src/examples/sinus.cpp000644 000766 000024 00000004013 12062673766 017646 0ustar00victorstaff000000 000000 // Copyright (c)Victor Lazzarini, 1997-2004 // See License.txt for a disclaimer of all warranties // and licensing information #include #include #include #include #ifndef WIN32 #include #endif int main(int argc, char** argv){ if(argc != 8) { cout << argv[0] << " infile.wav outfile.wav timestr pitch thresh intracks outracks\n"; return 1; } time_t ts, te; char* infile = argv[1]; char* outfile = argv[2]; float stratio = atof(argv[3]); // time-stretch ratio float pitch = atof(argv[4]); float thresh = atof(argv[5]); // analysis threshold int intracks = atoi(argv[6]); // analysis max number of tracks int outracks = atoi(argv[7]); // synthesis */ int fftsize = 2048; // FFT analysis size 2048 int decimation = 512; // analysis hopsize int interpolation = (int)(decimation*stratio); // synthesis hopsize float scale = 1.f; // scaling factor */ time(&ts); // SndObj objects set-up HarmTable table(10000, 1, 1, 0.25); // cosine wave HammingTable window(fftsize, 0.5); // hanning window // input sound SndWave input(infile,READ,1,16,0,0.f,decimation); SndIn insound(&input, 1, decimation); // IFD analysis IFGram ifgram(&window,&insound,1.f,fftsize,decimation); // Sinusoidal analysis SinAnal sinus(&ifgram,thresh,intracks, 2, 3); // Sinusoidal resynthesis AdSyn synth(&sinus,outracks,&table,pitch,scale,interpolation); // SinSyn synth(&sinus,outracks,&table,scale,interpolation); // output sound // SndRTIO output(1,SND_OUTPUT,16384,10,SHORTSAM,0,interpolation); SndWave output(outfile, OVERWRITE,1,16,0,0.f,interpolation); output.SetOutput(1, &synth); // processing loop while(!input.Eof()){ input.Read(); insound.DoProcess(); sinus.DoProcess(); synth.DoProcess(); output.Write(); } time(&te); cout << " process time (secs): " << (te -ts) << "\n"; return 0; } SndObj-2.6.7/src/examples/streson.cpp000644 000766 000024 00000007204 12062673766 020207 0ustar00victorstaff000000 000000 // Copyright (c)Victor Lazzarini, 1997-2004 // See License.txt for a disclaimer of all warranties // and licensing information //******************************************************// // rtstreson.cpp (new realtime version) // // Sample application using SndObj classes. // // Simulates a N-string "string resonator" // // // // Victor Lazzarini, 1998 // //******************************************************// #include #include #include void usage(); main(int argc, char *argv[]){ int nstrs, i; float decay; float gain; float* fr; float dur, sr=44100.f; SndIO* output; SndIO* input; ifstream datafile; switch(argc){ case 1: cout << "streson: string resonator \n\n"; // prompt for parameters cout << "Enter number of strings: "; cin >> nstrs; cout << "Enter decay factor (dB/sec): "; cin >> decay; cout << "Enter gain attenuation(dB): "; cin >> gain; fr = new float[nstrs]; for(i=0; i> fr[i]; } cout << "enter duration: "; cin >> dur; break; case 3: // get the parameters from file dur = (float) (atof(argv[1])); datafile.open(argv[3]); datafile >> nstrs; datafile >> decay; datafile >> gain; fr = new float[nstrs]; for(i=0;i> fr[i]; datafile.close(); break; default: usage(); return 0; } #ifndef MACOSX input = new SndRTIO(1, SND_INPUT, 1024); output= new SndRTIO(1, SND_OUTPUT, 1024); #else input = new SndCoreAudio(1); output = input; #endif // Sound input, attenuation, string filters SndIn* sound = new SndIn(input); // String Filters StringFlt** strings = new StringFlt*[nstrs]; for(i=0;iSetOutput(1, atten); // processing loop unsigned long n, end = (unsigned long)(dur*(sr/DEF_VECSIZE)); for(n=0; n < end; n++){ input->Read(); // input from ADC sound->DoProcess(); // sound input for(i=0; i < nstrs; i++){ strings[i]->DoProcess(); // string filters } mix->DoProcess(); // mixer atten->DoProcess(); // attenuation output->Write(); } delete output; delete atten; delete mix; for(i=0;i #include "../PVTransp.h" #include int main(int argc, char** argv){ int i; float dur = 6.f; // dur in secs float sr = DEF_SR; // sampling rate int vecsize = 256; // DSP vector size float kr = sr/vecsize; // control rate // table object // HarmTable table1(1024,1,SINE); SndRTIO* input = new SndRTIO(1, SND_INPUT); //SndWave input("blackbird.wav", READ); // SndWave input("pianoc2.wav", READ); HammingTable window(1024, 0.54f); //PVTable table2(1024,&input,&window, 0.f, 0.15f); // control-rate objects //ADSR amp(.1f, 16000.f, .2f, 8000.f, .5f, 2.0f,0,1,kr); // IADSR freq(440.f, .1f, 880.f, .2f, 660.0f, .5f, 440.0f, 2.0f,0,1,kr); // SndRTIO insig(1, SND_INPUT); // audio-rate objects SndIn in(input); //SndIN file(&input); PVA anal(&window, &in, 0.5f); //PVA anal2(&window, &file); PVTransp mask(&anal, 1.5f); PVS synth(&window, &mask); //Oscili oscil(&table1, 0.f, 0.f, &freq, &, vecsize, sr); SndRTIO output(1, SND_OUTPUT); //SndWave output("test.wav", OVERWRITE, 1); output.SetOutput(1, &synth); for(i=0; iRead(); in.DoProcess(); anal.DoProcess(); mask.DoProcess(); synth.DoProcess(); output.Write(); } delete input; return 0; }SndObj-2.6.7/src/examples/test.java000644 000766 000024 00000001513 12062674553 017620 0ustar00victorstaff000000 000000 import JSndObj.*; public class test { public static void main(String[] args) { HarmTable harm = new HarmTable(10000,1,1); Oscili mod = new Oscili(harm, 4.f, 10.f); Oscili osc = new Oscili(harm, 400.f, 10000.f, mod); SndRTIO outp = new SndRTIO((short)1, jsndobjConstants.SND_OUTPUT, 1024); outp.SetOutput((short)1, osc); SndThread thread = new SndThread(); // thread set-up thread.AddObj(mod); thread.AddObj(osc); thread.AddObj(outp, jsndobjConstants.SNDIO_OUT); thread.ProcOn(); long end; if(args[0] != null) end = (long) (Float.parseFloat(args[0])*1000); else end = 1000; long start = System.currentTimeMillis(); while(System.currentTimeMillis() < start + end ); thread.ProcOff(); }; };SndObj-2.6.7/src/examples/transpose.cpp000644 000766 000024 00000002125 12062673766 020525 0ustar00victorstaff000000 000000 #include #include void Usage(char* progr); int main(int argc, char** argv){ float dur, pitch; int formants; if(argc == 4){ dur = (float) atof(argv[1]); pitch = (float) atof(argv[2]); formants = atoi(argv[3]); } else { Usage(argv[0]); exit(1); } #ifndef MACOSX SndRTIO output(1, SND_OUTPUT); SndRTIO input(1, SND_INPUT); #else SndCoreAudio io(1); #define input io #define output io #endif HammingTable window(1024, 0.54f); SndIn in(&input); PVA anal(&window, &in); PVTransp trans(&anal, pitch,formants); PVS synth(&window, &trans); output.SetOutput(1, &synth); int end = (int)(dur*DEF_SR/DEF_VECSIZE); for(int i=0; i 1=keep formants 0=ignore formants\n"; } SndObj-2.6.7/src/asio/asio.cpp000644 000766 000024 00000012310 12062673766 016554 0ustar00victorstaff000000 000000 /* Steinberg Audio Stream I/O API (c) 1996, Steinberg Soft- und Hardware GmbH asio.cpp asio functions entries which translate the asio interface to the asiodrvr class methods */ #include #include "asiosys.h" // platform definition #include "asio.h" #if MAC #include "asiodrvr.h" #pragma export on AsioDriver *theAsioDriver = 0; extern "C" { long main() { return 'ASIO'; } #elif WINDOWS #include "windows.h" #include "iasiodrv.h" #include "asiodrivers.h" IASIO *theAsioDriver = 0; extern AsioDrivers *asioDrivers; #elif SGI || SUN || BEOS || LINUX #include "asiodrvr.h" static AsioDriver *theAsioDriver = 0; #endif //----------------------------------------------------------------------------------------------------- ASIOError ASIOInit(ASIODriverInfo *info) { #if MAC || SGI || SUN || BEOS || LINUX if(theAsioDriver) { delete theAsioDriver; theAsioDriver = 0; } info->driverVersion = 0; strcpy(info->name, "No ASIO Driver"); theAsioDriver = getDriver(); if(!theAsioDriver) { strcpy(info->errorMessage, "Not enough memory for the ASIO driver!"); return ASE_NotPresent; } if(!theAsioDriver->init(info->sysRef)) { theAsioDriver->getErrorMessage(info->errorMessage); delete theAsioDriver; theAsioDriver = 0; return ASE_NotPresent; } strcpy(info->errorMessage, "No ASIO Driver Error"); theAsioDriver->getDriverName(info->name); info->driverVersion = theAsioDriver->getDriverVersion(); return ASE_OK; #else info->driverVersion = 0; strcpy(info->name, "No ASIO Driver"); if(theAsioDriver) // must be loaded! { if(!theAsioDriver->init(info->sysRef)) { theAsioDriver->getErrorMessage(info->errorMessage); theAsioDriver = 0; return ASE_NotPresent; } strcpy(info->errorMessage, "No ASIO Driver Error"); theAsioDriver->getDriverName(info->name); info->driverVersion = theAsioDriver->getDriverVersion(); return ASE_OK; } return ASE_NotPresent; #endif // !MAC } ASIOError ASIOExit(void) { if(theAsioDriver) { #if WINDOWS asioDrivers->removeCurrentDriver(); #else delete theAsioDriver; #endif } theAsioDriver = 0; return ASE_OK; } ASIOError ASIOStart(void) { if(!theAsioDriver) return ASE_NotPresent; return theAsioDriver->start(); } ASIOError ASIOStop(void) { if(!theAsioDriver) return ASE_NotPresent; return theAsioDriver->stop(); } ASIOError ASIOGetChannels(long *numInputChannels, long *numOutputChannels) { if(!theAsioDriver) { *numInputChannels = *numOutputChannels = 0; return ASE_NotPresent; } return theAsioDriver->getChannels(numInputChannels, numOutputChannels); } ASIOError ASIOGetLatencies(long *inputLatency, long *outputLatency) { if(!theAsioDriver) { *inputLatency = *outputLatency = 0; return ASE_NotPresent; } return theAsioDriver->getLatencies(inputLatency, outputLatency); } ASIOError ASIOGetBufferSize(long *minSize, long *maxSize, long *preferredSize, long *granularity) { if(!theAsioDriver) { *minSize = *maxSize = *preferredSize = *granularity = 0; return ASE_NotPresent; } return theAsioDriver->getBufferSize(minSize, maxSize, preferredSize, granularity); } ASIOError ASIOCanSampleRate(ASIOSampleRate sampleRate) { if(!theAsioDriver) return ASE_NotPresent; return theAsioDriver->canSampleRate(sampleRate); } ASIOError ASIOGetSampleRate(ASIOSampleRate *currentRate) { if(!theAsioDriver) return ASE_NotPresent; return theAsioDriver->getSampleRate(currentRate); } ASIOError ASIOSetSampleRate(ASIOSampleRate sampleRate) { if(!theAsioDriver) return ASE_NotPresent; return theAsioDriver->setSampleRate(sampleRate); } ASIOError ASIOGetClockSources(ASIOClockSource *clocks, long *numSources) { if(!theAsioDriver) { *numSources = 0; return ASE_NotPresent; } return theAsioDriver->getClockSources(clocks, numSources); } ASIOError ASIOSetClockSource(long reference) { if(!theAsioDriver) return ASE_NotPresent; return theAsioDriver->setClockSource(reference); } ASIOError ASIOGetSamplePosition(ASIOSamples *sPos, ASIOTimeStamp *tStamp) { if(!theAsioDriver) return ASE_NotPresent; return theAsioDriver->getSamplePosition(sPos, tStamp); } ASIOError ASIOGetChannelInfo(ASIOChannelInfo *info) { if(!theAsioDriver) { info->channelGroup = -1; info->type = ASIOSTInt16MSB; strcpy(info->name, "None"); return ASE_NotPresent; } return theAsioDriver->getChannelInfo(info); } ASIOError ASIOCreateBuffers(ASIOBufferInfo *bufferInfos, long numChannels, long bufferSize, ASIOCallbacks *callbacks) { if(!theAsioDriver) { ASIOBufferInfo *info = bufferInfos; for(long i = 0; i < numChannels; i++, info++) info->buffers[0] = info->buffers[1] = 0; return ASE_NotPresent; } return theAsioDriver->createBuffers(bufferInfos, numChannels, bufferSize, callbacks); } ASIOError ASIODisposeBuffers(void) { if(!theAsioDriver) return ASE_NotPresent; return theAsioDriver->disposeBuffers(); } ASIOError ASIOControlPanel(void) { if(!theAsioDriver) return ASE_NotPresent; return theAsioDriver->controlPanel(); } ASIOError ASIOFuture(long selector, void *opt) { if(!theAsioDriver) return ASE_NotPresent; return theAsioDriver->future(selector, opt); } ASIOError ASIOOutputReady(void) { if(!theAsioDriver) return ASE_NotPresent; return theAsioDriver->outputReady(); } #if MAC } // extern "C" #pragma export off #endif SndObj-2.6.7/src/asio/asio.h000644 000766 000024 00000123611 12062673766 016230 0ustar00victorstaff000000 000000 //--------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------- /* Steinberg Audio Stream I/O API (c) 1997 - 2005, Steinberg Media Technologies GmbH ASIO Interface Specification v 2.1 2005 - Added support for DSD sample data (in cooperation with Sony) basic concept is an i/o synchronous double-buffer scheme: on bufferSwitch(index == 0), host will read/write: after ASIOStart(), the read first input buffer A (index 0) | will be invalid (empty) * ------------------------ |------------------------|-----------------------| | | | | Input Buffer A (0) | Input Buffer B (1) | | | | |------------------------|-----------------------| | | | | Output Buffer A (0) | Output Buffer B (1) | | | | |------------------------|-----------------------| * ------------------------- | before calling ASIOStart(), write host will have filled output buffer B (index 1) already *please* take special care of proper statement of input and output latencies (see ASIOGetLatencies()), these control sequencer sync accuracy */ //--------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------- /* prototypes summary: ASIOError ASIOInit(ASIODriverInfo *info); ASIOError ASIOExit(void); ASIOError ASIOStart(void); ASIOError ASIOStop(void); ASIOError ASIOGetChannels(long *numInputChannels, long *numOutputChannels); ASIOError ASIOGetLatencies(long *inputLatency, long *outputLatency); ASIOError ASIOGetBufferSize(long *minSize, long *maxSize, long *preferredSize, long *granularity); ASIOError ASIOCanSampleRate(ASIOSampleRate sampleRate); ASIOError ASIOGetSampleRate(ASIOSampleRate *currentRate); ASIOError ASIOSetSampleRate(ASIOSampleRate sampleRate); ASIOError ASIOGetClockSources(ASIOClockSource *clocks, long *numSources); ASIOError ASIOSetClockSource(long reference); ASIOError ASIOGetSamplePosition (ASIOSamples *sPos, ASIOTimeStamp *tStamp); ASIOError ASIOGetChannelInfo(ASIOChannelInfo *info); ASIOError ASIOCreateBuffers(ASIOBufferInfo *bufferInfos, long numChannels, long bufferSize, ASIOCallbacks *callbacks); ASIOError ASIODisposeBuffers(void); ASIOError ASIOControlPanel(void); void *ASIOFuture(long selector, void *params); ASIOError ASIOOutputReady(void); */ //--------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------- #ifndef __ASIO_H #define __ASIO_H // force 4 byte alignment #if defined(_MSC_VER) && !defined(__MWERKS__) #pragma pack(push,4) #elif PRAGMA_ALIGN_SUPPORTED #pragma options align = native #endif //- - - - - - - - - - - - - - - - - - - - - - - - - // Type definitions //- - - - - - - - - - - - - - - - - - - - - - - - - // number of samples data type is 64 bit integer #if NATIVE_INT64 typedef long long int ASIOSamples; #else typedef struct ASIOSamples { unsigned long hi; unsigned long lo; } ASIOSamples; #endif // Timestamp data type is 64 bit integer, // Time format is Nanoseconds. #if NATIVE_INT64 typedef long long int ASIOTimeStamp ; #else typedef struct ASIOTimeStamp { unsigned long hi; unsigned long lo; } ASIOTimeStamp; #endif // Samplerates are expressed in IEEE 754 64 bit double float, // native format as host computer #if IEEE754_64FLOAT typedef double ASIOSampleRate; #else typedef struct ASIOSampleRate { char ieee[8]; } ASIOSampleRate; #endif // Boolean values are expressed as long typedef long ASIOBool; enum { ASIOFalse = 0, ASIOTrue = 1 }; // Sample Types are expressed as long typedef long ASIOSampleType; enum { ASIOSTInt16MSB = 0, ASIOSTInt24MSB = 1, // used for 20 bits as well ASIOSTInt32MSB = 2, ASIOSTFloat32MSB = 3, // IEEE 754 32 bit float ASIOSTFloat64MSB = 4, // IEEE 754 64 bit double float // these are used for 32 bit data buffer, with different alignment of the data inside // 32 bit PCI bus systems can be more easily used with these ASIOSTInt32MSB16 = 8, // 32 bit data with 16 bit alignment ASIOSTInt32MSB18 = 9, // 32 bit data with 18 bit alignment ASIOSTInt32MSB20 = 10, // 32 bit data with 20 bit alignment ASIOSTInt32MSB24 = 11, // 32 bit data with 24 bit alignment ASIOSTInt16LSB = 16, ASIOSTInt24LSB = 17, // used for 20 bits as well ASIOSTInt32LSB = 18, ASIOSTFloat32LSB = 19, // IEEE 754 32 bit float, as found on Intel x86 architecture ASIOSTFloat64LSB = 20, // IEEE 754 64 bit double float, as found on Intel x86 architecture // these are used for 32 bit data buffer, with different alignment of the data inside // 32 bit PCI bus systems can more easily used with these ASIOSTInt32LSB16 = 24, // 32 bit data with 18 bit alignment ASIOSTInt32LSB18 = 25, // 32 bit data with 18 bit alignment ASIOSTInt32LSB20 = 26, // 32 bit data with 20 bit alignment ASIOSTInt32LSB24 = 27, // 32 bit data with 24 bit alignment // ASIO DSD format. ASIOSTDSDInt8LSB1 = 32, // DSD 1 bit data, 8 samples per byte. First sample in Least significant bit. ASIOSTDSDInt8MSB1 = 33, // DSD 1 bit data, 8 samples per byte. First sample in Most significant bit. ASIOSTDSDInt8NER8 = 40, // DSD 8 bit data, 1 sample per byte. No Endianness required. ASIOSTLastEntry }; /*----------------------------------------------------------------------------- // DSD operation and buffer layout // Definition by Steinberg/Sony Oxford. // // We have tried to treat DSD as PCM and so keep a consistant structure across // the ASIO interface. // // DSD's sample rate is normally referenced as a multiple of 44.1Khz, so // the standard sample rate is refered to as 64Fs (or 2.8224Mhz). We looked // at making a special case for DSD and adding a field to the ASIOFuture that // would allow the user to select the Over Sampleing Rate (OSR) as a seperate // entity but decided in the end just to treat it as a simple value of // 2.8224Mhz and use the standard interface to set it. // // The second problem was the "word" size, in PCM the word size is always a // greater than or equal to 8 bits (a byte). This makes life easy as we can // then pack the samples into the "natural" size for the machine. // In DSD the "word" size is 1 bit. This is not a major problem and can easily // be dealt with if we ensure that we always deal with a multiple of 8 samples. // // DSD brings with it another twist to the Endianness religion. How are the // samples packed into the byte. It would be nice to just say the most significant // bit is always the first sample, however there would then be a performance hit // on little endian machines. Looking at how some of the processing goes... // Little endian machines like the first sample to be in the Least Significant Bit, // this is because when you write it to memory the data is in the correct format // to be shifted in and out of the words. // Big endian machine prefer the first sample to be in the Most Significant Bit, // again for the same reasion. // // And just when things were looking really muddy there is a proposed extension to // DSD that uses 8 bit word sizes. It does not care what endianness you use. // // Switching the driver between DSD and PCM mode // ASIOFuture allows for extending the ASIO API quite transparently. // See kAsioSetIoFormat, kAsioGetIoFormat, kAsioCanDoIoFormat // //-----------------------------------------------------------------------------*/ //- - - - - - - - - - - - - - - - - - - - - - - - - // Error codes //- - - - - - - - - - - - - - - - - - - - - - - - - typedef long ASIOError; enum { ASE_OK = 0, // This value will be returned whenever the call succeeded ASE_SUCCESS = 0x3f4847a0, // unique success return value for ASIOFuture calls ASE_NotPresent = -1000, // hardware input or output is not present or available ASE_HWMalfunction, // hardware is malfunctioning (can be returned by any ASIO function) ASE_InvalidParameter, // input parameter invalid ASE_InvalidMode, // hardware is in a bad mode or used in a bad mode ASE_SPNotAdvancing, // hardware is not running when sample position is inquired ASE_NoClock, // sample clock or rate cannot be determined or is not present ASE_NoMemory // not enough memory for completing the request }; //--------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------- //- - - - - - - - - - - - - - - - - - - - - - - - - // Time Info support //- - - - - - - - - - - - - - - - - - - - - - - - - typedef struct ASIOTimeCode { double speed; // speed relation (fraction of nominal speed) // optional; set to 0. or 1. if not supported ASIOSamples timeCodeSamples; // time in samples unsigned long flags; // some information flags (see below) char future[64]; } ASIOTimeCode; typedef enum ASIOTimeCodeFlags { kTcValid = 1, kTcRunning = 1 << 1, kTcReverse = 1 << 2, kTcOnspeed = 1 << 3, kTcStill = 1 << 4, kTcSpeedValid = 1 << 8 } ASIOTimeCodeFlags; typedef struct AsioTimeInfo { double speed; // absolute speed (1. = nominal) ASIOTimeStamp systemTime; // system time related to samplePosition, in nanoseconds // on mac, must be derived from Microseconds() (not UpTime()!) // on windows, must be derived from timeGetTime() ASIOSamples samplePosition; ASIOSampleRate sampleRate; // current rate unsigned long flags; // (see below) char reserved[12]; } AsioTimeInfo; typedef enum AsioTimeInfoFlags { kSystemTimeValid = 1, // must always be valid kSamplePositionValid = 1 << 1, // must always be valid kSampleRateValid = 1 << 2, kSpeedValid = 1 << 3, kSampleRateChanged = 1 << 4, kClockSourceChanged = 1 << 5 } AsioTimeInfoFlags; typedef struct ASIOTime // both input/output { long reserved[4]; // must be 0 struct AsioTimeInfo timeInfo; // required struct ASIOTimeCode timeCode; // optional, evaluated if (timeCode.flags & kTcValid) } ASIOTime; /* using time info: it is recommended to use the new method with time info even if the asio device does not support timecode; continuous calls to ASIOGetSamplePosition and ASIOGetSampleRate are avoided, and there is a more defined relationship between callback time and the time info. see the example below. to initiate time info mode, after you have received the callbacks pointer in ASIOCreateBuffers, you will call the asioMessage callback with kAsioSupportsTimeInfo as the argument. if this returns 1, host has accepted time info mode. now host expects the new callback bufferSwitchTimeInfo to be used instead of the old bufferSwitch method. the ASIOTime structure is assumed to be valid and accessible until the callback returns. using time code: if the device supports reading time code, it will call host's asioMessage callback with kAsioSupportsTimeCode as the selector. it may then fill the according fields and set the kTcValid flag. host will call the future method with the kAsioEnableTimeCodeRead selector when it wants to enable or disable tc reading by the device. you should also support the kAsioCanTimeInfo and kAsioCanTimeCode selectors in ASIOFuture (see example). note: the AsioTimeInfo/ASIOTimeCode pair is supposed to work in both directions. as a matter of convention, the relationship between the sample position counter and the time code at buffer switch time is (ignoring offset between tc and sample pos when tc is running): on input: sample 0 -> input buffer sample 0 -> time code 0 on output: sample 0 -> output buffer sample 0 -> time code 0 this means that for 'real' calculations, one has to take into account the according latencies. example: ASIOTime asioTime; in createBuffers() { memset(&asioTime, 0, sizeof(ASIOTime)); AsioTimeInfo* ti = &asioTime.timeInfo; ti->sampleRate = theSampleRate; ASIOTimeCode* tc = &asioTime.timeCode; tc->speed = 1.; timeInfoMode = false; canTimeCode = false; if(callbacks->asioMessage(kAsioSupportsTimeInfo, 0, 0, 0) == 1) { timeInfoMode = true; #if kCanTimeCode if(callbacks->asioMessage(kAsioSupportsTimeCode, 0, 0, 0) == 1) canTimeCode = true; #endif } } void switchBuffers(long doubleBufferIndex, bool processNow) { if(timeInfoMode) { AsioTimeInfo* ti = &asioTime.timeInfo; ti->flags = kSystemTimeValid | kSamplePositionValid | kSampleRateValid; ti->systemTime = theNanoSeconds; ti->samplePosition = theSamplePosition; if(ti->sampleRate != theSampleRate) ti->flags |= kSampleRateChanged; ti->sampleRate = theSampleRate; #if kCanTimeCode if(canTimeCode && timeCodeEnabled) { ASIOTimeCode* tc = &asioTime.timeCode; tc->timeCodeSamples = tcSamples; // tc in samples tc->flags = kTcValid | kTcRunning | kTcOnspeed; // if so... } ASIOTime* bb = callbacks->bufferSwitchTimeInfo(&asioTime, doubleBufferIndex, processNow ? ASIOTrue : ASIOFalse); #else callbacks->bufferSwitchTimeInfo(&asioTime, doubleBufferIndex, processNow ? ASIOTrue : ASIOFalse); #endif } else callbacks->bufferSwitch(doubleBufferIndex, ASIOFalse); } ASIOError ASIOFuture(long selector, void *params) { switch(selector) { case kAsioEnableTimeCodeRead: timeCodeEnabled = true; return ASE_SUCCESS; case kAsioDisableTimeCodeRead: timeCodeEnabled = false; return ASE_SUCCESS; case kAsioCanTimeInfo: return ASE_SUCCESS; #if kCanTimeCode case kAsioCanTimeCode: return ASE_SUCCESS; #endif } return ASE_NotPresent; }; */ //- - - - - - - - - - - - - - - - - - - - - - - - - // application's audio stream handler callbacks //- - - - - - - - - - - - - - - - - - - - - - - - - typedef struct ASIOCallbacks { void (*bufferSwitch) (long doubleBufferIndex, ASIOBool directProcess); // bufferSwitch indicates that both input and output are to be processed. // the current buffer half index (0 for A, 1 for B) determines // - the output buffer that the host should start to fill. the other buffer // will be passed to output hardware regardless of whether it got filled // in time or not. // - the input buffer that is now filled with incoming data. Note that // because of the synchronicity of i/o, the input always has at // least one buffer latency in relation to the output. // directProcess suggests to the host whether it should immedeately // start processing (directProcess == ASIOTrue), or whether its process // should be deferred because the call comes from a very low level // (for instance, a high level priority interrupt), and direct processing // would cause timing instabilities for the rest of the system. If in doubt, // directProcess should be set to ASIOFalse. // Note: bufferSwitch may be called at interrupt time for highest efficiency. void (*sampleRateDidChange) (ASIOSampleRate sRate); // gets called when the AudioStreamIO detects a sample rate change // If sample rate is unknown, 0 is passed (for instance, clock loss // when externally synchronized). long (*asioMessage) (long selector, long value, void* message, double* opt); // generic callback for various purposes, see selectors below. // note this is only present if the asio version is 2 or higher ASIOTime* (*bufferSwitchTimeInfo) (ASIOTime* params, long doubleBufferIndex, ASIOBool directProcess); // new callback with time info. makes ASIOGetSamplePosition() and various // calls to ASIOGetSampleRate obsolete, // and allows for timecode sync etc. to be preferred; will be used if // the driver calls asioMessage with selector kAsioSupportsTimeInfo. } ASIOCallbacks; // asioMessage selectors enum { kAsioSelectorSupported = 1, // selector in , returns 1L if supported, // 0 otherwise kAsioEngineVersion, // returns engine (host) asio implementation version, // 2 or higher kAsioResetRequest, // request driver reset. if accepted, this // will close the driver (ASIO_Exit() ) and // re-open it again (ASIO_Init() etc). some // drivers need to reconfigure for instance // when the sample rate changes, or some basic // changes have been made in ASIO_ControlPanel(). // returns 1L; note the request is merely passed // to the application, there is no way to determine // if it gets accepted at this time (but it usually // will be). kAsioBufferSizeChange, // not yet supported, will currently always return 0L. // for now, use kAsioResetRequest instead. // once implemented, the new buffer size is expected // in , and on success returns 1L kAsioResyncRequest, // the driver went out of sync, such that // the timestamp is no longer valid. this // is a request to re-start the engine and // slave devices (sequencer). returns 1 for ok, // 0 if not supported. kAsioLatenciesChanged, // the drivers latencies have changed. The engine // will refetch the latencies. kAsioSupportsTimeInfo, // if host returns true here, it will expect the // callback bufferSwitchTimeInfo to be called instead // of bufferSwitch kAsioSupportsTimeCode, // kAsioMMCCommand, // unused - value: number of commands, message points to mmc commands kAsioSupportsInputMonitor, // kAsioSupportsXXX return 1 if host supports this kAsioSupportsInputGain, // unused and undefined kAsioSupportsInputMeter, // unused and undefined kAsioSupportsOutputGain, // unused and undefined kAsioSupportsOutputMeter, // unused and undefined kAsioOverload, // driver detected an overload kAsioNumMessageSelectors }; //--------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------- //- - - - - - - - - - - - - - - - - - - - - - - - - // (De-)Construction //- - - - - - - - - - - - - - - - - - - - - - - - - typedef struct ASIODriverInfo { long asioVersion; // currently, 2 long driverVersion; // driver specific char name[32]; char errorMessage[124]; void *sysRef; // on input: system reference // (Windows: application main window handle, Mac & SGI: 0) } ASIODriverInfo; ASIOError ASIOInit(ASIODriverInfo *info); /* Purpose: Initialize the AudioStreamIO. Parameter: info: pointer to an ASIODriver structure: - asioVersion: - on input, the host version. *** Note *** this is 0 for earlier asio implementations, and the asioMessage callback is implemeted only if asioVersion is 2 or greater. sorry but due to a design fault the driver doesn't have access to the host version in ASIOInit :-( added selector for host (engine) version in the asioMessage callback so we're ok from now on. - on return, asio implementation version. older versions are 1 if you support this version (namely, ASIO_outputReady() ) this should be 2 or higher. also see the note in ASIO_getTimeStamp() ! - version: on return, the driver version (format is driver specific) - name: on return, a null-terminated string containing the driver's name - error message: on return, should contain a user message describing the type of error that occured during ASIOInit(), if any. - sysRef: platform specific Returns: If neither input nor output is present ASE_NotPresent will be returned. ASE_NoMemory, ASE_HWMalfunction are other possible error conditions */ ASIOError ASIOExit(void); /* Purpose: Terminates the AudioStreamIO. Parameter: None. Returns: If neither input nor output is present ASE_NotPresent will be returned. Notes: this implies ASIOStop() and ASIODisposeBuffers(), meaning that no host callbacks must be accessed after ASIOExit(). */ //- - - - - - - - - - - - - - - - - - - - - - - - - // Start/Stop //- - - - - - - - - - - - - - - - - - - - - - - - - ASIOError ASIOStart(void); /* Purpose: Start input and output processing synchronously. This will - reset the sample counter to zero - start the hardware (both input and output) The first call to the hosts' bufferSwitch(index == 0) then tells the host to read from input buffer A (index 0), and start processing to output buffer A while output buffer B (which has been filled by the host prior to calling ASIOStart()) is possibly sounding (see also ASIOGetLatencies()) Parameter: None. Returns: If neither input nor output is present, ASE_NotPresent will be returned. If the hardware fails to start, ASE_HWMalfunction will be returned. Notes: There is no restriction on the time that ASIOStart() takes to perform (that is, it is not considered a realtime trigger). */ ASIOError ASIOStop(void); /* Purpose: Stops input and output processing altogether. Parameter: None. Returns: If neither input nor output is present ASE_NotPresent will be returned. Notes: On return from ASIOStop(), the driver must in no case call the hosts' bufferSwitch() routine. */ //- - - - - - - - - - - - - - - - - - - - - - - - - // Inquiry methods and sample rate //- - - - - - - - - - - - - - - - - - - - - - - - - ASIOError ASIOGetChannels(long *numInputChannels, long *numOutputChannels); /* Purpose: Returns number of individual input/output channels. Parameter: numInputChannels will hold the number of available input channels numOutputChannels will hold the number of available output channels Returns: If no input/output is present ASE_NotPresent will be returned. If only inputs, or only outputs are available, the according other parameter will be zero, and ASE_OK is returned. */ ASIOError ASIOGetLatencies(long *inputLatency, long *outputLatency); /* Purpose: Returns the input and output latencies. This includes device specific delays, like FIFOs etc. Parameter: inputLatency will hold the 'age' of the first sample frame in the input buffer when the hosts reads it in bufferSwitch() (this is theoretical, meaning it does not include the overhead and delay between the actual physical switch, and the time when bufferSitch() enters). This will usually be the size of one block in sample frames, plus device specific latencies. outputLatency will specify the time between the buffer switch, and the time when the next play buffer will start to sound. The next play buffer is defined as the one the host starts processing after (or at) bufferSwitch(), indicated by the index parameter (0 for buffer A, 1 for buffer B). It will usually be either one block, if the host writes directly to a dma buffer, or two or more blocks if the buffer is 'latched' by the driver. As an example, on ASIOStart(), the host will have filled the play buffer at index 1 already; when it gets the callback (with the parameter index == 0), this tells it to read from the input buffer 0, and start to fill the play buffer 0 (assuming that now play buffer 1 is already sounding). In this case, the output latency is one block. If the driver decides to copy buffer 1 at that time, and pass it to the hardware at the next slot (which is most commonly done, but should be avoided), the output latency becomes two blocks instead, resulting in a total i/o latency of at least 3 blocks. As memory access is the main bottleneck in native dsp processing, and to acheive less latency, it is highly recommended to try to avoid copying (this is also why the driver is the owner of the buffers). To summarize, the minimum i/o latency can be acheived if the input buffer is processed by the host into the output buffer which will physically start to sound on the next time slice. Also note that the host expects the bufferSwitch() callback to be accessed for each time slice in order to retain sync, possibly recursively; if it fails to process a block in time, it will suspend its operation for some time in order to recover. Returns: If no input/output is present ASE_NotPresent will be returned. */ ASIOError ASIOGetBufferSize(long *minSize, long *maxSize, long *preferredSize, long *granularity); /* Purpose: Returns min, max, and preferred buffer sizes for input/output Parameter: minSize will hold the minimum buffer size maxSize will hold the maxium possible buffer size preferredSize will hold the preferred buffer size (a size which best fits performance and hardware requirements) granularity will hold the granularity at which buffer sizes may differ. Usually, the buffer size will be a power of 2; in this case, granularity will hold -1 on return, signalling possible buffer sizes starting from minSize, increased in powers of 2 up to maxSize. Returns: If no input/output is present ASE_NotPresent will be returned. Notes: When minimum and maximum buffer size are equal, the preferred buffer size has to be the same value as well; granularity should be 0 in this case. */ ASIOError ASIOCanSampleRate(ASIOSampleRate sampleRate); /* Purpose: Inquires the hardware for the available sample rates. Parameter: sampleRate is the rate in question. Returns: If the inquired sample rate is not supported, ASE_NoClock will be returned. If no input/output is present ASE_NotPresent will be returned. */ ASIOError ASIOGetSampleRate(ASIOSampleRate *currentRate); /* Purpose: Get the current sample Rate. Parameter: currentRate will hold the current sample rate on return. Returns: If sample rate is unknown, sampleRate will be 0 and ASE_NoClock will be returned. If no input/output is present ASE_NotPresent will be returned. Notes: */ ASIOError ASIOSetSampleRate(ASIOSampleRate sampleRate); /* Purpose: Set the hardware to the requested sample Rate. If sampleRate == 0, enable external sync. Parameter: sampleRate: on input, the requested rate Returns: If sampleRate is unknown ASE_NoClock will be returned. If the current clock is external, and sampleRate is != 0, ASE_InvalidMode will be returned If no input/output is present ASE_NotPresent will be returned. Notes: */ typedef struct ASIOClockSource { long index; // as used for ASIOSetClockSource() long associatedChannel; // for instance, S/PDIF or AES/EBU long associatedGroup; // see channel groups (ASIOGetChannelInfo()) ASIOBool isCurrentSource; // ASIOTrue if this is the current clock source char name[32]; // for user selection } ASIOClockSource; ASIOError ASIOGetClockSources(ASIOClockSource *clocks, long *numSources); /* Purpose: Get the available external audio clock sources Parameter: clocks points to an array of ASIOClockSource structures: - index: this is used to identify the clock source when ASIOSetClockSource() is accessed, should be an index counting from zero - associatedInputChannel: the first channel of an associated input group, if any. - associatedGroup: the group index of that channel. groups of channels are defined to seperate for instance analog, S/PDIF, AES/EBU, ADAT connectors etc, when present simultaniously. Note that associated channel is enumerated according to numInputs/numOutputs, means it is independant from a group (see also ASIOGetChannelInfo()) inputs are associated to a clock if the physical connection transfers both data and clock (like S/PDIF, AES/EBU, or ADAT inputs). if there is no input channel associated with the clock source (like Word Clock, or internal oscillator), both associatedChannel and associatedGroup should be set to -1. - isCurrentSource: on exit, ASIOTrue if this is the current clock source, ASIOFalse else - name: a null-terminated string for user selection of the available sources. numSources: on input: the number of allocated array members on output: the number of available clock sources, at least 1 (internal clock generator). Returns: If no input/output is present ASE_NotPresent will be returned. Notes: */ ASIOError ASIOSetClockSource(long index); /* Purpose: Set the audio clock source Parameter: index as obtained from an inquiry to ASIOGetClockSources() Returns: If no input/output is present ASE_NotPresent will be returned. If the clock can not be selected because an input channel which carries the current clock source is active, ASE_InvalidMode *may* be returned (this depends on the properties of the driver and/or hardware). Notes: Should *not* return ASE_NoClock if there is no clock signal present at the selected source; this will be inquired via ASIOGetSampleRate(). It should call the host callback procedure sampleRateHasChanged(), if the switch causes a sample rate change, or if no external clock is present at the selected source. */ ASIOError ASIOGetSamplePosition (ASIOSamples *sPos, ASIOTimeStamp *tStamp); /* Purpose: Inquires the sample position/time stamp pair. Parameter: sPos will hold the sample position on return. The sample position is reset to zero when ASIOStart() gets called. tStamp will hold the system time when the sample position was latched. Returns: If no input/output is present, ASE_NotPresent will be returned. If there is no clock, ASE_SPNotAdvancing will be returned. Notes: in order to be able to synchronise properly, the sample position / time stamp pair must refer to the current block, that is, the engine will call ASIOGetSamplePosition() in its bufferSwitch() callback and expect the time for the current block. thus, when requested in the very first bufferSwitch after ASIO_Start(), the sample position should be zero, and the time stamp should refer to the very time where the stream was started. it also means that the sample position must be block aligned. the driver must ensure proper interpolation if the system time can not be determined for the block position. the driver is responsible for precise time stamps as it usually has most direct access to lower level resources. proper behaviour of ASIO_GetSamplePosition() and ASIO_GetLatencies() are essential for precise media synchronization! */ typedef struct ASIOChannelInfo { long channel; // on input, channel index ASIOBool isInput; // on input ASIOBool isActive; // on exit long channelGroup; // dto ASIOSampleType type; // dto char name[32]; // dto } ASIOChannelInfo; ASIOError ASIOGetChannelInfo(ASIOChannelInfo *info); /* Purpose: retreive information about the nature of a channel Parameter: info: pointer to a ASIOChannelInfo structure with - channel: on input, the channel index of the channel in question. - isInput: on input, ASIOTrue if info for an input channel is requested, else output - channelGroup: on return, the channel group that the channel belongs to. For drivers which support different types of channels, like analog, S/PDIF, AES/EBU, ADAT etc interfaces, there should be a reasonable grouping of these types. Groups are always independant form a channel index, that is, a channel index always counts from 0 to numInputs/numOutputs regardless of the group it may belong to. There will always be at least one group (group 0). Please also note that by default, the host may decide to activate channels 0 and 1; thus, these should belong to the most useful type (analog i/o, if present). - type: on return, contains the sample type of the channel - isActive: on return, ASIOTrue if channel is active as it was installed by ASIOCreateBuffers(), ASIOFalse else - name: describing the type of channel in question. Used to allow for user selection, and enabling of specific channels. examples: "Analog In", "SPDIF Out" etc Returns: If no input/output is present ASE_NotPresent will be returned. Notes: If possible, the string should be organised such that the first characters are most significantly describing the nature of the port, to allow for identification even if the view showing the port name is too small to display more than 8 characters, for instance. */ //- - - - - - - - - - - - - - - - - - - - - - - - - // Buffer preparation //- - - - - - - - - - - - - - - - - - - - - - - - - typedef struct ASIOBufferInfo { ASIOBool isInput; // on input: ASIOTrue: input, else output long channelNum; // on input: channel index void *buffers[2]; // on output: double buffer addresses } ASIOBufferInfo; ASIOError ASIOCreateBuffers(ASIOBufferInfo *bufferInfos, long numChannels, long bufferSize, ASIOCallbacks *callbacks); /* Purpose: Allocates input/output buffers for all input and output channels to be activated. Parameter: bufferInfos is a pointer to an array of ASIOBufferInfo structures: - isInput: on input, ASIOTrue if the buffer is to be allocated for an input, output buffer else - channelNum: on input, the index of the channel in question (counting from 0) - buffers: on exit, 2 pointers to the halves of the channels' double-buffer. the size of the buffer(s) of course depend on both the ASIOSampleType as obtained from ASIOGetChannelInfo(), and bufferSize numChannels is the sum of all input and output channels to be created; thus bufferInfos is a pointer to an array of numChannels ASIOBufferInfo structures. bufferSize selects one of the possible buffer sizes as obtained from ASIOGetBufferSizes(). callbacks is a pointer to an ASIOCallbacks structure. Returns: If not enough memory is available ASE_NoMemory will be returned. If no input/output is present ASE_NotPresent will be returned. If bufferSize is not supported, or one or more of the bufferInfos elements contain invalid settings, ASE_InvalidMode will be returned. Notes: If individual channel selection is not possible but requested, the driver has to handle this. namely, bufferSwitch() will only have filled buffers of enabled outputs. If possible, processing and buss activities overhead should be avoided for channels which were not enabled here. */ ASIOError ASIODisposeBuffers(void); /* Purpose: Releases all buffers for the device. Parameter: None. Returns: If no buffer were ever prepared, ASE_InvalidMode will be returned. If no input/output is present ASE_NotPresent will be returned. Notes: This implies ASIOStop(). */ ASIOError ASIOControlPanel(void); /* Purpose: request the driver to start a control panel component for device specific user settings. This will not be accessed on some platforms (where the component is accessed instead). Parameter: None. Returns: If no panel is available ASE_NotPresent will be returned. Actually, the return code is ignored. Notes: if the user applied settings which require a re-configuration of parts or all of the enigine and/or driver (such as a change of the block size), the asioMessage callback can be used (see ASIO_Callbacks). */ ASIOError ASIOFuture(long selector, void *params); /* Purpose: various Parameter: selector: operation Code as to be defined. zero is reserved for testing purposes. params: depends on the selector; usually pointer to a structure for passing and retreiving any type and amount of parameters. Returns: the return value is also selector dependant. if the selector is unknown, ASE_InvalidParameter should be returned to prevent further calls with this selector. on success, ASE_SUCCESS must be returned (note: ASE_OK is *not* sufficient!) Notes: see selectors defined below. */ enum { kAsioEnableTimeCodeRead = 1, // no arguments kAsioDisableTimeCodeRead, // no arguments kAsioSetInputMonitor, // ASIOInputMonitor* in params kAsioTransport, // ASIOTransportParameters* in params kAsioSetInputGain, // ASIOChannelControls* in params, apply gain kAsioGetInputMeter, // ASIOChannelControls* in params, fill meter kAsioSetOutputGain, // ASIOChannelControls* in params, apply gain kAsioGetOutputMeter, // ASIOChannelControls* in params, fill meter kAsioCanInputMonitor, // no arguments for kAsioCanXXX selectors kAsioCanTimeInfo, kAsioCanTimeCode, kAsioCanTransport, kAsioCanInputGain, kAsioCanInputMeter, kAsioCanOutputGain, kAsioCanOutputMeter, // DSD support // The following extensions are required to allow switching // and control of the DSD subsystem. kAsioSetIoFormat = 0x23111961, /* ASIOIoFormat * in params. */ kAsioGetIoFormat = 0x23111983, /* ASIOIoFormat * in params. */ kAsioCanDoIoFormat = 0x23112004, /* ASIOIoFormat * in params. */ }; typedef struct ASIOInputMonitor { long input; // this input was set to monitor (or off), -1: all long output; // suggested output for monitoring the input (if so) long gain; // suggested gain, ranging 0 - 0x7fffffffL (-inf to +12 dB) ASIOBool state; // ASIOTrue => on, ASIOFalse => off long pan; // suggested pan, 0 => all left, 0x7fffffff => right } ASIOInputMonitor; typedef struct ASIOChannelControls { long channel; // on input, channel index ASIOBool isInput; // on input long gain; // on input, ranges 0 thru 0x7fffffff long meter; // on return, ranges 0 thru 0x7fffffff char future[32]; } ASIOChannelControls; typedef struct ASIOTransportParameters { long command; // see enum below ASIOSamples samplePosition; long track; long trackSwitches[16]; // 512 tracks on/off char future[64]; } ASIOTransportParameters; enum { kTransStart = 1, kTransStop, kTransLocate, // to samplePosition kTransPunchIn, kTransPunchOut, kTransArmOn, // track kTransArmOff, // track kTransMonitorOn, // track kTransMonitorOff, // track kTransArm, // trackSwitches kTransMonitor // trackSwitches }; /* // DSD support // Some notes on how to use ASIOIoFormatType. // // The caller will fill the format with the request types. // If the board can do the request then it will leave the // values unchanged. If the board does not support the // request then it will change that entry to Invalid (-1) // // So to request DSD then // // ASIOIoFormat NeedThis={kASIODSDFormat}; // // if(ASE_SUCCESS != ASIOFuture(kAsioSetIoFormat,&NeedThis) ){ // // If the board did not accept one of the parameters then the // // whole call will fail and the failing parameter will // // have had its value changes to -1. // } // // Note: Switching between the formats need to be done before the "prepared" // state (see ASIO 2 documentation) is entered. */ typedef long int ASIOIoFormatType; enum ASIOIoFormatType_e { kASIOFormatInvalid = -1, kASIOPCMFormat = 0, kASIODSDFormat = 1, }; typedef struct ASIOIoFormat_s { ASIOIoFormatType FormatType; char future[512-sizeof(ASIOIoFormatType)]; } ASIOIoFormat; ASIOError ASIOOutputReady(void); /* Purpose: this tells the driver that the host has completed processing the output buffers. if the data format required by the hardware differs from the supported asio formats, but the hardware buffers are DMA buffers, the driver will have to convert the audio stream data; as the bufferSwitch callback is usually issued at dma block switch time, the driver will have to convert the *previous* host buffer, which increases the output latency by one block. when the host finds out that ASIOOutputReady() returns true, it will issue this call whenever it completed output processing. then the driver can convert the host data directly to the dma buffer to be played next, reducing output latency by one block. another way to look at it is, that the buffer switch is called in order to pass the *input* stream to the host, so that it can process the input into the output, and the output stream is passed to the driver when the host has completed its process. Parameter: None Returns: only if the above mentioned scenario is given, and a reduction of output latency can be acheived by this mechanism, should ASE_OK be returned. otherwise (and usually), ASE_NotPresent should be returned in order to prevent further calls to this function. note that the host may want to determine if it is to use this when the system is not yet fully initialized, so ASE_OK should always be returned if the mechanism makes sense. Notes: please remeber to adjust ASIOGetLatencies() according to whether ASIOOutputReady() was ever called or not, if your driver supports this scenario. also note that the engine may fail to call ASIO_OutputReady() in time in overload cases. as already mentioned, bufferSwitch should be called for every block regardless of whether a block could be processed in time. */ // restore old alignment #if defined(_MSC_VER) && !defined(__MWERKS__) #pragma pack(pop) #elif PRAGMA_ALIGN_SUPPORTED #pragma options align = reset #endif #endif SndObj-2.6.7/src/asio/ASIOConvertSamples.cpp000644 000766 000024 00000034722 12062673766 021255 0ustar00victorstaff000000 000000 #include "ginclude.h" #include "ASIOConvertSamples.h" #include #if MAC #define TRUNCATE 0 #elif ASIO_CPU_X86 || ASIO_CPU_SPARC || ASIO_CPU_MIPS #define TRUNCATE 1 #undef MAXFLOAT #define MAXFLOAT 0x7fffff00L #endif ASIOConvertSamples::ASIOConvertSamples() { } //------------------------------------------------------------------------------------------- // mono void ASIOConvertSamples::convertMono8Unsigned(long *source, char *dest, long frames) { unsigned char *c = (unsigned char *)source; unsigned char a; dest--; while(--frames >= 0) { #if ASIO_LITTLE_ENDIAN a = c[3]; #else a = c[0]; #endif c += 4; a -= 0x80U; *++dest = a; } } void ASIOConvertSamples::convertMono8(long *source, char *dest, long frames) { char *c = (char *)source; char a; dest--; while(--frames >= 0) { #if ASIO_LITTLE_ENDIAN a = c[3]; #else a = c[0]; #endif c += 4; *++dest = a; } } void ASIOConvertSamples::convertMono16(long *source, short *dest, long frames) { #if ASIO_LITTLE_ENDIAN char* s = (char*)source; char* d = (char*)dest; while(--frames >= 0) { *d++ = s[3]; // dest big endian, msb first *d++ = s[2]; s += 4; } #else long l; source--; dest--; while(--frames >= 0) { l = *++source; *++dest = (short)(l >> 16); } #endif } void ASIOConvertSamples::convertMono24(long *source, char *dest, long frames) { // work with chars in order to prevent misalignments char *s = (char *)source; char a, b, c; dest--; while(--frames >= 0) { #if ASIO_LITTLE_ENDIAN a = s[3]; // msb b = s[2]; c = s[1]; // lsb #else a = s[0]; b = s[1]; c = s[2]; #endif s += 4; *++dest = a; // big endian, msb first *++dest = b; *++dest = c; } } // small endian void ASIOConvertSamples::convertMono16SmallEndian(long *source, short *dest, long frames) { char *s = (char *)source; char *d = (char *)dest; char a, b; d--; while(--frames >= 0) { #if ASIO_LITTLE_ENDIAN a = s[3]; b = s[2]; #else a = s[0]; b = s[1]; #endif s += 4; *++d = b; // dest small endian, lsb first *++d = a; } } void ASIOConvertSamples::convertMono24SmallEndian(long *source, char *dest, long frames) { // work with chars in order to prevent misalignments char *s = (char *)source; char a, b, c; dest--; while(--frames >= 0) { #if ASIO_LITTLE_ENDIAN a = s[3]; b = s[2]; c = s[1]; #else a = s[0]; b = s[1]; c = s[2]; #endif s += 4; *++dest = c; // lsb first *++dest = b; *++dest = a; } } //------------------------------------------------------------------------------------------- // stereo interleaved void ASIOConvertSamples::convertStereo8InterleavedUnsigned(long *left, long *right, char *dest, long frames) { unsigned char *cl = (unsigned char *)left; unsigned char *cr = (unsigned char *)right; unsigned char a, b; dest--; while(--frames >= 0) { #if ASIO_LITTLE_ENDIAN a = cl[3]; b = cr[3]; #else a = cl[0]; b = cr[0]; #endif cl += 4; cr += 4; a -= 0x80U; b -= 0x80U; *++dest = a; *++dest = b; } } void ASIOConvertSamples::convertStereo8Interleaved(long *left, long *right, char *dest, long frames) { unsigned char *cl = (unsigned char *)left; unsigned char *cr = (unsigned char *)right; unsigned char a, b; dest--; while(--frames >= 0) { #if ASIO_LITTLE_ENDIAN a = cl[3]; b = cr[3]; #else a = cl[0]; b = cr[0]; #endif cl += 4; cr += 4; *++dest = a; *++dest = b; } } void ASIOConvertSamples::convertStereo16Interleaved(long *left, long *right, short *dest, long frames) { #if ASIO_LITTLE_ENDIAN char* sl = (char*)left; char* sr = (char*)right; char* d = (char*)dest; while(--frames >= 0) { *d++ = sl[3]; // msb first *d++ = sl[2]; *d++ = sr[3]; *d++ = sr[2]; sl += 4; sr += 4; } #else long l, r; left--; right--; dest--; while(--frames >= 0) { l = *++left; r = *++right; *++dest = (short)(l >> 16); *++dest = (short)(r >> 16); } #endif } void ASIOConvertSamples::convertStereo24Interleaved(long *left, long *right, char *dest, long frames) { // work with chars in order to prevent misalignments char *sl = (char *)left; char *sr = (char *)right; char al, bl, cl, ar, br, cr; dest--; while(--frames >= 0) { #if ASIO_LITTLE_ENDIAN al = sl[3]; bl = sl[2]; cl = sl[1]; ar = sr[3]; br = sr[2]; cr = sr[1]; #else al = sl[0]; bl = sl[1]; cl = sl[2]; ar = sr[0]; br = sr[1]; cr = sr[2]; #endif sl += 4; sr += 4; *++dest = al; *++dest = bl; *++dest = cl; *++dest = ar; *++dest = br; *++dest = cr; } } void ASIOConvertSamples::convertStereo16InterleavedSmallEndian(long *left, long *right, short *dest, long frames) { char *sl = (char *)left; char *sr = (char *)right; char *d = (char *)dest; char al, bl, ar, br; d--; while(--frames >= 0) { #if ASIO_LITTLE_ENDIAN al = sl[3]; bl = sl[2]; ar = sr[3]; br = sr[2]; #else al = sl[0]; bl = sl[1]; ar = sr[0]; br = sr[1]; #endif sl += 4; sr += 4; *++d = bl; // lsb first *++d = al; *++d = br; *++d = ar; } } void ASIOConvertSamples::convertStereo24InterleavedSmallEndian(long *left, long *right, char *dest, long frames) { // work with chars in order to prevent misalignments char *sl = (char *)left; char *sr = (char *)right; char al, bl, cl, ar, br, cr; dest--; while(--frames >= 0) { #if ASIO_LITTLE_ENDIAN al = sl[3]; bl = sl[2]; cl = sl[1]; ar = sr[3]; br = sr[2]; cr = sr[1]; #else al = sl[0]; bl = sl[1]; cl = sl[2]; ar = sr[0]; br = sr[1]; cr = sr[2]; #endif sl += 4; sr += 4; *++dest = cl; *++dest = bl; *++dest = al; *++dest = cr; *++dest = br; *++dest = ar; } } //------------------------------------------------------------------------------------------- // stereo split void ASIOConvertSamples::convertStereo8Unsigned(long *left, long *right, char *dLeft, char *dRight, long frames) { unsigned char *cl = (unsigned char *)left; unsigned char *cr = (unsigned char *)right; unsigned char a, b; dLeft--; dRight--; while(--frames >= 0) { #if ASIO_LITTLE_ENDIAN a = cl[3]; b = cr[3]; #else a = cl[0]; b = cr[0]; #endif cl += 4; cr += 4; a -= 0x80U; b -= 0x80U; *++dLeft = a; *++dRight = b; } } void ASIOConvertSamples::convertStereo8(long *left, long *right, char *dLeft, char *dRight, long frames) { unsigned char *cl = (unsigned char *)left; unsigned char *cr = (unsigned char *)right; unsigned char a, b; dLeft--; dRight--; while(--frames >= 0) { #if ASIO_LITTLE_ENDIAN a = cl[3]; b = cr[3]; #else a = cl[0]; b = cr[0]; #endif cl += 4; cr += 4; *++dLeft = a; *++dRight = b; } } void ASIOConvertSamples::convertStereo16(long *left, long *right, short *dLeft, short *dRight, long frames) { #if ASIO_LITTLE_ENDIAN char* sl = (char*)left; char* sr = (char*)right; char* dl = (char*)dLeft; char* dr = (char*)dRight; while(--frames >= 0) { *dl++ = sl[3]; // msb first *dl++ = sl[2]; *dr++ = sr[3]; *dr++ = sr[2]; sl += 4; sr += 4; } #else long l, r; left--; right--; dLeft--; dRight--; while(--frames >= 0) { l = *++left; r = *++right; *++dLeft = (short)(l >> 16); *++dRight = (short)(r >> 16); } #endif } void ASIOConvertSamples::convertStereo24(long *left, long *right, char *dLeft, char *dRight, long frames) { // work with chars in order to prevent misalignments char *sl = (char *)left; char *sr = (char *)right; char al, bl, cl, ar, br, cr; dLeft--; dRight--; while(--frames >= 0) { #if ASIO_LITTLE_ENDIAN al = sl[3]; bl = sl[2]; cl = sl[1]; ar = sr[3]; br = sr[2]; cr = sr[1]; #else al = sl[0]; bl = sl[1]; cl = sl[2]; ar = sr[0]; br = sr[1]; cr = sr[2]; #endif sl += 4; sr += 4; *++dLeft = al; *++dLeft = bl; *++dLeft = cl; *++dRight = ar; *++dRight = br; *++dRight = cr; } } // small endian void ASIOConvertSamples::convertStereo16SmallEndian(long *left, long *right, short *dLeft, short *dRight, long frames) { char *sl = (char *)left; char *sr = (char *)right; char *dl = (char *)dLeft; char *dr = (char *)dRight; char al, bl, ar, br; dl--; dr--; while(--frames >= 0) { #if ASIO_LITTLE_ENDIAN al = sl[3]; bl = sl[2]; ar = sr[3]; br = sr[2]; #else al = sl[0]; bl = sl[1]; ar = sr[0]; br = sr[1]; #endif sl += 4; sr += 4; *++dl = bl; *++dl = al; *++dr = br; *++dr = ar; } } void ASIOConvertSamples::convertStereo24SmallEndian(long *left, long *right, char *dLeft, char *dRight, long frames) { // work with chars in order to prevent misalignments char *sl = (char *)left; char *sr = (char *)right; char al, bl, cl, ar, br, cr; dLeft--; dRight--; while(--frames >= 0) { #if ASIO_LITTLE_ENDIAN al = sl[3]; bl = sl[2]; cl = sl[1]; ar = sr[3]; br = sr[2]; cr = sr[1]; #else al = sl[0]; bl = sl[1]; cl = sl[2]; ar = sr[0]; br = sr[1]; cr = sr[2]; #endif sl += 4; sr += 4; *++dLeft = cl; *++dLeft = bl; *++dLeft = al; *++dRight = cr; *++dRight = br; *++dRight = ar; } } //------------------------------------------------------------------------------------------ // in place integer conversions void ASIOConvertSamples::int32msb16to16inPlace(long *in, long frames) { short *d1 = (short *)in; short* out = d1; #if ASIO_LITTLE_ENDIAN d1++; #endif while(--frames >= 0) { *out++ = *d1; d1 += 2; } } void ASIOConvertSamples::int32lsb16to16inPlace(long *in, long frames) { short *d1 = (short *)in; short* out = d1; #if !ASIO_LITTLE_ENDIAN d1++; #endif while(--frames >= 0) { *out++ = *d1; d1 += 2; } } void ASIOConvertSamples::int32msb16shiftedTo16inPlace(long *in, long frames, long shift) { short* out = (short*)in; while(--frames >= 0) *out++ = (short)(*in++ >> shift); } void ASIOConvertSamples::int24msbto16inPlace(unsigned char *in, long frames) { short a; short* out = (short*)in; while(--frames >= 0) { #if ASIO_LITTLE_ENDIAN a = (short)in[2]; a <<= 8; a |= (in[1] & 0xff); #else a = (short)in[0]; a <<= 8; a |= (in[1] & 0xff); #endif *out++ = a; in += 3; } } //----------------------------------------------------------------------------------------- void ASIOConvertSamples::shift32(void* buffer, long shiftAmount, long targetByteWidth, bool revertEndian, long sampleFrames) { long a; long frames = sampleFrames; long* source = (long*)buffer; if(revertEndian) { reverseEndian(buffer, 4, sampleFrames); revertEndian = false; } if(targetByteWidth == 2) { short* dest = (short*)buffer; short* al = (short*)&a; #if ASIO_LITTLE_ENDIAN al++; #endif while(--frames >= 0) { a = *source++; a <<= shiftAmount; *dest++ = *al; } } else if(targetByteWidth == 3) { char* dest = (char*)buffer; long* source = (long*)buffer; char* aa = (char*)&a; while(--frames >= 0) { a = *source++; a <<= shiftAmount; #if ASIO_LITTLE_ENDIAN dest[0] = aa[1]; // lsb dest[1] = aa[2]; dest[2] = aa[3]; // msb #else dest[0] = aa[0]; // msb dest[1] = aa[1]; dest[2] = aa[2]; // lsb #endif dest += 3; } } else if(targetByteWidth == 4) { long* dest = source; while(--frames >= 0) *dest++ = *source++ << shiftAmount; } } void ASIOConvertSamples::reverseEndian(void* buffer, long byteWidth, long frames) { char* a = (char*)buffer; char* b = a; char c; if(byteWidth == 2) { while(--frames >= 0) { c = a[0]; a[0] = a[1]; a[1] = c; a += 2; } } else if(byteWidth == 3) { while(--frames >= 0) { c = a[0]; a[0] = a[2]; a[2] = c; a += 3; } } else if(byteWidth == 4) { while(--frames >= 0) { c = a[0]; a[0] = a[3]; a[3] = c; c = a[1]; a[1] = a[2]; a[2] = c; a += 4; } } } //------------------------------------------------------------------------------------------------- void ASIOConvertSamples::int32to16inPlace(void* buffer, long frames) { short* in = (short*)buffer; short* out = in; #if ASIO_LITTLE_ENDIAN in++; #endif while(--frames >= 0) { *out++ = *in; in += 2; } } void ASIOConvertSamples::int24to16inPlace(void* buffer, long frames) { char* from = (char*)buffer; char* to = from; while(--frames >= 0) { #if ASIO_LITTLE_ENDIAN to[0] = from[1]; to[1] = from[2]; #else to[0] = from[0]; to[1] = from[1]; #endif from += 3; to += 2; } } void ASIOConvertSamples::int32to24inPlace(void* buffer, long frames) { long* in = (long*)buffer; char* out = (char*)buffer; long a; while(--frames >= 0) { a = *in++; a >>= 8; // 32->24 #if ASIO_LITTLE_ENDIAN out[0] = (char)a; // lsb a >>= 8; out[1] = (char)a; a >>= 8; out[2] = (char)a; #else out[2] = (char)a; // lsb a >>= 8; out[1] = (char)a; a >>= 8; out[0] = (char)a; #endif out += 3; } } void ASIOConvertSamples::int16to24inPlace(void* buffer, long frames) { char* in = (char*)buffer; char* out = (char*)buffer; in += frames * 2; out += frames * 3; while(--frames >= 0) { out -= 3; in -= 2; #if ASIO_LITTLE_ENDIAN out[2] = in[1]; // msb out[1] = in[0]; // lsb out[0] = 0; #else out[2] = 0; out[1] = in[1]; // lsb out[0] = in[0]; // msb #endif } } void ASIOConvertSamples::int24to32inPlace(void* buffer, long frames) { long a, b, c; char* in = (char*)buffer; long* out = (long*)buffer; in += (frames * 3); out += frames; while(--frames >= 0) { #if ASIO_LITTLE_ENDIAN a = (long)in[-1]; // msb b = (long)in[-2]; c = (long)in[-3]; #else a = (long)in[-3]; // msb b = (long)in[-2]; c = (long)in[-1]; #endif a <<= 24; b <<= 16; b &= 0x00ff0000; a |= b; c <<= 8; c &= 0x0000ff00; a |= c; *--out = a; in -= 3; } } void ASIOConvertSamples::int16to32inPlace(void* buffer, long frames) { short* in = (short*)buffer; long* out = (long*)buffer; in += frames; out += frames; while(--frames >= 0) *--out = ((long)(*--in)) << 16; } //------------------------------------------------------------------------------------------ // float to int const double fScaler16 = (double)0x7fffL; const double fScaler24 = (double)0x7fffffL; const double fScaler32 = (double)0x7fffffffL; void ASIOConvertSamples::float32toInt16inPlace(float* buffer, long frames) { double sc = fScaler16 + .49999; short* b = (short*)buffer; while(--frames >= 0) *b++ = (short)((double)(*buffer++) * sc); } void ASIOConvertSamples::float32toInt24inPlace(float* buffer, long frames) { double sc = fScaler24 + .49999; long a; char* b = (char*)buffer; char* aa = (char*)&a; while(--frames >= 0) { a = (long)((double)(*buffer++) * sc); #if ASIO_LITTLE_ENDIAN *b++ = aa[3]; *b++ = aa[2]; *b++ = aa[1]; #else *b++ = aa[1]; *b++ = aa[2]; *b++ = aa[3]; #endif } } void ASIOConvertSamples::float32toInt32inPlace(float* buffer, long frames) { double sc = fScaler32 + .49999; long* b = (long*)buffer; while(--frames >= 0) *b++ = (long)((double)(*buffer++) * sc); } SndObj-2.6.7/src/asio/ASIOConvertSamples.h000644 000766 000024 00000005217 12062673766 020717 0ustar00victorstaff000000 000000 #ifndef __ASIOConvertSamples__ #define __ASIOConvertSamples__ class ASIOConvertSamples { public: ASIOConvertSamples(); ~ASIOConvertSamples() {} // format converters, input 32 bit integer // mono void convertMono8(long *source, char *dest, long frames); void convertMono8Unsigned(long *source, char *dest, long frames); void convertMono16(long *source, short *dest, long frames); void convertMono16SmallEndian(long *source, short *dest, long frames); void convertMono24(long *source, char *dest, long frames); void convertMono24SmallEndian(long *source, char *dest, long frames); // stereo interleaved void convertStereo8Interleaved(long *left, long *right, char *dest, long frames); void convertStereo8InterleavedUnsigned(long *left, long *right, char *dest, long frames); void convertStereo16Interleaved(long *left, long *right, short *dest, long frames); void convertStereo16InterleavedSmallEndian(long *left, long *right, short *dest, long frames); void convertStereo24Interleaved(long *left, long *right, char *dest, long frames); void convertStereo24InterleavedSmallEndian(long *left, long *right, char *dest, long frames); // stereo split void convertStereo8(long *left, long *right, char *dLeft, char *dRight, long frames); void convertStereo8Unsigned(long *left, long *right, char *dLeft, char *dRight, long frames); void convertStereo16(long *left, long *right, short *dLeft, short *dRight, long frames); void convertStereo16SmallEndian(long *left, long *right, short *dLeft, short *dRight, long frames); void convertStereo24(long *left, long *right, char *dLeft, char *dRight, long frames); void convertStereo24SmallEndian(long *left, long *right, char *dLeft, char *dRight, long frames); // integer in place conversions void int32msb16to16inPlace(long *in, long frames); void int32lsb16to16inPlace(long *in, long frames); void int32msb16shiftedTo16inPlace(long *in1, long frames, long shift); void int24msbto16inPlace(unsigned char *in, long frames); // integer to integer void shift32(void* buffer, long shiftAmount, long targetByteWidth, bool reverseEndian, long frames); void reverseEndian(void* buffer, long byteWidth, long frames); void int32to16inPlace(void* buffer, long frames); void int24to16inPlace(void* buffer, long frames); void int32to24inPlace(void* buffer, long frames); void int16to24inPlace(void* buffer, long frames); void int24to32inPlace(void* buffer, long frames); void int16to32inPlace(void* buffer, long frames); // float to integer void float32toInt16inPlace(float* buffer, long frames); void float32toInt24inPlace(float* buffer, long frames); void float32toInt32inPlace(float* buffer, long frames); }; #endif SndObj-2.6.7/src/asio/asiodrivers.cpp000644 000766 000024 00000006250 12062673766 020161 0ustar00victorstaff000000 000000 #include #include "asiodrivers.h" AsioDrivers* asioDrivers = 0; bool loadAsioDriver(char *name); bool loadAsioDriver(char *name) { if(!asioDrivers) asioDrivers = new AsioDrivers(); if(asioDrivers) return asioDrivers->loadDriver(name); return false; } //------------------------------------------------------------------------------------ #if MAC bool resolveASIO(unsigned long aconnID); AsioDrivers::AsioDrivers() : CodeFragments("ASIO Drivers", 'AsDr', 'Asio') { connID = -1; curIndex = -1; } AsioDrivers::~AsioDrivers() { removeCurrentDriver(); } bool AsioDrivers::getCurrentDriverName(char *name) { if(curIndex >= 0) return getName(curIndex, name); return false; } long AsioDrivers::getDriverNames(char **names, long maxDrivers) { for(long i = 0; i < getNumFragments() && i < maxDrivers; i++) getName(i, names[i]); return getNumFragments() < maxDrivers ? getNumFragments() : maxDrivers; } bool AsioDrivers::loadDriver(char *name) { char dname[64]; unsigned long newID; for(long i = 0; i < getNumFragments(); i++) { if(getName(i, dname) && !strcmp(name, dname)) { if(newInstance(i, &newID)) { if(resolveASIO(newID)) { if(connID != -1) removeInstance(curIndex, connID); curIndex = i; connID = newID; return true; } } break; } } return false; } void AsioDrivers::removeCurrentDriver() { if(connID != -1) removeInstance(curIndex, connID); connID = -1; curIndex = -1; } //------------------------------------------------------------------------------------ #elif WINDOWS #include "iasiodrv.h" extern IASIO* theAsioDriver; AsioDrivers::AsioDrivers() : AsioDriverList() { curIndex = -1; } AsioDrivers::~AsioDrivers() { } bool AsioDrivers::getCurrentDriverName(char *name) { if(curIndex >= 0) return asioGetDriverName(curIndex, name, 32) == 0 ? true : false; name[0] = 0; return false; } long AsioDrivers::getDriverNames(char **names, long maxDrivers) { for(long i = 0; i < asioGetNumDev() && i < maxDrivers; i++) asioGetDriverName(i, names[i], 32); return asioGetNumDev() < maxDrivers ? asioGetNumDev() : maxDrivers; } bool AsioDrivers::loadDriver(char *name) { char dname[64]; char curName[64]; for(long i = 0; i < asioGetNumDev(); i++) { if(!asioGetDriverName(i, dname, 32) && !strcmp(name, dname)) { curName[0] = 0; getCurrentDriverName(curName); // in case we fail... removeCurrentDriver(); if(!asioOpenDriver(i, (void **)&theAsioDriver)) { curIndex = i; return true; } else { theAsioDriver = 0; if(curName[0] && strcmp(dname, curName)) loadDriver(curName); // try restore } break; } } return false; } void AsioDrivers::removeCurrentDriver() { if(curIndex != -1) asioCloseDriver(curIndex); curIndex = -1; } #elif SGI || BEOS #include "asiolist.h" AsioDrivers::AsioDrivers() : AsioDriverList() { curIndex = -1; } AsioDrivers::~AsioDrivers() { } bool AsioDrivers::getCurrentDriverName(char *name) { return false; } long AsioDrivers::getDriverNames(char **names, long maxDrivers) { return 0; } bool AsioDrivers::loadDriver(char *name) { return false; } void AsioDrivers::removeCurrentDriver() { } #else #error implement me #endif SndObj-2.6.7/src/asio/asiodrivers.h000644 000766 000024 00000001246 12062673766 017626 0ustar00victorstaff000000 000000 #ifndef __AsioDrivers__ #define __AsioDrivers__ #include "ginclude.h" #if MAC #include "CodeFragments.hpp" class AsioDrivers : public CodeFragments #elif WINDOWS #include #include "asiolist.h" class AsioDrivers : public AsioDriverList #elif SGI || BEOS #include "asiolist.h" class AsioDrivers : public AsioDriverList #else #error implement me #endif { public: AsioDrivers(); ~AsioDrivers(); bool getCurrentDriverName(char *name); long getDriverNames(char **names, long maxDrivers); bool loadDriver(char *name); void removeCurrentDriver(); long getCurrentDriverIndex() {return curIndex;} protected: unsigned long connID; long curIndex; }; #endif SndObj-2.6.7/src/asio/asiodrvr.h000644 000766 000024 00000004216 12062673766 017125 0ustar00victorstaff000000 000000 /* Steinberg Audio Stream I/O API (c) 1996, Steinberg Soft- und Hardware GmbH charlie (May 1996) asiodrvr.h c++ superclass to implement asio functionality. from this, you can derive whatever required */ #ifndef _asiodrvr_ #define _asiodrvr_ // cpu and os system we are running on #include "asiosys.h" // basic "C" interface #include "asio.h" class AsioDriver; extern AsioDriver *getDriver(); // for generic constructor #if WINDOWS #include #include "combase.h" #include "iasiodrv.h" class AsioDriver : public IASIO ,public CUnknown { public: AsioDriver(LPUNKNOWN pUnk, HRESULT *phr); DECLARE_IUNKNOWN // Factory method static CUnknown *CreateInstance(LPUNKNOWN pUnk, HRESULT *phr); // IUnknown virtual HRESULT STDMETHODCALLTYPE NonDelegatingQueryInterface(REFIID riid,void **ppvObject); #else class AsioDriver { public: AsioDriver(); #endif virtual ~AsioDriver(); virtual ASIOBool init(void* sysRef); virtual void getDriverName(char *name); // max 32 bytes incl. terminating zero virtual long getDriverVersion(); virtual void getErrorMessage(char *string); // max 124 bytes incl. virtual ASIOError start(); virtual ASIOError stop(); virtual ASIOError getChannels(long *numInputChannels, long *numOutputChannels); virtual ASIOError getLatencies(long *inputLatency, long *outputLatency); virtual ASIOError getBufferSize(long *minSize, long *maxSize, long *preferredSize, long *granularity); virtual ASIOError canSampleRate(ASIOSampleRate sampleRate); virtual ASIOError getSampleRate(ASIOSampleRate *sampleRate); virtual ASIOError setSampleRate(ASIOSampleRate sampleRate); virtual ASIOError getClockSources(ASIOClockSource *clocks, long *numSources); virtual ASIOError setClockSource(long reference); virtual ASIOError getSamplePosition(ASIOSamples *sPos, ASIOTimeStamp *tStamp); virtual ASIOError getChannelInfo(ASIOChannelInfo *info); virtual ASIOError createBuffers(ASIOBufferInfo *bufferInfos, long numChannels, long bufferSize, ASIOCallbacks *callbacks); virtual ASIOError disposeBuffers(); virtual ASIOError controlPanel(); virtual ASIOError future(long selector, void *opt); virtual ASIOError outputReady(); }; #endif SndObj-2.6.7/src/asio/asiolist.cpp000644 000766 000024 00000014534 12062673766 017462 0ustar00victorstaff000000 000000 #include #include "iasiodrv.h" #include "asiolist.h" #define ASIODRV_DESC "description" #define INPROC_SERVER "InprocServer32" #define ASIO_PATH "software\\asio" #define COM_CLSID "clsid" // ****************************************************************** // Local Functions // ****************************************************************** static LONG findDrvPath (char *clsidstr,char *dllpath,int dllpathsize) { HKEY hkEnum,hksub,hkpath; char databuf[512]; LONG cr,rc = -1; DWORD datatype,datasize; DWORD index; OFSTRUCT ofs; HFILE hfile; BOOL found = FALSE; CharLowerBuff(clsidstr,strlen(clsidstr)); if ((cr = RegOpenKey(HKEY_CLASSES_ROOT,COM_CLSID,&hkEnum)) == ERROR_SUCCESS) { index = 0; while (cr == ERROR_SUCCESS && !found) { cr = RegEnumKey(hkEnum,index++,(LPTSTR)databuf,512); if (cr == ERROR_SUCCESS) { CharLowerBuff(databuf,strlen(databuf)); if (!(strcmp(databuf,clsidstr))) { if ((cr = RegOpenKeyEx(hkEnum,(LPCTSTR)databuf,0,KEY_READ,&hksub)) == ERROR_SUCCESS) { if ((cr = RegOpenKeyEx(hksub,(LPCTSTR)INPROC_SERVER,0,KEY_READ,&hkpath)) == ERROR_SUCCESS) { datatype = REG_SZ; datasize = (DWORD)dllpathsize; cr = RegQueryValueEx(hkpath,0,0,&datatype,(LPBYTE)dllpath,&datasize); if (cr == ERROR_SUCCESS) { memset(&ofs,0,sizeof(OFSTRUCT)); ofs.cBytes = sizeof(OFSTRUCT); hfile = OpenFile(dllpath,&ofs,OF_EXIST); if (hfile) rc = 0; } RegCloseKey(hkpath); } RegCloseKey(hksub); } found = TRUE; // break out } } } RegCloseKey(hkEnum); } return rc; } static LPASIODRVSTRUCT newDrvStruct (HKEY hkey,char *keyname,int drvID,LPASIODRVSTRUCT lpdrv) { HKEY hksub; char databuf[256]; char dllpath[MAXPATHLEN]; WORD wData[100]; CLSID clsid; DWORD datatype,datasize; LONG cr,rc; if (!lpdrv) { if ((cr = RegOpenKeyEx(hkey,(LPCTSTR)keyname,0,KEY_READ,&hksub)) == ERROR_SUCCESS) { datatype = REG_SZ; datasize = 256; cr = RegQueryValueEx(hksub,COM_CLSID,0,&datatype,(LPBYTE)databuf,&datasize); if (cr == ERROR_SUCCESS) { rc = findDrvPath (databuf,dllpath,MAXPATHLEN); if (rc == 0) { lpdrv = new ASIODRVSTRUCT[1]; if (lpdrv) { memset(lpdrv,0,sizeof(ASIODRVSTRUCT)); lpdrv->drvID = drvID; MultiByteToWideChar(CP_ACP,0,(LPCSTR)databuf,-1,(LPWSTR)wData,100); if ((cr = CLSIDFromString((LPOLESTR)wData,(LPCLSID)&clsid)) == S_OK) { memcpy(&lpdrv->clsid,&clsid,sizeof(CLSID)); } datatype = REG_SZ; datasize = 256; cr = RegQueryValueEx(hksub,ASIODRV_DESC,0,&datatype,(LPBYTE)databuf,&datasize); if (cr == ERROR_SUCCESS) { strcpy(lpdrv->drvname,databuf); } else strcpy(lpdrv->drvname,keyname); } } } RegCloseKey(hksub); } } else lpdrv->next = newDrvStruct(hkey,keyname,drvID+1,lpdrv->next); return lpdrv; } static void deleteDrvStruct (LPASIODRVSTRUCT lpdrv) { IASIO *iasio; if (lpdrv != 0) { deleteDrvStruct(lpdrv->next); if (lpdrv->asiodrv) { iasio = (IASIO *)lpdrv->asiodrv; iasio->Release(); } delete lpdrv; } } static LPASIODRVSTRUCT getDrvStruct (int drvID,LPASIODRVSTRUCT lpdrv) { while (lpdrv) { if (lpdrv->drvID == drvID) return lpdrv; lpdrv = lpdrv->next; } return 0; } // ****************************************************************** // ****************************************************************** // AsioDriverList // ****************************************************************** AsioDriverList::AsioDriverList () { HKEY hkEnum = 0; char keyname[MAXDRVNAMELEN]; LPASIODRVSTRUCT pdl; LONG cr; DWORD index = 0; BOOL fin = FALSE; numdrv = 0; lpdrvlist = 0; cr = RegOpenKey(HKEY_LOCAL_MACHINE,ASIO_PATH,&hkEnum); while (cr == ERROR_SUCCESS) { if ((cr = RegEnumKey(hkEnum,index++,(LPTSTR)keyname,MAXDRVNAMELEN))== ERROR_SUCCESS) { lpdrvlist = newDrvStruct (hkEnum,keyname,0,lpdrvlist); } else fin = TRUE; } if (hkEnum) RegCloseKey(hkEnum); pdl = lpdrvlist; while (pdl) { numdrv++; pdl = pdl->next; } if (numdrv) CoInitialize(0); // initialize COM } AsioDriverList::~AsioDriverList () { if (numdrv) { deleteDrvStruct(lpdrvlist); CoUninitialize(); } } LONG AsioDriverList::asioGetNumDev (VOID) { return (LONG)numdrv; } LONG AsioDriverList::asioOpenDriver (int drvID,LPVOID *asiodrv) { LPASIODRVSTRUCT lpdrv = 0; long rc; if (!asiodrv) return DRVERR_INVALID_PARAM; if ((lpdrv = getDrvStruct(drvID,lpdrvlist)) != 0) { if (!lpdrv->asiodrv) { rc = CoCreateInstance(lpdrv->clsid,0,CLSCTX_INPROC_SERVER,lpdrv->clsid,asiodrv); if (rc == S_OK) { lpdrv->asiodrv = *asiodrv; return 0; } // else if (rc == REGDB_E_CLASSNOTREG) // strcpy (info->messageText, "Driver not registered in the Registration Database!"); } else rc = DRVERR_DEVICE_ALREADY_OPEN; } else rc = DRVERR_DEVICE_NOT_FOUND; return rc; } LONG AsioDriverList::asioCloseDriver (int drvID) { LPASIODRVSTRUCT lpdrv = 0; IASIO *iasio; if ((lpdrv = getDrvStruct(drvID,lpdrvlist)) != 0) { if (lpdrv->asiodrv) { iasio = (IASIO *)lpdrv->asiodrv; iasio->Release(); lpdrv->asiodrv = 0; } } return 0; } LONG AsioDriverList::asioGetDriverName (int drvID,char *drvname,int drvnamesize) { LPASIODRVSTRUCT lpdrv = 0; if (!drvname) return DRVERR_INVALID_PARAM; if ((lpdrv = getDrvStruct(drvID,lpdrvlist)) != 0) { if (strlen(lpdrv->drvname) < (unsigned int)drvnamesize) { strcpy(drvname,lpdrv->drvname); } else { memcpy(drvname,lpdrv->drvname,drvnamesize-4); drvname[drvnamesize-4] = '.'; drvname[drvnamesize-3] = '.'; drvname[drvnamesize-2] = '.'; drvname[drvnamesize-1] = 0; } return 0; } return DRVERR_DEVICE_NOT_FOUND; } LONG AsioDriverList::asioGetDriverPath (int drvID,char *dllpath,int dllpathsize) { LPASIODRVSTRUCT lpdrv = 0; if (!dllpath) return DRVERR_INVALID_PARAM; if ((lpdrv = getDrvStruct(drvID,lpdrvlist)) != 0) { if (strlen(lpdrv->dllpath) < (unsigned int)dllpathsize) { strcpy(dllpath,lpdrv->dllpath); return 0; } dllpath[0] = 0; return DRVERR_INVALID_PARAM; } return DRVERR_DEVICE_NOT_FOUND; } LONG AsioDriverList::asioGetDriverCLSID (int drvID,CLSID *clsid) { LPASIODRVSTRUCT lpdrv = 0; if (!clsid) return DRVERR_INVALID_PARAM; if ((lpdrv = getDrvStruct(drvID,lpdrvlist)) != 0) { memcpy(clsid,&lpdrv->clsid,sizeof(CLSID)); return 0; } return DRVERR_DEVICE_NOT_FOUND; } SndObj-2.6.7/src/asio/asiolist.h000644 000766 000024 00000001664 12062673766 017127 0ustar00victorstaff000000 000000 #ifndef __asiolist__ #define __asiolist__ #define DRVERR -5000 #define DRVERR_INVALID_PARAM DRVERR-1 #define DRVERR_DEVICE_ALREADY_OPEN DRVERR-2 #define DRVERR_DEVICE_NOT_FOUND DRVERR-3 #define MAXPATHLEN 512 #define MAXDRVNAMELEN 128 struct asiodrvstruct { int drvID; CLSID clsid; char dllpath[MAXPATHLEN]; char drvname[MAXDRVNAMELEN]; LPVOID asiodrv; struct asiodrvstruct *next; }; typedef struct asiodrvstruct ASIODRVSTRUCT; typedef ASIODRVSTRUCT *LPASIODRVSTRUCT; class AsioDriverList { public: AsioDriverList(); ~AsioDriverList(); LONG asioOpenDriver (int,VOID **); LONG asioCloseDriver (int); // nice to have LONG asioGetNumDev (VOID); LONG asioGetDriverName (int,char *,int); LONG asioGetDriverPath (int,char *,int); LONG asioGetDriverCLSID (int,CLSID *); // or use directly access LPASIODRVSTRUCT lpdrvlist; int numdrv; }; typedef class AsioDriverList *LPASIODRIVERLIST; #endif SndObj-2.6.7/src/asio/asiosys.h000644 000766 000024 00000002430 12062673766 016762 0ustar00victorstaff000000 000000 #ifndef __asiosys__ #define __asiosys__ #if defined(_WIN32) || defined(_WIN64) #undef MAC #define PPC 0 #define WINDOWS 1 #define SGI 0 #define SUN 0 #define LINUX 0 #define BEOS 0 #define NATIVE_INT64 0 #define IEEE754_64FLOAT 1 #elif BEOS #define MAC 0 #define PPC 0 #define WINDOWS 0 #define PC 0 #define SGI 0 #define SUN 0 #define LINUX 0 #define NATIVE_INT64 0 #define IEEE754_64FLOAT 1 #ifndef DEBUG #define DEBUG 0 #if DEBUG void DEBUGGERMESSAGE(char *string); #else #define DEBUGGERMESSAGE(a) #endif #endif #elif SGI #define MAC 0 #define PPC 0 #define WINDOWS 0 #define PC 0 #define SUN 0 #define LINUX 0 #define BEOS 0 #define NATIVE_INT64 0 #define IEEE754_64FLOAT 1 #ifndef DEBUG #define DEBUG 0 #if DEBUG void DEBUGGERMESSAGE(char *string); #else #define DEBUGGERMESSAGE(a) #endif #endif #else // MAC #define MAC 1 #define PPC 1 #define WINDOWS 0 #define PC 0 #define SGI 0 #define SUN 0 #define LINUX 0 #define BEOS 0 #define NATIVE_INT64 0 #define IEEE754_64FLOAT 1 #ifndef DEBUG #define DEBUG 0 #if DEBUG void DEBUGGERMESSAGE(char *string); #else #define DEBUGGERMESSAGE(a) #endif #endif #endif #endif SndObj-2.6.7/src/asio/combase.h000644 000766 000024 00000022514 12062673766 016706 0ustar00victorstaff000000 000000 //==========================================================================; // // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY // KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR // PURPOSE. // // Copyright (c) 1992 - 1996 Microsoft Corporation. All Rights Reserved. // //--------------------------------------------------------------------------; // Base class hierachy for creating COM objects, December 1994 /* a. Derive your COM object from CUnknown b. Make a static CreateInstance function that takes an LPUNKNOWN, an HRESULT * and a TCHAR *. The LPUNKNOWN defines the object to delegate IUnknown calls to. The HRESULT * allows error codes to be passed around constructors and the TCHAR * is a descriptive name that can be printed on the debugger. It is important that constructors only change the HRESULT * if they have to set an ERROR code, if it was successful then leave it alone or you may overwrite an error code from an object previously created. When you call a constructor the descriptive name should be in static store as we do not copy the string. To stop large amounts of memory being used in retail builds by all these static strings use the NAME macro, CMyFilter = new CImplFilter(NAME("My filter"),pUnknown,phr); if (FAILED(hr)) { return hr; } In retail builds NAME(_x_) compiles to NULL, the base CBaseObject class knows not to do anything with objects that don't have a name. c. Have a constructor for your object that passes the LPUNKNOWN, HRESULT * and TCHAR * to the CUnknown constructor. You can set the HRESULT if you have an error, or just simply pass it through to the constructor. The object creation will fail in the class factory if the HRESULT indicates an error (ie FAILED(HRESULT) == TRUE) d. Create a FactoryTemplate with your object's class id and CreateInstance function. Then (for each interface) either Multiple inheritance 1. Also derive it from ISomeInterface 2. Include DECLARE_IUNKNOWN in your class definition to declare implementations of QueryInterface, AddRef and Release that call the outer unknown 3. Override NonDelegatingQueryInterface to expose ISomeInterface by code something like if (riid == IID_ISomeInterface) { return GetInterface((ISomeInterface *) this, ppv); } else { return CUnknown::NonDelegatingQueryInterface(riid, ppv); } 4. Declare and implement the member functions of ISomeInterface. or: Nested interfaces 1. Declare a class derived from CUnknown 2. Include DECLARE_IUNKNOWN in your class definition 3. Override NonDelegatingQueryInterface to expose ISomeInterface by code something like if (riid == IID_ISomeInterface) { return GetInterface((ISomeInterface *) this, ppv); } else { return CUnknown::NonDelegatingQueryInterface(riid, ppv); } 4. Implement the member functions of ISomeInterface. Use GetOwner() to access the COM object class. And in your COM object class: 5. Make the nested class a friend of the COM object class, and declare an instance of the nested class as a member of the COM object class. NOTE that because you must always pass the outer unknown and an hResult to the CUnknown constructor you cannot use a default constructor, in other words you will have to make the member variable a pointer to the class and make a NEW call in your constructor to actually create it. 6. override the NonDelegatingQueryInterface with code like this: if (riid == IID_ISomeInterface) { return m_pImplFilter-> NonDelegatingQueryInterface(IID_ISomeInterface, ppv); } else { return CUnknown::NonDelegatingQueryInterface(riid, ppv); } You can have mixed classes which support some interfaces via multiple inheritance and some via nested classes */ #ifndef __COMBASE__ #define __COMBASE__ /* The DLLENTRY module initialises the module handle on loading */ extern HINSTANCE g_hInst; /* On DLL load remember which platform we are running on */ extern DWORD g_amPlatform; extern OSVERSIONINFO g_osInfo; // Filled in by GetVersionEx /* Version of IUnknown that is renamed to allow a class to support both non delegating and delegating IUnknowns in the same COM object */ DECLARE_INTERFACE(INonDelegatingUnknown) { STDMETHOD(NonDelegatingQueryInterface) (THIS_ REFIID, LPVOID *) PURE; STDMETHOD_(ULONG, NonDelegatingAddRef)(THIS) PURE; STDMETHOD_(ULONG, NonDelegatingRelease)(THIS) PURE; }; typedef INonDelegatingUnknown *PNDUNKNOWN; /* This is the base object class that supports active object counting. As part of the debug facilities we trace every time a C++ object is created or destroyed. The name of the object has to be passed up through the class derivation list during construction as you cannot call virtual functions in the constructor. The downside of all this is that every single object constructor has to take an object name parameter that describes it */ class CBaseObject { private: // Disable the copy constructor and assignment by default so you will get // compiler errors instead of unexpected behaviour if you pass objects // by value or assign objects. CBaseObject(const CBaseObject& objectSrc); // no implementation void operator=(const CBaseObject& objectSrc); // no implementation private: static LONG m_cObjects; /* Total number of objects active */ protected: #ifdef DEBUG DWORD m_dwCookie; /* Cookie identifying this object */ #endif public: /* These increment and decrement the number of active objects */ CBaseObject(TCHAR *pName); ~CBaseObject(); /* Call this to find if there are any CUnknown derived objects active */ static LONG ObjectsActive() { return m_cObjects; }; }; /* An object that supports one or more COM interfaces will be based on this class. It supports counting of total objects for DLLCanUnloadNow support, and an implementation of the core non delegating IUnknown */ class CUnknown : public INonDelegatingUnknown, public CBaseObject { private: const LPUNKNOWN m_pUnknown; /* Owner of this object */ protected: /* So we can override NonDelegatingRelease() */ volatile LONG m_cRef; /* Number of reference counts */ public: CUnknown(TCHAR *pName, LPUNKNOWN pUnk, HRESULT *phr); virtual ~CUnknown() {}; /* Return the owner of this object */ LPUNKNOWN GetOwner() const { return m_pUnknown; }; /* Called from the class factory to create a new instance, it is pure virtual so it must be overriden in your derived class */ /* static CUnknown *CreateInstance(LPUNKNOWN, HRESULT *) */ /* Non delegating unknown implementation */ STDMETHODIMP NonDelegatingQueryInterface(REFIID, void **); STDMETHODIMP_(ULONG) NonDelegatingAddRef(); STDMETHODIMP_(ULONG) NonDelegatingRelease(); /* Return an interface pointer to a requesting client performing a thread safe AddRef as necessary */ HRESULT GetInterface(LPUNKNOWN pUnk, void **ppv); }; #if WINVER < 0x0501 /* The standard InterlockedXXX functions won't take volatiles */ static inline LONG InterlockedIncrement( volatile LONG * plong ) { return InterlockedIncrement( const_cast( plong ) ); } static inline LONG InterlockedDecrement( volatile LONG * plong ) { return InterlockedDecrement( const_cast( plong ) ); } static inline LONG InterlockedExchange( volatile LONG * plong, LONG new_value ) { return InterlockedExchange( const_cast( plong ), new_value ); } #endif /* A function that can create a new COM object */ typedef CUnknown *(*LPFNNewCOMObject)(LPUNKNOWN pUnkOuter, HRESULT *phr); /* A function (can be NULL) which is called from the DLL entrypoint routine for each factory template: bLoading - TRUE on DLL load, FALSE on DLL unload rclsid - the m_ClsID of the entry */ typedef void (*LPFNInitRoutine)(BOOL bLoading, const CLSID *rclsid); /* Create one of these per object class in an array so that the default class factory code can create new instances */ class CFactoryTemplate { public: const WCHAR *m_Name; const CLSID *m_ClsID; LPFNNewCOMObject m_lpfnNew; LPFNInitRoutine m_lpfnInit; BOOL IsClassID(REFCLSID rclsid) const { return (IsEqualCLSID(*m_ClsID,rclsid)); }; CUnknown *CreateInstance(LPUNKNOWN pUnk, HRESULT *phr) const { return m_lpfnNew(pUnk, phr); }; }; /* You must override the (pure virtual) NonDelegatingQueryInterface to return interface pointers (using GetInterface) to the interfaces your derived class supports (the default implementation only supports IUnknown) */ #define DECLARE_IUNKNOWN \ STDMETHODIMP QueryInterface(REFIID riid, void **ppv) { \ return GetOwner()->QueryInterface(riid,ppv); \ }; \ STDMETHODIMP_(ULONG) AddRef() { \ return GetOwner()->AddRef(); \ }; \ STDMETHODIMP_(ULONG) Release() { \ return GetOwner()->Release(); \ }; #endif /* __COMBASE__ */ SndObj-2.6.7/src/asio/ginclude.h000644 000766 000024 00000001153 12062673766 017063 0ustar00victorstaff000000 000000 #ifndef __gInclude__ #define __gInclude__ #if SGI #undef BEOS #undef MAC #undef WINDOWS // #define ASIO_BIG_ENDIAN 1 #define ASIO_CPU_MIPS 1 #elif defined(_WIN32) || defined(_WIN64) #undef BEOS #undef MAC #undef SGI #define WINDOWS 1 #define ASIO_LITTLE_ENDIAN 1 #define ASIO_CPU_X86 1 #elif BEOS #undef MAC #undef SGI #undef WINDOWS #define ASIO_LITTLE_ENDIAN 1 #define ASIO_CPU_X86 1 // #else #define MAC 1 #undef BEOS #undef WINDOWS #undef SGI #define ASIO_BIG_ENDIAN 1 #define ASIO_CPU_PPC 1 #endif // always #define NATIVE_INT64 0 #define IEEE754_64FLOAT 1 #endif // __gInclude__ SndObj-2.6.7/src/asio/iasiodrv.h000644 000766 000024 00000003017 12062673766 017112 0ustar00victorstaff000000 000000 #include "asiosys.h" #include "asio.h" /* Forward Declarations */ #ifndef __ASIODRIVER_FWD_DEFINED__ #define __ASIODRIVER_FWD_DEFINED__ typedef interface IASIO IASIO; #endif /* __ASIODRIVER_FWD_DEFINED__ */ interface IASIO : public IUnknown { virtual ASIOBool init(void *sysHandle) = 0; virtual void getDriverName(char *name) = 0; virtual long getDriverVersion() = 0; virtual void getErrorMessage(char *string) = 0; virtual ASIOError start() = 0; virtual ASIOError stop() = 0; virtual ASIOError getChannels(long *numInputChannels, long *numOutputChannels) = 0; virtual ASIOError getLatencies(long *inputLatency, long *outputLatency) = 0; virtual ASIOError getBufferSize(long *minSize, long *maxSize, long *preferredSize, long *granularity) = 0; virtual ASIOError canSampleRate(ASIOSampleRate sampleRate) = 0; virtual ASIOError getSampleRate(ASIOSampleRate *sampleRate) = 0; virtual ASIOError setSampleRate(ASIOSampleRate sampleRate) = 0; virtual ASIOError getClockSources(ASIOClockSource *clocks, long *numSources) = 0; virtual ASIOError setClockSource(long reference) = 0; virtual ASIOError getSamplePosition(ASIOSamples *sPos, ASIOTimeStamp *tStamp) = 0; virtual ASIOError getChannelInfo(ASIOChannelInfo *info) = 0; virtual ASIOError createBuffers(ASIOBufferInfo *bufferInfos, long numChannels, long bufferSize, ASIOCallbacks *callbacks) = 0; virtual ASIOError disposeBuffers() = 0; virtual ASIOError controlPanel() = 0; virtual ASIOError future(long selector,void *opt) = 0; virtual ASIOError outputReady() = 0; }; SndObj-2.6.7/src/asio/iasiothiscallresolver.cpp000644 000766 000024 00000050422 12062673766 022241 0ustar00victorstaff000000 000000 /* IASIOThiscallResolver.cpp see the comments in iasiothiscallresolver.h for the top level description - this comment describes the technical details of the implementation. The latest version of this file is available from: http://www.audiomulch.com/~rossb/code/calliasio please email comments to Ross Bencina BACKGROUND The IASIO interface declared in the Steinberg ASIO 2 SDK declares functions with no explicit calling convention. This causes MSVC++ to default to using the thiscall convention, which is a proprietary convention not implemented by some non-microsoft compilers - notably borland BCC, C++Builder, and gcc. MSVC++ is the defacto standard compiler used by Steinberg. As a result of this situation, the ASIO sdk will compile with any compiler, however attempting to execute the compiled code will cause a crash due to different default calling conventions on non-Microsoft compilers. IASIOThiscallResolver solves the problem by providing an adapter class that delegates to the IASIO interface using the correct calling convention (thiscall). Due to the lack of support for thiscall in the Borland and GCC compilers, the calls have been implemented in assembly language. A number of macros are defined for thiscall function calls with different numbers of parameters, with and without return values - it may be possible to modify the format of these macros to make them work with other inline assemblers. THISCALL DEFINITION A number of definitions of the thiscall calling convention are floating around the internet. The following definition has been validated against output from the MSVC++ compiler: For non-vararg functions, thiscall works as follows: the object (this) pointer is passed in ECX. All arguments are passed on the stack in right to left order. The return value is placed in EAX. The callee clears the passed arguments from the stack. FINDING FUNCTION POINTERS FROM AN IASIO POINTER The first field of a COM object is a pointer to its vtble. Thus a pointer to an object implementing the IASIO interface also points to a pointer to that object's vtbl. The vtble is a table of function pointers for all of the virtual functions exposed by the implemented interfaces. If we consider a variable declared as a pointer to IASO: IASIO *theAsioDriver theAsioDriver points to: object implementing IASIO { IASIOvtbl *vtbl other data } in other words, theAsioDriver points to a pointer to an IASIOvtbl vtbl points to a table of function pointers: IASIOvtbl ( interface IASIO : public IUnknown ) { (IUnknown functions) 0 virtual HRESULT STDMETHODCALLTYPE (*QueryInterface)(REFIID riid, void **ppv) = 0; 4 virtual ULONG STDMETHODCALLTYPE (*AddRef)() = 0; 8 virtual ULONG STDMETHODCALLTYPE (*Release)() = 0; (IASIO functions) 12 virtual ASIOBool (*init)(void *sysHandle) = 0; 16 virtual void (*getDriverName)(char *name) = 0; 20 virtual long (*getDriverVersion)() = 0; 24 virtual void (*getErrorMessage)(char *string) = 0; 28 virtual ASIOError (*start)() = 0; 32 virtual ASIOError (*stop)() = 0; 36 virtual ASIOError (*getChannels)(long *numInputChannels, long *numOutputChannels) = 0; 40 virtual ASIOError (*getLatencies)(long *inputLatency, long *outputLatency) = 0; 44 virtual ASIOError (*getBufferSize)(long *minSize, long *maxSize, long *preferredSize, long *granularity) = 0; 48 virtual ASIOError (*canSampleRate)(ASIOSampleRate sampleRate) = 0; 52 virtual ASIOError (*getSampleRate)(ASIOSampleRate *sampleRate) = 0; 56 virtual ASIOError (*setSampleRate)(ASIOSampleRate sampleRate) = 0; 60 virtual ASIOError (*getClockSources)(ASIOClockSource *clocks, long *numSources) = 0; 64 virtual ASIOError (*setClockSource)(long reference) = 0; 68 virtual ASIOError (*getSamplePosition)(ASIOSamples *sPos, ASIOTimeStamp *tStamp) = 0; 72 virtual ASIOError (*getChannelInfo)(ASIOChannelInfo *info) = 0; 76 virtual ASIOError (*createBuffers)(ASIOBufferInfo *bufferInfos, long numChannels, long bufferSize, ASIOCallbacks *callbacks) = 0; 80 virtual ASIOError (*disposeBuffers)() = 0; 84 virtual ASIOError (*controlPanel)() = 0; 88 virtual ASIOError (*future)(long selector,void *opt) = 0; 92 virtual ASIOError (*outputReady)() = 0; }; The numbers in the left column show the byte offset of each function ptr from the beginning of the vtbl. These numbers are used in the code below to select different functions. In order to find the address of a particular function, theAsioDriver must first be dereferenced to find the value of the vtbl pointer: mov eax, theAsioDriver mov edx, [theAsioDriver] // edx now points to vtbl[0] Then an offset must be added to the vtbl pointer to select a particular function, for example vtbl+44 points to the slot containing a pointer to the getBufferSize function. Finally vtbl+x must be dereferenced to obtain the value of the function pointer stored in that address: call [edx+44] // call the function pointed to by // the value in the getBufferSize field of the vtbl SEE ALSO Martin Fay's OpenASIO DLL at http://www.martinfay.com solves the same problem by providing a new COM interface which wraps IASIO with an interface that uses portable calling conventions. OpenASIO must be compiled with MSVC, and requires that you ship the OpenASIO DLL with your application. ACKNOWLEDGEMENTS Ross Bencina: worked out the thiscall details above, wrote the original Borland asm macros, and a patch for asio.cpp (which is no longer needed). Thanks to Martin Fay for introducing me to the issues discussed here, and to Rene G. Ceballos for assisting with asm dumps from MSVC++. Antti Silvast: converted the original calliasio to work with gcc and NASM by implementing the asm code in a separate file. Fraser Adams: modified the original calliasio containing the Borland inline asm to add inline asm for gcc i.e. Intel syntax for Borland and AT&T syntax for gcc. This seems a neater approach for gcc than to have a separate .asm file and it means that we only need one version of the thiscall patch. Fraser Adams: rewrote the original calliasio patch in the form of the IASIOThiscallResolver class in order to avoid modifications to files from the Steinberg SDK, which may have had potential licence issues. */ // We only need IASIOThiscallResolver at all if we are on Win32. For other // platforms we simply bypass the IASIOThiscallResolver definition to allow us // to be safely #include'd whatever the platform to keep client code portable #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) // If microsoft compiler we can call IASIO directly so IASIOThiscallResolver // is not used. #if !defined(_MSC_VER) #include #include // We have a mechanism in iasiothiscallresolver.h to ensure that asio.h is // #include'd before it in client code, we do NOT want to do this test here. #define iasiothiscallresolver_sourcefile 1 #include "iasiothiscallresolver.h" #undef iasiothiscallresolver_sourcefile // iasiothiscallresolver.h redefines ASIOInit for clients, but we don't want // this macro defined in this translation unit. #undef ASIOInit // theAsioDriver is a global pointer to the current IASIO instance which the // ASIO SDK uses to perform all actions on the IASIO interface. We substitute // our own forwarding interface into this pointer. extern IASIO* theAsioDriver; // The following macros define the inline assembler for BORLAND first then gcc #if defined(__BCPLUSPLUS__) || defined(__BORLANDC__) #define CALL_THISCALL_0( resultName, thisPtr, funcOffset )\ void *this_ = (thisPtr); \ __asm { \ mov eax, this_ ; \ mov edx, [eax] ; \ mov ecx, this_ ; \ call [edx+funcOffset] ; \ mov resultName, eax ; \ } #define CALL_VOID_THISCALL_1( thisPtr, funcOffset, param1 )\ void *this_ = (thisPtr); \ __asm { \ mov eax, param1 ; \ push eax ; \ mov eax, this_ ; \ mov edx, [eax] ; \ mov ecx, this_ ; \ call [edx+funcOffset] ; \ } #define CALL_THISCALL_1( resultName, thisPtr, funcOffset, param1 )\ void *this_ = (thisPtr); \ __asm { \ mov eax, param1 ; \ push eax ; \ mov eax, this_ ; \ mov edx, [eax] ; \ mov ecx, this_ ; \ call [edx+funcOffset] ; \ mov resultName, eax ; \ } #define CALL_THISCALL_2( resultName, thisPtr, funcOffset, param1, param2 )\ void *this_ = (thisPtr); \ __asm { \ mov eax, param2 ; \ push eax ; \ mov eax, param1 ; \ push eax ; \ mov eax, this_ ; \ mov edx, [eax] ; \ mov ecx, this_ ; \ call [edx+funcOffset] ; \ mov resultName, eax ; \ } #define CALL_THISCALL_4( resultName, thisPtr, funcOffset, param1, param2, param3, param4 )\ void *this_ = (thisPtr); \ __asm { \ mov eax, param4 ; \ push eax ; \ mov eax, param3 ; \ push eax ; \ mov eax, param2 ; \ push eax ; \ mov eax, param1 ; \ push eax ; \ mov eax, this_ ; \ mov edx, [eax] ; \ mov ecx, this_ ; \ call [edx+funcOffset] ; \ mov resultName, eax ; \ } #elif defined(__GNUC__) #define CALL_THISCALL_0( resultName, thisPtr, funcOffset )\ __asm__ __volatile__ (""::"a"(thisPtr));\ __asm__ __volatile__ ("movl (%eax), %edx");\ __asm__ __volatile__ (""::"c"(thisPtr));\ __asm__ __volatile__ ("call *"#funcOffset"(%edx)");\ __asm__ __volatile__ ("":"=a"(resultName));\ #define CALL_VOID_THISCALL_1( thisPtr, funcOffset, param1 )\ __asm__ __volatile__ (""::"a"(param1));\ __asm__ __volatile__ ("pushl %eax");\ __asm__ __volatile__ (""::"a"(thisPtr));\ __asm__ __volatile__ ("movl (%eax), %edx");\ __asm__ __volatile__ (""::"c"(thisPtr));\ __asm__ __volatile__ ("call *"#funcOffset"(%edx)");\ #define CALL_THISCALL_1( resultName, thisPtr, funcOffset, param1 )\ __asm__ __volatile__ (""::"a"(param1));\ __asm__ __volatile__ ("pushl %eax");\ __asm__ __volatile__ (""::"a"(thisPtr));\ __asm__ __volatile__ ("movl (%eax), %edx");\ __asm__ __volatile__ (""::"c"(thisPtr));\ __asm__ __volatile__ ("call *"#funcOffset"(%edx)");\ __asm__ __volatile__ ("":"=a"(resultName));\ #define CALL_THISCALL_2( resultName, thisPtr, funcOffset, param1, param2 )\ __asm__ __volatile__ (""::"a"(param2));\ __asm__ __volatile__ ("pushl %eax");\ __asm__ __volatile__ (""::"a"(param1));\ __asm__ __volatile__ ("pushl %eax");\ __asm__ __volatile__ (""::"a"(thisPtr));\ __asm__ __volatile__ ("movl (%eax), %edx");\ __asm__ __volatile__ (""::"c"(thisPtr));\ __asm__ __volatile__ ("call *"#funcOffset"(%edx)");\ __asm__ __volatile__ ("":"=a"(resultName));\ #define CALL_THISCALL_4( resultName, thisPtr, funcOffset, param1, param2, param3, param4 )\ __asm__ __volatile__ (""::"a"(param4));\ __asm__ __volatile__ ("pushl %eax");\ __asm__ __volatile__ (""::"a"(param3));\ __asm__ __volatile__ ("pushl %eax");\ __asm__ __volatile__ (""::"a"(param2));\ __asm__ __volatile__ ("pushl %eax");\ __asm__ __volatile__ (""::"a"(param1));\ __asm__ __volatile__ ("pushl %eax");\ __asm__ __volatile__ (""::"a"(thisPtr));\ __asm__ __volatile__ ("movl (%eax), %edx");\ __asm__ __volatile__ (""::"c"(thisPtr));\ __asm__ __volatile__ ("call *"#funcOffset"(%edx)");\ __asm__ __volatile__ ("":"=a"(resultName));\ #endif // Our static singleton instance. IASIOThiscallResolver IASIOThiscallResolver::instance; // Constructor called to initialize static Singleton instance above. Note that // it is important not to clear that_ incase it has already been set by the call // to placement new in ASIOInit(). IASIOThiscallResolver::IASIOThiscallResolver() { } // Constructor called from ASIOInit() below IASIOThiscallResolver::IASIOThiscallResolver(IASIO* that) : that_( that ) { } // Implement IUnknown methods as assert(false). IASIOThiscallResolver is not // really a COM object, just a wrapper which will work with the ASIO SDK. // If you wanted to use ASIO without the SDK you might want to implement COM // aggregation in these methods. HRESULT STDMETHODCALLTYPE IASIOThiscallResolver::QueryInterface(REFIID riid, void **ppv) { (void)riid; // suppress unused variable warning assert( false ); // this function should never be called by the ASIO SDK. *ppv = NULL; return E_NOINTERFACE; } ULONG STDMETHODCALLTYPE IASIOThiscallResolver::AddRef() { assert( false ); // this function should never be called by the ASIO SDK. return 1; } ULONG STDMETHODCALLTYPE IASIOThiscallResolver::Release() { assert( false ); // this function should never be called by the ASIO SDK. return 1; } // Implement the IASIO interface methods by performing the vptr manipulation // described above then delegating to the real implementation. ASIOBool IASIOThiscallResolver::init(void *sysHandle) { ASIOBool result; CALL_THISCALL_1( result, that_, 12, sysHandle ); return result; } void IASIOThiscallResolver::getDriverName(char *name) { CALL_VOID_THISCALL_1( that_, 16, name ); } long IASIOThiscallResolver::getDriverVersion() { ASIOBool result; CALL_THISCALL_0( result, that_, 20 ); return result; } void IASIOThiscallResolver::getErrorMessage(char *string) { CALL_VOID_THISCALL_1( that_, 24, string ); } ASIOError IASIOThiscallResolver::start() { ASIOBool result; CALL_THISCALL_0( result, that_, 28 ); return result; } ASIOError IASIOThiscallResolver::stop() { ASIOBool result; CALL_THISCALL_0( result, that_, 32 ); return result; } ASIOError IASIOThiscallResolver::getChannels(long *numInputChannels, long *numOutputChannels) { ASIOBool result; CALL_THISCALL_2( result, that_, 36, numInputChannels, numOutputChannels ); return result; } ASIOError IASIOThiscallResolver::getLatencies(long *inputLatency, long *outputLatency) { ASIOBool result; CALL_THISCALL_2( result, that_, 40, inputLatency, outputLatency ); return result; } ASIOError IASIOThiscallResolver::getBufferSize(long *minSize, long *maxSize, long *preferredSize, long *granularity) { ASIOBool result; CALL_THISCALL_4( result, that_, 44, minSize, maxSize, preferredSize, granularity ); return result; } ASIOError IASIOThiscallResolver::canSampleRate(ASIOSampleRate sampleRate) { ASIOBool result; unsigned long hiword = *(((unsigned long*)&sampleRate)+1); unsigned long loword = *((unsigned long*)&sampleRate); CALL_THISCALL_2( result, that_, 48, loword, hiword ); return result; } ASIOError IASIOThiscallResolver::getSampleRate(ASIOSampleRate *sampleRate) { ASIOBool result; CALL_THISCALL_1( result, that_, 52, sampleRate ); return result; } ASIOError IASIOThiscallResolver::setSampleRate(ASIOSampleRate sampleRate) { ASIOBool result; unsigned long hiword = *(((unsigned long*)&sampleRate)+1); unsigned long loword = *((unsigned long*)&sampleRate); CALL_THISCALL_2( result, that_, 56, loword, hiword ); return result; } ASIOError IASIOThiscallResolver::getClockSources(ASIOClockSource *clocks, long *numSources) { ASIOBool result; CALL_THISCALL_2( result, that_, 60, clocks, numSources ); return result; } ASIOError IASIOThiscallResolver::setClockSource(long reference) { ASIOBool result; CALL_THISCALL_1( result, that_, 64, reference ); return result; } ASIOError IASIOThiscallResolver::getSamplePosition(ASIOSamples *sPos, ASIOTimeStamp *tStamp) { ASIOBool result; CALL_THISCALL_2( result, that_, 68, sPos, tStamp ); return result; } ASIOError IASIOThiscallResolver::getChannelInfo(ASIOChannelInfo *info) { ASIOBool result; CALL_THISCALL_1( result, that_, 72, info ); return result; } ASIOError IASIOThiscallResolver::createBuffers(ASIOBufferInfo *bufferInfos, long numChannels, long bufferSize, ASIOCallbacks *callbacks) { ASIOBool result; CALL_THISCALL_4( result, that_, 76, bufferInfos, numChannels, bufferSize, callbacks ); return result; } ASIOError IASIOThiscallResolver::disposeBuffers() { ASIOBool result; CALL_THISCALL_0( result, that_, 80 ); return result; } ASIOError IASIOThiscallResolver::controlPanel() { ASIOBool result; CALL_THISCALL_0( result, that_, 84 ); return result; } ASIOError IASIOThiscallResolver::future(long selector,void *opt) { ASIOBool result; CALL_THISCALL_2( result, that_, 88, selector, opt ); return result; } ASIOError IASIOThiscallResolver::outputReady() { ASIOBool result; CALL_THISCALL_0( result, that_, 92 ); return result; } // Implement our substitute ASIOInit() method ASIOError IASIOThiscallResolver::ASIOInit(ASIODriverInfo *info) { // To ensure that our instance's vptr is correctly constructed, even if // ASIOInit is called prior to main(), we explicitly call its constructor // (potentially over the top of an existing instance). Note that this is // pretty ugly, and is only safe because IASIOThiscallResolver has no // destructor and contains no objects with destructors. new((void*)&instance) IASIOThiscallResolver( theAsioDriver ); // Interpose between ASIO client code and the real driver. theAsioDriver = &instance; // Note that we never need to switch theAsioDriver back to point to the // real driver because theAsioDriver is reset to zero in ASIOExit(). // Delegate to the real ASIOInit return ::ASIOInit(info); } #endif /* !defined(_MSC_VER) */ #endif /* Win32 */ SndObj-2.6.7/src/asio/iasiothiscallresolver.h000644 000766 000024 00000021546 12062673766 021713 0ustar00victorstaff000000 000000 // **************************************************************************** // File: IASIOThiscallResolver.h // Description: The IASIOThiscallResolver class implements the IASIO // interface and acts as a proxy to the real IASIO interface by // calling through its vptr table using the thiscall calling // convention. To put it another way, we interpose // IASIOThiscallResolver between ASIO SDK code and the driver. // This is necessary because most non-Microsoft compilers don't // implement the thiscall calling convention used by IASIO. // // iasiothiscallresolver.cpp contains the background of this // problem plus a technical description of the vptr // manipulations. // // In order to use this mechanism one simply has to add // iasiothiscallresolver.cpp to the list of files to compile // and #include // // Note that this #include must come after the other ASIO SDK // #includes, for example: // // #include // #include // #include // #include // #include // // Actually the important thing is to #include // after . We have // incorporated a test to enforce this ordering. // // The code transparently takes care of the interposition by // using macro substitution to intercept calls to ASIOInit() // and ASIOExit(). We save the original ASIO global // "theAsioDriver" in our "that" variable, and then set // "theAsioDriver" to equal our IASIOThiscallResolver instance. // // Whilst this method of resolving the thiscall problem requires // the addition of #include to client // code it has the advantage that it does not break the terms // of the ASIO licence by publishing it. We are NOT modifying // any Steinberg code here, we are merely implementing the IASIO // interface in the same way that we would need to do if we // wished to provide an open source ASIO driver. // // For compilation with MinGW -lole32 needs to be added to the // linker options. For BORLAND, linking with Import32.lib is // sufficient. // // The dependencies are with: CoInitialize, CoUninitialize, // CoCreateInstance, CLSIDFromString - used by asiolist.cpp // and are required on Windows whether ThiscallResolver is used // or not. // // Searching for the above strings in the root library path // of your compiler should enable the correct libraries to be // identified if they aren't immediately obvious. // // Note that the current implementation of IASIOThiscallResolver // is not COM compliant - it does not correctly implement the // IUnknown interface. Implementing it is not necessary because // it is not called by parts of the ASIO SDK which call through // theAsioDriver ptr. The IUnknown methods are implemented as // assert(false) to ensure that the code fails if they are // ever called. // Restrictions: None. Public Domain & Open Source distribute freely // You may use IASIOThiscallResolver commercially as well as // privately. // You the user assume the responsibility for the use of the // files, binary or text, and there is no guarantee or warranty, // expressed or implied, including but not limited to the // implied warranties of merchantability and fitness for a // particular purpose. You assume all responsibility and agree // to hold no entity, copyright holder or distributors liable // for any loss of data or inaccurate representations of data // as a result of using IASIOThiscallResolver. // Version: 1.3 Switched to including assert.h for better compatibility. // Wrapped entire .h and .cpp contents with a check for // _MSC_VER to provide better compatibility with MS compilers. // Changed Singleton implementation to use static instance // instead of freestore allocated instance. Removed ASIOExit // macro as it is no longer needed. // 1.2 Removed semicolons from ASIOInit and ASIOExit macros to // allow them to be embedded in expressions (if statements). // Cleaned up some comments. Removed combase.c dependency (it // doesn't compile with BCB anyway) by stubbing IUnknown. // 1.1 Incorporated comments from Ross Bencina including things // such as changing name from ThiscallResolver to // IASIOThiscallResolver, tidying up the constructor, fixing // a bug in IASIOThiscallResolver::ASIOExit() and improving // portability through the use of conditional compilation // 1.0 Initial working version. // Created: 6/09/2003 // Author: Fraser Adams // Ross Bencina // Rene G. Ceballos // Martin Fay // Antti Silvast // // **************************************************************************** #ifndef included_iasiothiscallresolver_h #define included_iasiothiscallresolver_h // We only need IASIOThiscallResolver at all if we are on Win32. For other // platforms we simply bypass the IASIOThiscallResolver definition to allow us // to be safely #include'd whatever the platform to keep client code portable #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) // If microsoft compiler we can call IASIO directly so IASIOThiscallResolver // is not used. #if !defined(_MSC_VER) // The following is in order to ensure that this header is only included after // the other ASIO headers (except for the case of iasiothiscallresolver.cpp). // We need to do this because IASIOThiscallResolver works by eclipsing the // original definition of ASIOInit() with a macro (see below). #if !defined(iasiothiscallresolver_sourcefile) #if !defined(__ASIO_H) #error iasiothiscallresolver.h must be included AFTER asio.h #endif #endif #include #include /* From ASIO SDK */ class IASIOThiscallResolver : public IASIO { private: IASIO* that_; // Points to the real IASIO static IASIOThiscallResolver instance; // Singleton instance // Constructors - declared private so construction is limited to // our Singleton instance IASIOThiscallResolver(); IASIOThiscallResolver(IASIO* that); public: // Methods from the IUnknown interface. We don't fully implement IUnknown // because the ASIO SDK never calls these methods through theAsioDriver ptr. // These methods are implemented as assert(false). virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppv); virtual ULONG STDMETHODCALLTYPE AddRef(); virtual ULONG STDMETHODCALLTYPE Release(); // Methods from the IASIO interface, implemented as forwarning calls to that. virtual ASIOBool init(void *sysHandle); virtual void getDriverName(char *name); virtual long getDriverVersion(); virtual void getErrorMessage(char *string); virtual ASIOError start(); virtual ASIOError stop(); virtual ASIOError getChannels(long *numInputChannels, long *numOutputChannels); virtual ASIOError getLatencies(long *inputLatency, long *outputLatency); virtual ASIOError getBufferSize(long *minSize, long *maxSize, long *preferredSize, long *granularity); virtual ASIOError canSampleRate(ASIOSampleRate sampleRate); virtual ASIOError getSampleRate(ASIOSampleRate *sampleRate); virtual ASIOError setSampleRate(ASIOSampleRate sampleRate); virtual ASIOError getClockSources(ASIOClockSource *clocks, long *numSources); virtual ASIOError setClockSource(long reference); virtual ASIOError getSamplePosition(ASIOSamples *sPos, ASIOTimeStamp *tStamp); virtual ASIOError getChannelInfo(ASIOChannelInfo *info); virtual ASIOError createBuffers(ASIOBufferInfo *bufferInfos, long numChannels, long bufferSize, ASIOCallbacks *callbacks); virtual ASIOError disposeBuffers(); virtual ASIOError controlPanel(); virtual ASIOError future(long selector,void *opt); virtual ASIOError outputReady(); // Class method, see ASIOInit() macro below. static ASIOError ASIOInit(ASIODriverInfo *info); // Delegates to ::ASIOInit }; // Replace calls to ASIOInit with our interposing version. // This macro enables us to perform thiscall resolution simply by #including // after the asio #includes (this file _must_ be // included _after_ the asio #includes) #define ASIOInit(name) IASIOThiscallResolver::ASIOInit((name)) #endif /* !defined(_MSC_VER) */ #endif /* Win32 */ #endif /* included_iasiothiscallresolver_h */ SndObj-2.6.7/python/AudioDefs.i000644 000766 000024 00000031770 12062673766 016744 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 // AudioDefs.i SndObj Wrapper Interface %module sndobj %{ #ifndef NOPTHREAD #include "SndThread.h" #include "SndRTThread.h" #endif // Base Classes #include "SndObj.h" #include "SndIO.h" #include "Table.h" // SndObj-derived #include "Oscil.h" // Oscillators #include "Oscilt.h" #include "Oscili.h" #include "FastOsc.h" #include "PhOscili.h" #include "Osc.h" #include "Osci.h" #include "SndIn.h" // Sound input #include "SndRead.h" // audio file input #if defined(OSS) || defined(SGI) || defined(WIN) #include "MidiIn.h" // Midi input #include "Bend.h" // pitch bend #include "MidiMap.h" #endif #include "ADSR.h" // Envelopes #include "IADSR.h" #include "Buzz.h" // Buzzer #include "Balance.h" // Balance of signals #include "DelayLine.h" // Delay line #include "Tap.h" // Truncating tap #include "Tapi.h" // Time-varying tap #include "Comb.h" // Comb filter #include "Allpass.h" // Allpass filter #include "StringFlt.h" // String filter #include "Pluck.h" // Karplus-Strong #include "VDelay.h" // Variable delay #include "Pitch.h" // Pitch transposer #include "Loop.h" // Looping #include "Fir.h" // direct convolution #include "Filter.h" // Fixed-freq/BW reson #include "TpTz.h" // Two-pole Two-zero #include "Reson.h" // Variable reson #include "Lp.h" // Variable LP with resonance #include "ButtBP.h" // Butterworth filters #include "ButtBR.h" #include "ButtHP.h" #include "ButtLP.h" #include "Ap.h" // 2nd order all-pass #include "LowPass.h" // 1st order LP #include "HiPass.h" // 1st order HP #include "Hilb.h" // Hilbert transformer #include "SyncGrain.h" // granular synthesis #include "Mix.h" // Mixer #include "Pan.h" // panning #include "Gain.h" // gain #include "Interp.h" // curve segments #include "Phase.h" // phase accumulator #include "Ring.h" // general-purpose multiplier #include "Unit.h" // test signals #include "Lookup.h" // table lookup #include "Lookupi.h" #include "Rand.h" // Noise #include "Randh.h" // Band-limited noise #include "Randi.h" // interpolated // Spectral stuff #include "FFT.h" // windowed overlapping FFT #include "IFFT.h" // overlap-add IFFT #include "PVA.h" // pvoc analysis/synthesis #include "PVS.h" #include "PVRead.h" #include "IFGram.h" #include "SinAnal.h" // sinusoidal analysis #include "SinSyn.h" // sinusoidal resynthesis #include "AdSyn.h" // additive resynthesis #include "ReSyn.h" // additive resynthesis if(m_status==OFF) Update(); #include "IFAdd.h" // additive resynthesis #include "SpecMult.h" // spectral multiplication #include "SpecInterp.h" // spectral interpolation #include "PVMask.h" // spectral masking #include "PVTransp.h" // transposition #include "PVMix.h" // mixing #include "PVBlur.h" // blurring #include "PVFilter.h" // mag filtering #include "PVMorph.h" // pvoc morphing #include "SpecPolar.h" // polar converstion #include "SpecSplit.h" // polar conversion & split #include "SpecThresh.h" // threshold filter #include "SpecVoc.h" // impose magnitudes #include "SpecCart.h" // cartesian conversion #include "SpecCombine.h" // combine phases & mags #include "SpecIn.h" // spectral file input #include "Convol.h" // table-based convolution #include "Ptrack.h" // SndIO-derived #include "SndFIO.h" // Raw file IO #include "SndWave.h" // RIFF-Wave #include "SndWaveX.h" // waveformatextensible #include "SndPVOCEX.h" // pvocex #include "SndSinIO.h" // sinusex #include "SndAiff.h" // AIFF #include "SndBuffer.h" // memory buffer #if defined(OSS) || defined(SGI) || defined(WIN) #include "SndMidi.h" // midi IO #include "SndMidiIn.h" #endif #ifdef WIN #include "SndAsio.h" // ASIO-driver IO #endif #ifdef JACK #include "SndJackIO.h" // Jack IO #endif #ifdef MACOSX #include "SndCoreAudio.h" // Core Audio support #endif #include "SndRTIO.h" // WinMME/OSS/SGI RT IO // Table-derived #include "HarmTable.h" // wavetables #include "UsrHarmTable.h" #include "TrisegTable.h" // envelope #include "EnvTable.h" // envelope curves #include "SndTable.h" // soundfile input #include "PlnTable.h" // Polynomials #include "HammingTable.h" // Windows #include "NoteTable.h" // midi note conversion #include "UsrDefTable.h" // user-definable #include "LoPassTable.h" // lowpass impulse response #include "SpecEnvTable.h" // spectral envelope #include "PVEnvTable.h" // PV envelope #include "PVTable.h" // PV frame #include "ImpulseTable.h" // linear FIR coeffs #define SWIG_FILE_WITH_INIT %} #ifdef NUMPY %include "numpy.i" %init %{ import_array(); %} #endif %ignore SndObj::SndObj(SndObj &); %ignore SndObj::operator=(SndObj); %ignore Pitch::Pitch(float, SndObj*, int =0, int =DEF_VECSIZE, float =DEF_SR); #ifdef NUMPY %apply(float* IN_ARRAY1, int DIM1) {(float* in_vector, int size)}; %apply(float* INPLACE_ARRAY1, int DIM1) {(float* out_vector, int size)}; #endif %include"SndObj.h" #ifdef NUMPY %clear(float* in_vector, int size); %clear(float* out_vector, int size); #endif %include"SndIO.h" %include"Table.h" %include "carrays.i" %array_functions(int, intp); %array_functions(float, floatp); %array_functions(double, doublep); %inline %{ typedef SndObj* sndobjp; %} %array_class(int, intArray); %array_class(float, floatArray); %array_class(double, doubleArray) %array_class(sndobjp, sndobjArray); // typemap for callbacks %typemap(in) PyObject *pyfunc { if(!PyCallable_Check($input)){ PyErr_SetString(PyExc_TypeError, "Not a callable object!"); return NULL; } $1 = $input; } #ifndef NOPTHREAD %{ // this will be used as an interface to the // callback static void PythonCallback(void *p){ PyObject *res; SndThread *t = (SndThread *) p; if(t->_tstate == NULL) t->_tstate = PyThreadState_New(PyInterpreterState_New()); PyEval_AcquireThread(t->_tstate); res = PyEval_CallObject(t->pydata.func, t->pydata.data); if (res == NULL){ PyErr_SetString(PyExc_TypeError, "Exception in callback"); } else Py_DECREF(res); PyEval_ReleaseThread(t->_tstate); } #ifndef NO_RTIO static void PythonCallback1(void *p){ PyObject *res; SndRTThread *t = (SndRTThread *) p; if(t->_tstate1 == NULL) t->_tstate1 = PyThreadState_New(PyInterpreterState_New()); PyEval_AcquireThread(t->_tstate1); res = PyEval_CallObject(t->pydata1.func, t->pydata1.data); if (res == NULL){ PyErr_SetString(PyExc_TypeError, "Exception in callback"); } else Py_DECREF(res); PyEval_ReleaseThread(t->_tstate1); } #endif %} %ignore SndThread::SetProcessCallback(void (*Callback)(void *), void *cbdata); %include "SndThread.h" %include "SndRTThread.h" %extend SndThread { // Set the Python callback void SetProcessCallback(PyObject *pyfunc, PyObject *p){ if(self->GetProcessCallback() == NULL) { PyEval_InitThreads(); self->_tstate = NULL; } else Py_XDECREF(self->pydata.func); self->pydata.func = pyfunc; self->pydata.data = Py_BuildValue("(O)", p); self->SetProcessCallback(PythonCallback, (void *)self); Py_XINCREF(pyfunc); } } #ifndef NO_RTIO %extend SndRTThread { // Set the Python callback void SetProcessCallback(PyObject *pyfunc, PyObject *p){ if(self->GetProcessCallback() == NULL) { PyEval_InitThreads(); self->_tstate1 = NULL; } else Py_XDECREF(self->pydata1.func); self->pydata1.func = pyfunc; self->pydata1.data = Py_BuildValue("(O)", p); self->SetProcessCallback(PythonCallback1, (void *)self); Py_XINCREF(pyfunc); } } #endif #endif // SndObj-derived %include "Oscil.h" // Oscillators %include "Oscilt.h" %include "Oscili.h" %include "FastOsc.h" %include "PhOscili.h" %include "Osc.h" %include "Osci.h" %include "SndIn.h" // Sound input %include "SndRead.h" // audio file input #if defined(OSS) || defined(SGI) || defined(WIN) %include "MidiIn.h" // Midi input %include "Bend.h" // pitch bend %include "MidiMap.h" #endif %include "ADSR.h" // Envelopes %include "IADSR.h" %include "Buzz.h" // Buzzer %include "Balance.h" // Balance of signals %include "DelayLine.h" // Delay line %include "Tap.h" // Truncating tap %include "Tapi.h" // Time-varying tap %include "Comb.h" // Comb filter %include "Allpass.h" // Allpass filter %include "StringFlt.h" // String filter %include "Pluck.h" // Karplus-Strong %include "VDelay.h" // Variable delay %include "Pitch.h" // Pitch transposer %include "Loop.h" // Looping %include "Fir.h" // direct convolution %include "Filter.h" // Fixed-freq/BW reson %include "TpTz.h" // Two-pole Two-zero %include "Reson.h" // Variable reson %include "Lp.h" // Variable LP with resonance %include "ButtBP.h" // Butterworth filters %include "ButtBR.h" %include "ButtHP.h" %include "ButtLP.h" %include "Ap.h" // 2nd order all-pass %include "LowPass.h" // 1st order LP %include "HiPass.h" // 1st order HP %include "Hilb.h" // Hilbert transformer %include "SyncGrain.h" // granular synthesis %include "Mix.h" // Mixer %include "Pan.h" // panning %include "Gain.h" // gain %include "Interp.h" // curve segments %include "Phase.h" // phase accumulator %include "Ring.h" // general-purpose multiplier %include "Unit.h" // test signals %include "Lookup.h" // table lookup %include "Lookupi.h" %include "Rand.h" // Noise %include "Randh.h" // Band-limited noise %include "Randi.h" // interpolated // Spectral stuff %include "FFT.h" // windowed overlapping FFT %include "IFFT.h" // overlap-add IFFT %include "PVA.h" // pvoc analysis/synthesis %include "PVS.h" %include "PVRead.h" %include "IFGram.h" %include "SinAnal.h" // sinusoidal analysis %include "SinSyn.h" // sinusoidal resynthesis %include "ReSyn.h" // additive resynthesis %include "AdSyn.h" // additive resynthesis %include "IFAdd.h" // additive resynthesis %include "SpecMult.h" // spectral multiplication %include "SpecInterp.h" // spectral interpolation %include "PVMask.h" // spectral masking %include "PVTransp.h" // transposition %include "PVMix.h" // mixing %include "PVBlur.h" // blurring %include "PVFilter.h" // mag filtering %include "PVMorph.h" // pvoc morphing %include "SpecPolar.h" // polar converstion %include "SpecSplit.h" // polar conversion & split %include "SpecThresh.h" // threshold filter %include "SpecVoc.h" // impose magnitudes %include "SpecCart.h" // cartesian conversion %include "SpecCombine.h" // combine phases & mags %include "SpecIn.h" // spectral file input %include "Convol.h" // table-based convolution %include "Ptrack.h" // SndIO-derived %include "SndFIO.h" // Raw file IO %include "SndWave.h" // RIFF-Wave %include "SndWaveX.h" // waveformatextensible %include "SndPVOCEX.h" // pvocex %include "SndSinIO.h" // sinusex %include "SndAiff.h" // AIFF %include "SndBuffer.h" // memory buffer #if defined(OSS) || defined(SGI) || defined(WIN) %include "SndMidi.h" // midi IO %include "SndMidiIn.h" #endif #ifdef WIN %include "SndAsio.h" // ASIO-driver IO #endif #ifdef JACK %include "SndJackIO.h" // Jack IO #endif #ifdef MACOSX %include "SndCoreAudio.h" // Core Audio support #endif %include "SndRTIO.h" // WinMME/OSS/SGI RT IO // Table-derived %include "HarmTable.h" // wavetables %include "UsrHarmTable.h" %include "TrisegTable.h" // envelope %include "EnvTable.h" // envelope curves %include "SndTable.h" // soundfile input %include "PlnTable.h" // Polynomials %include "HammingTable.h" // Windows %include "NoteTable.h" // midi note conversion %include "UsrDefTable.h" // user-definable %include "LoPassTable.h" // lowpass impulse response %include "PVEnvTable.h" // PV envelope %include "SpecEnvTable.h" // spectral envelope %include "PVTable.h" // PV frame %include "ImpulseTable.h" // linear FIR coeffs SndObj-2.6.7/python/ball.py000644 000766 000024 00000010226 12062673766 016204 0ustar00victorstaff000000 000000 #!/usr/bin/python ############################################### # A little toy demonstrating PySndObj # from Tkinter import * import sndobj import math # set the IO buffersize here BUFFERSIZE = 2048 # this is our computer instrument # basically an oscillator and a filter class Instrument: def Output(self): sig = self.fil.Output(0) return abs(sig) def SetFreq(self,freq): self.osc.SetFreq(freq*500) def SetAmp(self,amp): self.amp = amp*5000 self.osc.SetAmp(self.amp) self.fil.SetFreq(self.amp*0.5, None) def On(self): self.env.SetCurve(0,self.amp) self.env.Restart() def Off(self): self.env.SetCurve(self.amp, 0) self.osc.SetAmp(0, self.env) self.env.Restart() def __init__(self): self.amp = 5000 self.tab = sndobj.HarmTable(16384, 25, sndobj.SQUARE) self.env = sndobj.Interp(0, 0, 0.02) self.osc = sndobj.Oscili(self.tab, 440, 0, None, self.env) self.fil = sndobj.Lp(100,0.5,self.osc) self.outp = sndobj.SndRTIO(1, sndobj.SND_OUTPUT, BUFFERSIZE) self.outp.SetOutput(1, self.fil) self.thread = sndobj.SndThread(0, None, self.outp) self.thread.AddObj(self.env) self.thread.AddObj(self.osc) self.thread.AddObj(self.fil) self.thread.ProcOn() class Application(Frame): def move(self,event): canvas = event.widget x = canvas.canvasx(event.x) y = canvas.canvasy(event.y) item = canvas.find_withtag("current")[0] canvas.coords(item, x+10, y+10, x-10, y-10) self.ins.SetFreq(2.0*x/self.size) self.ins.SetAmp(2.0*(self.size-y)/self.size) def play(self,event): note = event.widget.find_withtag("current")[0] for i in range(1,len(self.notes),2): if note == self.notes[i]: val = self.notes[i-1] self.canvas.itemconfigure(i, fill="red") self.ins.On() self.ins.SetFreq(val) def stop(self,event): self.on = False note = event.widget.find_withtag("current")[0] for i in range(1,len(self.notes),2): if note == self.notes[i]: val = self.notes[i-1] self.ins.Off() def createCanvas(self): self.size = 600 self.canvas = Canvas(self,height=self.size,width=self.size,bg="violet") self.canvas.pack() def createShapes(self): item = self.canvas.create_oval(self.size/2-10,self.size/2-10,self.size/2+10,self.size/2+10,fill="black") self.items.append(item) self.notes.append(440) self.notes.append(item) self.canvas.tag_bind(item,"", self.play) self.canvas.tag_bind(item,"", self.move) self.canvas.tag_bind(item,"", self.stop) def meter(self): iw = 10 for i in range(0, self.size, iw): self.vu.append(self.canvas.create_rectangle(i,self.size-40,i+iw,self.size,fill="grey")) def draw(self): level = self.ins.Output() cnt = 0 red = (self.size/10)*0.8 yellow = (self.size/10)*0.6 for i in self.vu: if level > cnt*200: if cnt > red: self.canvas.itemconfigure(i, fill="red") elif cnt > yellow: self.canvas.itemconfigure(i, fill="yellow") else: self.canvas.itemconfigure(i, fill="blue") else: self.canvas.itemconfigure(i, fill="grey") cnt = cnt + 1 self.master.after(50,self.draw) def quit(self): self.master.destroy() def __init__(self,master=None): master.title("PySndObj + Tkinter: just click and play") self.items = [] self.notes = [] Frame.__init__(self,master) self.pack() self.createCanvas() self.createShapes() self.ins = Instrument() self.vu = [] self.meter() master.after(100, self.draw), self.master = master self.master.protocol("WM_DELETE_WINDOW", self.quit) app = Application(Tk()) app.mainloop() SndObj-2.6.7/python/callback_example.py000644 000766 000024 00000002147 12062673766 020544 0ustar00victorstaff000000 000000 #!/usr/bin/python ########################################## # # Example using python callbacks # # VL, 01/07 from sndobj import * import time import sys class test: def get(self): return self.i def set(self,val): self.i = val def __init__(self,val): self.i = val def callb(data): data[0].SetFreq(data[1].get(),data[2]) data[1].set(data[1].get()+1) def callc(data): data[0].SetFreq(data[1].get(),data[2]) data[1].set(data[1].get()-1) t = SndThread() harm = HarmTable(10000,1,1) osc = Oscili(harm, 440, 10000) mod = Oscili(harm, 2, 5) osc.SetFreq(440, mod) tes = test(100) dat = (osc, tes, mod) if sys.platform[:6] == "darwin": outp = SndCoreAudio(2, 2048) outp.SetOutput(1, osc) outp.SetOutput(2, osc) else: outp = SndRTIO(osc) inp = SndRTIO(1, SND_INPUT, 2048,4) t.SetProcessCallback(callb, dat) t.AddObj(osc) t.AddObj(mod) t.AddObj(outp, SNDIO_OUT) t.AddObj(inp, SNDIO_IN) t.ProcOn() time.sleep(2) t.LimitVectorSize(64) tes.set(100) time.sleep(2) t.SetProcessCallback(callc,dat) tes.set(1000) t.RestoreVectorSize() time.sleep(2) t.ProcOff() time.sleep(2) SndObj-2.6.7/python/comb.py000644 000766 000024 00000001245 12062673766 016213 0ustar00victorstaff000000 000000 #!/usr/bin/python ################################### # Stereo echo demonstrating the SndRTThread class # # VL, 01/07 from sndobj import * import time import sys if len(sys.argv) > 1: dur = sys.argv[1] else: dur = 60 # SndRTThread object has its own IO objects # by the default it is created wth 2 channels t = SndRTThread(2) # Echo objects take input from SndRTThread inputs comb_left = Comb(0.48, 0.6, t.GetInput(1)) comb_right = Comb(0.52, 0.6, t.GetInput(1)) # We add the echo objects to the output channels t.AddOutput(1, comb_left) t.AddOutput(2, comb_right) t.Direct(1) t.Direct(2) # Processing t.ProcOn() time.sleep(float(dur)) t.ProcOff() time.sleep(0.1) SndObj-2.6.7/python/display.py000644 000766 000024 00000005364 12062673766 016746 0ustar00victorstaff000000 000000 ################################### # PySndObj extensions: display classes # # VL, 01/07 from Tkinter import * import time import math import array class Oscilloscope(Frame): def createCanvas(self): self.canvas = Canvas(self,height=self.size,width=self.size,bg=self.bg) self.canvas.pack() def draw(self,what,samples): for i in what: self.data.append(i); s = len(self.data) if s >= samples: count = 0 for i in self.item: self.canvas.delete(i) del self.item[0:len(self.item)] incr = s/self.size j = 0 while(j < s): y = self.data[j]*self.size/2 + self.size/2 self.item.append(self.canvas.create_line(count, self.prev, count+1, y, fill=self.line)) self.prev = y count += 1 j += incr del self.data[0:s] def quit(self): self.close(); time.sleep(0.1) self.master.destroy() def __init__(self,master, size, end, line="black", bg="white"): master.title("Oscilloscope") self.size = size self.close = end self.line = line self.bg = bg self.data = array.array('f') Frame.__init__(self,master) self.pack() self.createCanvas() self.item = array.array('i') self.prev = 0 self.n = 0 self.master = master self.master.protocol("WM_DELETE_WINDOW", self.quit) class Spectrum(Oscilloscope): def draw(self,re,im,frames): s = len(re) for i in range(0, s): y1 = re[i] y2 = im[i] if self.cnt == 0: self.spec.append(y1*y1+y2*y2) else: self.spec[i] = (y1*y1+y2*y2+self.spec[i]) self.cnt += 1 if self.cnt >= frames: self.cnt = 0 count = 0 for i in self.item: self.canvas.delete(i) del self.item[0:len(self.item)] s = len(self.spec) j = 0.0 incr = (float(s)/self.size) while(j < s): y = -math.sqrt(self.spec[int(j)]/frames)*self.size + self.size self.item.append(self.canvas.create_line(count, self.prev, count+1, y, fill=self.line, width=self.width)) self.prev = y count += 1 j += incr del self.spec[0:s] def __init__(self,master,size,end,line="black",bg="white",width=1): Oscilloscope.__init__(self,master,size,end,line,bg) master.title("Spectrum") self.cnt = 0 self.spec = array.array('f') self.error = 0 self.width = width SndObj-2.6.7/python/lib/000755 000766 000024 00000000000 12062673766 015465 5ustar00victorstaff000000 000000 SndObj-2.6.7/python/numpy.i000644 000766 000024 00000152363 12062673766 016253 0ustar00victorstaff000000 000000 /* -*- C -*- (not really, but good for syntax highlighting) */ #ifdef SWIGPYTHON %{ #ifndef SWIG_FILE_WITH_INIT # define NO_IMPORT_ARRAY #endif #include "stdio.h" #include %} /**********************************************************************/ %fragment("NumPy_Backward_Compatibility", "header") { /* Support older NumPy data type names */ %#if NDARRAY_VERSION < 0x01000000 %#define NPY_BOOL PyArray_BOOL %#define NPY_BYTE PyArray_BYTE %#define NPY_UBYTE PyArray_UBYTE %#define NPY_SHORT PyArray_SHORT %#define NPY_USHORT PyArray_USHORT %#define NPY_INT PyArray_INT %#define NPY_UINT PyArray_UINT %#define NPY_LONG PyArray_LONG %#define NPY_ULONG PyArray_ULONG %#define NPY_LONGLONG PyArray_LONGLONG %#define NPY_ULONGLONG PyArray_ULONGLONG %#define NPY_FLOAT PyArray_FLOAT %#define NPY_DOUBLE PyArray_DOUBLE %#define NPY_LONGDOUBLE PyArray_LONGDOUBLE %#define NPY_CFLOAT PyArray_CFLOAT %#define NPY_CDOUBLE PyArray_CDOUBLE %#define NPY_CLONGDOUBLE PyArray_CLONGDOUBLE %#define NPY_OBJECT PyArray_OBJECT %#define NPY_STRING PyArray_STRING %#define NPY_UNICODE PyArray_UNICODE %#define NPY_VOID PyArray_VOID %#define NPY_NTYPES PyArray_NTYPES %#define NPY_NOTYPE PyArray_NOTYPE %#define NPY_CHAR PyArray_CHAR %#define NPY_USERDEF PyArray_USERDEF %#define npy_intp intp %#define NPY_MAX_BYTE MAX_BYTE %#define NPY_MIN_BYTE MIN_BYTE %#define NPY_MAX_UBYTE MAX_UBYTE %#define NPY_MAX_SHORT MAX_SHORT %#define NPY_MIN_SHORT MIN_SHORT %#define NPY_MAX_USHORT MAX_USHORT %#define NPY_MAX_INT MAX_INT %#define NPY_MIN_INT MIN_INT %#define NPY_MAX_UINT MAX_UINT %#define NPY_MAX_LONG MAX_LONG %#define NPY_MIN_LONG MIN_LONG %#define NPY_MAX_ULONG MAX_ULONG %#define NPY_MAX_LONGLONG MAX_LONGLONG %#define NPY_MIN_LONGLONG MIN_LONGLONG %#define NPY_MAX_ULONGLONG MAX_ULONGLONG %#define NPY_MAX_INTP MAX_INTP %#define NPY_MIN_INTP MIN_INTP %#define NPY_FARRAY FARRAY %#define NPY_F_CONTIGUOUS F_CONTIGUOUS %#endif } /**********************************************************************/ /* The following code originally appeared in * enthought/kiva/agg/src/numeric.i written by Eric Jones. It was * translated from C++ to C by John Hunter. Bill Spotz has modified * it to fix some minor bugs, upgrade from Numeric to numpy (all * versions), add some comments and functionality, and convert from * direct code insertion to SWIG fragments. */ %fragment("NumPy_Macros", "header") { /* Macros to extract array attributes. */ %#define is_array(a) ((a) && PyArray_Check((PyArrayObject *)a)) %#define array_type(a) (int)(PyArray_TYPE(a)) %#define array_numdims(a) (((PyArrayObject *)a)->nd) %#define array_dimensions(a) (((PyArrayObject *)a)->dimensions) %#define array_size(a,i) (((PyArrayObject *)a)->dimensions[i]) %#define array_data(a) (((PyArrayObject *)a)->data) %#define array_is_contiguous(a) (PyArray_ISCONTIGUOUS(a)) %#define array_is_native(a) (PyArray_ISNOTSWAPPED(a)) %#define array_is_fortran(a) (PyArray_ISFORTRAN(a)) } /**********************************************************************/ %fragment("NumPy_Utilities", "header") { /* Given a PyObject, return a string describing its type. */ char* pytype_string(PyObject* py_obj) { if (py_obj == NULL ) return "C NULL value"; if (py_obj == Py_None ) return "Python None" ; if (PyCallable_Check(py_obj)) return "callable" ; if (PyString_Check( py_obj)) return "string" ; if (PyInt_Check( py_obj)) return "int" ; if (PyFloat_Check( py_obj)) return "float" ; if (PyDict_Check( py_obj)) return "dict" ; if (PyList_Check( py_obj)) return "list" ; if (PyTuple_Check( py_obj)) return "tuple" ; if (PyFile_Check( py_obj)) return "file" ; if (PyModule_Check( py_obj)) return "module" ; if (PyInstance_Check(py_obj)) return "instance" ; return "unkown type"; } /* Given a NumPy typecode, return a string describing the type. */ char* typecode_string(int typecode) { static char* type_names[25] = {"bool", "byte", "unsigned byte", "short", "unsigned short", "int", "unsigned int", "long", "unsigned long", "long long", "unsigned long long", "float", "double", "long double", "complex float", "complex double", "complex long double", "object", "string", "unicode", "void", "ntypes", "notype", "char", "unknown"}; return typecode < 24 ? type_names[typecode] : type_names[24]; } /* Make sure input has correct numpy type. Allow character and byte * to match. Also allow int and long to match. This is deprecated. * You should use PyArray_EquivTypenums() instead. */ int type_match(int actual_type, int desired_type) { return PyArray_EquivTypenums(actual_type, desired_type); } } /**********************************************************************/ %fragment("NumPy_Object_to_Array", "header", fragment="NumPy_Backward_Compatibility", fragment="NumPy_Macros", fragment="NumPy_Utilities") { /* Given a PyObject pointer, cast it to a PyArrayObject pointer if * legal. If not, set the python error string appropriately and * return NULL. */ PyArrayObject* obj_to_array_no_conversion(PyObject* input, int typecode) { PyArrayObject* ary = NULL; if (is_array(input) && (typecode == NPY_NOTYPE || PyArray_EquivTypenums(array_type(input), typecode))) { ary = (PyArrayObject*) input; } else if is_array(input) { char* desired_type = typecode_string(typecode); char* actual_type = typecode_string(array_type(input)); PyErr_Format(PyExc_TypeError, "Array of type '%s' required. Array of type '%s' given", desired_type, actual_type); ary = NULL; } else { char * desired_type = typecode_string(typecode); char * actual_type = pytype_string(input); PyErr_Format(PyExc_TypeError, "Array of type '%s' required. A '%s' was given", desired_type, actual_type); ary = NULL; } return ary; } /* Convert the given PyObject to a NumPy array with the given * typecode. On success, return a valid PyArrayObject* with the * correct type. On failure, the python error string will be set and * the routine returns NULL. */ PyArrayObject* obj_to_array_allow_conversion(PyObject* input, int typecode, int* is_new_object) { PyArrayObject* ary = NULL; PyObject* py_obj; if (is_array(input) && (typecode == NPY_NOTYPE || PyArray_EquivTypenums(array_type(input),typecode))) { ary = (PyArrayObject*) input; *is_new_object = 0; } else { py_obj = PyArray_FromObject(input, typecode, 0, 0); /* If NULL, PyArray_FromObject will have set python error value.*/ ary = (PyArrayObject*) py_obj; *is_new_object = 1; } return ary; } /* Given a PyArrayObject, check to see if it is contiguous. If so, * return the input pointer and flag it as not a new object. If it is * not contiguous, create a new PyArrayObject using the original data, * flag it as a new object and return the pointer. */ PyArrayObject* make_contiguous(PyArrayObject* ary, int* is_new_object, int min_dims, int max_dims) { PyArrayObject* result; if (array_is_contiguous(ary)) { result = ary; *is_new_object = 0; } else { result = (PyArrayObject*) PyArray_ContiguousFromObject((PyObject*)ary, array_type(ary), min_dims, max_dims); *is_new_object = 1; } return result; } /* Convert a given PyObject to a contiguous PyArrayObject of the * specified type. If the input object is not a contiguous * PyArrayObject, a new one will be created and the new object flag * will be set. */ PyArrayObject* obj_to_array_contiguous_allow_conversion(PyObject* input, int typecode, int* is_new_object) { int is_new1 = 0; int is_new2 = 0; PyArrayObject* ary2; PyArrayObject* ary1 = obj_to_array_allow_conversion(input, typecode, &is_new1); if (ary1) { ary2 = make_contiguous(ary1, &is_new2, 0, 0); if ( is_new1 && is_new2) { Py_DECREF(ary1); } ary1 = ary2; } *is_new_object = is_new1 || is_new2; return ary1; } } /**********************************************************************/ %fragment("NumPy_Array_Requirements", "header", fragment="NumPy_Backward_Compatibility", fragment="NumPy_Macros") { /* Test whether a python object is contiguous. If array is * contiguous, return 1. Otherwise, set the python error string and * return 0. */ int require_contiguous(PyArrayObject* ary) { int contiguous = 1; if (!array_is_contiguous(ary)) { PyErr_SetString(PyExc_TypeError, "Array must be contiguous. A non-contiguous array was given"); contiguous = 0; } return contiguous; } /* Require that a numpy array is not byte-swapped. If the array is * not byte-swapped, return 1. Otherwise, set the python error string * and return 0. */ int require_native(PyArrayObject* ary) { int native = 1; if (!array_is_native(ary)) { PyErr_SetString(PyExc_TypeError, "Array must have native byteorder. " "A byte-swapped array was given"); native = 0; } return native; } /* Require the given PyArrayObject to have a specified number of * dimensions. If the array has the specified number of dimensions, * return 1. Otherwise, set the python error string and return 0. */ int require_dimensions(PyArrayObject* ary, int exact_dimensions) { int success = 1; if (array_numdims(ary) != exact_dimensions) { PyErr_Format(PyExc_TypeError, "Array must have %d dimensions. Given array has %d dimensions", exact_dimensions, array_numdims(ary)); success = 0; } return success; } /* Require the given PyArrayObject to have one of a list of specified * number of dimensions. If the array has one of the specified number * of dimensions, return 1. Otherwise, set the python error string * and return 0. */ int require_dimensions_n(PyArrayObject* ary, int* exact_dimensions, int n) { int success = 0; int i; char dims_str[255] = ""; char s[255]; for (i = 0; i < n && !success; i++) { if (array_numdims(ary) == exact_dimensions[i]) { success = 1; } } if (!success) { for (i = 0; i < n-1; i++) { sprintf(s, "%d, ", exact_dimensions[i]); strcat(dims_str,s); } sprintf(s, " or %d", exact_dimensions[n-1]); strcat(dims_str,s); PyErr_Format(PyExc_TypeError, "Array must have %s dimensions. Given array has %d dimensions", dims_str, array_numdims(ary)); } return success; } /* Require the given PyArrayObject to have a specified shape. If the * array has the specified shape, return 1. Otherwise, set the python * error string and return 0. */ int require_size(PyArrayObject* ary, npy_intp* size, int n) { int i; int success = 1; int len; char desired_dims[255] = "["; char s[255]; char actual_dims[255] = "["; for(i=0; i < n;i++) { if (size[i] != -1 && size[i] != array_size(ary,i)) { success = 0; } } if (!success) { for (i = 0; i < n; i++) { if (size[i] == -1) { sprintf(s, "*,"); } else { sprintf(s, "%ld,", (long int)size[i]); } strcat(desired_dims,s); } len = strlen(desired_dims); desired_dims[len-1] = ']'; for (i = 0; i < n; i++) { sprintf(s, "%ld,", (long int)array_size(ary,i)); strcat(actual_dims,s); } len = strlen(actual_dims); actual_dims[len-1] = ']'; PyErr_Format(PyExc_TypeError, "Array must have shape of %s. Given array has shape of %s", desired_dims, actual_dims); } return success; } /* Require the given PyArrayObject to to be FORTRAN ordered. If the * the PyArrayObject is already FORTRAN ordered, do nothing. Else, * set the FORTRAN ordering flag and recompute the strides. */ int require_fortran(PyArrayObject* ary) { int success = 1; int nd = array_numdims(ary); int i; if (array_is_fortran(ary)) return success; /* Set the FORTRAN ordered flag */ ary->flags = NPY_FARRAY; /* Recompute the strides */ ary->strides[0] = ary->strides[nd-1]; for (i=1; i < nd; ++i) ary->strides[i] = ary->strides[i-1] * array_size(ary,i-1); return success; } } /* Combine all NumPy fragments into one for convenience */ %fragment("NumPy_Fragments", "header", fragment="NumPy_Backward_Compatibility", fragment="NumPy_Macros", fragment="NumPy_Utilities", fragment="NumPy_Object_to_Array", fragment="NumPy_Array_Requirements") { } /* End John Hunter translation (with modifications by Bill Spotz) */ /* %numpy_typemaps() macro * * This macro defines a family of 41 typemaps that allow C arguments * of the form * * (DATA_TYPE IN_ARRAY1[ANY]) * (DATA_TYPE* IN_ARRAY1, DIM_TYPE DIM1) * (DIM_TYPE DIM1, DATA_TYPE* IN_ARRAY1) * * (DATA_TYPE IN_ARRAY2[ANY][ANY]) * (DATA_TYPE* IN_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) * (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_ARRAY2) * (DATA_TYPE* IN_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) * (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_FARRAY2) * * (DATA_TYPE IN_ARRAY3[ANY][ANY][ANY]) * (DATA_TYPE* IN_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) * (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_ARRAY3) * (DATA_TYPE* IN_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) * (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_FARRAY3) * * (DATA_TYPE INPLACE_ARRAY1[ANY]) * (DATA_TYPE* INPLACE_ARRAY1, DIM_TYPE DIM1) * (DIM_TYPE DIM1, DATA_TYPE* INPLACE_ARRAY1) * * (DATA_TYPE INPLACE_ARRAY2[ANY][ANY]) * (DATA_TYPE* INPLACE_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) * (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_ARRAY2) * (DATA_TYPE* INPLACE_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) * (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_FARRAY2) * * (DATA_TYPE INPLACE_ARRAY3[ANY][ANY][ANY]) * (DATA_TYPE* INPLACE_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) * (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* INPLACE_ARRAY3) * (DATA_TYPE* INPLACE_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) * (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* INPLACE_FARRAY3) * * (DATA_TYPE ARGOUT_ARRAY1[ANY]) * (DATA_TYPE* ARGOUT_ARRAY1, DIM_TYPE DIM1) * (DIM_TYPE DIM1, DATA_TYPE* ARGOUT_ARRAY1) * * (DATA_TYPE ARGOUT_ARRAY2[ANY][ANY]) * * (DATA_TYPE ARGOUT_ARRAY3[ANY][ANY][ANY]) * * (DATA_TYPE** ARGOUTVIEW_ARRAY1, DIM_TYPE* DIM1) * (DIM_TYPE* DIM1, DATA_TYPE** ARGOUTVIEW_ARRAY1) * * (DATA_TYPE** ARGOUTVIEW_ARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) * (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEW_ARRAY2) * (DATA_TYPE** ARGOUTVIEW_FARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) * (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEW_FARRAY2) * * (DATA_TYPE** ARGOUTVIEW_ARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) * (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEW_ARRAY3) * (DATA_TYPE** ARGOUTVIEW_FARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) * (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEW_FARRAY3) * * where "DATA_TYPE" is any type supported by the NumPy module, and * "DIM_TYPE" is any int-like type suitable for specifying dimensions. * The difference between "ARRAY" typemaps and "FARRAY" typemaps is * that the "FARRAY" typemaps expect FORTRAN ordering of * multidimensional arrays. In python, the dimensions will not need * to be specified (except for the "DATA_TYPE* ARGOUT_ARRAY1" * typemaps). The IN_ARRAYs can be a numpy array or any sequence that * can be converted to a numpy array of the specified type. The * INPLACE_ARRAYs must be numpy arrays of the appropriate type. The * ARGOUT_ARRAYs will be returned as new numpy arrays of the * appropriate type. * * These typemaps can be applied to existing functions using the * %apply directive. For example: * * %apply (double* IN_ARRAY1, int DIM1) {(double* series, int length)}; * double prod(double* series, int length); * * %apply (int DIM1, int DIM2, double* INPLACE_ARRAY2) * {(int rows, int cols, double* matrix )}; * void floor(int rows, int cols, double* matrix, double f); * * %apply (double IN_ARRAY3[ANY][ANY][ANY]) * {(double tensor[2][2][2] )}; * %apply (double ARGOUT_ARRAY3[ANY][ANY][ANY]) * {(double low[2][2][2] )}; * %apply (double ARGOUT_ARRAY3[ANY][ANY][ANY]) * {(double upp[2][2][2] )}; * void luSplit(double tensor[2][2][2], * double low[2][2][2], * double upp[2][2][2] ); * * or directly with * * double prod(double* IN_ARRAY1, int DIM1); * * void floor(int DIM1, int DIM2, double* INPLACE_ARRAY2, double f); * * void luSplit(double IN_ARRAY3[ANY][ANY][ANY], * double ARGOUT_ARRAY3[ANY][ANY][ANY], * double ARGOUT_ARRAY3[ANY][ANY][ANY]); */ %define %numpy_typemaps(DATA_TYPE, DATA_TYPECODE, DIM_TYPE) /************************/ /* Input Array Typemaps */ /************************/ /* Typemap suite for (DATA_TYPE IN_ARRAY1[ANY]) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE IN_ARRAY1[ANY]) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE IN_ARRAY1[ANY]) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[1] = { $1_dim0 }; array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 1) || !require_size(array, size, 1)) SWIG_fail; $1 = ($1_ltype) array_data(array); } %typemap(freearg) (DATA_TYPE IN_ARRAY1[ANY]) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DATA_TYPE* IN_ARRAY1, DIM_TYPE DIM1) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE* IN_ARRAY1, DIM_TYPE DIM1) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE* IN_ARRAY1, DIM_TYPE DIM1) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[1] = { -1 }; array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 1) || !require_size(array, size, 1)) SWIG_fail; $1 = (DATA_TYPE*) array_data(array); $2 = (DIM_TYPE) array_size(array,0); } %typemap(freearg) (DATA_TYPE* IN_ARRAY1, DIM_TYPE DIM1) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DIM_TYPE DIM1, DATA_TYPE* IN_ARRAY1) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DIM_TYPE DIM1, DATA_TYPE* IN_ARRAY1) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DIM_TYPE DIM1, DATA_TYPE* IN_ARRAY1) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[1] = {-1}; array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 1) || !require_size(array, size, 1)) SWIG_fail; $1 = (DIM_TYPE) array_size(array,0); $2 = (DATA_TYPE*) array_data(array); } %typemap(freearg) (DIM_TYPE DIM1, DATA_TYPE* IN_ARRAY1) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DATA_TYPE IN_ARRAY2[ANY][ANY]) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE IN_ARRAY2[ANY][ANY]) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE IN_ARRAY2[ANY][ANY]) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[2] = { $1_dim0, $1_dim1 }; array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 2) || !require_size(array, size, 2)) SWIG_fail; $1 = ($1_ltype) array_data(array); } %typemap(freearg) (DATA_TYPE IN_ARRAY2[ANY][ANY]) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DATA_TYPE* IN_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE* IN_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE* IN_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[2] = { -1, -1 }; array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 2) || !require_size(array, size, 2)) SWIG_fail; $1 = (DATA_TYPE*) array_data(array); $2 = (DIM_TYPE) array_size(array,0); $3 = (DIM_TYPE) array_size(array,1); } %typemap(freearg) (DATA_TYPE* IN_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_ARRAY2) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_ARRAY2) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_ARRAY2) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[2] = { -1, -1 }; array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 2) || !require_size(array, size, 2)) SWIG_fail; $1 = (DIM_TYPE) array_size(array,0); $2 = (DIM_TYPE) array_size(array,1); $3 = (DATA_TYPE*) array_data(array); } %typemap(freearg) (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_ARRAY2) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DATA_TYPE* IN_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE* IN_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE* IN_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[2] = { -1, -1 }; array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 2) || !require_size(array, size, 2) || !require_fortran(array)) SWIG_fail; $1 = (DATA_TYPE*) array_data(array); $2 = (DIM_TYPE) array_size(array,0); $3 = (DIM_TYPE) array_size(array,1); } %typemap(freearg) (DATA_TYPE* IN_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_FARRAY2) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_FARRAY2) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_FARRAY2) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[2] = { -1, -1 }; array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 2) || !require_size(array, size, 2) || !require_fortran(array)) SWIG_fail; $1 = (DIM_TYPE) array_size(array,0); $2 = (DIM_TYPE) array_size(array,1); $3 = (DATA_TYPE*) array_data(array); } %typemap(freearg) (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_FARRAY2) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DATA_TYPE IN_ARRAY3[ANY][ANY][ANY]) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE IN_ARRAY3[ANY][ANY][ANY]) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE IN_ARRAY3[ANY][ANY][ANY]) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[3] = { $1_dim0, $1_dim1, $1_dim2 }; array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 3) || !require_size(array, size, 3)) SWIG_fail; $1 = ($1_ltype) array_data(array); } %typemap(freearg) (DATA_TYPE IN_ARRAY3[ANY][ANY][ANY]) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DATA_TYPE* IN_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, * DIM_TYPE DIM3) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE* IN_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE* IN_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[3] = { -1, -1, -1 }; array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 3) || !require_size(array, size, 3)) SWIG_fail; $1 = (DATA_TYPE*) array_data(array); $2 = (DIM_TYPE) array_size(array,0); $3 = (DIM_TYPE) array_size(array,1); $4 = (DIM_TYPE) array_size(array,2); } %typemap(freearg) (DATA_TYPE* IN_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, * DATA_TYPE* IN_ARRAY3) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_ARRAY3) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_ARRAY3) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[3] = { -1, -1, -1 }; array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 3) || !require_size(array, size, 3)) SWIG_fail; $1 = (DIM_TYPE) array_size(array,0); $2 = (DIM_TYPE) array_size(array,1); $3 = (DIM_TYPE) array_size(array,2); $4 = (DATA_TYPE*) array_data(array); } %typemap(freearg) (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_ARRAY3) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DATA_TYPE* IN_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, * DIM_TYPE DIM3) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE* IN_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE* IN_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[3] = { -1, -1, -1 }; array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 3) || !require_size(array, size, 3) | !require_fortran(array)) SWIG_fail; $1 = (DATA_TYPE*) array_data(array); $2 = (DIM_TYPE) array_size(array,0); $3 = (DIM_TYPE) array_size(array,1); $4 = (DIM_TYPE) array_size(array,2); } %typemap(freearg) (DATA_TYPE* IN_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, * DATA_TYPE* IN_FARRAY3) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_FARRAY3) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_FARRAY3) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[3] = { -1, -1, -1 }; array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 3) || !require_size(array, size, 3) || !require_fortran(array)) SWIG_fail; $1 = (DIM_TYPE) array_size(array,0); $2 = (DIM_TYPE) array_size(array,1); $3 = (DIM_TYPE) array_size(array,2); $4 = (DATA_TYPE*) array_data(array); } %typemap(freearg) (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_FARRAY3) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /***************************/ /* In-Place Array Typemaps */ /***************************/ /* Typemap suite for (DATA_TYPE INPLACE_ARRAY1[ANY]) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE INPLACE_ARRAY1[ANY]) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE INPLACE_ARRAY1[ANY]) (PyArrayObject* array=NULL) { npy_intp size[1] = { $1_dim0 }; array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,1) || !require_size(array, size, 1) || !require_contiguous(array) || !require_native(array)) SWIG_fail; $1 = ($1_ltype) array_data(array); } /* Typemap suite for (DATA_TYPE* INPLACE_ARRAY1, DIM_TYPE DIM1) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE* INPLACE_ARRAY1, DIM_TYPE DIM1) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE* INPLACE_ARRAY1, DIM_TYPE DIM1) (PyArrayObject* array=NULL, int i=1) { array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,1) || !require_contiguous(array) || !require_native(array)) SWIG_fail; $1 = (DATA_TYPE*) array_data(array); $2 = 1; for (i=0; i < array_numdims(array); ++i) $2 *= array_size(array,i); } /* Typemap suite for (DIM_TYPE DIM1, DATA_TYPE* INPLACE_ARRAY1) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DIM_TYPE DIM1, DATA_TYPE* INPLACE_ARRAY1) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DIM_TYPE DIM1, DATA_TYPE* INPLACE_ARRAY1) (PyArrayObject* array=NULL, int i=0) { array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,1) || !require_contiguous(array) || !require_native(array)) SWIG_fail; $1 = 1; for (i=0; i < array_numdims(array); ++i) $1 *= array_size(array,i); $2 = (DATA_TYPE*) array_data(array); } /* Typemap suite for (DATA_TYPE INPLACE_ARRAY2[ANY][ANY]) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE INPLACE_ARRAY2[ANY][ANY]) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE INPLACE_ARRAY2[ANY][ANY]) (PyArrayObject* array=NULL) { npy_intp size[2] = { $1_dim0, $1_dim1 }; array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,2) || !require_size(array, size, 2) || !require_contiguous(array) || !require_native(array)) SWIG_fail; $1 = ($1_ltype) array_data(array); } /* Typemap suite for (DATA_TYPE* INPLACE_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE* INPLACE_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE* INPLACE_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) (PyArrayObject* array=NULL) { array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,2) || !require_contiguous(array) || !require_native(array)) SWIG_fail; $1 = (DATA_TYPE*) array_data(array); $2 = (DIM_TYPE) array_size(array,0); $3 = (DIM_TYPE) array_size(array,1); } /* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_ARRAY2) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_ARRAY2) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_ARRAY2) (PyArrayObject* array=NULL) { array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,2) || !require_contiguous(array) || !require_native(array)) SWIG_fail; $1 = (DIM_TYPE) array_size(array,0); $2 = (DIM_TYPE) array_size(array,1); $3 = (DATA_TYPE*) array_data(array); } /* Typemap suite for (DATA_TYPE* INPLACE_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE* INPLACE_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE* INPLACE_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) (PyArrayObject* array=NULL) { array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,2) || !require_contiguous(array) || !require_native(array) || !require_fortran(array)) SWIG_fail; $1 = (DATA_TYPE*) array_data(array); $2 = (DIM_TYPE) array_size(array,0); $3 = (DIM_TYPE) array_size(array,1); } /* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_FARRAY2) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_FARRAY2) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_FARRAY2) (PyArrayObject* array=NULL) { array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,2) || !require_contiguous(array) || !require_native(array) || !require_fortran(array)) SWIG_fail; $1 = (DIM_TYPE) array_size(array,0); $2 = (DIM_TYPE) array_size(array,1); $3 = (DATA_TYPE*) array_data(array); } /* Typemap suite for (DATA_TYPE INPLACE_ARRAY3[ANY][ANY][ANY]) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE INPLACE_ARRAY3[ANY][ANY][ANY]) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE INPLACE_ARRAY3[ANY][ANY][ANY]) (PyArrayObject* array=NULL) { npy_intp size[3] = { $1_dim0, $1_dim1, $1_dim2 }; array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,3) || !require_size(array, size, 3) || !require_contiguous(array) || !require_native(array)) SWIG_fail; $1 = ($1_ltype) array_data(array); } /* Typemap suite for (DATA_TYPE* INPLACE_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, * DIM_TYPE DIM3) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE* INPLACE_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE* INPLACE_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) (PyArrayObject* array=NULL) { array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,3) || !require_contiguous(array) || !require_native(array)) SWIG_fail; $1 = (DATA_TYPE*) array_data(array); $2 = (DIM_TYPE) array_size(array,0); $3 = (DIM_TYPE) array_size(array,1); $4 = (DIM_TYPE) array_size(array,2); } /* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, * DATA_TYPE* INPLACE_ARRAY3) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* INPLACE_ARRAY3) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* INPLACE_ARRAY3) (PyArrayObject* array=NULL) { array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,3) || !require_contiguous(array) || !require_native(array)) SWIG_fail; $1 = (DIM_TYPE) array_size(array,0); $2 = (DIM_TYPE) array_size(array,1); $3 = (DIM_TYPE) array_size(array,2); $4 = (DATA_TYPE*) array_data(array); } /* Typemap suite for (DATA_TYPE* INPLACE_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, * DIM_TYPE DIM3) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE* INPLACE_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE* INPLACE_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) (PyArrayObject* array=NULL) { array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,3) || !require_contiguous(array) || !require_native(array) || !require_fortran(array)) SWIG_fail; $1 = (DATA_TYPE*) array_data(array); $2 = (DIM_TYPE) array_size(array,0); $3 = (DIM_TYPE) array_size(array,1); $4 = (DIM_TYPE) array_size(array,2); } /* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, * DATA_TYPE* INPLACE_FARRAY3) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* INPLACE_FARRAY3) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* INPLACE_FARRAY3) (PyArrayObject* array=NULL) { array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,3) || !require_contiguous(array) || !require_native(array) || !require_fortran(array)) SWIG_fail; $1 = (DIM_TYPE) array_size(array,0); $2 = (DIM_TYPE) array_size(array,1); $3 = (DIM_TYPE) array_size(array,2); $4 = (DATA_TYPE*) array_data(array); } /*************************/ /* Argout Array Typemaps */ /*************************/ /* Typemap suite for (DATA_TYPE ARGOUT_ARRAY1[ANY]) */ %typemap(in,numinputs=0, fragment="NumPy_Backward_Compatibility,NumPy_Macros") (DATA_TYPE ARGOUT_ARRAY1[ANY]) (PyObject * array = NULL) { npy_intp dims[1] = { $1_dim0 }; array = PyArray_SimpleNew(1, dims, DATA_TYPECODE); if (!array) SWIG_fail; $1 = ($1_ltype) array_data(array); } %typemap(argout) (DATA_TYPE ARGOUT_ARRAY1[ANY]) { $result = SWIG_Python_AppendOutput($result,array$argnum); } /* Typemap suite for (DATA_TYPE* ARGOUT_ARRAY1, DIM_TYPE DIM1) */ %typemap(in,numinputs=1, fragment="NumPy_Fragments") (DATA_TYPE* ARGOUT_ARRAY1, DIM_TYPE DIM1) (PyObject * array = NULL) { npy_intp dims[1]; if (!PyInt_Check($input)) { char* typestring = pytype_string($input); PyErr_Format(PyExc_TypeError, "Int dimension expected. '%s' given.", typestring); SWIG_fail; } $2 = (DIM_TYPE) PyInt_AsLong($input); dims[0] = (npy_intp) $2; array = PyArray_SimpleNew(1, dims, DATA_TYPECODE); if (!array) SWIG_fail; $1 = (DATA_TYPE*) array_data(array); } %typemap(argout) (DATA_TYPE* ARGOUT_ARRAY1, DIM_TYPE DIM1) { $result = SWIG_Python_AppendOutput($result,array$argnum); } /* Typemap suite for (DIM_TYPE DIM1, DATA_TYPE* ARGOUT_ARRAY1) */ %typemap(in,numinputs=1, fragment="NumPy_Fragments") (DIM_TYPE DIM1, DATA_TYPE* ARGOUT_ARRAY1) (PyObject * array = NULL) { npy_intp dims[1]; if (!PyInt_Check($input)) { char* typestring = pytype_string($input); PyErr_Format(PyExc_TypeError, "Int dimension expected. '%s' given.", typestring); SWIG_fail; } $1 = (DIM_TYPE) PyInt_AsLong($input); dims[0] = (npy_intp) $1; array = PyArray_SimpleNew(1, dims, DATA_TYPECODE); if (!array) SWIG_fail; $2 = (DATA_TYPE*) array_data(array); } %typemap(argout) (DIM_TYPE DIM1, DATA_TYPE* ARGOUT_ARRAY1) { $result = SWIG_Python_AppendOutput($result,array$argnum); } /* Typemap suite for (DATA_TYPE ARGOUT_ARRAY2[ANY][ANY]) */ %typemap(in,numinputs=0, fragment="NumPy_Backward_Compatibility,NumPy_Macros") (DATA_TYPE ARGOUT_ARRAY2[ANY][ANY]) (PyObject * array = NULL) { npy_intp dims[2] = { $1_dim0, $1_dim1 }; array = PyArray_SimpleNew(2, dims, DATA_TYPECODE); if (!array) SWIG_fail; $1 = ($1_ltype) array_data(array); } %typemap(argout) (DATA_TYPE ARGOUT_ARRAY2[ANY][ANY]) { $result = SWIG_Python_AppendOutput($result,array$argnum); } /* Typemap suite for (DATA_TYPE ARGOUT_ARRAY3[ANY][ANY][ANY]) */ %typemap(in,numinputs=0, fragment="NumPy_Backward_Compatibility,NumPy_Macros") (DATA_TYPE ARGOUT_ARRAY3[ANY][ANY][ANY]) (PyObject * array = NULL) { npy_intp dims[3] = { $1_dim0, $1_dim1, $1_dim2 }; array = PyArray_SimpleNew(3, dims, DATA_TYPECODE); if (!array) SWIG_fail; $1 = ($1_ltype) array_data(array); } %typemap(argout) (DATA_TYPE ARGOUT_ARRAY3[ANY][ANY][ANY]) { $result = SWIG_Python_AppendOutput($result,array$argnum); } /*****************************/ /* Argoutview Array Typemaps */ /*****************************/ /* Typemap suite for (DATA_TYPE** ARGOUTVIEW_ARRAY1, DIM_TYPE* DIM1) */ %typemap(in,numinputs=0) (DATA_TYPE** ARGOUTVIEW_ARRAY1, DIM_TYPE* DIM1 ) (DATA_TYPE* data_temp , DIM_TYPE dim_temp) { $1 = &data_temp; $2 = &dim_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility") (DATA_TYPE** ARGOUTVIEW_ARRAY1, DIM_TYPE* DIM1) { npy_intp dims[1] = { *$2 }; PyObject * array = PyArray_SimpleNewFromData(1, dims, DATA_TYPECODE, (void*)(*$1)); if (!array) SWIG_fail; $result = SWIG_Python_AppendOutput($result,array); } /* Typemap suite for (DIM_TYPE* DIM1, DATA_TYPE** ARGOUTVIEW_ARRAY1) */ %typemap(in,numinputs=0) (DIM_TYPE* DIM1 , DATA_TYPE** ARGOUTVIEW_ARRAY1) (DIM_TYPE dim_temp, DATA_TYPE* data_temp ) { $1 = &dim_temp; $2 = &data_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility") (DIM_TYPE* DIM1, DATA_TYPE** ARGOUTVIEW_ARRAY1) { npy_intp dims[1] = { *$1 }; PyObject * array = PyArray_SimpleNewFromData(1, dims, DATA_TYPECODE, (void*)(*$2)); if (!array) SWIG_fail; $result = SWIG_Python_AppendOutput($result,array); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEW_ARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) */ %typemap(in,numinputs=0) (DATA_TYPE** ARGOUTVIEW_ARRAY2, DIM_TYPE* DIM1 , DIM_TYPE* DIM2 ) (DATA_TYPE* data_temp , DIM_TYPE dim1_temp, DIM_TYPE dim2_temp) { $1 = &data_temp; $2 = &dim1_temp; $3 = &dim2_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility") (DATA_TYPE** ARGOUTVIEW_ARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) { npy_intp dims[2] = { *$2, *$3 }; PyObject * array = PyArray_SimpleNewFromData(2, dims, DATA_TYPECODE, (void*)(*$1)); if (!array) SWIG_fail; $result = SWIG_Python_AppendOutput($result,array); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEW_ARRAY2) */ %typemap(in,numinputs=0) (DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DATA_TYPE** ARGOUTVIEW_ARRAY2) (DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DATA_TYPE* data_temp ) { $1 = &dim1_temp; $2 = &dim2_temp; $3 = &data_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility") (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEW_ARRAY2) { npy_intp dims[2] = { *$1, *$2 }; PyObject * array = PyArray_SimpleNewFromData(2, dims, DATA_TYPECODE, (void*)(*$3)); if (!array) SWIG_fail; $result = SWIG_Python_AppendOutput($result,array); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEW_FARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) */ %typemap(in,numinputs=0) (DATA_TYPE** ARGOUTVIEW_FARRAY2, DIM_TYPE* DIM1 , DIM_TYPE* DIM2 ) (DATA_TYPE* data_temp , DIM_TYPE dim1_temp, DIM_TYPE dim2_temp) { $1 = &data_temp; $2 = &dim1_temp; $3 = &dim2_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements") (DATA_TYPE** ARGOUTVIEW_FARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) { npy_intp dims[2] = { *$2, *$3 }; PyObject * obj = PyArray_SimpleNewFromData(2, dims, DATA_TYPECODE, (void*)(*$1)); PyArrayObject * array = (PyArrayObject*) obj; if (!array || !require_fortran(array)) SWIG_fail; $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEW_FARRAY2) */ %typemap(in,numinputs=0) (DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DATA_TYPE** ARGOUTVIEW_FARRAY2) (DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DATA_TYPE* data_temp ) { $1 = &dim1_temp; $2 = &dim2_temp; $3 = &data_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements") (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEW_FARRAY2) { npy_intp dims[2] = { *$1, *$2 }; PyObject * obj = PyArray_SimpleNewFromData(2, dims, DATA_TYPECODE, (void*)(*$3)); PyArrayObject * array = (PyArrayObject*) obj; if (!array || !require_fortran(array)) SWIG_fail; $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEW_ARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) */ %typemap(in,numinputs=0) (DATA_TYPE** ARGOUTVIEW_ARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) (DATA_TYPE* data_temp, DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp) { $1 = &data_temp; $2 = &dim1_temp; $3 = &dim2_temp; $4 = &dim3_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility") (DATA_TYPE** ARGOUTVIEW_ARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) { npy_intp dims[3] = { *$2, *$3, *$4 }; PyObject * array = PyArray_SimpleNewFromData(3, dims, DATA_TYPECODE, (void*)(*$1)); if (!array) SWIG_fail; $result = SWIG_Python_AppendOutput($result,array); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEW_ARRAY3) */ %typemap(in,numinputs=0) (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEW_ARRAY3) (DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp, DATA_TYPE* data_temp) { $1 = &dim1_temp; $2 = &dim2_temp; $3 = &dim3_temp; $4 = &data_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility") (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEW_ARRAY3) { npy_intp dims[3] = { *$1, *$2, *$3 }; PyObject * array = PyArray_SimpleNewFromData(3, dims, DATA_TYPECODE, (void*)(*$3)); if (!array) SWIG_fail; $result = SWIG_Python_AppendOutput($result,array); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEW_FARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) */ %typemap(in,numinputs=0) (DATA_TYPE** ARGOUTVIEW_FARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) (DATA_TYPE* data_temp, DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp) { $1 = &data_temp; $2 = &dim1_temp; $3 = &dim2_temp; $4 = &dim3_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements") (DATA_TYPE** ARGOUTVIEW_FARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) { npy_intp dims[3] = { *$2, *$3, *$4 }; PyObject * obj = PyArray_SimpleNewFromData(3, dims, DATA_TYPECODE, (void*)(*$1)); PyArrayObject * array = (PyArrayObject*) obj; if (!array || require_fortran(array)) SWIG_fail; $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEW_FARRAY3) */ %typemap(in,numinputs=0) (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEW_FARRAY3) (DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp, DATA_TYPE* data_temp) { $1 = &dim1_temp; $2 = &dim2_temp; $3 = &dim3_temp; $4 = &data_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements") (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEW_FARRAY3) { npy_intp dims[3] = { *$1, *$2, *$3 }; PyObject * obj = PyArray_SimpleNewFromData(3, dims, DATA_TYPECODE, (void*)(*$3)); PyArrayObject * array = (PyArrayObject*) obj; if (!array || require_fortran(array)) SWIG_fail; $result = SWIG_Python_AppendOutput($result,obj); } %enddef /* %numpy_typemaps() macro */ /* *************************************************************** */ /* Concrete instances of the %numpy_typemaps() macro: Each invocation * below applies all of the typemaps above to the specified data type. */ %numpy_typemaps(signed char , NPY_BYTE , int) %numpy_typemaps(unsigned char , NPY_UBYTE , int) %numpy_typemaps(short , NPY_SHORT , int) %numpy_typemaps(unsigned short , NPY_USHORT , int) %numpy_typemaps(int , NPY_INT , int) %numpy_typemaps(unsigned int , NPY_UINT , int) %numpy_typemaps(long , NPY_LONG , int) %numpy_typemaps(unsigned long , NPY_ULONG , int) %numpy_typemaps(long long , NPY_LONGLONG , int) %numpy_typemaps(unsigned long long, NPY_ULONGLONG, int) %numpy_typemaps(float , NPY_FLOAT , int) %numpy_typemaps(double , NPY_DOUBLE , int) /* *************************************************************** * The follow macro expansion does not work, because C++ bool is 4 * bytes and NPY_BOOL is 1 byte * * %numpy_typemaps(bool, NPY_BOOL, int) */ /* *************************************************************** * On my Mac, I get the following warning for this macro expansion: * 'swig/python detected a memory leak of type 'long double *', no destructor found.' * * %numpy_typemaps(long double, NPY_LONGDOUBLE, int) */ /* *************************************************************** * Swig complains about a syntax error for the following macro * expansions: * * %numpy_typemaps(complex float, NPY_CFLOAT , int) * * %numpy_typemaps(complex double, NPY_CDOUBLE, int) * * %numpy_typemaps(complex long double, NPY_CLONGDOUBLE, int) */ #endif /* SWIGPYTHON */ SndObj-2.6.7/python/numpy_test.py000755 000766 000024 00000002242 12062673766 017503 0ustar00victorstaff000000 000000 from sndobj import SndObj, SndRTIO, HarmTable, Oscili, SND_OUTPUT from scipy import zeros, pi, sin, float32 from pylab import plot, show # --------------------------------------------------------------------------- # Test PushIn # Create 1 frame of a sine wave in a numpy array sine = zeros(256, dtype=float32) for i in range(sine.size): sine[i] = 0.5 * sin((2 * pi * i) / sine.size) sine *= 32768 obj = SndObj() obj.PushIn(sine) outp = SndRTIO(1, SND_OUTPUT) outp.SetOutput(1, obj) # Repeatedly output the 1 frame of sine wave duration = outp.GetSr() * 2 # 2 seconds i = 0 vector_size = outp.GetVectorSize() while i < duration: outp.Write() i += vector_size # --------------------------------------------------------------------------- # Test PopOut # copy a sine wave generated by a SndObj into a numpy array output_size = 2048 harm = HarmTable(10000,1,1) osc = Oscili(harm, 440, 10000) output = zeros(output_size, dtype=float32) duration = output_size # output_size samples i = 0 vector_size = osc.GetVectorSize() while i < duration: osc.DoProcess() osc.PopOut(output[i:i+vector_size]) i += vector_size # plot the array plot(output) show() SndObj-2.6.7/python/oscilloscope.py000644 000766 000024 00000002107 12062673766 017767 0ustar00victorstaff000000 000000 #!/usr/bin/python ##################################### # oscilloscope example # # VL, 01/07 from sndobj import * from Tkinter import * import display import array # window size, refresh interval and norm factor window_size = 300 time_interval = 0.1 norm = 32768.0 # display callback def callb(data): sig = array.array('f') osc = data[0] disp = data[1] for i in range(0,osc.GetVectorSize()): sig.append(osc.Output(i)/norm) disp.draw(sig,time_interval*osc.GetSr()) # SndObj chain and process thread harm = HarmTable(10000,1,1) mod = Oscili(harm, 10, 10000) osc = Oscili(harm, 400, 0) outp = SndRTIO(1, SND_OUTPUT, 4096) outp.SetOutput(1, osc) thread = SndThread() # display object master = Tk() disp = display.Oscilloscope(master, window_size, thread.ProcOff, "green", "black") dat = (osc,disp) # thread set-up thread.SetProcessCallback(callb, dat) thread.AddObj(mod) thread.AddObj(osc) thread.AddObj(outp, SNDIO_OUT) thread.ProcOn() # switch the sound after 2.5 s master.after(2500, osc.SetAmp,10000,mod) # run the display disp.mainloop() SndObj-2.6.7/python/setup.py000755 000766 000024 00000000543 12062673766 016436 0ustar00victorstaff000000 000000 from distutils.core import setup setup(name='SndObj', version='2.6.99', description='SndObj Library', author='Victor Lazzarini', author_email='Victor.Lazzarini@nuim.ie', url='http://sndobj.sourceforget.net', packages=['sndobj'], package_data={'sndobj': ['*.pyd', '*.dll', '*.lib', '*.exp']}, ) SndObj-2.6.7/python/spectrum.py000644 000766 000024 00000002200 12062673766 017125 0ustar00victorstaff000000 000000 #!/usr/bin/python ##################################### # spectrum example # # VL, 01/07 from sndobj import * from Tkinter import * import array import display # window size, refresh interval, norm factor # highest frequency of display window_size = 300 time_interval = 0.1 norm = 32768.0/10 highest = 10000 # display callback def callb(data): re = array.array('f') im = array.array('f') fft = data[0] disp = data[1] sr = fft.GetSr() end = int(fft.GetFFTSize()*2*highest/sr) for i in range(0,end,2): re.append(fft.Output(i)/norm) im.append(fft.Output(i+1)/norm) if not disp.error: disp.draw(re,im,(sr/fft.GetHopSize())*time_interval) # SndObj chain and process thread win = HammingTable(1024,0.5) thread = SndThread() inp = SndRTIO(1, SND_INPUT) sig = SndIn(inp, 1) fft = FFT(win,sig); # display object disp = display.Spectrum(Tk(), window_size, thread.ProcOff, "red", "blue") dat = (fft,disp) # thread set-up thread.SetProcessCallback(callb, dat) thread.AddObj(inp, SNDIO_IN) thread.AddObj(sig) thread.AddObj(fft) thread.ProcOn() # run the display disp.mainloop() SndObj-2.6.7/python/test.py000644 000766 000024 00000001417 12062673766 016253 0ustar00victorstaff000000 000000 from sndobj import * import time import sys class test: def get(self): return self.i def set(self,val): self.i = val def __init__(self,val): self.i = val def callb(data): data[0].SetFreq(data[1].get(),data[2]) data[1].set(data[1].get()+1) def callc(data): data[0].SetFreq(data[1].get(),data[2]) data[1].set(data[1].get()-1) t = SndRTThread() harm = HarmTable(10000,1,1) osc = Oscili(harm, 440, 10000) mod = Oscili(harm, 2, 5) osc.SetFreq(440, mod) tes = test(100) dat = (osc, tes, mod) t.SetProcessCallback(callb, dat) t.AddObj(mod) t.AddOutput(1, osc) t.ProcOn() time.sleep(2) t.LimitVectorSize(64) tes.set(100) time.sleep(2) t.SetProcessCallback(callc,dat) tes.set(1000) t.RestoreVectorSize() time.sleep(2) t.ProcOff() SndObj-2.6.7/python/lib/thisis000644 000766 000024 00000000014 12062673766 016706 0ustar00victorstaff000000 000000 placeholder SndObj-2.6.7/java/AudioDefs.i000755 000766 000024 00000024413 12062673766 016343 0ustar00victorstaff000000 000000 // Copyright (c)Victor Lazzarini, 1997-2004 // See License.txt for a disclaimer of all warranties // and licensing information // AudioDefs.i SndObj Wrapper Interface %module(directors="1") jsndobj %{ #ifndef NOPTHREAD #include "SndThread.h" // needs pthread library #endif // Base Classes #include "SndObj.h" #include "SndIO.h" #include "Table.h" // SndObj-derived #include "Oscil.h" // Oscillators #include "Oscilt.h" #include "Oscili.h" #include "FastOsc.h" #include "Osc.h" #include "Osci.h" #include "SndIn.h" // Sound input #include "SndRead.h" // audio file input #if defined(OSS) || defined(SGI) || defined(WIN) #include "MidiIn.h" // Midi input #include "Bend.h" // pitch bend #include "MidiMap.h" #endif #include "ADSR.h" // Envelopes #include "IADSR.h" #include "Buzz.h" // Buzzer #include "Balance.h" // Balance of signals #include "DelayLine.h" // Delay line #include "Tap.h" // Truncating tap #include "Tapi.h" // Time-varying tap #include "Comb.h" // Comb filter #include "Allpass.h" // Allpass filter #include "StringFlt.h" // String filter #include "Pluck.h" // Karplus-Strong #include "VDelay.h" // Variable delay #include "Pitch.h" // Pitch transposer #include "Loop.h" // Looping #include "Fir.h" // direct convolution #include "Filter.h" // Fixed-freq/BW reson #include "TpTz.h" // Two-pole Two-zero #include "Reson.h" // Variable reson #include "Lp.h" // Variable LP with resonance #include "ButtBP.h" // Butterworth filters #include "ButtBR.h" #include "ButtHP.h" #include "ButtLP.h" #include "Ap.h" // 2nd order all-pass #include "LowPass.h" // 1st order LP #include "HiPass.h" // 1st order HP #include "Hilb.h" // Hilbert transformer #include "SyncGrain.h" // granular synthesis #include "Mix.h" // Mixer #include "Pan.h" // panning #include "Gain.h" // gain #include "Interp.h" // curve segments #include "Phase.h" // phase accumulator #include "Ring.h" // general-purpose multiplier #include "Unit.h" // test signals #include "Lookup.h" // table lookup #include "Lookupi.h" #include "Rand.h" // Noise #include "Randh.h" // Band-limited noise #include "Randi.h" // interpolated // Spectral stuff #include "FFT.h" // windowed overlapping FFT #include "IFFT.h" // overlap-add IFFT #include "PVA.h" // pvoc analysis/synthesis #include "PVS.h" #include "PVRead.h" #include "IFGram.h" #include "SinAnal.h" // sinusoidal analysis #include "SinSyn.h" // sinusoidal resynthesis #include "AdSyn.h" // additive resynthesis #include "ReSyn.h" // additive resynthesis #include "IFAdd.h" // additive resynthesis #include "SpecMult.h" // spectral multiplication #include "SpecInterp.h" // spectral interpolation #include "PVMask.h" // spectral masking #include "PVTransp.h" // transposition #include "PVMix.h" // mixing #include "PVBlur.h" // blurring #include "PVFilter.h" // mag filtering #include "PVMorph.h" // pvoc morphing #include "SpecPolar.h" // polar converstion #include "SpecSplit.h" // polar conversion & split #include "SpecThresh.h" // threshold filter #include "SpecVoc.h" // impose magnitudes #include "SpecCart.h" // cartesian conversion #include "SpecCombine.h" // combine phases & mags #include "SpecIn.h" // spectral file input #include "Convol.h" // table-based convolution // SndIO-derived #include "SndFIO.h" // Raw file IO #include "SndWave.h" // RIFF-Wave #include "SndWaveX.h" // waveformatextensible #include "SndPVOCEX.h" // pvocex #include "SndSinIO.h" // sinusex #include "SndAiff.h" // AIFF #include "SndBuffer.h" // memory buffer #if defined(OSS) || defined(SGI) || defined(WIN) #include "SndMidi.h" // midi IO #include "SndMidiIn.h" #endif #ifdef _MBCS #include "SndAsio.h" // ASIO-driver IO #endif #ifdef JACK #include "SndJackIO.h" // Jack IO #endif #ifdef MACOSX #include "SndCoreAudio.h" // Core Audio support #endif #include "SndRTIO.h" // WinMME/OSS/SGI RT IO // Table-derived #include "HarmTable.h" // wavetables #include "UsrHarmTable.h" #include "TrisegTable.h" // envelope #include "EnvTable.h" // envelope curves #include "SndTable.h" // soundfile input #include "PlnTable.h" // Polynomials #include "HammingTable.h" // Windows #include "NoteTable.h" // midi note conversion #include "UsrDefTable.h" // user-definable #include "LoPassTable.h" // lowpass impulse response #include "SpecEnvTable.h" // spectral envelope #include "PVEnvTable.h" // PV envelope #include "PVTable.h" // PV frame #include "ImpulseTable.h" // linear FIR coeffs %} %ignore SndObj::SndObj(SndObj &); %ignore SndObj::operator=(SndObj); %ignore Pitch::Pitch(float, SndObj*, int =0, int =DEF_VECSIZE, float =DEF_SR); #ifndef NOPTHREAD %include"SndThread.h" // needs pthread library #endif // Enable the JNI class to load the required native library. %pragma(java) jniclasscode=%{ static { try { java.lang.System.loadLibrary("_jsndobj"); } catch (UnsatisfiedLinkError e) { java.lang.System.err.println("_jsndobj native code library failed to load.\n" + e); java.lang.System.exit(1); } } %} %include"SndObj.h" %include"SndIO.h" %include"Table.h" %include "carrays.i" %array_functions(int, intp); %array_functions(float, floatp); %array_functions(double, doublep); %inline %{ typedef SndObj* sndobjp; %} %array_class(int, intArray); %array_class(float, floatArray); %array_class(double, doubleArray) %array_class(sndobjp, sndobjArray); // SndObj-derived %include"Oscil.h" // Oscillators %include"Oscilt.h" %include"Oscili.h" %include"FastOsc.h" %include"Osc.h" %include"Osci.h" %include"SndIn.h" // Sound input %include"SndRead.h" // audio file input #if defined(OSS) || defined(SGI) || defined(WIN) %include"MidiIn.h" // Midi input %include "Bend.h" // pitch bend %include"MidiMap.h" #endif %include"ADSR.h" // Envelopes %include"IADSR.h" %include"Buzz.h" // Buzzer %include"Balance.h" // Balance of signals %include"DelayLine.h" // Delay line %include "Tap.h" // Truncating tap %include "Tapi.h" // Time-varying tap %include "Comb.h" // Comb filter %include "Allpass.h" // Allpass filter %include "StringFlt.h" // String filter %include "Pluck.h" // Karplus-Strong %include "VDelay.h" // Variable delay %include "Pitch.h" // Pitch transposer %include "Loop.h" // Looping %include "Fir.h" // direct convolution %include "Filter.h" // Fixed-freq/BW reson %include "TpTz.h" // Two-pole Two-zero %include "Reson.h" // Variable reson %include "Lp.h" // Variable LP with resonance %include "ButtBP.h" // Butterworth filters %include "ButtBR.h" %include "ButtHP.h" %include "ButtLP.h" %include "Ap.h" // 2nd order all-pass %include "LowPass.h" // 1st order LP %include "HiPass.h" // 1st order HP %include "Hilb.h" // Hilbert transformer %include "SyncGrain.h" // granular synthesis %include "Mix.h" // Mixer %include "Pan.h" // panning %include "Gain.h" // gain %include "Interp.h" // curve segments %include "Phase.h" // phase accumulator %include "Ring.h" // general-purpose multiplier %include "Unit.h" // test signals %include "Lookup.h" // table lookup %include "Lookupi.h" %include "Rand.h" // Noise %include "Randh.h" // Band-limited noise %include "Randi.h" // interpolated // Spectral stuff %include "FFT.h" // windowed overlapping FFT %include "IFFT.h" // overlap-add IFFT %include "PVA.h" // pvoc analysis/synthesis %include "PVS.h" %include "PVRead.h" %include "IFGram.h" %include "SinAnal.h" // sinusoidal analysis %include "SinSyn.h" // sinusoidal resynthesis %include "ReSyn.h" // additive resynthesis %include "AdSyn.h" // additive resynthesis %include "IFAdd.h" // additive resynthesis %include "SpecMult.h" // spectral multiplication %include "SpecInterp.h" // spectral interpolation %include "PVMask.h" // spectral masking %include "PVTransp.h" // transposition %include "PVMix.h" // mixing %include "PVBlur.h" // blurring %include "PVFilter.h" // mag filtering %include "PVMorph.h" // pvoc morphing %include "SpecPolar.h" // polar converstion %include "SpecSplit.h" // polar conversion & split %include "SpecThresh.h" // threshold filter %include "SpecVoc.h" // impose magnitudes %include "SpecCart.h" // cartesian conversion %include "SpecCombine.h" // combine phases & mags %include "SpecIn.h" // spectral file input %include "Convol.h" // table-based convolution // SndIO-derived %include "SndFIO.h" // Raw file IO %include "SndWave.h" // RIFF-Wave %include "SndWaveX.h" // waveformatextensible %include "SndPVOCEX.h" // pvocex %include "SndSinIO.h" // sinusex %include "SndAiff.h" // AIFF %include "SndBuffer.h" // memory buffer #if defined(OSS) || defined(SGI) || defined(WIN) %include "SndMidi.h" // midi IO %include "SndMidiIn.h" #endif #ifdef _MBCS %include "SndAsio.h" // ASIO-driver IO #endif #ifdef JACK %include "SndJackIO.h" // Jack IO #endif #ifdef MACOSX %include "SndCoreAudio.h" // Core Audio support #endif %include "SndRTIO.h" // WinMME/OSS/SGI RT IO // Table-derived %include "HarmTable.h" // wavetables %include "UsrHarmTable.h" %include "TrisegTable.h" // envelope %include "EnvTable.h" // envelope curves %include "SndTable.h" // soundfile input %include "PlnTable.h" // Polynomials %include "HammingTable.h" // Windows %include "NoteTable.h" // midi note conversion %include "UsrDefTable.h" // user-definable %include "LoPassTable.h" // lowpass impulse response %include "PVEnvTable.h" // PV envelope %include "SpecEnvTable.h" // spectral envelope %include "PVTable.h" // PV frame %include "ImpulseTable.h" // linear FIR coeffs SndObj-2.6.7/java/lib/000755 000766 000024 00000000000 12062673766 015065 5ustar00victorstaff000000 000000 SndObj-2.6.7/include/asio.h000644 000766 000024 00000123611 12062673766 016131 0ustar00victorstaff000000 000000 //--------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------- /* Steinberg Audio Stream I/O API (c) 1997 - 2005, Steinberg Media Technologies GmbH ASIO Interface Specification v 2.1 2005 - Added support for DSD sample data (in cooperation with Sony) basic concept is an i/o synchronous double-buffer scheme: on bufferSwitch(index == 0), host will read/write: after ASIOStart(), the read first input buffer A (index 0) | will be invalid (empty) * ------------------------ |------------------------|-----------------------| | | | | Input Buffer A (0) | Input Buffer B (1) | | | | |------------------------|-----------------------| | | | | Output Buffer A (0) | Output Buffer B (1) | | | | |------------------------|-----------------------| * ------------------------- | before calling ASIOStart(), write host will have filled output buffer B (index 1) already *please* take special care of proper statement of input and output latencies (see ASIOGetLatencies()), these control sequencer sync accuracy */ //--------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------- /* prototypes summary: ASIOError ASIOInit(ASIODriverInfo *info); ASIOError ASIOExit(void); ASIOError ASIOStart(void); ASIOError ASIOStop(void); ASIOError ASIOGetChannels(long *numInputChannels, long *numOutputChannels); ASIOError ASIOGetLatencies(long *inputLatency, long *outputLatency); ASIOError ASIOGetBufferSize(long *minSize, long *maxSize, long *preferredSize, long *granularity); ASIOError ASIOCanSampleRate(ASIOSampleRate sampleRate); ASIOError ASIOGetSampleRate(ASIOSampleRate *currentRate); ASIOError ASIOSetSampleRate(ASIOSampleRate sampleRate); ASIOError ASIOGetClockSources(ASIOClockSource *clocks, long *numSources); ASIOError ASIOSetClockSource(long reference); ASIOError ASIOGetSamplePosition (ASIOSamples *sPos, ASIOTimeStamp *tStamp); ASIOError ASIOGetChannelInfo(ASIOChannelInfo *info); ASIOError ASIOCreateBuffers(ASIOBufferInfo *bufferInfos, long numChannels, long bufferSize, ASIOCallbacks *callbacks); ASIOError ASIODisposeBuffers(void); ASIOError ASIOControlPanel(void); void *ASIOFuture(long selector, void *params); ASIOError ASIOOutputReady(void); */ //--------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------- #ifndef __ASIO_H #define __ASIO_H // force 4 byte alignment #if defined(_MSC_VER) && !defined(__MWERKS__) #pragma pack(push,4) #elif PRAGMA_ALIGN_SUPPORTED #pragma options align = native #endif //- - - - - - - - - - - - - - - - - - - - - - - - - // Type definitions //- - - - - - - - - - - - - - - - - - - - - - - - - // number of samples data type is 64 bit integer #if NATIVE_INT64 typedef long long int ASIOSamples; #else typedef struct ASIOSamples { unsigned long hi; unsigned long lo; } ASIOSamples; #endif // Timestamp data type is 64 bit integer, // Time format is Nanoseconds. #if NATIVE_INT64 typedef long long int ASIOTimeStamp ; #else typedef struct ASIOTimeStamp { unsigned long hi; unsigned long lo; } ASIOTimeStamp; #endif // Samplerates are expressed in IEEE 754 64 bit double float, // native format as host computer #if IEEE754_64FLOAT typedef double ASIOSampleRate; #else typedef struct ASIOSampleRate { char ieee[8]; } ASIOSampleRate; #endif // Boolean values are expressed as long typedef long ASIOBool; enum { ASIOFalse = 0, ASIOTrue = 1 }; // Sample Types are expressed as long typedef long ASIOSampleType; enum { ASIOSTInt16MSB = 0, ASIOSTInt24MSB = 1, // used for 20 bits as well ASIOSTInt32MSB = 2, ASIOSTFloat32MSB = 3, // IEEE 754 32 bit float ASIOSTFloat64MSB = 4, // IEEE 754 64 bit double float // these are used for 32 bit data buffer, with different alignment of the data inside // 32 bit PCI bus systems can be more easily used with these ASIOSTInt32MSB16 = 8, // 32 bit data with 16 bit alignment ASIOSTInt32MSB18 = 9, // 32 bit data with 18 bit alignment ASIOSTInt32MSB20 = 10, // 32 bit data with 20 bit alignment ASIOSTInt32MSB24 = 11, // 32 bit data with 24 bit alignment ASIOSTInt16LSB = 16, ASIOSTInt24LSB = 17, // used for 20 bits as well ASIOSTInt32LSB = 18, ASIOSTFloat32LSB = 19, // IEEE 754 32 bit float, as found on Intel x86 architecture ASIOSTFloat64LSB = 20, // IEEE 754 64 bit double float, as found on Intel x86 architecture // these are used for 32 bit data buffer, with different alignment of the data inside // 32 bit PCI bus systems can more easily used with these ASIOSTInt32LSB16 = 24, // 32 bit data with 18 bit alignment ASIOSTInt32LSB18 = 25, // 32 bit data with 18 bit alignment ASIOSTInt32LSB20 = 26, // 32 bit data with 20 bit alignment ASIOSTInt32LSB24 = 27, // 32 bit data with 24 bit alignment // ASIO DSD format. ASIOSTDSDInt8LSB1 = 32, // DSD 1 bit data, 8 samples per byte. First sample in Least significant bit. ASIOSTDSDInt8MSB1 = 33, // DSD 1 bit data, 8 samples per byte. First sample in Most significant bit. ASIOSTDSDInt8NER8 = 40, // DSD 8 bit data, 1 sample per byte. No Endianness required. ASIOSTLastEntry }; /*----------------------------------------------------------------------------- // DSD operation and buffer layout // Definition by Steinberg/Sony Oxford. // // We have tried to treat DSD as PCM and so keep a consistant structure across // the ASIO interface. // // DSD's sample rate is normally referenced as a multiple of 44.1Khz, so // the standard sample rate is refered to as 64Fs (or 2.8224Mhz). We looked // at making a special case for DSD and adding a field to the ASIOFuture that // would allow the user to select the Over Sampleing Rate (OSR) as a seperate // entity but decided in the end just to treat it as a simple value of // 2.8224Mhz and use the standard interface to set it. // // The second problem was the "word" size, in PCM the word size is always a // greater than or equal to 8 bits (a byte). This makes life easy as we can // then pack the samples into the "natural" size for the machine. // In DSD the "word" size is 1 bit. This is not a major problem and can easily // be dealt with if we ensure that we always deal with a multiple of 8 samples. // // DSD brings with it another twist to the Endianness religion. How are the // samples packed into the byte. It would be nice to just say the most significant // bit is always the first sample, however there would then be a performance hit // on little endian machines. Looking at how some of the processing goes... // Little endian machines like the first sample to be in the Least Significant Bit, // this is because when you write it to memory the data is in the correct format // to be shifted in and out of the words. // Big endian machine prefer the first sample to be in the Most Significant Bit, // again for the same reasion. // // And just when things were looking really muddy there is a proposed extension to // DSD that uses 8 bit word sizes. It does not care what endianness you use. // // Switching the driver between DSD and PCM mode // ASIOFuture allows for extending the ASIO API quite transparently. // See kAsioSetIoFormat, kAsioGetIoFormat, kAsioCanDoIoFormat // //-----------------------------------------------------------------------------*/ //- - - - - - - - - - - - - - - - - - - - - - - - - // Error codes //- - - - - - - - - - - - - - - - - - - - - - - - - typedef long ASIOError; enum { ASE_OK = 0, // This value will be returned whenever the call succeeded ASE_SUCCESS = 0x3f4847a0, // unique success return value for ASIOFuture calls ASE_NotPresent = -1000, // hardware input or output is not present or available ASE_HWMalfunction, // hardware is malfunctioning (can be returned by any ASIO function) ASE_InvalidParameter, // input parameter invalid ASE_InvalidMode, // hardware is in a bad mode or used in a bad mode ASE_SPNotAdvancing, // hardware is not running when sample position is inquired ASE_NoClock, // sample clock or rate cannot be determined or is not present ASE_NoMemory // not enough memory for completing the request }; //--------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------- //- - - - - - - - - - - - - - - - - - - - - - - - - // Time Info support //- - - - - - - - - - - - - - - - - - - - - - - - - typedef struct ASIOTimeCode { double speed; // speed relation (fraction of nominal speed) // optional; set to 0. or 1. if not supported ASIOSamples timeCodeSamples; // time in samples unsigned long flags; // some information flags (see below) char future[64]; } ASIOTimeCode; typedef enum ASIOTimeCodeFlags { kTcValid = 1, kTcRunning = 1 << 1, kTcReverse = 1 << 2, kTcOnspeed = 1 << 3, kTcStill = 1 << 4, kTcSpeedValid = 1 << 8 } ASIOTimeCodeFlags; typedef struct AsioTimeInfo { double speed; // absolute speed (1. = nominal) ASIOTimeStamp systemTime; // system time related to samplePosition, in nanoseconds // on mac, must be derived from Microseconds() (not UpTime()!) // on windows, must be derived from timeGetTime() ASIOSamples samplePosition; ASIOSampleRate sampleRate; // current rate unsigned long flags; // (see below) char reserved[12]; } AsioTimeInfo; typedef enum AsioTimeInfoFlags { kSystemTimeValid = 1, // must always be valid kSamplePositionValid = 1 << 1, // must always be valid kSampleRateValid = 1 << 2, kSpeedValid = 1 << 3, kSampleRateChanged = 1 << 4, kClockSourceChanged = 1 << 5 } AsioTimeInfoFlags; typedef struct ASIOTime // both input/output { long reserved[4]; // must be 0 struct AsioTimeInfo timeInfo; // required struct ASIOTimeCode timeCode; // optional, evaluated if (timeCode.flags & kTcValid) } ASIOTime; /* using time info: it is recommended to use the new method with time info even if the asio device does not support timecode; continuous calls to ASIOGetSamplePosition and ASIOGetSampleRate are avoided, and there is a more defined relationship between callback time and the time info. see the example below. to initiate time info mode, after you have received the callbacks pointer in ASIOCreateBuffers, you will call the asioMessage callback with kAsioSupportsTimeInfo as the argument. if this returns 1, host has accepted time info mode. now host expects the new callback bufferSwitchTimeInfo to be used instead of the old bufferSwitch method. the ASIOTime structure is assumed to be valid and accessible until the callback returns. using time code: if the device supports reading time code, it will call host's asioMessage callback with kAsioSupportsTimeCode as the selector. it may then fill the according fields and set the kTcValid flag. host will call the future method with the kAsioEnableTimeCodeRead selector when it wants to enable or disable tc reading by the device. you should also support the kAsioCanTimeInfo and kAsioCanTimeCode selectors in ASIOFuture (see example). note: the AsioTimeInfo/ASIOTimeCode pair is supposed to work in both directions. as a matter of convention, the relationship between the sample position counter and the time code at buffer switch time is (ignoring offset between tc and sample pos when tc is running): on input: sample 0 -> input buffer sample 0 -> time code 0 on output: sample 0 -> output buffer sample 0 -> time code 0 this means that for 'real' calculations, one has to take into account the according latencies. example: ASIOTime asioTime; in createBuffers() { memset(&asioTime, 0, sizeof(ASIOTime)); AsioTimeInfo* ti = &asioTime.timeInfo; ti->sampleRate = theSampleRate; ASIOTimeCode* tc = &asioTime.timeCode; tc->speed = 1.; timeInfoMode = false; canTimeCode = false; if(callbacks->asioMessage(kAsioSupportsTimeInfo, 0, 0, 0) == 1) { timeInfoMode = true; #if kCanTimeCode if(callbacks->asioMessage(kAsioSupportsTimeCode, 0, 0, 0) == 1) canTimeCode = true; #endif } } void switchBuffers(long doubleBufferIndex, bool processNow) { if(timeInfoMode) { AsioTimeInfo* ti = &asioTime.timeInfo; ti->flags = kSystemTimeValid | kSamplePositionValid | kSampleRateValid; ti->systemTime = theNanoSeconds; ti->samplePosition = theSamplePosition; if(ti->sampleRate != theSampleRate) ti->flags |= kSampleRateChanged; ti->sampleRate = theSampleRate; #if kCanTimeCode if(canTimeCode && timeCodeEnabled) { ASIOTimeCode* tc = &asioTime.timeCode; tc->timeCodeSamples = tcSamples; // tc in samples tc->flags = kTcValid | kTcRunning | kTcOnspeed; // if so... } ASIOTime* bb = callbacks->bufferSwitchTimeInfo(&asioTime, doubleBufferIndex, processNow ? ASIOTrue : ASIOFalse); #else callbacks->bufferSwitchTimeInfo(&asioTime, doubleBufferIndex, processNow ? ASIOTrue : ASIOFalse); #endif } else callbacks->bufferSwitch(doubleBufferIndex, ASIOFalse); } ASIOError ASIOFuture(long selector, void *params) { switch(selector) { case kAsioEnableTimeCodeRead: timeCodeEnabled = true; return ASE_SUCCESS; case kAsioDisableTimeCodeRead: timeCodeEnabled = false; return ASE_SUCCESS; case kAsioCanTimeInfo: return ASE_SUCCESS; #if kCanTimeCode case kAsioCanTimeCode: return ASE_SUCCESS; #endif } return ASE_NotPresent; }; */ //- - - - - - - - - - - - - - - - - - - - - - - - - // application's audio stream handler callbacks //- - - - - - - - - - - - - - - - - - - - - - - - - typedef struct ASIOCallbacks { void (*bufferSwitch) (long doubleBufferIndex, ASIOBool directProcess); // bufferSwitch indicates that both input and output are to be processed. // the current buffer half index (0 for A, 1 for B) determines // - the output buffer that the host should start to fill. the other buffer // will be passed to output hardware regardless of whether it got filled // in time or not. // - the input buffer that is now filled with incoming data. Note that // because of the synchronicity of i/o, the input always has at // least one buffer latency in relation to the output. // directProcess suggests to the host whether it should immedeately // start processing (directProcess == ASIOTrue), or whether its process // should be deferred because the call comes from a very low level // (for instance, a high level priority interrupt), and direct processing // would cause timing instabilities for the rest of the system. If in doubt, // directProcess should be set to ASIOFalse. // Note: bufferSwitch may be called at interrupt time for highest efficiency. void (*sampleRateDidChange) (ASIOSampleRate sRate); // gets called when the AudioStreamIO detects a sample rate change // If sample rate is unknown, 0 is passed (for instance, clock loss // when externally synchronized). long (*asioMessage) (long selector, long value, void* message, double* opt); // generic callback for various purposes, see selectors below. // note this is only present if the asio version is 2 or higher ASIOTime* (*bufferSwitchTimeInfo) (ASIOTime* params, long doubleBufferIndex, ASIOBool directProcess); // new callback with time info. makes ASIOGetSamplePosition() and various // calls to ASIOGetSampleRate obsolete, // and allows for timecode sync etc. to be preferred; will be used if // the driver calls asioMessage with selector kAsioSupportsTimeInfo. } ASIOCallbacks; // asioMessage selectors enum { kAsioSelectorSupported = 1, // selector in , returns 1L if supported, // 0 otherwise kAsioEngineVersion, // returns engine (host) asio implementation version, // 2 or higher kAsioResetRequest, // request driver reset. if accepted, this // will close the driver (ASIO_Exit() ) and // re-open it again (ASIO_Init() etc). some // drivers need to reconfigure for instance // when the sample rate changes, or some basic // changes have been made in ASIO_ControlPanel(). // returns 1L; note the request is merely passed // to the application, there is no way to determine // if it gets accepted at this time (but it usually // will be). kAsioBufferSizeChange, // not yet supported, will currently always return 0L. // for now, use kAsioResetRequest instead. // once implemented, the new buffer size is expected // in , and on success returns 1L kAsioResyncRequest, // the driver went out of sync, such that // the timestamp is no longer valid. this // is a request to re-start the engine and // slave devices (sequencer). returns 1 for ok, // 0 if not supported. kAsioLatenciesChanged, // the drivers latencies have changed. The engine // will refetch the latencies. kAsioSupportsTimeInfo, // if host returns true here, it will expect the // callback bufferSwitchTimeInfo to be called instead // of bufferSwitch kAsioSupportsTimeCode, // kAsioMMCCommand, // unused - value: number of commands, message points to mmc commands kAsioSupportsInputMonitor, // kAsioSupportsXXX return 1 if host supports this kAsioSupportsInputGain, // unused and undefined kAsioSupportsInputMeter, // unused and undefined kAsioSupportsOutputGain, // unused and undefined kAsioSupportsOutputMeter, // unused and undefined kAsioOverload, // driver detected an overload kAsioNumMessageSelectors }; //--------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------- //- - - - - - - - - - - - - - - - - - - - - - - - - // (De-)Construction //- - - - - - - - - - - - - - - - - - - - - - - - - typedef struct ASIODriverInfo { long asioVersion; // currently, 2 long driverVersion; // driver specific char name[32]; char errorMessage[124]; void *sysRef; // on input: system reference // (Windows: application main window handle, Mac & SGI: 0) } ASIODriverInfo; ASIOError ASIOInit(ASIODriverInfo *info); /* Purpose: Initialize the AudioStreamIO. Parameter: info: pointer to an ASIODriver structure: - asioVersion: - on input, the host version. *** Note *** this is 0 for earlier asio implementations, and the asioMessage callback is implemeted only if asioVersion is 2 or greater. sorry but due to a design fault the driver doesn't have access to the host version in ASIOInit :-( added selector for host (engine) version in the asioMessage callback so we're ok from now on. - on return, asio implementation version. older versions are 1 if you support this version (namely, ASIO_outputReady() ) this should be 2 or higher. also see the note in ASIO_getTimeStamp() ! - version: on return, the driver version (format is driver specific) - name: on return, a null-terminated string containing the driver's name - error message: on return, should contain a user message describing the type of error that occured during ASIOInit(), if any. - sysRef: platform specific Returns: If neither input nor output is present ASE_NotPresent will be returned. ASE_NoMemory, ASE_HWMalfunction are other possible error conditions */ ASIOError ASIOExit(void); /* Purpose: Terminates the AudioStreamIO. Parameter: None. Returns: If neither input nor output is present ASE_NotPresent will be returned. Notes: this implies ASIOStop() and ASIODisposeBuffers(), meaning that no host callbacks must be accessed after ASIOExit(). */ //- - - - - - - - - - - - - - - - - - - - - - - - - // Start/Stop //- - - - - - - - - - - - - - - - - - - - - - - - - ASIOError ASIOStart(void); /* Purpose: Start input and output processing synchronously. This will - reset the sample counter to zero - start the hardware (both input and output) The first call to the hosts' bufferSwitch(index == 0) then tells the host to read from input buffer A (index 0), and start processing to output buffer A while output buffer B (which has been filled by the host prior to calling ASIOStart()) is possibly sounding (see also ASIOGetLatencies()) Parameter: None. Returns: If neither input nor output is present, ASE_NotPresent will be returned. If the hardware fails to start, ASE_HWMalfunction will be returned. Notes: There is no restriction on the time that ASIOStart() takes to perform (that is, it is not considered a realtime trigger). */ ASIOError ASIOStop(void); /* Purpose: Stops input and output processing altogether. Parameter: None. Returns: If neither input nor output is present ASE_NotPresent will be returned. Notes: On return from ASIOStop(), the driver must in no case call the hosts' bufferSwitch() routine. */ //- - - - - - - - - - - - - - - - - - - - - - - - - // Inquiry methods and sample rate //- - - - - - - - - - - - - - - - - - - - - - - - - ASIOError ASIOGetChannels(long *numInputChannels, long *numOutputChannels); /* Purpose: Returns number of individual input/output channels. Parameter: numInputChannels will hold the number of available input channels numOutputChannels will hold the number of available output channels Returns: If no input/output is present ASE_NotPresent will be returned. If only inputs, or only outputs are available, the according other parameter will be zero, and ASE_OK is returned. */ ASIOError ASIOGetLatencies(long *inputLatency, long *outputLatency); /* Purpose: Returns the input and output latencies. This includes device specific delays, like FIFOs etc. Parameter: inputLatency will hold the 'age' of the first sample frame in the input buffer when the hosts reads it in bufferSwitch() (this is theoretical, meaning it does not include the overhead and delay between the actual physical switch, and the time when bufferSitch() enters). This will usually be the size of one block in sample frames, plus device specific latencies. outputLatency will specify the time between the buffer switch, and the time when the next play buffer will start to sound. The next play buffer is defined as the one the host starts processing after (or at) bufferSwitch(), indicated by the index parameter (0 for buffer A, 1 for buffer B). It will usually be either one block, if the host writes directly to a dma buffer, or two or more blocks if the buffer is 'latched' by the driver. As an example, on ASIOStart(), the host will have filled the play buffer at index 1 already; when it gets the callback (with the parameter index == 0), this tells it to read from the input buffer 0, and start to fill the play buffer 0 (assuming that now play buffer 1 is already sounding). In this case, the output latency is one block. If the driver decides to copy buffer 1 at that time, and pass it to the hardware at the next slot (which is most commonly done, but should be avoided), the output latency becomes two blocks instead, resulting in a total i/o latency of at least 3 blocks. As memory access is the main bottleneck in native dsp processing, and to acheive less latency, it is highly recommended to try to avoid copying (this is also why the driver is the owner of the buffers). To summarize, the minimum i/o latency can be acheived if the input buffer is processed by the host into the output buffer which will physically start to sound on the next time slice. Also note that the host expects the bufferSwitch() callback to be accessed for each time slice in order to retain sync, possibly recursively; if it fails to process a block in time, it will suspend its operation for some time in order to recover. Returns: If no input/output is present ASE_NotPresent will be returned. */ ASIOError ASIOGetBufferSize(long *minSize, long *maxSize, long *preferredSize, long *granularity); /* Purpose: Returns min, max, and preferred buffer sizes for input/output Parameter: minSize will hold the minimum buffer size maxSize will hold the maxium possible buffer size preferredSize will hold the preferred buffer size (a size which best fits performance and hardware requirements) granularity will hold the granularity at which buffer sizes may differ. Usually, the buffer size will be a power of 2; in this case, granularity will hold -1 on return, signalling possible buffer sizes starting from minSize, increased in powers of 2 up to maxSize. Returns: If no input/output is present ASE_NotPresent will be returned. Notes: When minimum and maximum buffer size are equal, the preferred buffer size has to be the same value as well; granularity should be 0 in this case. */ ASIOError ASIOCanSampleRate(ASIOSampleRate sampleRate); /* Purpose: Inquires the hardware for the available sample rates. Parameter: sampleRate is the rate in question. Returns: If the inquired sample rate is not supported, ASE_NoClock will be returned. If no input/output is present ASE_NotPresent will be returned. */ ASIOError ASIOGetSampleRate(ASIOSampleRate *currentRate); /* Purpose: Get the current sample Rate. Parameter: currentRate will hold the current sample rate on return. Returns: If sample rate is unknown, sampleRate will be 0 and ASE_NoClock will be returned. If no input/output is present ASE_NotPresent will be returned. Notes: */ ASIOError ASIOSetSampleRate(ASIOSampleRate sampleRate); /* Purpose: Set the hardware to the requested sample Rate. If sampleRate == 0, enable external sync. Parameter: sampleRate: on input, the requested rate Returns: If sampleRate is unknown ASE_NoClock will be returned. If the current clock is external, and sampleRate is != 0, ASE_InvalidMode will be returned If no input/output is present ASE_NotPresent will be returned. Notes: */ typedef struct ASIOClockSource { long index; // as used for ASIOSetClockSource() long associatedChannel; // for instance, S/PDIF or AES/EBU long associatedGroup; // see channel groups (ASIOGetChannelInfo()) ASIOBool isCurrentSource; // ASIOTrue if this is the current clock source char name[32]; // for user selection } ASIOClockSource; ASIOError ASIOGetClockSources(ASIOClockSource *clocks, long *numSources); /* Purpose: Get the available external audio clock sources Parameter: clocks points to an array of ASIOClockSource structures: - index: this is used to identify the clock source when ASIOSetClockSource() is accessed, should be an index counting from zero - associatedInputChannel: the first channel of an associated input group, if any. - associatedGroup: the group index of that channel. groups of channels are defined to seperate for instance analog, S/PDIF, AES/EBU, ADAT connectors etc, when present simultaniously. Note that associated channel is enumerated according to numInputs/numOutputs, means it is independant from a group (see also ASIOGetChannelInfo()) inputs are associated to a clock if the physical connection transfers both data and clock (like S/PDIF, AES/EBU, or ADAT inputs). if there is no input channel associated with the clock source (like Word Clock, or internal oscillator), both associatedChannel and associatedGroup should be set to -1. - isCurrentSource: on exit, ASIOTrue if this is the current clock source, ASIOFalse else - name: a null-terminated string for user selection of the available sources. numSources: on input: the number of allocated array members on output: the number of available clock sources, at least 1 (internal clock generator). Returns: If no input/output is present ASE_NotPresent will be returned. Notes: */ ASIOError ASIOSetClockSource(long index); /* Purpose: Set the audio clock source Parameter: index as obtained from an inquiry to ASIOGetClockSources() Returns: If no input/output is present ASE_NotPresent will be returned. If the clock can not be selected because an input channel which carries the current clock source is active, ASE_InvalidMode *may* be returned (this depends on the properties of the driver and/or hardware). Notes: Should *not* return ASE_NoClock if there is no clock signal present at the selected source; this will be inquired via ASIOGetSampleRate(). It should call the host callback procedure sampleRateHasChanged(), if the switch causes a sample rate change, or if no external clock is present at the selected source. */ ASIOError ASIOGetSamplePosition (ASIOSamples *sPos, ASIOTimeStamp *tStamp); /* Purpose: Inquires the sample position/time stamp pair. Parameter: sPos will hold the sample position on return. The sample position is reset to zero when ASIOStart() gets called. tStamp will hold the system time when the sample position was latched. Returns: If no input/output is present, ASE_NotPresent will be returned. If there is no clock, ASE_SPNotAdvancing will be returned. Notes: in order to be able to synchronise properly, the sample position / time stamp pair must refer to the current block, that is, the engine will call ASIOGetSamplePosition() in its bufferSwitch() callback and expect the time for the current block. thus, when requested in the very first bufferSwitch after ASIO_Start(), the sample position should be zero, and the time stamp should refer to the very time where the stream was started. it also means that the sample position must be block aligned. the driver must ensure proper interpolation if the system time can not be determined for the block position. the driver is responsible for precise time stamps as it usually has most direct access to lower level resources. proper behaviour of ASIO_GetSamplePosition() and ASIO_GetLatencies() are essential for precise media synchronization! */ typedef struct ASIOChannelInfo { long channel; // on input, channel index ASIOBool isInput; // on input ASIOBool isActive; // on exit long channelGroup; // dto ASIOSampleType type; // dto char name[32]; // dto } ASIOChannelInfo; ASIOError ASIOGetChannelInfo(ASIOChannelInfo *info); /* Purpose: retreive information about the nature of a channel Parameter: info: pointer to a ASIOChannelInfo structure with - channel: on input, the channel index of the channel in question. - isInput: on input, ASIOTrue if info for an input channel is requested, else output - channelGroup: on return, the channel group that the channel belongs to. For drivers which support different types of channels, like analog, S/PDIF, AES/EBU, ADAT etc interfaces, there should be a reasonable grouping of these types. Groups are always independant form a channel index, that is, a channel index always counts from 0 to numInputs/numOutputs regardless of the group it may belong to. There will always be at least one group (group 0). Please also note that by default, the host may decide to activate channels 0 and 1; thus, these should belong to the most useful type (analog i/o, if present). - type: on return, contains the sample type of the channel - isActive: on return, ASIOTrue if channel is active as it was installed by ASIOCreateBuffers(), ASIOFalse else - name: describing the type of channel in question. Used to allow for user selection, and enabling of specific channels. examples: "Analog In", "SPDIF Out" etc Returns: If no input/output is present ASE_NotPresent will be returned. Notes: If possible, the string should be organised such that the first characters are most significantly describing the nature of the port, to allow for identification even if the view showing the port name is too small to display more than 8 characters, for instance. */ //- - - - - - - - - - - - - - - - - - - - - - - - - // Buffer preparation //- - - - - - - - - - - - - - - - - - - - - - - - - typedef struct ASIOBufferInfo { ASIOBool isInput; // on input: ASIOTrue: input, else output long channelNum; // on input: channel index void *buffers[2]; // on output: double buffer addresses } ASIOBufferInfo; ASIOError ASIOCreateBuffers(ASIOBufferInfo *bufferInfos, long numChannels, long bufferSize, ASIOCallbacks *callbacks); /* Purpose: Allocates input/output buffers for all input and output channels to be activated. Parameter: bufferInfos is a pointer to an array of ASIOBufferInfo structures: - isInput: on input, ASIOTrue if the buffer is to be allocated for an input, output buffer else - channelNum: on input, the index of the channel in question (counting from 0) - buffers: on exit, 2 pointers to the halves of the channels' double-buffer. the size of the buffer(s) of course depend on both the ASIOSampleType as obtained from ASIOGetChannelInfo(), and bufferSize numChannels is the sum of all input and output channels to be created; thus bufferInfos is a pointer to an array of numChannels ASIOBufferInfo structures. bufferSize selects one of the possible buffer sizes as obtained from ASIOGetBufferSizes(). callbacks is a pointer to an ASIOCallbacks structure. Returns: If not enough memory is available ASE_NoMemory will be returned. If no input/output is present ASE_NotPresent will be returned. If bufferSize is not supported, or one or more of the bufferInfos elements contain invalid settings, ASE_InvalidMode will be returned. Notes: If individual channel selection is not possible but requested, the driver has to handle this. namely, bufferSwitch() will only have filled buffers of enabled outputs. If possible, processing and buss activities overhead should be avoided for channels which were not enabled here. */ ASIOError ASIODisposeBuffers(void); /* Purpose: Releases all buffers for the device. Parameter: None. Returns: If no buffer were ever prepared, ASE_InvalidMode will be returned. If no input/output is present ASE_NotPresent will be returned. Notes: This implies ASIOStop(). */ ASIOError ASIOControlPanel(void); /* Purpose: request the driver to start a control panel component for device specific user settings. This will not be accessed on some platforms (where the component is accessed instead). Parameter: None. Returns: If no panel is available ASE_NotPresent will be returned. Actually, the return code is ignored. Notes: if the user applied settings which require a re-configuration of parts or all of the enigine and/or driver (such as a change of the block size), the asioMessage callback can be used (see ASIO_Callbacks). */ ASIOError ASIOFuture(long selector, void *params); /* Purpose: various Parameter: selector: operation Code as to be defined. zero is reserved for testing purposes. params: depends on the selector; usually pointer to a structure for passing and retreiving any type and amount of parameters. Returns: the return value is also selector dependant. if the selector is unknown, ASE_InvalidParameter should be returned to prevent further calls with this selector. on success, ASE_SUCCESS must be returned (note: ASE_OK is *not* sufficient!) Notes: see selectors defined below. */ enum { kAsioEnableTimeCodeRead = 1, // no arguments kAsioDisableTimeCodeRead, // no arguments kAsioSetInputMonitor, // ASIOInputMonitor* in params kAsioTransport, // ASIOTransportParameters* in params kAsioSetInputGain, // ASIOChannelControls* in params, apply gain kAsioGetInputMeter, // ASIOChannelControls* in params, fill meter kAsioSetOutputGain, // ASIOChannelControls* in params, apply gain kAsioGetOutputMeter, // ASIOChannelControls* in params, fill meter kAsioCanInputMonitor, // no arguments for kAsioCanXXX selectors kAsioCanTimeInfo, kAsioCanTimeCode, kAsioCanTransport, kAsioCanInputGain, kAsioCanInputMeter, kAsioCanOutputGain, kAsioCanOutputMeter, // DSD support // The following extensions are required to allow switching // and control of the DSD subsystem. kAsioSetIoFormat = 0x23111961, /* ASIOIoFormat * in params. */ kAsioGetIoFormat = 0x23111983, /* ASIOIoFormat * in params. */ kAsioCanDoIoFormat = 0x23112004, /* ASIOIoFormat * in params. */ }; typedef struct ASIOInputMonitor { long input; // this input was set to monitor (or off), -1: all long output; // suggested output for monitoring the input (if so) long gain; // suggested gain, ranging 0 - 0x7fffffffL (-inf to +12 dB) ASIOBool state; // ASIOTrue => on, ASIOFalse => off long pan; // suggested pan, 0 => all left, 0x7fffffff => right } ASIOInputMonitor; typedef struct ASIOChannelControls { long channel; // on input, channel index ASIOBool isInput; // on input long gain; // on input, ranges 0 thru 0x7fffffff long meter; // on return, ranges 0 thru 0x7fffffff char future[32]; } ASIOChannelControls; typedef struct ASIOTransportParameters { long command; // see enum below ASIOSamples samplePosition; long track; long trackSwitches[16]; // 512 tracks on/off char future[64]; } ASIOTransportParameters; enum { kTransStart = 1, kTransStop, kTransLocate, // to samplePosition kTransPunchIn, kTransPunchOut, kTransArmOn, // track kTransArmOff, // track kTransMonitorOn, // track kTransMonitorOff, // track kTransArm, // trackSwitches kTransMonitor // trackSwitches }; /* // DSD support // Some notes on how to use ASIOIoFormatType. // // The caller will fill the format with the request types. // If the board can do the request then it will leave the // values unchanged. If the board does not support the // request then it will change that entry to Invalid (-1) // // So to request DSD then // // ASIOIoFormat NeedThis={kASIODSDFormat}; // // if(ASE_SUCCESS != ASIOFuture(kAsioSetIoFormat,&NeedThis) ){ // // If the board did not accept one of the parameters then the // // whole call will fail and the failing parameter will // // have had its value changes to -1. // } // // Note: Switching between the formats need to be done before the "prepared" // state (see ASIO 2 documentation) is entered. */ typedef long int ASIOIoFormatType; enum ASIOIoFormatType_e { kASIOFormatInvalid = -1, kASIOPCMFormat = 0, kASIODSDFormat = 1, }; typedef struct ASIOIoFormat_s { ASIOIoFormatType FormatType; char future[512-sizeof(ASIOIoFormatType)]; } ASIOIoFormat; ASIOError ASIOOutputReady(void); /* Purpose: this tells the driver that the host has completed processing the output buffers. if the data format required by the hardware differs from the supported asio formats, but the hardware buffers are DMA buffers, the driver will have to convert the audio stream data; as the bufferSwitch callback is usually issued at dma block switch time, the driver will have to convert the *previous* host buffer, which increases the output latency by one block. when the host finds out that ASIOOutputReady() returns true, it will issue this call whenever it completed output processing. then the driver can convert the host data directly to the dma buffer to be played next, reducing output latency by one block. another way to look at it is, that the buffer switch is called in order to pass the *input* stream to the host, so that it can process the input into the output, and the output stream is passed to the driver when the host has completed its process. Parameter: None Returns: only if the above mentioned scenario is given, and a reduction of output latency can be acheived by this mechanism, should ASE_OK be returned. otherwise (and usually), ASE_NotPresent should be returned in order to prevent further calls to this function. note that the host may want to determine if it is to use this when the system is not yet fully initialized, so ASE_OK should always be returned if the mechanism makes sense. Notes: please remeber to adjust ASIOGetLatencies() according to whether ASIOOutputReady() was ever called or not, if your driver supports this scenario. also note that the engine may fail to call ASIO_OutputReady() in time in overload cases. as already mentioned, bufferSwitch should be called for every block regardless of whether a block could be processed in time. */ // restore old alignment #if defined(_MSC_VER) && !defined(__MWERKS__) #pragma pack(pop) #elif PRAGMA_ALIGN_SUPPORTED #pragma options align = reset #endif #endif SndObj-2.6.7/include/asiodrivers.h000644 000766 000024 00000001246 12062673766 017527 0ustar00victorstaff000000 000000 #ifndef __AsioDrivers__ #define __AsioDrivers__ #include "ginclude.h" #if MAC #include "CodeFragments.hpp" class AsioDrivers : public CodeFragments #elif WINDOWS #include #include "asiolist.h" class AsioDrivers : public AsioDriverList #elif SGI || BEOS #include "asiolist.h" class AsioDrivers : public AsioDriverList #else #error implement me #endif { public: AsioDrivers(); ~AsioDrivers(); bool getCurrentDriverName(char *name); long getDriverNames(char **names, long maxDrivers); bool loadDriver(char *name); void removeCurrentDriver(); long getCurrentDriverIndex() {return curIndex;} protected: unsigned long connID; long curIndex; }; #endif SndObj-2.6.7/include/asiodrvr.h000644 000766 000024 00000004216 12062673766 017026 0ustar00victorstaff000000 000000 /* Steinberg Audio Stream I/O API (c) 1996, Steinberg Soft- und Hardware GmbH charlie (May 1996) asiodrvr.h c++ superclass to implement asio functionality. from this, you can derive whatever required */ #ifndef _asiodrvr_ #define _asiodrvr_ // cpu and os system we are running on #include "asiosys.h" // basic "C" interface #include "asio.h" class AsioDriver; extern AsioDriver *getDriver(); // for generic constructor #if WINDOWS #include #include "combase.h" #include "iasiodrv.h" class AsioDriver : public IASIO ,public CUnknown { public: AsioDriver(LPUNKNOWN pUnk, HRESULT *phr); DECLARE_IUNKNOWN // Factory method static CUnknown *CreateInstance(LPUNKNOWN pUnk, HRESULT *phr); // IUnknown virtual HRESULT STDMETHODCALLTYPE NonDelegatingQueryInterface(REFIID riid,void **ppvObject); #else class AsioDriver { public: AsioDriver(); #endif virtual ~AsioDriver(); virtual ASIOBool init(void* sysRef); virtual void getDriverName(char *name); // max 32 bytes incl. terminating zero virtual long getDriverVersion(); virtual void getErrorMessage(char *string); // max 124 bytes incl. virtual ASIOError start(); virtual ASIOError stop(); virtual ASIOError getChannels(long *numInputChannels, long *numOutputChannels); virtual ASIOError getLatencies(long *inputLatency, long *outputLatency); virtual ASIOError getBufferSize(long *minSize, long *maxSize, long *preferredSize, long *granularity); virtual ASIOError canSampleRate(ASIOSampleRate sampleRate); virtual ASIOError getSampleRate(ASIOSampleRate *sampleRate); virtual ASIOError setSampleRate(ASIOSampleRate sampleRate); virtual ASIOError getClockSources(ASIOClockSource *clocks, long *numSources); virtual ASIOError setClockSource(long reference); virtual ASIOError getSamplePosition(ASIOSamples *sPos, ASIOTimeStamp *tStamp); virtual ASIOError getChannelInfo(ASIOChannelInfo *info); virtual ASIOError createBuffers(ASIOBufferInfo *bufferInfos, long numChannels, long bufferSize, ASIOCallbacks *callbacks); virtual ASIOError disposeBuffers(); virtual ASIOError controlPanel(); virtual ASIOError future(long selector, void *opt); virtual ASIOError outputReady(); }; #endif SndObj-2.6.7/include/asiolist.h000644 000766 000024 00000001664 12062673766 017030 0ustar00victorstaff000000 000000 #ifndef __asiolist__ #define __asiolist__ #define DRVERR -5000 #define DRVERR_INVALID_PARAM DRVERR-1 #define DRVERR_DEVICE_ALREADY_OPEN DRVERR-2 #define DRVERR_DEVICE_NOT_FOUND DRVERR-3 #define MAXPATHLEN 512 #define MAXDRVNAMELEN 128 struct asiodrvstruct { int drvID; CLSID clsid; char dllpath[MAXPATHLEN]; char drvname[MAXDRVNAMELEN]; LPVOID asiodrv; struct asiodrvstruct *next; }; typedef struct asiodrvstruct ASIODRVSTRUCT; typedef ASIODRVSTRUCT *LPASIODRVSTRUCT; class AsioDriverList { public: AsioDriverList(); ~AsioDriverList(); LONG asioOpenDriver (int,VOID **); LONG asioCloseDriver (int); // nice to have LONG asioGetNumDev (VOID); LONG asioGetDriverName (int,char *,int); LONG asioGetDriverPath (int,char *,int); LONG asioGetDriverCLSID (int,CLSID *); // or use directly access LPASIODRVSTRUCT lpdrvlist; int numdrv; }; typedef class AsioDriverList *LPASIODRIVERLIST; #endif SndObj-2.6.7/include/asiosys.h000644 000766 000024 00000002430 12062673766 016663 0ustar00victorstaff000000 000000 #ifndef __asiosys__ #define __asiosys__ #if defined(_WIN32) || defined(_WIN64) #undef MAC #define PPC 0 #define WINDOWS 1 #define SGI 0 #define SUN 0 #define LINUX 0 #define BEOS 0 #define NATIVE_INT64 0 #define IEEE754_64FLOAT 1 #elif BEOS #define MAC 0 #define PPC 0 #define WINDOWS 0 #define PC 0 #define SGI 0 #define SUN 0 #define LINUX 0 #define NATIVE_INT64 0 #define IEEE754_64FLOAT 1 #ifndef DEBUG #define DEBUG 0 #if DEBUG void DEBUGGERMESSAGE(char *string); #else #define DEBUGGERMESSAGE(a) #endif #endif #elif SGI #define MAC 0 #define PPC 0 #define WINDOWS 0 #define PC 0 #define SUN 0 #define LINUX 0 #define BEOS 0 #define NATIVE_INT64 0 #define IEEE754_64FLOAT 1 #ifndef DEBUG #define DEBUG 0 #if DEBUG void DEBUGGERMESSAGE(char *string); #else #define DEBUGGERMESSAGE(a) #endif #endif #else // MAC #define MAC 1 #define PPC 1 #define WINDOWS 0 #define PC 0 #define SGI 0 #define SUN 0 #define LINUX 0 #define BEOS 0 #define NATIVE_INT64 0 #define IEEE754_64FLOAT 1 #ifndef DEBUG #define DEBUG 0 #if DEBUG void DEBUGGERMESSAGE(char *string); #else #define DEBUGGERMESSAGE(a) #endif #endif #endif #endif SndObj-2.6.7/include/combase.h000644 000766 000024 00000022514 12062673766 016607 0ustar00victorstaff000000 000000 //==========================================================================; // // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY // KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR // PURPOSE. // // Copyright (c) 1992 - 1996 Microsoft Corporation. All Rights Reserved. // //--------------------------------------------------------------------------; // Base class hierachy for creating COM objects, December 1994 /* a. Derive your COM object from CUnknown b. Make a static CreateInstance function that takes an LPUNKNOWN, an HRESULT * and a TCHAR *. The LPUNKNOWN defines the object to delegate IUnknown calls to. The HRESULT * allows error codes to be passed around constructors and the TCHAR * is a descriptive name that can be printed on the debugger. It is important that constructors only change the HRESULT * if they have to set an ERROR code, if it was successful then leave it alone or you may overwrite an error code from an object previously created. When you call a constructor the descriptive name should be in static store as we do not copy the string. To stop large amounts of memory being used in retail builds by all these static strings use the NAME macro, CMyFilter = new CImplFilter(NAME("My filter"),pUnknown,phr); if (FAILED(hr)) { return hr; } In retail builds NAME(_x_) compiles to NULL, the base CBaseObject class knows not to do anything with objects that don't have a name. c. Have a constructor for your object that passes the LPUNKNOWN, HRESULT * and TCHAR * to the CUnknown constructor. You can set the HRESULT if you have an error, or just simply pass it through to the constructor. The object creation will fail in the class factory if the HRESULT indicates an error (ie FAILED(HRESULT) == TRUE) d. Create a FactoryTemplate with your object's class id and CreateInstance function. Then (for each interface) either Multiple inheritance 1. Also derive it from ISomeInterface 2. Include DECLARE_IUNKNOWN in your class definition to declare implementations of QueryInterface, AddRef and Release that call the outer unknown 3. Override NonDelegatingQueryInterface to expose ISomeInterface by code something like if (riid == IID_ISomeInterface) { return GetInterface((ISomeInterface *) this, ppv); } else { return CUnknown::NonDelegatingQueryInterface(riid, ppv); } 4. Declare and implement the member functions of ISomeInterface. or: Nested interfaces 1. Declare a class derived from CUnknown 2. Include DECLARE_IUNKNOWN in your class definition 3. Override NonDelegatingQueryInterface to expose ISomeInterface by code something like if (riid == IID_ISomeInterface) { return GetInterface((ISomeInterface *) this, ppv); } else { return CUnknown::NonDelegatingQueryInterface(riid, ppv); } 4. Implement the member functions of ISomeInterface. Use GetOwner() to access the COM object class. And in your COM object class: 5. Make the nested class a friend of the COM object class, and declare an instance of the nested class as a member of the COM object class. NOTE that because you must always pass the outer unknown and an hResult to the CUnknown constructor you cannot use a default constructor, in other words you will have to make the member variable a pointer to the class and make a NEW call in your constructor to actually create it. 6. override the NonDelegatingQueryInterface with code like this: if (riid == IID_ISomeInterface) { return m_pImplFilter-> NonDelegatingQueryInterface(IID_ISomeInterface, ppv); } else { return CUnknown::NonDelegatingQueryInterface(riid, ppv); } You can have mixed classes which support some interfaces via multiple inheritance and some via nested classes */ #ifndef __COMBASE__ #define __COMBASE__ /* The DLLENTRY module initialises the module handle on loading */ extern HINSTANCE g_hInst; /* On DLL load remember which platform we are running on */ extern DWORD g_amPlatform; extern OSVERSIONINFO g_osInfo; // Filled in by GetVersionEx /* Version of IUnknown that is renamed to allow a class to support both non delegating and delegating IUnknowns in the same COM object */ DECLARE_INTERFACE(INonDelegatingUnknown) { STDMETHOD(NonDelegatingQueryInterface) (THIS_ REFIID, LPVOID *) PURE; STDMETHOD_(ULONG, NonDelegatingAddRef)(THIS) PURE; STDMETHOD_(ULONG, NonDelegatingRelease)(THIS) PURE; }; typedef INonDelegatingUnknown *PNDUNKNOWN; /* This is the base object class that supports active object counting. As part of the debug facilities we trace every time a C++ object is created or destroyed. The name of the object has to be passed up through the class derivation list during construction as you cannot call virtual functions in the constructor. The downside of all this is that every single object constructor has to take an object name parameter that describes it */ class CBaseObject { private: // Disable the copy constructor and assignment by default so you will get // compiler errors instead of unexpected behaviour if you pass objects // by value or assign objects. CBaseObject(const CBaseObject& objectSrc); // no implementation void operator=(const CBaseObject& objectSrc); // no implementation private: static LONG m_cObjects; /* Total number of objects active */ protected: #ifdef DEBUG DWORD m_dwCookie; /* Cookie identifying this object */ #endif public: /* These increment and decrement the number of active objects */ CBaseObject(TCHAR *pName); ~CBaseObject(); /* Call this to find if there are any CUnknown derived objects active */ static LONG ObjectsActive() { return m_cObjects; }; }; /* An object that supports one or more COM interfaces will be based on this class. It supports counting of total objects for DLLCanUnloadNow support, and an implementation of the core non delegating IUnknown */ class CUnknown : public INonDelegatingUnknown, public CBaseObject { private: const LPUNKNOWN m_pUnknown; /* Owner of this object */ protected: /* So we can override NonDelegatingRelease() */ volatile LONG m_cRef; /* Number of reference counts */ public: CUnknown(TCHAR *pName, LPUNKNOWN pUnk, HRESULT *phr); virtual ~CUnknown() {}; /* Return the owner of this object */ LPUNKNOWN GetOwner() const { return m_pUnknown; }; /* Called from the class factory to create a new instance, it is pure virtual so it must be overriden in your derived class */ /* static CUnknown *CreateInstance(LPUNKNOWN, HRESULT *) */ /* Non delegating unknown implementation */ STDMETHODIMP NonDelegatingQueryInterface(REFIID, void **); STDMETHODIMP_(ULONG) NonDelegatingAddRef(); STDMETHODIMP_(ULONG) NonDelegatingRelease(); /* Return an interface pointer to a requesting client performing a thread safe AddRef as necessary */ HRESULT GetInterface(LPUNKNOWN pUnk, void **ppv); }; #if WINVER < 0x0501 /* The standard InterlockedXXX functions won't take volatiles */ static inline LONG InterlockedIncrement( volatile LONG * plong ) { return InterlockedIncrement( const_cast( plong ) ); } static inline LONG InterlockedDecrement( volatile LONG * plong ) { return InterlockedDecrement( const_cast( plong ) ); } static inline LONG InterlockedExchange( volatile LONG * plong, LONG new_value ) { return InterlockedExchange( const_cast( plong ), new_value ); } #endif /* A function that can create a new COM object */ typedef CUnknown *(*LPFNNewCOMObject)(LPUNKNOWN pUnkOuter, HRESULT *phr); /* A function (can be NULL) which is called from the DLL entrypoint routine for each factory template: bLoading - TRUE on DLL load, FALSE on DLL unload rclsid - the m_ClsID of the entry */ typedef void (*LPFNInitRoutine)(BOOL bLoading, const CLSID *rclsid); /* Create one of these per object class in an array so that the default class factory code can create new instances */ class CFactoryTemplate { public: const WCHAR *m_Name; const CLSID *m_ClsID; LPFNNewCOMObject m_lpfnNew; LPFNInitRoutine m_lpfnInit; BOOL IsClassID(REFCLSID rclsid) const { return (IsEqualCLSID(*m_ClsID,rclsid)); }; CUnknown *CreateInstance(LPUNKNOWN pUnk, HRESULT *phr) const { return m_lpfnNew(pUnk, phr); }; }; /* You must override the (pure virtual) NonDelegatingQueryInterface to return interface pointers (using GetInterface) to the interfaces your derived class supports (the default implementation only supports IUnknown) */ #define DECLARE_IUNKNOWN \ STDMETHODIMP QueryInterface(REFIID riid, void **ppv) { \ return GetOwner()->QueryInterface(riid,ppv); \ }; \ STDMETHODIMP_(ULONG) AddRef() { \ return GetOwner()->AddRef(); \ }; \ STDMETHODIMP_(ULONG) Release() { \ return GetOwner()->Release(); \ }; #endif /* __COMBASE__ */ SndObj-2.6.7/include/ginclude.h000644 000766 000024 00000001153 12062673766 016764 0ustar00victorstaff000000 000000 #ifndef __gInclude__ #define __gInclude__ #if SGI #undef BEOS #undef MAC #undef WINDOWS // #define ASIO_BIG_ENDIAN 1 #define ASIO_CPU_MIPS 1 #elif defined(_WIN32) || defined(_WIN64) #undef BEOS #undef MAC #undef SGI #define WINDOWS 1 #define ASIO_LITTLE_ENDIAN 1 #define ASIO_CPU_X86 1 #elif BEOS #undef MAC #undef SGI #undef WINDOWS #define ASIO_LITTLE_ENDIAN 1 #define ASIO_CPU_X86 1 // #else #define MAC 1 #undef BEOS #undef WINDOWS #undef SGI #define ASIO_BIG_ENDIAN 1 #define ASIO_CPU_PPC 1 #endif // always #define NATIVE_INT64 0 #define IEEE754_64FLOAT 1 #endif // __gInclude__ SndObj-2.6.7/include/iasiodrv.h000644 000766 000024 00000003017 12062673766 017013 0ustar00victorstaff000000 000000 #include "asiosys.h" #include "asio.h" /* Forward Declarations */ #ifndef __ASIODRIVER_FWD_DEFINED__ #define __ASIODRIVER_FWD_DEFINED__ typedef interface IASIO IASIO; #endif /* __ASIODRIVER_FWD_DEFINED__ */ interface IASIO : public IUnknown { virtual ASIOBool init(void *sysHandle) = 0; virtual void getDriverName(char *name) = 0; virtual long getDriverVersion() = 0; virtual void getErrorMessage(char *string) = 0; virtual ASIOError start() = 0; virtual ASIOError stop() = 0; virtual ASIOError getChannels(long *numInputChannels, long *numOutputChannels) = 0; virtual ASIOError getLatencies(long *inputLatency, long *outputLatency) = 0; virtual ASIOError getBufferSize(long *minSize, long *maxSize, long *preferredSize, long *granularity) = 0; virtual ASIOError canSampleRate(ASIOSampleRate sampleRate) = 0; virtual ASIOError getSampleRate(ASIOSampleRate *sampleRate) = 0; virtual ASIOError setSampleRate(ASIOSampleRate sampleRate) = 0; virtual ASIOError getClockSources(ASIOClockSource *clocks, long *numSources) = 0; virtual ASIOError setClockSource(long reference) = 0; virtual ASIOError getSamplePosition(ASIOSamples *sPos, ASIOTimeStamp *tStamp) = 0; virtual ASIOError getChannelInfo(ASIOChannelInfo *info) = 0; virtual ASIOError createBuffers(ASIOBufferInfo *bufferInfos, long numChannels, long bufferSize, ASIOCallbacks *callbacks) = 0; virtual ASIOError disposeBuffers() = 0; virtual ASIOError controlPanel() = 0; virtual ASIOError future(long selector,void *opt) = 0; virtual ASIOError outputReady() = 0; }; SndObj-2.6.7/include/iasiothiscallresolver.h000644 000766 000024 00000021546 12062673766 021614 0ustar00victorstaff000000 000000 // **************************************************************************** // File: IASIOThiscallResolver.h // Description: The IASIOThiscallResolver class implements the IASIO // interface and acts as a proxy to the real IASIO interface by // calling through its vptr table using the thiscall calling // convention. To put it another way, we interpose // IASIOThiscallResolver between ASIO SDK code and the driver. // This is necessary because most non-Microsoft compilers don't // implement the thiscall calling convention used by IASIO. // // iasiothiscallresolver.cpp contains the background of this // problem plus a technical description of the vptr // manipulations. // // In order to use this mechanism one simply has to add // iasiothiscallresolver.cpp to the list of files to compile // and #include // // Note that this #include must come after the other ASIO SDK // #includes, for example: // // #include // #include // #include // #include // #include // // Actually the important thing is to #include // after . We have // incorporated a test to enforce this ordering. // // The code transparently takes care of the interposition by // using macro substitution to intercept calls to ASIOInit() // and ASIOExit(). We save the original ASIO global // "theAsioDriver" in our "that" variable, and then set // "theAsioDriver" to equal our IASIOThiscallResolver instance. // // Whilst this method of resolving the thiscall problem requires // the addition of #include to client // code it has the advantage that it does not break the terms // of the ASIO licence by publishing it. We are NOT modifying // any Steinberg code here, we are merely implementing the IASIO // interface in the same way that we would need to do if we // wished to provide an open source ASIO driver. // // For compilation with MinGW -lole32 needs to be added to the // linker options. For BORLAND, linking with Import32.lib is // sufficient. // // The dependencies are with: CoInitialize, CoUninitialize, // CoCreateInstance, CLSIDFromString - used by asiolist.cpp // and are required on Windows whether ThiscallResolver is used // or not. // // Searching for the above strings in the root library path // of your compiler should enable the correct libraries to be // identified if they aren't immediately obvious. // // Note that the current implementation of IASIOThiscallResolver // is not COM compliant - it does not correctly implement the // IUnknown interface. Implementing it is not necessary because // it is not called by parts of the ASIO SDK which call through // theAsioDriver ptr. The IUnknown methods are implemented as // assert(false) to ensure that the code fails if they are // ever called. // Restrictions: None. Public Domain & Open Source distribute freely // You may use IASIOThiscallResolver commercially as well as // privately. // You the user assume the responsibility for the use of the // files, binary or text, and there is no guarantee or warranty, // expressed or implied, including but not limited to the // implied warranties of merchantability and fitness for a // particular purpose. You assume all responsibility and agree // to hold no entity, copyright holder or distributors liable // for any loss of data or inaccurate representations of data // as a result of using IASIOThiscallResolver. // Version: 1.3 Switched to including assert.h for better compatibility. // Wrapped entire .h and .cpp contents with a check for // _MSC_VER to provide better compatibility with MS compilers. // Changed Singleton implementation to use static instance // instead of freestore allocated instance. Removed ASIOExit // macro as it is no longer needed. // 1.2 Removed semicolons from ASIOInit and ASIOExit macros to // allow them to be embedded in expressions (if statements). // Cleaned up some comments. Removed combase.c dependency (it // doesn't compile with BCB anyway) by stubbing IUnknown. // 1.1 Incorporated comments from Ross Bencina including things // such as changing name from ThiscallResolver to // IASIOThiscallResolver, tidying up the constructor, fixing // a bug in IASIOThiscallResolver::ASIOExit() and improving // portability through the use of conditional compilation // 1.0 Initial working version. // Created: 6/09/2003 // Author: Fraser Adams // Ross Bencina // Rene G. Ceballos // Martin Fay // Antti Silvast // // **************************************************************************** #ifndef included_iasiothiscallresolver_h #define included_iasiothiscallresolver_h // We only need IASIOThiscallResolver at all if we are on Win32. For other // platforms we simply bypass the IASIOThiscallResolver definition to allow us // to be safely #include'd whatever the platform to keep client code portable #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) // If microsoft compiler we can call IASIO directly so IASIOThiscallResolver // is not used. #if !defined(_MSC_VER) // The following is in order to ensure that this header is only included after // the other ASIO headers (except for the case of iasiothiscallresolver.cpp). // We need to do this because IASIOThiscallResolver works by eclipsing the // original definition of ASIOInit() with a macro (see below). #if !defined(iasiothiscallresolver_sourcefile) #if !defined(__ASIO_H) #error iasiothiscallresolver.h must be included AFTER asio.h #endif #endif #include #include /* From ASIO SDK */ class IASIOThiscallResolver : public IASIO { private: IASIO* that_; // Points to the real IASIO static IASIOThiscallResolver instance; // Singleton instance // Constructors - declared private so construction is limited to // our Singleton instance IASIOThiscallResolver(); IASIOThiscallResolver(IASIO* that); public: // Methods from the IUnknown interface. We don't fully implement IUnknown // because the ASIO SDK never calls these methods through theAsioDriver ptr. // These methods are implemented as assert(false). virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppv); virtual ULONG STDMETHODCALLTYPE AddRef(); virtual ULONG STDMETHODCALLTYPE Release(); // Methods from the IASIO interface, implemented as forwarning calls to that. virtual ASIOBool init(void *sysHandle); virtual void getDriverName(char *name); virtual long getDriverVersion(); virtual void getErrorMessage(char *string); virtual ASIOError start(); virtual ASIOError stop(); virtual ASIOError getChannels(long *numInputChannels, long *numOutputChannels); virtual ASIOError getLatencies(long *inputLatency, long *outputLatency); virtual ASIOError getBufferSize(long *minSize, long *maxSize, long *preferredSize, long *granularity); virtual ASIOError canSampleRate(ASIOSampleRate sampleRate); virtual ASIOError getSampleRate(ASIOSampleRate *sampleRate); virtual ASIOError setSampleRate(ASIOSampleRate sampleRate); virtual ASIOError getClockSources(ASIOClockSource *clocks, long *numSources); virtual ASIOError setClockSource(long reference); virtual ASIOError getSamplePosition(ASIOSamples *sPos, ASIOTimeStamp *tStamp); virtual ASIOError getChannelInfo(ASIOChannelInfo *info); virtual ASIOError createBuffers(ASIOBufferInfo *bufferInfos, long numChannels, long bufferSize, ASIOCallbacks *callbacks); virtual ASIOError disposeBuffers(); virtual ASIOError controlPanel(); virtual ASIOError future(long selector,void *opt); virtual ASIOError outputReady(); // Class method, see ASIOInit() macro below. static ASIOError ASIOInit(ASIODriverInfo *info); // Delegates to ::ASIOInit }; // Replace calls to ASIOInit with our interposing version. // This macro enables us to perform thiscall resolution simply by #including // after the asio #includes (this file _must_ be // included _after_ the asio #includes) #define ASIOInit(name) IASIOThiscallResolver::ASIOInit((name)) #endif /* !defined(_MSC_VER) */ #endif /* Win32 */ #endif /* included_iasiothiscallresolver_h */ SndObj-2.6.7/include/ladspa.h000644 000766 000024 00000067044 12062673766 016451 0ustar00victorstaff000000 000000 /* ladspa.h Linux Audio Developer's Simple Plugin API Version 1.1[LGPL]. Copyright (C) 2000-2002 Richard W.E. Furse, Paul Barton-Davis, Stefan Westerfeld. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #ifndef LADSPA_INCLUDED #define LADSPA_INCLUDED #define LADSPA_VERSION "1.1" #define LADSPA_VERSION_MAJOR 1 #define LADSPA_VERSION_MINOR 1 #ifdef __cplusplus extern "C" { #endif /*****************************************************************************/ /* Overview: There is a large number of synthesis packages in use or development on the Linux platform at this time. This API (`The Linux Audio Developer's Simple Plugin API') attempts to give programmers the ability to write simple `plugin' audio processors in C/C++ and link them dynamically (`plug') into a range of these packages (`hosts'). It should be possible for any host and any plugin to communicate completely through this interface. This API is deliberately short and simple. To achieve compatibility with a range of promising Linux sound synthesis packages it attempts to find the `greatest common divisor' in their logical behaviour. Having said this, certain limiting decisions are implicit, notably the use of a fixed type (LADSPA_Data) for all data transfer and absence of a parameterised `initialisation' phase. See below for the LADSPA_Data typedef. Plugins are expected to distinguish between control and audio data. Plugins have `ports' that are inputs or outputs for audio or control data and each plugin is `run' for a `block' corresponding to a short time interval measured in samples. Audio data is communicated using arrays of LADSPA_Data, allowing a block of audio to be processed by the plugin in a single pass. Control data is communicated using single LADSPA_Data values. Control data has a single value at the start of a call to the `run()' or `run_adding()' function, and may be considered to remain this value for its duration. The plugin may assume that all its input and output ports have been connected to the relevant data location (see the `connect_port()' function below) before it is asked to run. Plugins will reside in shared object files suitable for dynamic linking by dlopen() and family. The file will provide a number of `plugin types' that can be used to instantiate actual plugins (sometimes known as `plugin instances') that can be connected together to perform tasks. This API contains very limited error-handling. */ /*****************************************************************************/ /* Fundamental data type passed in and out of plugin. This data type is used to communicate audio samples and control values. It is assumed that the plugin will work sensibly given any numeric input value although it may have a preferred range (see hints below). For audio it is generally assumed that 1.0f is the `0dB' reference amplitude and is a `normal' signal level. */ typedef float LADSPA_Data; /*****************************************************************************/ /* Special Plugin Properties: Optional features of the plugin type are encapsulated in the LADSPA_Properties type. This is assembled by ORing individual properties together. */ typedef int LADSPA_Properties; /* Property LADSPA_PROPERTY_REALTIME indicates that the plugin has a real-time dependency (e.g. listens to a MIDI device) and so its output must not be cached or subject to significant latency. */ #define LADSPA_PROPERTY_REALTIME 0x1 /* Property LADSPA_PROPERTY_INPLACE_BROKEN indicates that the plugin may cease to work correctly if the host elects to use the same data location for both input and output (see connect_port()). This should be avoided as enabling this flag makes it impossible for hosts to use the plugin to process audio `in-place.' */ #define LADSPA_PROPERTY_INPLACE_BROKEN 0x2 /* Property LADSPA_PROPERTY_HARD_RT_CAPABLE indicates that the plugin is capable of running not only in a conventional host but also in a `hard real-time' environment. To qualify for this the plugin must satisfy all of the following: (1) The plugin must not use malloc(), free() or other heap memory management within its run() or run_adding() functions. All new memory used in run() must be managed via the stack. These restrictions only apply to the run() function. (2) The plugin will not attempt to make use of any library functions with the exceptions of functions in the ANSI standard C and C maths libraries, which the host is expected to provide. (3) The plugin will not access files, devices, pipes, sockets, IPC or any other mechanism that might result in process or thread blocking. (4) The plugin will take an amount of time to execute a run() or run_adding() call approximately of form (A+B*SampleCount) where A and B depend on the machine and host in use. This amount of time may not depend on input signals or plugin state. The host is left the responsibility to perform timings to estimate upper bounds for A and B. */ #define LADSPA_PROPERTY_HARD_RT_CAPABLE 0x4 #define LADSPA_IS_REALTIME(x) ((x) & LADSPA_PROPERTY_REALTIME) #define LADSPA_IS_INPLACE_BROKEN(x) ((x) & LADSPA_PROPERTY_INPLACE_BROKEN) #define LADSPA_IS_HARD_RT_CAPABLE(x) ((x) & LADSPA_PROPERTY_HARD_RT_CAPABLE) /*****************************************************************************/ /* Plugin Ports: Plugins have `ports' that are inputs or outputs for audio or data. Ports can communicate arrays of LADSPA_Data (for audio inputs/outputs) or single LADSPA_Data values (for control input/outputs). This information is encapsulated in the LADSPA_PortDescriptor type which is assembled by ORing individual properties together. Note that a port must be an input or an output port but not both and that a port must be a control or audio port but not both. */ typedef int LADSPA_PortDescriptor; /* Property LADSPA_PORT_INPUT indicates that the port is an input. */ #define LADSPA_PORT_INPUT 0x1 /* Property LADSPA_PORT_OUTPUT indicates that the port is an output. */ #define LADSPA_PORT_OUTPUT 0x2 /* Property LADSPA_PORT_CONTROL indicates that the port is a control port. */ #define LADSPA_PORT_CONTROL 0x4 /* Property LADSPA_PORT_AUDIO indicates that the port is a audio port. */ #define LADSPA_PORT_AUDIO 0x8 #define LADSPA_IS_PORT_INPUT(x) ((x) & LADSPA_PORT_INPUT) #define LADSPA_IS_PORT_OUTPUT(x) ((x) & LADSPA_PORT_OUTPUT) #define LADSPA_IS_PORT_CONTROL(x) ((x) & LADSPA_PORT_CONTROL) #define LADSPA_IS_PORT_AUDIO(x) ((x) & LADSPA_PORT_AUDIO) /*****************************************************************************/ /* Plugin Port Range Hints: The host may wish to provide a representation of data entering or leaving a plugin (e.g. to generate a GUI automatically). To make this more meaningful, the plugin should provide `hints' to the host describing the usual values taken by the data. Note that these are only hints. The host may ignore them and the plugin must not assume that data supplied to it is meaningful. If the plugin receives invalid input data it is expected to continue to run without failure and, where possible, produce a sensible output (e.g. a high-pass filter given a negative cutoff frequency might switch to an all-pass mode). Hints are meaningful for all input and output ports but hints for input control ports are expected to be particularly useful. More hint information is encapsulated in the LADSPA_PortRangeHintDescriptor type which is assembled by ORing individual hint types together. Hints may require further LowerBound and UpperBound information. All the hint information for a particular port is aggregated in the LADSPA_PortRangeHint structure. */ typedef int LADSPA_PortRangeHintDescriptor; /* Hint LADSPA_HINT_BOUNDED_BELOW indicates that the LowerBound field of the LADSPA_PortRangeHint should be considered meaningful. The value in this field should be considered the (inclusive) lower bound of the valid range. If LADSPA_HINT_SAMPLE_RATE is also specified then the value of LowerBound should be multiplied by the sample rate. */ #define LADSPA_HINT_BOUNDED_BELOW 0x1 /* Hint LADSPA_HINT_BOUNDED_ABOVE indicates that the UpperBound field of the LADSPA_PortRangeHint should be considered meaningful. The value in this field should be considered the (inclusive) upper bound of the valid range. If LADSPA_HINT_SAMPLE_RATE is also specified then the value of UpperBound should be multiplied by the sample rate. */ #define LADSPA_HINT_BOUNDED_ABOVE 0x2 /* Hint LADSPA_HINT_TOGGLED indicates that the data item should be considered a Boolean toggle. Data less than or equal to zero should be considered `off' or `false,' and data above zero should be considered `on' or `true.' LADSPA_HINT_TOGGLED may not be used in conjunction with any other hint except LADSPA_HINT_DEFAULT_0 or LADSPA_HINT_DEFAULT_1. */ #define LADSPA_HINT_TOGGLED 0x4 /* Hint LADSPA_HINT_SAMPLE_RATE indicates that any bounds specified should be interpreted as multiples of the sample rate. For instance, a frequency range from 0Hz to the Nyquist frequency (half the sample rate) could be requested by this hint in conjunction with LowerBound = 0 and UpperBound = 0.5. Hosts that support bounds at all must support this hint to retain meaning. */ #define LADSPA_HINT_SAMPLE_RATE 0x8 /* Hint LADSPA_HINT_LOGARITHMIC indicates that it is likely that the user will find it more intuitive to view values using a logarithmic scale. This is particularly useful for frequencies and gains. */ #define LADSPA_HINT_LOGARITHMIC 0x10 /* Hint LADSPA_HINT_INTEGER indicates that a user interface would probably wish to provide a stepped control taking only integer values. Any bounds set should be slightly wider than the actual integer range required to avoid floating point rounding errors. For instance, the integer set {0,1,2,3} might be described as [-0.1, 3.1]. */ #define LADSPA_HINT_INTEGER 0x20 /* The various LADSPA_HINT_HAS_DEFAULT_* hints indicate a `normal' value for the port that is sensible as a default. For instance, this value is suitable for use as an initial value in a user interface or as a value the host might assign to a control port when the user has not provided one. Defaults are encoded using a mask so only one default may be specified for a port. Some of the hints make use of lower and upper bounds, in which case the relevant bound or bounds must be available and LADSPA_HINT_SAMPLE_RATE must be applied as usual. The resulting default must be rounded if LADSPA_HINT_INTEGER is present. Default values were introduced in LADSPA v1.1. */ #define LADSPA_HINT_DEFAULT_MASK 0x3C0 /* This default values indicates that no default is provided. */ #define LADSPA_HINT_DEFAULT_NONE 0x0 /* This default hint indicates that the suggested lower bound for the port should be used. */ #define LADSPA_HINT_DEFAULT_MINIMUM 0x40 /* This default hint indicates that a low value between the suggested lower and upper bounds should be chosen. For ports with LADSPA_HINT_LOGARITHMIC, this should be exp(log(lower) * 0.75 + log(upper) * 0.25). Otherwise, this should be (lower * 0.75 + upper * 0.25). */ #define LADSPA_HINT_DEFAULT_LOW 0x80 /* This default hint indicates that a middle value between the suggested lower and upper bounds should be chosen. For ports with LADSPA_HINT_LOGARITHMIC, this should be exp(log(lower) * 0.5 + log(upper) * 0.5). Otherwise, this should be (lower * 0.5 + upper * 0.5). */ #define LADSPA_HINT_DEFAULT_MIDDLE 0xC0 /* This default hint indicates that a high value between the suggested lower and upper bounds should be chosen. For ports with LADSPA_HINT_LOGARITHMIC, this should be exp(log(lower) * 0.25 + log(upper) * 0.75). Otherwise, this should be (lower * 0.25 + upper * 0.75). */ #define LADSPA_HINT_DEFAULT_HIGH 0x100 /* This default hint indicates that the suggested upper bound for the port should be used. */ #define LADSPA_HINT_DEFAULT_MAXIMUM 0x140 /* This default hint indicates that the number 0 should be used. Note that this default may be used in conjunction with LADSPA_HINT_TOGGLED. */ #define LADSPA_HINT_DEFAULT_0 0x200 /* This default hint indicates that the number 1 should be used. Note that this default may be used in conjunction with LADSPA_HINT_TOGGLED. */ #define LADSPA_HINT_DEFAULT_1 0x240 /* This default hint indicates that the number 100 should be used. */ #define LADSPA_HINT_DEFAULT_100 0x280 /* This default hint indicates that the Hz frequency of `concert A' should be used. This will be 440 unless the host uses an unusual tuning convention, in which case it may be within a few Hz. */ #define LADSPA_HINT_DEFAULT_440 0x2C0 #define LADSPA_IS_HINT_BOUNDED_BELOW(x) ((x) & LADSPA_HINT_BOUNDED_BELOW) #define LADSPA_IS_HINT_BOUNDED_ABOVE(x) ((x) & LADSPA_HINT_BOUNDED_ABOVE) #define LADSPA_IS_HINT_TOGGLED(x) ((x) & LADSPA_HINT_TOGGLED) #define LADSPA_IS_HINT_SAMPLE_RATE(x) ((x) & LADSPA_HINT_SAMPLE_RATE) #define LADSPA_IS_HINT_LOGARITHMIC(x) ((x) & LADSPA_HINT_LOGARITHMIC) #define LADSPA_IS_HINT_INTEGER(x) ((x) & LADSPA_HINT_INTEGER) #define LADSPA_IS_HINT_HAS_DEFAULT(x) ((x) & LADSPA_HINT_DEFAULT_MASK) #define LADSPA_IS_HINT_DEFAULT_MINIMUM(x) (((x) & LADSPA_HINT_DEFAULT_MASK) \ == LADSPA_HINT_DEFAULT_MINIMUM) #define LADSPA_IS_HINT_DEFAULT_LOW(x) (((x) & LADSPA_HINT_DEFAULT_MASK) \ == LADSPA_HINT_DEFAULT_LOW) #define LADSPA_IS_HINT_DEFAULT_MIDDLE(x) (((x) & LADSPA_HINT_DEFAULT_MASK) \ == LADSPA_HINT_DEFAULT_MIDDLE) #define LADSPA_IS_HINT_DEFAULT_HIGH(x) (((x) & LADSPA_HINT_DEFAULT_MASK) \ == LADSPA_HINT_DEFAULT_HIGH) #define LADSPA_IS_HINT_DEFAULT_MAXIMUM(x) (((x) & LADSPA_HINT_DEFAULT_MASK) \ == LADSPA_HINT_DEFAULT_MAXIMUM) #define LADSPA_IS_HINT_DEFAULT_0(x) (((x) & LADSPA_HINT_DEFAULT_MASK) \ == LADSPA_HINT_DEFAULT_0) #define LADSPA_IS_HINT_DEFAULT_1(x) (((x) & LADSPA_HINT_DEFAULT_MASK) \ == LADSPA_HINT_DEFAULT_1) #define LADSPA_IS_HINT_DEFAULT_100(x) (((x) & LADSPA_HINT_DEFAULT_MASK) \ == LADSPA_HINT_DEFAULT_100) #define LADSPA_IS_HINT_DEFAULT_440(x) (((x) & LADSPA_HINT_DEFAULT_MASK) \ == LADSPA_HINT_DEFAULT_440) typedef struct _LADSPA_PortRangeHint { /* Hints about the port. */ LADSPA_PortRangeHintDescriptor HintDescriptor; /* Meaningful when hint LADSPA_HINT_BOUNDED_BELOW is active. When LADSPA_HINT_SAMPLE_RATE is also active then this value should be multiplied by the relevant sample rate. */ LADSPA_Data LowerBound; /* Meaningful when hint LADSPA_HINT_BOUNDED_ABOVE is active. When LADSPA_HINT_SAMPLE_RATE is also active then this value should be multiplied by the relevant sample rate. */ LADSPA_Data UpperBound; } LADSPA_PortRangeHint; /*****************************************************************************/ /* Plugin Handles: This plugin handle indicates a particular instance of the plugin concerned. It is valid to compare this to NULL (0 for C++) but otherwise the host should not attempt to interpret it. The plugin may use it to reference internal instance data. */ typedef void * LADSPA_Handle; /*****************************************************************************/ /* Descriptor for a Type of Plugin: This structure is used to describe a plugin type. It provides a number of functions to examine the type, instantiate it, link it to buffers and workspaces and to run it. */ typedef struct _LADSPA_Descriptor { /* This numeric identifier indicates the plugin type uniquely. Plugin programmers may reserve ranges of IDs from a central body to avoid clashes. Hosts may assume that IDs are below 0x1000000. */ unsigned long UniqueID; /* This identifier can be used as a unique, case-sensitive identifier for the plugin type within the plugin file. Plugin types should be identified by file and label rather than by index or plugin name, which may be changed in new plugin versions. Labels must not contain white-space characters. */ const char * Label; /* This indicates a number of properties of the plugin. */ LADSPA_Properties Properties; /* This member points to the null-terminated name of the plugin (e.g. "Sine Oscillator"). */ const char * Name; /* This member points to the null-terminated string indicating the maker of the plugin. This can be an empty string but not NULL. */ const char * Maker; /* This member points to the null-terminated string indicating any copyright applying to the plugin. If no Copyright applies the string "None" should be used. */ const char * Copyright; /* This indicates the number of ports (input AND output) present on the plugin. */ unsigned long PortCount; /* This member indicates an array of port descriptors. Valid indices vary from 0 to PortCount-1. */ const LADSPA_PortDescriptor * PortDescriptors; /* This member indicates an array of null-terminated strings describing ports (e.g. "Frequency (Hz)"). Valid indices vary from 0 to PortCount-1. */ const char * const * PortNames; /* This member indicates an array of range hints for each port (see above). Valid indices vary from 0 to PortCount-1. */ const LADSPA_PortRangeHint * PortRangeHints; /* This may be used by the plugin developer to pass any custom implementation data into an instantiate call. It must not be used or interpreted by the host. It is expected that most plugin writers will not use this facility as LADSPA_Handle should be used to hold instance data. */ void * ImplementationData; /* This member is a function pointer that instantiates a plugin. A handle is returned indicating the new plugin instance. The instantiation function accepts a sample rate as a parameter. The plugin descriptor from which this instantiate function was found must also be passed. This function must return NULL if instantiation fails. Note that instance initialisation should generally occur in activate() rather than here. */ LADSPA_Handle (*instantiate)(const struct _LADSPA_Descriptor * Descriptor, unsigned long SampleRate); /* This member is a function pointer that connects a port on an instantiated plugin to a memory location at which a block of data for the port will be read/written. The data location is expected to be an array of LADSPA_Data for audio ports or a single LADSPA_Data value for control ports. Memory issues will be managed by the host. The plugin must read/write the data at these locations every time run() or run_adding() is called and the data present at the time of this connection call should not be considered meaningful. connect_port() may be called more than once for a plugin instance to allow the host to change the buffers that the plugin is reading or writing. These calls may be made before or after activate() or deactivate() calls. connect_port() must be called at least once for each port before run() or run_adding() is called. When working with blocks of LADSPA_Data the plugin should pay careful attention to the block size passed to the run function as the block allocated may only just be large enough to contain the block of samples. Plugin writers should be aware that the host may elect to use the same buffer for more than one port and even use the same buffer for both input and output (see LADSPA_PROPERTY_INPLACE_BROKEN). However, overlapped buffers or use of a single buffer for both audio and control data may result in unexpected behaviour. */ void (*connect_port)(LADSPA_Handle Instance, unsigned long Port, LADSPA_Data * DataLocation); /* This member is a function pointer that initialises a plugin instance and activates it for use. This is separated from instantiate() to aid real-time support and so that hosts can reinitialise a plugin instance by calling deactivate() and then activate(). In this case the plugin instance must reset all state information dependent on the history of the plugin instance except for any data locations provided by connect_port() and any gain set by set_run_adding_gain(). If there is nothing for activate() to do then the plugin writer may provide a NULL rather than an empty function. When present, hosts must call this function once before run() (or run_adding()) is called for the first time. This call should be made as close to the run() call as possible and indicates to real-time plugins that they are now live. Plugins should not rely on a prompt call to run() after activate(). activate() may not be called again unless deactivate() is called first. Note that connect_port() may be called before or after a call to activate(). */ void (*activate)(LADSPA_Handle Instance); /* This method is a function pointer that runs an instance of a plugin for a block. Two parameters are required: the first is a handle to the particular instance to be run and the second indicates the block size (in samples) for which the plugin instance may run. Note that if an activate() function exists then it must be called before run() or run_adding(). If deactivate() is called for a plugin instance then the plugin instance may not be reused until activate() has been called again. If the plugin has the property LADSPA_PROPERTY_HARD_RT_CAPABLE then there are various things that the plugin should not do within the run() or run_adding() functions (see above). */ void (*run)(LADSPA_Handle Instance, unsigned long SampleCount); /* This method is a function pointer that runs an instance of a plugin for a block. This has identical behaviour to run() except in the way data is output from the plugin. When run() is used, values are written directly to the memory areas associated with the output ports. However when run_adding() is called, values must be added to the values already present in the memory areas. Furthermore, output values written must be scaled by the current gain set by set_run_adding_gain() (see below) before addition. run_adding() is optional. When it is not provided by a plugin, this function pointer must be set to NULL. When it is provided, the function set_run_adding_gain() must be provided also. */ void (*run_adding)(LADSPA_Handle Instance, unsigned long SampleCount); /* This method is a function pointer that sets the output gain for use when run_adding() is called (see above). If this function is never called the gain is assumed to default to 1. Gain information should be retained when activate() or deactivate() are called. This function should be provided by the plugin if and only if the run_adding() function is provided. When it is absent this function pointer must be set to NULL. */ void (*set_run_adding_gain)(LADSPA_Handle Instance, LADSPA_Data Gain); /* This is the counterpart to activate() (see above). If there is nothing for deactivate() to do then the plugin writer may provide a NULL rather than an empty function. Hosts must deactivate all activated units after they have been run() (or run_adding()) for the last time. This call should be made as close to the last run() call as possible and indicates to real-time plugins that they are no longer live. Plugins should not rely on prompt deactivation. Note that connect_port() may be called before or after a call to deactivate(). Deactivation is not similar to pausing as the plugin instance will be reinitialised when activate() is called to reuse it. */ void (*deactivate)(LADSPA_Handle Instance); /* Once an instance of a plugin has been finished with it can be deleted using the following function. The instance handle passed ceases to be valid after this call. If activate() was called for a plugin instance then a corresponding call to deactivate() must be made before cleanup() is called. */ void (*cleanup)(LADSPA_Handle Instance); } LADSPA_Descriptor; /**********************************************************************/ /* Accessing a Plugin: */ /* The exact mechanism by which plugins are loaded is host-dependent, however all most hosts will need to know is the name of shared object file containing the plugin types. To allow multiple hosts to share plugin types, hosts may wish to check for environment variable LADSPA_PATH. If present, this should contain a colon-separated path indicating directories that should be searched (in order) when loading plugin types. A plugin programmer must include a function called "ladspa_descriptor" with the following function prototype within the shared object file. This function will have C-style linkage (if you are using C++ this is taken care of by the `extern "C"' clause at the top of the file). A host will find the plugin shared object file by one means or another, find the ladspa_descriptor() function, call it, and proceed from there. Plugin types are accessed by index (not ID) using values from 0 upwards. Out of range indexes must result in this function returning NULL, so the plugin count can be determined by checking for the least index that results in NULL being returned. */ const LADSPA_Descriptor * ladspa_descriptor(unsigned long Index); /* Datatype corresponding to the ladspa_descriptor() function. */ typedef const LADSPA_Descriptor * (*LADSPA_Descriptor_Function)(unsigned long Index); /**********************************************************************/ #ifdef __cplusplus } #endif #endif /* LADSPA_INCLUDED */ /* EOF */ SndObj-2.6.7/include/rfftw/000755 000766 000024 00000000000 12062673766 016151 5ustar00victorstaff000000 000000 SndObj-2.6.7/include/SndObj/000755 000766 000024 00000000000 12062711467 016167 5ustar00victorstaff000000 000000 SndObj-2.6.7/include/SndObj/ADSR.h000755 000766 000024 00000004726 12062674072 017105 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //***********************************************************// // ADSR.h: interface of the ADSR class // // // // // // // //***********************************************************// #ifndef _ADSR_H #define _ADSR_H #include "SndObj.h" class ADSR : public SndObj{ protected: unsigned long m_count; // keeps track of the time in samples float m_att; // attack time float m_maxamp; // max amplitude float m_dec; // decay time float m_sus; // sustain amplitude float m_rel; // release time unsigned long m_dur; // env duration short m_sustain; // sustain flag: 1= ON, 0= OFF public: ADSR(); ADSR(float att, float maxamp, float dec, float sus, float rel, float dur, SndObj* InObj = 0, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~ADSR(); void SetSr(float sr); void SetMaxAmp (float maxamp){ m_maxamp = maxamp; } void Sustain(){ m_sustain = 1; } void Release(){ m_sustain = 0; m_count = (unsigned long)(m_dur - m_rel) + 1; } void Restart() { m_count = 0; } void SetADSR(float att, float dec, float sus, float rel); void SetDur(float dur){ m_dur = (unsigned long) (m_sr*dur); m_count = 0; } int Set(char* mess, float value); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/AdSyn.h000755 000766 000024 00000002345 12062674072 017365 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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, float pitch = 1.f, float scale=1.f, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~AdSyn(); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/Allpass.h000755 000766 000024 00000003217 12062674072 017745 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Allpass.h: interface of the Allpass class // // (Allpass filter) // // // // // //************************************************************// #ifndef _ALLPASS_H #define _ALLPASS_H #include "Comb.h" class Allpass : public Comb { protected: public: Allpass(); Allpass(float gain, float delaytime, SndObj* InObj, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Allpass(); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/Ap.h000755 000766 000024 00000004156 12062674072 016711 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Ap.h: interface of the Ap class (2nd order // // butterworth band-pass filter). // // // // // //************************************************************// #ifndef _AP_H #define _AP_H #include "TpTz.h" class Ap: public TpTz { protected: void inline SetAPParams(float fr, float R); SndObj* m_inputR; SndObj* m_inputfr; public: Ap(); Ap(float fr, float R, SndObj* inObj, SndObj* inputfreq = 0, SndObj* inputR=0, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Ap(); void SetFreq(float fr, SndObj* InFrObj); void SetR(float r, SndObj* InRObj=0); void SetSr(float sr){ m_sr = sr; SetAPParams(m_fr, m_bw); } int Set(char* mess, float value); int Connect(char* mess, void* input); short DoProcess(); char* ErrorMessage(); }; void Ap::SetAPParams(float fr, float R){ R= 1.f/R; double thecos = cos((2*PI*fr)/m_sr); m_a1 = -2*R*thecos; m_a2 = R*R; m_b1 = (-2/R)*thecos; m_b2 = 1/m_a2; m_a = 1; } #endif SndObj-2.6.7/include/SndObj/Balance.h000755 000766 000024 00000005057 12062674072 017677 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Balance.h: interface of the Balance class // // // // // // // //************************************************************// #ifndef _BALANCE_H #define _BALANCE_H #include "SndObj.h" class Balance : public SndObj { protected: float m_fr; double m_pow; double m_pow1; double m_pow2; double m_a0, m_a1, m_b1, m_b2; double* m_delay2; double* m_delay; SndObj* m_comp; float rectify(float val){ return (val < 0 ? val*-1 : val); } double filter(double in, double* delay); public: void SetInput(SndObj* input1, SndObj* input2){ m_comp = input2; m_input = input1; } void SetLPFreq(float fr); void SetSr(float sr); int Set(char* mess, float value); Balance(); Balance(SndObj* input1, SndObj* input2, float fr=10.f, int vecsize=DEF_VECSIZE, float sr = DEF_SR); ~Balance(); char* ErrorMessage(); short DoProcess(); int Connect(char* mess, void* input); }; double inline Balance::filter(double in, double* delay) { double out = 0.f; // output // filtering out = m_a0*in + m_a1*delay[2] + m_a0*delay[3] - m_b1*delay[0] - m_b2*delay[1]; // recirculate the delay line delay[3] = delay[2]; // past inputs delay[2] = in; delay[1] = delay[0]; // past outputs delay[0] = out; return(out); // output the float value } #endif SndObj-2.6.7/include/SndObj/Bend.h000755 000766 000024 00000003154 12062674072 017216 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 /***************************************************/ // Bend.cpp: implementation of the Bend class, / // MIDI pitchbend input processing / // / /***************************************************/ #ifndef _BEND_H #define _BEND_H #include "MidiIn.h" class Bend : public MidiIn { protected: float m_bend; float m_range; public: Bend(); Bend(SndObj* InObj, SndMidiIn* input, float range, short channel = 1, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Bend(); void SetRange(float range){ m_range = range;} int Set(char* mess, float value); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/ButtBP.h000755 000766 000024 00000005720 12062674072 017507 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // ButtBP.h: interface of the ButtBP class (2nd order // // butterworth band-pass filter). // // // // // //************************************************************// #ifndef _ButtBP_H #define _ButtBP_H #include "TpTz.h" class ButtBP: public TpTz { protected: void inline SetParam(float fr, float bw, int type); int m_type; SndObj* m_inputbw; SndObj* m_inputfr; public: ButtBP(); ButtBP(float fr, float bw, SndObj* inObj, SndObj* inputfreq = 0, SndObj* inputbw = 0, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~ButtBP(); int Set(char* mess, float value); void SetFreq(float fr){ SetFreq(fr,m_inputfr);} void SetBW(float bw){ SetBW(bw,m_inputbw);} void SetFreq(float fr, SndObj* InFrObj); void SetBW(float bw, SndObj* InBWObj); void SetSr(float sr){ m_sr = sr; SetParam(m_fr, m_bw, m_type); } int Connect(char* mess, void* input); short DoProcess(); }; void ButtBP::SetParam(float fr, float bw, int type){ double C, D; switch(type){ case 1: // BP C = 1/(tan(PI*bw/m_sr)); D = 2*cos((2*PI*fr)/m_sr); m_a = (1/(1+C)); m_a1 = 0.f; m_a2 = -m_a; m_b1 = -(C*D*m_a); m_b2 = (C - 1)*m_a; break; case 2: // BR C = (tan(PI*bw/m_sr)); D = 2*cos((2*PI*fr)/m_sr); m_a = 1/(1+C); m_a1 = -(D*m_a); m_a2 = m_a; m_b1 = -(D*m_a); m_b2 = (1 - C)*m_a; break; case 3: // HP C = tan(PI*fr/m_sr); m_a = 1/(1 + sqrt(2.0)*C + (C*C)); // a2 = a0 m_a1 = - 2*m_a; m_a2 = m_a; m_b1 = 2*((C*C) - 1)*m_a; m_b2 = (1 - sqrt(2.0)*C + (C*C))*m_a; break; case 4: C = 1/(tan(PI*fr/m_sr)); m_a = 1/(1 + sqrt(2.0)*C + (C*C)); // a2 = a0 m_a1 = 2*m_a; m_a2 = m_a; m_b1 = 2*(1 - (C*C))*m_a; m_b2 = (1 - sqrt(2.0)*C + (C*C))*m_a; break; } } #endif SndObj-2.6.7/include/SndObj/ButtBR.h000755 000766 000024 00000003154 12062674072 017510 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // ButtBR.h: interface of the ButtBR class (2nd order // // butterworth band-reject filter). // // // // // //************************************************************// #ifndef _ButtBR_H #define _ButtBR_H #include "ButtBP.h" class ButtBR : public ButtBP { protected: public: ButtBR(); ButtBR(float fr, float bw, SndObj* inObj, SndObj* inputfreq = 0, SndObj* inputbw = 0, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~ButtBR(); }; #endif SndObj-2.6.7/include/SndObj/ButtHP.h000755 000766 000024 00000003114 12062674072 017510 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // ButtHP.h: interface of the ButtHP class (2nd order // // butterworth high-pass filter). // // // // // //************************************************************// #ifndef _ButtHP_H #define _ButtHP_H #include "ButtBP.h" class ButtHP: public ButtBP { protected: public: ButtHP(); ButtHP(float fr, SndObj* inObj, SndObj* inputfreq = 0, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~ButtHP(); }; #endif SndObj-2.6.7/include/SndObj/ButtLP.h000755 000766 000024 00000003112 12062674072 017512 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // ButtLP.h: interface of the ButtLP class (2nd order // // butterworth low-pass filter). // // // // // //************************************************************// #ifndef _ButtLP_H #define _ButtLP_H #include "ButtBP.h" class ButtLP: public ButtBP { protected: public: ButtLP(); ButtLP(float fr, SndObj* inObj, SndObj* inputfreq = 0, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~ButtLP(); }; #endif SndObj-2.6.7/include/SndObj/Buzz.h000755 000766 000024 00000003351 12062674072 017277 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 _BUZZ_H #define _BUZZ_H #include "SndObj.h" #include "HarmTable.h" #include "Oscili.h" class Buzz : public SndObj { protected: HarmTable* m_ptable; // reference to a Table obj Oscili* oscil1; Oscili* oscil2; float m_fr; float m_amp; short m_harm; SndObj* m_inputamp; public: Buzz(); Buzz(float fr, float amp, short harms, SndObj* InFrObj=0, SndObj* InAmpObj=0, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Buzz(); void SetFreq(float fr, SndObj* InFrObj=0); void SetAmp(float amp, SndObj* InAmpObj=0){ m_amp = amp; m_inputamp = InAmpObj; } void SetSr(float sr); void SetHarm(int harm); int Set(char* mess, float value); int Connect(char* mess, void* input); char* ErrorMessage(); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/Comb.h000755 000766 000024 00000003344 12062674072 017227 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Comb.h: interface of the comb class // // (comb filter) // // // // // //************************************************************// #ifndef _COMB_H #define _COMB_H #include "DelayLine.h" class Comb : public DelayLine { protected: float m_gain; // comb gain public: Comb(); Comb(float gain, float delaytime, SndObj* InObj, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Comb(); void SetGain(float gain); int Set(char* mess, float value); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/Convol.h000755 000766 000024 00000003704 12062674072 017607 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 /////////////////////////////////////////////// // Convol.h: Fast convolution using a tabulated // impulse response // // VL, 2003 ///////////////////////////////////////////// #ifndef _CONVOL_H #define _CONVOL_H #include "SndObj.h" #include "Table.h" #include class Convol: public SndObj { protected: Table* m_table; float* m_impulse; float* m_sigframe; float* m_outframe; float* m_overlap; int m_L; int m_count; int m_fftsize; float m_scale; rfftw_plan m_fwd; rfftw_plan m_inv; void inline mult(float* a, float* b, float* res); void inline fft(float* in, float* out); void inline ifft(float* in, float* out); public: // constructors / destructor Convol(); Convol(Table* impulse, SndObj* input, float scale=1.f, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Convol(); int Connect(char* mess, void* input); int Set(char* mess, float value); void SetImpulse(Table* impulse, float scale); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/DelayLine.h000755 000766 000024 00000005163 12062674072 020216 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // DelayLine.h: interface of the Delayline class // // // // // // // //************************************************************// #ifndef _DELAYLINE_H #define _DELAYLINE_H #include "SndObj.h" class DelayLine : public SndObj { protected: float* m_delay; // delay line float m_delaytime; // delay time long m_size; // delay line size in samples long m_wpointer; // write pointer long m_rpointer; // read pointer void PutSample(float sample){ m_delay[m_wpointer] = sample; m_wpointer = (m_wpointer != m_size-1 ? m_wpointer+1 : 0); } float GetSample(){ float out; out = m_delay[(m_rpointer%=m_size)]; m_rpointer++; return out; } float GetSample(float pos){ int p = (int) pos, pp1 = (p == m_size-1 ? 0 : p+1); float frac = pos - p; return m_delay[p] + frac*(m_delay[pp1] - m_delay[p]); } float GetSample(long pos){ return m_delay[pos]; } public: DelayLine(); DelayLine(float delaytime, SndObj* InObj, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~DelayLine(); float* Buffer() { return m_delay; } long GetWritePointerPos() { return m_wpointer; } float GetDelayTime() { return m_size/m_sr; } void SetSr(float sr); void Reset(); virtual void SetDelayTime(float delaytime); int Set(char* mess, float value); short DoProcess(); char* ErrorMessage(); }; #endif SndObj-2.6.7/include/SndObj/EnvTable.h000755 000766 000024 00000003527 12062674072 020052 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // EnvTable.h: interface of the EnvTable class // // // // // // // //************************************************************// #ifndef _EnvTable_H #define _EnvTable_H #include "Table.h" class EnvTable : public Table { protected: int* m_seglen; float* m_segp; int m_segments; float m_typec; // type of curve (LOG OR LINEAR) public: void SetEnvelope(int segments, float start, float* points, float* lengths, float type); char* ErrorMessage(); short MakeTable(); EnvTable(); EnvTable(long L, int segments, float start, float* points, float* lengths,float type = 0.f); ~EnvTable(); }; #endif SndObj-2.6.7/include/SndObj/FastOsc.h000755 000766 000024 00000003336 12062674072 017712 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 informationc #ifndef _FASTOSC_H #define _FASTOSC_H #include "SndObj.h" #include "Table.h" const long phasemask = 0x0FFFFFFL; const long maxlength = 0x1000000L; class FastOsc : public SndObj { protected: long m_phase; long m_size; float m_factor; long m_lobits; float m_amp; float m_fr; Table* m_ptable; public: FastOsc(); FastOsc(Table* table, float fr, float amp, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~FastOsc(); void SetFreq(float fr) { m_fr = fr;} void SetAmp(float amp) { m_amp = amp;} void SetPhase(float phase){m_phase = (long)(maxlength*phase);} virtual void SetTable(Table* table); int Set(char* mess, float value); int Connect(char* mess, void* input); void SetSr(float sr); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/FFT.h000755 000766 000024 00000005070 12062674072 016764 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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.h: interface of the FFT class: // short-time fast fourier transform // using the FFTW library (v. 2.1.3) // Victor Lazzarini, 2003 ///////////////////////////////////////////////////////// #ifndef _FFT_H #define _FFT_H #include "SndObj.h" #include "Table.h" #include 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 float m_fund; float m_scale; // scaling factor float m_norm; // norm factor int m_frames; // frame overlaps float** m_sigframe; // signal frames float* 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(float* signal); // reset memory and initialisation void ReInit(); public: FFT(); FFT(Table* window, SndObj* input, float scale=1.f, int fftsize=DEF_FFTSIZE, int hopsize=DEF_VECSIZE, float 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, float value); void SetScale(float scale){ m_scale = scale; m_norm = m_fftsize/m_scale;} virtual void SetFFTSize(int fftsize); virtual void SetHopSize(int hopsize); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/FFT_alt.h000755 000766 000024 00000004753 12062674072 017633 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 // ////////////////////////////////////////////////////// // FFT_alternative.h : a self-contained alternative // to the FFT class, not using FFTW, using its own // FFT functions. Slower, but independent, // Victor Lazzarini, 2003 ///////////////////////////////////////////////////////// #ifndef _FFT_H #define _FFT_H #include "SndObj.h" #include "Table.h" 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 float m_scale; // scaling factor float m_norm; // norm factor int m_frames; // frame overlaps float** m_sigframe; // signal frames float* m_ffttmp; // tmp vector for fft transform int m_cur; // index into current frame Table* m_table; // window // fft wrapper method void inline fft(float* signal); // reset memory and initialisation void ReInit(); void rfft(float* x, int N, int forward); public: FFT(); FFT(Table* window, SndObj* input, float scale=1.f, int fftsize=DEF_FFTSIZE, int hopsize=DEF_VECSIZE, int vecsize=DEF_FFTSIZE, float 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, float value); void SetScale(float scale){ m_scale = scale; m_norm = m_fftsize/m_scale;} virtual void SetFFTSize(int fftsize); virtual void SetHopSize(int hopsize); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/Filter.h000755 000766 000024 00000004340 12062674072 017571 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // filter.h: interface of the Filter abstract base class // // // // // // // //************************************************************// #ifndef _FILTER_H #define _FILTER_H #include "SndObj.h" class Filter : public SndObj { protected: float m_fr; float m_bw; double* m_delay; // filter delay void inline SetParam(float fr, float bw); double m_a; double m_b1; double m_b2; public: Filter(); Filter(float fr, float bw, SndObj* inObj, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Filter(); virtual void SetFreq(float fr); virtual void SetBW(float bw); int Set(char* mess, float value); void SetSr(float sr){ m_sr = sr; SetParam(m_fr, m_bw); } char* ErrorMessage(); short DoProcess(); }; void Filter::SetParam(float fr, float bw){ double R, thecos, rsq, rr; // coefficient vars rr = 2*(R = (1 - PI*(bw/m_sr))); rsq = R*R; thecos = (rr/(1+(rsq)))*cos(PI*(fr/(m_sr/2))); m_a = (1 - (rsq))*sin(acos(thecos)); m_b1 = rr*thecos; m_b2 = rsq; } #endif SndObj-2.6.7/include/SndObj/Fir.h000755 000766 000024 00000003315 12062674072 017065 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 _FIR_H #define _FIR_H #include "DelayLine.h" #include "Table.h" class FIR : public DelayLine { protected: Table* m_table; bool m_newtable; public: int Connect(char* mess, void* input); int Set(char* mess, float value); FIR(); FIR(Table* coeftable, SndObj* input, int vecsize=DEF_VECSIZE, float sr=DEF_SR); FIR(float* impulse, int impulsesize, SndObj* input, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~FIR(); void SetTable(Table* coeftable){ m_table = coeftable; m_newtable = false; SetDelayTime(m_table->GetLen()/m_sr);} void SetImpulse(float* impulse, int impulsesize); void SetDelayTime(float dtime){ if(m_newtable) DelayLine::SetDelayTime(dtime); else return; } short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/Gain.h000755 000766 000024 00000003576 12062674072 017234 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Gain.h: interface of the gain class // // // // // // // //************************************************************// #ifndef _GAIN_H #define _GAIN_H #include "SndObj.h" class Gain : public SndObj{ protected: float m_gain; // gain factor in dB public: Gain(); Gain(float gain, SndObj* InObj, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Gain(); int Set(char* mess, float value); void SetGain(float gain); void SetGainM(float gain_multiplier) { m_gain = gain_multiplier; } float dBToAmp(float amp); // changes amp in dB to amp multiplier short DoProcess(); // change gain }; #endif SndObj-2.6.7/include/SndObj/HammingTable.h000755 000766 000024 00000003223 12062674072 020673 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 : float m_alpha; public: void SetParam(long L, float alpha=.54); char* ErrorMessage(); short MakeTable(); HammingTable(); HammingTable(long L, float alpha); ~HammingTable(); }; #endif SndObj-2.6.7/include/SndObj/HarmTable.h000755 000766 000024 00000003445 12062674072 020210 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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; float m_phase; int m_typew; public: void SetHarm(int harm, int type); char* ErrorMessage(); short MakeTable(); HarmTable(); void SetPhase(float phase){ m_phase = (float)(phase*TWOPI); } HarmTable(long L, int harm, int type, float phase=0.f); ~HarmTable(); }; #endif SndObj-2.6.7/include/SndObj/Hilb.h000755 000766 000024 00000004213 12062674072 017221 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 ///////////////////////////////////////////////////// // Hilbert Transform filter // // VL, 2001 ////////////////////////////////////////////////////// #ifndef _HILB_H #define _HILB_H #include "SndObj.h" const float c1 = -0.190696f; const float c2 = -0.860735f; const float c3 = -0.5531f; const double poles[12] = {.3609, 2.7412, 11.1573, 44.7581, 179.6242, 798.4578, 1.2524, 5.5671, 22.3423, 89.6271, 364.7914, 2770.1114}; class Hilb : public SndObj { protected: SndObj* m_channel; // pointers to the memory locations double* m_delay1; double* m_delay2; double* m_delay3; double* m_delay4; // memory double* m_delay; double* m_coef; inline double allpass(double in, double* delay, double coef); public: SndObj* real; SndObj* imag; // constructors / destructor Hilb(); Hilb(SndObj* input, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Hilb(); short DoProcess(); char* ErrorMessage(); }; double Hilb::allpass(double in, double* delay, double coef1){ double out = coef1*(in - delay[1]) + delay[0]; // recirculate the delay line delay[0] = in; return (delay[1] = out); } #endif SndObj-2.6.7/include/SndObj/HiPass.h000755 000766 000024 00000003500 12062674072 017530 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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)Rory Walsh May 2003 // See License.txt for a disclaimer of all warranties // and licensing information //*************************************************************// // HiPass.h : 1st order high pass filter // // // // Rory Walsh May 2003 // // // //*************************************************************// #ifndef _HIPASS_H #define _HIPASS_H #include "LowPass.h" class HiPass : public LoPass { protected: public: HiPass(); HiPass(float freq, SndObj* inObj, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~HiPass(); void SetFreq(float fr){ m_fr = fr; double C = 2 - cos(2*PI*m_fr/m_sr); m_b1 = C - sqrt((C*C) - 1); m_a = 1 - m_b1; } void SetSr(float sr){ m_sr = sr; double C = 2 - cos(2*PI*m_fr/m_sr); m_b1 = C - sqrt((C*C) - 1); m_a = 1 - m_b1; } int Set(char* mess, float value); }; #endif SndObj-2.6.7/include/SndObj/IADSR.h000755 000766 000024 00000003551 12062674072 017211 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //***********************************************************// // IADSR.h: interface of the IADSR class // // ADSR with user-defined init and end values // // // // // //***********************************************************// #ifndef _IADSR_H #define _IADSR_H #include "ADSR.h" class IADSR : public ADSR{ protected: float m_init; float m_end; public: IADSR(); IADSR(float init, float att, float maxamp, float dec, float sus, float rel, float end, float dur, SndObj* InObj = 0, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~IADSR(); void SetInit(float init){ m_init = init;} void SetEnd(float end){ m_end = end; } int Set(char* mess, float value); short DoProcess(); // change gain }; #endif SndObj-2.6.7/include/SndObj/IFAdd.h000755 000766 000024 00000002427 12062674072 017257 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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, float pitch=1.f, float scale=1.f, float tscal=1.f, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~IFAdd(); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/IFFT.h000755 000766 000024 00000004626 12062674072 017103 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 float m_fund; int m_frames; // frame overlaps float** m_sigframe; // signal frames float* 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(float* signal); public: IFFT(); IFFT(Table* window, SndObj* input, int fftsize = DEF_FFTSIZE, int hopsize=DEF_VECSIZE, float 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, float value); virtual void SetFFTSize(int fftsize); virtual void SetHopSize(int hopsize); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/IFFT_alt.h000755 000766 000024 00000002773 12062674072 017744 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 // //////////////////////////////////////////////////////// // IFFT_alternative.cpp : a self-contained alternative // to the IFFT class, not using FFTW, using its own // FFT functions. Slower, but not depending on other code. // Victor Lazzarini, 2003 ///////////////////////////////////////////////////////// #ifndef _IFFT_H #define _IFFT_H #include "FFT.h" class IFFT : public FFT { protected: void inline ifft(float* signal); public: IFFT::IFFT(); IFFT::IFFT(Table* window, SndObj* input, int fftsize = DEF_FFTSIZE, int hopsize=DEF_VECSIZE, int vecsize = DEF_VECSIZE, float sr=DEF_SR); IFFT::~IFFT(); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/IFGram.h000755 000766 000024 00000003356 12062674072 017457 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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: float* m_diffwin; // difference window float* m_fftdiff; // holds fft of diff window float* m_diffsig; float* m_pdiff; private: void inline IFAnalysis(float* signal); public: IFGram(); IFGram(Table* window, SndObj* input, float scale=1.f, int fftsize=DEF_FFTSIZE, int hopsize=DEF_VECSIZE, float sr=DEF_SR); ~IFGram(); int Set(char* mess, float value); int Connect(char* mess, void* input); void SetFFTSize(int fftsize); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/ImpulseTable.h000755 000766 000024 00000003646 12062674072 020742 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // ImpulseTable.h: interface of the ImpulseTable class // // // // // // // //************************************************************// #ifndef _ImpulseTable_H #define _ImpulseTable_H #include "SpecEnvTable.h" #include class ImpulseTable : public SpecEnvTable { protected: Table* m_window; rfftw_plan m_plan; // FFTW initialisation float* m_ffttmp; public: void SetWindow(Table* window){ m_window = window->GetLen() == m_L ? window : 0; MakeTable(); } short MakeTable(); ImpulseTable(); ImpulseTable(long L, int segments, float start, float* points, float* lengths,float type = 0.f, Table* window=0, float nyquistamp=0.f); ~ImpulseTable(); }; #endif SndObj-2.6.7/include/SndObj/Interp.h000755 000766 000024 00000003546 12062674072 017614 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //***********************************************************// // Interp.h : interface of the Interp Class // (interpolation object) // //***********************************************************// #ifndef _INTERP_H #define _INTERP_H #include "SndObj.h" class Interp : public SndObj { protected: float m_initial; // initial value float m_fin; // fin value float m_typec; // type of curve 0 = LINEAR, EXP < 0 < INV EXP unsigned long m_dur; unsigned long m_count; public: Interp(); Interp(float initial, float fin, float dur, float type = 0.f, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Interp(); int Set(char* mess, float value); void SetSr(float sr); void Restart(){ m_count = 0; }; void SetCurve(float initial, float fin, float m_typec = 0.f); void SetDur(float dur){ m_dur = (unsigned long) (m_sr*dur); m_count = 0; } short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/Lookup.h000755 000766 000024 00000003626 12062674072 017623 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //*******************************************************// // Lookup.h : interface of the Lookup class // truncated table lookup // //*******************************************************// #ifndef _LOOKUP_H #define _LOOKUP_H #include "SndObj.h" #include "Table.h" enum { RAW_VALUE=0, NORMALISED}; enum { LIMIT=0, WRAP_AROUND}; class Lookup : public SndObj { protected: Table* m_ptable; // reference to a Table obj long m_offset; long m_size; int m_mode; int m_normal; public: Lookup(); Lookup(Table* table, long offset, SndObj* InObj, int mode = WRAP_AROUND, int normal=RAW_VALUE, int vecsize=DEF_VECSIZE, float sr=DEF_SR); void SetMode(int mode, int normal){ m_mode = mode; m_normal = normal; } ~Lookup(); void Offset(long offset){ m_offset = offset; } void SetTable(Table* table); int Set(char* mess, float value); int Connect(char* mess, void* input); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/Lookupi.h000755 000766 000024 00000002757 12062674072 020000 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //*******************************************************// // Lookupi.h : interface of the Lookup class // interpolated table lookup // // //*******************************************************// #ifndef _LOOKUPI_H #define _LOOKUPI_H #include "Lookup.h" #include "Table.h" class Lookupi : public Lookup { public: Lookupi(); Lookupi(Table* table, long offset, SndObj* InObj, int mode = WRAP_AROUND, int normal=RAW_VALUE, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Lookupi(); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/Loop.h000755 000766 000024 00000004015 12062674072 017254 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Loop.h: interface of the SndLoop class // // (comb filter) // // // // // //************************************************************// #ifndef _LOOP_H #define _LOOP_H #include "DelayLine.h" class SndLoop : public DelayLine { protected: float m_xfade; // crossfade time in samples float m_count; // count short m_sample; // sample on/off double m_point; float m_pitch; public: SndLoop(); SndLoop(float xfadetime, float looptime, SndObj* InObj, float pitch = 1.f, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~SndLoop(); void SetXFade(float xfadetime){ m_xfade = (xfadetime*m_sr); } void SetPitch(float pitch){ m_pitch = pitch; } void ReSample(){ m_sample = 1; m_count = 0; } int Set(char* mess, float value); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/LoPassTable.h000755 000766 000024 00000002743 12062674072 020522 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 // LoPassTable.h: interface for the LoPassTable class. // ////////////////////////////////////////////////////////////////////// #ifndef _LOPASSTABLE_H #define _LOPASSTABLE_H #include "Table.h" class LoPassTable : public Table { protected: float m_fr; float m_sr; public: char* ErrorMessage(); short MakeTable(); void SetFreq(float fr) { m_fr=fr ; } void SetSr(float sr) { m_sr =sr; } LoPassTable(int impulsesize, float fr, float sr=44100); LoPassTable(); virtual ~LoPassTable(); }; #endif SndObj-2.6.7/include/SndObj/LowPass.h000755 000766 000024 00000003471 12062674072 017740 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // LowPass.h: 1st order lowpass filter // // // // //************************************************************// #ifndef _LOWPASS_H #define _LOWPASS_H #include "Filter.h" class LoPass : public Filter { protected: public: LoPass(); LoPass(float freq, SndObj* inObj, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~LoPass(); void SetFreq(float fr){ m_fr = fr; double C = 2 - cos(2*PI*m_fr/m_sr); m_b1 = sqrt((C*C) - 1) - C; m_a = 1 + m_b1; } void SetSr(float sr){ m_sr = sr; double C = 2 - cos(2*PI*m_fr/m_sr); m_b1 = sqrt((C*C) - 1) - C; m_a = 1 + m_b1; } int Set(char* mess, float value); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/Lp.h000755 000766 000024 00000003262 12062674072 016721 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //////////////////////////////////////////////// // Low-pass resonant filter // // VL, 2002 //////////////////////////////////////////////// #ifndef _Lp_H #define _Lp_H #include "Reson.h" class Lp: public Reson { protected: void inline SetLPparam(float fr, float bw); public: // constructors / destructor Lp(); Lp(float fr, float BW, SndObj* inObj, SndObj* inputfreq = 0, SndObj* inputBW = 0, int vecisize=DEF_VECSIZE, float sr=DEF_SR); ~Lp(); void SetSr(float sr){ m_sr = sr; SetLPparam(m_fr, m_bw); } int Set(char* mess, float value); short DoProcess(); }; void Lp::SetLPparam(float fr, float bw){ float Q = fr/bw; m_b1 = (100./Q*sqrt(fr))-1.; m_b2 = 100./fr; m_a = 1 + m_b1 + m_b2; } #endif SndObj-2.6.7/include/SndObj/MidiIn.h000755 000766 000024 00000004534 12062674072 017522 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 /***************************************************/ // MidiIn.h: interface of the MidiIn / // class, SndObj MIDI input / // / /***************************************************/ #ifndef _MIDIIN_H #define _MIDIIN_H #include "SndObj.h" #include "SndMidiIn.h" class MidiIn : public SndObj { protected: SndMidiIn* m_ioinput; short m_message; short m_channel; short m_readvel; // if 1 MidiIn outputs the velocity byte short m_readaft; // same, with afttouch public: void SetMessage(short message){ if((message != VELOCITY_MESSAGE) && (message != POLYAFTOUCH_MESSAGE)){ m_readvel = m_readaft = 0; m_message = message; return; } else{ if(message == VELOCITY_MESSAGE){ m_readaft = 0; m_readvel = 1; m_message = NOTE_MESSAGE; return; } if(message == POLYAFTOUCH_MESSAGE) { m_readaft = 1; m_readvel = 0; m_message = NOTE_MESSAGE; return; } } } void SetChannel(short channel){ m_channel = channel;} void SetMidiInput(SndMidiIn* input){ m_ioinput = input; } int Set(char* mess, float value); int Connect(char* mess, void* input); MidiIn(); MidiIn(SndMidiIn* input, short message = NOTE_MESSAGE, short channel = 1, int vecsize = DEF_VECSIZE, float sr = DEF_SR); ~MidiIn(); short DoProcess(); char* ErrorMessage(); }; #endif SndObj-2.6.7/include/SndObj/MidiMap.h000755 000766 000024 00000004227 12062674072 017670 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 /***************************************************/ // MidiMap.h: interface of the MidiMap / // class, SndObj MIDI input / // / /***************************************************/ #ifndef _MIDIMAP_H #define _MIDIMAP_H #include "MidiIn.h" #include "Table.h" class MidiMap : public MidiIn { protected: Table* m_maptable; float m_min; float m_max; float* m_map; void MapReset() { if(m_map) { for(int i =0; i < 128; i++) m_map[i] = ((m_max-m_min)/127)*i + m_min; } } public: void SetTable(Table* maptable){ m_maptable = maptable;} void SetRange(float min, float max){ m_min = min; m_max = max; m_maptable = 0; MapReset(); } int Set(char* mess, float value); int Connect(char* mess, void* input); MidiMap(); MidiMap(SndMidiIn* input, Table* maptable, short message = NOTE_MESSAGE, short channel = 1, int vecsize = DEF_VECSIZE, float sr = DEF_SR); MidiMap(SndMidiIn* input, float min, float max, short message = NOTE_MESSAGE, short channel = 1, int vecsize = DEF_VECSIZE, float sr = DEF_SR); ~MidiMap(); short DoProcess(); char* ErrorMessage(); }; #endif SndObj-2.6.7/include/SndObj/Mix.h000755 000766 000024 00000004071 12062674072 017102 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Mix.h: interface of the mixer class // // // // // // // //************************************************************// #ifndef _MIX_H #define _MIX_H #include "SndObj.h" struct SndObjList{ SndObj* obj; SndObjList* next; }; class Mixer : public SndObj{ protected: SndObjList* m_InObj; // pointer to a linked list of SndObj int m_ObjNo; // number of input objects public: Mixer(); Mixer(int ObjNo, SndObj** InObjs, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Mixer(); int GetObjNo() { return m_ObjNo; } // return number of inputs short AddObj(SndObj* InObj); // add a SndObj to the input list short DeleteObj(SndObj* InObj); // delete a SndObj short DoProcess(); // MIX int Connect(char* mess, void* input); char* ErrorMessage(); }; #endif SndObj-2.6.7/include/SndObj/NoteTable.h000755 000766 000024 00000002703 12062674072 020222 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 _NOTETABLE_H #define _NOTETABLE_H #include "Table.h" class NoteTable : public Table { protected: short m_lowernote; short m_uppernote; float m_lowerfreq; float m_upperfreq; public: void SetFreqInterval(float lowerfreq, float upperfreq); void SetNoteInterval(short lowernote, short uppernote); NoteTable(); NoteTable(short lowernote, short uppernote, float lowerfreq, float upperfreq); ~NoteTable(); short MakeTable(); char* ErrorMessage(); }; #endif SndObj-2.6.7/include/SndObj/Osc.h000755 000766 000024 00000002662 12062674072 017075 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 _OSC_H #define _OSC_H #include "FastOsc.h" class Osc : public FastOsc { protected: SndObj* m_inputfr; SndObj* m_inputamp; public: Osc(); Osc(Table* table, float fr, float amp, SndObj* inputfr, SndObj* inputamp = 0, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Osc(); void SetFreq(SndObj* inputfr){ m_inputfr = inputfr; } void SetAmp(SndObj* inputamp) { m_inputamp = inputamp; } int Connect(char* mess, void* input); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/Osci.h000755 000766 000024 00000002524 12062674072 017243 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 _OSCI_H #define _OSCI_H #include "Osc.h" class Osci : public Osc { protected: long m_lomask; float m_lodiv; public: Osci(); Osci(Table* table, float fr, float amp, SndObj* inputfr, SndObj* inputamp = 0, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Osci(); void SetTable(Table *table); int Connect(char* mess, void* input); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/Oscil.h000755 000766 000024 00000004552 12062674072 017422 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Oscil.h: interface of the Oscil abstract base class // // // // // // // //************************************************************// #ifndef _OSCIL_H #define _OSCIL_H #include "SndObj.h" #include "Table.h" class Oscil : public SndObj { protected: Table* m_ptable; // reference to a Table obj float m_fr; float m_amp; double m_index; double m_incr; long m_size; SndObj* m_inputamp; public: void SetSr(float sr); float m_factor; Oscil(); Oscil(Table* table, float fr=440.f, float amp=1.f, SndObj* inputfreq = 0, SndObj* inputamp = 0, int vecsize = DEF_VECSIZE, float sr=DEF_SR); ~Oscil(); short SetPhase(float phase); // returns error void SetTable(Table* table); void SetFreq(float fr, SndObj* InFrObj= 0){ m_fr = fr; if(InFrObj) m_input = InFrObj; } void SetAmp(float amp, SndObj* InAmpObj= 0){ m_amp = amp; if(InAmpObj) m_inputamp = InAmpObj; } void SetFreq(SndObj* inputfr){ m_input = inputfr; } void SetAmp(SndObj* inputamp) { m_inputamp = inputamp; } int Connect(char* mess, void* input); int Set(char* mess, float value); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/Oscili.h000755 000766 000024 00000003202 12062674072 017562 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Oscili.h: interface of the Oscili class (interpolating // // oscillator). // // // // // //************************************************************// #ifndef _OSCILI_H #define _OSCILI_H #include "Oscil.h" class Oscili : public Oscil { public: Oscili(); Oscili(Table* table, float fr=440.f, float amp=1.f, SndObj* inputfreq = 0, SndObj* inputamp = 0, int vecsize= DEF_VECSIZE, float sr=DEF_SR); ~Oscili(); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/Oscilt.h000755 000766 000024 00000003211 12062674072 017575 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Oscilt.h: interface of the Oscilt class (truncating // // oscillator). // // // // // //************************************************************// #ifndef _OSCILT_H #define _OSCILT_H #include "Oscil.h" class Oscilt : public Oscil { public: Oscilt(); Oscilt(Table* table, float fr=440.f, float amp=1.f, SndObj* inputfreq = 0, SndObj* inputamp = 0, int vecsize = DEF_VECSIZE, float sr=DEF_SR); ~Oscilt(); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/Pan.h000755 000766 000024 00000003314 12062674072 017062 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 _PAN_H #define _PAN_H #include "SndObj.h" #include const double squrt2o2 = sqrt(2.) / 2.; class Pan : public SndObj{ protected: SndObj* m_channel; float m_pan; int m_res; float* m_panpos; SndObj* m_inputpan; inline float Panning(float pan, int chan); public: SndObj* left; SndObj* right; Pan(); Pan(float pan, SndObj* InObj, SndObj* InPan = 0, int res=1024, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Pan(); void SetPan(float pan, SndObj* InPan = 0){ m_pan = pan; m_inputpan = InPan; } int Set(char* mess, float value); int Connect(char* mess, void* input); short DoProcess(); char* ErrorMessage(); }; #endif SndObj-2.6.7/include/SndObj/Phase.h000755 000766 000024 00000003561 12062674072 017410 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Phase.h: interface of the Phase class. // // // // // // // //************************************************************// #ifndef _Phase_H #define _Phase_H #include "SndObj.h" class Phase : public SndObj { protected: float m_freq; float m_offset; public: Phase(); Phase(float freq, SndObj* FreqInput = 0 , float offset = 0.f, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Phase(); void SetFreq(float freq, SndObj* FreqInput = 0){ m_freq = freq; m_input = FreqInput; } void SetPhase(float offset){ m_offset = offset; } int Set(char* mess, float value); int Connect(char* mess, void* input); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/PhOscili.h000755 000766 000024 00000003514 12062674072 020060 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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)Frank Barknecht, 2003 // See License.txt for a disclaimer of all warranties // and licensing information //************************************************************// // PhOscili.h: interface of the PhOscili class (interpolating // // oscillator with phase input). // // // // Frank Barknecht , 2002 // // // //************************************************************// #ifndef _PhOscili_H #define _PhOscili_H #include "Oscil.h" class PhOscili : public Oscil { protected: SndObj* m_inputphase; public: PhOscili(); PhOscili( Table* table, float fr, float amp, SndObj* inputfreq = 0, SndObj* inputamp = 0, SndObj* inputphase = 0, int vecsize= DEF_VECSIZE, float sr=DEF_SR ); ~PhOscili(); int Connect(char* mess, void* input); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/Pitch.h000755 000766 000024 00000003757 12062674072 017426 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Pitch.h: interface of the Pitch class // // // // // // // //************************************************************// #ifndef _PITCH_H #define _PITCH_H #include "DelayLine.h" class Pitch : public DelayLine { protected: float* sintab; float m_pointer1; float m_pointer3; float m_pitch; float m_incr; public: Pitch(); Pitch(float delaytime, SndObj* InObj, float pitch = 1.f, int vecsize=DEF_VECSIZE, float sr=DEF_SR); Pitch(float delaytime, SndObj* InObj, int semitones = 0, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Pitch(); void SetPitch(float pitch){ m_pitch = pitch; } void SetPitch(int semitones){ m_pitch = (float) pow(2., semitones/12.); } int Set(char* mess, float value); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/PlnTable.h000755 000766 000024 00000003313 12062674072 020044 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // PlnTable.h: interface of the PlnTable class // // (Polynomial function table) // // // // // //************************************************************// #ifndef _PLNTABLE_H #define _PLNTABLE_H #include "Table.h" class PlnTable : public Table { protected : int m_order; double* m_coefs; float m_range; public: void SetPln(int order, double* coefs, float range=1.f); char* ErrorMessage(); short MakeTable(); PlnTable(); PlnTable(long L, int order, double* coefs, float range=1.f); ~PlnTable(); }; #endif SndObj-2.6.7/include/SndObj/Pluck.h000755 000766 000024 00000004243 12062674072 017424 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Pluck.h: interface of the Pluck class // // // // // // // //************************************************************// #ifndef _PLUCK_H #define _PLUCK_H #include "StringFlt.h" #include "Randh.h" class Pluck : public StringFlt { protected: float m_amp; float m_maxscale; void FillDelay(); public: Pluck(); Pluck(float fr, float amp, float fdbgain, SndObj* InFrObj=0, float maxscale=32767.f, int vecsize=DEF_VECSIZE, float sr=DEF_SR); Pluck(float fr, float amp, SndObj* InFrObj=0, float decay=20.f, float maxscale=32767.f, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Pluck(); void RePluck(); int Set(char* mess, float value); void SetAmp(float amp, float maxscale=32767.f){ m_amp = amp; ((Randh*)m_input)->SetFreq((m_amp*10000.f/maxscale), 0); ((Randh*)m_input)->SetAmp(m_amp); m_APDelay = m_LPDelay = 0.f; FillDelay(); } short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/Ptrack.h000644 000766 000024 00000004010 12062674072 017557 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 // #ifndef _PTRACK_H #define _PTRACK_H #include "SndObj.h" #define NPREV 20 struct Peak { float pfreq; float pwidth; float ppow; float ploudness; }; struct Histopeak { float hpitch; float hvalue; float hloud; int hindex; int hused; }; class Ptrack : public SndObj { protected: float *sig, *prev, *sinus, *spec, *spectmp; Peak *peakarray; int numpks; int cnt; int histcnt; int hop; float sr; float cps; float dbs[NPREV]; float amplo; float amphi; float npartial; float dbfs; int vecsize; float m_scale; void pitchtrack(); public: SndObj *pitch, *amp; Ptrack(); Ptrack(SndObj *in, int siz=1024, int peak=10, float scale=1.0, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Ptrack(); void SetHopsize(int siz); void SetPeaks(int peaks); void SetScale(float scale) { m_scale = scale; } short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/PVA.h000755 000766 000024 00000003411 12062674072 016770 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 float m_factor; // conversion factor float* m_phases; private: void inline pvanalysis(float* signal); public: PVA(); PVA(Table* window, SndObj* input, float scale=1.f, int fftsize=DEF_FFTSIZE, int hopsize=DEF_VECSIZE, float sr=DEF_SR); ~PVA(); float Outphases(int pos){ return m_phases[pos]; } // reads phase output. int Set(char* mess, float value); void SetFFTSize(int fftsize); void SetHopSize(int hopsize); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/PVBlur.h000755 000766 000024 00000003107 12062674072 017516 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 // // PVBlur.h: interface for the PVBlur class. // ////////////////////////////////////////////////////////////////////// #ifndef _PVBlur_H #define _PVBlur_H #include "SpecMult.h" class PVBlur : public SpecMult { protected: float **m_frame; float m_time; int m_framenos; int m_hopsize; int m_cur; public: int Set(char* mess, float value); void SetBlurTime(float time); void SetHopsize(int hopsize){ m_hopsize = hopsize; SetBlurTime(m_time); } PVBlur(); PVBlur(SndObj* input, float blurtime, int hopsize=DEF_VECSIZE, int vecsize=DEF_FFTSIZE, float sr=DEF_SR); ~PVBlur(); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/PVEnvTable.h000755 000766 000024 00000003721 12062674072 020314 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // PVEnvTable.h: interface of the PVEnvTable class // // // // // // // //************************************************************// #ifndef _PVEnvTable_H #define _PVEnvTable_H #include "Table.h" class PVEnvTable : public Table { protected: int* m_seglen; float* m_segp; int m_segments; float m_typec; // type of curve (LOG OR LINEAR) float m_sr; public: void SetEnvelope(int segments, float start, float* points, float* lengths, float type, float nyquistamp=0.f); void SetSr(float sr); char* ErrorMessage(); short MakeTable(); PVEnvTable(); PVEnvTable(long L, int segments, float start, float* points, float* lengths,float type = 0.f, float sr=44100.f,float nyquistamp=0.f); ~PVEnvTable(); }; #endif SndObj-2.6.7/include/SndObj/PVFilter.h000755 000766 000024 00000003305 12062674072 020037 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 _PVFilter_H #define _PVFilter_H #include "SpecInterp.h" class PVFilter : public SpecInterp { protected: float m_amnt; public: PVFilter(); PVFilter(SndObj* input, SndObj* filspec, float amnt=1.f, SndObj* amntobj=0, int vecsize=DEF_FFTSIZE, float sr=DEF_SR); PVFilter(Table* filtertable, SndObj* input, float amnt=1.f, SndObj* amntobj=0, int vecsize=DEF_FFTSIZE, float sr=DEF_SR ); ~PVFilter(); int Connect(char* mess, void* input); int Set(char* mess, float value); void SetFilterInput(SndObj* filobj){ SetInput2(filobj);} void SetFilterTable(Table* filtab) { SetTable(filtab);} void SetAmount(float amnt, SndObj* amntobj=0){ m_amnt = amnt; m_interpobj = amntobj; } short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/PVMask.h000755 000766 000024 00000003265 12062674072 017512 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 _PVMask_H #define _PVMask_H #include "SpecInterp.h" class PVMask : public SpecInterp { protected: float m_maskgain; public: PVMask(); PVMask(float maskgain, SndObj* input, SndObj* mask, SndObj* inmaskgobj=0, int vecsize=DEF_FFTSIZE, float sr=DEF_SR); PVMask(float maskgain, Table* masktable, SndObj* input, SndObj* inmaskgobj=0, int vecsize=DEF_FFTSIZE, float sr=DEF_SR ); ~PVMask(); int Connect(char* mess, void* input); int Set(char* mess, float value); void SetMaskInput(SndObj* mask){ SetInput2(mask);} void SetMaskTable(Table *mask) { SetTable(mask);} void SetMaskGain(float maskgain, SndObj* inmaskg=0){ m_maskgain = maskgain; m_interpobj = inmaskg; } short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/PVMix.h000755 000766 000024 00000002500 12062674072 017343 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 // // PVMix.h: interface for the PVMix class. // ////////////////////////////////////////////////////////////////////// #ifndef _PVMix_H #define _PVMix_H #include "SpecMult.h" class PVMix : public SpecMult { protected: public: PVMix(); PVMix(SndObj* input, SndObj* input2=0, int vecsize=DEF_FFTSIZE, float sr=DEF_SR); ~PVMix(); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/PVMorph.h000755 000766 000024 00000003176 12062674072 017705 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 _PVMorph_H #define _PVMorph_H #include "SpecInterp.h" class PVMorph : public SpecInterp { protected: float m_offset2; SndObj* m_interpobj2; public: PVMorph(); PVMorph(float morphfr, float morpha, SndObj* input1, SndObj* input2, SndObj* inmorphfr=0, SndObj* inmorpha=0, int vecsize=DEF_FFTSIZE, float sr=DEF_SR); ~PVMorph(); int Connect(char* mess, void* input); int Set(char* mess, float value); void SetFreqMorph(float morphfr, SndObj* inmorphfr=0){ m_offset = morphfr; m_interpobj = inmorphfr; } void SetAmpMorph(float morpha, SndObj* inmorpha=0){ m_offset2 = morpha; m_interpobj2 = inmorpha; } short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/PVRead.h000755 000766 000024 00000003176 12062674072 017473 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 PVRead_h_ #define PVRead_h_ #include "PVS.h" #include "HammingTable.h" #include "SndPVOCEX.h" class PVRead : public PVS { protected: SndPVOCEX* m_ioinput; int* m_last; int* m_first; int m_count; int m_channels; int m_winsize; int m_maxbuffs; float* m_win; SndObj** m_outobj; private: void inline synthesis(float* signal); public: SndObj* Outchannel(int channel){ return m_outobj[channel%m_channels];} int Set(char* mess, float value); void SetInput(char* name); void SetTimescale(float timescale); PVRead(); PVRead(char* name, float timescale=1.0,int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~PVRead(); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/PVS.h000755 000766 000024 00000003272 12062674072 017017 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 float m_factor; // conversion factor float* m_phases; // old phases private: void inline pvsynthesis(float* signal); bool m_first; public: PVS(); PVS(Table* window, SndObj* input, int fftsize=DEF_FFTSIZE, int hopsize=DEF_VECSIZE, float sr=DEF_SR); ~PVS(); int Set(char* mess, float value); void SetFFTSize(int fftsize); void SetHopSize(int hopsize); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/PVTable.h000755 000766 000024 00000003651 12062674072 017645 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // PVTable.h: interface of the PVTable class // // // // // // // //************************************************************// #ifndef _PVTable_H #define _PVTable_H #include "Table.h" #include "SndIn.h" #include "PVA.h" #include "SndFIO.h" class PVTable : public Table { protected: double* m_amps; double* m_freqs; SndFIO* m_file; SndIn* m_in; PVA* m_analysis; unsigned long m_framecount; float m_start; unsigned long m_end; int m_vecsize; float m_sr; public: void SetTable(SndFIO* soundfile, Table* window, float start, float end); short MakeTable(); PVTable(); PVTable(int L, SndFIO* soundfile, Table* window, float start, float end); ~PVTable(); char* ErrorMessage(); }; #endif SndObj-2.6.7/include/SndObj/PVTransp.h000755 000766 000024 00000003232 12062674072 020060 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 // // PVTransp.h: interface for the PVTransp class. // ////////////////////////////////////////////////////////////////////// #ifndef _PVTRANSP_H #define _PVTRANSP_H enum { NORMAL_TRANSP=0, KEEP_FORMANT}; #include "SpecMult.h" class PVTransp : public SpecMult { protected: float m_base; float m_pitch; float m_keepform; public: int Set(char* mess, float value); int Connect(char* mess, void* input); void SetPitch(float pitch, SndObj* inpitch=0); void SetMode(int mode){ m_keepform= mode ? true : false;} PVTransp(); PVTransp(SndObj* input, float pitch, int mode=NORMAL_TRANSP, SndObj* inpitch=0, int vecsize=DEF_FFTSIZE, float sr=DEF_SR); ~PVTransp(); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/Rand.h000755 000766 000024 00000003534 12062674072 017234 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Rand.h: interface of the Rand class // // // // // // // //************************************************************// #ifndef _RAND_H #define _RAND_H #include "SndObj.h" #include const float MAXR = float(RAND_MAX/2); class Rand : public SndObj { protected: float m_amp; public: Rand(); Rand(float amp, SndObj* InAmpObj = 0, int vecsize=DEF_VECSIZE, float sr = DEF_SR); ~Rand(); void SetAmp(float amp, SndObj* InAmpObj = 0){ m_amp = amp; m_input = InAmpObj; } int Set(char* mess, float value); int Connect(char* mess, void* input); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/Randh.h000755 000766 000024 00000003750 12062674072 017404 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Randh.h: interface of the Randh class // // // // // // // //************************************************************// #ifndef _RANDH_H #define _RANDH_H #include "Rand.h" class Randh : public Rand { protected: float m_fr; long m_period; long m_count; SndObj* m_inputfr; public: Randh(); Randh(float fr,float amp,SndObj* InFrObj=0, SndObj* InAmpObj=0, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Randh(); int Connect(char* mess, void* input); void SetSr(float sr); void SetFreq(float fr, SndObj* InFrObj = 0){ m_fr = fr; m_period = (long) (m_fr > .1 ? m_sr/m_fr : m_sr/.1); m_count = m_period; m_inputfr = InFrObj; } int Set(char* mess, float value); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/Randi.h000755 000766 000024 00000003370 12062674072 017403 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Randi.: interface of the Randi class // // // // // // // //************************************************************// #ifndef _RANDI_H #define _RANDI_H #include "Randh.h" class Randi : public Randh { protected: //float m_fr; //long m_period; //long m_count; //SndObj* m_inputfr; float m_target; float m_start; public: Randi(); Randi(float fr,float amp,SndObj* InFrObj=0, SndObj* InAmpObj=0, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Randi(); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/Reson.h000755 000766 000024 00000003455 12062674072 017440 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Reson.h: interface of the Reson class (2nd order // // band-pass filter). // // // // // //************************************************************// #ifndef _RESON_H #define _RESON_H #include "Filter.h" class Reson : public Filter { protected: SndObj* m_inputfr; SndObj* m_inputbw; public: Reson(); Reson(float fr, float bw, SndObj* inObj, SndObj* inputfreq = 0, SndObj* inputbw = 0, int vecsize=DEF_VECSIZE, float sr=DEF_SR); void SetFreq(float fr, SndObj* InFrObj=NULL); void SetBW(float bw, SndObj* InBWObj=NULL); ~Reson(); int Connect(char* mess, void* input); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/ReSyn.h000755 000766 000024 00000002662 12062674072 017411 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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: float m_pitch; float m_tscal; public: ReSyn(); ReSyn(SinAnal* input, int maxtracks, Table* table, float pitch=1.f, float scale=1.f, float tscal=1.f, int vecsize=DEF_VECSIZE, float sr=DEF_SR); void SetPitch(float pitch){ m_pitch = pitch; } void SetTimeScale(float scale) { m_tscal = scale; } int Set(char* mess, float value); ~ReSyn(); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/Ring.h000755 000766 000024 00000003451 12062674072 017245 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // Ring.h: interface of the ring class // // // // // // // //************************************************************// #ifndef _RING_H #define _RING_H #include "SndObj.h" class Ring : public SndObj{ protected: SndObj* m_input2; public: Ring(); Ring(SndObj* InObj1, SndObj* InObj2, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~Ring(); void SetInput1(SndObj* InObj){m_input=InObj; } void SetInput2(SndObj* InObj){m_input2=InObj;} short DoProcess(); // ring modulator int Connect(char* mess, void* input); }; #endif SndObj-2.6.7/include/SndObj/SinAnal.h000755 000766 000024 00000005046 12062674072 017675 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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: float** m_bndx; // bin indexes float** m_pkmags; // peak mags float** m_adthresh; // thresholds unsigned int** m_tstart; // start times unsigned int** m_lastpk; // end times unsigned int** m_trkid; // track ids float* m_phases; // phases float* m_freqs; // frequencies float* m_mags; // magnitudes float* m_bins; // track bin indexes int* m_trndx; // track IDs float* m_binmax; // peak bin indexes float* m_magmax; // peak mags float* 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 float 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 private: void inline sinanalysis(); public: SinAnal(); SinAnal(SndObj* input, float threshold, int maxtracks, int minpoints=1, int maxgap=3, float sr=DEF_SR); ~SinAnal(); int GetTrackID(int track){ return m_trndx[track]; } int GetTracks(){ return m_tracks;} int Set(char* mess, float value); int Connect(char* mess, void* input); void SetThreshold(float threshold){ m_thresh = threshold; } void SetIFGram(SndObj* input); void SetMaxTracks(int maxtracks); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/SinSyn.h000755 000766 000024 00000003317 12062674072 017572 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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: float m_size; Table* m_ptable; float m_factor; float m_facsqr; float m_LoTWOPI; float m_scale; float m_incr; float m_ratio; int m_tracks; int* m_trackID; int m_maxtracks; float* m_phases; float* m_freqs; float* m_amps; public: SinSyn(); SinSyn(SinAnal* input, int maxtracks, Table* table, float scale=1.f, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~SinSyn(); void SetTable(Table* table); void SetMaxTracks(int maxtracks); void SetScale(float scale) { m_scale = scale; } int Set(char* mess, float value); int Connect(char* mess, void* input); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/SndAiff.h000755 000766 000024 00000010525 12062674072 017660 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // SndAiff.h: interface of the SndAiff abstract base class. // // // // // // // //************************************************************// #ifndef _SNDAIFF_H #define _SNDAIFF_H #include "SndFIO.h" const char FORM_ID[4] = {'F','O','R','M'}; const char COMM_ID[4] = {'C','O','M','M'}; const char MARK_ID[4] = {'M','A','R','K'}; const char INST_ID[4] = {'I','N','S','T'}; const char SSND_ID[4] = {'S','S','N','D'}; const char FORM_TYPE[4] = {'A','I','F','F'}; typedef unsigned int ID; // chunk ID typedef short MrkrID; // Marker ID struct CkHdr{ ID ckID; long ckSize; }; struct FormHdr{ CkHdr ckHdr; ID formType; }; struct CommChunk1{ CkHdr ckHdr; // CommonChunk in 2 parts to avoid short numChannels; // this short rounded up to long }; struct CommChunk2{ int numSampleFrames; // ... to accomodate this long short sampleSize; char sampleRate[10]; // 80-bit extended value }; struct Loop{ short playMode; MrkrID beginLoop; MrkrID endLoop; }; struct InstrChunk{ CkHdr ckHdr; char baseNote; char detune; char lowNote; char highNote; char lowVelocity; char highVelocity; short gain; Loop sustainLoop; Loop releaseLoop; }; struct SoundDataHdr{ CkHdr ckHdr; int offset; int blockSize; }; struct aiff_head{ ID ckID1; // 'FORM' int ckSize1; ID formType; // 'AIFF' ID ckID2; // 'COMM' int ckSize2; short nchns; int numSampleFrames; short size; int rate; }; const int sizFormHdr = sizeof(FormHdr); const int sizCommChunk1 = sizeof(CkHdr) + sizeof(short); const int sizCommChunk2 = sizeof(CommChunk2); const int sizSoundDataHdr = sizeof(SoundDataHdr); const int aiffhdrsiz = sizeof(FormHdr) + sizeof(CkHdr) + sizeof(short) + sizeof(CommChunk2) + sizeof(SoundDataHdr); const double onept = 1.021975; // A440 tuning factor const double log10d20 = 0.11512925; // for db to ampfac const unsigned long ULPOW2TO31 = ((unsigned long)0x80000000L); const double DPOW2TO31 = ((double)2147483648.0); /* 2^31 */ class SndAiff : public SndFIO { protected: FormHdr m_form; CommChunk1 m_comm1; // CommonChunk split CommChunk2 m_comm2; // to avoid xtra space SoundDataHdr m_ssnd; InstrChunk m_instr; aiff_head m_header; short m_framesize; short ReadHeader(); aiff_head PutHeader(); aiff_head GetHeader(){ return m_header; } double ieee_80_to_double(unsigned char *p); void double_to_ieee_80(double val, unsigned char *p); int is_aiff_form(long firstlong){ // test a form return (firstlong == *(long *)FORM_ID); } bool m_isaiff; public: bool IsAiff(){ return m_isaiff; } SndAiff(char* name, short mode, short channels=1, short bits=16, SndObj** inputlist=0, float spos= 0.f, int vecsize = DEF_VECSIZE, float sr = DEF_SR); ~SndAiff(); short Read(); short Write(); char* ErrorMessage(); }; #endif SndObj-2.6.7/include/SndObj/SndASIO.h000755 000766 000024 00000004573 12062674072 017554 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 #ifdef WIN #ifndef _SNDASIO_H #define _SNDASIO_H #include "SndIO.h" #include #include #include #include class SndASIO : public SndIO { protected: int m_numbuffs; float **m_insndbuff; // app buffers to store audio float **m_outsndbuff; long m_buffsize; // needed in callbacks long m_encoding; char* m_driver; int m_mode; int m_ocount; int m_icount; int m_ocurrentbuffer; int m_icurrentbuffer; bool m_called_read; bool m_running; long m_ichannels; long m_ochannels; ASIOBufferInfo* m_bufferinfos; // ASIO buffer structures ASIODriverInfo m_driverinfo; // ASIO Driver information ASIOChannelInfo* m_channelinfos; // ASIO channel information ASIOCallbacks m_asiocallbacks; // ASIO callbacks public: SndASIO(int channels, int mode = SND_IO, char* driver = "ASIO Multimedia Driver", int numbuffs=4, SndObj** inputs = 0, int vecsize = DEF_VECSIZE, float sr=DEF_SR); ~SndASIO(); short Write(); short Read(); char* ErrorMessage(); }; void DriverList(); char* DriverName(int num, char* name); void bufferSwitch(long index, ASIOBool processNow); ASIOTime *bufferSwitchTimeInfo(ASIOTime *timeInfo, long index, ASIOBool processNow); void sampleRateChanged(ASIOSampleRate sRate); long asioMessages(long selector, long value, void* message, double* opt); #endif #endif SndObj-2.6.7/include/SndObj/SndBuffer.h000755 000766 000024 00000003221 12062674072 020217 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 /////////////////////////////////////// // SndBuffer.h: // IO buffer for interthread/process // communication // // VL, 2001 /////////////////////////////////////// #ifndef _SNDBUFIO_H #define _SNDBUFIO_H #include "SndIO.h" #ifdef WIN #include #endif class SndBuffer : public SndIO { int m_buffsize; int m_wpointer; int m_rpointer; int m_elements; int wlock, rlock; float* m_buff; public: SndBuffer(short channels, int buffsize=DEF_VECSIZE, SndObj** inputlist=0, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~SndBuffer(); short Write(); short Read(); void wait_here(){ #ifdef WIN Sleep(1); #else usleep(1); #endif } char* ErrorMessage(); }; #endif SndObj-2.6.7/include/SndObj/SndCoreAudio.h000755 000766 000024 00000004703 12062674072 020666 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 // //////////////////////////////////////////////////////// // SndCoreAudio.h: Interface of the SndCoreAudio class // realtime audio IO with Mac OSX Core Audio // // #ifdef MACOSX #ifndef SndCoreAudio_H_ #define SndCoreAudio_H_ #include #include "SndIO.h" const int DEF_BSIZE = 512; const int DEF_PERIOD = 4; const int DEF_DEV = 0xFFFFFFFF; class SndCoreAudio : public SndIO { AudioDeviceID m_dev; float** m_inbuffs; float** m_outbuffs; int m_sleept; int m_dont_use_input; int m_dont_use_output; AudioStreamBasicDescription m_format; unsigned int m_bufframes; unsigned int m_buffsize; unsigned int m_buffitems; unsigned int m_buffnos; unsigned int m_outcurbuff; unsigned int m_incurbuff; unsigned int m_iocurbuff; unsigned int m_outcount; unsigned int m_incount; bool* m_inused; bool* m_outused; bool m_interleaved; bool m_stopped; bool m_called_read; float m_norm; int OpenDevice(bool isInput=true); public: SndCoreAudio(int channels=2,int bufframes=DEF_BSIZE, int buffnos=DEF_PERIOD, float norm=32767.f, SndObj** inObjs=0, int dev=DEF_DEV, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~SndCoreAudio(); OSStatus ADIOProc(AudioDeviceID indev, const AudioTimeStamp *inN, const AudioBufferList *input, const AudioTimeStamp *inT, AudioBufferList *output, const AudioTimeStamp *inOT, void* cdata); void Stop(){ m_stopped = true; } short Read(); short Write(); void SetSleepTime(int t) { m_sleept = t; } char* ErrorMessage(); }; int ListDevices(char **d, int devs=50); void PrintDevices(); #endif #endif SndObj-2.6.7/include/SndObj/SndFIO.h000755 000766 000024 00000012053 12062674072 017426 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // SndFIO.h: interface of the SndFIO class. // // // // // // // //************************************************************// #ifndef _SNDFIO_H #define _SNDFIO_H #include #include #include "SndIO.h" enum {OVERWRITE,APPEND,INSERT,READ }; enum {WAITOPEN=10,SFOPEN,SFERROR}; class SndFIO : public SndIO{ protected: char* m_name; FILE* m_file; FILE* m_safe; short m_filestat; short m_mode; float m_spos; long m_datapos; long m_buffsize; // size of buffer in bytes char* m_buffer; unsigned char* m_cp; short* m_sp; int* m_lp; _24Bit* m_s24p; short m_selfdesc; // self-describing header present long m_dataframes; int m_eof; // end of file indicator short m_itemsleft; /* Byte Swapping Functions */ short SwapShort(short inv); int SwapInt(int inv); float SwapFloat32( float inv ); double SwapDouble( double inv ); public: FILE *GetFile(){return m_safe; } short GetMode(){ return m_mode; } void SetPos(float pos){ m_spos = pos; if(!fseek(m_safe,(long)(m_spos*m_sr)*m_channels*(m_bits/8)+ m_datapos, SEEK_SET)) m_eof=0; } void SetPos(long pos){ if(!fseek(m_safe, pos + m_datapos, SEEK_SET)){ if(m_sr && m_channels && m_bits) m_spos = pos/(m_sr*m_channels*(m_bits/8)); m_eof=0; } } int Eof() { return (m_eof = feof(m_file));} long GetDataFrames(){ return m_dataframes;} float GetPos(){ return m_spos; } short GetStatus(){ return m_filestat; } SndFIO(char* name, short mode, short channels=1, short bits=16, SndObj** inputlist=0, float spos= 0.f, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~SndFIO(); short Read(); short Write(); char* ErrorMessage(); }; inline short SndFIO::SwapShort (short inv) { union shortconv { short us; unsigned char uc[2]; } *inp, outv; inp = (union shortconv *)&inv; outv.uc[0] = inp->uc[1]; outv.uc[1] = inp->uc[0]; return( outv.us); } inline int SndFIO::SwapInt (int inv) { union intconv { int ul; unsigned char uc[4]; } *inp, outv; inp = (union intconv *)&inv; outv.uc[0] = inp->uc[3]; outv.uc[1] = inp->uc[2]; outv.uc[2] = inp->uc[1]; outv.uc[3] = inp->uc[0]; return( outv.ul); } inline float SndFIO::SwapFloat32( float inv ) { union floatconv { float uf; unsigned char uc[4]; } *inp, outv; inp = (union floatconv *)&inv; outv.uc[0] = inp->uc[3]; outv.uc[1] = inp->uc[2]; outv.uc[2] = inp->uc[1]; outv.uc[3] = inp->uc[0]; return( outv.uf ); } inline double SndFIO::SwapDouble( double inv ) { union doubleconv { double ud; unsigned char uc[8]; } *inp, outv; inp = (union doubleconv *)&inv; outv.uc[0] = inp->uc[7]; outv.uc[1] = inp->uc[6]; outv.uc[2] = inp->uc[5]; outv.uc[3] = inp->uc[4]; outv.uc[4] = inp->uc[3]; outv.uc[5] = inp->uc[2]; outv.uc[6] = inp->uc[1]; outv.uc[7] = inp->uc[0]; return( outv.ud ); } /* Maybe not the best way, but these deal with endian issues for any type of io use the macro around what type is expected to be written or read. if this is already the processors native form it will do nothing, if not it will swap bytes. so, when reading or writing a LE type on a BE machine, SHORT_LE( n ) will swap bytes for reading and writing. when reading or writing a LE type on a LE machine, it does nothing */ #ifdef WORDS_BIGENDIAN #define SHORT_LE(x) SwapShort(x) #define LONG_LE(x) SwapInt(x) #define FLOAT32_LE(x) SwapFloat32(x) #define DOUBLE_LE(x) SwapDouble(x) #define SHORT_BE(x) x #define LONG_BE(x) x #define FLOAT32_BE(x) x #define DOUBLE_BE(x) x #else #define SHORT_LE(x) x #define LONG_LE(x) x #define FLOAT32_LE(x) x #define DOUBLE_LE(x) x #define SHORT_BE(x) SwapShort(x) #define LONG_BE(x) SwapInt(x) #define FLOAT32_BE(x) SwapFloat32(x) #define DOUBLE_BE(x) SwapDouble(x) #endif #endif SndObj-2.6.7/include/SndObj/SndIn.h000755 000766 000024 00000003516 12062674072 017363 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // SndIn.h: interface of the SndIn class. // // // // // // // //************************************************************// #ifndef _SNDIN_H #define _SNDIN_H #include "SndObj.h" #include "SndIO.h" class SndIn : public SndObj { protected: SndIO* m_ioinput; short m_channel; public: SndIn(); SndIn(SndIO *input, short channel=1, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~SndIn(); void SetInput(SndIO *input, short channel=1){ m_ioinput = input; m_channel = channel; } int Connect(char* mess, void* input); int Set(char* mess, float value); short DoProcess(); char* ErrorMessage(); }; #endif SndObj-2.6.7/include/SndObj/SndIO.h000755 000766 000024 00000006756 12062674072 017335 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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; float* m_output; float 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; float 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; } float Output(int pos){ return m_output[pos]; } float 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, float sr = DEF_SR); virtual ~SndIO(); virtual short Read(); virtual short Write(); virtual char* ErrorMessage(); int Error() { return m_error; } }; #endif SndObj-2.6.7/include/SndObj/SndJackIO.h000755 000766 000024 00000004275 12062674072 020120 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 // //////////////////////////////////////////////// // SndJackIO.h : interface of the SndJackIO class // jack IO client support // // #ifndef _SNDJACKIO_H #define _SNDJACKIO_H #include "SndIO.h" #include class SndJackIO : public SndIO { protected: float **m_inbuff; float **m_outbuff; bool *m_inused; bool *m_outused; int m_curbuff; int m_outcurbuff; int m_incurbuff; int m_incount; int m_outcount; int m_buffno; jack_nframes_t m_bufframes; int m_items; jack_client_t *m_client; jack_port_t **m_inport; // arrays of ports jack_port_t **m_outport; // one per channel int m_mode; public: SndJackIO(char* name, int channels=2, int mode=SND_IO, int buffnos=2, SndObj** inObjs=0, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~SndJackIO(); int ConnectIn(int channel, char* port); int ConnectOut(int channel, char* port); int DisconnectIn(int channel, char* port); int DisconnectOut(int channel, char* port); jack_client_t *GetClient() { return m_client; } jack_port_t *GetInPort(int channel) { return m_inport[channel-1];} jack_port_t *GetOutPort(int channel) { return m_outport[channel-1];} short Read(); short Write(); char *ErrorMessage(); int JProcess(jack_nframes_t nframes); void JShutdown(); int BufferResize(jack_nframes_t nframes); }; #endif // _SNDJACKIO_H SndObj-2.6.7/include/SndObj/SndMidi.h000755 000766 000024 00000007407 12062674072 017702 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 /***************************************************/ // SndMidi.h: interface of the SndMidi / // (LINUX/CYGWIN/SGI)abstract class, MIDI IO / // / /***************************************************/ #ifndef _SNDMIDI_H #define _SNDMIDI_H #include "SndIO.h" #if defined(OSS) || defined (SGI) #include #include #ifndef SGI #include #endif #ifndef OSS #include #endif #endif // OSS SGI #ifdef WIN #include #include void MidiDeviceList(); char* MidiInputDeviceName(int dev, char* name); #endif enum { NOTE_MESSAGE = -1, PBEND_MESSAGE, MOD_MESSAGE, BREATH_MESSAGE, FREE1, FOOT_MESSAGE, PORT_MESSAGE, VOL_MESSAGE, BAL_MESSAGE, FREE2, PAN_MESSAGE, EXPR_MESSAGE }; const int POLYAFTOUCH_MESSAGE = 129; const int PROGRAM_MESSAGE = 130; const int AFTOUCH_MESSAGE = 128; const int VELOCITY_MESSAGE = 255; const int NOTEOFF_MESSAGE = 256; const int OUTOFRANGE = -128; #ifdef OSS typedef struct __mdevent{ // SGI's midi event struc, borrowed for compat unsigned char msg[4]; // message bytes char* sysexmsg; // system excl (currently not supported) unsigned long long stamp; // time stamp (not used) int msglen; // system excl msg length } MDevent; #endif #ifdef WIN typedef struct { unsigned char msg[4]; } MIDI_event; typedef union { MIDI_event event; DWORD dword; } midi_msg; #endif class SndMidi : public SndIO { protected: short m_noteon; short m_noteoff; unsigned char *m_vel; unsigned char *m_aft; short* m_message; unsigned char m_status; unsigned char m_type; unsigned char m_note; int m_read; int m_count; int m_buffsize; short m_chans; // channels in the range of 0-15 short m_msgflag; // flag to check for new messages #if defined(OSS) || defined(SGI) // OSS& SGI MIDI int m_fd; #ifndef SGI char* m_port; // midi device #endif #ifndef OSS MDport m_port; #endif MDevent* m_event; pollfd m_midifd; #endif // OSS & SGI MIDI #ifdef WIN // Windows MME MIDI MIDI_event* m_event; #endif // Windows MME MIDI public: short NoteOn(); short NoteOff(); char LastNote() { return m_note; } char Velocity(char note){ return m_vel[note];} char LastNoteVelocity(){ return m_vel[m_note];} char Aftertouch(char note) { return m_aft[note]; } char LastNoteAftertouch(){ return m_aft[m_note];} short GetMessage(short channel) { if(channel > 0 && channel <= 16) return m_message[channel-1]; else return OUTOFRANGE;} bool NewMessage(short channel){ channel--; if((1< #include #include #endif class SndMidiIn : public SndMidi { protected: #ifdef SGI void PutOutput(MDevent* cur); #endif #ifdef WIN HMIDIIN m_handle; MMRESULT m_result; inline void PutOutput(MIDI_event*cur); void WriteBuf(MIDI_event event); MIDI_event ReadBuf(); private: friend #ifdef VISUALC static #endif void #ifndef SWIGFIX CALLBACK #endif midiInputHandler(HMIDIIN, UINT wMsg, DWORD dwInstance, DWORD dwParam1, DWORD dwParam2); #endif public: SndMidiIn(); #if defined (OSS) || defined (SGI) SndMidiIn(char* port, int buffsize = 64); #endif #ifdef WIN SndMidiIn(int port, int buffsize = 64); #endif ~SndMidiIn(); short Read(); char* ErrorMessage(); }; #endif SndObj-2.6.7/include/SndObj/SndObj.h000755 000766 000024 00000016641 12062674072 017532 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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.h: Interface of the SndObj base class // // // // // // // //************************************************************// #ifndef _SNDOBJ_H #define _SNDOBJ_H #include #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 float DEF_SR = 44100.f; struct msg_link { string msg; int ID; msg_link *previous; }; class SndObj { protected: float* m_output; // output samples SndObj* m_input; // input object float 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(float x){ union { float 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(float fval) { return (int) fval; } int Ftoi(double 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+=(float val){ for(int n = 0; n < m_vecsize; n++) m_output[n] = m_output[n]+val; return *this; } SndObj& operator-=(float val){ for(int n = 0; n < m_vecsize; n++) m_output[n] = m_output[n]-val; return *this; } SndObj& operator*=(float 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+(float 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-(float 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*(float 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<<(float val){ if(m_vecpos >= m_vecsize) m_vecpos=0; m_output[m_vecpos++] = val; } void operator<<(float* vector){ for(m_vecpos=0;m_vecpos>(SndIO& out); void operator<<(SndIO& in); #endif int PushIn(float *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(float *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(float *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; } float 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; } float GetSr(){ return m_sr;} virtual void SetSr(float sr){ m_sr = sr;} virtual int Set(char* mess, float 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, float 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 SndObj-2.6.7/include/SndObj/SndPVOCEX.h000755 000766 000024 00000006557 12062674072 020031 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 _SNDPVOCEX_H #define _SNDPVOCEX_H #include "SndWaveX.h" struct pvoc_data { short wWordFormat; /* IEEE_FLOAT or IEEE_DOUBLE */ short wAnalFormat; /*PVOC_AMP_FREQ, PVOC_AMP_PHASE, PVOC_COMPLEX */ short wSourceFormat; /* WAVE_FORMAT_PCM or WAVE_FORMAT_IEEE_FLOAT*/ short wWindowType; /* defines the standard analysis window used, or a custom window */ int nAnalysisBins; /* number of analysis channels. The FFT window size is derived from this */ int dwWinlen; /* analysis window length, in samples */ int dwOverlap; /* window overlap length in samples (decimation) */ int dwFrameAlign; /* usually nAnalysisBins * 2 * sizeof(float) */ float fAnalysisRate; /* sample rate / Overlap */ float fWindowParam; /* parameter associated with some window types: default 0.0f unless needed */ }; struct pvocex{ int dwVersion; /* initial version is 1*/ int dwDataSize; /* sizeof PVOCDATA data block */ pvoc_data data; /* 32 byte block */ }; enum pvoc_datatype {IEEE_FLOAT_T, IEEE_DOUBLE_T}; enum pvoc_frametype {PVOC_AMP_FREQ=0, PVOC_AMP_PHASE,PVOC_COMPLEX}; enum pvoc_windowtype {DEFAULT=0, HAMMING, HANNING, KAISER, RECTANGULAR, CUSTOM }; struct WAVEFORMATPVOCEX { wave_head waveformatex; wav_ex waveformat_ext; pvocex pvocformat_ext; }; const GUID KSDATAFORMAT_SUBTYPE_PVOC = { 0x8312b9c2, 0x2e6e, 0x11d4, { 0xa8, 0x24, 0xde, 0x5b, 0x96, 0xc3, 0xab, 0x21 } }; class SndPVOCEX : public SndWaveX { protected: pvocex m_pvheader; int m_hopsize; bool m_ispvocex; public: SndPVOCEX(char* name, short mode = OVERWRITE, int analformat=PVOC_AMP_FREQ, int windowtype=HANNING, short channels=1, int channelmask=0, short bits=32, int format=PCM, SndObj** inputlist=0, float framepos= 0.f, int hopsize = DEF_VECSIZE, int fftsize = DEF_FFTSIZE, float sr = DEF_SR); ~SndPVOCEX(); int GetFFTSize(){ return (m_pvheader.data.nAnalysisBins-1)*2;} int GetHopSize(){ return m_pvheader.data.dwOverlap; } int GetWindowType() { return m_pvheader.data.wWindowType; } int GetWindowLength() { return m_pvheader.data.dwWinlen; } void GetHeader(WAVEFORMATPVOCEX* pheader); void SetTimePos(float pos); short Read(); short Write(); bool IsPvocex(){ return m_ispvocex; } }; #endif SndObj-2.6.7/include/SndObj/SndRead.h000755 000766 000024 00000003173 12062674072 017667 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 SndRead_h_ #define SndRead_h_ #include "SndObj.h" #include "SndFIO.h" class SndRead : public SndObj { protected: SndFIO* m_ioinput; SndObj** m_outobj; float m_pitch; double m_pos; float m_scale; int m_channels; int m_count; bool m_fileopen; public: SndObj* Outchannel(int channel){ return m_outobj[channel%m_channels];} SndRead(); SndRead(char* name, float pitch=1.f, float scale=1.f, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~SndRead(); void SetInput(char* name); void SetScale(float scale){ m_scale = scale; } void SetPitch(float pitch) { m_pitch = fabs(pitch); } int Set(char* mess, float value); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/SndRTIO.h000755 000766 000024 00000013102 12062674072 017562 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 /////////////////////////////////////////////////// // SndRTIO.h: interface of the SndRTIO class // realtime audio IO // currently supported on Irix, Linux (with OSS), MAC OSX (CoreAudio) // and Windows // #ifndef _SNDRTIO_H #define _SNDRTIO_H #ifndef NO_RTIO #include "SndIO.h" #ifdef MACOSX // Mac CoreAudio #include #include "SndCoreAudio.h" #endif #ifdef OSS // Open Sound System (Linux, etc...) #include #include #include typedef int AudioDeviceID; #define DEF_DEV "/dev/dsp" const int DEF_BSIZE = 512; const int DEF_PERIOD = 512; #endif #ifdef ALSA #include typedef snd_pcm_t * AudioDeviceID; #define DEF_DEV "plughw:0,0" const int DEF_BSIZE = 1024; const int DEF_PERIOD = 2; #endif #ifdef SGI // SGI on Irix #include const int AL_DEFAULT = AL_DEFAULT_OUTPUT; typedef int AudioDeviceID; const int DEF_DEV = AL_DEFAULT; const int DEF_BSIZE = 512; const int DEF_PERIOD = 512; #endif #ifdef WIN // Windows MME #include #include typedef int AudioDeviceID; void ListDevices(); char* InputDeviceName(int dev, char* name); char* OutputDeviceName(int dev, char* name); const int DEF_DEV = WAVE_MAPPER; const int DEF_BSIZE = 1024; const int DEF_PERIOD = 4; #endif #ifdef MACOSX class SndRTIO : public SndCoreAudio { #else class SndRTIO : public SndIO { protected: char* m_cp; short* m_sp; // pointers to the buffer int m_count; // counter int m_buffsize; // buffer size int m_items; // items int m_encoding; // encoding AudioDeviceID m_dev; // device ID int m_mode; #endif #if defined (SGI) || defined (OSS) || defined (ALSA) void* m_buffer; // IO buffer #endif // SGI or OSS or ALSA #ifdef WIN WAVEFORMATEX* m_wfx; // formatex structure WAVEHDR** m_pwhdr; // header structures, one for each data block HGLOBAL* m_hwhdr; // header strructures handles HANDLE* m_hData; // data blocks handles void** m_buffer; // buffers (data blocks) int m_buffno; // number of buffers int m_ndx; // buffer index HWAVEOUT m_hwo; // output device handle HWAVEIN m_hwi; // output device handle int m_cur; int m_status; bool m_firsttime; #endif #ifdef SGI long* m_lp; // long & float pointers float* m_fp; // supported only on Irix ALconfig m_config; // Audio Library config ALport m_port; // AL IO port void Writef(); // write functions for different sample formats; void Writel(); void Readf(); // read functions for different sample formats void Readl(); #endif #ifdef ALSA long* m_lp; void Writel(); void Readl(); #endif #ifndef MACOSX void Writec(); // write functions for different sample formats; void Writes(); void Reads(); // read functions void Readc(); void SndRTIO_init(short, int, int=DEF_BSIZE, int=DEF_PERIOD,int=SHORTSAM, SndObj** =0,int=DEF_VECSIZE, float=DEF_SR, #if defined (OSS) || defined (ALSA) char* = (char *)DEF_DEV); #else AudioDeviceID=DEF_DEV); #endif #endif // MACOSX public: SndRTIO(short ch, int mode, int bsize = DEF_BSIZE, int period = DEF_PERIOD, int encoding = SHORTSAM, SndObj** input=0, int vsize= DEF_VECSIZE, float sr=DEF_SR, #if defined(OSS) || defined(ALSA) char* dev = (char *)DEF_DEV) #else int dev = DEF_DEV) #endif #ifndef MACOSX : SndIO(ch, encoding*8,input,vsize, sr) { SndRTIO_init(ch,mode,bsize,period,encoding,input,vsize,sr,dev); } #else : SndCoreAudio((ch < 2 ? 2 : ch), bsize, period, 32768.0,input, dev, vsize, sr) { }; #endif SndRTIO() #ifndef MACOSX : SndIO(1,16,0,DEF_VECSIZE,DEF_SR){ SndRTIO_init(1, SND_OUTPUT); } #else : SndCoreAudio() { }; #endif SndRTIO(short channels, SndObj** input=0) #ifndef MACOSX : SndIO(channels,16,input,DEF_VECSIZE,DEF_SR) { SndRTIO_init(channels,SND_OUTPUT,DEF_BSIZE,DEF_PERIOD,SHORTSAM,input); } #else : SndCoreAudio((channels < 2 ? 2 : channels),DEF_BSIZE, DEF_PERIOD, 32768.0,input) { }; #endif SndRTIO(SndObj *p) #ifndef MACOSX : SndIO(1,16,0,DEF_VECSIZE,DEF_SR) { SndRTIO_init(1, SND_OUTPUT); SetOutput(1, p); } #else : SndCoreAudio(){ SetOutput(1, p); SetOutput(2, p); } #endif SndRTIO(SndObj *pl, SndObj *pr) #ifndef MACOSX : SndIO(2,16,0,DEF_VECSIZE,DEF_SR) { SndRTIO_init(2, SND_OUTPUT); SetOutput(1, pl); SetOutput(2, pr); } #else : SndCoreAudio(){ SetOutput(1, pl); SetOutput(2, pr); } #endif #ifndef MACOSX ~SndRTIO(); short Write(); short Read(); char* ErrorMessage(); #endif }; #endif /* ifndef NO_RTIO */ #endif SndObj-2.6.7/include/SndObj/SndRTThread.h000644 000766 000024 00000004117 12062674072 020465 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 and Rory Walsh, 1997-2006 // See License.txt for a disclaimer of all warranties // and licensing information // // SndRTThread.h // Class SndRTThread: // Multithreading support for the SndObj Library // with Realtime audio IO // Victor Lazzarini, 2001 // Win32 thread code by Rory Walsh, 2006 #ifndef NO_RTIO #ifndef _SNDRTTHREAD_H #define _SNDRTTHREAD_H #ifndef NO_RTIO #include "SndThread.h" #include "Mix.h" #include "SndIn.h" class SndRTThread : public SndThread { SndIO *in; SndIO *out; Mixer **ochannel; SndIn **sound; int m_channels; int m_buffsize; int m_periods; void Init(); public: #ifdef PYTHON_WRAP PyThreadState *_tstate1; pycallbackdata pydata1; #endif SndRTThread(); SndRTThread(int channels, int buffsize=1024, int periods=4); SndRTThread(int n, SndObj** objlist, int channels=2, int buffsize=1024, int periods=4); ~SndRTThread(); int AddOutput(int channel, SndObj *in); int DeleteOutput(int channel, SndObj *in); void DisconnectOutput(int channel, SndObj *in); void ConnectOutput(int channel, SndObj *in); SndObj *GetInput(int channel); void Direct(int channel, bool yes=true); friend void rtthreadfunc(void *); }; void rtthreadfunc(void *); #endif #endif #endif SndObj-2.6.7/include/SndObj/SndSinIO.h000755 000766 000024 00000004757 12062674072 020006 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 _SndSinIO_h #define _SndSinIO_h #include "SndWaveX.h" #include "SndPVOCEX.h" struct sinus_data { short wWordFormat; short wHopsize; short wWindowType; short wMaxtracks; int dwWindowSize; float fThreshold; float fAnalysisRate; }; struct sinusex { int dwVersion; sinus_data data; }; struct WAVEFORMATSINUSEX { wave_head waveformatex; wav_ex waveformat_ext; sinusex sinusformat_ext; }; const GUID KSDATAFORMAT_SUBTYPE_SINUS = { 0x443a4b58, 0x21a2, 0x324b, { 0x00, 0x01, 0xAA, 0x02, 0x11, 0x03, 0xBB, 0x04 } }; class SndSinIO : public SndWaveX { protected: sinusex m_sinheader; int m_hopsize; int* m_tracks; int** m_trkindx; int m_maxtracks; public: SndSinIO(char* name, int maxtracks, float threshold=0.01f, int windowtype=HANNING, short mode = OVERWRITE, short channels=1, int channelmask=0, short bits=32, int format=PCM, SndObj** inputlist=0, float framepos= 0.f, int hopsize = DEF_VECSIZE, int fftsize = DEF_FFTSIZE, float sr = DEF_SR); ~SndSinIO(); short Write(); short Read(); int GetTrackID(int track, int channel) { return m_trkindx[channel][track];} int GetTracks(int channel) { return m_tracks[channel]; } int GetFFTSize(){ return m_sinheader.data.dwWindowSize;} int GetHopSize(){ return m_sinheader.data.wHopsize; } int GetWindowType() { return m_sinheader.data.wWindowType; } int GetMaxTracks() { return m_sinheader.data.wMaxtracks; } void GetHeader(WAVEFORMATSINUSEX* pheader); void SetTimePos(float pos); }; #endif SndObj-2.6.7/include/SndObj/SndTable.h000755 000766 000024 00000003306 12062674072 020041 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // SndTable.h: interface of the SndTable class // // (soundfile function table) // // // // // //************************************************************// #ifndef _SNDTABLE_H #define _SNDTABLE_H #include "Table.h" #include "SndFIO.h" class SndTable : public Table { protected : SndFIO* m_input; short m_channel; public: void SetInput(long L, SndFIO* input, short channel=1); char* ErrorMessage(); short MakeTable(); SndTable(); SndTable(long L, SndFIO* input, short channel=1); ~SndTable(); }; #endif SndObj-2.6.7/include/SndObj/SndThread.h000755 000766 000024 00000011033 12062674072 020215 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 and Rory Walsh, 1997-2006 // See License.txt for a disclaimer of all warranties // and licensing information // // SndThread.h // Class SndThread: // Multithreading support for the SndObj Library // // Victor Lazzarini, 2001 // Win32 thread code by Rory Walsh, 2006 #ifndef _SNDTHREAD_H #define _SNDTHREAD_H #include "SndObj.h" #include "SndIO.h" #ifdef WINPTHREAD #include #elif USE_WIN32THREADS #include #include #else #include #endif template struct SndLink{ // SndObj / SndIO lists links SndLink* next; // next link s* obj; // object pointed at by the link }; enum { SNDIO_IN, SNDIO_OUT }; // IO list names enum { OFF=0, ON }; // processing status #ifdef PYTHON_WRAP struct pycallbackdata { PyObject *func; PyObject *data; }; #endif class SndThread { protected: // three circular lists are declared: // one for processing and two for IO SndLink* last; // pointer to last element SndLink* input; // input list SndLink* output; // output list int SndObjNo; // number of SndObjs in the list int InputNo; // etc inputs int OutputNo; // etc outputs // used to control the processing loop int status; // processing status ON, OFF void (*ProcessCallback)(void *callbackdata); void (*SndProcessThread)(void *data); void *callbackdata; bool processing; // pthread-related member variables #ifndef USE_WIN32THREADS pthread_attr_t attrib; pthread_t thread; #else uintptr_t hThread; #endif int m_vecsize; int m_vecsize_max; float m_sr; bool m_changed; bool m_parid[4]; void UpdateSr(); void UpdateVecsize(); void UpdateLimit(); void UpdateRestore(); void Update(){ if(m_changed){ if(m_parid[0]){ UpdateSr(); m_parid[0] = false; } if(m_parid[1]){ UpdateVecsize(); m_parid[1] = false; } if(m_parid[2]){ UpdateLimit(); m_parid[2] = false; } if(m_parid[3]){ UpdateRestore(); m_parid[3] = false; } m_changed = false; } } public: #ifdef PYTHON_WRAP PyThreadState *_tstate; pycallbackdata pydata; #endif void *GetProcessCallback() { return (void *)ProcessCallback; } SndThread(); SndThread(int n, SndObj** objlist, SndIO *out, SndIO *in=0); virtual ~SndThread(); int AddObj(SndObj *obj); // add to lists int AddObj(SndIO *obj, int iolist); // insert after a particular SndObj int Insert(SndObj *obj, SndObj* prev); int DeleteObj(SndObj *obj); // delete from lists int DeleteObj(SndIO *obj, int iolist); void SetProcessCallback(void (*Callback)(void *), void *cbdata){ ProcessCallback = Callback; callbackdata = cbdata; } int GetStatus() { return status; } int GetSndObjNo() { return SndObjNo; } int GetInputNo() { return InputNo; } int GetOutputNo() { return OutputNo; } #ifndef USE_WIN32THREADS pthread_attr_t GetAttrib() { return attrib; } void SetAttrib(pthread_attr_t att) { attrib = att; } #endif void SetVectorSize(int vecsize){ m_vecsize_max = vecsize; m_changed = m_parid[1] = true; if(status==OFF) Update(); } void LimitVectorSize(int limit){ m_vecsize = limit; m_changed = m_parid[2] = true; if(status==OFF) Update(); } void RestoreVectorSize(){ m_changed = m_parid[3] = true; if(status==OFF) Update(); } void SetSr(float sr){ m_sr = sr; m_changed = m_parid[0] = true; if(status==OFF) Update(); }; int ProcOn(); // start processing thread int ProcOff(); // kill processing thread // external thread function friend void threadfunc(void* sndthread); }; void threadfunc(void* sndthread); #endif SndObj-2.6.7/include/SndObj/SndWave.h000755 000766 000024 00000005351 12062674072 017716 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // SndWave.h: interface of the Sndwave base class. // // // // // // // //************************************************************// #ifndef _SNDWAVE_H #define _SNDWAVE_H #include "SndFIO.h" const char RIFF_ID[4] = {'R','I','F','F'}; const char WAVE_ID[4] = {'W','A','V','E'}; const char FMT_ID[4] = {'f','m','t',' '}; const char DATA_ID[4] = {'d','a','t','a'}; struct wave_head{ int magic; // 'RIFF' int len0; // Chunk size = len + 8 + 16 + 12 int magic1; // 'WAVE' int magic2; // 'fmt ' int len; // length of header (16) short format;// 1 is PCM (the only format supported) short nchns; // Number of channels int rate; // sampling frequency int aver; // Average bytes/sec !! short nBlockAlign; // (rate*nch +7)/8 short size; // size of each sample (8,16,32) }; struct wave_data { int magic3; // 'data' int datasize; // data chunk size }; class SndWave : public SndFIO { protected: bool m_iswave; int m_wchkpos; int m_len; int m_format; int m_hdrsize; wave_head m_header; wave_data m_wdata; short ReadHeader(); wave_head PutHeader(int databytes=0, int hdrsize=36, int len=16, int format=1); public: wave_head GetHeader(){ return m_header;} SndWave(char* name, short mode = OVERWRITE, short channels=1, short bits=16, SndObj** inputlist=0, float spos= 0.f, int vecsize = DEF_VECSIZE, float sr = DEF_SR); ~SndWave(); short Read(); short Write(); bool IsWave(){ return m_iswave;} char* ErrorMessage(); }; #endif SndObj-2.6.7/include/SndObj/SndWaveX.h000755 000766 000024 00000007102 12062674072 020042 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 /////////////////////////////////////////////// // SndWaveX.h: Interface of the SndWaveX // // wave format extensible file IO // //////////////////////////////////////////////// #ifndef _SNDWAVEX_H #define _SNDWAVEX_H #ifdef WIN #include #endif #include "SndWave.h" #define WAVE_FORMAT_EXTENSIBLE (0xFFFE) #ifndef WIN #define WAVE_FORMAT_PCM (0x0001) #endif #define WAVE_FORMAT_IEEE_FLOAT (0x0003) #define SPEAKER_FRONT_LEFT 0x1 #define SPEAKER_FRONT_RIGHT 0x2 #define SPEAKER_FRONT_CENTER 0x4 #define SPEAKER_LOW_FREQUENCY 0x8 #define SPEAKER_BACK_LEFT 0x10 #define SPEAKER_BACK_RIGHT 0x20 #define SPEAKER_FRONT_LEFT_OF_CENTER 0x40 #define SPEAKER_FRONT_RIGHT_OF_CENTER 0x80 #define SPEAKER_BACK_CENTER 0x100 #define SPEAKER_SIDE_LEFT 0x200 #define SPEAKER_SIDE_RIGHT 0x400 #define SPEAKER_TOP_CENTER 0x800 #define SPEAKER_TOP_FRONT_LEFT 0x1000 #define SPEAKER_TOP_FRONT_CENTER 0x2000 #define SPEAKER_TOP_FRONT_RIGHT 0x4000 #define SPEAKER_TOP_BACK_LEFT 0x8000 #define SPEAKER_TOP_BACK_CENTER 0x10000 #define SPEAKER_TOP_BACK_RIGHT 0x20000 #define SPEAKER_RESERVED 0x80000000 #ifndef WIN struct GUID { int Data1; short Data2; short Data3; unsigned char Data4[8]; }; #endif struct wav_ex { short wValidBitsPerSample; int dwChannelMask; GUID SubFormat; }; struct WAVEFORMATEXTENSIBLE { wave_head waveformatex; wav_ex waveformat_ext; }; const int PCM = WAVE_FORMAT_PCM; const int IEEE_FLOAT = WAVE_FORMAT_IEEE_FLOAT; const GUID KSDATAFORMAT_SUBTYPE_PCM = { 0x00000001, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} }; const GUID KSDATAFORMAT_SUBTYPE_IEEE_FLOAT = { 0x00000003, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} }; class SndWaveX : public SndWave { protected: inline bool GUIDcheck(GUID ID); int m_ChannelMask; GUID m_SubFormat; int m_subformat; float* m_fp; double* m_dp; bool m_iswavex; public: SndWaveX(char* name, short mode = OVERWRITE, short channels=1, int channelmask=0, short bits=16, short format=PCM, SndObj** inputlist=0, float spos= 0.f, int vecsize = DEF_VECSIZE, float sr = DEF_SR); ~SndWaveX(); void GetHeader(WAVEFORMATEXTENSIBLE* pheader); int GetChannelMask(){ return m_ChannelMask;} short Read(); short Write(); bool IsWaveExtensible(){ return m_iswavex; } }; bool SndWaveX::GUIDcheck(GUID ID){ if( (m_SubFormat.Data1 == ID.Data1) && (m_SubFormat.Data2 == ID.Data2) && (m_SubFormat.Data3 == ID.Data3) ){ for(int i=0; i < 8; i++) if(m_SubFormat.Data4[i] != ID.Data4[i]) return false; return true; } else return false; } #endif SndObj-2.6.7/include/SndObj/SpecCart.h000755 000766 000024 00000002563 12062674072 020055 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 _SpecCart_H #define _SpecCart_H #include "SpecMult.h" class SpecCart : public SpecMult { protected: void inline convert(float* a, float* b); public: SpecCart(); SpecCart(SndObj* input,int vecsize=DEF_FFTSIZE, float sr=DEF_SR); ~SpecCart(); short DoProcess(); }; void SpecCart::convert(float* a, float* b){ float re, im; re = (*a)*cos(*b); im = (*a)*sin(*b); *a=re; *b=im; } #endif SndObj-2.6.7/include/SndObj/SpecCombine.h000755 000766 000024 00000002641 12062674072 020535 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 _SpecCombine_H #define _SpecCombine_H #include "SpecCart.h" class SpecCombine : public SpecCart { protected: int m_halfsize; public: SpecCombine(); SpecCombine(SndObj* magin, SndObj* phasin, int vecsize=DEF_FFTSIZE, float sr=DEF_SR); ~SpecCombine(); void SetPhaseInput(SndObj* phasin){ m_input2 = phasin; } void SetMagInput(SndObj* magin) { m_input = magin; } int Connect(char* mess, void* input); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/SpecEnvTable.h000755 000766 000024 00000003301 12062674072 020653 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // SpecEnvTable.h: interface of the SpecEnvTable class // // // // // // // //************************************************************// #ifndef _SpecEnvTable_H #define _SpecEnvTable_H #include "PVEnvTable.h" class SpecEnvTable : public PVEnvTable { protected: const double m_pi; public: short MakeTable(); SpecEnvTable(); SpecEnvTable(long L, int segments, float start, float* points, float* lengths,float type = 0.f, float nyquistamp=0.f); ~SpecEnvTable(); }; #endif SndObj-2.6.7/include/SndObj/SpecIn.h000755 000766 000024 00000003621 12062674072 017526 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // SpecIn.h: interface of the SpecIn class. // // // // // // // //************************************************************// #ifndef _SpecIn_H #define _SpecIn_H #include "SndObj.h" #include "SndFIO.h" class SpecIn : public SndObj { protected: SndIO* m_ioinput; short m_channel; int m_initpos; public: SpecIn(); SpecIn(SndFIO *input, short channel=1, int vecsize=DEF_FFTSIZE, float sr=DEF_SR); ~SpecIn(); void SetInput(SndIO *input, short channel=1){ m_ioinput = input; m_channel = channel; m_initpos = (m_channel-1)*m_vecsize; } int Connect(char* mess, void* input); int Set(char* mess, float value); short DoProcess(); char* ErrorMessage(); }; #endif SndObj-2.6.7/include/SndObj/SpecInterp.h000755 000766 000024 00000002777 12062674072 020434 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 _SPECINTERP_H #define _SPECINTERP_H #include "SpecMult.h" class SpecInterp : public SpecMult { protected: float m_offset; SndObj* m_interpobj; public: SpecInterp(); SpecInterp(float i_offset, SndObj* input1, SndObj* input2, SndObj* interpobj=0, int vecsize=DEF_FFTSIZE, float sr=DEF_SR); ~SpecInterp(); int Connect(char* mess, void* input); int Set(char* mess, float value); void SetInterp(float i_offset, SndObj* interpobj=0){ m_offset = i_offset; m_interpobj = interpobj; } short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/SpecMult.h000755 000766 000024 00000003177 12062674072 020107 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 _SPECMULT_H #define _SPECMULT_H #include "SndObj.h" #include "Table.h" class SpecMult : public SndObj{ protected: SndObj* m_input2; Table* m_spectable; bool m_dynamic; public: SpecMult(); SpecMult(SndObj* input1, SndObj* input2, int vecsize=DEF_FFTSIZE, float sr=DEF_SR); SpecMult(Table* spectab, SndObj* input1, int vecsize=DEF_FFTSIZE, float sr=DEF_SR); ~SpecMult(); int Connect(char* mess, void* input); void SetInput2(SndObj* input2){ m_input2 = input2; m_dynamic = true; } void SetTable(Table *spectab) { if(spectab->GetLen() >= m_vecsize){ m_spectable = spectab; m_dynamic = false; } } short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/SpecPolar.h000755 000766 000024 00000002624 12062674072 020237 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 _SPECPOLAR_H #define _SPECPOLAR_H #include "SpecMult.h" class SpecPolar : public SpecMult { protected: void inline convert(float* a, float* b); public: SpecPolar(); SpecPolar(SndObj* input,int vecsize=DEF_FFTSIZE, float sr=DEF_SR); ~SpecPolar(); short DoProcess(); }; void SpecPolar::convert(float* a, float* b){ float mag, pha; mag = sqrt((*a)*(*a) + (*b)*(*b)); pha = atan2((*b),(*a)); *a=mag; *b=pha; } #endif SndObj-2.6.7/include/SndObj/SpecSplit.h000755 000766 000024 00000002447 12062674072 020260 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 _SpecSplit_H #define _SpecSplit_H #include "SpecPolar.h" class SpecSplit : public SpecPolar { protected: SndObj* m_channel; int m_halfsize; public: SndObj* magnitude; SndObj* phase; SpecSplit(); SpecSplit(SndObj* input,int vecsize=DEF_FFTSIZE+2, float sr=DEF_SR); ~SpecSplit(); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/SpecThresh.h000755 000766 000024 00000002540 12062674072 020414 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 _SpecThresh_H #define _SpecThresh_H #include "SpecPolar.h" class SpecThresh : public SpecPolar { protected: float m_thresh; public: void SetThreshold(float thresh){ m_thresh = thresh; } int Set(char* mess, float value); SpecThresh(); SpecThresh(float threshold, SndObj* input, int vecsize=DEF_FFTSIZE, float sr=DEF_SR); ~SpecThresh(); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/SpecVoc.h000755 000766 000024 00000002331 12062674072 017704 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 _SpecVoc_H #define _SpecVoc_H #include "SpecPolar.h" class SpecVoc : public SpecPolar { protected: public: SpecVoc(); SpecVoc(SndObj* input, SndObj* input2, int vecsize=DEF_FFTSIZE, float sr=DEF_SR); ~SpecVoc(); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/StringFlt.h000755 000766 000024 00000004340 12062674072 020260 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 //************************************************************// // StringFlt.h: interface of the StringFlt class // // // // // // // //************************************************************// #ifndef _StringFlt_H #define _StringFlt_H #include "DelayLine.h" class StringFlt : public DelayLine { protected: float m_vdtime; float m_fdbgain; float m_fr; float m_a; float m_LPDelay; float m_APDelay; float m_s; float m_decay; SndObj* m_inputfr; public: StringFlt(); StringFlt(float fr, float fdbgain, SndObj* inObj, SndObj* InFrObj=0, int vecsize=DEF_VECSIZE, float sr=DEF_SR); StringFlt(float fr, SndObj* inObj, float decay, SndObj* InFrObj=0, int vecsize=DEF_VECSIZE, float sr=DEF_SR); ~StringFlt(); void SetSr(float sr); void SetDecay(float decay); void SetFreq(float fr, SndObj* InFrObj=0); void SetFdbgain(float fdbgain){ if(m_decay == 0.f) m_fdbgain = fdbgain; } int Set(char* mess, float value); int Connect(char* mess, void* input); short DoProcess(); }; #endif SndObj-2.6.7/include/SndObj/SyncGrain.h000755 000766 000024 00000007405 12062674072 020246 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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 /////////////////////////////////////////////// // SyncGrain.h: synchronous granular synthesis // based on wavetable lookup // VL, 2002 /////////////////////////////////////////////// #ifndef _SyncGrain_H #define _SyncGrain_H #include "SndObj.h" #include "Table.h" class SyncGrain: public SndObj { protected: Table* m_table; // wavetable Table* m_envtable; // envelope table float m_amp; // overall amp SndObj* m_inputamp; float m_fr; // fundamental freq float m_frac; // fractional part SndObj* m_inputfr; float m_pitch; // grain pitch SndObj* m_inputpitch; double* m_index; // index into wavetable double* m_envindex; // index into envtable float m_start; // grain start index float m_grsize; // size of grains (secs) SndObj* m_inputgrsize; int m_olaps; // max number of streams (overlaps) float m_point; // grain start offset int m_count; // sampling period counter int m_numstreams; // curr num of streams int m_firststream; // streams index (first stream) int m_tablesize; // size of wavetable int m_envtablesize; // size of envtable short* m_streamon; // keeps track of the active streams public: // constructors / destructor SyncGrain(); SyncGrain(Table* wavetable, Table* envtable, float fr, float amp, float pitch, float grsize, float prate=1.f, SndObj* inputfr=0, SndObj* inputamp=0, SndObj* inputpitch=0, SndObj* inputgrsize=0, int olaps=100, int vecisize=DEF_VECSIZE, float sr=DEF_SR); ~SyncGrain(); // Set... void Offset(int pos){ m_start = pos; } void Offset(float secs){ m_start = secs*m_sr; } void SetWaveTable(Table* wavetable){ m_table = wavetable; m_tablesize = wavetable->GetLen(); } void SetEnvelopeTable(Table* envtable){ m_envtable = envtable; m_envtablesize = envtable->GetLen(); } void SetFreq(float fr, SndObj* inputfr=0){ m_fr = fr; // fundamental freq m_inputfr = inputfr; } void SetAmp(float amp, SndObj* inputamp=0){ m_amp = amp; // overall amp m_inputamp = inputamp; } void SetPitch(float pitch, SndObj* inputpitch=0){ m_pitch = pitch; // grain pitch m_inputpitch = inputpitch; } void SetGrainSize(float grsize, SndObj* inputgrsize=0){ m_grsize = grsize; // size of grains (secs) m_inputgrsize = inputgrsize; } void SetPointerRate(float prate){ m_point = prate; } // sets the reading // pointer rate in relation to grain size: // a value of 1 will make the read pointer read // the wavetable skiping grainsize positions // along it. A value of 0 will make the table be // read always at the start. int Set(char* mess, float value); int Connect(char* mess, void* input); short DoProcess(); char* ErrorMessage(); }; #endif SndObj-2.6.7/include/SndObj/Table.h000755 000766 000024 00000003572 12062674072 017401 0ustar00victorstaff000000 000000 //////////////////////////////////////////////////////////////////////// // 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; float* m_table; // table int m_error; // error code void ZeroTable () { int i; for(i=0;i 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 */ SndObj-2.6.7/include/rfftw/f77_func.h000644 000766 000024 00000003342 12062673766 017742 0ustar00victorstaff000000 000000 /* * 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 */ SndObj-2.6.7/include/rfftw/fftw-int.h000644 000766 000024 00000041327 12062673766 020067 0ustar00victorstaff000000 000000 /* * 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 */ SndObj-2.6.7/include/rfftw/fftw.h000644 000766 000024 00000030244 12062673766 017273 0ustar00victorstaff000000 000000 /* -*- 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 */ SndObj-2.6.7/include/rfftw/rfftw.h000644 000766 000024 00000007272 12062673766 017462 0ustar00victorstaff000000 000000 /* * 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 */ SndObj-2.6.7/fedora/mkpkg.sh000644 000766 000024 00000001134 12062673766 016302 0ustar00victorstaff000000 000000 tsocks cvs -z3 -d:pserver:anonymous@sndobj.cvs.sourceforge.net:/cvsroot/sndobj co -P sndobj rm -r sndobj/msvc6.0 rm -r sndobj/src/asio rm -r sndobj/src/rfftw/CVS rm -r sndobj/src/examples/CVS rm -r sndobj/src/templates/CVS rm -r sndobj/trane rm -r sndobj/cffi rm -r sndobj/java rm -r sndobj/CVS rm -r sndobj/python/CVS rm -r sndobj/python/lib rm -r sndobj/include/CVS rm -r sndobj/include/rfftw/CVS rm sndobj/include/*.h rm -r sndobj/lib/* rm -r sndobj/fedora mv sndobj SndObj-$1 tar cf ~/rpm-build/SOURCES/SndObj-$1.1-linux.tar SndObj-$1 gzip ~/rpm-build/SOURCES/SndObj-$1.1-linux.tar rm -r SndObj-$1 SndObj-2.6.7/fedora/SndObj.spec000644 000766 000024 00000004042 12062673766 016671 0ustar00victorstaff000000 000000 Name: SndObj Version: 2.6.6 Release: 2%{?dist} Summary: The Sound Object Library - audio processing library Group: Development/Libraries License: GPLv2+ URL: http://sndobj.sf.net Source0: http://downloads.sourceforge.net/sndobj/%{name}-%{version}.1-linux.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python scons swig alsa-lib-devel python-devel jack-audio-connection-kit-devel %define python_site_dir %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()") %description The SndObj library is a class library for general-purpose audio processing, with support for time and frequency domain processing. %package devel Summary: SndObj development files and libraries Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel Headers and libraries for SndObj-based development %package python Summary: Python SndObj development files and librariess Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: python %description python Contains Python language bindings for developing Python applications with SndObj %prep %setup -q %build %{_bindir}/scons pythonmodule=1 jack=1 alsa=1 version=%{version} customCCFLAGS="%{optflags}" %install rm -rf %{buildroot} scons install prefix=%{_prefix} instdir=%{buildroot} %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %{_libdir}/libsndobj.so.%{version} %doc License.txt %files devel %defattr(-,root,root,0755) %dir %{_includedir}/%{name} %dir %{_includedir}/rfftw %{_includedir}/%{name}/* %{_includedir}/rfftw/* %{_libdir}/libsndobj.so %doc License.txt %files python %defattr(-,root,root,-) %{python_site_dir}/* %doc License.txt %changelog * Wed May 28 2008 Victor Lazzarini - 2.6.6-1 - fixed scons build for scons 0.98 * Fri May 23 2008 Victor Lazzarini - 2.6.6-0 - initial version of this spec SndObj-2.6.7/debian/changelog000644 000766 000024 00000000255 12062673766 016474 0ustar00victorstaff000000 000000 python-sndobj (2.6.99-7) unstable; urgency=high * Fixing install error in automated build rules -- Daniel Skinner Mon, 25 May 2009 10:33:42 -0400 SndObj-2.6.7/debian/compat000644 000766 000024 00000000002 12062673766 016016 0ustar00victorstaff000000 000000 7 SndObj-2.6.7/debian/control000644 000766 000024 00000001223 12062673766 016221 0ustar00victorstaff000000 000000 Source: python-sndobj Section: python Priority: extra Maintainer: Daniel Skinner Build-Depends: debhelper (>= 7), python-dev, python-numpy, libasound2-dev, libjack-dev, swig, scons Standards-Version: 3.8.0 Homepage: http://sndobj.sourceforge.net/ Package: python-sndobj Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, python, python-numpy, libasound2, libjack0 Description: An object-oriented audio processing library. The Sound Object Library is an object-oriented audio processing library. It provides objects for synthesis and processing of sound that can be used to build applications for computer-generated music. SndObj-2.6.7/debian/copyright000644 000766 000024 00000002367 12062673766 016563 0ustar00victorstaff000000 000000 This package was debianized by: Daniel Skinner on Mon, 25 May 2009 10:33:42 -0400 It was downloaded from: http://sndobj.sourceforge.net Upstream Author(s): Victor Lazzarini Copyright: Copyright (C) 2009 Daniel Skinner License: This package 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 package 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 package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA On Debian systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL'. The Debian packaging is: Copyright C) 2009, Daniel Skinner and is licensed under the GPL, see above. SndObj-2.6.7/debian/dirs000644 000766 000024 00000000021 12062673766 015475 0ustar00victorstaff000000 000000 usr/bin usr/sbin SndObj-2.6.7/debian/docs000644 000766 000024 00000000026 12062673766 015471 0ustar00victorstaff000000 000000 build.txt License.txt SndObj-2.6.7/debian/postinst000644 000766 000024 00000001755 12062673766 016436 0ustar00victorstaff000000 000000 #!/bin/sh # postinst script for sndobj # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `configure' # * `abort-upgrade' # * `abort-remove' `in-favour' # # * `abort-remove' # * `abort-deconfigure' `in-favour' # `removing' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in configure) ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# # post install ldconfig /usr/lib/libsndobj.so.* exit 0 SndObj-2.6.7/debian/python-sndobj.install000644 000766 000024 00000000121 12062673766 021000 0ustar00victorstaff000000 000000 /usr/lib/*.so* /usr/lib/python*/*-packages/*.py /usr/lib/python*/*-packages/*.so SndObj-2.6.7/debian/rules000755 000766 000024 00000004065 12062673766 015705 0ustar00victorstaff000000 000000 #!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 export SCONS=scons configure: configure-stamp configure-stamp: dh_testdir # Add here commands to configure the package. touch configure-stamp build: build-stamp build-stamp: configure-stamp dh_testdir # Add here commands to compile the package. $(SCONS) prefix=/usr pythonmodule=yes numpy=yes instdir=$(CURDIR)/debian/sndobj install #docbook-to-man debian/sndobj.sgml > sndobj.1 touch $@ clean: dh_testdir dh_testroot rm -f build-stamp configure-stamp # Add here commands to clean up after the build process. #$(MAKE) clean #need to remove scon config files dh_clean install: build dh_testdir dh_testroot dh_prep dh_installdirs # Add here commands to install the package into debian/sndobj. $(SCONS) prefix=/usr pythonmodule=yes numpy=yes instdir=$(CURDIR)/debian/sndobj install #install files in package dh_install --sourcedir=debian/sndobj --list-missing -Xlicense.txt -X.pyc -X.pyo # Build architecture-independent files here. binary-indep: install # We have nothing to do by default. # Build architecture-dependent files here. binary-arch: install dh_testdir dh_testroot dh_installchangelogs -a dh_installdocs -a dh_installexamples -a # dh_install -a # dh_installmenu # dh_installdebconf # dh_installlogrotate # dh_installemacsen # dh_installpam # dh_installmime # dh_python # dh_installinit # dh_installcron # dh_installinfo dh_installman -a dh_link -a dh_strip -a dh_compress -a dh_fixperms -a # dh_perl # dh_makeshlibs dh_installdeb -a dh_shlibdeps -a dh_gencontrol -a dh_md5sums -a dh_builddeb -a binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install configure