EDID Override - Injecting a Dolby VSVDB Block

when you turn on a new device there is a new handshake usually. The only thing, I already wrote about it, if some part of EDID data is not changed, DV block and maxPQ and minPQ data is not always changed. Because I have encountered many times when I change EDID on hdfury, but the DV data remains the same, not new ones are applied and only switching to edid without DV support resets those parameters. Haven’t yet found exactly what condition is needed. But even rebooting the player doesn’t help to replace the DV block data.
As an option, maybe it makes sense to specify DV block separately, and maybe through menu.
I.e. switch on the switch and there insert your own data about brightness minPQ, maxPQ and color data. and after rebooting these data are already applied, but edid is not used as a whole. I don’t know if this is possible.

Yes I have been thinking the same, choose the edid route first as easier to do and confirm all posssible.

Will work on:

  • Having a parameter in UI to store the VSVDB (as a string of hex).
  • Dynamically inject that VSVDB into the flow before it is used in the code and sent to the dovi.ko.
3 Likes

That’s great news ! Having the possibility to tune the brightness capabilities of the projector/panel is great, given that built-in EDID parameters are not dynamically adjusted per brightness change etc…
Thanks a lot guys !

Latest build:

[Quick reminder these are test builds that show-case some possibilities I like to explore, expect bugs! It would be the purview of the CE Team as to what if any features are carried forward into the mainline.]

  • Use any Dolby VSVDB - as input on the CoreELEC settings screen, should support dv version 0,1,2.

  • Sends HDR Pkt to display in Player Led by VSVDB mode.

  • The above two option combine to bring Dolby Vision to HDR able but Non-Dolby Vision capable displays, without the need for other devices.

  • Can also override your displays Dolby VSVDB provided in the HDMI EDID.

  • Dolby VSVDB is applied each time DV or VS10 content is engaged so should be insulated from Hot Plugging of the HDMI connection.

  • Be careful how you enter the Dolby VSVDB Hex String - it will do checks for validity when it is applied (can check dmesg log to see any error), but something may slip through and not sure on the effects.

  • Example format Dolby VSVDB Hex String is provided in the UI content sensitive help.

One caveat: Once you set a Dolby VSVDB Hex String and enable it with Dolby VSVDB and play some content to make it in effect, it is then there until a restart / Hot Plug Event even if you remove it from the settings or switch off the Dolby VSVDB.

Not too painful but can think of plenty of ways it could be improved, not sure on the scope of abilities/possibilities of the Kodi UI though.

@Kaan, changing the Dolby VSVDB should be able to change the HDR range and thus cap the “highlights/brightness” on VS10 content - it is a little involved to understand the VSVDB so maybe not interested but thought I would point out, and could see if improved your VS10 experience - would then need different VSVDB for different modes :rofl:

5 Likes

Something’s not working right.
The past edid connection method had normal colors.
Now I enter the same thing, the string in both EDIDs is the same, but the colors are wrong. Probably Colorimetry Data is not loaded.
Here is an example of LG C2 EDID and the same string inserted gives different colors

picture edid C2

vsvdb LG C2


LG C2 TV LLDV BT2020 896nits.bin (256 Bytes)

You need to include the header and Dolby block identifier, the length is in the header so simpler for me to just include everything, though maybe can improve later to just the payload.

Very likely 12 bytes long all together most VSVDB are.

Can check the example I put in the UI help text, header and Dolby block identifier probably same as that.

you mean this?

I just grabbed an example different to my TV iirc that is dv2 and max 1500, plus other differences.

Need to be like that with the extra info on the front of the payload.

EB contains the length B e.g. 12 bytes some are longer

01 identifies it as a VSVDB

46D000 is the Dolby block identifier

The rest should be the payload

Yeah, it’s working fine now.
So always have to copy the full DV code.
LG C2 eb 01 46 d0 00 44 0b 78 56 98 a9 53
Colors same as with edid DV output

1 Like

For now yeah may improve it later but this is probably fine anyway.

Wow, this is amazing. You really are on a mission to make CoreELEC the best DoVi device ever.

3 Likes

I hope this will be implemented in the main branch, VS10 and DV to HDR with tonemapping is very nice and useful stuff

4 Likes

Yeah could not agree more. But would be nice to see always lldv too when in mainline.
But @cpm is the GOAT for me :100::partying_face::raised_hands:

@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.