fixed-point: fixing two overflows that didn't really affect quality
This commit is contained in:
parent
7c422653f3
commit
cd29b02773
3 changed files with 16 additions and 6 deletions
|
@ -233,6 +233,8 @@ int compute_pitch_gain(const CELTMode *m, const celt_norm_t *X, const celt_norm_
|
|||
Sxy = MAC16_16(Sxy, X[j], P[j]);
|
||||
Sxx = MAC16_16(Sxx, X[j], X[j]);
|
||||
}
|
||||
Sxy = SHR32(Sxy,2);
|
||||
Sxx = SHR32(Sxx,2);
|
||||
/* No negative gain allowed */
|
||||
if (Sxy < 0)
|
||||
Sxy = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue