Skip to content
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

Merged
merged 2 commits into from
Nov 19, 2024

Conversation

Hangjie22Coder
Copy link
Contributor

@Hangjie22Coder Hangjie22Coder commented Oct 24, 2024

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.

@Hangjie22Coder
Copy link
Contributor Author

@Bin-CI @uartie Please help a reivew.

@Hangjie22Coder
Copy link
Contributor Author

Hi @feiwan1 , can you review this for me?

@Hangjie22Coder Hangjie22Coder force-pushed the vpp-psnr-luma-check branch 3 times, most recently from f7fd5b0 to f4c1618 Compare October 25, 2024 02:44
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]>
Copy link
Contributor

@FocusLuo FocusLuo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@FocusLuo FocusLuo merged commit 25a0366 into intel:master Nov 19, 2024
11 of 13 checks passed
Comment on lines +135 to +138
# 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]}"
Copy link
Contributor

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.

Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants