1 #include "framebuffer-pixfmt-rgb24.hpp"
7 _pixfmt_rgb24
<uvswap
>::~_pixfmt_rgb24() throw() {}
10 void _pixfmt_rgb24
<uvswap
>::decode(uint32_t* target
, const uint8_t* src
, size_t width
) throw()
13 for(size_t i
= 0; i
< width
; i
++) {
14 target
[i
] = (uint32_t)src
[3 * i
+ 2] << 16;
15 target
[i
] |= (uint32_t)src
[3 * i
+ 1] << 8;
16 target
[i
] |= src
[3 * i
+ 0];
19 for(size_t i
= 0; i
< width
; i
++) {
20 target
[i
] = (uint32_t)src
[3 * i
+ 0] << 16;
21 target
[i
] |= (uint32_t)src
[3 * i
+ 1] << 8;
22 target
[i
] |= src
[3 * i
+ 2];
28 void _pixfmt_rgb24
<uvswap
>::decode(uint32_t* target
, const uint8_t* src
, size_t width
,
29 const auxpalette
<false>& auxp
) throw()
31 for(size_t i
= 0; i
< width
; i
++) {
32 target
[i
] = static_cast<uint32_t>(src
[3 * i
+ (uvswap
? 2 : 0)]) << auxp
.rshift
;
33 target
[i
] |= static_cast<uint32_t>(src
[3 * i
+ 1]) << auxp
.gshift
;
34 target
[i
] |= static_cast<uint32_t>(src
[3 * i
+ (uvswap
? 0 : 2)]) << auxp
.bshift
;
39 void _pixfmt_rgb24
<uvswap
>::decode(uint64_t* target
, const uint8_t* src
, size_t width
,
40 const auxpalette
<true>& auxp
) throw()
42 for(size_t i
= 0; i
< width
; i
++) {
43 target
[i
] = static_cast<uint64_t>(src
[3 * i
+ (uvswap
? 2 : 0)]) << auxp
.rshift
;
44 target
[i
] |= static_cast<uint64_t>(src
[3 * i
+ 1]) << auxp
.gshift
;
45 target
[i
] |= static_cast<uint64_t>(src
[3 * i
+ (uvswap
? 0 : 2)]) << auxp
.bshift
;
46 target
[i
] += (target
[i
] << 8);
51 void _pixfmt_rgb24
<uvswap
>::set_palette(auxpalette
<false>& auxp
, uint8_t rshift
, uint8_t gshift
,
52 uint8_t bshift
) throw(std::bad_alloc
)
61 void _pixfmt_rgb24
<uvswap
>::set_palette(auxpalette
<true>& auxp
, uint8_t rshift
, uint8_t gshift
,
62 uint8_t bshift
) throw(std::bad_alloc
)
71 uint8_t _pixfmt_rgb24
<uvswap
>::get_bpp() throw()
77 uint8_t _pixfmt_rgb24
<uvswap
>::get_ss_bpp() throw()
83 uint32_t _pixfmt_rgb24
<uvswap
>::get_magic() throw()
91 _pixfmt_rgb24
<false> pixfmt_rgb24
;
92 _pixfmt_rgb24
<true> pixfmt_bgr24
;