Utility class for describing pixel formats. More...
Public Types | |
enum | Type { None, GRAY8, GRAY16, GRAYF, RGB8, RGB15, RGB16, RGB24, RGB48, RGBF, RGBHF, RGBA32, RGBAF, RGBAHF, BGR8, BGR15, BGR16, BGR24, BGR32, ABGR32, YUV, YUV444, YUV422, YUV421, YUV411, YUV420, YUV410, YUV311 } |
Pixel format. More... | |
Static Public Member Functions | |
static int | GetComponentBits (Pixel.Type type, int comp) |
static int | GetComponentsCount (Pixel.Type type) |
static int | GetPackedBits (Pixel.Type type) |
static int | GetPlaneComponentsCount (Pixel.Type type) |
Get the count of components needed to store a pixel plane. | |
static Pixel.Type | GetTypeFromBits (int cBits) |
static bool | IsPacked (Pixel.Type type) |
Determine whether pixel components are packed in a single plane. |
Utility class for describing pixel formats.
Pixel format.
None |
Undefined pixel type. |
GRAY8 |
Grayscale composed by 8 bits. |
GRAY16 |
Grayscale composed by 16 bits. |
GRAYF |
Grayscale composed by floating point number. |
RGB8 |
RGB composed by 8 bits. RGB packed integer color composed by 8 bits. Information composition: R(3) G(3) B(2) => LSB--MSB => RRRGGGBB When specifying texture, the following parameters shall be set: OpenGL corresponding base format (format): Gl.RGB. OpenGL corresponding data type (type): Gl.UNSIGNED_BYTE_3_3_2. |
RGB15 |
RGB composed by 15 bits. RGB packed integer color composed by 16 bits. Information composition: R(5) G(5) B(5) => LSB----------MSB => RRRRRGGGGGBBBBBX When specifying texture, the following parameters shall be set: OpenGL corresponding base format (format): Gl.RGB. OpenGL corresponding data type (type): Gl.Gl.UNSIGNED_SHORT_5_5_5_1.. |
RGB16 |
RGB composed by 16 bits. RGB packed integer color composed by 16 bits. Information composition: R(5) G(6) B(5) => LSB----------MSB => RRRRRGGGGGGBBBBB When specifying texture, the following parameters shall be set: OpenGL corresponding base format (format): Gl.RGB. OpenGL corresponding data type (type): Gl.UNSIGNED_SHORT_5_6_5. |
RGB24 |
RGB composed by 24 bits. RGB packed integer color composed by 24 bits. Information composition: R(8) G(8) B(8) => LSB------------------MSB => RRRRRRRRGGGGGGGGBBBBBBBB When specifying texture, the following parameters shall be set: OpenGL corresponding base format (format): Gl.RGB. OpenGL corresponding data type (type): Gl.UNSIGNED_BYTE. |
RGB48 |
RGB composed by 48 bits. RGB packed integer color composed by 48 bits. Information composition: R(16) G(16) B(16) => LSB------------------MSB => RR GG BB When specifying texture, the following parameters shall be set: OpenGL corresponding base format (format): Gl.RGB. OpenGL corresponding data type (type): Gl.UNSIGNED_BYTE. |
RGBF |
RGB composed by 3 (normalized) floating point numbers. RGB packed floating color composed by 32 bits. Information composition: R(32) G(32) B(32) => LSB--------------------------MSB => float32(R) float32(G) float32(B) When specifying texture, the following parameters shall be set: OpenGL corresponding base format (format): Gl.RGB. OpenGL corresponding data type (type): Gl.FLOAT. |
RGBHF |
RGB composed by 3 (normalized) half floating point numbers. OpenGL corresponding base format (format): Gl.RGB. OpenGL corresponding data type (type): Gl.HALF_FLOAT. |
RGBA32 |
RGBA composed by 32 bits. RGBA packed integer color composed by 32 bits. Information composition: R(8) G(8) B(8) A(8) => LSB--------------------------MSB => RRRRRRRRGGGGGGGGBBBBBBBBAAAAAAAA When specifying texture, the following parameters shall be set: OpenGL corresponding base format (format): Gl.RGBA. OpenGL corresponding data type (type): Gl.UNSIGNED_BYTE. |
RGBAF |
RGBA composed by 4 (normalized) floating point numbers. RGBA packed integer color composed by 32 bits. Information composition: R(10) G(10) B(10) A(2) => LSB--------------------------MSB => RRRRRRRRRRGGGGGGGGGGBBBBBBBBBBAA When specifying texture, the following parameters shall be set: OpenGL corresponding base format (format): Gl.RGBA. OpenGL corresponding data type (type): Gl.FLOAT. |
RGBAHF |
RGBA composed by 4 (normalized) half floating point numbers. OpenGL corresponding base format (format): Gl.RGBA. OpenGL corresponding data type (type): Gl.HALF_FLOAT. |
BGR8 |
BGR composed by 8 bits. BGR packed integer color composed by 8 bits. Information composition: B(3) G(3) R(2) => LSB--MSB => BBBGGGRR When specifying texture, the following parameters shall be set: OpenGL corresponding base format (format): Gl.BGR. OpenGL corresponding data type (type): Gl.UNSIGNED_BYTE_2_3_3_REV. |
BGR15 |
BGR composed by 15 bits. BGR packed integer color composed by 16 bits. Information composition: R(5) G(5) B(5) => LSB----------MSB => BBBBBGGGGGRRRRX When specifying texture, the following parameters shall be set: OpenGL corresponding base format (format): Gl.RGB. OpenGL corresponding data type (type): Gl.Gl.UNSIGNED_SHORT_5_5_5_1.. |
BGR16 |
BGR composed by 16 bits. BGR packed integer color composed by 16 bits. Information composition: R(5) G(6) B(5) => LSB----------MSB => BBBBBGGGGGGRRRRR When specifying texture, the following parameters shall be set: OpenGL corresponding base format (format): Gl.RGB. OpenGL corresponding data type (type): Gl.UNSIGNED_SHORT_5_6_5. |
BGR24 | |
BGR32 | |
ABGR32 | |
YUV |
Generic YUV pixel format. |
YUV444 |
YUV pixel format. Each of the three Y'CbCr components have the same sample rate. This scheme is sometimes used in high-end film scanners and cinematic postproduction. |
YUV422 |
YUV pixel format. The two chroma components are sampled at half the sample rate of luma: the horizontal chroma resolution is halved. This reduces the bandwidth of a video signal by one-third with little to no visual difference. |
YUV421 |
YUV pixel format. Although this mode is technically defined, very few software or hardware codecs use this sampling mode. Cb horizontal resolution is twice as low as one of Cr (and four times as low as one of Y). This exploits the fact that human eye is less sensitive to blue color than to red. NTSC is similar, in using lower resolution for blue/red than yellow/green, which in turn has less resolution than luma. |
YUV411 |
YUV pixel format. In 4:1:1 chroma subsampling, the horizontal color resolution is quartered, and the bandwidth is halved compared to no chroma subsampling. Initially, 4:1:1 chroma subsampling of the DV format was not considered to be broadcast quality and was only acceptable for low-end and consumer applications.[2][3] Currently, DV-based formats (which use 4:1:1 chroma subsampling) are used professionally in electronic news gathering and in playout servers. DV has also been sporadically used in feature films and in digital cinematography. |
YUV420 |
YUV pixel format. Cb and Cr are each subsampled at a factor of 2 both horizontally and vertically. There are three variants of 4:2:0 schemes, having different horizontal and vertical siting:
|
YUV410 |
YUV pixel format. This ratio is possible, and some codecs support it, but it is not widely used. This ratio uses half of the vertical and one-fourth the horizontal color resolutions, with only one-eighth of the bandwidth of the maximum color resolutions used. Uncompressed video in this format with 8-bit quantization uses 10 bytes for every macropixel (which is 4 x 2 pixels). It has the equivalent chrominance bandwidth of a PAL I signal decoded with a delay line decoder, and still very much superior to NTSC. |
YUV311 |
YUV pixel format. Used by Sony in their HDCam High Definition recorders (not HDCAM SR). In the horizontal dimension, luma is sampled horizontally at three quarters of the full HD sampling rate- 1440 samples per row instead of 1920. Chroma is sampled at 480 samples per row, a third of the luma sampling rate. In the vertical dimension, both luma and chroma are sampled at the full HD sampling rate (1080 samples vertically). |
static int Derm.Render.Pixel.GetComponentBits | ( | Pixel.Type | type, | |
int | comp | |||
) | [static] |
static int Derm.Render.Pixel.GetComponentsCount | ( | Pixel.Type | type | ) | [static] |
static int Derm.Render.Pixel.GetPackedBits | ( | Pixel.Type | type | ) | [static] |
static int Derm.Render.Pixel.GetPlaneComponentsCount | ( | Pixel.Type | type | ) | [static] |
Get the count of components needed to store a pixel plane.
type | A Pixel.Type |
static Pixel.Type Derm.Render.Pixel.GetTypeFromBits | ( | int | cBits | ) | [static] |
static bool Derm.Render.Pixel.IsPacked | ( | Pixel.Type | type | ) | [static] |
Determine whether pixel components are packed in a single plane.
type | A Pixel.Type |