mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-25 11:46:43 +00:00
RPi: add kodi patch to set max_bpc for high bit depth videos
Signed-off-by: Matthias Reichl <hias@horus.com>
This commit is contained in:
parent
ab70b3d554
commit
08bce43b12
@ -0,0 +1,47 @@
|
||||
From a6ae5efa976dc0d2c3ca5cf431e6411baafdac29 Mon Sep 17 00:00:00 2001
|
||||
From: Dom Cobley <popcornmix@gmail.com>
|
||||
Date: Fri, 3 Dec 2021 16:00:50 +0000
|
||||
Subject: [PATCH] gbm: Set max bpc for high bit depth videos
|
||||
|
||||
---
|
||||
.../HwDecRender/VideoLayerBridgeDRMPRIME.cpp | 16 +++++++++++++++-
|
||||
1 file changed, 15 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/VideoLayerBridgeDRMPRIME.cpp b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/VideoLayerBridgeDRMPRIME.cpp
|
||||
index 4f07ffc0b8..64574b2467 100644
|
||||
--- a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/VideoLayerBridgeDRMPRIME.cpp
|
||||
+++ b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/VideoLayerBridgeDRMPRIME.cpp
|
||||
@@ -35,8 +35,15 @@ void CVideoLayerBridgeDRMPRIME::Disable()
|
||||
m_DRM->AddProperty(plane, "FB_ID", 0);
|
||||
m_DRM->AddProperty(plane, "CRTC_ID", 0);
|
||||
|
||||
- // disable HDR metadata
|
||||
auto connector = m_DRM->GetConnector();
|
||||
+
|
||||
+ // reset max bpc back to default of 8
|
||||
+ int bpc = 8;
|
||||
+ bool result = m_DRM->AddProperty(connector, "max bpc", bpc);
|
||||
+ CLog::Log(LOGDEBUG, "CVideoLayerBridgeDRMPRIME::{} - setting max bpc to {} ({})", __FUNCTION__,
|
||||
+ bpc, result);
|
||||
+
|
||||
+ // disable HDR metadata
|
||||
if (connector->SupportsProperty("HDR_OUTPUT_METADATA"))
|
||||
{
|
||||
m_DRM->AddProperty(connector, "HDR_OUTPUT_METADATA", 0);
|
||||
@@ -173,6 +180,13 @@ void CVideoLayerBridgeDRMPRIME::Configure(CVideoBufferDRMPRIME* buffer)
|
||||
m_DRM->AddProperty(plane, "COLOR_RANGE", value);
|
||||
|
||||
auto connector = m_DRM->GetConnector();
|
||||
+
|
||||
+ // set max bpc to allow the drm driver to choose a deep colour mode
|
||||
+ int bpc = picture.colorBits > 8 ? 12 : 8;
|
||||
+ result = m_DRM->AddProperty(connector, "max bpc", bpc);
|
||||
+ CLog::Log(LOGDEBUG, "CVideoLayerBridgeDRMPRIME::{} - setting max bpc to {} ({})", __FUNCTION__,
|
||||
+ bpc, result);
|
||||
+
|
||||
if (connector->SupportsProperty("HDR_OUTPUT_METADATA"))
|
||||
{
|
||||
m_hdr_metadata.metadata_type = HDMI_STATIC_METADATA_TYPE1;
|
||||
--
|
||||
2.30.2
|
||||
|
Loading…
x
Reference in New Issue
Block a user