diff options
author | Jan Beich <jbeich@FreeBSD.org> | 2018-11-03 16:25:07 +0000 |
---|---|---|
committer | Jan Beich <jbeich@FreeBSD.org> | 2018-11-03 16:25:07 +0000 |
commit | 32d14152c5990d2a15036a17ddacdb5ee1228056 (patch) | |
tree | 3d5e9756fb7ae144e7e2eb25668172977d2a576b /multimedia/cmrt | |
parent | 066a88948276a2a8b2059099967e1a3fc6f4148b (diff) | |
download | ports-32d14152c5990d2a15036a17ddacdb5ee1228056.tar.gz ports-32d14152c5990d2a15036a17ddacdb5ee1228056.zip |
multimedia/libva-intel-driver: expose Hybrid decoding
On Skylake this reduces CPU usage by half when decoding VP9.
Notes
Notes:
svn path=/head/; revision=483899
Diffstat (limited to 'multimedia/cmrt')
-rw-r--r-- | multimedia/cmrt/Makefile | 30 | ||||
-rw-r--r-- | multimedia/cmrt/distinfo | 3 | ||||
-rw-r--r-- | multimedia/cmrt/files/patch-i386 | 28 | ||||
-rw-r--r-- | multimedia/cmrt/files/patch-memalign | 40 | ||||
-rw-r--r-- | multimedia/cmrt/pkg-descr | 5 | ||||
-rw-r--r-- | multimedia/cmrt/pkg-plist | 7 |
6 files changed, 113 insertions, 0 deletions
diff --git a/multimedia/cmrt/Makefile b/multimedia/cmrt/Makefile new file mode 100644 index 000000000000..fb5bdc315692 --- /dev/null +++ b/multimedia/cmrt/Makefile @@ -0,0 +1,30 @@ +# $FreeBSD$ + +PORTNAME= cmrt +DISTVERSION= 1.0.6 +CATEGORIES= multimedia + +MAINTAINER= jbeich@FreeBSD.org +COMMENT= C for Media Runtime + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/COPYING + +ONLY_FOR_ARCHS= amd64 i386 +ONLY_FOR_ARCHS_REASON= Only Intel GPUs on x86 are supported + +LIB_DEPENDS= libdrm_intel.so:graphics/libdrm \ + libva.so:multimedia/libva + +USES= autoreconf compiler:c11 libtool pkgconfig +USE_GITHUB= yes +USE_LDCONFIG= yes +GH_ACCOUNT= intel +GNU_CONFIGURE= yes +INSTALL_TARGET= install-strip + +post-patch: + @${REINPLACE_CMD} -e '/-g/d; /-O2/d' \ + ${WRKSRC}/src/Makefile.am + +.include <bsd.port.mk> diff --git a/multimedia/cmrt/distinfo b/multimedia/cmrt/distinfo new file mode 100644 index 000000000000..5cef548ee681 --- /dev/null +++ b/multimedia/cmrt/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1473292298 +SHA256 (intel-cmrt-1.0.6_GH0.tar.gz) = ca22e905a2717fc740e703e65a0061a0e11f4ea513ba970bbc10b3bd6d28e6e0 +SIZE (intel-cmrt-1.0.6_GH0.tar.gz) = 3717552 diff --git a/multimedia/cmrt/files/patch-i386 b/multimedia/cmrt/files/patch-i386 new file mode 100644 index 000000000000..b04474e9f775 --- /dev/null +++ b/multimedia/cmrt/files/patch-i386 @@ -0,0 +1,28 @@ +In file included from cm_device.cpp:31: +In file included from ./cm_device.h:37: +In file included from ./cm_array.h:31: +./cm_mem.h:200:17: error: invalid output size for constraint '=a' + :"=a"(local_rax), "=r"(local_rbx), + ^ + +--- src/cm_mem.h.orig 2016-09-07 23:51:38 UTC ++++ src/cm_mem.h +@@ -194,7 +194,9 @@ inline void GetCPUID(int CPUInfo[4], int InfoType) + CPUInfo[1] = local_ebx; + CPUInfo[2] = local_ecx; + CPUInfo[3] = local_edx; +- } else { ++ } ++#ifdef __LP64__ ++ else { + uint64_t local_rax, local_rbx, local_rcx, local_rdx; + __asm__ __volatile__("push %%rbx \n\t" "cpuid \n\t" "mov %%rbx, %1 \n\t" "pop %%rbx \n\t" /* restore the old %ebx */ + :"=a"(local_rax), "=r"(local_rbx), +@@ -206,6 +208,7 @@ inline void GetCPUID(int CPUInfo[4], int InfoType) + CPUInfo[2] = local_rcx; + CPUInfo[3] = local_rdx; + } ++#endif + + #ifndef NO_EXCEPTION_HANDLING + } diff --git a/multimedia/cmrt/files/patch-memalign b/multimedia/cmrt/files/patch-memalign new file mode 100644 index 000000000000..40f7447ff1ac --- /dev/null +++ b/multimedia/cmrt/files/patch-memalign @@ -0,0 +1,40 @@ +memalign is Linux-specific, so use C11 aligned_alloc instead + +--- src/cm_rt_linux.h.orig 2016-09-07 23:51:38 UTC ++++ src/cm_rt_linux.h +@@ -48,7 +48,6 @@ extern "C" { + #include <stdlib.h> + #include <stdint.h> + #include <math.h> +-#include <malloc.h> + #include <string.h> + #include <sys/time.h> + #include <pthread.h> +@@ -334,7 +333,7 @@ template <> inline const char *CM_TYPE_NAME_UNMANGLED + + inline void *CM_ALIGNED_MALLOC(size_t size, size_t alignment) + { +- return memalign(alignment, size); ++ return aligned_alloc(alignment, size); + } + + inline void CM_ALIGNED_FREE(void *memory) +--- src/os_utilities.c.orig 2016-09-07 23:51:38 UTC ++++ src/os_utilities.c +@@ -40,7 +40,6 @@ + #include <sys/types.h> + #include <sys/sem.h> + #include <signal.h> +-#include <malloc.h> + #include "string.h" + #include <unistd.h> + +@@ -56,7 +55,7 @@ INT32 GenOsMemAllocCounter; + GENOS_OS_VERBOSEMESSAGE("GenOsMemAllocCounter = %d, Addr = 0x%x.", GenOsMemAllocCounter, ptr); \ + GENOS_OS_VERBOSEMESSAGE("<MemNinjaSysFreePtr memPtr = \"%d\" memType = \"Sys\"/>.", ptr); + +-#define _aligned_malloc(size, alignment) memalign(alignment, size) ++#define _aligned_malloc(size, alignment) aligned_alloc(alignment, size) + #define _aligned_free(ptr) free(ptr) + + PVOID GENOS_AlignedAllocMemory(SIZE_T size, SIZE_T alignment) diff --git a/multimedia/cmrt/pkg-descr b/multimedia/cmrt/pkg-descr new file mode 100644 index 000000000000..dc1b08777d38 --- /dev/null +++ b/multimedia/cmrt/pkg-descr @@ -0,0 +1,5 @@ +Media GPU kernel manager for Intel G45 & HD Graphics family. Allows to +interface between Intel GPU's driver and a host program through a +high-level language. + +WWW: https://01.org/linuxmedia diff --git a/multimedia/cmrt/pkg-plist b/multimedia/cmrt/pkg-plist new file mode 100644 index 000000000000..9e006d69ed9f --- /dev/null +++ b/multimedia/cmrt/pkg-plist @@ -0,0 +1,7 @@ +etc/cmrt.conf +include/cm_rt.h +include/cm_rt_linux.h +lib/libcmrt.so +lib/libcmrt.so.1 +lib/libcmrt.so.1.1001.0 +libdata/pkgconfig/libcmrt.pc |