From 78ad6ce381c649bb9ac0fdf11d86a0b85df7981c Mon Sep 17 00:00:00 2001 From: Alessio Bazzica Date: Mon, 7 May 2018 11:53:28 +0200 Subject: [PATCH] Removing openmax_dl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow-up CL of https://webrtc-review.googlesource.com/c/src/+/69641 in which the 3pp lib openmax_dl had been disabled (but not removed). Bug: webrtc:9071 Change-Id: Id766e4a48ab255a86e13f5f5f1480aee88c428a5 Reviewed-on: https://webrtc-review.googlesource.com/74482 Commit-Queue: Alessio Bazzica Reviewed-by: Patrik Höglund Reviewed-by: Henrik Lundin Reviewed-by: Henrik Andreassson Reviewed-by: Mirko Bonadei Cr-Commit-Position: refs/heads/master@{#23140} --- DEPS | 6 -- common_audio/BUILD.gn | 14 ---- common_audio/DEPS | 1 - common_audio/real_fourier_openmax.cc | 73 ------------------- common_audio/real_fourier_openmax.h | 48 ------------ common_audio/real_fourier_unittest.cc | 4 - .../signal_processing/include/real_fft.h | 1 - tools_webrtc/libs/generate_licenses.py | 1 - webrtc.gni | 6 -- 9 files changed, 154 deletions(-) delete mode 100644 common_audio/real_fourier_openmax.cc delete mode 100644 common_audio/real_fourier_openmax.h diff --git a/DEPS b/DEPS index 7d70d28cba..3988b36eb5 100644 --- a/DEPS +++ b/DEPS @@ -14,10 +14,6 @@ vars = { # and whatever else without interference from each other. 'swarming_revision': '88229872dd17e71658fe96763feaa77915d8cbd6', # Three lines of non-changing comments so that - # the commit queue can handle CLs rolling openmax_dl - # and whatever else without interference from each other. - 'openmax_dl_revision': '59265e0e9105ec94e473b59c5c7ca1941e4dbd83', - # Three lines of non-changing comments so that # the commit queue can handle CLs rolling BoringSSL # and whatever else without interference from each other. 'boringssl_revision': '8e75ae488047c519f14f2c08b02a55bf7712fa1d', @@ -142,8 +138,6 @@ deps = { }, 'src/third_party/openh264/src': Var('chromium_git') + '/external/github.com/cisco/openh264' + '@' + '3b51f16a4a41df729f8d647f03e48c5f272911ff', - 'src/third_party/openmax_dl': - Var('webrtc_git') + '/deps/third_party/openmax.git' + '@' + Var('openmax_dl_revision'), 'src/third_party/requests/src': { 'url': Var('chromium_git') + '/external/github.com/kennethreitz/requests.git' + '@' + 'f172b30356d821d180fa4ecfa3e71c7274a32de4', 'condition': 'checkout_android', diff --git a/common_audio/BUILD.gn b/common_audio/BUILD.gn index 057b11cc42..32cca43f3c 100644 --- a/common_audio/BUILD.gn +++ b/common_audio/BUILD.gn @@ -75,16 +75,6 @@ rtc_static_library("common_audio") { ] defines = [] - if (rtc_use_openmax_dl) { - sources += [ - "real_fourier_openmax.cc", - "real_fourier_openmax.h", - ] - defines += [ "RTC_USE_OPENMAX_DL" ] - if (rtc_build_openmax_dl) { - deps += [ "//third_party/openmax_dl/dl" ] - } - } if (rtc_build_with_neon) { deps += [ ":common_audio_neon" ] @@ -438,10 +428,6 @@ if (rtc_include_tests) { sources += [ "resampler/sinc_resampler_unittest.cc" ] } - if (rtc_use_openmax_dl) { - defines = [ "RTC_USE_OPENMAX_DL" ] - } - if (!build_with_chromium && is_clang) { # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] diff --git a/common_audio/DEPS b/common_audio/DEPS index 47ce4c32b6..8a9adf19f9 100644 --- a/common_audio/DEPS +++ b/common_audio/DEPS @@ -1,4 +1,3 @@ include_rules = [ - "+dl/sp/api", # For openmax_dl. "+system_wrappers", ] diff --git a/common_audio/real_fourier_openmax.cc b/common_audio/real_fourier_openmax.cc deleted file mode 100644 index 3c4d0e5aa3..0000000000 --- a/common_audio/real_fourier_openmax.cc +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2015 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. - */ - -// TODO(http://bugs.webrtc.org/9071): Required by downstream projects. -#ifdef RTC_USE_OPENMAX_DL - -#include "common_audio/real_fourier_openmax.h" - -#include - -#include "dl/sp/api/omxSP.h" -#include "rtc_base/checks.h" - -namespace webrtc { - -using std::complex; - -namespace { - -// Creates and initializes the Openmax state. Transfers ownership to caller. -OMXFFTSpec_R_F32* CreateOpenmaxState(int order) { - RTC_CHECK_GE(order, 1); - // The omx implementation uses this macro to check order validity. - RTC_CHECK_LE(order, TWIDDLE_TABLE_ORDER); - - OMX_INT buffer_size; - OMXResult r = omxSP_FFTGetBufSize_R_F32(order, &buffer_size); - RTC_CHECK_EQ(r, OMX_Sts_NoErr); - - OMXFFTSpec_R_F32* omx_spec = malloc(buffer_size); - RTC_DCHECK(omx_spec); - - r = omxSP_FFTInit_R_F32(omx_spec, order); - RTC_CHECK_EQ(r, OMX_Sts_NoErr); - return omx_spec; -} - -} // namespace - -RealFourierOpenmax::RealFourierOpenmax(int fft_order) - : order_(fft_order), - omx_spec_(CreateOpenmaxState(order_)) { -} - -RealFourierOpenmax::~RealFourierOpenmax() { - free(omx_spec_); -} - -void RealFourierOpenmax::Forward(const float* src, complex* dest) const { - // This cast is well-defined since C++11. See "Non-static data members" at: - // http://en.cppreference.com/w/cpp/numeric/complex - OMXResult r = - omxSP_FFTFwd_RToCCS_F32(src, reinterpret_cast(dest), omx_spec_); - RTC_CHECK_EQ(r, OMX_Sts_NoErr); -} - -void RealFourierOpenmax::Inverse(const complex* src, float* dest) const { - OMXResult r = - omxSP_FFTInv_CCSToR_F32(reinterpret_cast(src), dest, - omx_spec_); - RTC_CHECK_EQ(r, OMX_Sts_NoErr); -} - -} // namespace webrtc - -#endif // 0 diff --git a/common_audio/real_fourier_openmax.h b/common_audio/real_fourier_openmax.h deleted file mode 100644 index e1322805f9..0000000000 --- a/common_audio/real_fourier_openmax.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2015 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. - */ - -#ifndef COMMON_AUDIO_REAL_FOURIER_OPENMAX_H_ -#define COMMON_AUDIO_REAL_FOURIER_OPENMAX_H_ - -// TODO(http://bugs.webrtc.org/9071): Required by downstream projects. -#ifdef RTC_USE_OPENMAX_DL - -#include - -#include "common_audio/real_fourier.h" - -namespace webrtc { - -class RealFourierOpenmax : public RealFourier { - public: - explicit RealFourierOpenmax(int fft_order); - ~RealFourierOpenmax() override; - - void Forward(const float* src, std::complex* dest) const override; - void Inverse(const std::complex* src, float* dest) const override; - - int order() const override { - return order_; - } - - private: - // Basically a forward declare of OMXFFTSpec_R_F32. To get rid of the - // dependency on openmax. - typedef void OMXFFTSpec_R_F32_; - const int order_; - - OMXFFTSpec_R_F32_* const omx_spec_; -}; - -} // namespace webrtc - -#endif // RTC_USE_OPENMAX_DL - -#endif // COMMON_AUDIO_REAL_FOURIER_OPENMAX_H_ diff --git a/common_audio/real_fourier_unittest.cc b/common_audio/real_fourier_unittest.cc index e6ec012038..d5b6942fc5 100644 --- a/common_audio/real_fourier_unittest.cc +++ b/common_audio/real_fourier_unittest.cc @@ -15,10 +15,6 @@ #include "common_audio/real_fourier_ooura.h" #include "test/gtest.h" -#ifdef RTC_USE_OPENMAX_DL -#include "common_audio/real_fourier_openmax.h" -#endif - namespace webrtc { using std::complex; diff --git a/common_audio/signal_processing/include/real_fft.h b/common_audio/signal_processing/include/real_fft.h index 7d21072bc7..00d18caeb5 100644 --- a/common_audio/signal_processing/include/real_fft.h +++ b/common_audio/signal_processing/include/real_fft.h @@ -14,7 +14,6 @@ #include "typedefs.h" // NOLINT(build/include) // For ComplexFFT(), the maximum fft order is 10; -// for OpenMax FFT in ARM, it is 12; // WebRTC APM uses orders of only 7 and 8. enum {kMaxFFTOrder = 10}; diff --git a/tools_webrtc/libs/generate_licenses.py b/tools_webrtc/libs/generate_licenses.py index df7ad8210e..64e5fc9f2e 100755 --- a/tools_webrtc/libs/generate_licenses.py +++ b/tools_webrtc/libs/generate_licenses.py @@ -41,7 +41,6 @@ LIB_TO_LICENSES_DICT = { 'libsrtp': ['third_party/libsrtp/LICENSE'], 'libvpx': ['third_party/libvpx/source/libvpx/LICENSE'], 'libyuv': ['third_party/libyuv/LICENSE'], - 'openmax_dl': ['third_party/openmax_dl/LICENSE'], 'opus': ['third_party/opus/src/COPYING'], 'protobuf': ['third_party/protobuf/LICENSE'], 'rnnoise': ['third_party/rnnoise/COPYING'], diff --git a/webrtc.gni b/webrtc.gni index 7740f84b4b..35a65e76f3 100644 --- a/webrtc.gni +++ b/webrtc.gni @@ -171,9 +171,6 @@ declare_args() { rtc_build_ssl = !build_with_mozilla rtc_build_usrsctp = !build_with_mozilla - # TODO(http://bugs.webrtc.org/9071): Remove flag when openmax_dl is deleted. - rtc_build_openmax_dl = false - # Enable libevent task queues on platforms that support it. # rtc_link_task_queue_impl must be set to true for this to # have an effect. @@ -185,9 +182,6 @@ declare_args() { rtc_build_libevent = !build_with_mozilla } - # TODO(http://bugs.webrtc.org/9071): Remove flag when openmax_dl is deleted. - rtc_use_openmax_dl = false - # Build sources requiring GTK. NOTICE: This is not present in Chrome OS # build environments, even if available for Chromium builds. rtc_use_gtk = !build_with_chromium && !build_with_mozilla