Describes formats that image data can have in memory.
It describes formats by listing the contents of the memory passed to it.
So a8r8g8b8 will be 1 byte (8 bits) of alpha,
followed by a byte each of red, green and blue. It is not
endian-dependent, so argb32 is represented by
different GdkMemoryFormats on architectures with different
endiannesses.
Its naming is modelled after VkFormat for details).
b8g8r8a8-premultiplied4 bytes; for blue, green, red, alpha. The color values are premultiplied with the alpha value.
a8r8g8b8-premultiplied4 bytes; for alpha, red, green, blue. The color values are premultiplied with the alpha value.
r8g8b8a8-premultiplied4 bytes; for red, green, blue, alpha The color values are premultiplied with the alpha value.
b8g8r8a84 bytes; for blue, green, red, alpha.
a8r8g8b84 bytes; for alpha, red, green, blue.
r8g8b8a84 bytes; for red, green, blue, alpha.
a8b8g8r84 bytes; for alpha, blue, green, red.
r8g8b83 bytes; for red, green, blue. The data is opaque.
b8g8r83 bytes; for blue, green, red. The data is opaque.
r16g16b163 guint16 values; for red, green, blue.
r16g16b16a16-premultiplied4 guint16 values; for red, green, blue, alpha. The color values are premultiplied with the alpha value.
r16g16b16a164 guint16 values; for red, green, blue, alpha.
r16g16b16-float3 half-float values; for red, green, blue. The data is opaque.
r16g16b16a16-float-premultiplied4 half-float values; for red, green, blue and alpha. The color values are premultiplied with the alpha value.
r16g16b16a16-float4 half-float values; for red, green, blue and alpha.
r32g32b32-float3 float values; for red, green, blue.
r32g32b32a32-float-premultiplied4 float values; for red, green, blue and alpha. The color values are premultiplied with the alpha value.
r32g32b32a32-float4 float values; for red, green, blue and alpha.
g8a8-premultiplied2 bytes; for grayscale, alpha. The color values are premultiplied with the alpha value.
g8a82 bytes; for grayscale, alpha.
g8One byte; for grayscale. The data is opaque.
g16a16-premultiplied2 guint16 values; for grayscale, alpha. The color values are premultiplied with the alpha value.
g16a162 guint16 values; for grayscale, alpha.
g16One guint16 value; for grayscale. The data is opaque.
a8One byte; for alpha.
a16One guint16 value; for alpha.
a16-floatOne half-float value; for alpha.
a32-floatOne float value; for alpha.
a8b8g8r8-premultiplied4 bytes; for alpha, blue, green, red, The color values are premultiplied with the alpha value.
b8g8r8x84 bytes; for blue, green, red, unused.
x8r8g8b84 bytes; for unused, red, green, blue.
r8g8b8x84 bytes; for red, green, blue, unused.
x8b8g8r84 bytes; for unused, blue, green, red.
g8-b8r8-420Multiplane format with 2 planes.
The first plane contains the first channel, usually containing luma values. The second plane with interleaved chroma values, Cb followed by Cr. Subsampled in both the X and Y direction.
Commonly known by the fourcc "NV12".
g8-r8b8-420Multiplane format with 2 planes.
The first plane contains the first channel, usually containing luma values. The second plane with interleaved chroma values, Cr followed by Cb. Subsampled in both the X and Y direction.
Commonly known by the fourcc "NV21".
g8-b8r8-422Multiplane format with 2 planes.
The first plane contains the first channel, usually containing luma values. The second plane with interleaved chroma values, Cb followed by Cr. Subsampled in the X direction.
Commonly known by the fourcc "NV16".
g8-r8b8-422Multiplane format with 2 planes.
The first plane contains the first channel, usually containing luma values. The second plane with interleaved chroma values, Cr followed by Cb. Subsampled in the X direction.
Commonly known by the fourcc "NV61".
g8-b8r8-444Multiplane format with 2 planes.
The first plane contains the first channel, usually containing luma values. The second plane with interleaved chroma values, Cb followed by Cr. This format is not subsampled.
Commonly known by the fourcc "NV24".
g8-r8b8-444Multiplane format with 2 planes.
The first plane contains the first channel, usually containing luma values. The second plane with interleaved chroma values, Cr followed by Cb. This format is not subsampled.
Commonly known by the fourcc "NV42".
g10x6-b10x6r10x6-420Multiplane format with 2 planes.
Each channel is a 16 bit integer, but only the highest 10 bits are used.
The first plane contains the first channel, usually containing luma values. The second plane with interleaved chroma values, Cr followed by Cb. This format is not subsampled.
Commonly known by the fourcc "P010".
g12x4-b12x4r12x4-420Multiplane format with 2 planes.
Each channel is a 16 bit integer, but only the highest 10 bits are used.
The first plane contains the first channel, usually containing luma values. The second plane with interleaved chroma values, Cr followed by Cb. This format is not subsampled.
Commonly known by the fourcc "P012".
g16-b16r16-420Multiplane format with 2 planes.
Each channel is a 16 bit integer.
The first plane contains the first channel, usually containing luma values. The second plane with interleaved chroma values, Cr followed by Cb. This format is not subsampled.
Commonly known by the fourcc "P016".
g8-b8-r8-410Multiplane format with 3 planes.
Each channel is a 8 bit integer.
The first plane usually contains the luma channel. It is mapped into the 2nd channel.
The second plane usually contains the first chroma chanel. Subsampled in both the X and Y direction with 4:1 ratio. It is mapped into the 3rd channel.
The third plane usually contains the second chroma channel. Subsampled in both the X and Y direction with 4:1 ratio. It is mapped into the 1st channel.
Commonly known by the fourcc "YUV410".
g8-r8-b8-410Multiplane format with 3 planes.
Each channel is a 8 bit integer.
The first plane usually contains the luma channel. It is mapped into the 2nd channel.
The second plane usually contains the second chroma chanel. Subsampled in both the X and Y direction with 4:1 ratio. It is mapped into the 1st channel.
The third plane usually contains the first chroma channel. Subsampled in both the X and Y direction with 4:1 ratio. It is mapped into the 3rd channel.
Commonly known by the fourcc "YVU410".
g8-b8-r8-411Multiplane format with 3 planes.
Each channel is a 8 bit integer.
The first plane usually contains the luma channel. It is mapped into the 2nd channel.
The second plane usually contains the first chroma chanel. Subsampled in the X direction with 4:1 ratio. It is mapped into the 3rd channel.
The third plane usually contains the second chroma channel. Subsampled in the X direction with 4:1 ratio. It is mapped into the 1st channel.
Commonly known by the fourcc "YUV411".
g8-r8-b8-411Multiplane format with 3 planes.
Each channel is a 8 bit integer.
The first plane usually contains the luma channel. It is mapped into the 2nd channel.
The second plane usually contains the second chroma chanel. Subsampled in the X direction with 4:1 ratio. It is mapped into the 1st channel.
The third plane usually contains the first chroma channel. Subsampled in the X direction with 4:1 ratio. It is mapped into the 3rd channel.
Commonly known by the fourcc "YVU411".
g8-b8-r8-420Multiplane format with 3 planes.
Each channel is a 8 bit integer.
The first plane usually contains the luma channel. It is mapped into the 2nd channel.
The second plane usually contains the first chroma chanel. Subsampled in both the X and Y direction. It is mapped into the 3rd channel.
The third plane usually contains the second chroma channel. Subsampled in both the X and Y direction. It is mapped into the 1st channel.
Commonly known by the fourcc "YUV420".
g8-r8-b8-420Multiplane format with 3 planes.
Each channel is a 8 bit integer.
The first plane usually contains the luma channel. It is mapped into the 2nd channel.
The second plane usually contains the second chroma chanel. Subsampled in both the X and Y direction. It is mapped into the 1st channel.
The third plane usually contains the first chroma channel. Subsampled in both the X and Y direction. It is mapped into the 3rd channel.
Commonly known by the fourcc "YVU420".
g8-b8-r8-422Multiplane format with 3 planes.
Each channel is a 8 bit integer.
The first plane usually contains the luma channel. It is mapped into the 2nd channel.
The second plane usually contains the first chroma chanel. Subsampled in the X direction. It is mapped into the 3rd channel.
The third plane usually contains the second chroma channel. Subsampled in the X direction. It is mapped into the 1st channel.
Commonly known by the fourcc "YUV422".
g8-r8-b8-422Multiplane format with 3 planes.
Each channel is a 8 bit integer.
The first plane usually contains the luma channel. It is mapped into the 2nd channel.
The second plane usually contains the second chroma chanel. Subsampled in the X direction. It is mapped into the 1st channel.
The third plane usually contains the first chroma channel. Subsampled in the X direction. It is mapped into the 3rd channel.
Commonly known by the fourcc "YVU422".
g8-b8-r8-444Multiplane format with 3 planes.
Each channel is a 8 bit integer.
The first plane usually contains the luma channel. It is mapped into the 2nd channel.
The second plane usually contains the first chroma chanel. It is mapped into the 3rd channel.
The third plane usually contains the second chroma channel. It is mapped into the 1st channel.
Commonly known by the fourcc "YUV444".
g8-r8-b8-444Multiplane format with 3 planes.
Each channel is a 8 bit integer.
The first plane usually contains the luma channel. It is mapped into the 2nd channel.
The second plane usually contains the second chroma chanel. Subsampled in the X direction. It is mapped into the 1st channel.
The third plane usually contains the first chroma channel. Subsampled in the X direction. It is mapped into the 3rd channel.
Commonly known by the fourcc "YVU444".
g8b8g8r8-422Packed format with subsampled channels.
Each channel is a 8 bit integer. The red and blue/chroma channels are subsampled and interleaved with the green/luma channel.
Each block contains 2 pixels, so the width must be a multiple of 2.
Commonly known by the fourcc "YUYV".
g8r8g8b8-422Packed format with subsampled channels.
Each channel is a 8 bit integer. The red and blue/chroma channels are subsampled and interleaved with the green/luma channel.
Each block contains 2 pixels, so the width must be a multiple of 2.
Commonly known by the fourcc "YVYU".
r8g8b8g8-422Packed format with subsampled channels.
Each channel is a 8 bit integer. The red and blue/chroma channels are subsampled and interleaved with the green/luma channel.
Each block contains 2 pixels, so the width must be a multiple of 2.
Commonly known by the fourcc "VYUY".
b8g8r8g8-422Packed format with subsampled channels.
Each channel is a 8 bit integer. The red and blue/chroma channels are subsampled and interleaved with the green/luma channel.
Each block contains 2 pixels, so the width must be a multiple of 2.
Commonly known by the fourcc "UYVY".
x6g10-x6b10-x6r10-420Multiplane format with 3 planes.
Each channel is a 16 bit integer.
Only the 10 lower bits are used. The remaining ones must be set to 0 by the producer.
The first plane usually contains the luma channel. It is mapped into the 2nd channel.
The second plane usually contains the first chroma chanel. Subsampled in both the X and Y direction. It is mapped into the 3rd channel.
The third plane usually contains the second chroma channel. Subsampled in both the X and Y direction. It is mapped into the 1st channel.
Commonly known by the fourcc "S010".
x6g10-x6b10-x6r10-422Multiplane format with 3 planes.
Each channel is a 16 bit integer.
Only the 10 lower bits are used. The remaining ones must be set to 0 by the producer.
The first plane usually contains the luma channel. It is mapped into the 2nd channel.
The second plane usually contains the first chroma chanel. Subsampled in the X direction. It is mapped into the 3rd channel.
The third plane usually contains the second chroma channel. Subsampled in the X direction. It is mapped into the 1st channel.
Commonly known by the fourcc "S210".
x6g10-x6b10-x6r10-444Multiplane format with 3 planes.
Each channel is a 16 bit integer.
Only the 10 lower bits are used. The remaining ones must be set to 0 by the producer.
The first plane usually contains the luma channel. It is mapped into the 2nd channel.
The second plane usually contains the first chroma chanel. It is mapped into the 3rd channel.
The third plane usually contains the second chroma channel. It is mapped into the 1st channel.
Commonly known by the fourcc "S410".
x4g12-x4b12-x4r12-420Multiplane format with 3 planes.
Each channel is a 16 bit integer.
Only the 12 lower bits are used. The remaining ones must be set to 0 by the producer.
The first plane usually contains the luma channel. It is mapped into the 2nd channel.
The second plane usually contains the first chroma chanel. Subsampled in both the X and Y direction. It is mapped into the 3rd channel.
The third plane usually contains the second chroma channel. Subsampled in both the X and Y direction. It is mapped into the 1st channel.
Commonly known by the fourcc "S012".
x4g12-x4b12-x4r12-422Multiplane format with 3 planes.
Each channel is a 16 bit integer.
Only the 12 lower bits are used. The remaining ones must be set to 0 by the producer.
The first plane usually contains the luma channel. It is mapped into the 2nd channel.
The second plane usually contains the first chroma chanel. Subsampled in the X direction. It is mapped into the 3rd channel.
The third plane usually contains the second chroma channel. Subsampled in the X direction. It is mapped into the 1st channel.
Commonly known by the fourcc "S212".
x4g12-x4b12-x4r12-444Multiplane format with 3 planes.
Each channel is a 16 bit integer.
Only the 12 lower bits are used. The remaining ones must be set to 0 by the producer.
The first plane usually contains the luma channel. It is mapped into the 2nd channel.
The second plane usually contains the first chroma chanel. It is mapped into the 3rd channel.
The third plane usually contains the second chroma channel. It is mapped into the 1st channel.
Commonly known by the fourcc "S412".
g16-b16-r16-420Multiplane format with 3 planes.
Each channel is a 16 bit integer.
The first plane usually contains the luma channel. It is mapped into the 2nd channel.
The second plane usually contains the first chroma chanel. Subsampled in both the X and Y direction. It is mapped into the 3rd channel.
The third plane usually contains the second chroma channel. Subsampled in both the X and Y direction. It is mapped into the 1st channel.
Commonly known by the fourcc "S016".
g16-b16-r16-422Multiplane format with 3 planes.
Each channel is a 16 bit integer.
The first plane usually contains the luma channel. It is mapped into the 2nd channel.
The second plane usually contains the first chroma chanel. Subsampled in the X direction. It is mapped into the 3rd channel.
The third plane usually contains the second chroma channel. Subsampled in the X direction. It is mapped into the 1st channel.
Commonly known by the fourcc "S216".
g16-b16-r16-444Multiplane format with 3 planes.
Each channel is a 16 bit integer.
The first plane usually contains the luma channel. It is mapped into the 2nd channel.
The second plane usually contains the first chroma chanel. It is mapped into the 3rd channel.
The third plane usually contains the second chroma channel. It is mapped into the 1st channel.
Commonly known by the fourcc "S416".
n-formatsThe number of formats. This value will change as more formats get added, so do not rely on its concrete integer.