/* There is 3 bits headroom in envelope and max of thresholdModification is 16384, so shifting left for 4 would produce overflow only when the result is anyhow close to 1 */
IF(EQ_16(flag,1))
{
/* The check that bin at k is bigger than bins at k-1 and k+1 is needed to avoid deadlocks when the thresholds are low. */
/* It removes some true peaks, especially if non weighted sum is used for the smoothed spectrum. */