ref: ae3321849596094d204f9c3dbe485b5fde6e5782
parent: c76c4de1232531b80c4f6bdf7415771c326d5e92
author: Jean-Marc Valin <[email protected]>
date: Fri Jul 22 10:44:24 EDT 2016
Reduce risk of overflowing in mono downsampling Not observed yet (except when caused by a different bug), but "just in case"
--- a/celt/celt_decoder.c
+++ b/celt/celt_decoder.c
@@ -333,7 +333,7 @@
denormalise_bands(mode, X+N, freq2, oldBandE+nbEBands, start, effEnd, M,
downsample, silence);
for (i=0;i<N;i++)
- freq[i] = HALF32(ADD32(freq[i],freq2[i]));
+ freq[i] = ADD32(HALF32(freq[i]), HALF32(freq2[i]));
for (b=0;b<B;b++)
clt_mdct_backward(&mode->mdct, &freq[b], out_syn[0]+NB*b, mode->window, overlap, shift, B, arch);
} else {