gem5  v20.0.0.2
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Public Attributes | List of all members
PixelConverter::Channel Struct Reference

Color channel conversion and scaling helper class. More...

#include <pixel.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...
 

Detailed Description

Color channel conversion and scaling helper class.

Definition at line 93 of file pixel.hh.

Constructor & Destructor Documentation

◆ Channel()

PixelConverter::Channel::Channel ( unsigned  offset,
unsigned  width 
)
Parameters
offsetOffset in bits.
widthWidth in bits.

Definition at line 65 of file pixel.cc.

Member Function Documentation

◆ fromPixel()

uint32_t PixelConverter::Channel::fromPixel ( uint8_t  ch) const
inline

Convert an 8-bit representation of a color into an external format.

Definition at line 112 of file pixel.hh.

References ArmISA::mask, and ArmISA::offset.

◆ toPixel()

uint8_t PixelConverter::Channel::toPixel ( uint32_t  word) const
inline

Get the value of a single color channel represented as an 8-bit number.

Definition at line 104 of file pixel.hh.

References ArmISA::mask.

Member Data Documentation

◆ factor

float PixelConverter::Channel::factor

Scaling factor when converting to the full range of an 8-bit color channel.

Definition at line 124 of file pixel.hh.

◆ mask

unsigned PixelConverter::Channel::mask

Bit mask (after shifting)

Definition at line 119 of file pixel.hh.

Referenced by VncServer::VncServer().

◆ offset

unsigned PixelConverter::Channel::offset

Offset in bits.

Definition at line 117 of file pixel.hh.

Referenced by VncServer::VncServer().


The documentation for this struct was generated from the following files:

Generated on Mon Jun 8 2020 15:45:26 for gem5 by doxygen 1.8.13