[Matroska-devel] [Cellar] Colour Format proposal

Michael Niedermayer via Matroska-devel matroska-devel at lists.matroska.org
Fri Feb 19 22:45:38 CET 2016


Hi

On Thu, Feb 18, 2016 at 11:50:27AM -0800, Frank Galligan wrote:
> Here is the current proposal, minus the reference to the 265 doc.
> 
> The parent element would be Video [E0].
> 
> 
> Element Name: Colour
> 
> Level:        4
> 
> ID:           [55][B0]
> 
> Mandatory:    -
> 
> Multiple:     -
> 
> Default:      -
> 
> Type:         m
> 
> Description:  Settings describing the colour format.
> 
> 
> Element Name: MatrixCoefficients
> 
> Level:        5
> 
> ID:           [55][B1]
> 
> Mandatory:    -
> 
> Multiple:     -
> 
> Default:      2
> 
> Type:         u
> 
> Description:  The Matrix Coefficients of the video used to derive luma and
> 
>              chroma values from reg, green, and blue color primaries. For
> 
>              clarity, the value and meanings for MatrixCoefficients are
> adopted
> 
>              from Table 4 of ISO/IEC 23001-8:2013/DCOR1. (0:GBR, 1: BT709,
> 
>              2: Unspecified, 3: Reserved, 4: FCC, 5: BT470BG, 6: SMPTE 170M,
> 
>              7: SMPTE 240M, 8: YCOCG, 9: BT2020 Non-constant Luminance,
> 
>              10: BT2020 Constant Luminance)
> 
> 

> Element Name: BitsPerChannel
> 
> Level:        5
> 
> ID:           [55][B2]
> 
> Mandatory:    -
> 
> Multiple:     -
> 
> Default:      0
> 
> Type:         u
> 
> Description:  Number of decoded bits per channel. A value of 0 indicates
> that
> 
>              the BitsPerChannel is unspecified.
> 

what would this be set to for old 16bit rgb, that is 5 bit red
6 bit green, 5 bit blue rawvideo.
This maybe does not matter and iam not strongly suggesting to add it,
rather i want to point it out so its not unintentionally forgotten


[...]

> Element Name: CbSubsamplingHorz
> 
> Level:        5
> 
> ID:           [55][B5]
> 
> Mandatory:    -
> 
> Multiple:     -
> 
> Default:      -
> 
> Type:         u
> 
> Description:  The amount of pixels to remove in the Cb channel for every
> pixel
> 
>              not removed horizontally. This is additive with
> 
>              ChromaSubsamplingHorz. Example: For video with 4:2:1 chroma
> 
>              subsampling, the ChromaSubsamplingHorz should be set to 1 and
> 
>              CbSubsamplingHorz should be set to 1.
> 
> 
> Element Name: CbSubsamplingVert
> 
> Level:        5
> 
> ID:           [55][B6]
> 
> Mandatory:    -
> 
> Multiple:     -
> 
> Default:      -
> 
> Type:         u
> 
> Description:  The amount of pixels to remove in the Cb channel for every
> pixel
> 
>              not removed vertically. This is additive with
> 
>              ChromaSubsamplingVert.

What if Cr is subsampled more than Cb ?
That too is rather obscure, but theres code in FFmpeg to handle such
jpegs, so i suspect this case while very rare is not entirely non
existent ...


> 
> 
> Element Name: ChromaSitingHorz
> 
> Level:        5
> 
> ID:           [55][B7]
> 
> Mandatory:    -
> 
> Multiple:     -
> 
> Default:      0
> 
> Type:         u
> 
> Description:  How Chroma is subsampled horizontally. (0: Unspecified, 1:
> Left
> 
>              collocated , 2: Half)
> 
> Element Name: ChromaSitingVert
> 
> Level:        5
> 
> ID:           [55][B8]
> 
> Mandatory:    -
> 
> Multiple:     -
> 
> Default:      0
> 
> Type:         u
> 
> Description:  How Chroma is subsampled vertically. (0: Unspecified, 1: Top
> 
>              collocated , 2: Half)
> 

iam not sure this is enough to specify all variants
for 4:2:0 alone there are a few different variants
theres mpeg1 style
mpeg2 progressive and interlaced
the mpeg2/mpeg4 style also differs from itself if the image is fliped right-left
cropping 1 or 2 lines of the top of mpeg2 yuv420 also results in
different variants

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No snowflake in an avalanche ever feels responsible. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://lists.matroska.org/pipermail/matroska-devel/attachments/20160219/af964f74/attachment.sig>


More information about the Matroska-devel mailing list