You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I sometimes wonder if we should somehow provide a way of disabling scaling -- or adjust the scaling math so that a brightness of "255" has the effect of 'no scaling'.
We currently have:
output = scale8( input, scalefactor);
The 'new math' would be (in it's worst case, see below for improvement) :
I hate having to special case the '|| scalefactor == 0' in the conditional like that. If we had one test at the start of the loop to see if scalefactor == 0, and if so, just basically showColor( CRGB::Black), then all we'd have for each byte is:
I'm going to close this ticket since due to Moon (temporal dithering et al) in v2.1, it's a completely different game.
The work for ticket #49 could touch on this, but again, it's a very different situation now and I think the need to document scaling in the way envisioned by this ticket is pretty much gone now.
Activity
kriegsman commentedon Jan 24, 2014
I sometimes wonder if we should somehow provide a way of disabling scaling -- or adjust the scaling math so that a brightness of "255" has the effect of 'no scaling'.
We currently have:
The 'new math' would be (in it's worst case, see below for improvement) :
I hate having to special case the '|| scalefactor == 0' in the conditional like that. If we had one test at the start of the loop to see if scalefactor == 0, and if so, just basically showColor( CRGB::Black), then all we'd have for each byte is:
Given the AVR instruction set it might be better to do it this way:
There's another way to get to the same result (or a similarly good one) using temporal dithering, but that's another can of split loom cable ducting.
kriegsman commentedon Jan 24, 2014
Er, now that I think about it, scale8 could do rounding with two more instructions.
Right now, it does
But what's really going on is
A 'rounding version' could do this:
Just thinking out loud.
kriegsman commentedon Feb 24, 2014
Never mind. See also: Moon.
But we will need to update the docs. A bit.
kriegsman commentedon Apr 18, 2014
I'm going to close this ticket since due to Moon (temporal dithering et al) in v2.1, it's a completely different game.
The work for ticket #49 could touch on this, but again, it's a very different situation now and I think the need to document scaling in the way envisioned by this ticket is pretty much gone now.