Gamp v0.0.7-54-gccdc599
Gamp: Graphics, Audio, Multimedia and Processing
Loading...
Searching...
No Matches
Gamp Pixel

Pixel definition and conversion. More...

Classes

class  gamp::render::pixel::ComponentMap
 
class  gamp::render::pixel::GenericPixelRect
 Generic PixelRectangle implementation. More...
 
class  gamp::render::pixel::PixelFormat
 Packed pixel composition, i.e. More...
 
class  gamp::render::pixel::PixelFormats
 Basic pixel formats. More...
 
class  gamp::render::pixel::PixelRectangle
 Pixel Rectangle identified by it's hashCode(). More...
 

Typedefs

typedef std::array< CType, 4 > gamp::render::pixel::comparray4_t
 
typedef std::array< uint32_t, 4 > gamp::render::pixel::u32array4_t
 

Enumerations

enum class  gamp::render::pixel::CType : uint8_t {
  gamp::render::pixel::CType::none = 0 , gamp::render::pixel::CType::R = 1 , gamp::render::pixel::CType::G = 2 , gamp::render::pixel::CType::B = 3 ,
  gamp::render::pixel::CType::A = 4 , gamp::render::pixel::CType::Y = 10 , gamp::render::pixel::CType::U = 11 , gamp::render::pixel::CType::V = 12
}
 Component types. More...
 

Functions

constexpr gamp::render::pixel::ComponentMap::ComponentMap (jau::nsize_t srcCompCount, const comparray4_t &srcCompOrder, jau::nsize_t dstCompCount, const comparray4_t &dstCompOrder) noexcept
 
uint32_t gamp::render::pixel::find (CType s, jau::nsize_t poolCount, const comparray4_t &pool, bool mapRGB2Y) noexcept
 Returns first index of given CType within pool , npos if not exists.
 
uint32_t gamp::render::pixel::getShifted32 (uint32_t bytesPerPixel, const uint8_t *data)
 Returns shifted bytes from the given data at given offset of maximal 4 bytesPerPixel.
 
uint64_t gamp::render::pixel::getShifted64 (uint32_t bytesPerPixel, const uint8_t *data)
 Returns shifted bytes from the given data at given offset of maximal 8 bytesPerPixel.
 
 gamp::render::pixel::JAU_MAKE_ENUM_STRING (CType, R, G, B, A, Y, U, V)
 

Variables

constexpr uint32_t gamp::render::pixel::npos = std::numeric_limits<uint32_t>::max()
 maximum index, denoting no position or not found.
 

Detailed Description

Pixel definition and conversion.

Typedef Documentation

◆ u32array4_t

typedef std::array<uint32_t, 4> gamp::render::pixel::u32array4_t

Definition at line 58 of file PixelUtil.hpp.

◆ comparray4_t

typedef std::array<CType, 4> gamp::render::pixel::comparray4_t

Definition at line 59 of file PixelUtil.hpp.

Enumeration Type Documentation

◆ CType

enum class gamp::render::pixel::CType : uint8_t
strong

Component types.

Enumerator
none 

undefined

Red component.

Green component.

Blue component.

Alpha component.

Luminance component, e.g.

grayscale or Y of YUV

U component of YUV.

V component of YUV.

Definition at line 37 of file PixelUtil.hpp.

Function Documentation

◆ JAU_MAKE_ENUM_STRING()

gamp::render::pixel::JAU_MAKE_ENUM_STRING ( CType ,
R ,
G ,
B ,
A ,
Y ,
U ,
V  )

◆ find()

uint32_t gamp::render::pixel::find ( CType s,
jau::nsize_t poolCount,
const comparray4_t & pool,
bool mapRGB2Y )
inlinenoexcept

Returns first index of given CType within pool , npos if not exists.

Definition at line 65 of file PixelUtil.hpp.

Here is the caller graph for this function:

◆ ComponentMap()

gamp::render::pixel::ComponentMap::ComponentMap ( jau::nsize_t srcCompCount,
const comparray4_t & srcCompOrder,
jau::nsize_t dstCompCount,
const comparray4_t & dstCompOrder )
inlineconstexprnoexcept

Definition at line 108 of file PixelUtil.hpp.

◆ getShifted32()

uint32_t gamp::render::pixel::getShifted32 ( uint32_t bytesPerPixel,
const uint8_t * data )
inline

Returns shifted bytes from the given data at given offset of maximal 4 bytesPerPixel.

Parameters
bytesPerPixelnumber of bytes per pixel to fetch, a maximum of 4 are allowed
databyte buffer covering at least one complete pixel, i.e. bytesPerPixel bytes
Returns
the shifted 32bit integer value of the pixel

Definition at line 133 of file PixelUtil.hpp.

◆ getShifted64()

uint64_t gamp::render::pixel::getShifted64 ( uint32_t bytesPerPixel,
const uint8_t * data )
inline

Returns shifted bytes from the given data at given offset of maximal 8 bytesPerPixel.

Parameters
bytesPerPixelnumber of bytes per pixel to fetch, a maximum of 8 are allowed
databyte buffer covering at least one complete pixel, i.e. bytesPerPixel bytes
Returns
the shifted 64bit integer value of the pixel

Definition at line 150 of file PixelUtil.hpp.

Variable Documentation

◆ npos

uint32_t gamp::render::pixel::npos = std::numeric_limits<uint32_t>::max()
inlineconstexpr

maximum index, denoting no position or not found.

Definition at line 62 of file PixelUtil.hpp.