Github messages for voidlinux
 help / color / mirror / Atom feed
From: ericonr <ericonr@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] [RFC][NOMERGE] Update libaom and enable it for ffmpeg
Date: Mon, 13 Jul 2020 20:26:39 +0200	[thread overview]
Message-ID: <20200713182639.c-Brca4Fg8k55OUT6sqf5oeQMmEMqz1VfEWJofyqSZQ@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-23542@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 2406 bytes --]

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages ffmpeg
https://github.com/void-linux/void-packages/pull/23542

[RFC][NOMERGE] Update libaom and enable it for ffmpeg
Fixes #23538 

I currently get segfaults when trying to use this with ffmpeg.

```
$ ffmpeg -i example.mp4 -c:v libaom-av1 -crf 30 -b:v 0 -strict experimental av1_test.mkv
```

gets me this backtrace:

```
#0  0x00007f98d9dde6c0 in lowbd_inv_txfm2d_add_no_identity_avx2 () from /lib/libaom.so.2
#1  0x00007f98d9b6b449 in av1_inverse_transform_block () from /lib/libaom.so.2
#2  0x00007f98d9d04eb1 in search_tx_type.constprop () from /lib/libaom.so.2
#3  0x00007f98d9d08cf6 in block_rd_txfm () from /lib/libaom.so.2
#4  0x00007f98d9c53f1f in av1_foreach_transformed_block_in_plane () from /lib/libaom.so.2
#5  0x00007f98d9d0de79 in av1_txfm_rd_in_plane () from /lib/libaom.so.2
#6  0x00007f98d9d0e006 in av1_uniform_txfm_yrd () from /lib/libaom.so.2
#7  0x00007f98d9d0e5ee in choose_tx_size_type_from_rd () from /lib/libaom.so.2
#8  0x00007f98d9d0e996 in av1_pick_uniform_tx_size_type_yrd () from /lib/libaom.so.2
#9  0x00007f98d9d1aaaa in av1_rd_pick_intra_sby_mode () from /lib/libaom.so.2
#10 0x00007f98d9ce402a in av1_rd_pick_intra_mode_sb () from /lib/libaom.so.2
#11 0x00007f98d9c361f1 in pick_sb_modes () from /lib/libaom.so.2
#12 0x00007f98d9c3b64e in rd_use_partition () from /lib/libaom.so.2
#13 0x00007f98d9c3af86 in rd_use_partition () from /lib/libaom.so.2
#14 0x00007f98d9c3b174 in rd_use_partition () from /lib/libaom.so.2
#15 0x00007f98d9c49eba in encode_rd_sb () from /lib/libaom.so.2
#16 0x00007f98d9c4e4a9 in av1_encode_sb_row () from /lib/libaom.so.2
#17 0x00007f98d9c7e002 in enc_row_mt_worker_hook () from /lib/libaom.so.2
#18 0x00007f98d9b2986b in thread_loop () from /lib/libaom.so.2
#19 0x00007f98dd1fa305 in start (p=0x7f98aec3a7a8) at src/thread/pthread_create.c:192
#20 0x00007f98dd207a6b in __clone () at src/thread/x86_64/clone.s:22
Backtrace stopped: frame did not save the PC
quit
```

I'm not sure we can enable it when it's like this. I can try using FFMPEG 4.3 to see if it works better then. I am on musl, so that might be an issue.

I also don't know how to test for gstreamer AV1 support. 

A patch file from https://github.com/void-linux/void-packages/pull/23542.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ffmpeg-23542.patch --]
[-- Type: text/x-diff, Size: 6760 bytes --]

From cb735544c76a3438a9e0615217532a2a0dd2764f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Sun, 12 Jul 2020 22:36:53 -0300
Subject: [PATCH 1/3] libaom: update to 2.0.0.

---
 common/shlibs                        |  2 +-
 srcpkgs/libaom/patches/version.patch | 14 ------------
 srcpkgs/libaom/template              | 33 +++++++++++++++++++++++-----
 srcpkgs/libaom/update                |  2 +-
 4 files changed, 30 insertions(+), 21 deletions(-)
 delete mode 100644 srcpkgs/libaom/patches/version.patch

diff --git a/common/shlibs b/common/shlibs
index 00a0af53fcb..7b7b182bf11 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3508,7 +3508,7 @@ libticalcs2.so.12 libticalcs2-1.1.9_1
 libhtmlcxx.so.3 htmlcxx-0.86_1
 libcss_parser_pp.so.0 htmlcxx-0.86_1
 libcss_parser.so.0 htmlcxx-0.86_1
