|
Gamp v0.0.7-54-gccdc599
Gamp: Graphics, Audio, Multimedia and Processing
|
Basic pixel formats. More...
#include <PixelFormat.hpp>
Static Public Member Functions | |
| static void | convert (const ComponentMap &cmap, const PixelFormat dstComp, uint8_t *dstBitStream, const PixelFormat &srcComp, const uint8_t *srcBitStream) |
| static GenericPixelRect | convert (const PixelRectangle &src, const PixelFormat &destFmt, uint32_t ddestStride, bool isGLOriented) |
| static void | convert (const PixelRectangle &src, PixelRectangle &dst) |
| static void | convert (const Point2u32 &size, const uint8_t *src_pixels, const PixelFormat &src_fmt, bool src_glOriented, uint32_t src_lineStride, uint8_t *dst_pixels, const PixelFormat &dst_fmt, bool dst_glOriented, uint32_t dst_lineStride) |
| static uint32_t | convertU32 (const PixelFormat &dst_fmt, const PixelFormat &src_fmt, const uint8_t *src) |
| static uint32_t | convertU32 (const PixelFormat &dst_fmt, const PixelFormat &src_fmt, uint32_t src_pixel) |
| static const PixelFormat & | reverse (const PixelFormat &fmt) noexcept |
Returns the PixelFormat with reversed components of fmt. | |
| static uint32_t | toU32 (const PixelFormat &dst_fmt, uint8_t r, uint8_t g, uint8_t b, uint8_t a) |
Static Public Attributes | |
| static constexpr PixelFormat | ABGR1555 |
Stride is 16 bits, 16 bits per pixel, 4 discrete components. | |
| static constexpr PixelFormat | ABGR8888 = PixelFormat(4, { CType::A, CType::B, CType::G, CType::R }, 8, 32) |
Stride is 32 bits, 32 bits per pixel, 4 uniform components of 8 bits. | |
| static constexpr PixelFormat | ARGB8888 = PixelFormat(4, { CType::A, CType::R, CType::G, CType::B }, 8, 32) |
Stride is 32 bits, 32 bits per pixel, 4 uniform components of 8 bits. | |
| static constexpr PixelFormat | BGR565 |
Stride is 16 bits, 16 bits per pixel, 3 discrete components. | |
| static constexpr PixelFormat | BGR888 = PixelFormat(3, { CType::B, CType::G, CType::R }, 8, 24) |
Stride is 24 bits, 24 bits per pixel, 3 uniform components of of 8 bits. | |
| static constexpr PixelFormat | BGRA8888 = PixelFormat(4, { CType::B, CType::G, CType::R, CType::A }, 8, 32) |
Stride is 32 bits, 32 bits per pixel, 4 uniform components of 8 bits. | |
| static constexpr PixelFormat | BGRx8888 = PixelFormat(3, { CType::B, CType::G, CType::R }, 8, 32) |
Stride is 32 bits, 24 bits per pixel, 3 uniform components of 8 bits. | |
| static constexpr std::array< const PixelFormat *, 11 > | formats |
| static constexpr PixelFormat | LUMINANCE = PixelFormat(1, { CType::Y }, 8, 8) |
| Stride is 8 bits, 8 bits per pixel, 1 component of 8 bits. | |
| static constexpr PixelFormat | RGB565 |
Stride is 16 bits, 16 bits per pixel, 3 discrete components. | |
| static constexpr PixelFormat | RGB888 = PixelFormat(3, { CType::R, CType::G, CType::B }, 8, 24) |
Stride 24 bits, 24 bits per pixel, 3 uniform components of 8 bits. | |
| static constexpr PixelFormat | RGBA5551 |
Stride is 16 bits, 16 bits per pixel, 4 discrete components. | |
| static constexpr PixelFormat | RGBA8888 = PixelFormat(4, { CType::R, CType::G, CType::B, CType::A }, 8, 32) |
Stride is 32 bits, 32 bits per pixel, 4 uniform components of 8 bits. | |
| static constexpr PixelFormat | RGBx8888 = PixelFormat(3, { CType::R, CType::G, CType::B }, 8, 32) |
Stride is 32 bits, 24 bits per pixel, 3 uniform components of 8 bits. | |
Basic pixel formats.
Notation follows OpenGL notation, i.e. name consist of all it's component names followed by their bit size.
Order of component names is from lowest-bit to highest-bit.
In case component-size is 1 byte (e.g. OpenGL data-type GL_UNSIGNED_BYTE), component names are ordered from lowest-byte to highest-byte. Note that OpenGL applies special interpretation if data-type is e.g. GL_UNSIGNED_8_8_8_8_REV or GL_UNSIGNED_8_8_8_8_REV.
PixelFormat can be converted to OpenGL GLPixelAttributes via
GLPixelAttributes glpa = GLPixelAttributes.convert(PixelFormat pixFmt, GLProfile glp);
See OpenGL Specification 4.3 - February 14, 2013, Core Profile, Section 8.4.4 Transfer of Pixel Rectangles, p. 161-174.
Definition at line 458 of file PixelFormat.hpp.
|
inlinestaticnoexcept |
Returns the PixelFormat with reversed components of fmt.
If no reversed PixelFormat is available, returns fmt.
Definition at line 753 of file PixelFormat.hpp.
|
inlinestatic |
|
inlinestatic |
Definition at line 800 of file PixelFormat.hpp.
|
inlinestatic |
Definition at line 844 of file PixelFormat.hpp.
|
inlinestatic |
|
inlinestatic |
| src | source PixelRectangle |
| dst | destination PixelRectangle |
Definition at line 907 of file PixelFormat.hpp.
|
inlinestatic |
| width | width of the to be converted pixel rectangle |
| height | height of the to be converted pixel rectangle |
| src_bb | ByteBuffer source |
| src_fmt | source PixelFormat |
| src_glOriented | if true, the source memory is laid out in OpenGL's coordinate system, origin at bottom left, otherwise origin at top left. |
| src_lineStride | line stride in byte-size for source, i.e. byte count from one line to the next. Must be >= src_fmt.comp.bytesPerPixel() * width or zero for default stride. |
| dst_bb | ByteBuffer sink |
| dst_fmt | destination PixelFormat |
| dst_glOriented | if true, the source memory is laid out in OpenGL's coordinate system, origin at bottom left, otherwise origin at top left. |
| dst_lineStride | line stride in byte-size for destination, i.e. byte count from one line to the next. Must be >= dst_fmt.comp.bytesPerPixel() * width or zero for default stride. |
| IllegalStateException | |
| IllegalArgumentException | if src_lineStride or dst_lineStride is invalid |
Definition at line 935 of file PixelFormat.hpp.
|
inlinestatic |
Definition at line 1013 of file PixelFormat.hpp.
|
staticconstexpr |
Stride is 8 bits, 8 bits per pixel, 1 component of 8 bits.
Compatible with:
Definition at line 469 of file PixelFormat.hpp.
|
staticconstexpr |
Stride is 16 bits, 16 bits per pixel, 3 discrete components.
The discrete components are interleaved in the order Low to High:
Compatible with:
Definition at line 490 of file PixelFormat.hpp.
|
staticconstexpr |
Stride is 16 bits, 16 bits per pixel, 3 discrete components.
The discrete components are interleaved in the order Low to High:
Compatible with:
Definition at line 514 of file PixelFormat.hpp.
|
staticconstexpr |
Stride is 16 bits, 16 bits per pixel, 4 discrete components.
The discrete components are interleaved in the order Low to High:
Compatible with:
Definition at line 539 of file PixelFormat.hpp.
|
staticconstexpr |
Stride is 16 bits, 16 bits per pixel, 4 discrete components.
The discrete components are interleaved in the order Low to High:
Compatible with:
Definition at line 564 of file PixelFormat.hpp.
|
staticconstexpr |
Stride 24 bits, 24 bits per pixel, 3 uniform components of 8 bits.
The uniform components are interleaved in the order Low to High:
Compatible with:
Definition at line 588 of file PixelFormat.hpp.
|
staticconstexpr |
Stride is 24 bits, 24 bits per pixel, 3 uniform components of of 8 bits.
The uniform components are interleaved in the order Low to High:
Compatible with:
TYPE_3BYTE_BGR Definition at line 609 of file PixelFormat.hpp.
|
staticconstexpr |
Stride is 32 bits, 24 bits per pixel, 3 uniform components of 8 bits.
The uniform components are interleaved in the order Low to High:
Compatible with:
TYPE_INT_BGR Definition at line 630 of file PixelFormat.hpp.
|
staticconstexpr |
Stride is 32 bits, 24 bits per pixel, 3 uniform components of 8 bits.
The uniform components are interleaved in the order Low to High:
Compatible with:
TYPE_INT_RGB Definition at line 651 of file PixelFormat.hpp.
|
staticconstexpr |
Stride is 32 bits, 32 bits per pixel, 4 uniform components of 8 bits.
The uniform components are interleaved in the order Low to High:
Compatible with:
Definition at line 676 of file PixelFormat.hpp.
|
staticconstexpr |
Stride is 32 bits, 32 bits per pixel, 4 uniform components of 8 bits.
The uniform components are interleaved in the order Low to High:
Compatible with:
TYPE_4BYTE_ABGR Definition at line 698 of file PixelFormat.hpp.
|
staticconstexpr |
Stride is 32 bits, 32 bits per pixel, 4 uniform components of 8 bits.
The uniform components are interleaved in the order Low to High:
Compatible with:
Definition at line 720 of file PixelFormat.hpp.
|
staticconstexpr |
Stride is 32 bits, 32 bits per pixel, 4 uniform components of 8 bits.
The uniform components are interleaved in the order Low to High:
Compatible with:
TYPE_INT_ARGB Definition at line 744 of file PixelFormat.hpp.
|
staticconstexpr |
Definition at line 746 of file PixelFormat.hpp.