Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add block additional mapping for generic type/value #353

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
4 changes: 4 additions & 0 deletions block_additional_mappings/key_value.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## Key Value Pair Description

The Block Additional Mapping for a `Key Value Pair` provides a generic method to store data with a label in association with a Block. The label (referred to here as the `Key`) is stored within the `BlockAddIDExtraData` Element and the associate `Value` is stored within the corresponding `BlockMore` Element.

16 changes: 1 addition & 15 deletions block_additional_mappings/smpte-st12-1-timecode.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
## SMPTE ST 12-1 Timecode

### Timecode Description
## SMPTE ST 12-1 Timecode Description

SMPTE ST 12-1 timecode values can be stored in the `BlockMore` element to associate
the content of a Matroska Block with a particular timecode value.
Expand Down Expand Up @@ -43,15 +41,3 @@ For example, a timecode value of "07:32:54;18" can be expressed as a 64-bit SMPT
10000000 01100000 01100000 01010000
00100000 00110000 01110000 00000000
```

### BlockAddIDType

The `BlockAddIDType` value reserved for timecode is "121".

### BlockAddIDName

The `BlockAddIDName` value reserved for timecode is "SMPTE ST 12-1 timecode".

### BlockAddIDExtraData

`BlockAddIDExtraData` is unused within this block additional mapping.
12 changes: 6 additions & 6 deletions block_additional_mappings_intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ The following XML depicts the nested elements of a `BlockGroup` element with an
```

When the `BlockAddID` is set a value greater than "1", then the contents of the
`BlockAdditional` element are defined by the `BlockAdditionalMapping` element, within
`BlockAdditional` element are defined by the `BlockAdditionMapping` element, within
the associated `TrackEntry` element, where the `BlockAddID` element of `BlockAdditional` element
equals the `BlockAddIDValue` of the associated `TrackEntry`'s `BlockAdditionalMapping` element.
That `BlockAdditionalMapping` element identifies a particular `Block Additional Mapping` by the `BlockAddIDType`.
equals the `BlockAddIDValue` of the associated `TrackEntry`'s `BlockAdditionMapping` element.
That `BlockAdditionMapping` element identifies a particular `Block Additional Mapping` by the `BlockAddIDType`.

