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

[imgcodec] Fix normalization when running GPU color space conversion #4285

Merged
merged 3 commits into from
Sep 30, 2022

Conversation

staniewzki
Copy link
Contributor

Signed-off-by: Michał Staniewski m.staniewzki@gmail.com

Category:

Bug fix (non-breaking change which fixes an issue)

Description:

Currently, when running color space conversion in the GPU Convert, no normalization happens (I thought that the color space conversion kernel handles it...). This PR fixes the issue.

Additional information:

Affected modules and functionalities:

Key points relevant for the review:

Tests:

  • Existing tests apply
  • New tests added
    • Python tests
    • GTests
    • Benchmark
    • Other
  • N/A

Checklist

Documentation

  • Existing documentation applies
  • Documentation updated
    • Docstring
    • Doxygen
    • RST
    • Jupyter
    • Other
  • N/A

DALI team only

Requirements

  • Implements new requirements
  • Affects existing requirements
  • N/A

REQ IDs: N/A

JIRA TASK: N/A

@staniewzki staniewzki marked this pull request as ready for review September 26, 2022 11:49
@jantonguirao jantonguirao self-assigned this Sep 26, 2022
@staniewzki
Copy link
Contributor Author

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [6022405]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [6022405]: BUILD FAILED

@staniewzki
Copy link
Contributor Author

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [6023608]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [6023608]: BUILD FAILED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [6023608]: BUILD PASSED

@staniewzki
Copy link
Contributor Author

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [6043674]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [6043674]: BUILD PASSED

Signed-off-by: Michał Staniewski <m.staniewzki@gmail.com>
Signed-off-by: Michał Staniewski <m.staniewzki@gmail.com>
Signed-off-by: Michał Staniewski <m.staniewzki@gmail.com>
@staniewzki
Copy link
Contributor Author

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [6055426]: BUILD STARTED

Comment on lines +95 to +96
multiplier *= ConvertNorm<float>(static_cast<Input>(1)) /
ConvertNorm<float>(static_cast<Output>(1));
Copy link
Contributor

@mzient mzient Sep 30, 2022

Choose a reason for hiding this comment

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

Suggested change
multiplier *= ConvertNorm<float>(static_cast<Input>(1)) /
ConvertNorm<float>(static_cast<Output>(1));
multiplier *= ConvertNorm<double>(static_cast<Input>(1)) /
ConvertNorm<double>(static_cast<Output>(1));

This can be done in a follow-up..

@NVIDIA NVIDIA deleted a comment from dali-automaton Sep 30, 2022
@dali-automaton
Copy link
Collaborator

CI MESSAGE: [6055426]: BUILD PASSED

@mzient mzient merged commit 86d68c8 into NVIDIA:main Sep 30, 2022
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.

None yet

5 participants