[FFmpeg-devel] [PATCH 09/11] aaccoder: add a new perceptual noise substitution implementation
Rostislav Pehlivanov
atomnuker at gmail.com
Tue Jun 30 06:33:20 CEST 2015
As lambda increases (more quality) the chance to get PNS decreases with
your suggestion to use "spread > (NOISE_SPREAD_THRESHOLD * 120.f /
lambda)". It's more correct to have
spread > (NOISE_SPREAD_THRESHOLD * (lambda / 120.0f))
here. The spectrums showed a hole right in between the PNS and normal band
types rather than having the PNS values augment smoothly in the upper
frequencies. The suggestion to use NOISE_SPREAD_THRESHOLD of 0.5f is fine
however as the expression is still normalized.
Why the need to have "sce->pns_ener[w*16+g] = energy /
sce->ics.group_len[w];", normalization? The energy value is log2'd during
scalefactor indices calculation so it's hardly going to change much. Will
do some tests to see if it smooths out the transition of normal bands ->
PNS.
On 30 June 2015 at 03:27, Claudio Freire <klaussfreire at gmail.com> wrote:
> On Mon, Jun 29, 2015 at 10:58 PM, Claudio Freire <klaussfreire at gmail.com>
> wrote:
> > On Fri, Jun 26, 2015 at 5:16 PM, Rostislav Pehlivanov
> > <atomnuker at 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)
>
>
> With the new spread measure in patch #06, if committed, in this one
> NOISE_SPREAD_THRESHOLD should be redefined to 0.5 (the active_lines
> measure is normalized).
>
More information about the ffmpeg-devel
mailing list