Learning about Dolby Vision and CoreELEC development

Update:

Changes

  • Large rework of the processing of the metadata. Now happens ahead of time, and just copied later. Seems to work better and minimise issues with black screens / flickering when paused. Also just a all-round better approach.
  • Added automatic on-the-fly adjustment to any L5 crop metadata. This allows subtitles and the gui to show when playing a file that uses a L5 crop. Any L5 crop is removed if the osd / gui has been updated in the last osd_L5_timeout_ms milliseconds. Defaults to 3 seconds. Adjust with
 echo 3000 > /sys/module/amvideo/parameters/osd_L5_timeout_ms

Initial once-off setup:
Set kodi to use 12-bit 422 with a 3840 x 2160 gui resolution. Enable the option “Disable GUI scaling”. Set refresh rate to 25 fps (or any other refresh rate that is different to your DV files - ensures correct colors when stopping video). Reboot.

Usage and what works
Play a DV file. Anything playable as p8.1 should work correctly. Profile 5 content will play and trigger DV, but the colors will be wrong to varying extents.

Aside from the below issues, it really seems to “just work” for me.

Known Issues

  • If a video with a L5 crop is paused without the giu first being visible, the crop L5 crop will remain and may cut off some of the gui. This is due to processing the metadata ahead of time. Very edge case, not likely to be solved as I don’t care. Workaround is to just bring up the gui before pausing.
  • If any subtitles are enabled the L5 crop is always removed even when they are not actually currently showing anything. This is not due to the auto L5 adjustment I have added, but rather Kodi itself updating the gui every single frame when a subtitle track is enable even if no subtitles are currently showing…
  • A flicker of a black screen may occur when pausing / bringing up the gui. Think it is caused by frame drops that mean the dv metadata isn’t injected. Again, issue will likely remain as frequently pausing while playing a DV file isn’t really a use case.
  • Screen corruption on 60fps video. Not directly related to the DV stuff, problem that occurs due to the native 4k gui. Solution would be to not need a 4k gui, but no one seems to know how to enable the second osd layer that would remove this requirement - this would also let a -no build work properly.
5 Likes