Inlined gamma lookup with alignment enforced by aligned_ptr type. Avoids cross-TU function call overhead of gamma_2_8() in hot span loops.
| 21 | // Inlined gamma lookup with alignment enforced by aligned_ptr type. |
| 22 | // Avoids cross-TU function call overhead of gamma_2_8() in hot span loops. |
| 23 | FL_ALWAYS_INLINE u16 gamma_lut_read(aligned_ptr<const u16, 64> lut, u8 idx) { |
| 24 | return FL_PGM_READ_WORD_ALIGNED(&lut[idx]); |
| 25 | } |
| 26 | |
| 27 | // Branchless scale16by8: (i * (1 + scale)) >> 8. |
| 28 | // Eliminates the if(scale==0) branch from the standard scale16by8. |
no outgoing calls
no test coverage detected