Re: [Cellar] mkv ColourSpace and uncompressed video

Steve Lhomme <slhomme@matroska.org> Wed, 26 April 2017 08:36 UTC

Return-Path: <slhomme@matroska.org>
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 AC27C127698 for <cellar@ietfa.amsl.com>; Wed, 26 Apr 2017 01:36:19 -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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=matroska-org.20150623.gappssmtp.com
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 HazxQN_z0ASl for <cellar@ietfa.amsl.com>; Wed, 26 Apr 2017 01:36:18 -0700 (PDT)
Received: from mail-yb0-x234.google.com (mail-yb0-x234.google.com [IPv6:2607:f8b0:4002:c09::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 190F11319EB for <cellar@ietf.org>; Wed, 26 Apr 2017 01:36:16 -0700 (PDT)
Received: by mail-yb0-x234.google.com with SMTP id s22so74414311ybe.3 for <cellar@ietf.org>; Wed, 26 Apr 2017 01:36:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=matroska-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-transfer-encoding; bh=WlamhpcK1eMBbXiwun11C/jTcA/gTI+v1mtAZUqdsk4=; b=QW4+0VjzhmkeYtjn7Iy/y+l32Pbbbut5I1D+NMJ2ZtQFPJsAi229lRTtMdZnpkPMMx wRr0IsUvt+MwILHpuYFPZWiT7ZS415OqvIjcFjcF/dcOpW4fQVn/EA7G2xr1ps9ao2+8 cwrLe5urQU2c1EtjeQQqIuiqRcKwCXFfZKnS+hOMj23COBkVRld2bx6ykYn9kgXcBsAF S69sR7dBFlaM4Q5kPOEzhDNBd5BfjMuXzeLcQxP7AKRkZ63LRpaNS2h04fIar3PbpDi0 wZ+BUvBmeJ1Ov+/gp6exGbnRbPnT31StLABWtA2pDv3Ft7hIdYJhbLPXFKKHOeP9VEN4 59hg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-transfer-encoding; bh=WlamhpcK1eMBbXiwun11C/jTcA/gTI+v1mtAZUqdsk4=; b=GUbDWNAUU4c2emQFcs8pzsaSYya8scQxEtO4MlERHRomwIx22lc+zO72dsl9+ulORn sgp89yCWZumBP2M4fp/iLztF8kP3e3NwajFo9h5uj/HUXCfP4QMFsTUWrPGVRoIdAN/e xPd4arIpcSj74If8CKBu9vgiTb11KOAEV4pvAlc047nM4X+wvdM9JRz09EAWJhzUYvCQ kfjEunBJ+c7lvl3ca63LVsMer62733C8hdMwMhNnnSeHgDko+MNzz8VM15i/jWL0IJOO bSM519LdlQwFpqoKhTil5PHkXxIlNAHNvdMwy0Ub6VmiHhm9q6Azo4EuJXOMJRpeu620 P1hQ==
X-Gm-Message-State: AN3rC/5bzMofnxwqdVLAb8eNTYn1Xb9JxdALquvJb+zIL7/VqWdOIyV7 MpepS6ZW7OMX1wuKYUxY87EobrHtrOvE
X-Received: by 10.37.173.131 with SMTP id z3mr12910053ybi.64.1493195775053; Wed, 26 Apr 2017 01:36:15 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.83.4.215 with HTTP; Wed, 26 Apr 2017 01:36:14 -0700 (PDT)
In-Reply-To: <04A7F638-0E15-4949-BB49-98BD88082667@dericed.com>
References: <04A7F638-0E15-4949-BB49-98BD88082667@dericed.com>
From: Steve Lhomme <slhomme@matroska.org>
Date: Wed, 26 Apr 2017 10:36:14 +0200
Message-ID: <CAOXsMFJZFFqUpVKGjoR8s57wdqFF9zVhpz_bKJfrg7MCStxVWA@mail.gmail.com>
To: Codec Encoding for LossLess Archiving and Realtime transmission <cellar@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/cellar/8Y2D_mQ6nm9voAtrxc-hxBUkns0>
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: Wed, 26 Apr 2017 08:36:20 -0000

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.

> Dave Rice
>
> _______________________________________________
> Cellar mailing list
> Cellar@ietf.org
> https://www.ietf.org/mailman/listinfo/cellar
>



-- 
Steve Lhomme
Matroska association Chairman