Merge pull request #9570 from HiassofT/le13-kodi-ffmpeg7

kodi: update to current master with ffmpeg 7.1
This commit is contained in:
knaerzche 2024-12-22 22:53:25 +01:00 committed by GitHub
commit 26e43c2c4d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
20 changed files with 154 additions and 129 deletions

View File

@ -3,8 +3,8 @@
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv) # Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="kodi" PKG_NAME="kodi"
PKG_VERSION="65703fe91c077d8cc11be4ba10221b56cd38d30b" PKG_VERSION="776b0aa053516ccedb56b14b922a337c42ad065a"
PKG_SHA256="74dbd28a417509f7a7c3a60648ade60b193bc5d34d1c24afb6e3235d1443015a" PKG_SHA256="8fed4d9be3ce0dd243a7aefa8c5d22012a06392d71d13bfe0ab04901b189f985"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"
PKG_SITE="http://www.kodi.tv" PKG_SITE="http://www.kodi.tv"
PKG_URL="https://github.com/xbmc/xbmc/archive/${PKG_VERSION}.tar.gz" PKG_URL="https://github.com/xbmc/xbmc/archive/${PKG_VERSION}.tar.gz"

View File

@ -1,4 +1,4 @@
From 34badba6d106467d63ee2578662fd5f30276736c Mon Sep 17 00:00:00 2001 From d2f0e3b0b6b34d49eab56a8edc291014c142aeb3 Mon Sep 17 00:00:00 2001
From: Jonas Karlman <jonas@kwiboo.se> From: Jonas Karlman <jonas@kwiboo.se>
Date: Sun, 20 Oct 2019 17:10:07 +0000 Date: Sun, 20 Oct 2019 17:10:07 +0000
Subject: [PATCH 1/7] WIP: DVDVideoCodecDRMPRIME: add support for filters Subject: [PATCH 1/7] WIP: DVDVideoCodecDRMPRIME: add support for filters
@ -9,7 +9,7 @@ Subject: [PATCH 1/7] WIP: DVDVideoCodecDRMPRIME: add support for filters
2 files changed, 66 insertions(+), 6 deletions(-) 2 files changed, 66 insertions(+), 6 deletions(-)
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
index ab65c4ecd4..4cf36f83e6 100644 index 4da0722d5c11..8b7b6e2655ba 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp --- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp +++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
@@ -28,6 +28,8 @@ @@ -28,6 +28,8 @@
@ -21,7 +21,7 @@ index ab65c4ecd4..4cf36f83e6 100644
#include <libavutil/error.h> #include <libavutil/error.h>
#include <libavutil/imgutils.h> #include <libavutil/imgutils.h>
#include <libavutil/opt.h> #include <libavutil/opt.h>
@@ -595,12 +597,30 @@ void CDVDVideoCodecDRMPRIME::SetPictureParams(VideoPicture* pVideoPicture) @@ -599,12 +601,30 @@ void CDVDVideoCodecDRMPRIME::SetPictureParams(VideoPicture* pVideoPicture)
pVideoPicture->dts = DVD_NOPTS_VALUE; pVideoPicture->dts = DVD_NOPTS_VALUE;
} }
@ -56,7 +56,7 @@ index ab65c4ecd4..4cf36f83e6 100644
if (ret == AVERROR(EAGAIN)) if (ret == AVERROR(EAGAIN))
return VC_BUFFER; return VC_BUFFER;
else if (ret == AVERROR_EOF) else if (ret == AVERROR_EOF)
@@ -617,11 +637,41 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::GetPicture(VideoPicture* pVideo @@ -621,11 +641,41 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::GetPicture(VideoPicture* pVideo
{ {
char err[AV_ERROR_MAX_STRING_SIZE] = {}; char err[AV_ERROR_MAX_STRING_SIZE] = {};
av_strerror(ret, err, AV_ERROR_MAX_STRING_SIZE); av_strerror(ret, err, AV_ERROR_MAX_STRING_SIZE);
@ -101,7 +101,7 @@ index ab65c4ecd4..4cf36f83e6 100644
if (pVideoPicture->videoBuffer) if (pVideoPicture->videoBuffer)
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h
index db49d165e7..b5cacf1a3c 100644 index db49d165e7ba..b5cacf1a3c99 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h --- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h +++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h
@@ -14,6 +14,11 @@ @@ -14,6 +14,11 @@
@ -135,5 +135,5 @@ index db49d165e7..b5cacf1a3c 100644
std::shared_ptr<IVideoBufferPool> m_videoBufferPool; std::shared_ptr<IVideoBufferPool> m_videoBufferPool;
}; };
-- --
2.39.2 2.39.5

View File

@ -1,4 +1,4 @@
From ffdfcc832f82521c328e02912d707aa3b2b7ed20 Mon Sep 17 00:00:00 2001 From f30b085a6977bdd1e18c5e3be08d6ee94b2e6a81 Mon Sep 17 00:00:00 2001
From: Jernej Skrabec <jernej.skrabec@siol.net> From: Jernej Skrabec <jernej.skrabec@siol.net>
Date: Thu, 26 Dec 2019 11:01:51 +0100 Date: Thu, 26 Dec 2019 11:01:51 +0100
Subject: [PATCH 2/7] WIP: DRMPRIME deinterlace filter Subject: [PATCH 2/7] WIP: DRMPRIME deinterlace filter
@ -9,7 +9,7 @@ Subject: [PATCH 2/7] WIP: DRMPRIME deinterlace filter
2 files changed, 328 insertions(+), 60 deletions(-) 2 files changed, 328 insertions(+), 60 deletions(-)
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
index 4cf36f83e6..0d32d65ce4 100644 index 8b7b6e2655ba..2a7e24caf2d3 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp --- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp +++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
@@ -20,6 +20,7 @@ @@ -20,6 +20,7 @@
@ -36,7 +36,7 @@ index 4cf36f83e6..0d32d65ce4 100644
avcodec_free_context(&m_pCodecContext); avcodec_free_context(&m_pCodecContext);
} }
@@ -376,8 +380,19 @@ bool CDVDVideoCodecDRMPRIME::Open(CDVDStreamInfo& hints, CDVDCodecOptions& optio @@ -379,8 +383,19 @@ bool CDVDVideoCodecDRMPRIME::Open(CDVDStreamInfo& hints, CDVDCodecOptions& optio
} }
UpdateProcessInfo(m_pCodecContext, m_pCodecContext->pix_fmt); UpdateProcessInfo(m_pCodecContext, m_pCodecContext->pix_fmt);
@ -57,7 +57,7 @@ index 4cf36f83e6..0d32d65ce4 100644
return true; return true;
} }
@@ -453,6 +468,8 @@ void CDVDVideoCodecDRMPRIME::Reset() @@ -456,6 +471,8 @@ void CDVDVideoCodecDRMPRIME::Reset()
return; return;
Drain(); Drain();
@ -66,7 +66,7 @@ index 4cf36f83e6..0d32d65ce4 100644
do do
{ {
@@ -500,7 +517,7 @@ void CDVDVideoCodecDRMPRIME::Drain() @@ -503,7 +520,7 @@ void CDVDVideoCodecDRMPRIME::Drain()
av_packet_free(&avpkt); av_packet_free(&avpkt);
} }
@ -75,7 +75,7 @@ index 4cf36f83e6..0d32d65ce4 100644
{ {
pVideoPicture->iWidth = m_pFrame->width; pVideoPicture->iWidth = m_pFrame->width;
pVideoPicture->iHeight = m_pFrame->height; pVideoPicture->iHeight = m_pFrame->height;
@@ -595,13 +612,238 @@ void CDVDVideoCodecDRMPRIME::SetPictureParams(VideoPicture* pVideoPicture) @@ -599,13 +616,238 @@ void CDVDVideoCodecDRMPRIME::SetPictureParams(VideoPicture* pVideoPicture)
? DVD_NOPTS_VALUE ? DVD_NOPTS_VALUE
: static_cast<double>(pts) * DVD_TIME_BASE / AV_TIME_BASE; : static_cast<double>(pts) * DVD_TIME_BASE / AV_TIME_BASE;
pVideoPicture->dts = DVD_NOPTS_VALUE; pVideoPicture->dts = DVD_NOPTS_VALUE;
@ -317,7 +317,7 @@ index 4cf36f83e6..0d32d65ce4 100644
int ret = av_buffersrc_add_frame(m_pFilterIn, m_pFrame); int ret = av_buffersrc_add_frame(m_pFilterIn, m_pFrame);
if (ret < 0) if (ret < 0)
{ {
@@ -617,21 +859,14 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterIn() @@ -621,21 +863,14 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterIn()
CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterOut() CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterOut()
{ {
@ -343,7 +343,7 @@ index 4cf36f83e6..0d32d65ce4 100644
} }
else if (ret) else if (ret)
{ {
@@ -642,71 +877,97 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterOut() @@ -646,71 +881,97 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterOut()
return VC_ERROR; return VC_ERROR;
} }
@ -425,10 +425,10 @@ index 4cf36f83e6..0d32d65ce4 100644
} }
- if (IsSupportedHwFormat(static_cast<AVPixelFormat>(m_pFrame->format))) - if (IsSupportedHwFormat(static_cast<AVPixelFormat>(m_pFrame->format)))
+ if (!m_processInfo.GetVideoInterlaced() && m_pFrame->interlaced_frame) + if (!m_processInfo.GetVideoInterlaced() && !!(m_pFrame->flags & AV_FRAME_FLAG_INTERLACED))
+ m_processInfo.SetVideoInterlaced(true); + m_processInfo.SetVideoInterlaced(true);
+ +
+ std::string filterChain = GetFilterChain(m_pFrame->interlaced_frame); + std::string filterChain = GetFilterChain(!!(m_pFrame->flags & AV_FRAME_FLAG_INTERLACED));
+ if (!filterChain.empty()) + if (!filterChain.empty())
{ {
- CVideoBufferDRMPRIMEFFmpeg* buffer = - CVideoBufferDRMPRIMEFFmpeg* buffer =
@ -485,7 +485,7 @@ index 4cf36f83e6..0d32d65ce4 100644
return VC_PICTURE; return VC_PICTURE;
} }
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h
index b5cacf1a3c..fab3431d40 100644 index b5cacf1a3c99..fab3431d40d9 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h --- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h +++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h
@@ -38,19 +38,26 @@ public: @@ -38,19 +38,26 @@ public:
@ -517,5 +517,5 @@ index b5cacf1a3c..fab3431d40 100644
AVFilterContext* m_pFilterIn = nullptr; AVFilterContext* m_pFilterIn = nullptr;
AVFilterContext* m_pFilterOut = nullptr; AVFilterContext* m_pFilterOut = nullptr;
-- --
2.39.2 2.39.5

View File

@ -1,4 +1,4 @@
From 0960356b0af5c9e9e528b43e4e0134bf4c593564 Mon Sep 17 00:00:00 2001 From 748a4cd71a4131ec23fb32c5ca973073f69bddf7 Mon Sep 17 00:00:00 2001
From: popcornmix <popcornmix@gmail.com> From: popcornmix <popcornmix@gmail.com>
Date: Fri, 27 Aug 2021 20:29:50 +0100 Date: Fri, 27 Aug 2021 20:29:50 +0100
Subject: [PATCH 3/7] DVDVideoCodecDRMPRIME: Avoid exception with Subject: [PATCH 3/7] DVDVideoCodecDRMPRIME: Avoid exception with
@ -9,10 +9,10 @@ Subject: [PATCH 3/7] DVDVideoCodecDRMPRIME: Avoid exception with
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
index 0d32d65ce4..3b0341a240 100644 index 2a7e24caf2d3..606e8902668f 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp --- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp +++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
@@ -642,7 +642,7 @@ bool CDVDVideoCodecDRMPRIME::SetPictureParams(VideoPicture* pVideoPicture) @@ -646,7 +646,7 @@ bool CDVDVideoCodecDRMPRIME::SetPictureParams(VideoPicture* pVideoPicture)
if (!pVideoPicture->videoBuffer) if (!pVideoPicture->videoBuffer)
{ {
CLog::Log(LOGERROR, "CDVDVideoCodecDRMPRIME::{} - videoBuffer:nullptr format:{}", __FUNCTION__, CLog::Log(LOGERROR, "CDVDVideoCodecDRMPRIME::{} - videoBuffer:nullptr format:{}", __FUNCTION__,
@ -22,5 +22,5 @@ index 0d32d65ce4..3b0341a240 100644
return false; return false;
} }
-- --
2.39.2 2.39.5

View File

@ -1,4 +1,4 @@
From 8c70d13055955f129371fe99da9e0a0364e27854 Mon Sep 17 00:00:00 2001 From cbe5fe53328156e510804a59e3c45fae1b80cefe Mon Sep 17 00:00:00 2001
From: popcornmix <popcornmix@gmail.com> From: popcornmix <popcornmix@gmail.com>
Date: Fri, 17 Sep 2021 15:23:16 +0100 Date: Fri, 17 Sep 2021 15:23:16 +0100
Subject: [PATCH 4/7] DVDVideoCodecDRMPRIME: Leave deinterlace filter active on Subject: [PATCH 4/7] DVDVideoCodecDRMPRIME: Leave deinterlace filter active on
@ -14,10 +14,10 @@ be just copied by deinterlace filter
1 file changed, 4 insertions(+) 1 file changed, 4 insertions(+)
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
index 3b0341a240..c214424ad1 100644 index 606e8902668f..0210b72d037c 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp --- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp +++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
@@ -892,6 +892,10 @@ std::string CDVDVideoCodecDRMPRIME::GetFilterChain(bool interlaced) @@ -896,6 +896,10 @@ std::string CDVDVideoCodecDRMPRIME::GetFilterChain(bool interlaced)
if (!m_processInfo.Supports(mInt)) if (!m_processInfo.Supports(mInt))
mInt = m_processInfo.GetFallbackDeintMethod(); mInt = m_processInfo.GetFallbackDeintMethod();
@ -29,5 +29,5 @@ index 3b0341a240..c214424ad1 100644
filterChain += m_deintFilterName; filterChain += m_deintFilterName;
-- --
2.39.2 2.39.5

View File

@ -1,4 +1,4 @@
From 540db79c945d141c64fae6b143374b08881181f5 Mon Sep 17 00:00:00 2001 From 7102ce0a2a07e9f63903450f9070d686f8e4804c Mon Sep 17 00:00:00 2001
From: Dom Cobley <popcornmix@gmail.com> From: Dom Cobley <popcornmix@gmail.com>
Date: Tue, 30 Nov 2021 16:05:06 +0000 Date: Tue, 30 Nov 2021 16:05:06 +0000
Subject: [PATCH 5/7] SetVideoInterlaced: Set and unset deinterlace method name Subject: [PATCH 5/7] SetVideoInterlaced: Set and unset deinterlace method name
@ -9,10 +9,10 @@ Subject: [PATCH 5/7] SetVideoInterlaced: Set and unset deinterlace method name
1 file changed, 2 insertions(+), 8 deletions(-) 1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
index c214424ad1..1be249cc89 100644 index 0210b72d037c..5cadc4ca00ea 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp --- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp +++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
@@ -806,14 +806,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test) @@ -810,14 +810,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
return true; return true;
} }
@ -28,7 +28,7 @@ index c214424ad1..1be249cc89 100644
if (CServiceBroker::GetLogging().CanLogComponent(LOGVIDEO)) if (CServiceBroker::GetLogging().CanLogComponent(LOGVIDEO))
{ {
@@ -831,6 +824,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test) @@ -835,6 +828,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
void CDVDVideoCodecDRMPRIME::FilterClose() void CDVDVideoCodecDRMPRIME::FilterClose()
{ {
@ -37,5 +37,5 @@ index c214424ad1..1be249cc89 100644
{ {
CLog::Log(LOGDEBUG, LOGVIDEO, "CDVDVideoCodecDRMPRIME::FilterClose - Freeing filter graph"); CLog::Log(LOGDEBUG, LOGVIDEO, "CDVDVideoCodecDRMPRIME::FilterClose - Freeing filter graph");
-- --
2.39.2 2.39.5

View File

@ -1,4 +1,4 @@
From 695e383329041054ea1a01731e691fb254cd2469 Mon Sep 17 00:00:00 2001 From c45c02d5e3cbda22e43f2e706661bdae9831f8cb Mon Sep 17 00:00:00 2001
From: Dom Cobley <popcornmix@gmail.com> From: Dom Cobley <popcornmix@gmail.com>
Date: Wed, 24 Nov 2021 20:21:28 +0000 Date: Wed, 24 Nov 2021 20:21:28 +0000
Subject: [PATCH 6/7] DVDVideoCodecDRMPRIME: Close deinterlace filter on error Subject: [PATCH 6/7] DVDVideoCodecDRMPRIME: Close deinterlace filter on error
@ -9,10 +9,10 @@ Otherwise we crash later with an invalid m_pFilterGraph pointer
1 file changed, 7 insertions(+) 1 file changed, 7 insertions(+)
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
index 1be249cc89..b221cdaf75 100644 index 5cadc4ca00ea..633df0740466 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp --- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp +++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
@@ -722,6 +722,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test) @@ -726,6 +726,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
CLog::Log(LOGERROR, CLog::Log(LOGERROR,
"CDVDVideoCodecDRMPRIME::FilterOpen - avfilter_graph_create_filter: src: {} ({})", "CDVDVideoCodecDRMPRIME::FilterOpen - avfilter_graph_create_filter: src: {} ({})",
err, result); err, result);
@ -20,7 +20,7 @@ index 1be249cc89..b221cdaf75 100644
return false; return false;
} }
@@ -729,6 +730,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test) @@ -733,6 +734,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
if (!par) if (!par)
{ {
CLog::Log(LOGERROR, "CDVDVideoCodecDRMPRIME::FilterOpen - unable to alloc buffersrc"); CLog::Log(LOGERROR, "CDVDVideoCodecDRMPRIME::FilterOpen - unable to alloc buffersrc");
@ -28,7 +28,7 @@ index 1be249cc89..b221cdaf75 100644
return false; return false;
} }
@@ -744,6 +746,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test) @@ -748,6 +750,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
CLog::Log(LOGERROR, CLog::Log(LOGERROR,
"CDVDVideoCodecDRMPRIME::FilterOpen - av_buffersrc_parameters_set: {} ({})", "CDVDVideoCodecDRMPRIME::FilterOpen - av_buffersrc_parameters_set: {} ({})",
err, result); err, result);
@ -36,7 +36,7 @@ index 1be249cc89..b221cdaf75 100644
return false; return false;
} }
av_freep(&par); av_freep(&par);
@@ -757,6 +760,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test) @@ -761,6 +764,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
CLog::Log(LOGERROR, CLog::Log(LOGERROR,
"CDVDVideoCodecDRMPRIME::FilterOpen - avfilter_graph_create_filter: out: {} ({})", "CDVDVideoCodecDRMPRIME::FilterOpen - avfilter_graph_create_filter: out: {} ({})",
err, result); err, result);
@ -44,7 +44,7 @@ index 1be249cc89..b221cdaf75 100644
return false; return false;
} }
@@ -765,6 +769,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test) @@ -769,6 +773,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
if (result < 0) if (result < 0)
{ {
CLog::Log(LOGERROR, "CDVDVideoCodecDRMPRIME::FilterOpen - failed settings pix formats"); CLog::Log(LOGERROR, "CDVDVideoCodecDRMPRIME::FilterOpen - failed settings pix formats");
@ -52,7 +52,7 @@ index 1be249cc89..b221cdaf75 100644
return false; return false;
} }
@@ -788,6 +793,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test) @@ -792,6 +797,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
if (result < 0) if (result < 0)
{ {
CLog::Log(LOGERROR, "CDVDVideoCodecDRMPRIME::FilterOpen - avfilter_graph_parse"); CLog::Log(LOGERROR, "CDVDVideoCodecDRMPRIME::FilterOpen - avfilter_graph_parse");
@ -60,7 +60,7 @@ index 1be249cc89..b221cdaf75 100644
return false; return false;
} }
@@ -797,6 +803,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test) @@ -801,6 +807,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
av_strerror(result, err, AV_ERROR_MAX_STRING_SIZE); av_strerror(result, err, AV_ERROR_MAX_STRING_SIZE);
CLog::Log(LOGERROR, "CDVDVideoCodecDRMPRIME::FilterOpen - avfilter_graph_config: {} ({})", CLog::Log(LOGERROR, "CDVDVideoCodecDRMPRIME::FilterOpen - avfilter_graph_config: {} ({})",
err, result); err, result);
@ -69,5 +69,5 @@ index 1be249cc89..b221cdaf75 100644
} }
-- --
2.39.2 2.39.5

