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

Optimize Brightness and Contrast node #2773

Merged
merged 1 commit into from
Apr 9, 2024

Conversation

RunDevelopment
Copy link
Member

The main optimizations are:

  • Only clip when necessary
  • Reuse the image buffers of intermediate results
  • Don't multiply with 1
Configuration Before After Note
B=0 C=0 160ms 0ms Pass through is free now
B=-14 C=0 410ms 210ms
B=0 C=22 430ms 260ms
B=0 C=-38 380ms 140ms We can often save np.clip when lowering contrast

Tested on a 8468x4320 RGB image.

Before:
image

After:
image

@joeyballentine joeyballentine merged commit 574399b into chaiNNer-org:main Apr 9, 2024
14 checks passed
@RunDevelopment RunDevelopment deleted the opt-b&c branch April 9, 2024 16:20
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.

2 participants