EDID Override - Injecting a Dolby VSVDB Block

Tested with your new build on AM6B+, the Player Led(HDR) with Dolby VSVDB Payload looks much better than LLDV or HDR10 mode. FYI, My projector could just support LLDV / HDR10, no DV-STD supported just like some old model of Sony TV.

I’m wondering if the different Dolby VSVDB Payload could make it better. will have a try with 490348A15855A2

The approach of plugging in somewhat “random” Dolby VSVDB will certainly give you different results!

Maybe better using the Dolby VSVDB Calc to create one closer to your Projectors specifications - search around if not sure what the the elements in the spreadsheet mean, really looking to change just three elements the min and max luminance nits and the colour space.

Sir, thanks again for your suggestion. Actually I’m gona to do the same thing at the beginning. I’d liek to do some more reading up first.

Believe I can extract the Dolby VSVDB successfully with this PJ which is just capable for LLDV.

Thanks again to you and CE team on this great work. :+1: :+1: :+1:

If you are just going to extract from the same projector, only to but it back in the VSVDB without changing it then - no need just use Player Led (HDR) without injecting the VSVDB it will be exactly the same.

Maybe for some reason Player Led (HDR) will be better than Player Led (DV-LL) for your projector.

It seems that Player Led (HDR) without injecting the VSVDB will just trigger HDR10 without DV FEL. Not pretty sure, will try it again later

If that is the case I think it would mean your projector is not DV capable.
So you will need to work out a Dolby VSVDB and inject, which then makes more sense.

Feature Complete - Update 1


  • Graphic luminance max set by user, then will not be auto set by code to 100.

    • For example, if set in autostart.sh then will not be overridden by code e.g.
    • Brighter: echo 150 > /sys/module/amdolby_vision/parameters/dolby_vision_graphic_max
    • Dimmer: echo 50 > /sys/module/amdolby_vision/parameters/dolby_vision_graphic_max
    • Can try on command line in DV Mode → On for immediate check of luminance change, note this is only in effect in the Kodi menu so make sure you are trying there.
  • Graphic luminance max reset to 0 (auto) when playing content.

    • OSD (Player controls/Subtitle) luminance control is now only controlled from new Kodi UI HDR control.
  • A couple of corner-case improvements to control wrong colours.

    • Only item remaining I see is booting with TV off and TV only coming on at point of showing the Kodi UI, if the TV is on before the UI i.e. see spinning splash screen then will still be ok.
  • Fix defect - with higher frequency refresh rates and DV Mode → On: screen may not show after boot.


When testing use the below tar to update a fresh install of CE-21 ng.

update tar


Dolby VSVDB Calc

3 Likes

Works fine, thanks.
Maybe just placebo, but when I set the vs10 target mode for sdr to sdr10, the sdr content better for my eyes.
Its possible? :slightly_smiling_face:

1 Like

I’m using CE at 60hz for all playback for audio sync reasons, and at 4k all the time because otherwise DV content starts in 1080p.

This is all fine and good but I can’t trigger 10bit for SDR content. They all play in 8bit 420 or 444 if DV is always on. Any ideas how I can get CE to use 10bit 420?

Edit: HDR content plays in 8bit too but I was using VS10 for those anyway.

Edit: Forcing by depth to 12 seems to work fine.

I wrote a long post yesterday on the VS10 thread, but bottom line is I like the SDR10 conversion a lot. Moreso than SDR to DV.

What settings is that, want to see the difference.

It’s just another toggle option on the SDR mode for cpm’s VS10 build. Can set to DV or SDR10.

1 Like

No difference at all with SDR10 here. Tried display and player led hdr.

1 Like

May depend on the content: SDR bit depth 8/10 and Colour BT.709 or BT.2020.

Maybe we should split out the VS10 for SDR8 content and SDR10 content - need to check if can get the source bit depth reliably - plus having more options maybe more confusing for others.

I think AMLogic probably has a few bugs in this area, I already discovered it treats SDR10 BT.2020 (signal transfer characteristics 14) as HDR HLG - tried correcting that but ran into another issue, it uses SDR as it’s fall back position so does all the other types explicitly DV, HDR, HLG etc. if not those then assumes SDR and it just fixes SDR as BT.709 and I am thinking maybe also 8 bit now.

I also saw in code comments AMLogic saying signal transfer characteristics 16 was BT.2020-10 when it is SMPTE ST 2084 - just comments but makes you think what are they getting wrong.

