Types of supported pixel formats.
Synopsis:
#include <screen/screen.h>
enum {
SCREEN_FORMAT_BYTE = 1
SCREEN_FORMAT_RGBA4444 = 2
SCREEN_FORMAT_RGBX4444 = 3
SCREEN_FORMAT_RGBA5551 = 4
SCREEN_FORMAT_RGBX5551 = 5
SCREEN_FORMAT_RGB565 = 6
SCREEN_FORMAT_RGB888 = 7
SCREEN_FORMAT_RGBA8888 = 8
SCREEN_FORMAT_RGBX8888 = 9
SCREEN_FORMAT_YVU9 = 10
SCREEN_FORMAT_YUV420 = 11
SCREEN_FORMAT_NV12 = 12
SCREEN_FORMAT_YV12 = 13
SCREEN_FORMAT_UYVY = 14
SCREEN_FORMAT_YUY2 = 15
SCREEN_FORMAT_YVYU = 16
SCREEN_FORMAT_V422 = 17
SCREEN_FORMAT_AYUV = 18
SCREEN_FORMAT_NFORMATS
};
Data:
- SCREEN_FORMAT_BYTE
- SCREEN_FORMAT_RGBA4444
- 16 bits per pixel (4 bits per channel) RGB with alpha channel
- SCREEN_FORMAT_RGBX4444
- 16 bits per pixel (4 bits per channel) RGB with alpha channel disregarded
- SCREEN_FORMAT_RGBA5551
- 16 bits per pixel, 2 bytes containing R, G, and B values (5 bits per channel with single-bit alpha channel)
- SCREEN_FORMAT_RGBX5551
- 16 bits per pixel, 2 bytes containing R, G, and B values (5 bits per channel with single-bit alpha channel disregarded)
- SCREEN_FORMAT_RGB565
- 16 bits per pixel; uses five bits for red, six bits for green and five bits for blue.
This pixel format represents each pixel in the following order (high byte to low byte): RRRR RGGG GGGB BBBB
- SCREEN_FORMAT_RGB888
- 24 bits per pixel (8 bits per channel) RGB
- SCREEN_FORMAT_RGBA8888
- 32 bits per pixel (8 bits per channel) RGB with alpha channel
- SCREEN_FORMAT_RGBX8888
- 32 bits per pixel (8 bits per channel) RGB with alpha channel disregarded
- SCREEN_FORMAT_YVU9
- 9 bits per pixel planar YUV format.
8-bit Y plane and 8-bit 4x4 subsampled U and V planes. Registered by Intel.
- SCREEN_FORMAT_YUV420
- Standard NTSC TV transmission format.
- SCREEN_FORMAT_NV12
- 12 bits per pixel planar YUV format.
8-bit Y plane and 2x2 subsampled, interleaved U and V planes.
- SCREEN_FORMAT_YV12
- 12 bits per pixel planar YUV format.
8-bit Y plane and 8-bit 2x2 subsampled U and V planes.
- SCREEN_FORMAT_UYVY
- 16 bits per pixel packed YUV format.
YUV 4:2:2 - Y sampled at every pixel, U and V sampled at every second pixel horizontally on each line. A macropixel contains 2 pixels in 1 uint32.
- SCREEN_FORMAT_YUY2
- 16 bits per pixel packed YUV format.
YUV 4:2:2 - as in UYVY, but with different component ordering within the uint32 macropixel.
- SCREEN_FORMAT_YVYU
- 16 bits per pixel packed YUV format.
YUV 4:2:2 - as in UYVY, but with different component ordering within the uint32 macropixel.
- SCREEN_FORMAT_V422
- Packed YUV format.
Inverted version of UYVY.
- SCREEN_FORMAT_AYUV
- Packed YUV format.
Combined YUV and alpha
- SCREEN_FORMAT_NFORMATS
Library:
libscreen
Description:
Formats with an alpha channel will have source alpha enabled automatically. Applications that want the Screen library to disregard the alpha channel can choose a pixel format with an X.