Hello 
I’m debugging an issue about DV that trigger an RRC (Refresh Rate Changer) when changing to a non DV video (HDR or SDR for ex).
I’m hoping it’s the right section of the forum, it’s related to Kodi but also for development 
So :
When RRC is disabled, there is no RRC and no blank screen.
When RRC is enabled, even if the movie matches the same resolution and FPS and with DV it triggers an RRC where it should not (when going to DV to HDR or HDR to DV for ex)
I have found the part of code where changing it permit to avoid that, but it’s not a solution at 100% because, it will surely create regression.
It’s the commit (based on CE-NG) and I will test against CE-NO :
Revision: f83b4eb8e3aaa2c9868f0ba83d3adf3fd65ae554
Author: Portisch
Date: 12/03/2024 19:44:29
Message:
Rework Kodi force switch algorithms.
Forced mode switch detection by cd/cs is not 100% reliable.
Because of Dolby Vision it is possible resolution and frequency do not change.
But if colour subsampling or colour depth is changed a forced mode switch is required.
Force mode switch by set mode 'null'.
In special cases a hard mode reset is needed like 4k420 to 4kDV.
----
Modified: xbmc/cores/VideoPlayer/VideoRenderers/RenderManager.cpp
Modified: xbmc/windowing/GraphicContext.h
Modified: xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.cpp
Modified: xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.h
When I set “force_mode_switch_by_dv “ to false by changing the code, it’s ok :
C++:
StreamHdrType hdrType = CServiceBroker::GetWinSystem()->GetGfxContext().GetHDRType();
bool force_mode_switch_by_dv = false;
if ((m_hdrType == StreamHdrType::HDR_TYPE_DOLBYVISION && hdrType != StreamHdrType::HDR_TYPE_DOLBYVISION) ||
(m_hdrType != StreamHdrType::HDR_TYPE_DOLBYVISION && hdrType == StreamHdrType::HDR_TYPE_DOLBYVISION))
force_mode_switch_by_dv = true;
to
StreamHdrType hdrType = CServiceBroker::GetWinSystem()->GetGfxContext().GetHDRType();
bool force_mode_switch_by_dv = false;
if ((m_hdrType == StreamHdrType::HDR_TYPE_DOLBYVISION && hdrType != StreamHdrType::HDR_TYPE_DOLBYVISION) ||
(m_hdrType != StreamHdrType::HDR_TYPE_DOLBYVISION && hdrType == StreamHdrType::HDR_TYPE_DOLBYVISION))
force_mode_switch_by_dv = false;
It permits to not start RRC only when resolution and FPS match.
I think the root of this issue is because, when create a new DV window, somehow, the resolution and fps are lost, and the RRC is triggered.
It could be nice to polish the code to store current/previous value and restore it when the new window is created, this permit to avoid this, like this, RRC test the resolution and fps against it and don’t need to trigger the refresh.
I’m not sure if I’m clear on this 
It’s hard for me to test the code entirely, I was able to pin to that part and confirm that it’s related when testing on CE-NG, but don’t know how to debug it at 100% with some improvement.
So DV to DV movie, is OK, RRC not trigger (when same FPS), but DV to HDR/SDR or HDR/SDR to DV will trigger RRC (for same resolution and FPS).
If the FPS is different, it’s logic to do the RRC of course but not when it’s the same.
Thank you 