View File

@ -1,4 +1,4 @@
From dab227de4e1fbd6d1197b7c6532ae4d3e3ff9e81 Mon Sep 17 00:00:00 2001 From bc08f759972d779d685790f7cd57c6753a85ef4e Mon Sep 17 00:00:00 2001
From: Dom Cobley <popcornmix@gmail.com> From: Dom Cobley <popcornmix@gmail.com>
Date: Mon, 15 May 2023 12:50:16 +0100 Date: Mon, 15 May 2023 12:50:16 +0100
Subject: [PATCH 7/7] DVDVideoCodecDRMPRIME: Fix missing flush after eof Subject: [PATCH 7/7] DVDVideoCodecDRMPRIME: Fix missing flush after eof
@ -8,10 +8,10 @@ Subject: [PATCH 7/7] DVDVideoCodecDRMPRIME: Fix missing flush after eof
1 file changed, 8 insertions(+) 1 file changed, 8 insertions(+)
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
index b221cdaf75..a591a90885 100644 index 633df0740466..3a5154dca4b4 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp --- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp +++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
@@ -927,7 +927,15 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::GetPicture(VideoPicture* pVideo @@ -931,7 +931,15 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::GetPicture(VideoPicture* pVideo
if (ret == AVERROR(EAGAIN)) if (ret == AVERROR(EAGAIN))
return VC_BUFFER; return VC_BUFFER;
else if (ret == AVERROR_EOF) else if (ret == AVERROR_EOF)
@ -28,5 +28,5 @@ index b221cdaf75..a591a90885 100644
{ {
char err[AV_ERROR_MAX_STRING_SIZE] = {}; char err[AV_ERROR_MAX_STRING_SIZE] = {};
-- --
2.39.2 2.39.5

View File

@ -1,4 +1,4 @@
From 89a7f05ee85fca27f1140a035fec804d84959dbe Mon Sep 17 00:00:00 2001 From 2875c98a194df2251715a6b48118cc1734b8d663 Mon Sep 17 00:00:00 2001
From: Dom Cobley <popcornmix@gmail.com> From: Dom Cobley <popcornmix@gmail.com>
Date: Fri, 3 Dec 2021 16:00:50 +0000 Date: Fri, 3 Dec 2021 16:00:50 +0000
Subject: [PATCH 01/12] gbm: Set max bpc for high bit depth videos Subject: [PATCH 01/12] gbm: Set max bpc for high bit depth videos
@ -8,7 +8,7 @@ Subject: [PATCH 01/12] gbm: Set max bpc for high bit depth videos
1 file changed, 15 insertions(+) 1 file changed, 15 insertions(+)
diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/VideoLayerBridgeDRMPRIME.cpp b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/VideoLayerBridgeDRMPRIME.cpp diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/VideoLayerBridgeDRMPRIME.cpp b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/VideoLayerBridgeDRMPRIME.cpp
index 233e6310bb..9b36758c00 100644 index 34d1ab623559..f1e73ee36474 100644
--- a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/VideoLayerBridgeDRMPRIME.cpp --- a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/VideoLayerBridgeDRMPRIME.cpp
+++ b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/VideoLayerBridgeDRMPRIME.cpp +++ b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/VideoLayerBridgeDRMPRIME.cpp
@@ -34,6 +34,14 @@ void CVideoLayerBridgeDRMPRIME::Disable() @@ -34,6 +34,14 @@ void CVideoLayerBridgeDRMPRIME::Disable()
@ -41,5 +41,5 @@ index 233e6310bb..9b36758c00 100644
void CVideoLayerBridgeDRMPRIME::SetVideoPlane(CVideoBufferDRMPRIME* buffer, const CRect& destRect) void CVideoLayerBridgeDRMPRIME::SetVideoPlane(CVideoBufferDRMPRIME* buffer, const CRect& destRect)
-- --
2.39.2 2.39.5

View File

@ -1,4 +1,4 @@
From 7d18280622c8ac12dbf1f6d4d5ca9589e1a61b02 Mon Sep 17 00:00:00 2001 From b7c319601e58efaf840360dfa2452d7621748528 Mon Sep 17 00:00:00 2001
From: popcornmix <popcornmix@gmail.com> From: popcornmix <popcornmix@gmail.com>
Date: Sat, 11 Sep 2021 14:03:05 +0100 Date: Sat, 11 Sep 2021 14:03:05 +0100
Subject: [PATCH 02/12] CDVDVideoCodecDRMPRIME: Also support YUV420 buffers Subject: [PATCH 02/12] CDVDVideoCodecDRMPRIME: Also support YUV420 buffers
@ -11,10 +11,10 @@ Need to call SetDimensions earlier and store the drm descriptor in expected plac
1 file changed, 12 insertions(+), 2 deletions(-) 1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
index f5e26b203c..90f1fb07a9 100644 index 3a5154dca4b4..2fc8232e8672 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp --- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp +++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
@@ -622,7 +622,7 @@ bool CDVDVideoCodecDRMPRIME::SetPictureParams(VideoPicture* pVideoPicture) @@ -623,7 +623,7 @@ bool CDVDVideoCodecDRMPRIME::SetPictureParams(VideoPicture* pVideoPicture)
pVideoPicture->videoBuffer = nullptr; pVideoPicture->videoBuffer = nullptr;
} }
@ -23,7 +23,7 @@ index f5e26b203c..90f1fb07a9 100644
{ {
CVideoBufferDRMPRIMEFFmpeg* buffer = CVideoBufferDRMPRIMEFFmpeg* buffer =
dynamic_cast<CVideoBufferDRMPRIMEFFmpeg*>(m_videoBufferPool->Get()); dynamic_cast<CVideoBufferDRMPRIMEFFmpeg*>(m_videoBufferPool->Get());
@@ -700,7 +700,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test) @@ -701,7 +701,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
const AVFilter* srcFilter = avfilter_get_by_name("buffer"); const AVFilter* srcFilter = avfilter_get_by_name("buffer");
const AVFilter* outFilter = avfilter_get_by_name("buffersink"); const AVFilter* outFilter = avfilter_get_by_name("buffersink");
@ -32,7 +32,7 @@ index f5e26b203c..90f1fb07a9 100644
std::string args = StringUtils::Format("video_size={}x{}:pix_fmt={}:time_base={}/{}:" std::string args = StringUtils::Format("video_size={}x{}:pix_fmt={}:time_base={}/{}:"
"pixel_aspect={}/{}", "pixel_aspect={}/{}",
@@ -848,6 +848,16 @@ void CDVDVideoCodecDRMPRIME::FilterClose() @@ -849,6 +849,16 @@ void CDVDVideoCodecDRMPRIME::FilterClose()
CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterIn() CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterIn()
{ {
@ -50,5 +50,5 @@ index f5e26b203c..90f1fb07a9 100644
if (ret < 0) if (ret < 0)
{ {
-- --
2.39.2 2.39.5

View File

@ -1,4 +1,4 @@
From e36845fd7e48b364f68a43bd8c66e06a570a6f4c Mon Sep 17 00:00:00 2001 From 158bd0c5d0feafd6ea38f618075de1be74dfe52c Mon Sep 17 00:00:00 2001
From: Dom Cobley <popcornmix@gmail.com> From: Dom Cobley <popcornmix@gmail.com>
Date: Wed, 18 Jan 2023 16:41:00 +0000 Date: Wed, 18 Jan 2023 16:41:00 +0000
Subject: [PATCH 03/12] CDVDVideoCodecDRMPRIME: Adjust av formats to match Subject: [PATCH 03/12] CDVDVideoCodecDRMPRIME: Adjust av formats to match
@ -9,7 +9,7 @@ Subject: [PATCH 03/12] CDVDVideoCodecDRMPRIME: Adjust av formats to match
1 file changed, 4 insertions(+), 2 deletions(-) 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
index 90f1fb07a9..169e8544de 100644 index 2fc8232e8672..088f43834731 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp --- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp +++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
@@ -355,6 +355,7 @@ bool CDVDVideoCodecDRMPRIME::Open(CDVDStreamInfo& hints, CDVDCodecOptions& optio @@ -355,6 +355,7 @@ bool CDVDVideoCodecDRMPRIME::Open(CDVDStreamInfo& hints, CDVDCodecOptions& optio
@ -20,7 +20,7 @@ index 90f1fb07a9..169e8544de 100644
m_pCodecContext->thread_count = CServiceBroker::GetCPUInfo()->GetCPUCount(); m_pCodecContext->thread_count = CServiceBroker::GetCPUInfo()->GetCPUCount();
if (hints.extradata) if (hints.extradata)
@@ -700,13 +701,13 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test) @@ -701,13 +702,13 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
const AVFilter* srcFilter = avfilter_get_by_name("buffer"); const AVFilter* srcFilter = avfilter_get_by_name("buffer");
const AVFilter* outFilter = avfilter_get_by_name("buffersink"); const AVFilter* outFilter = avfilter_get_by_name("buffersink");
@ -36,7 +36,7 @@ index 90f1fb07a9..169e8544de 100644
m_pCodecContext->time_base.num ? m_pCodecContext->time_base.num ?
m_pCodecContext->time_base.num : 1, m_pCodecContext->time_base.num : 1,
m_pCodecContext->time_base.num ? m_pCodecContext->time_base.num ?
@@ -858,6 +859,7 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterIn() @@ -859,6 +860,7 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterIn()
m_pFrame->data[0] = reinterpret_cast<uint8_t*>(descriptor); m_pFrame->data[0] = reinterpret_cast<uint8_t*>(descriptor);
} }
@ -45,5 +45,5 @@ index 90f1fb07a9..169e8544de 100644
if (ret < 0) if (ret < 0)
{ {
-- --
2.39.2 2.39.5

View File

@ -1,4 +1,4 @@
From 092ae2d56a5b8ed1558e82c2beae6e4223df57ff Mon Sep 17 00:00:00 2001 From 2af0398b5aec2318c6b2c1418fc0f303047863d8 Mon Sep 17 00:00:00 2001
From: Dom Cobley <popcornmix@gmail.com> From: Dom Cobley <popcornmix@gmail.com>
Date: Mon, 6 Feb 2023 15:19:51 +0000 Date: Mon, 6 Feb 2023 15:19:51 +0000
Subject: [PATCH 04/12] DVDVideoCodecDRMPRIME: Add support for arbitrary output Subject: [PATCH 04/12] DVDVideoCodecDRMPRIME: Add support for arbitrary output
@ -20,7 +20,7 @@ And it happens automatically without requiring user video settings
2 files changed, 77 insertions(+), 50 deletions(-) 2 files changed, 77 insertions(+), 50 deletions(-)
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
index 169e8544de..28bd0a9bc7 100644 index 088f43834731..a8edd55c92c5 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp --- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp +++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
@@ -219,7 +219,7 @@ enum AVPixelFormat CDVDVideoCodecDRMPRIME::GetFormat(struct AVCodecContext* avct @@ -219,7 +219,7 @@ enum AVPixelFormat CDVDVideoCodecDRMPRIME::GetFormat(struct AVCodecContext* avct
@ -67,7 +67,7 @@ index 169e8544de..28bd0a9bc7 100644
buffer->Export(frame, width, height); buffer->Export(frame, width, height);
buffer->SyncStart(); buffer->SyncStart();
@@ -631,9 +631,9 @@ bool CDVDVideoCodecDRMPRIME::SetPictureParams(VideoPicture* pVideoPicture) @@ -632,9 +632,9 @@ bool CDVDVideoCodecDRMPRIME::SetPictureParams(VideoPicture* pVideoPicture)
buffer->SetRef(m_pFrame); buffer->SetRef(m_pFrame);
pVideoPicture->videoBuffer = buffer; pVideoPicture->videoBuffer = buffer;
} }
@ -79,7 +79,7 @@ index 169e8544de..28bd0a9bc7 100644
buffer->SetPictureParams(*pVideoPicture); buffer->SetPictureParams(*pVideoPicture);
buffer->Acquire(); buffer->Acquire();
buffer->SyncEnd(); buffer->SyncEnd();
@@ -667,13 +667,13 @@ void CDVDVideoCodecDRMPRIME::FilterTest() @@ -668,13 +668,13 @@ void CDVDVideoCodecDRMPRIME::FilterTest()
if (name.find("deinterlace") != std::string::npos) if (name.find("deinterlace") != std::string::npos)
{ {
@ -96,7 +96,7 @@ index 169e8544de..28bd0a9bc7 100644
return; return;
} }
} }
@@ -683,14 +683,31 @@ void CDVDVideoCodecDRMPRIME::FilterTest() @@ -684,14 +684,31 @@ void CDVDVideoCodecDRMPRIME::FilterTest()
__FUNCTION__); __FUNCTION__);
} }
@ -130,7 +130,7 @@ index 169e8544de..28bd0a9bc7 100644
return true; return true;
if (!(m_pFilterGraph = avfilter_graph_alloc())) if (!(m_pFilterGraph = avfilter_graph_alloc()))
@@ -701,13 +718,13 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test) @@ -702,13 +719,13 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
const AVFilter* srcFilter = avfilter_get_by_name("buffer"); const AVFilter* srcFilter = avfilter_get_by_name("buffer");
const AVFilter* outFilter = avfilter_get_by_name("buffersink"); const AVFilter* outFilter = avfilter_get_by_name("buffersink");
@ -146,7 +146,7 @@ index 169e8544de..28bd0a9bc7 100644
m_pCodecContext->time_base.num ? m_pCodecContext->time_base.num ?
m_pCodecContext->time_base.num : 1, m_pCodecContext->time_base.num : 1,
m_pCodecContext->time_base.num ? m_pCodecContext->time_base.num ?
@@ -726,7 +743,6 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test) @@ -727,7 +744,6 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
CLog::Log(LOGERROR, CLog::Log(LOGERROR,
"CDVDVideoCodecDRMPRIME::FilterOpen - avfilter_graph_create_filter: src: {} ({})", "CDVDVideoCodecDRMPRIME::FilterOpen - avfilter_graph_create_filter: src: {} ({})",
err, result); err, result);
@ -154,7 +154,7 @@ index 169e8544de..28bd0a9bc7 100644
return false; return false;
} }
@@ -734,7 +750,6 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test) @@ -735,7 +751,6 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
if (!par) if (!par)
{ {
CLog::Log(LOGERROR, "CDVDVideoCodecDRMPRIME::FilterOpen - unable to alloc buffersrc"); CLog::Log(LOGERROR, "CDVDVideoCodecDRMPRIME::FilterOpen - unable to alloc buffersrc");
@ -162,7 +162,7 @@ index 169e8544de..28bd0a9bc7 100644
return false; return false;
} }
@@ -750,7 +765,6 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test) @@ -751,7 +766,6 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
CLog::Log(LOGERROR, CLog::Log(LOGERROR,
"CDVDVideoCodecDRMPRIME::FilterOpen - av_buffersrc_parameters_set: {} ({})", "CDVDVideoCodecDRMPRIME::FilterOpen - av_buffersrc_parameters_set: {} ({})",
err, result); err, result);
@ -170,7 +170,7 @@ index 169e8544de..28bd0a9bc7 100644
return false; return false;
} }
av_freep(&par); av_freep(&par);
@@ -764,7 +778,6 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test) @@ -765,7 +779,6 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
CLog::Log(LOGERROR, CLog::Log(LOGERROR,
"CDVDVideoCodecDRMPRIME::FilterOpen - avfilter_graph_create_filter: out: {} ({})", "CDVDVideoCodecDRMPRIME::FilterOpen - avfilter_graph_create_filter: out: {} ({})",
err, result); err, result);
@ -178,7 +178,7 @@ index 169e8544de..28bd0a9bc7 100644
return false; return false;
} }
@@ -773,32 +786,46 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test) @@ -774,32 +787,46 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
if (result < 0) if (result < 0)
{ {
CLog::Log(LOGERROR, "CDVDVideoCodecDRMPRIME::FilterOpen - failed settings pix formats"); CLog::Log(LOGERROR, "CDVDVideoCodecDRMPRIME::FilterOpen - failed settings pix formats");
@ -243,7 +243,7 @@ index 169e8544de..28bd0a9bc7 100644
} }
if ((result = avfilter_graph_config(m_pFilterGraph, nullptr)) < 0) if ((result = avfilter_graph_config(m_pFilterGraph, nullptr)) < 0)
@@ -807,15 +834,11 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test) @@ -808,15 +835,11 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
av_strerror(result, err, AV_ERROR_MAX_STRING_SIZE); av_strerror(result, err, AV_ERROR_MAX_STRING_SIZE);
CLog::Log(LOGERROR, "CDVDVideoCodecDRMPRIME::FilterOpen - avfilter_graph_config: {} ({})", CLog::Log(LOGERROR, "CDVDVideoCodecDRMPRIME::FilterOpen - avfilter_graph_config: {} ({})",
err, result); err, result);
@ -259,7 +259,7 @@ index 169e8544de..28bd0a9bc7 100644
m_processInfo.SetVideoDeintMethod(filters); m_processInfo.SetVideoDeintMethod(filters);
@@ -850,16 +873,16 @@ void CDVDVideoCodecDRMPRIME::FilterClose() @@ -851,16 +874,16 @@ void CDVDVideoCodecDRMPRIME::FilterClose()
CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterIn() CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterIn()
{ {
// sw decoded buffers need cache flush and for descripter to be set // sw decoded buffers need cache flush and for descripter to be set
@ -279,17 +279,17 @@ index 169e8544de..28bd0a9bc7 100644
int ret = av_buffersrc_add_frame(m_pFilterIn, m_pFrame); int ret = av_buffersrc_add_frame(m_pFilterIn, m_pFrame);
if (ret < 0) if (ret < 0)
{ {
@@ -960,25 +983,28 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::GetPicture(VideoPicture* pVideo @@ -961,25 +984,28 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::GetPicture(VideoPicture* pVideo
return VC_ERROR; return VC_ERROR;
} }
+ // we need to scale if the buffer isn't in DRM_PRIME format + // we need to scale if the buffer isn't in DRM_PRIME format
+ bool need_scale = !IsSupportedSwFormat(static_cast<AVPixelFormat>(m_pFrame->format)) && !IsSupportedHwFormat(static_cast<AVPixelFormat>(m_pFrame->format)); + bool need_scale = !IsSupportedSwFormat(static_cast<AVPixelFormat>(m_pFrame->format)) && !IsSupportedHwFormat(static_cast<AVPixelFormat>(m_pFrame->format));
+ +
if (!m_processInfo.GetVideoInterlaced() && m_pFrame->interlaced_frame) if (!m_processInfo.GetVideoInterlaced() && !!(m_pFrame->flags & AV_FRAME_FLAG_INTERLACED))
m_processInfo.SetVideoInterlaced(true); m_processInfo.SetVideoInterlaced(true);
std::string filterChain = GetFilterChain(m_pFrame->interlaced_frame); std::string filterChain = GetFilterChain(!!(m_pFrame->flags & AV_FRAME_FLAG_INTERLACED));
- if (!filterChain.empty()) - if (!filterChain.empty())
+ if (!filterChain.empty() || need_scale) + if (!filterChain.empty() || need_scale)
{ {
@ -314,7 +314,7 @@ index 169e8544de..28bd0a9bc7 100644
} }
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h
index fab3431d40..bb88fde1f9 100644 index fab3431d40d9..bb88fde1f924 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h --- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h +++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h
@@ -44,7 +44,8 @@ protected: @@ -44,7 +44,8 @@ protected:
@ -328,5 +328,5 @@ index fab3431d40..bb88fde1f9 100644
void FilterTest(); void FilterTest();
std::string GetFilterChain(bool interlaced); std::string GetFilterChain(bool interlaced);
-- --
2.39.2 2.39.5

View File

@ -1,4 +1,4 @@
From 4a3cb2af8b0751807d212044ba424d07f2a7ba55 Mon Sep 17 00:00:00 2001 From 360f3a694cfeac822b5263f2d006e47d68801148 Mon Sep 17 00:00:00 2001
From: Dom Cobley <popcornmix@gmail.com> From: Dom Cobley <popcornmix@gmail.com>
Date: Fri, 14 Apr 2023 19:59:42 +0100 Date: Fri, 14 Apr 2023 19:59:42 +0100
Subject: [PATCH 05/12] DVDVideoCodecDRMPRIME: Remove obsolete Subject: [PATCH 05/12] DVDVideoCodecDRMPRIME: Remove obsolete
@ -9,7 +9,7 @@ Subject: [PATCH 05/12] DVDVideoCodecDRMPRIME: Remove obsolete
1 file changed, 1 deletion(-) 1 file changed, 1 deletion(-)
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
index 28bd0a9bc7..670b5f22ce 100644 index a8edd55c92c5..f64e2ff8dfb2 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp --- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp +++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
@@ -355,7 +355,6 @@ bool CDVDVideoCodecDRMPRIME::Open(CDVDStreamInfo& hints, CDVDCodecOptions& optio @@ -355,7 +355,6 @@ bool CDVDVideoCodecDRMPRIME::Open(CDVDStreamInfo& hints, CDVDCodecOptions& optio
@ -21,5 +21,5 @@ index 28bd0a9bc7..670b5f22ce 100644
if (hints.extradata) if (hints.extradata)
-- --
2.39.2 2.39.5

View File

@ -1,4 +1,4 @@
From 018e080fb3fea185df01d2659d59231aef787759 Mon Sep 17 00:00:00 2001 From b551c28a08d24450c6b8afa4e29f61323f9ba934 Mon Sep 17 00:00:00 2001
From: Dom Cobley <popcornmix@gmail.com> From: Dom Cobley <popcornmix@gmail.com>
Date: Wed, 31 May 2023 19:40:37 +0100 Date: Wed, 31 May 2023 19:40:37 +0100
Subject: [PATCH 06/12] DVDVideoCodecDRMPRIME: Clear m_pFilterGraph Subject: [PATCH 06/12] DVDVideoCodecDRMPRIME: Clear m_pFilterGraph
@ -8,10 +8,10 @@ Subject: [PATCH 06/12] DVDVideoCodecDRMPRIME: Clear m_pFilterGraph
1 file changed, 1 insertion(+) 1 file changed, 1 insertion(+)
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
index 670b5f22ce..8568f162ae 100644 index f64e2ff8dfb2..31c28477cb58 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp --- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp +++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
@@ -866,6 +866,7 @@ void CDVDVideoCodecDRMPRIME::FilterClose() @@ -867,6 +867,7 @@ void CDVDVideoCodecDRMPRIME::FilterClose()
// Disposed by above code // Disposed by above code
m_pFilterIn = nullptr; m_pFilterIn = nullptr;
m_pFilterOut = nullptr; m_pFilterOut = nullptr;
@ -20,5 +20,5 @@ index 670b5f22ce..8568f162ae 100644
} }
-- --
2.39.2 2.39.5

View File

@ -1,4 +1,4 @@
From b62d5e56d76ce179e3a1169566aa2146da48b147 Mon Sep 17 00:00:00 2001 From 9bad0c6121a228501c3cef5dd753a43d4ccb9994 Mon Sep 17 00:00:00 2001
From: Dom Cobley <popcornmix@gmail.com> From: Dom Cobley <popcornmix@gmail.com>
Date: Fri, 2 Jun 2023 11:34:22 +0100 Date: Fri, 2 Jun 2023 11:34:22 +0100
Subject: [PATCH 07/12] DVDVideoCodecDRMPRIME: Move FilterTest from open to Subject: [PATCH 07/12] DVDVideoCodecDRMPRIME: Move FilterTest from open to
@ -12,7 +12,7 @@ and it may (later) influence the choice of deinterlacers available.
2 files changed, 16 insertions(+), 9 deletions(-) 2 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
index 8568f162ae..f515c5d5f1 100644 index 31c28477cb58..a05ae3ff89e8 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp --- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp +++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
@@ -387,15 +387,7 @@ bool CDVDVideoCodecDRMPRIME::Open(CDVDStreamInfo& hints, CDVDCodecOptions& optio @@ -387,15 +387,7 @@ bool CDVDVideoCodecDRMPRIME::Open(CDVDStreamInfo& hints, CDVDCodecOptions& optio
@ -32,7 +32,7 @@ index 8568f162ae..f515c5d5f1 100644
return true; return true;
} }
@@ -983,6 +975,20 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::GetPicture(VideoPicture* pVideo @@ -984,6 +976,20 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::GetPicture(VideoPicture* pVideo
return VC_ERROR; return VC_ERROR;
} }
@ -54,7 +54,7 @@ index 8568f162ae..f515c5d5f1 100644
bool need_scale = !IsSupportedSwFormat(static_cast<AVPixelFormat>(m_pFrame->format)) && !IsSupportedHwFormat(static_cast<AVPixelFormat>(m_pFrame->format)); bool need_scale = !IsSupportedSwFormat(static_cast<AVPixelFormat>(m_pFrame->format)) && !IsSupportedHwFormat(static_cast<AVPixelFormat>(m_pFrame->format));
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h
index bb88fde1f9..df17f89b96 100644 index bb88fde1f924..df17f89b964c 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h --- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h +++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h
@@ -56,6 +56,7 @@ protected: @@ -56,6 +56,7 @@ protected:
@ -66,5 +66,5 @@ index bb88fde1f9..df17f89b96 100644
AVFrame* m_pFrame = nullptr; AVFrame* m_pFrame = nullptr;
AVFrame* m_pFilterFrame = nullptr; AVFrame* m_pFilterFrame = nullptr;
-- --
2.39.2 2.39.5

View File

@ -1,4 +1,4 @@
From b359d89684418cc3a6f894434d212611c7c12cd5 Mon Sep 17 00:00:00 2001 From 10ef3b029eed466b1e0811024cf5a0143f5c6132 Mon Sep 17 00:00:00 2001
From: Dom Cobley <popcornmix@gmail.com> From: Dom Cobley <popcornmix@gmail.com>
Date: Wed, 31 May 2023 14:19:20 +0100 Date: Wed, 31 May 2023 14:19:20 +0100
Subject: [PATCH 08/12] DVDVideoCodecDRMPRIME: Rework filtering code to handle Subject: [PATCH 08/12] DVDVideoCodecDRMPRIME: Rework filtering code to handle
@ -10,7 +10,7 @@ Subject: [PATCH 08/12] DVDVideoCodecDRMPRIME: Rework filtering code to handle
2 files changed, 68 insertions(+), 70 deletions(-) 2 files changed, 68 insertions(+), 70 deletions(-)
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
index f515c5d5f1..b614312a77 100644 index a05ae3ff89e8..d07cccffddc1 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp --- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp +++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
@@ -207,11 +207,7 @@ static const AVCodec* FindDecoder(CDVDStreamInfo& hints) @@ -207,11 +207,7 @@ static const AVCodec* FindDecoder(CDVDStreamInfo& hints)
@ -26,7 +26,7 @@ index f515c5d5f1..b614312a77 100644
} }
enum AVPixelFormat CDVDVideoCodecDRMPRIME::GetFormat(struct AVCodecContext* avctx, enum AVPixelFormat CDVDVideoCodecDRMPRIME::GetFormat(struct AVCodecContext* avctx,
@@ -645,27 +641,33 @@ bool CDVDVideoCodecDRMPRIME::SetPictureParams(VideoPicture* pVideoPicture) @@ -646,27 +642,33 @@ bool CDVDVideoCodecDRMPRIME::SetPictureParams(VideoPicture* pVideoPicture)
return true; return true;
} }
@ -74,7 +74,7 @@ index f515c5d5f1..b614312a77 100644
} }
} }
} }
@@ -691,14 +693,17 @@ AVFrame *CDVDVideoCodecDRMPRIME::alloc_filter_frame(AVFilterContext * ctx, void @@ -692,14 +694,17 @@ AVFrame *CDVDVideoCodecDRMPRIME::alloc_filter_frame(AVFilterContext * ctx, void
return frame; return frame;
} }
@ -94,7 +94,7 @@ index f515c5d5f1..b614312a77 100644
return true; return true;
if (!(m_pFilterGraph = avfilter_graph_alloc())) if (!(m_pFilterGraph = avfilter_graph_alloc()))
@@ -709,13 +714,12 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool scale, @@ -710,13 +715,12 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool scale,
const AVFilter* srcFilter = avfilter_get_by_name("buffer"); const AVFilter* srcFilter = avfilter_get_by_name("buffer");
const AVFilter* outFilter = avfilter_get_by_name("buffersink"); const AVFilter* outFilter = avfilter_get_by_name("buffersink");
@ -109,7 +109,7 @@ index f515c5d5f1..b614312a77 100644
m_pCodecContext->time_base.num ? m_pCodecContext->time_base.num ?
m_pCodecContext->time_base.num : 1, m_pCodecContext->time_base.num : 1,
m_pCodecContext->time_base.num ? m_pCodecContext->time_base.num ?
@@ -772,6 +776,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool scale, @@ -773,6 +777,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool scale,
return false; return false;
} }
@ -117,7 +117,7 @@ index f515c5d5f1..b614312a77 100644
result = av_opt_set_int_list(m_pFilterOut, "pix_fmts", &pix_fmts[0], result = av_opt_set_int_list(m_pFilterOut, "pix_fmts", &pix_fmts[0],
AV_PIX_FMT_NONE, AV_OPT_SEARCH_CHILDREN); AV_PIX_FMT_NONE, AV_OPT_SEARCH_CHILDREN);
if (result < 0) if (result < 0)
@@ -780,43 +785,32 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool scale, @@ -781,43 +786,32 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool scale,
return false; return false;
} }
@ -181,7 +181,7 @@ index f515c5d5f1..b614312a77 100644
} }
if ((result = avfilter_graph_config(m_pFilterGraph, nullptr)) < 0) if ((result = avfilter_graph_config(m_pFilterGraph, nullptr)) < 0)
@@ -831,8 +825,6 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool scale, @@ -832,8 +826,6 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool scale,
if (test) if (test)
return true; return true;
@ -190,7 +190,7 @@ index f515c5d5f1..b614312a77 100644
if (CServiceBroker::GetLogging().CanLogComponent(LOGVIDEO)) if (CServiceBroker::GetLogging().CanLogComponent(LOGVIDEO))
{ {
char* graphDump = avfilter_graph_dump(m_pFilterGraph, nullptr); char* graphDump = avfilter_graph_dump(m_pFilterGraph, nullptr);
@@ -864,8 +856,8 @@ void CDVDVideoCodecDRMPRIME::FilterClose() @@ -865,8 +857,8 @@ void CDVDVideoCodecDRMPRIME::FilterClose()
CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterIn() CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterIn()
{ {
@ -201,7 +201,7 @@ index f515c5d5f1..b614312a77 100644
{ {
CVideoBufferDMA* buffer = static_cast<CVideoBufferDMA*>(av_buffer_get_opaque(m_pFrame->buf[0])); CVideoBufferDMA* buffer = static_cast<CVideoBufferDMA*>(av_buffer_get_opaque(m_pFrame->buf[0]));
buffer->SetDimensions(m_pFrame->width, m_pFrame->height); buffer->SetDimensions(m_pFrame->width, m_pFrame->height);
@@ -975,9 +967,10 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::GetPicture(VideoPicture* pVideo @@ -976,9 +968,10 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::GetPicture(VideoPicture* pVideo
return VC_ERROR; return VC_ERROR;
} }
@ -213,17 +213,17 @@ index f515c5d5f1..b614312a77 100644
if (!m_deintFilterName.empty()) if (!m_deintFilterName.empty())
{ {
@@ -989,28 +982,33 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::GetPicture(VideoPicture* pVideo @@ -990,28 +983,33 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::GetPicture(VideoPicture* pVideo
m_checkedDeinterlace = true; m_checkedDeinterlace = true;
} }
- // we need to scale if the buffer isn't in DRM_PRIME format - // we need to scale if the buffer isn't in DRM_PRIME format
- bool need_scale = !IsSupportedSwFormat(static_cast<AVPixelFormat>(m_pFrame->format)) && !IsSupportedHwFormat(static_cast<AVPixelFormat>(m_pFrame->format)); - bool need_scale = !IsSupportedSwFormat(static_cast<AVPixelFormat>(m_pFrame->format)) && !IsSupportedHwFormat(static_cast<AVPixelFormat>(m_pFrame->format));
- -
if (!m_processInfo.GetVideoInterlaced() && m_pFrame->interlaced_frame) if (!m_processInfo.GetVideoInterlaced() && !!(m_pFrame->flags & AV_FRAME_FLAG_INTERLACED))
m_processInfo.SetVideoInterlaced(true); m_processInfo.SetVideoInterlaced(true);
std::string filterChain = GetFilterChain(m_pFrame->interlaced_frame); std::string filterChain = GetFilterChain(!!(m_pFrame->flags & AV_FRAME_FLAG_INTERLACED));
- if (!filterChain.empty() || need_scale) - if (!filterChain.empty() || need_scale)
+ +
+ // we need to scale if the buffer isn't in DRM_PRIME format + // we need to scale if the buffer isn't in DRM_PRIME format
@ -257,7 +257,7 @@ index f515c5d5f1..b614312a77 100644
} }
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h
index df17f89b96..55675c3c2e 100644 index df17f89b964c..55675c3c2ea8 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h --- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h +++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h
@@ -45,9 +45,9 @@ protected: @@ -45,9 +45,9 @@ protected:
@ -273,5 +273,5 @@ index df17f89b96..55675c3c2e 100644
std::string m_name; std::string m_name;
-- --
2.39.2 2.39.5

View File

@ -1,7 +1,7 @@
From 88d0dd1bb5be849f2066f92f55bd7d8c80eb7edf Mon Sep 17 00:00:00 2001 From a6cd510a17a4a704c245b96734d7a44cba0e8d76 Mon Sep 17 00:00:00 2001
From: Dom Cobley <popcornmix@gmail.com> From: Dom Cobley <popcornmix@gmail.com>
Date: Tue, 20 Jun 2023 15:13:09 +0100 Date: Tue, 20 Jun 2023 15:13:09 +0100
Subject: [PATCH 10/12] CDVDVideoCodecDRMPRIME: Support decoding to DRMPRIME Subject: [PATCH 09/12] CDVDVideoCodecDRMPRIME: Support decoding to DRMPRIME
with sw deinterlace with sw deinterlace
We can map a YUV style DRM_PRIME buffer back to AV_PIX_FMT_YUV420P We can map a YUV style DRM_PRIME buffer back to AV_PIX_FMT_YUV420P
@ -11,10 +11,10 @@ to allow subsquent sw deinterlace
1 file changed, 22 insertions(+) 1 file changed, 22 insertions(+)
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
index b614312a77..023334f5db 100644 index d07cccffddc1..9439f031800a 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp --- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp +++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
@@ -700,6 +700,9 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, AVPixelForma @@ -701,6 +701,9 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, AVPixelForma
if (filters.find("deinterlace") != std::string::npos && pix_fmt == AV_PIX_FMT_YUV420P) if (filters.find("deinterlace") != std::string::npos && pix_fmt == AV_PIX_FMT_YUV420P)
pix_fmt = AV_PIX_FMT_DRM_PRIME; pix_fmt = AV_PIX_FMT_DRM_PRIME;
@ -24,7 +24,7 @@ index b614312a77..023334f5db 100644
if (m_pFilterGraph) if (m_pFilterGraph)
FilterClose(); FilterClose();
@@ -866,6 +869,25 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterIn() @@ -867,6 +870,25 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterIn()
m_pFrame->data[0] = reinterpret_cast<uint8_t*>(descriptor); m_pFrame->data[0] = reinterpret_cast<uint8_t*>(descriptor);
m_pFrame->format = AV_PIX_FMT_DRM_PRIME; m_pFrame->format = AV_PIX_FMT_DRM_PRIME;
} }
@ -51,5 +51,5 @@ index b614312a77..023334f5db 100644
int ret = av_buffersrc_add_frame(m_pFilterIn, m_pFrame); int ret = av_buffersrc_add_frame(m_pFilterIn, m_pFrame);
if (ret < 0) if (ret < 0)
-- --
2.39.2 2.39.5

View File

@ -1,7 +1,7 @@
From c2ced5695054a42fe4ba8520669d7c69e583e2a1 Mon Sep 17 00:00:00 2001 From 0dbcdaef75f1513de2077bbf14825486c46b1bb8 Mon Sep 17 00:00:00 2001
From: Dom Cobley <popcornmix@gmail.com> From: Dom Cobley <popcornmix@gmail.com>
Date: Tue, 20 Jun 2023 15:14:02 +0100 Date: Tue, 20 Jun 2023 15:14:02 +0100
Subject: [PATCH 11/12] DVDVideoCodecDRMPRIME: Request v4l2 buffers be Subject: [PATCH 10/12] DVDVideoCodecDRMPRIME: Request v4l2 buffers be
allocated through cache allocated through cache
This is an optional request, but will improve performance of sw deinterlace This is an optional request, but will improve performance of sw deinterlace
@ -11,7 +11,7 @@ if supported.
1 file changed, 4 insertions(+) 1 file changed, 4 insertions(+)
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
index 023334f5db..0182f30a61 100644 index 9439f031800a..4338324c931d 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp --- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
+++ b/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 @@ -367,6 +367,10 @@ bool CDVDVideoCodecDRMPRIME::Open(CDVDStreamInfo& hints, CDVDCodecOptions& optio
@ -26,5 +26,5 @@ index 023334f5db..0182f30a61 100644
{ {
CLog::Log(LOGINFO, "CDVDVideoCodecDRMPRIME::{} - unable to open codec", __FUNCTION__); CLog::Log(LOGINFO, "CDVDVideoCodecDRMPRIME::{} - unable to open codec", __FUNCTION__);
-- --
2.39.2 2.39.5

View File

@ -1,7 +1,7 @@
From 4eded8af13fe44c12ed2c26e40abfe9e9d08281f Mon Sep 17 00:00:00 2001 From b28d1869b92f9876c838e288f4b4eeb357ae9e86 Mon Sep 17 00:00:00 2001
From: Dom Cobley <popcornmix@gmail.com> From: Dom Cobley <popcornmix@gmail.com>
Date: Wed, 21 Jun 2023 13:16:01 +0100 Date: Wed, 21 Jun 2023 13:16:01 +0100
Subject: [PATCH 12/12] DVDVideoCodecDRMPRIME: Add setting to enable hw Subject: [PATCH 11/12] DVDVideoCodecDRMPRIME: Add setting to enable hw
deinterlace deinterlace
HW deinterlace has lower cpu, but may have higher quality, HW deinterlace has lower cpu, but may have higher quality,
@ -14,10 +14,10 @@ so allow user to choose appropriate setting.
4 files changed, 39 insertions(+), 1 deletion(-) 4 files changed, 39 insertions(+), 1 deletion(-)
diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po
index 062d3afd2b..8c6e31965a 100644 index 4e0f32669987..abbfbd767c05 100644
--- a/addons/resource.language.en_gb/resources/strings.po --- a/addons/resource.language.en_gb/resources/strings.po
+++ b/addons/resource.language.en_gb/resources/strings.po +++ b/addons/resource.language.en_gb/resources/strings.po
@@ -7311,6 +7311,11 @@ msgctxt "#13438" @@ -7513,6 +7513,11 @@ msgctxt "#13438"
msgid "Allow hardware acceleration with DRM PRIME" msgid "Allow hardware acceleration with DRM PRIME"
msgstr "" msgstr ""
@ -29,7 +29,7 @@ index 062d3afd2b..8c6e31965a 100644
#: system/settings/settings.xml #: system/settings/settings.xml
msgctxt "#13439" msgctxt "#13439"
msgid "Allow hardware acceleration - MediaCodec" msgid "Allow hardware acceleration - MediaCodec"
@@ -19424,6 +19429,12 @@ msgctxt "#36172" @@ -19896,6 +19901,12 @@ msgctxt "#36172"
msgid "Enable PRIME decoding of video files" msgid "Enable PRIME decoding of video files"
msgstr "" msgstr ""
@ -43,10 +43,10 @@ index 062d3afd2b..8c6e31965a 100644
#: system/settings/settings.xml #: system/settings/settings.xml
msgctxt "#36173" msgctxt "#36173"
diff --git a/system/settings/linux.xml b/system/settings/linux.xml diff --git a/system/settings/linux.xml b/system/settings/linux.xml
index 531974f3f4..c2df62c047 100644 index c99bd895275e..756448b8371a 100644
--- a/system/settings/linux.xml --- a/system/settings/linux.xml
+++ b/system/settings/linux.xml +++ b/system/settings/linux.xml
@@ -180,6 +180,18 @@ @@ -192,6 +192,18 @@
<default>true</default> <default>true</default>
<control type="toggle" /> <control type="toggle" />
</setting> </setting>
@ -66,7 +66,7 @@ index 531974f3f4..c2df62c047 100644
<requirement>HAS_GLES</requirement> <requirement>HAS_GLES</requirement>
<visible>false</visible> <visible>false</visible>
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
index 0182f30a61..cd3b4e89a2 100644 index 4338324c931d..135a1e29af0a 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp --- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp +++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
@@ -41,6 +41,7 @@ namespace @@ -41,6 +41,7 @@ namespace
@ -93,7 +93,7 @@ index 0182f30a61..cd3b4e89a2 100644
CDVDFactoryCodec::RegisterHWVideoCodec("drm_prime", CDVDVideoCodecDRMPRIME::Create); CDVDFactoryCodec::RegisterHWVideoCodec("drm_prime", CDVDVideoCodecDRMPRIME::Create);
} }
@@ -650,7 +660,11 @@ void CDVDVideoCodecDRMPRIME::FilterTest(AVPixelFormat pix_fmt) @@ -651,7 +661,11 @@ void CDVDVideoCodecDRMPRIME::FilterTest(AVPixelFormat pix_fmt)
m_deintFilterName.clear(); m_deintFilterName.clear();
// look twice, first for DRM_PRIME support, then for actual pixel format // look twice, first for DRM_PRIME support, then for actual pixel format
@ -107,17 +107,17 @@ index 0182f30a61..cd3b4e89a2 100644
const AVFilter* filter; const AVFilter* filter;
void* opaque{}; void* opaque{};
diff --git a/xbmc/settings/Settings.h b/xbmc/settings/Settings.h diff --git a/xbmc/settings/Settings.h b/xbmc/settings/Settings.h
index a4f91e9f92..e9cb3dc2be 100644 index adf040f49c01..490513d3b9b1 100644
--- a/xbmc/settings/Settings.h --- a/xbmc/settings/Settings.h
+++ b/xbmc/settings/Settings.h +++ b/xbmc/settings/Settings.h
@@ -117,6 +117,7 @@ public: @@ -124,6 +124,7 @@ public:
static constexpr auto SETTING_VIDEOPLAYER_USEMEDIACODEC = "videoplayer.usemediacodec"; static constexpr auto SETTING_VIDEOPLAYER_USEMEDIACODEC = "videoplayer.usemediacodec";
static constexpr auto SETTING_VIDEOPLAYER_USEMEDIACODECSURFACE = static constexpr auto SETTING_VIDEOPLAYER_USEMEDIACODECSURFACE =
"videoplayer.usemediacodecsurface"; "videoplayer.usemediacodecsurface";
+ static constexpr auto SETTING_VIDEOPLAYER_ALLOWHWDEINTERLACE = "videoplayer.primeallowhwdeinterlace"; + static constexpr auto SETTING_VIDEOPLAYER_ALLOWHWDEINTERLACE = "videoplayer.primeallowhwdeinterlace";
static constexpr auto SETTING_VIDEOPLAYER_USEDECODERFILTER = "videoplayer.usedecoderfilter";
static constexpr auto SETTING_VIDEOPLAYER_USEVDPAU = "videoplayer.usevdpau"; static constexpr auto SETTING_VIDEOPLAYER_USEVDPAU = "videoplayer.usevdpau";
static constexpr auto SETTING_VIDEOPLAYER_USEVDPAUMIXER = "videoplayer.usevdpaumixer"; static constexpr auto SETTING_VIDEOPLAYER_USEVDPAUMIXER = "videoplayer.usevdpaumixer";
static constexpr auto SETTING_VIDEOPLAYER_USEVDPAUMPEG2 = "videoplayer.usevdpaumpeg2";
-- --
2.39.2 2.39.5

View File

@ -0,0 +1,25 @@
From 073e3c003014827c37d142338f23674c0deab835 Mon Sep 17 00:00:00 2001
From: Dom Cobley <popcornmix@gmail.com>
Date: Tue, 17 Dec 2024 19:44:14 +0000
Subject: [PATCH 12/12] fixup! DVDVideoCodecDRMPRIME: add support for filters
---
.../cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
index 135a1e29af0a..014843c9e422 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
@@ -772,7 +772,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, AVPixelForma
memset(par, 0, sizeof(*par));
par->format = AV_PIX_FMT_NONE;
- par->hw_frames_ctx = m_pCodecContext->hw_device_ctx;
+ par->hw_frames_ctx = m_pFrame->hw_frames_ctx;
result = av_buffersrc_parameters_set(m_pFilterIn, par);
if (result < 0)
--
2.39.5