summaryrefslogtreecommitdiff
path: root/repo/media/dav1d
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-05-04 23:52:30 +0100
committerdavidovski <david@davidovski.xyz>2022-05-04 23:52:30 +0100
commit739c65c54cb0e957df5e9b76f93fb02554e5cac3 (patch)
tree09ddfa0a342f3ea9de136cb50abdd79821bf1b53 /repo/media/dav1d
parent4c585ad54388285500fd18a6aaa516894e0f2c16 (diff)
moved everything to new file formatting
Diffstat (limited to 'repo/media/dav1d')
-rw-r--r--repo/media/dav1d/dav1d.xibuild30
-rw-r--r--repo/media/dav1d/fix-asmcheck.patch63
2 files changed, 93 insertions, 0 deletions
diff --git a/repo/media/dav1d/dav1d.xibuild b/repo/media/dav1d/dav1d.xibuild
new file mode 100644
index 0000000..a25471b
--- /dev/null
+++ b/repo/media/dav1d/dav1d.xibuild
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+NAME="dav1d"
+DESC="small and fast AV1 Decoder"
+
+MAKEDEPS="meson ninja nasm"
+DEPS="musl "
+
+PKG_VER=1.0.0
+SOURCE="https://code.videolan.org/videolan/dav1d/-/archive/$PKG_VER/dav1d-$PKG_VER.tar.bz2"
+ADDITIONAL="fix-asmcheck.patch "
+
+prepare () {
+ apply_patches
+}
+
+build () {
+ mkdir build &&
+ cd build &&
+ meson --prefix=/usr \
+ -Denable_asm=true \
+ -Dfuzzing_engine=none \
+ .. &&
+ ninja
+}
+
+package () {
+ DESTDIR=$PKG_DEST ninja install
+ mv $PKG_DEST/usr/lib64 $PKG_DEST/usr/lib
+}
diff --git a/repo/media/dav1d/fix-asmcheck.patch b/repo/media/dav1d/fix-asmcheck.patch
new file mode 100644
index 0000000..922db6e
--- /dev/null
+++ b/repo/media/dav1d/fix-asmcheck.patch
@@ -0,0 +1,63 @@
+Patch-Source: https://code.videolan.org/videolan/dav1d/-/merge_requests/1406
+From 87f9a81cd770e49394a45deca7a3df41243de00b Mon Sep 17 00:00:00 2001
+From: Henrik Gramner <gramner@twoorioles.com>
+Date: Sat, 19 Mar 2022 03:09:31 +0100
+Subject: [PATCH] checkasm: Fix alignment of stack buffers in the film grain
+ tests
+
+---
+ tests/checkasm/filmgrain.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/tests/checkasm/filmgrain.c b/tests/checkasm/filmgrain.c
+index ff7ffc36..9aa4f269 100644
+--- a/tests/checkasm/filmgrain.c
++++ b/tests/checkasm/filmgrain.c
+@@ -83,9 +83,9 @@ static void check_gen_grny(const Dav1dFilmGrainDSPContext *const dsp) {
+ }
+
+ static void check_gen_grnuv(const Dav1dFilmGrainDSPContext *const dsp) {
+- entry grain_lut_y[GRAIN_HEIGHT + 1][GRAIN_WIDTH];
+- entry grain_lut_c[GRAIN_HEIGHT][GRAIN_WIDTH];
+- entry grain_lut_a[GRAIN_HEIGHT + 1][GRAIN_WIDTH];
++ ALIGN_STK_16(entry, grain_lut_y, GRAIN_HEIGHT + 1,[GRAIN_WIDTH]);
++ ALIGN_STK_16(entry, grain_lut_c, GRAIN_HEIGHT, [GRAIN_WIDTH]);
++ ALIGN_STK_16(entry, grain_lut_a, GRAIN_HEIGHT + 1,[GRAIN_WIDTH]);
+
+ declare_func(void, entry grain_lut[][GRAIN_WIDTH],
+ const entry grain_lut_y[][GRAIN_WIDTH],
+@@ -155,6 +155,7 @@ static void check_fgy_sbrow(const Dav1dFilmGrainDSPContext *const dsp) {
+
+ if (check_func(dsp->fgy_32x32xn, "fgy_32x32xn_%dbpc", BITDEPTH)) {
+ ALIGN_STK_16(Dav1dFilmGrainData, fg_data, 16,);
++ ALIGN_STK_16(entry, grain_lut, GRAIN_HEIGHT + 1,[GRAIN_WIDTH]);
+ ALIGN_STK_64(uint8_t, scaling, SCALING_SIZE,);
+ fg_data[0].seed = rnd() & 0xFFFF;
+
+@@ -164,7 +165,6 @@ static void check_fgy_sbrow(const Dav1dFilmGrainDSPContext *const dsp) {
+ const int bitdepth_max = 0xff;
+ #endif
+
+- entry grain_lut[GRAIN_HEIGHT + 1][GRAIN_WIDTH];
+ fg_data[0].grain_scale_shift = rnd() & 3;
+ fg_data[0].ar_coeff_shift = (rnd() & 3) + 6;
+ fg_data[0].ar_coeff_lag = rnd() & 3;
+@@ -267,6 +267,7 @@ static void check_fguv_sbrow(const Dav1dFilmGrainDSPContext *const dsp) {
+ BITDEPTH, ss_name[layout_idx], csfl))
+ {
+ ALIGN_STK_16(Dav1dFilmGrainData, fg_data, 1,);
++ ALIGN_STK_16(entry, grain_lut, 2,[GRAIN_HEIGHT + 1][GRAIN_WIDTH]);
+ ALIGN_STK_64(uint8_t, scaling, SCALING_SIZE,);
+
+ fg_data[0].seed = rnd() & 0xFFFF;
+@@ -279,7 +280,6 @@ static void check_fguv_sbrow(const Dav1dFilmGrainDSPContext *const dsp) {
+ const int uv_pl = rnd() & 1;
+ const int is_identity = rnd() & 1;
+
+- entry grain_lut[2][GRAIN_HEIGHT + 1][GRAIN_WIDTH];
+ fg_data[0].grain_scale_shift = rnd() & 3;
+ fg_data[0].ar_coeff_shift = (rnd() & 3) + 6;
+ fg_data[0].ar_coeff_lag = rnd() & 3;
+--
+GitLab
+