audio_processing: Removed use of macro WEBRTC_SPL_UMUL_16_16

The macro replaced is a trivial multiplication after explicit casts to uint16_t and uint32_t. This CL replaces its use with "*" and adds explicit casts if necessary.

Affected components:
* AECMobile
* AGC
* Noise Suppression (fixed point version)

BUG=3348,3353
TESTED=locally on linux and trybots
R=kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7101 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
bjornv@webrtc.org
2014-09-08 11:21:56 +00:00
parent 0d394f3609
commit 37c39f3784
5 changed files with 11 additions and 15 deletions

View File

@ -330,8 +330,7 @@ static void CalcLinearEnergiesC(AecmCore_t* aecm,
echo_est[i] = WEBRTC_SPL_MUL_16_U16(aecm->channelStored[i],
far_spectrum[i]);
(*far_energy) += (uint32_t)(far_spectrum[i]);
(*echo_energy_adapt) += WEBRTC_SPL_UMUL_16_16(aecm->channelAdapt16[i],
far_spectrum[i]);
*echo_energy_adapt += aecm->channelAdapt16[i] * far_spectrum[i];
(*echo_energy_stored) += (uint32_t)echo_est[i];
}
}

View File

@ -512,8 +512,7 @@ void WebRtcAecm_CalcLinearEnergies_mips(AecmCore_t* aecm,
echo_est[PART_LEN] = WEBRTC_SPL_MUL_16_U16(aecm->channelStored[PART_LEN],
far_spectrum[PART_LEN]);
par1 += (uint32_t)(far_spectrum[PART_LEN]);
par2 += WEBRTC_SPL_UMUL_16_16(aecm->channelAdapt16[PART_LEN],
far_spectrum[PART_LEN]);
par2 += aecm->channelAdapt16[PART_LEN] * far_spectrum[PART_LEN];
par3 += (uint32_t)echo_est[PART_LEN];
(*far_energy) = par1;

View File

@ -267,8 +267,7 @@ void WebRtcAecm_CalcLinearEnergiesNeon(AecmCore_t* aecm,
__asm __volatile("vadd.u32 q8, q10" : : : "q10", "q8");
__asm __volatile("vadd.u32 q8, q11" : : : "q11", "q8");
// echo_energy_adapt += WEBRTC_SPL_UMUL_16_16(
// aecm->channelAdapt16[i], far_spectrum[i]);
// echo_energy_adapt += aecm->channelAdapt16[i] * far_spectrum[i];
__asm __volatile("vld1.16 {d24, d25}, [%0, :128]" : : "r"(&aecm->channelAdapt16[i]) : "q12");
__asm __volatile("vmull.u16 q10, d26, d24" : : : "q12", "q13", "q10");
__asm __volatile("vmull.u16 q11, d27, d25" : : : "q12", "q13", "q11");
@ -292,8 +291,8 @@ void WebRtcAecm_CalcLinearEnergiesNeon(AecmCore_t* aecm,
echo_est[i] = WEBRTC_SPL_MUL_16_U16(aecm->channelStored[i], far_spectrum[i]);
*echo_energy_stored = echo_energy_stored_r + (uint32_t)echo_est[i];
*far_energy = far_energy_r + (uint32_t)(far_spectrum[i]);
*echo_energy_adapt = echo_energy_adapt_r + WEBRTC_SPL_UMUL_16_16(
aecm->channelAdapt16[i], far_spectrum[i]);
*echo_energy_adapt = echo_energy_adapt_r +
aecm->channelAdapt16[i] * far_spectrum[i];
}
void WebRtcAecm_StoreAdaptiveChannelNeon(AecmCore_t* aecm,