From 1c3d6f5aa9eb2bf2f18641f0a7e3e6f5e523a156 Mon Sep 17 00:00:00 2001 From: Mark Borgerding Date: Sun, 29 Jul 2012 17:10:10 -0400 Subject: [PATCH 1/8] guard against multiple inclusion --- kissfft.hh | 1 + 1 file changed, 1 insertion(+) diff --git a/kissfft.hh b/kissfft.hh index a586cb1..4f6ac92 100644 --- a/kissfft.hh +++ b/kissfft.hh @@ -1,4 +1,5 @@ #ifndef KISSFFT_CLASS_HH +#define KISSFFT_CLASS_HH #include #include From 8921e1a3b6c818ece604c036adf1b0fef7b070b4 Mon Sep 17 00:00:00 2001 From: Stewart Hildebrand Date: Sun, 3 Jun 2018 14:29:12 -0400 Subject: [PATCH 2/8] Use _mm_free on memory allocated with _mm_malloc. kiss_fft_alloc and kiss_fftr_alloc internally use KISS_FFT_MALLOC to allocate memory, which is defined to _mm_malloc in a SIMD enabled application. Calling free() on memory allocated with _mm_malloc will result in unpredictable behavior. The configuration data allocated with _mm_malloc should be freed with a corresponding _mm_free. --- README | 2 +- kiss_fft.h | 2 +- tools/kiss_fftr.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README b/README index 03b2e7a..a47b67d 100644 --- a/README +++ b/README @@ -22,7 +22,7 @@ USAGE: ... // transformed. DC is in cx_out[0].r and cx_out[0].i - free(cfg); + kiss_fft_free(cfg); Note: frequency-domain data is stored from dc up to 2pi. so cx_out[0] is the dc bin of the FFT diff --git a/kiss_fft.h b/kiss_fft.h index 64c50f4..bcf3b5d 100644 --- a/kiss_fft.h +++ b/kiss_fft.h @@ -99,7 +99,7 @@ void kiss_fft_stride(kiss_fft_cfg cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout /* If kiss_fft_alloc allocated a buffer, it is one contiguous buffer and can be simply free()d when no longer needed*/ -#define kiss_fft_free free +#define kiss_fft_free KISS_FFT_FREE /* Cleans up some memory that gets managed internally. Not necessary to call, but it might clean up diff --git a/tools/kiss_fftr.h b/tools/kiss_fftr.h index 72e5a57..48c9084 100644 --- a/tools/kiss_fftr.h +++ b/tools/kiss_fftr.h @@ -38,7 +38,7 @@ void kiss_fftri(kiss_fftr_cfg cfg,const kiss_fft_cpx *freqdata,kiss_fft_scalar * output timedata has nfft scalar points */ -#define kiss_fftr_free free +#define kiss_fftr_free KISS_FFT_FREE #ifdef __cplusplus } From bc40eccbeacaf2b06db6ae79c021d9a63fe4d0ca Mon Sep 17 00:00:00 2001 From: "h.udo" Date: Mon, 16 Jul 2018 16:11:24 +0100 Subject: [PATCH 3/8] [BSD-3-Clause] Convert to SPDX license format --- COPYING | 14 +++++++------- LICENSES/BSD-3-Clause | 35 +++++++++++++++++++++++++++++++++++ _kiss_fft_guts.h | 18 ++++++------------ kiss_fft.c | 18 ++++++------------ tools/fftutil.c | 18 ++++++------------ tools/kfc.c | 21 +++++++-------------- tools/kiss_fastfir.c | 18 ++++++------------ tools/kiss_fftnd.c | 20 ++++++-------------- tools/kiss_fftndr.c | 18 ++++++------------ tools/kiss_fftr.c | 18 ++++++------------ tools/psdpng.c | 18 ++++++------------ 11 files changed, 97 insertions(+), 119 deletions(-) create mode 100644 LICENSES/BSD-3-Clause diff --git a/COPYING b/COPYING index 2fc6685..6b4b622 100644 --- a/COPYING +++ b/COPYING @@ -1,11 +1,11 @@ -Copyright (c) 2003-2010 Mark Borgerding +Copyright (c) 2003-2010 Mark Borgerding . All rights reserved. -All rights reserved. +KISS FFT is provided under: -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + SPDX-License-Identifier: BSD-3-Clause - * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the author nor the names of any contributors may be used to endorse or promote products derived from this software without specific prior written permission. +Being under the terms of the BSD 3-clause "New" or "Revised" License, +according with: + + LICENSES/BSD-3-Clause -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/LICENSES/BSD-3-Clause b/LICENSES/BSD-3-Clause new file mode 100644 index 0000000..b8d5681 --- /dev/null +++ b/LICENSES/BSD-3-Clause @@ -0,0 +1,35 @@ +Valid-License-Identifier: BSD-3-Clause +SPDX-URL: https://spdx.org/licenses/BSD-3-Clause.html +Usage-Guide: + To use the BSD 3-clause "New" or "Revised" License put the following SPDX + tag/value pair into a comment according to the placement guidelines in + the licensing rules documentation: + SPDX-License-Identifier: BSD-3-Clause +License-Text: + +Copyright (c) . All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors +may be used to endorse or promote products derived from this software without +specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/_kiss_fft_guts.h b/_kiss_fft_guts.h index ba66144..bf5d53c 100644 --- a/_kiss_fft_guts.h +++ b/_kiss_fft_guts.h @@ -1,16 +1,10 @@ /* -Copyright (c) 2003-2010, Mark Borgerding - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the author nor the names of any contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ + * Copyright (c) 2003-2010, Mark Borgerding. All rights reserved. + * This file is part of KISS FFT - https://github.com/mborgerding/kissfft + * + * SPDX-License-Identifier: BSD-3-Clause + * See COPYING file for more information. + */ /* kiss_fft.h defines kiss_fft_scalar as either short or a float type diff --git a/kiss_fft.c b/kiss_fft.c index 465d6c9..af2f695 100644 --- a/kiss_fft.c +++ b/kiss_fft.c @@ -1,16 +1,10 @@ /* -Copyright (c) 2003-2010, Mark Borgerding - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the author nor the names of any contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ + * Copyright (c) 2003-2010, Mark Borgerding. All rights reserved. + * This file is part of KISS FFT - https://github.com/mborgerding/kissfft + * + * SPDX-License-Identifier: BSD-3-Clause + * See COPYING file for more information. + */ #include "_kiss_fft_guts.h" diff --git a/tools/fftutil.c b/tools/fftutil.c index db5a815..2d947d6 100644 --- a/tools/fftutil.c +++ b/tools/fftutil.c @@ -1,16 +1,10 @@ /* -Copyright (c) 2003-2004, Mark Borgerding - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the author nor the names of any contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ + * Copyright (c) 2003-2004, Mark Borgerding. All rights reserved. + * This file is part of KISS FFT - https://github.com/mborgerding/kissfft + * + * SPDX-License-Identifier: BSD-3-Clause + * See COPYING file for more information. + */ #include #include diff --git a/tools/kfc.c b/tools/kfc.c index d94d124..a405d9b 100644 --- a/tools/kfc.c +++ b/tools/kfc.c @@ -1,19 +1,12 @@ -#include "kfc.h" - /* -Copyright (c) 2003-2004, Mark Borgerding - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the author nor the names of any contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ + * Copyright (c) 2003-2004, Mark Borgerding. All rights reserved. + * This file is part of KISS FFT - https://github.com/mborgerding/kissfft + * + * SPDX-License-Identifier: BSD-3-Clause + * See COPYING file for more information. + */ +#include "kfc.h" typedef struct cached_fft *kfc_cfg; diff --git a/tools/kiss_fastfir.c b/tools/kiss_fastfir.c index 4560aa3..d4e666c 100644 --- a/tools/kiss_fastfir.c +++ b/tools/kiss_fastfir.c @@ -1,16 +1,10 @@ /* -Copyright (c) 2003-2004, Mark Borgerding - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the author nor the names of any contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ + * Copyright (c) 2003-2004, Mark Borgerding. All rights reserved. + * This file is part of KISS FFT - https://github.com/mborgerding/kissfft + * + * SPDX-License-Identifier: BSD-3-Clause + * See COPYING file for more information. + */ #include "_kiss_fft_guts.h" diff --git a/tools/kiss_fftnd.c b/tools/kiss_fftnd.c index d6c9124..cf38f86 100644 --- a/tools/kiss_fftnd.c +++ b/tools/kiss_fftnd.c @@ -1,18 +1,10 @@ - - /* -Copyright (c) 2003-2004, Mark Borgerding - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the author nor the names of any contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ + * Copyright (c) 2003-2004, Mark Borgerding. All rights reserved. + * This file is part of KISS FFT - https://github.com/mborgerding/kissfft + * + * SPDX-License-Identifier: BSD-3-Clause + * See COPYING file for more information. + */ #include "kiss_fftnd.h" #include "_kiss_fft_guts.h" diff --git a/tools/kiss_fftndr.c b/tools/kiss_fftndr.c index ba550dd..861d553 100644 --- a/tools/kiss_fftndr.c +++ b/tools/kiss_fftndr.c @@ -1,16 +1,10 @@ /* -Copyright (c) 2003-2004, Mark Borgerding - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the author nor the names of any contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ + * Copyright (c) 2003-2004, Mark Borgerding. All rights reserved. + * This file is part of KISS FFT - https://github.com/mborgerding/kissfft + * + * SPDX-License-Identifier: BSD-3-Clause + * See COPYING file for more information. + */ #include "kiss_fftndr.h" #include "_kiss_fft_guts.h" diff --git a/tools/kiss_fftr.c b/tools/kiss_fftr.c index b8e238b..c362c4e 100644 --- a/tools/kiss_fftr.c +++ b/tools/kiss_fftr.c @@ -1,16 +1,10 @@ /* -Copyright (c) 2003-2004, Mark Borgerding - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the author nor the names of any contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ + * Copyright (c) 2003-2004, Mark Borgerding. All rights reserved. + * This file is part of KISS FFT - https://github.com/mborgerding/kissfft + * + * SPDX-License-Identifier: BSD-3-Clause + * See COPYING file for more information. + */ #include "kiss_fftr.h" #include "_kiss_fft_guts.h" diff --git a/tools/psdpng.c b/tools/psdpng.c index d11a54f..15e640b 100644 --- a/tools/psdpng.c +++ b/tools/psdpng.c @@ -1,16 +1,10 @@ /* -Copyright (c) 2003-2004, Mark Borgerding - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the author nor the names of any contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ + * Copyright (c) 2003-2004, Mark Borgerding. All rights reserved. + * This file is part of KISS FFT - https://github.com/mborgerding/kissfft + * + * SPDX-License-Identifier: BSD-3-Clause + * See COPYING file for more information. + */ #include #include From 4bff6bca72c63100b428f6bce757c40bf56c35ab Mon Sep 17 00:00:00 2001 From: "h.udo" Date: Thu, 19 Jul 2018 14:34:48 +0100 Subject: [PATCH 4/8] [Unlicense] Convert to SPDX license format --- LICENSES/Unlicense | 30 ++++++++++++++++++++++++++++++ test/doit.c | 11 ++++++++--- 2 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 LICENSES/Unlicense diff --git a/LICENSES/Unlicense b/LICENSES/Unlicense new file mode 100644 index 0000000..95e1b74 --- /dev/null +++ b/LICENSES/Unlicense @@ -0,0 +1,30 @@ +Valid-License-Identifier: Unlicense +SPDX-URL: https://spdx.org/licenses/Unlicense.html +Usage-Guide: + To use the Unlicense put the following SPDX tag/value pair into a + comment according to the placement guidelines in the licensing rules + documentation: + SPDX-License-Identifier: Unlicense +License-Text: + +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or distribute +this software, either in source code form or as a compiled binary, for any +purpose, commercial or non-commercial, and by any means. + +In jurisdictions that recognize copyright laws, the author or authors of this +software dedicate any and all copyright interest in the software to the public +domain. We make this dedication for the benefit of the public at large and +to the detriment of our heirs and successors. We intend this dedication to be +an overt act of relinquishment in perpetuity of all present and future rights +to this software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH +THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to diff --git a/test/doit.c b/test/doit.c index 2b16aa4..36e42e8 100644 --- a/test/doit.c +++ b/test/doit.c @@ -1,6 +1,11 @@ -/* this program is in the public domain - A program that helps the authors of the fine fftw library benchmark kiss -*/ +/* + * This program is in the public domain + * A program that helps the authors of the fine fftw library benchmark kiss + * This file is part of KISS FFT - https://github.com/mborgerding/kissfft + * + * SPDX-License-Identifier: Unlicense + * See LICENSES/Unlicense for more information. + */ #include "bench-user.h" #include From f73b91d5706dc6d13c2b0f118826745e13b9750e Mon Sep 17 00:00:00 2001 From: "h.udo" Date: Thu, 19 Jul 2018 14:42:56 +0100 Subject: [PATCH 5/8] [BSD-3-Clause] Add missing copyright notice --- kiss_fft.h | 8 ++++++++ kissfft.hh | 8 ++++++++ tools/kfc.h | 8 ++++++++ tools/kiss_fftnd.h | 8 ++++++++ tools/kiss_fftndr.h | 8 ++++++++ tools/kiss_fftr.h | 8 ++++++++ 6 files changed, 48 insertions(+) diff --git a/kiss_fft.h b/kiss_fft.h index bcf3b5d..45c3a6a 100644 --- a/kiss_fft.h +++ b/kiss_fft.h @@ -1,3 +1,11 @@ +/* + * Copyright (c) 2003-2010, Mark Borgerding. All rights reserved. + * This file is part of KISS FFT - https://github.com/mborgerding/kissfft + * + * SPDX-License-Identifier: BSD-3-Clause + * See COPYING file for more information. + */ + #ifndef KISS_FFT_H #define KISS_FFT_H diff --git a/kissfft.hh b/kissfft.hh index 4f6ac92..43ab00b 100644 --- a/kissfft.hh +++ b/kissfft.hh @@ -1,3 +1,11 @@ +/* + * Copyright (c) 2003-2010, Mark Borgerding. All rights reserved. + * This file is part of KISS FFT - https://github.com/mborgerding/kissfft + * + * SPDX-License-Identifier: BSD-3-Clause + * See COPYING file for more information. + */ + #ifndef KISSFFT_CLASS_HH #define KISSFFT_CLASS_HH #include diff --git a/tools/kfc.h b/tools/kfc.h index 9b5fd67..a5cdd16 100644 --- a/tools/kfc.h +++ b/tools/kfc.h @@ -1,3 +1,11 @@ +/* + * Copyright (c) 2003-2004, Mark Borgerding. All rights reserved. + * This file is part of KISS FFT - https://github.com/mborgerding/kissfft + * + * SPDX-License-Identifier: BSD-3-Clause + * See COPYING file for more information. + */ + #ifndef KFC_H #define KFC_H #include "kiss_fft.h" diff --git a/tools/kiss_fftnd.h b/tools/kiss_fftnd.h index 42e7df5..9bbc002 100644 --- a/tools/kiss_fftnd.h +++ b/tools/kiss_fftnd.h @@ -1,3 +1,11 @@ +/* + * Copyright (c) 2003-2004, Mark Borgerding. All rights reserved. + * This file is part of KISS FFT - https://github.com/mborgerding/kissfft + * + * SPDX-License-Identifier: BSD-3-Clause + * See COPYING file for more information. + */ + #ifndef KISS_FFTND_H #define KISS_FFTND_H diff --git a/tools/kiss_fftndr.h b/tools/kiss_fftndr.h index 38ec3ab..472e479 100644 --- a/tools/kiss_fftndr.h +++ b/tools/kiss_fftndr.h @@ -1,3 +1,11 @@ +/* + * Copyright (c) 2003-2004, Mark Borgerding. All rights reserved. + * This file is part of KISS FFT - https://github.com/mborgerding/kissfft + * + * SPDX-License-Identifier: BSD-3-Clause + * See COPYING file for more information. + */ + #ifndef KISS_NDR_H #define KISS_NDR_H diff --git a/tools/kiss_fftr.h b/tools/kiss_fftr.h index 48c9084..588948d 100644 --- a/tools/kiss_fftr.h +++ b/tools/kiss_fftr.h @@ -1,3 +1,11 @@ +/* + * Copyright (c) 2003-2004, Mark Borgerding. All rights reserved. + * This file is part of KISS FFT - https://github.com/mborgerding/kissfft + * + * SPDX-License-Identifier: BSD-3-Clause + * See COPYING file for more information. + */ + #ifndef KISS_FTR_H #define KISS_FTR_H From 0dca78f0a5679668409b7be196186fb74ecf3a4d Mon Sep 17 00:00:00 2001 From: Mark Borgerding Date: Sat, 21 Jul 2018 11:02:03 -0400 Subject: [PATCH 6/8] added missing copyright notice --- test/benchfftw.c | 7 +++++++ test/benchkiss.c | 7 +++++++ test/compfft.py | 5 +++++ test/fastfir.py | 5 +++++ test/fft.py | 5 +++++ test/mk_test.py | 5 +++++ test/pstats.c | 7 +++++++ test/pstats.h | 7 +++++++ test/test_real.c | 7 +++++++ test/test_vs_dft.c | 7 +++++++ test/testcpp.cc | 7 +++++++ test/testkiss.py | 5 +++++ test/twotonetest.c | 7 +++++++ 13 files changed, 81 insertions(+) diff --git a/test/benchfftw.c b/test/benchfftw.c index 8824d19..0bb2ef1 100644 --- a/test/benchfftw.c +++ b/test/benchfftw.c @@ -1,3 +1,10 @@ +/* + * Copyright (c) 2003-2010, Mark Borgerding. All rights reserved. + * This file is part of KISS FFT - https://github.com/mborgerding/kissfft + * + * SPDX-License-Identifier: BSD-3-Clause + * See COPYING file for more information. + */ #include #include #include diff --git a/test/benchkiss.c b/test/benchkiss.c index f3bde40..7dae65d 100644 --- a/test/benchkiss.c +++ b/test/benchkiss.c @@ -1,3 +1,10 @@ +/* + * Copyright (c) 2003-2010, Mark Borgerding. All rights reserved. + * This file is part of KISS FFT - https://github.com/mborgerding/kissfft + * + * SPDX-License-Identifier: BSD-3-Clause + * See COPYING file for more information. + */ #include #include #include diff --git a/test/compfft.py b/test/compfft.py index ad3b7e9..d2671c1 100755 --- a/test/compfft.py +++ b/test/compfft.py @@ -1,4 +1,9 @@ #!/usr/bin/env python +# Copyright (c) 2003-2010, Mark Borgerding. All rights reserved. +# This file is part of KISS FFT - https://github.com/mborgerding/kissfft +# +# SPDX-License-Identifier: BSD-3-Clause +# See COPYING file for more information. # use FFTPACK as a baseline import FFT diff --git a/test/fastfir.py b/test/fastfir.py index 5ff432a..18662d4 100755 --- a/test/fastfir.py +++ b/test/fastfir.py @@ -1,4 +1,9 @@ #!/usr/bin/env python +# Copyright (c) 2003-2010, Mark Borgerding. All rights reserved. +# This file is part of KISS FFT - https://github.com/mborgerding/kissfft +# +# SPDX-License-Identifier: BSD-3-Clause +# See COPYING file for more information. from Numeric import * from FFT import * diff --git a/test/fft.py b/test/fft.py index 2705f71..4208a20 100755 --- a/test/fft.py +++ b/test/fft.py @@ -1,4 +1,9 @@ #!/usr/bin/env python +# Copyright (c) 2003-2010, Mark Borgerding. All rights reserved. +# This file is part of KISS FFT - https://github.com/mborgerding/kissfft +# +# SPDX-License-Identifier: BSD-3-Clause +# See COPYING file for more information. import math import sys diff --git a/test/mk_test.py b/test/mk_test.py index 998b730..ab6acdf 100755 --- a/test/mk_test.py +++ b/test/mk_test.py @@ -1,4 +1,9 @@ #!/usr/bin/env python +# Copyright (c) 2003-2010, Mark Borgerding. All rights reserved. +# This file is part of KISS FFT - https://github.com/mborgerding/kissfft +# +# SPDX-License-Identifier: BSD-3-Clause +# See COPYING file for more information. import FFT import sys diff --git a/test/pstats.c b/test/pstats.c index 596826c..5082bda 100644 --- a/test/pstats.c +++ b/test/pstats.c @@ -1,3 +1,10 @@ +/* + * Copyright (c) 2003-2010, Mark Borgerding. All rights reserved. + * This file is part of KISS FFT - https://github.com/mborgerding/kissfft + * + * SPDX-License-Identifier: BSD-3-Clause + * See COPYING file for more information. + */ #include #include #include diff --git a/test/pstats.h b/test/pstats.h index 71ff02a..04a304b 100644 --- a/test/pstats.h +++ b/test/pstats.h @@ -1,3 +1,10 @@ +/* + * Copyright (c) 2003-2010, Mark Borgerding. All rights reserved. + * This file is part of KISS FFT - https://github.com/mborgerding/kissfft + * + * SPDX-License-Identifier: BSD-3-Clause + * See COPYING file for more information. + */ #ifndef PSTATS_H #define PSTATS_H diff --git a/test/test_real.c b/test/test_real.c index 36a0b08..9e4bd58 100644 --- a/test/test_real.c +++ b/test/test_real.c @@ -1,3 +1,10 @@ +/* + * Copyright (c) 2003-2010, Mark Borgerding. All rights reserved. + * This file is part of KISS FFT - https://github.com/mborgerding/kissfft + * + * SPDX-License-Identifier: BSD-3-Clause + * See COPYING file for more information. + */ #include "kiss_fftr.h" #include "_kiss_fft_guts.h" #include diff --git a/test/test_vs_dft.c b/test/test_vs_dft.c index 7ebb4a2..9a44129 100644 --- a/test/test_vs_dft.c +++ b/test/test_vs_dft.c @@ -1,3 +1,10 @@ +/* + * Copyright (c) 2003-2010, Mark Borgerding. All rights reserved. + * This file is part of KISS FFT - https://github.com/mborgerding/kissfft + * + * SPDX-License-Identifier: BSD-3-Clause + * See COPYING file for more information. + */ #include "kiss_fft.h" diff --git a/test/testcpp.cc b/test/testcpp.cc index d9b069d..a62f6e0 100644 --- a/test/testcpp.cc +++ b/test/testcpp.cc @@ -1,3 +1,10 @@ +/* + * Copyright (c) 2003-2010, Mark Borgerding. All rights reserved. + * This file is part of KISS FFT - https://github.com/mborgerding/kissfft + * + * SPDX-License-Identifier: BSD-3-Clause + * See COPYING file for more information. + */ #include "kissfft.hh" #include #include diff --git a/test/testkiss.py b/test/testkiss.py index af75065..98320d7 100755 --- a/test/testkiss.py +++ b/test/testkiss.py @@ -1,4 +1,9 @@ #!/usr/bin/env python +# Copyright (c) 2003-2010, Mark Borgerding. All rights reserved. +# This file is part of KISS FFT - https://github.com/mborgerding/kissfft +# +# SPDX-License-Identifier: BSD-3-Clause +# See COPYING file for more information. import math import sys diff --git a/test/twotonetest.c b/test/twotonetest.c index 7cc7190..5f08daf 100644 --- a/test/twotonetest.c +++ b/test/twotonetest.c @@ -1,3 +1,10 @@ +/* + * Copyright (c) 2003-2010, Mark Borgerding. All rights reserved. + * This file is part of KISS FFT - https://github.com/mborgerding/kissfft + * + * SPDX-License-Identifier: BSD-3-Clause + * See COPYING file for more information. + */ #include #include #include From 8049cde2d012e9dcad9a489882ebaeacb1a82f9c Mon Sep 17 00:00:00 2001 From: Mark Borgerding Date: Sat, 21 Jul 2018 11:06:22 -0400 Subject: [PATCH 7/8] ignore test artifacts --- .gitignore | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4fc1711 --- /dev/null +++ b/.gitignore @@ -0,0 +1,40 @@ +test/bm_fftw_double +test/bm_fftw_float +test/bm_fftw_int16_t +test/bm_fftw_int32_t +test/bm_fftw_simd +test/bm_kiss_double +test/bm_kiss_float +test/bm_kiss_int16_t +test/bm_kiss_int32_t +test/bm_kiss_simd +test/st_double +test/st_float +test/st_int16_t +test/st_int32_t +test/st_simd +test/tkfc_double +test/tkfc_float +test/tkfc_int16_t +test/tkfc_int32_t +test/tkfc_simd +test/tr_double +test/tr_float +test/tr_int16_t +test/tr_int32_t +test/tr_simd +tools/fastconv_double +tools/fastconv_float +tools/fastconv_int16_t +tools/fastconv_int32_t +tools/fastconv_simd +tools/fastconvr_double +tools/fastconvr_float +tools/fastconvr_int16_t +tools/fastconvr_int32_t +tools/fastconvr_simd +tools/fft_double +tools/fft_float +tools/fft_int16_t +tools/fft_int32_t +tools/fft_simd From c8f89f77bf37537b42cc3a8c0018175305d74284 Mon Sep 17 00:00:00 2001 From: Mark Borgerding Date: Sat, 21 Jul 2018 11:11:51 -0400 Subject: [PATCH 8/8] squelched multiple definition preprocessor warning --- tools/kiss_fftndr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/kiss_fftndr.h b/tools/kiss_fftndr.h index 472e479..e35c6ff 100644 --- a/tools/kiss_fftndr.h +++ b/tools/kiss_fftndr.h @@ -46,7 +46,7 @@ void kiss_fftndri( */ -#define kiss_fftr_free free +#define kiss_fftndr_free free #ifdef __cplusplus }