Skip to content

Cover the frames that aren't three YUV planes - #1693

Open
NicolasHug wants to merge 1 commit into
image-output-dtype-configfrom
blocks-planes-coverage
Open

Cover the frames that aren't three YUV planes#1693
NicolasHug wants to merge 1 commit into
image-output-dtype-configfrom
blocks-planes-coverage

Conversation

@NicolasHug

Copy link
Copy Markdown
Contributor

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 CLIGive Feedback 💬

@pytorch-bot

pytorch-bot Bot commented Sep 3, 2026

Copy link
Copy Markdown

🔗 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 Failures

As of commit fc10bf8 with merge base 2312413 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Sep 3, 2026
@NicolasHug
NicolasHug force-pushed the blocks-planes-coverage branch from 624baba to 8f976b6 Compare September 4, 2026 08:19
@NicolasHug
NicolasHug force-pushed the blocks-planes-coverage branch 2 times, most recently from 2d7e2b2 to 7df0482 Compare September 4, 2026 09:28
@NicolasHug
NicolasHug changed the base branch from nvdec-surface-depth to image-output-dtype-config September 4, 2026 09:29
@NicolasHug
NicolasHug force-pushed the blocks-planes-coverage branch from 7df0482 to 607ebb7 Compare September 4, 2026 10:02
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
NicolasHug force-pushed the blocks-planes-coverage branch from 607ebb7 to fc10bf8 Compare September 4, 2026 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant