[RFC 2/2] tests: Add fp16 formats

Kevin Strasser kevin.strasser at intel.com
Fri Feb 1 21:54:41 UTC 2019


Add 64 bpp 16:16:16:16 half float pixel formats. Each 16 bit component is
formatted in IEEE-754 half-precision float (binary16) 1:5:10
MSb-sign:exponent:fraction form.

Signed-off-by: Kevin Strasser <kevin.strasser at intel.com>
---
 tests/data/example-client.h | 8 ++++++++
 tests/data/example-server.h | 8 ++++++++
 tests/data/example.xml      | 2 ++
 3 files changed, 18 insertions(+)

diff --git a/tests/data/example-client.h b/tests/data/example-client.h
index c40e361..75cfa39 100644
--- a/tests/data/example-client.h
+++ b/tests/data/example-client.h
@@ -1509,6 +1509,14 @@ enum wl_shm_format {
 	 */
 	WL_SHM_FORMAT_BGRA1010102 = 0x30334142,
 	/**
+	 * Floating point 64-bit xBGR format, [63:0] x:B:G:R 16:16:16:16 little endian
+	 */
+	WL_SHM_FORMAT_XBGR16161616F = 0x48344258,
+	/**
+	 * Floating point 64-bit ABGR format, [63:0] A:B:G:R 16:16:16:16 little endian
+	 */
+	WL_SHM_FORMAT_ABGR16161616F = 0x48344241,
+	/**
 	 * packed YCbCr format, [31:0] Cr0:Y1:Cb0:Y0 8:8:8:8 little endian
 	 */
 	WL_SHM_FORMAT_YUYV = 0x56595559,
diff --git a/tests/data/example-server.h b/tests/data/example-server.h
index adfc973..5fc862e 100644
--- a/tests/data/example-server.h
+++ b/tests/data/example-server.h
@@ -1284,6 +1284,14 @@ enum wl_shm_format {
 	 */
 	WL_SHM_FORMAT_BGRA1010102 = 0x30334142,
 	/**
+	 * Floating point 64-bit xBGR format, [63:0] x:B:G:R 16:16:16:16 little endian
+	 */
+	WL_SHM_FORMAT_XBGR16161616F = 0x48344258,
+	/**
+	 * Floating point 64-bit ABGR format, [63:0] A:B:G:R 16:16:16:16 little endian
+	 */
+	WL_SHM_FORMAT_ABGR16161616F = 0x48344241,
+	/**
 	 * packed YCbCr format, [31:0] Cr0:Y1:Cb0:Y0 8:8:8:8 little endian
 	 */
 	WL_SHM_FORMAT_YUYV = 0x56595559,
diff --git a/tests/data/example.xml b/tests/data/example.xml
index 29b63be..0edb926 100644
--- a/tests/data/example.xml
+++ b/tests/data/example.xml
@@ -328,6 +328,8 @@
       <entry name="abgr2101010" value="0x30334241" summary="32-bit ABGR format, [31:0] A:B:G:R 2:10:10:10 little endian"/>
       <entry name="rgba1010102" value="0x30334152" summary="32-bit RGBA format, [31:0] R:G:B:A 10:10:10:2 little endian"/>
       <entry name="bgra1010102" value="0x30334142" summary="32-bit BGRA format, [31:0] B:G:R:A 10:10:10:2 little endian"/>
+      <entry name="xbgr16161616f" value="0x48344258" summary="Floating point 64-bit xBGR format, [63:0] x:B:G:R 16:16:16:16 little endian" />
+      <entry name="abgr16161616f" value="0x48344241" summary="Floating point 64-bit ABGR format, [63:0] A:B:G:R 16:16:16:16 little endian" />
       <entry name="yuyv" value="0x56595559" summary="packed YCbCr format, [31:0] Cr0:Y1:Cb0:Y0 8:8:8:8 little endian"/>
       <entry name="yvyu" value="0x55595659" summary="packed YCbCr format, [31:0] Cb0:Y1:Cr0:Y0 8:8:8:8 little endian"/>
       <entry name="uyvy" value="0x59565955" summary="packed YCbCr format, [31:0] Y1:Cr0:Y0:Cb0 8:8:8:8 little endian"/>
-- 
2.7.4



More information about the wayland-devel mailing list