Files
Jungfraujoch/image_analysis/beam_stop
jungfrauandClaude Opus 5 c3d3161af0 Fold the beam-stop batch before its frame size changes
ShadowAccumulatorGPU::Add sized the raw buffer before closing the pending batch, and
EnsureRawCapacity assigned frame_bytes on entry. FoldPending strides `raw` by frame_bytes, so a
frame of a different size arriving mid-batch made the already-decoded frames fold with the new
stride: every pixel of the pending batch read from the wrong offset, silently, with no error. The
depth-change branch that exists to handle exactly this ran one step too late to help.

Fold first, then resize, then adopt the new stride. The batch also closes on a change of frame
size, not only of pixel mode - a batch is one layout, and the mode alone does not fix the layout.
The decoder was likewise built once from the first frame and never rebuilt, so it is now rebuilt
when the frame size changes; without that the mixed-size path this commit repairs would still
decode into a buffer of the wrong size.

Also calls Gpu() once in ShadowFinder::AddImage instead of twice - it takes and releases a mutex
each time, once per image.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011n8riB6X59oRjkrSHzNPAU
2026-08-23 08:20:37 -04:00
..
2026-08-13 17:03:10 +02:00