fix: SG-42272: Fix subsample422_10bit tail pixel handling for non-multiple-of-6 widths#1141
Open
bernie-laberge wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
Open
Conversation
8dd72eb to
f5417b9
Compare
src/lib/image/TwkFB/FastMemcpy.cpp
Outdated
Comment on lines
435
to
436
| const size_t tailPixels = width % 6; | ||
|
|
Contributor
There was a problem hiding this comment.
Could you add a comment why 6?
Contributor
Author
There was a problem hiding this comment.
Good call. I'll add a more explicit constexpr variable here so that it is self explanatory
On it.
…tiple-of-6 widths Signed-off-by: Bernard Laberge <bernard.laberge@autodesk.com>
f5417b9 to
47a6c23
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.
Fix subsample422_10bit tail pixel handling for non-multiple-of-6 widths
Linked issues
NA
Describe the reason for the change.
SDI bug in YCbCr 10 bits for non-multiple-of-6 widths resolutions showing up as a green line on the right side of screen.
I was able to reproduce with a Blackmagic DeckLink 8K Pro outputing in 1280x720p 50Hz.
Cause: The main loop of FastMemcpy.cpp::subsample422_10bit() processed pixels in groups of 6 (v210 packing quantum) but silently dropped any remaining 1-5 pixels at the end of each row, causing incomplete output for non-standard widths.
Summarize your change.
Added tail handling that follows the same v210 bit packing as the main loop, padding missing pixels with neutral chroma (Cb=Cr=512, Y=0) instead of zeros to avoid green/magenta fringing artifacts at the right edge.
I have also temporarily disabled the automatic installation of the marked down linter because it was blocking on my mac and was preventing me from committing anything.
Describe what you have tested and on which operating system.
Successfully tested on macOS
Add a list of changes, and note any that might need special attention during the review.
If possible, provide screenshots.