Subject: Re: [Cellar] mkv ColourSpace and uncompressed video

From: Steve Lhomme <[email-masked]>
Date: Wed, 26 Apr 2017 10:36:14 +0200

2017-02-06 0:21 GMT+01:00 Dave Rice <[email-masked]>:
> 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.

> Dave Rice
>
> _______________________________________________
> Cellar mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/cellar
>

-- 
Steve Lhomme
Matroska association Chairman

---

From: Dave Rice <[email-masked]>
Date: Fri, 28 Apr 2017 21:27:54 -0400

> On Apr 26, 2017, at 4:36 AM, Steve Lhomme <[email-masked]> wrote:
> 

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