-
Notifications
You must be signed in to change notification settings - Fork 481
Issue 2075 : Apply RGB on transpose matrices. #2206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 2075 : Apply RGB on transpose matrices. #2206
Conversation
…ffer is C order or not, for now throw error Signed-off-by: Afsaneh Sheikhmiri <afsaneh.sheikhmiri@autodesk.com>
… test is still not passing Signed-off-by: Afsaneh Sheikhmiri <afsaneh.sheikhmiri@autodesk.com>
c0c9a8a to
8883342
Compare
5dc7b9e to
dedb64e
Compare
… are still contiguous Signed-off-by: Afsaneh Sheikhmiri <afsaneh.sheikhmiri@autodesk.com>
dedb64e to
1cfb236
Compare
remia
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran into the issue while using colour.LUT3D() utility, this was correctly caught by this PR, thank you @Asheikhm !
doug-walker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @Asheikhm ! We will go ahead and merge this.
Fix :
Added C-contiguity detection to the
applyRGBbuffer method inPyCPUProcessor.cpp. The fix checks if the input NumPy array is stored in row-major order by verifying that the memory strides match the expected C-contiguous layout. If the array isn't C-contiguous (like when someone passes a transposed column-major array without copying it), the method now throws a runtime error saying "applyRGB only supports C-contiguous (row-major) arrays". This prevents the color processor from silently processing data in the wrong order and forces users to ensure their arrays are properly laid out in memory before callingapplyRGB.