mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 05:36:47 +00:00
Merge pull request #1725 from piotrasd/8.2_up
LE8.2 update mesa, libdrm, intel-ucode (WIP)
This commit is contained in:
commit
3f206c3046
@ -18,7 +18,7 @@
|
|||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
PKG_NAME="libdrm"
|
PKG_NAME="libdrm"
|
||||||
PKG_VERSION="2.4.74"
|
PKG_VERSION="2.4.81"
|
||||||
PKG_ARCH="any"
|
PKG_ARCH="any"
|
||||||
PKG_LICENSE="GPL"
|
PKG_LICENSE="GPL"
|
||||||
PKG_SITE="http://dri.freedesktop.org"
|
PKG_SITE="http://dri.freedesktop.org"
|
||||||
|
@ -17,11 +17,11 @@
|
|||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
PKG_NAME="mesa"
|
PKG_NAME="mesa"
|
||||||
PKG_VERSION="13.0.6"
|
PKG_VERSION="17.1.3"
|
||||||
PKG_ARCH="any"
|
PKG_ARCH="any"
|
||||||
PKG_LICENSE="OSS"
|
PKG_LICENSE="OSS"
|
||||||
PKG_SITE="http://www.mesa3d.org/"
|
PKG_SITE="http://www.mesa3d.org/"
|
||||||
PKG_URL="ftp://freedesktop.org/pub/mesa/${PKG_VERSION%-*}/$PKG_NAME-$PKG_VERSION.tar.xz"
|
PKG_URL="https://mesa.freedesktop.org/archive/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||||
PKG_DEPENDS_TARGET="toolchain Python:host expat glproto dri2proto presentproto libdrm libXext libXdamage libXfixes libXxf86vm libxcb libX11 systemd dri3proto libxshmfence openssl"
|
PKG_DEPENDS_TARGET="toolchain Python:host expat glproto dri2proto presentproto libdrm libXext libXdamage libXfixes libXxf86vm libxcb libX11 systemd dri3proto libxshmfence openssl"
|
||||||
PKG_SECTION="graphics"
|
PKG_SECTION="graphics"
|
||||||
PKG_SHORTDESC="mesa: 3-D graphics library with OpenGL API"
|
PKG_SHORTDESC="mesa: 3-D graphics library with OpenGL API"
|
||||||
@ -92,7 +92,6 @@ PKG_CONFIGURE_OPTS_TARGET="CC_FOR_BUILD=$HOST_CC \
|
|||||||
--enable-opencl-icd \
|
--enable-opencl-icd \
|
||||||
--disable-gallium-tests \
|
--disable-gallium-tests \
|
||||||
--enable-shared-glapi \
|
--enable-shared-glapi \
|
||||||
--enable-shader-cache \
|
|
||||||
--enable-driglx-direct \
|
--enable-driglx-direct \
|
||||||
--enable-glx-tls \
|
--enable-glx-tls \
|
||||||
$MESA_GALLIUM_LLVM \
|
$MESA_GALLIUM_LLVM \
|
||||||
@ -105,11 +104,11 @@ PKG_CONFIGURE_OPTS_TARGET="CC_FOR_BUILD=$HOST_CC \
|
|||||||
--with-sysroot=$SYSROOT_PREFIX"
|
--with-sysroot=$SYSROOT_PREFIX"
|
||||||
|
|
||||||
pre_configure_target() {
|
pre_configure_target() {
|
||||||
export LIBS="-lxcb-dri3 -lxcb-present -lxcb-sync -lxshmfence -lz"
|
export LIBS="-lxcb-dri3 -lxcb-dri2 -lxcb-xfixes -lxcb-present -lxcb-sync -lxshmfence -lz"
|
||||||
}
|
}
|
||||||
|
|
||||||
post_makeinstall_target() {
|
post_makeinstall_target() {
|
||||||
# rename and relink for cooperate with nvidia drivers
|
# rename and relink to cooperate with nvidia drivers
|
||||||
rm -rf $INSTALL/usr/lib/libGL.so
|
rm -rf $INSTALL/usr/lib/libGL.so
|
||||||
rm -rf $INSTALL/usr/lib/libGL.so.1
|
rm -rf $INSTALL/usr/lib/libGL.so.1
|
||||||
ln -sf libGL.so.1 $INSTALL/usr/lib/libGL.so
|
ln -sf libGL.so.1 $INSTALL/usr/lib/libGL.so
|
||||||
|
@ -17,11 +17,11 @@
|
|||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
PKG_NAME="intel-ucode"
|
PKG_NAME="intel-ucode"
|
||||||
PKG_VERSION="20161104"
|
PKG_VERSION="20170511"
|
||||||
PKG_ARCH="x86_64"
|
PKG_ARCH="x86_64"
|
||||||
PKG_LICENSE="other"
|
PKG_LICENSE="other"
|
||||||
PKG_SITE="https://downloadcenter.intel.com/search?keyword=linux+microcode"
|
PKG_SITE="https://downloadcenter.intel.com/search?keyword=linux+microcode"
|
||||||
PKG_URL="https://downloadmirror.intel.com/26400/eng/microcode-${PKG_VERSION}.tgz"
|
PKG_URL="https://downloadmirror.intel.com/26798/eng/microcode-${PKG_VERSION}.tgz"
|
||||||
PKG_DEPENDS_TARGET="toolchain intel-ucode:host"
|
PKG_DEPENDS_TARGET="toolchain intel-ucode:host"
|
||||||
PKG_SECTION="linux-firmware"
|
PKG_SECTION="linux-firmware"
|
||||||
PKG_SHORTDESC="intel-ucode: Intel CPU microcodes"
|
PKG_SHORTDESC="intel-ucode: Intel CPU microcodes"
|
||||||
|
168
packages/mediacenter/kodi/patches/kodi-999.98-vaapi-hevc10.patch
Normal file
168
packages/mediacenter/kodi/patches/kodi-999.98-vaapi-hevc10.patch
Normal file
@ -0,0 +1,168 @@
|
|||||||
|
WFrom ee41bc539fa4dd1f69ddc1f5ca98d26371b483cc Mon Sep 17 00:00:00 2001
|
||||||
|
From: Rainer Hochecker <fernetmenta@online.de>
|
||||||
|
Date: Fri, 16 Dec 2016 17:34:06 +0100
|
||||||
|
Subject: [PATCH] vaapi: hevc 10bit
|
||||||
|
|
||||||
|
---
|
||||||
|
xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp | 102 +++++++++++++++++++++--
|
||||||
|
1 file changed, 95 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp
|
||||||
|
index 84743be..b085b8d 100644
|
||||||
|
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp
|
||||||
|
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp
|
||||||
|
@@ -559,8 +559,8 @@ bool CDecoder::Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum A
|
||||||
|
if (!CVAAPIContext::EnsureContext(&m_vaapiConfig.context, this))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
- if(avctx->coded_width == 0
|
||||||
|
- || avctx->coded_height == 0)
|
||||||
|
+ if(avctx->coded_width == 0 ||
|
||||||
|
+ avctx->coded_height == 0)
|
||||||
|
{
|
||||||
|
CLog::Log(LOGWARNING,"VAAPI::Open: no width/height available, can't init");
|
||||||
|
return false;
|
||||||
|
@@ -617,7 +617,12 @@ bool CDecoder::Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum A
|
||||||
|
}
|
||||||
|
case AV_CODEC_ID_HEVC:
|
||||||
|
{
|
||||||
|
- profile = VAProfileHEVCMain;
|
||||||
|
+ if (avctx->profile == FF_PROFILE_HEVC_MAIN_10)
|
||||||
|
+ profile = VAProfileHEVCMain10;
|
||||||
|
+ else if (avctx->profile == FF_PROFILE_HEVC_MAIN)
|
||||||
|
+ profile = VAProfileHEVCMain;
|
||||||
|
+ else
|
||||||
|
+ profile = VAProfileNone;
|
||||||
|
if (!m_vaapiConfig.context->SupportsProfile(profile))
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
@@ -647,7 +652,7 @@ bool CDecoder::Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum A
|
||||||
|
|
||||||
|
m_vaapiConfig.profile = profile;
|
||||||
|
m_vaapiConfig.attrib = m_vaapiConfig.context->GetAttrib(profile);
|
||||||
|
- if ((m_vaapiConfig.attrib.value & VA_RT_FORMAT_YUV420) == 0)
|
||||||
|
+ if ((m_vaapiConfig.attrib.value & (VA_RT_FORMAT_YUV420 | VA_RT_FORMAT_YUV420_10BPP)) == 0)
|
||||||
|
{
|
||||||
|
CLog::Log(LOGERROR, "VAAPI - invalid yuv format %x", m_vaapiConfig.attrib.value);
|
||||||
|
return false;
|
||||||
|
@@ -1071,7 +1076,7 @@ bool CDecoder::ConfigVAAPI()
|
||||||
|
|
||||||
|
m_vaapiConfig.dpy = m_vaapiConfig.context->GetDisplay();
|
||||||
|
m_vaapiConfig.attrib = m_vaapiConfig.context->GetAttrib(m_vaapiConfig.profile);
|
||||||
|
- if ((m_vaapiConfig.attrib.value & VA_RT_FORMAT_YUV420) == 0)
|
||||||
|
+ if ((m_vaapiConfig.attrib.value & (VA_RT_FORMAT_YUV420 | VA_RT_FORMAT_YUV420_10BPP)) == 0)
|
||||||
|
{
|
||||||
|
CLog::Log(LOGERROR, "VAAPI - invalid yuv format %x", m_vaapiConfig.attrib.value);
|
||||||
|
return false;
|
||||||
|
@@ -1084,9 +1089,12 @@ bool CDecoder::ConfigVAAPI()
|
||||||
|
|
||||||
|
// create surfaces
|
||||||
|
VASurfaceID surfaces[32];
|
||||||
|
+ unsigned int format = VA_RT_FORMAT_YUV420;
|
||||||
|
+ if (m_vaapiConfig.profile == VAProfileHEVCMain10)
|
||||||
|
+ format = VA_RT_FORMAT_YUV420_10BPP;
|
||||||
|
int nb_surfaces = m_vaapiConfig.maxReferences;
|
||||||
|
if (!CheckSuccess(vaCreateSurfaces(m_vaapiConfig.dpy,
|
||||||
|
- VA_RT_FORMAT_YUV420,
|
||||||
|
+ format,
|
||||||
|
m_vaapiConfig.surfaceWidth,
|
||||||
|
m_vaapiConfig.surfaceHeight,
|
||||||
|
surfaces,
|
||||||
|
@@ -1361,6 +1369,83 @@ bool CVaapiRenderPicture::GLMapSurface()
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
+ case VA_FOURCC('P','0','1','0'):
|
||||||
|
+ {
|
||||||
|
+ attrib = attribs;
|
||||||
|
+ *attrib++ = EGL_LINUX_DRM_FOURCC_EXT;
|
||||||
|
+ *attrib++ = fourcc_code('R', '1', '6', ' ');
|
||||||
|
+ *attrib++ = EGL_WIDTH;
|
||||||
|
+ *attrib++ = glInterop.vaImage.width;
|
||||||
|
+ *attrib++ = EGL_HEIGHT;
|
||||||
|
+ *attrib++ = glInterop.vaImage.height;
|
||||||
|
+ *attrib++ = EGL_DMA_BUF_PLANE0_FD_EXT;
|
||||||
|
+ *attrib++ = (intptr_t)glInterop.vBufInfo.handle;
|
||||||
|
+ *attrib++ = EGL_DMA_BUF_PLANE0_OFFSET_EXT;
|
||||||
|
+ *attrib++ = glInterop.vaImage.offsets[0];
|
||||||
|
+ *attrib++ = EGL_DMA_BUF_PLANE0_PITCH_EXT;
|
||||||
|
+ *attrib++ = glInterop.vaImage.pitches[0];
|
||||||
|
+ *attrib++ = EGL_NONE;
|
||||||
|
+ glInterop.eglImageY = glInterop.eglCreateImageKHR(glInterop.eglDisplay,
|
||||||
|
+ EGL_NO_CONTEXT, EGL_LINUX_DMA_BUF_EXT, (EGLClientBuffer)NULL,
|
||||||
|
+ attribs);
|
||||||
|
+ if (!glInterop.eglImageY)
|
||||||
|
+ {
|
||||||
|
+ EGLint err = eglGetError();
|
||||||
|
+ CLog::Log(LOGERROR, "failed to import VA buffer P010 into EGL image: %d", err);
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ attrib = attribs;
|
||||||
|
+ *attrib++ = EGL_LINUX_DRM_FOURCC_EXT;
|
||||||
|
+ *attrib++ = fourcc_code('G', 'R', '3', '2');
|
||||||
|
+ *attrib++ = EGL_WIDTH;
|
||||||
|
+ *attrib++ = (glInterop.vaImage.width + 1) >> 1;
|
||||||
|
+ *attrib++ = EGL_HEIGHT;
|
||||||
|
+ *attrib++ = (glInterop.vaImage.height + 1) >> 1;
|
||||||
|
+ *attrib++ = EGL_DMA_BUF_PLANE0_FD_EXT;
|
||||||
|
+ *attrib++ = (intptr_t)glInterop.vBufInfo.handle;
|
||||||
|
+ *attrib++ = EGL_DMA_BUF_PLANE0_OFFSET_EXT;
|
||||||
|
+ *attrib++ = glInterop.vaImage.offsets[1];
|
||||||
|
+ *attrib++ = EGL_DMA_BUF_PLANE0_PITCH_EXT;
|
||||||
|
+ *attrib++ = glInterop.vaImage.pitches[1];
|
||||||
|
+ *attrib++ = EGL_NONE;
|
||||||
|
+ glInterop.eglImageVU = glInterop.eglCreateImageKHR(glInterop.eglDisplay,
|
||||||
|
+ EGL_NO_CONTEXT, EGL_LINUX_DMA_BUF_EXT, (EGLClientBuffer)NULL,
|
||||||
|
+ attribs);
|
||||||
|
+ if (!glInterop.eglImageVU)
|
||||||
|
+ {
|
||||||
|
+ EGLint err = eglGetError();
|
||||||
|
+ CLog::Log(LOGERROR, "failed to import VA buffer P010 into EGL image: %d", err);
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ GLint format;
|
||||||
|
+
|
||||||
|
+ glGenTextures(1, &textureY);
|
||||||
|
+ glEnable(glInterop.textureTarget);
|
||||||
|
+ glBindTexture(glInterop.textureTarget, textureY);
|
||||||
|
+ glTexParameteri(glInterop.textureTarget, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||||
|
+ glTexParameteri(glInterop.textureTarget, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||||
|
+ glTexParameteri(glInterop.textureTarget, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||||
|
+ glTexParameteri(glInterop.textureTarget, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||||
|
+ glInterop.glEGLImageTargetTexture2DOES(glInterop.textureTarget, glInterop.eglImageY);
|
||||||
|
+ glGetIntegerv(GL_IMPLEMENTATION_COLOR_READ_FORMAT, &format);
|
||||||
|
+
|
||||||
|
+ glGenTextures(1, &textureVU);
|
||||||
|
+ glEnable(glInterop.textureTarget);
|
||||||
|
+ glBindTexture(glInterop.textureTarget, textureVU);
|
||||||
|
+ glTexParameteri(glInterop.textureTarget, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||||
|
+ glTexParameteri(glInterop.textureTarget, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||||
|
+ glTexParameteri(glInterop.textureTarget, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||||
|
+ glTexParameteri(glInterop.textureTarget, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||||
|
+ glInterop.glEGLImageTargetTexture2DOES(glInterop.textureTarget, glInterop.eglImageVU);
|
||||||
|
+ glGetIntegerv(GL_IMPLEMENTATION_COLOR_READ_FORMAT, &format);
|
||||||
|
+
|
||||||
|
+ glBindTexture(glInterop.textureTarget, 0);
|
||||||
|
+ glDisable(glInterop.textureTarget);
|
||||||
|
+
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
case VA_FOURCC('B','G','R','A'):
|
||||||
|
{
|
||||||
|
attrib = attribs;
|
||||||
|
@@ -2605,9 +2690,12 @@ bool CVppPostproc::PreInit(CVaapiConfig &config, SDiMethods *methods)
|
||||||
|
|
||||||
|
// create surfaces
|
||||||
|
VASurfaceID surfaces[32];
|
||||||
|
+ unsigned int format = VA_RT_FORMAT_YUV420;
|
||||||
|
+ if (m_config.profile == VAProfileHEVCMain10)
|
||||||
|
+ format = VA_RT_FORMAT_YUV420_10BPP;
|
||||||
|
int nb_surfaces = NUM_RENDER_PICS;
|
||||||
|
if (!CheckSuccess(vaCreateSurfaces(m_config.dpy,
|
||||||
|
- VA_RT_FORMAT_YUV420,
|
||||||
|
+ format,
|
||||||
|
m_config.surfaceWidth,
|
||||||
|
m_config.surfaceHeight,
|
||||||
|
surfaces,
|
@ -0,0 +1,32 @@
|
|||||||
|
From 4e356d49fc5955fcf9ea8b14d9be22af4edd5b39 Mon Sep 17 00:00:00 2001
|
||||||
|
From: fritsch <Peter.Fruehberger@gmail.com>
|
||||||
|
Date: Sat, 17 Dec 2016 16:06:31 +0100
|
||||||
|
Subject: [PATCH] LinuxRendererGL: Don't use hq scalers when coping with sizes
|
||||||
|
> 2560 (we are too slow)
|
||||||
|
|
||||||
|
---
|
||||||
|
xbmc/cores/VideoPlayer/VideoRenderers/LinuxRendererGL.cpp | 8 ++++++++
|
||||||
|
1 file changed, 8 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/LinuxRendererGL.cpp b/xbmc/cores/VideoPlayer/VideoRenderers/LinuxRendererGL.cpp
|
||||||
|
index 4e785f7..0ee1666 100644
|
||||||
|
--- a/xbmc/cores/VideoPlayer/VideoRenderers/LinuxRendererGL.cpp
|
||||||
|
+++ b/xbmc/cores/VideoPlayer/VideoRenderers/LinuxRendererGL.cpp
|
||||||
|
@@ -2501,6 +2501,14 @@ bool CLinuxRendererGL::Supports(ESCALINGMETHOD method)
|
||||||
|
float scaleX = fabs(((float)m_sourceWidth - m_destRect.Width())/m_sourceWidth)*100;
|
||||||
|
float scaleY = fabs(((float)m_sourceHeight - m_destRect.Height())/m_sourceHeight)*100;
|
||||||
|
int minScale = CSettings::GetInstance().GetInt(CSettings::SETTING_VIDEOPLAYER_HQSCALERS);
|
||||||
|
+ // Don't use hq scalers if source width is larger than 2560 pixels
|
||||||
|
+ if (m_sourceWidth > 2560)
|
||||||
|
+ return false;
|
||||||
|
+
|
||||||
|
+ // Don't use hq scalers if we try to upscale to something > 2560
|
||||||
|
+ if (m_destRect.Width() > 2560)
|
||||||
|
+ return false;
|
||||||
|
+
|
||||||
|
if (scaleX < minScale && scaleY < minScale)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
--
|
||||||
|
2.7.4
|
||||||
|
|
@ -0,0 +1,24 @@
|
|||||||
|
From fb37da37ac1e17f643269ea5bad5bee7e79dcb3a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jean-Yves Simon <lethalwp@gmail.com>
|
||||||
|
Date: Tue, 9 Aug 2016 17:15:30 +0200
|
||||||
|
Subject: [PATCH] avcodec/hevc: Add YUV420P10 to vaapi hardware decode -
|
||||||
|
permits hardware decoding of HEVC Main 10 on AMD RX 480
|
||||||
|
|
||||||
|
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
|
||||||
|
---
|
||||||
|
libavcodec/hevc.c | 3 +++
|
||||||
|
1 file changed, 3 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c
|
||||||
|
index cb1263c..764e093 100644
|
||||||
|
--- a/libavcodec/hevc.c
|
||||||
|
+++ b/libavcodec/hevc.c
|
||||||
|
@@ -370,6 +370,9 @@ static int set_sps(HEVCContext *s, const HEVCSPS *sps, enum AVPixelFormat pix_fm
|
||||||
|
#if CONFIG_HEVC_D3D11VA_HWACCEL
|
||||||
|
*fmt++ = AV_PIX_FMT_D3D11VA_VLD;
|
||||||
|
#endif
|
||||||
|
+#if CONFIG_HEVC_VAAPI_HWACCEL
|
||||||
|
+ *fmt++ = AV_PIX_FMT_VAAPI;
|
||||||
|
+#endif
|
||||||
|
break;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user