Patch Detail
Show a patch.
GET /api/1.1/patches/14974/?format=api
{ "id": 14974, "url": "https://patchwork.libcamera.org/api/1.1/patches/14974/?format=api", "web_url": "https://patchwork.libcamera.org/patch/14974/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20211201154434.23127-2-david.plowman@raspberrypi.com>", "date": "2021-12-01T15:44:27", "name": "[libcamera-devel,v8,1/8] libcamera: Add ColorSpace class", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "fbfa4563ac113f1a086b9312eb1de27bce0b17d1", "submitter": { "id": 42, "url": "https://patchwork.libcamera.org/api/1.1/people/42/?format=api", "name": "David Plowman", "email": "david.plowman@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/14974/mbox/", "series": [ { "id": 2797, "url": "https://patchwork.libcamera.org/api/1.1/series/2797/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2797", "date": "2021-12-01T15:44:26", "name": "Colour spaces", "version": 8, "mbox": "https://patchwork.libcamera.org/series/2797/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/14974/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/14974/checks/", "tags": {}, "headers": { "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>", "X-Original-To": "parsemail@patchwork.libcamera.org", "Delivered-To": "parsemail@patchwork.libcamera.org", "Received": [ "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 4C4B6BDB13\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 1 Dec 2021 15:45:06 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CA03C607CC;\n\tWed, 1 Dec 2021 16:45:04 +0100 (CET)", "from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com\n\t[IPv6:2a00:1450:4864:20::42a])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BF2BA60744\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 1 Dec 2021 16:45:03 +0100 (CET)", "by mail-wr1-x42a.google.com with SMTP id c4so53230462wrd.9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 01 Dec 2021 07:45:03 -0800 (PST)", "from pi4-davidp.pitowers.org\n\t([2a00:1098:3142:14:e4a2:3070:eea4:e434])\n\tby smtp.gmail.com with ESMTPSA id\n\ty7sm148209wrw.55.2021.12.01.07.45.02\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 01 Dec 2021 07:45:02 -0800 (PST)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"FU3iqVXD\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=Cp9glBsixRLEKZiH2UGu4p0K9rO+nf2CgExbPffXVV8=;\n\tb=FU3iqVXDyBcr1RJWitUBdFv2tp2KpuinScYyXo+io7VvXA12F//aZPJBnfgSB6wgpN\n\tOf/hI7Th677WqJMECmi+ly+qwWFzuUrlCANWFaNwPGaHF8Xk3+kO6mmJx8zAjYCRVRbh\n\t0E3DsphaW0ObHi5h6n0AKTRWZB3CumKh6gwXIi1ETlVM8N79xfRtEcYUFPvwG1bYv/Cb\n\tlOzW7GCpQjQLXXsxvxynh0A/92fHLC9Mvvd7N53rKjkc8z/ddGvJc2PqXo3dnzG1HrGh\n\tgGR4D8O/ooPUrPj69WApUXinRe+bpPmgMWJOHahkzG2rNFxWTzMMoAYOEBtaqoZBkY0A\n\tcmrQ==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=Cp9glBsixRLEKZiH2UGu4p0K9rO+nf2CgExbPffXVV8=;\n\tb=W+ytWEOkgdV3y+vyyK1Bt5eCyQWEi161Rzy2iljO2DLfKiyJ4rsfqiH9lZoA8ZC9WI\n\txKmDEVrryZbLscQyIumATUmvfI11y6JUXOPFNpiYgolOMxDC8w2NtwIYDETcHUCJJT5r\n\tM6Aa0OdyUH2LqSweafNodnTJf5c9DgUoHoQM0obBUjoclm1kKc+t1ebjt7yUhJ9FnoOl\n\tDM4tXVjsaCSETRbLxAF4qijsWGxBZxI+YItUrb9F9D+wZ4b+fNO25vwYOugbfHJtFV6N\n\tyMeGWziPL3xujmByi+c5miuEgkQzoZCmqY8O+Nf9JCjj1HLbsamrLCOwDx6YOVRugF8r\n\tXBUw==", "X-Gm-Message-State": "AOAM530rrGcoI1UsJAyJIsFJQbDertIGBGBvZUEkisPs3RSYu+Y0gJsp\n\tEPC5/lCm27LyvItuuVFmb1fYazA8GQguN69X", "X-Google-Smtp-Source": "ABdhPJwcMxFlEi7TgK0dPxvVMChCvdqXFq3sHvVmpYbOR+AO8M05Fu5LiKMONCo2vF6ZpkMpJw4wUg==", "X-Received": "by 2002:adf:9d88:: with SMTP id p8mr7942362wre.140.1638373503175;\n\tWed, 01 Dec 2021 07:45:03 -0800 (PST)", "From": "David Plowman <david.plowman@raspberrypi.com>", "To": "libcamera-devel@lists.libcamera.org,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>,\n\tJacopo Mondi <jacopo@jmondi.org>,\n\tHans Verkuil <hverkuil-cisco@xs4all.nl>, \n\tTomasz Figa <tfiga@google.com>, Naushir Patuck <naush@raspberrypi.com>", "Date": "Wed, 1 Dec 2021 15:44:27 +0000", "Message-Id": "<20211201154434.23127-2-david.plowman@raspberrypi.com>", "X-Mailer": "git-send-email 2.30.2", "In-Reply-To": "<20211201154434.23127-1-david.plowman@raspberrypi.com>", "References": "<20211201154434.23127-1-david.plowman@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v8 1/8] libcamera: Add ColorSpace class", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "<libcamera-devel.lists.libcamera.org>", "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>", "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>", "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>", "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>", "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "This class represents a color space by defining its color primaries,\nYCbCr encoding, the transfer (gamma) function it uses, and whether the\noutput is full or limited range.\n\nSigned-off-by: David Plowman <david.plowman@raspberrypi.com>\nReviewed-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: Umang Jain <umang.jain@ideasonboard.com>\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n include/libcamera/color_space.h | 69 ++++++++\n include/libcamera/meson.build | 1 +\n src/libcamera/color_space.cpp | 305 ++++++++++++++++++++++++++++++++\n src/libcamera/meson.build | 1 +\n 4 files changed, 376 insertions(+)\n create mode 100644 include/libcamera/color_space.h\n create mode 100644 src/libcamera/color_space.cpp", "diff": "diff --git a/include/libcamera/color_space.h b/include/libcamera/color_space.h\nnew file mode 100644\nindex 00000000..0fe6b580\n--- /dev/null\n+++ b/include/libcamera/color_space.h\n@@ -0,0 +1,69 @@\n+/* SPDX-License-Identifier: LGPL-2.1-or-later */\n+/*\n+ * Copyright (C) 2021, Raspberry Pi (Trading) Limited\n+ *\n+ * color_space.h - color space definitions\n+ */\n+\n+#pragma once\n+\n+#include <optional>\n+#include <string>\n+\n+namespace libcamera {\n+\n+class ColorSpace\n+{\n+public:\n+\tenum class Primaries {\n+\t\tRaw,\n+\t\tSmpte170m,\n+\t\tRec709,\n+\t\tRec2020,\n+\t};\n+\n+\tenum class YcbcrEncoding {\n+\t\tRec601,\n+\t\tRec709,\n+\t\tRec2020,\n+\t};\n+\n+\tenum class TransferFunction {\n+\t\tLinear,\n+\t\tSrgb,\n+\t\tRec709,\n+\t};\n+\n+\tenum class Range {\n+\t\tFull,\n+\t\tLimited,\n+\t};\n+\n+\tconstexpr ColorSpace(Primaries p, YcbcrEncoding e, TransferFunction t, Range r)\n+\t\t: primaries(p), ycbcrEncoding(e), transferFunction(t), range(r)\n+\t{\n+\t}\n+\n+\tstatic const ColorSpace Raw;\n+\tstatic const ColorSpace Jpeg;\n+\tstatic const ColorSpace Srgb;\n+\tstatic const ColorSpace Smpte170m;\n+\tstatic const ColorSpace Rec709;\n+\tstatic const ColorSpace Rec2020;\n+\n+\tPrimaries primaries;\n+\tYcbcrEncoding ycbcrEncoding;\n+\tTransferFunction transferFunction;\n+\tRange range;\n+\n+\tconst std::string toString() const;\n+\tstatic const std::string toString(const std::optional<ColorSpace> &colorSpace);\n+};\n+\n+bool operator==(const ColorSpace &lhs, const ColorSpace &rhs);\n+static inline bool operator!=(const ColorSpace &lhs, const ColorSpace &rhs)\n+{\n+\treturn !(lhs == rhs);\n+}\n+\n+} /* namespace libcamera */\ndiff --git a/include/libcamera/meson.build b/include/libcamera/meson.build\nindex 7155ff20..131e1740 100644\n--- a/include/libcamera/meson.build\n+++ b/include/libcamera/meson.build\n@@ -5,6 +5,7 @@ libcamera_include_dir = 'libcamera' / 'libcamera'\n libcamera_public_headers = files([\n 'camera.h',\n 'camera_manager.h',\n+ 'color_space.h',\n 'compiler.h',\n 'controls.h',\n 'file_descriptor.h',\ndiff --git a/src/libcamera/color_space.cpp b/src/libcamera/color_space.cpp\nnew file mode 100644\nindex 00000000..5fe4fcc2\n--- /dev/null\n+++ b/src/libcamera/color_space.cpp\n@@ -0,0 +1,305 @@\n+/* SPDX-License-Identifier: LGPL-2.1-or-later */\n+/*\n+ * Copyright (C) 2021, Raspberry Pi (Trading) Limited\n+ *\n+ * color_space.cpp - color spaces.\n+ */\n+\n+#include <libcamera/color_space.h>\n+\n+#include <algorithm>\n+#include <map>\n+#include <sstream>\n+#include <utility>\n+#include <vector>\n+\n+/**\n+ * \\file color_space.h\n+ * \\brief Class and enums to represent color spaces\n+ */\n+\n+namespace libcamera {\n+\n+/**\n+ * \\class ColorSpace\n+ * \\brief Class to describe a color space\n+ *\n+ * The ColorSpace class defines the color primaries, the Y'CbCr encoding,\n+ * the transfer function associated with the color space, and the range\n+ * (sometimes also referred to as the quantisation) of the color space.\n+ *\n+ * Certain combinations of these fields form well-known standard color\n+ * spaces such as \"JPEG\" or \"REC709\".\n+ *\n+ * In the strictest sense a \"color space\" formally only refers to the\n+ * color primaries and white point. Here, however, the ColorSpace class\n+ * adopts the common broader usage that includes the transfer function,\n+ * Y'CbCr encoding method and quantisation.\n+ *\n+ * For more information on the specific color spaces described here, please\n+ * see:\n+ *\n+ * <a href=\"https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/colorspaces-details.html#col-srgb\">sRGB</a>\n+ * <a href=\"https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/colorspaces-details.html#col-jpeg\">JPEG</a>\n+ * <a href=\"https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/colorspaces-details.html#col-smpte-170m\">SMPTE 170M</a>\n+ * <a href=\"https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/colorspaces-details.html#col-rec709\">Rec.709</a>\n+ * <a href=\"https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/colorspaces-details.html#col-bt2020\">Rec.2020</a>\n+ */\n+\n+/**\n+ * \\enum ColorSpace::Primaries\n+ * \\brief The color primaries for this color space\n+ *\n+ * \\var ColorSpace::Primaries::Raw\n+ * \\brief These are raw colors directly from a sensor\n+ *\n+ * \\var ColorSpace::Primaries::Smpte170m\n+ * \\brief SMPTE 170M color primaries\n+ *\n+ * \\var ColorSpace::Primaries::Rec709\n+ * \\brief Rec.709 color primaries\n+ *\n+ * \\var ColorSpace::Primaries::Rec2020\n+ * \\brief Rec.2020 color primaries\n+ */\n+\n+/**\n+ * \\enum ColorSpace::YcbcrEncoding\n+ * \\brief The Y'CbCr encoding\n+ *\n+ * \\var ColorSpace::YcbcrEncoding::Rec601\n+ * \\brief Rec.601 Y'CbCr encoding\n+ *\n+ * \\var ColorSpace::YcbcrEncoding::Rec709\n+ * \\brief Rec.709 Y'CbCr encoding\n+ *\n+ * \\var ColorSpace::YcbcrEncoding::Rec2020\n+ * \\brief Rec.2020 Y'CbCr encoding\n+ */\n+\n+/**\n+ * \\enum ColorSpace::TransferFunction\n+ * \\brief The transfer function used for this color space\n+ *\n+ * \\var ColorSpace::TransferFunction::Linear\n+ * \\brief This color space uses a linear (identity) transfer function\n+ *\n+ * \\var ColorSpace::TransferFunction::Srgb\n+ * \\brief sRGB transfer function\n+ *\n+ * \\var ColorSpace::TransferFunction::Rec709\n+ * \\brief Rec.709 transfer function\n+ */\n+\n+/**\n+ * \\enum ColorSpace::Range\n+ * \\brief The range (sometimes \"quantisation\") for this color space\n+ *\n+ * \\var ColorSpace::Range::Full\n+ * \\brief This color space uses full range pixel values\n+ *\n+ * \\var ColorSpace::Range::Limited\n+ * \\brief This color space uses limited range pixel values, being\n+ * 16 to 235 for Y' and 16 to 240 for Cb and Cr (8 bits per sample)\n+ * or 64 to 940 for Y' and 16 to 960 for Cb and Cr (10 bits)\n+ */\n+\n+/**\n+ * \\fn ColorSpace::ColorSpace(Primaries p, Encoding e, TransferFunction t, Range r)\n+ * \\brief Construct a ColorSpace from explicit values\n+ * \\param[in] p The color primaries\n+ * \\param[in] e The Y'CbCr encoding\n+ * \\param[in] t The transfer function for the color space\n+ * \\param[in] r The range of the pixel values in this color space\n+ */\n+\n+/**\n+ * \\brief Assemble and return a readable string representation of the\n+ * ColorSpace\n+ *\n+ * If the color space matches a standard ColorSpace (such as ColorSpace::Jpeg)\n+ * then the short name of the color space (\"Jpeg\") is returned. Otherwise\n+ * the four constituent parts of the ColorSpace are assembled into a longer\n+ * string.\n+ *\n+ * \\return A string describing the ColorSpace\n+ */\n+const std::string ColorSpace::toString() const\n+{\n+\t/* Print out a brief name only for standard color spaces. */\n+\n+\tstatic const std::vector<std::pair<ColorSpace, const char *>> colorSpaceNames = {\n+\t\t{ ColorSpace::Raw, \"Raw\" },\n+\t\t{ ColorSpace::Jpeg, \"Jpeg\" },\n+\t\t{ ColorSpace::Srgb, \"Srgb\" },\n+\t\t{ ColorSpace::Smpte170m, \"Smpte170m\" },\n+\t\t{ ColorSpace::Rec709, \"Rec709\" },\n+\t\t{ ColorSpace::Rec2020, \"Rec2020\" },\n+\t};\n+\tauto it = std::find_if(colorSpaceNames.begin(), colorSpaceNames.end(),\n+\t\t\t [this](const auto &item) {\n+\t\t\t\t return *this == item.first;\n+\t\t\t });\n+\tif (it != colorSpaceNames.end())\n+\t\treturn std::string(it->second);\n+\n+\t/* Assemble a name made of the constituent fields. */\n+\n+\tstatic const std::map<Primaries, std::string> primariesNames = {\n+\t\t{ Primaries::Raw, \"Raw\" },\n+\t\t{ Primaries::Smpte170m, \"Smpte170m\" },\n+\t\t{ Primaries::Rec709, \"Rec709\" },\n+\t\t{ Primaries::Rec2020, \"Rec2020\" },\n+\t};\n+\tstatic const std::map<YcbcrEncoding, std::string> encodingNames = {\n+\t\t{ YcbcrEncoding::Rec601, \"Rec601\" },\n+\t\t{ YcbcrEncoding::Rec709, \"Rec709\" },\n+\t\t{ YcbcrEncoding::Rec2020, \"Rec2020\" },\n+\t};\n+\tstatic const std::map<TransferFunction, std::string> transferNames = {\n+\t\t{ TransferFunction::Linear, \"Linear\" },\n+\t\t{ TransferFunction::Srgb, \"Srgb\" },\n+\t\t{ TransferFunction::Rec709, \"Rec709\" },\n+\t};\n+\tstatic const std::map<Range, std::string> rangeNames = {\n+\t\t{ Range::Full, \"Full\" },\n+\t\t{ Range::Limited, \"Limited\" },\n+\t};\n+\n+\tauto itPrimaries = primariesNames.find(primaries);\n+\tstd::string primariesName =\n+\t\titPrimaries == primariesNames.end() ? \"Invalid\" : itPrimaries->second;\n+\n+\tauto itEncoding = encodingNames.find(ycbcrEncoding);\n+\tstd::string encodingName =\n+\t\titEncoding == encodingNames.end() ? \"Invalid\" : itEncoding->second;\n+\n+\tauto itTransfer = transferNames.find(transferFunction);\n+\tstd::string transferName =\n+\t\titTransfer == transferNames.end() ? \"Invalid\" : itTransfer->second;\n+\n+\tauto itRange = rangeNames.find(range);\n+\tstd::string rangeName =\n+\t\titRange == rangeNames.end() ? \"Invalid\" : itRange->second;\n+\n+\tstd::stringstream ss;\n+\tss << primariesName << \"/\" << encodingName << \"/\" << transferName << \"/\" << rangeName;\n+\n+\treturn ss.str();\n+}\n+\n+/**\n+ * \\brief Assemble and return a readable string representation of an\n+ * optional ColorSpace\n+ * \\return A string describing the optional ColorSpace\n+ */\n+const std::string ColorSpace::toString(const std::optional<ColorSpace> &colorSpace)\n+{\n+\tif (!colorSpace)\n+\t\treturn \"Unknown\";\n+\n+\treturn colorSpace->toString();\n+}\n+\n+/**\n+ * \\var ColorSpace::primaries\n+ * \\brief The color primaries of this color space\n+ */\n+\n+/**\n+ * \\var ColorSpace::ycbcrEncoding\n+ * \\brief The Y'CbCr encoding used with this color space\n+ */\n+\n+/**\n+ * \\var ColorSpace::transferFunction\n+ * \\brief The transfer function used with this color space\n+ */\n+\n+/**\n+ * \\var ColorSpace::range\n+ * \\brief The pixel range used with this color space\n+ */\n+\n+/**\n+ * \\brief A constant representing a raw color space (from a sensor)\n+ */\n+const ColorSpace ColorSpace::Raw = {\n+\tPrimaries::Raw,\n+\tYcbcrEncoding::Rec601,\n+\tTransferFunction::Linear,\n+\tRange::Full\n+};\n+\n+/**\n+ * \\brief A constant representing the JPEG color space used for\n+ * encoding JPEG images.\n+ */\n+const ColorSpace ColorSpace::Jpeg = {\n+\tPrimaries::Rec709,\n+\tYcbcrEncoding::Rec601,\n+\tTransferFunction::Srgb,\n+\tRange::Full\n+};\n+\n+/**\n+ * \\brief A constant representing the sRGB color space. This is\n+ * identical to the JPEG color space except that the range Y'CbCr\n+ * range is limited rather than full.\n+ */\n+const ColorSpace ColorSpace::Srgb = {\n+\tPrimaries::Rec709,\n+\tYcbcrEncoding::Rec601,\n+\tTransferFunction::Srgb,\n+\tRange::Limited\n+};\n+\n+/**\n+ * \\brief A constant representing the SMPTE170M color space\n+ */\n+const ColorSpace ColorSpace::Smpte170m = {\n+\tPrimaries::Smpte170m,\n+\tYcbcrEncoding::Rec601,\n+\tTransferFunction::Rec709,\n+\tRange::Limited\n+};\n+\n+/**\n+ * \\brief A constant representing the Rec.709 color space\n+ */\n+const ColorSpace ColorSpace::Rec709 = {\n+\tPrimaries::Rec709,\n+\tYcbcrEncoding::Rec709,\n+\tTransferFunction::Rec709,\n+\tRange::Limited\n+};\n+\n+/**\n+ * \\brief A constant representing the Rec.2020 color space\n+ */\n+const ColorSpace ColorSpace::Rec2020 = {\n+\tPrimaries::Rec2020,\n+\tYcbcrEncoding::Rec2020,\n+\tTransferFunction::Rec709,\n+\tRange::Limited\n+};\n+\n+/**\n+ * \\brief Compare color spaces for equality\n+ * \\return True if the two color spaces are identical, false otherwise\n+ */\n+bool operator==(const ColorSpace &lhs, const ColorSpace &rhs)\n+{\n+\treturn lhs.primaries == rhs.primaries &&\n+\t lhs.ycbcrEncoding == rhs.ycbcrEncoding &&\n+\t lhs.transferFunction == rhs.transferFunction &&\n+\t lhs.range == rhs.range;\n+}\n+\n+/**\n+ * \\fn bool operator!=(const ColorSpace &lhs, const ColorSpace &rhs)\n+ * \\brief Compare color spaces for inequality\n+ * \\return True if the two color spaces are not identical, false otherwise\n+ */\n+\n+} /* namespace libcamera */\ndiff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\nindex 6727a777..e7371d20 100644\n--- a/src/libcamera/meson.build\n+++ b/src/libcamera/meson.build\n@@ -8,6 +8,7 @@ libcamera_sources = files([\n 'camera_manager.cpp',\n 'camera_sensor.cpp',\n 'camera_sensor_properties.cpp',\n+ 'color_space.cpp',\n 'controls.cpp',\n 'control_serializer.cpp',\n 'control_validator.cpp',\n", "prefixes": [ "libcamera-devel", "v8", "1/8" ] }