EDID Override - Injecting a Dolby VSVDB Block

@cpm tested new build with string from exel above. On boot i had my PJ in auto mode and that made this build output sdr bt709. Had to force it into hdr to get all working. Will test more in the coming days

Edit , yes with PJ at auto sdr/hdr i won’t get dolby vision under display supported in system info. Have to force hdr and reboot CE ( restart Kodi won’t solve it)

Edit 2 even in hdr mode i would loose dv sometimes . Rebooted many times, but dv was not stable. Sometime back sometime lost

That is simply amazing ! have to test it right away. Hope this will be included in main branch ! Thanks a lot @cpm !

You could/can still load an EDID in the autosys.sh, does that help in your case?

Before doing that though can confirm double check from the below:

When playing content:

Dolby Type: Player Led by VSVDB
Dolby VSVDB: enabled
Dolby VSVDB Hex String: EB0146D000490348A15855A2

Hex String from your spreadsheet pic.

It will inject the Dolby VSVDB into the DV video processing every time you play content in DV or using VS10, that sends metadata to the projector that it is HDR rather than DV-LL (DV-LL under the hood is effectively HDR), I am surprised that your projector does not switch over to HDR automatically when playing?

For the Display supported in system info: if changing the EDID I guess that would say supported?

Not sure what it would say with the dynamic injection though, the point of the dynamic injection is to get the Dolby VSVDB metadata into the processing pipeline / dovi.ko - not really to make the system think the display is a DV display - but to be able to play DV content correctly on a non-DV display via HDR.

I loosely followed this thread and have a hard time understanding what’s going on. :rofl:The last post helped though.

My issue with VS10 sdr to dv was colors, rather than “highlights/brightness”. Colors are significantly muted for me when I use this.
It puzzled me that everyone loved it and I just tried your build and colors are significantly more vibrant in vsvdb mode for some reason. I went back and tried vs10 sdr to hdr too, but colors are muted in tv led.

Also unrelated but this edid loading gave me hope for an unrelated annoyance I had. I still can’t determine the cause but after some time Corelec can’t see DV support and I have to change my hdmi input settings from the tv back and forth for it to work again. Only happens If I connect Ugoos through my Samsung q990c soundbar.

I checked the edid when this happened again and it was complete nonsense.

edid-decode (hex):

00 ff ff ff ff ff ff 00 17 10 01 09 01 00 00 00
00 0e 01 03 80 73 41 78 2a 7c 11 9e 59 47 9b 27
10 50 54 21 08 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 01 1d 00 72 51 d0 1e 20 6e 28
55 00 10 09 00 00 00 1e 8c 0a d0 8a 20 e0 2d 10
10 3e 96 00 04 03 00 00 00 18 00 00 00 fc 00 45
50 2d 48 44 4d 49 2d 52 58 0a 20 20 00 00 00 fd
00 3b 3d 0f 2e 08 00 0a 20 20 20 20 20 20 01 ab

02 03 37 70 4a 84 13 05 14 10 02 03 11 12 01 3b
09 7f 07 0f 7f 07 67 7f 07 57 07 03 15 07 50 5f
7e 03 5f 7e 01 3f 1e c0 7b 04 59 83 4f 00 00 67
03 0c 00 22 00 80 1e 01 1d 00 72 51 d0 1e 20 6e
28 55 00 10 09 00 00 00 1e 01 1d 00 bc 52 d0 1e
20 b8 28 55 40 10 09 00 00 00 1e 01 1d 80 18 71
1c 16 20 58 2c 25 00 10 09 00 00 00 9e 01 1d 80
d0 72 1c 16 20 10 2c 25 80 10 09 00 00 00 00 51

----------------

