|
|
86f512 |
From 381f4ded3592163e30c45ac9064a065fdbbd8c49 Mon Sep 17 00:00:00 2001
|
|
|
86f512 |
From: Eugene Syromyatnikov <evgsyr@gmail.com>
|
|
|
86f512 |
Date: Sun, 20 Oct 2019 22:01:15 +0200
|
|
|
86f512 |
Subject: [PATCH 74/76] xlat: update V4L2_COLORSPACE_* constants
|
|
|
86f512 |
|
|
|
86f512 |
* xlat/v4l2_colorspaces.in: Add #value_indexed.
|
|
|
86f512 |
(V4L2_COLORSPACE_DEFAULT): New constant introduced by Linux commit
|
|
|
86f512 |
v4.2-rc1~107^2~184.
|
|
|
86f512 |
(V4L2_COLORSPACE_ADOBERGB): Rename to V4L2_COLORSPACE_OPRGB, per Linux
|
|
|
86f512 |
commit v4.20-rc1~69^2~122.
|
|
|
86f512 |
(V4L2_COLORSPACE_SMPTE170M, V4L2_COLORSPACE_SMPTE240M,
|
|
|
86f512 |
V4L2_COLORSPACE_REC709, V4L2_COLORSPACE_BT878,
|
|
|
86f512 |
V4L2_COLORSPACE_470_SYSTEM_M, V4L2_COLORSPACE_470_SYSTEM_BG,
|
|
|
86f512 |
V4L2_COLORSPACE_JPEG, V4L2_COLORSPACE_SRGB, V4L2_COLORSPACE_OPRGB,
|
|
|
86f512 |
V4L2_COLORSPACE_BT2020, V4L2_COLORSPACE_RAW, V4L2_COLORSPACE_DCI_P3):
|
|
|
86f512 |
Add fallback definitions.
|
|
|
86f512 |
---
|
|
|
86f512 |
xlat/v4l2_colorspaces.in | 26 ++++++++++++++------------
|
|
|
86f512 |
1 file changed, 14 insertions(+), 12 deletions(-)
|
|
|
86f512 |
|
|
|
86f512 |
Index: strace-5.1/xlat/v4l2_colorspaces.in
|
|
|
86f512 |
===================================================================
|
|
|
86f512 |
--- strace-5.1.orig/xlat/v4l2_colorspaces.in 2017-04-07 03:21:36.000000000 +0200
|
|
|
86f512 |
+++ strace-5.1/xlat/v4l2_colorspaces.in 2020-01-29 12:40:34.307117739 +0100
|
|
|
86f512 |
@@ -1,12 +1,14 @@
|
|
|
86f512 |
-V4L2_COLORSPACE_SMPTE170M
|
|
|
86f512 |
-V4L2_COLORSPACE_SMPTE240M
|
|
|
86f512 |
-V4L2_COLORSPACE_REC709
|
|
|
86f512 |
-V4L2_COLORSPACE_BT878
|
|
|
86f512 |
-V4L2_COLORSPACE_470_SYSTEM_M
|
|
|
86f512 |
-V4L2_COLORSPACE_470_SYSTEM_BG
|
|
|
86f512 |
-V4L2_COLORSPACE_JPEG
|
|
|
86f512 |
-V4L2_COLORSPACE_SRGB
|
|
|
86f512 |
-V4L2_COLORSPACE_ADOBERGB
|
|
|
86f512 |
-V4L2_COLORSPACE_BT2020
|
|
|
86f512 |
-V4L2_COLORSPACE_RAW
|
|
|
86f512 |
-V4L2_COLORSPACE_DCI_P3
|
|
|
86f512 |
+#value_indexed
|
|
|
86f512 |
+V4L2_COLORSPACE_DEFAULT 0
|
|
|
86f512 |
+V4L2_COLORSPACE_SMPTE170M 1
|
|
|
86f512 |
+V4L2_COLORSPACE_SMPTE240M 2
|
|
|
86f512 |
+V4L2_COLORSPACE_REC709 3
|
|
|
86f512 |
+V4L2_COLORSPACE_BT878 4
|
|
|
86f512 |
+V4L2_COLORSPACE_470_SYSTEM_M 5
|
|
|
86f512 |
+V4L2_COLORSPACE_470_SYSTEM_BG 6
|
|
|
86f512 |
+V4L2_COLORSPACE_JPEG 7
|
|
|
86f512 |
+V4L2_COLORSPACE_SRGB 8
|
|
|
86f512 |
+V4L2_COLORSPACE_OPRGB 9
|
|
|
86f512 |
+V4L2_COLORSPACE_BT2020 10
|
|
|
86f512 |
+V4L2_COLORSPACE_RAW 11
|
|
|
86f512 |
+V4L2_COLORSPACE_DCI_P3 12
|
|
|
86f512 |
Index: strace-5.1/xlat/v4l2_colorspaces.h
|
|
|
86f512 |
===================================================================
|
|
|
86f512 |
--- strace-5.1.orig/xlat/v4l2_colorspaces.h 2019-05-22 15:08:31.000000000 +0200
|
|
|
86f512 |
+++ strace-5.1/xlat/v4l2_colorspaces.h 2020-01-29 12:41:11.073762718 +0100
|
|
|
86f512 |
@@ -3,55 +3,123 @@
|
|
|
86f512 |
#include "gcc_compat.h"
|
|
|
86f512 |
#include "static_assert.h"
|
|
|
86f512 |
|
|
|
86f512 |
-
|
|
|
86f512 |
-#ifndef XLAT_MACROS_ONLY
|
|
|
86f512 |
-
|
|
|
86f512 |
-# ifdef IN_MPERS
|
|
|
86f512 |
-
|
|
|
86f512 |
-extern const struct xlat v4l2_colorspaces[];
|
|
|
86f512 |
-
|
|
|
86f512 |
-# else
|
|
|
86f512 |
-
|
|
|
86f512 |
-# if !(defined HAVE_M32_MPERS || defined HAVE_MX32_MPERS)
|
|
|
86f512 |
-static
|
|
|
86f512 |
-# endif
|
|
|
86f512 |
-const struct xlat v4l2_colorspaces[] = {
|
|
|
86f512 |
+#if defined(V4L2_COLORSPACE_DEFAULT) || (defined(HAVE_DECL_V4L2_COLORSPACE_DEFAULT) && HAVE_DECL_V4L2_COLORSPACE_DEFAULT)
|
|
|
86f512 |
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+static_assert((V4L2_COLORSPACE_DEFAULT) == (0), "V4L2_COLORSPACE_DEFAULT != 0");
|
|
|
86f512 |
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+#else
|
|
|
86f512 |
+# define V4L2_COLORSPACE_DEFAULT 0
|
|
|
86f512 |
+#endif
|
|
|
86f512 |
#if defined(V4L2_COLORSPACE_SMPTE170M) || (defined(HAVE_DECL_V4L2_COLORSPACE_SMPTE170M) && HAVE_DECL_V4L2_COLORSPACE_SMPTE170M)
|
|
|
86f512 |
- XLAT(V4L2_COLORSPACE_SMPTE170M),
|
|
|
86f512 |
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+static_assert((V4L2_COLORSPACE_SMPTE170M) == (1), "V4L2_COLORSPACE_SMPTE170M != 1");
|
|
|
86f512 |
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+#else
|
|
|
86f512 |
+# define V4L2_COLORSPACE_SMPTE170M 1
|
|
|
86f512 |
#endif
|
|
|
86f512 |
#if defined(V4L2_COLORSPACE_SMPTE240M) || (defined(HAVE_DECL_V4L2_COLORSPACE_SMPTE240M) && HAVE_DECL_V4L2_COLORSPACE_SMPTE240M)
|
|
|
86f512 |
- XLAT(V4L2_COLORSPACE_SMPTE240M),
|
|
|
86f512 |
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+static_assert((V4L2_COLORSPACE_SMPTE240M) == (2), "V4L2_COLORSPACE_SMPTE240M != 2");
|
|
|
86f512 |
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+#else
|
|
|
86f512 |
+# define V4L2_COLORSPACE_SMPTE240M 2
|
|
|
86f512 |
#endif
|
|
|
86f512 |
#if defined(V4L2_COLORSPACE_REC709) || (defined(HAVE_DECL_V4L2_COLORSPACE_REC709) && HAVE_DECL_V4L2_COLORSPACE_REC709)
|
|
|
86f512 |
- XLAT(V4L2_COLORSPACE_REC709),
|
|
|
86f512 |
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+static_assert((V4L2_COLORSPACE_REC709) == (3), "V4L2_COLORSPACE_REC709 != 3");
|
|
|
86f512 |
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+#else
|
|
|
86f512 |
+# define V4L2_COLORSPACE_REC709 3
|
|
|
86f512 |
#endif
|
|
|
86f512 |
#if defined(V4L2_COLORSPACE_BT878) || (defined(HAVE_DECL_V4L2_COLORSPACE_BT878) && HAVE_DECL_V4L2_COLORSPACE_BT878)
|
|
|
86f512 |
- XLAT(V4L2_COLORSPACE_BT878),
|
|
|
86f512 |
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+static_assert((V4L2_COLORSPACE_BT878) == (4), "V4L2_COLORSPACE_BT878 != 4");
|
|
|
86f512 |
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+#else
|
|
|
86f512 |
+# define V4L2_COLORSPACE_BT878 4
|
|
|
86f512 |
#endif
|
|
|
86f512 |
#if defined(V4L2_COLORSPACE_470_SYSTEM_M) || (defined(HAVE_DECL_V4L2_COLORSPACE_470_SYSTEM_M) && HAVE_DECL_V4L2_COLORSPACE_470_SYSTEM_M)
|
|
|
86f512 |
- XLAT(V4L2_COLORSPACE_470_SYSTEM_M),
|
|
|
86f512 |
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+static_assert((V4L2_COLORSPACE_470_SYSTEM_M) == (5), "V4L2_COLORSPACE_470_SYSTEM_M != 5");
|
|
|
86f512 |
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+#else
|
|
|
86f512 |
+# define V4L2_COLORSPACE_470_SYSTEM_M 5
|
|
|
86f512 |
#endif
|
|
|
86f512 |
#if defined(V4L2_COLORSPACE_470_SYSTEM_BG) || (defined(HAVE_DECL_V4L2_COLORSPACE_470_SYSTEM_BG) && HAVE_DECL_V4L2_COLORSPACE_470_SYSTEM_BG)
|
|
|
86f512 |
- XLAT(V4L2_COLORSPACE_470_SYSTEM_BG),
|
|
|
86f512 |
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+static_assert((V4L2_COLORSPACE_470_SYSTEM_BG) == (6), "V4L2_COLORSPACE_470_SYSTEM_BG != 6");
|
|
|
86f512 |
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+#else
|
|
|
86f512 |
+# define V4L2_COLORSPACE_470_SYSTEM_BG 6
|
|
|
86f512 |
#endif
|
|
|
86f512 |
#if defined(V4L2_COLORSPACE_JPEG) || (defined(HAVE_DECL_V4L2_COLORSPACE_JPEG) && HAVE_DECL_V4L2_COLORSPACE_JPEG)
|
|
|
86f512 |
- XLAT(V4L2_COLORSPACE_JPEG),
|
|
|
86f512 |
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+static_assert((V4L2_COLORSPACE_JPEG) == (7), "V4L2_COLORSPACE_JPEG != 7");
|
|
|
86f512 |
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+#else
|
|
|
86f512 |
+# define V4L2_COLORSPACE_JPEG 7
|
|
|
86f512 |
#endif
|
|
|
86f512 |
#if defined(V4L2_COLORSPACE_SRGB) || (defined(HAVE_DECL_V4L2_COLORSPACE_SRGB) && HAVE_DECL_V4L2_COLORSPACE_SRGB)
|
|
|
86f512 |
- XLAT(V4L2_COLORSPACE_SRGB),
|
|
|
86f512 |
-#endif
|
|
|
86f512 |
-#if defined(V4L2_COLORSPACE_ADOBERGB) || (defined(HAVE_DECL_V4L2_COLORSPACE_ADOBERGB) && HAVE_DECL_V4L2_COLORSPACE_ADOBERGB)
|
|
|
86f512 |
- XLAT(V4L2_COLORSPACE_ADOBERGB),
|
|
|
86f512 |
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+static_assert((V4L2_COLORSPACE_SRGB) == (8), "V4L2_COLORSPACE_SRGB != 8");
|
|
|
86f512 |
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+#else
|
|
|
86f512 |
+# define V4L2_COLORSPACE_SRGB 8
|
|
|
86f512 |
+#endif
|
|
|
86f512 |
+#if defined(V4L2_COLORSPACE_OPRGB) || (defined(HAVE_DECL_V4L2_COLORSPACE_OPRGB) && HAVE_DECL_V4L2_COLORSPACE_OPRGB)
|
|
|
86f512 |
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+static_assert((V4L2_COLORSPACE_OPRGB) == (9), "V4L2_COLORSPACE_OPRGB != 9");
|
|
|
86f512 |
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+#else
|
|
|
86f512 |
+# define V4L2_COLORSPACE_OPRGB 9
|
|
|
86f512 |
#endif
|
|
|
86f512 |
#if defined(V4L2_COLORSPACE_BT2020) || (defined(HAVE_DECL_V4L2_COLORSPACE_BT2020) && HAVE_DECL_V4L2_COLORSPACE_BT2020)
|
|
|
86f512 |
- XLAT(V4L2_COLORSPACE_BT2020),
|
|
|
86f512 |
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+static_assert((V4L2_COLORSPACE_BT2020) == (10), "V4L2_COLORSPACE_BT2020 != 10");
|
|
|
86f512 |
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+#else
|
|
|
86f512 |
+# define V4L2_COLORSPACE_BT2020 10
|
|
|
86f512 |
#endif
|
|
|
86f512 |
#if defined(V4L2_COLORSPACE_RAW) || (defined(HAVE_DECL_V4L2_COLORSPACE_RAW) && HAVE_DECL_V4L2_COLORSPACE_RAW)
|
|
|
86f512 |
- XLAT(V4L2_COLORSPACE_RAW),
|
|
|
86f512 |
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+static_assert((V4L2_COLORSPACE_RAW) == (11), "V4L2_COLORSPACE_RAW != 11");
|
|
|
86f512 |
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+#else
|
|
|
86f512 |
+# define V4L2_COLORSPACE_RAW 11
|
|
|
86f512 |
#endif
|
|
|
86f512 |
#if defined(V4L2_COLORSPACE_DCI_P3) || (defined(HAVE_DECL_V4L2_COLORSPACE_DCI_P3) && HAVE_DECL_V4L2_COLORSPACE_DCI_P3)
|
|
|
86f512 |
- XLAT(V4L2_COLORSPACE_DCI_P3),
|
|
|
86f512 |
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+static_assert((V4L2_COLORSPACE_DCI_P3) == (12), "V4L2_COLORSPACE_DCI_P3 != 12");
|
|
|
86f512 |
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+#else
|
|
|
86f512 |
+# define V4L2_COLORSPACE_DCI_P3 12
|
|
|
86f512 |
#endif
|
|
|
86f512 |
+
|
|
|
86f512 |
+#ifndef XLAT_MACROS_ONLY
|
|
|
86f512 |
+
|
|
|
86f512 |
+# ifdef IN_MPERS
|
|
|
86f512 |
+
|
|
|
86f512 |
+extern const struct xlat v4l2_colorspaces[];
|
|
|
86f512 |
+
|
|
|
86f512 |
+# else
|
|
|
86f512 |
+
|
|
|
86f512 |
+# if !(defined HAVE_M32_MPERS || defined HAVE_MX32_MPERS)
|
|
|
86f512 |
+static
|
|
|
86f512 |
+# endif
|
|
|
86f512 |
+const struct xlat v4l2_colorspaces[] = {
|
|
|
86f512 |
+ [V4L2_COLORSPACE_DEFAULT] = XLAT(V4L2_COLORSPACE_DEFAULT),
|
|
|
86f512 |
+ [V4L2_COLORSPACE_SMPTE170M] = XLAT(V4L2_COLORSPACE_SMPTE170M),
|
|
|
86f512 |
+ [V4L2_COLORSPACE_SMPTE240M] = XLAT(V4L2_COLORSPACE_SMPTE240M),
|
|
|
86f512 |
+ [V4L2_COLORSPACE_REC709] = XLAT(V4L2_COLORSPACE_REC709),
|
|
|
86f512 |
+ [V4L2_COLORSPACE_BT878] = XLAT(V4L2_COLORSPACE_BT878),
|
|
|
86f512 |
+ [V4L2_COLORSPACE_470_SYSTEM_M] = XLAT(V4L2_COLORSPACE_470_SYSTEM_M),
|
|
|
86f512 |
+ [V4L2_COLORSPACE_470_SYSTEM_BG] = XLAT(V4L2_COLORSPACE_470_SYSTEM_BG),
|
|
|
86f512 |
+ [V4L2_COLORSPACE_JPEG] = XLAT(V4L2_COLORSPACE_JPEG),
|
|
|
86f512 |
+ [V4L2_COLORSPACE_SRGB] = XLAT(V4L2_COLORSPACE_SRGB),
|
|
|
86f512 |
+ [V4L2_COLORSPACE_OPRGB] = XLAT(V4L2_COLORSPACE_OPRGB),
|
|
|
86f512 |
+ [V4L2_COLORSPACE_BT2020] = XLAT(V4L2_COLORSPACE_BT2020),
|
|
|
86f512 |
+ [V4L2_COLORSPACE_RAW] = XLAT(V4L2_COLORSPACE_RAW),
|
|
|
86f512 |
+ [V4L2_COLORSPACE_DCI_P3] = XLAT(V4L2_COLORSPACE_DCI_P3),
|
|
|
86f512 |
XLAT_END
|
|
|
86f512 |
};
|
|
|
86f512 |
|