11template<std::
unsigned_
integral Pixel>
class PixelOperations;
31 [[nodiscard]]
inline uint32_t
mul32(uint32_t p)
const
33 return ((((p & 0x00FF00FF) * factor) & 0xFF00FF00) >> 8)
34 | ((((p >> 8) & 0x00FF00FF) * factor) & 0xFF00FF00);
37 [[nodiscard]]
inline uint32_t
conv32(uint32_t p)
const
51 void setFactor32(
unsigned factor);
53 [[nodiscard]]
inline uint32_t
mul32(uint16_t p)
const
58 [[nodiscard]]
inline uint16_t
conv32(uint32_t p)
const
61 (std::rotr(p, Rshift3) & Rmask1) |
62 (std::rotr(p, Gshift3) & Gmask1) |
63 (std::rotr(p, Bshift3) & Bmask1));
67 std::array<uint32_t, 0x10000> tab = {};
69 int Rshift1, Gshift1, Bshift1;
70 int Rshift2, Gshift2, Bshift2;
71 int Rshift3, Gshift3, Bshift3;
72 uint16_t Rmask1, Gmask1, Bmask1;
73 uint16_t Rmask2, Gmask2, Bmask2;
uint16_t conv32(uint32_t p) const
uint32_t mul32(uint16_t p) const
uint32_t mul32(uint32_t p) const
uint32_t conv32(uint32_t p) const
void setFactor32(unsigned f)
Multiply32(const PixelOperations< uint32_t > &)
Helper class to perform 'pixel x scalar' calculations.
This file implemented 3 utility functions: