Skip to content

materialize raw frame tests - #1630

Merged
NicolasHug merged 2 commits into
mainfrom
materialize_raw_frame_tests
Aug 14, 2026
Merged

materialize raw frame tests#1630
NicolasHug merged 2 commits into
mainfrom
materialize_raw_frame_tests

Conversation

@NicolasHug

@NicolasHug NicolasHug commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Add more tests for the pixel format handling of blocks APIs. Still a bit wonky because the CUDA path doesn't handle HDR yet. Will be cleaned up by #1625

The materialize() tests only checked that pix_fmt was a non-empty string.
Assert the exact format we expect on each device instead, and derive the
expected plane dtype from it rather than sniffing digits out of the name.

Adds two tests:
- CUDA and CPU raw planes must be bit-identical (skipped for the sources
  NVDEC currently hands us as 8-bit nv12).
- The ColorConverter must map the limited-range black and white points,
  expressed in the frame's own sample scale, to 0 and 255 - which pins its
  notion of how many bits a sample carries.
@pytorch-bot

pytorch-bot Bot commented Aug 14, 2026

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/meta-pytorch/torchcodec/1630

Note: Links to docs will display an error until the docs builds have been completed.

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 Aug 14, 2026
@NicolasHug
NicolasHug merged commit 377cb4c into main Aug 14, 2026
32 checks passed
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