Given a starting value and profile, calculate the resulting brightness The returned value is always equal to or less than val
| 2303 | // Given a starting value and profile, calculate the resulting brightness |
| 2304 | // The returned value is always equal to or less than val |
| 2305 | static inline uint32_t Pixel_ApplyFadeBrightness( uint8_t brightness, uint32_t val ) |
| 2306 | { |
| 2307 | // No need to calculate if brightness is max or 0 |
| 2308 | if ( brightness == 255 ) |
| 2309 | { |
| 2310 | return val; |
| 2311 | } |
| 2312 | if ( brightness == 0 ) |
| 2313 | { |
| 2314 | return 0; |
| 2315 | } |
| 2316 | uint32_t result = (val * brightness) >> 8; // val * brightness / 255 |
| 2317 | return result; |
| 2318 | } |
| 2319 | |
| 2320 | void Pixel_SecondaryProcessing() |
| 2321 | { |
no outgoing calls
no test coverage detected
searching dependent graphs…