This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:

Subject: sync v4l2-tpg with upstream
Author:  Mauro Carvalho Chehab <mche...@s-opensource.com>
Date:    Fri Feb 9 12:06:56 2018 -0200

This is not a simple sync. It also contains some changes at
v4l2-tpg-colors.h in order to handle with upstream differences
at v4l2-tpg-colors.c, v4l2-tpg-core.c and v4l2-tpg.h.

Signed-off-by: Mauro Carvalho Chehab <mche...@s-opensource.com>

 utils/common/v4l2-tpg-colors.c |  6 +++---
 utils/common/v4l2-tpg-colors.h | 46 +++++-------------------------------------
 utils/common/v4l2-tpg-core.c   |  2 +-
 utils/common/v4l2-tpg.h        | 44 +++++++++++++++++++++++++++++++++++++++-
 4 files changed, 52 insertions(+), 46 deletions(-)

---

http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=8e5654e63ae0b1a9a65e950d0e02a11e35263f23
diff --git a/utils/common/v4l2-tpg-colors.c b/utils/common/v4l2-tpg-colors.c
index 063f6b10c8de..ab6da56b3079 100644
--- a/utils/common/v4l2-tpg-colors.c
+++ b/utils/common/v4l2-tpg-colors.c
@@ -39,7 +39,7 @@
 #include "v4l2-tpg-colors.h"
 
 /* sRGB colors with range [0-255] */
