From 8a838fd207744022983a855b6e6ef04bf08af9df Mon Sep 17 00:00:00 2001 From: Artem Titov Date: Tue, 24 Jul 2018 15:37:09 +0200 Subject: [PATCH] Move fft to proper third_party directory Bug: webrtc:8366 Change-Id: I741a381fe1cf18909baefd89743b2ff4fe0a6bae Reviewed-on: https://webrtc-review.googlesource.com/86822 Reviewed-by: Niklas Enbom Reviewed-by: Oskar Sundbom Reviewed-by: Mirko Bonadei Commit-Queue: Artem Titov Cr-Commit-Position: refs/heads/master@{#24091} --- LICENSE_THIRD_PARTY | 30 ------------------- modules/audio_coding/BUILD.gn | 13 +------- .../codecs/isac/main/source/transform.c | 2 +- modules/third_party/fft/BUILD.gn | 20 +++++++++++++ modules/third_party/fft/LICENSE | 25 ++++++++++++++++ modules/third_party/fft/README.chromium | 12 ++++++++ .../main/source => third_party/fft}/fft.c | 4 +-- .../main/source => third_party/fft}/fft.h | 0 tools_webrtc/libs/generate_licenses.py | 1 + 9 files changed, 62 insertions(+), 45 deletions(-) create mode 100644 modules/third_party/fft/BUILD.gn create mode 100644 modules/third_party/fft/LICENSE create mode 100644 modules/third_party/fft/README.chromium rename modules/{audio_coding/codecs/isac/main/source => third_party/fft}/fft.c (99%) rename modules/{audio_coding/codecs/isac/main/source => third_party/fft}/fft.h (100%) diff --git a/LICENSE_THIRD_PARTY b/LICENSE_THIRD_PARTY index 7838d57473..080a6bf814 100644 --- a/LICENSE_THIRD_PARTY +++ b/LICENSE_THIRD_PARTY @@ -110,36 +110,6 @@ License: */ ------------------------------------------------------------------------------- Files: -modules/audio_coding/codecs/isac/main/source/fft.c - -License: -/* - * Copyright(c)1995,97 Mark Olesen - * Queen's Univ at Kingston (Canada) - * - * Permission to use, copy, modify, and distribute this software for - * any purpose without fee is hereby granted, provided that this - * entire notice is included in all copies of any software which is - * or includes a copy or modification of this software and in all - * copies of the supporting documentation for such software. - * - * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR QUEEN'S - * UNIVERSITY AT KINGSTON MAKES ANY REPRESENTATION OR WARRANTY OF ANY - * KIND CONCERNING THE MERCHANTABILITY OF THIS SOFTWARE OR ITS - * FITNESS FOR ANY PARTICULAR PURPOSE. - * - * All of which is to say that you can do what you like with this - * source code provided you don't try to sell it as your own and you - * include an unaltered copy of this message (including the - * copyright). - * - * It is also implicitly understood that bug fixes and improvements - * should make their way back to the general Internet community so - * that everyone benefits. - */ -------------------------------------------------------------------------------- -Files: common_audio/fft4g.c License: diff --git a/modules/audio_coding/BUILD.gn b/modules/audio_coding/BUILD.gn index 8cd7ab48df..c7ed147c1f 100644 --- a/modules/audio_coding/BUILD.gn +++ b/modules/audio_coding/BUILD.gn @@ -575,7 +575,6 @@ rtc_static_library("isac_c") { } deps = [ - ":fft", ":isac_bwinfo", ":isac_vad", "../..:typedefs", @@ -585,17 +584,7 @@ rtc_static_library("isac_c") { "../../rtc_base:checks", "../../rtc_base:compile_assert_c", "../../rtc_base:rtc_base_approved", - ] -} - -rtc_source_set("fft") { - poisonous = [ "audio_codecs" ] - sources = [ - "codecs/isac/main/source/fft.c", - "codecs/isac/main/source/fft.h", - ] - deps = [ - ":isac_vad", + "../third_party/fft:fft", ] } diff --git a/modules/audio_coding/codecs/isac/main/source/transform.c b/modules/audio_coding/codecs/isac/main/source/transform.c index bfbfecb654..082ad941c4 100644 --- a/modules/audio_coding/codecs/isac/main/source/transform.c +++ b/modules/audio_coding/codecs/isac/main/source/transform.c @@ -11,9 +11,9 @@ #include #include "modules/audio_coding/codecs/isac/main/source/settings.h" -#include "modules/audio_coding/codecs/isac/main/source/fft.h" #include "modules/audio_coding/codecs/isac/main/source/codec.h" #include "modules/audio_coding/codecs/isac/main/source/os_specific_inline.h" +#include "modules/third_party/fft/fft.h" void WebRtcIsac_InitTransform(TransformTables* tables) { int k; diff --git a/modules/third_party/fft/BUILD.gn b/modules/third_party/fft/BUILD.gn new file mode 100644 index 0000000000..1a8e79b8a3 --- /dev/null +++ b/modules/third_party/fft/BUILD.gn @@ -0,0 +1,20 @@ +# Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. +# +# Use of this source code is governed by a BSD-style license +# that can be found in the LICENSE file in the root of the source +# tree. An additional intellectual property rights grant can be found +# in the file PATENTS. All contributing project authors may +# be found in the AUTHORS file in the root of the source tree. + +import("../../../webrtc.gni") + +rtc_source_set("fft") { + poisonous = [ "audio_codecs" ] + sources = [ + "fft.c", + "fft.h", + ] + deps = [ + "../../audio_coding:isac_vad", + ] +} diff --git a/modules/third_party/fft/LICENSE b/modules/third_party/fft/LICENSE new file mode 100644 index 0000000000..c0a78058cf --- /dev/null +++ b/modules/third_party/fft/LICENSE @@ -0,0 +1,25 @@ +/* + * Copyright(c)1995,97 Mark Olesen + * Queen's Univ at Kingston (Canada) + * + * Permission to use, copy, modify, and distribute this software for + * any purpose without fee is hereby granted, provided that this + * entire notice is included in all copies of any software which is + * or includes a copy or modification of this software and in all + * copies of the supporting documentation for such software. + * + * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR QUEEN'S + * UNIVERSITY AT KINGSTON MAKES ANY REPRESENTATION OR WARRANTY OF ANY + * KIND CONCERNING THE MERCHANTABILITY OF THIS SOFTWARE OR ITS + * FITNESS FOR ANY PARTICULAR PURPOSE. + * + * All of which is to say that you can do what you like with this + * source code provided you don't try to sell it as your own and you + * include an unaltered copy of this message (including the + * copyright). + * + * It is also implicitly understood that bug fixes and improvements + * should make their way back to the general Internet community so + * that everyone benefits. + */ diff --git a/modules/third_party/fft/README.chromium b/modules/third_party/fft/README.chromium new file mode 100644 index 0000000000..a373b99552 --- /dev/null +++ b/modules/third_party/fft/README.chromium @@ -0,0 +1,12 @@ +Name: fft +Short Name: fft +URL: +Version: 0 +Date: 2018-02-01 +License: Custom license +License File: LICENSE +Security Critical: yes + +Description: +Multivariate complex Fourier transform, computed in place +using mixed-radix Fast Fourier Transform algorithm. diff --git a/modules/audio_coding/codecs/isac/main/source/fft.c b/modules/third_party/fft/fft.c similarity index 99% rename from modules/audio_coding/codecs/isac/main/source/fft.c rename to modules/third_party/fft/fft.c index a3cbd5ef64..ffce99b020 100644 --- a/modules/audio_coding/codecs/isac/main/source/fft.c +++ b/modules/third_party/fft/fft.c @@ -127,7 +127,7 @@ #include #include -#include "modules/audio_coding/codecs/isac/main/source/fft.h" +#include "modules/third_party/fft/fft.h" /* double precision routine */ static int @@ -211,7 +211,7 @@ int WebRtcIsac_Fftns(unsigned int ndim, const int dims[], { max_factors = (int)nSpan; } - if ((int)nSpan > max_perm) + if ((int)nSpan > max_perm) { max_perm = (int)nSpan; } diff --git a/modules/audio_coding/codecs/isac/main/source/fft.h b/modules/third_party/fft/fft.h similarity index 100% rename from modules/audio_coding/codecs/isac/main/source/fft.h rename to modules/third_party/fft/fft.h diff --git a/tools_webrtc/libs/generate_licenses.py b/tools_webrtc/libs/generate_licenses.py index 66137f795c..0281c40547 100755 --- a/tools_webrtc/libs/generate_licenses.py +++ b/tools_webrtc/libs/generate_licenses.py @@ -49,6 +49,7 @@ LIB_TO_LICENSES_DICT = { 'zlib': ['third_party/zlib/LICENSE'], 'base64': ['rtc_base/third_party/base64/LICENSE'], 'portaudio': ['modules/third_party/portaudio/LICENSE'], + 'fft': ['modules/third_party/fft/LICENSE'], # Compile time dependencies, no license needed: 'yasm': [],