1 /* 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 3 * 4 * Use of this source code is governed by a BSD-style license 5 * that can be found in the LICENSE file in the root of the source 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11 #include "dl/sp/api/omxSP.h" 12 #include "dl/sp/src/test/test_util.h" 13 #include "dl/sp/src/test/support/float_rfft_thresholds.h" 14 15 static const char* message = 16 "Test forward and inverse real floating-point FFT (MIPS)\n"; 17 18 const char* UsageMessage() { 19 return message; 20 } 21 22 void FinishedMessage() { 23 printf("MIPS tests finished.\n"); 24 } 25 26 void SetThresholds(struct TestInfo* info) { 27 info->forward_threshold_ = FLOAT_RFFT_FORWARD_THRESHOLD_MIPS; 28 info->inverse_threshold_ = FLOAT_RFFT_INVERSE_THRESHOLD_MIPS; 29 } 30 31 OMXResult ForwardRFFT(OMX_F32* x, 32 OMX_F32* y, 33 OMXFFTSpec_R_F32* fft_fwd_spec) { 34 return omxSP_FFTFwd_RToCCS_F32_Sfs(x, y, fft_fwd_spec); 35 } 36 37 OMXResult InverseRFFT(OMX_F32* y, 38 OMX_F32* z, 39 OMXFFTSpec_R_F32* fft_inv_spec) { 40 return omxSP_FFTInv_CCSToR_F32_Sfs(y, z, fft_inv_spec); 41 } 42