kodi: drop support for old, proprietary bcm2835 GL driver

Signed-off-by: Matthias Reichl <hias@horus.com>
This commit is contained in:
Matthias Reichl 2020-07-04 11:53:59 +02:00
parent 26bef6c86a
commit 3bb2e6d2b0
3 changed files with 1 additions and 118 deletions

View File

@ -26,10 +26,6 @@ case $KODI_VENDOR in
;;
esac
if [ "$KODIPLAYER_DRIVER" = bcm2835-driver -a "$KODI_VENDOR" = "default" ]; then
PKG_PATCH_DIRS+=" rpi-hevc"
fi
configure_package() {
# Single threaded LTO is very slow so rely on Kodi for parallel LTO support
if [ "$LTO_SUPPORT" = "yes" ] && ! build_with_debug; then
@ -197,9 +193,7 @@ configure_package() {
if [ ! "$KODIPLAYER_DRIVER" = default ]; then
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET $KODIPLAYER_DRIVER libinput libxkbcommon"
if [ "$KODIPLAYER_DRIVER" = bcm2835-driver ]; then
KODI_PLAYER="-DCORE_PLATFORM_NAME=rbpi"
elif [ "$OPENGLES_SUPPORT" = yes -a "$KODIPLAYER_DRIVER" = "$OPENGLES" ]; then
if [ "$OPENGLES_SUPPORT" = yes -a "$KODIPLAYER_DRIVER" = "$OPENGLES" ]; then
KODI_PLAYER="-DCORE_PLATFORM_NAME=gbm -DGBM_RENDER_SYSTEM=gles"
CFLAGS="$CFLAGS -DEGL_NO_X11"
CXXFLAGS="$CXXFLAGS -DEGL_NO_X11"

View File

@ -1,49 +0,0 @@
From 372718db53f3397dc0e972985202416fffe15ff4 Mon Sep 17 00:00:00 2001
From: popcornmix <popcornmix@gmail.com>
Date: Thu, 7 May 2015 15:35:43 +0100
Subject: [PATCH] rbp: Support zero copy interface with hevc acceleration
---
.../VideoPlayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp | 9 +++++++++
xbmc/cores/VideoPlayer/DVDCodecs/Video/MMALFFmpeg.cpp | 5 +++--
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
index 0af254029e..e1263012aa 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
@@ -366,6 +366,15 @@ bool CDVDVideoCodecFFmpeg::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options
if (m_decoderState == STATE_NONE)
{
m_decoderState = STATE_HW_SINGLE;
+#ifdef TARGET_RASPBERRY_PI
+ int num_threads = CServiceBroker::GetCPUInfo()->GetCPUCount() * 3 / 2;
+ num_threads = std::max(1, std::min(num_threads, 16));
+ if (pCodec->id == AV_CODEC_ID_HEVC)
+ num_threads = 8;
+ m_pCodecContext->thread_count = num_threads;
+ m_pCodecContext->thread_safe_callbacks = 0;
+ CLog::Log(LOGDEBUG, "CDVDVideoCodecFFmpeg - open frame threaded with %d threads", num_threads);
+#endif
}
else
{
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/MMALFFmpeg.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/MMALFFmpeg.cpp
index 28eff23f16..779a839690 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/MMALFFmpeg.cpp
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/MMALFFmpeg.cpp
@@ -298,8 +298,9 @@ CDVDVideoCodec::VCReturn CDecoder::Decode(AVCodecContext* avctx, AVFrame* frame)
CGPUMEM *m_gmem = (CGPUMEM *)av_buffer_get_opaque(frame->buf[0]);
assert(m_gmem);
- // need to flush ARM cache so GPU can see it
- m_gmem->Flush();
+ // need to flush ARM cache so GPU can see it (HEVC will have already done this)
+ if (avctx->codec_id != AV_CODEC_ID_HEVC)
+ m_gmem->Flush();
m_renderBuffer = static_cast<CMMALYUVBuffer*>(m_gmem->m_opaque);
assert(m_renderBuffer && m_renderBuffer->mmal_buffer);
if (m_renderBuffer)
--
2.20.1

View File

@ -1,62 +0,0 @@
From 115a3328123c060b9e4d5f35c3774aa17c73276a Mon Sep 17 00:00:00 2001
From: popcornmix <popcornmix@gmail.com>
Date: Mon, 26 Jun 2017 20:17:09 +0100
Subject: [PATCH] MMAL: Add hevc support by allowing 4 planes
---
xbmc/cores/VideoPlayer/Buffers/VideoBuffer.h | 2 +-
xbmc/cores/VideoPlayer/DVDCodecs/Video/MMALFFmpeg.cpp | 3 +++
.../VideoPlayer/VideoRenderers/HwDecRender/MMALRenderer.cpp | 3 +++
3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/xbmc/cores/VideoPlayer/Buffers/VideoBuffer.h b/xbmc/cores/VideoPlayer/Buffers/VideoBuffer.h
index 1c1ba21c48..86a71bb558 100644
--- a/xbmc/cores/VideoPlayer/Buffers/VideoBuffer.h
+++ b/xbmc/cores/VideoPlayer/Buffers/VideoBuffer.h
@@ -23,7 +23,7 @@ extern "C" {
struct YuvImage
{
- static const int MAX_PLANES = 3;
+ static const int MAX_PLANES = 4;
uint8_t* plane[MAX_PLANES];
int planesize[MAX_PLANES];
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/MMALFFmpeg.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/MMALFFmpeg.cpp
index 779a839690..a1a1ab1795 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/MMALFFmpeg.cpp
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/MMALFFmpeg.cpp
@@ -77,6 +77,8 @@ void CMMALYUVBuffer::GetStrides(int(&strides)[YuvImage::MAX_PLANES])
strides[0] = geo.getStrideY();
strides[1] = geo.getStrideC();
strides[2] = geo.getStrideC();
+ if (geo.getStripes() > 1)
+ strides[3] = geo.getHeightY() + geo.getHeightC(); // abuse: strides[3] = stripe stride
}
void CMMALYUVBuffer::SetDimensions(int width, int height, const int (&strides)[YuvImage::MAX_PLANES], const int (&planeOffsets)[YuvImage::MAX_PLANES])
@@ -284,6 +286,7 @@ CDVDVideoCodec::VCReturn CDecoder::Decode(AVCodecContext* avctx, AVFrame* frame)
if (frame)
{
if ((frame->format != AV_PIX_FMT_YUV420P && frame->format != AV_PIX_FMT_YUV420P10 && frame->format != AV_PIX_FMT_YUV420P12 && frame->format != AV_PIX_FMT_YUV420P14 && frame->format != AV_PIX_FMT_YUV420P16 &&
+ frame->format != AV_PIX_FMT_SAND128 && frame->format != AV_PIX_FMT_SAND64_10 && frame->format != AV_PIX_FMT_SAND64_16 &&
frame->format != AV_PIX_FMT_BGR0 && frame->format != AV_PIX_FMT_RGB565LE) ||
frame->buf[1] != nullptr || frame->buf[0] == nullptr)
{
diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/MMALRenderer.cpp b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/MMALRenderer.cpp
index 9b23ddb7fa..e55babf4d3 100644
--- a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/MMALRenderer.cpp
+++ b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/MMALRenderer.cpp
@@ -192,6 +192,9 @@ std::vector<CMMALPool::MMALEncodingTable> CMMALPool::mmal_encoding_table =
{ AV_PIX_FMT_YUV420P12,MMAL_ENCODING_I420_16, },
{ AV_PIX_FMT_YUV420P14,MMAL_ENCODING_I420_16, },
{ AV_PIX_FMT_YUV420P16,MMAL_ENCODING_I420_16, },
+ { AV_PIX_FMT_SAND128, MMAL_ENCODING_YUVUV128 },
+ { AV_PIX_FMT_SAND64_10,MMAL_ENCODING_YUVUV64_16 },
+ { AV_PIX_FMT_SAND64_16,MMAL_ENCODING_YUVUV64_16 },
{ AV_PIX_FMT_RGBA, MMAL_ENCODING_RGBA, },
{ AV_PIX_FMT_BGRA, MMAL_ENCODING_BGRA },
{ AV_PIX_FMT_RGB0, MMAL_ENCODING_RGBA },
--
2.20.1