Add bt2020 color conversion support on Beta Cuda#1267
Merged
mollyxu merged 6 commits intometa-pytorch:mainfrom Mar 4, 2026
Merged
Add bt2020 color conversion support on Beta Cuda#1267mollyxu merged 6 commits intometa-pytorch:mainfrom
mollyxu merged 6 commits intometa-pytorch:mainfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/meta-pytorch/torchcodec/1267
Note: Links to docs will display an error until the docs builds have been completed. ⏳ No Failures, 1 PendingAs of commit f5ec3ee with merge base 1a7450d ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
added 3 commits
March 2, 2026 14:49
NicolasHug
reviewed
Mar 4, 2026
Contributor
NicolasHug
left a comment
There was a problem hiding this comment.
Thanks for the great progress on this @mollyxu ! I left a comment about trying full range but this look good
NicolasHug
approved these changes
Mar 4, 2026
Contributor
NicolasHug
left a comment
There was a problem hiding this comment.
Thanks for the PR @mollyxu . Ill approve now to unblock, let's still try to unskip the new test as previously mentioned.
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.
This PR is a step towards better support for HDR videos on TorchCodec.
Added BT.2020 (NCL/CL) YUV→RGB color conversion support on the CUDA decode path, with ColorTwist matrices for both full and limited range, and for both CUDA >= 13 and CUDA < 13 NPP conventions.
Known limitation:
The added test is not passing because there is an up to ~73 pixel value difference vs the CPU path, with ~5.6% mismatched elements. It does not seem to be caused by the changes in the PR. In fact, before the PR, there is an up to 71 pixel value difference, with ~59.2% mismatched elements.
This is reflected in a TODO to investigate the root cause of this difference