commit: bd82e2ff24d47c0ea28a1231110c6628318a1328
parent d95c5b072fc3345076ba5da51a596bba19a12f2e
Author: Michael Forney <mforney@mforney.org>
Date: Mon, 15 Nov 2021 13:57:51 -0800
dav1d: Update to 0.9.2
Diffstat:
4 files changed, 159 insertions(+), 30 deletions(-)
diff --git a/pkg/dav1d/gen.lua b/pkg/dav1d/gen.lua
@@ -74,9 +74,9 @@ local srcs = paths[[
thread_task.c
@x86_64 x86/(
- cpu.c msac_init.c
- cpuid.asm msac.asm cdef_avx2.asm itx_avx2.asm
- looprestoration_avx2.asm cdef_sse.asm
+ cpu.c msac_init.c refmvs_init.c
+ cpuid.asm msac.asm refmvs.asm cdef_avx2.asm itx_avx2.asm
+ looprestoration_avx2.asm cdef_sse.asm itx_sse.asm
cdef_avx512.asm
mc_avx512.asm
@@ -86,7 +86,6 @@ local srcs = paths[[
loopfilter_avx2.asm
film_grain_sse.asm
ipred_sse.asm
- itx_sse.asm
loopfilter_sse.asm
looprestoration_sse.asm
mc_sse.asm
@@ -99,6 +98,12 @@ local srcs = paths[[
looprestoration16_avx2.asm
mc16_avx2.asm
cdef16_sse.asm
+ film_grain16_sse.asm
+ ipred16_sse.asm
+ itx16_sse.asm
+ loopfilter16_sse.asm
+ looprestoration16_sse.asm
+ mc16_sse.asm
)
)
]]
diff --git a/pkg/dav1d/patch/0001-Add-portable-fallback-for-ctz-clz-and-clzll.patch b/pkg/dav1d/patch/0001-Add-portable-fallback-for-ctz-clz-and-clzll.patch
@@ -1,4 +1,4 @@
-From 438abb276c7568391d757c7b3338e137307cdad5 Mon Sep 17 00:00:00 2001
+From 881ceef5adda6f1cc5f5a9a15ae74b068bf85dd4 Mon Sep 17 00:00:00 2001
From: Michael Forney <mforney@mforney.org>
Date: Fri, 30 Apr 2021 18:45:18 -0700
Subject: [PATCH] Add portable fallback for ctz, clz, and clzll
@@ -8,7 +8,7 @@ Subject: [PATCH] Add portable fallback for ctz, clz, and clzll
1 file changed, 25 insertions(+), 2 deletions(-)
diff --git a/include/common/attributes.h b/include/common/attributes.h
-index 15892b9..47fed92 100644
+index 4ccc421..72d5202 100644
--- a/include/common/attributes.h
+++ b/include/common/attributes.h
@@ -32,6 +32,7 @@
@@ -17,9 +17,9 @@ index 15892b9..47fed92 100644
#include <assert.h>
+#include <strings.h>
- #ifdef __GNUC__
- #define ATTR_ALIAS __attribute__((may_alias))
-@@ -146,7 +147,7 @@ static inline int clzll(const unsigned long long mask) {
+ #ifndef __has_attribute
+ #define __has_attribute(x) 0
+@@ -156,7 +157,7 @@ static inline int clzll(const unsigned long long mask) {
return clz((unsigned)mask) + 32;
}
#endif /* _WIN64 */
@@ -28,7 +28,7 @@ index 15892b9..47fed92 100644
static inline int ctz(const unsigned int mask) {
return __builtin_ctz(mask);
}
-@@ -158,7 +159,29 @@ static inline int clz(const unsigned int mask) {
+@@ -168,7 +169,29 @@ static inline int clz(const unsigned int mask) {
static inline int clzll(const unsigned long long mask) {
return __builtin_clzll(mask);
}
@@ -57,8 +57,8 @@ index 15892b9..47fed92 100644
+}
+#endif /* !_MSC_VER && !__GNUC__ */
- #ifndef __has_feature
- #define __has_feature(x) 0
+ #ifndef static_assert
+ #define CHECK_OFFSET(type, field, name) \
--
2.32.0
diff --git a/pkg/dav1d/patch/0002-Remove-invalid-at-top-level.patch b/pkg/dav1d/patch/0002-Remove-invalid-at-top-level.patch
@@ -1,19 +1,20 @@
-From a7aacef625f376acb904dd6aab24ffbaa1d88999 Mon Sep 17 00:00:00 2001
+From 152e1ab7151fe8461ba4243a9d6bdea0edda7690 Mon Sep 17 00:00:00 2001
From: Michael Forney <mforney@mforney.org>
Date: Fri, 30 Apr 2021 18:56:27 -0700
Subject: [PATCH] Remove invalid ';' at top-level
This is not allowed in the ISO C grammar.
---
- src/cdef_tmpl.c | 6 +++---
- src/film_grain_tmpl.c | 12 ++++++------
- src/looprestoration.h | 4 ++--
- src/mc_tmpl.c | 6 +++---
- src/x86/looprestoration_init_tmpl.c | 14 +++++++-------
- 5 files changed, 21 insertions(+), 21 deletions(-)
+ src/cdef_tmpl.c | 6 +-
+ src/film_grain_tmpl.c | 12 ++--
+ src/looprestoration.h | 4 +-
+ src/mc_tmpl.c | 6 +-
+ src/x86/looprestoration_init_tmpl.c | 16 ++---
+ src/x86/mc_init_tmpl.c | 106 ++++++++++++++--------------
+ 6 files changed, 75 insertions(+), 75 deletions(-)
diff --git a/src/cdef_tmpl.c b/src/cdef_tmpl.c
-index 41e3fe6..53130e2 100644
+index 91ac45b..7ad3cb0 100644
--- a/src/cdef_tmpl.c
+++ b/src/cdef_tmpl.c
@@ -222,9 +222,9 @@ static void cdef_filter_block_##w##x##h##_c(pixel *const dst, \
@@ -92,10 +93,10 @@ index f8d3e3b..374db4c 100644
#undef w_mask_fns
diff --git a/src/x86/looprestoration_init_tmpl.c b/src/x86/looprestoration_init_tmpl.c
-index f7819a1..5e5d0c0 100644
+index ae64cc8..c92b7cc 100644
--- a/src/x86/looprestoration_init_tmpl.c
+++ b/src/x86/looprestoration_init_tmpl.c
-@@ -31,12 +31,12 @@
+@@ -31,19 +31,19 @@
#include "common/intops.h"
#define decl_wiener_filter_fns(ext) \
@@ -110,22 +111,145 @@ index f7819a1..5e5d0c0 100644
+decl_lr_filter_fn(BF(dav1d_sgr_filter_3x3, ext)) \
decl_lr_filter_fn(BF(dav1d_sgr_filter_mix, ext))
- /* FIXME: Replace with a port of the AVX2 code */
-@@ -176,10 +176,10 @@ static void BF(sgr_filter_mix, ext)(pixel *const dst, const ptrdiff_t dst_stride
- BF(dav1d_sgr_weighted2, ext)(dst, dst_stride, tmp1, tmp2, w, h, wt); \
- }
-
-decl_wiener_filter_fns(sse2);
-decl_wiener_filter_fns(ssse3);
-decl_wiener_filter_fns(avx2);
+-decl_sgr_filter_fns(ssse3);
-decl_sgr_filter_fns(avx2);
+decl_wiener_filter_fns(sse2)
+decl_wiener_filter_fns(ssse3)
+decl_wiener_filter_fns(avx2)
++decl_sgr_filter_fns(ssse3)
+decl_sgr_filter_fns(avx2)
- #if BITDEPTH == 8
- SGR_FILTER_OLD(ssse3)
+ COLD void bitfn(dav1d_loop_restoration_dsp_init_x86)(Dav1dLoopRestorationDSPContext *const c,
+ const int bpc)
+diff --git a/src/x86/mc_init_tmpl.c b/src/x86/mc_init_tmpl.c
+index 3991004..0bd6188 100644
+--- a/src/x86/mc_init_tmpl.c
++++ b/src/x86/mc_init_tmpl.c
+@@ -42,68 +42,68 @@
+ #define init_mct_scaled_fn(type, name, suffix) \
+ c->mct_scaled[type] = BF(dav1d_prep_##name, suffix)
+
+-decl_fn(mc, dav1d_put_8tap_regular);
+-decl_fn(mc, dav1d_put_8tap_regular_smooth);
+-decl_fn(mc, dav1d_put_8tap_regular_sharp);
+-decl_fn(mc, dav1d_put_8tap_smooth);
+-decl_fn(mc, dav1d_put_8tap_smooth_regular);
+-decl_fn(mc, dav1d_put_8tap_smooth_sharp);
+-decl_fn(mc, dav1d_put_8tap_sharp);
+-decl_fn(mc, dav1d_put_8tap_sharp_regular);
+-decl_fn(mc, dav1d_put_8tap_sharp_smooth);
+-decl_fn(mc, dav1d_put_bilin);
++decl_fn(mc, dav1d_put_8tap_regular)
++decl_fn(mc, dav1d_put_8tap_regular_smooth)
++decl_fn(mc, dav1d_put_8tap_regular_sharp)
++decl_fn(mc, dav1d_put_8tap_smooth)
++decl_fn(mc, dav1d_put_8tap_smooth_regular)
++decl_fn(mc, dav1d_put_8tap_smooth_sharp)
++decl_fn(mc, dav1d_put_8tap_sharp)
++decl_fn(mc, dav1d_put_8tap_sharp_regular)
++decl_fn(mc, dav1d_put_8tap_sharp_smooth)
++decl_fn(mc, dav1d_put_bilin)
+
+-decl_fn(mct, dav1d_prep_8tap_regular);
+-decl_fn(mct, dav1d_prep_8tap_regular_smooth);
+-decl_fn(mct, dav1d_prep_8tap_regular_sharp);
+-decl_fn(mct, dav1d_prep_8tap_smooth);
+-decl_fn(mct, dav1d_prep_8tap_smooth_regular);
+-decl_fn(mct, dav1d_prep_8tap_smooth_sharp);
+-decl_fn(mct, dav1d_prep_8tap_sharp);
+-decl_fn(mct, dav1d_prep_8tap_sharp_regular);
+-decl_fn(mct, dav1d_prep_8tap_sharp_smooth);
+-decl_fn(mct, dav1d_prep_bilin);
++decl_fn(mct, dav1d_prep_8tap_regular)
++decl_fn(mct, dav1d_prep_8tap_regular_smooth)
++decl_fn(mct, dav1d_prep_8tap_regular_sharp)
++decl_fn(mct, dav1d_prep_8tap_smooth)
++decl_fn(mct, dav1d_prep_8tap_smooth_regular)
++decl_fn(mct, dav1d_prep_8tap_smooth_sharp)
++decl_fn(mct, dav1d_prep_8tap_sharp)
++decl_fn(mct, dav1d_prep_8tap_sharp_regular)
++decl_fn(mct, dav1d_prep_8tap_sharp_smooth)
++decl_fn(mct, dav1d_prep_bilin)
+
+-decl_fn(mc_scaled, dav1d_put_8tap_scaled_regular);
+-decl_fn(mc_scaled, dav1d_put_8tap_scaled_regular_smooth);
+-decl_fn(mc_scaled, dav1d_put_8tap_scaled_regular_sharp);
+-decl_fn(mc_scaled, dav1d_put_8tap_scaled_smooth);
+-decl_fn(mc_scaled, dav1d_put_8tap_scaled_smooth_regular);
+-decl_fn(mc_scaled, dav1d_put_8tap_scaled_smooth_sharp);
+-decl_fn(mc_scaled, dav1d_put_8tap_scaled_sharp);
+-decl_fn(mc_scaled, dav1d_put_8tap_scaled_sharp_regular);
+-decl_fn(mc_scaled, dav1d_put_8tap_scaled_sharp_smooth);
+-decl_fn(mc_scaled, dav1d_put_bilin_scaled);
++decl_fn(mc_scaled, dav1d_put_8tap_scaled_regular)
++decl_fn(mc_scaled, dav1d_put_8tap_scaled_regular_smooth)
++decl_fn(mc_scaled, dav1d_put_8tap_scaled_regular_sharp)
++decl_fn(mc_scaled, dav1d_put_8tap_scaled_smooth)
++decl_fn(mc_scaled, dav1d_put_8tap_scaled_smooth_regular)
++decl_fn(mc_scaled, dav1d_put_8tap_scaled_smooth_sharp)
++decl_fn(mc_scaled, dav1d_put_8tap_scaled_sharp)
++decl_fn(mc_scaled, dav1d_put_8tap_scaled_sharp_regular)
++decl_fn(mc_scaled, dav1d_put_8tap_scaled_sharp_smooth)
++decl_fn(mc_scaled, dav1d_put_bilin_scaled)
+
+-decl_fn(mct_scaled, dav1d_prep_8tap_scaled_regular);
+-decl_fn(mct_scaled, dav1d_prep_8tap_scaled_regular_smooth);
+-decl_fn(mct_scaled, dav1d_prep_8tap_scaled_regular_sharp);
+-decl_fn(mct_scaled, dav1d_prep_8tap_scaled_smooth);
+-decl_fn(mct_scaled, dav1d_prep_8tap_scaled_smooth_regular);
+-decl_fn(mct_scaled, dav1d_prep_8tap_scaled_smooth_sharp);
+-decl_fn(mct_scaled, dav1d_prep_8tap_scaled_sharp);
+-decl_fn(mct_scaled, dav1d_prep_8tap_scaled_sharp_regular);
+-decl_fn(mct_scaled, dav1d_prep_8tap_scaled_sharp_smooth);
+-decl_fn(mct_scaled, dav1d_prep_bilin_scaled);
++decl_fn(mct_scaled, dav1d_prep_8tap_scaled_regular)
++decl_fn(mct_scaled, dav1d_prep_8tap_scaled_regular_smooth)
++decl_fn(mct_scaled, dav1d_prep_8tap_scaled_regular_sharp)
++decl_fn(mct_scaled, dav1d_prep_8tap_scaled_smooth)
++decl_fn(mct_scaled, dav1d_prep_8tap_scaled_smooth_regular)
++decl_fn(mct_scaled, dav1d_prep_8tap_scaled_smooth_sharp)
++decl_fn(mct_scaled, dav1d_prep_8tap_scaled_sharp)
++decl_fn(mct_scaled, dav1d_prep_8tap_scaled_sharp_regular)
++decl_fn(mct_scaled, dav1d_prep_8tap_scaled_sharp_smooth)
++decl_fn(mct_scaled, dav1d_prep_bilin_scaled)
+
+-decl_fn(avg, dav1d_avg);
+-decl_fn(w_avg, dav1d_w_avg);
+-decl_fn(mask, dav1d_mask);
+-decl_fn(w_mask, dav1d_w_mask_420);
+-decl_fn(w_mask, dav1d_w_mask_422);
+-decl_fn(w_mask, dav1d_w_mask_444);
+-decl_fn(blend, dav1d_blend);
+-decl_fn(blend_dir, dav1d_blend_v);
+-decl_fn(blend_dir, dav1d_blend_h);
++decl_fn(avg, dav1d_avg)
++decl_fn(w_avg, dav1d_w_avg)
++decl_fn(mask, dav1d_mask)
++decl_fn(w_mask, dav1d_w_mask_420)
++decl_fn(w_mask, dav1d_w_mask_422)
++decl_fn(w_mask, dav1d_w_mask_444)
++decl_fn(blend, dav1d_blend)
++decl_fn(blend_dir, dav1d_blend_v)
++decl_fn(blend_dir, dav1d_blend_h)
+
+-decl_fn(warp8x8, dav1d_warp_affine_8x8);
++decl_fn(warp8x8, dav1d_warp_affine_8x8)
+ decl_warp8x8_fn(BF(dav1d_warp_affine_8x8, sse4));
+-decl_fn(warp8x8t, dav1d_warp_affine_8x8t);
++decl_fn(warp8x8t, dav1d_warp_affine_8x8t)
+ decl_warp8x8t_fn(BF(dav1d_warp_affine_8x8t, sse4));
+
+-decl_fn(emu_edge, dav1d_emu_edge);
++decl_fn(emu_edge, dav1d_emu_edge)
+
+-decl_fn(resize, dav1d_resize);
++decl_fn(resize, dav1d_resize)
+
+ COLD void bitfn(dav1d_mc_dsp_init_x86)(Dav1dMCDSPContext *const c) {
+ const unsigned flags = dav1d_get_cpu_flags();
--
2.32.0
diff --git a/pkg/dav1d/ver b/pkg/dav1d/ver
@@ -1 +1 @@
-0.9.0 r0
+0.9.2 r0