-libaom.so.0 libaom-1.0.0_1
+libaom.so.2 libaom-2.0.0_1
 libre.so re-0.5.8_1
 libspandsp.so.2 spandsp-0.0.6_1
 libspa-alsa.so libspa-alsa-0.3.6_1
diff --git a/srcpkgs/libaom/patches/version.patch b/srcpkgs/libaom/patches/version.patch
deleted file mode 100644
index 97372192897..00000000000
--- a/srcpkgs/libaom/patches/version.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-add entry for 1.0.0 release to fix version in pkg-config file
-
---- CHANGELOG
-+++ CHANGELOG
-@@ -3,6 +3,9 @@
-     The AV1 encoder's default keyframe interval changed to 128 from 9999.
-     Support for armv6 was removed.
-
-+2019-03-16 v1.0.0 "AOMedia Codec 1"
-+  Current release
-+
- 2016-04-07 v0.1.0 "AOMedia Codec 1"
-   This release is the first Alliance for Open Media codec.
- 2015-11-09 v1.5.0 "Javan Whistling Duck"
diff --git a/srcpkgs/libaom/template b/srcpkgs/libaom/template
index 7cb2fcf07db..3d62063df0c 100644
--- a/srcpkgs/libaom/template
+++ b/srcpkgs/libaom/template
@@ -1,18 +1,41 @@
 # Template file for 'libaom'
 pkgname=libaom
-version=1.0.0.1
-revision=2
+version=2.0.0
+revision=1
 create_wrksrc=yes
 build_style=cmake
-configure_args="-DENABLE_DOCS=OFF -DBUILD_SHARED_LIBS=ON -DENABLE_TESTS=OFF"
+make_check_target=runtests
+make_check_args="-j${makejobs}"
+configure_args="-DENABLE_DOCS=OFF -DBUILD_SHARED_LIBS=ON"
 hostmakedepends="yasm doxygen perl python"
 short_desc="AV1 Codec library implementation"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="BSD-2-Clause"
 homepage="https://aomedia.org/"
 changelog="https://aomedia.googlesource.com/aom/+/master/CHANGELOG"
-distfiles="https://aomedia.googlesource.com/aom/+archive/v${version%.*}-errata${version##*.}.tar.gz"
-checksum=@0f1e812ca6d3b3809bf3f7a12a85b549c96d20bfa72fa606a682541bbc3eaeab
+distfiles="https://aomedia.googlesource.com/aom/+archive/v${version}.tar.gz"
+checksum=@4e8a74ed7e05d5534ab0b72735fa670ce1a1e757bc4a777f07fdabf8629fced1
+
+# aom segfaults with default musl stack size
+LDFLAGS="-Wl,-z,stack-size=2097152"
+
+case "$XBPS_TARGET_MACHINE" in
+	armv[67]l*) configure_args+=" -DENABLE_NEON=0" ;;
+esac
+
+if [ -z "$XBPS_CHECK_PKGS" ]; then
+	configure_args+=" -DENABLE_TESTS=OFF"
+fi
+
+pre_check() {
+	mkdir -p /host/libaom-test-data
+	export LIBAOM_TEST_DATA_PATH=/host/libaom-test-data
+}
+
+post_check() {
+	make testdata {$makejobs}
+	./test/examples.sh --bin-path examples
+}
 
 post_install() {
 	vlicense LICENSE
diff --git a/srcpkgs/libaom/update b/srcpkgs/libaom/update
index fd5a23fd8eb..866cfaf6c8c 100644
--- a/srcpkgs/libaom/update
+++ b/srcpkgs/libaom/update
@@ -1,3 +1,3 @@
 site=https://aomedia.googlesource.com/aom/
 pkgname=
-pattern="aom/\+/v\K[\d\.]+"
+pattern="v\K[\d\.][\d.]+"

From 0e25b5caff91d7034b1a99fd625d71521e19a653 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Sun, 12 Jul 2020 22:38:21 -0300
Subject: [PATCH 2/3] gst-plugins-bad1: revbump for libaom.

---
 srcpkgs/gst-plugins-bad1/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/gst-plugins-bad1/template b/srcpkgs/gst-plugins-bad1/template
index df1d5053c5f..a1012b0a492 100644
--- a/srcpkgs/gst-plugins-bad1/template
+++ b/srcpkgs/gst-plugins-bad1/template
@@ -1,7 +1,7 @@
 # Template file for 'gst-plugins-bad1'
 pkgname=gst-plugins-bad1
 version=1.16.2
-revision=9
+revision=10
 wrksrc="${pkgname/1/}-${version}"
 build_helper="gir"
 build_style=meson

From f93ff9934c74b83f7d3a787fb6527cda2982d423 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Sun, 12 Jul 2020 20:25:32 -0300
Subject: [PATCH 3/3] ffmpeg: enable aom build option.

Reorganize the lines to get closer to the 80 column limit. Put all
dependencies related to build options after the normal dependencies.
---
 srcpkgs/ffmpeg/template | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/ffmpeg/template b/srcpkgs/ffmpeg/template
index ad986a72790..ee7bd6ee48a 100644
--- a/srcpkgs/ffmpeg/template
+++ b/srcpkgs/ffmpeg/template
@@ -2,7 +2,7 @@
 # audacity also needs to be bumped when a new ffmpeg version bumps libavformat's soname!
 pkgname=ffmpeg
 version=4.2.3
-revision=5
+revision=6
 short_desc="Decoding, encoding and streaming software"
 maintainer="Johannes <johannes.brechtmann@gmail.com>"
 license="GPL-3.0-or-later"
@@ -16,16 +16,17 @@ makedepends="zlib-devel bzip2-devel freetype-devel alsa-lib-devel libXfixes-deve
  libXext-devel libXvMC-devel libxcb-devel faad2-devel lame-devel libtheora-devel
  gnutls-devel libvorbis-devel x264-devel xvidcore-devel jack-devel SDL2-devel
  libcdio-paranoia-devel librtmp-devel libmodplug-devel gnutls-devel
- speex-devel celt-devel harfbuzz-devel libass-devel opus-devel $(vopt_if pulseaudio pulseaudio-devel)
- ocl-icd-devel $(vopt_if x265 x265-devel) $(vopt_if vaapi libva-devel)
- $(vopt_if vdpau libvdpau-devel) $(vopt_if v4l2 v4l-utils-devel) libbs2b-devel
- libvidstab-devel $(vopt_if faac faac-devel) $(vopt_if fdk_aac fdk-aac-devel)
+ speex-devel celt-devel harfbuzz-devel libass-devel opus-devel ocl-icd-devel
+ libbs2b-devel libvidstab-devel $(vopt_if pulseaudio pulseaudio-devel)
+ $(vopt_if x265 x265-devel) $(vopt_if vaapi libva-devel) $(vopt_if vdpau libvdpau-devel)
+ $(vopt_if v4l2 v4l-utils-devel) $(vopt_if faac faac-devel) $(vopt_if fdk_aac fdk-aac-devel)
  $(vopt_if vpx libvpx-devel) $(vopt_if aom libaom-devel)
  $(vopt_if nvenc nv-codec-headers) $(vopt_if sndio sndio-devel)
  $(vopt_if dav1d libdav1d-devel) $(vopt_if zimg zimg-devel)"
 
-build_options="x265 v4l2 vaapi vdpau vpx faac fdk_aac aom nvenc sndio pulseaudio dav1d zimg"
-build_options_default="x265 v4l2 vpx sndio pulseaudio dav1d"
+build_options="x265 v4l2 vaapi vdpau vpx faac fdk_aac aom nvenc sndio pulseaudio
+ dav1d zimg"
+build_options_default="x265 v4l2 vpx aom sndio pulseaudio dav1d"
 
 case "$XBPS_TARGET_MACHINE" in
 	i686*|x86_64*) build_options_default+=" vaapi vdpau nvenc";;

  parent reply	other threads:[~2020-07-13 18:26 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-13  2:17 [PR PATCH] " ericonr
2020-07-13  5:42 ` [PR PATCH] [Updated] " ahesford
2020-07-13  5:48 ` ericonr
2020-07-13 13:32 ` [PR PATCH] [Updated] " ericonr
2020-07-13 17:17 ` richfelker
2020-07-13 17:36 ` ericonr
2020-07-13 18:26 ` ericonr [this message]
2020-07-13 18:46 ` richfelker
2020-07-20 14:15 ` [PR PATCH] [Updated] " ericonr
2020-07-20 14:16 ` ericonr
2020-07-20 14:36 ` ericonr
2020-07-21 23:26 ` [PR REVIEW] " ericonr
2020-07-22  0:48 ` q66
2020-07-22  0:49 ` ericonr
2020-07-22  0:56 ` ericonr
2020-07-22  0:56 ` ericonr
2020-07-22  0:58 ` [PR PATCH] [Updated] " ericonr
2020-07-22  0:59 ` [PR REVIEW] " q66
2020-07-22  1:06 ` ericonr
2020-07-22  1:09 ` ericonr
2020-07-22  1:59 ` q66
2020-07-22  2:07 ` [PR PATCH] [Updated] " ericonr
2020-07-24 19:04 ` [PR PATCH] [Closed]: " jnbr
2020-07-24 19:04 ` jnbr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200713182639.c-Brca4Fg8k55OUT6sqf5oeQMmEMqz1VfEWJofyqSZQ@z \
    --to=ericonr@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).