aboutsummaryrefslogtreecommitdiffstats
path: root/utils/v4l2-compliance/v4l2-test-colors.cpp
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2016-02-20 09:07:53 +0100
committerHans Verkuil <hans.verkuil@cisco.com>2016-02-20 10:03:11 +0100
commit65fc6a365bd491b8102497f6316e0b3f4d80818f (patch)
tree26c6858b809d264567731b3b3012635b373661d3 /utils/v4l2-compliance/v4l2-test-colors.cpp
parent7a5e6f6f292b5a580cda69fa631049e69571a29a (diff)
v4l2-compliance: support new multiplanar YUV formats.
Support YUV422M, YVU422M, YUV444M and YVU444M. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Diffstat (limited to 'utils/v4l2-compliance/v4l2-test-colors.cpp')
-rw-r--r--utils/v4l2-compliance/v4l2-test-colors.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/utils/v4l2-compliance/v4l2-test-colors.cpp b/utils/v4l2-compliance/v4l2-test-colors.cpp
index 4a7c1725..3a680dd8 100644
--- a/utils/v4l2-compliance/v4l2-test-colors.cpp
+++ b/utils/v4l2-compliance/v4l2-test-colors.cpp
@@ -211,11 +211,25 @@ static void getColor(const cv4l_fmt &fmt, __u8 * const planes[3],
(planes[1][offset + xeven + 1] << 8) +
planes[1][offset + xeven];
break;
+ case V4L2_PIX_FMT_YVU422M:
+ v32 = (p8[x] << 16) +
+ (planes[2][hoffset + x / 2] << 8) +
+ planes[1][hoffset + x / 2];
+ break;
+ case V4L2_PIX_FMT_YUV422M:
case V4L2_PIX_FMT_YUV422P:
v32 = (p8[x] << 16) +
(planes[1][hoffset + x / 2] << 8) +
planes[2][hoffset + x / 2];
break;
+ case V4L2_PIX_FMT_YUV444M:
+ v32 = (p8[x] << 16) + (planes[1][offset + x] << 8) +
+ planes[2][offset + x];
+ break;
+ case V4L2_PIX_FMT_YVU444M:
+ v32 = (p8[x] << 16) + (planes[2][offset + x] << 8) +
+ planes[1][offset + x];
+ break;
case V4L2_PIX_FMT_YUV420:
case V4L2_PIX_FMT_YUV420M:
v32 = (p8[x] << 16) +
@@ -317,6 +331,8 @@ static void getColor(const cv4l_fmt &fmt, __u8 * const planes[3],
case V4L2_PIX_FMT_NV16M:
case V4L2_PIX_FMT_NV61:
case V4L2_PIX_FMT_NV61M:
+ case V4L2_PIX_FMT_YUV422M:
+ case V4L2_PIX_FMT_YVU422M:
case V4L2_PIX_FMT_YUV422P:
case V4L2_PIX_FMT_YUV420:
case V4L2_PIX_FMT_YUV420M:
@@ -324,6 +340,8 @@ static void getColor(const cv4l_fmt &fmt, __u8 * const planes[3],
case V4L2_PIX_FMT_YVU420M:
case V4L2_PIX_FMT_NV24:
case V4L2_PIX_FMT_NV42:
+ case V4L2_PIX_FMT_YUV444M:
+ case V4L2_PIX_FMT_YVU444M:
break;
default:
if (fmt.g_quantization() == V4L2_QUANTIZATION_LIM_RANGE ||

Privacy Policy