aboutsummaryrefslogtreecommitdiffstats
path: root/utils/qvidcap
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2018-09-24 15:56:13 +0200
committerHans Verkuil <hans.verkuil@cisco.com>2018-09-24 15:56:13 +0200
commit4890391b5d9e25ddd933e29c8f812a138e77919b (patch)
treebf7bcc039c7e56fee213c0b7237ff767928f0665 /utils/qvidcap
parentcaed5d64e32d55fd6abb7d4be941aaaa857be42e (diff)
v4l-utils: replace all AdobeRGB/YCC references by opRGB/YCC references.
In November last year all references to the AdobeRGB colorspace were removed from the CTA-861 standards (all versions) and replaced with the corresponding international opRGB standard (IEC 61966-2-5) due to trademark issues. Do the same in v4l-utils. If nothing else, this keeps the utilities in sync with the standard. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Diffstat (limited to 'utils/qvidcap')
-rw-r--r--utils/qvidcap/capture-win-gl.cpp10
-rw-r--r--utils/qvidcap/qvidcap.1.in4
-rw-r--r--utils/qvidcap/qvidcap.cpp8
-rw-r--r--utils/qvidcap/v4l2-convert.glsl6
4 files changed, 14 insertions, 14 deletions
diff --git a/utils/qvidcap/capture-win-gl.cpp b/utils/qvidcap/capture-win-gl.cpp
index 95177115..c415f9a9 100644
--- a/utils/qvidcap/capture-win-gl.cpp
+++ b/utils/qvidcap/capture-win-gl.cpp
@@ -117,7 +117,7 @@ const __u32 colorspaces[] = {
V4L2_COLORSPACE_470_SYSTEM_M,
V4L2_COLORSPACE_470_SYSTEM_BG,
V4L2_COLORSPACE_SRGB,
- V4L2_COLORSPACE_ADOBERGB,
+ V4L2_COLORSPACE_OPRGB,
V4L2_COLORSPACE_DCI_P3,
V4L2_COLORSPACE_BT2020,
0
@@ -126,7 +126,7 @@ const __u32 colorspaces[] = {
const __u32 xfer_funcs[] = {
V4L2_XFER_FUNC_709,
V4L2_XFER_FUNC_SRGB,
- V4L2_XFER_FUNC_ADOBERGB,
+ V4L2_XFER_FUNC_OPRGB,
V4L2_XFER_FUNC_DCI_P3,
V4L2_XFER_FUNC_SMPTE2084,
V4L2_XFER_FUNC_SMPTE240M,
@@ -942,7 +942,7 @@ bool CaptureGLWin::setV4LFormat(cv4l_fmt &fmt)
case V4L2_COLORSPACE_470_SYSTEM_M:
case V4L2_COLORSPACE_470_SYSTEM_BG:
case V4L2_COLORSPACE_SRGB:
- case V4L2_COLORSPACE_ADOBERGB:
+ case V4L2_COLORSPACE_OPRGB:
case V4L2_COLORSPACE_BT2020:
case V4L2_COLORSPACE_DCI_P3:
break;
@@ -1842,7 +1842,7 @@ static const struct define defines[] = {
DEF(V4L2_COLORSPACE_470_SYSTEM_M),
DEF(V4L2_COLORSPACE_470_SYSTEM_BG),
DEF(V4L2_COLORSPACE_SRGB),
- DEF(V4L2_COLORSPACE_ADOBERGB),
+ DEF(V4L2_COLORSPACE_OPRGB),
DEF(V4L2_COLORSPACE_BT2020),
DEF(V4L2_COLORSPACE_RAW),
DEF(V4L2_COLORSPACE_DCI_P3),
@@ -1850,7 +1850,7 @@ static const struct define defines[] = {
DEF(V4L2_XFER_FUNC_DEFAULT),
DEF(V4L2_XFER_FUNC_709),
DEF(V4L2_XFER_FUNC_SRGB),
- DEF(V4L2_XFER_FUNC_ADOBERGB),
+ DEF(V4L2_XFER_FUNC_OPRGB),
DEF(V4L2_XFER_FUNC_SMPTE240M),
DEF(V4L2_XFER_FUNC_NONE),
DEF(V4L2_XFER_FUNC_DCI_P3),
diff --git a/utils/qvidcap/qvidcap.1.in b/utils/qvidcap/qvidcap.1.in
index bc1d1113..d7f4af66 100644
--- a/utils/qvidcap/qvidcap.1.in
+++ b/utils/qvidcap/qvidcap.1.in
@@ -34,10 +34,10 @@ Starting with frame <frm> (default 1), pause after displaying each frame
until Space is pressed.
.TP
\fB\-C\fR, \fB\-\-colorspace\fR=\fI<c>\fR
-Override colorspace. <c> can be one of the following colorspaces: smpte170m, smpte240m, rec709, 470m, 470bg, jpeg, srgb, adobergb, bt2020, dcip3
+Override colorspace. <c> can be one of the following colorspaces: smpte170m, smpte240m, rec709, 470m, 470bg, jpeg, srgb, oprgb, bt2020, dcip3
.TP
\fB\-X\fR, \fB\-\-xfer-func\fR=\fI<x>\fR
-Override transfer function. <x> can be one of the following transfer functions: default, 709, srgb, adobergb, smpte240m, smpte2084, dcip3, none
+Override transfer function. <x> can be one of the following transfer functions: default, 709, srgb, oprgb, smpte240m, smpte2084, dcip3, none
.TP
\fB\-Y\fR, \fB\-\-ycbcr-enc\fR=\fI<y>\fR
Override Y'CbCr encoding. <y> can be one of the following Y'CbCr encodings: default, 601, 709, xv601, xv709, bt2020, bt2020c, smpte240m
diff --git a/utils/qvidcap/qvidcap.cpp b/utils/qvidcap/qvidcap.cpp
index 04f05546..0f81a729 100644
--- a/utils/qvidcap/qvidcap.cpp
+++ b/utils/qvidcap/qvidcap.cpp
@@ -41,10 +41,10 @@ static void usage()
" -C, --colorspace=<c> override colorspace\n"
" <c> can be one of the following colorspaces:\n"
" smpte170m, smpte240m, rec709, 470m, 470bg, jpeg, srgb,\n"
- " adobergb, bt2020, dcip3\n"
+ " oprgb, bt2020, dcip3\n"
" -X, --xfer-func=<x> override transfer function\n"
" <x> can be one of the following transfer functions:\n"
- " default, 709, srgb, adobergb, smpte240m, smpte2084, dcip3, none\n"
+ " default, 709, srgb, oprgb, smpte240m, smpte2084, dcip3, none\n"
" -Y, --ycbcr-enc=<y> override Y'CbCr encoding\n"
" <y> can be one of the following Y'CbCr encodings:\n"
" default, 601, 709, xv601, xv709, bt2020, bt2020c, smpte240m\n"
@@ -158,7 +158,7 @@ static __u32 parse_colorspace(const QString &s)
if (s == "470bg") return V4L2_COLORSPACE_470_SYSTEM_BG;
if (s == "jpeg") return V4L2_COLORSPACE_JPEG;
if (s == "srgb") return V4L2_COLORSPACE_SRGB;
- if (s == "adobergb") return V4L2_COLORSPACE_ADOBERGB;
+ if (s == "oprgb") return V4L2_COLORSPACE_OPRGB;
if (s == "bt2020") return V4L2_COLORSPACE_BT2020;
if (s == "dcip3") return V4L2_COLORSPACE_DCI_P3;
return 0;
@@ -170,7 +170,7 @@ static __u32 parse_xfer_func(const QString &s)
if (s == "smpte240m") return V4L2_XFER_FUNC_SMPTE240M;
if (s == "rec709") return V4L2_XFER_FUNC_709;
if (s == "srgb") return V4L2_XFER_FUNC_SRGB;
- if (s == "adobergb") return V4L2_XFER_FUNC_ADOBERGB;
+ if (s == "oprgb") return V4L2_XFER_FUNC_OPRGB;
if (s == "dcip3") return V4L2_XFER_FUNC_DCI_P3;
if (s == "smpte2084") return V4L2_XFER_FUNC_SMPTE2084;
if (s == "none") return V4L2_XFER_FUNC_NONE;
diff --git a/utils/qvidcap/v4l2-convert.glsl b/utils/qvidcap/v4l2-convert.glsl
index 8346ccd2..6ca12d8d 100644
--- a/utils/qvidcap/v4l2-convert.glsl
+++ b/utils/qvidcap/v4l2-convert.glsl
@@ -71,7 +71,7 @@ const mat3 colconv = mat3(
1.0440, 0, 0,
-0.0440, 1, -0.0119,
0, 0, 1.0119
-#elif COLSP == V4L2_COLORSPACE_ADOBERGB
+#elif COLSP == V4L2_COLORSPACE_OPRGB
1.3982832, 0, 0,
-0.3982831, 1, -0.0429383,
0, 0, 1.0429383
@@ -334,7 +334,7 @@ void main()
rgb = vec3(XFER(rgb.r), XFER(rgb.g), XFER(rgb.b));
-#elif XFERFUNC == V4L2_XFER_FUNC_ADOBERGB
+#elif XFERFUNC == V4L2_XFER_FUNC_OPRGB
// Avoid powers of negative numbers
rgb = max(rgb, vec3(0.0));
@@ -374,7 +374,7 @@ void main()
// specified as linear RGB.
#if COLSP == V4L2_COLORSPACE_SMPTE170M || COLSP == V4L2_COLORSPACE_SMPTE240M || \
COLSP == V4L2_COLORSPACE_470_SYSTEM_M || COLSP == V4L2_COLORSPACE_470_SYSTEM_BG || \
- COLSP == V4L2_COLORSPACE_ADOBERGB || COLSP == V4L2_COLORSPACE_DCI_P3 || \
+ COLSP == V4L2_COLORSPACE_OPRGB || COLSP == V4L2_COLORSPACE_DCI_P3 || \
COLSP == V4L2_COLORSPACE_BT2020
rgb = colconv * rgb;
#endif

Privacy Policy