-
Notifications
You must be signed in to change notification settings - Fork 36
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
Enhance PSNR Check for Luma (Y) Channel in VPP Sharpen Filter #697
Conversation
Hi @feiwan1 , can you review this for me? |
f7fd5b0
to
f4c1618
Compare
The current implementation of the PSNR check for the Luma (Y) channel raises exceptions for actual values exceeding reference values. This behavior is not reflective of typical processing scenarios where higher actual values are expected. Updated the `compare` function to only raise exceptions if the actual Luma (Y) value is lower than the reference value. Signed-off-by: Wang Hangjie <[email protected]>
f4c1618
to
4c900f9
Compare
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.
LGTM
# Only assert if actual Luma (Y) is lower than reference, using specified range condition | ||
if actual[-3] < ref[-3]: | ||
# Ensure the difference is within the acceptable range [0, 0.25) | ||
assert 0 <= ref[-3] - actual[-3] < 0.25, f"Luma (Y) is lower than reference value: {actual[-3]} < {ref[-3]}" |
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.
If luma is 100 in non-passthrough sharpen level, then it's a bug and this will cause that bug to escape.
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.
This change will not capture the issue reported in intel/media-driver#1881
The current implementation of the PSNR check for the Luma (Y) channel raises exceptions for actual values exceeding reference values. This behavior is not reflective of typical processing scenarios where higher actual values are expected.
Updated the
compare
function to only raise exceptions if the actual Luma (Y) value is lower than the reference value.