Import intel-vaapi-driver-1.7.3 as multimedia/intel-vaapi-driver

VA-API (Video Acceleration API) user mode driver for Intel GEN
Graphics family.

VA-API is an open-source library and API specification, which
provides access to graphics hardware acceleration capabilities for
video processing. It consists of a main library and driver-specific
acceleration backends for each supported hardware vendor.

The current video driver backend provides a bridge to the GEN GPUs
through the packaging of buffers and commands to be sent to the
i915 driver for exercising both hardware and shader functionality
for video decode, encode, and processing.
This commit is contained in:
leot 2017-03-12 09:44:25 +00:00
parent 66bef3ff43
commit a5c69658a3
5 changed files with 100 additions and 0 deletions

View file

@ -0,0 +1,12 @@
VA-API (Video Acceleration API) user mode driver for Intel GEN
Graphics family.
VA-API is an open-source library and API specification, which
provides access to graphics hardware acceleration capabilities for
video processing. It consists of a main library and driver-specific
acceleration backends for each supported hardware vendor.
The current video driver backend provides a bridge to the GEN GPUs
through the packaging of buffers and commands to be sent to the
i915 driver for exercising both hardware and shader functionality
for video decode, encode, and processing.

View file

@ -0,0 +1,44 @@
# $NetBSD: Makefile,v 1.1 2017/03/12 09:44:25 leot Exp $
DISTNAME= intel-vaapi-driver-1.7.3
CATEGORIES= multimedia
MASTER_SITES= ${MASTER_SITE_GITHUB:=01org/}
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= https://github.com/01org/intel-vaapi-driver/
COMMENT= VA-API user mode driver for Intel GEN Graphics family
LICENSE= mit
.include "../../multimedia/libva/available.mk"
.if ${VAAPI_AVAILABLE} == "no"
NOT_FOR_PLATFORM+= ${MACHINE_PLATFORM}
.endif
GNU_CONFIGURE= yes
USE_LIBTOOL= yes
USE_TOOLS+= autoconf automake gmake pkg-config
CONFIGURE_ARGS+= --disable-wayland
# XXX: Force installation in PREFIX.
# XXX: LIBVA_DRIVERS_PATH - if undefined - is obtained via
# XXX: `pkg-config libva --variable driverdir'. This is not desiderable
# XXX: for native X.org so handle installation similarly to graphics/MesaLib
# XXX: in order to be X11_TYPE agnostic.
CONFIGURE_ENV+= LIBVA_DRIVERS_PATH=${PREFIX}/lib/dri/
.include "../../mk/bsd.prefs.mk"
.if ${OPSYS} != "Linux"
BUILDLINK_TRANSFORM+= rm:-ldl
.endif
pre-configure:
${RUN} cd ${WRKSRC} && ${SH} ./autogen.sh
.include "../../mk/dlopen.buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../multimedia/libva/buildlink3.mk"
.include "../../x11/libdrm/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

View file

@ -0,0 +1,2 @@
@comment $NetBSD: PLIST,v 1.1 2017/03/12 09:44:25 leot Exp $
lib/dri/i965_drv_video.la

View file

@ -0,0 +1,7 @@
$NetBSD: distinfo,v 1.1 2017/03/12 09:44:25 leot Exp $
SHA1 (intel-vaapi-driver-1.7.3.tar.gz) = f2f412edc9d03567897b187d96343db68598fa37
RMD160 (intel-vaapi-driver-1.7.3.tar.gz) = 2ba7c3d945733bf56f234fc5451422173a612f1d
SHA512 (intel-vaapi-driver-1.7.3.tar.gz) = 57ae4fbf1bd5799e8a311fcd67eda1a8a6d5b5267df502b83f63f8bd0cdd510a4f78b4d09088833bfa2e98447d841c3d4e7229f4e75a9d9f4b8096fb14027878
Size (intel-vaapi-driver-1.7.3.tar.gz) = 1648659 bytes
SHA1 (patch-src_i965__decoder__utils.c) = 1719cac7ee434c92e1a7016ad4130615dd62ddaa

View file

@ -0,0 +1,35 @@
$NetBSD: patch-src_i965__decoder__utils.c,v 1.1 2017/03/12 09:44:25 leot Exp $
Use malloc(3) and free(3) instead of alloca(3).
From upstream via issue pull request #77 (it will not needed
for the next 1.8.0 version).
--- src/i965_decoder_utils.c.orig 2016-11-10 05:04:36.000000000 +0000
+++ src/i965_decoder_utils.c
@@ -23,7 +23,6 @@
#include "sysdeps.h"
#include <limits.h>
-#include <alloca.h>
#include "intel_batchbuffer.h"
#include "intel_media.h"
@@ -343,7 +342,7 @@ avc_get_first_mb_bit_offset_with_epb(
if (buf_size > data_size)
buf_size = data_size;
- buf = alloca(buf_size);
+ buf = malloc(buf_size);
ret = dri_bo_get_subdata(
slice_data_bo, slice_param->slice_data_offset,
buf_size, buf
@@ -355,6 +354,8 @@ avc_get_first_mb_bit_offset_with_epb(
i += 2, j++, n++;
}
+ free(buf);
+
out_slice_data_bit_offset = in_slice_data_bit_offset + n * 8;
if (mode_flag == ENTROPY_CABAC)