History

media: replace ADOBERGB by OPRGB

The CTA-861 standards have been updated to refer to opRGB instead of AdobeRGB. The official standard is in fact named opRGB, so switch to that. The two old defines referring to ADOBERGB in the public API are put under #ifndef __KERNEL__ and a comment mentions that they are deprecated.

Hans Verkuil committed 8 years ago

Commit db034011 parent b4fbf4210 files · +165 −152Browse files

Showing the changes to include/uapi/linux (1 of 10 files). Show all

Unified · Split

include/uapi/linux/videodev2.h+17−6
@@ -225,8 +225,8 @@ enum v4l2_colorspace { · 224 unmodified lines
225225 /* For RGB colorspaces such as produces by most webcams. */
226226 V4L2_COLORSPACE_SRGB = 8,
227227
228− /* AdobeRGB colorspace */
229− V4L2_COLORSPACE_ADOBERGB = 9,
228+ /* opRGB colorspace */
229+ V4L2_COLORSPACE_OPRGB = 9,
230230
231231 /* BT.2020 colorspace, used for UHDTV. */
232232 V4L2_COLORSPACE_BT2020 = 10,
@@ -258,7 +258,7 @@ enum v4l2_xfer_func { · 25 unmodified lines
258258 *
259259 * V4L2_COLORSPACE_SRGB, V4L2_COLORSPACE_JPEG: V4L2_XFER_FUNC_SRGB
260260 *
261− * V4L2_COLORSPACE_ADOBERGB: V4L2_XFER_FUNC_ADOBERGB
261+ * V4L2_COLORSPACE_OPRGB: V4L2_XFER_FUNC_OPRGB
262262 *
263263 * V4L2_COLORSPACE_SMPTE240M: V4L2_XFER_FUNC_SMPTE240M
264264 *
@@ -269,7 +269,7 @@ enum v4l2_xfer_func { · 4 unmodified lines
269269 V4L2_XFER_FUNC_DEFAULT = 0,
270270 V4L2_XFER_FUNC_709 = 1,
271271 V4L2_XFER_FUNC_SRGB = 2,
272− V4L2_XFER_FUNC_ADOBERGB = 3,
272+ V4L2_XFER_FUNC_OPRGB = 3,
273273 V4L2_XFER_FUNC_SMPTE240M = 4,
274274 V4L2_XFER_FUNC_NONE = 5,
275275 V4L2_XFER_FUNC_DCI_P3 = 6,
@@ -281,7 +281,7 @@ enum v4l2_xfer_func { · 5 unmodified lines
281281 * This depends on the colorspace.
282282 */
283283 #define V4L2_MAP_XFER_FUNC_DEFAULT(colsp) \
284− ((colsp) == V4L2_COLORSPACE_ADOBERGB ? V4L2_XFER_FUNC_ADOBERGB : \
284+ ((colsp) == V4L2_COLORSPACE_OPRGB ? V4L2_XFER_FUNC_OPRGB : \
285285 ((colsp) == V4L2_COLORSPACE_SMPTE240M ? V4L2_XFER_FUNC_SMPTE240M : \
286286 ((colsp) == V4L2_COLORSPACE_DCI_P3 ? V4L2_XFER_FUNC_DCI_P3 : \
287287 ((colsp) == V4L2_COLORSPACE_RAW ? V4L2_XFER_FUNC_NONE : \
@@ -295,7 +295,7 @@ enum v4l2_ycbcr_encoding { · 7 unmodified lines
295295 *
296296 * V4L2_COLORSPACE_SMPTE170M, V4L2_COLORSPACE_470_SYSTEM_M,
297297 * V4L2_COLORSPACE_470_SYSTEM_BG, V4L2_COLORSPACE_SRGB,
298− * V4L2_COLORSPACE_ADOBERGB and V4L2_COLORSPACE_JPEG: V4L2_YCBCR_ENC_601
298+ * V4L2_COLORSPACE_OPRGB and V4L2_COLORSPACE_JPEG: V4L2_YCBCR_ENC_601
299299 *
300300 * V4L2_COLORSPACE_REC709 and V4L2_COLORSPACE_DCI_P3: V4L2_YCBCR_ENC_709
301301 *
@@ -382,6 +382,17 @@ enum v4l2_quantization { · 80 unmodified lines
382382 (((is_rgb_or_hsv) || (colsp) == V4L2_COLORSPACE_JPEG) ? \
383383 V4L2_QUANTIZATION_FULL_RANGE : V4L2_QUANTIZATION_LIM_RANGE))
384384
385+/*
386+ * Deprecated names for opRGB colorspace (IEC 61966-2-5)
387+ *
388+ * WARNING: Please don't use these deprecated defines in your code, as
389+ * there is a chance we have to remove them in the future.
390+ */
391+#ifndef __KERNEL__
392+#define V4L2_COLORSPACE_ADOBERGB V4L2_COLORSPACE_OPRGB
393+#define V4L2_XFER_FUNC_ADOBERGB V4L2_XFER_FUNC_OPRGB
394+#endif
395+
385396 enum v4l2_priority {
386397 V4L2_PRIORITY_UNSET = 0, /* not initialized */
387398 V4L2_PRIORITY_BACKGROUND = 1,