Merge pull request #264621 from evanrichter/libvpl-for-intel-gpu

oneVPL for intel gpus
This commit is contained in:
Atemu 2024-03-14 03:59:11 +00:00 committed by GitHub
commit cd48c48a87
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 45 additions and 0 deletions

View File

@ -0,0 +1,38 @@
{ lib
, stdenv
, fetchFromGitHub
, cmake
, pkg-config
, libdrm
, libva
}:
stdenv.mkDerivation rec {
pname = "onevpl-intel-gpu";
version = "23.4.3";
outputs = [ "out" "dev" ];
src = fetchFromGitHub {
owner = "oneapi-src";
repo = "oneVPL-intel-gpu";
rev = "intel-onevpl-${version}";
sha256 = "sha256-oDwDMUq6JpRJH5nbANb7TJLW7HRYA9y0xZxEsoepx/U=";
};
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ libdrm libva ];
meta = {
description = "oneAPI Video Processing Library Intel GPU implementation";
homepage = "https://github.com/oneapi-src/oneVPL-intel-gpu";
changelog = "https://github.com/oneapi-src/oneVPL-intel-gpu/releases/tag/${src.rev}";
license = [ lib.licenses.mit ];
platforms = lib.platforms.linux;
# CMake adds x86 specific compiler flags in <source>/builder/FindGlobals.cmake
# NOTE: https://github.com/oneapi-src/oneVPL-intel-gpu/issues/303
broken = !stdenv.hostPlatform.isx86;
maintainers = [ lib.maintainers.evanrichter ];
};
}

View File

@ -93,6 +93,7 @@
, withVmaf ? withFullDeps && !stdenv.isAarch64 && lib.versionAtLeast version "5" # Netflix's VMAF (Video Multi-Method Assessment Fusion)
, withVoAmrwbenc ? withFullDeps && withVersion3 # AMR-WB encoder
, withVorbis ? withHeadlessDeps # Vorbis de/encoding, native encoder exists
, withVpl ? false # Hardware acceleration via intel libvpl
, withVpx ? withHeadlessDeps && stdenv.buildPlatform == stdenv.hostPlatform # VP8 & VP9 de/encoding
, withVulkan ? withSmallDeps && !stdenv.isDarwin
, withWebp ? withFullDeps # WebP encoder
@ -238,6 +239,7 @@
, libvdpau
, libvmaf
, libvorbis
, libvpl
, libvpx
, libwebp
, libX11
@ -320,6 +322,7 @@ assert withGPLv3 -> withGPL && withVersion3;
* Build dependencies
*/
assert withPixelutils -> buildAvutil;
assert !(withMfx && withVpl); # incompatible features
/*
* Program dependencies
*/
@ -533,6 +536,9 @@ stdenv.mkDerivation (finalAttrs: {
(enableFeature withV4l2M2m "v4l2-m2m")
(enableFeature withVaapi "vaapi")
(enableFeature withVdpau "vdpau")
] ++ optionals (versionAtLeast version "6.0") [
(enableFeature withVpl "libvpl")
] ++ [
(enableFeature withVidStab "libvidstab") # Actual min. version 2.0
(enableFeature withVmaf "libvmaf")
(enableFeature withVoAmrwbenc "libvo-amrwbenc")
@ -648,6 +654,7 @@ stdenv.mkDerivation (finalAttrs: {
++ optionals withVmaf [ libvmaf ]
++ optionals withVoAmrwbenc [ vo-amrwbenc ]
++ optionals withVorbis [ libvorbis ]
++ optionals withVpl [ libvpl ]
++ optionals withVpx [ libvpx ]
++ optionals withVulkan [ vulkan-headers vulkan-loader ]
++ optionals withWebp [ libwebp ]