OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright (c) 2013 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 #ifndef WEBRTC_ARM_FFT_TEST_COMPARE_H_ |
| 12 #define WEBRTC_ARM_FFT_TEST_COMPARE_H_ |
| 13 |
| 14 #include "dl/api/omxtypes.h" |
| 15 |
| 16 struct SnrResult { |
| 17 /* SNR (in dB) for real component (for complex signals) */ |
| 18 float real_snr_; |
| 19 |
| 20 /* SNR (in dB) for imaginary component (for complex signals) */ |
| 21 float imag_snr_; |
| 22 |
| 23 /* SNR (in dB) for real and complex component (for complex signals) */ |
| 24 float complex_snr_; |
| 25 }; |
| 26 |
| 27 /* |
| 28 * Compute the SNR between the |actual| and |expected| signals of |
| 29 * length |size|. Three SNRs are computed. An SNR is computed for |
| 30 * just the real component, just the imaginary component, and the |
| 31 * complex component. The computed SNR is in dBs. |
| 32 */ |
| 33 void CompareComplex32(struct SnrResult* snr, OMX_SC32* actual, |
| 34 OMX_SC32* expected, int size); |
| 35 void CompareComplex16(struct SnrResult* snr, OMX_SC16* actual, |
| 36 OMX_SC16* expected, int size); |
| 37 void CompareReal32(struct SnrResult* snr, OMX_S32* actual, |
| 38 OMX_S32* expected, int size); |
| 39 void CompareReal16(struct SnrResult* snr, OMX_S16* actual, |
| 40 OMX_S16* expected, int size); |
| 41 void CompareComplexFloat(struct SnrResult* snr, OMX_FC32* actual, |
| 42 OMX_FC32* expected, int size); |
| 43 void CompareFloat(struct SnrResult* snr, OMX_F32* actual, |
| 44 OMX_F32* expected, int size); |
| 45 |
| 46 #endif |
OLD | NEW |