Skip to content

Commit 0f81efb

Browse files
authored
Merge pull request #11147 from HiassofT/le13-rpi-kodi-ffmpeg-8.1
RPi: update kodi patches, add deinterlacing fix from jc
2 parents 64189c5 + 777e2c2 commit 0f81efb

File tree

3 files changed

+46
-16
lines changed

3 files changed

+46
-16
lines changed

projects/RPi/patches/kodi/0001-gbm-Set-max-bpc-for-high-bit-depth-videos.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 760f78e30e0f3fc22c0cc6acc67e6559ad6cf438 Mon Sep 17 00:00:00 2001
1+
From 696d8cc63dcce8ca2bda2cc4cc1354ae9aa900d5 Mon Sep 17 00:00:00 2001
22
From: Dom Cobley <popcornmix@gmail.com>
33
Date: Fri, 3 Dec 2021 16:00:50 +0000
4-
Subject: [PATCH 1/2] gbm: Set max bpc for high bit depth videos
4+
Subject: [PATCH 1/3] gbm: Set max bpc for high bit depth videos
55

66
---
77
.../HwDecRender/VideoLayerBridgeDRMPRIME.cpp | 15 +++++++++++++++

projects/RPi/patches/kodi/0002-DVDVideoCodecDRMPRIME-add-support-for-filters.patch

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 7fe467bbbc02f410dcd42314ab79a05ff525e212 Mon Sep 17 00:00:00 2001
1+
From 1e7176d19e4c10a4de7e45b9d762a3bc97907ff1 Mon Sep 17 00:00:00 2001
22
From: Jonas Karlman <jonas@kwiboo.se>
33
Date: Sun, 20 Oct 2019 17:10:07 +0000
4-
Subject: [PATCH 2/2] DVDVideoCodecDRMPRIME: add support for filters
4+
Subject: [PATCH 2/3] DVDVideoCodecDRMPRIME: add support for filters
55

66
DRMPRIME deinterlace filter
77

@@ -80,10 +80,10 @@ so allow user to choose appropriate setting.
8080
5 files changed, 507 insertions(+), 39 deletions(-)
8181

8282
diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po
83-
index 587bb7d6f2d4..9953521a20c9 100644
83+
index a7f9fa70214c..40e264ed5199 100644
8484
--- a/addons/resource.language.en_gb/resources/strings.po
8585
+++ b/addons/resource.language.en_gb/resources/strings.po
86-
@@ -7551,6 +7551,11 @@ msgctxt "#13438"
86+
@@ -7547,6 +7547,11 @@ msgctxt "#13438"
8787
msgid "Allow hardware acceleration with DRM PRIME"
8888
msgstr ""
8989

@@ -95,7 +95,7 @@ index 587bb7d6f2d4..9953521a20c9 100644
9595
#: system/settings/settings.xml
9696
msgctxt "#13439"
9797
msgid "Allow hardware acceleration - MediaCodec"
98-
@@ -20029,6 +20034,12 @@ msgctxt "#36172"
98+
@@ -19991,6 +19996,12 @@ msgctxt "#36172"
9999
msgid "Enable PRIME decoding of video files"
100100
msgstr ""
101101

@@ -132,7 +132,7 @@ index 6c2db262e13b..ebc355e69696 100644
132132
<requirement>HAS_GLES</requirement>
133133
<visible>false</visible>
134134
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
135-
index 07c505213691..c6cd64922c39 100644
135+
index 51e77faf1929..b60b9bd0c706 100644
136136
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
137137
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
138138
@@ -28,6 +28,8 @@
@@ -241,7 +241,7 @@ index 07c505213691..c6cd64922c39 100644
241241

