Re: [codec] draft-ietf-codec-oggopus: R128_TRACK_GAIN units

Ron <ron@debian.org> Thu, 11 September 2014 17:59 UTC

Return-Path: <ron@debian.org>
X-Original-To: codec@ietfa.amsl.com
Delivered-To: codec@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id D75E11A8A73 for <codec@ietfa.amsl.com>; Thu, 11 Sep 2014 10:59:03 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 81vVv-Wc34iJ for <codec@ietfa.amsl.com>; Thu, 11 Sep 2014 10:59:02 -0700 (PDT)
Received: from ipmail07.adl2.internode.on.net (ipmail07.adl2.internode.on.net [150.101.137.131]) by ietfa.amsl.com (Postfix) with ESMTP id C2E391A8A17 for <codec@ietf.org>; Thu, 11 Sep 2014 10:57:57 -0700 (PDT)
Received: from ppp14-2-41-157.lns21.adl2.internode.on.net (HELO mailservice.shelbyville.oz) ([14.2.41.157]) by ipmail07.adl2.internode.on.net with ESMTP; 12 Sep 2014 03:27:56 +0930
Received: from localhost (localhost [127.0.0.1]) by mailservice.shelbyville.oz (Postfix) with ESMTP id D55F3FFE1A for <codec@ietf.org>; Fri, 12 Sep 2014 03:27:43 +0930 (CST)
X-Virus-Scanned: Debian amavisd-new at mailservice.shelbyville.oz
Received: from mailservice.shelbyville.oz ([127.0.0.1]) by localhost (mailservice.shelbyville.oz [127.0.0.1]) (amavisd-new, port 10024) with LMTP id g6b5u085QcZa for <codec@ietf.org>; Fri, 12 Sep 2014 03:27:42 +0930 (CST)
Received: from hex.shelbyville.oz (hex.shelbyville.oz [192.168.1.6]) by mailservice.shelbyville.oz (Postfix) with ESMTPS id 8C210FF8BF for <codec@ietf.org>; Fri, 12 Sep 2014 03:27:42 +0930 (CST)
Received: by hex.shelbyville.oz (Postfix, from userid 1000) id 79DD680470; Fri, 12 Sep 2014 03:27:42 +0930 (CST)
Date: Fri, 12 Sep 2014 03:27:42 +0930
From: Ron <ron@debian.org>
To: codec@ietf.org
Message-ID: <20140911175742.GJ32116@hex.shelbyville.oz>
References: <CAMdZqKGW7QvHwfKFyY1xNPJ0R=Roi0-_KPmm8oLZC2U4GY_NQA@mail.gmail.com> <540E0D59.50500@xiph.org> <1410451239.8774.3.camel@kepstin.ca>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <1410451239.8774.3.camel@kepstin.ca>
User-Agent: Mutt/1.5.23 (2014-03-12)
Archived-At: http://mailarchive.ietf.org/arch/msg/codec/IpgYwCOUKLK4wZHCj11KsL_lIXU
Subject: Re: [codec] draft-ietf-codec-oggopus: R128_TRACK_GAIN units
X-BeenThere: codec@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Codec WG <codec.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/codec>, <mailto:codec-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/codec/>
List-Post: <mailto:codec@ietf.org>
List-Help: <mailto:codec-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/codec>, <mailto:codec-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 11 Sep 2014 17:59:04 -0000

On Thu, Sep 11, 2014 at 12:00:39PM -0400, Calvin Walton wrote:
> On Mon, 2014-09-08 at 13:11 -0700, Timothy B. Terriberry wrote:
> > As an individual...
> > 
> > Mark Harris wrote:
> > >  output gain field of the Ogg Opus header.  Is it expected that 
> > > these
> > >  units would be adopted by other codecs?
> > 
> > I can't speak for anyone else, but if _I_ were making a new codec, I
> > wouldn't see a need to innovate here. This design has the lessons of
> > doing this for 15+ years baked into it.
> > 
> > >  concerned that if Ogg Opus uses 1/256 LU units, and another 
> > > format or
> > >  codec uses the much more obvious LU (dB) units, then someone may 
> > > be in
> > 
> > Then they should pick a different tag name.
> > 
> 
> Just to comment on this:
> 
> The format of the "vorbiscomment" fields is very similar between at 
> least Ogg Vorbis, FLAC, and Ogg Opus. As a result, the tags are often 
> copied verbatim between the three formats during transcoding, and the 
> interpretation of tag meaning based on name is usually shared between 
> all three codecs in parsing code.
> 
> 
> As a result, without explicit code in the parser to e.g. reject or 
> interpret differently this tag between different formats, a player 
> that implements the R128_*_GAIN fields will as a side-effect add 
> support for the same tag in FLAC and Ogg Vorbis.
> 
> (This is the same reason that some players - at least gstreamer-based 
> players, rockbox, and foobar2000 - currently accept and use 
> REPLAY_GAIN tags in Ogg Opus files)

This is of course one of the perils of people implementing 'generic'
code with no sanity checking.  I believe there are libraries which
will happily try to force almost any codec into almost any kind of
container, whether that is well defined and well behaved or not.

Code reuse is great.  Code without sanity checking gets to keep
all the pieces.  There's not much we can do about that except
continue to remind people of the damage that blind application of
the 'be liberal' principle does.


Which isn't to say that FLAC and Vorbis and other Ogg mappings
shouldn't ever recognise these tags, but that's a discussion for
somewhere other than here right now.  This group isn't responsible
for decisions relating to those, nor have we been asked to be.


> Since this tag format is defined/specified in the Ogg Opus 
> specification, it might make sense to use a prefix on the tag name - 
> e.g. OPUS_R128_TRACK_GAIN - if the intent is that this tag is to be 
> used only in the Ogg Opus format. This would reduce the likelihood of 
> conflicts in the mostly-unregulated vorbiscomment namespace.
> 
> If the intent is that the R128 tags are intended to be used also in 
> FLAC and Ogg Vorbis then I think it would be best for it to be defined 
> outside of the Opus specification, somewhere that developers can 
> reference independently. In particular, care would be needed to 
> describe interactions with the REPLAY_GAIN tags that are still used in 
> these other formats.

I think Tim already covered this when he said:

    It's also got two years of deployment at this point, so there's
    now non-trivial costs in changing it. If we had a good reason,
    we could change it.  But "reduced confusion" is not a good
    reason. Changing now will only increase confusion (another
    lesson I've learned from letting people talk me into such
    changes in the past): people will be required to support both
    formats forever, despite the fact that one would be "standard"
    and the other wouldn't be.

There's no inherent reason these tags need to remain Opus specific,
this is just the first place they've been defined.  If nothing else
ever picks them up, that's probably not a big deal, if other things
do, they can copy or reference the definition here, just as we have
referenced the VorbisComment specification.

  Ron