Repository navigation
Conversation
QSV tone-mapped transcodes on Intel Arrow Lake came out with shifted blocks during motion. The corruption appears when scale_vaapi resizes the tonemap_opencl output, which it releases back to the tone mapper's pool without waiting for the GPU. Resize before tone mapping and hand the OpenCL output straight to the encoder, which holds each surface until the encode completes. Closes Silo-Server#2446 Co-Authored-By: Claude Opus 5.5 <[email protected]>
QSV tone-mapped transcodes that burned in bitmap subtitles corrupted frames on Intel Arrow Lake: overlay_vaapi read the tonemap_opencl output the same way the downscale did in Silo-Server#2446. Overlay and scale on the OpenCL device with overlay_opencl and scale_opencl, then hand the frame straight to the encoder. The subtitle still goes on at the source resolution before the scale, so its placement does not change. Closes Silo-Server#2447 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
|
The measurements report fewer corrupt frames, but there are no captures showing the visible fix. Please add matching before-and-after frames and a short comparison recording covering a shot transition and subtitle appearance/clearing, with each build or commit identified. Use public-domain test media or link a private page on evidence.siloserver.org rather than attaching private media here. |
|
Published at https://evidence.siloserver.org/r/silo-server/pr-2449/ and linked under Evidence: before-and-after frames 126 (shifted blocks under a subtitle) and 35 (shot cut), a software reference for frame 35, and recordings of source frames 25–95 covering the cut at frame 35 and the subtitle appearing at frame 38 and clearing after frame 78, including a labelled half-speed side-by-side. Before is main 6144c45, after is this branch 8aeccec, both run in the build-1382 image. |
Resolve the tonemap_test.go conflict with Silo-Server#2444 by keeping both tests and passing QSVFilter's new height argument in the source-peak test. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Brings in Silo-Server#2448's branch merged with main, which resolves the tonemap_test.go conflict with Silo-Server#2444. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…V tone mapping HDR bitmap subtitle burn-in on QSV now composites with overlay_opencl and scales with scale_opencl. The QSV listing gate only checked tonemap_opencl, hwmap and scale_vaapi, so an FFmpeg build without the OpenCL bitmap filters advertised hardware tone mapping and then failed those transcodes at start. Check for both filters so such a build falls back to software tone mapping. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Review summaryReviewed 8aeccec; current head 2608950. Addressed
Checked, no change needed
Remaining
Validated features: no passed case reaches this code. The PR body now reads User manual: unaffected. The playback page says hardware tone mapping is used once Silo has tested it, and the stricter gate keeps that true. Apple/Android: no client change. Cross-provider round: GPT-6.1-Sol (xhigh), one round over both PRs. It found nothing and raised the unchecked filters as a disclosed limitation, which this review then fixed. Fit: 9/10 · Readiness: 8/10 — conditional (assuming CI is green)
|
|
The #1159 C4 comment reports server-burned PGS, but does not identify an HDR/QSV run; this PR rewrites that QSV HDR burn-in graph. Please explain why this validated output path changes and revalidate C4 against QSV/HDR after merge. The Suggested fix: No diff — update the line to:
Automated check: Macroscope check run agent (gpt-6-luna). No validation was performed. Posted via Macroscope — v1 validation impact |
main now carries Silo-Server#2448 as squash commit 009b47d, whose tree matches f3349b4 already on this branch, so this branch's tree is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Note
Stacked on #2448, which is now merged. This PR's own changes are
8aeccec6band the probe gate commit26089503a.Problem
Closes #2447
Related issue: #2446
Validation tasks: unblocks #1173 C3
QSV tone-mapped transcodes that burn in bitmap subtitles (PGS, VOBSUB, DVB) corrupt frames on Intel Arrow Lake: blocks of the picture shift, and at shot cuts a frame shows the next shot.
overlay_vaapireads thetonemap_opencloutput the same unsynchronised way the downscale did in #2446. This change composites and scales on the OpenCL device instead, so the encoder is the only thing that reads the tone-mapped frame.This builds on #2448, which it needs for the tone-map graph split.
Approach
For HDR sources, the QSV bitmap burn-in graph now keeps the tone-mapped frame on OpenCL. The subtitle is converted to YUVA with the BT.709 matrix, uploaded to the same OpenCL device, and composited with
overlay_opencl, and the result is scaled withscale_opencl. It then goes back to VAAPI and on to the encoder through the passthrough interop. The subtitle is still composited at the source resolution before the scale, so its placement does not change. SDR base layers never reach OpenCL and keepoverlay_vaapi.scale_opencl,overlay_opencl'seof_actionand YUVA overlays, and the shared OpenCL device forhwuploadandhwmapcome from Jellyfin FFmpeg. The QSV tone-map path already requires it, because stocktonemap_openclhas nobt2390curve, and the image bundles jellyfin-ffmpeg 8.1.3. Moving the composite to the CPU was rejected in #465 for throughput, and this graph is faster than the current one.The QSV probe's listing gate now also requires
overlay_openclandscale_opencl, so an FFmpeg build without them advertises only software tone mapping instead of failing HDR bitmap burn-in at transcode start.Validation
gofmt,go vet,make lint-changed,make verify-playback-fixtures,make verify-local-paths: pass.make test-go: every package passes exceptinternal/librarymonitor(its remount test needsmount, which the sandbox denies) andinternal/routeinventory(a Go export-data version mismatch in the local build cache). Both fail the same way onmain.TestQSVListingGateRequiresOpenCLBitmapSubtitleFilterschecks that the QSV listing gate rejects a build missing either OpenCL bitmap filter.Evidence
Evidence: https://evidence.siloserver.org/r/silo-server/pr-2449/
Surface and build: transcoded H.264 from Silo's QSV graph on the author's Intel Arrow Lake host, build-1382 image with this branch's graph.
Risks
overlay_vaapilet the driver convert RGB.scale_opencland onoverlay_opencloptions that only Jellyfin FFmpeg has. The probe checks that both filters exist but not which optionsoverlay_openclaccepts, so a custom FFmpeg with an olderoverlay_openclwould still fail at transcode start. That combination already needs a Jellyfin FFmpeg build fortonemap_opencl.Checklist
AI Disclosure
Harness: Claude Code in T3 Code
Tool(s): Claude Code, GitHub CLI, jellyfin-ffmpeg 8.1.3, PoCL
Model(s): claude-opus-5-5
Involvement: Fully AI-generated at the author's direction; the author has not yet reviewed the diff. The hardware runs were made on the author's server with their permission.
Adversarial review: A separate Claude Code agent (claude-opus-5-5) read the change against Jellyfin FFmpeg's
overlay_opencl,scale_opencl, hwmap and framesync sources and checked every input the bitmap path receives. It found no defect. Its notes led to the throughput measurement, the comment on the Jellyfin FFmpeg dependency, corrected comment wording, and the exact-graph and ordering tests.Maintainer review: Claude Code (claude-opus-5-5) in T3 Code reviewed both PRs with a GPT-6.1-Sol cross-check, merged
maininto both branches, and wrote the probe gate commit.🤖 Generated with Claude Code
Note
Fix QSV HDR bitmap subtitle compositing to use OpenCL overlay
QSV HDR bitmap-subtitle transcodes previously applied
overlay_vaapito an OpenCL tone-mapped surface, which does not composite correctly. HDR sources now build a dedicated OpenCL graph inqsvOpenCLBitmapSubtitleGraph(transcode.go): tone-map to OpenCL, convert and upload the subtitle with BT.709 limited-range metadata, overlay, optionally scale, then map back to VAAPI and strip HDR metadata. SDR sources keep the existingoverlay_vaapigraph.QSVFilterin tonemap.go intoQSVOpenCLToneMapFilterandQSVOpenCLReturnFilterhelpers; the full HDR graph sequence is unchanged.overlay_openclandscale_openclin the FFmpeg inventory.overlay_openclorscale_openclwill no longer be listed as QSV-capable.Macroscope summarized 5d0fb2b.