Add memory-safe selectable proxy resolution - #30
Merged
Merged
Conversation
Playback > Proxy Resolution picks Full / 2K / 1080p / 720p. The proxy level was fixed at 2K; the right answer depends on the machine and the job. A supervisor on a laptop wants 720p to hold real time on an 8K plate, while someone checking grain or edge detail needs the full frame and will accept slower playback. playback/proxy.py owns the level and the resolution maths. The level is process-wide rather than a constructor argument because the readers, the frame cache and the on-disk preview cache all have to agree on it, and they are built in different places. - The preview-cache key already carried the proxy dimensions, so it now carries the level token instead. Every level has a distinct token, which is what stops a frame cached at 720p being served back to a viewer asking for 2K. There is a test that fails if two levels ever collide. - The movie path still rounds to even dimensions: yuv420 subsamples chroma by two, so an odd proxy size is not representable. The sequence path does not need that constraint. - Sequence cache depth follows the proxy size, since bigger review frames mean fewer of them fit in the same memory budget. - Changing level reloads the current source at the frame the reviewer is sitting on. The open reader and both caches hold frames at the old size, so the level cannot be swapped under a running player. Full resolution disables the proxy entirely rather than scaling by 1.0, so the EXR mip-level shortcut is skipped too. 14 tests. Verified against a real decoded 3840x2160 clip: it lands at 2048x1152 at 2K, 1280x720 at 720p, and 3840x2160 at Full. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TexnzYbmCjjTDB8zzZuUPb
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.
Summary
Review fixes
The original Full mode still read/wrote persistent JPEG previews, which could hide grain/detail, and it allowed Full 8K to retain the same 48-frame cache depth as 2K, potentially consuming several GiB. This replacement keeps Full lossless and memory-bounded.
Original feature authored by @emlcpfx in #24.
Validation
pytest -qpassedgit diff --checkReplaces #24.