On Fri, Jun 26, 2015 at 5:16 PM, Rostislav Pehlivanov <atomnu...@gmail.com> wrote: > + if (spread > NOISE_SPREAD_THRESHOLD && > + ((sce->zeroes[w*16+g] && energy >= threshold) || > + energy < threshold*(NOISE_LAMBDA_NUMERATOR/lambda))) { > + sce->band_type[w*16+g] = NOISE_BT; > + sce->pns_ener[w*16+g] = energy; > + sce->zeroes[w*16+g] = 0; > + }
This should be: sce->pns_ener[w*16+g] = energy / sce->ics.group_len[w]; Also, "spread > NOISE_SPREAD_THRESHOLD" works beetter as: spread > (NOISE_SPREAD_THRESHOLD * 120.f / lambda) And "energy < threshold*(NOISE_LAMBDA_NUMERATOR/lambda)" as: energy < threshold*(NOISE_LAMBDA_NUMERATOR*sce->ics.group_len[w]/lambda)) (to account for the transient situation in which the encoder is switching to and form short windows) _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel