10 template<std::
unsigned_
integral Pixel>
class PixelOperations;
28 [[nodiscard]]
inline uint32_t
mul32(uint32_t p)
const
30 return ((((p & 0x00FF00FF) * factor) & 0xFF00FF00) >> 8)
31 | ((((p >> 8) & 0x00FF00FF) * factor) & 0xFF00FF00);
34 [[nodiscard]]
inline uint32_t
conv32(uint32_t p)
const
48 void setFactor32(
unsigned factor);
50 [[nodiscard]]
inline uint32_t
mul32(uint16_t p)
const
55 [[nodiscard]]
inline uint16_t
conv32(uint32_t p)
const
57 return (std::rotr(p, Rshift3) & Rmask1) |
58 (std::rotr(p, Gshift3) & Gmask1) |
59 (std::rotr(p, Bshift3) & Bmask1);
63 uint32_t tab[0x10000];
65 unsigned Rshift1, Gshift1, Bshift1;
66 unsigned Rshift2, Gshift2, Bshift2;
67 unsigned Rshift3, Gshift3, Bshift3;
68 uint16_t Rmask1, Gmask1, Bmask1;
69 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)
Helper class to perform 'pixel x scalar' calculations.
void format(SectorAccessibleDisk &disk, bool dos1)
Format the given disk (= a single partition).
This file implemented 3 utility functions: