Cycle 2 (deblocking) Phase 1-3: M3'' = 48.285 Medge/s baseline
Second kernel candidate per phase7_M4.md verdict "next-kernel cycle
authorised". VP9 4-tap inner loop filter, horizontal direction,
8-pixel edge (libavcodec ff_vp9_loop_filter_h_4_8_neon as baseline).
Different workload shape from IDCT - boundary streaming, lighter
compute per unit, per-row conditionals - tests whether QPU win
generalises.
docs/k2_deblock_phase1.md - goal-setting. Same R-band decision rules
as cycle 1 (phase1.md), with the cycle-1 calibration adjustment:
ORANGE band is no longer auto-close because M4 showed mixed > pure
CPU even at modest R when CPU bandwidth-saturates.
docs/k2_deblock_phase2.md - situation analysis. C reference already
in vendored snapshot (vp9dsp_template.c:1780-1898). Fetched
vp9lpf_neon.S fresh (1334 lines, LGPL-2.1+, FFmpeg n7.1.3 pin,
SHA-256 384e49e7...). PROVENANCE.md updated.
docs/k2_deblock_phase3.md - NEON baseline:
M1''_c bit-exact 100.0000 % (10000 random edges)
M3'' throughput 48.285 Medge/s (20.7 ns/edge, single A76)
per-frame 1080p-eq 748 FPS (worst case 64 530 edges/frame)
cycles/edge ~58 (=20.7ns x 2.8GHz), ~7 cycles/row
LPF is 5.9x faster per-unit than IDCT M3 (20.7 vs 122 ns), so the
QPU break-even point moves down. Predicted R''_v1 band ~0.5-0.9
- frame-level batching amortises the same 33us dispatch overhead;
workload becomes bandwidth-bound rather than compute-bound
(~5.7 MB/frame traffic at 64 530 edges x ~88 B per edge).
New artifacts:
- tests/vp9_lpf_ref.c - standalone bit-exact C ref (8-bit, wd=4
inner only; clean transcription)
- tests/bench_neon_lpf.c - M1''_c gate + M3'' time-based bench
(5s window, edge-content-biased RNG for
realistic fm/hev hit rates)
- external/ffmpeg-snapshot/libavcodec/aarch64/vp9lpf_neon.S
- CMakeLists.txt updated with bench_neon_lpf target
Phase 4 next: plan the QPU LPF compute shader. Cycle 1's phase4.md
+ phase5.md + phase7.md learnings apply directly - bake in the v4
winning patterns from the start (WG=256, edges-per-subgroup
pattern adapted from blocks, uint8_t dst SSBO, oob flag, unrolled
writes).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+17
-1
@@ -47,12 +47,20 @@ set(FFASM_SOURCES
|
||||
${FFSNAP}/libavcodec/aarch64/vp9itxfm_neon.S
|
||||
)
|
||||
|
||||
# Cycle 2 — VP9 loop filter NEON source (vendored 2026-05-18).
|
||||
set(FFASM_LPF_SOURCES
|
||||
${FFSNAP}/libavcodec/aarch64/vp9lpf_neon.S
|
||||
)
|
||||
set_source_files_properties(${FFASM_LPF_SOURCES} PROPERTIES
|
||||
COMPILE_OPTIONS "${FFASM_FLAGS}"
|
||||
LANGUAGE ASM)
|
||||
|
||||
# Tell CMake/gas to preprocess .S sources.
|
||||
set_source_files_properties(${FFASM_SOURCES} PROPERTIES
|
||||
COMPILE_OPTIONS "${FFASM_FLAGS}"
|
||||
LANGUAGE ASM)
|
||||
|
||||
# ---- NEON baseline microbench ----------------------------------------------
|
||||
# ---- NEON baseline microbenches --------------------------------------------
|
||||
|
||||
add_executable(bench_neon_idct
|
||||
tests/bench_neon_idct.c
|
||||
@@ -60,6 +68,14 @@ add_executable(bench_neon_idct
|
||||
${FFASM_SOURCES}
|
||||
)
|
||||
target_compile_options(bench_neon_idct PRIVATE -O3 -march=armv8-a+simd)
|
||||
|
||||
# Cycle 2 — VP9 loop filter NEON baseline.
|
||||
add_executable(bench_neon_lpf
|
||||
tests/bench_neon_lpf.c
|
||||
tests/vp9_lpf_ref.c
|
||||
${FFASM_LPF_SOURCES}
|
||||
)
|
||||
target_compile_options(bench_neon_lpf PRIVATE -O3 -march=armv8-a+simd)
|
||||
# bench_neon_idct doesn't need vulkan/drm — pure CPU baseline.
|
||||
|
||||
# ---- Vulkan dispatch-overhead microbench (next chunk) ----------------------
|
||||
|
||||
Reference in New Issue
Block a user