Repository navigation
Add failing tests for uncapped camera-motion frame buffers - #803
Closed
cursor[bot] wants to merge 1 commit into
Closed
cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
Camera-motion streaming, camera-motion measurement, RGB sampling, and the opt-in stability check trust ffprobe dimensions and read a raw frame of that size. These tests require the same pixel budget as video probe, and they fail until a frame over that budget is refused before the read.
6 tasks done
Contributor
|
Tracking the fix and regression coverage in #807. |
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
Adds tests that require camera-motion streaming, camera-motion measurement, raw RGB sampling, and the opt-in
camera_stabilitycheck to refuse a video whose probed frame is larger thanVideoLimits.maximum_frame_pixelsbefore reading a raw frame of that size.These tests fail on purpose until that budget is enforced. No production code is changed here.
Why
probe_videoand the video importer already rejectwidth * heightabove that budget. The raw-frame reader used by camera motion multiplies the dimensions ffprobe reports into a byte count and reads that many bytes for every frame. A container header that names an oversized frame is enough; the payload does not have to contain those pixels. The same reader is whatcamera_stabilityreaches after it remuxes an episode's H.264.Validation
The refusal tests fail on this branch. The two in-budget controls pass.
Result: 11 failed, 2 passed. The failures are
RawFrameErrornot raised, or raised only as a truncated-frame / missing-timestamp error after the oversized read.test_raw_frame_stream_refuses_a_read_larger_than_the_pixel_budgetreports a read of 33570816 bytes from a 160x120 file.Checklist
uv run ruff check --fix,uv run ruff format, anduv run ty check.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.