Repository navigation
fix(motiondiff0r): bound history by memory only - #322
Merged
Merged
Conversation
Remove the independent 128-frame ceiling and allocate frame metadata alongside pixel storage within the 1 GiB history budget. Reuse inactive entries before touching unused buffers and metadata; rendering remains allocation-free. Test histories beyond 128 frames, both constructor allocations, and eviction at the byte-derived capacity using a small-budget build of the same contract.
The core registry exercises motiondiff0r with its constructor-owned history. Allow its heap to grow beyond the initial 64 MiB, and return allocation failures to nothrow callers instead of aborting.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remove the independent 128-frame ceiling so the selected delay can retain as many frames as the 1 GiB history budget permits. Pixel storage and history metadata both count toward the cap and are allocated at construction. Released slots and their metadata are reused before unused slots, preserving small working sets for short offsets and allocation-free rendering.
Validation: all five focused checks passed under both Clang and GCC; all four contract/allocation checks passed under AddressSanitizer. A module compiled with exceptions disabled passed the rendering contract. The memory contract covers histories beyond 128 frames, timestamp expiry, allocation failures, and eviction at the byte-derived capacity using a separate small-budget build of the same test. At 1080p with zero offset, the measured resident-memory increase remained about 16 MiB after 200 updates.
Full local core-bundle build: all 192 selected native CTests passed. Optional OpenCV/Cairo/GAVL plugins and the two bundle profiles requiring their development packages were excluded.