Refactored and further optimized WebRtcSpl_MaxAbsValueW16() function in splib.

Review URL: https://webrtc-codereview.appspot.com/395008

git-svn-id: http://webrtc.googlecode.com/svn/trunk@1820 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
kma@webrtc.org
2012-03-01 20:03:26 +00:00
parent c9a3b81fd2
commit beb1851c2a
5 changed files with 100 additions and 72 deletions

View File

@@ -211,9 +211,17 @@ WebRtc_Word16 WebRtcSpl_OnesArrayW32(WebRtc_Word32* vector,
// End: Copy and set operations.
// Minimum and maximum operations. Implementation in min_max_operations.c.
// Descriptions at bottom of file.
WebRtc_Word16 WebRtcSpl_MaxAbsValueW16(const WebRtc_Word16* vector,
WebRtc_Word16 length);
// Returns the largest absolute value in a signed 16-bit vector.
//
// Input:
// - vector : Input vector.
// - length : Number of samples in vector.
//
// Return value : Maximum absolute value in vector.
int16_t WebRtcSpl_MaxAbsValueW16(const int16_t* vector, int length);
WebRtc_Word32 WebRtcSpl_MaxAbsValueW32(G_CONST WebRtc_Word32* vector,
WebRtc_Word16 length);
WebRtc_Word16 WebRtcSpl_MinValueW16(G_CONST WebRtc_Word16* vector,
@@ -855,8 +863,6 @@ void WebRtcSpl_SynthesisQMF(const WebRtc_Word16* low_band,
// Return value : Maximum sample value in vector
//
//
// WebRtcSpl_MaxAbsValueW16(...)
// WebRtcSpl_MaxAbsValueW32(...)
//
// Returns the largest absolute value of a vector