From a179515734110c16511a240b6cb50f2a1b850125 Mon Sep 17 00:00:00 2001 From: claude-noether Date: Mon, 25 May 2026 23:18:17 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20swap=20=5Fv/=5Fh=20dispatch=20fn=20selec?= =?UTF-8?q?tion=20=E2=80=94=20naming=20refers=20to=20filter=20direction=20?= =?UTF-8?q?not=20edge=20direction?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/daedalus_decoder.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/daedalus_decoder.c b/src/daedalus_decoder.c index 8394df6..90cacad 100644 --- a/src/daedalus_decoder.c +++ b/src/daedalus_decoder.c @@ -298,21 +298,27 @@ static int dispatch_deblock_pass( uint8_t *, size_t, size_t, const daedalus_h264_deblock_meta *); + /* daedalus-fourier kernel naming convention: + * _v = "v_loop_filter" — filter applied VERTICALLY across a + * HORIZONTAL edge. Use for our orient=1 (H edge). + * _h = "h_loop_filter" — filter applied HORIZONTALLY across a + * VERTICAL edge. Use for our orient=0 (V edge). + * The names refer to the FILTER DIRECTION, not the edge direction. */ deblock_dispatch_fn fn; if (target_plane == 0) { - if (target_orient == 0) - fn = target_bS_intra ? daedalus_dispatch_h264_deblock_luma_v_intra - : daedalus_dispatch_h264_deblock_luma_v; - else + if (target_orient == 0) /* V edge → h_loop_filter */ fn = target_bS_intra ? daedalus_dispatch_h264_deblock_luma_h_intra : daedalus_dispatch_h264_deblock_luma_h; + else /* H edge → v_loop_filter */ + fn = target_bS_intra ? daedalus_dispatch_h264_deblock_luma_v_intra + : daedalus_dispatch_h264_deblock_luma_v; } else { if (target_orient == 0) - fn = target_bS_intra ? daedalus_dispatch_h264_deblock_chroma_v_intra - : daedalus_dispatch_h264_deblock_chroma_v; - else fn = target_bS_intra ? daedalus_dispatch_h264_deblock_chroma_h_intra : daedalus_dispatch_h264_deblock_chroma_h; + else + fn = target_bS_intra ? daedalus_dispatch_h264_deblock_chroma_v_intra + : daedalus_dispatch_h264_deblock_chroma_v; } return fn(dec->dctx, sub, scratch, stride, n, meta_scratch);