0
0
mirror of https://github.com/libretro/Lakka-LibreELEC.git synced 2024-12-16 13:48:56 +00:00
Lakka-LibreELEC/projects/RPi/patches/kodi/0011-DVDVideoCodecDRMPRIME-Request-v4l2-buffers-be-alloca.patch
Matthias Reichl 35f659918f RPi: update kodi patch to support bwdif deinterlace
Signed-off-by: Matthias Reichl <hias@horus.com>
2023-07-21 20:16:20 +02:00

31 lines
1.4 KiB
Diff

From c2ced5695054a42fe4ba8520669d7c69e583e2a1 Mon Sep 17 00:00:00 2001
From: Dom Cobley <popcornmix@gmail.com>
Date: Tue, 20 Jun 2023 15:14:02 +0100
Subject: [PATCH 11/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 023334f5db..0182f30a61 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.2