Dolby Vision - VS10 Engine on Ugoos AM6+

Working fine here with VS10 disabled. With it enabled, just like you said, metadata is discarded.

1 Like

I haven’t gotten a chance to test this, but is VS10 an all or nothing option or is it like the Whitelist for Display Resoulution. I’m thinking that it might be better to have VS10 as an option list so that which modes to have VS10 enabled for.

Such as
Setting: Dolby VS10 Modes

  • 8-bit SDR
  • 10-bit SDR
  • HDR10
  • HDR10+
  • HLG

The default would to have them on for all.

Feedback from last build.

  • No more black screen / only audio on my 2 hdr files, great work !
  • But now there is a black screen between every channel change on TVh live tv playback

I did try to put “echo Y > /sys/module/amdolby_vision/parameters/dolby_vision_enable” in autostart.sh but didn’t force always lldv as a work around fix for black screen on live tv zapping

1 Like

That actually happens on official nightlies, at least since the previous build. I encountered it just now while watching a show and starting the next episode without stopping.

Screen comes back on its own after a while, generally quicker if I try to bring up the UI.

Already added under Setting → CoreELEC for:

  • VS10 SDR
  • VS10 HDR10
  • VS10 HDR10+
  • VS10 HDR HLG

It depends on what information is available from Kodi upstream (I.e. before playing) as to how to split out, for example just added proper splitting by HDR10+ by leveraging quietvoid’s work in the BitstreamConverter to identify.

So it is feasible by bit depth also, as long as have that information up front.

FYI defaulting to all off - as it is subjective and I think reference (no alteration) should be the baseline, personally from my limited experience with it I see myself using this occasionally on SDR and possibly HDR depending on the quality of the source material.

What could be nice is also put under a keyboard shortcut (mappable to remote etc.) not looked into how to implement anything like that though.

This sounds perfect. Thanks!

No regressions it seems. Color bit still set correctly on TV-led DV with or without VS10 enabled.

Backing out of content on VS10 still seems to error, sets bad colors. But I can fix by playing native DV content and backing out again. Then GUI/menu colors are set correctly again.

What is the “Use Display Luminence” setting? Does it not already do that in TV-led mode, or is this meant to refine player led DV.

I think VS10 is activated on video start / stop right. That maybe what is causing it. To resolve, I think would need to render everything including GUI/menus in Dolby Vision as well. That is the Zidoo/Dune approach.

Downside of this is I feel like it pushes the panel too hard. Menus are extremely bright in Zidoos’ implementation. Maybe a toggle option to have VS10 everywhere or just on start/stop?

Likely redundant for tv-led more for Player Led where it will restrict to the Display’s luminance rather than some hard coded values from code iirc correct Min 50 (0.0005 Nits) Max 4000 Nits

Though have also seen comments elsewhere that the DV composer was using the Display Min and Max luminance in its logic as well, so why not for that as well just in case. Composer is always on box.

If the VS10 is acting more like the “fake” tv-led then also needed for that like Player Led.

To get to the real proper answer this needs evaluation with equipment / setup I do not have.

1 Like

Yeah, can also do from command line Y and N to Dv enable - detail in post, it actually does this in code also to switch off but suffering from a timing issue similar to the 12bit problems both AMlogic and Kodi changing settings similar time and not working out sometimes.

Is there a way to toggle display luminescence on/off through command line?

There is a follow sink min and max as part of the dv flags in parameters 5 vs 13 i.e. 8 adds this flag

It does though not completely back out once set until reboot

It feels like that setting has made a positive impact on my tv-led VS10.

Takes the edge off the brightness/gamma mapping. Maybe placebo, but light reflections and whites look softer and less distracting once this is turned on. But who knows, maybe my brain is lying to me.

For sure there is absolutely no reason to use my Zidoo anymore. Need to sell before other people figure out the same thing :slight_smile:

EDIT: Found a video where VS10 will consistently crash and lock the player. Need to unplug to reset, MPEG-2 remux of DS9. Will post crash logs tmrw.

Ironically if it is “fake” tv-led then likely more could do here, like trim the max lum back to cap the tone mapping lower etc.

Can also force it into “graphics” mode (another Kodi setting maybe) I.e. the mode thought of as “fake” tv-led and then have control over min and max for sure - in my original tv-led work I had this and the controls for min and max whilst working out what was going on - so it is all possible.

