Optimized WebRtcSpl_ComplexBitReverse() for general ARM platforms and generic C.
In ARMv5, the cycles were reduced by 88% (weight in VoE reduced from 3.554% to 0.432%). The tradeoff is a memory increase of 704 bytes. Review URL: https://webrtc-codereview.appspot.com/388003 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1757 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@@ -429,9 +429,26 @@ int WebRtcSpl_DownsampleFast(const int16_t* data_in,
|
||||
// End: Filter operations.
|
||||
|
||||
// FFT operations
|
||||
|
||||
int WebRtcSpl_ComplexFFT(WebRtc_Word16 vector[], int stages, int mode);
|
||||
int WebRtcSpl_ComplexIFFT(WebRtc_Word16 vector[], int stages, int mode);
|
||||
void WebRtcSpl_ComplexBitReverse(WebRtc_Word16 vector[], int stages);
|
||||
|
||||
// Treat a 16-bit complex data buffer |complex_data| as an array of 32-bit
|
||||
// values, and swap elements whose indexes are bit-reverses of each other.
|
||||
//
|
||||
// Input:
|
||||
// - complex_data : Complex data buffer containing 2^|stages| real
|
||||
// elements interleaved with 2^|stages| imaginary
|
||||
// elements: [Re Im Re Im Re Im....]
|
||||
// - stages : Number of FFT stages. Must be at least 3 and at most
|
||||
// 10, since the table WebRtcSpl_kSinTable1024[] is 1024
|
||||
// elements long.
|
||||
//
|
||||
// Output:
|
||||
// - complex_data : The complex data buffer.
|
||||
|
||||
void WebRtcSpl_ComplexBitReverse(int16_t* __restrict complex_data, int stages);
|
||||
|
||||
// End: FFT operations
|
||||
|
||||
/************************************************************
|
||||
@@ -1573,31 +1590,6 @@ void WebRtcSpl_SynthesisQMF(const WebRtc_Word16* low_band,
|
||||
// which returns a scale value of -1, indicating error.
|
||||
//
|
||||
|
||||
//
|
||||
// WebRtcSpl_ComplexBitReverse(...)
|
||||
//
|
||||
// Complex Bit Reverse
|
||||
//
|
||||
// This function bit-reverses the position of elements in the complex input
|
||||
// vector into the output vector.
|
||||
//
|
||||
// If you bit-reverse a linear-order array, you obtain a bit-reversed order
|
||||
// array. If you bit-reverse a bit-reversed order array, you obtain a
|
||||
// linear-order array.
|
||||
//
|
||||
// Input:
|
||||
// - vector : In pointer to complex vector containing 2^|stages| real
|
||||
// elements interleaved with 2^|stages| imaginary elements.
|
||||
// [ReImReImReIm....]
|
||||
// - stages : Number of FFT stages. Must be at least 3 and at most 10,
|
||||
// since the table WebRtcSpl_kSinTable1024[] is 1024
|
||||
// elements long.
|
||||
//
|
||||
// Output:
|
||||
// - vector : Out pointer to complex vector in bit-reversed order.
|
||||
// The input vector is over written.
|
||||
//
|
||||
|
||||
//
|
||||
// WebRtcSpl_AnalysisQMF(...)
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user