0
0
mirror of https://github.com/libretro/Lakka-LibreELEC.git synced 2025-02-08 13:19:52 +00:00
Lakka-LibreELEC/projects/RPi/patches/kodi/0010-DVDVideoCodecDRMPRIME-Request-v4l2-buffers-be-alloca.patch
Matthias Reichl 6d12533fbe RPi: update kodi patches
Signed-off-by: Matthias Reichl <hias@horus.com>
2024-12-22 12:22:01 +01:00

31 lines
1.4 KiB
Diff

From 0dbcdaef75f1513de2077bbf14825486c46b1bb8 Mon Sep 17 00:00:00 2001
From: Dom Cobley <popcornmix@gmail.com>
Date: Tue, 20 Jun 2023 15:14:02 +0100
Subject: [PATCH 10/12] DVDVideoCodecDRMPRIME: Request v4l2 buffers be
allocated through cache
This is an optional request, but will improve performance of sw deinterlace
if supported.
---
.../VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
index 9439f031800a..4338324c931d 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
@@ -367,6 +367,10 @@ bool CDVDVideoCodecDRMPRIME::Open(CDVDStreamInfo& hints, CDVDCodecOptions& optio
for (auto&& option : options.m_keys)
av_opt_set(m_pCodecContext, option.m_name.c_str(), option.m_value.c_str(), 0);
+ // this requests v4l2 buffers are allocated through cache. It will work if this is not supported,
+ // but subsequent operations like deinterlace may be less efficient
+ av_opt_set(m_pCodecContext->priv_data, "dmabuf_alloc", "cma", 0);
+
if (avcodec_open2(m_pCodecContext, pCodec, nullptr) < 0)
{
CLog::Log(LOGINFO, "CDVDVideoCodecDRMPRIME::{} - unable to open codec", __FUNCTION__);
--
2.39.5