Many things could probably do. One is having the time and Two will probably start confusing even the “expert” user too much.

I’ve found that forcing a 12-bit 422 YUV output at all times works well in my testing. Like you said before, it isn’t really a 8-bit rgb output, all that needs to be done is change the flag in the avi packet to say rgb

Several things I noticed.

With my MPEG2 test file, mediainfo below:

General
Unique ID                                : 100104376710600018125241088231086407209 (0x4B4F66D3A7F9291B8F0876553082BE29)
Complete name                            : \\LIBRARY\Media\plex\media\tv\Star Trek - Deep Space 9\Star.Trek.Deep.Space.Nine.S01.NTSC.DVD.DD5.1.MPEG-2.REMUX-S0NNY\Star.Trek.Deep.Space.Nine.S01E05.Babel.NTSC.DVD.DD5.1.MPEG-2.REMUX-S0NNY.mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 1.82 GiB
Duration                                 : 45 min 24 s
Overall bit rate mode                    : Variable
Overall bit rate                         : 5 732 kb/s
Frame rate                               : 25.162 FPS
Movie name                               : Star Trek: Deep Space Nine (S01E05) Babel
Encoded date                             : 2020-06-12 20:13:21 UTC
Writing application                      : mkvmerge v35.0.0 ('All The Love In The World') 64-bit
Writing library                          : libebml v1.3.9 + libmatroska v1.5.2

Video
ID                                       : 1
Format                                   : MPEG Video
Format version                           : Version 2
Format profile                           : Main@Main
Format settings                          : CustomMatrix / BVOP
Format settings, BVOP                    : Yes
Format settings, Matrix                  : Custom
Format settings, GOP                     : Variable
Codec ID                                 : V_MPEG2
Codec ID/Info                            : MPEG 1 or 2 Video
Duration                                 : 45 min 24 s
Bit rate mode                            : Variable
Bit rate                                 : 5 274 kb/s
Maximum bit rate                         : 9 800 kb/s
Width                                    : 720 pixels
Height                                   : 480 pixels
Display aspect ratio                     : 4:3
Frame rate mode                          : Variable
Frame rate                               : 25.162 FPS
Original frame rate                      : 29.970 (30000/1001) FPS
Standard                                 : Component
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 0.607
Time code of first frame                 : 00:59:59;00
Time code source                         : Group of pictures header
GOP, Open/Closed                         : Open
GOP, Open/Closed of first frame          : Closed
Stream size                              : 1.67 GiB (92%)
Default                                  : Yes
Forced                                   : No
Color primaries                          : BT.601 NTSC
Transfer characteristics                 : BT.601
Matrix coefficients                      : BT.601

Audio
ID                                       : 2
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Commercial name                          : Dolby Digital
Codec ID                                 : A_AC3
Duration                                 : 45 min 24 s
Bit rate mode                            : Constant
Bit rate                                 : 448 kb/s
Channel(s)                               : 6 channels
Channel layout                           : L R C LFE Ls Rs
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Compression mode                         : Lossy
Stream size                              : 146 MiB (8%)
Title                                    : AC-3 5.1
Language                                 : English
Service kind                             : Complete Main
Default                                  : Yes
Forced                                   : No
AC3_metadata cmixlev                     : -3.0 dB
 surmixlev                               : -3 dB

Text #1
ID                                       : 3
Format                                   : VobSub
Codec ID                                 : S_VOBSUB
Codec ID/Info                            : Picture based subtitle format used on DVDs
Duration                                 : 44 min 15 s
Bit rate                                 : 4 942 b/s
Frame rate                               : 0.301 FPS
Count of elements                        : 800
Stream size                              : 1.56 MiB (0%)
Title                                    : English
Language                                 : English
Default                                  : No
Forced                                   : No

Text #2
ID                                       : 4
Format                                   : UTF-8
Codec ID                                 : S_TEXT/UTF8
Codec ID/Info                            : UTF-8 Plain Text
Duration                                 : 44 min 32 s
Bit rate                                 : 84 b/s
Frame rate                               : 0.307 FPS
Count of elements                        : 819
Stream size                              : 27.4 KiB (0%)
Title                                    : English (SDH)
Language                                 : English
Default                                  : No
Forced                                   : No