-const struct color tpg_colors[TPG_COLOR_MAX] = {
+const struct tpg_rbg_color8 tpg_colors[TPG_COLOR_MAX] = {
        /*
         * Colors to test colorspace conversion: converting these colors
         * to other colorspaces will never lead to out-of-gamut colors.
@@ -597,7 +597,7 @@ const unsigned short tpg_linear_to_rec709[255 * 16 + 1] = {
 };
 
 /* Generated table */
-const struct color16 tpg_csc_colors[V4L2_COLORSPACE_DCI_P3 + 
1][V4L2_XFER_FUNC_SMPTE2084 + 1][TPG_COLOR_CSC_BLACK + 1] = {
+const struct tpg_rbg_color16 tpg_csc_colors[V4L2_COLORSPACE_DCI_P3 + 
1][V4L2_XFER_FUNC_SMPTE2084 + 1][TPG_COLOR_CSC_BLACK + 1] = {
        [V4L2_COLORSPACE_SMPTE170M][V4L2_XFER_FUNC_709][0] = { 2939, 2939, 2939 
},
        [V4L2_COLORSPACE_SMPTE170M][V4L2_XFER_FUNC_709][1] = { 2953, 2963, 586 
},
        [V4L2_COLORSPACE_SMPTE170M][V4L2_XFER_FUNC_709][2] = { 0, 2967, 2937 },
@@ -1392,7 +1392,7 @@ int main(int argc, char **argv)
        printf("\n};\n\n");
 
        printf("/* Generated table */\n");
-       printf("const struct color16 tpg_csc_colors[V4L2_COLORSPACE_DCI_P3 + 
1][V4L2_XFER_FUNC_SMPTE2084 + 1][TPG_COLOR_CSC_BLACK + 1] = {\n");
+       printf("const struct tpg_rbg_color16 
tpg_csc_colors[V4L2_COLORSPACE_DCI_P3 + 1][V4L2_XFER_FUNC_SMPTE2084 + 
1][TPG_COLOR_CSC_BLACK + 1] = {\n");
        for (c = 0; c <= V4L2_COLORSPACE_DCI_P3; c++) {
                for (x = 1; x <= V4L2_XFER_FUNC_SMPTE2084; x++) {
                        for (i = 0; i <= TPG_COLOR_CSC_BLACK; i++) {
diff --git a/utils/common/v4l2-tpg-colors.h b/utils/common/v4l2-tpg-colors.h
index 2a88d1fae0cd..42ce7044ded4 100644
--- a/utils/common/v4l2-tpg-colors.h
+++ b/utils/common/v4l2-tpg-colors.h
@@ -20,49 +20,13 @@
 #ifndef _V4L2_TPG_COLORS_H_
 #define _V4L2_TPG_COLORS_H_
 
-struct color {
-       unsigned char r, g, b;
-};
+#include <v4l2-tpg.h>
 
-struct color16 {
-       int r, g, b;
-};
-
-enum tpg_color {
-       TPG_COLOR_CSC_WHITE,
-       TPG_COLOR_CSC_YELLOW,
-       TPG_COLOR_CSC_CYAN,
-       TPG_COLOR_CSC_GREEN,
-       TPG_COLOR_CSC_MAGENTA,
-       TPG_COLOR_CSC_RED,
-       TPG_COLOR_CSC_BLUE,
-       TPG_COLOR_CSC_BLACK,
-       TPG_COLOR_75_YELLOW,
-       TPG_COLOR_75_CYAN,
-       TPG_COLOR_75_GREEN,
-       TPG_COLOR_75_MAGENTA,
-       TPG_COLOR_75_RED,
-       TPG_COLOR_75_BLUE,
-       TPG_COLOR_100_WHITE,
-       TPG_COLOR_100_YELLOW,
-       TPG_COLOR_100_CYAN,
-       TPG_COLOR_100_GREEN,
-       TPG_COLOR_100_MAGENTA,
-       TPG_COLOR_100_RED,
-       TPG_COLOR_100_BLUE,
-       TPG_COLOR_100_BLACK,
-       TPG_COLOR_TEXTFG,
-       TPG_COLOR_TEXTBG,
-       TPG_COLOR_RANDOM,
-       TPG_COLOR_RAMP,
-       TPG_COLOR_MAX = TPG_COLOR_RAMP + 256
-};
-
-extern const struct color tpg_colors[TPG_COLOR_MAX];
+extern const struct tpg_rbg_color8 tpg_colors[TPG_COLOR_MAX];
 extern const unsigned short tpg_rec709_to_linear[255 * 16 + 1];
 extern const unsigned short tpg_linear_to_rec709[255 * 16 + 1];
-extern const struct color16 tpg_csc_colors[V4L2_COLORSPACE_DCI_P3 + 1]
-                                         [V4L2_XFER_FUNC_SMPTE2084 + 1]
-                                         [TPG_COLOR_CSC_BLACK + 1];
+extern const struct tpg_rbg_color16 tpg_csc_colors[V4L2_COLORSPACE_DCI_P3 + 1]
+                                                 [V4L2_XFER_FUNC_SMPTE2084 + 1]
+                                                 [TPG_COLOR_CSC_BLACK + 1];
 
 #endif
diff --git a/utils/common/v4l2-tpg-core.c b/utils/common/v4l2-tpg-core.c
index 007e6fd667b3..d495087c693a 100644
--- a/utils/common/v4l2-tpg-core.c
+++ b/utils/common/v4l2-tpg-core.c
@@ -20,7 +20,7 @@
  * SOFTWARE.
  */
 
-#include "v4l2-tpg.h"
+#include "v4l2-tpg-colors.h"
 
 /* Must remain in sync with enum tpg_pattern */
 const char * const tpg_pattern_strings[] = {
diff --git a/utils/common/v4l2-tpg.h b/utils/common/v4l2-tpg.h
index f6bf109b0203..07528ff1604e 100644
--- a/utils/common/v4l2-tpg.h
+++ b/utils/common/v4l2-tpg.h
@@ -69,8 +69,50 @@ static inline u32 prandom_u32_max(u32 ep_ro)
        return rand() % ep_ro;
 }
 
-#include "v4l2-tpg-colors.h"
+struct tpg_rbg_color8 {
+       unsigned char r, g, b;
+};
+
+struct tpg_rbg_color16 {
+       __u16 r, g, b;
+};
+
+enum tpg_color {
+       TPG_COLOR_CSC_WHITE,
+       TPG_COLOR_CSC_YELLOW,
+       TPG_COLOR_CSC_CYAN,
+       TPG_COLOR_CSC_GREEN,
+       TPG_COLOR_CSC_MAGENTA,
+       TPG_COLOR_CSC_RED,
+       TPG_COLOR_CSC_BLUE,
+       TPG_COLOR_CSC_BLACK,
+       TPG_COLOR_75_YELLOW,
+       TPG_COLOR_75_CYAN,
+       TPG_COLOR_75_GREEN,
+       TPG_COLOR_75_MAGENTA,
+       TPG_COLOR_75_RED,
+       TPG_COLOR_75_BLUE,
+       TPG_COLOR_100_WHITE,
+       TPG_COLOR_100_YELLOW,
+       TPG_COLOR_100_CYAN,
+       TPG_COLOR_100_GREEN,
+       TPG_COLOR_100_MAGENTA,
+       TPG_COLOR_100_RED,
+       TPG_COLOR_100_BLUE,
+       TPG_COLOR_100_BLACK,
+       TPG_COLOR_TEXTFG,
+       TPG_COLOR_TEXTBG,
+       TPG_COLOR_RANDOM,
+       TPG_COLOR_RAMP,
+       TPG_COLOR_MAX = TPG_COLOR_RAMP + 256
+};
 
+extern const struct tpg_rbg_color8 tpg_colors[TPG_COLOR_MAX];
+extern const unsigned short tpg_rec709_to_linear[255 * 16 + 1];
+extern const unsigned short tpg_linear_to_rec709[255 * 16 + 1];
+extern const struct tpg_rbg_color16 tpg_csc_colors[V4L2_COLORSPACE_DCI_P3 + 1]
+                                         [V4L2_XFER_FUNC_SMPTE2084 + 1]
+                                         [TPG_COLOR_CSC_BLACK + 1];
 enum tpg_pattern {
        TPG_PAT_75_COLORBAR,
        TPG_PAT_100_COLORBAR,

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to