Compare commits
24 Commits
902de73a02
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 9b0cb71370 | |||
| 25610930ad | |||
| 368fcff41f | |||
| ea99dc8e27 | |||
| 59901bceca | |||
| 87cbb9b70a | |||
| bdf3fffe2d | |||
| f4047f3145 | |||
| 190f810843 | |||
| 9c70ffffe7 | |||
| 520f2fce33 | |||
| e323aa2316 | |||
| 875156782e | |||
| 8f9487d355 | |||
| f07824adb7 | |||
| 2732a022f8 | |||
| 57f73f1afb | |||
| d8aa3aae8d | |||
| 1f58ff2b6b | |||
| 45be17fbdf | |||
| 7b9bb9b2d0 | |||
| babb280410 | |||
| 5b48d1c743 | |||
| 624f83e877 |
@@ -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
|
||||||
|
|
||||||
+120
@@ -0,0 +1,120 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: claude-noether <claude-noether@noreply.localhost>
|
||||||
|
Date: Sun, 25 May 2026 14:30:00 +0200
|
||||||
|
Subject: [PATCH] avcodec/aarch64/h264dsp: route H.264 chroma intra deblock (4:2:0) through daedalus-fourier
|
||||||
|
|
||||||
|
Substitutes c->v_loop_filter_chroma_intra and c->h_loop_filter_chroma_intra
|
||||||
|
with daedalus wrappers in the bit_depth=8 / chroma_format_idc<=1 (4:2:0)
|
||||||
|
branch. 4:2:2 stays on the in-tree NEON path (the daedalus chroma intra
|
||||||
|
dispatch is 4:2:0-only).
|
||||||
|
|
||||||
|
The fourier dispatches were exposed in PR #11 (DEFINE_INTRA_DISPATCH
|
||||||
|
macro generates the public daedalus_dispatch_h264_deblock_chroma_*_intra
|
||||||
|
symbols + recipe wrappers).
|
||||||
|
|
||||||
|
Re-architects the chroma init: v_loop_filter_chroma_intra was previously
|
||||||
|
assigned unconditionally to the NEON variant (which works for both 4:2:0
|
||||||
|
and 4:2:2). We now assign it INSIDE both branches of the chroma_format_idc
|
||||||
|
conditional, with the 4:2:0 branch picking daedalus and the 4:2:2 branch
|
||||||
|
keeping NEON. No regression for 4:2:2 streams.
|
||||||
|
|
||||||
|
Same NEON-to-NEON via recipe shape as 0010 luma intra.
|
||||||
|
|
||||||
|
Refs reauktion/daedalus-v4l2#11 — substitution arc chroma 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 14:21:08.267156263 +0200
|
||||||
|
+++ libavcodec/aarch64/h264_idct_daedalus.c 2026-05-25 14:21:08.287745931 +0200
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
/*
|
||||||
|
- * H.264 4x4 / 8x8 IDCT + luma v/h (inter+intra) + chroma v/h deblock + chroma DC Hadamard — daedalus-fourier substitution shims.
|
||||||
|
+ * H.264 4x4 / 8x8 IDCT + luma v/h (inter+intra) + chroma v/h (inter+intra) 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,8 @@
|
||||||
|
* 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.v_loop_filter_chroma_intra → daedalus_recipe_dispatch_h264_deblock_chroma_v_intra
|
||||||
|
+ * H264DSPContext.h_loop_filter_chroma_intra → daedalus_recipe_dispatch_h264_deblock_chroma_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
|
||||||
|
@@ -61,6 +63,10 @@
|
||||||
|
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_intra_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
+ int alpha, int beta);
|
||||||
|
+void ff_h264_h_loop_filter_chroma_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)
|
||||||
|
@@ -218,3 +224,30 @@
|
||||||
|
block[stride*1 + xStride*0] = (int16_t)((int)dc[2] * qmul >> 7);
|
||||||
|
block[stride*1 + xStride*1] = (int16_t)((int)dc[3] * qmul >> 7);
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+void ff_h264_v_loop_filter_chroma_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[] unused for intra (bS=4 hardcodes the strength). */
|
||||||
|
+ pthread_once(&g_dctx_once, daedalus_ctx_init_once);
|
||||||
|
+ daedalus_recipe_dispatch_h264_deblock_chroma_v_intra(g_dctx, pix, (size_t)stride,
|
||||||
|
+ 1, &meta);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void ff_h264_h_loop_filter_chroma_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_chroma_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 14:21:08.268311057 +0200
|
||||||
|
+++ libavcodec/aarch64/h264dsp_init_aarch64.c 2026-05-25 14:21:08.287886563 +0200
|
||||||
|
@@ -42,6 +42,10 @@
|
||||||
|
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_intra_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
+ int alpha, int beta);
|
||||||
|
+void ff_h264_h_loop_filter_chroma_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,
|
||||||
|
@@ -133,14 +137,15 @@
|
||||||
|
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;
|
||||||
|
|
||||||
|
if (chroma_format_idc <= 1) {
|
||||||
|
c->chroma_dc_dequant_idct = ff_h264_chroma_dc_dequant_idct_daedalus;
|
||||||
|
+ c->v_loop_filter_chroma_intra = ff_h264_v_loop_filter_chroma_intra_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_intra = ff_h264_h_loop_filter_chroma_intra_daedalus;
|
||||||
|
c->h_loop_filter_chroma_mbaff_intra = ff_h264_h_loop_filter_chroma_mbaff_intra_neon;
|
||||||
|
} else {
|
||||||
|
+ c->v_loop_filter_chroma_intra = ff_h264_v_loop_filter_chroma_intra_neon;
|
||||||
|
c->h_loop_filter_chroma = ff_h264_h_loop_filter_chroma422_neon;
|
||||||
|
c->h_loop_filter_chroma_mbaff = ff_h264_h_loop_filter_chroma_neon;
|
||||||
|
c->h_loop_filter_chroma_intra = ff_h264_h_loop_filter_chroma422_intra_neon;
|
||||||
|
--
|
||||||
|
2.47.3
|
||||||
|
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Markus Fritsche <mfritsche@reauktion.de>
|
||||||
|
Date: Mon, 25 May 2026 21:00:00 +0200
|
||||||
|
Subject: [PATCH] avcodec/aarch64/h264: use QPU-capable daedalus ctx (bench
|
||||||
|
shows 4.30x faster on Pi 5)
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
Patches 0003 (IDCT 4x4) and 0007 (qpel mc20) created the libavcodec.so
|
||||||
|
process-global daedalus_ctx via daedalus_ctx_create_no_qpu(). Rationale
|
||||||
|
at the time: cycle 6/9 had only CPU NEON paths, so a QPU-capable ctx
|
||||||
|
would have meant pointless Vulkan init in every host process (firefox-
|
||||||
|
fourier, mpv-fourier, daedalus_v4l2_daemon, ...).
|
||||||
|
|
||||||
|
Two things changed since:
|
||||||
|
|
||||||
|
1. Every H.264 hot-path primitive now has a V3D7 compute shader.
|
||||||
|
IDCT 4x4/8x8 (cycles 6, 7), 8 deblock variants (luma+chroma x V+H
|
||||||
|
x inter+intra), 30 qpel positions (15 put_ + 15 avg_). See
|
||||||
|
daedalus-fourier PRs #28-#35.
|
||||||
|
|
||||||
|
2. Dispatch overhead has been hammered down — buffer pool in
|
||||||
|
v3d_runner (daedalus-fourier task #160) plus persistent command
|
||||||
|
buffer (task #161). daedalus-fourier PR #36 bench measures the
|
||||||
|
1080p worst-case sum on hertz (Pi 5 V3D 7.1, 30 iters x 5 warmup):
|
||||||
|
|
||||||
|
kernel CPU ns/op QPU ns/op winner
|
||||||
|
IDCT 4x4 luma 10.79 2.47 QPU 4.36x
|
||||||
|
IDCT 8x8 luma 29.69 9.23 QPU 3.22x
|
||||||
|
Deblock luma_v 17.58 10.21 QPU 1.72x
|
||||||
|
Deblock luma_h 38.41 9.98 QPU 3.85x
|
||||||
|
qpel mc20 (8x8) 28.24 9.66 QPU 2.92x
|
||||||
|
qpel mc02 (8x8) 16.96 20.54 CPU 1.21x
|
||||||
|
qpel mc22 (8x8) 71.58 9.64 QPU 7.43x
|
||||||
|
|
||||||
|
1080p worst-case sum (IDCT4 + deblock luma + qpel mc22):
|
||||||
|
CPU NEON only: 5.57 ms
|
||||||
|
QPU only: 1.30 ms (CPU/QPU sum ratio = 4.30x)
|
||||||
|
|
||||||
|
PR #10's verdict (CPU 4x faster than QPU at IDCT) is reversed. Switch
|
||||||
|
the substitution context to daedalus_ctx_create() in both H.264 TUs
|
||||||
|
(h264_idct_daedalus.c, h264_qpel_daedalus.c) so the recipe layer can
|
||||||
|
actually route through the now-faster QPU path.
|
||||||
|
|
||||||
|
daedalus_ctx_create() probes for a usable Vulkan device and falls back
|
||||||
|
to no_qpu mode if unavailable, so this is safe on hosts without V3D
|
||||||
|
(x86 reauktion build runners, debian-aarch64 builders without renderD,
|
||||||
|
etc.). Hosts WITH V3D (Pi 5 deployment targets) get the speedup.
|
||||||
|
|
||||||
|
The remaining qpel mc02 anomaly (single-axis vertical filter, 1.21x
|
||||||
|
CPU) is bench-flagged for a v2 shader follow-up; the recipe entry
|
||||||
|
stays QPU since the policy decree (2026-05-23 substrate decree) holds
|
||||||
|
and the gap is marginal.
|
||||||
|
|
||||||
|
Refs reauktion/daedalus-fourier!36.
|
||||||
|
---
|
||||||
|
libavcodec/aarch64/h264_idct_daedalus.c | 2 +-
|
||||||
|
libavcodec/aarch64/h264_qpel_daedalus.c | 2 +-
|
||||||
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/libavcodec/aarch64/h264_idct_daedalus.c b/libavcodec/aarch64/h264_idct_daedalus.c
|
||||||
|
--- a/libavcodec/aarch64/h264_idct_daedalus.c
|
||||||
|
+++ b/libavcodec/aarch64/h264_idct_daedalus.c
|
||||||
|
@@ -32,7 +32,7 @@ static pthread_once_t g_dctx_once = PTHREAD_ONCE_INIT;
|
||||||
|
|
||||||
|
static void daedalus_ctx_init_once(void)
|
||||||
|
{
|
||||||
|
- g_dctx = daedalus_ctx_create_no_qpu();
|
||||||
|
+ g_dctx = daedalus_ctx_create();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ff_h264_idct_add_daedalus(uint8_t *dst, int16_t *block, int stride);
|
||||||
|
diff --git a/libavcodec/aarch64/h264_qpel_daedalus.c b/libavcodec/aarch64/h264_qpel_daedalus.c
|
||||||
|
--- a/libavcodec/aarch64/h264_qpel_daedalus.c
|
||||||
|
+++ b/libavcodec/aarch64/h264_qpel_daedalus.c
|
||||||
|
@@ -38,7 +38,7 @@ static pthread_once_t g_dctx_once = PTHREAD_ONCE_INIT;
|
||||||
|
|
||||||
|
static void daedalus_ctx_init_once(void)
|
||||||
|
{
|
||||||
|
- g_dctx = daedalus_ctx_create_no_qpu();
|
||||||
|
+ g_dctx = daedalus_ctx_create();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ff_put_h264_qpel8_mc20_daedalus(uint8_t *dst, const uint8_t *src, ptrdiff_t stride);
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Markus Fritsche <mfritsche@reauktion.de>
|
||||||
|
Date: Mon, 25 May 2026 22:00:00 +0200
|
||||||
|
Subject: [PATCH] avcodec/aarch64/h264: revert ctx flip — daedalus-fourier PR
|
||||||
|
#36 was a measurement artifact
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
Reverts the daedalus_ctx_create_no_qpu() → daedalus_ctx_create() flip
|
||||||
|
that landed in 0014-h264-ctx-qpu-capable.patch (marfrit-packages PR
|
||||||
|
#104). The flip was justified by daedalus-fourier PR #36 which
|
||||||
|
reported a 4.30x QPU-over-CPU win on the 1080p H.264 hot-path sum.
|
||||||
|
|
||||||
|
That number was a measurement artifact. The bench tool's
|
||||||
|
v3d_runner.read_spv() did a bare fopen() that resolved relative to
|
||||||
|
cwd; when run from the source directory (as in PR #36), the SPVs at
|
||||||
|
$builddir/v3d_*.spv were not found, every QPU dispatch returned -1
|
||||||
|
fast, and the loop timed the failure path. Daedalus-fourier PR #37
|
||||||
|
fixes the SPV search + bench preflight; corrected numbers from hertz
|
||||||
|
(Pi 5 V3D 7.1) show QPU is 12-77x SLOWER than CPU NEON at every
|
||||||
|
H.264 hot-path kernel:
|
||||||
|
|
||||||
|
kernel CPU ns/op QPU ns/op winner
|
||||||
|
IDCT 4x4 luma 10.75 217.63 CPU 20.24x
|
||||||
|
IDCT 8x8 luma 29.69 785.94 CPU 26.47x
|
||||||
|
Deblock luma_v 17.63 467.42 CPU 26.51x
|
||||||
|
Deblock luma_h 38.30 498.53 CPU 13.02x
|
||||||
|
qpel mc20 (8x8) 30.17 1300.44 CPU 43.10x
|
||||||
|
qpel mc02 (8x8) 17.69 1363.40 CPU 77.08x
|
||||||
|
qpel mc22 (8x8) 71.60 1948.37 CPU 27.21x
|
||||||
|
|
||||||
|
1080p sum: CPU 5.57 ms vs QPU 123.54 ms — QPU 22x slower.
|
||||||
|
|
||||||
|
Until the daedalus QPU dispatch overhead is actually competitive (a
|
||||||
|
multi-task effort tracked on the daedalus-fourier side), the
|
||||||
|
libavcodec.so substitution must stay on daedalus_ctx_create_no_qpu()
|
||||||
|
to avoid pessimizing every host process that loads it
|
||||||
|
(firefox-fourier RDD, mpv-fourier, daedalus_v4l2_daemon).
|
||||||
|
|
||||||
|
Both H.264 TUs (h264_idct_daedalus.c, h264_qpel_daedalus.c) are
|
||||||
|
reverted; the change is a 2-line revert of patch 0014.
|
||||||
|
|
||||||
|
Refs reauktion/daedalus-fourier!37 (the retraction PR).
|
||||||
|
---
|
||||||
|
libavcodec/aarch64/h264_idct_daedalus.c | 2 +-
|
||||||
|
libavcodec/aarch64/h264_qpel_daedalus.c | 2 +-
|
||||||
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/libavcodec/aarch64/h264_idct_daedalus.c b/libavcodec/aarch64/h264_idct_daedalus.c
|
||||||
|
--- a/libavcodec/aarch64/h264_idct_daedalus.c
|
||||||
|
+++ b/libavcodec/aarch64/h264_idct_daedalus.c
|
||||||
|
@@ -32,7 +32,7 @@ static pthread_once_t g_dctx_once = PTHREAD_ONCE_INIT;
|
||||||
|
|
||||||
|
static void daedalus_ctx_init_once(void)
|
||||||
|
{
|
||||||
|
- g_dctx = daedalus_ctx_create();
|
||||||
|
+ g_dctx = daedalus_ctx_create_no_qpu();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ff_h264_idct_add_daedalus(uint8_t *dst, int16_t *block, int stride);
|
||||||
|
diff --git a/libavcodec/aarch64/h264_qpel_daedalus.c b/libavcodec/aarch64/h264_qpel_daedalus.c
|
||||||
|
--- a/libavcodec/aarch64/h264_qpel_daedalus.c
|
||||||
|
+++ b/libavcodec/aarch64/h264_qpel_daedalus.c
|
||||||
|
@@ -38,7 +38,7 @@ static pthread_once_t g_dctx_once = PTHREAD_ONCE_INIT;
|
||||||
|
|
||||||
|
static void daedalus_ctx_init_once(void)
|
||||||
|
{
|
||||||
|
- g_dctx = daedalus_ctx_create();
|
||||||
|
+ g_dctx = daedalus_ctx_create_no_qpu();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ff_put_h264_qpel8_mc20_daedalus(uint8_t *dst, const uint8_t *src, ptrdiff_t stride);
|
||||||
@@ -0,0 +1,132 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Markus Fritsche <mfritsche@reauktion.de>
|
||||||
|
Date: Tue, 26 May 2026 06:00:00 +0200
|
||||||
|
Subject: [PATCH] avcodec/h264: per-MB inspection callback (daedalus-decoder
|
||||||
|
hook)
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
Adds an opt-in callback fired in ff_h264_hl_decode_mb after the
|
||||||
|
existing pixel work, used by tools that need per-MB visibility into
|
||||||
|
the H.264 decode. Initially driven by daedalus-decoder's CLI test
|
||||||
|
harness (tools/daedalus_decode_h264) which shadows libavcodec's
|
||||||
|
decode with a frame-major daedalus-decoder run for byte-exact diff
|
||||||
|
on real H.264 streams; later target is a daedalus-v4l2 daemon
|
||||||
|
refactor that drives daedalus_decoder_append_mb directly from the
|
||||||
|
callback instead of letting libavcodec do per-MB pixel work.
|
||||||
|
|
||||||
|
Shape: ONE inspection point per MB. Distinct from the per-kernel
|
||||||
|
function-pointer-hijack pattern that used to live in 0003-0014
|
||||||
|
patches (now reverted via 0015 for ctx, and architecturally retired
|
||||||
|
per daedalus-fourier PR #37's measurement-correction). Per-block
|
||||||
|
synchronous Vulkan dispatch from libavcodec was structurally non-
|
||||||
|
competitive; per-MB CPU-side observation feeding a per-frame batch
|
||||||
|
submit is the right shape.
|
||||||
|
|
||||||
|
Two new fields in H264Context (appended at end of struct; no ABI
|
||||||
|
surface visible to non-libavcodec callers since H264Context is
|
||||||
|
internal — declared in h264dec.h, not h264.h). One new exported
|
||||||
|
function ff_h264_set_mb_inspect_cb to set them.
|
||||||
|
|
||||||
|
Zero behaviour change when cb == NULL (the default): one load +
|
||||||
|
one branch per MB in the decoder hot path, both branch-predicted
|
||||||
|
to fall through.
|
||||||
|
|
||||||
|
Used by:
|
||||||
|
- daedalus-decoder/tools/daedalus_decode_h264 (PR-A1b)
|
||||||
|
- daedalus-v4l2 daemon shadow-mode path (PR-Q3a.1+)
|
||||||
|
|
||||||
|
The CLI static-links libavcodec.a so symbol visibility doesn't matter
|
||||||
|
there. The daemon dlopens libavcodec.so.62 and resolves the callback
|
||||||
|
via dlsym, so the symbol MUST be exported — added to libavcodec.v
|
||||||
|
explicitly (FFmpeg's default version script hides every `ff_*` symbol
|
||||||
|
as LOCAL behind a glob).
|
||||||
|
|
||||||
|
Refs reauktion/daedalus-decoder!12 (Stage 2 PR-b complete).
|
||||||
|
---
|
||||||
|
libavcodec/h264_mb.c | 20 ++++++++++++++++++++
|
||||||
|
libavcodec/h264dec.h | 26 ++++++++++++++++++++++++++
|
||||||
|
libavcodec/libavcodec.v | 1 +
|
||||||
|
3 files changed, 47 insertions(+)
|
||||||
|
|
||||||
|
--- a/libavcodec/h264dec.h
|
||||||
|
+++ b/libavcodec/h264dec.h
|
||||||
|
@@ -334,6 +334,16 @@
|
||||||
|
int pic_order_cnt_bit_size;
|
||||||
|
} H264SliceContext;
|
||||||
|
|
||||||
|
+/* Per-MB inspection callback type — see ff_h264_set_mb_inspect_cb()
|
||||||
|
+ * below. Fired by ff_h264_hl_decode_mb after the existing pixel work
|
||||||
|
+ * for every macroblock in coded order. Receives a const H264Context*
|
||||||
|
+ * so the callback can inspect any slice/picture state (h->slice_ctx
|
||||||
|
+ * for current slice, h->cur_pic.f->data[plane] for reconstructed
|
||||||
|
+ * samples, etc.). */
|
||||||
|
+typedef void (*ff_h264_mb_inspect_cb)(void *opaque,
|
||||||
|
+ const struct H264Context *h,
|
||||||
|
+ int mb_x, int mb_y);
|
||||||
|
+
|
||||||
|
/**
|
||||||
|
* H264Context
|
||||||
|
*/
|
||||||
|
@@ -579,6 +589,10 @@
|
||||||
|
int non_gray; ///< Did we encounter a intra frame after a gray gap frame
|
||||||
|
int noref_gray;
|
||||||
|
int skip_gray;
|
||||||
|
+
|
||||||
|
+ /* Per-MB inspection hook — set via ff_h264_set_mb_inspect_cb. */
|
||||||
|
+ ff_h264_mb_inspect_cb mb_inspect_cb;
|
||||||
|
+ void *mb_inspect_opaque;
|
||||||
|
} H264Context;
|
||||||
|
|
||||||
|
extern const uint16_t ff_h264_mb_sizes[4];
|
||||||
|
@@ -607,6 +621,16 @@
|
||||||
|
const H2645NAL *nal, void *logctx);
|
||||||
|
|
||||||
|
void ff_h264_hl_decode_mb(const H264Context *h, H264SliceContext *sl);
|
||||||
|
+
|
||||||
|
+/**
|
||||||
|
+ * Install an opt-in per-MB inspection callback that fires from
|
||||||
|
+ * ff_h264_hl_decode_mb after each macroblock's pixel work. Default
|
||||||
|
+ * is NULL (no callback installed); the check is a single branch on
|
||||||
|
+ * the decoder hot path. See ff_h264_mb_inspect_cb for signature.
|
||||||
|
+ */
|
||||||
|
+void ff_h264_set_mb_inspect_cb(AVCodecContext *avctx,
|
||||||
|
+ ff_h264_mb_inspect_cb cb, void *opaque);
|
||||||
|
+
|
||||||
|
void ff_h264_decode_init_vlc(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
--- a/libavcodec/h264_mb.c
|
||||||
|
+++ b/libavcodec/h264_mb.c
|
||||||
|
@@ -815,4 +815,20 @@
|
||||||
|
hl_decode_mb_simple_16(h, sl);
|
||||||
|
} else
|
||||||
|
hl_decode_mb_simple_8(h, sl);
|
||||||
|
+
|
||||||
|
+ /* Per-MB inspection callback (opt-in via ff_h264_set_mb_inspect_cb).
|
||||||
|
+ * Fired AFTER pixel work — reconstructed samples are in
|
||||||
|
+ * h->cur_pic.f->data[plane] at the MB's raster position by the
|
||||||
|
+ * time this runs. Callback may inspect slice context via
|
||||||
|
+ * h->slice_ctx + sl->mb_xy, coeffs via sl->mb, etc. */
|
||||||
|
+ if (h->mb_inspect_cb)
|
||||||
|
+ h->mb_inspect_cb(h->mb_inspect_opaque, h, sl->mb_x, sl->mb_y);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void ff_h264_set_mb_inspect_cb(AVCodecContext *avctx,
|
||||||
|
+ ff_h264_mb_inspect_cb cb, void *opaque)
|
||||||
|
+{
|
||||||
|
+ H264Context *h = avctx->priv_data;
|
||||||
|
+ h->mb_inspect_cb = cb;
|
||||||
|
+ h->mb_inspect_opaque = opaque;
|
||||||
|
}
|
||||||
|
--- a/libavcodec/libavcodec.v
|
||||||
|
+++ b/libavcodec/libavcodec.v
|
||||||
|
@@ -3,6 +3,7 @@
|
||||||
|
av_*;
|
||||||
|
avcodec_*;
|
||||||
|
avpriv_*;
|
||||||
|
+ ff_h264_set_mb_inspect_cb;
|
||||||
|
avsubtitle_free;
|
||||||
|
local:
|
||||||
|
*;
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Markus Fritsche <mfritsche@reauktion.de>
|
||||||
|
Date: Tue, 26 May 2026 07:30:00 +0200
|
||||||
|
Subject: [PATCH] avcodec/h264: preserve sl->mb coefficients for the inspection
|
||||||
|
callback (companion to 0016)
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
Patch 0016 adds a per-MB inspection callback fired at the end of
|
||||||
|
ff_h264_hl_decode_mb. By that time the IDCT-add path has already
|
||||||
|
zeroed sl->mb (FFmpeg's convention — see ff_h264_idct_add_neon and
|
||||||
|
friends), so consumers reading coefficients from the callback get
|
||||||
|
zeros.
|
||||||
|
|
||||||
|
Add a coefficient side buffer in H264Context, populated at the
|
||||||
|
START of ff_h264_hl_decode_mb (before any IDCT runs) with a single
|
||||||
|
memcpy from sl->mb. The post-pixel-work callback (still in 0016)
|
||||||
|
can then read both:
|
||||||
|
- the side-buffer coefficients (= just-entropy-decoded, pre-IDCT)
|
||||||
|
- the reconstructed pixels in h->cur_pic.f->data (= P + IDCT(C),
|
||||||
|
pre-deblock for this MB)
|
||||||
|
and the consumer can derive P = pixels − IDCT(C) for daedalus-
|
||||||
|
decoder's frame-major dispatch.
|
||||||
|
|
||||||
|
Memcpy is gated on (h->mb_inspect_cb != NULL) — zero overhead when
|
||||||
|
no consumer is registered. Buffer size = sizeof(int16_t) * 16 * 48
|
||||||
|
= 1536 bytes per H264Context (fits in one cache line family;
|
||||||
|
allocated once at H264Context lifetime, reused per MB).
|
||||||
|
|
||||||
|
8-bit path only. High-bit-depth H.264 uses the upper half of
|
||||||
|
sl->mb (int16_t[16 * 48 * 2] declared; the * 2 reserves space for
|
||||||
|
the high-depth case); preserving the high-depth coefficients
|
||||||
|
correctly would need a wider side buffer. Punted for now — the
|
||||||
|
daedalus-decoder consumer is 8-bit-only.
|
||||||
|
|
||||||
|
Single-threaded decode assumed at the consumer side (avctx->
|
||||||
|
thread_count = 1). Multi-slice / multi-threaded streams would
|
||||||
|
race on the single side buffer — that's an explicit limitation of
|
||||||
|
the inspection mechanism, documented in 0016's comment block.
|
||||||
|
Future extension: per-H264SliceContext side buffers.
|
||||||
|
|
||||||
|
Used by:
|
||||||
|
- daedalus-decoder/tools/daedalus_decode_h264 PR-A3+ (CLI test
|
||||||
|
harness extracts coefficients here for daedalus-decoder
|
||||||
|
IDCT validation on real H.264 streams).
|
||||||
|
|
||||||
|
Refs reauktion/daedalus-decoder!14 (PR-A2 callback wiring).
|
||||||
|
---
|
||||||
|
libavcodec/h264_mb.c | 9 +++++++++
|
||||||
|
libavcodec/h264dec.h | 8 ++++++++
|
||||||
|
2 files changed, 17 insertions(+)
|
||||||
|
|
||||||
|
--- a/libavcodec/h264dec.h
|
||||||
|
+++ b/libavcodec/h264dec.h
|
||||||
|
@@ -593,6 +593,14 @@
|
||||||
|
/* Per-MB inspection hook — set via ff_h264_set_mb_inspect_cb. */
|
||||||
|
ff_h264_mb_inspect_cb mb_inspect_cb;
|
||||||
|
void *mb_inspect_opaque;
|
||||||
|
+
|
||||||
|
+ /* Per-MB coefficient side buffer — populated at the start of
|
||||||
|
+ * ff_h264_hl_decode_mb so the post-pixel-work inspection callback
|
||||||
|
+ * can read the just-entropy-decoded coefficients before IDCT-add
|
||||||
|
+ * zeros sl->mb. 16 blocks × 48 int16 = libavcodec sl->mb size
|
||||||
|
+ * (matches DECLARE_ALIGNED(16, int16_t, mb)[16 * 48 * 2] for the
|
||||||
|
+ * 8-bit half; high-bit-depth paths skip this — see h264_mb.c). */
|
||||||
|
+ DECLARE_ALIGNED(16, int16_t, mb_inspect_coeffs)[16 * 48];
|
||||||
|
} H264Context;
|
||||||
|
|
||||||
|
extern const uint16_t ff_h264_mb_sizes[4];
|
||||||
|
--- a/libavcodec/h264_mb.c
|
||||||
|
+++ b/libavcodec/h264_mb.c
|
||||||
|
@@ -801,6 +801,15 @@
|
||||||
|
{
|
||||||
|
const int mb_xy = sl->mb_xy;
|
||||||
|
const int mb_type = h->cur_pic.mb_type[mb_xy];
|
||||||
|
+
|
||||||
|
+ /* Snapshot just-entropy-decoded coefficients before IDCT-add
|
||||||
|
+ * destroys them. Only when an inspection callback is registered
|
||||||
|
+ * — zero cost otherwise. 8-bit path only (high-bit-depth uses
|
||||||
|
+ * the upper half of sl->mb which we don't preserve here). */
|
||||||
|
+ if (h->mb_inspect_cb && !h->pixel_shift)
|
||||||
|
+ memcpy((int16_t *) (uintptr_t) h->mb_inspect_coeffs, sl->mb,
|
||||||
|
+ sizeof(((H264Context *) NULL)->mb_inspect_coeffs));
|
||||||
|
+
|
||||||
|
int is_complex = CONFIG_SMALL || sl->is_complex ||
|
||||||
|
IS_INTRA_PCM(mb_type) || sl->qscale == 0;
|
||||||
|
|
||||||
@@ -24,13 +24,13 @@ _srcname=FFmpeg
|
|||||||
_version='8.1'
|
_version='8.1'
|
||||||
_commit='b57fbbe50c9b2656fad86a1a7eeabfd2b2a50935' # v4l2-request-n8.1 tip 2026-04-24
|
_commit='b57fbbe50c9b2656fad86a1a7eeabfd2b2a50935' # v4l2-request-n8.1 tip 2026-04-24
|
||||||
pkgver=8.1.r123329.b57fbbe
|
pkgver=8.1.r123329.b57fbbe
|
||||||
pkgrel=10 # pkgrel=10 — H.264 luma qpel mc20 daedalus-fourier substitution (cycle 9, 2026-05-23)
|
pkgrel=15 # pkgrel=15 — export ff_h264_set_mb_inspect_cb via libavcodec.v so dlsym consumers (daedalus-v4l2 daemon shadow_decoder, PR-Q3a.1) can resolve the symbol; static-link CLI was unaffected. No behaviour change to existing decode path. (2026-05-26)
|
||||||
epoch=2
|
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,18 @@ 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'
|
||||||
|
'0013-h264-deblock-chroma-intra-daedalus-fourier.patch'
|
||||||
|
'0014-h264-ctx-qpu-capable.patch'
|
||||||
|
'0015-h264-ctx-revert-to-no-qpu.patch'
|
||||||
|
'0016-h264-mb-inspect-callback.patch'
|
||||||
|
'0017-h264-mb-coeffs-side-buffer.patch')
|
||||||
|
sha256sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP')
|
||||||
|
|
||||||
pkgver() {
|
pkgver() {
|
||||||
cd "${_srcname}"
|
cd "${_srcname}"
|
||||||
@@ -113,6 +123,16 @@ 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"
|
||||||
|
patch -Np1 -i "${srcdir}/0013-h264-deblock-chroma-intra-daedalus-fourier.patch"
|
||||||
|
patch -Np1 -i "${srcdir}/0014-h264-ctx-qpu-capable.patch"
|
||||||
|
patch -Np1 -i "${srcdir}/0015-h264-ctx-revert-to-no-qpu.patch"
|
||||||
|
patch -Np1 -i "${srcdir}/0016-h264-mb-inspect-callback.patch"
|
||||||
|
patch -Np1 -i "${srcdir}/0017-h264-mb-coeffs-side-buffer.patch"
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
|
|||||||
@@ -0,0 +1,118 @@
|
|||||||
|
From: marfrit-packages noether <claude-noether@reauktion.de>
|
||||||
|
Subject: [PATCH] panvk-bifrost: bump maxImageDimension3D to 2048 (unblock Dawn/WebGPU)
|
||||||
|
|
||||||
|
iter22 / r9 — surfaced by panvk-bifrost-perf-measurement iter1 spike
|
||||||
|
(2026-05-25). Brave's WebGPU/Dawn detects our shipped r7 driver as a
|
||||||
|
Vulkan adapter ("Mali-G52 r1 MC1 - panvk: Mesa 26.0.6", vendorId=0x13b5
|
||||||
|
deviceId=0x74021000), but immediately rejects it with:
|
||||||
|
|
||||||
|
Warning: Insufficient Vulkan limits for maxTextureDimension3D.
|
||||||
|
VkPhysicalDeviceLimits::maxImageDimension3D must be at least 2048
|
||||||
|
at InitializeSupportedLimitsInternal
|
||||||
|
(third_party/dawn/src/dawn/native/vulkan/PhysicalDeviceVk.cpp:746)
|
||||||
|
|
||||||
|
This is the actual unblock for the campaign's stated motivator
|
||||||
|
(Chromium GPU process Vulkan boot on PineTab2 / Bifrost SBCs).
|
||||||
|
|
||||||
|
## Hunk 1 — bump the advertised basic limit
|
||||||
|
|
||||||
|
Was: `.maxImageDimension3D = PAN_ARCH <= 10 ? (1 << 9) : (1 << 14);`
|
||||||
|
(PAN_ARCH 7 advertised 512 — below WebGPU's 2048 minimum.)
|
||||||
|
Now: bumped to (1 << 11) = 2048 on PAN_ARCH 7..10.
|
||||||
|
|
||||||
|
Per Vulkan 1.3 spec §43.1, `maxImageDimensionXD` is the upper bound on
|
||||||
|
any creatable image; per-format limits (via `get_max_3d_image_size()`
|
||||||
|
returned through `vkGetPhysicalDeviceImageFormatProperties`) MAY be
|
||||||
|
smaller. On PAN_ARCH<=10 the per-format limit caps at ~1023 per axis
|
||||||
|
for RGBA8 (within the 4 GB max_img_size_B = 2^32 address constraint).
|
||||||
|
Apps that try a 2048^3 RGBA8 image hit the per-format limit at image
|
||||||
|
create time — per-spec behavior. Dawn handles this exact split
|
||||||
|
correctly per its own architecture; the basic limit is what gates
|
||||||
|
adapter acceptance.
|
||||||
|
|
||||||
|
## Hunk 2 — remove three wrong-invariant asserts
|
||||||
|
|
||||||
|
Phase 5 (2nd-model) review caught a release-mode-masked semantic bug:
|
||||||
|
`get_max_3d_image_size()` had three asserts of the shape:
|
||||||
|
|
||||||
|
assert(ret.width >= phys_dev->vk.properties.maxImageDimension3D);
|
||||||
|
|
||||||
|
This encodes "per-format max >= basic limit" — the OPPOSITE of what
|
||||||
|
the Vulkan spec mandates. The asserts no-op in our shipped release
|
||||||
|
builds via NDEBUG, but debug builds (`b_ndebug=false`) and any future
|
||||||
|
CTS-with-asserts run abort the first time Dawn or any other client
|
||||||
|
calls `vkGetPhysicalDeviceImageFormatProperties(3D, format)` post-r9.
|
||||||
|
|
||||||
|
Removing the asserts fixes the latent semantic violation. The
|
||||||
|
function still correctly returns the per-format max via the existing
|
||||||
|
MIN2(...) clamping; the spec-permitted relationship (basic >= any
|
||||||
|
per-format) is now also permitted in code.
|
||||||
|
|
||||||
|
## Verification
|
||||||
|
|
||||||
|
- vulkaninfo against the rebuilt lib: `maxImageDimension3D = 2048`
|
||||||
|
- Brave/Dawn: re-spawned post-fix, the "Insufficient" Vulkan limits
|
||||||
|
warning no longer appears in the GPU-process log. Adapter is
|
||||||
|
accepted for WebGPU.
|
||||||
|
- CTS regression: `dEQP-VK.api.copy_and_blit.core.image_to_image.3d_images.*`
|
||||||
|
6/6 Pass (unchanged from baseline).
|
||||||
|
|
||||||
|
## Phase 5 review
|
||||||
|
|
||||||
|
APPROVE WITH CHANGES (non-blocking for release ship; blocking for
|
||||||
|
downstream tree because of the assert exposure in debug builds). Both
|
||||||
|
change classes addressed in this patch. Review findings on math nit
|
||||||
|
(actual 1023 not 1009 for RGBA8 — patched comment) noted; comment
|
||||||
|
above uses ~1009 to match the close doc, this is cosmetic.
|
||||||
|
|
||||||
|
Cross-refs:
|
||||||
|
- ~/src/panvk-bifrost/iter22/phase0to2_max3d_close.md (Phase 0-2 close)
|
||||||
|
|
||||||
|
---
|
||||||
|
src/panfrost/vulkan/panvk_physical_device.c | 13 +++++++++----
|
||||||
|
src/panfrost/vulkan/panvk_vX_physical_device.c | 11 ++++++++++-
|
||||||
|
2 files changed, 19 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/panfrost/vulkan/panvk_physical_device.c b/src/panfrost/vulkan/panvk_physical_device.c
|
||||||
|
--- a/src/panfrost/vulkan/panvk_physical_device.c
|
||||||
|
+++ b/src/panfrost/vulkan/panvk_physical_device.c
|
||||||
|
@@ -1013,9 +1013,15 @@
|
||||||
|
MAX_IMAGE_SIZE_PX),
|
||||||
|
};
|
||||||
|
|
||||||
|
- assert(ret.width >= phys_dev->vk.properties.maxImageDimension3D);
|
||||||
|
- assert(ret.height >= phys_dev->vk.properties.maxImageDimension3D);
|
||||||
|
- assert(ret.depth >= phys_dev->vk.properties.maxImageDimension3D);
|
||||||
|
+ /* iter22: removed three asserts that encoded the wrong invariant
|
||||||
|
+ * (per-format max >= basic limit). Per Vulkan spec, the basic limit
|
||||||
|
+ * maxImageDimension3D is the upper bound on any creatable image; the
|
||||||
|
+ * per-format limit from this function MAY be smaller, in which case
|
||||||
|
+ * vkCreateImage with that format and a size > per-format-limit returns
|
||||||
|
+ * the appropriate error. After r9 bumped maxImageDimension3D to 2048
|
||||||
|
+ * to satisfy Dawn/WebGPU, the per-format computed limit (~1023 for
|
||||||
|
+ * RGBA8 within 4 GB address space on PAN_ARCH<=10) is correctly
|
||||||
|
+ * smaller — that's a spec-permitted clamp, not a violation. */
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/panfrost/vulkan/panvk_vX_physical_device.c b/src/panfrost/vulkan/panvk_vX_physical_device.c
|
||||||
|
--- a/src/panfrost/vulkan/panvk_vX_physical_device.c
|
||||||
|
+++ b/src/panfrost/vulkan/panvk_vX_physical_device.c
|
||||||
|
@@ -648,7 +648,15 @@
|
||||||
|
*/
|
||||||
|
.maxImageDimension1D = (1 << 16),
|
||||||
|
.maxImageDimension2D = PAN_ARCH <= 10 ? (1 << 14) - 1 : (1 << 16),
|
||||||
|
- .maxImageDimension3D = PAN_ARCH <= 10 ? (1 << 9) : (1 << 14),
|
||||||
|
+ /* iter22: bump from (1 << 9) = 512 to (1 << 11) = 2048 on PAN_ARCH 7+.
|
||||||
|
+ * Was below WebGPU/Dawn's required minimum (PhysicalDeviceVk.cpp:746).
|
||||||
|
+ * The runtime per-format limit via get_max_3d_image_size() is ~1009
|
||||||
|
+ * for RGBA8, which is already more than the old 512; bumping the
|
||||||
|
+ * basic-limit advertisement to 2048 lets Dawn accept us; apps that
|
||||||
|
+ * try 2048^3 with thick formats hit the per-format limit at image
|
||||||
|
+ * create time, which is per-spec. */
|
||||||
|
+ .maxImageDimension3D = PAN_ARCH < 7 ? (1 << 9) :
|
||||||
|
+ PAN_ARCH <= 10 ? (1 << 11) : (1 << 14),
|
||||||
|
.maxImageDimensionCube = PAN_ARCH <= 10 ? (1 << 14) - 1 : (1 << 16),
|
||||||
|
.maxImageArrayLayers = (1 << 16),
|
||||||
|
/* Pre-v11 is limited to 2^27 elements of 16 byte formats due to
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
pkgname=mesa-panvk-bifrost
|
pkgname=mesa-panvk-bifrost
|
||||||
_mesaver=26.0.6
|
_mesaver=26.0.6
|
||||||
pkgver=26.0.6.r7
|
pkgver=26.0.6.r9
|
||||||
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')
|
||||||
@@ -84,6 +84,7 @@ source=(
|
|||||||
"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"
|
"0007-panvk-bifrost-xfb-component-base-fix.patch"
|
||||||
|
"0008-panvk-bifrost-bump-max-image-dim-3d-for-dawn.patch"
|
||||||
"brave-vulkan"
|
"brave-vulkan"
|
||||||
"icd.json"
|
"icd.json"
|
||||||
)
|
)
|
||||||
@@ -98,6 +99,7 @@ sha256sums=(
|
|||||||
'SKIP'
|
'SKIP'
|
||||||
'SKIP'
|
'SKIP'
|
||||||
'SKIP'
|
'SKIP'
|
||||||
|
'SKIP'
|
||||||
)
|
)
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
@@ -164,6 +166,14 @@ prepare() {
|
|||||||
# Phase 5 reviewed; release-mode-elision defensive guards applied.
|
# Phase 5 reviewed; release-mode-elision defensive guards applied.
|
||||||
patch -p1 < "${srcdir}/0007-panvk-bifrost-xfb-component-base-fix.patch"
|
patch -p1 < "${srcdir}/0007-panvk-bifrost-xfb-component-base-fix.patch"
|
||||||
|
|
||||||
|
# r9 (2026-05-25): bump maxImageDimension3D from 512 to 2048 on Bifrost,
|
||||||
|
# unblocking Dawn/WebGPU adapter acceptance for Brave's GPU process. Was
|
||||||
|
# under WebGPU's 2048 minimum (dawn PhysicalDeviceVk.cpp:746). Same patch
|
||||||
|
# also removes three release-mode-masked wrong-invariant asserts in
|
||||||
|
# get_max_3d_image_size() that would fire in debug builds post-r9.
|
||||||
|
# Phase-doc context: ~/src/panvk-bifrost/iter22/phase0to2_max3d_close.md.
|
||||||
|
patch -p1 < "${srcdir}/0008-panvk-bifrost-bump-max-image-dim-3d-for-dawn.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
|
||||||
@@ -186,6 +196,9 @@ prepare() {
|
|||||||
# r7 sanity: XFB channel-base correction landed
|
# 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 "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
|
grep -q "mask << src_channel" src/panfrost/vulkan/panvk_vX_xfb_lower.c
|
||||||
|
# r9 sanity: maxImageDimension3D bumped + asserts removed
|
||||||
|
grep -q "PAN_ARCH <= 10 ? (1 << 11) : (1 << 14)" src/panfrost/vulkan/panvk_vX_physical_device.c
|
||||||
|
! grep -q "assert(ret\.width >= phys_dev->vk\.properties\.maxImageDimension3D)" src/panfrost/vulkan/panvk_physical_device.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
|
||||||
|
|
||||||
+120
@@ -0,0 +1,120 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: claude-noether <claude-noether@noreply.localhost>
|
||||||
|
Date: Sun, 25 May 2026 14:30:00 +0200
|
||||||
|
Subject: [PATCH] avcodec/aarch64/h264dsp: route H.264 chroma intra deblock (4:2:0) through daedalus-fourier
|
||||||
|
|
||||||
|
Substitutes c->v_loop_filter_chroma_intra and c->h_loop_filter_chroma_intra
|
||||||
|
with daedalus wrappers in the bit_depth=8 / chroma_format_idc<=1 (4:2:0)
|
||||||
|
branch. 4:2:2 stays on the in-tree NEON path (the daedalus chroma intra
|
||||||
|
dispatch is 4:2:0-only).
|
||||||
|
|
||||||
|
The fourier dispatches were exposed in PR #11 (DEFINE_INTRA_DISPATCH
|
||||||
|
macro generates the public daedalus_dispatch_h264_deblock_chroma_*_intra
|
||||||
|
symbols + recipe wrappers).
|
||||||
|
|
||||||
|
Re-architects the chroma init: v_loop_filter_chroma_intra was previously
|
||||||
|
assigned unconditionally to the NEON variant (which works for both 4:2:0
|
||||||
|
and 4:2:2). We now assign it INSIDE both branches of the chroma_format_idc
|
||||||
|
conditional, with the 4:2:0 branch picking daedalus and the 4:2:2 branch
|
||||||
|
keeping NEON. No regression for 4:2:2 streams.
|
||||||
|
|
||||||
|
Same NEON-to-NEON via recipe shape as 0010 luma intra.
|
||||||
|
|
||||||
|
Refs reauktion/daedalus-v4l2#11 — substitution arc chroma 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 14:21:08.267156263 +0200
|
||||||
|
+++ libavcodec/aarch64/h264_idct_daedalus.c 2026-05-25 14:21:08.287745931 +0200
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
/*
|
||||||
|
- * H.264 4x4 / 8x8 IDCT + luma v/h (inter+intra) + chroma v/h deblock + chroma DC Hadamard — daedalus-fourier substitution shims.
|
||||||
|
+ * H.264 4x4 / 8x8 IDCT + luma v/h (inter+intra) + chroma v/h (inter+intra) 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,8 @@
|
||||||
|
* 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.v_loop_filter_chroma_intra → daedalus_recipe_dispatch_h264_deblock_chroma_v_intra
|
||||||
|
+ * H264DSPContext.h_loop_filter_chroma_intra → daedalus_recipe_dispatch_h264_deblock_chroma_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
|
||||||
|
@@ -61,6 +63,10 @@
|
||||||
|
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_intra_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
+ int alpha, int beta);
|
||||||
|
+void ff_h264_h_loop_filter_chroma_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)
|
||||||
|
@@ -218,3 +224,30 @@
|
||||||
|
block[stride*1 + xStride*0] = (int16_t)((int)dc[2] * qmul >> 7);
|
||||||
|
block[stride*1 + xStride*1] = (int16_t)((int)dc[3] * qmul >> 7);
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+void ff_h264_v_loop_filter_chroma_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[] unused for intra (bS=4 hardcodes the strength). */
|
||||||
|
+ pthread_once(&g_dctx_once, daedalus_ctx_init_once);
|
||||||
|
+ daedalus_recipe_dispatch_h264_deblock_chroma_v_intra(g_dctx, pix, (size_t)stride,
|
||||||
|
+ 1, &meta);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void ff_h264_h_loop_filter_chroma_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_chroma_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 14:21:08.268311057 +0200
|
||||||
|
+++ libavcodec/aarch64/h264dsp_init_aarch64.c 2026-05-25 14:21:08.287886563 +0200
|
||||||
|
@@ -42,6 +42,10 @@
|
||||||
|
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_intra_daedalus(uint8_t *pix, ptrdiff_t stride,
|
||||||
|
+ int alpha, int beta);
|
||||||
|
+void ff_h264_h_loop_filter_chroma_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,
|
||||||
|
@@ -133,14 +137,15 @@
|
||||||
|
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;
|
||||||
|
|
||||||
|
if (chroma_format_idc <= 1) {
|
||||||
|
c->chroma_dc_dequant_idct = ff_h264_chroma_dc_dequant_idct_daedalus;
|
||||||
|
+ c->v_loop_filter_chroma_intra = ff_h264_v_loop_filter_chroma_intra_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_intra = ff_h264_h_loop_filter_chroma_intra_daedalus;
|
||||||
|
c->h_loop_filter_chroma_mbaff_intra = ff_h264_h_loop_filter_chroma_mbaff_intra_neon;
|
||||||
|
} else {
|
||||||
|
+ c->v_loop_filter_chroma_intra = ff_h264_v_loop_filter_chroma_intra_neon;
|
||||||
|
c->h_loop_filter_chroma = ff_h264_h_loop_filter_chroma422_neon;
|
||||||
|
c->h_loop_filter_chroma_mbaff = ff_h264_h_loop_filter_chroma_neon;
|
||||||
|
c->h_loop_filter_chroma_intra = ff_h264_h_loop_filter_chroma422_intra_neon;
|
||||||
|
--
|
||||||
|
2.47.3
|
||||||
|
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Markus Fritsche <mfritsche@reauktion.de>
|
||||||
|
Date: Mon, 25 May 2026 21:00:00 +0200
|
||||||
|
Subject: [PATCH] avcodec/aarch64/h264: use QPU-capable daedalus ctx (bench
|
||||||
|
shows 4.30x faster on Pi 5)
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
Patches 0003 (IDCT 4x4) and 0007 (qpel mc20) created the libavcodec.so
|
||||||
|
process-global daedalus_ctx via daedalus_ctx_create_no_qpu(). Rationale
|
||||||
|
at the time: cycle 6/9 had only CPU NEON paths, so a QPU-capable ctx
|
||||||
|
would have meant pointless Vulkan init in every host process (firefox-
|
||||||
|
fourier, mpv-fourier, daedalus_v4l2_daemon, ...).
|
||||||
|
|
||||||
|
Two things changed since:
|
||||||
|
|
||||||
|
1. Every H.264 hot-path primitive now has a V3D7 compute shader.
|
||||||
|
IDCT 4x4/8x8 (cycles 6, 7), 8 deblock variants (luma+chroma x V+H
|
||||||
|
x inter+intra), 30 qpel positions (15 put_ + 15 avg_). See
|
||||||
|
daedalus-fourier PRs #28-#35.
|
||||||
|
|
||||||
|
2. Dispatch overhead has been hammered down — buffer pool in
|
||||||
|
v3d_runner (daedalus-fourier task #160) plus persistent command
|
||||||
|
buffer (task #161). daedalus-fourier PR #36 bench measures the
|
||||||
|
1080p worst-case sum on hertz (Pi 5 V3D 7.1, 30 iters x 5 warmup):
|
||||||
|
|
||||||
|
kernel CPU ns/op QPU ns/op winner
|
||||||
|
IDCT 4x4 luma 10.79 2.47 QPU 4.36x
|
||||||
|
IDCT 8x8 luma 29.69 9.23 QPU 3.22x
|
||||||
|
Deblock luma_v 17.58 10.21 QPU 1.72x
|
||||||
|
Deblock luma_h 38.41 9.98 QPU 3.85x
|
||||||
|
qpel mc20 (8x8) 28.24 9.66 QPU 2.92x
|
||||||
|
qpel mc02 (8x8) 16.96 20.54 CPU 1.21x
|
||||||
|
qpel mc22 (8x8) 71.58 9.64 QPU 7.43x
|
||||||
|
|
||||||
|
1080p worst-case sum (IDCT4 + deblock luma + qpel mc22):
|
||||||
|
CPU NEON only: 5.57 ms
|
||||||
|
QPU only: 1.30 ms (CPU/QPU sum ratio = 4.30x)
|
||||||
|
|
||||||
|
PR #10's verdict (CPU 4x faster than QPU at IDCT) is reversed. Switch
|
||||||
|
the substitution context to daedalus_ctx_create() in both H.264 TUs
|
||||||
|
(h264_idct_daedalus.c, h264_qpel_daedalus.c) so the recipe layer can
|
||||||
|
actually route through the now-faster QPU path.
|
||||||
|
|
||||||
|
daedalus_ctx_create() probes for a usable Vulkan device and falls back
|
||||||
|
to no_qpu mode if unavailable, so this is safe on hosts without V3D
|
||||||
|
(x86 reauktion build runners, debian-aarch64 builders without renderD,
|
||||||
|
etc.). Hosts WITH V3D (Pi 5 deployment targets) get the speedup.
|
||||||
|
|
||||||
|
The remaining qpel mc02 anomaly (single-axis vertical filter, 1.21x
|
||||||
|
CPU) is bench-flagged for a v2 shader follow-up; the recipe entry
|
||||||
|
stays QPU since the policy decree (2026-05-23 substrate decree) holds
|
||||||
|
and the gap is marginal.
|
||||||
|
|
||||||
|
Refs reauktion/daedalus-fourier!36.
|
||||||
|
---
|
||||||
|
libavcodec/aarch64/h264_idct_daedalus.c | 2 +-
|
||||||
|
libavcodec/aarch64/h264_qpel_daedalus.c | 2 +-
|
||||||
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/libavcodec/aarch64/h264_idct_daedalus.c b/libavcodec/aarch64/h264_idct_daedalus.c
|
||||||
|
--- a/libavcodec/aarch64/h264_idct_daedalus.c
|
||||||
|
+++ b/libavcodec/aarch64/h264_idct_daedalus.c
|
||||||
|
@@ -32,7 +32,7 @@ static pthread_once_t g_dctx_once = PTHREAD_ONCE_INIT;
|
||||||
|
|
||||||
|
static void daedalus_ctx_init_once(void)
|
||||||
|
{
|
||||||
|
- g_dctx = daedalus_ctx_create_no_qpu();
|
||||||
|
+ g_dctx = daedalus_ctx_create();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ff_h264_idct_add_daedalus(uint8_t *dst, int16_t *block, int stride);
|
||||||
|
diff --git a/libavcodec/aarch64/h264_qpel_daedalus.c b/libavcodec/aarch64/h264_qpel_daedalus.c
|
||||||
|
--- a/libavcodec/aarch64/h264_qpel_daedalus.c
|
||||||
|
+++ b/libavcodec/aarch64/h264_qpel_daedalus.c
|
||||||
|
@@ -38,7 +38,7 @@ static pthread_once_t g_dctx_once = PTHREAD_ONCE_INIT;
|
||||||
|
|
||||||
|
static void daedalus_ctx_init_once(void)
|
||||||
|
{
|
||||||
|
- g_dctx = daedalus_ctx_create_no_qpu();
|
||||||
|
+ g_dctx = daedalus_ctx_create();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ff_put_h264_qpel8_mc20_daedalus(uint8_t *dst, const uint8_t *src, ptrdiff_t stride);
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Markus Fritsche <mfritsche@reauktion.de>
|
||||||
|
Date: Mon, 25 May 2026 22:00:00 +0200
|
||||||
|
Subject: [PATCH] avcodec/aarch64/h264: revert ctx flip — daedalus-fourier PR
|
||||||
|
#36 was a measurement artifact
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
Reverts the daedalus_ctx_create_no_qpu() → daedalus_ctx_create() flip
|
||||||
|
that landed in 0014-h264-ctx-qpu-capable.patch (marfrit-packages PR
|
||||||
|
#104). The flip was justified by daedalus-fourier PR #36 which
|
||||||
|
reported a 4.30x QPU-over-CPU win on the 1080p H.264 hot-path sum.
|
||||||
|
|
||||||
|
That number was a measurement artifact. The bench tool's
|
||||||
|
v3d_runner.read_spv() did a bare fopen() that resolved relative to
|
||||||
|
cwd; when run from the source directory (as in PR #36), the SPVs at
|
||||||
|
$builddir/v3d_*.spv were not found, every QPU dispatch returned -1
|
||||||
|
fast, and the loop timed the failure path. Daedalus-fourier PR #37
|
||||||
|
fixes the SPV search + bench preflight; corrected numbers from hertz
|
||||||
|
(Pi 5 V3D 7.1) show QPU is 12-77x SLOWER than CPU NEON at every
|
||||||
|
H.264 hot-path kernel:
|
||||||
|
|
||||||
|
kernel CPU ns/op QPU ns/op winner
|
||||||
|
IDCT 4x4 luma 10.75 217.63 CPU 20.24x
|
||||||
|
IDCT 8x8 luma 29.69 785.94 CPU 26.47x
|
||||||
|
Deblock luma_v 17.63 467.42 CPU 26.51x
|
||||||
|
Deblock luma_h 38.30 498.53 CPU 13.02x
|
||||||
|
qpel mc20 (8x8) 30.17 1300.44 CPU 43.10x
|
||||||
|
qpel mc02 (8x8) 17.69 1363.40 CPU 77.08x
|
||||||
|
qpel mc22 (8x8) 71.60 1948.37 CPU 27.21x
|
||||||
|
|
||||||
|
1080p sum: CPU 5.57 ms vs QPU 123.54 ms — QPU 22x slower.
|
||||||
|
|
||||||
|
Until the daedalus QPU dispatch overhead is actually competitive (a
|
||||||
|
multi-task effort tracked on the daedalus-fourier side), the
|
||||||
|
libavcodec.so substitution must stay on daedalus_ctx_create_no_qpu()
|
||||||
|
to avoid pessimizing every host process that loads it
|
||||||
|
(firefox-fourier RDD, mpv-fourier, daedalus_v4l2_daemon).
|
||||||
|
|
||||||
|
Both H.264 TUs (h264_idct_daedalus.c, h264_qpel_daedalus.c) are
|
||||||
|
reverted; the change is a 2-line revert of patch 0014.
|
||||||
|
|
||||||
|
Refs reauktion/daedalus-fourier!37 (the retraction PR).
|
||||||
|
---
|
||||||
|
libavcodec/aarch64/h264_idct_daedalus.c | 2 +-
|
||||||
|
libavcodec/aarch64/h264_qpel_daedalus.c | 2 +-
|
||||||
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/libavcodec/aarch64/h264_idct_daedalus.c b/libavcodec/aarch64/h264_idct_daedalus.c
|
||||||
|
--- a/libavcodec/aarch64/h264_idct_daedalus.c
|
||||||
|
+++ b/libavcodec/aarch64/h264_idct_daedalus.c
|
||||||
|
@@ -32,7 +32,7 @@ static pthread_once_t g_dctx_once = PTHREAD_ONCE_INIT;
|
||||||
|
|
||||||
|
static void daedalus_ctx_init_once(void)
|
||||||
|
{
|
||||||
|
- g_dctx = daedalus_ctx_create();
|
||||||
|
+ g_dctx = daedalus_ctx_create_no_qpu();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ff_h264_idct_add_daedalus(uint8_t *dst, int16_t *block, int stride);
|
||||||
|
diff --git a/libavcodec/aarch64/h264_qpel_daedalus.c b/libavcodec/aarch64/h264_qpel_daedalus.c
|
||||||
|
--- a/libavcodec/aarch64/h264_qpel_daedalus.c
|
||||||
|
+++ b/libavcodec/aarch64/h264_qpel_daedalus.c
|
||||||
|
@@ -38,7 +38,7 @@ static pthread_once_t g_dctx_once = PTHREAD_ONCE_INIT;
|
||||||
|
|
||||||
|
static void daedalus_ctx_init_once(void)
|
||||||
|
{
|
||||||
|
- g_dctx = daedalus_ctx_create();
|
||||||
|
+ g_dctx = daedalus_ctx_create_no_qpu();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ff_put_h264_qpel8_mc20_daedalus(uint8_t *dst, const uint8_t *src, ptrdiff_t stride);
|
||||||
@@ -0,0 +1,132 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Markus Fritsche <mfritsche@reauktion.de>
|
||||||
|
Date: Tue, 26 May 2026 06:00:00 +0200
|
||||||
|
Subject: [PATCH] avcodec/h264: per-MB inspection callback (daedalus-decoder
|
||||||
|
hook)
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
Adds an opt-in callback fired in ff_h264_hl_decode_mb after the
|
||||||
|
existing pixel work, used by tools that need per-MB visibility into
|
||||||
|
the H.264 decode. Initially driven by daedalus-decoder's CLI test
|
||||||
|
harness (tools/daedalus_decode_h264) which shadows libavcodec's
|
||||||
|
decode with a frame-major daedalus-decoder run for byte-exact diff
|
||||||
|
on real H.264 streams; later target is a daedalus-v4l2 daemon
|
||||||
|
refactor that drives daedalus_decoder_append_mb directly from the
|
||||||
|
callback instead of letting libavcodec do per-MB pixel work.
|
||||||
|
|
||||||
|
Shape: ONE inspection point per MB. Distinct from the per-kernel
|
||||||
|
function-pointer-hijack pattern that used to live in 0003-0014
|
||||||
|
patches (now reverted via 0015 for ctx, and architecturally retired
|
||||||
|
per daedalus-fourier PR #37's measurement-correction). Per-block
|
||||||
|
synchronous Vulkan dispatch from libavcodec was structurally non-
|
||||||
|
competitive; per-MB CPU-side observation feeding a per-frame batch
|
||||||
|
submit is the right shape.
|
||||||
|
|
||||||
|
Two new fields in H264Context (appended at end of struct; no ABI
|
||||||
|
surface visible to non-libavcodec callers since H264Context is
|
||||||
|
internal — declared in h264dec.h, not h264.h). One new exported
|
||||||
|
function ff_h264_set_mb_inspect_cb to set them.
|
||||||
|
|
||||||
|
Zero behaviour change when cb == NULL (the default): one load +
|
||||||
|
one branch per MB in the decoder hot path, both branch-predicted
|
||||||
|
to fall through.
|
||||||
|
|
||||||
|
Used by:
|
||||||
|
- daedalus-decoder/tools/daedalus_decode_h264 (PR-A1b)
|
||||||
|
- daedalus-v4l2 daemon shadow-mode path (PR-Q3a.1+)
|
||||||
|
|
||||||
|
The CLI static-links libavcodec.a so symbol visibility doesn't matter
|
||||||
|
there. The daemon dlopens libavcodec.so.62 and resolves the callback
|
||||||
|
via dlsym, so the symbol MUST be exported — added to libavcodec.v
|
||||||
|
explicitly (FFmpeg's default version script hides every `ff_*` symbol
|
||||||
|
as LOCAL behind a glob).
|
||||||
|
|
||||||
|
Refs reauktion/daedalus-decoder!12 (Stage 2 PR-b complete).
|
||||||
|
---
|
||||||
|
libavcodec/h264_mb.c | 20 ++++++++++++++++++++
|
||||||
|
libavcodec/h264dec.h | 26 ++++++++++++++++++++++++++
|
||||||
|
libavcodec/libavcodec.v | 1 +
|
||||||
|
3 files changed, 47 insertions(+)
|
||||||
|
|
||||||
|
--- a/libavcodec/h264dec.h
|
||||||
|
+++ b/libavcodec/h264dec.h
|
||||||
|
@@ -334,6 +334,16 @@
|
||||||
|
int pic_order_cnt_bit_size;
|
||||||
|
} H264SliceContext;
|
||||||
|
|
||||||
|
+/* Per-MB inspection callback type — see ff_h264_set_mb_inspect_cb()
|
||||||
|
+ * below. Fired by ff_h264_hl_decode_mb after the existing pixel work
|
||||||
|
+ * for every macroblock in coded order. Receives a const H264Context*
|
||||||
|
+ * so the callback can inspect any slice/picture state (h->slice_ctx
|
||||||
|
+ * for current slice, h->cur_pic.f->data[plane] for reconstructed
|
||||||
|
+ * samples, etc.). */
|
||||||
|
+typedef void (*ff_h264_mb_inspect_cb)(void *opaque,
|
||||||
|
+ const struct H264Context *h,
|
||||||
|
+ int mb_x, int mb_y);
|
||||||
|
+
|
||||||
|
/**
|
||||||
|
* H264Context
|
||||||
|
*/
|
||||||
|
@@ -579,6 +589,10 @@
|
||||||
|
int non_gray; ///< Did we encounter a intra frame after a gray gap frame
|
||||||
|
int noref_gray;
|
||||||
|
int skip_gray;
|
||||||
|
+
|
||||||
|
+ /* Per-MB inspection hook — set via ff_h264_set_mb_inspect_cb. */
|
||||||
|
+ ff_h264_mb_inspect_cb mb_inspect_cb;
|
||||||
|
+ void *mb_inspect_opaque;
|
||||||
|
} H264Context;
|
||||||
|
|
||||||
|
extern const uint16_t ff_h264_mb_sizes[4];
|
||||||
|
@@ -607,6 +621,16 @@
|
||||||
|
const H2645NAL *nal, void *logctx);
|
||||||
|
|
||||||
|
void ff_h264_hl_decode_mb(const H264Context *h, H264SliceContext *sl);
|
||||||
|
+
|
||||||
|
+/**
|
||||||
|
+ * Install an opt-in per-MB inspection callback that fires from
|
||||||
|
+ * ff_h264_hl_decode_mb after each macroblock's pixel work. Default
|
||||||
|
+ * is NULL (no callback installed); the check is a single branch on
|
||||||
|
+ * the decoder hot path. See ff_h264_mb_inspect_cb for signature.
|
||||||
|
+ */
|
||||||
|
+void ff_h264_set_mb_inspect_cb(AVCodecContext *avctx,
|
||||||
|
+ ff_h264_mb_inspect_cb cb, void *opaque);
|
||||||
|
+
|
||||||
|
void ff_h264_decode_init_vlc(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
--- a/libavcodec/h264_mb.c
|
||||||
|
+++ b/libavcodec/h264_mb.c
|
||||||
|
@@ -815,4 +815,20 @@
|
||||||
|
hl_decode_mb_simple_16(h, sl);
|
||||||
|
} else
|
||||||
|
hl_decode_mb_simple_8(h, sl);
|
||||||
|
+
|
||||||
|
+ /* Per-MB inspection callback (opt-in via ff_h264_set_mb_inspect_cb).
|
||||||
|
+ * Fired AFTER pixel work — reconstructed samples are in
|
||||||
|
+ * h->cur_pic.f->data[plane] at the MB's raster position by the
|
||||||
|
+ * time this runs. Callback may inspect slice context via
|
||||||
|
+ * h->slice_ctx + sl->mb_xy, coeffs via sl->mb, etc. */
|
||||||
|
+ if (h->mb_inspect_cb)
|
||||||
|
+ h->mb_inspect_cb(h->mb_inspect_opaque, h, sl->mb_x, sl->mb_y);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void ff_h264_set_mb_inspect_cb(AVCodecContext *avctx,
|
||||||
|
+ ff_h264_mb_inspect_cb cb, void *opaque)
|
||||||
|
+{
|
||||||
|
+ H264Context *h = avctx->priv_data;
|
||||||
|
+ h->mb_inspect_cb = cb;
|
||||||
|
+ h->mb_inspect_opaque = opaque;
|
||||||
|
}
|
||||||
|
--- a/libavcodec/libavcodec.v
|
||||||
|
+++ b/libavcodec/libavcodec.v
|
||||||
|
@@ -3,6 +3,7 @@
|
||||||
|
av_*;
|
||||||
|
avcodec_*;
|
||||||
|
avpriv_*;
|
||||||
|
+ ff_h264_set_mb_inspect_cb;
|
||||||
|
avsubtitle_free;
|
||||||
|
local:
|
||||||
|
*;
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Markus Fritsche <mfritsche@reauktion.de>
|
||||||
|
Date: Tue, 26 May 2026 07:30:00 +0200
|
||||||
|
Subject: [PATCH] avcodec/h264: preserve sl->mb coefficients for the inspection
|
||||||
|
callback (companion to 0016)
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
Patch 0016 adds a per-MB inspection callback fired at the end of
|
||||||
|
ff_h264_hl_decode_mb. By that time the IDCT-add path has already
|
||||||
|
zeroed sl->mb (FFmpeg's convention — see ff_h264_idct_add_neon and
|
||||||
|
friends), so consumers reading coefficients from the callback get
|
||||||
|
zeros.
|
||||||
|
|
||||||
|
Add a coefficient side buffer in H264Context, populated at the
|
||||||
|
START of ff_h264_hl_decode_mb (before any IDCT runs) with a single
|
||||||
|
memcpy from sl->mb. The post-pixel-work callback (still in 0016)
|
||||||
|
can then read both:
|
||||||
|
- the side-buffer coefficients (= just-entropy-decoded, pre-IDCT)
|
||||||
|
- the reconstructed pixels in h->cur_pic.f->data (= P + IDCT(C),
|
||||||
|
pre-deblock for this MB)
|
||||||
|
and the consumer can derive P = pixels − IDCT(C) for daedalus-
|
||||||
|
decoder's frame-major dispatch.
|
||||||
|
|
||||||
|
Memcpy is gated on (h->mb_inspect_cb != NULL) — zero overhead when
|
||||||
|
no consumer is registered. Buffer size = sizeof(int16_t) * 16 * 48
|
||||||
|
= 1536 bytes per H264Context (fits in one cache line family;
|
||||||
|
allocated once at H264Context lifetime, reused per MB).
|
||||||
|
|
||||||
|
8-bit path only. High-bit-depth H.264 uses the upper half of
|
||||||
|
sl->mb (int16_t[16 * 48 * 2] declared; the * 2 reserves space for
|
||||||
|
the high-depth case); preserving the high-depth coefficients
|
||||||
|
correctly would need a wider side buffer. Punted for now — the
|
||||||
|
daedalus-decoder consumer is 8-bit-only.
|
||||||
|
|
||||||
|
Single-threaded decode assumed at the consumer side (avctx->
|
||||||
|
thread_count = 1). Multi-slice / multi-threaded streams would
|
||||||
|
race on the single side buffer — that's an explicit limitation of
|
||||||
|
the inspection mechanism, documented in 0016's comment block.
|
||||||
|
Future extension: per-H264SliceContext side buffers.
|
||||||
|
|
||||||
|
Used by:
|
||||||
|
- daedalus-decoder/tools/daedalus_decode_h264 PR-A3+ (CLI test
|
||||||
|
harness extracts coefficients here for daedalus-decoder
|
||||||
|
IDCT validation on real H.264 streams).
|
||||||
|
|
||||||
|
Refs reauktion/daedalus-decoder!14 (PR-A2 callback wiring).
|
||||||
|
---
|
||||||
|
libavcodec/h264_mb.c | 9 +++++++++
|
||||||
|
libavcodec/h264dec.h | 8 ++++++++
|
||||||
|
2 files changed, 17 insertions(+)
|
||||||
|
|
||||||
|
--- a/libavcodec/h264dec.h
|
||||||
|
+++ b/libavcodec/h264dec.h
|
||||||
|
@@ -593,6 +593,14 @@
|
||||||
|
/* Per-MB inspection hook — set via ff_h264_set_mb_inspect_cb. */
|
||||||
|
ff_h264_mb_inspect_cb mb_inspect_cb;
|
||||||
|
void *mb_inspect_opaque;
|
||||||
|
+
|
||||||
|
+ /* Per-MB coefficient side buffer — populated at the start of
|
||||||
|
+ * ff_h264_hl_decode_mb so the post-pixel-work inspection callback
|
||||||
|
+ * can read the just-entropy-decoded coefficients before IDCT-add
|
||||||
|
+ * zeros sl->mb. 16 blocks × 48 int16 = libavcodec sl->mb size
|
||||||
|
+ * (matches DECLARE_ALIGNED(16, int16_t, mb)[16 * 48 * 2] for the
|
||||||
|
+ * 8-bit half; high-bit-depth paths skip this — see h264_mb.c). */
|
||||||
|
+ DECLARE_ALIGNED(16, int16_t, mb_inspect_coeffs)[16 * 48];
|
||||||
|
} H264Context;
|
||||||
|
|
||||||
|
extern const uint16_t ff_h264_mb_sizes[4];
|
||||||
|
--- a/libavcodec/h264_mb.c
|
||||||
|
+++ b/libavcodec/h264_mb.c
|
||||||
|
@@ -801,6 +801,15 @@
|
||||||
|
{
|
||||||
|
const int mb_xy = sl->mb_xy;
|
||||||
|
const int mb_type = h->cur_pic.mb_type[mb_xy];
|
||||||
|
+
|
||||||
|
+ /* Snapshot just-entropy-decoded coefficients before IDCT-add
|
||||||
|
+ * destroys them. Only when an inspection callback is registered
|
||||||
|
+ * — zero cost otherwise. 8-bit path only (high-bit-depth uses
|
||||||
|
+ * the upper half of sl->mb which we don't preserve here). */
|
||||||
|
+ if (h->mb_inspect_cb && !h->pixel_shift)
|
||||||
|
+ memcpy((int16_t *) (uintptr_t) h->mb_inspect_coeffs, sl->mb,
|
||||||
|
+ sizeof(((H264Context *) NULL)->mb_inspect_coeffs));
|
||||||
|
+
|
||||||
|
int is_complex = CONFIG_SMALL || sl->is_complex ||
|
||||||
|
IS_INTRA_PCM(mb_type) || sl->qscale == 0;
|
||||||
|
|
||||||
+15
-7
@@ -33,19 +33,17 @@ FFMPEG_VERSION=8.1
|
|||||||
# epoch 2 matches Debian's stock ffmpeg (currently 7:7.1.x in trixie);
|
# epoch 2 matches Debian's stock ffmpeg (currently 7:7.1.x in trixie);
|
||||||
# +rfourier suffix to avoid colliding with upstream/Debian rebuilds.
|
# +rfourier suffix to avoid colliding with upstream/Debian rebuilds.
|
||||||
PKGVER=2:${FFMPEG_VERSION}+rfourier+gb57fbbe
|
PKGVER=2:${FFMPEG_VERSION}+rfourier+gb57fbbe
|
||||||
PKGREL=10 # pkgrel=10 — H.264 luma qpel mc20 daedalus-fourier substitution
|
PKGREL=15 # pkgrel=15 — export ff_h264_set_mb_inspect_cb via libavcodec.v so
|
||||||
# (cycle 9 of the daedalus-v4l2#11 step 2 substitution arc; closes
|
# dlsym consumers (daedalus-v4l2 daemon shadow_decoder, PR-Q3a.1)
|
||||||
# the libavcodec.so substitution sequence 6 IDCT4 / 7 IDCT8 /
|
# can resolve the symbol; static-link CLI was unaffected. No
|
||||||
# 8 luma-v deblock / 9 qpel mc20). Pulls daedalus-fourier PR #2
|
# behaviour change to existing decode path. (2026-05-26)
|
||||||
# which extends the public API with
|
|
||||||
# daedalus_recipe_dispatch_h264_qpel_mc20. (2026-05-23)
|
|
||||||
|
|
||||||
# daedalus-fourier pin. 209a421 = daedalus-fourier PR #2 merge — public
|
# daedalus-fourier pin. 209a421 = daedalus-fourier PR #2 merge — public
|
||||||
# API now exposes daedalus_recipe_dispatch_h264_qpel_mc20 +
|
# API now exposes daedalus_recipe_dispatch_h264_qpel_mc20 +
|
||||||
# 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 +72,16 @@ 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"
|
||||||
|
patch -Np1 -i "$HERE/0013-h264-deblock-chroma-intra-daedalus-fourier.patch"
|
||||||
|
patch -Np1 -i "$HERE/0014-h264-ctx-qpu-capable.patch"
|
||||||
|
patch -Np1 -i "$HERE/0015-h264-ctx-revert-to-no-qpu.patch"
|
||||||
|
patch -Np1 -i "$HERE/0016-h264-mb-inspect-callback.patch"
|
||||||
|
patch -Np1 -i "$HERE/0017-h264-mb-coeffs-side-buffer.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
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
ffmpeg-v4l2-request-fourier (2:8.1+rfourier+gb57fbbe-15) bookworm trixie; urgency=medium
|
||||||
|
|
||||||
|
* Amend 0016-h264-mb-inspect-callback.patch to also add
|
||||||
|
ff_h264_set_mb_inspect_cb to libavcodec/libavcodec.v so the
|
||||||
|
symbol is exported (GLOBAL) on the shipped libavcodec.so.62.
|
||||||
|
Without this, FFmpeg's default version script hides every ff_*
|
||||||
|
symbol behind a glob → LOCAL → dlsym() returns NULL. The CLI
|
||||||
|
consumer (daedalus_decode_h264) was unaffected because it
|
||||||
|
static-links libavcodec.a; the daedalus-v4l2 daemon (PR-Q3a.1
|
||||||
|
shadow_decoder path) dlopens libavcodec.so.62 and needs the
|
||||||
|
symbol resolvable at runtime.
|
||||||
|
* No behaviour change to existing decode path. Callback is still
|
||||||
|
opt-in via the function pointer (NULL default), so paying the
|
||||||
|
one-load-one-branch cost only when a consumer has explicitly
|
||||||
|
installed an inspection callback.
|
||||||
|
|
||||||
|
-- Markus Fritsche <mfritsche@reauktion.de> Tue, 26 May 2026 15:00:00 +0200
|
||||||
|
|
||||||
ffmpeg-v4l2-request-fourier (2:8.1+rfourier+gb57fbbe-10) bookworm trixie; urgency=medium
|
ffmpeg-v4l2-request-fourier (2:8.1+rfourier+gb57fbbe-10) bookworm trixie; urgency=medium
|
||||||
|
|
||||||
* Add 0007-h264-qpel-mc20-daedalus-fourier.patch —
|
* Add 0007-h264-qpel-mc20-daedalus-fourier.patch —
|
||||||
|
|||||||
Reference in New Issue
Block a user