Block 0, Base EDID:
  EDID Structure Version & Revision: 1.3
  Vendor & Product Identification:
    Manufacturer: EXP
    Model: 2305
    Serial Number: 1
    Made in: 2004
  Basic Display Parameters & Features:
    Digital display
    Maximum image size: 115 cm x 65 cm
    Gamma: 2.20
    DPMS levels: Off
    RGB color display
    First detailed timing is the preferred timing
  Color Characteristics:
    Red  : 0.6181, 0.3505
    Green: 0.2802, 0.6054
    Blue : 0.1523, 0.0634
    White: 0.3125, 0.3291
  Established Timings I & II:
    DMT 0x04:   640x480    59.940476 Hz   4:3     31.469 kHz     25.175000 MHz
    DMT 0x09:   800x600    60.316541 Hz   4:3     37.879 kHz     40.000000 MHz
    DMT 0x10:  1024x768    60.003840 Hz   4:3     48.363 kHz     65.000000 MHz
  Standard Timings: none
  Detailed Timing Descriptors:
    DTD 1:  1280x720    60.000000 Hz  16:9     45.000 kHz     74.250000 MHz (16 mm x 9 mm)
                 Hfront  110 Hsync  40 Hback  220 Hpol P
                 Vfront    5 Vsync   5 Vback   20 Vpol P
    DTD 2:   720x480    59.940060 Hz   3:2     31.469 kHz     27.000000 MHz (4 mm x 3 mm)
                 Hfront   16 Hsync  62 Hback   60 Hpol N
                 Vfront    9 Vsync   6 Vback   30 Vpol N
    Display Product Name: 'EP-HDMI-RX'
    Display Range Limits:
      Monitor ranges (GTF): 59-61 Hz V, 15-46 kHz H, max dotclock 80 MHz
  Extension blocks: 1
Checksum: 0xab

----------------

Block 1, CTA-861 Extension Block:
  Revision: 3
  Basic audio support
  Supports YCbCr 4:4:4
  Supports YCbCr 4:2:2
  Native detailed modes: 0
  Video Data Block:
    VIC   4:  1280x720    60.000000 Hz  16:9     45.000 kHz     74.250000 MHz (native)
    VIC  19:  1280x720    50.000000 Hz  16:9     37.500 kHz     74.250000 MHz
    VIC   5:  1920x1080i  60.000000 Hz  16:9     33.750 kHz     74.250000 MHz
    VIC  20:  1920x1080i  50.000000 Hz  16:9     28.125 kHz     74.250000 MHz
    VIC  16:  1920x1080   60.000000 Hz  16:9     67.500 kHz    148.500000 MHz
    VIC   2:   720x480    59.940060 Hz   4:3     31.469 kHz     27.000000 MHz
    VIC   3:   720x480    59.940060 Hz  16:9     31.469 kHz     27.000000 MHz
    VIC  17:   720x576    50.000000 Hz   4:3     31.250 kHz     27.000000 MHz
    VIC  18:   720x576    50.000000 Hz  16:9     31.250 kHz     27.000000 MHz
    VIC   1:   640x480    59.940476 Hz   4:3     31.469 kHz     25.175000 MHz
  Audio Data Block:
    Linear PCM:
      Max channels: 2
      Supported sample rates (kHz): 192 176.4 96 88.2 48 44.1 32
      Supported sample sizes (bits): 24 20 16
    Linear PCM:
      Max channels: 8
      Supported sample rates (kHz): 192 176.4 96 88.2 48 44.1 32
      Supported sample sizes (bits): 24 20 16
    MAT (MLP):
      Max channels: 8
      Supported sample rates (kHz): 192 176.4 96 88.2 48 44.1 32
      Supports Dolby TrueHD, object audio PCM and channel-based PCM
      Hash calculation not required for object audio PCM or channel-based PCM
    Enhanced AC-3 (DD+):
      Max channels: 8
      Supported sample rates (kHz): 48 44.1 32
      Supports Joint Object Coding
      Supports Joint Object Coding with ACMOD28
    AC-3:
      Max channels: 6
      Supported sample rates (kHz): 48 44.1 32
      Maximum bit rate: 640 kb/s
    DTS-HD:
      Max channels: 8
      Supported sample rates (kHz): 192 176.4 96 88.2 48 44.1
      Audio Format Code dependent value: 0x03
    DTS-HD:
      Max channels: 8
      Supported sample rates (kHz): 192 176.4 96 88.2 48 44.1
      Audio Format Code dependent value: 0x01
    DTS:
      Max channels: 8
      Supported sample rates (kHz): 96 88.2 48 44.1
      Maximum bit rate: 1536 kb/s
    MPEG-H 3D Audio:
      MPEG-H 3D Audio Level: Level 3
      Supported sample rates (kHz): 48
      Supports MPEG-H 3D Audio Low Complexity Profile
  Speaker Allocation Data Block:
    FL/FR - Front Left/Right
    LFE1 - Low Frequency Effects 1
    FC - Front Center
    BL/BR - Back Left/Right
    RLC/RRC - Rear Left/Right of Center (Deprecated)
  Vendor-Specific Data Block (HDMI), OUI 00-0C-03:
    Source physical address: 2.2.0.0
    Supports_AI
    Maximum TMDS clock: 150 MHz
  Detailed Timing Descriptors:
    DTD 3:  1280x720    60.000000 Hz  16:9     45.000 kHz     74.250000 MHz (16 mm x 9 mm)
                 Hfront  110 Hsync  40 Hback  220 Hpol P
                 Vfront    5 Vsync   5 Vback   20 Vpol P
    DTD 4:  1280x720    50.000000 Hz  16:9     37.500 kHz     74.250000 MHz (16 mm x 9 mm)
                 Hfront  440 Hsync  40 Hback  220 Hpol P
                 Vfront    5 Vsync   5 Vback   20 Vpol P
    DTD 5:  1920x1080i  60.000000 Hz  16:9     33.750 kHz     74.250000 MHz (16 mm x 9 mm)
                 Hfront   88 Hsync  44 Hback  148 Hpol P
                 Vfront    2 Vsync   5 Vback   15 Vpol P Vfront +0.5 Odd Field
                 Vfront    2 Vsync   5 Vback   15 Vpol P Vback  +0.5 Even Field
    DTD 6:  1920x540    50.044484 Hz  32:9     28.125 kHz     74.250000 MHz (analog composite, sync-on-green, 16 mm x 9 mm)
                 Hfront  528 Hsync  44 Hback  148 Hpol N
                 Vfront    2 Vsync   5 Vback   15 Vpol N
