forked from marfrit/marfrit-packages
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2732a022f8 | |||
| 57f73f1afb | |||
| d8aa3aae8d | |||
| 1f58ff2b6b | |||
| 45be17fbdf | |||
| 7b9bb9b2d0 | |||
| babb280410 | |||
| 5b48d1c743 | |||
| 624f83e877 | |||
| 902de73a02 | |||
| c14c22f942 |
@@ -0,0 +1,92 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: claude-noether <claude-noether@noreply.localhost>
|
||||||
|
Date: Sun, 25 May 2026 12:00:00 +0200
|
||||||
|
Subject: [PATCH] avcodec/aarch64/h264dsp: route H.264 luma-h deblock through daedalus-fourier
|
||||||
|
|
||||||
|
Sibling of 0005 (which substituted v_loop_filter_luma). Same
|
||||||
|
NEON-to-NEON substitution: H264DSPContext.h_loop_filter_luma →
|
||||||
|
daedalus_recipe_dispatch_h264_deblock_luma_h. The H kernel landed
|
||||||
|
in daedalus-fourier PR #9 (CPU NEON only — no QPU shader yet).
|
||||||
|
|
||||||
|
libavcodec.so ctx is no-QPU per the existing 0003-0005 / 0007
|
||||||
|
pattern; we cannot assume Vulkan in arbitrary host processes
|
||||||
|
(firefox-fourier RDD, mpv-fourier, etc.).
|
||||||
|
|
||||||
|
Intra (bS=4) h_loop_filter_luma_intra stays on the in-tree NEON .S
|
||||||
|
code; daedalus_h264_deblock_meta only covers the non-intra path.
|
||||||
|
An intra-h substitution can land once daedalus-fourier exposes a
|
||||||
|
dispatch helper (the kernel already exists internally per PR #11).
|
||||||
|
|
||||||
|
Refs reauktion/daedalus-v4l2#11 — substitution arc step 2 cycle 8 H.
|
||||||
|
---
|
||||||
|
diff --git a/libavcodec/aarch64/h264_idct_daedalus.c b/libavcodec/aarch64/h264_idct_daedalus.c
|
||||||
|
--- a/libavcodec/aarch64/h264_idct_daedalus.c 2026-05-25 13:09:33.694760715 +0200
|
||||||
|
+++ libavcodec/aarch64/h264_idct_daedalus.c 2026-05-25 13:09:33.715603719 +0200
|
||||||
|
@@ -1,9 +1,10 @@
|
||||||
|
/*
|
||||||
|
- * H.264 4x4 / 8x8 IDCT + luma-v deblock — daedalus-fourier substitution shims.
|
||||||
|
+ * H.264 4x4 / 8x8 IDCT + luma v/h deblock — daedalus-fourier substitution shims.
|
||||||
|
*
|
||||||
|
* Routes H264DSPContext.idct_add → daedalus_recipe_dispatch_h264_idct4
|
||||||
|
* H264DSPContext.idct8_add → daedalus_recipe_dispatch_h264_idct8
|
||||||
|
* H264DSPContext.v_loop_filter_luma → daedalus_recipe_dispatch_h264_deblock_luma_v
|
||||||
|
+ * H264DSPContext.h_loop_filter_luma → daedalus_recipe_dispatch_h264_deblock_luma_h
|
||||||
|
* instead of the in-tree ff_h264_*_neon assembly. The recipe layer
|
||||||
|
* picks the substrate (CPU NEON for cycles 6 + 7 by default; cycle 8
|
||||||
|
* is CPU primary with QPU opportunistic — the ctx below is no-QPU,
|
||||||
|
@@ -45,6 +46,8 @@
|
||||||
|
void ff_h264_idct8_add_daedalus(uint8_t *dst, int16_t *block, int stride);
|
||||||
|
void ff_h264_v_loop_filter_luma_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
int alpha, int beta, int8_t *tc0);
|
||||||
|
+void ff_h264_h_loop_filter_luma_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
+ int alpha, int beta, int8_t *tc0);
|
||||||
|
|
||||||
|
void ff_h264_idct_add_daedalus(uint8_t *dst, int16_t *block, int stride)
|
||||||
|
{
|
||||||
|
@@ -84,3 +87,22 @@
|
||||||
|
daedalus_recipe_dispatch_h264_deblock_luma_v(g_dctx, pix, (size_t)stride,
|
||||||
|
1, &meta);
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+void ff_h264_h_loop_filter_luma_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
+ int alpha, int beta, int8_t *tc0)
|
||||||
|
+{
|
||||||
|
+ daedalus_h264_deblock_meta meta = {
|
||||||
|
+ .dst_off = 0,
|
||||||
|
+ .alpha = alpha,
|
||||||
|
+ .beta = beta,
|
||||||
|
+ };
|
||||||
|
+ meta.tc0[0] = tc0[0];
|
||||||
|
+ meta.tc0[1] = tc0[1];
|
||||||
|
+ meta.tc0[2] = tc0[2];
|
||||||
|
+ meta.tc0[3] = tc0[3];
|
||||||
|
+
|
||||||
|
+ pthread_once(&g_dctx_once, daedalus_ctx_init_once);
|
||||||
|
+
|
||||||
|
+ daedalus_recipe_dispatch_h264_deblock_luma_h(g_dctx, pix, (size_t)stride,
|
||||||
|
+ 1, &meta);
|
||||||
|
+}
|
||||||
|
diff --git a/libavcodec/aarch64/h264dsp_init_aarch64.c b/libavcodec/aarch64/h264dsp_init_aarch64.c
|
||||||
|
--- a/libavcodec/aarch64/h264dsp_init_aarch64.c 2026-05-25 13:09:33.695937103 +0200
|
||||||
|
+++ libavcodec/aarch64/h264dsp_init_aarch64.c 2026-05-25 13:09:33.715541700 +0200
|
||||||
|
@@ -31,6 +31,8 @@
|
||||||
|
int alpha, int beta, int8_t *tc0);
|
||||||
|
void ff_h264_h_loop_filter_luma_neon(uint8_t *pix, ptrdiff_t stride, int alpha,
|
||||||
|
int beta, int8_t *tc0);
|
||||||
|
+void ff_h264_h_loop_filter_luma_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
+ int alpha, int beta, int8_t *tc0);
|
||||||
|
void ff_h264_v_loop_filter_luma_intra_neon(uint8_t *pix, ptrdiff_t stride, int alpha,
|
||||||
|
int beta);
|
||||||
|
void ff_h264_h_loop_filter_luma_intra_neon(uint8_t *pix, ptrdiff_t stride, int alpha,
|
||||||
|
@@ -117,7 +119,7 @@
|
||||||
|
|
||||||
|
if (have_neon(cpu_flags) && bit_depth == 8) {
|
||||||
|
c->v_loop_filter_luma = ff_h264_v_loop_filter_luma_daedalus;
|
||||||
|
- c->h_loop_filter_luma = ff_h264_h_loop_filter_luma_neon;
|
||||||
|
+ c->h_loop_filter_luma = ff_h264_h_loop_filter_luma_daedalus;
|
||||||
|
c->v_loop_filter_luma_intra= ff_h264_v_loop_filter_luma_intra_neon;
|
||||||
|
c->h_loop_filter_luma_intra= ff_h264_h_loop_filter_luma_intra_neon;
|
||||||
|
|
||||||
|
--
|
||||||
|
2.47.3
|
||||||
|
|
||||||
@@ -0,0 +1,127 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: claude-noether <claude-noether@noreply.localhost>
|
||||||
|
Date: Sun, 25 May 2026 12:00:00 +0200
|
||||||
|
Subject: [PATCH] avcodec/aarch64/h264dsp: route H.264 chroma v/h deblock through daedalus-fourier
|
||||||
|
|
||||||
|
Chroma siblings of 0005 (luma_v) and 0008 (luma_h). Same
|
||||||
|
NEON-to-NEON pattern via the daedalus recipe layer:
|
||||||
|
|
||||||
|
H264DSPContext.v_loop_filter_chroma →
|
||||||
|
daedalus_recipe_dispatch_h264_deblock_chroma_v
|
||||||
|
H264DSPContext.h_loop_filter_chroma →
|
||||||
|
daedalus_recipe_dispatch_h264_deblock_chroma_h
|
||||||
|
|
||||||
|
Both kernels landed in daedalus-fourier PR #10. Recipe table
|
||||||
|
routes AUTO to CPU NEON (no chroma QPU shaders yet), so this
|
||||||
|
is plumbing-only and stays bit-exact against the in-tree NEON.
|
||||||
|
|
||||||
|
Intra chroma (bS=4) loop filters remain on in-tree NEON;
|
||||||
|
daedalus_h264_deblock_meta covers the non-intra (bS<4) path.
|
||||||
|
|
||||||
|
Refs reauktion/daedalus-v4l2#11 — substitution arc step 2 cycle 8 chroma.
|
||||||
|
---
|
||||||
|
diff --git a/libavcodec/aarch64/h264_idct_daedalus.c b/libavcodec/aarch64/h264_idct_daedalus.c
|
||||||
|
--- a/libavcodec/aarch64/h264_idct_daedalus.c 2026-05-25 13:15:45.995368233 +0200
|
||||||
|
+++ libavcodec/aarch64/h264_idct_daedalus.c 2026-05-25 13:15:46.015839177 +0200
|
||||||
|
@@ -1,10 +1,12 @@
|
||||||
|
/*
|
||||||
|
- * H.264 4x4 / 8x8 IDCT + luma v/h deblock — daedalus-fourier substitution shims.
|
||||||
|
+ * H.264 4x4 / 8x8 IDCT + luma v/h + chroma v/h deblock — daedalus-fourier substitution shims.
|
||||||
|
*
|
||||||
|
* Routes H264DSPContext.idct_add → daedalus_recipe_dispatch_h264_idct4
|
||||||
|
* H264DSPContext.idct8_add → daedalus_recipe_dispatch_h264_idct8
|
||||||
|
- * H264DSPContext.v_loop_filter_luma → daedalus_recipe_dispatch_h264_deblock_luma_v
|
||||||
|
- * H264DSPContext.h_loop_filter_luma → daedalus_recipe_dispatch_h264_deblock_luma_h
|
||||||
|
+ * H264DSPContext.v_loop_filter_luma → daedalus_recipe_dispatch_h264_deblock_luma_v
|
||||||
|
+ * H264DSPContext.h_loop_filter_luma → daedalus_recipe_dispatch_h264_deblock_luma_h
|
||||||
|
+ * H264DSPContext.v_loop_filter_chroma → daedalus_recipe_dispatch_h264_deblock_chroma_v
|
||||||
|
+ * H264DSPContext.h_loop_filter_chroma → daedalus_recipe_dispatch_h264_deblock_chroma_h
|
||||||
|
* instead of the in-tree ff_h264_*_neon assembly. The recipe layer
|
||||||
|
* picks the substrate (CPU NEON for cycles 6 + 7 by default; cycle 8
|
||||||
|
* is CPU primary with QPU opportunistic — the ctx below is no-QPU,
|
||||||
|
@@ -48,6 +50,10 @@
|
||||||
|
int alpha, int beta, int8_t *tc0);
|
||||||
|
void ff_h264_h_loop_filter_luma_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
int alpha, int beta, int8_t *tc0);
|
||||||
|
+void ff_h264_v_loop_filter_chroma_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
+ int alpha, int beta, int8_t *tc0);
|
||||||
|
+void ff_h264_h_loop_filter_chroma_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
+ int alpha, int beta, int8_t *tc0);
|
||||||
|
|
||||||
|
void ff_h264_idct_add_daedalus(uint8_t *dst, int16_t *block, int stride)
|
||||||
|
{
|
||||||
|
@@ -106,3 +112,41 @@
|
||||||
|
daedalus_recipe_dispatch_h264_deblock_luma_h(g_dctx, pix, (size_t)stride,
|
||||||
|
1, &meta);
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+void ff_h264_v_loop_filter_chroma_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
+ int alpha, int beta, int8_t *tc0)
|
||||||
|
+{
|
||||||
|
+ daedalus_h264_deblock_meta meta = {
|
||||||
|
+ .dst_off = 0,
|
||||||
|
+ .alpha = alpha,
|
||||||
|
+ .beta = beta,
|
||||||
|
+ };
|
||||||
|
+ meta.tc0[0] = tc0[0];
|
||||||
|
+ meta.tc0[1] = tc0[1];
|
||||||
|
+ meta.tc0[2] = tc0[2];
|
||||||
|
+ meta.tc0[3] = tc0[3];
|
||||||
|
+
|
||||||
|
+ pthread_once(&g_dctx_once, daedalus_ctx_init_once);
|
||||||
|
+
|
||||||
|
+ daedalus_recipe_dispatch_h264_deblock_chroma_v(g_dctx, pix, (size_t)stride,
|
||||||
|
+ 1, &meta);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void ff_h264_h_loop_filter_chroma_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
+ int alpha, int beta, int8_t *tc0)
|
||||||
|
+{
|
||||||
|
+ daedalus_h264_deblock_meta meta = {
|
||||||
|
+ .dst_off = 0,
|
||||||
|
+ .alpha = alpha,
|
||||||
|
+ .beta = beta,
|
||||||
|
+ };
|
||||||
|
+ meta.tc0[0] = tc0[0];
|
||||||
|
+ meta.tc0[1] = tc0[1];
|
||||||
|
+ meta.tc0[2] = tc0[2];
|
||||||
|
+ meta.tc0[3] = tc0[3];
|
||||||
|
+
|
||||||
|
+ pthread_once(&g_dctx_once, daedalus_ctx_init_once);
|
||||||
|
+
|
||||||
|
+ daedalus_recipe_dispatch_h264_deblock_chroma_h(g_dctx, pix, (size_t)stride,
|
||||||
|
+ 1, &meta);
|
||||||
|
+}
|
||||||
|
diff --git a/libavcodec/aarch64/h264dsp_init_aarch64.c b/libavcodec/aarch64/h264dsp_init_aarch64.c
|
||||||
|
--- a/libavcodec/aarch64/h264dsp_init_aarch64.c 2026-05-25 13:15:45.996482360 +0200
|
||||||
|
+++ libavcodec/aarch64/h264dsp_init_aarch64.c 2026-05-25 13:15:46.025604910 +0200
|
||||||
|
@@ -39,8 +39,12 @@
|
||||||
|
int beta);
|
||||||
|
void ff_h264_v_loop_filter_chroma_neon(uint8_t *pix, ptrdiff_t stride, int alpha,
|
||||||
|
int beta, int8_t *tc0);
|
||||||
|
+void ff_h264_v_loop_filter_chroma_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
+ int alpha, int beta, int8_t *tc0);
|
||||||
|
void ff_h264_h_loop_filter_chroma_neon(uint8_t *pix, ptrdiff_t stride, int alpha,
|
||||||
|
int beta, int8_t *tc0);
|
||||||
|
+void ff_h264_h_loop_filter_chroma_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
+ int alpha, int beta, int8_t *tc0);
|
||||||
|
void ff_h264_h_loop_filter_chroma422_neon(uint8_t *pix, ptrdiff_t stride, int alpha,
|
||||||
|
int beta, int8_t *tc0);
|
||||||
|
void ff_h264_v_loop_filter_chroma_intra_neon(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
@@ -123,11 +127,11 @@
|
||||||
|
c->v_loop_filter_luma_intra= ff_h264_v_loop_filter_luma_intra_neon;
|
||||||
|
c->h_loop_filter_luma_intra= ff_h264_h_loop_filter_luma_intra_neon;
|
||||||
|
|
||||||
|
- c->v_loop_filter_chroma = ff_h264_v_loop_filter_chroma_neon;
|
||||||
|
+ c->v_loop_filter_chroma = ff_h264_v_loop_filter_chroma_daedalus;
|
||||||
|
c->v_loop_filter_chroma_intra = ff_h264_v_loop_filter_chroma_intra_neon;
|
||||||
|
|
||||||
|
if (chroma_format_idc <= 1) {
|
||||||
|
- c->h_loop_filter_chroma = ff_h264_h_loop_filter_chroma_neon;
|
||||||
|
+ c->h_loop_filter_chroma = ff_h264_h_loop_filter_chroma_daedalus;
|
||||||
|
c->h_loop_filter_chroma_intra = ff_h264_h_loop_filter_chroma_intra_neon;
|
||||||
|
c->h_loop_filter_chroma_mbaff_intra = ff_h264_h_loop_filter_chroma_mbaff_intra_neon;
|
||||||
|
} else {
|
||||||
|
--
|
||||||
|
2.47.3
|
||||||
|
|
||||||
@@ -0,0 +1,126 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: claude-noether <claude-noether@noreply.localhost>
|
||||||
|
Date: Sun, 25 May 2026 12:30:00 +0200
|
||||||
|
Subject: [PATCH] avcodec/aarch64/h264dsp: route H.264 luma intra deblock through daedalus-fourier
|
||||||
|
|
||||||
|
Adds the bS=4 intra-strength variants of the already-substituted
|
||||||
|
luma_v / luma_h deblock (0005, 0008). Intra MBs and certain
|
||||||
|
inter-MB edges (4x4 transform boundaries inside an Intra_NxN
|
||||||
|
neighbour) force boundary strength to 4 per H.264 §8.7.2.1.
|
||||||
|
|
||||||
|
H264DSPContext.v_loop_filter_luma_intra →
|
||||||
|
daedalus_recipe_dispatch_h264_deblock_luma_v_intra
|
||||||
|
H264DSPContext.h_loop_filter_luma_intra →
|
||||||
|
daedalus_recipe_dispatch_h264_deblock_luma_h_intra
|
||||||
|
|
||||||
|
Both kernels landed in daedalus-fourier PR #11. Recipe table
|
||||||
|
routes AUTO to CPU NEON (no intra QPU shaders yet) — plumbing-
|
||||||
|
only NEON-to-NEON via daedalus, bit-exact against the in-tree
|
||||||
|
FFmpeg NEON path.
|
||||||
|
|
||||||
|
Signature differs from bS<4: no tc0 argument. The wrapper
|
||||||
|
passes daedalus_h264_deblock_meta with alpha/beta set; tc0[] is
|
||||||
|
ignored by the intra dispatch (bS=4 hardcodes the strength).
|
||||||
|
|
||||||
|
Chroma intra variants are deferred to a follow-up PR because the
|
||||||
|
chroma path has a 4:2:0 / 4:2:2 split (chroma_format_idc gating)
|
||||||
|
that needs explicit conditional substitution to avoid running
|
||||||
|
the 4:2:0-only daedalus dispatch on 4:2:2 chroma.
|
||||||
|
|
||||||
|
Refs reauktion/daedalus-v4l2#11 — substitution arc step 2 cycle 8 intra.
|
||||||
|
---
|
||||||
|
diff --git a/libavcodec/aarch64/h264_idct_daedalus.c b/libavcodec/aarch64/h264_idct_daedalus.c
|
||||||
|
--- a/libavcodec/aarch64/h264_idct_daedalus.c 2026-05-25 13:18:54.992244965 +0200
|
||||||
|
+++ libavcodec/aarch64/h264_idct_daedalus.c 2026-05-25 13:20:12.338122217 +0200
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
/*
|
||||||
|
- * H.264 4x4 / 8x8 IDCT + luma v/h + chroma v/h deblock — daedalus-fourier substitution shims.
|
||||||
|
+ * H.264 4x4 / 8x8 IDCT + luma v/h (inter + intra) + chroma v/h deblock — daedalus-fourier substitution shims.
|
||||||
|
*
|
||||||
|
* Routes H264DSPContext.idct_add → daedalus_recipe_dispatch_h264_idct4
|
||||||
|
* H264DSPContext.idct8_add → daedalus_recipe_dispatch_h264_idct8
|
||||||
|
@@ -7,6 +7,8 @@
|
||||||
|
* H264DSPContext.h_loop_filter_luma → daedalus_recipe_dispatch_h264_deblock_luma_h
|
||||||
|
* H264DSPContext.v_loop_filter_chroma → daedalus_recipe_dispatch_h264_deblock_chroma_v
|
||||||
|
* H264DSPContext.h_loop_filter_chroma → daedalus_recipe_dispatch_h264_deblock_chroma_h
|
||||||
|
+ * H264DSPContext.v_loop_filter_luma_intra → daedalus_recipe_dispatch_h264_deblock_luma_v_intra
|
||||||
|
+ * H264DSPContext.h_loop_filter_luma_intra → daedalus_recipe_dispatch_h264_deblock_luma_h_intra
|
||||||
|
* instead of the in-tree ff_h264_*_neon assembly. The recipe layer
|
||||||
|
* picks the substrate (CPU NEON for cycles 6 + 7 by default; cycle 8
|
||||||
|
* is CPU primary with QPU opportunistic — the ctx below is no-QPU,
|
||||||
|
@@ -54,6 +56,10 @@
|
||||||
|
int alpha, int beta, int8_t *tc0);
|
||||||
|
void ff_h264_h_loop_filter_chroma_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
int alpha, int beta, int8_t *tc0);
|
||||||
|
+void ff_h264_v_loop_filter_luma_intra_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
+ int alpha, int beta);
|
||||||
|
+void ff_h264_h_loop_filter_luma_intra_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
+ int alpha, int beta);
|
||||||
|
|
||||||
|
void ff_h264_idct_add_daedalus(uint8_t *dst, int16_t *block, int stride)
|
||||||
|
{
|
||||||
|
@@ -150,3 +156,34 @@
|
||||||
|
daedalus_recipe_dispatch_h264_deblock_chroma_h(g_dctx, pix, (size_t)stride,
|
||||||
|
1, &meta);
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+void ff_h264_v_loop_filter_luma_intra_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
+ int alpha, int beta)
|
||||||
|
+{
|
||||||
|
+ daedalus_h264_deblock_meta meta = {
|
||||||
|
+ .dst_off = 0,
|
||||||
|
+ .alpha = alpha,
|
||||||
|
+ .beta = beta,
|
||||||
|
+ };
|
||||||
|
+ /* tc0[] is ignored by the intra-strength dispatch (bS=4 hardcodes the strength). */
|
||||||
|
+
|
||||||
|
+ pthread_once(&g_dctx_once, daedalus_ctx_init_once);
|
||||||
|
+
|
||||||
|
+ daedalus_recipe_dispatch_h264_deblock_luma_v_intra(g_dctx, pix, (size_t)stride,
|
||||||
|
+ 1, &meta);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void ff_h264_h_loop_filter_luma_intra_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
+ int alpha, int beta)
|
||||||
|
+{
|
||||||
|
+ daedalus_h264_deblock_meta meta = {
|
||||||
|
+ .dst_off = 0,
|
||||||
|
+ .alpha = alpha,
|
||||||
|
+ .beta = beta,
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ pthread_once(&g_dctx_once, daedalus_ctx_init_once);
|
||||||
|
+
|
||||||
|
+ daedalus_recipe_dispatch_h264_deblock_luma_h_intra(g_dctx, pix, (size_t)stride,
|
||||||
|
+ 1, &meta);
|
||||||
|
+}
|
||||||
|
diff --git a/libavcodec/aarch64/h264dsp_init_aarch64.c b/libavcodec/aarch64/h264dsp_init_aarch64.c
|
||||||
|
--- a/libavcodec/aarch64/h264dsp_init_aarch64.c 2026-05-25 13:18:54.993349573 +0200
|
||||||
|
+++ libavcodec/aarch64/h264dsp_init_aarch64.c 2026-05-25 13:20:12.338265830 +0200
|
||||||
|
@@ -35,8 +35,12 @@
|
||||||
|
int alpha, int beta, int8_t *tc0);
|
||||||
|
void ff_h264_v_loop_filter_luma_intra_neon(uint8_t *pix, ptrdiff_t stride, int alpha,
|
||||||
|
int beta);
|
||||||
|
+void ff_h264_v_loop_filter_luma_intra_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
+ int alpha, int beta);
|
||||||
|
void ff_h264_h_loop_filter_luma_intra_neon(uint8_t *pix, ptrdiff_t stride, int alpha,
|
||||||
|
int beta);
|
||||||
|
+void ff_h264_h_loop_filter_luma_intra_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
+ int alpha, int beta);
|
||||||
|
void ff_h264_v_loop_filter_chroma_neon(uint8_t *pix, ptrdiff_t stride, int alpha,
|
||||||
|
int beta, int8_t *tc0);
|
||||||
|
void ff_h264_v_loop_filter_chroma_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
@@ -124,8 +128,8 @@
|
||||||
|
if (have_neon(cpu_flags) && bit_depth == 8) {
|
||||||
|
c->v_loop_filter_luma = ff_h264_v_loop_filter_luma_daedalus;
|
||||||
|
c->h_loop_filter_luma = ff_h264_h_loop_filter_luma_daedalus;
|
||||||
|
- c->v_loop_filter_luma_intra= ff_h264_v_loop_filter_luma_intra_neon;
|
||||||
|
- c->h_loop_filter_luma_intra= ff_h264_h_loop_filter_luma_intra_neon;
|
||||||
|
+ c->v_loop_filter_luma_intra= ff_h264_v_loop_filter_luma_intra_daedalus;
|
||||||
|
+ c->h_loop_filter_luma_intra= ff_h264_h_loop_filter_luma_intra_daedalus;
|
||||||
|
|
||||||
|
c->v_loop_filter_chroma = ff_h264_v_loop_filter_chroma_daedalus;
|
||||||
|
c->v_loop_filter_chroma_intra = ff_h264_v_loop_filter_chroma_intra_neon;
|
||||||
|
--
|
||||||
|
2.47.3
|
||||||
|
|
||||||
@@ -0,0 +1,101 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: claude-noether <claude-noether@noreply.localhost>
|
||||||
|
Date: Sun, 25 May 2026 13:00:00 +0200
|
||||||
|
Subject: [PATCH] avcodec/aarch64/h264dsp: route H.264 chroma DC Hadamard through daedalus-fourier
|
||||||
|
|
||||||
|
Substitutes H264DSPContext.chroma_dc_dequant_idct in the
|
||||||
|
4:2:0 / bit_depth=8 init path with a wrapper that composes
|
||||||
|
the daedalus chroma DC Hadamard primitive (fourier PR #25)
|
||||||
|
with qmul scaling FFmpeg does in one fused function.
|
||||||
|
|
||||||
|
Bit-exact against ff_h264_chroma_dc_dequant_idct_8_c.
|
||||||
|
Hadamard correctness gated by fourier PR #23 test suite.
|
||||||
|
|
||||||
|
4:2:2 chroma stays on the in-tree 422 variant (same
|
||||||
|
gating shape as 0009 chroma deblock substitution).
|
||||||
|
|
||||||
|
Requires daedalus-fourier commit b9f9ff2 or later (PR #25
|
||||||
|
exposing the public Hadamard symbol). Pin bumps in PKGBUILD
|
||||||
|
and build-deb.sh come in the same commit.
|
||||||
|
---
|
||||||
|
diff --git a/libavcodec/aarch64/h264_idct_daedalus.c b/libavcodec/aarch64/h264_idct_daedalus.c
|
||||||
|
--- a/libavcodec/aarch64/h264_idct_daedalus.c 2026-05-25 13:38:32.019491484 +0200
|
||||||
|
+++ libavcodec/aarch64/h264_idct_daedalus.c 2026-05-25 13:38:32.033821507 +0200
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
/*
|
||||||
|
- * H.264 4x4 / 8x8 IDCT + luma v/h (inter + intra) + chroma v/h deblock — daedalus-fourier substitution shims.
|
||||||
|
+ * H.264 4x4 / 8x8 IDCT + luma v/h (inter+intra) + chroma v/h deblock + chroma DC Hadamard — daedalus-fourier substitution shims.
|
||||||
|
*
|
||||||
|
* Routes H264DSPContext.idct_add → daedalus_recipe_dispatch_h264_idct4
|
||||||
|
* H264DSPContext.idct8_add → daedalus_recipe_dispatch_h264_idct8
|
||||||
|
@@ -9,6 +9,7 @@
|
||||||
|
* H264DSPContext.h_loop_filter_chroma → daedalus_recipe_dispatch_h264_deblock_chroma_h
|
||||||
|
* H264DSPContext.v_loop_filter_luma_intra → daedalus_recipe_dispatch_h264_deblock_luma_v_intra
|
||||||
|
* H264DSPContext.h_loop_filter_luma_intra → daedalus_recipe_dispatch_h264_deblock_luma_h_intra
|
||||||
|
+ * H264DSPContext.chroma_dc_dequant_idct → daedalus_h264_chroma_dc_hadamard_2x2 + caller-side qmul
|
||||||
|
* instead of the in-tree ff_h264_*_neon assembly. The recipe layer
|
||||||
|
* picks the substrate (CPU NEON for cycles 6 + 7 by default; cycle 8
|
||||||
|
* is CPU primary with QPU opportunistic — the ctx below is no-QPU,
|
||||||
|
@@ -60,6 +61,7 @@
|
||||||
|
int alpha, int beta);
|
||||||
|
void ff_h264_h_loop_filter_luma_intra_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
int alpha, int beta);
|
||||||
|
+void ff_h264_chroma_dc_dequant_idct_daedalus(int16_t *block, int qmul);
|
||||||
|
|
||||||
|
void ff_h264_idct_add_daedalus(uint8_t *dst, int16_t *block, int stride)
|
||||||
|
{
|
||||||
|
@@ -187,3 +189,32 @@
|
||||||
|
daedalus_recipe_dispatch_h264_deblock_luma_h_intra(g_dctx, pix, (size_t)stride,
|
||||||
|
1, &meta);
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+/* Composes daedalus_h264_chroma_dc_hadamard_2x2 with the qmul scaling
|
||||||
|
+ * that FFmpeg's reference does in one fused function (h264idct_template.c
|
||||||
|
+ * ff_h264_chroma_dc_dequant_idct).
|
||||||
|
+ *
|
||||||
|
+ * The 4 DC coefficients are scattered across the per-MB coefficient
|
||||||
|
+ * buffer at offsets [r*stride + c*xStride] (stride=32, xStride=16).
|
||||||
|
+ * Extract into a contiguous int16[4], run the Hadamard, then apply
|
||||||
|
+ * the qmul scale and write back to the original positions.
|
||||||
|
+ *
|
||||||
|
+ * No daedalus ctx needed; the Hadamard is a pure stateless primitive.
|
||||||
|
+ */
|
||||||
|
+void ff_h264_chroma_dc_dequant_idct_daedalus(int16_t *block, int qmul)
|
||||||
|
+{
|
||||||
|
+ enum { stride = 32, xStride = 16 };
|
||||||
|
+ int16_t dc[4];
|
||||||
|
+
|
||||||
|
+ dc[0] = block[stride*0 + xStride*0];
|
||||||
|
+ dc[1] = block[stride*0 + xStride*1];
|
||||||
|
+ dc[2] = block[stride*1 + xStride*0];
|
||||||
|
+ dc[3] = block[stride*1 + xStride*1];
|
||||||
|
+
|
||||||
|
+ daedalus_h264_chroma_dc_hadamard_2x2(dc);
|
||||||
|
+
|
||||||
|
+ block[stride*0 + xStride*0] = (int16_t)((int)dc[0] * qmul >> 7);
|
||||||
|
+ block[stride*0 + xStride*1] = (int16_t)((int)dc[1] * qmul >> 7);
|
||||||
|
+ block[stride*1 + xStride*0] = (int16_t)((int)dc[2] * qmul >> 7);
|
||||||
|
+ block[stride*1 + xStride*1] = (int16_t)((int)dc[3] * qmul >> 7);
|
||||||
|
+}
|
||||||
|
diff --git a/libavcodec/aarch64/h264dsp_init_aarch64.c b/libavcodec/aarch64/h264dsp_init_aarch64.c
|
||||||
|
--- a/libavcodec/aarch64/h264dsp_init_aarch64.c 2026-05-25 13:38:32.020346459 +0200
|
||||||
|
+++ libavcodec/aarch64/h264dsp_init_aarch64.c 2026-05-25 13:38:32.033909804 +0200
|
||||||
|
@@ -41,6 +41,7 @@
|
||||||
|
int beta);
|
||||||
|
void ff_h264_h_loop_filter_luma_intra_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
int alpha, int beta);
|
||||||
|
+void ff_h264_chroma_dc_dequant_idct_daedalus(int16_t *block, int qmul);
|
||||||
|
void ff_h264_v_loop_filter_chroma_neon(uint8_t *pix, ptrdiff_t stride, int alpha,
|
||||||
|
int beta, int8_t *tc0);
|
||||||
|
void ff_h264_v_loop_filter_chroma_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
@@ -135,6 +136,7 @@
|
||||||
|
c->v_loop_filter_chroma_intra = ff_h264_v_loop_filter_chroma_intra_neon;
|
||||||
|
|
||||||
|
if (chroma_format_idc <= 1) {
|
||||||
|
+ c->chroma_dc_dequant_idct = ff_h264_chroma_dc_dequant_idct_daedalus;
|
||||||
|
c->h_loop_filter_chroma = ff_h264_h_loop_filter_chroma_daedalus;
|
||||||
|
c->h_loop_filter_chroma_intra = ff_h264_h_loop_filter_chroma_intra_neon;
|
||||||
|
c->h_loop_filter_chroma_mbaff_intra = ff_h264_h_loop_filter_chroma_mbaff_intra_neon;
|
||||||
|
--
|
||||||
|
2.47.3
|
||||||
|
|
||||||
@@ -0,0 +1,245 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: claude-noether <claude-noether@noreply.localhost>
|
||||||
|
Date: Sun, 25 May 2026 14:00:00 +0200
|
||||||
|
Subject: [PATCH] avcodec/aarch64/h264qpel: route remaining qpel 8x8 positions through daedalus-fourier
|
||||||
|
|
||||||
|
Closes the H.264 qpel substitution. Extends 0007 (which routed only
|
||||||
|
mc20 put_) to ALL 15 useful positions in BOTH the put_ and avg_
|
||||||
|
tables, skipping mc00 (integer copy / pointer-only fast path).
|
||||||
|
|
||||||
|
29 substitutions total: 14 new put_ + 15 avg_. Each is a uniform
|
||||||
|
wrapper around daedalus_recipe_dispatch_h264_qpel_{avg_,}mcXY exposed
|
||||||
|
by daedalus-fourier PRs #15-#20.
|
||||||
|
|
||||||
|
All recipe-table entries route AUTO to CPU NEON (no QPU shaders
|
||||||
|
for any qpel position other than mc20 yet), so this is plumbing-only
|
||||||
|
NEON-to-NEON — bit-exact against the in-tree ff_*_h264_qpel8_*_neon
|
||||||
|
path.
|
||||||
|
|
||||||
|
16x16 qpel tables ([0][...]) stay on the in-tree NEON. daedalus
|
||||||
|
only exposes 8x8 today; 16x16 substitution can land once fourier
|
||||||
|
provides those variants (likely just dispatching the 8x8 path four
|
||||||
|
times with shifted dst/src offsets).
|
||||||
|
|
||||||
|
Refs reauktion/daedalus-v4l2#11 — substitution arc qpel buildout.
|
||||||
|
---
|
||||||
|
diff --git a/libavcodec/aarch64/h264_qpel_daedalus.c b/libavcodec/aarch64/h264_qpel_daedalus.c
|
||||||
|
--- a/libavcodec/aarch64/h264_qpel_daedalus.c 2026-05-25 14:05:05.789298250 +0200
|
||||||
|
+++ libavcodec/aarch64/h264_qpel_daedalus.c 2026-05-25 14:05:05.818358374 +0200
|
||||||
|
@@ -1,10 +1,13 @@
|
||||||
|
/*
|
||||||
|
- * H.264 luma qpel mc20 (8x8, horizontal half-pel, 6-tap "put")
|
||||||
|
- * — daedalus-fourier substitution shim.
|
||||||
|
+ * H.264 luma qpel 8x8 — daedalus-fourier substitution shims (put_ + avg_).
|
||||||
|
*
|
||||||
|
- * Routes H264QpelContext.put_h264_qpel_pixels_tab[1][2] through
|
||||||
|
- * daedalus_recipe_dispatch_h264_qpel_mc20 instead of
|
||||||
|
- * ff_put_h264_qpel8_mc20_neon. The recipe layer picks the substrate
|
||||||
|
+ * Routes ALL 15 useful positions in H264QpelContext's 8x8 put_ and
|
||||||
|
+ * avg_ tables through daedalus_recipe_dispatch_h264_qpel_mc{XY}
|
||||||
|
+ * (skipping mc00 which is integer copy / FFmpeg's pointer-only fast
|
||||||
|
+ * path). Plumbing-only NEON-by-recipe — daedalus-fourier PRs #15-#20
|
||||||
|
+ * exposed each variant via the same dispatch signature, so the
|
||||||
|
+ * substitution is a uniform macro across put_/avg_ and across all
|
||||||
|
+ * 15 mc positions. The recipe layer picks the substrate
|
||||||
|
* (CPU NEON for cycle 9; QPU not viable — per-block 7.6 ns vs
|
||||||
|
* ~250 ns QPU dispatch floor, see docs/k9_h264qpel_mc20.md).
|
||||||
|
*
|
||||||
|
@@ -48,3 +51,53 @@
|
||||||
|
daedalus_recipe_dispatch_h264_qpel_mc20(g_dctx, dst, src, (size_t)stride,
|
||||||
|
1, &meta);
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+/* All other 8x8 qpel positions follow the same dispatch shape as mc20
|
||||||
|
+ * above. The macro collapses ~600 LOC of one-wrapper-per-variant
|
||||||
|
+ * boilerplate (29 variants total: 14 put_ + 15 avg_). */
|
||||||
|
+#define DEFINE_QPEL_WRAPPER(type, suffix, dispatch_fn) \
|
||||||
|
+void ff_ ## type ## _h264_qpel8_ ## suffix ## _daedalus(uint8_t *dst, \
|
||||||
|
+ const uint8_t *src, ptrdiff_t stride); \
|
||||||
|
+void ff_ ## type ## _h264_qpel8_ ## suffix ## _daedalus(uint8_t *dst, \
|
||||||
|
+ const uint8_t *src, ptrdiff_t stride) \
|
||||||
|
+{ \
|
||||||
|
+ static const daedalus_h264_qpel_meta meta = { .dst_off = 0, .src_off = 0 }; \
|
||||||
|
+ pthread_once(&g_dctx_once, daedalus_ctx_init_once); \
|
||||||
|
+ dispatch_fn(g_dctx, dst, src, (size_t)stride, 1, &meta); \
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+/* put_ variants (mc20 stays on the explicit definition above). */
|
||||||
|
+DEFINE_QPEL_WRAPPER(put, mc10, daedalus_recipe_dispatch_h264_qpel_mc10)
|
||||||
|
+DEFINE_QPEL_WRAPPER(put, mc30, daedalus_recipe_dispatch_h264_qpel_mc30)
|
||||||
|
+DEFINE_QPEL_WRAPPER(put, mc01, daedalus_recipe_dispatch_h264_qpel_mc01)
|
||||||
|
+DEFINE_QPEL_WRAPPER(put, mc11, daedalus_recipe_dispatch_h264_qpel_mc11)
|
||||||
|
+DEFINE_QPEL_WRAPPER(put, mc21, daedalus_recipe_dispatch_h264_qpel_mc21)
|
||||||
|
+DEFINE_QPEL_WRAPPER(put, mc31, daedalus_recipe_dispatch_h264_qpel_mc31)
|
||||||
|
+DEFINE_QPEL_WRAPPER(put, mc02, daedalus_recipe_dispatch_h264_qpel_mc02)
|
||||||
|
+DEFINE_QPEL_WRAPPER(put, mc12, daedalus_recipe_dispatch_h264_qpel_mc12)
|
||||||
|
+DEFINE_QPEL_WRAPPER(put, mc22, daedalus_recipe_dispatch_h264_qpel_mc22)
|
||||||
|
+DEFINE_QPEL_WRAPPER(put, mc32, daedalus_recipe_dispatch_h264_qpel_mc32)
|
||||||
|
+DEFINE_QPEL_WRAPPER(put, mc03, daedalus_recipe_dispatch_h264_qpel_mc03)
|
||||||
|
+DEFINE_QPEL_WRAPPER(put, mc13, daedalus_recipe_dispatch_h264_qpel_mc13)
|
||||||
|
+DEFINE_QPEL_WRAPPER(put, mc23, daedalus_recipe_dispatch_h264_qpel_mc23)
|
||||||
|
+DEFINE_QPEL_WRAPPER(put, mc33, daedalus_recipe_dispatch_h264_qpel_mc33)
|
||||||
|
+
|
||||||
|
+/* avg_ variants — all 15 useful positions. */
|
||||||
|
+DEFINE_QPEL_WRAPPER(avg, mc10, daedalus_recipe_dispatch_h264_qpel_avg_mc10)
|
||||||
|
+DEFINE_QPEL_WRAPPER(avg, mc20, daedalus_recipe_dispatch_h264_qpel_avg_mc20)
|
||||||
|
+DEFINE_QPEL_WRAPPER(avg, mc30, daedalus_recipe_dispatch_h264_qpel_avg_mc30)
|
||||||
|
+DEFINE_QPEL_WRAPPER(avg, mc01, daedalus_recipe_dispatch_h264_qpel_avg_mc01)
|
||||||
|
+DEFINE_QPEL_WRAPPER(avg, mc11, daedalus_recipe_dispatch_h264_qpel_avg_mc11)
|
||||||
|
+DEFINE_QPEL_WRAPPER(avg, mc21, daedalus_recipe_dispatch_h264_qpel_avg_mc21)
|
||||||
|
+DEFINE_QPEL_WRAPPER(avg, mc31, daedalus_recipe_dispatch_h264_qpel_avg_mc31)
|
||||||
|
+DEFINE_QPEL_WRAPPER(avg, mc02, daedalus_recipe_dispatch_h264_qpel_avg_mc02)
|
||||||
|
+DEFINE_QPEL_WRAPPER(avg, mc12, daedalus_recipe_dispatch_h264_qpel_avg_mc12)
|
||||||
|
+DEFINE_QPEL_WRAPPER(avg, mc22, daedalus_recipe_dispatch_h264_qpel_avg_mc22)
|
||||||
|
+DEFINE_QPEL_WRAPPER(avg, mc32, daedalus_recipe_dispatch_h264_qpel_avg_mc32)
|
||||||
|
+DEFINE_QPEL_WRAPPER(avg, mc03, daedalus_recipe_dispatch_h264_qpel_avg_mc03)
|
||||||
|
+DEFINE_QPEL_WRAPPER(avg, mc13, daedalus_recipe_dispatch_h264_qpel_avg_mc13)
|
||||||
|
+DEFINE_QPEL_WRAPPER(avg, mc23, daedalus_recipe_dispatch_h264_qpel_avg_mc23)
|
||||||
|
+DEFINE_QPEL_WRAPPER(avg, mc33, daedalus_recipe_dispatch_h264_qpel_avg_mc33)
|
||||||
|
+
|
||||||
|
+#undef DEFINE_QPEL_WRAPPER
|
||||||
|
diff --git a/libavcodec/aarch64/h264qpel_init_aarch64.c b/libavcodec/aarch64/h264qpel_init_aarch64.c
|
||||||
|
--- a/libavcodec/aarch64/h264qpel_init_aarch64.c 2026-05-25 14:05:05.790403989 +0200
|
||||||
|
+++ libavcodec/aarch64/h264qpel_init_aarch64.c 2026-05-25 14:05:05.819136071 +0200
|
||||||
|
@@ -50,6 +50,64 @@
|
||||||
|
void ff_put_h264_qpel8_mc30_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride);
|
||||||
|
void ff_put_h264_qpel8_mc20_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
ptrdiff_t stride);
|
||||||
|
+void ff_put_h264_qpel8_mc10_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_put_h264_qpel8_mc30_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_put_h264_qpel8_mc01_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_put_h264_qpel8_mc11_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_put_h264_qpel8_mc21_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_put_h264_qpel8_mc31_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_put_h264_qpel8_mc02_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_put_h264_qpel8_mc12_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_put_h264_qpel8_mc22_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_put_h264_qpel8_mc32_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_put_h264_qpel8_mc03_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_put_h264_qpel8_mc13_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_put_h264_qpel8_mc23_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_put_h264_qpel8_mc33_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_avg_h264_qpel8_mc10_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_avg_h264_qpel8_mc20_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_avg_h264_qpel8_mc30_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_avg_h264_qpel8_mc01_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_avg_h264_qpel8_mc11_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_avg_h264_qpel8_mc21_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_avg_h264_qpel8_mc31_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_avg_h264_qpel8_mc02_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_avg_h264_qpel8_mc12_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_avg_h264_qpel8_mc22_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_avg_h264_qpel8_mc32_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_avg_h264_qpel8_mc03_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_avg_h264_qpel8_mc13_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_avg_h264_qpel8_mc23_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_avg_h264_qpel8_mc33_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
void ff_put_h264_qpel8_mc01_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride);
|
||||||
|
void ff_put_h264_qpel8_mc11_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride);
|
||||||
|
void ff_put_h264_qpel8_mc21_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride);
|
||||||
|
@@ -164,21 +222,21 @@
|
||||||
|
c->put_h264_qpel_pixels_tab[0][15] = ff_put_h264_qpel16_mc33_neon;
|
||||||
|
|
||||||
|
c->put_h264_qpel_pixels_tab[1][ 0] = ff_put_h264_qpel8_mc00_neon;
|
||||||
|
- c->put_h264_qpel_pixels_tab[1][ 1] = ff_put_h264_qpel8_mc10_neon;
|
||||||
|
+ c->put_h264_qpel_pixels_tab[1][ 1] = ff_put_h264_qpel8_mc10_daedalus;
|
||||||
|
c->put_h264_qpel_pixels_tab[1][ 2] = ff_put_h264_qpel8_mc20_daedalus;
|
||||||
|
- c->put_h264_qpel_pixels_tab[1][ 3] = ff_put_h264_qpel8_mc30_neon;
|
||||||
|
- c->put_h264_qpel_pixels_tab[1][ 4] = ff_put_h264_qpel8_mc01_neon;
|
||||||
|
- c->put_h264_qpel_pixels_tab[1][ 5] = ff_put_h264_qpel8_mc11_neon;
|
||||||
|
- c->put_h264_qpel_pixels_tab[1][ 6] = ff_put_h264_qpel8_mc21_neon;
|
||||||
|
- c->put_h264_qpel_pixels_tab[1][ 7] = ff_put_h264_qpel8_mc31_neon;
|
||||||
|
- c->put_h264_qpel_pixels_tab[1][ 8] = ff_put_h264_qpel8_mc02_neon;
|
||||||
|
- c->put_h264_qpel_pixels_tab[1][ 9] = ff_put_h264_qpel8_mc12_neon;
|
||||||
|
- c->put_h264_qpel_pixels_tab[1][10] = ff_put_h264_qpel8_mc22_neon;
|
||||||
|
- c->put_h264_qpel_pixels_tab[1][11] = ff_put_h264_qpel8_mc32_neon;
|
||||||
|
- c->put_h264_qpel_pixels_tab[1][12] = ff_put_h264_qpel8_mc03_neon;
|
||||||
|
- c->put_h264_qpel_pixels_tab[1][13] = ff_put_h264_qpel8_mc13_neon;
|
||||||
|
- c->put_h264_qpel_pixels_tab[1][14] = ff_put_h264_qpel8_mc23_neon;
|
||||||
|
- c->put_h264_qpel_pixels_tab[1][15] = ff_put_h264_qpel8_mc33_neon;
|
||||||
|
+ c->put_h264_qpel_pixels_tab[1][ 3] = ff_put_h264_qpel8_mc30_daedalus;
|
||||||
|
+ c->put_h264_qpel_pixels_tab[1][ 4] = ff_put_h264_qpel8_mc01_daedalus;
|
||||||
|
+ c->put_h264_qpel_pixels_tab[1][ 5] = ff_put_h264_qpel8_mc11_daedalus;
|
||||||
|
+ c->put_h264_qpel_pixels_tab[1][ 6] = ff_put_h264_qpel8_mc21_daedalus;
|
||||||
|
+ c->put_h264_qpel_pixels_tab[1][ 7] = ff_put_h264_qpel8_mc31_daedalus;
|
||||||
|
+ c->put_h264_qpel_pixels_tab[1][ 8] = ff_put_h264_qpel8_mc02_daedalus;
|
||||||
|
+ c->put_h264_qpel_pixels_tab[1][ 9] = ff_put_h264_qpel8_mc12_daedalus;
|
||||||
|
+ c->put_h264_qpel_pixels_tab[1][10] = ff_put_h264_qpel8_mc22_daedalus;
|
||||||
|
+ c->put_h264_qpel_pixels_tab[1][11] = ff_put_h264_qpel8_mc32_daedalus;
|
||||||
|
+ c->put_h264_qpel_pixels_tab[1][12] = ff_put_h264_qpel8_mc03_daedalus;
|
||||||
|
+ c->put_h264_qpel_pixels_tab[1][13] = ff_put_h264_qpel8_mc13_daedalus;
|
||||||
|
+ c->put_h264_qpel_pixels_tab[1][14] = ff_put_h264_qpel8_mc23_daedalus;
|
||||||
|
+ c->put_h264_qpel_pixels_tab[1][15] = ff_put_h264_qpel8_mc33_daedalus;
|
||||||
|
|
||||||
|
c->avg_h264_qpel_pixels_tab[0][ 0] = ff_avg_h264_qpel16_mc00_neon;
|
||||||
|
c->avg_h264_qpel_pixels_tab[0][ 1] = ff_avg_h264_qpel16_mc10_neon;
|
||||||
|
@@ -198,21 +256,21 @@
|
||||||
|
c->avg_h264_qpel_pixels_tab[0][15] = ff_avg_h264_qpel16_mc33_neon;
|
||||||
|
|
||||||
|
c->avg_h264_qpel_pixels_tab[1][ 0] = ff_avg_h264_qpel8_mc00_neon;
|
||||||
|
- c->avg_h264_qpel_pixels_tab[1][ 1] = ff_avg_h264_qpel8_mc10_neon;
|
||||||
|
- c->avg_h264_qpel_pixels_tab[1][ 2] = ff_avg_h264_qpel8_mc20_neon;
|
||||||
|
- c->avg_h264_qpel_pixels_tab[1][ 3] = ff_avg_h264_qpel8_mc30_neon;
|
||||||
|
- c->avg_h264_qpel_pixels_tab[1][ 4] = ff_avg_h264_qpel8_mc01_neon;
|
||||||
|
- c->avg_h264_qpel_pixels_tab[1][ 5] = ff_avg_h264_qpel8_mc11_neon;
|
||||||
|
- c->avg_h264_qpel_pixels_tab[1][ 6] = ff_avg_h264_qpel8_mc21_neon;
|
||||||
|
- c->avg_h264_qpel_pixels_tab[1][ 7] = ff_avg_h264_qpel8_mc31_neon;
|
||||||
|
- c->avg_h264_qpel_pixels_tab[1][ 8] = ff_avg_h264_qpel8_mc02_neon;
|
||||||
|
- c->avg_h264_qpel_pixels_tab[1][ 9] = ff_avg_h264_qpel8_mc12_neon;
|
||||||
|
- c->avg_h264_qpel_pixels_tab[1][10] = ff_avg_h264_qpel8_mc22_neon;
|
||||||
|
- c->avg_h264_qpel_pixels_tab[1][11] = ff_avg_h264_qpel8_mc32_neon;
|
||||||
|
- c->avg_h264_qpel_pixels_tab[1][12] = ff_avg_h264_qpel8_mc03_neon;
|
||||||
|
- c->avg_h264_qpel_pixels_tab[1][13] = ff_avg_h264_qpel8_mc13_neon;
|
||||||
|
- c->avg_h264_qpel_pixels_tab[1][14] = ff_avg_h264_qpel8_mc23_neon;
|
||||||
|
- c->avg_h264_qpel_pixels_tab[1][15] = ff_avg_h264_qpel8_mc33_neon;
|
||||||
|
+ c->avg_h264_qpel_pixels_tab[1][ 1] = ff_avg_h264_qpel8_mc10_daedalus;
|
||||||
|
+ c->avg_h264_qpel_pixels_tab[1][ 2] = ff_avg_h264_qpel8_mc20_daedalus;
|
||||||
|
+ c->avg_h264_qpel_pixels_tab[1][ 3] = ff_avg_h264_qpel8_mc30_daedalus;
|
||||||
|
+ c->avg_h264_qpel_pixels_tab[1][ 4] = ff_avg_h264_qpel8_mc01_daedalus;
|
||||||
|
+ c->avg_h264_qpel_pixels_tab[1][ 5] = ff_avg_h264_qpel8_mc11_daedalus;
|
||||||
|
+ c->avg_h264_qpel_pixels_tab[1][ 6] = ff_avg_h264_qpel8_mc21_daedalus;
|
||||||
|
+ c->avg_h264_qpel_pixels_tab[1][ 7] = ff_avg_h264_qpel8_mc31_daedalus;
|
||||||
|
+ c->avg_h264_qpel_pixels_tab[1][ 8] = ff_avg_h264_qpel8_mc02_daedalus;
|
||||||
|
+ c->avg_h264_qpel_pixels_tab[1][ 9] = ff_avg_h264_qpel8_mc12_daedalus;
|
||||||
|
+ c->avg_h264_qpel_pixels_tab[1][10] = ff_avg_h264_qpel8_mc22_daedalus;
|
||||||
|
+ c->avg_h264_qpel_pixels_tab[1][11] = ff_avg_h264_qpel8_mc32_daedalus;
|
||||||
|
+ c->avg_h264_qpel_pixels_tab[1][12] = ff_avg_h264_qpel8_mc03_daedalus;
|
||||||
|
+ c->avg_h264_qpel_pixels_tab[1][13] = ff_avg_h264_qpel8_mc13_daedalus;
|
||||||
|
+ c->avg_h264_qpel_pixels_tab[1][14] = ff_avg_h264_qpel8_mc23_daedalus;
|
||||||
|
+ c->avg_h264_qpel_pixels_tab[1][15] = ff_avg_h264_qpel8_mc33_daedalus;
|
||||||
|
} else if (have_neon(cpu_flags) && bit_depth == 10) {
|
||||||
|
c->put_h264_qpel_pixels_tab[0][ 1] = ff_put_h264_qpel16_mc10_neon_10;
|
||||||
|
c->put_h264_qpel_pixels_tab[0][ 2] = ff_put_h264_qpel16_mc20_neon_10;
|
||||||
|
--
|
||||||
|
2.47.3
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@ epoch=2
|
|||||||
# daedalus-fourier pin. 209a421 = PR #2 merge (Phase 8c — public API
|
# daedalus-fourier pin. 209a421 = PR #2 merge (Phase 8c — public API
|
||||||
# gains daedalus_recipe_dispatch_h264_qpel_mc20 + DAEDALUS_KERNEL_H264_QPEL_MC20).
|
# gains daedalus_recipe_dispatch_h264_qpel_mc20 + DAEDALUS_KERNEL_H264_QPEL_MC20).
|
||||||
# Cycle 9 closes the libavcodec.so substitution arc started at cycle 6.
|
# Cycle 9 closes the libavcodec.so substitution arc started at cycle 6.
|
||||||
_daedalus_fourier_commit='209a4218bcb98b91c04f07ad61513bb04adb13ad'
|
_daedalus_fourier_commit='b9f9ff2a89c068aea54dcb52b543afddad28311e' # PR #25 — public chroma DC Hadamard symbol
|
||||||
pkgdesc='FFmpeg with V4L2 Request API hwaccel (Rockchip / Allwinner stateless decode)'
|
pkgdesc='FFmpeg with V4L2 Request API hwaccel (Rockchip / Allwinner stateless decode)'
|
||||||
arch=('aarch64')
|
arch=('aarch64')
|
||||||
url='https://github.com/Kwiboo/FFmpeg'
|
url='https://github.com/Kwiboo/FFmpeg'
|
||||||
@@ -94,8 +94,13 @@ source=("git+https://github.com/Kwiboo/FFmpeg.git#commit=${_commit}"
|
|||||||
'0004-h264-idct8-daedalus-fourier.patch'
|
'0004-h264-idct8-daedalus-fourier.patch'
|
||||||
'0005-h264-deblock-luma-v-daedalus-fourier.patch'
|
'0005-h264-deblock-luma-v-daedalus-fourier.patch'
|
||||||
'0006-h264-restore-low-delay.patch'
|
'0006-h264-restore-low-delay.patch'
|
||||||
'0007-h264-qpel-mc20-daedalus-fourier.patch')
|
'0007-h264-qpel-mc20-daedalus-fourier.patch'
|
||||||
sha256sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP')
|
'0008-h264-deblock-luma-h-daedalus-fourier.patch'
|
||||||
|
'0009-h264-deblock-chroma-daedalus-fourier.patch'
|
||||||
|
'0010-h264-deblock-luma-intra-daedalus-fourier.patch'
|
||||||
|
'0011-h264-chroma-dc-hadamard-daedalus-fourier.patch'
|
||||||
|
'0012-h264-qpel-rest-daedalus-fourier.patch')
|
||||||
|
sha256sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP')
|
||||||
|
|
||||||
pkgver() {
|
pkgver() {
|
||||||
cd "${_srcname}"
|
cd "${_srcname}"
|
||||||
@@ -113,6 +118,11 @@ prepare() {
|
|||||||
patch -Np1 -i "${srcdir}/0005-h264-deblock-luma-v-daedalus-fourier.patch"
|
patch -Np1 -i "${srcdir}/0005-h264-deblock-luma-v-daedalus-fourier.patch"
|
||||||
patch -Np1 -i "${srcdir}/0006-h264-restore-low-delay.patch"
|
patch -Np1 -i "${srcdir}/0006-h264-restore-low-delay.patch"
|
||||||
patch -Np1 -i "${srcdir}/0007-h264-qpel-mc20-daedalus-fourier.patch"
|
patch -Np1 -i "${srcdir}/0007-h264-qpel-mc20-daedalus-fourier.patch"
|
||||||
|
patch -Np1 -i "${srcdir}/0008-h264-deblock-luma-h-daedalus-fourier.patch"
|
||||||
|
patch -Np1 -i "${srcdir}/0009-h264-deblock-chroma-daedalus-fourier.patch"
|
||||||
|
patch -Np1 -i "${srcdir}/0010-h264-deblock-luma-intra-daedalus-fourier.patch"
|
||||||
|
patch -Np1 -i "${srcdir}/0011-h264-chroma-dc-hadamard-daedalus-fourier.patch"
|
||||||
|
patch -Np1 -i "${srcdir}/0012-h264-qpel-rest-daedalus-fourier.patch"
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
|
|||||||
@@ -0,0 +1,103 @@
|
|||||||
|
From: marfrit-packages noether <claude-noether@reauktion.de>
|
||||||
|
Subject: [PATCH] panvk-bifrost: fix XFB store channel-extract for packed varyings
|
||||||
|
|
||||||
|
iter19 — fixes a reliable SIGSEGV during vkCreateGraphicsPipeline on any
|
||||||
|
shader that uses XFB-bound varyings declared with non-zero `layout
|
||||||
|
(component=N)` qualifiers. Surfaced by
|
||||||
|
dEQP-VK.transform_feedback.simple.holes_vert; backtrace lands 11 frames
|
||||||
|
into libvulkan_panfrost.so called from `vkt::TransformFeedback::
|
||||||
|
TransformFeedbackHolesInstance::iterate`.
|
||||||
|
|
||||||
|
Root cause: `lower_xfb_output_iter17` (and upstream `lower_xfb_output`,
|
||||||
|
which carries a `// TODO` on the same assertion) computes the source-
|
||||||
|
channel mask as `mask << channel_idx`, where `channel_idx` is the
|
||||||
|
varying-location component (0..3) but `src` only contains channels for
|
||||||
|
the source-side range starting at `nir_intrinsic_component(intr)`. For
|
||||||
|
`flat out float vegeta` declared with `component=2`, NIR emits
|
||||||
|
`store_output src=<vec1>, component=2`, and the lowering computes
|
||||||
|
`mask << 2` against a single-component src — out-of-range; the
|
||||||
|
resulting malformed nir_def then segfaults inside downstream NIR
|
||||||
|
constant-folding (`nir_constant_expressions.c::evaluate_*`).
|
||||||
|
|
||||||
|
The assertion `assert(nir_intrinsic_component(intr) == 0)` was inherited
|
||||||
|
from upstream `pan_nir_lower_xfb.c` as a documented `// TODO`; release
|
||||||
|
builds (-DNDEBUG) elide it. The fix translates `channel_idx` to the
|
||||||
|
source-channel space by subtracting `nir_intrinsic_component(intr)`
|
||||||
|
before shifting the mask, and replaces the elided asserts with explicit
|
||||||
|
release-mode guards (the patch closes the same release-mode-elision
|
||||||
|
class as the original bug).
|
||||||
|
|
||||||
|
Verified on PineTab2 (Mali-G52 r1 MC1, PAN_ARCH 7) against vulkan-cts
|
||||||
|
1.3.10.0:
|
||||||
|
- holes_vert / holes_extra_draw_vert no longer SIGSEGV (now Fail on
|
||||||
|
color-check; that is a separate iter20 finding — the rasterized
|
||||||
|
varying gets removed alongside the XFB-bound one).
|
||||||
|
- basic_*: 36/36 Pass. depth_clip_*: 1 Pass + 4 NotSupported.
|
||||||
|
lines_or_triangles*: 16 NotSupported. 0 Fail across the full set.
|
||||||
|
- holes_geom / holes_extra_draw_geom remain NotSupported
|
||||||
|
(geometryShader not on G52) — unchanged.
|
||||||
|
|
||||||
|
Caveat: max_output_components_64/_128/_256 were never reached on the
|
||||||
|
r5 sweep (watchdog killed transform_feedback after the holes_vert
|
||||||
|
crash). With this fix in place, those tests now run and surface
|
||||||
|
*their own pre-existing* coredumps — confirmed on shipped r6 baseline
|
||||||
|
too. They are NOT regressions from this patch; they are latent crashes
|
||||||
|
unmasked by it. iter20+ territory.
|
||||||
|
|
||||||
|
Phase 5 (2nd-model) review: APPROVE WITH CHANGES (non-blocking).
|
||||||
|
Changes applied: release-mode defensive guards on both preconditions
|
||||||
|
plus a dispatcher-side comment clarifying the i*2+j semantics.
|
||||||
|
|
||||||
|
Cross-refs:
|
||||||
|
- iter19/phase{0,1,2,3}_holes_vert*.md in panvk-bifrost repo
|
||||||
|
|
||||||
|
---
|
||||||
|
src/panfrost/vulkan/panvk_vX_xfb_lower.c | 24 +++++++++++++++++++++---
|
||||||
|
1 file changed, 21 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/panfrost/vulkan/panvk_vX_xfb_lower.c b/src/panfrost/vulkan/panvk_vX_xfb_lower.c
|
||||||
|
@@ -339,7 +339,20 @@
|
||||||
|
unsigned buffer, unsigned offset_words)
|
||||||
|
{
|
||||||
|
assert(buffer < MAX_XFB_BUFFERS);
|
||||||
|
- assert(nir_intrinsic_component(intr) == 0);
|
||||||
|
+
|
||||||
|
+ /* iter19: nir_intrinsic_component(intr) is the source-channel base —
|
||||||
|
+ * for a packed varying like `layout (location=0, component=2) flat out
|
||||||
|
+ * float vegeta`, NIR emits store_output with component=2 and a single-
|
||||||
|
+ * component src. The XFB iteration index `channel_idx` (0..3) is the
|
||||||
|
+ * varying-location component, not the source channel. Translate by
|
||||||
|
+ * subtracting the base before shifting the mask. Fixes the long-
|
||||||
|
+ * standing `assert(nir_intrinsic_component(intr) == 0) // TODO` in
|
||||||
|
+ * upstream pan_nir_lower_xfb that surfaces on holes_vert. */
|
||||||
|
+ const unsigned base_comp = nir_intrinsic_component(intr);
|
||||||
|
+ /* Defensive against release-build elision: this is precisely the
|
||||||
|
+ * bug class the patch is fixing, so don't re-introduce it. */
|
||||||
|
+ if (channel_idx < base_comp)
|
||||||
|
+ return;
|
||||||
|
|
||||||
|
uint16_t stride = b->shader->info.xfb_stride[buffer] * 4;
|
||||||
|
assert(stride != 0);
|
||||||
|
@@ -357,7 +370,11 @@
|
||||||
|
|
||||||
|
nir_def *src = intr->src[0].ssa;
|
||||||
|
nir_component_mask_t mask = nir_component_mask(num_components);
|
||||||
|
- nir_def *value = nir_channels(b, src, mask << channel_idx);
|
||||||
|
+ const unsigned src_channel = channel_idx - base_comp;
|
||||||
|
+ /* Same defensive class as the channel_idx >= base_comp guard above. */
|
||||||
|
+ if (src_channel + num_components > src->num_components)
|
||||||
|
+ return;
|
||||||
|
+ nir_def *value = nir_channels(b, src, mask << src_channel);
|
||||||
|
|
||||||
|
/* Topology dispatch ladder. LIST first (fast path). */
|
||||||
|
nir_push_if(b, nir_ieq_imm(b, topology, PANVK_XFB_TOPO_LIST));
|
||||||
|
@@ -465,6 +482,9 @@
|
||||||
|
for (unsigned j = 0; j < 2; ++j) {
|
||||||
|
if (!xfb.out[j].num_components)
|
||||||
|
continue;
|
||||||
|
+ /* `i*2+j` is the varying-location component (0..3) — io_xfb covers
|
||||||
|
+ * slots 0..1, io_xfb2 covers 2..3. The leaf translates this into
|
||||||
|
+ * a source-channel index by subtracting nir_intrinsic_component(intr). */
|
||||||
|
lower_xfb_output_iter17(b, intr, i * 2 + j, xfb.out[j].num_components,
|
||||||
|
xfb.out[j].buffer, xfb.out[j].offset);
|
||||||
|
progress = true;
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
pkgname=mesa-panvk-bifrost
|
pkgname=mesa-panvk-bifrost
|
||||||
_mesaver=26.0.6
|
_mesaver=26.0.6
|
||||||
pkgver=26.0.6.r6
|
pkgver=26.0.6.r7
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Patched Mesa libvulkan_panfrost.so exposing Bifrost-gen Mali to Vulkan apps (panvk-bifrost campaign)"
|
pkgdesc="Patched Mesa libvulkan_panfrost.so exposing Bifrost-gen Mali to Vulkan apps (panvk-bifrost campaign)"
|
||||||
arch=('aarch64')
|
arch=('aarch64')
|
||||||
@@ -83,6 +83,7 @@ source=(
|
|||||||
"0004-panvk-bifrost-xfb-primitive-decomposition.patch"
|
"0004-panvk-bifrost-xfb-primitive-decomposition.patch"
|
||||||
"0005-panvk-bifrost-fragment-stores-atomics.patch"
|
"0005-panvk-bifrost-fragment-stores-atomics.patch"
|
||||||
"0006-panvk-bifrost-legacy-dithering.patch"
|
"0006-panvk-bifrost-legacy-dithering.patch"
|
||||||
|
"0007-panvk-bifrost-xfb-component-base-fix.patch"
|
||||||
"brave-vulkan"
|
"brave-vulkan"
|
||||||
"icd.json"
|
"icd.json"
|
||||||
)
|
)
|
||||||
@@ -96,6 +97,7 @@ sha256sums=(
|
|||||||
'SKIP'
|
'SKIP'
|
||||||
'SKIP'
|
'SKIP'
|
||||||
'SKIP'
|
'SKIP'
|
||||||
|
'SKIP'
|
||||||
)
|
)
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
@@ -152,6 +154,16 @@ prepare() {
|
|||||||
# extension as Mali-G52-architecture supported.
|
# extension as Mali-G52-architecture supported.
|
||||||
patch -p1 < "${srcdir}/0006-panvk-bifrost-legacy-dithering.patch"
|
patch -p1 < "${srcdir}/0006-panvk-bifrost-legacy-dithering.patch"
|
||||||
|
|
||||||
|
# r7 (2026-05-25): XFB store channel-extract fix for packed varyings.
|
||||||
|
# Eliminates a reliable SIGSEGV in vkCreateGraphicsPipeline whenever
|
||||||
|
# an XFB-bound vertex output is declared with non-zero
|
||||||
|
# `layout (component=N)`. Surfaced by dEQP-VK.transform_feedback.
|
||||||
|
# simple.holes_vert (now Fails on color-check rather than crashing;
|
||||||
|
# the color-check residual is a separate iter20 finding).
|
||||||
|
# Phase-doc context: ~/src/panvk-bifrost/iter19/phase{0,1,2,3}_*.md.
|
||||||
|
# Phase 5 reviewed; release-mode-elision defensive guards applied.
|
||||||
|
patch -p1 < "${srcdir}/0007-panvk-bifrost-xfb-component-base-fix.patch"
|
||||||
|
|
||||||
# Sanity-check the patches landed.
|
# Sanity-check the patches landed.
|
||||||
grep -q "KHR_robustness2 = true," src/panfrost/vulkan/panvk_vX_physical_device.c
|
grep -q "KHR_robustness2 = true," src/panfrost/vulkan/panvk_vX_physical_device.c
|
||||||
grep -q "EXT_robustness2 = true," src/panfrost/vulkan/panvk_vX_physical_device.c
|
grep -q "EXT_robustness2 = true," src/panfrost/vulkan/panvk_vX_physical_device.c
|
||||||
@@ -171,6 +183,9 @@ prepare() {
|
|||||||
grep -q "xfb_topology" src/panfrost/vulkan/panvk_shader.h
|
grep -q "xfb_topology" src/panfrost/vulkan/panvk_shader.h
|
||||||
grep -q "panvk_xfb_topology" src/panfrost/vulkan/panvk_shader.h
|
grep -q "panvk_xfb_topology" src/panfrost/vulkan/panvk_shader.h
|
||||||
test -f src/panfrost/vulkan/panvk_vX_xfb_lower.c
|
test -f src/panfrost/vulkan/panvk_vX_xfb_lower.c
|
||||||
|
# r7 sanity: XFB channel-base correction landed
|
||||||
|
grep -q "iter19: nir_intrinsic_component(intr) is the source-channel base" src/panfrost/vulkan/panvk_vX_xfb_lower.c
|
||||||
|
grep -q "mask << src_channel" src/panfrost/vulkan/panvk_vX_xfb_lower.c
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
|
|||||||
+92
@@ -0,0 +1,92 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: claude-noether <claude-noether@noreply.localhost>
|
||||||
|
Date: Sun, 25 May 2026 12:00:00 +0200
|
||||||
|
Subject: [PATCH] avcodec/aarch64/h264dsp: route H.264 luma-h deblock through daedalus-fourier
|
||||||
|
|
||||||
|
Sibling of 0005 (which substituted v_loop_filter_luma). Same
|
||||||
|
NEON-to-NEON substitution: H264DSPContext.h_loop_filter_luma →
|
||||||
|
daedalus_recipe_dispatch_h264_deblock_luma_h. The H kernel landed
|
||||||
|
in daedalus-fourier PR #9 (CPU NEON only — no QPU shader yet).
|
||||||
|
|
||||||
|
libavcodec.so ctx is no-QPU per the existing 0003-0005 / 0007
|
||||||
|
pattern; we cannot assume Vulkan in arbitrary host processes
|
||||||
|
(firefox-fourier RDD, mpv-fourier, etc.).
|
||||||
|
|
||||||
|
Intra (bS=4) h_loop_filter_luma_intra stays on the in-tree NEON .S
|
||||||
|
code; daedalus_h264_deblock_meta only covers the non-intra path.
|
||||||
|
An intra-h substitution can land once daedalus-fourier exposes a
|
||||||
|
dispatch helper (the kernel already exists internally per PR #11).
|
||||||
|
|
||||||
|
Refs reauktion/daedalus-v4l2#11 — substitution arc step 2 cycle 8 H.
|
||||||
|
---
|
||||||
|
diff --git a/libavcodec/aarch64/h264_idct_daedalus.c b/libavcodec/aarch64/h264_idct_daedalus.c
|
||||||
|
--- a/libavcodec/aarch64/h264_idct_daedalus.c 2026-05-25 13:09:33.694760715 +0200
|
||||||
|
+++ libavcodec/aarch64/h264_idct_daedalus.c 2026-05-25 13:09:33.715603719 +0200
|
||||||
|
@@ -1,9 +1,10 @@
|
||||||
|
/*
|
||||||
|
- * H.264 4x4 / 8x8 IDCT + luma-v deblock — daedalus-fourier substitution shims.
|
||||||
|
+ * H.264 4x4 / 8x8 IDCT + luma v/h deblock — daedalus-fourier substitution shims.
|
||||||
|
*
|
||||||
|
* Routes H264DSPContext.idct_add → daedalus_recipe_dispatch_h264_idct4
|
||||||
|
* H264DSPContext.idct8_add → daedalus_recipe_dispatch_h264_idct8
|
||||||
|
* H264DSPContext.v_loop_filter_luma → daedalus_recipe_dispatch_h264_deblock_luma_v
|
||||||
|
+ * H264DSPContext.h_loop_filter_luma → daedalus_recipe_dispatch_h264_deblock_luma_h
|
||||||
|
* instead of the in-tree ff_h264_*_neon assembly. The recipe layer
|
||||||
|
* picks the substrate (CPU NEON for cycles 6 + 7 by default; cycle 8
|
||||||
|
* is CPU primary with QPU opportunistic — the ctx below is no-QPU,
|
||||||
|
@@ -45,6 +46,8 @@
|
||||||
|
void ff_h264_idct8_add_daedalus(uint8_t *dst, int16_t *block, int stride);
|
||||||
|
void ff_h264_v_loop_filter_luma_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
int alpha, int beta, int8_t *tc0);
|
||||||
|
+void ff_h264_h_loop_filter_luma_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
+ int alpha, int beta, int8_t *tc0);
|
||||||
|
|
||||||
|
void ff_h264_idct_add_daedalus(uint8_t *dst, int16_t *block, int stride)
|
||||||
|
{
|
||||||
|
@@ -84,3 +87,22 @@
|
||||||
|
daedalus_recipe_dispatch_h264_deblock_luma_v(g_dctx, pix, (size_t)stride,
|
||||||
|
1, &meta);
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+void ff_h264_h_loop_filter_luma_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
+ int alpha, int beta, int8_t *tc0)
|
||||||
|
+{
|
||||||
|
+ daedalus_h264_deblock_meta meta = {
|
||||||
|
+ .dst_off = 0,
|
||||||
|
+ .alpha = alpha,
|
||||||
|
+ .beta = beta,
|
||||||
|
+ };
|
||||||
|
+ meta.tc0[0] = tc0[0];
|
||||||
|
+ meta.tc0[1] = tc0[1];
|
||||||
|
+ meta.tc0[2] = tc0[2];
|
||||||
|
+ meta.tc0[3] = tc0[3];
|
||||||
|
+
|
||||||
|
+ pthread_once(&g_dctx_once, daedalus_ctx_init_once);
|
||||||
|
+
|
||||||
|
+ daedalus_recipe_dispatch_h264_deblock_luma_h(g_dctx, pix, (size_t)stride,
|
||||||
|
+ 1, &meta);
|
||||||
|
+}
|
||||||
|
diff --git a/libavcodec/aarch64/h264dsp_init_aarch64.c b/libavcodec/aarch64/h264dsp_init_aarch64.c
|
||||||
|
--- a/libavcodec/aarch64/h264dsp_init_aarch64.c 2026-05-25 13:09:33.695937103 +0200
|
||||||
|
+++ libavcodec/aarch64/h264dsp_init_aarch64.c 2026-05-25 13:09:33.715541700 +0200
|
||||||
|
@@ -31,6 +31,8 @@
|
||||||
|
int alpha, int beta, int8_t *tc0);
|
||||||
|
void ff_h264_h_loop_filter_luma_neon(uint8_t *pix, ptrdiff_t stride, int alpha,
|
||||||
|
int beta, int8_t *tc0);
|
||||||
|
+void ff_h264_h_loop_filter_luma_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
+ int alpha, int beta, int8_t *tc0);
|
||||||
|
void ff_h264_v_loop_filter_luma_intra_neon(uint8_t *pix, ptrdiff_t stride, int alpha,
|
||||||
|
int beta);
|
||||||
|
void ff_h264_h_loop_filter_luma_intra_neon(uint8_t *pix, ptrdiff_t stride, int alpha,
|
||||||
|
@@ -117,7 +119,7 @@
|
||||||
|
|
||||||
|
if (have_neon(cpu_flags) && bit_depth == 8) {
|
||||||
|
c->v_loop_filter_luma = ff_h264_v_loop_filter_luma_daedalus;
|
||||||
|
- c->h_loop_filter_luma = ff_h264_h_loop_filter_luma_neon;
|
||||||
|
+ c->h_loop_filter_luma = ff_h264_h_loop_filter_luma_daedalus;
|
||||||
|
c->v_loop_filter_luma_intra= ff_h264_v_loop_filter_luma_intra_neon;
|
||||||
|
c->h_loop_filter_luma_intra= ff_h264_h_loop_filter_luma_intra_neon;
|
||||||
|
|
||||||
|
--
|
||||||
|
2.47.3
|
||||||
|
|
||||||
+127
@@ -0,0 +1,127 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: claude-noether <claude-noether@noreply.localhost>
|
||||||
|
Date: Sun, 25 May 2026 12:00:00 +0200
|
||||||
|
Subject: [PATCH] avcodec/aarch64/h264dsp: route H.264 chroma v/h deblock through daedalus-fourier
|
||||||
|
|
||||||
|
Chroma siblings of 0005 (luma_v) and 0008 (luma_h). Same
|
||||||
|
NEON-to-NEON pattern via the daedalus recipe layer:
|
||||||
|
|
||||||
|
H264DSPContext.v_loop_filter_chroma →
|
||||||
|
daedalus_recipe_dispatch_h264_deblock_chroma_v
|
||||||
|
H264DSPContext.h_loop_filter_chroma →
|
||||||
|
daedalus_recipe_dispatch_h264_deblock_chroma_h
|
||||||
|
|
||||||
|
Both kernels landed in daedalus-fourier PR #10. Recipe table
|
||||||
|
routes AUTO to CPU NEON (no chroma QPU shaders yet), so this
|
||||||
|
is plumbing-only and stays bit-exact against the in-tree NEON.
|
||||||
|
|
||||||
|
Intra chroma (bS=4) loop filters remain on in-tree NEON;
|
||||||
|
daedalus_h264_deblock_meta covers the non-intra (bS<4) path.
|
||||||
|
|
||||||
|
Refs reauktion/daedalus-v4l2#11 — substitution arc step 2 cycle 8 chroma.
|
||||||
|
---
|
||||||
|
diff --git a/libavcodec/aarch64/h264_idct_daedalus.c b/libavcodec/aarch64/h264_idct_daedalus.c
|
||||||
|
--- a/libavcodec/aarch64/h264_idct_daedalus.c 2026-05-25 13:15:45.995368233 +0200
|
||||||
|
+++ libavcodec/aarch64/h264_idct_daedalus.c 2026-05-25 13:15:46.015839177 +0200
|
||||||
|
@@ -1,10 +1,12 @@
|
||||||
|
/*
|
||||||
|
- * H.264 4x4 / 8x8 IDCT + luma v/h deblock — daedalus-fourier substitution shims.
|
||||||
|
+ * H.264 4x4 / 8x8 IDCT + luma v/h + chroma v/h deblock — daedalus-fourier substitution shims.
|
||||||
|
*
|
||||||
|
* Routes H264DSPContext.idct_add → daedalus_recipe_dispatch_h264_idct4
|
||||||
|
* H264DSPContext.idct8_add → daedalus_recipe_dispatch_h264_idct8
|
||||||
|
- * H264DSPContext.v_loop_filter_luma → daedalus_recipe_dispatch_h264_deblock_luma_v
|
||||||
|
- * H264DSPContext.h_loop_filter_luma → daedalus_recipe_dispatch_h264_deblock_luma_h
|
||||||
|
+ * H264DSPContext.v_loop_filter_luma → daedalus_recipe_dispatch_h264_deblock_luma_v
|
||||||
|
+ * H264DSPContext.h_loop_filter_luma → daedalus_recipe_dispatch_h264_deblock_luma_h
|
||||||
|
+ * H264DSPContext.v_loop_filter_chroma → daedalus_recipe_dispatch_h264_deblock_chroma_v
|
||||||
|
+ * H264DSPContext.h_loop_filter_chroma → daedalus_recipe_dispatch_h264_deblock_chroma_h
|
||||||
|
* instead of the in-tree ff_h264_*_neon assembly. The recipe layer
|
||||||
|
* picks the substrate (CPU NEON for cycles 6 + 7 by default; cycle 8
|
||||||
|
* is CPU primary with QPU opportunistic — the ctx below is no-QPU,
|
||||||
|
@@ -48,6 +50,10 @@
|
||||||
|
int alpha, int beta, int8_t *tc0);
|
||||||
|
void ff_h264_h_loop_filter_luma_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
int alpha, int beta, int8_t *tc0);
|
||||||
|
+void ff_h264_v_loop_filter_chroma_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
+ int alpha, int beta, int8_t *tc0);
|
||||||
|
+void ff_h264_h_loop_filter_chroma_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
+ int alpha, int beta, int8_t *tc0);
|
||||||
|
|
||||||
|
void ff_h264_idct_add_daedalus(uint8_t *dst, int16_t *block, int stride)
|
||||||
|
{
|
||||||
|
@@ -106,3 +112,41 @@
|
||||||
|
daedalus_recipe_dispatch_h264_deblock_luma_h(g_dctx, pix, (size_t)stride,
|
||||||
|
1, &meta);
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+void ff_h264_v_loop_filter_chroma_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
+ int alpha, int beta, int8_t *tc0)
|
||||||
|
+{
|
||||||
|
+ daedalus_h264_deblock_meta meta = {
|
||||||
|
+ .dst_off = 0,
|
||||||
|
+ .alpha = alpha,
|
||||||
|
+ .beta = beta,
|
||||||
|
+ };
|
||||||
|
+ meta.tc0[0] = tc0[0];
|
||||||
|
+ meta.tc0[1] = tc0[1];
|
||||||
|
+ meta.tc0[2] = tc0[2];
|
||||||
|
+ meta.tc0[3] = tc0[3];
|
||||||
|
+
|
||||||
|
+ pthread_once(&g_dctx_once, daedalus_ctx_init_once);
|
||||||
|
+
|
||||||
|
+ daedalus_recipe_dispatch_h264_deblock_chroma_v(g_dctx, pix, (size_t)stride,
|
||||||
|
+ 1, &meta);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void ff_h264_h_loop_filter_chroma_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
+ int alpha, int beta, int8_t *tc0)
|
||||||
|
+{
|
||||||
|
+ daedalus_h264_deblock_meta meta = {
|
||||||
|
+ .dst_off = 0,
|
||||||
|
+ .alpha = alpha,
|
||||||
|
+ .beta = beta,
|
||||||
|
+ };
|
||||||
|
+ meta.tc0[0] = tc0[0];
|
||||||
|
+ meta.tc0[1] = tc0[1];
|
||||||
|
+ meta.tc0[2] = tc0[2];
|
||||||
|
+ meta.tc0[3] = tc0[3];
|
||||||
|
+
|
||||||
|
+ pthread_once(&g_dctx_once, daedalus_ctx_init_once);
|
||||||
|
+
|
||||||
|
+ daedalus_recipe_dispatch_h264_deblock_chroma_h(g_dctx, pix, (size_t)stride,
|
||||||
|
+ 1, &meta);
|
||||||
|
+}
|
||||||
|
diff --git a/libavcodec/aarch64/h264dsp_init_aarch64.c b/libavcodec/aarch64/h264dsp_init_aarch64.c
|
||||||
|
--- a/libavcodec/aarch64/h264dsp_init_aarch64.c 2026-05-25 13:15:45.996482360 +0200
|
||||||
|
+++ libavcodec/aarch64/h264dsp_init_aarch64.c 2026-05-25 13:15:46.025604910 +0200
|
||||||
|
@@ -39,8 +39,12 @@
|
||||||
|
int beta);
|
||||||
|
void ff_h264_v_loop_filter_chroma_neon(uint8_t *pix, ptrdiff_t stride, int alpha,
|
||||||
|
int beta, int8_t *tc0);
|
||||||
|
+void ff_h264_v_loop_filter_chroma_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
+ int alpha, int beta, int8_t *tc0);
|
||||||
|
void ff_h264_h_loop_filter_chroma_neon(uint8_t *pix, ptrdiff_t stride, int alpha,
|
||||||
|
int beta, int8_t *tc0);
|
||||||
|
+void ff_h264_h_loop_filter_chroma_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
+ int alpha, int beta, int8_t *tc0);
|
||||||
|
void ff_h264_h_loop_filter_chroma422_neon(uint8_t *pix, ptrdiff_t stride, int alpha,
|
||||||
|
int beta, int8_t *tc0);
|
||||||
|
void ff_h264_v_loop_filter_chroma_intra_neon(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
@@ -123,11 +127,11 @@
|
||||||
|
c->v_loop_filter_luma_intra= ff_h264_v_loop_filter_luma_intra_neon;
|
||||||
|
c->h_loop_filter_luma_intra= ff_h264_h_loop_filter_luma_intra_neon;
|
||||||
|
|
||||||
|
- c->v_loop_filter_chroma = ff_h264_v_loop_filter_chroma_neon;
|
||||||
|
+ c->v_loop_filter_chroma = ff_h264_v_loop_filter_chroma_daedalus;
|
||||||
|
c->v_loop_filter_chroma_intra = ff_h264_v_loop_filter_chroma_intra_neon;
|
||||||
|
|
||||||
|
if (chroma_format_idc <= 1) {
|
||||||
|
- c->h_loop_filter_chroma = ff_h264_h_loop_filter_chroma_neon;
|
||||||
|
+ c->h_loop_filter_chroma = ff_h264_h_loop_filter_chroma_daedalus;
|
||||||
|
c->h_loop_filter_chroma_intra = ff_h264_h_loop_filter_chroma_intra_neon;
|
||||||
|
c->h_loop_filter_chroma_mbaff_intra = ff_h264_h_loop_filter_chroma_mbaff_intra_neon;
|
||||||
|
} else {
|
||||||
|
--
|
||||||
|
2.47.3
|
||||||
|
|
||||||
+126
@@ -0,0 +1,126 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: claude-noether <claude-noether@noreply.localhost>
|
||||||
|
Date: Sun, 25 May 2026 12:30:00 +0200
|
||||||
|
Subject: [PATCH] avcodec/aarch64/h264dsp: route H.264 luma intra deblock through daedalus-fourier
|
||||||
|
|
||||||
|
Adds the bS=4 intra-strength variants of the already-substituted
|
||||||
|
luma_v / luma_h deblock (0005, 0008). Intra MBs and certain
|
||||||
|
inter-MB edges (4x4 transform boundaries inside an Intra_NxN
|
||||||
|
neighbour) force boundary strength to 4 per H.264 §8.7.2.1.
|
||||||
|
|
||||||
|
H264DSPContext.v_loop_filter_luma_intra →
|
||||||
|
daedalus_recipe_dispatch_h264_deblock_luma_v_intra
|
||||||
|
H264DSPContext.h_loop_filter_luma_intra →
|
||||||
|
daedalus_recipe_dispatch_h264_deblock_luma_h_intra
|
||||||
|
|
||||||
|
Both kernels landed in daedalus-fourier PR #11. Recipe table
|
||||||
|
routes AUTO to CPU NEON (no intra QPU shaders yet) — plumbing-
|
||||||
|
only NEON-to-NEON via daedalus, bit-exact against the in-tree
|
||||||
|
FFmpeg NEON path.
|
||||||
|
|
||||||
|
Signature differs from bS<4: no tc0 argument. The wrapper
|
||||||
|
passes daedalus_h264_deblock_meta with alpha/beta set; tc0[] is
|
||||||
|
ignored by the intra dispatch (bS=4 hardcodes the strength).
|
||||||
|
|
||||||
|
Chroma intra variants are deferred to a follow-up PR because the
|
||||||
|
chroma path has a 4:2:0 / 4:2:2 split (chroma_format_idc gating)
|
||||||
|
that needs explicit conditional substitution to avoid running
|
||||||
|
the 4:2:0-only daedalus dispatch on 4:2:2 chroma.
|
||||||
|
|
||||||
|
Refs reauktion/daedalus-v4l2#11 — substitution arc step 2 cycle 8 intra.
|
||||||
|
---
|
||||||
|
diff --git a/libavcodec/aarch64/h264_idct_daedalus.c b/libavcodec/aarch64/h264_idct_daedalus.c
|
||||||
|
--- a/libavcodec/aarch64/h264_idct_daedalus.c 2026-05-25 13:18:54.992244965 +0200
|
||||||
|
+++ libavcodec/aarch64/h264_idct_daedalus.c 2026-05-25 13:20:12.338122217 +0200
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
/*
|
||||||
|
- * H.264 4x4 / 8x8 IDCT + luma v/h + chroma v/h deblock — daedalus-fourier substitution shims.
|
||||||
|
+ * H.264 4x4 / 8x8 IDCT + luma v/h (inter + intra) + chroma v/h deblock — daedalus-fourier substitution shims.
|
||||||
|
*
|
||||||
|
* Routes H264DSPContext.idct_add → daedalus_recipe_dispatch_h264_idct4
|
||||||
|
* H264DSPContext.idct8_add → daedalus_recipe_dispatch_h264_idct8
|
||||||
|
@@ -7,6 +7,8 @@
|
||||||
|
* H264DSPContext.h_loop_filter_luma → daedalus_recipe_dispatch_h264_deblock_luma_h
|
||||||
|
* H264DSPContext.v_loop_filter_chroma → daedalus_recipe_dispatch_h264_deblock_chroma_v
|
||||||
|
* H264DSPContext.h_loop_filter_chroma → daedalus_recipe_dispatch_h264_deblock_chroma_h
|
||||||
|
+ * H264DSPContext.v_loop_filter_luma_intra → daedalus_recipe_dispatch_h264_deblock_luma_v_intra
|
||||||
|
+ * H264DSPContext.h_loop_filter_luma_intra → daedalus_recipe_dispatch_h264_deblock_luma_h_intra
|
||||||
|
* instead of the in-tree ff_h264_*_neon assembly. The recipe layer
|
||||||
|
* picks the substrate (CPU NEON for cycles 6 + 7 by default; cycle 8
|
||||||
|
* is CPU primary with QPU opportunistic — the ctx below is no-QPU,
|
||||||
|
@@ -54,6 +56,10 @@
|
||||||
|
int alpha, int beta, int8_t *tc0);
|
||||||
|
void ff_h264_h_loop_filter_chroma_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
int alpha, int beta, int8_t *tc0);
|
||||||
|
+void ff_h264_v_loop_filter_luma_intra_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
+ int alpha, int beta);
|
||||||
|
+void ff_h264_h_loop_filter_luma_intra_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
+ int alpha, int beta);
|
||||||
|
|
||||||
|
void ff_h264_idct_add_daedalus(uint8_t *dst, int16_t *block, int stride)
|
||||||
|
{
|
||||||
|
@@ -150,3 +156,34 @@
|
||||||
|
daedalus_recipe_dispatch_h264_deblock_chroma_h(g_dctx, pix, (size_t)stride,
|
||||||
|
1, &meta);
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+void ff_h264_v_loop_filter_luma_intra_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
+ int alpha, int beta)
|
||||||
|
+{
|
||||||
|
+ daedalus_h264_deblock_meta meta = {
|
||||||
|
+ .dst_off = 0,
|
||||||
|
+ .alpha = alpha,
|
||||||
|
+ .beta = beta,
|
||||||
|
+ };
|
||||||
|
+ /* tc0[] is ignored by the intra-strength dispatch (bS=4 hardcodes the strength). */
|
||||||
|
+
|
||||||
|
+ pthread_once(&g_dctx_once, daedalus_ctx_init_once);
|
||||||
|
+
|
||||||
|
+ daedalus_recipe_dispatch_h264_deblock_luma_v_intra(g_dctx, pix, (size_t)stride,
|
||||||
|
+ 1, &meta);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void ff_h264_h_loop_filter_luma_intra_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
+ int alpha, int beta)
|
||||||
|
+{
|
||||||
|
+ daedalus_h264_deblock_meta meta = {
|
||||||
|
+ .dst_off = 0,
|
||||||
|
+ .alpha = alpha,
|
||||||
|
+ .beta = beta,
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ pthread_once(&g_dctx_once, daedalus_ctx_init_once);
|
||||||
|
+
|
||||||
|
+ daedalus_recipe_dispatch_h264_deblock_luma_h_intra(g_dctx, pix, (size_t)stride,
|
||||||
|
+ 1, &meta);
|
||||||
|
+}
|
||||||
|
diff --git a/libavcodec/aarch64/h264dsp_init_aarch64.c b/libavcodec/aarch64/h264dsp_init_aarch64.c
|
||||||
|
--- a/libavcodec/aarch64/h264dsp_init_aarch64.c 2026-05-25 13:18:54.993349573 +0200
|
||||||
|
+++ libavcodec/aarch64/h264dsp_init_aarch64.c 2026-05-25 13:20:12.338265830 +0200
|
||||||
|
@@ -35,8 +35,12 @@
|
||||||
|
int alpha, int beta, int8_t *tc0);
|
||||||
|
void ff_h264_v_loop_filter_luma_intra_neon(uint8_t *pix, ptrdiff_t stride, int alpha,
|
||||||
|
int beta);
|
||||||
|
+void ff_h264_v_loop_filter_luma_intra_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
+ int alpha, int beta);
|
||||||
|
void ff_h264_h_loop_filter_luma_intra_neon(uint8_t *pix, ptrdiff_t stride, int alpha,
|
||||||
|
int beta);
|
||||||
|
+void ff_h264_h_loop_filter_luma_intra_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
+ int alpha, int beta);
|
||||||
|
void ff_h264_v_loop_filter_chroma_neon(uint8_t *pix, ptrdiff_t stride, int alpha,
|
||||||
|
int beta, int8_t *tc0);
|
||||||
|
void ff_h264_v_loop_filter_chroma_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
@@ -124,8 +128,8 @@
|
||||||
|
if (have_neon(cpu_flags) && bit_depth == 8) {
|
||||||
|
c->v_loop_filter_luma = ff_h264_v_loop_filter_luma_daedalus;
|
||||||
|
c->h_loop_filter_luma = ff_h264_h_loop_filter_luma_daedalus;
|
||||||
|
- c->v_loop_filter_luma_intra= ff_h264_v_loop_filter_luma_intra_neon;
|
||||||
|
- c->h_loop_filter_luma_intra= ff_h264_h_loop_filter_luma_intra_neon;
|
||||||
|
+ c->v_loop_filter_luma_intra= ff_h264_v_loop_filter_luma_intra_daedalus;
|
||||||
|
+ c->h_loop_filter_luma_intra= ff_h264_h_loop_filter_luma_intra_daedalus;
|
||||||
|
|
||||||
|
c->v_loop_filter_chroma = ff_h264_v_loop_filter_chroma_daedalus;
|
||||||
|
c->v_loop_filter_chroma_intra = ff_h264_v_loop_filter_chroma_intra_neon;
|
||||||
|
--
|
||||||
|
2.47.3
|
||||||
|
|
||||||
+101
@@ -0,0 +1,101 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: claude-noether <claude-noether@noreply.localhost>
|
||||||
|
Date: Sun, 25 May 2026 13:00:00 +0200
|
||||||
|
Subject: [PATCH] avcodec/aarch64/h264dsp: route H.264 chroma DC Hadamard through daedalus-fourier
|
||||||
|
|
||||||
|
Substitutes H264DSPContext.chroma_dc_dequant_idct in the
|
||||||
|
4:2:0 / bit_depth=8 init path with a wrapper that composes
|
||||||
|
the daedalus chroma DC Hadamard primitive (fourier PR #25)
|
||||||
|
with qmul scaling FFmpeg does in one fused function.
|
||||||
|
|
||||||
|
Bit-exact against ff_h264_chroma_dc_dequant_idct_8_c.
|
||||||
|
Hadamard correctness gated by fourier PR #23 test suite.
|
||||||
|
|
||||||
|
4:2:2 chroma stays on the in-tree 422 variant (same
|
||||||
|
gating shape as 0009 chroma deblock substitution).
|
||||||
|
|
||||||
|
Requires daedalus-fourier commit b9f9ff2 or later (PR #25
|
||||||
|
exposing the public Hadamard symbol). Pin bumps in PKGBUILD
|
||||||
|
and build-deb.sh come in the same commit.
|
||||||
|
---
|
||||||
|
diff --git a/libavcodec/aarch64/h264_idct_daedalus.c b/libavcodec/aarch64/h264_idct_daedalus.c
|
||||||
|
--- a/libavcodec/aarch64/h264_idct_daedalus.c 2026-05-25 13:38:32.019491484 +0200
|
||||||
|
+++ libavcodec/aarch64/h264_idct_daedalus.c 2026-05-25 13:38:32.033821507 +0200
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
/*
|
||||||
|
- * H.264 4x4 / 8x8 IDCT + luma v/h (inter + intra) + chroma v/h deblock — daedalus-fourier substitution shims.
|
||||||
|
+ * H.264 4x4 / 8x8 IDCT + luma v/h (inter+intra) + chroma v/h deblock + chroma DC Hadamard — daedalus-fourier substitution shims.
|
||||||
|
*
|
||||||
|
* Routes H264DSPContext.idct_add → daedalus_recipe_dispatch_h264_idct4
|
||||||
|
* H264DSPContext.idct8_add → daedalus_recipe_dispatch_h264_idct8
|
||||||
|
@@ -9,6 +9,7 @@
|
||||||
|
* H264DSPContext.h_loop_filter_chroma → daedalus_recipe_dispatch_h264_deblock_chroma_h
|
||||||
|
* H264DSPContext.v_loop_filter_luma_intra → daedalus_recipe_dispatch_h264_deblock_luma_v_intra
|
||||||
|
* H264DSPContext.h_loop_filter_luma_intra → daedalus_recipe_dispatch_h264_deblock_luma_h_intra
|
||||||
|
+ * H264DSPContext.chroma_dc_dequant_idct → daedalus_h264_chroma_dc_hadamard_2x2 + caller-side qmul
|
||||||
|
* instead of the in-tree ff_h264_*_neon assembly. The recipe layer
|
||||||
|
* picks the substrate (CPU NEON for cycles 6 + 7 by default; cycle 8
|
||||||
|
* is CPU primary with QPU opportunistic — the ctx below is no-QPU,
|
||||||
|
@@ -60,6 +61,7 @@
|
||||||
|
int alpha, int beta);
|
||||||
|
void ff_h264_h_loop_filter_luma_intra_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
int alpha, int beta);
|
||||||
|
+void ff_h264_chroma_dc_dequant_idct_daedalus(int16_t *block, int qmul);
|
||||||
|
|
||||||
|
void ff_h264_idct_add_daedalus(uint8_t *dst, int16_t *block, int stride)
|
||||||
|
{
|
||||||
|
@@ -187,3 +189,32 @@
|
||||||
|
daedalus_recipe_dispatch_h264_deblock_luma_h_intra(g_dctx, pix, (size_t)stride,
|
||||||
|
1, &meta);
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+/* Composes daedalus_h264_chroma_dc_hadamard_2x2 with the qmul scaling
|
||||||
|
+ * that FFmpeg's reference does in one fused function (h264idct_template.c
|
||||||
|
+ * ff_h264_chroma_dc_dequant_idct).
|
||||||
|
+ *
|
||||||
|
+ * The 4 DC coefficients are scattered across the per-MB coefficient
|
||||||
|
+ * buffer at offsets [r*stride + c*xStride] (stride=32, xStride=16).
|
||||||
|
+ * Extract into a contiguous int16[4], run the Hadamard, then apply
|
||||||
|
+ * the qmul scale and write back to the original positions.
|
||||||
|
+ *
|
||||||
|
+ * No daedalus ctx needed; the Hadamard is a pure stateless primitive.
|
||||||
|
+ */
|
||||||
|
+void ff_h264_chroma_dc_dequant_idct_daedalus(int16_t *block, int qmul)
|
||||||
|
+{
|
||||||
|
+ enum { stride = 32, xStride = 16 };
|
||||||
|
+ int16_t dc[4];
|
||||||
|
+
|
||||||
|
+ dc[0] = block[stride*0 + xStride*0];
|
||||||
|
+ dc[1] = block[stride*0 + xStride*1];
|
||||||
|
+ dc[2] = block[stride*1 + xStride*0];
|
||||||
|
+ dc[3] = block[stride*1 + xStride*1];
|
||||||
|
+
|
||||||
|
+ daedalus_h264_chroma_dc_hadamard_2x2(dc);
|
||||||
|
+
|
||||||
|
+ block[stride*0 + xStride*0] = (int16_t)((int)dc[0] * qmul >> 7);
|
||||||
|
+ block[stride*0 + xStride*1] = (int16_t)((int)dc[1] * qmul >> 7);
|
||||||
|
+ block[stride*1 + xStride*0] = (int16_t)((int)dc[2] * qmul >> 7);
|
||||||
|
+ block[stride*1 + xStride*1] = (int16_t)((int)dc[3] * qmul >> 7);
|
||||||
|
+}
|
||||||
|
diff --git a/libavcodec/aarch64/h264dsp_init_aarch64.c b/libavcodec/aarch64/h264dsp_init_aarch64.c
|
||||||
|
--- a/libavcodec/aarch64/h264dsp_init_aarch64.c 2026-05-25 13:38:32.020346459 +0200
|
||||||
|
+++ libavcodec/aarch64/h264dsp_init_aarch64.c 2026-05-25 13:38:32.033909804 +0200
|
||||||
|
@@ -41,6 +41,7 @@
|
||||||
|
int beta);
|
||||||
|
void ff_h264_h_loop_filter_luma_intra_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
int alpha, int beta);
|
||||||
|
+void ff_h264_chroma_dc_dequant_idct_daedalus(int16_t *block, int qmul);
|
||||||
|
void ff_h264_v_loop_filter_chroma_neon(uint8_t *pix, ptrdiff_t stride, int alpha,
|
||||||
|
int beta, int8_t *tc0);
|
||||||
|
void ff_h264_v_loop_filter_chroma_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
@@ -135,6 +136,7 @@
|
||||||
|
c->v_loop_filter_chroma_intra = ff_h264_v_loop_filter_chroma_intra_neon;
|
||||||
|
|
||||||
|
if (chroma_format_idc <= 1) {
|
||||||
|
+ c->chroma_dc_dequant_idct = ff_h264_chroma_dc_dequant_idct_daedalus;
|
||||||
|
c->h_loop_filter_chroma = ff_h264_h_loop_filter_chroma_daedalus;
|
||||||
|
c->h_loop_filter_chroma_intra = ff_h264_h_loop_filter_chroma_intra_neon;
|
||||||
|
c->h_loop_filter_chroma_mbaff_intra = ff_h264_h_loop_filter_chroma_mbaff_intra_neon;
|
||||||
|
--
|
||||||
|
2.47.3
|
||||||
|
|
||||||
+245
@@ -0,0 +1,245 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: claude-noether <claude-noether@noreply.localhost>
|
||||||
|
Date: Sun, 25 May 2026 14:00:00 +0200
|
||||||
|
Subject: [PATCH] avcodec/aarch64/h264qpel: route remaining qpel 8x8 positions through daedalus-fourier
|
||||||
|
|
||||||
|
Closes the H.264 qpel substitution. Extends 0007 (which routed only
|
||||||
|
mc20 put_) to ALL 15 useful positions in BOTH the put_ and avg_
|
||||||
|
tables, skipping mc00 (integer copy / pointer-only fast path).
|
||||||
|
|
||||||
|
29 substitutions total: 14 new put_ + 15 avg_. Each is a uniform
|
||||||
|
wrapper around daedalus_recipe_dispatch_h264_qpel_{avg_,}mcXY exposed
|
||||||
|
by daedalus-fourier PRs #15-#20.
|
||||||
|
|
||||||
|
All recipe-table entries route AUTO to CPU NEON (no QPU shaders
|
||||||
|
for any qpel position other than mc20 yet), so this is plumbing-only
|
||||||
|
NEON-to-NEON — bit-exact against the in-tree ff_*_h264_qpel8_*_neon
|
||||||
|
path.
|
||||||
|
|
||||||
|
16x16 qpel tables ([0][...]) stay on the in-tree NEON. daedalus
|
||||||
|
only exposes 8x8 today; 16x16 substitution can land once fourier
|
||||||
|
provides those variants (likely just dispatching the 8x8 path four
|
||||||
|
times with shifted dst/src offsets).
|
||||||
|
|
||||||
|
Refs reauktion/daedalus-v4l2#11 — substitution arc qpel buildout.
|
||||||
|
---
|
||||||
|
diff --git a/libavcodec/aarch64/h264_qpel_daedalus.c b/libavcodec/aarch64/h264_qpel_daedalus.c
|
||||||
|
--- a/libavcodec/aarch64/h264_qpel_daedalus.c 2026-05-25 14:05:05.789298250 +0200
|
||||||
|
+++ libavcodec/aarch64/h264_qpel_daedalus.c 2026-05-25 14:05:05.818358374 +0200
|
||||||
|
@@ -1,10 +1,13 @@
|
||||||
|
/*
|
||||||
|
- * H.264 luma qpel mc20 (8x8, horizontal half-pel, 6-tap "put")
|
||||||
|
- * — daedalus-fourier substitution shim.
|
||||||
|
+ * H.264 luma qpel 8x8 — daedalus-fourier substitution shims (put_ + avg_).
|
||||||
|
*
|
||||||
|
- * Routes H264QpelContext.put_h264_qpel_pixels_tab[1][2] through
|
||||||
|
- * daedalus_recipe_dispatch_h264_qpel_mc20 instead of
|
||||||
|
- * ff_put_h264_qpel8_mc20_neon. The recipe layer picks the substrate
|
||||||
|
+ * Routes ALL 15 useful positions in H264QpelContext's 8x8 put_ and
|
||||||
|
+ * avg_ tables through daedalus_recipe_dispatch_h264_qpel_mc{XY}
|
||||||
|
+ * (skipping mc00 which is integer copy / FFmpeg's pointer-only fast
|
||||||
|
+ * path). Plumbing-only NEON-by-recipe — daedalus-fourier PRs #15-#20
|
||||||
|
+ * exposed each variant via the same dispatch signature, so the
|
||||||
|
+ * substitution is a uniform macro across put_/avg_ and across all
|
||||||
|
+ * 15 mc positions. The recipe layer picks the substrate
|
||||||
|
* (CPU NEON for cycle 9; QPU not viable — per-block 7.6 ns vs
|
||||||
|
* ~250 ns QPU dispatch floor, see docs/k9_h264qpel_mc20.md).
|
||||||
|
*
|
||||||
|
@@ -48,3 +51,53 @@
|
||||||
|
daedalus_recipe_dispatch_h264_qpel_mc20(g_dctx, dst, src, (size_t)stride,
|
||||||
|
1, &meta);
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+/* All other 8x8 qpel positions follow the same dispatch shape as mc20
|
||||||
|
+ * above. The macro collapses ~600 LOC of one-wrapper-per-variant
|
||||||
|
+ * boilerplate (29 variants total: 14 put_ + 15 avg_). */
|
||||||
|
+#define DEFINE_QPEL_WRAPPER(type, suffix, dispatch_fn) \
|
||||||
|
+void ff_ ## type ## _h264_qpel8_ ## suffix ## _daedalus(uint8_t *dst, \
|
||||||
|
+ const uint8_t *src, ptrdiff_t stride); \
|
||||||
|
+void ff_ ## type ## _h264_qpel8_ ## suffix ## _daedalus(uint8_t *dst, \
|
||||||
|
+ const uint8_t *src, ptrdiff_t stride) \
|
||||||
|
+{ \
|
||||||
|
+ static const daedalus_h264_qpel_meta meta = { .dst_off = 0, .src_off = 0 }; \
|
||||||
|
+ pthread_once(&g_dctx_once, daedalus_ctx_init_once); \
|
||||||
|
+ dispatch_fn(g_dctx, dst, src, (size_t)stride, 1, &meta); \
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+/* put_ variants (mc20 stays on the explicit definition above). */
|
||||||
|
+DEFINE_QPEL_WRAPPER(put, mc10, daedalus_recipe_dispatch_h264_qpel_mc10)
|
||||||
|
+DEFINE_QPEL_WRAPPER(put, mc30, daedalus_recipe_dispatch_h264_qpel_mc30)
|
||||||
|
+DEFINE_QPEL_WRAPPER(put, mc01, daedalus_recipe_dispatch_h264_qpel_mc01)
|
||||||
|
+DEFINE_QPEL_WRAPPER(put, mc11, daedalus_recipe_dispatch_h264_qpel_mc11)
|
||||||
|
+DEFINE_QPEL_WRAPPER(put, mc21, daedalus_recipe_dispatch_h264_qpel_mc21)
|
||||||
|
+DEFINE_QPEL_WRAPPER(put, mc31, daedalus_recipe_dispatch_h264_qpel_mc31)
|
||||||
|
+DEFINE_QPEL_WRAPPER(put, mc02, daedalus_recipe_dispatch_h264_qpel_mc02)
|
||||||
|
+DEFINE_QPEL_WRAPPER(put, mc12, daedalus_recipe_dispatch_h264_qpel_mc12)
|
||||||
|
+DEFINE_QPEL_WRAPPER(put, mc22, daedalus_recipe_dispatch_h264_qpel_mc22)
|
||||||
|
+DEFINE_QPEL_WRAPPER(put, mc32, daedalus_recipe_dispatch_h264_qpel_mc32)
|
||||||
|
+DEFINE_QPEL_WRAPPER(put, mc03, daedalus_recipe_dispatch_h264_qpel_mc03)
|
||||||
|
+DEFINE_QPEL_WRAPPER(put, mc13, daedalus_recipe_dispatch_h264_qpel_mc13)
|
||||||
|
+DEFINE_QPEL_WRAPPER(put, mc23, daedalus_recipe_dispatch_h264_qpel_mc23)
|
||||||
|
+DEFINE_QPEL_WRAPPER(put, mc33, daedalus_recipe_dispatch_h264_qpel_mc33)
|
||||||
|
+
|
||||||
|
+/* avg_ variants — all 15 useful positions. */
|
||||||
|
+DEFINE_QPEL_WRAPPER(avg, mc10, daedalus_recipe_dispatch_h264_qpel_avg_mc10)
|
||||||
|
+DEFINE_QPEL_WRAPPER(avg, mc20, daedalus_recipe_dispatch_h264_qpel_avg_mc20)
|
||||||
|
+DEFINE_QPEL_WRAPPER(avg, mc30, daedalus_recipe_dispatch_h264_qpel_avg_mc30)
|
||||||
|
+DEFINE_QPEL_WRAPPER(avg, mc01, daedalus_recipe_dispatch_h264_qpel_avg_mc01)
|
||||||
|
+DEFINE_QPEL_WRAPPER(avg, mc11, daedalus_recipe_dispatch_h264_qpel_avg_mc11)
|
||||||
|
+DEFINE_QPEL_WRAPPER(avg, mc21, daedalus_recipe_dispatch_h264_qpel_avg_mc21)
|
||||||
|
+DEFINE_QPEL_WRAPPER(avg, mc31, daedalus_recipe_dispatch_h264_qpel_avg_mc31)
|
||||||
|
+DEFINE_QPEL_WRAPPER(avg, mc02, daedalus_recipe_dispatch_h264_qpel_avg_mc02)
|
||||||
|
+DEFINE_QPEL_WRAPPER(avg, mc12, daedalus_recipe_dispatch_h264_qpel_avg_mc12)
|
||||||
|
+DEFINE_QPEL_WRAPPER(avg, mc22, daedalus_recipe_dispatch_h264_qpel_avg_mc22)
|
||||||
|
+DEFINE_QPEL_WRAPPER(avg, mc32, daedalus_recipe_dispatch_h264_qpel_avg_mc32)
|
||||||
|
+DEFINE_QPEL_WRAPPER(avg, mc03, daedalus_recipe_dispatch_h264_qpel_avg_mc03)
|
||||||
|
+DEFINE_QPEL_WRAPPER(avg, mc13, daedalus_recipe_dispatch_h264_qpel_avg_mc13)
|
||||||
|
+DEFINE_QPEL_WRAPPER(avg, mc23, daedalus_recipe_dispatch_h264_qpel_avg_mc23)
|
||||||
|
+DEFINE_QPEL_WRAPPER(avg, mc33, daedalus_recipe_dispatch_h264_qpel_avg_mc33)
|
||||||
|
+
|
||||||
|
+#undef DEFINE_QPEL_WRAPPER
|
||||||
|
diff --git a/libavcodec/aarch64/h264qpel_init_aarch64.c b/libavcodec/aarch64/h264qpel_init_aarch64.c
|
||||||
|
--- a/libavcodec/aarch64/h264qpel_init_aarch64.c 2026-05-25 14:05:05.790403989 +0200
|
||||||
|
+++ libavcodec/aarch64/h264qpel_init_aarch64.c 2026-05-25 14:05:05.819136071 +0200
|
||||||
|
@@ -50,6 +50,64 @@
|
||||||
|
void ff_put_h264_qpel8_mc30_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride);
|
||||||
|
void ff_put_h264_qpel8_mc20_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
ptrdiff_t stride);
|
||||||
|
+void ff_put_h264_qpel8_mc10_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_put_h264_qpel8_mc30_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_put_h264_qpel8_mc01_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_put_h264_qpel8_mc11_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_put_h264_qpel8_mc21_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_put_h264_qpel8_mc31_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_put_h264_qpel8_mc02_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_put_h264_qpel8_mc12_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_put_h264_qpel8_mc22_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_put_h264_qpel8_mc32_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_put_h264_qpel8_mc03_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_put_h264_qpel8_mc13_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_put_h264_qpel8_mc23_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_put_h264_qpel8_mc33_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_avg_h264_qpel8_mc10_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_avg_h264_qpel8_mc20_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_avg_h264_qpel8_mc30_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_avg_h264_qpel8_mc01_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_avg_h264_qpel8_mc11_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_avg_h264_qpel8_mc21_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_avg_h264_qpel8_mc31_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_avg_h264_qpel8_mc02_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_avg_h264_qpel8_mc12_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_avg_h264_qpel8_mc22_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_avg_h264_qpel8_mc32_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_avg_h264_qpel8_mc03_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_avg_h264_qpel8_mc13_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_avg_h264_qpel8_mc23_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
+void ff_avg_h264_qpel8_mc33_daedalus(uint8_t *dst, const uint8_t *src,
|
||||||
|
+ ptrdiff_t stride);
|
||||||
|
void ff_put_h264_qpel8_mc01_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride);
|
||||||
|
void ff_put_h264_qpel8_mc11_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride);
|
||||||
|
void ff_put_h264_qpel8_mc21_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride);
|
||||||
|
@@ -164,21 +222,21 @@
|
||||||
|
c->put_h264_qpel_pixels_tab[0][15] = ff_put_h264_qpel16_mc33_neon;
|
||||||
|
|
||||||
|
c->put_h264_qpel_pixels_tab[1][ 0] = ff_put_h264_qpel8_mc00_neon;
|
||||||
|
- c->put_h264_qpel_pixels_tab[1][ 1] = ff_put_h264_qpel8_mc10_neon;
|
||||||
|
+ c->put_h264_qpel_pixels_tab[1][ 1] = ff_put_h264_qpel8_mc10_daedalus;
|
||||||
|
c->put_h264_qpel_pixels_tab[1][ 2] = ff_put_h264_qpel8_mc20_daedalus;
|
||||||
|
- c->put_h264_qpel_pixels_tab[1][ 3] = ff_put_h264_qpel8_mc30_neon;
|
||||||
|
- c->put_h264_qpel_pixels_tab[1][ 4] = ff_put_h264_qpel8_mc01_neon;
|
||||||
|
- c->put_h264_qpel_pixels_tab[1][ 5] = ff_put_h264_qpel8_mc11_neon;
|
||||||
|
- c->put_h264_qpel_pixels_tab[1][ 6] = ff_put_h264_qpel8_mc21_neon;
|
||||||
|
- c->put_h264_qpel_pixels_tab[1][ 7] = ff_put_h264_qpel8_mc31_neon;
|
||||||
|
- c->put_h264_qpel_pixels_tab[1][ 8] = ff_put_h264_qpel8_mc02_neon;
|
||||||
|
- c->put_h264_qpel_pixels_tab[1][ 9] = ff_put_h264_qpel8_mc12_neon;
|
||||||
|
- c->put_h264_qpel_pixels_tab[1][10] = ff_put_h264_qpel8_mc22_neon;
|
||||||
|
- c->put_h264_qpel_pixels_tab[1][11] = ff_put_h264_qpel8_mc32_neon;
|
||||||
|
- c->put_h264_qpel_pixels_tab[1][12] = ff_put_h264_qpel8_mc03_neon;
|
||||||
|
- c->put_h264_qpel_pixels_tab[1][13] = ff_put_h264_qpel8_mc13_neon;
|
||||||
|
- c->put_h264_qpel_pixels_tab[1][14] = ff_put_h264_qpel8_mc23_neon;
|
||||||
|
- c->put_h264_qpel_pixels_tab[1][15] = ff_put_h264_qpel8_mc33_neon;
|
||||||
|
+ c->put_h264_qpel_pixels_tab[1][ 3] = ff_put_h264_qpel8_mc30_daedalus;
|
||||||
|
+ c->put_h264_qpel_pixels_tab[1][ 4] = ff_put_h264_qpel8_mc01_daedalus;
|
||||||
|
+ c->put_h264_qpel_pixels_tab[1][ 5] = ff_put_h264_qpel8_mc11_daedalus;
|
||||||
|
+ c->put_h264_qpel_pixels_tab[1][ 6] = ff_put_h264_qpel8_mc21_daedalus;
|
||||||
|
+ c->put_h264_qpel_pixels_tab[1][ 7] = ff_put_h264_qpel8_mc31_daedalus;
|
||||||
|
+ c->put_h264_qpel_pixels_tab[1][ 8] = ff_put_h264_qpel8_mc02_daedalus;
|
||||||
|
+ c->put_h264_qpel_pixels_tab[1][ 9] = ff_put_h264_qpel8_mc12_daedalus;
|
||||||
|
+ c->put_h264_qpel_pixels_tab[1][10] = ff_put_h264_qpel8_mc22_daedalus;
|
||||||
|
+ c->put_h264_qpel_pixels_tab[1][11] = ff_put_h264_qpel8_mc32_daedalus;
|
||||||
|
+ c->put_h264_qpel_pixels_tab[1][12] = ff_put_h264_qpel8_mc03_daedalus;
|
||||||
|
+ c->put_h264_qpel_pixels_tab[1][13] = ff_put_h264_qpel8_mc13_daedalus;
|
||||||
|
+ c->put_h264_qpel_pixels_tab[1][14] = ff_put_h264_qpel8_mc23_daedalus;
|
||||||
|
+ c->put_h264_qpel_pixels_tab[1][15] = ff_put_h264_qpel8_mc33_daedalus;
|
||||||
|
|
||||||
|
c->avg_h264_qpel_pixels_tab[0][ 0] = ff_avg_h264_qpel16_mc00_neon;
|
||||||
|
c->avg_h264_qpel_pixels_tab[0][ 1] = ff_avg_h264_qpel16_mc10_neon;
|
||||||
|
@@ -198,21 +256,21 @@
|
||||||
|
c->avg_h264_qpel_pixels_tab[0][15] = ff_avg_h264_qpel16_mc33_neon;
|
||||||
|
|
||||||
|
c->avg_h264_qpel_pixels_tab[1][ 0] = ff_avg_h264_qpel8_mc00_neon;
|
||||||
|
- c->avg_h264_qpel_pixels_tab[1][ 1] = ff_avg_h264_qpel8_mc10_neon;
|
||||||
|
- c->avg_h264_qpel_pixels_tab[1][ 2] = ff_avg_h264_qpel8_mc20_neon;
|
||||||
|
- c->avg_h264_qpel_pixels_tab[1][ 3] = ff_avg_h264_qpel8_mc30_neon;
|
||||||
|
- c->avg_h264_qpel_pixels_tab[1][ 4] = ff_avg_h264_qpel8_mc01_neon;
|
||||||
|
- c->avg_h264_qpel_pixels_tab[1][ 5] = ff_avg_h264_qpel8_mc11_neon;
|
||||||
|
- c->avg_h264_qpel_pixels_tab[1][ 6] = ff_avg_h264_qpel8_mc21_neon;
|
||||||
|
- c->avg_h264_qpel_pixels_tab[1][ 7] = ff_avg_h264_qpel8_mc31_neon;
|
||||||
|
- c->avg_h264_qpel_pixels_tab[1][ 8] = ff_avg_h264_qpel8_mc02_neon;
|
||||||
|
- c->avg_h264_qpel_pixels_tab[1][ 9] = ff_avg_h264_qpel8_mc12_neon;
|
||||||
|
- c->avg_h264_qpel_pixels_tab[1][10] = ff_avg_h264_qpel8_mc22_neon;
|
||||||
|
- c->avg_h264_qpel_pixels_tab[1][11] = ff_avg_h264_qpel8_mc32_neon;
|
||||||
|
- c->avg_h264_qpel_pixels_tab[1][12] = ff_avg_h264_qpel8_mc03_neon;
|
||||||
|
- c->avg_h264_qpel_pixels_tab[1][13] = ff_avg_h264_qpel8_mc13_neon;
|
||||||
|
- c->avg_h264_qpel_pixels_tab[1][14] = ff_avg_h264_qpel8_mc23_neon;
|
||||||
|
- c->avg_h264_qpel_pixels_tab[1][15] = ff_avg_h264_qpel8_mc33_neon;
|
||||||
|
+ c->avg_h264_qpel_pixels_tab[1][ 1] = ff_avg_h264_qpel8_mc10_daedalus;
|
||||||
|
+ c->avg_h264_qpel_pixels_tab[1][ 2] = ff_avg_h264_qpel8_mc20_daedalus;
|
||||||
|
+ c->avg_h264_qpel_pixels_tab[1][ 3] = ff_avg_h264_qpel8_mc30_daedalus;
|
||||||
|
+ c->avg_h264_qpel_pixels_tab[1][ 4] = ff_avg_h264_qpel8_mc01_daedalus;
|
||||||
|
+ c->avg_h264_qpel_pixels_tab[1][ 5] = ff_avg_h264_qpel8_mc11_daedalus;
|
||||||
|
+ c->avg_h264_qpel_pixels_tab[1][ 6] = ff_avg_h264_qpel8_mc21_daedalus;
|
||||||
|
+ c->avg_h264_qpel_pixels_tab[1][ 7] = ff_avg_h264_qpel8_mc31_daedalus;
|
||||||
|
+ c->avg_h264_qpel_pixels_tab[1][ 8] = ff_avg_h264_qpel8_mc02_daedalus;
|
||||||
|
+ c->avg_h264_qpel_pixels_tab[1][ 9] = ff_avg_h264_qpel8_mc12_daedalus;
|
||||||
|
+ c->avg_h264_qpel_pixels_tab[1][10] = ff_avg_h264_qpel8_mc22_daedalus;
|
||||||
|
+ c->avg_h264_qpel_pixels_tab[1][11] = ff_avg_h264_qpel8_mc32_daedalus;
|
||||||
|
+ c->avg_h264_qpel_pixels_tab[1][12] = ff_avg_h264_qpel8_mc03_daedalus;
|
||||||
|
+ c->avg_h264_qpel_pixels_tab[1][13] = ff_avg_h264_qpel8_mc13_daedalus;
|
||||||
|
+ c->avg_h264_qpel_pixels_tab[1][14] = ff_avg_h264_qpel8_mc23_daedalus;
|
||||||
|
+ c->avg_h264_qpel_pixels_tab[1][15] = ff_avg_h264_qpel8_mc33_daedalus;
|
||||||
|
} else if (have_neon(cpu_flags) && bit_depth == 10) {
|
||||||
|
c->put_h264_qpel_pixels_tab[0][ 1] = ff_put_h264_qpel16_mc10_neon_10;
|
||||||
|
c->put_h264_qpel_pixels_tab[0][ 2] = ff_put_h264_qpel16_mc20_neon_10;
|
||||||
|
--
|
||||||
|
2.47.3
|
||||||
|
|
||||||
+6
-1
@@ -45,7 +45,7 @@ PKGREL=10 # pkgrel=10 — H.264 luma qpel mc20 daedalus-fourier substitution
|
|||||||
# DAEDALUS_KERNEL_H264_QPEL_MC20. Cycle 9 plumbs the last H.264 NEON
|
# DAEDALUS_KERNEL_H264_QPEL_MC20. Cycle 9 plumbs the last H.264 NEON
|
||||||
# kernel through the recipe layer. Daemon-side build (debian/daedalus-v4l2)
|
# kernel through the recipe layer. Daemon-side build (debian/daedalus-v4l2)
|
||||||
# can bump in a follow-up; this PR only changes the libavcodec.so consumer.
|
# can bump in a follow-up; this PR only changes the libavcodec.so consumer.
|
||||||
DAEDALUS_FOURIER_COMMIT=209a4218bcb98b91c04f07ad61513bb04adb13ad
|
DAEDALUS_FOURIER_COMMIT=b9f9ff2a89c068aea54dcb52b543afddad28311e # PR #25 — public chroma DC Hadamard
|
||||||
|
|
||||||
HERE=$(dirname "$(readlink -f "$0")")
|
HERE=$(dirname "$(readlink -f "$0")")
|
||||||
|
|
||||||
@@ -74,6 +74,11 @@ patch -Np1 -i "$HERE/0004-h264-idct8-daedalus-fourier.patch"
|
|||||||
patch -Np1 -i "$HERE/0005-h264-deblock-luma-v-daedalus-fourier.patch"
|
patch -Np1 -i "$HERE/0005-h264-deblock-luma-v-daedalus-fourier.patch"
|
||||||
patch -Np1 -i "$HERE/0006-h264-restore-low-delay.patch"
|
patch -Np1 -i "$HERE/0006-h264-restore-low-delay.patch"
|
||||||
patch -Np1 -i "$HERE/0007-h264-qpel-mc20-daedalus-fourier.patch"
|
patch -Np1 -i "$HERE/0007-h264-qpel-mc20-daedalus-fourier.patch"
|
||||||
|
patch -Np1 -i "$HERE/0008-h264-deblock-luma-h-daedalus-fourier.patch"
|
||||||
|
patch -Np1 -i "$HERE/0009-h264-deblock-chroma-daedalus-fourier.patch"
|
||||||
|
patch -Np1 -i "$HERE/0010-h264-deblock-luma-intra-daedalus-fourier.patch"
|
||||||
|
patch -Np1 -i "$HERE/0011-h264-chroma-dc-hadamard-daedalus-fourier.patch"
|
||||||
|
patch -Np1 -i "$HERE/0012-h264-qpel-rest-daedalus-fourier.patch"
|
||||||
|
|
||||||
# --- daedalus-fourier: fetch + build static .a with PIC, install to a
|
# --- daedalus-fourier: fetch + build static .a with PIC, install to a
|
||||||
# per-build prefix; libavcodec.so links it into the shared object so
|
# per-build prefix; libavcodec.so links it into the shared object so
|
||||||
|
|||||||
Reference in New Issue
Block a user