Menu
00:00:00.000                             : en:Chapter 01
00:06:24.384                             : en:Chapter 02
00:12:24.610                             : en:Chapter 03
00:15:48.580                             : en:Chapter 04
00:20:54.786                             : en:Chapter 05
00:24:59.564                             : en:Chapter 06
00:30:56.988                             : en:Chapter 07
00:34:41.779                             : en:Chapter 08

With hw acceleration on, I get an immediate and reproducible crash. Need to power cycle by pulling the cord to resolve.

With hw acceleration off, no crash, but also no VS10. This same file plays with VS10 on Zidoo.

Also noticed several crashes navigating menus or start/stopping content. Especially starting content and quickly backing out before video begins. Need to powercycle restart when that happens. I am using Plex, so https handling on content. Logs attached.

Crash logs:
https://paste.coreelec.org/Ih7ztO

Regular logs:
https://paste.coreelec.org/rpdndc

I think from a PR perspective it might be best to split this up into 3 PRs

  1. Changing the default colorimetry and adding a setting.
  2. Adding a setting for min/max luminescence
  3. VS10 Stuff

This should make it easier to merge and revert.

Man, this box just keeps becoming a better and better purchase!

Picked up the same file and get the same lock-up.
FYI if you leave it once locked it will reboot itself after 1 min - likely better than forcefully pulling the plug.

I have yet to find a solution to this in code, but I can make VS10 work with the file - if started normally and then switch over using command lines (will also need a new release so will try to get that ready, and then give the commands).

That to me puts this into the 'timing issues" camp - I would guesstimate again due to Kodi and AMLogic doing their own things with the HDMI - but this this case with more drastic outcomes - the whole area needs some deep thought as to how to make solid - probably above my abilities will need someone with strong knowledge on both.

I think there needs to be a separation between the output format and the what is set in the avi packet - send all DV in a 12-bit YUV 422 format, just set rgb in the avi packet when sending tv-led DV.

At the moment it looks like the output format and avi packet are coupled. I think the avi packet is then later overwritten by the DV code. Probably doesn’t help that, as far as I can tell, the avi packet is partially set, overwritten, and reset, in at least three different functions that call each other in a nested pattern … and this is all in the amlogic kernel part, I have no idea how Kodi factors into this.

Probably similar to you, I have found much more success and reliable operation by directly setting hdmi modes and avi packet info directly over ssh using code that bypass all the auto mode setting stuff.

As you say, I think someone that know all of what is going on needs to give it a complete look and include the hdmi_tx_hw.c code in this, not just the set_disp_mode_auto function.

1 Like

v4.

  • Can now use VS10 to map to SDR8, SDR10, HDR10 as well as Dolby Vision
  • Added config to allow Dolby Vision to map to HDR10, SDR10, SDR8

@djnice I think that should cover what you were looking for?

Looks like DV to HDR10 maybe an interesting route for those with none DV displays, and no “converter box” for LLDV, also may help with a closer mapping for those displays.

@Jonke Maybe can try with your projector - if given DV mapped HDR10 would be interested if there was much difference between that and LLDV (Player Led).
Technically it is 2 bits less depth and currently I think the output is YUV444 from the internal VS10 RGB444 so I imagine that adds up to one more conversion in the chain.

Edit: Actually just thought probably not going to fly yet - I think other code in Kodi is checking the displays abilities - not sure would get past that even if technically this will work - someone would need to rework that restriction probably - can try and see I guess!


Edit: Version removed - please see new version in later post.


Unresolved issues / annoyances (tv-led testing):

  • STB Lock-up for some content (please wait 1 min if it happens for a self reboot to recover)
  • Colours can go wrong still
  • Software decoding looks incompatible with VS10
  • Player Led needs testing more

With some manual work around you can play the content that would otherwise cause a lock up, by following these steps.

  1. set “off” the VS10 setting for the DR type of the content e.g. if SDR then set VS10 for SDR to “off”
  2. Play the content and pause once started.
  3. Issue following commands:
    • echo 2 > /sys/module/amdolby_vision/parameters/dolby_vision_policy
    • echo 1 > /sys/module/amdolby_vision/parameters/dolby_vision_mode
    • echo Y > /sys/module/amdolby_vision/parameters/dolby_vision_enable
  4. Play (unpause)
3 Likes