Checksum: 0x51

----------------

Preferred Video Timing if only Block 0 is parsed:
  DTD   1:  1280x720    60.000000 Hz  16:9     45.000 kHz     74.250000 MHz (16 mm x 9 mm)
                 Hfront  110 Hsync  40 Hback  220 Hpol P
                 Vfront    5 Vsync   5 Vback   20 Vpol P

----------------

Preferred Video Timings if Block 0 and CTA-861 Blocks are parsed:
  VIC   4:  1280x720    60.000000 Hz  16:9     45.000 kHz     74.250000 MHz (native)
                 Hfront  110 Hsync  40 Hback  220 Hpol P
                 Vfront    5 Vsync   5 Vback   20 Vpol P
  DTD   1:  1280x720    60.000000 Hz  16:9     45.000 kHz     74.250000 MHz (16 mm x 9 mm)
                 Hfront  110 Hsync  40 Hback  220 Hpol P
                 Vfront    5 Vsync   5 Vback   20 Vpol P

----------------

Native Video Resolution:
  1280x720

----------------

edid-decode SHA: 84ddf9155376 2021-10-03 10:37:45

Warnings:

Block 1, CTA-861 Extension Block:
  IT Video Formats are overscanned by default, but normally this should be underscanned.
  Video Data Block: For improved preferred timing interoperability, set 'Native detailed modes' to 1.

Failures:

Block 0, Base EDID:
  Detailed Timing Descriptor #1: Mismatch of image size 16x9 mm vs display size 1150x650 mm.
  Detailed Timing Descriptor #2: Mismatch of image size 4x3 mm vs display size 1150x650 mm.
Block 1, CTA-861 Extension Block:
  Detailed Timing Descriptor #3: Mismatch of image size 16x9 mm vs display size 1150x650 mm.
  Detailed Timing Descriptor #4: Mismatch of image size 16x9 mm vs display size 1150x650 mm.
  Detailed Timing Descriptor #5: Mismatch of image size 16x9 mm vs display size 1150x650 mm.
  Detailed Timing Descriptor #6: Mismatch of image size 16x9 mm vs display size 1150x650 mm.
  Missing VCDB, needed for Set Selectable RGB Quantization to avoid interop issues.
