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

Fix ocl tonemap cannot output full range #451

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

nyanmisaka
Copy link
Member

Changes

  • Fix ocl tonemap cannot output full range

Issues

 float rgb2y(float r, float g, float b) {
     float y = r*yuv_matrix[0] + g*yuv_matrix[1] + b*yuv_matrix[2];
+#ifndef FULL_RANGE_OUT
     y = (219.0f * y + 16.0f) / 255.0f;
+#endif
     return y;
 }

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
@nyanmisaka nyanmisaka requested a review from a team September 6, 2024 15:46
Copy link
Member

@gnattu gnattu left a comment

Choose a reason for hiding this comment

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

I've noticed this for Metal before and fixed that earlier, did not check OCL.

@nyanmisaka
Copy link
Member Author

I've noticed this for Metal before and fixed that earlier, did not check OCL.

I also fixed it in CUDA in the past and forgot to add it back into OCL.
The problem was not exposed until the recent changes.

@nyanmisaka nyanmisaka merged commit efca98b into jellyfin:jellyfin Sep 6, 2024
26 checks passed
@nyanmisaka nyanmisaka deleted the fix-ocl-tm-full-range branch September 6, 2024 17:16
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