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 support for variable length extension metadata blocks #106

Merged
merged 6 commits into from
Jan 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "dovi_tool"
version = "1.4.3"
version = "1.4.4"
authors = ["quietvoid"]
edition = "2018"
rust-version = "1.51.0"
Expand Down
1 change: 1 addition & 0 deletions assets/generator_examples/full_example.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
},
{
"Level9": {
"length": 1,
"source_primary_index": 0
}
},
Expand Down
1 change: 1 addition & 0 deletions assets/generator_examples/no_duration.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
},
{
"Level9": {
"length": 1,
"source_primary_index": 0
}
}
Expand Down
8 changes: 4 additions & 4 deletions assets/tests/cmv4_0_2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
<AspectRatios>1.77778 1.55556</AspectRatios>
</Level5>
<Level9 level="9">
<SourceColorModel>255</SourceColorModel>
<SourceColorModel>0</SourceColorModel>
<SourceColorPrimary>0.68 0.32 0.265 0.69 0.15 0.06 0.3127 0.329</SourceColorPrimary>
</Level9>
</DVDynamicData>
Expand Down Expand Up @@ -156,7 +156,7 @@
<TID>1</TID>
<L8Trim>0 0 0 0 0 0</L8Trim>
<MidContrastBias>0</MidContrastBias>
<HighlightClipping>0</HighlightClipping>
<HighlightClipping>-0.0180664</HighlightClipping>
<SaturationVectorField>0 0 0 0 0 0</SaturationVectorField>
<HueVectorField>0 0 0 0 0 0</HueVectorField>
</Level8>
Expand All @@ -169,7 +169,7 @@
<HueVectorField>0 0 0 0 0 0</HueVectorField>
</Level8>
<Level9 level="9">
<SourceColorModel>255</SourceColorModel>
<SourceColorModel>0</SourceColorModel>
<SourceColorPrimary>0.68 0.32 0.265 0.69 0.15 0.06 0.3127 0.329</SourceColorPrimary>
</Level9>
</DVDynamicData>
Expand All @@ -190,7 +190,7 @@
<L1Offset>0 -0.0863522 0</L1Offset>
</Level3>
<Level9 level="9">
<SourceColorModel>255</SourceColorModel>
<SourceColorModel>0</SourceColorModel>
<SourceColorPrimary>0.68 0.32 0.265 0.69 0.15 0.06 0.3127 0.329</SourceColorPrimary>
</Level9>
</DVDynamicData>
Expand Down
110 changes: 110 additions & 0 deletions assets/tests/cmv4_0_2_custom_displays.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
<?xml version="1.0" encoding="UTF-8"?>
<DolbyLabsMDF xmlns="http://www.dolby.com/schemas/dvmd/4_0_2">
<Version>4.0.2</Version>
<RevisionHistory>
<Revision>
<DateTime>2020-02-17T11:29:59Z</DateTime>
<Author>Blackmagic Design</Author>
<Software>DaVinci Resolve Studio</Software>
<SoftwareVersion>16.1.2.026</SoftwareVersion>
</Revision>
</RevisionHistory>
<Outputs>
<Output>
<CompositionName>Black</CompositionName>
<UniqueID>118cbebe-317f-4d84-9b10-604289433563</UniqueID>
<NumberVideoTracks>1</NumberVideoTracks>
<CanvasAspectRatio>1.77778</CanvasAspectRatio>
<ImageAspectRatio>1.77778</ImageAspectRatio>
<Video>
<Track>
<TrackName>V1</TrackName>
<UniqueID>852c64bc-9b4c-4546-b013-a333f6a871ca</UniqueID>
<EditRate>24000 1001</EditRate>
<ColorEncoding>
<Primaries>
<Red>0.68 0.32</Red>
<Green>0.265 0.69</Green>
<Blue>0.15 0.06</Blue>
</Primaries>
<WhitePoint>0.3127 0.329</WhitePoint>
<PeakBrightness>10000</PeakBrightness>
<MinimumBrightness>0</MinimumBrightness>
<Encoding>pq</Encoding>
<ColorSpace>rgb</ColorSpace>
<SignalRange>computer</SignalRange>
</ColorEncoding>
<Level6 level="6">
<MaxCLL>0</MaxCLL>
<MaxFALL>0</MaxFALL>
</Level6>
<PluginNode>
<DVGlobalData level="0">
<MasteringDisplay>
<ID>255</ID>
<Name>1000-nit, P3, D65, ST.2084, Full</Name>
<Primaries>
<Red>0.681 0.322</Red>
<Green>0.2653 0.694</Green>
<Blue>0.155 0.066</Blue>
</Primaries>
<WhitePoint>0.31277 0.3298</WhitePoint>
<PeakBrightness>1000</PeakBrightness>
<MinimumBrightness>0.0001</MinimumBrightness>
<DiagonalSize>42</DiagonalSize>
</MasteringDisplay>
<TargetDisplay>
<ID>255</ID>
<Name>100-nit, BT.709, BT.1886, Full</Name>
<Primaries>
<Red>0.641 0.332</Red>
<Green>0.33 0.64</Green>
<Blue>0.155 0.066</Blue>
</Primaries>
<WhitePoint>0.31277 0.3298</WhitePoint>
<PeakBrightness>100</PeakBrightness>
<MinimumBrightness>0.005</MinimumBrightness>
<EOTF>gamma_bt1886</EOTF>
<DiagonalSize>42</DiagonalSize>
</TargetDisplay>
</DVGlobalData>
<Level254 level="254">
<DMMode>0</DMMode>
<DMVersion>2</DMVersion>
<CMVersion>4 0</CMVersion>
</Level254>
</PluginNode>
<Shot>
<UniqueID>07e96e28-5bd9-47ef-8e21-4bbac5986052</UniqueID>
<Record>
<In>86400</In>
<Duration>24</Duration>
</Record>
<PluginNode>
<DVDynamicData>
<Level1 level="1">
<ImageCharacter>0 0.2 0.508078</ImageCharacter>
</Level1>
<Level3 level="3">
<L1Offset>0 -0.2 -0.508078</L1Offset>
</Level3>
<Level8 level="8">
<TID>255</TID>
<L8Trim>0.01 0.02 0.03 0.04 0.05 0.06</L8Trim>
<MidContrastBias>0.02</MidContrastBias>
<HighlightClipping>-0.0180664</HighlightClipping>
<SaturationVectorField>0 0 0 0 0.17 0</SaturationVectorField>
<HueVectorField>0 0.25 0 0 0 0</HueVectorField>
</Level8>
<Level9 level="9">
<SourceColorModel>255</SourceColorModel>
<SourceColorPrimary>0.681 0.322 0.2653 0.694 0.155 0.066 0.31277 0.3298</SourceColorPrimary>
</Level9>
</DVDynamicData>
</PluginNode>
</Shot>
</Track>
</Video>
</Output>
</Outputs>
</DolbyLabsMDF>
Binary file added assets/tests/mel_variable_l8_length13.bin
Binary file not shown.
5 changes: 4 additions & 1 deletion docs/generator.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
The generator can create a profile 8.1 RPU binary.
Any extension metadata can be added.

Any extension metadata can be added, but adding blocks is for advanced usage.
Ideally, most custom blocks usage should be scripted, especially when shots are involved.
For the structure expected for deserialization, see [metadata blocks](../dolby_vision/src/rpu/extension_metadata/blocks).

A JSON config example:

Expand Down
6 changes: 5 additions & 1 deletion dolby_vision/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
### 1.6.0
## 1.6.1

- Add support for variable length blocks: L8, L9, L10.

## 1.6.0

- Fixed deserialize default value for `GenerateConfig`.`cm_version` field.
- Added `default_metadata_blocks` to `GenerateConfig` struct.
Expand Down
2 changes: 1 addition & 1 deletion dolby_vision/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "dolby_vision"
version = "1.6.0"
version = "1.6.1"
authors = ["quietvoid"]
edition = "2018"
rust-version = "1.55.0"
Expand Down
Loading