[−][src]Enum smithay_client_toolkit::shm::Format
pixel formats
This describes the memory layout of an individual pixel.
All renderers should support argb8888 and xrgb8888 but any other formats are optional and may not be supported by the particular renderer in use.
The drm format codes match the macros defined in drm_fourcc.h, except argb8888 and xrgb8888. The formats actually supported by the compositor will be reported by the format event.
Variants (Non-exhaustive)
32-bit ARGB format, [31:0] A:R:G:B 8:8:8:8 little endian
32-bit RGB format, [31:0] x:R:G:B 8:8:8:8 little endian
8-bit color index format, [7:0] C
8-bit RGB format, [7:0] R:G:B 3:3:2
8-bit BGR format, [7:0] B:G:R 2:3:3
16-bit xRGB format, [15:0] x:R:G:B 4:4:4:4 little endian
16-bit xBGR format, [15:0] x:B:G:R 4:4:4:4 little endian
16-bit RGBx format, [15:0] R:G:B:x 4:4:4:4 little endian
16-bit BGRx format, [15:0] B:G:R:x 4:4:4:4 little endian
16-bit ARGB format, [15:0] A:R:G:B 4:4:4:4 little endian
16-bit ABGR format, [15:0] A:B:G:R 4:4:4:4 little endian
16-bit RBGA format, [15:0] R:G:B:A 4:4:4:4 little endian
16-bit BGRA format, [15:0] B:G:R:A 4:4:4:4 little endian
16-bit xRGB format, [15:0] x:R:G:B 1:5:5:5 little endian
16-bit xBGR 1555 format, [15:0] x:B:G:R 1:5:5:5 little endian
16-bit RGBx 5551 format, [15:0] R:G:B:x 5:5:5:1 little endian
16-bit BGRx 5551 format, [15:0] B:G:R:x 5:5:5:1 little endian
16-bit ARGB 1555 format, [15:0] A:R:G:B 1:5:5:5 little endian
16-bit ABGR 1555 format, [15:0] A:B:G:R 1:5:5:5 little endian
16-bit RGBA 5551 format, [15:0] R:G:B:A 5:5:5:1 little endian
16-bit BGRA 5551 format, [15:0] B:G:R:A 5:5:5:1 little endian
16-bit RGB 565 format, [15:0] R:G:B 5:6:5 little endian
16-bit BGR 565 format, [15:0] B:G:R 5:6:5 little endian
24-bit RGB format, [23:0] R:G:B little endian
24-bit BGR format, [23:0] B:G:R little endian
32-bit xBGR format, [31:0] x:B:G:R 8:8:8:8 little endian
32-bit RGBx format, [31:0] R:G:B:x 8:8:8:8 little endian
32-bit BGRx format, [31:0] B:G:R:x 8:8:8:8 little endian
32-bit ABGR format, [31:0] A:B:G:R 8:8:8:8 little endian
32-bit RGBA format, [31:0] R:G:B:A 8:8:8:8 little endian
32-bit BGRA format, [31:0] B:G:R:A 8:8:8:8 little endian
32-bit xRGB format, [31:0] x:R:G:B 2:10:10:10 little endian
32-bit xBGR format, [31:0] x:B:G:R 2:10:10:10 little endian
32-bit RGBx format, [31:0] R:G:B:x 10:10:10:2 little endian
32-bit BGRx format, [31:0] B:G:R:x 10:10:10:2 little endian
32-bit ARGB format, [31:0] A:R:G:B 2:10:10:10 little endian
32-bit ABGR format, [31:0] A:B:G:R 2:10:10:10 little endian
32-bit RGBA format, [31:0] R:G:B:A 10:10:10:2 little endian
32-bit BGRA format, [31:0] B:G:R:A 10:10:10:2 little endian
packed YCbCr format, [31:0] Cr0:Y1:Cb0:Y0 8:8:8:8 little endian
packed YCbCr format, [31:0] Cb0:Y1:Cr0:Y0 8:8:8:8 little endian
packed YCbCr format, [31:0] Y1:Cr0:Y0:Cb0 8:8:8:8 little endian
packed YCbCr format, [31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian
packed AYCbCr format, [31:0] A:Y:Cb:Cr 8:8:8:8 little endian
2 plane YCbCr Cr:Cb format, 2x2 subsampled Cr:Cb plane
2 plane YCbCr Cb:Cr format, 2x2 subsampled Cb:Cr plane
2 plane YCbCr Cr:Cb format, 2x1 subsampled Cr:Cb plane
2 plane YCbCr Cb:Cr format, 2x1 subsampled Cb:Cr plane
3 plane YCbCr format, 4x4 subsampled Cb (1) and Cr (2) planes
3 plane YCbCr format, 4x4 subsampled Cr (1) and Cb (2) planes
3 plane YCbCr format, 4x1 subsampled Cb (1) and Cr (2) planes
3 plane YCbCr format, 4x1 subsampled Cr (1) and Cb (2) planes
3 plane YCbCr format, 2x2 subsampled Cb (1) and Cr (2) planes
3 plane YCbCr format, 2x2 subsampled Cr (1) and Cb (2) planes
3 plane YCbCr format, 2x1 subsampled Cb (1) and Cr (2) planes
3 plane YCbCr format, 2x1 subsampled Cr (1) and Cb (2) planes
3 plane YCbCr format, non-subsampled Cb (1) and Cr (2) planes
3 plane YCbCr format, non-subsampled Cr (1) and Cb (2) planes
[7:0] R
[15:0] R little endian
[15:0] R:G 8:8 little endian
[15:0] G:R 8:8 little endian
[31:0] R:G 16:16 little endian
[31:0] G:R 16:16 little endian
[63:0] x:R:G:B 16:16:16:16 little endian
[63:0] x:B:G:R 16:16:16:16 little endian
[63:0] A:R:G:B 16:16:16:16 little endian
[63:0] A:B:G:R 16:16:16:16 little endian
[31:0] X:Y:Cb:Cr 8:8:8:8 little endian
[23:0] Cr:Cb:Y 8:8:8 little endian
Y followed by U then V, 10:10:10. Non-linear modifier only
[63:0] Cr0:0:Y1:0:Cb0:0:Y0:0 10:6:10:6:10:6:10:6 little endian per 2 Y pixels
[63:0] Cr0:0:Y1:0:Cb0:0:Y0:0 12:4:12:4:12:4:12:4 little endian per 2 Y pixels
[63:0] Cr0:Y1:Cb0:Y0 16:16:16:16 little endian per 2 Y pixels
[31:0] A:Cr:Y:Cb 2:10:10:10 little endian
[63:0] A:0:Cr:0:Y:0:Cb:0 12:4:12:4:12:4:12:4 little endian
[63:0] A:Cr:Y:Cb 16:16:16:16 little endian
[31:0] X:Cr:Y:Cb 2:10:10:10 little endian
[63:0] X:0:Cr:0:Y:0:Cb:0 12:4:12:4:12:4:12:4 little endian
[63:0] X:Cr:Y:Cb 16:16:16:16 little endian
[63:0] A3:A2:Y3:0:Cr0:0:Y2:0:A1:A0:Y1:0:Cb0:0:Y0:0 1:1:8:2:8:2:8:2:1:1:8:2:8:2:8:2 little endian
[63:0] X3:X2:Y3:0:Cr0:0:Y2:0:X1:X0:Y1:0:Cb0:0:Y0:0 1:1:8:2:8:2:8:2:1:1:8:2:8:2:8:2 little endian
[63:0] A3:A2:Y3:Cr0:Y2:A1:A0:Y1:Cb0:Y0 1:1:10:10:10:1:1:10:10:10 little endian
[63:0] X3:X2:Y3:Cr0:Y2:X1:X0:Y1:Cb0:Y0 1:1:10:10:10:1:1:10:10:10 little endian
non-subsampled Cr:Cb plane
non-subsampled Cb:Cr plane
2x1 subsampled Cr:Cb plane, 10 bit per channel
2x2 subsampled Cr:Cb plane 10 bits per channel
2x2 subsampled Cr:Cb plane 12 bits per channel
2x2 subsampled Cr:Cb plane 16 bits per channel
Implementations
impl Format
[src]
Trait Implementations
impl Clone for Format
[src]
impl Copy for Format
[src]
impl Debug for Format
[src]
impl PartialEq<Format> for Format
[src]
impl StructuralPartialEq for Format
[src]
Auto Trait Implementations
impl RefUnwindSafe for Format
impl Send for Format
impl Sync for Format
impl Unpin for Format
impl UnwindSafe for Format
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,