EDID:
  Base EDID: Some timings are out of range of the Monitor Ranges:
    Vertical Freq: 50.000 - 60.317 Hz (Monitor: 59.000 - 61.000 Hz)
    Horizontal Freq: 28.125 - 67.500 kHz (Monitor: 15.000 - 46.000 kHz)
    Maximum Clock: 148.500 MHz (Monitor: 80.000 MHz)

EDID conformity: FAIL

Loading a previously working edid did not work though, I don’t understand why. I was thinking of making a cronjob to periodically load proper edid, and maybe do it only if it broke.

As always, love the work you do. I wonder how the experience would have been with my old Sony TV that didn’t support DV with this build. Probably would have kept that TV still. :smiley:

Edit: Seems the hex string is not required on my tv. Also, too early to tell but I think I love the SDR conversion in vsvdb mode.

Dolby Type: Player Led by VSVDB
Dolby VSVDB: enabled
Dolby VSVDB Hex String: EB0146D000490348A15855A2

Yes to all above. Tested again now and dv.mkv works, but not dv uhd.iso (gives sdr BT.709)

Edit

Yes dv uhd.iso works ok again and dolby vision is back as supported display in system info

Latest Update

  • Rebase on latest CE 21.1
  • Change names of Dolby Vision Type to be hopefully more descriptive:
    • Display Led (DV-STD)
    • Player Led (DV-LL)
    • Player Led (HDR)
  • Some tweaking on stability

For the stability I also have a ssh command to run, not integrated into the build yet.
I have so far not been able to make it crash-reboot, switching between lots of different content types stopping and starting quickly, though Murphy’s law will say someone will still get a crash almost on the first attempt! but looking good to me.

echo 31 > /sys/module/amdolby_vision/parameters/force_update_reg

Can add to your autosys.sh for now, for just run once and see if have issues in that session.

This looks a bit brute force but not seen any side effects and if anything anecdotally feels a little smoother. But do be on the look out for anything odd happening picture issues etc.

Um not sure why on the iso maybe it is checking somewhere else but don’t recall seeing anything - don’t use iso myself, but will have a hunt around as to why.

Edit:
For the iso I think I saw in the code it is checking the display is DV capable, when using VSVDB it is not marking the display as not changing the display via EDID, if loading an EDID or use a external device to change then will be.

Will change the code for another update later.

Weighing up if for VSVDB it should say the display is dv capable, but thinking more correct that it says it is not - because actually is not.

Ah yeah sorry got muddled up colour and brightness.

Odd though that Display Led and Player Led (HDR) ne Player Led for VSVDB would have any big difference - all three modes on my display look extremely close.

As your TV already has a VSVDB no need to enter one, the Player Led (HDR) will just trigger CE into sending an HDR metadata signal rather the DV-LL.

For the mystery change in EDID cron sounds like a plan until can track down the root cause, FYI this load and save are just part of AMLogic and available in all versions of CE just needed to work out how to use it.

P.S. If really cannot get to the bottom of why the colours are off on Display Led then probably can think about how to add more permutations under the VS10 parameters like VS10 For SDR → Dolby Vision / Dolby Vision (HDR) etc.
Just need a sensible way so people understand what it all means!
So as to not effect more DV content and using Display Led (DV-Std)

Ah just noticed I set it Display Led (DV-STD) all upper case - need to correct for next build.

1 Like

Thanks again.
Its works awesome. :+1:
The last nightly has the GUI peak luminance in HDR PQ mode settings. For gui elements and for the subtitles.
Its working fine in HDR and DV sources. (The HLG untouched.)
The settings cannot apply, when Dolby Vision VS10 target mode for SDR content set to Dolby Vision mode?

Yeah, can’t think of why. If it was my picture settings then player led hdr and vsvdb hdr would’ve looked the same.

But now I finally see what made people excited about VS10.

It could be done to accommodate VS10 and looking at the PR possibly would need a change for Player Led (HDR) as well.

