diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/VideoLayerBridgeDRMPRIME.cpp b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/VideoLayerBridgeDRMPRIME.cpp index 86b0abd71064a..c20a3d572a035 100644 --- a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/VideoLayerBridgeDRMPRIME.cpp +++ b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/VideoLayerBridgeDRMPRIME.cpp @@ -46,6 +46,13 @@ void CVideoLayerBridgeDRMPRIME::Disable() m_DRM->AddProperty(connector, "Colorspace", value); } + CLog::Log(LOGDEBUG, "CVideoLayerBridgeDRMPRIME::{} - setting max bpc to 8", __FUNCTION__); + result = m_DRM->AddProperty(connector, "max bpc", 8); + if (!result) + { + CLog::Log(LOGDEBUG, "CVideoLayerBridgeDRMPRIME::{} - failed to reset max bpc to 8", __FUNCTION__); + } + // disable HDR metadata if (connector->SupportsProperty("HDR_OUTPUT_METADATA")) { @@ -185,6 +192,11 @@ void CVideoLayerBridgeDRMPRIME::Configure(CVideoBufferDRMPRIME* buffer) auto connector = m_DRM->GetConnector(); + int bpc = 8; + + if (picture.colorBits > 8) + bpc = 12; + std::tie(result, value) = connector->GetPropertyValue("Colorspace", GetColorimetry(picture)); if (result) { @@ -194,6 +206,10 @@ void CVideoLayerBridgeDRMPRIME::Configure(CVideoBufferDRMPRIME* buffer) m_DRM->SetActive(true); } + CLog::Log(LOGDEBUG, "CVideoLayerBridgeDRMPRIME::{} - setting max bpc to {} ({})", __FUNCTION__, + bpc, result); + result = m_DRM->AddProperty(connector, "max bpc", bpc); + if (connector->SupportsProperty("HDR_OUTPUT_METADATA")) { m_hdr_metadata.metadata_type = HDMI_STATIC_METADATA_TYPE1;