Should also note this is 4.9, could well be better on 5.x or 6.x

I’m wondering if min and max lum are taken into account when using DV to SDR10 conversion. I would assume that it is, given that there is a very similar funcitonnality in the oppo players where you can specify nits by per 50 or 100 nits intervals (I don’t remeber exactly) for this HDR/DV to SDR conversion but this functionnality is maybe outside of the VS10 engine… and maybe the 100 nits basis is used in VS10 in this case

The VSVDB max cd/m2 goes into the dovi.ko.
Other display HDR info is also feed in to the dovi.ko iirc but not looked into that.
On top there is a lookup table of max values which also feed into the dovi.ko based on the source format and destination format (which are themselves included in the data to dovi.ko so it knows the conversion task required).

static unsigned int dolby_vision_target_max[3][3] = {
		{ 4000, 1000, 100 }, /* DOVI => DOVI/HDR/SDR */ 
		{ 1000, 1000, 100 }, /* HDR =>  DOVI/HDR/SDR */
		{ 600, 1000, 100 },  /* SDR =>  DOVI/HDR/SDR */
};

Anything mapping to SDR looks to be set at 100.
Anything mapping to HDR looks set to 1000.

SDR to DV though would be allowed up to 600.
SDR to HDR is allowed up to 1000.

I must be combining this with the VSVDB info to work out the final max, as doing DV → DV we do not see it mapping to 4000 max.

The Use Display Luminance (FLAG_USE_SINK_MIN_MAX) used to force those max values in the lookup to the max from the VSVDB (for V1 only - most TV are now V2 anyway!)- but that was determined not to have any effect - so same must be happening inside the dovi.ko


if (dolby_vision_flags & FLAG_USE_SINK_MIN_MAX) {
	if (vinfo->vout_device->dv_info->ieeeoui == 0x00d046) {
		if (vinfo->vout_device->dv_info->ver == 0) {
			/* need lookup PQ table ... */
		} else if (vinfo->vout_device->dv_info->ver == 1) {
			if (vinfo->vout_device->dv_info->tmaxLUM) {
				/* Target max luminance = 100+50*CV */
				graphic_max =
				target_lumin_max =
					(vinfo->vout_device
					->dv_info->tmaxLUM
					* 50 + 100);
				/* Target min luminance = (CV/127)^2 */
				graphic_min =
				dolby_vision_target_min =
					(vinfo->vout_device->
					dv_info->tminLUM ^ 2)
					* 10000 / (127 * 127);
			}
		}
	} else if (sink_hdr_support(vinfo) & HDR_SUPPORT) {
		if (vinfo->hdr_info.lumi_max) {
			/* Luminance value = 50 * (2 ^ (CV/32)) */
			graphic_max =
			target_lumin_max = 50 *
				(2 ^ (vinfo->hdr_info.lumi_max >> 5));
			/* Desired Content Min Luminance =*/
			/*	Desired Content Max Luminance*/
			/*	* (CV/255) * (CV/255) / 100	*/
			graphic_min =
			dolby_vision_target_min =
				target_lumin_max * 10000
				* vinfo->hdr_info.lumi_min
				* vinfo->hdr_info.lumi_min
				/ (255 * 255 * 100);
		}
	}
	if (target_lumin_max) {
		dolby_vision_target_max[0][0] =
		dolby_vision_target_max[0][1] =
		dolby_vision_target_max[1][0] =
		dolby_vision_target_max[1][1] =
		dolby_vision_target_max[2][0] =
		dolby_vision_target_max[2][1] =
			target_lumin_max;
	} else {
		memcpy(dolby_vision_target_max,
		       dolby_vision_default_max,
		       sizeof(dolby_vision_target_max));
	}
}
1 Like

Ok, if I understood correctly, in the end it means that it seems impossible to tweak the DV->SDR maxlum to a custom value.

Probably depends on what actually happens in the dovi.ko

Mmm and testing is not straightforward. I guess that the SDR10 result with 1000nits would be looking flat / pale and the 100nits one would be looking “shiny” (both on a 100 nits screen)

Keep in mind that SDR8 and SDR10 are different modes to the DV Engine.
I did some changes to split those out on the UI side, and will add a parameter to allow change to the max SDR from the command line - will share later.

Probably though that will be the last release I post out.