I think though to wait for how the CE team implement what they are cooking for the DV VS10, I would guess at this point they will do two settings an up mapping from SDR/HDR to DV and have an always on DV option.

1 Like

Latest Update

  • Baked in the stability parameter change - as not seeing any issues and definitely very stable for me not had any problems so far.
  • iso DV should now work in Player Led (HDR) with a VSVDB - though don’t have an iso to test with, guess I will create one.
  • Had a go at adding HLG HDR and VS10 to the GUI luminance so not too bright in HDR / DV etc content, has some corner cases but covers most now.
  • Tidied up the code behind the scenes it should perform the same but as always be on the look out for bugs if testing.

Need to look into limiting some invalid option combinations on the kodi ui mainly for the spinner options like removing Player Led (DV-LL) and Display Led (DV-Std) when the Display cannot do - I see one way of doing which looks a little involved but just want to check anyone have experience in doing this type of thing and can point to some code?

9 Likes

Bravo ! this is wonderful ! thanks again.
Also interesting to point out that DV Player-LED HDR is a very versatile/smart solution for everyone having DV-incompatible hardware such as old AVRs, Samsung TVs, HDR-only projectors…

With this last release I got darken gui and subtitles.
Can’t find where to change it…?
Any directions as its a bit too dark for me.
And white subtitles I choose looks gray as hell :wink:

@cpm so no ssh/autostart needed? Can i / should i use my own edid as well ?

It’s under system, display settings. Called GUI peak luminance.

1 Like

Settings → System → Display → GUI peak luminance in HDR PQ mode
Increase until you’re happy.

[EDIT]
Oops, too late.

1 Like

Please test without, and lets see.

FYI May want to hold off for now will have another build a bit later on - fixing some behind the scenes stuff mainly, not affecting the picture quality just performance enhancement.

1 Like

Yeah, its very stable. I’m tried with lot of different files, codecs, dv mel,fel.
Would be nice to merge the whole, to the main CE. Thx

Latest Update

  • :warning: Changed the Dolby VSVDB to only accept the payload element of only V1 and V2 Dolby VSVDB - allows for simpler code avoiding a couple of pitfalls I cannot test fully for.

    • Only the payload should be specified.
    • If you have a Dolby VSVDB in the UI already you will need to change it for this version.
    • Remove the first 10 characters (in bold below) from your existing entry - for example:
      • Existing: EB0146D000490348A15855A2
      • Replace with: 490348A15855A2
      • This should now always be exactly 14 characters long - that and other checks are in the logic but not checked at the UI level.
  • Limited the Dolby Vision type UI selection according to connected display (mostly)

    • Display Led (DV-Std) [Available when CE says the display is DV capable]
      • I think there is likely a corner-case with old Sony TV which only do Player Led - needs a better differentiator in CE.
    • Player Led (DV-LL) [Available when CE says the display is DV Low Latency capable]
    • Player Led (HDR) [Available regardless of the display capability - but should really check it is HDR capable]
  • Fixed defect - playing original content e.g. HLG HDR without using VS10 - i.e. want the original HLG, it played incorrect as SDR in that situation.

  • Fixed defect in Dolby VSVDB - memory allocation issue - was not causing a visible problem but filling log and would cause some additional CPU usage - side stepped by using a different technique.

  • Fixed defect in Player Led (HDR) - it was frequently re-creating the DV metadata parser (looks on each change of the RPU) - because that bit of code thought a HDR output signal meant it no longer needed it, this is now corrected - probably not even noticeable on CPU usage but better anyway.
    Edit: This may have just been because of a bad mkv need to check more later, if so can revert this element as would not be needed.

  • General code improvements to reuse more - to reduce footprint of change.

Whilst checking on some of the above it looks to me that even though the HLG HDR is “working” with VS10 and we get DV output etc. it looks internally to me that it takes the HLG HDR as SDR and then converts to DV, I tried to force it into going HLG HDR → DV but got a green screen. It looks like this maybe a limitation on the SoC level I think some later TV SoC can handle more correctly likely on a later revision of DV.

Not done too much testing on this version yet, put it out as will be away for a time, please revert back to previous versions if you find a show-stopper.

8 Likes