Re: [Cellar] mkv ColourSpace and uncompressed video

Dave Rice <dave@dericed.com> Sat, 29 April 2017 01:30 UTC

Return-Path: <dave@dericed.com>
X-Original-To: cellar@ietfa.amsl.com
Delivered-To: cellar@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 7649E129465 for <cellar@ietfa.amsl.com>; Fri, 28 Apr 2017 18:30:31 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.119
X-Spam-Level:
X-Spam-Status: No, score=-1.119 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, SPF_NEUTRAL=0.779, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
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 9VnGCUKKAZ_q for <cellar@ietfa.amsl.com>; Fri, 28 Apr 2017 18:30:29 -0700 (PDT)
Received: from s172.web-hosting.com (s172.web-hosting.com [68.65.122.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 77358120727 for <cellar@ietf.org>; Fri, 28 Apr 2017 18:28:06 -0700 (PDT)
Received: from [172.56.2.170] (port=30886 helo=[172.20.10.2]) by server172.web-hosting.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from <dave@dericed.com>) id 1d4HB1-001IVW-Of; Fri, 28 Apr 2017 21:28:04 -0400
From: Dave Rice <dave@dericed.com>
Message-Id: <55C1196B-7F06-44C0-85B1-C69E8C496C5C@dericed.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_87B7935B-FFEE-409E-B95E-6A98EDA46633"
Mime-Version: 1.0 (Mac OS X Mail 10.0 \(3226\))
Date: Fri, 28 Apr 2017 21:27:54 -0400
In-Reply-To: <CAOXsMFJZFFqUpVKGjoR8s57wdqFF9zVhpz_bKJfrg7MCStxVWA@mail.gmail.com>
Cc: Codec Encoding for LossLess Archiving and Realtime transmission <cellar@ietf.org>
To: Steve Lhomme <slhomme@matroska.org>
References: <04A7F638-0E15-4949-BB49-98BD88082667@dericed.com> <CAOXsMFJZFFqUpVKGjoR8s57wdqFF9zVhpz_bKJfrg7MCStxVWA@mail.gmail.com>
X-Mailer: Apple Mail (2.3226)
X-OutGoing-Spam-Status: No, score=-2.9
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - server172.web-hosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - dericed.com
X-Get-Message-Sender-Via: server172.web-hosting.com: authenticated_id: dave@dericed.com
X-Authenticated-Sender: server172.web-hosting.com: dave@dericed.com
X-Source:
X-Source-Args:
X-Source-Dir:
X-From-Rewrite: unmodified, already matched
Archived-At: <https://mailarchive.ietf.org/arch/msg/cellar/E07niUQdweJg8HA2ptoZR6kvM6U>
Subject: Re: [Cellar] mkv ColourSpace and uncompressed video
X-BeenThere: cellar@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Codec Encoding for LossLess Archiving and Realtime transmission <cellar.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cellar>, <mailto:cellar-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cellar/>
List-Post: <mailto:cellar@ietf.org>
List-Help: <mailto:cellar-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cellar>, <mailto:cellar-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 29 Apr 2017 01:30:31 -0000

> On Apr 26, 2017, at 4:36 AM, Steve Lhomme <slhomme@matroska.org> wrote:
> 
> 2017-02-06 0:21 GMT+01:00 Dave Rice <dave@dericed.com>:
>> Hi cellar,
>> 
>> I’m hoping to clarify the use of uncompressed video in Matroska and find a
>> way to avoid muxing errors such as
>> https://github.com/FFmpeg/FFmpeg/blob/8c1342e631d635f6cad13f9374c4f2005c22b9e5/libavformat/matroskaenc.c#L1117-L1118.
>> 
>> Currently Matroska supports a Codec ID of V_Uncompressed which relies on the
>> ColourSpace Element to detail how the uncompressed video is stored. There is
>> not much documentation here but the ColourSpace references a value in AVI
>> (which seems to be the biCompression value of BITMAPINFOHEADER. I’d like to
>> clean up this documentation but would like something more clear than a vague
>> reference to AVI.
>> 
>> Is there a reliable authority of fourcc’s that we can reference to
> 
> There's a http://fourcc.org/ but it's nothing official.
> 
>> uncompressed video or should ColourSpace be defined with an enumeration list
>> which provides a list of value (such as I420, NV12, NV21, RGBA, UYVY, Y41B,
>> Y42B, Y800, YUV9, YUY2, YVYU) along with their definitions?
> 
> Sometimes vendors use different names for the same thing.
> http://www.fourcc.org/yuv.php
> There may be other formats (XYZ?) not listed on that website that may
> be usefull as uncompressed.
> 
> We may need to maintain a list of uncompressed formats (audio and
> video) like we maintain a list of known codecs and their mapping.
> 
>> Also I can only find occasions of ColourSpace used when the Codec is
>> V_Uncompressed. Are there instances when it is valid to use ColourSpace when
>> the Codec ID is not V_Uncompressed. Was there any reason that ColourSpace
>> was used to store the fourcc, rather than using CodecPrivate as done with
>> VFW?
> 
> Because CodecPrivate is not meant to be parsed and analyzed for the
> user. All values at the container level may be. Also the ColourSpace
> may be useful for compressed formats as well.

In this pull request, https://github.com/Matroska-Org/matroska-specification/pull/118 <https://github.com/Matroska-Org/matroska-specification/pull/118>, I changed the definition of ColourSpace from "Same value as in AVI (32 bits)." to:

> Specify the pixel format used for the Track's data as a "fourcc". This Element is MANDATORY in TrackEntry when the CodecID Element of the TrackEntry is set to "V_Uncompressed".

Best Regards,
Dave Rice