Skip to content

Commit 2d4e162

Browse files
committed
an almost working dav1d
1 parent e164b08 commit 2d4e162

File tree

2 files changed

+21
-5
lines changed

2 files changed

+21
-5
lines changed

cross_compile_ffmpeg.sh

+8-5
Original file line numberDiff line numberDiff line change
@@ -77,18 +77,18 @@ check_missing_packages () {
7777
if [[ $DISTRO == "Ubuntu" ]]; then
7878
echo "for ubuntu:"
7979
echo "$ sudo apt-get update"
80-
echo -n " $ sudo apt-get install subversion ragel curl texinfo g++ bison flex cvs yasm automake libtool autoconf gcc cmake git make pkg-config zlib1g-dev mercurial unzip pax nasm gperf autogen bzip2 autoconf-archive p7zip-full"
80+
echo -n " $ sudo apt-get install subversion ragel curl texinfo g++ bison flex cvs yasm automake libtool autoconf gcc cmake git make pkg-config zlib1g-dev mercurial unzip pax nasm gperf autogen bzip2 autoconf-archive p7zip-full meson"
8181
if at_least_required_version "18.04" "$(lsb_release -rs)"; then
8282
echo -n " python3-distutils" # guess it's no longer built-in, lensfun requires it...
8383
fi
8484
echo " -y"
8585
else
8686
echo "for gentoo (a non ubuntu distro): same as above, but no g++, no gcc, git is dev-vcs/git, zlib1g-dev is zlib, pkg-config is dev-util/pkgconfig, add ed..."
87-
echo "for OS X (homebrew): brew install ragel wget cvs hg yasm autogen automake autoconf cmake libtool xz pkg-config nasm bzip2 autoconf-archive p7zip coreutils"
87+
echo "for OS X (homebrew): brew install ragel wget cvs hg yasm autogen automake autoconf cmake libtool xz pkg-config nasm bzip2 autoconf-archive p7zip coreutils meson"
8888
echo "for debian: same as ubuntu, but also add libtool-bin, ed, autoconf-archive"
8989
echo "for RHEL/CentOS: First ensure you have epel repos available, then run $ sudo yum install ragel subversion texinfo mercurial libtool autogen gperf nasm patch unzip pax ed gcc-c++ bison flex yasm automake autoconf gcc zlib-devel cvs bzip2 cmake3 -y"
9090
echo "for fedora: if your distribution comes with a modern version of cmake then use the same as RHEL/CentOS but replace cmake3 with cmake."
91-
echo "for linux native compiler option: add libva-dev"
91+
echo "for linux native compiler option: same as <your OS> above, add libva-dev"
9292
fi
9393
exit 1
9494
fi
@@ -477,7 +477,7 @@ do_cmake_and_install() {
477477
}
478478

479479
do_meson() {
480-
local configure_options="$1"
480+
local configure_options="$1 --unity=off"
481481
local configure_name="$2"
482482
local configure_env="$3"
483483
local configure_noclean=""
@@ -518,7 +518,7 @@ do_ninja_and_ninja_install() {
518518
do_ninja "$extra_ninja_options"
519519
local touch_name=$(get_small_touchfile_name already_ran_make_install "$extra_ninja_options")
520520
if [ ! -f $touch_name ]; then
521-
echo "ninja installing $(pwd) as $ PATH=$PATH ninja -C build install $extra_make_options"
521+
echo "ninja installing $(pwd) as $PATH=$PATH ninja -C build install $extra_make_options"
522522
ninja -C build install || exit 1
523523
touch $touch_name || exit 1
524524
fi
@@ -1544,7 +1544,10 @@ build_libaom() {
15441544
build_dav1d() {
15451545
do_git_checkout https://code.videolan.org/videolan/dav1d.git libdav1d
15461546
cd libdav1d
1547+
apply_patch file://$patch_dir/david_no_asm.patch -p1
1548+
cpu_count=1
15471549
generic_meson_ninja_install
1550+
cpu_count=$original_cpu_count
15481551
cd ..
15491552
}
15501553

patches/david_no_asm.patch

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/meson_options.txt b/meson_options.txt
2+
index cdd27c2..9eab161 100644
3+
--- a/meson_options.txt
4+
+++ b/meson_options.txt
5+
@@ -7,7 +7,7 @@ option('bitdepths',
6+
7+
option('enable_asm',
8+
type: 'boolean',
9+
- value: true,
10+
+ value: false,
11+
description: 'Build asm files, if available')
12+
13+
option('enable_tools',

0 commit comments

Comments
 (0)