|
gem5
|
Color channel conversion and scaling helper class. More...
#include <framebuffer.hh>
Public Member Functions | |
| Channel (unsigned offset, unsigned width) | |
| uint8_t | toPixel (uint32_t word) const |
| Get the value of a single color channel represented as an 8-bit number. More... | |
| uint32_t | fromPixel (uint8_t ch) const |
| Convert an 8-bit representation of a color into an external format. More... | |
Public Attributes | |
| unsigned | offset |
| Offset in bits. More... | |
| unsigned | mask |
| Bit mask (after shifting) More... | |
| float | factor |
| Scaling factor when converting to the full range of an 8-bit color channel. More... | |
Color channel conversion and scaling helper class.
Definition at line 97 of file framebuffer.hh.
| PixelConverter::Channel::Channel | ( | unsigned | offset, |
| unsigned | width | ||
| ) |
| offset | Offset in bits. |
| width | Width in bits. |
Definition at line 71 of file framebuffer.cc.
|
inline |
Convert an 8-bit representation of a color into an external format.
Definition at line 116 of file framebuffer.hh.
References factor, mask, and offset.
Referenced by PixelConverter::fromPixel().
|
inline |
Get the value of a single color channel represented as an 8-bit number.
Definition at line 108 of file framebuffer.hh.
Referenced by PixelConverter::toPixel().
| float PixelConverter::Channel::factor |
Scaling factor when converting to the full range of an 8-bit color channel.
Definition at line 128 of file framebuffer.hh.
Referenced by fromPixel(), and toPixel().
| unsigned PixelConverter::Channel::mask |
Bit mask (after shifting)
Definition at line 123 of file framebuffer.hh.
Referenced by fromPixel(), toPixel(), and VncServer::VncServer().
| unsigned PixelConverter::Channel::offset |
Offset in bits.
Definition at line 121 of file framebuffer.hh.
Referenced by fromPixel(), and VncServer::VncServer().