[Matroska-devel] Colour Format proposal

Frank Galligan frankgalligan at gmail.com
Tue Jan 5 22:12:24 CET 2016


Hello all,

I would like to bring up the discussion again about better representing the
color format of video. It looks like the discussion was started here [1] on
matroska-devel list. I think we need to add some Colour elements so
Matroska files can (potentially) more faithfully represent the video source
on many devices. Here is a proposal I created to start from:


Element Name: Colour
Level:        4
ID:           [55][A0]
Mandatory:    -
Multiple:     -
Default:      -
Type:         m
Description:  Settings describing the colour format.


Element Name: ColourMatrix
Level:        5
ID:           [55][A1]
Mandatory:    ma
Multiple:     -
Default:      2
Type:         u
Description:  ColourMatrix of the video. (0: IEC 61966-2-1 (sRGB), 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][A2]
Mandatory:    ma
Multiple:     -
Default:      8
Type:         u
Description:  Number of bits per channel. This number may be less for
specific
              channels depending on the ColourFormat and ChromaSubsampling.


Element Name: ChromaSubsampling
Level:        5
ID:           [55][A3]
Mandatory:    ma
Multiple:     -
Default:      0
Type:         u
Description:  (0: 4:2:0, 2: 4:2:2, 4: 4:4:4)


Element Name: ColourRange
Level:        5
ID:           [55][A4]
Mandatory:    ma
Multiple:     -
Default:      1
Type:         u
Description:  (0: Unspecified, 1: Defined by ColourMatrix/TransferFunction,
              2: Full range)


Element Name: TransferFunction
Level:        5
ID:           [55][A6]
Mandatory:    ma
Multiple:     -
Default:      2
Type:         u
Description:  Transfer Function. (0: Reserved, 1: ITU-R BT.709, 2:
Unspecified,
              4: Gamma 2.2 curve, 5: Gamma 2.8 curve, 6: SMPTE 170M,
              7: SMPTE 240M, 8: Linear, 9: Log, 10: Log Sqrt,
              11: IEC 61966-2-4, 12: ITU-R BT.1361 Extended Colour Gamut,
              13: IEC 61966-2-1, 14: ITU-R BT.2020 10 bit,
              15: ITU-R BT.2020 12 bit, 16: SMPTE ST 2084,
              17: SMPTE ST 428-1 18: ARIB STD-B67 (HLG))


Element Name: Primaries
Level:        5
Mandatory:    -
Multiple:     -
ID:           [55][A7]
Default:      2
Description:  (0: Reserved, 1: ITU-R BT.709, 2: Unspecified, 4: ITU-R
BT.470M,
               5: ITU-R BT.470BG, 6: SMPTE 170M, 7: SMPTE 240M, 8: FILM,
               9: ITU-R BT.2020, 10: SMPTE ST 428-1)


Element Name: MaxCLL
Level:        5
ID:           [55][A8]
Mandatory:    -
Multiple:     -
Default:      -
Type:         u
Description:  Maximum brightness of a single pixel in candelas per square
              meter (cd/m²).


Element Name: MaxFALL
Level:        5
ID:           [55][A9]
Mandatory:    -
Multiple:     -
Default:      -
Type:         u
Description:  Maximum brightness of a single full frame in candelas per
square
              meter (cd/m²).


Element Name: MasteringMetadata
Level:        5
ID:           [55][B0]
Mandatory:    -
Multiple:     -
Default:      -
Type:         m
Description:  SMPTE 2086 mastering data.


Element Name: PrimaryRChromaticityX
Level:        6
ID:           [55][B1]
Mandatory:    -
Multiple:     -
Default:      -
Type:         f
Description:  Valid value is in the range 0 <= f <= 1.


Element Name: PrimaryRChromaticityY
Level:        6
ID:           [55][B2]
Mandatory:    -
Multiple:     -
Default:      -
Type:         f
Description:  Valid value is in the range 0 <= f <= 1.


Element Name: PrimaryGChromaticityX
Level:        6
ID:           [55][B3]
Mandatory:    -
Multiple:     -
Default:      -
f
Description:  Valid value is in the range 0 <= f <= 1.


Element Name: PrimaryGChromaticityY
Level:        6
ID:           [55][B4]
Mandatory:    -
Multiple:     -
Default:      -
Type:         f
Description:  Valid value is in the range 0 <= f <= 1.


Element Name: PrimaryBChromaticityX
Level:        6
ID:           [55][B5]
Mandatory:    -
Multiple:     -
Default:      -
f
Description:  Valid value is in the range 0 <= f <= 1.


Element Name: PrimaryBChromaticityY
Level:        6
ID:           [55][B6]
Mandatory:    -
Multiple:     -
Default:      -
Type:         f
Description:  Valid value is in the range 0 <= f <= 1.


Element Name: WhitePointChromaticityX
Level:        6
ID:           [55][B7]
Mandatory:    -
Multiple:     -
Default:      -
Type:         f
Description:  Valid value is in the range 0 <= f <= 1.


Element Name: WhitePointChromaticityY
Level:        6
ID:           [55][B8]
Mandatory:    -
Multiple:     -
Default:      -
Type:         f
Description:  Valid value is in the range 0 <= f <= 1.


Element Name: LuminanceMax
Level:        6
ID:           [55][B9]
Mandatory:    -
Multiple:     -
Default:      -
Type:         f
Description:  Maximum luminance. Shall be represented in candelas per square
              meter (cd/m²). Valid value is in the range 0 <= f <= 9999.99


Element Name: LuminanceMin
Level:        6
ID:           [55][BA]
Mandatory:    -
Multiple:     -
Default:      -
Type:         f
Description:  Minimum luminance. Shall be represented in candelas per square
              meter (cd/m²). Valid value is in the range 0 <= f <= 999.9999



I can post a link to a formatted document if that would be easier. For
Matrix, Range, and Primaries, I'm pretty much using values that map
directly to values defined in FFmpeg.

Thanks,
Frank

[1]
http://lists.matroska.org/pipermail/matroska-devel/2015-September/004778.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.matroska.org/pipermail/matroska-devel/attachments/20160105/14b2448b/attachment.html>


More information about the Matroska-devel mailing list