Cover the frames that aren't three YUV planes - #1693
Open
NicolasHug wants to merge 1 commit into
Open
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/meta-pytorch/torchcodec/1693
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit fc10bf8 with merge base 2312413 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
NicolasHug
force-pushed
the
blocks-planes-coverage
branch
from
September 4, 2026 08:19
624baba to
8f976b6
Compare
NicolasHug
force-pushed
the
blocks-planes-coverage
branch
2 times, most recently
from
September 4, 2026 09:28
2d7e2b2 to
7df0482
Compare
NicolasHug
changed the base branch from
nvdec-surface-depth
to
image-output-dtype-config
September 4, 2026 09:29
NicolasHug
force-pushed
the
blocks-planes-coverage
branch
from
September 4, 2026 10:02
7df0482 to
607ebb7
Compare
test_planes_structure asserted that a frame has exactly three planes, which frame_planes() never promised: it hands out one view per component, so a grayscale frame has one and an alpha one has four. Add a source for each of the three shapes that were untested - monochrome, planar RGB and alpha - and assert the count the case expects. They pin down two things worth pinning: planar RGB comes out (R, G, B), not in gbrp's own green-blue-red order, and an alpha plane is full size rather than subsampled like chroma. Also range-check the NVDEC pitch before narrowing it to an AVFrame line size, and rename StandAloneFrameAttachedData to OwnedFrameStorage.
NicolasHug
force-pushed
the
blocks-planes-coverage
branch
from
September 4, 2026 10:18
607ebb7 to
fc10bf8
Compare
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.
test_planes_structure asserted that a frame has exactly three planes, which
frame_planes() never promised: it hands out one view per component, so a
grayscale frame has one and an alpha one has four. Add a source for each of
the three shapes that were untested - monochrome, planar RGB and alpha - and
assert the count the case expects.
They pin down two things worth pinning: planar RGB comes out (R, G, B), not
in gbrp's own green-blue-red order, and an alpha plane is full size rather
than subsampled like chroma.
Also range-check the NVDEC pitch before narrowing it to an AVFrame line
size, and rename StandAloneFrameAttachedData to OwnedFrameStorage.
Stack created with GitHub Stacks CLI • Give Feedback 💬