[PATCH 1/3] buffer: add generic buffer formats.
Gwenole Beauchesne
gb.devel at gmail.com
Fri May 18 10:20:36 PDT 2012
Add packed RGB (ARGB32, XRGB32), and planar YUV formats with interleaved
U/V components (NV12), or three Y U V planes with various subsampling
(YUV 4:1:0, 4:1:1, 4:2:0, 4:2:2, 4:4:4).
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne at intel.com>
---
protocol/wayland.xml | 24 ++++++++++++++++++++++++
src/wayland-server.h | 1 +
2 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/protocol/wayland.xml b/protocol/wayland.xml
index f14d1d2..8627d3d 100644
--- a/protocol/wayland.xml
+++ b/protocol/wayland.xml
@@ -218,6 +218,30 @@
updates the contents is defined by the buffer factory interface
</description>
+ <enum name="format">
+ <description summary="buffer formats">
+ Buffer formats.
+ </description>
+ <entry name="none" value="0"
+ summary="Buffer does not represent a pixel buffer. So, format is irrelevant"/>
+ <entry name="argb8888" value="0x34325241"
+ summary="Packed RGB 8:8:8, 32 bpp, A R G B, native endian byte-order"/>
+ <entry name="xrgb8888" value="0x34325258"
+ summary="Packed RGB 8:8:8, 32 bpp, 0 R G B, native endian byte-order"/>
+ <entry name="nv12" value="0x3231564e"
+ summary="Planar YUV 4:2:0, 12 bpp, 1 plane for Y and 1 plane for UV"/>
+ <entry name="yuv410" value="0x39565559"
+ summary="Planar YUV 4:1:0, 10 bpp, quarter horizontal chroma resolution, half vertical chroma resolution"/>
+ <entry name="yuv411" value="0x31315559"
+ summary="Planar YUV 4:1:1, 12 bpp, quarter horizontal chroma resolution, full vertical chroma resolution"/>
+ <entry name="yuv420" value="0x32315559"
+ summary="Planar YUV 4:2:0, 12-bit, half horizontal chroma resolution, half vertical chroma resolution"/>
+ <entry name="yuv422" value="0x36315559"
+ summary="Planar YUV 4:2:2, 16-bit, half horizontal chroma resolution, full vertical chroma resolution"/>
+ <entry name="yuv444" value="0x34325559"
+ summary="Planar YUV 4:4:4, 24-bit, full horizontal chroma resolution, full vertical chroma resolution"/>
+ </enum>
+
<request name="destroy" type="destructor">
<description summary="destroy a buffer">
Destroy a buffer. This will invalidate the object id.
diff --git a/src/wayland-server.h b/src/wayland-server.h
index 31f6fe5..24aedc7 100644
--- a/src/wayland-server.h
+++ b/src/wayland-server.h
@@ -177,6 +177,7 @@ struct wl_resource {
struct wl_buffer {
struct wl_resource resource;
+ uint32_t format;
int32_t width, height;
uint32_t busy_count;
};
--
1.7.5.4
More information about the wayland-devel
mailing list