242242
buffer->Export(frame, width, height);
243243
buffer->SyncStart();
244-
@@ -369,6 +380,10 @@ bool CDVDVideoCodecDRMPRIME::Open(CDVDStreamInfo& hints, CDVDCodecOptions& optio
244+
@@ -368,6 +379,10 @@ bool CDVDVideoCodecDRMPRIME::Open(CDVDStreamInfo& hints, CDVDCodecOptions& optio
245245
for (auto&& option : options.m_keys)
246246
av_opt_set(m_pCodecContext, option.m_name.c_str(), option.m_value.c_str(), 0);
247247

@@ -252,7 +252,7 @@ index 07c505213691..c6cd64922c39 100644
252252
if (avcodec_open2(m_pCodecContext, pCodec, nullptr) < 0)
253253
{
254254
CLog::Log(LOGINFO, "CDVDVideoCodecDRMPRIME::{} - unable to open codec", __FUNCTION__);
255-
@@ -381,9 +396,12 @@ bool CDVDVideoCodecDRMPRIME::Open(CDVDStreamInfo& hints, CDVDCodecOptions& optio
255+
@@ -380,9 +395,12 @@ bool CDVDVideoCodecDRMPRIME::Open(CDVDStreamInfo& hints, CDVDCodecOptions& optio
256256
}
257257

258258
UpdateProcessInfo(m_pCodecContext, m_pCodecContext->pix_fmt);
@@ -265,7 +265,7 @@ index 07c505213691..c6cd64922c39 100644
265265
return true;
266266
}
267267

268-
@@ -458,6 +476,8 @@ void CDVDVideoCodecDRMPRIME::Reset()
268+
@@ -457,6 +475,8 @@ void CDVDVideoCodecDRMPRIME::Reset()
269269
return;
270270

271271
Drain();
@@ -274,7 +274,7 @@ index 07c505213691..c6cd64922c39 100644
274274

275275
do
276276
{
277-
@@ -505,7 +525,7 @@ void CDVDVideoCodecDRMPRIME::Drain()
277+
@@ -504,7 +524,7 @@ void CDVDVideoCodecDRMPRIME::Drain()
278278
av_packet_free(&avpkt);
279279
}
280280

@@ -283,7 +283,7 @@ index 07c505213691..c6cd64922c39 100644
283283
{
284284
pVideoPicture->iWidth = m_pFrame->width;
285285
pVideoPicture->iHeight = m_pFrame->height;
286-
@@ -601,6 +621,370 @@ void CDVDVideoCodecDRMPRIME::SetPictureParams(VideoPicture* pVideoPicture)
286+
@@ -600,6 +620,370 @@ void CDVDVideoCodecDRMPRIME::SetPictureParams(VideoPicture* pVideoPicture)
287287
? DVD_NOPTS_VALUE
288288
: static_cast<double>(pts) * DVD_TIME_BASE / AV_TIME_BASE;
289289
pVideoPicture->dts = DVD_NOPTS_VALUE;
@@ -654,7 +654,7 @@ index 07c505213691..c6cd64922c39 100644
654654
}
655655

656656
CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::GetPicture(VideoPicture* pVideoPicture)
657-
@@ -608,6 +992,21 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::GetPicture(VideoPicture* pVideo
657+
@@ -607,6 +991,21 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::GetPicture(VideoPicture* pVideo
658658
if (m_codecControlFlags & DVD_CODEC_CTRL_DRAIN)
659659
Drain();
660660

@@ -676,7 +676,7 @@ index 07c505213691..c6cd64922c39 100644
676676
int ret = avcodec_receive_frame(m_pCodecContext, m_pFrame);
677677
if (ret == AVERROR(EAGAIN))
678678
return VC_BUFFER;
679-
@@ -630,41 +1029,65 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::GetPicture(VideoPicture* pVideo
679+
@@ -629,41 +1028,65 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::GetPicture(VideoPicture* pVideo
680680
return VC_ERROR;
681681
}
682682

@@ -819,7 +819,7 @@ index db49d165e7ba..64c6c029f3d4 100644
819819
+ AVBufferRef *m_hw_frames_ref = nullptr;
820820
};
821821
diff --git a/xbmc/settings/Settings.h b/xbmc/settings/Settings.h
822-
index f70a19900c4b..3c2bbeadcf3e 100644
822+
index 0bb0711d2670..6c729682fbf5 100644
823823
--- a/xbmc/settings/Settings.h
824824
+++ b/xbmc/settings/Settings.h
825825
@@ -123,6 +123,7 @@ public:
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
From 79d2085a930f98a4b0916e813f82b82a9ab63e86 Mon Sep 17 00:00:00 2001
2+
From: Matthias Reichl <hias@horus.com>
3+
Date: Wed, 1 Apr 2026 20:35:17 +0200
4+
Subject: [PATCH 3/3] fixup WIP: DRMPRIME deinterlace filter
5+
6+
patch from jc
7+
8+
Signed-off-by: Matthias Reichl <hias@horus.com>
9+
---
10+
.../VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp | 4 ++++
11+
1 file changed, 4 insertions(+)
12+
13+
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
14+
index b60b9bd0c706..c5fd49048a7c 100644
15+
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
16+
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
17+
@@ -773,6 +773,10 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, AVPixelForma
18+
av_buffer_unref(&m_hw_device_ref);
19+
return false;
20+
}
21+
+ AVHWFramesContext *const fctx = (AVHWFramesContext *)m_hw_frames_ref->data;
22+
+ fctx->format = AV_PIX_FMT_DRM_PRIME;
23+
+ fctx->sw_format = AV_PIX_FMT_NV12;
24+
+
25+
par->hw_frames_ctx = av_buffer_ref(m_hw_frames_ref);
26+
}
27+
28+
--
29+
2.47.3
30+

0 commit comments

Comments
 (0)