• R/O
  • SSH

freeverb3_vst: 提交

Freeverb3 VST plugins


Commit MetaInfo

修訂aa89e378b2310ce5949f6d5469a5fe0e2f35b9b0 (tree)
時間2018-04-14 17:48:10
作者Teru Kamogashira <tkamogashira@user...>
CommiterTeru Kamogashira

Log Message

Updates to Freeverb3 library

Change Summary

差異

diff -r 0b8eed6bedda -r aa89e378b231 VstMain/CheckCPU.cpp
--- a/VstMain/CheckCPU.cpp Tue Nov 07 22:09:43 2017 +0900
+++ b/VstMain/CheckCPU.cpp Sat Apr 14 17:48:10 2018 +0900
@@ -22,51 +22,23 @@
2222
2323 int detectCPU()
2424 {
25- int check = 1, prefer = 0;
25+ int check = 1;
2626 uint32_t simdFlag = UTILS::getSIMDFlag();
2727 fprintf(stderr, "simdFlag: %08x\n", simdFlag);
28-
2928 #ifdef PLUGDOUBLE
30-#ifdef ENABLE_AVX
31- if(!(simdFlag & FV3_FLAG_AVX))
29+ if(!(simdFlag & FV3_X86SIMD_FLAG_SSE2))
3230 check = 0;
33-#endif
34-#ifdef ENABLE_SSE4
35- if(!(simdFlag & FV3_FLAG_SSE4_1))
36- check = 0;
37-#endif
38-#ifdef ENABLE_SSE2
39- if(!(simdFlag & FV3_FLAG_SSE2))
40- check = 0;
41-#endif
42-
4331 #else
44-
45-#ifdef ENABLE_SSE_V2
46-#define ENABLE_SSE
47-#endif
48-
49-#ifdef ENABLE_AVX
50- if(!(simdFlag & FV3_FLAG_AVX))
32+ if(!(simdFlag & FV3_X86SIMD_FLAG_SSE))
5133 check = 0;
5234 #endif
53-#ifdef ENABLE_SSE3
54- if(!(simdFlag & FV3_FLAG_SSE3))
55- check = 0;
56-#endif
57-#ifdef ENABLE_SSE
58- if(!(simdFlag & FV3_FLAG_SSE))
59- check = 0;
60-#endif
61-#endif
6235
6336 if(check == 0)
6437 {
6538 #ifdef WIN32
6639 MessageBoxW(NULL,
67- L"This binary version is not supported on this machine.\n"
68- L"Try using check_cpu.exe to find the optimized binary version of Freeverb3_VST.",
69- L"Freeverb3_VST CPU MISMATCH ERROR",
40+ L"SSE/SSE2 instruction set is not supported on this machine.\n",
41+ L"Freeverb3_VST CPU SIMD ERROR",
7042 MB_OK);
7143 #endif
7244 return check;
diff -r 0b8eed6bedda -r aa89e378b231 VstMain/ProcessBlock.cpp
--- a/VstMain/ProcessBlock.cpp Tue Nov 07 22:09:43 2017 +0900
+++ b/VstMain/ProcessBlock.cpp Sat Apr 14 17:48:10 2018 +0900
@@ -321,7 +321,7 @@
321321 void ProcessBlock::p_process(float **inputs, float **outputs, VstInt32 sampleFrames)
322322 {
323323 uint32_t mxcsr = UTILS::getMXCSR();
324- UTILS::setMXCSR(FV3_FLAG_MXCSR_FZ|FV3_FLAG_MXCSR_DAZ|FV3_FLAG_MXCSR_EMASK_ALL);
324+ UTILS::setMXCSR(FV3_X86SIMD_MXCSR_FZ|FV3_X86SIMD_MXCSR_DAZ|FV3_X86SIMD_MXCSR_EMASK_ALL);
325325 if(processBlockSize < sampleFrames)
326326 if(allocProcessBlock(sampleFrames) != sampleFrames) return;
327327 #ifdef PLUGDOUBLE
@@ -356,7 +356,7 @@
356356 VstInt32 sampleFrames)
357357 {
358358 uint32_t mxcsr = UTILS::getMXCSR();
359- UTILS::setMXCSR(FV3_FLAG_MXCSR_FZ|FV3_FLAG_MXCSR_DAZ|FV3_FLAG_MXCSR_EMASK_ALL);
359+ UTILS::setMXCSR(FV3_X86SIMD_MXCSR_FZ|FV3_X86SIMD_MXCSR_DAZ|FV3_X86SIMD_MXCSR_EMASK_ALL);
360360 if(processBlockSize < sampleFrames) if(allocProcessBlock(sampleFrames) != sampleFrames) return;
361361 #ifdef PLUGDOUBLE
362362 float2double(inputs[0], inputBlock.L, sampleFrames);
@@ -382,7 +382,7 @@
382382 void ProcessBlock::p_processDoubleReplacing(double **inputs, double **outputs, VstInt32 sampleFrames)
383383 {
384384 uint32_t mxcsr = UTILS::getMXCSR();
385- UTILS::setMXCSR(FV3_FLAG_MXCSR_FZ|FV3_FLAG_MXCSR_DAZ|FV3_FLAG_MXCSR_EMASK_ALL);
385+ UTILS::setMXCSR(FV3_X86SIMD_MXCSR_FZ|FV3_X86SIMD_MXCSR_DAZ|FV3_X86SIMD_MXCSR_EMASK_ALL);
386386 if(processBlockSize < sampleFrames) if(allocProcessBlock(sampleFrames) != sampleFrames) return;
387387 memcpy(inputBlock.L, inputs[0], sizeof(double)*sampleFrames);
388388 memcpy(inputBlock.R, inputs[1], sizeof(double)*sampleFrames);
diff -r 0b8eed6bedda -r aa89e378b231 configure.ac
--- a/configure.ac Tue Nov 07 22:09:43 2017 +0900
+++ b/configure.ac Sat Apr 14 17:48:10 2018 +0900
@@ -87,6 +87,25 @@
8787 AC_DEFINE([HAVE_FLEXIBLE_ARRAY],0)
8888 fi
8989
90+AC_ARG_ENABLE(x86simd, AC_HELP_STRING([--enable-x86simd], [Use X86/X64 SIMD.(default=auto)]), [cv_x86simd="$enable_x86simd"], [cv_x86simd="auto"])
91+
92+case "${target_cpu}" in
93+ x86*|i386*|i486*|i586*|i686*|amd64*|x86_64*)
94+ if test "x$cv_x86simd" = "xauto"; then
95+ AC_MSG_NOTICE([Auto-enabling x86/x64 SIMD codes])
96+ cv_x86simd=yes
97+ fi
98+ ;;
99+ *)
100+ cv_x86simd=no
101+ ;;
102+esac
103+
104+if test "x$cv_x86simd" = "xyes"; then
105+ AC_DEFINE(ENABLE_X86SIMD,1,Define to 1 if you use x86 SIMD)
106+ AC_MSG_RESULT([Using x86/x64 SIMD codes])
107+fi
108+
90109 AC_ARG_ENABLE(vsttarget,AS_HELP_STRING([--enable-vsttarget],[TARGET(default=windows,macosx).]),[cv_vsttarget="$enable_vsttarget"], [cv_vsttarget="windows"])
91110 AC_SUBST(cv_vsttarget)
92111 case "$cv_vsttarget" in
diff -r 0b8eed6bedda -r aa89e378b231 cross-sh/mingw-cross-D-sse2.sh
--- a/cross-sh/mingw-cross-D-sse2.sh Tue Nov 07 22:09:43 2017 +0900
+++ b/cross-sh/mingw-cross-D-sse2.sh Sat Apr 14 17:48:10 2018 +0900
@@ -4,7 +4,7 @@
44 export set target=i686-w64-mingw32
55 export set host=$target
66 export set build=i486-linux-gnu
7-export CFLAGS="-pipe -Wall -O3 -ffast-math -DENABLE_SSE2 -march=pentium4 -mfpmath=sse -mstackrealign"
7+export CFLAGS="-pipe -Wall -O3 -ffast-math -march=pentium4 -mfpmath=sse -mstackrealign"
88 export CXXFLAGS=$CFLAGS
99
1010 ./configure --prefix=/Freeverb3_VST --build=$build --host=$host --target=$target \
diff -r 0b8eed6bedda -r aa89e378b231 libsndfile/G72x/.libs/libg72x.a
Binary file libsndfile/G72x/.libs/libg72x.a has changed
diff -r 0b8eed6bedda -r aa89e378b231 libsndfile/GSM610/.libs/libgsm.a
Binary file libsndfile/GSM610/.libs/libgsm.a has changed
diff -r 0b8eed6bedda -r aa89e378b231 src/check_cpu.cpp
--- a/src/check_cpu.cpp Tue Nov 07 22:09:43 2017 +0900
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
1-/**
2- * Freeverb3 CPU Checker
3- *
4- * Copyright (C) 2007-2017 Teru Kamogashira
5- *
6- * This program is free software; you can redistribute it and/or modify
7- * it under the terms of the GNU General Public License as published by
8- * the Free Software Foundation; either version 2 of the License, or
9- * (at your option) any later version.
10- *
11- * This program is distributed in the hope that it will be useful,
12- * but WITHOUT ANY WARRANTY; without even the implied warranty of
13- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14- * GNU General Public License for more details.
15- *
16- * You should have received a copy of the GNU General Public License
17- * along with this program; if not, write to the Free Software
18- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19- */
20-
21-#include <stdio.h>
22-#include <stdint.h>
23-#include <string>
24-#include <windows.h>
25-#include <freeverb/utils.hpp>
26-
27-#ifdef PLUGDOUBLE
28-typedef fv3::utils_ UTILS;
29-typedef double pfloat_t;
30-#else
31-typedef fv3::utils_f UTILS;
32-typedef float pfloat_t;
33-#endif
34-
35-int main()
36-{
37- uint32_t simdFlag = UTILS::getSIMDFlag();
38-
39- MessageBoxW(NULL,
40- L"CPU Instruction Detector for Windows",
41- L"Freeverb3VST",MB_OK);
42- MessageBoxW(NULL,
43- L"There are two types of binary distribution.\n"
44- L"\"fast\" is a single precision version, \n"
45- L"which is suitable for realtime effect.\n"
46- L"\"slow\" is a double precision version, \n"
47- L"which may be slower than the fast version.\n"
48- L"\"fast\" version should be used for realtime operation.",
49- L"Freeverb3VST",MB_OK);
50-
51- std::string fl = "", db = "";
52- //if((simdFlag&FV3_FLAG_3DNOW)) { fl = "3DNOW"; }
53- if((simdFlag&FV3_FLAG_SSE)) { fl = "SSE"; }
54- if((simdFlag&FV3_FLAG_SSE2)) { db = "SSE2"; }
55- //if((simdFlag&FV3_FLAG_SSE3)) { fl = "SSE3"; }
56- //if((simdFlag&FV3_FLAG_SSE4_1)){ fl = "SSE4"; }
57- if((simdFlag&FV3_FLAG_AVX)) { fl = "AVX"; db = "AVX"; }
58-
59- std::string out = "";
60- if(fl != "")
61- out =
62- "You should use\n"
63- "\"fast-" + fl + "-singleprecision\"\n"
64- "version for realtime operation.\n";
65- else
66- out =
67- "There are no supported version for single precision plugins.\n";
68-
69- if(db != "")
70- out += "You can use\n"
71- "\"slow-" + db + "-doubleprecision\"\n"
72- "version for precise processing.\n";
73- else
74- out +=
75- "There are no supported version for double precision plugins.\n";
76-
77- MessageBoxA(NULL, out.c_str(), "Freeverb3VST", MB_OK);
78-}
Show on old repository browser