├── .gitignore ├── CHANGELOG.md ├── CMakeLists.txt ├── LICENSE ├── README.md ├── cmake_uninstall.cmake.in └── fft3dfilter ├── CMakeLists.txt ├── FFT3DFilter.cpp ├── FFT3DFilter.rc ├── Files.cmake ├── avisynth.h ├── avs ├── alignment.h ├── capi.h ├── config.h ├── cpuid.h ├── filesystem.h ├── minmax.h ├── posix.h ├── types.h └── win.h ├── documentation ├── fft3dfilter-rus-outdated.html ├── fft3dfilter.html ├── gpl-rus.txt ├── gpl.txt └── overlap.png ├── fft3dfilter.sln ├── fft3dfilter.vcxproj ├── fft3dfilter.vcxproj.filters ├── fft3dfilter_c.cpp ├── fft3dfilter_sse.cpp ├── fftwlite.h ├── info.cpp └── info.h /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files 2 | *.slo 3 | *.lo 4 | *.o 5 | *.obj 6 | 7 | # Precompiled Headers 8 | *.gch 9 | *.pch 10 | 11 | # Compiled Dynamic libraries 12 | *.so 13 | *.dylib 14 | *.dll 15 | 16 | # Fortran module files 17 | *.mod 18 | *.smod 19 | 20 | # Compiled Static libraries 21 | *.lai 22 | *.la 23 | *.a 24 | *.lib 25 | 26 | # Executables 27 | *.exe 28 | *.out 29 | *.app 30 | 31 | # custom 32 | fft3dfilter/build/* 33 | build/* 34 | *.suo 35 | *.user 36 | *.userosscache 37 | *.sln.docstates 38 | 39 | # Build results 40 | [Dd]ebug/ 41 | [Dd]ebugPublic/ 42 | [Rr]elease/ 43 | [Rr]eleases/ 44 | [Rr]elWithDebInfo/ 45 | x64/ 46 | x86/ 47 | bld/ 48 | [Bb]in/ 49 | [Oo]bj/ 50 | [Ll]og/ 51 | 52 | .vs/ 53 | 54 | # Visual C++ cache files 55 | ipch/ 56 | *.aps 57 | *.ncb 58 | *.opendb 59 | *.opensdf 60 | *.sdf 61 | *.cachefile 62 | *.VC.db 63 | *.VC.VC.opendb 64 | *.VC.db-shm 65 | *.VC.db-wal 66 | 67 | # Visual Studio profiler 68 | *.psess 69 | *.vsp 70 | *.vspx 71 | *.sap 72 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ### Change log - fft3dfilter ### 2 | 3 | ``` 4 | FFT3DFilter v2.2.11 (20250603) 5 | - With Avisynth Interface v12 (3.7.6-): use Global Lock to make thread safe fftw3 for all 6 | plugins using fftw3 globally. 7 | 8 | FFT3DFilter v2.2.10 (20211018) 9 | - Fix possible crash on exit on ncpu=1 (uninitialized fft3w threads) 10 | - Fix C version (possibly unused on Intel builds, when CPU less than SSE2) in sharpen+degrid method 11 | 12 | FFT3DFilter v2.9 (20210324) 13 | - Fix issue when pfactor <> 0 and using 10+ bits (Xinyue Lu, neo_FFT3D) 14 | - Fix incorrect negative value float to integer rounding (Xinyue Lu, neo_FFT3D r7) 15 | - add CMake build system 16 | - linux build 17 | - Replace never used 3dnow ApplyWiener3D4 with simd SSE2. (bt=4, degrid=0, pfactor=0) (2x speed) 18 | 19 | FFT3DFilter v2.8 (20201201) 20 | - Fix: chroma plane filtering for 32 bit float formats 21 | 22 | FFT3DFilter v2.7 (20201130) 23 | - Fix: make fftw plans thread safe. 24 | - preserve frame properties for avs+ 25 | 26 | FFT3DFilter v2.6 (20190131) 27 | - Fix: Proper rounding when internal 32 bit float data are converted back to integer pixel values 28 | 29 | FFT3DFilter v2.5 (20180702) 30 | - 32bit Float YUV: Chroma center to 0.0 instead of 0.5, to match new Avisynth+ r2728- 31 | 32 | FFT3DFilter v2.4 (20170608) 33 | - some inline asm (not all) ported to simd intrisics, helps speedup x64 mode, but some of them faster also on x86. 34 | - intrinsics bt=0 35 | - intrinsics bt=2, degrid=0, pfactor=0 36 | - intrinsics bt=3 sharpen=0/1 dehalo=0/1 37 | - intrinsics bt=3 38 | - Adaptive MT settings for Avisynth+: MT_SERIALIZED for bt==0 (temporal), MT_MULTI_INSTANCE for others 39 | - Copy Alpha plane if exists 40 | - reentrancy checks against bad multithreading usage 41 | Note: for properly operating in MT_SERIALIZED mode in Avisynth MT, please use Avs+ r2504 or better. 42 | 43 | FFT3DFilter v2.3 (20170221) 44 | - apply current avs+ headers 45 | - 10-16 bits and 32 bit float colorspace support in AVS+ 46 | - Planar RGB support 47 | - look for libfftw3f-3.dll first, then fftw3.dll 48 | - inline asm ignored on x64 builds 49 | - pre-check: if plane to process for greyscale is U and/or V return original clip 50 | - auto register MT mode for avs+: MT_SERIALIZED 51 | 52 | Previous versions by Fizick and martin53 53 | ``` 54 | Original Docs: 55 | https://avisynth.org.ru/fft3dfilter/fft3dfilter.html 56 | Project: 57 | https://github.com/pinterf/fft3dfilter 58 | Forum: 59 | https://forum.doom9.org/showthread.php?t=174347 60 | 61 | Build instructions 62 | ------------------ 63 | ### Windows Visual Studio MSVC 64 | 65 | use IDE 66 | 67 | ### Windows GCC 68 | 69 | (mingw installed by msys2) 70 | From the 'build' folder under project root: 71 | 72 | ``` 73 | del ..\CMakeCache.txt 74 | cmake .. -G "MinGW Makefiles" -DENABLE_INTEL_SIMD:bool=on 75 | @rem test: cmake .. -G "MinGW Makefiles" -DENABLE_INTEL_SIMD:bool=off 76 | cmake --build . --config Release 77 | ``` 78 | 79 | ### Linux 80 | 81 | Note: ENABLE_INTEL_SIMD is automatically off for non-x86 architectures 82 | 83 | Clone repo and build 84 | 85 | ``` 86 | git clone https://github.com/pinterf/fft3dfilter 87 | cd fft3dfilter 88 | cmake -B build -S . 89 | cmake --build build 90 | ``` 91 | 92 | Useful hints: 93 | 94 | build after clean: 95 | 96 | ``` 97 | cmake --build build --clean-first 98 | ``` 99 | 100 | Force no Intel x86-assembler support: 101 | 102 | ``` 103 | cmake -B build -S . -DENABLE_INTEL_SIMD:bool=off 104 | ``` 105 | 106 | delete CMake cache: 107 | 108 | ``` 109 | rm build/CMakeCache.txt 110 | ``` 111 | 112 | 113 | 114 | * Find binaries at 115 | 116 | build/fft3dfilter/libfft3dfilter.so 117 | 118 | * Install binaries 119 | 120 | cd build 121 | sudo make install 122 | 123 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # We need CMake 3.8 at least, because we require 2 | # CMAKE_CXX_STANDARD to be set to C++17. 3 | # Visual Studio 2019 is supported from CMake 3.14.1 4 | # Possible generators: 5 | # "MinGW Makefiles": MSYS2/Mingw32 GCC 8.3 build 6 | # "Visual Studio 15 2017" optional platform generator Win32 and x64 7 | 8 | # "Visual Studio 16 2019" optional platform generator Win32 and x64 9 | # "Visual Studio 16 2019" + LLVM 8.0 (clang) optional platform generator Win32 and x64 10 | CMAKE_MINIMUM_REQUIRED( VERSION 3.8.2 ) 11 | 12 | project("TComb" LANGUAGES CXX) 13 | include(GNUInstallDirs) 14 | 15 | # Avoid uselessly linking to unused libraries 16 | set(CMAKE_STANDARD_LIBRARIES "" CACHE STRING "" FORCE) 17 | set(CMAKE_C_STANDARD_LIBRARIES "" CACHE STRING "" FORCE) 18 | set(CMAKE_CXX_STANDARD_LIBRARIES "" CACHE STRING "" FORCE) 19 | 20 | # We require C++17 or higher. 21 | set(CMAKE_CXX_STANDARD 17) 22 | set(CMAKE_CXX_STANDARD_REQUIRED TRUE) 23 | set(CMAKE_CXX_EXTENSIONS FALSE) 24 | 25 | # Detect Intel processors and turn Intel SIMD on or off automatically. 26 | message("-- Detected target processor as: ${CMAKE_SYSTEM_PROCESSOR}") 27 | string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" ARCHID) 28 | if( ("${ARCHID}" STREQUAL "x86") OR 29 | ("${ARCHID}" STREQUAL "x64") OR 30 | ("${ARCHID}" STREQUAL "i686") OR 31 | ("${ARCHID}" STREQUAL "amd64") OR 32 | ("${ARCHID}" STREQUAL "x86_64") ) 33 | set(INTEL_SIMD "ON") 34 | else() 35 | set(INTEL_SIMD "OFF") 36 | endif() 37 | 38 | option(ENABLE_INTEL_SIMD "Enable SIMD intrinsics for Intel processors" "${INTEL_SIMD}") 39 | 40 | if(CMAKE_CONFIGURATION_TYPES) 41 | set(CMAKE_CONFIGURATION_TYPES Debug Release RelWithDebInfo) 42 | set(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING "Reset the configurations to what we need" FORCE) 43 | endif() 44 | 45 | IF( MSVC ) # Check for Visual Studio 46 | # We do not allow creating Visual Studio solutions, existing .sln file contains 47 | # all x86/x64 versions of MSVC and LLVM builds. 48 | MESSAGE(FATAL_ERROR "Please use the existing sln file both for MS VC and also for LLVM toolset in VS") 49 | # anyway we keep all things below 50 | # ** not tested ** 51 | 52 | 53 | 54 | 55 | #1910-1919 = VS 15.0 (v141 toolset) Visual Studio 2017 56 | #1920 = VS 16.0 (v142 toolset) Visual Studio 2019 57 | 58 | IF( MSVC_VERSION VERSION_LESS 1910 ) 59 | MESSAGE(FATAL_ERROR "Visual C++ 2017 or newer required.") 60 | ENDIF() 61 | 62 | IF(MSVC_IDE) 63 | message("Reported CMAKE_GENERATOR_TOOLSET is: ${CMAKE_GENERATOR_TOOLSET}") 64 | 65 | # For LLVM Clang installed separately, specify llvm or LLVM 66 | # Since Visual Studio 2019 v16.4, LLVM 9.0 is integrated, for this use Toolset: ClangCL 67 | IF(CMAKE_GENERATOR_TOOLSET STREQUAL "LLVM" OR CMAKE_GENERATOR_TOOLSET STREQUAL "llvm" OR CMAKE_GENERATOR_TOOLSET STREQUAL "ClangCL") 68 | if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang") # hope: always 69 | message("LLVM toolset was specified via -T. Compiler ID is: ${CMAKE_CXX_COMPILER_ID}; CMAKE_CXX_COMPILER_VERSION is: ${CMAKE_CXX_COMPILER_VERSION}") 70 | # Clang; 9.0.0 71 | # These are probably not supported when clang is downloaded as a ready-made binary: CLANG_VERSION_MAJOR CLANG_VERSION_MINOR CLANG_VERSION_STRING 72 | # string (REGEX REPLACE ".*clang version ([0-9]+\\.[0-9]+).*" "\\1" CLANG_VERSION_STRING ${clang_full_version_string}) 73 | if( CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0.1 ) 74 | MESSAGE(FATAL_ERROR "Clang 7.0.1 or newer required") # as of 2019.december actually we are using 9.0 75 | endif() 76 | endif() 77 | set(CLANG_IN_VS "1") 78 | ELSEIF(CMAKE_GENERATOR_TOOLSET STREQUAL "v141_clang_c2") 79 | #1900 is reported 80 | message("v141_clang_c2 toolset was specified via -T. Reported MSVC_VERSION is: ${MSVC_VERSION}") 81 | message("May not work, try LLVM") 82 | set(CLANG_IN_VS "1") 83 | ENDIF() 84 | 85 | option(WINXP_SUPPORT "Make binaries compatible with Windows XP and Vista" OFF) 86 | if(WINXP_SUPPORT) 87 | # We want our project to also run on Windows XP 88 | # Not for LLVM: Clang stopped XP support in 2016 89 | # 1900 (VS2015) is not supported but we leave here 90 | IF(MSVC_VERSION VERSION_LESS 1910 ) 91 | IF(NOT CLANG_IN_VS STREQUAL "1") 92 | set(CMAKE_GENERATOR_TOOLSET "v140_xp" CACHE STRING "The compiler toolset to use for Visual Studio." FORCE) # VS2015 93 | # https://connect.microsoft.com/VisualStudio/feedback/details/1789709/visual-c-2015-runtime-broken-on-windows-server-2003-c-11-magic-statics 94 | message("CMAKE_GENERATOR_TOOLSET is forced to: ${CMAKE_GENERATOR_TOOLSET}") 95 | add_definitions("/Zc:threadSafeInit-") 96 | ENDIF() 97 | ELSE() 98 | IF(NOT CLANG_IN_VS STREQUAL "1") 99 | set(CMAKE_GENERATOR_TOOLSET "v141_xp" CACHE STRING "The compiler toolset to use for Visual Studio." FORCE) # VS2017, also choosable for VS2019 100 | # https://connect.microsoft.com/VisualStudio/feedback/details/1789709/visual-c-2015-runtime-broken-on-windows-server-2003-c-11-magic-statics 101 | message("CMAKE_GENERATOR_TOOLSET is forced to: ${CMAKE_GENERATOR_TOOLSET}") 102 | add_definitions("/Zc:threadSafeInit-") 103 | ENDIF() 104 | ENDIF() 105 | endif() 106 | ENDIF() 107 | 108 | IF(CLANG_IN_VS STREQUAL "1") 109 | #these are unknown 110 | #set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fexceptions") 111 | #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions") 112 | STRING( REPLACE "/EHsc" "/EHa" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") 113 | STRING( REPLACE "/EHsc" "/EHa" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") 114 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-inconsistent-missing-override") 115 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-inconsistent-missing-override") 116 | ELSE() 117 | # Enable C++ with SEH exceptions 118 | # Avoid an obnoxious 'overrriding /EHsc with /EHa' warning when 119 | # using something other than MSBuild 120 | STRING( REPLACE "/EHsc" "/EHa" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") 121 | STRING( REPLACE "/EHsc" "/EHa" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") 122 | ENDIF() 123 | # Prevent VC++ from complaining about not using MS-specific functions 124 | add_definitions("/D _CRT_SECURE_NO_WARNINGS /D _SECURE_SCL=0") 125 | 126 | # Enable CRT heap debugging - only effective in debug builds 127 | add_definitions("/D _CRTDBG_MAP_ALLOC") 128 | 129 | # Set additional optimization flags 130 | set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /Oy /Ot /GS- /Oi") 131 | set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Oy /Ot /GS- /Oi") 132 | 133 | # CPU_ARCH can be overridden with the corresponding values when using MSVC: 134 | # IA32 (disabled), 135 | # SSE (Pentium III and higher, 1999), 136 | # SSE2 (Pentium 4 and higher, 2000/2001), 137 | # AVX (Sandy Bridge and higher, 2011), 138 | # AVX2 (Haswell and higher, 2013) 139 | set(MSVC_CPU_ARCH "SSE2" CACHE STRING "Set MSVC architecture optimization level (default: SSE2)") 140 | 141 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /arch:${MSVC_CPU_ARCH}") 142 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:${MSVC_CPU_ARCH}") 143 | 144 | if(CMAKE_SIZEOF_VOID_P EQUAL 8) 145 | # MSVC doesn't allow 64-bit builds to have their /arch set to SSE2 (no-op) or below 146 | if("${MSVC_CPU_ARCH}" MATCHES "(IA32|SSE|SSE2)") 147 | set(DELETE_THIS "/arch:${MSVC_CPU_ARCH}") 148 | message("MSVC doesn't allow x86-64 builds to define /arch:${MSVC_CPU_ARCH}. Setting will be ignored.") 149 | STRING( REPLACE "${DELETE_THIS}" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") 150 | STRING( REPLACE "${DELETE_THIS}" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") 151 | endif() 152 | endif() 153 | 154 | IF(CLANG_IN_VS STREQUAL "1") 155 | # suppress other frequent but harmless/unavoidable warnings 156 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-function") 157 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-function") 158 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-reorder") 159 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-reorder") 160 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-value") 161 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-value") 162 | # allow per-function attributes like __attribute__((__target__("sse4.1"))) 163 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-gcc-compat") 164 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-gcc-compat") 165 | ENDIF() 166 | 167 | # Set C++17 flag 168 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /std:c++17") 169 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17") 170 | 171 | # Enable standards-conformance mode for MSVC compilers that support this 172 | # flag (Visual C++ 2017 and later). 173 | if (NOT (MSVC_VERSION LESS 1910)) 174 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /permissive-") 175 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /permissive-") 176 | endif() 177 | 178 | if(ENABLE_INTEL_SIMD) 179 | add_definitions("/D INTEL_INTRINSICS") 180 | endif() 181 | 182 | ELSE() 183 | 184 | if(ENABLE_INTEL_SIMD) 185 | SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2 -DINTEL_INTRINSICS" ) 186 | endif() 187 | 188 | if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") 189 | SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-format-security" ) 190 | endif() 191 | 192 | IF(WIN32) 193 | SET( CMAKE_SHARED_LINKER_FLAGS "-Wl,--enable-stdcall-fixup" ) 194 | ELSE() 195 | if(APPLE) 196 | # macOS uses Clang's linker, doesn't like --no-undefined 197 | SET( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-undefined,error" ) 198 | else() 199 | if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") 200 | # make sure there are no undefined symbols 201 | SET( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" ) 202 | endif() 203 | endif() 204 | ENDIF() 205 | ENDIF() 206 | 207 | IF(ENABLE_INTEL_SIMD) 208 | message("Intel SIMD enabled") 209 | ELSE() 210 | message("Intel SIMD disabled") 211 | ENDIF() 212 | 213 | add_subdirectory("fft3dfilter") 214 | 215 | # uninstall target 216 | configure_file( 217 | "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" 218 | "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" 219 | IMMEDIATE @ONLY) 220 | 221 | add_custom_target(uninstall 222 | COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) 223 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | {description} 294 | Copyright (C) {year} {fullname} 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | {signature of Ty Coon}, 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # fft3dfilter # 2 | 3 | FFT3DFilter is 3D Frequency Domain filter - strong denoiser and moderate sharpener. 4 | 5 | Previous versions by Fizick and martin53 6 | 7 | ## Links 8 | 9 | Original documentation: https://avisynth.org.ru/fft3dfilter/fft3dfilter.html 10 | Project: https://github.com/pinterf/fft3dfilter 11 | Forum: https://forum.doom9.org/showthread.php?t=174347 12 | 13 | Build instructions 14 | ------------------ 15 | ### Windows Visual Studio MSVC 16 | 17 | use IDE 18 | 19 | ### Windows GCC 20 | 21 | (mingw installed by msys2) 22 | From the 'build' folder under project root: 23 | 24 | ``` 25 | del ..\CMakeCache.txt 26 | cmake .. -G "MinGW Makefiles" -DENABLE_INTEL_SIMD:bool=on 27 | @rem test: cmake .. -G "MinGW Makefiles" -DENABLE_INTEL_SIMD:bool=off 28 | cmake --build . --config Release 29 | ``` 30 | 31 | ### Linux 32 | 33 | Note: ENABLE_INTEL_SIMD is automatically off for non-x86 architectures 34 | 35 | Clone repo and build 36 | 37 | ``` 38 | git clone https://github.com/pinterf/fft3dfilter 39 | cd fft3dfilter 40 | cmake -B build -S . 41 | cmake --build build 42 | ``` 43 | 44 | Useful hints: 45 | 46 | build after clean: 47 | 48 | ``` 49 | cmake --build build --clean-first 50 | ``` 51 | 52 | Force no Intel x86-assembler support: 53 | 54 | ``` 55 | cmake -B build -S . -DENABLE_INTEL_SIMD:bool=off 56 | ``` 57 | 58 | delete CMake cache: 59 | 60 | ``` 61 | rm build/CMakeCache.txt 62 | ``` 63 | 64 | * Find binaries at 65 | 66 | build/fft3dfilter/libfft3dfilter.so 67 | 68 | * Install binaries 69 | 70 | cd build 71 | sudo make install 72 | -------------------------------------------------------------------------------- /cmake_uninstall.cmake.in: -------------------------------------------------------------------------------- 1 | if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") 2 | message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") 3 | endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") 4 | 5 | file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) 6 | string(REGEX REPLACE "\n" ";" files "${files}") 7 | foreach(file ${files}) 8 | message(STATUS "Uninstalling $ENV{DESTDIR}${file}") 9 | if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") 10 | exec_program( 11 | "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" 12 | OUTPUT_VARIABLE rm_out 13 | RETURN_VALUE rm_retval 14 | ) 15 | if(NOT "${rm_retval}" STREQUAL 0) 16 | message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}") 17 | endif(NOT "${rm_retval}" STREQUAL 0) 18 | else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") 19 | message(STATUS "File $ENV{DESTDIR}${file} does not exist.") 20 | endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") 21 | endforeach(file) 22 | -------------------------------------------------------------------------------- /fft3dfilter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Visual Studio 2019 is supported from CMake 3.14.1 2 | # Tested generators: 3 | # "MinGW Makefiles": MSYS2/Mingw32 GCC 8.3 build 4 | # "Visual Studio 16 2019" optional platform generator Win32 and x64 5 | # "Visual Studio 16 2019" + LLVM 8.0 (clang) optional platform generator Win32 and x64 6 | CMAKE_MINIMUM_REQUIRED( VERSION 3.8.2 ) 7 | 8 | set(PluginName "FFT3DFilter") 9 | 10 | if (NOT WIN32) 11 | string(TOLOWER "${PluginName}" PluginName) 12 | endif() 13 | 14 | set(ProjectName "${PluginName}") 15 | project(${ProjectName} LANGUAGES CXX) 16 | 17 | Include("Files.cmake") 18 | 19 | add_library(${PluginName} SHARED ${FFT3DFilter_Sources}) 20 | 21 | set_target_properties(${PluginName} PROPERTIES "OUTPUT_NAME" "${PluginName}") 22 | if (MINGW) 23 | set_target_properties(${PluginName} PROPERTIES PREFIX "") 24 | set_target_properties(${PluginName} PROPERTIES IMPORT_PREFIX "") 25 | endif() 26 | 27 | IF(ENABLE_INTEL_SIMD) 28 | #require sse2, some other plugins may need to set sse4.1 for quick msvc->gcc porting 29 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DINTEL_INTRINSICS -msse2") 30 | ENDIF() 31 | 32 | # Automatically group source files according to directory structure 33 | foreach(FILE ${FFT3DFilter_Sources}) 34 | get_filename_component(PARENT_DIR "${FILE}" PATH) 35 | 36 | string(REGEX REPLACE "(\\./)" "" GROUP "${PARENT_DIR}") 37 | string(REPLACE "/" "\\" GROUP "${GROUP}") 38 | 39 | # group into "Source Files" and "Header Files" 40 | if ("${FILE}" MATCHES ".*\\.cpp") 41 | set(GROUP "Source Files\\${GROUP}") 42 | elseif("${FILE}" MATCHES ".*\\.h") 43 | set(GROUP "Header Files\\${GROUP}") 44 | elseif("${FILE}" MATCHES ".*\\.asm") 45 | set(GROUP "Assembler Files\\${GROUP}") 46 | endif() 47 | 48 | source_group("${GROUP}" FILES "${FILE}") 49 | endforeach() 50 | 51 | if (MSVC_IDE) 52 | IF(CLANG_IN_VS STREQUAL "1") 53 | # special SSSE3 option for source files with *_ssse3.cpp pattern 54 | file(GLOB_RECURSE SRCS_SSSE3 "*_ssse3.cpp") 55 | set_source_files_properties(${SRCS_SSSE3} PROPERTIES COMPILE_FLAGS " -mssse3 ") 56 | 57 | # special SSE4.1 option for source files with *_sse41.cpp pattern 58 | file(GLOB_RECURSE SRCS_SSE41 "*_sse41.cpp") 59 | set_source_files_properties(${SRCS_SSE41} PROPERTIES COMPILE_FLAGS " -msse4.1 ") 60 | 61 | # special AVX option for source files with *_avx.cpp pattern 62 | file(GLOB_RECURSE SRCS_AVX "*_avx.cpp") 63 | set_source_files_properties(${SRCS_AVX} PROPERTIES COMPILE_FLAGS " -mavx ") 64 | 65 | # special AVX2 option for source files with *_avx2.cpp pattern 66 | file(GLOB_RECURSE SRCS_AVX2 "*_avx2.cpp") 67 | set_source_files_properties(${SRCS_AVX2} PROPERTIES COMPILE_FLAGS " -mavx2 -mfma ") 68 | 69 | # special AVX512 option for source files with *_avx512.cpp pattern 70 | file(GLOB_RECURSE SRCS_AVX512 "*_avx512.cpp") 71 | set_source_files_properties(${SRCS_AVX512} PROPERTIES COMPILE_FLAGS " -mavx512f -mavx512bw ") 72 | ELSE() 73 | # special AVX option for source files with *_avx.cpp pattern 74 | file(GLOB_RECURSE SRCS_AVX "*_avx.cpp") 75 | set_source_files_properties(${SRCS_AVX} PROPERTIES COMPILE_FLAGS " /arch:AVX ") 76 | 77 | # special AVX2 option for source files with *_avx2.cpp pattern 78 | file(GLOB_RECURSE SRCS_AVX2 "*_avx2.cpp") 79 | set_source_files_properties(${SRCS_AVX2} PROPERTIES COMPILE_FLAGS " /arch:AVX2 ") 80 | 81 | # special AVX512 option for source files with *_avx512.cpp pattern 82 | file(GLOB_RECURSE SRCS_AVX512 "*_avx512.cpp") 83 | set_source_files_properties(${SRCS_AVX512} PROPERTIES COMPILE_FLAGS " /arch:AVX512 ") 84 | ENDIF() 85 | else() 86 | # special SSSE3 option for source files with *_ssse3.cpp pattern 87 | file(GLOB_RECURSE SRCS_SSSE3 "*_ssse3.cpp") 88 | set_source_files_properties(${SRCS_SSSE3} PROPERTIES COMPILE_FLAGS " -mssse3 ") 89 | 90 | # special SSE4.1 option for source files with *_sse41.cpp pattern 91 | file(GLOB_RECURSE SRCS_SSE41 "*_sse41.cpp") 92 | set_source_files_properties(${SRCS_SSE41} PROPERTIES COMPILE_FLAGS " -msse4.1 ") 93 | 94 | # special AVX option for source files with *_avx.cpp pattern 95 | file(GLOB_RECURSE SRCS_AVX "*_avx.cpp") 96 | set_source_files_properties(${SRCS_AVX} PROPERTIES COMPILE_FLAGS " -mavx ") 97 | 98 | # special AVX2 option for source files with *_avx2.cpp pattern 99 | file(GLOB_RECURSE SRCS_AVX2 "*_avx2.cpp") 100 | set_source_files_properties(${SRCS_AVX2} PROPERTIES COMPILE_FLAGS " -mavx2 -mfma ") 101 | 102 | # special AVX512 option for source files with *_avx512.cpp pattern 103 | file(GLOB_RECURSE SRCS_AVX512 "*_avx512.cpp") 104 | set_source_files_properties(${SRCS_AVX512} PROPERTIES COMPILE_FLAGS " -mavx512f -mavx512bw ") 105 | endif() 106 | 107 | 108 | # Specify include directories 109 | target_include_directories(${ProjectName} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) 110 | #dedicated include dir for avisynth.h 111 | #target_include_directories(${ProjectName} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include) 112 | 113 | # Windows DLL dependencies 114 | if (MSVC OR MINGW) 115 | target_link_libraries(${ProjectName} "uuid" "winmm" "vfw32" "msacm32" "gdi32" "user32" "advapi32" "ole32" "imagehlp") 116 | else() 117 | #non Windows 118 | target_link_libraries(${ProjectName} "dl") 119 | # "pthread" 120 | endif() 121 | 122 | include(GNUInstallDirs) 123 | 124 | INSTALL(TARGETS ${ProjectName} 125 | LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}/avisynth") 126 | -------------------------------------------------------------------------------- /fft3dfilter/FFT3DFilter.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinterf/fft3dfilter/d142d3cea90205c57ae354bdf1bcf04bd3154a13/fft3dfilter/FFT3DFilter.rc -------------------------------------------------------------------------------- /fft3dfilter/Files.cmake: -------------------------------------------------------------------------------- 1 | FILE(GLOB FFT3DFilter_Sources RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" 2 | "*.c" 3 | "*.cpp" 4 | "*.hpp" 5 | "*.h" 6 | 7 | "avs/*.h" 8 | ) 9 | 10 | IF( MSVC OR MINGW ) 11 | # Export definitions in general are not needed on x64 and only cause warnings, 12 | # unfortunately we still must need a .def file for some COM functions. 13 | # NO C interface for this plugin 14 | # if(CMAKE_SIZEOF_VOID_P EQUAL 8) 15 | # LIST(APPEND TComb_Sources "FFT3DFilter64.def") 16 | # else() 17 | # LIST(APPEND TComb_Sources "FFT3DFilter.def") 18 | # endif() 19 | ENDIF() 20 | 21 | IF( MSVC_IDE ) 22 | # Ninja, unfortunately, seems to have some issues with using rc.exe 23 | LIST(APPEND FFT3DFilter_Sources "FFT3DFilter.rc") 24 | ENDIF() 25 | -------------------------------------------------------------------------------- /fft3dfilter/avs/alignment.h: -------------------------------------------------------------------------------- 1 | // Avisynth C Interface Version 0.20 2 | // Copyright 2003 Kevin Atkinson 3 | 4 | // This program is free software; you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation; either version 2 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit 17 | // http://www.gnu.org/copyleft/gpl.html . 18 | // 19 | // As a special exception, I give you permission to link to the 20 | // Avisynth C interface with independent modules that communicate with 21 | // the Avisynth C interface solely through the interfaces defined in 22 | // avisynth_c.h, regardless of the license terms of these independent 23 | // modules, and to copy and distribute the resulting combined work 24 | // under terms of your choice, provided that every copy of the 25 | // combined work is accompanied by a complete copy of the source code 26 | // of the Avisynth C interface and Avisynth itself (with the version 27 | // used to produce the combined work), being distributed under the 28 | // terms of the GNU General Public License plus this exception. An 29 | // independent module is a module which is not derived from or based 30 | // on Avisynth C Interface, such as 3rd-party filters, import and 31 | // export plugins, or graphical user interfaces. 32 | 33 | #ifndef AVS_ALIGNMENT_H 34 | #define AVS_ALIGNMENT_H 35 | 36 | // Functions and macros to help work with alignment requirements. 37 | 38 | // Tells if a number is a power of two. 39 | #define IS_POWER2(n) ((n) && !((n) & ((n) - 1))) 40 | 41 | // Tells if the pointer "ptr" is aligned to "align" bytes. 42 | #define IS_PTR_ALIGNED(ptr, align) (((uintptr_t)ptr & ((uintptr_t)(align-1))) == 0) 43 | 44 | // Rounds up the number "n" to the next greater multiple of "align" 45 | #define ALIGN_NUMBER(n, align) (((n) + (align)-1) & (~((align)-1))) 46 | 47 | // Rounds up the pointer address "ptr" to the next greater multiple of "align" 48 | #define ALIGN_POINTER(ptr, align) (((uintptr_t)(ptr) + (align)-1) & (~(uintptr_t)((align)-1))) 49 | 50 | #ifdef __cplusplus 51 | 52 | #include 53 | #include 54 | #include 55 | #include "config.h" 56 | 57 | #if defined(MSVC) && _MSC_VER<1400 58 | // needed for VS2013, otherwise C++11 'alignas' works 59 | #define avs_alignas(x) __declspec(align(x)) 60 | #else 61 | // assumes C++11 support 62 | #define avs_alignas(x) alignas(x) 63 | #endif 64 | 65 | template 66 | static bool IsPtrAligned(T* ptr, size_t align) 67 | { 68 | assert(IS_POWER2(align)); 69 | return (bool)IS_PTR_ALIGNED(ptr, align); 70 | } 71 | 72 | template 73 | static T AlignNumber(T n, T align) 74 | { 75 | assert(IS_POWER2(align)); 76 | return ALIGN_NUMBER(n, align); 77 | } 78 | 79 | template 80 | static T* AlignPointer(T* ptr, size_t align) 81 | { 82 | assert(IS_POWER2(align)); 83 | return (T*)ALIGN_POINTER(ptr, align); 84 | } 85 | 86 | extern "C" 87 | { 88 | #else 89 | #include 90 | #endif // __cplusplus 91 | 92 | // Returns a new buffer that is at least the size "nbytes". 93 | // The buffer will be aligned to "align" bytes. 94 | // Returns NULL on error. On successful allocation, 95 | // the returned buffer must be freed using "avs_free". 96 | inline void* avs_malloc(size_t nbytes, size_t align) 97 | { 98 | if (!IS_POWER2(align)) 99 | return NULL; 100 | 101 | size_t offset = sizeof(void*) + align - 1; 102 | 103 | void *orig = malloc(nbytes + offset); 104 | if (orig == NULL) 105 | return NULL; 106 | 107 | void **aligned = (void**)(((uintptr_t)orig + (uintptr_t)offset) & (~(uintptr_t)(align-1))); 108 | aligned[-1] = orig; 109 | return aligned; 110 | } 111 | 112 | // Buffers allocated using "avs_malloc" must be freed 113 | // using "avs_free" instead of "free". 114 | inline void avs_free(void *ptr) 115 | { 116 | // Mirroring free()'s semantic requires us to accept NULLs 117 | if (ptr == NULL) 118 | return; 119 | 120 | free(((void**)ptr)[-1]); 121 | } 122 | 123 | #ifdef __cplusplus 124 | } // extern "C" 125 | 126 | // The point of these undef's is to force using the template functions 127 | // if we are in C++ mode. For C, the user can rely only on the macros. 128 | #undef IS_PTR_ALIGNED 129 | #undef ALIGN_NUMBER 130 | #undef ALIGN_POINTER 131 | 132 | #endif // __cplusplus 133 | 134 | #endif //AVS_ALIGNMENT_H 135 | -------------------------------------------------------------------------------- /fft3dfilter/avs/capi.h: -------------------------------------------------------------------------------- 1 | // Avisynth C Interface Version 0.20 2 | // Copyright 2003 Kevin Atkinson 3 | 4 | // This program is free software; you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation; either version 2 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit 17 | // http://www.gnu.org/copyleft/gpl.html . 18 | // 19 | // As a special exception, I give you permission to link to the 20 | // Avisynth C interface with independent modules that communicate with 21 | // the Avisynth C interface solely through the interfaces defined in 22 | // avisynth_c.h, regardless of the license terms of these independent 23 | // modules, and to copy and distribute the resulting combined work 24 | // under terms of your choice, provided that every copy of the 25 | // combined work is accompanied by a complete copy of the source code 26 | // of the Avisynth C interface and Avisynth itself (with the version 27 | // used to produce the combined work), being distributed under the 28 | // terms of the GNU General Public License plus this exception. An 29 | // independent module is a module which is not derived from or based 30 | // on Avisynth C Interface, such as 3rd-party filters, import and 31 | // export plugins, or graphical user interfaces. 32 | 33 | #ifndef AVS_CAPI_H 34 | #define AVS_CAPI_H 35 | 36 | #include "config.h" 37 | 38 | #ifdef AVS_POSIX 39 | // this is also defined in avs/posix.h 40 | #ifndef AVS_HAIKU 41 | #define __declspec(x) 42 | #endif 43 | #endif 44 | 45 | #ifdef __cplusplus 46 | # define EXTERN_C extern "C" 47 | #else 48 | # define EXTERN_C 49 | #endif 50 | 51 | #ifdef AVS_WINDOWS 52 | #ifdef BUILDING_AVSCORE 53 | # if defined(GCC) && defined(X86_32) 54 | # define AVSC_CC 55 | # else // MSVC builds and 64-bit GCC 56 | # ifndef AVSC_USE_STDCALL 57 | # define AVSC_CC __cdecl 58 | # else 59 | # define AVSC_CC __stdcall 60 | # endif 61 | # endif 62 | #else // needed for programs that talk to AviSynth+ 63 | # ifndef AVSC_WIN32_GCC32 // see comment below 64 | # ifndef AVSC_USE_STDCALL 65 | # define AVSC_CC __cdecl 66 | # else 67 | # define AVSC_CC __stdcall 68 | # endif 69 | # else 70 | # define AVSC_CC 71 | # endif 72 | #endif 73 | # else 74 | # define AVSC_CC 75 | #endif 76 | 77 | // On 64-bit Windows, there's only one calling convention, 78 | // so there is no difference between MSVC and GCC. On 32-bit, 79 | // this isn't true. The convention that GCC needs to use to 80 | // even build AviSynth+ as 32-bit makes anything that uses 81 | // it incompatible with 32-bit MSVC builds of AviSynth+. 82 | // The AVSC_WIN32_GCC32 define is meant to provide a user 83 | // switchable way to make builds of FFmpeg to test 32-bit 84 | // GCC builds of AviSynth+ without having to screw around 85 | // with alternate headers, while still default to the usual 86 | // situation of using 32-bit MSVC builds of AviSynth+. 87 | 88 | // Hopefully, this situation will eventually be resolved 89 | // and a broadly compatible solution will arise so the 90 | // same 32-bit FFmpeg build can handle either MSVC or GCC 91 | // builds of AviSynth+. 92 | 93 | #define AVSC_INLINE static __inline 94 | 95 | #ifdef BUILDING_AVSCORE 96 | #ifdef AVS_WINDOWS 97 | # ifndef AVS_STATIC_LIB 98 | # define AVSC_EXPORT __declspec(dllexport) 99 | # else 100 | # define AVSC_EXPORT 101 | # endif 102 | # define AVSC_API(ret, name) EXTERN_C AVSC_EXPORT ret AVSC_CC name 103 | #else 104 | # define AVSC_EXPORT EXTERN_C 105 | # define AVSC_API(ret, name) EXTERN_C ret AVSC_CC name 106 | #endif 107 | #else 108 | # define AVSC_EXPORT EXTERN_C __declspec(dllexport) 109 | # ifndef AVS_STATIC_LIB 110 | # define AVSC_IMPORT __declspec(dllimport) 111 | # else 112 | # define AVSC_IMPORT 113 | # endif 114 | # ifndef AVSC_NO_DECLSPEC 115 | # define AVSC_API(ret, name) EXTERN_C AVSC_IMPORT ret AVSC_CC name 116 | # else 117 | # define AVSC_API(ret, name) typedef ret (AVSC_CC *name##_func) 118 | # endif 119 | #endif 120 | 121 | #endif //AVS_CAPI_H 122 | -------------------------------------------------------------------------------- /fft3dfilter/avs/config.h: -------------------------------------------------------------------------------- 1 | // Avisynth C Interface Version 0.20 2 | // Copyright 2003 Kevin Atkinson 3 | 4 | // This program is free software; you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation; either version 2 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit 17 | // http://www.gnu.org/copyleft/gpl.html . 18 | // 19 | // As a special exception, I give you permission to link to the 20 | // Avisynth C interface with independent modules that communicate with 21 | // the Avisynth C interface solely through the interfaces defined in 22 | // avisynth_c.h, regardless of the license terms of these independent 23 | // modules, and to copy and distribute the resulting combined work 24 | // under terms of your choice, provided that every copy of the 25 | // combined work is accompanied by a complete copy of the source code 26 | // of the Avisynth C interface and Avisynth itself (with the version 27 | // used to produce the combined work), being distributed under the 28 | // terms of the GNU General Public License plus this exception. An 29 | // independent module is a module which is not derived from or based 30 | // on Avisynth C Interface, such as 3rd-party filters, import and 31 | // export plugins, or graphical user interfaces. 32 | 33 | #ifndef AVS_CONFIG_H 34 | #define AVS_CONFIG_H 35 | 36 | // Undefine this to get cdecl calling convention 37 | #define AVSC_USE_STDCALL 1 38 | 39 | // NOTE TO PLUGIN AUTHORS: 40 | // Because FRAME_ALIGN can be substantially higher than the alignment 41 | // a plugin actually needs, plugins should not use FRAME_ALIGN to check for 42 | // alignment. They should always request the exact alignment value they need. 43 | // This is to make sure that plugins work over the widest range of AviSynth 44 | // builds possible. 45 | #define FRAME_ALIGN 64 46 | 47 | #if defined(_M_AMD64) || defined(__x86_64) 48 | # define X86_64 49 | #elif defined(_M_IX86) || defined(__i386__) 50 | # define X86_32 51 | #elif defined(_M_ARM64) || defined(__aarch64__) 52 | // _M_ARM64: MSVC; __aarch64__: GCC and Clang 53 | # define ARM64 54 | #elif defined(_M_ARM) || defined(__arm__) 55 | # define ARM32 56 | #elif defined(__PPC64__) 57 | # define PPC64 58 | #elif defined(_M_PPC) || defined(__PPC__) || defined(__POWERPC__) 59 | # define PPC32 60 | #elif defined(__riscv) 61 | # define RISCV 62 | #elif defined(__loongarch__) 63 | # define LOONGARCH 64 | #elif defined(__sparc_v9__) 65 | # define SPARC 66 | #elif defined(__mips__) 67 | # define MIPS 68 | #else 69 | # error Unsupported CPU architecture. 70 | #endif 71 | 72 | // VC++ LLVM-Clang-cl MinGW-Gnu 73 | // MSVC x x 74 | // MSVC_PURE x 75 | // CLANG x 76 | // GCC x 77 | 78 | #if defined(__clang__) 79 | // Check clang first. clang-cl also defines __MSC_VER 80 | // We set MSVC because they are mostly compatible 81 | # define CLANG 82 | #if defined(_MSC_VER) 83 | # define MSVC 84 | #endif 85 | # define AVS_FORCEINLINE __attribute__((always_inline)) inline 86 | #elif defined(_MSC_VER) 87 | # define MSVC 88 | # define MSVC_PURE 89 | # define AVS_FORCEINLINE __forceinline 90 | #elif defined(__GNUC__) 91 | # define GCC 92 | # define AVS_FORCEINLINE __attribute__((always_inline)) inline 93 | #elif defined(__INTEL_COMPILER) || defined(__INTEL_LLVM_COMPILER) 94 | // Intel C++ Compilers with MSVC command line interface will not appear here rather at _MSC_VER 95 | # define AVS_FORCEINLINE inline 96 | # undef __forceinline 97 | # define __forceinline inline 98 | #else 99 | # error Unsupported compiler. 100 | # define AVS_FORCEINLINE inline 101 | # undef __forceinline 102 | # define __forceinline inline 103 | #endif 104 | 105 | #if defined(_WIN32) 106 | # define AVS_WINDOWS 107 | #elif defined(__linux__) 108 | # define AVS_LINUX 109 | # define AVS_POSIX 110 | #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) 111 | # define AVS_BSD 112 | # define AVS_POSIX 113 | #elif defined(__APPLE__) 114 | # define AVS_MACOS 115 | # define AVS_POSIX 116 | #elif defined(__HAIKU__) 117 | # define AVS_HAIKU 118 | # define AVS_POSIX 119 | #else 120 | # error Operating system unsupported. 121 | #endif 122 | 123 | #if defined(AVS_WINDOWS) 124 | # if defined(X86_32) || defined(X86_64) 125 | # define AVS_WINDOWS_X86 126 | # elif defined(ARM64) || defined(ARM32) 127 | # define AVS_WINDOWS_ARM 128 | # endif 129 | #endif 130 | 131 | #if defined(MSVC) && !defined(AVS_WINDOWS_X86) 132 | # error Unsupported combination of compiler, operating system, and machine architecture. 133 | #endif 134 | 135 | /* A kinda portable definition of the C99 restrict keyword (or its unofficial C++ equivalent) */ 136 | #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* Available in C99 */ 137 | #define AVS_RESTRICT restrict 138 | #elif defined(__cplusplus) || defined(_MSC_VER) /* Almost all relevant C++ compilers support it so just assume it works */ 139 | #define AVS_RESTRICT __restrict 140 | #else /* Not supported */ 141 | #define AVS_RESTRICT 142 | #endif 143 | 144 | // useful warnings disabler macros for supported compilers 145 | 146 | #if defined(_MSC_VER) 147 | #define DISABLE_WARNING_PUSH __pragma(warning( push )) 148 | #define DISABLE_WARNING_POP __pragma(warning( pop )) 149 | #define DISABLE_WARNING(warningNumber) __pragma(warning( disable : warningNumber )) 150 | 151 | #define DISABLE_WARNING_UNREFERENCED_LOCAL_VARIABLE DISABLE_WARNING(4101) 152 | #define DISABLE_WARNING_UNREFERENCED_FUNCTION DISABLE_WARNING(4505) 153 | // other warnings you want to deactivate... 154 | 155 | #elif defined(__GNUC__) || defined(__clang__) 156 | #define DO_PRAGMA(X) _Pragma(#X) 157 | #define DISABLE_WARNING_PUSH DO_PRAGMA(GCC diagnostic push) 158 | #define DISABLE_WARNING_POP DO_PRAGMA(GCC diagnostic pop) 159 | #define DISABLE_WARNING(warningName) DO_PRAGMA(GCC diagnostic ignored #warningName) 160 | 161 | #define DISABLE_WARNING_UNREFERENCED_LOCAL_VARIABLE DISABLE_WARNING(-Wunused-variable) 162 | #define DISABLE_WARNING_UNREFERENCED_FUNCTION DISABLE_WARNING(-Wunused-function) 163 | // other warnings you want to deactivate... 164 | 165 | #else 166 | #define DISABLE_WARNING_PUSH 167 | #define DISABLE_WARNING_POP 168 | #define DISABLE_WARNING_UNREFERENCED_LOCAL_VARIABLE 169 | #define DISABLE_WARNING_UNREFERENCED_FUNCTION 170 | // other warnings you want to deactivate... 171 | 172 | #endif 173 | 174 | #if defined(AVS_WINDOWS) && defined(_USING_V110_SDK71_) 175 | // Windows XP does not have proper initialization for 176 | // thread local variables. 177 | // Use workaround instead __declspec(thread) 178 | #define XP_TLS 179 | #endif 180 | 181 | #ifndef MSVC 182 | // GCC and Clang can be used on big endian systems, MSVC can't. 183 | # if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ 184 | # define AVS_ENDIANNESS "little" 185 | # elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ 186 | # define AVS_ENDIANNESS "big" 187 | # else 188 | # define AVS_ENDIANNESS "middle" 189 | # endif 190 | #else 191 | #define AVS_ENDIANNESS "little" 192 | #endif 193 | 194 | #endif //AVS_CONFIG_H 195 | -------------------------------------------------------------------------------- /fft3dfilter/avs/cpuid.h: -------------------------------------------------------------------------------- 1 | // This program is free software; you can redistribute it and/or modify 2 | // it under the terms of the GNU General Public License as published by 3 | // the Free Software Foundation; either version 2 of the License, or 4 | // (at your option) any later version. 5 | // 6 | // This program is distributed in the hope that it will be useful, 7 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 8 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 9 | // GNU General Public License for more details. 10 | // 11 | // You should have received a copy of the GNU General Public License 12 | // along with this program; if not, write to the Free Software 13 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit 14 | // http://www.gnu.org/copyleft/gpl.html . 15 | // 16 | // Linking Avisynth statically or dynamically with other modules is making a 17 | // combined work based on Avisynth. Thus, the terms and conditions of the GNU 18 | // General Public License cover the whole combination. 19 | // 20 | // As a special exception, the copyright holders of Avisynth give you 21 | // permission to link Avisynth with independent modules that communicate with 22 | // Avisynth solely through the interfaces defined in avisynth.h, regardless of the license 23 | // terms of these independent modules, and to copy and distribute the 24 | // resulting combined work under terms of your choice, provided that 25 | // every copy of the combined work is accompanied by a complete copy of 26 | // the source code of Avisynth (the version of Avisynth used to produce the 27 | // combined work), being distributed under the terms of the GNU General 28 | // Public License plus this exception. An independent module is a module 29 | // which is not derived from or based on Avisynth, such as 3rd-party filters, 30 | // import and export plugins, or graphical user interfaces. 31 | 32 | #ifndef AVSCORE_CPUID_H 33 | #define AVSCORE_CPUID_H 34 | 35 | // For GetCPUFlags. These are backwards-compatible with those in VirtualDub. 36 | // ending with SSE4_2 37 | // For emulation see https://software.intel.com/en-us/articles/intel-software-development-emulator 38 | enum { 39 | /* oldest CPU to support extension */ 40 | CPUF_FORCE = 0x01, // N/A 41 | CPUF_FPU = 0x02, // 386/486DX 42 | CPUF_MMX = 0x04, // P55C, K6, PII 43 | CPUF_INTEGER_SSE = 0x08, // PIII, Athlon 44 | CPUF_SSE = 0x10, // PIII, Athlon XP/MP 45 | CPUF_SSE2 = 0x20, // PIV, K8 46 | CPUF_3DNOW = 0x40, // K6-2 47 | CPUF_3DNOW_EXT = 0x80, // Athlon 48 | CPUF_X86_64 = 0xA0, // Hammer (note: equiv. to 3DNow + SSE2, which 49 | // only Hammer will have anyway) 50 | CPUF_SSE3 = 0x100, // PIV+, K8 Venice 51 | CPUF_SSSE3 = 0x200, // Core 2 52 | CPUF_SSE4 = 0x400, 53 | CPUF_SSE4_1 = 0x400, // Penryn, Wolfdale, Yorkfield 54 | CPUF_AVX = 0x800, // Sandy Bridge, Bulldozer 55 | CPUF_SSE4_2 = 0x1000, // Nehalem 56 | // AVS+ 57 | CPUF_AVX2 = 0x2000, // Haswell 58 | CPUF_FMA3 = 0x4000, 59 | CPUF_F16C = 0x8000, 60 | CPUF_MOVBE = 0x10000, // Big Endian move 61 | CPUF_POPCNT = 0x20000, 62 | CPUF_AES = 0x40000, 63 | CPUF_FMA4 = 0x80000, 64 | 65 | CPUF_AVX512F = 0x100000, // AVX-512 Foundation. 66 | CPUF_AVX512DQ = 0x200000, // AVX-512 DQ (Double/Quad granular) Instructions 67 | CPUF_AVX512PF = 0x400000, // AVX-512 Prefetch 68 | CPUF_AVX512ER = 0x800000, // AVX-512 Exponential and Reciprocal 69 | CPUF_AVX512CD = 0x1000000, // AVX-512 Conflict Detection 70 | CPUF_AVX512BW = 0x2000000, // AVX-512 BW (Byte/Word granular) Instructions 71 | CPUF_AVX512VL = 0x4000000, // AVX-512 VL (128/256 Vector Length) Extensions 72 | CPUF_AVX512IFMA = 0x8000000, // AVX-512 IFMA integer 52 bit 73 | CPUF_AVX512VBMI = 0x10000000,// AVX-512 VBMI 74 | }; 75 | 76 | #ifdef BUILDING_AVSCORE 77 | int GetCPUFlags(); 78 | #endif 79 | 80 | #endif // AVSCORE_CPUID_H 81 | -------------------------------------------------------------------------------- /fft3dfilter/avs/filesystem.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Snippet copied from filesystem/README.md 4 | 5 | #if defined(__cplusplus) && __cplusplus >= 201703L && defined(__has_include) 6 | #if __has_include() 7 | #define GHC_USE_STD_FS 8 | #include 9 | namespace fs = std::filesystem; 10 | #endif 11 | #endif 12 | #ifndef GHC_USE_STD_FS 13 | #include 14 | namespace fs = ghc::filesystem; 15 | #endif 16 | -------------------------------------------------------------------------------- /fft3dfilter/avs/minmax.h: -------------------------------------------------------------------------------- 1 | // This program is free software; you can redistribute it and/or modify 2 | // it under the terms of the GNU General Public License as published by 3 | // the Free Software Foundation; either version 2 of the License, or 4 | // (at your option) any later version. 5 | // 6 | // This program is distributed in the hope that it will be useful, 7 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 8 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 9 | // GNU General Public License for more details. 10 | // 11 | // You should have received a copy of the GNU General Public License 12 | // along with this program; if not, write to the Free Software 13 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit 14 | // http://www.gnu.org/copyleft/gpl.html . 15 | // 16 | // Linking Avisynth statically or dynamically with other modules is making a 17 | // combined work based on Avisynth. Thus, the terms and conditions of the GNU 18 | // General Public License cover the whole combination. 19 | // 20 | // As a special exception, the copyright holders of Avisynth give you 21 | // permission to link Avisynth with independent modules that communicate with 22 | // Avisynth solely through the interfaces defined in avisynth.h, regardless of the license 23 | // terms of these independent modules, and to copy and distribute the 24 | // resulting combined work under terms of your choice, provided that 25 | // every copy of the combined work is accompanied by a complete copy of 26 | // the source code of Avisynth (the version of Avisynth used to produce the 27 | // combined work), being distributed under the terms of the GNU General 28 | // Public License plus this exception. An independent module is a module 29 | // which is not derived from or based on Avisynth, such as 3rd-party filters, 30 | // import and export plugins, or graphical user interfaces. 31 | 32 | #ifndef AVSCORE_MINMAX_H 33 | #define AVSCORE_MINMAX_H 34 | 35 | template 36 | T min(T v1, T v2) 37 | { 38 | return v1 < v2 ? v1 : v2; 39 | } 40 | 41 | template 42 | T max(T v1, T v2) 43 | { 44 | return v1 > v2 ? v1 : v2; 45 | } 46 | 47 | template 48 | T clamp(T n, T min, T max) 49 | { 50 | n = n > max ? max : n; 51 | return n < min ? min : n; 52 | } 53 | 54 | #endif // AVSCORE_MINMAX_H 55 | -------------------------------------------------------------------------------- /fft3dfilter/avs/posix.h: -------------------------------------------------------------------------------- 1 | // This program is free software; you can redistribute it and/or modify 2 | // it under the terms of the GNU General Public License as published by 3 | // the Free Software Foundation; either version 2 of the License, or 4 | // (at your option) any later version. 5 | // 6 | // This program is distributed in the hope that it will be useful, 7 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 8 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 9 | // GNU General Public License for more details. 10 | // 11 | // You should have received a copy of the GNU General Public License 12 | // along with this program; if not, write to the Free Software 13 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit 14 | // http://www.gnu.org/copyleft/gpl.html . 15 | // 16 | // Linking Avisynth statically or dynamically with other modules is making a 17 | // combined work based on Avisynth. Thus, the terms and conditions of the GNU 18 | // General Public License cover the whole combination. 19 | // 20 | // As a special exception, the copyright holders of Avisynth give you 21 | // permission to link Avisynth with independent modules that communicate with 22 | // Avisynth solely through the interfaces defined in avisynth.h, regardless of the license 23 | // terms of these independent modules, and to copy and distribute the 24 | // resulting combined work under terms of your choice, provided that 25 | // every copy of the combined work is accompanied by a complete copy of 26 | // the source code of Avisynth (the version of Avisynth used to produce the 27 | // combined work), being distributed under the terms of the GNU General 28 | // Public License plus this exception. An independent module is a module 29 | // which is not derived from or based on Avisynth, such as 3rd-party filters, 30 | // import and export plugins, or graphical user interfaces. 31 | 32 | #ifdef AVS_POSIX 33 | #ifndef AVSCORE_POSIX_H 34 | #define AVSCORE_POSIX_H 35 | 36 | #ifdef __cplusplus 37 | #include 38 | #endif 39 | #include 40 | #include 41 | 42 | // Define these MSVC-extension used in Avisynth 43 | #define __single_inheritance 44 | 45 | // These things don't exist in Linux 46 | #if defined(AVS_HAIKU) 47 | #undef __declspec 48 | #endif 49 | #define __declspec(x) 50 | #define lstrlen strlen 51 | #define lstrcmp strcmp 52 | #define lstrcmpi strcasecmp 53 | #define _stricmp strcasecmp 54 | #define _strnicmp strncasecmp 55 | #define _strdup strdup 56 | #define SetCurrentDirectory(x) chdir(x) 57 | #define SetCurrentDirectoryW(x) chdir(x) 58 | #define GetCurrentDirectoryW(x) getcwd(x) 59 | #define _putenv putenv 60 | #define _alloca alloca 61 | 62 | // Borrowing some compatibility macros from AvxSynth, slightly modified 63 | #define UInt32x32To64(a, b) ((uint64_t)(((uint64_t)((uint32_t)(a))) * ((uint32_t)(b)))) 64 | #define Int64ShrlMod32(a, b) ((uint64_t)((uint64_t)(a) >> (b))) 65 | #define Int32x32To64(a, b) ((int64_t)(((int64_t)((long)(a))) * ((long)(b)))) 66 | 67 | #define InterlockedIncrement(x) __sync_add_and_fetch((x), 1) 68 | #define InterlockedDecrement(x) __sync_sub_and_fetch((x), 1) 69 | #define InterlockedExchangeAdd(x, v) __sync_add_and_fetch((x), (v)) 70 | 71 | #define MulDiv(nNumber, nNumerator, nDenominator) (int32_t) (((int64_t) (nNumber) * (int64_t) (nNumerator) + (int64_t) ((nDenominator)/2)) / (int64_t) (nDenominator)) 72 | 73 | #ifndef TRUE 74 | #define TRUE true 75 | #endif 76 | 77 | #ifndef FALSE 78 | #define FALSE false 79 | #endif 80 | 81 | #define S_FALSE (0x00000001) 82 | #define E_FAIL (0x80004005) 83 | #define FAILED(hr) ((hr) & 0x80000000) 84 | #define SUCCEEDED(hr) (!FAILED(hr)) 85 | 86 | // Statuses copied from comments in exception.cpp 87 | #define STATUS_GUARD_PAGE_VIOLATION 0x80000001 88 | #define STATUS_DATATYPE_MISALIGNMENT 0x80000002 89 | #define STATUS_BREAKPOINT 0x80000003 90 | #define STATUS_SINGLE_STEP 0x80000004 91 | #define STATUS_ACCESS_VIOLATION 0xc0000005 92 | #define STATUS_IN_PAGE_ERROR 0xc0000006 93 | #define STATUS_INVALID_HANDLE 0xc0000008 94 | #define STATUS_NO_MEMORY 0xc0000017 95 | #define STATUS_ILLEGAL_INSTRUCTION 0xc000001d 96 | #define STATUS_NONCONTINUABLE_EXCEPTION 0xc0000025 97 | #define STATUS_INVALID_DISPOSITION 0xc0000026 98 | #define STATUS_ARRAY_BOUNDS_EXCEEDED 0xc000008c 99 | #define STATUS_FLOAT_DENORMAL_OPERAND 0xc000008d 100 | #define STATUS_FLOAT_DIVIDE_BY_ZERO 0xc000008e 101 | #define STATUS_FLOAT_INEXACT_RESULT 0xc000008f 102 | #define STATUS_FLOAT_INVALID_OPERATION 0xc0000090 103 | #define STATUS_FLOAT_OVERFLOW 0xc0000091 104 | #define STATUS_FLOAT_STACK_CHECK 0xc0000092 105 | #define STATUS_FLOAT_UNDERFLOW 0xc0000093 106 | #define STATUS_INTEGER_DIVIDE_BY_ZERO 0xc0000094 107 | #define STATUS_INTEGER_OVERFLOW 0xc0000095 108 | #define STATUS_PRIVILEGED_INSTRUCTION 0xc0000096 109 | #define STATUS_STACK_OVERFLOW 0xc00000fd 110 | 111 | // Calling convension 112 | #ifndef AVS_HAIKU 113 | #define __stdcall 114 | #define __cdecl 115 | #endif 116 | 117 | // PowerPC OS X is really niche these days, but this painless equivocation 118 | // of the function/macro names used in posix_get_available_memory() 119 | // is all it takes to let it work. The G5 was 64-bit, and if 10.5 Leopard 120 | // can run in native 64-bit, it probably uses the names in that block as-is. 121 | #ifdef AVS_MACOS 122 | #ifdef PPC32 123 | #define vm_statistics64_data_t vm_statistics_data_t 124 | #define HOST_VM_INFO64_COUNT HOST_VM_INFO_COUNT 125 | #define HOST_VM_INFO64 HOST_VM_INFO 126 | #define host_statistics64 host_statistics 127 | #endif // PPC32 128 | #endif // AVS_MACOS 129 | 130 | #endif // AVSCORE_POSIX_H 131 | #endif // AVS_POSIX 132 | -------------------------------------------------------------------------------- /fft3dfilter/avs/types.h: -------------------------------------------------------------------------------- 1 | // Avisynth C Interface Version 0.20 2 | // Copyright 2003 Kevin Atkinson 3 | 4 | // This program is free software; you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation; either version 2 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit 17 | // http://www.gnu.org/copyleft/gpl.html . 18 | // 19 | // As a special exception, I give you permission to link to the 20 | // Avisynth C interface with independent modules that communicate with 21 | // the Avisynth C interface solely through the interfaces defined in 22 | // avisynth_c.h, regardless of the license terms of these independent 23 | // modules, and to copy and distribute the resulting combined work 24 | // under terms of your choice, provided that every copy of the 25 | // combined work is accompanied by a complete copy of the source code 26 | // of the Avisynth C interface and Avisynth itself (with the version 27 | // used to produce the combined work), being distributed under the 28 | // terms of the GNU General Public License plus this exception. An 29 | // independent module is a module which is not derived from or based 30 | // on Avisynth C Interface, such as 3rd-party filters, import and 31 | // export plugins, or graphical user interfaces. 32 | 33 | #ifndef AVS_TYPES_H 34 | #define AVS_TYPES_H 35 | 36 | // Define all types necessary for interfacing with avisynth.dll 37 | #include 38 | #include 39 | #ifdef __cplusplus 40 | #include 41 | #include 42 | #else 43 | #include 44 | #include 45 | #endif 46 | 47 | // Raster types used by VirtualDub & Avisynth 48 | typedef uint32_t Pixel32; 49 | typedef uint8_t BYTE; 50 | 51 | // Audio Sample information 52 | typedef float SFLOAT; 53 | 54 | #endif //AVS_TYPES_H 55 | -------------------------------------------------------------------------------- /fft3dfilter/avs/win.h: -------------------------------------------------------------------------------- 1 | // This program is free software; you can redistribute it and/or modify 2 | // it under the terms of the GNU General Public License as published by 3 | // the Free Software Foundation; either version 2 of the License, or 4 | // (at your option) any later version. 5 | // 6 | // This program is distributed in the hope that it will be useful, 7 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 8 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 9 | // GNU General Public License for more details. 10 | // 11 | // You should have received a copy of the GNU General Public License 12 | // along with this program; if not, write to the Free Software 13 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit 14 | // http://www.gnu.org/copyleft/gpl.html . 15 | // 16 | // Linking Avisynth statically or dynamically with other modules is making a 17 | // combined work based on Avisynth. Thus, the terms and conditions of the GNU 18 | // General Public License cover the whole combination. 19 | // 20 | // As a special exception, the copyright holders of Avisynth give you 21 | // permission to link Avisynth with independent modules that communicate with 22 | // Avisynth solely through the interfaces defined in avisynth.h, regardless of the license 23 | // terms of these independent modules, and to copy and distribute the 24 | // resulting combined work under terms of your choice, provided that 25 | // every copy of the combined work is accompanied by a complete copy of 26 | // the source code of Avisynth (the version of Avisynth used to produce the 27 | // combined work), being distributed under the terms of the GNU General 28 | // Public License plus this exception. An independent module is a module 29 | // which is not derived from or based on Avisynth, such as 3rd-party filters, 30 | // import and export plugins, or graphical user interfaces. 31 | 32 | #ifndef AVSCORE_WIN_H 33 | #define AVSCORE_WIN_H 34 | 35 | // Whenever you need windows headers, start by including this file, then the rest. 36 | 37 | // WWUUT? We require XP now? 38 | #if !defined(NTDDI_VERSION) && !defined(_WIN32_WINNT) 39 | #define NTDDI_VERSION 0x05020000 40 | #define _WIN32_WINNT 0x0502 41 | #endif 42 | 43 | #define WIN32_LEAN_AND_MEAN 44 | #define STRICT 45 | #if !defined(NOMINMAX) 46 | #define NOMINMAX 47 | #endif 48 | 49 | #include 50 | 51 | // Provision for UTF-8 max 4 bytes per code point 52 | #define AVS_MAX_PATH MAX_PATH*4 53 | 54 | #endif // AVSCORE_WIN_H 55 | -------------------------------------------------------------------------------- /fft3dfilter/documentation/fft3dfilter-rus-outdated.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinterf/fft3dfilter/d142d3cea90205c57ae354bdf1bcf04bd3154a13/fft3dfilter/documentation/fft3dfilter-rus-outdated.html -------------------------------------------------------------------------------- /fft3dfilter/documentation/fft3dfilter.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinterf/fft3dfilter/d142d3cea90205c57ae354bdf1bcf04bd3154a13/fft3dfilter/documentation/fft3dfilter.html -------------------------------------------------------------------------------- /fft3dfilter/documentation/gpl-rus.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinterf/fft3dfilter/d142d3cea90205c57ae354bdf1bcf04bd3154a13/fft3dfilter/documentation/gpl-rus.txt -------------------------------------------------------------------------------- /fft3dfilter/documentation/gpl.txt: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc. 5 | 675 Mass Ave, Cambridge, MA 02139, USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Library General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | Appendix: How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | 294 | Copyright (C) 19yy 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License 307 | along with this program; if not, write to the Free Software 308 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) 19yy name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | , 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Library General 339 | Public License instead of this License. 340 | -------------------------------------------------------------------------------- /fft3dfilter/documentation/overlap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinterf/fft3dfilter/d142d3cea90205c57ae354bdf1bcf04bd3154a13/fft3dfilter/documentation/overlap.png -------------------------------------------------------------------------------- /fft3dfilter/fft3dfilter.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.14.36121.58 d17.14 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fft3dfilter", "fft3dfilter.vcxproj", "{BAD9A27D-66C5-43B6-B9FD-99036C6B2F77}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | ReleaseXP|x64 = ReleaseXP|x64 15 | ReleaseXP|x86 = ReleaseXP|x86 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {BAD9A27D-66C5-43B6-B9FD-99036C6B2F77}.Debug|x64.ActiveCfg = Debug|x64 19 | {BAD9A27D-66C5-43B6-B9FD-99036C6B2F77}.Debug|x64.Build.0 = Debug|x64 20 | {BAD9A27D-66C5-43B6-B9FD-99036C6B2F77}.Debug|x86.ActiveCfg = Debug|Win32 21 | {BAD9A27D-66C5-43B6-B9FD-99036C6B2F77}.Debug|x86.Build.0 = Debug|Win32 22 | {BAD9A27D-66C5-43B6-B9FD-99036C6B2F77}.Release|x64.ActiveCfg = Release|x64 23 | {BAD9A27D-66C5-43B6-B9FD-99036C6B2F77}.Release|x64.Build.0 = Release|x64 24 | {BAD9A27D-66C5-43B6-B9FD-99036C6B2F77}.Release|x86.ActiveCfg = Release|Win32 25 | {BAD9A27D-66C5-43B6-B9FD-99036C6B2F77}.Release|x86.Build.0 = Release|Win32 26 | {BAD9A27D-66C5-43B6-B9FD-99036C6B2F77}.ReleaseXP|x64.ActiveCfg = ReleaseXP|x64 27 | {BAD9A27D-66C5-43B6-B9FD-99036C6B2F77}.ReleaseXP|x64.Build.0 = ReleaseXP|x64 28 | {BAD9A27D-66C5-43B6-B9FD-99036C6B2F77}.ReleaseXP|x86.ActiveCfg = ReleaseXP|Win32 29 | {BAD9A27D-66C5-43B6-B9FD-99036C6B2F77}.ReleaseXP|x86.Build.0 = ReleaseXP|Win32 30 | EndGlobalSection 31 | GlobalSection(SolutionProperties) = preSolution 32 | HideSolutionNode = FALSE 33 | EndGlobalSection 34 | EndGlobal 35 | -------------------------------------------------------------------------------- /fft3dfilter/fft3dfilter.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | ReleaseXP 10 | Win32 11 | 12 | 13 | ReleaseXP 14 | x64 15 | 16 | 17 | Release 18 | Win32 19 | 20 | 21 | Debug 22 | x64 23 | 24 | 25 | Release 26 | x64 27 | 28 | 29 | 30 | {BAD9A27D-66C5-43B6-B9FD-99036C6B2F77} 31 | Win32Proj 32 | fft3dfilter 33 | 10.0 34 | 35 | 36 | 37 | DynamicLibrary 38 | true 39 | v143 40 | MultiByte 41 | 42 | 43 | DynamicLibrary 44 | false 45 | v143 46 | true 47 | MultiByte 48 | 49 | 50 | DynamicLibrary 51 | false 52 | v141_xp 53 | false 54 | MultiByte 55 | 56 | 57 | DynamicLibrary 58 | true 59 | v143 60 | MultiByte 61 | 62 | 63 | DynamicLibrary 64 | false 65 | v143 66 | true 67 | MultiByte 68 | 69 | 70 | DynamicLibrary 71 | false 72 | v141_xp 73 | false 74 | MultiByte 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | true 102 | $(SolutionDir)\Build\$(Platform)\$(Configuration)\ 103 | $(SolutionDir)\Build\$(Platform)\Temp\$(Configuration)\ 104 | 105 | 106 | true 107 | $(SolutionDir)\Build\$(Platform)\$(Configuration)\ 108 | $(SolutionDir)\Build\$(Platform)\Temp\$(Configuration)\ 109 | 110 | 111 | false 112 | $(SolutionDir)\Build\$(Platform)\$(Configuration)\ 113 | $(SolutionDir)\Build\$(Platform)\Temp\$(Configuration)\ 114 | 115 | 116 | false 117 | $(SolutionDir)\Build\$(Platform)\$(Configuration)\ 118 | $(SolutionDir)\Build\$(Platform)\Temp\$(Configuration)\ 119 | $(VC_ExecutablePath_x86);$(WindowsSdk_71A_ExecutablePath);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH); 120 | $(VC_LibraryPath_x86);$(WindowsSdk_71A_LibraryPath_x86); 121 | $(VC_IncludePath);$(WindowsSdk_71A_IncludePath); 122 | $(VC_IncludePath);$(WindowsSdk_71A_IncludePath);$(VC_ExecutablePath_x86);$(WindowsSdk_71A_ExecutablePath);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(MSBuild_ExecutablePath);$(VC_LibraryPath_x86);$(SystemRoot) 123 | false 124 | 125 | 126 | false 127 | $(SolutionDir)\Build\$(Platform)\$(Configuration)\ 128 | $(SolutionDir)\Build\$(Platform)\Temp\$(Configuration)\ 129 | 130 | 131 | false 132 | $(SolutionDir)\Build\$(Platform)\$(Configuration)\ 133 | $(SolutionDir)\Build\$(Platform)\Temp\$(Configuration)\ 134 | $(VC_ExecutablePath_x64);$(WindowsSdk_71A_ExecutablePath);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(FxCopDir);$(PATH); 135 | $(VC_LibraryPath_x64);$(WindowsSdk_71A_LibraryPath_x64); 136 | $(VC_IncludePath);$(WindowsSdk_71A_IncludePath); 137 | $(VC_IncludePath);$(WindowsSdk_71A_IncludePath);$(VC_ExecutablePath_x64);$(WindowsSdk_71A_ExecutablePath);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(FxCopDir);$(MSBuild_ExecutablePath);$(VC_LibraryPath_x64);$(SystemRoot) 138 | false 139 | 140 | 141 | 142 | 143 | 144 | Level3 145 | Disabled 146 | WIN32;_DEBUG;_WINDOWS;_USRDLL;FFT3DFILTER_EXPORTS;%(PreprocessorDefinitions) 147 | StreamingSIMDExtensions2 148 | /Zc:threadSafeInit- %(AdditionalOptions) 149 | .\ 150 | true 151 | stdcpp17 152 | 153 | 154 | Windows 155 | true 156 | 157 | 158 | 159 | 160 | 161 | 162 | Level3 163 | Disabled 164 | _DEBUG;_WINDOWS;_USRDLL;FFT3DFILTER_EXPORTS;%(PreprocessorDefinitions) 165 | /Zc:threadSafeInit- %(AdditionalOptions) 166 | .\ 167 | true 168 | stdcpp17 169 | 170 | 171 | Windows 172 | true 173 | 174 | 175 | 176 | 177 | Level3 178 | 179 | 180 | MaxSpeed 181 | true 182 | true 183 | WIN32;NDEBUG;_WINDOWS;_USRDLL;FFT3DFILTER_EXPORTS;%(PreprocessorDefinitions) 184 | StreamingSIMDExtensions2 185 | false 186 | AnySuitable 187 | Speed 188 | 189 | 190 | .\ 191 | true 192 | MultiThreadedDLL 193 | NoListing 194 | true 195 | stdcpp17 196 | 197 | 198 | Windows 199 | true 200 | true 201 | true 202 | 203 | 204 | 205 | 206 | Level3 207 | 208 | 209 | MaxSpeed 210 | true 211 | true 212 | WIN32;NDEBUG;_WINDOWS;_USRDLL;FFT3DFILTER_EXPORTS;%(PreprocessorDefinitions) 213 | StreamingSIMDExtensions 214 | false 215 | AnySuitable 216 | Speed 217 | /Zc:threadSafeInit- %(AdditionalOptions) 218 | .\ 219 | true 220 | MultiThreadedDLL 221 | NoListing 222 | false 223 | stdcpp17 224 | 225 | 226 | Windows 227 | true 228 | true 229 | true 230 | 231 | 232 | 233 | 234 | Level3 235 | 236 | 237 | MaxSpeed 238 | true 239 | true 240 | NDEBUG;_WINDOWS;_USRDLL;FFT3DFILTER_EXPORTS;%(PreprocessorDefinitions) 241 | false 242 | AnySuitable 243 | Speed 244 | 245 | 246 | .\ 247 | NoListing 248 | true 249 | stdcpp17 250 | 251 | 252 | Windows 253 | true 254 | true 255 | true 256 | 257 | 258 | 259 | 260 | Level3 261 | 262 | 263 | MaxSpeed 264 | true 265 | true 266 | _CRT_SECURE_NO_WARNINGS;NDEBUG;_WINDOWS;_USRDLL;FFT3DFILTER_EXPORTS;%(PreprocessorDefinitions) 267 | false 268 | AnySuitable 269 | Speed 270 | /Zc:threadSafeInit- %(AdditionalOptions) 271 | .\ 272 | NoListing 273 | false 274 | stdcpp17 275 | 276 | 277 | Windows 278 | true 279 | true 280 | true 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | -------------------------------------------------------------------------------- /fft3dfilter/fft3dfilter.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | Source Files 29 | 30 | 31 | 32 | 33 | Resource Files 34 | 35 | 36 | 37 | 38 | Header Files 39 | 40 | 41 | Header Files 42 | 43 | 44 | Header Files 45 | 46 | 47 | Header Files 48 | 49 | 50 | Header Files 51 | 52 | 53 | Header Files 54 | 55 | 56 | Header Files 57 | 58 | 59 | Header Files 60 | 61 | 62 | Header Files 63 | 64 | 65 | Header Files 66 | 67 | 68 | -------------------------------------------------------------------------------- /fft3dfilter/fftwlite.h: -------------------------------------------------------------------------------- 1 | // Lite version of fftw header 2 | // fftwf typedefs added in v.1.2 for delayed loading 3 | // additions, non-windows mix from neo_FFT3D 4 | // 5 | #ifndef __FFTWLITE_H__ 6 | #define __FFTWLITE_H__ 7 | 8 | #include 9 | 10 | #ifdef _WIN32 11 | #include 12 | typedef HMODULE lib_t; 13 | typedef FARPROC func_t; 14 | #else 15 | #include 16 | typedef void* lib_t; 17 | typedef void* func_t; 18 | #define __stdcall 19 | #endif 20 | 21 | typedef float fftwf_complex[2]; 22 | typedef struct fftwf_plan_s *fftwf_plan; 23 | typedef fftwf_complex* (*fftwf_malloc_proc)(size_t n); 24 | typedef void (*fftwf_free_proc) (void *ppp); 25 | typedef fftwf_plan (*fftwf_plan_dft_r2c_2d_proc) (int winy, int winx, float *realcorrel, fftwf_complex *correl, int flags); 26 | typedef fftwf_plan (*fftwf_plan_dft_c2r_2d_proc) (int winy, int winx, fftwf_complex *correl, float *realcorrel, int flags); 27 | typedef fftwf_plan(*fftwf_plan_many_dft_r2c_proc) (int rank, const int* n, int howmany, float* in, const int* inembed, int istride, int idist, fftwf_complex* out, const int* onembed, int ostride, int odist, unsigned flags); 28 | typedef fftwf_plan(*fftwf_plan_many_dft_c2r_proc) (int rank, const int* n, int howmany, fftwf_complex* out, const int* inembed, int istride, int idist, float* in, const int* onembed, int ostride, int odist, unsigned flags); 29 | typedef fftwf_plan(*fftwf_plan_r2r_2d_proc) (int nx, int ny, float* in, float* out, int kindx, int kindy, unsigned flags); 30 | typedef void (*fftwf_destroy_plan_proc) (fftwf_plan); 31 | typedef void (*fftwf_execute_dft_r2c_proc) (fftwf_plan, float *realdata, fftwf_complex *fftsrc); 32 | typedef void (*fftwf_execute_dft_c2r_proc) (fftwf_plan, fftwf_complex *fftsrc, float *realdata); 33 | typedef void(*fftwf_execute_r2r_proc) (const fftwf_plan plan, float* in, float* out); 34 | #define FFTW_MEASURE (0U) 35 | #define FFTW_ESTIMATE (1U << 6) 36 | #define FFTW_REDFT01 4 /* idct */ 37 | #define FFTW_REDFT10 5 /* dct */ 38 | typedef int (*fftwf_init_threads_proc) (); 39 | typedef void (*fftwf_plan_with_nthreads_proc)(int nthreads); 40 | 41 | #define LOAD_FFT_FUNC(name) do {name = reinterpret_cast((void*)fftw3_address(#name)); if (name == nullptr) throw "Library function is missing: " #name; } while(0) 42 | #define LOAD_FFT_FUNC_OPT(name) do {name = reinterpret_cast((void*)fftw3_address(#name)); } while(0) 43 | 44 | struct FFTFunctionPointers { 45 | bool preloaded{ false }; 46 | lib_t library{ nullptr }; 47 | 48 | fftwf_malloc_proc fftwf_malloc{ nullptr }; 49 | fftwf_free_proc fftwf_free{ nullptr }; 50 | fftwf_plan_many_dft_r2c_proc fftwf_plan_many_dft_r2c{ nullptr }; 51 | fftwf_plan_many_dft_c2r_proc fftwf_plan_many_dft_c2r{ nullptr }; 52 | fftwf_plan_r2r_2d_proc fftwf_plan_r2r_2d{ nullptr }; 53 | fftwf_destroy_plan_proc fftwf_destroy_plan{ nullptr }; 54 | fftwf_execute_dft_r2c_proc fftwf_execute_dft_r2c{ nullptr }; 55 | fftwf_execute_dft_c2r_proc fftwf_execute_dft_c2r{ nullptr }; 56 | fftwf_execute_r2r_proc fftwf_execute_r2r{ nullptr }; 57 | fftwf_init_threads_proc fftwf_init_threads{ nullptr }; 58 | fftwf_plan_with_nthreads_proc fftwf_plan_with_nthreads{ nullptr }; 59 | fftwf_plan_dft_r2c_2d_proc fftwf_plan_dft_r2c_2d{ nullptr }; 60 | fftwf_plan_dft_c2r_2d_proc fftwf_plan_dft_c2r_2d{ nullptr }; 61 | 62 | #ifdef _WIN32 63 | void fftw3_open() { 64 | library = LoadLibraryW(L"libfftw3f-3"); 65 | if (library == nullptr) 66 | library = LoadLibraryW(L"fftw3"); 67 | if (library == nullptr) 68 | throw std::runtime_error("libfftw3f-3.dll or fftw3.dll not found. Please put in PATH or use LoadDll() plugin"); 69 | } 70 | void fftw3_close() { FreeLibrary(library); library = nullptr; } 71 | func_t fftw3_address(LPCSTR func) { return GetProcAddress(library, func); } 72 | #else 73 | void fftw3_open() { 74 | library = dlopen("libfftw3f_threads.so.3", RTLD_NOW); 75 | if (library == nullptr) 76 | throw std::runtime_error("libfftw3f_threads.so.3 not found. Please install libfftw3-single3 (deb) or fftw-devel (rpm) package"); 77 | // sudo apt-get update 78 | // sudo apt-get install libfftw3-dev 79 | // sudo apt install libfftw3-3 80 | } 81 | void fftw3_close() { dlclose(library); library = nullptr; } 82 | func_t fftw3_address(const char* func) { return dlsym(library, func); } 83 | #endif 84 | void load() { 85 | library = nullptr; 86 | fftw3_open(); 87 | if (library != nullptr) { 88 | LOAD_FFT_FUNC(fftwf_malloc); 89 | LOAD_FFT_FUNC(fftwf_free); 90 | LOAD_FFT_FUNC(fftwf_plan_many_dft_r2c); 91 | LOAD_FFT_FUNC(fftwf_plan_many_dft_c2r); 92 | LOAD_FFT_FUNC(fftwf_plan_r2r_2d); 93 | LOAD_FFT_FUNC(fftwf_destroy_plan); 94 | LOAD_FFT_FUNC(fftwf_execute_dft_r2c); 95 | LOAD_FFT_FUNC(fftwf_execute_dft_c2r); 96 | LOAD_FFT_FUNC(fftwf_execute_r2r); 97 | LOAD_FFT_FUNC_OPT(fftwf_init_threads); 98 | LOAD_FFT_FUNC_OPT(fftwf_plan_with_nthreads); 99 | LOAD_FFT_FUNC_OPT(fftwf_plan_dft_r2c_2d); 100 | LOAD_FFT_FUNC_OPT(fftwf_plan_dft_c2r_2d); 101 | } 102 | } 103 | 104 | void freelib() { 105 | if (library != nullptr) { 106 | fftw3_close(); 107 | } 108 | } 109 | 110 | bool has_threading() { 111 | return library && fftwf_init_threads && fftwf_plan_with_nthreads; 112 | } 113 | }; 114 | 115 | #undef LOAD_FFT_FUNC 116 | #endif -------------------------------------------------------------------------------- /fft3dfilter/info.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This program is free software; you can redistribute it and/or modify 3 | it under the terms of the GNU General Public License as published by 4 | the Free Software Foundation. 5 | 6 | This program is distributed in the hope that it will be useful, 7 | but WITHOUT ANY WARRANTY; without even the implied warranty of 8 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 9 | GNU General Public License for more details. 10 | 11 | You should have received a copy of the GNU General Public License 12 | along with this program; if not, write to the Free Software 13 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 14 | 15 | The author can be contacted at: 16 | Donald Graft 17 | neuron2@attbi.com. 18 | */ 19 | 20 | 21 | #include "info.h" 22 | #include "avisynth.h" 23 | #include 24 | 25 | static unsigned short font[][20] = { 26 | //STARTCHAR space 27 | { 28 | 0x0000,0x0000,0x0000,0x0000, 29 | 0x0000,0x0000,0x0000,0x0000, 30 | 0x0000,0x0000,0x0000,0x0000, 31 | 0x0000,0x0000,0x0000,0x0000, 32 | 0x0000,0x0000,0x0000,0x0000, 33 | }, 34 | //STARTCHAR ! 35 | { 36 | 0x0000,0x0000,0x0c00,0x0c00, 37 | 0x0c00,0x0c00,0x0c00,0x0c00, 38 | 0x0c00,0x0c00,0x0c00,0x0c00, 39 | 0x0000,0x0c00,0x0c00,0x0000, 40 | 0x0000,0x0000,0x0000,0x0000, 41 | }, 42 | //STARTCHAR " 43 | { 44 | 0x0000,0x0000,0x3300,0x3300, 45 | 0x3300,0x1200,0x0000,0x0000, 46 | 0x0000,0x0000,0x0000,0x0000, 47 | 0x0000,0x0000,0x0000,0x0000, 48 | 0x0000,0x0000,0x0000,0x0000, 49 | }, 50 | //STARTCHAR # 51 | { 52 | 0x0000,0x0000,0x0000,0x0d80, 53 | 0x0d80,0x0d80,0x3fc0,0x1b00, 54 | 0x1b00,0x1b00,0x7f80,0x3600, 55 | 0x3600,0x3600,0x0000,0x0000, 56 | 0x0000,0x0000,0x0000,0x0000, 57 | }, 58 | //STARTCHAR $ 59 | { 60 | 0x0000,0x0000,0x0c00,0x3f00, 61 | 0x6d80,0x6c00,0x6c00,0x6c00, 62 | 0x3f00,0x0d80,0x0d80,0x0d80, 63 | 0x6d80,0x3f00,0x0c00,0x0000, 64 | 0x0000,0x0000,0x0000,0x0000, 65 | }, 66 | //STARTCHAR % 67 | { 68 | 0x0000,0x0000,0x0000,0x3980, 69 | 0x6d80,0x6f00,0x3b00,0x0600, 70 | 0x0600,0x0c00,0x0c00,0x1b80, 71 | 0x1ec0,0x36c0,0x3380,0x0000, 72 | 0x0000,0x0000,0x0000,0x0000, 73 | }, 74 | //STARTCHAR & 75 | { 76 | 0x0000,0x0000,0x1c00,0x3600, 77 | 0x3600,0x3600,0x3c00,0x1800, 78 | 0x3800,0x6c00,0x66c0,0x6380, 79 | 0x6300,0x7780,0x3cc0,0x0000, 80 | 0x0000,0x0000,0x0000,0x0000, 81 | }, 82 | //STARTCHAR ' 83 | { 84 | 0x0000,0x0000,0x0f00,0x0e00, 85 | 0x1800,0x0000,0x0000,0x0000, 86 | 0x0000,0x0000,0x0000,0x0000, 87 | 0x0000,0x0000,0x0000,0x0000, 88 | 0x0000,0x0000,0x0000,0x0000, 89 | }, 90 | //STARTCHAR ( 91 | { 92 | 0x0000,0x0000,0x0300,0x0600, 93 | 0x0c00,0x0c00,0x1800,0x1800, 94 | 0x1800,0x1800,0x1800,0x0c00, 95 | 0x0c00,0x0600,0x0300,0x0000, 96 | 0x0000,0x0000,0x0000,0x0000, 97 | }, 98 | //STARTCHAR ) 99 | { 100 | 0x0000,0x0000,0x3000,0x1800, 101 | 0x0c00,0x0c00,0x0600,0x0600, 102 | 0x0600,0x0600,0x0600,0x0c00, 103 | 0x0c00,0x1800,0x3000,0x0000, 104 | 0x0000,0x0000,0x0000,0x0000, 105 | }, 106 | //STARTCHAR * 107 | { 108 | 0x0000,0x0000,0x0000,0x0000, 109 | 0x0000,0x3300,0x3300,0x1e00, 110 | 0x7f80,0x1e00,0x3300,0x3300, 111 | 0x0000,0x0000,0x0000,0x0000, 112 | 0x0000,0x0000,0x0000,0x0000, 113 | }, 114 | //STARTCHAR + 115 | { 116 | 0x0000,0x0000,0x0000,0x0000, 117 | 0x0000,0x0c00,0x0c00,0x0c00, 118 | 0x7f80,0x0c00,0x0c00,0x0c00, 119 | 0x0000,0x0000,0x0000,0x0000, 120 | 0x0000,0x0000,0x0000,0x0000, 121 | }, 122 | //STARTCHAR , 123 | { 124 | 0x0000,0x0000,0x0000,0x0000, 125 | 0x0000,0x0000,0x0000,0x0000, 126 | 0x0000,0x0000,0x0000,0x0000, 127 | 0x0000,0x0e00,0x0e00,0x1800, 128 | 0x0000,0x0000,0x0000,0x0000, 129 | }, 130 | //STARTCHAR - 131 | { 132 | 0x0000,0x0000,0x0000,0x0000, 133 | 0x0000,0x0000,0x0000,0x0000, 134 | 0x7f80,0x0000,0x0000,0x0000, 135 | 0x0000,0x0000,0x0000,0x0000, 136 | 0x0000,0x0000,0x0000,0x0000, 137 | }, 138 | //STARTCHAR . 139 | { 140 | 0x0000,0x0000,0x0000,0x0000, 141 | 0x0000,0x0000,0x0000,0x0000, 142 | 0x0000,0x0000,0x0000,0x0000, 143 | 0x0e00,0x0e00,0x0e00,0x0000, 144 | 0x0000,0x0000,0x0000,0x0000, 145 | }, 146 | //STARTCHAR / 147 | { 148 | 0x0000,0x0000,0x0000,0x0180, 149 | 0x0180,0x0300,0x0300,0x0600, 150 | 0x0600,0x0c00,0x0c00,0x1800, 151 | 0x1800,0x3000,0x3000,0x0000, 152 | 0x0000,0x0000,0x0000,0x0000, 153 | }, 154 | //STARTCHAR 0 155 | { 156 | 0x0000,0x0000,0x0c00,0x1e00, 157 | 0x3300,0x3300,0x6180,0x6180, 158 | 0x6180,0x6180,0x6180,0x3300, 159 | 0x3300,0x1e00,0x0c00,0x0000, 160 | 0x0000,0x0000,0x0000,0x0000, 161 | }, 162 | //STARTCHAR 1 163 | { 164 | 0x0000,0x0000,0x0c00,0x1c00, 165 | 0x3c00,0x6c00,0x0c00,0x0c00, 166 | 0x0c00,0x0c00,0x0c00,0x0c00, 167 | 0x0c00,0x0c00,0x7f80,0x0000, 168 | 0x0000,0x0000,0x0000,0x0000, 169 | }, 170 | //STARTCHAR 2 171 | { 172 | 0x0000,0x0000,0x1e00,0x3300, 173 | 0x6180,0x6180,0x0180,0x0180, 174 | 0x0300,0x0e00,0x1800,0x3000, 175 | 0x6000,0x6000,0x7f80,0x0000, 176 | 0x0000,0x0000,0x0000,0x0000, 177 | }, 178 | //STARTCHAR 3 179 | { 180 | 0x0000,0x0000,0x1e00,0x3300, 181 | 0x6180,0x6180,0x0180,0x0300, 182 | 0x0e00,0x0300,0x0180,0x6180, 183 | 0x6180,0x3300,0x1e00,0x0000, 184 | 0x0000,0x0000,0x0000,0x0000, 185 | }, 186 | //STARTCHAR 4 187 | { 188 | 0x0000,0x0000,0x0100,0x0300, 189 | 0x0700,0x0f00,0x1b00,0x3300, 190 | 0x6300,0x6300,0x7f80,0x0300, 191 | 0x0300,0x0300,0x0300,0x0000, 192 | 0x0000,0x0000,0x0000,0x0000, 193 | }, 194 | //STARTCHAR 5 195 | { 196 | 0x0000,0x0000,0x7f80,0x6000, 197 | 0x6000,0x6000,0x6000,0x6e00, 198 | 0x7300,0x0180,0x0180,0x0180, 199 | 0x6180,0x3300,0x1e00,0x0000, 200 | 0x0000,0x0000,0x0000,0x0000, 201 | }, 202 | //STARTCHAR 6 203 | { 204 | 0x0000,0x0000,0x1e00,0x3300, 205 | 0x6100,0x6000,0x6000,0x6e00, 206 | 0x7300,0x6180,0x6180,0x6180, 207 | 0x6180,0x3300,0x1e00,0x0000, 208 | 0x0000,0x0000,0x0000,0x0000, 209 | }, 210 | //STARTCHAR 7 211 | { 212 | 0x0000,0x0000,0x7f80,0x0180, 213 | 0x0180,0x0300,0x0300,0x0600, 214 | 0x0600,0x0c00,0x0c00,0x1800, 215 | 0x1800,0x3000,0x3000,0x0000, 216 | 0x0000,0x0000,0x0000,0x0000, 217 | }, 218 | //STARTCHAR 8 219 | { 220 | 0x0000,0x0000,0x1e00,0x3300, 221 | 0x6180,0x6180,0x6180,0x3300, 222 | 0x1e00,0x3300,0x6180,0x6180, 223 | 0x6180,0x3300,0x1e00,0x0000, 224 | 0x0000,0x0000,0x0000,0x0000, 225 | }, 226 | //STARTCHAR 9 227 | { 228 | 0x0000,0x0000,0x1e00,0x3300, 229 | 0x6180,0x6180,0x6180,0x6180, 230 | 0x3380,0x1d80,0x0180,0x0180, 231 | 0x2180,0x3300,0x1e00,0x0000, 232 | 0x0000,0x0000,0x0000,0x0000, 233 | }, 234 | //STARTCHAR : 235 | { 236 | 0x0000,0x0000,0x0000,0x0000, 237 | 0x0000,0x0e00,0x0e00,0x0000, 238 | 0x0000,0x0000,0x0000,0x0e00, 239 | 0x0e00,0x0000,0x0000,0x0000, 240 | 0x0000,0x0000,0x0000,0x0000, 241 | }, 242 | //STARTCHAR ; 243 | { 244 | 0x0000,0x0000,0x0000,0x0000, 245 | 0x0000,0x0e00,0x0e00,0x0000, 246 | 0x0000,0x0000,0x0000,0x0e00, 247 | 0x0e00,0x1c00,0x0000,0x0000, 248 | 0x0000,0x0000,0x0000,0x0000, 249 | }, 250 | //STARTCHAR < 251 | { 252 | 0x0000,0x0000,0x0100,0x0300, 253 | 0x0600,0x0c00,0x1800,0x3000, 254 | 0x6000,0x3000,0x1800,0x0c00, 255 | 0x0600,0x0300,0x0100,0x0000, 256 | 0x0000,0x0000,0x0000,0x0000, 257 | }, 258 | //STARTCHAR = 259 | { 260 | 0x0000,0x0000,0x0000,0x0000, 261 | 0x0000,0x0000,0x7f80,0x0000, 262 | 0x0000,0x0000,0x0000,0x7f80, 263 | 0x0000,0x0000,0x0000,0x0000, 264 | 0x0000,0x0000,0x0000,0x0000, 265 | }, 266 | //STARTCHAR > 267 | { 268 | 0x0000,0x0000,0x2000,0x3000, 269 | 0x1800,0x0c00,0x0600,0x0300, 270 | 0x0180,0x0300,0x0600,0x0c00, 271 | 0x1800,0x3000,0x2000,0x0000, 272 | 0x0000,0x0000,0x0000,0x0000, 273 | }, 274 | //STARTCHAR ? 275 | { 276 | 0x0000,0x0000,0x1e00,0x3300, 277 | 0x6180,0x6180,0x6180,0x0300, 278 | 0x0600,0x0c00,0x0c00,0x0c00, 279 | 0x0000,0x0c00,0x0c00,0x0000, 280 | 0x0000,0x0000,0x0000,0x0000, 281 | }, 282 | //STARTCHAR @ 283 | { 284 | 0x0000,0x0000,0x1e00,0x3300, 285 | 0x6180,0x6780,0x6f80,0x6d80, 286 | 0x6d80,0x6d80,0x6f00,0x6600, 287 | 0x6000,0x3180,0x1f00,0x0000, 288 | 0x0000,0x0000,0x0000,0x0000, 289 | }, 290 | //STARTCHAR A 291 | { 292 | 0x0000,0x0000,0x0c00,0x1e00, 293 | 0x3300,0x3300,0x6180,0x6180, 294 | 0x6180,0x7f80,0x6180,0x6180, 295 | 0x6180,0x6180,0x6180,0x0000, 296 | 0x0000,0x0000,0x0000,0x0000, 297 | }, 298 | //STARTCHAR B 299 | { 300 | 0x0000,0x0000,0x7c00,0x6600, 301 | 0x6300,0x6300,0x6300,0x6600, 302 | 0x7e00,0x6300,0x6180,0x6180, 303 | 0x6180,0x6300,0x7e00,0x0000, 304 | 0x0000,0x0000,0x0000,0x0000, 305 | }, 306 | //STARTCHAR C 307 | { 308 | 0x0000,0x0000,0x1e00,0x3300, 309 | 0x6180,0x6000,0x6000,0x6000, 310 | 0x6000,0x6000,0x6000,0x6000, 311 | 0x6180,0x3300,0x1e00,0x0000, 312 | 0x0000,0x0000,0x0000,0x0000, 313 | }, 314 | //STARTCHAR D 315 | { 316 | 0x0000,0x0000,0x7e00,0x6300, 317 | 0x6180,0x6180,0x6180,0x6180, 318 | 0x6180,0x6180,0x6180,0x6180, 319 | 0x6180,0x6300,0x7e00,0x0000, 320 | 0x0000,0x0000,0x0000,0x0000, 321 | }, 322 | //STARTCHAR E 323 | { 324 | 0x0000,0x0000,0x7f80,0x6000, 325 | 0x6000,0x6000,0x6000,0x6000, 326 | 0x7e00,0x6000,0x6000,0x6000, 327 | 0x6000,0x6000,0x7f80,0x0000, 328 | 0x0000,0x0000,0x0000,0x0000, 329 | }, 330 | //STARTCHAR F 331 | { 332 | 0x0000,0x0000,0x7f80,0x6000, 333 | 0x6000,0x6000,0x6000,0x6000, 334 | 0x7e00,0x6000,0x6000,0x6000, 335 | 0x6000,0x6000,0x6000,0x0000, 336 | 0x0000,0x0000,0x0000,0x0000, 337 | }, 338 | //STARTCHAR G 339 | { 340 | 0x0000,0x0000,0x1e00,0x3300, 341 | 0x6180,0x6000,0x6000,0x6000, 342 | 0x6780,0x6180,0x6180,0x6180, 343 | 0x6180,0x3380,0x1e80,0x0000, 344 | 0x0000,0x0000,0x0000,0x0000, 345 | }, 346 | //STARTCHAR H 347 | { 348 | 0x0000,0x0000,0x6180,0x6180, 349 | 0x6180,0x6180,0x6180,0x6180, 350 | 0x7f80,0x6180,0x6180,0x6180, 351 | 0x6180,0x6180,0x6180,0x0000, 352 | 0x0000,0x0000,0x0000,0x0000, 353 | }, 354 | //STARTCHAR I 355 | { 356 | 0x0000,0x0000,0x7f80,0x0c00, 357 | 0x0c00,0x0c00,0x0c00,0x0c00, 358 | 0x0c00,0x0c00,0x0c00,0x0c00, 359 | 0x0c00,0x0c00,0x7f80,0x0000, 360 | 0x0000,0x0000,0x0000,0x0000, 361 | }, 362 | //STARTCHAR J 363 | { 364 | 0x0000,0x0000,0x0f80,0x0180, 365 | 0x0180,0x0180,0x0180,0x0180, 366 | 0x0180,0x0180,0x0180,0x6180, 367 | 0x6180,0x3300,0x1e00,0x0000, 368 | 0x0000,0x0000,0x0000,0x0000, 369 | }, 370 | //STARTCHAR K 371 | { 372 | 0x0000,0x0000,0x6180,0x6180, 373 | 0x6300,0x6300,0x6600,0x6600, 374 | 0x7c00,0x6600,0x6600,0x6300, 375 | 0x6300,0x6180,0x6180,0x0000, 376 | 0x0000,0x0000,0x0000,0x0000, 377 | }, 378 | //STARTCHAR L 379 | { 380 | 0x0000,0x0000,0x6000,0x6000, 381 | 0x6000,0x6000,0x6000,0x6000, 382 | 0x6000,0x6000,0x6000,0x6000, 383 | 0x6000,0x6000,0x7f80,0x0000, 384 | 0x0000,0x0000,0x0000,0x0000, 385 | }, 386 | //STARTCHAR M 387 | { 388 | 0x0000,0x0000,0x6180,0x6180, 389 | 0x7380,0x7380,0x7f80,0x6d80, 390 | 0x6d80,0x6d80,0x6d80,0x6180, 391 | 0x6180,0x6180,0x6180,0x0000, 392 | 0x0000,0x0000,0x0000,0x0000, 393 | }, 394 | //STARTCHAR N 395 | { 396 | 0x0000,0x0000,0x6180,0x7180, 397 | 0x7180,0x7980,0x7980,0x6d80, 398 | 0x6d80,0x6780,0x6780,0x6380, 399 | 0x6380,0x6180,0x6180,0x0000, 400 | 0x0000,0x0000,0x0000,0x0000, 401 | }, 402 | //STARTCHAR O 403 | { 404 | 0x0000,0x0000,0x1e00,0x3300, 405 | 0x6180,0x6180,0x6180,0x6180, 406 | 0x6180,0x6180,0x6180,0x6180, 407 | 0x6180,0x3300,0x1e00,0x0000, 408 | 0x0000,0x0000,0x0000,0x0000, 409 | }, 410 | //STARTCHAR P 411 | { 412 | 0x0000,0x0000,0x7e00,0x6300, 413 | 0x6180,0x6180,0x6180,0x6180, 414 | 0x6300,0x7e00,0x6000,0x6000, 415 | 0x6000,0x6000,0x6000,0x0000, 416 | 0x0000,0x0000,0x0000,0x0000, 417 | }, 418 | //STARTCHAR Q 419 | { 420 | 0x0000,0x0000,0x1e00,0x3300, 421 | 0x6180,0x6180,0x6180,0x6180, 422 | 0x6180,0x6180,0x6180,0x6d80, 423 | 0x6780,0x3300,0x1f00,0x0180, 424 | 0x0000,0x0000,0x0000,0x0000, 425 | }, 426 | //STARTCHAR R 427 | { 428 | 0x0000,0x0000,0x7e00,0x6300, 429 | 0x6180,0x6180,0x6180,0x6180, 430 | 0x6300,0x7e00,0x6600,0x6300, 431 | 0x6300,0x6180,0x6180,0x0000, 432 | 0x0000,0x0000,0x0000,0x0000, 433 | }, 434 | //STARTCHAR S 435 | { 436 | 0x0000,0x0000,0x1e00,0x3300, 437 | 0x6180,0x6000,0x6000,0x3000, 438 | 0x1e00,0x0300,0x0180,0x0180, 439 | 0x6180,0x3300,0x1e00,0x0000, 440 | 0x0000,0x0000,0x0000,0x0000, 441 | }, 442 | //STARTCHAR T 443 | { 444 | 0x0000,0x0000,0x7f80,0x0c00, 445 | 0x0c00,0x0c00,0x0c00,0x0c00, 446 | 0x0c00,0x0c00,0x0c00,0x0c00, 447 | 0x0c00,0x0c00,0x0c00,0x0000, 448 | 0x0000,0x0000,0x0000,0x0000, 449 | }, 450 | //STARTCHAR U 451 | { 452 | 0x0000,0x0000,0x6180,0x6180, 453 | 0x6180,0x6180,0x6180,0x6180, 454 | 0x6180,0x6180,0x6180,0x6180, 455 | 0x6180,0x3300,0x1e00,0x0000, 456 | 0x0000,0x0000,0x0000,0x0000, 457 | }, 458 | //STARTCHAR V 459 | { 460 | 0x0000,0x0000,0x6180,0x6180, 461 | 0x6180,0x6180,0x3300,0x3300, 462 | 0x3300,0x1e00,0x1e00,0x1e00, 463 | 0x0c00,0x0c00,0x0c00,0x0000, 464 | 0x0000,0x0000,0x0000,0x0000, 465 | }, 466 | //STARTCHAR W 467 | { 468 | 0x0000,0x0000,0x6180,0x6180, 469 | 0x6180,0x6180,0x6180,0x6d80, 470 | 0x6d80,0x6d80,0x6d80,0x7380, 471 | 0x7380,0x6180,0x6180,0x0000, 472 | 0x0000,0x0000,0x0000,0x0000, 473 | }, 474 | //STARTCHAR X 475 | { 476 | 0x0000,0x0000,0x6180,0x6180, 477 | 0x3300,0x3300,0x1e00,0x1e00, 478 | 0x0c00,0x1e00,0x1e00,0x3300, 479 | 0x3300,0x6180,0x6180,0x0000, 480 | 0x0000,0x0000,0x0000,0x0000, 481 | }, 482 | //STARTCHAR Y 483 | { 484 | 0x0000,0x0000,0x6180,0x6180, 485 | 0x3300,0x3300,0x1e00,0x1e00, 486 | 0x0c00,0x0c00,0x0c00,0x0c00, 487 | 0x0c00,0x0c00,0x0c00,0x0000, 488 | 0x0000,0x0000,0x0000,0x0000, 489 | }, 490 | //STARTCHAR Z 491 | { 492 | 0x0000,0x0000,0x7f80,0x0180, 493 | 0x0180,0x0300,0x0600,0x0600, 494 | 0x0c00,0x1800,0x1800,0x3000, 495 | 0x6000,0x6000,0x7f80,0x0000, 496 | 0x0000,0x0000,0x0000,0x0000, 497 | }, 498 | //STARTCHAR [ 499 | { 500 | 0x0000,0x0000,0x3f00,0x3000, 501 | 0x3000,0x3000,0x3000,0x3000, 502 | 0x3000,0x3000,0x3000,0x3000, 503 | 0x3000,0x3000,0x3f00,0x0000, 504 | 0x0000,0x0000,0x0000,0x0000, 505 | }, 506 | //STARTCHAR 507 | { 508 | 0x0000,0x0000,0x0000,0x3000, 509 | 0x3000,0x1800,0x1800,0x0c00, 510 | 0x0c00,0x0600,0x0600,0x0300, 511 | 0x0300,0x0180,0x0180,0x0000, 512 | 0x0000,0x0000,0x0000,0x0000, 513 | }, 514 | //STARTCHAR ] 515 | { 516 | 0x0000,0x0000,0x3f00,0x0300, 517 | 0x0300,0x0300,0x0300,0x0300, 518 | 0x0300,0x0300,0x0300,0x0300, 519 | 0x0300,0x0300,0x3f00,0x0000, 520 | 0x0000,0x0000,0x0000,0x0000, 521 | }, 522 | //STARTCHAR ^ 523 | { 524 | 0x0000,0x0000,0x0c00,0x1e00, 525 | 0x3300,0x6180,0x0000,0x0000, 526 | 0x0000,0x0000,0x0000,0x0000, 527 | 0x0000,0x0000,0x0000,0x0000, 528 | 0x0000,0x0000,0x0000,0x0000, 529 | }, 530 | //STARTCHAR _ 531 | { 532 | 0x0000,0x0000,0x0000,0x0000, 533 | 0x0000,0x0000,0x0000,0x0000, 534 | 0x0000,0x0000,0x0000,0x0000, 535 | 0x0000,0x0000,0x0000,0x7fc0, 536 | 0x0000,0x0000,0x0000,0x0000, 537 | }, 538 | //STARTCHAR ` 539 | { 540 | 0x0000,0x0000,0x3c00,0x1c00, 541 | 0x0600,0x0000,0x0000,0x0000, 542 | 0x0000,0x0000,0x0000,0x0000, 543 | 0x0000,0x0000,0x0000,0x0000, 544 | 0x0000,0x0000,0x0000,0x0000, 545 | }, 546 | //STARTCHAR a 547 | { 548 | 0x0000,0x0000,0x0000,0x0000, 549 | 0x0000,0x0000,0x0000,0x1f00, 550 | 0x3180,0x0180,0x3f80,0x6180, 551 | 0x6180,0x6180,0x3e80,0x0000, 552 | 0x0000,0x0000,0x0000,0x0000, 553 | }, 554 | //STARTCHAR b 555 | { 556 | 0x0000,0x0000,0x6000,0x6000, 557 | 0x6000,0x6000,0x6000,0x6e00, 558 | 0x7300,0x6180,0x6180,0x6180, 559 | 0x6180,0x7300,0x6e00,0x0000, 560 | 0x0000,0x0000,0x0000,0x0000, 561 | }, 562 | //STARTCHAR c 563 | { 564 | 0x0000,0x0000,0x0000,0x0000, 565 | 0x0000,0x0000,0x0000,0x1f00, 566 | 0x3180,0x6000,0x6000,0x6000, 567 | 0x6000,0x3180,0x1f00,0x0000, 568 | 0x0000,0x0000,0x0000,0x0000, 569 | }, 570 | //STARTCHAR d 571 | { 572 | 0x0000,0x0000,0x0180,0x0180, 573 | 0x0180,0x0180,0x0180,0x1d80, 574 | 0x3380,0x6180,0x6180,0x6180, 575 | 0x6180,0x3380,0x1d80,0x0000, 576 | 0x0000,0x0000,0x0000,0x0000, 577 | }, 578 | //STARTCHAR e 579 | { 580 | 0x0000,0x0000,0x0000,0x0000, 581 | 0x0000,0x0000,0x0000,0x1e00, 582 | 0x3300,0x6180,0x7f80,0x6000, 583 | 0x6000,0x3180,0x1f00,0x0000, 584 | 0x0000,0x0000,0x0000,0x0000, 585 | }, 586 | //STARTCHAR f 587 | { 588 | 0x0000,0x0000,0x0f00,0x1980, 589 | 0x1980,0x1800,0x1800,0x1800, 590 | 0x1800,0x7e00,0x1800,0x1800, 591 | 0x1800,0x1800,0x1800,0x0000, 592 | 0x0000,0x0000,0x0000,0x0000, 593 | }, 594 | //STARTCHAR g 595 | { 596 | 0x0000,0x0000,0x0000,0x0000, 597 | 0x0000,0x0000,0x0000,0x3e80, 598 | 0x6380,0x6300,0x6300,0x6300, 599 | 0x3e00,0x6000,0x3f00,0x6180, 600 | 0x6180,0x6180,0x3f00,0x0000, 601 | }, 602 | //STARTCHAR h 603 | { 604 | 0x0000,0x0000,0x6000,0x6000, 605 | 0x6000,0x6000,0x6000,0x6e00, 606 | 0x7300,0x6180,0x6180,0x6180, 607 | 0x6180,0x6180,0x6180,0x0000, 608 | 0x0000,0x0000,0x0000,0x0000, 609 | }, 610 | //STARTCHAR i 611 | { 612 | 0x0000,0x0000,0x0000,0x0000, 613 | 0x0c00,0x0c00,0x0000,0x3c00, 614 | 0x0c00,0x0c00,0x0c00,0x0c00, 615 | 0x0c00,0x0c00,0x7f80,0x0000, 616 | 0x0000,0x0000,0x0000,0x0000, 617 | }, 618 | //STARTCHAR j 619 | { 620 | 0x0000,0x0000,0x0000,0x0000, 621 | 0x0180,0x0180,0x0000,0x0780, 622 | 0x0180,0x0180,0x0180,0x0180, 623 | 0x0180,0x0180,0x0180,0x3180, 624 | 0x3180,0x3180,0x1f00,0x0000, 625 | }, 626 | //STARTCHAR k 627 | { 628 | 0x0000,0x0000,0x6000,0x6000, 629 | 0x6000,0x6000,0x6000,0x6300, 630 | 0x6600,0x6c00,0x7800,0x7c00, 631 | 0x6600,0x6300,0x6180,0x0000, 632 | 0x0000,0x0000,0x0000,0x0000, 633 | }, 634 | //STARTCHAR l 635 | { 636 | 0x0000,0x0000,0x3c00,0x0c00, 637 | 0x0c00,0x0c00,0x0c00,0x0c00, 638 | 0x0c00,0x0c00,0x0c00,0x0c00, 639 | 0x0c00,0x0c00,0x7f80,0x0000, 640 | 0x0000,0x0000,0x0000,0x0000, 641 | }, 642 | //STARTCHAR m 643 | { 644 | 0x0000,0x0000,0x0000,0x0000, 645 | 0x0000,0x0000,0x0000,0x5b00, 646 | 0x7f80,0x6d80,0x6d80,0x6d80, 647 | 0x6d80,0x6d80,0x6d80,0x0000, 648 | 0x0000,0x0000,0x0000,0x0000, 649 | }, 650 | //STARTCHAR n 651 | { 652 | 0x0000,0x0000,0x0000,0x0000, 653 | 0x0000,0x0000,0x0000,0x6e00, 654 | 0x7300,0x6180,0x6180,0x6180, 655 | 0x6180,0x6180,0x6180,0x0000, 656 | 0x0000,0x0000,0x0000,0x0000, 657 | }, 658 | //STARTCHAR o 659 | { 660 | 0x0000,0x0000,0x0000,0x0000, 661 | 0x0000,0x0000,0x0000,0x1e00, 662 | 0x3300,0x6180,0x6180,0x6180, 663 | 0x6180,0x3300,0x1e00,0x0000, 664 | 0x0000,0x0000,0x0000,0x0000, 665 | }, 666 | //STARTCHAR p 667 | { 668 | 0x0000,0x0000,0x0000,0x0000, 669 | 0x0000,0x0000,0x0000,0x6e00, 670 | 0x7300,0x6180,0x6180,0x6180, 671 | 0x6180,0x7300,0x6e00,0x6000, 672 | 0x6000,0x6000,0x6000,0x0000, 673 | }, 674 | //STARTCHAR q 675 | { 676 | 0x0000,0x0000,0x0000,0x0000, 677 | 0x0000,0x0000,0x0000,0x1d80, 678 | 0x3380,0x6180,0x6180,0x6180, 679 | 0x6180,0x3380,0x1d80,0x0180, 680 | 0x0180,0x0180,0x0180,0x0000, 681 | }, 682 | //STARTCHAR r 683 | { 684 | 0x0000,0x0000,0x0000,0x0000, 685 | 0x0000,0x0000,0x0000,0x6f00, 686 | 0x3980,0x3000,0x3000,0x3000, 687 | 0x3000,0x3000,0x3000,0x0000, 688 | 0x0000,0x0000,0x0000,0x0000, 689 | }, 690 | //STARTCHAR s 691 | { 692 | 0x0000,0x0000,0x0000,0x0000, 693 | 0x0000,0x0000,0x0000,0x3f00, 694 | 0x6180,0x6000,0x3f00,0x0180, 695 | 0x0180,0x6180,0x3f00,0x0000, 696 | 0x0000,0x0000,0x0000,0x0000, 697 | }, 698 | //STARTCHAR t 699 | { 700 | 0x0000,0x0000,0x0000,0x0000, 701 | 0x1800,0x1800,0x1800,0x7e00, 702 | 0x1800,0x1800,0x1800,0x1800, 703 | 0x1800,0x1980,0x0f00,0x0000, 704 | 0x0000,0x0000,0x0000,0x0000, 705 | }, 706 | //STARTCHAR u 707 | { 708 | 0x0000,0x0000,0x0000,0x0000, 709 | 0x0000,0x0000,0x0000,0x6180, 710 | 0x6180,0x6180,0x6180,0x6180, 711 | 0x6180,0x3380,0x1d80,0x0000, 712 | 0x0000,0x0000,0x0000,0x0000, 713 | }, 714 | //STARTCHAR v 715 | { 716 | 0x0000,0x0000,0x0000,0x0000, 717 | 0x0000,0x0000,0x0000,0x6180, 718 | 0x6180,0x3300,0x3300,0x1e00, 719 | 0x1e00,0x0c00,0x0c00,0x0000, 720 | 0x0000,0x0000,0x0000,0x0000, 721 | }, 722 | //STARTCHAR w 723 | { 724 | 0x0000,0x0000,0x0000,0x0000, 725 | 0x0000,0x0000,0x0000,0x6180, 726 | 0x6180,0x6180,0x6d80,0x6d80, 727 | 0x6d80,0x7f80,0x3300,0x0000, 728 | 0x0000,0x0000,0x0000,0x0000, 729 | }, 730 | //STARTCHAR x 731 | { 732 | 0x0000,0x0000,0x0000,0x0000, 733 | 0x0000,0x0000,0x0000,0x6180, 734 | 0x3300,0x1e00,0x0c00,0x0c00, 735 | 0x1e00,0x3300,0x6180,0x0000, 736 | 0x0000,0x0000,0x0000,0x0000, 737 | }, 738 | //STARTCHAR y 739 | { 740 | 0x0000,0x0000,0x0000,0x0000, 741 | 0x0000,0x0000,0x0000,0x6180, 742 | 0x6180,0x6180,0x6180,0x6180, 743 | 0x6180,0x3380,0x1d80,0x0180, 744 | 0x6180,0x3300,0x1e00,0x0000, 745 | }, 746 | //STARTCHAR z 747 | { 748 | 0x0000,0x0000,0x0000,0x0000, 749 | 0x0000,0x0000,0x0000,0x3f80, 750 | 0x0180,0x0300,0x0600,0x0c00, 751 | 0x1800,0x3000,0x3f80,0x0000, 752 | 0x0000,0x0000,0x0000,0x0000, 753 | }, 754 | //STARTCHAR { 755 | { 756 | 0x0000,0x0000,0x0780,0x0c00, 757 | 0x0c00,0x0c00,0x0c00,0x0c00, 758 | 0x7800,0x0c00,0x0c00,0x0c00, 759 | 0x0c00,0x0c00,0x0780,0x0000, 760 | 0x0000,0x0000,0x0000,0x0000, 761 | }, 762 | //STARTCHAR bar 763 | { 764 | 0x0000,0x0000,0x0c00,0x0c00, 765 | 0x0c00,0x0c00,0x0c00,0x0c00, 766 | 0x0c00,0x0c00,0x0c00,0x0c00, 767 | 0x0c00,0x0c00,0x0c00,0x0000, 768 | 0x0000,0x0000,0x0000,0x0000, 769 | }, 770 | //STARTCHAR } 771 | { 772 | 0x0000,0x0000,0x7800,0x0c00, 773 | 0x0c00,0x0c00,0x0c00,0x0c00, 774 | 0x0780,0x0c00,0x0c00,0x0c00, 775 | 0x0c00,0x0c00,0x7800,0x0000, 776 | 0x0000,0x0000,0x0000,0x0000, 777 | }, 778 | //STARTCHAR ~ 779 | { 780 | 0x0000,0x0000,0x3980,0x6d80, 781 | 0x6700,0x0000,0x0000,0x0000, 782 | 0x0000,0x0000,0x0000,0x0000, 783 | 0x0000,0x0000,0x0000,0x0000, 784 | 0x0000,0x0000,0x0000,0x0000, 785 | }, 786 | //STARTCHAR C177 787 | { 788 | 0x0000,0x0000,0x0000,0x0000, 789 | 0x0000,0x0000,0x0000,0x0000, 790 | 0x0000,0x0000,0x0000,0x0000, 791 | 0x0000,0x0000,0x0000,0x0000, 792 | 0x0000,0x0000,0x0000,0x0000, 793 | }, 794 | //STARTCHAR C240 795 | { 796 | 0x0000,0x0000,0x0000,0x0000, 797 | 0x0000,0x0000,0x0000,0x0000, 798 | 0x0000,0x0000,0x0000,0x0000, 799 | 0x0000,0x0000,0x0000,0x0000, 800 | 0x0000,0x0000,0x0000,0x0000, 801 | }, 802 | //STARTCHAR exclamdown 803 | { 804 | 0x0000,0x0000,0x0c00,0x0c00, 805 | 0x0000,0x0c00,0x0c00,0x0c00, 806 | 0x0c00,0x0c00,0x0c00,0x0c00, 807 | 0x0c00,0x0c00,0x0c00,0x0000, 808 | 0x0000,0x0000,0x0000,0x0000, 809 | }, 810 | //STARTCHAR cent 811 | { 812 | 0x0000,0x0000,0x0000,0x0c00, 813 | 0x0c00,0x1e00,0x3300,0x6100, 814 | 0x6000,0x6000,0x6100,0x3300, 815 | 0x1e00,0x0c00,0x0c00,0x0000, 816 | 0x0000,0x0000,0x0000,0x0000, 817 | }, 818 | //STARTCHAR sterling 819 | { 820 | 0x0000,0x0000,0x0000,0x0f00, 821 | 0x1980,0x1980,0x1800,0x1800, 822 | 0x7e00,0x1800,0x1800,0x1800, 823 | 0x7c00,0x56c0,0x7380,0x0000, 824 | 0x0000,0x0000,0x0000,0x0000, 825 | }, 826 | //STARTCHAR currency 827 | { 828 | 0x0000,0x0000,0x0000,0x0000, 829 | 0x0000,0x4040,0x2e80,0x1f00, 830 | 0x3180,0x3180,0x3180,0x1f00, 831 | 0x2e80,0x4040,0x0000,0x0000, 832 | 0x0000,0x0000,0x0000,0x0000, 833 | }, 834 | //STARTCHAR yen 835 | { 836 | 0x0000,0x0000,0x0000,0x0000, 837 | 0x4080,0x6180,0x3300,0x1e00, 838 | 0x3f00,0x0c00,0x3f00,0x0c00, 839 | 0x0c00,0x0c00,0x0c00,0x0000, 840 | 0x0000,0x0000,0x0000,0x0000, 841 | }, 842 | //STARTCHAR brokenbar 843 | { 844 | 0x0000,0x0000,0x0c00,0x0c00, 845 | 0x0c00,0x0c00,0x0c00,0x0000, 846 | 0x0000,0x0000,0x0c00,0x0c00, 847 | 0x0c00,0x0c00,0x0c00,0x0000, 848 | 0x0000,0x0000,0x0000,0x0000, 849 | }, 850 | //STARTCHAR section 851 | { 852 | 0x0000,0x0000,0x3e00,0x6300, 853 | 0x6000,0x7000,0x7800,0x4c00, 854 | 0x6600,0x3300,0x1900,0x0f00, 855 | 0x0300,0x6300,0x3e00,0x0000, 856 | 0x0000,0x0000,0x0000,0x0000, 857 | }, 858 | //STARTCHAR dieresis 859 | { 860 | 0x0000,0x0000,0x3300,0x3300, 861 | 0x0000,0x0000,0x0000,0x0000, 862 | 0x0000,0x0000,0x0000,0x0000, 863 | 0x0000,0x0000,0x0000,0x0000, 864 | 0x0000,0x0000,0x0000,0x0000, 865 | }, 866 | //STARTCHAR copyright 867 | { 868 | 0x0000,0x0000,0x0000,0x0000, 869 | 0x1e00,0x3300,0x6180,0x5e80, 870 | 0x5280,0x5080,0x5280,0x5e80, 871 | 0x6180,0x3300,0x1e00,0x0000, 872 | 0x0000,0x0000,0x0000,0x0000, 873 | }, 874 | //STARTCHAR ordfeminine 875 | { 876 | 0x0000,0x0000,0x1f00,0x2180, 877 | 0x0180,0x3f80,0x6180,0x6180, 878 | 0x3e80,0x0000,0x7f80,0x0000, 879 | 0x0000,0x0000,0x0000,0x0000, 880 | 0x0000,0x0000,0x0000,0x0000, 881 | }, 882 | //STARTCHAR guillmotleft 883 | { 884 | 0x0000,0x0000,0x0000,0x0000, 885 | 0x0480,0x0d80,0x1b00,0x3600, 886 | 0x6c00,0xd800,0x6c00,0x3600, 887 | 0x1b00,0x0d80,0x0480,0x0000, 888 | 0x0000,0x0000,0x0000,0x0000, 889 | }, 890 | //STARTCHAR logicalnot 891 | { 892 | 0x0000,0x0000,0x0000,0x0000, 893 | 0x0000,0x0000,0x0000,0x7f80, 894 | 0x7f80,0x0180,0x0180,0x0000, 895 | 0x0000,0x0000,0x0000,0x0000, 896 | 0x0000,0x0000,0x0000,0x0000, 897 | }, 898 | //STARTCHAR hyphen 899 | { 900 | 0x0000,0x0000,0x0000,0x0000, 901 | 0x0000,0x0000,0x0000,0x3f00, 902 | 0x3f00,0x0000,0x0000,0x0000, 903 | 0x0000,0x0000,0x0000,0x0000, 904 | 0x0000,0x0000,0x0000,0x0000, 905 | }, 906 | //STARTCHAR registered 907 | { 908 | 0x0000,0x0000,0x0000,0x0000, 909 | 0x1e00,0x3300,0x6180,0x5e80, 910 | 0x5280,0x5e80,0x5480,0x5680, 911 | 0x6180,0x3300,0x1e00,0x0000, 912 | 0x0000,0x0000,0x0000,0x0000, 913 | }, 914 | //STARTCHAR macron 915 | { 916 | 0x0000,0x0000,0x0000,0x7f00, 917 | 0x7f00,0x0000,0x0000,0x0000, 918 | 0x0000,0x0000,0x0000,0x0000, 919 | 0x0000,0x0000,0x0000,0x0000, 920 | 0x0000,0x0000,0x0000,0x0000, 921 | }, 922 | //STARTCHAR degree 923 | { 924 | 0x0000,0x0000,0x0c00,0x1e00, 925 | 0x3300,0x3300,0x1e00,0x0c00, 926 | 0x0000,0x0000,0x0000,0x0000, 927 | 0x0000,0x0000,0x0000,0x0000, 928 | 0x0000,0x0000,0x0000,0x0000, 929 | }, 930 | //STARTCHAR plusminus 931 | { 932 | 0x0000,0x0000,0x0000,0x0000, 933 | 0x0c00,0x0c00,0x7f80,0x7f80, 934 | 0x0c00,0x0c00,0x0000,0x7f80, 935 | 0x7f80,0x0000,0x0000,0x0000, 936 | 0x0000,0x0000,0x0000,0x0000, 937 | }, 938 | //STARTCHAR twosuperior 939 | { 940 | 0x0000,0x0000,0x1c00,0x3600, 941 | 0x0600,0x0c00,0x1800,0x3000, 942 | 0x3e00,0x0000,0x0000,0x0000, 943 | 0x0000,0x0000,0x0000,0x0000, 944 | 0x0000,0x0000,0x0000,0x0000, 945 | }, 946 | //STARTCHAR threesuperior 947 | { 948 | 0x0000,0x0000,0x1c00,0x3600, 949 | 0x0200,0x0e00,0x0200,0x3600, 950 | 0x1c00,0x0000,0x0000,0x0000, 951 | 0x0000,0x0000,0x0000,0x0000, 952 | 0x0000,0x0000,0x0000,0x0000, 953 | }, 954 | //STARTCHAR acute 955 | { 956 | 0x0000,0x0000,0x0600,0x0c00, 957 | 0x1800,0x0000,0x0000,0x0000, 958 | 0x0000,0x0000,0x0000,0x0000, 959 | 0x0000,0x0000,0x0000,0x0000, 960 | 0x0000,0x0000,0x0000,0x0000, 961 | }, 962 | //STARTCHAR mu 963 | { 964 | 0x0000,0x0000,0x0000,0x0000, 965 | 0x0000,0x0000,0x0000,0x0000, 966 | 0x6300,0x6300,0x6300,0x6300, 967 | 0x6300,0x7700,0x7d00,0x6000, 968 | 0x6000,0x6000,0x0000,0x0000, 969 | }, 970 | //STARTCHAR paragraph 971 | { 972 | 0x0000,0x0000,0x1f80,0x3f80, 973 | 0x7d80,0x7d80,0x7d80,0x3d80, 974 | 0x1d80,0x0580,0x0580,0x0580, 975 | 0x0580,0x0580,0x0580,0x0000, 976 | 0x0000,0x0000,0x0000,0x0000, 977 | }, 978 | //STARTCHAR periodcentered 979 | { 980 | 0x0000,0x0000,0x0000,0x0000, 981 | 0x0000,0x0000,0x0000,0x0e00, 982 | 0x0e00,0x0e00,0x0000,0x0000, 983 | 0x0000,0x0000,0x0000,0x0000, 984 | 0x0000,0x0000,0x0000,0x0000, 985 | }, 986 | //STARTCHAR cedilla 987 | { 988 | 0x0000,0x0000,0x0000,0x0000, 989 | 0x0000,0x0000,0x0000,0x0000, 990 | 0x0000,0x0000,0x0000,0x0000, 991 | 0x0000,0x0000,0x0000,0x0c00, 992 | 0x0400,0x1200,0x0c00,0x0000, 993 | }, 994 | //STARTCHAR onesuperior 995 | { 996 | 0x0000,0x0000,0x1800,0x3800, 997 | 0x1800,0x1800,0x1800,0x3c00, 998 | 0x0000,0x0000,0x0000,0x0000, 999 | 0x0000,0x0000,0x0000,0x0000, 1000 | 0x0000,0x0000,0x0000,0x0000, 1001 | }, 1002 | //STARTCHAR ordmasculine 1003 | { 1004 | 0x0000,0x0000,0x1c00,0x3600, 1005 | 0x6300,0x6300,0x6300,0x3600, 1006 | 0x1c00,0x0000,0x7f00,0x0000, 1007 | 0x0000,0x0000,0x0000,0x0000, 1008 | 0x0000,0x0000,0x0000,0x0000, 1009 | }, 1010 | //STARTCHAR guillemotright 1011 | { 1012 | 0x0000,0x0000,0x0000,0x0000, 1013 | 0x4800,0x6c00,0x3600,0x1b00, 1014 | 0x0d80,0x06c0,0x0d80,0x1b00, 1015 | 0x3600,0x6c00,0x4800,0x0000, 1016 | 0x0000,0x0000,0x0000,0x0000, 1017 | }, 1018 | //STARTCHAR onequarter 1019 | { 1020 | 0x0000,0x0000,0x2000,0x6000, 1021 | 0x2080,0x2100,0x7200,0x0400, 1022 | 0x0900,0x1300,0x2500,0x4f00, 1023 | 0x0100,0x0100,0x0000,0x0000, 1024 | 0x0000,0x0000,0x0000,0x0000, 1025 | }, 1026 | //STARTCHAR onehalf 1027 | { 1028 | 0x0000,0x0000,0x2000,0x6000, 1029 | 0x2080,0x2100,0x7200,0x0400, 1030 | 0x0b00,0x1480,0x2080,0x4100, 1031 | 0x0200,0x0780,0x0000,0x0000, 1032 | 0x0000,0x0000,0x0000,0x0000, 1033 | }, 1034 | //STARTCHAR threequarters 1035 | { 1036 | 0x0000,0x0000,0x7000,0x0800, 1037 | 0x3080,0x0900,0x7200,0x0400, 1038 | 0x0900,0x1300,0x2500,0x4f80, 1039 | 0x0100,0x0100,0x0000,0x0000, 1040 | 0x0000,0x0000,0x0000,0x0000, 1041 | }, 1042 | //STARTCHAR questiondown 1043 | { 1044 | 0x0000,0x0000,0x0c00,0x0c00, 1045 | 0x0000,0x0c00,0x0c00,0x0c00, 1046 | 0x1800,0x3000,0x6180,0x6180, 1047 | 0x6180,0x3300,0x1e00,0x0000, 1048 | 0x0000,0x0000,0x0000,0x0000, 1049 | }, 1050 | //STARTCHAR Agrave 1051 | { 1052 | 0x0000,0x0000,0x3000,0x1800, 1053 | 0x0c00,0x0000,0x0c00,0x1e00, 1054 | 0x3300,0x6180,0x6180,0x7f80, 1055 | 0x6180,0x6180,0x6180,0x0000, 1056 | 0x0000,0x0000,0x0000,0x0000, 1057 | }, 1058 | //STARTCHAR Aacute 1059 | { 1060 | 0x0000,0x0000,0x0300,0x0600, 1061 | 0x0c00,0x0000,0x0c00,0x1e00, 1062 | 0x3300,0x6180,0x6180,0x7f80, 1063 | 0x6180,0x6180,0x6180,0x0000, 1064 | 0x0000,0x0000,0x0000,0x0000, 1065 | }, 1066 | //STARTCHAR Acircumflex 1067 | { 1068 | 0x0000,0x0000,0x0c00,0x1e00, 1069 | 0x3300,0x0000,0x0c00,0x1e00, 1070 | 0x3300,0x6180,0x6180,0x7f80, 1071 | 0x6180,0x6180,0x6180,0x0000, 1072 | 0x0000,0x0000,0x0000,0x0000, 1073 | }, 1074 | //STARTCHAR Atilde 1075 | { 1076 | 0x0000,0x0000,0x1900,0x3f00, 1077 | 0x2600,0x0000,0x0c00,0x1e00, 1078 | 0x3300,0x6180,0x6180,0x7f80, 1079 | 0x6180,0x6180,0x6180,0x0000, 1080 | 0x0000,0x0000,0x0000,0x0000, 1081 | }, 1082 | //STARTCHAR Adieresis 1083 | { 1084 | 0x0000,0x0000,0x3300,0x3300, 1085 | 0x0000,0x0000,0x0c00,0x1e00, 1086 | 0x3300,0x6180,0x6180,0x7f80, 1087 | 0x6180,0x6180,0x6180,0x0000, 1088 | 0x0000,0x0000,0x0000,0x0000, 1089 | }, 1090 | //STARTCHAR Aring 1091 | { 1092 | 0x0000,0x0000,0x0c00,0x1200, 1093 | 0x1200,0x0c00,0x0c00,0x1e00, 1094 | 0x3300,0x6180,0x6180,0x7f80, 1095 | 0x6180,0x6180,0x6180,0x0000, 1096 | 0x0000,0x0000,0x0000,0x0000, 1097 | }, 1098 | //STARTCHAR AE 1099 | { 1100 | 0x0000,0x0000,0x0f80,0x1e00, 1101 | 0x3600,0x3600,0x6600,0x6600, 1102 | 0x7f80,0x6600,0x6600,0x6600, 1103 | 0x6600,0x6600,0x6780,0x0000, 1104 | 0x0000,0x0000,0x0000,0x0000, 1105 | }, 1106 | //STARTCHAR Ccedilla 1107 | { 1108 | 0x0000,0x0000,0x1e00,0x3300, 1109 | 0x6180,0x6000,0x6000,0x6000, 1110 | 0x6000,0x6000,0x6000,0x6000, 1111 | 0x6180,0x3300,0x1e00,0x0c00, 1112 | 0x0400,0x1200,0x0c00,0x0000, 1113 | }, 1114 | //STARTCHAR Egrave 1115 | { 1116 | 0x0000,0x0000,0x3000,0x1800, 1117 | 0x0c00,0x0000,0x7f80,0x6000, 1118 | 0x6000,0x6000,0x7e00,0x6000, 1119 | 0x6000,0x6000,0x7f80,0x0000, 1120 | 0x0000,0x0000,0x0000,0x0000, 1121 | }, 1122 | //STARTCHAR Eacute 1123 | { 1124 | 0x0000,0x0000,0x0600,0x0c00, 1125 | 0x1800,0x0000,0x7f80,0x6000, 1126 | 0x6000,0x6000,0x7e00,0x6000, 1127 | 0x6000,0x6000,0x7f80,0x0000, 1128 | 0x0000,0x0000,0x0000,0x0000, 1129 | }, 1130 | //STARTCHAR Ecircumflex 1131 | { 1132 | 0x0000,0x0000,0x0c00,0x1e00, 1133 | 0x3300,0x0000,0x7f80,0x6000, 1134 | 0x6000,0x6000,0x7e00,0x6000, 1135 | 0x6000,0x6000,0x7f80,0x0000, 1136 | 0x0000,0x0000,0x0000,0x0000, 1137 | }, 1138 | //STARTCHAR Edieresis 1139 | { 1140 | 0x0000,0x0000,0x3300,0x3300, 1141 | 0x0000,0x0000,0x7f80,0x6000, 1142 | 0x6000,0x6000,0x7e00,0x6000, 1143 | 0x6000,0x6000,0x7f80,0x0000, 1144 | 0x0000,0x0000,0x0000,0x0000, 1145 | }, 1146 | //STARTCHAR Igrave 1147 | { 1148 | 0x0000,0x0000,0x3000,0x1800, 1149 | 0x0c00,0x0000,0x3f00,0x0c00, 1150 | 0x0c00,0x0c00,0x0c00,0x0c00, 1151 | 0x0c00,0x0c00,0x3f00,0x0000, 1152 | 0x0000,0x0000,0x0000,0x0000, 1153 | }, 1154 | //STARTCHAR Iacute 1155 | { 1156 | 0x0000,0x0000,0x0600,0x0c00, 1157 | 0x1800,0x0000,0x3f00,0x0c00, 1158 | 0x0c00,0x0c00,0x0c00,0x0c00, 1159 | 0x0c00,0x0c00,0x3f00,0x0000, 1160 | 0x0000,0x0000,0x0000,0x0000, 1161 | }, 1162 | //STARTCHAR Icircumflex 1163 | { 1164 | 0x0000,0x0000,0x0c00,0x1e00, 1165 | 0x3300,0x0000,0x3f00,0x0c00, 1166 | 0x0c00,0x0c00,0x0c00,0x0c00, 1167 | 0x0c00,0x0c00,0x3f00,0x0000, 1168 | 0x0000,0x0000,0x0000,0x0000, 1169 | }, 1170 | //STARTCHAR Idieresis 1171 | { 1172 | 0x0000,0x0000,0x3300,0x3300, 1173 | 0x0000,0x0000,0x3f00,0x0c00, 1174 | 0x0c00,0x0c00,0x0c00,0x0c00, 1175 | 0x0c00,0x0c00,0x3f00,0x0000, 1176 | 0x0000,0x0000,0x0000,0x0000, 1177 | }, 1178 | //STARTCHAR Eth 1179 | { 1180 | 0x0000,0x0000,0x7e00,0x6300, 1181 | 0x6180,0x6180,0x6180,0x6180, 1182 | 0xf980,0x6180,0x6180,0x6180, 1183 | 0x6180,0x6300,0x7e00,0x0000, 1184 | 0x0000,0x0000,0x0000,0x0000, 1185 | }, 1186 | //STARTCHAR Ntilde 1187 | { 1188 | 0x0000,0x0000,0x1900,0x3f00, 1189 | 0x2600,0x0000,0x4180,0x6180, 1190 | 0x7180,0x7980,0x7d80,0x6f80, 1191 | 0x6780,0x6380,0x6180,0x0000, 1192 | 0x0000,0x0000,0x0000,0x0000, 1193 | }, 1194 | //STARTCHAR Ograve 1195 | { 1196 | 0x0000,0x0000,0x3000,0x1800, 1197 | 0x0c00,0x0000,0x1e00,0x3300, 1198 | 0x6180,0x6180,0x6180,0x6180, 1199 | 0x6180,0x3300,0x1e00,0x0000, 1200 | 0x0000,0x0000,0x0000,0x0000, 1201 | }, 1202 | //STARTCHAR Oacute 1203 | { 1204 | 0x0000,0x0000,0x0300,0x0600, 1205 | 0x0c00,0x0000,0x1e00,0x3300, 1206 | 0x6180,0x6180,0x6180,0x6180, 1207 | 0x6180,0x3300,0x1e00,0x0000, 1208 | 0x0000,0x0000,0x0000,0x0000, 1209 | }, 1210 | //STARTCHAR Ocircumflex 1211 | { 1212 | 0x0000,0x0000,0x0c00,0x1e00, 1213 | 0x3300,0x0000,0x1e00,0x3300, 1214 | 0x6180,0x6180,0x6180,0x6180, 1215 | 0x6180,0x3300,0x1e00,0x0000, 1216 | 0x0000,0x0000,0x0000,0x0000, 1217 | }, 1218 | //STARTCHAR Otilde 1219 | { 1220 | 0x0000,0x0000,0x1900,0x3f00, 1221 | 0x2600,0x0000,0x1e00,0x3300, 1222 | 0x6180,0x6180,0x6180,0x6180, 1223 | 0x6180,0x3300,0x1e00,0x0000, 1224 | 0x0000,0x0000,0x0000,0x0000, 1225 | }, 1226 | //STARTCHAR Odieresis 1227 | { 1228 | 0x0000,0x0000,0x3300,0x3300, 1229 | 0x0000,0x0000,0x1e00,0x3300, 1230 | 0x6180,0x6180,0x6180,0x6180, 1231 | 0x6180,0x3300,0x1e00,0x0000, 1232 | 0x0000,0x0000,0x0000,0x0000, 1233 | }, 1234 | //STARTCHAR multiply 1235 | { 1236 | 0x0000,0x0000,0x0000,0x0000, 1237 | 0x0000,0x0000,0x0000,0x2080, 1238 | 0x3180,0x1b00,0x0e00,0x0e00, 1239 | 0x1b00,0x3180,0x2080,0x0000, 1240 | 0x0000,0x0000,0x0000,0x0000, 1241 | }, 1242 | //STARTCHAR Oslash 1243 | { 1244 | 0x0000,0x0080,0x1f00,0x3300, 1245 | 0x6380,0x6380,0x6580,0x6580, 1246 | 0x6580,0x6980,0x6980,0x6980, 1247 | 0x7180,0x3300,0x3e00,0x4000, 1248 | 0x0000,0x0000,0x0000,0x0000, 1249 | }, 1250 | //STARTCHAR Ugrave 1251 | { 1252 | 0x0000,0x0000,0x3000,0x1800, 1253 | 0x0c00,0x0000,0x6180,0x6180, 1254 | 0x6180,0x6180,0x6180,0x6180, 1255 | 0x6180,0x3300,0x1e00,0x0000, 1256 | 0x0000,0x0000,0x0000,0x0000, 1257 | }, 1258 | //STARTCHAR Uacute 1259 | { 1260 | 0x0000,0x0000,0x0300,0x0600, 1261 | 0x0c00,0x0000,0x6180,0x6180, 1262 | 0x6180,0x6180,0x6180,0x6180, 1263 | 0x6180,0x3300,0x1e00,0x0000, 1264 | 0x0000,0x0000,0x0000,0x0000, 1265 | }, 1266 | //STARTCHAR Ucircumflex 1267 | { 1268 | 0x0000,0x0000,0x0c00,0x1e00, 1269 | 0x3300,0x0000,0x6180,0x6180, 1270 | 0x6180,0x6180,0x6180,0x6180, 1271 | 0x6180,0x3380,0x1e00,0x0000, 1272 | 0x0000,0x0000,0x0000,0x0000, 1273 | }, 1274 | //STARTCHAR Udieresis 1275 | { 1276 | 0x0000,0x0000,0x3300,0x3300, 1277 | 0x0000,0x0000,0x6180,0x6180, 1278 | 0x6180,0x6180,0x6180,0x6180, 1279 | 0x6180,0x3300,0x1e00,0x0000, 1280 | 0x0000,0x0000,0x0000,0x0000, 1281 | }, 1282 | //STARTCHAR Yacute 1283 | { 1284 | 0x0000,0x0000,0x0300,0x0600, 1285 | 0x0c00,0x0000,0x4080,0x6180, 1286 | 0x3300,0x1e00,0x0c00,0x0c00, 1287 | 0x0c00,0x0c00,0x0c00,0x0000, 1288 | 0x0000,0x0000,0x0000,0x0000, 1289 | }, 1290 | //STARTCHAR Thorn 1291 | { 1292 | 0x0000,0x0000,0x0000,0x0000, 1293 | 0x3c00,0x1800,0x1f00,0x1980, 1294 | 0x1980,0x1980,0x1f00,0x1800, 1295 | 0x1800,0x1800,0x3c00,0x0000, 1296 | 0x0000,0x0000,0x0000,0x0000, 1297 | }, 1298 | //STARTCHAR germandbls 1299 | { 1300 | 0x0000,0x0000,0x0000,0x1c00, 1301 | 0x3e00,0x7300,0x6300,0x6300, 1302 | 0x6600,0x6c00,0x6600,0x6300, 1303 | 0x6100,0x6300,0x6e00,0x0000, 1304 | 0x0000,0x0000,0x0000,0x0000, 1305 | }, 1306 | //STARTCHAR agave 1307 | { 1308 | 0x0000,0x0000,0x3000,0x1800, 1309 | 0x0c00,0x0000,0x0000,0x3f00, 1310 | 0x6180,0x0180,0x3f80,0x6180, 1311 | 0x6180,0x6180,0x3e80,0x0000, 1312 | 0x0000,0x0000,0x0000,0x0000, 1313 | }, 1314 | //STARTCHAR aacute 1315 | { 1316 | 0x0000,0x0000,0x0600,0x0c00, 1317 | 0x1800,0x0000,0x0000,0x3f00, 1318 | 0x6180,0x0180,0x3f80,0x6180, 1319 | 0x6180,0x6180,0x3e80,0x0000, 1320 | 0x0000,0x0000,0x0000,0x0000, 1321 | }, 1322 | //STARTCHAR acircumflex 1323 | { 1324 | 0x0000,0x0000,0x0c00,0x1e00, 1325 | 0x3300,0x0000,0x0000,0x3f00, 1326 | 0x6180,0x0180,0x3f80,0x6180, 1327 | 0x6180,0x6180,0x3e80,0x0000, 1328 | 0x0000,0x0000,0x0000,0x0000, 1329 | }, 1330 | //STARTCHAR atilde 1331 | { 1332 | 0x0000,0x0000,0x1900,0x3f00, 1333 | 0x2600,0x0000,0x0000,0x3f00, 1334 | 0x6180,0x0180,0x3f80,0x6180, 1335 | 0x6180,0x6180,0x3e80,0x0000, 1336 | 0x0000,0x0000,0x0000,0x0000, 1337 | }, 1338 | //STARTCHAR adieresis 1339 | { 1340 | 0x0000,0x0000,0x3300,0x3300, 1341 | 0x0000,0x0000,0x0000,0x3f00, 1342 | 0x6180,0x0180,0x3f80,0x6180, 1343 | 0x6180,0x6180,0x3e80,0x0000, 1344 | 0x0000,0x0000,0x0000,0x0000, 1345 | }, 1346 | //STARTCHAR aring 1347 | { 1348 | 0x0000,0x0000,0x0000,0x0c00, 1349 | 0x1200,0x1200,0x0c00,0x3f00, 1350 | 0x6180,0x0180,0x3f80,0x6180, 1351 | 0x6180,0x6180,0x3e80,0x0000, 1352 | 0x0000,0x0000,0x0000,0x0000, 1353 | }, 1354 | //STARTCHAR ae 1355 | { 1356 | 0x0000,0x0000,0x0000,0x0000, 1357 | 0x0000,0x0000,0x0000,0x3b00, 1358 | 0x4d80,0x0d80,0x0f00,0x3c00, 1359 | 0x6c00,0x6c80,0x3700,0x0000, 1360 | 0x0000,0x0000,0x0000,0x0000, 1361 | }, 1362 | //STARTCHAR 0xccedilla 1363 | { 1364 | 0x0000,0x0000,0x0000,0x0000, 1365 | 0x0000,0x0000,0x0000,0x1f00, 1366 | 0x3180,0x6000,0x6000,0x6000, 1367 | 0x6000,0x3180,0x1f00,0x0c00, 1368 | 0x0400,0x1200,0x0c00,0x0000, 1369 | }, 1370 | //STARTCHAR egrave 1371 | { 1372 | 0x0000,0x0000,0x3000,0x1800, 1373 | 0x0c00,0x0000,0x0000,0x1e00, 1374 | 0x3300,0x6180,0x7f80,0x6000, 1375 | 0x6000,0x3180,0x1f00,0x0000, 1376 | 0x0000,0x0000,0x0000,0x0000, 1377 | }, 1378 | //STARTCHAR eacute 1379 | { 1380 | 0x0000,0x0000,0x0600,0x0c00, 1381 | 0x1800,0x0000,0x0000,0x1e00, 1382 | 0x3300,0x6180,0x7f80,0x6000, 1383 | 0x6000,0x3180,0x1f00,0x0000, 1384 | 0x0000,0x0000,0x0000,0x0000, 1385 | }, 1386 | //STARTCHAR ecircumflex 1387 | { 1388 | 0x0000,0x0000,0x0c00,0x1e00, 1389 | 0x3300,0x0000,0x0000,0x1e00, 1390 | 0x3300,0x6180,0x7f80,0x6000, 1391 | 0x6000,0x3180,0x1f00,0x0000, 1392 | 0x0000,0x0000,0x0000,0x0000, 1393 | }, 1394 | //STARTCHAR edieresis 1395 | { 1396 | 0x0000,0x0000,0x3300,0x3300, 1397 | 0x0000,0x0000,0x0000,0x1e00, 1398 | 0x3300,0x6180,0x7f80,0x6000, 1399 | 0x6000,0x3180,0x1f00,0x0000, 1400 | 0x0000,0x0000,0x0000,0x0000, 1401 | }, 1402 | //STARTCHAR igrave 1403 | { 1404 | 0x0000,0x0000,0x3000,0x1800, 1405 | 0x0c00,0x0000,0x0000,0x3c00, 1406 | 0x0c00,0x0c00,0x0c00,0x0c00, 1407 | 0x0c00,0x0c00,0x7f80,0x0000, 1408 | 0x0000,0x0000,0x0000,0x0000, 1409 | }, 1410 | //STARTCHAR iacute 1411 | { 1412 | 0x0000,0x0000,0x0600,0x0c00, 1413 | 0x1800,0x0000,0x0000,0x3c00, 1414 | 0x0c00,0x0c00,0x0c00,0x0c00, 1415 | 0x0c00,0x0c00,0x7f80,0x0000, 1416 | 0x0000,0x0000,0x0000,0x0000, 1417 | }, 1418 | //STARTCHAR icircumflex 1419 | { 1420 | 0x0000,0x0000,0x0c00,0x1e00, 1421 | 0x3300,0x0000,0x0000,0x3c00, 1422 | 0x0c00,0x0c00,0x0c00,0x0c00, 1423 | 0x0c00,0x0c00,0x7f80,0x0000, 1424 | 0x0000,0x0000,0x0000,0x0000, 1425 | }, 1426 | //STARTCHAR idieresis 1427 | { 1428 | 0x0000,0x0000,0x3300,0x3300, 1429 | 0x0000,0x0000,0x0000,0x3c00, 1430 | 0x0c00,0x0c00,0x0c00,0x0c00, 1431 | 0x0c00,0x0c00,0x7f80,0x0000, 1432 | 0x0000,0x0000,0x0000,0x0000, 1433 | }, 1434 | //STARTCHAR eth 1435 | { 1436 | 0x0000,0x0000,0x4400,0x6c00, 1437 | 0x3800,0x3800,0x6c00,0x4600, 1438 | 0x1f00,0x3380,0x6180,0x6180, 1439 | 0x6180,0x3300,0x1e00,0x0000, 1440 | 0x0000,0x0000,0x0000,0x0000, 1441 | }, 1442 | //STARTCHAR ntilde 1443 | { 1444 | 0x0000,0x0000,0x1900,0x3f00, 1445 | 0x2600,0x0000,0x0000,0x6e00, 1446 | 0x7300,0x6180,0x6180,0x6180, 1447 | 0x6180,0x6180,0x6180,0x0000, 1448 | 0x0000,0x0000,0x0000,0x0000, 1449 | }, 1450 | //STARTCHAR ograve 1451 | { 1452 | 0x0000,0x0000,0x3000,0x1800, 1453 | 0x0c00,0x0000,0x0000,0x1e00, 1454 | 0x3300,0x6180,0x6180,0x6180, 1455 | 0x6180,0x3300,0x1e00,0x0000, 1456 | 0x0000,0x0000,0x0000,0x0000, 1457 | }, 1458 | //STARTCHAR oacute 1459 | { 1460 | 0x0000,0x0000,0x0600,0x0c00, 1461 | 0x1800,0x0000,0x0000,0x1e00, 1462 | 0x3300,0x6180,0x6180,0x6180, 1463 | 0x6180,0x3300,0x1e00,0x0000, 1464 | 0x0000,0x0000,0x0000,0x0000, 1465 | }, 1466 | //STARTCHAR ocircumflex 1467 | { 1468 | 0x0000,0x0000,0x0c00,0x1e00, 1469 | 0x3300,0x0000,0x0000,0x1e00, 1470 | 0x3300,0x6180,0x6180,0x6180, 1471 | 0x6180,0x3300,0x1e00,0x0000, 1472 | 0x0000,0x0000,0x0000,0x0000, 1473 | }, 1474 | //STARTCHAR otilde 1475 | { 1476 | 0x0000,0x0000,0x1900,0x3f00, 1477 | 0x2600,0x0000,0x0000,0x1e00, 1478 | 0x3300,0x6180,0x6180,0x6180, 1479 | 0x6180,0x3300,0x1e00,0x0000, 1480 | 0x0000,0x0000,0x0000,0x0000, 1481 | }, 1482 | //STARTCHAR odieresis 1483 | { 1484 | 0x0000,0x0000,0x3300,0x3300, 1485 | 0x0000,0x0000,0x0000,0x1e00, 1486 | 0x3300,0x6180,0x6180,0x6180, 1487 | 0x6180,0x3300,0x1e00,0x0000, 1488 | 0x0000,0x0000,0x0000,0x0000, 1489 | }, 1490 | //STARTCHAR divide 1491 | { 1492 | 0x0000,0x0000,0x0000,0x0000, 1493 | 0x0c00,0x0c00,0x0000,0x0000, 1494 | 0x7f80,0x7f80,0x0000,0x0000, 1495 | 0x0c00,0x0c00,0x0000,0x0000, 1496 | 0x0000,0x0000,0x0000,0x0000, 1497 | }, 1498 | //STARTCHAR oslash 1499 | { 1500 | 0x0000,0x0000,0x0000,0x0000, 1501 | 0x0000,0x0000,0x0080,0x1f00, 1502 | 0x3300,0x6580,0x6580,0x6980, 1503 | 0x6980,0x3300,0x3e00,0x4000, 1504 | 0x0000,0x0000,0x0000,0x0000, 1505 | }, 1506 | //STARTCHAR ugrave 1507 | { 1508 | 0x0000,0x0000,0x3000,0x1800, 1509 | 0x0c00,0x0000,0x0000,0x6180, 1510 | 0x6180,0x6180,0x6180,0x6180, 1511 | 0x6180,0x3380,0x1d80,0x0000, 1512 | 0x0000,0x0000,0x0000,0x0000, 1513 | }, 1514 | //STARTCHAR uacute 1515 | { 1516 | 0x0000,0x0000,0x0600,0x0c00, 1517 | 0x1800,0x0000,0x0000,0x6180, 1518 | 0x6180,0x6180,0x6180,0x6180, 1519 | 0x6180,0x3380,0x1d80,0x0000, 1520 | 0x0000,0x0000,0x0000,0x0000, 1521 | }, 1522 | //STARTCHAR ucircumflex 1523 | { 1524 | 0x0000,0x0000,0x0c00,0x1e00, 1525 | 0x3300,0x0000,0x0000,0x6180, 1526 | 0x6180,0x6180,0x6180,0x6180, 1527 | 0x6180,0x3380,0x1d80,0x0000, 1528 | 0x0000,0x0000,0x0000,0x0000, 1529 | }, 1530 | //STARTCHAR udieresis 1531 | { 1532 | 0x0000,0x0000,0x3300,0x3300, 1533 | 0x0000,0x0000,0x0000,0x6180, 1534 | 0x6180,0x6180,0x6180,0x6180, 1535 | 0x6180,0x3380,0x1d80,0x0000, 1536 | 0x0000,0x0000,0x0000,0x0000, 1537 | }, 1538 | //STARTCHAR yacute 1539 | { 1540 | 0x0000,0x0000,0x0600,0x0c00, 1541 | 0x1800,0x0000,0x0000,0x0000, 1542 | 0x6180,0x6180,0x6180,0x6180, 1543 | 0x6180,0x3380,0x1d80,0x0180, 1544 | 0x6180,0x3300,0x1e00,0x0000, 1545 | }, 1546 | //STARTCHAR thorn 1547 | { 1548 | 0x0000,0x0000,0x0000,0x0000, 1549 | 0x0000,0x0000,0x0000,0x3800, 1550 | 0x1e00,0x1b00,0x1b00,0x1e00, 1551 | 0x1800,0x1800,0x3800,0x0000, 1552 | 0x0000,0x0000,0x0000,0x0000, 1553 | }, 1554 | //STARTCHAR ydieresis 1555 | { 1556 | 0x0000,0x0000,0x3300,0x3300, 1557 | 0x0000,0x0000,0x0000,0x0000, 1558 | 0x6180,0x6180,0x6180,0x6180, 1559 | 0x6180,0x3380,0x1d80,0x0180, 1560 | 0x6180,0x3300,0x1e00,0x0000, 1561 | } 1562 | }; 1563 | 1564 | template 1565 | void DrawDigit(PVideoFrame &dst, int x, int y, int num, int bits_per_pixel, int xRatioShift, int yRatioShift, bool chroma, bool rgb) 1566 | { 1567 | x = x * 10; 1568 | y = y * 20; 1569 | 1570 | if (rgb) { 1571 | int pitch = dst->GetPitch() / sizeof(pixel_t); 1572 | 1573 | pixel_t color = 235 << (bits_per_pixel - 8); //(1 << bits_per_pixel) - 1; // max white 1574 | 1575 | int planes_r[4] = { PLANAR_G, PLANAR_B, PLANAR_R, PLANAR_A }; 1576 | for (int i = 0; i < 3; i++) { // for all R, G, B planes 1577 | int plane = planes_r[i]; 1578 | pixel_t* dstp = reinterpret_cast(dst->GetWritePtr(plane)); 1579 | 1580 | for (int tx = 0; tx < 10; tx++) { 1581 | for (int ty = 0; ty < 20; ty++) { 1582 | pixel_t* dp = &dstp[(x + tx) + (y + ty) * pitch]; 1583 | if (font[num][ty] & (1 << (15 - tx))) 1584 | *dp = color; 1585 | else 1586 | *dp = (*dp * 3) >> 2; 1587 | } 1588 | } 1589 | } 1590 | 1591 | return; 1592 | } 1593 | 1594 | // YUV 1595 | const pixel_t color = 235 << (bits_per_pixel - 8); 1596 | 1597 | int pitch = dst->GetPitch() / sizeof(pixel_t); 1598 | 1599 | pixel_t* dstp = reinterpret_cast(dst->GetWritePtr()); 1600 | 1601 | // write only to luma 1602 | for (int tx = 0; tx < 10; tx++) { 1603 | for (int ty = 0; ty < 20; ty++) { 1604 | pixel_t* dp = &dstp[(x + tx) + (y + ty) * pitch]; 1605 | if (font[num][ty] & (1 << (15 - tx))) 1606 | *dp = color; 1607 | else 1608 | *dp = (*dp * 3) >> 2; 1609 | } 1610 | } 1611 | 1612 | if (chroma) 1613 | { 1614 | pixel_t* dstpU = reinterpret_cast(dst->GetWritePtr(PLANAR_U)); 1615 | pixel_t* dstpV = reinterpret_cast(dst->GetWritePtr(PLANAR_V)); 1616 | 1617 | int pitchUV = dst->GetPitch(PLANAR_U); 1618 | int midChroma = 1 << (bits_per_pixel - 1); 1619 | for (int tx = 0; tx < 10; tx++) 1620 | { 1621 | for (int ty = 0; ty < 20; ty++) 1622 | { 1623 | int pos = ((x + tx) >> xRatioShift) + ((y + ty) >> yRatioShift) * pitchUV; 1624 | pixel_t* dpU = &dstpU[pos]; 1625 | pixel_t* dpV = &dstpV[pos]; 1626 | if (font[num][ty] & (1 << (15 - tx))) 1627 | { 1628 | *dpU = midChroma; 1629 | *dpV = midChroma; 1630 | } 1631 | else 1632 | { 1633 | *dpU = (pixel_t)((*dpU + midChroma) >> 1); 1634 | *dpV = (pixel_t)((*dpV + midChroma) >> 1); 1635 | } 1636 | } 1637 | } 1638 | } 1639 | } 1640 | 1641 | // instantiate 1642 | template void DrawDigit(PVideoFrame &dst, int x, int y, int num, int bits_per_pixel, int xRatioShift, int yRatioShift, bool chroma, bool rgb); 1643 | template void DrawDigit(PVideoFrame &dst, int x, int y, int num, int bits_per_pixel, int xRatioShift, int yRatioShift, bool chroma, bool rgb); 1644 | 1645 | // for YUY2 and any planar 1646 | void DrawString(PVideoFrame &dst, VideoInfo &vi, int x, int y, const char *s) 1647 | { 1648 | if (vi.IsYUY2()) { 1649 | DrawStringYUY2(dst, x, y, s); 1650 | return; 1651 | } 1652 | 1653 | bool isRGB = vi.IsRGB(); // planar 1654 | bool grey = vi.IsY(); 1655 | 1656 | int bits_per_pixel = vi.BitsPerComponent(); 1657 | int xRatioShift = (isRGB || grey) ? 0 : vi.GetPlaneWidthSubsampling(PLANAR_U); 1658 | int yRatioShift = (isRGB || grey) ? 0 : vi.GetPlaneHeightSubsampling(PLANAR_U); 1659 | for (int xx = 0; *s; ++s, ++xx) { 1660 | if(bits_per_pixel == 8) 1661 | DrawDigit(dst, x + xx, y, *s - ' ', bits_per_pixel, xRatioShift, yRatioShift, !grey, isRGB); 1662 | else if(bits_per_pixel <= 16) 1663 | DrawDigit(dst, x + xx, y, *s - ' ', bits_per_pixel, xRatioShift, yRatioShift, !grey, isRGB); 1664 | } 1665 | } 1666 | 1667 | void DrawDigitYUY2(::PVideoFrame &dst, int x, int y, int num) 1668 | { 1669 | extern unsigned short font[][20]; 1670 | 1671 | x = x * 10; 1672 | y = y * 20; 1673 | 1674 | int pitch = dst->GetPitch(); 1675 | for (int tx = 0; tx < 10; tx++) { 1676 | for (int ty = 0; ty < 20; ty++) { 1677 | unsigned char *dp = &dst->GetWritePtr()[(x + tx) * 2 + (y + ty) * pitch]; 1678 | if (font[num][ty] & (1 << (15 - tx))) { 1679 | if (tx & 1) { 1680 | dp[0] = 250; 1681 | dp[-1] = 128; 1682 | dp[1] = 128; 1683 | } else { 1684 | dp[0] = 250; 1685 | dp[1] = 128; 1686 | dp[3] = 128; 1687 | } 1688 | } else { 1689 | if (tx & 1) { 1690 | dp[0] = (unsigned char) ((dp[0] * 3) >> 2); 1691 | dp[-1] = (unsigned char) ((dp[-1] + 128) >> 1); 1692 | dp[1] = (unsigned char) ((dp[1] + 128) >> 1); 1693 | } else { 1694 | dp[0] = (unsigned char) ((dp[0] * 3) >> 2); 1695 | dp[1] = (unsigned char) ((dp[1] + 128) >> 1); 1696 | dp[3] = (unsigned char) ((dp[3] + 128) >> 1); 1697 | } 1698 | } 1699 | } 1700 | } 1701 | } 1702 | 1703 | void DrawStringYUY2(::PVideoFrame &dst, int x, int y, const char *s) 1704 | { 1705 | for (int xx = 0; *s; ++s, ++xx) { 1706 | DrawDigitYUY2(dst, x + xx, y, *s - ' '); 1707 | } 1708 | } 1709 | -------------------------------------------------------------------------------- /fft3dfilter/info.h: -------------------------------------------------------------------------------- 1 | /* 2 | This program is free software; you can redistribute it and/or modify 3 | it under the terms of the GNU General Public License as published by 4 | the Free Software Foundation. 5 | 6 | This program is distributed in the hope that it will be useful, 7 | but WITHOUT ANY WARRANTY; without even the implied warranty of 8 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 9 | GNU General Public License for more details. 10 | 11 | You should have received a copy of the GNU General Public License 12 | along with this program; if not, write to the Free Software 13 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 14 | 15 | The author can be contacted at: 16 | Donald Graft 17 | neuron2@attbi.com. 18 | */ 19 | 20 | // Borrowed from the author of IT.dll, whose name I 21 | // could not determine. Modified for YV12 by Donald Graft. 22 | 23 | #ifndef __INFO___H__ 24 | #define __INFO___H__ 25 | 26 | #include "avisynth.h" 27 | 28 | class PVideoFrame; 29 | 30 | template 31 | void DrawDigit(PVideoFrame &dst, int x, int y, int num, int bits_per_pixel, int xRatioShift, int yRatioShift, bool chroma); 32 | 33 | void DrawString(PVideoFrame &dst, VideoInfo &vi, int x, int y, const char *s); 34 | void DrawDigitYUY2(PVideoFrame &dst, int x, int y, int num); 35 | void DrawStringYUY2(PVideoFrame &dst, int x, int y, const char *s); 36 | 37 | #endif // __INFO___H__ 38 | --------------------------------------------------------------------------------