Hi Calvin,

Thanks for your input here.

Just to comment on this point:

On Wed, Nov 07, 2012 at 05:41:21PM -0500, Calvin Walton wrote:
> The issue I see here is that the normalization method used for the value
> in the opus header output gain field is *not specified* currently.

The 'normalisation method' for the header gain is specified as:

    An encoder SHOULD set this field to zero, and instead apply any
    gain prior to encoding, when this is possible and does not
    conflict with the user's wishes.  The output gain should only be
    nonzero when the gain is adjusted after encoding, or when the
    user wishes to adjust the gain for playback while preserving the
    ability to recover the original signal amplitude.

ie. any normalisation that you want to do at encoding time should be
done *before* encoding, and the header gain is left purely for other
users who would like to arbitrarily rescale it without reencoding,
to any level they deem appropriate for their particular use.

For instance you might use this to match levels with a signal from
some other source that isn't ordinarily normalised to some standard
like R128 or so.  It's not so much for equalising the signal to one
particular standard level, as it is for allowing people to later
trivially adjust it 'losslessly' to some desired level entirely of
their own choosing, for whatever reason they may desire that.


> An application can put any value in that field, and a player cannot
> assume that the value is relative to any useful reference point.

Correct, a player can only assume that it is the level that the
person who created the file wants it scaled to, and that it should
play it at that level, absent any other input from the user to the
contrary.

> The only supported place currently to get a gain with a useful
> reference point is the R128_TRACK_GAIN tag.

That's why this is a separate mechanism to the header gain.
This one is about noting the gain adjustment required (after the
header gain is applied) to achieve a known, specific reference
signal level.

> If a player blindly applies only the header output gain value,
> it has no knowledge of whether the output is loudness normalized
> or not.

A player must always apply the header gain to output the signal
level that the person who created the file intended it to have
(as if they really had scaled it by that level prior to encoding).

A player may also optionally apply normalisation to a standard
level on top of that, either based on information in the file's
comment tags, its own analysis of the file, or some other
mechanism based on input from the user of that player.

The former is about gain choices made by the creator, the latter
is more about gain choices made by the end user.  The former
must always be applied so that players behave consistently, the
latter may be applied at the sole discretion of the user and
(how they configure) the applications that they use to play it.


Is there something about that which we need to explain better
in the draft?

  Cheers,
  Ron


_______________________________________________
codec mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/codec

Reply via email to