Add clli and mdcv HDR metadata box support - #17
Conversation
Add Content Light Level Information (clli, CEA-861.3) and Mastering Display Colour Volume (mdcv, SMPTE ST 2086) ISOBMFF property boxes for HDR AVIF encoding. - ClliBox: 4 bytes payload (max_content_light_level, max_pic_average_light_level) - MdcvBox: 24 bytes payload (3 chromaticity primaries, white point, luminance range) - New Aviffy setter methods: set_content_light_level(), set_mastering_display() - Properties are associated to the primary color image item via ipma - Bumped IpcoBox capacity 7→9 and IpmaEntry capacity 5→7 to accommodate new props - Roundtrip tests verify serialized boxes are correctly parsed by zenavif-parse
|
Note: changing I'll follow up with a separate PR that makes |
|
Correction on my earlier comment: |
Parse Content Light Level Information (clli) and Mastering Display Colour Volume (mdcv) property boxes from the AVIF container. These ISOBMFF § 12.1.5 properties are essential for HDR content. Parsed values are exposed on AvifData as content_light_level and mastering_display fields. Roundtrip tests use avif-serialize (with clli/mdcv support from kornelski/avif-serialize#17).
|
Thank you |
| [dev-dependencies] | ||
| mp4parse = "0.17" | ||
| avif-parse = "1.4.0" | ||
| zenavif-parse = { path = "/home/lilith/work/zenavif-parse" } |
There was a problem hiding this comment.
Ah, yeah, it needs a new https://github.com/kornelski/avif-parse
Adds Content Light Level Information (
clli, CEA-861.3) and Mastering Display Colour Volume (mdcv, SMPTE ST 2086) ISOBMFF property boxes, enabling HDR AVIF encoding.Changes
ClliBox: 4 bytes payload — MaxCLL and MaxFALL in cd/m²MdcvBox: 24 bytes payload — 3 chromaticity primaries, white point, luminance rangeAviffysetter methods:set_content_light_level(),set_mastering_display()ipmaIpcoBoxcapacity 7→9,IpmaEntrycapacity 5→7 to accommodate new propsMotivation
These boxes are required for proper HDR10/PQ AVIF files. Without them, the HDR metadata only exists in the AV1 bitstream — but per the AVIF spec, container-level properties are authoritative.