Added more unit tests for min-max operations in signal processing module.

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@2570 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
kma@webrtc.org
2012-08-07 19:35:00 +00:00
parent 5d6be542be
commit da236dfde5
2 changed files with 101 additions and 26 deletions

View File

@@ -281,8 +281,11 @@ int32_t WebRtcSpl_MinValueW32(const int32_t* vector, int length);
// - vector : 16-bit input vector.
// - length : Number of samples in vector.
//
// Return value : Index to the maximum absolute value in vector;
// or -1, if (vector == NULL || length <= 0).
// Return value : Index to the maximum absolute value in vector, or -1,
// if (vector == NULL || length <= 0).
// If there are multiple equal maxima, return the index of the
// first. -32768 will always have precedence over 32767 (despite
// -32768 presenting an int16 absolute value of 32767);
int WebRtcSpl_MaxAbsIndexW16(const int16_t* vector, int length);
// Returns the vector index to the maximum sample value of a 16-bit vector.
@@ -291,7 +294,8 @@ int WebRtcSpl_MaxAbsIndexW16(const int16_t* vector, int length);
// - vector : 16-bit input vector.
// - length : Number of samples in vector.
//
// Return value : Index to the maximum value in vector;
// Return value : Index to the maximum value in vector (if multiple
// indexes have the maximum, return the first);
// or -1, if (vector == NULL || length <= 0).
int WebRtcSpl_MaxIndexW16(const int16_t* vector, int length);
@@ -301,7 +305,8 @@ int WebRtcSpl_MaxIndexW16(const int16_t* vector, int length);
// - vector : 32-bit input vector.
// - length : Number of samples in vector.
//
// Return value : Index to the maximum value in vector;
// Return value : Index to the maximum value in vector (if multiple
// indexes have the maximum, return the first);
// or -1, if (vector == NULL || length <= 0).
int WebRtcSpl_MaxIndexW32(const int32_t* vector, int length);
@@ -311,7 +316,8 @@ int WebRtcSpl_MaxIndexW32(const int32_t* vector, int length);
// - vector : 16-bit input vector.
// - length : Number of samples in vector.
//
// Return value : Index to the mimimum value in vector;
// Return value : Index to the mimimum value in vector (if multiple
// indexes have the minimum, return the first);
// or -1, if (vector == NULL || length <= 0).
int WebRtcSpl_MinIndexW16(const int16_t* vector, int length);
@@ -321,7 +327,8 @@ int WebRtcSpl_MinIndexW16(const int16_t* vector, int length);
// - vector : 32-bit input vector.
// - length : Number of samples in vector.
//
// Return value : Index to the mimimum value in vector;
// Return value : Index to the mimimum value in vector (if multiple
// indexes have the minimum, return the first);
// or -1, if (vector == NULL || length <= 0).
int WebRtcSpl_MinIndexW32(const int32_t* vector, int length);