ffmpeg-v4l2-request-fourier: per-MB inspection callback for H.264 (0016)
Adds 0016-h264-mb-inspect-callback.patch to the FFmpeg fork. Adds an
opt-in callback fired by ff_h264_hl_decode_mb after the existing
pixel work, for tools that need per-MB visibility into H.264 decode.
API:
typedef void (*ff_h264_mb_inspect_cb)(void *opaque,
const struct H264Context *h,
int mb_x, int mb_y);
void ff_h264_set_mb_inspect_cb(AVCodecContext *avctx,
ff_h264_mb_inspect_cb cb, void *opaque);
Two new fields appended to H264Context (internal struct, declared in
h264dec.h not h264.h, no ABI surface to non-libavcodec callers).
Callback fires post-pixel-work for every MB in coded order; receives
const H264Context* so it can inspect any state (slice ctx via
h->slice_ctx, reconstructed pixels via h->cur_pic.f->data[plane],
etc.).
Default (cb==NULL): zero behaviour change, one load + one branch per
MB in the decoder hot path.
Shape distinction: per-MB observation, NOT per-kernel function-pointer
hijack (the 0003-0014 substitution-arc pattern that PR #105 reverted
+ daedalus-fourier PR #37's measurement-correction architecturally
retired). Per-block synchronous Vulkan dispatch from libavcodec is
non-competitive; per-MB CPU-side observation feeding a per-frame
daedalus-decoder batch submit is the right shape (frame-major UMA
dispatch verdict, memory: dejavu).
Used by:
- daedalus-decoder/tools/daedalus_decode_h264 (PR-A1b, follow-up)
- future daedalus-v4l2 daemon refactor
Wired into arch PKGBUILD source[] + prepare() and debian build-deb.sh
patch sequence. pkgrel bumped 12 → 13.
Refs reauktion/daedalus-decoder!12.
This commit is contained in:
@@ -24,7 +24,7 @@ _srcname=FFmpeg
|
||||
_version='8.1'
|
||||
_commit='b57fbbe50c9b2656fad86a1a7eeabfd2b2a50935' # v4l2-request-n8.1 tip 2026-04-24
|
||||
pkgver=8.1.r123329.b57fbbe
|
||||
pkgrel=12 # pkgrel=12 — REVERT pkgrel=11 ctx flip; daedalus-fourier PR #36 4.30x headline was measurement artifact (PR #37 corrects: QPU 22x SLOWER than CPU)
|
||||
pkgrel=13 # pkgrel=13 — per-MB inspection callback (0016) for daedalus-decoder CLI test harness; observation-only, no behaviour change to existing decode path
|
||||
epoch=2
|
||||
|
||||
# daedalus-fourier pin. 209a421 = PR #2 merge (Phase 8c — public API
|
||||
@@ -102,8 +102,9 @@ source=("git+https://github.com/Kwiboo/FFmpeg.git#commit=${_commit}"
|
||||
'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')
|
||||
sha256sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP')
|
||||
'0015-h264-ctx-revert-to-no-qpu.patch'
|
||||
'0016-h264-mb-inspect-callback.patch')
|
||||
sha256sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP')
|
||||
|
||||
pkgver() {
|
||||
cd "${_srcname}"
|
||||
@@ -129,6 +130,7 @@ prepare() {
|
||||
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"
|
||||
}
|
||||
|
||||
build() {
|
||||
|
||||
Reference in New Issue
Block a user