Merge pull request #159461 from dali99/libaom-tunes

libaom: Add support for butteraugli and vmaf tunes
main
Sandro 2 years ago committed by GitHub
commit ce660322e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 16
      pkgs/development/libraries/libaom/default.nix
  2. 18
      pkgs/development/libraries/libjxl/default.nix
  3. 5
      pkgs/top-level/all-packages.nix

@ -1,4 +1,7 @@
{ lib, stdenv, fetchzip, yasm, perl, cmake, pkg-config, python3 }:
{ lib, stdenv, fetchzip, yasm, perl, cmake, pkg-config, python3
, enableButteraugli ? false, libjxl, libhwy # Broken
, enableVmaf ? true, libvmaf
}:
stdenv.mkDerivation rec {
pname = "libaom";
@ -16,6 +19,11 @@ stdenv.mkDerivation rec {
yasm perl cmake pkg-config python3
];
buildInputs = lib.optionals enableButteraugli [
libjxl
libhwy
] ++ lib.optional enableVmaf libvmaf;
preConfigure = ''
# build uses `git describe` to set the build version
cat > $NIX_BUILD_TOP/git << "EOF"
@ -32,6 +40,10 @@ stdenv.mkDerivation rec {
cmakeFlags = [
"-DBUILD_SHARED_LIBS=ON"
"-DENABLE_TESTS=OFF"
] ++ lib.optionals enableButteraugli [
"-DCONFIG_TUNE_BUTTERAUGLI=1"
] ++ lib.optionals enableVmaf [
"-DCONFIG_TUNE_VMAF=1"
] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
# CPU detection isn't supported on Darwin and breaks the aarch64-darwin build:
"-DCONFIG_RUNTIME_CPU_DETECT=0"
@ -58,7 +70,7 @@ stdenv.mkDerivation rec {
'';
homepage = "https://aomedia.org/av1-features/get-started/";
changelog = "https://aomedia.googlesource.com/aom/+/refs/tags/v${version}/CHANGELOG";
maintainers = with maintainers; [ primeos kiloreux ];
maintainers = with maintainers; [ primeos kiloreux dandellion ];
platforms = platforms.all;
license = licenses.bsd2;
};

@ -1,10 +1,7 @@
{ stdenv, lib, fetchFromGitHub
, fetchpatch
, asciidoc
, brotli
, cmake
, graphviz
, doxygen
, giflib
, gperftools
, gtest
@ -14,8 +11,12 @@
, libwebp
, openexr
, pkg-config
, python3
, zlib
, buildDocs ? true
, asciidoc
, graphviz
, doxygen
, python3
}:
stdenv.mkDerivation rec {
@ -50,13 +51,14 @@ stdenv.mkDerivation rec {
];
nativeBuildInputs = [
asciidoc # for docs
cmake
graphviz # for docs via doxygen component `dot`
doxygen # for docs
gtest
pkg-config
python3 # for docs
] ++ lib.optionals buildDocs [
asciidoc
graphviz
doxygen
python3
];
# Functionality not currently provided by this package

@ -18187,7 +18187,10 @@ with pkgs;
libantlr3c = callPackage ../development/libraries/libantlr3c {};
libaom = callPackage ../development/libraries/libaom { };
libaom = callPackage ../development/libraries/libaom {
# Remove circular dependency for libavif
libjxl = libjxl.override { buildDocs = false; };
};
libappindicator-gtk2 = libappindicator.override { gtkVersion = "2"; };
libappindicator-gtk3 = libappindicator.override { gtkVersion = "3"; };

Loading…
Cancel
Save