Avoid the unnecessary resynth averaging on intensity switch when encoding.

Prevents some arithmetic on uninitialized memory that may contain nans.
This commit is contained in:
Gregory Maxwell 2012-05-05 23:12:50 -04:00
parent a403d5f7b5
commit 37e135677a

View file

@ -1267,8 +1267,9 @@ void quant_all_bands(int encode, const CELTMode *m, int start, int end,
/* Switch off dual stereo to do intensity */
dual_stereo = 0;
for (j=M*eBands[start];j<M*eBands[i];j++)
norm[j] = HALF32(norm[j]+norm2[j]);
if (resynth)
for (j=M*eBands[start];j<M*eBands[i];j++)
norm[j] = HALF32(norm[j]+norm2[j]);
}
if (dual_stereo)
{