common_audio/signal_processing: Moves WEBRTC_SPL_UMUL_16_16_RSFT16 to iSAC fix

This macro is only used by the fixed point version of iSAC. Replacing the (five) locations in arith_routines_logist.c, where it is used, with the actual operation.

BUG=3348,3353
TESTED=trybots and manually
R=kwiberg@webrtc.org, tina.legrand@webrtc.org, turaj@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6392 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
bjornv@webrtc.org
2014-06-11 06:39:03 +00:00
parent 3f83072c26
commit 782978cfcb
3 changed files with 5 additions and 9 deletions

View File

@@ -17,7 +17,6 @@
#include "arith_routins.h"
/* Tables for piecewise linear cdf functions: y = k*x */
/* x Points for function piecewise() in Q15 */
@@ -304,7 +303,7 @@ int16_t WebRtcIsacfix_DecLogisticMulti2(int16_t *dataQ7,
cdfTmp = WebRtcIsacfix_Piecewise(WEBRTC_SPL_MUL_16_U16(candQ7, tmpARSpecQ8));
W_tmp = WEBRTC_SPL_UMUL_16_16(cdfTmp, W_upper_MSB);
W_tmp += WEBRTC_SPL_UMUL_16_16_RSFT16(cdfTmp, W_upper_LSB);
W_tmp += ((uint32_t)cdfTmp * (uint32_t)W_upper_LSB) >> 16;
if (streamVal > W_tmp)
{
@@ -313,7 +312,7 @@ int16_t WebRtcIsacfix_DecLogisticMulti2(int16_t *dataQ7,
cdfTmp = WebRtcIsacfix_Piecewise(WEBRTC_SPL_MUL_16_U16(candQ7, tmpARSpecQ8));
W_tmp = WEBRTC_SPL_UMUL_16_16(cdfTmp, W_upper_MSB);
W_tmp += WEBRTC_SPL_UMUL_16_16_RSFT16(cdfTmp, W_upper_LSB);
W_tmp += ((uint32_t)cdfTmp * (uint32_t)W_upper_LSB) >> 16;
while (streamVal > W_tmp)
{
@@ -323,7 +322,7 @@ int16_t WebRtcIsacfix_DecLogisticMulti2(int16_t *dataQ7,
WEBRTC_SPL_MUL_16_U16(candQ7, tmpARSpecQ8));
W_tmp = WEBRTC_SPL_UMUL_16_16(cdfTmp, W_upper_MSB);
W_tmp += WEBRTC_SPL_UMUL_16_16_RSFT16(cdfTmp, W_upper_LSB);
W_tmp += ((uint32_t)cdfTmp * (uint32_t)W_upper_LSB) >> 16;
/* error check */
if (W_lower == W_tmp) {
@@ -342,7 +341,7 @@ int16_t WebRtcIsacfix_DecLogisticMulti2(int16_t *dataQ7,
cdfTmp = WebRtcIsacfix_Piecewise(WEBRTC_SPL_MUL_16_U16(candQ7, tmpARSpecQ8));
W_tmp = WEBRTC_SPL_UMUL_16_16(cdfTmp, W_upper_MSB);
W_tmp += WEBRTC_SPL_UMUL_16_16_RSFT16(cdfTmp, W_upper_LSB);
W_tmp += ((uint32_t)cdfTmp * (uint32_t)W_upper_LSB) >> 16;
while ( !(streamVal > W_tmp) )
{
@@ -352,7 +351,7 @@ int16_t WebRtcIsacfix_DecLogisticMulti2(int16_t *dataQ7,
WEBRTC_SPL_MUL_16_U16(candQ7, tmpARSpecQ8));
W_tmp = WEBRTC_SPL_UMUL_16_16(cdfTmp, W_upper_MSB);
W_tmp += WEBRTC_SPL_UMUL_16_16_RSFT16(cdfTmp, W_upper_LSB);
W_tmp += ((uint32_t)cdfTmp * (uint32_t)W_upper_LSB) >> 16;
/* error check */
if (W_upper == W_tmp){