mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-12 21:30:45 +01:00
Replacing undefined left shifts with multiplication.
Issue was found by the Audio Processing fuzzer. Bug: chromium:778939, chromium:778921, chromium:778919 Change-Id: If613cf4c533f546d118f10a6358cecd329958177 Reviewed-on: https://webrtc-review.googlesource.com/16161 Commit-Queue: Alex Loiko <aleloi@google.com> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20494}
This commit is contained in:
parent
e68c951691
commit
187c6992fb
2 changed files with 2 additions and 2 deletions
|
@ -141,7 +141,7 @@ void WebRtcSpl_UpsampleBy2(const int16_t* in, size_t len,
|
|||
|
||||
for (i = len; i > 0; i--) {
|
||||
// lower allpass filter
|
||||
in32 = (int32_t)(*in++) << 10;
|
||||
in32 = (int32_t)(*in++) * (1 << 10);
|
||||
diff = in32 - state1;
|
||||
tmp1 = MUL_ACCUM_1(kResampleAllpass1[0], diff, state0);
|
||||
state0 = in32;
|
||||
|
|
|
@ -241,7 +241,7 @@ static int16_t GmmProbability(VadInstT* self, int16_t* features,
|
|||
(int32_t) (log_likelihood_ratio * kSpectrumWeight[channel]);
|
||||
|
||||
// Local VAD decision.
|
||||
if ((log_likelihood_ratio << 2) > individualTest) {
|
||||
if ((log_likelihood_ratio * 4) > individualTest) {
|
||||
vadflag = 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue