1160311f8f0a09062f4360709d2965e71d3f3d749rtoy@google.com/* 2160311f8f0a09062f4360709d2965e71d3f3d749rtoy@google.com * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 3160311f8f0a09062f4360709d2965e71d3f3d749rtoy@google.com * 4160311f8f0a09062f4360709d2965e71d3f3d749rtoy@google.com * Use of this source code is governed by a BSD-style license 5160311f8f0a09062f4360709d2965e71d3f3d749rtoy@google.com * that can be found in the LICENSE file in the root of the source 6160311f8f0a09062f4360709d2965e71d3f3d749rtoy@google.com * tree. An additional intellectual property rights grant can be found 7160311f8f0a09062f4360709d2965e71d3f3d749rtoy@google.com * in the file PATENTS. All contributing project authors may 8160311f8f0a09062f4360709d2965e71d3f3d749rtoy@google.com * be found in the AUTHORS file in the root of the source tree. 9160311f8f0a09062f4360709d2965e71d3f3d749rtoy@google.com */ 10160311f8f0a09062f4360709d2965e71d3f3d749rtoy@google.com 11160311f8f0a09062f4360709d2965e71d3f3d749rtoy@google.com#include "dl/sp/api/armSP.h" 12160311f8f0a09062f4360709d2965e71d3f3d749rtoy@google.com#include "dl/sp/api/omxSP.h" 13160311f8f0a09062f4360709d2965e71d3f3d749rtoy@google.com#include "dl/sp/src/test/test_util.h" 14160311f8f0a09062f4360709d2965e71d3f3d749rtoy@google.com#include "dl/sp/src/test/support/float_rfft_thresholds.h" 15160311f8f0a09062f4360709d2965e71d3f3d749rtoy@google.com 16160311f8f0a09062f4360709d2965e71d3f3d749rtoy@google.comstatic const char* message = 17160311f8f0a09062f4360709d2965e71d3f3d749rtoy@google.com "Test forward and inverse real floating-point FFT (Non-NEON)\n"; 18160311f8f0a09062f4360709d2965e71d3f3d749rtoy@google.com 19160311f8f0a09062f4360709d2965e71d3f3d749rtoy@google.comconst char* UsageMessage() { 20160311f8f0a09062f4360709d2965e71d3f3d749rtoy@google.com return message; 21160311f8f0a09062f4360709d2965e71d3f3d749rtoy@google.com} 22160311f8f0a09062f4360709d2965e71d3f3d749rtoy@google.com 23160311f8f0a09062f4360709d2965e71d3f3d749rtoy@google.comvoid FinishedMessage() { 24160311f8f0a09062f4360709d2965e71d3f3d749rtoy@google.com printf("Non-NEON tests finished.\n"); 25160311f8f0a09062f4360709d2965e71d3f3d749rtoy@google.com} 26160311f8f0a09062f4360709d2965e71d3f3d749rtoy@google.com 27160311f8f0a09062f4360709d2965e71d3f3d749rtoy@google.comvoid SetThresholds(struct TestInfo* info) { 28160311f8f0a09062f4360709d2965e71d3f3d749rtoy@google.com info->forward_threshold_ = FLOAT_RFFT_FORWARD_THRESHOLD_ARMV7; 29160311f8f0a09062f4360709d2965e71d3f3d749rtoy@google.com info->inverse_threshold_ = FLOAT_RFFT_INVERSE_THRESHOLD_ARMV7; 30160311f8f0a09062f4360709d2965e71d3f3d749rtoy@google.com} 31160311f8f0a09062f4360709d2965e71d3f3d749rtoy@google.com 32160311f8f0a09062f4360709d2965e71d3f3d749rtoy@google.comOMXResult ForwardRFFT(OMX_F32* x, 33160311f8f0a09062f4360709d2965e71d3f3d749rtoy@google.com OMX_F32* y, 34160311f8f0a09062f4360709d2965e71d3f3d749rtoy@google.com OMXFFTSpec_R_F32 *fft_fwd_spec) { 35160311f8f0a09062f4360709d2965e71d3f3d749rtoy@google.com return omxSP_FFTFwd_RToCCS_F32_Sfs_vfp(x, y, fft_fwd_spec); 36160311f8f0a09062f4360709d2965e71d3f3d749rtoy@google.com} 37160311f8f0a09062f4360709d2965e71d3f3d749rtoy@google.com 38160311f8f0a09062f4360709d2965e71d3f3d749rtoy@google.comOMXResult InverseRFFT(OMX_F32* y, 39160311f8f0a09062f4360709d2965e71d3f3d749rtoy@google.com OMX_F32* z, 40160311f8f0a09062f4360709d2965e71d3f3d749rtoy@google.com OMXFFTSpec_R_F32 *fft_inv_spec) { 41160311f8f0a09062f4360709d2965e71d3f3d749rtoy@google.com return omxSP_FFTInv_CCSToR_F32_Sfs_vfp(y, z, fft_inv_spec); 42160311f8f0a09062f4360709d2965e71d3f3d749rtoy@google.com} 43