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

new brightness handling #430

Merged
merged 9 commits into from
Apr 3, 2017
Merged

Conversation

redPanther
Copy link
Contributor

1. Tell us something about your changes.
this is a result of lot's of discussions. The new brightness stuff is based on @Funatiq new color correction. Setting the brightness modifies the values for color correction. This will limit the brightness of each color component. The new option "brightnessCompensation" handles the problem that e.g. white (255,255,255)has 3 times more energy than red (255,0,0).

additional: updatewebserver, now with initial ssl support

2. If this changes affect the .conf file. Please provide the changed section

  • brightness are now int/percent values from 0 to 100
  • new value brightnessCompensation. This is also a percent value. 100 means all colors are equal bright, 0 the opposite

3. Reference an issue (optional)
#422

Note: For further discussions use our forum: forum.hyperion-project.org

@Funatiq
Copy link
Contributor

Funatiq commented Apr 2, 2017

I like what you did with the brightness. I have some questions:

  • You initialize every color value separately for every input (_initialized[input]). Any reason for this instead of the complete initialization?
  • Can you explain your idea here:
    B_in = -0.093*_brightness+std::sqrt(_brightness);
    if (_brightness< 57) B_in += std::sqrt(57)-std::sqrt(_brightness);
    Is a simple linear function not sufficient?

Btw I would have preferred if you had separated the brightness changes and the webserver changes in different PRs. Would have been easier to read ;)

@brindosch
Copy link
Contributor

perfect so far, i didn't found weirdness. I wonder if you want to move the backlightThreshold to Integer too (for the visual touch :))

@redPanther
Copy link
Contributor Author

The maping of config value is not linear because it feels better. I tried that 50% is half brightness
I update the mapping val's just in time, because do it in one piece means 7*256 calculations. The request for new brightness can come fast and I dont want to make unneccessary calculations.

@Funatiq
Copy link
Contributor

Funatiq commented Apr 2, 2017

The mapping of config value is not linear because it feels better. I tried that 50% is half brightness

Ok, I understand. But sqrt is quite expensive. I would suggest a piecewise linear function like this. It's almost the same as yours.

@redPanther
Copy link
Contributor Author

thats a good idea, will modify the code tomorow

- better performance for brightness - use piecewise linear instead of sqrt
@redPanther
Copy link
Contributor Author

redPanther commented Apr 3, 2017

now backlightThreshold is 0-100
brightness uses piecewise linear func as suggested

just for interessed:
hyperion_brightness

this shows mapping of brightness value to max color value at brightnessCompensation=100

@redPanther redPanther merged commit 5ea3c75 into hyperion-project:master Apr 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants