Cleaned up real_fft APIs due to non-existing NEON code
There are NEON APIs that are not used. Cleaning that up for better overview. BUG=3353 TESTED=locally on Linux and trybots R=kwiberg@webrtc.org Review URL: https://webrtc-codereview.appspot.com/31149004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@7827 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
ed7824b1c0
commit
ee43263a50
@ -24,27 +24,8 @@ struct RealFFT;
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct RealFFT* (*CreateRealFFT)(int order);
|
||||
typedef void (*FreeRealFFT)(struct RealFFT* self);
|
||||
typedef int (*RealForwardFFT)(struct RealFFT* self,
|
||||
const int16_t* real_data_in,
|
||||
int16_t* complex_data_out);
|
||||
typedef int (*RealInverseFFT)(struct RealFFT* self,
|
||||
const int16_t* complex_data_in,
|
||||
int16_t* real_data_out);
|
||||
|
||||
extern CreateRealFFT WebRtcSpl_CreateRealFFT;
|
||||
extern FreeRealFFT WebRtcSpl_FreeRealFFT;
|
||||
extern RealForwardFFT WebRtcSpl_RealForwardFFT;
|
||||
extern RealInverseFFT WebRtcSpl_RealInverseFFT;
|
||||
|
||||
struct RealFFT* WebRtcSpl_CreateRealFFTC(int order);
|
||||
void WebRtcSpl_FreeRealFFTC(struct RealFFT* self);
|
||||
|
||||
#if (defined WEBRTC_DETECT_ARM_NEON) || (defined WEBRTC_ARCH_ARM_NEON)
|
||||
struct RealFFT* WebRtcSpl_CreateRealFFTNeon(int order);
|
||||
void WebRtcSpl_FreeRealFFTNeon(struct RealFFT* self);
|
||||
#endif
|
||||
struct RealFFT* WebRtcSpl_CreateRealFFT(int order);
|
||||
void WebRtcSpl_FreeRealFFT(struct RealFFT* self);
|
||||
|
||||
// Compute an FFT for a real-valued signal of length of 2^order,
|
||||
// where 1 < order <= MAX_FFT_ORDER. Transform length is determined by the
|
||||
@ -77,15 +58,9 @@ void WebRtcSpl_FreeRealFFTNeon(struct RealFFT* self);
|
||||
// Return Value:
|
||||
// 0 - FFT calculation is successful.
|
||||
// -1 - Error with bad arguments (NULL pointers).
|
||||
int WebRtcSpl_RealForwardFFTC(struct RealFFT* self,
|
||||
const int16_t* real_data_in,
|
||||
int16_t* complex_data_out);
|
||||
|
||||
#if (defined WEBRTC_DETECT_ARM_NEON) || (defined WEBRTC_ARCH_ARM_NEON)
|
||||
int WebRtcSpl_RealForwardFFTNeon(struct RealFFT* self,
|
||||
const int16_t* real_data_in,
|
||||
int16_t* complex_data_out);
|
||||
#endif
|
||||
int WebRtcSpl_RealForwardFFT(struct RealFFT* self,
|
||||
const int16_t* real_data_in,
|
||||
int16_t* complex_data_out);
|
||||
|
||||
// Compute the inverse FFT for a conjugate-symmetric input sequence of length of
|
||||
// 2^order, where 1 < order <= MAX_FFT_ORDER. Transform length is determined by
|
||||
@ -111,15 +86,9 @@ int WebRtcSpl_RealForwardFFTNeon(struct RealFFT* self,
|
||||
// should be shifted left with in order to get
|
||||
// correct physical values.
|
||||
// -1 - Error with bad arguments (NULL pointers).
|
||||
int WebRtcSpl_RealInverseFFTC(struct RealFFT* self,
|
||||
const int16_t* complex_data_in,
|
||||
int16_t* real_data_out);
|
||||
|
||||
#if (defined WEBRTC_DETECT_ARM_NEON) || (defined WEBRTC_ARCH_ARM_NEON)
|
||||
int WebRtcSpl_RealInverseFFTNeon(struct RealFFT* self,
|
||||
const int16_t* complex_data_in,
|
||||
int16_t* real_data_out);
|
||||
#endif
|
||||
int WebRtcSpl_RealInverseFFT(struct RealFFT* self,
|
||||
const int16_t* complex_data_in,
|
||||
int16_t* real_data_out);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ struct RealFFT {
|
||||
int order;
|
||||
};
|
||||
|
||||
struct RealFFT* WebRtcSpl_CreateRealFFTC(int order) {
|
||||
struct RealFFT* WebRtcSpl_CreateRealFFT(int order) {
|
||||
struct RealFFT* self = NULL;
|
||||
|
||||
if (order > kMaxFFTOrder || order < 0) {
|
||||
@ -34,19 +34,19 @@ struct RealFFT* WebRtcSpl_CreateRealFFTC(int order) {
|
||||
return self;
|
||||
}
|
||||
|
||||
void WebRtcSpl_FreeRealFFTC(struct RealFFT* self) {
|
||||
void WebRtcSpl_FreeRealFFT(struct RealFFT* self) {
|
||||
if (self != NULL) {
|
||||
free(self);
|
||||
}
|
||||
}
|
||||
|
||||
// The C version FFT functions (i.e. WebRtcSpl_RealForwardFFTC and
|
||||
// WebRtcSpl_RealInverseFFTC) are real-valued FFT wrappers for complex-valued
|
||||
// The C version FFT functions (i.e. WebRtcSpl_RealForwardFFT and
|
||||
// WebRtcSpl_RealInverseFFT) are real-valued FFT wrappers for complex-valued
|
||||
// FFT implementation in SPL.
|
||||
|
||||
int WebRtcSpl_RealForwardFFTC(struct RealFFT* self,
|
||||
const int16_t* real_data_in,
|
||||
int16_t* complex_data_out) {
|
||||
int WebRtcSpl_RealForwardFFT(struct RealFFT* self,
|
||||
const int16_t* real_data_in,
|
||||
int16_t* complex_data_out) {
|
||||
int i = 0;
|
||||
int j = 0;
|
||||
int result = 0;
|
||||
@ -71,9 +71,9 @@ int WebRtcSpl_RealForwardFFTC(struct RealFFT* self,
|
||||
return result;
|
||||
}
|
||||
|
||||
int WebRtcSpl_RealInverseFFTC(struct RealFFT* self,
|
||||
const int16_t* complex_data_in,
|
||||
int16_t* real_data_out) {
|
||||
int WebRtcSpl_RealInverseFFT(struct RealFFT* self,
|
||||
const int16_t* complex_data_in,
|
||||
int16_t* real_data_out) {
|
||||
int i = 0;
|
||||
int j = 0;
|
||||
int result = 0;
|
||||
@ -100,27 +100,3 @@ int WebRtcSpl_RealInverseFFTC(struct RealFFT* self,
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
#if defined(WEBRTC_DETECT_ARM_NEON) || defined(WEBRTC_ARCH_ARM_NEON)
|
||||
// TODO(kma): Replace the following function bodies into optimized functions
|
||||
// for ARM Neon.
|
||||
struct RealFFT* WebRtcSpl_CreateRealFFTNeon(int order) {
|
||||
return WebRtcSpl_CreateRealFFTC(order);
|
||||
}
|
||||
|
||||
void WebRtcSpl_FreeRealFFTNeon(struct RealFFT* self) {
|
||||
WebRtcSpl_FreeRealFFTC(self);
|
||||
}
|
||||
|
||||
int WebRtcSpl_RealForwardFFTNeon(struct RealFFT* self,
|
||||
const int16_t* real_data_in,
|
||||
int16_t* complex_data_out) {
|
||||
return WebRtcSpl_RealForwardFFTC(self, real_data_in, complex_data_out);
|
||||
}
|
||||
|
||||
int WebRtcSpl_RealInverseFFTNeon(struct RealFFT* self,
|
||||
const int16_t* complex_data_in,
|
||||
int16_t* real_data_out) {
|
||||
return WebRtcSpl_RealInverseFFTC(self, complex_data_in, real_data_out);
|
||||
}
|
||||
#endif // WEBRTC_DETECT_ARM_NEON || WEBRTC_ARCH_ARM_NEON
|
||||
|
@ -14,7 +14,6 @@
|
||||
* Some code came from common/rtcd.c in the WebM project.
|
||||
*/
|
||||
|
||||
#include "webrtc/common_audio/signal_processing/include/real_fft.h"
|
||||
#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
|
||||
#include "webrtc/system_wrappers/interface/cpu_features_wrapper.h"
|
||||
|
||||
@ -28,10 +27,6 @@ MinValueW32 WebRtcSpl_MinValueW32;
|
||||
CrossCorrelation WebRtcSpl_CrossCorrelation;
|
||||
DownsampleFast WebRtcSpl_DownsampleFast;
|
||||
ScaleAndAddVectorsWithRound WebRtcSpl_ScaleAndAddVectorsWithRound;
|
||||
CreateRealFFT WebRtcSpl_CreateRealFFT;
|
||||
FreeRealFFT WebRtcSpl_FreeRealFFT;
|
||||
RealForwardFFT WebRtcSpl_RealForwardFFT;
|
||||
RealInverseFFT WebRtcSpl_RealInverseFFT;
|
||||
|
||||
#if (defined(WEBRTC_DETECT_ARM_NEON) || !defined(WEBRTC_ARCH_ARM_NEON)) && \
|
||||
!defined(MIPS32_LE)
|
||||
@ -47,10 +42,6 @@ static void InitPointersToC() {
|
||||
WebRtcSpl_DownsampleFast = WebRtcSpl_DownsampleFastC;
|
||||
WebRtcSpl_ScaleAndAddVectorsWithRound =
|
||||
WebRtcSpl_ScaleAndAddVectorsWithRoundC;
|
||||
WebRtcSpl_CreateRealFFT = WebRtcSpl_CreateRealFFTC;
|
||||
WebRtcSpl_FreeRealFFT = WebRtcSpl_FreeRealFFTC;
|
||||
WebRtcSpl_RealForwardFFT = WebRtcSpl_RealForwardFFTC;
|
||||
WebRtcSpl_RealInverseFFT = WebRtcSpl_RealInverseFFTC;
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -69,10 +60,6 @@ static void InitPointersToNeon() {
|
||||
understood. */
|
||||
WebRtcSpl_ScaleAndAddVectorsWithRound =
|
||||
WebRtcSpl_ScaleAndAddVectorsWithRoundC;
|
||||
WebRtcSpl_CreateRealFFT = WebRtcSpl_CreateRealFFTNeon;
|
||||
WebRtcSpl_FreeRealFFT = WebRtcSpl_FreeRealFFTNeon;
|
||||
WebRtcSpl_RealForwardFFT = WebRtcSpl_RealForwardFFTNeon;
|
||||
WebRtcSpl_RealInverseFFT = WebRtcSpl_RealInverseFFTNeon;
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -86,10 +73,6 @@ static void InitPointersToMIPS() {
|
||||
WebRtcSpl_MinValueW32 = WebRtcSpl_MinValueW32_mips;
|
||||
WebRtcSpl_CrossCorrelation = WebRtcSpl_CrossCorrelation_mips;
|
||||
WebRtcSpl_DownsampleFast = WebRtcSpl_DownsampleFast_mips;
|
||||
WebRtcSpl_CreateRealFFT = WebRtcSpl_CreateRealFFTC;
|
||||
WebRtcSpl_FreeRealFFT = WebRtcSpl_FreeRealFFTC;
|
||||
WebRtcSpl_RealForwardFFT = WebRtcSpl_RealForwardFFTC;
|
||||
WebRtcSpl_RealInverseFFT = WebRtcSpl_RealInverseFFTC;
|
||||
#if defined(MIPS_DSP_R1_LE)
|
||||
WebRtcSpl_MaxAbsValueW32 = WebRtcSpl_MaxAbsValueW32_mips;
|
||||
WebRtcSpl_ScaleAndAddVectorsWithRound =
|
||||
|
Loading…
x
Reference in New Issue
Block a user