The values of `BlockAddID` that are 2 of greater have no semantic meaning, but simply
associate the `BlockMore` element with a `BlockAdditionMapping` of the associated `Track`.
Expand All @@ -41,12 +41,12 @@ The following XML depicts a use of a `Block Additional Mapping` to associate a t
<TrackNumber>1</TrackNumber>
<TrackUID>568001708</TrackUID>
<TrackType>1</TrackType>
<BlockAdditionalMapping>
<BlockAdditionMapping>
<BlockAddIDValue>2</BlockAddIDValue><!--arbitrary value
used in BlockAddID-->
<BlockAddIDName>timecode</BlockAddIDName>
<BlockAddIDType>12</BlockAddIDType>
</BlockAdditionalMapping>
</BlockAdditionMapping>
<CodecID>V_FFV1</CodecID>
<Video>
<PixelWidth>1920</PixelWidth>
Expand All @@ -61,7 +61,7 @@ The following XML depicts a use of a `Block Additional Mapping` to associate a t
<BlockAdditions>
<BlockMore>
<BlockAddID>2</BlockAddID><!--arbitrary value from
BlockAdditionalMapping-->
BlockAdditionMapping-->
<BlockAdditional>01:00:00:00</BlockAdditional>
</BlockMore>
</BlockAdditions>
Expand Down
5 changes: 3 additions & 2 deletions codec_iana.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,12 @@ BlockAddIDType | BlockAddIDName | Reference
0 | Use BlockAddIDValue | This document, (#use-blockaddidvalue)
1 | Opaque data | This document, (#opaque-data)
4 | ITU T.35 metadata | This document, (#itu-t-35-metadata)
107 | Key Value pair | This document, (#key-value-pair)
121 | SMPTE ST 12-1 timecode | This document, (#smpte-st-12-1-timecode)
0x64766343 | Dolby Vision configuration dvcC | This document, (#dvcc)
0x61766345 | Dolby Vision enhancement-layer AVC configuration | This document, (#avce)
0x68766345 | Dolby Vision enhancement-layer HEVC configuration | This document, (#hvce)
0x64766343 | Dolby Vision configuration dvcC | This document, (#dvcc)
0x64767643 | Dolby Vision configuration dvvC | This document, (#dvvc)
0x64767743 | Dolby Vision configuration dvwC | This document, (#dvwc)
0x68766345 | Dolby Vision enhancement-layer HEVC configuration | This document, (#hvce)
0x6D766343 | MVC configuration | This document, (#mvcc)
Table: Initial Contents of "Matroska BlockAdditional Type IDs" Registry{#blockadd-id-registry-table}
61 changes: 51 additions & 10 deletions codec_specs.md
Original file line number Diff line number Diff line change
Expand Up @@ -1124,15 +1124,39 @@ Description: Based on MPEG/VOB PCI packets.
The frame contains a header consisting of the string "butonDVD" followed by the width and height
in pixels (16-bit unsigned integer each) and 4 reserved bytes. The rest is a full PCI packet described in [@!DVD-Info.PCI].

## Block Addition Mappings

Registered `BlockAddIDType` are:

# Block Addition Mappings

This section describes the various types of `BlockAdditionMapping` that can be stored in Matroska.
These help the player interpret the multiple `BlockAdditions` that can be added to each Matroska `BlockGroup`.
More defails can be found in section (#block-additional-mapping).

## Defining Block Addition Mappings

Support for a Block Addition mapping is defined in Matroska with the following values.

### Block Type Identifier

Each `BlockAdditionMapping` supported in Matroska **MUST** have a unique `BlockAddIDType`.
It **MUST** be defined for each Block Addition Mapping.

### Block Type Name

Each `BlockAdditionMapping` supported in Matroska **MAY** have a `BlockAddIDName`.
The `BlockAddIDName` provides a readable label for the encoding.

### Description

An optional description for the encoding. This value is only intended for human consumption.

## Initial Block Addition Mappings

### Use BlockAddIDValue

Block type identifier: 0

Block type name: Use BlockAddIDValue
Block type name: "Use BlockAddIDValue"

Description: This value indicates that the actual type is stored in `BlockAddIDValue` instead.
This value is expected to be used when it is important to have a strong compatibility
Expand All @@ -1143,7 +1167,7 @@ with an unknown `BlockAddIDValue`, and **SHOULD NOT** be used if it is possible

Block type identifier: 1

Block type name: Opaque data
Block type name: "Opaque data"

Description: the `BlockAdditional` data is interpreted as opaque additional data passed to the codec
with the Block data.
Expand All @@ -1153,13 +1177,30 @@ The usage of these `BlockAdditional` data is defined in the "Codec BlockAddition

Block type identifier: 4

Block type name: ITU T.35 metadata
Block type name: "ITU T.35 metadata"

Description: the `BlockAdditional` data is interpreted as ITU T.35 metadata, as defined by [@?ITU-T.35]
terminal codes. `BlockAddIDValue` **MUST** be 4.

HDR10+ dynamic metadata can be stored as ITU T.35 terminal codes as defined in Table 8 of [@?CTA.861-4].

### Key/Value Pair

Block type identifier: 107

Block type name: "Key Value pair"

Description: A generic method to store data with a label in association with a Block.
The definition of the usage is found in (#key-value-pair-description).

### SMPTE ST 12-1 Timecode

Block type identifier: 121

Block type name: "SMPTE ST 12-1 timecode"

Description: the `BlockAdditional` data is defined in (#smpte-st-12-1-timecode-description).

### avcE

Block type identifier: 0x61766345
Expand All @@ -1174,7 +1215,7 @@ be used if `CodecID` is not `V_MPEG4/ISO/AVC`.

Block type identifier: 0x68766345

Block type name: Dolby Vision enhancement-layer HEVC configuration
Block type name: "Dolby Vision enhancement-layer HEVC configuration"

Description: the `BlockAddIDExtraData` data is interpreted as the Dolby Vision enhancement-layer HEVC configuration as described in [@!DolbyVision-ISOBMFF].
This extension **MUST NOT** be used if `CodecID` is not `V_MPEGH/ISO/HEVC`.
Expand All @@ -1183,7 +1224,7 @@ This extension **MUST NOT** be used if `CodecID` is not `V_MPEGH/ISO/HEVC`.

Block type identifier: 0x64766343

Block type name: Dolby Vision configuration dvcC
Block type name: "Dolby Vision configuration dvcC"

Description: the `BlockAddIDExtraData` data is interpreted as `DOVIDecoderConfigurationRecord` structure, as defined in [@!DolbyVision-ISOBMFF],
for Dolby Vision profiles 0 to 7 included.
Expand All @@ -1192,7 +1233,7 @@ for Dolby Vision profiles 0 to 7 included.

Block type identifier: 0x64767643

Block type name: Dolby Vision configuration dvvC
Block type name: "Dolby Vision configuration dvvC"

Description: the `BlockAddIDExtraData` data is interpreted as `DOVIDecoderConfigurationRecord` structure, as defined in [@!DolbyVision-ISOBMFF],
for Dolby Vision profiles 8 to 10 included and 20.
Expand All @@ -1201,7 +1242,7 @@ for Dolby Vision profiles 8 to 10 included and 20.

Block type identifier: 0x64767743

Block type name: Dolby Vision configuration dvwC
Block type name: "Dolby Vision configuration dvwC"

Description: the `BlockAddIDExtraData` data is interpreted as `DOVIDecoderConfigurationRecord` structure, as defined in [@!DolbyVision-ISOBMFF],
for Dolby Vision profiles 11 to 19 included.
Expand All @@ -1210,7 +1251,7 @@ for Dolby Vision profiles 11 to 19 included.

Block type identifier: 0x6D766343

Block type name: MVC configuration
Block type name: "MVC configuration"

Description: the `BlockAddIDExtraData` data is interpreted as `MVCDecoderConfigurationRecord` structure, as defined in [@!ISO.14496-15].
This extension **MUST NOT** be used if `CodecID` is not `V_MPEG4/ISO/AVC`.
Expand Down