Patch Detail
Show a patch.
GET /api/1.1/patches/15202/?format=api
{ "id": 15202, "url": "https://patchwork.libcamera.org/api/1.1/patches/15202/?format=api", "web_url": "https://patchwork.libcamera.org/patch/15202/", "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": "<20211221052854.2690659-2-paul.elder@ideasonboard.com>", "date": "2021-12-21T05:28:53", "name": "[libcamera-devel,1/2] controls: Add controls for tonemapping", "commit_ref": null, "pull_url": null, "state": "not-applicable", "archived": false, "hash": "c025af121aa2ec77e9ef136fd190564bec73306c", "submitter": { "id": 17, "url": "https://patchwork.libcamera.org/api/1.1/people/17/?format=api", "name": "Paul Elder", "email": "paul.elder@ideasonboard.com" }, "delegate": { "id": 17, "url": "https://patchwork.libcamera.org/api/1.1/users/17/?format=api", "username": "epaul", "first_name": "Paul", "last_name": "Elder", "email": "paul.elder@ideasonboard.com" }, "mbox": "https://patchwork.libcamera.org/patch/15202/mbox/", "series": [ { "id": 2856, "url": "https://patchwork.libcamera.org/api/1.1/series/2856/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2856", "date": "2021-12-21T05:28:52", "name": "android: Tonemapping", "version": 1, "mbox": "https://patchwork.libcamera.org/series/2856/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/15202/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/15202/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 45038BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 21 Dec 2021 05:29:26 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C281560901;\n\tTue, 21 Dec 2021 06:29:25 +0100 (CET)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 50264608EB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 21 Dec 2021 06:29:23 +0100 (CET)", "from pyrite.mediacom.info (unknown\n\t[IPv6:2604:2d80:ad90:fb00:96fd:8874:873:6c16])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 80C86FD2;\n\tTue, 21 Dec 2021 06:29:22 +0100 (CET)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"ng/wtbdA\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1640064563;\n\tbh=Zbiq4ZOAfkHLJLT50wvxRQYwCxAopTgdwtH7lgMD+tc=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=ng/wtbdAz4TMEoo/tixJCs4Dt3eYXNhunNdwRYbNF6XHf8qVn5/e1nL7zJ8PUviVR\n\t0zR9dHOz8iIXB5byXZEDjG4i/i4VJ1K2pZm6R6NAJNruGDcrrHB5KC5MCeTnmOU7cD\n\tetIiAYnwe6xNpCr/ORRANTuErdKwV1o7Y6ZE39dw=", "From": "Paul Elder <paul.elder@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 20 Dec 2021 23:28:53 -0600", "Message-Id": "<20211221052854.2690659-2-paul.elder@ideasonboard.com>", "X-Mailer": "git-send-email 2.27.0", "In-Reply-To": "<20211221052854.2690659-1-paul.elder@ideasonboard.com>", "References": "<20211221052854.2690659-1-paul.elder@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 1/2] controls: Add controls for tonemapping", "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": "Add controls related to tonemapping:\n- TonemapMode: set and report the source of the tonemap curve\n- TonemapGamma: the gamma value for tonemap curve gamma mode\n- TonemapPresetCurve: the preset tonemap curve for tonemap curve preset\n mode\n- TonemapCurve: the tonemap curve for custom (contrast) curve mode, also\n used to report the TonemapCurve that was used, regardless of the mode\n- TonemapCurveSize: the number of data points of TonemapCurve\n\nThese are based on android's tonemapping controls.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n---\n src/libcamera/control_ids.yaml | 100 +++++++++++++++++++++++++++++++++\n 1 file changed, 100 insertions(+)", "diff": "diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\nindex 3236da1d..411200a8 100644\n--- a/src/libcamera/control_ids.yaml\n+++ b/src/libcamera/control_ids.yaml\n@@ -697,6 +697,106 @@ controls:\n For a monochrome camera, all four color channels must have the same\n values.\n \n+ - TonemapMode:\n+ type: int32_t\n+ description: |\n+ High-level global contrast/gamma/tonemapping control. This control,\n+ TonemapCurve, and TonemapCurveSize are the minimum required controls\n+ for tonemapping support.\n+ enum:\n+ - name: TonemapModeContrastCurve\n+ value: 0\n+ description: |\n+ Use the tonemapping curve specified in TonemapCurve.\n+ All color enhancement and tonemapping must be disabled, except\n+ for applying the tonemapping curve specified by TonemapCurve.\n+ - name: TonemapModeFast\n+ value: 1\n+ description: |\n+ Advanced gamma mapping and color enhancement may be applied,\n+ without reducing frame rate compared to raw sensor output. The\n+ camera will use its own tonemap curve, and report it in TonemapCurve.\n+ - name: TonemapModeHighQuality\n+ value: 2\n+ description: |\n+ High-quality gamma mapping and color enhancement will be\n+ applied, at the cost of possibly reduced frame rate compared to\n+ raw sensor output. The camera will use its own tonemap curve, and\n+ report it in TonemapCurve.\n+ - name: TonemapModeGammaValue\n+ value: 3\n+ description: |\n+ Use the gamma value specified in TonemapGamma to perform\n+ tonemapping. All color enhancement and tonemapping shall be\n+ disabled, except for applying the tonemapping curve specified\n+ by TonemapGamma.\n+\n+ If this mode is supported, then the TonemapGamma control must be\n+ supported as well.\n+ - name: TonemapModePresetCurve\n+ value: 4\n+ description: |\n+ Use the present tonemapping curve specified in\n+ TonemapPresetCurve to perform tonemapping. All color\n+ enhancement and tonemapping must be disabled, except for\n+ applying the tonemapping curve specified by TonemapPresetCurve.\n+\n+ If this mode is supported, then the TonemapPresetCurve control must\n+ be supported as well.\n+\n+ - TonemapGamma:\n+ type: float\n+ description: |\n+ Tonemapping curve to use when TonemapMode is TonemapModeGammaValue.\n+ The tonemap curve will be defined by the following formula, OUT =\n+ pow(IN, 1.0 / gamma) where IN and OUT is the input pixel value\n+ scaled to range [0.0, 1.0], pow is the power function and gamma is\n+ the gamma value specified by this key. The same curve will be\n+ applied to all color channels. The camera device may clip the input\n+ gamma value to its supported range. The actual applied value will\n+ be returned in result metadata. The valid range of gamma values\n+ varies on different devices, but values within [1.0, 5.0] are\n+ guaranteed not to be clipped.\n+\n+ - TonemapPresetCurve:\n+ type: int32_t\n+ description: |\n+ Tonemapping curve to use when TonemapMode is TonemapModePresetCurve.\n+ enum:\n+ - name: TonemapPresetCurveSRGB\n+ value: 0\n+ description: Tonemapping curve is defined by sRGB\n+ - name: TonemapPresetCurveREC709\n+ value: 1\n+ description: Tonemapping curve is defined by ITU-R BT.709\n+\n+ - TonemapCurve:\n+ type: float\n+ description: |\n+ Three arrays of [ [in, out], [in, out], ... ] format to describe a\n+ tonemapping curve to be applied when TonemapMode is set to\n+ TonemapModeContrastCurve. The first array is the tonemapping curve for\n+ red, second for green, and third for blue. When returned in metadata,\n+ this control will hold the tonemap curve used by the camera. Since the\n+ actual pixel ranges of both input and output may change depending on\n+ the camera, the values are specified by normalized floating point\n+ numbers, in the range [0.0, 1.0].\n+\n+ The number of pairs N, representing the number of data points on the\n+ tonemapping curve, shall be specified in TonemapCurveSize.\n+\n+ This control, TonemapCurveSize, and TonemapMode are the minimum required\n+ controls for tonemapping support.\n+ size: [3xNx2]\n+\n+ - TonemapCurveSize:\n+ type: int32_t\n+ description: |\n+ The number of data points on the tonemapping curve specified or\n+ reported in TonemapCurve. This control, TonemapCurve, and TonemapMode\n+ are the minimum required controls for tonemapping support.\n+\n+\n # ----------------------------------------------------------------------------\n # Draft controls section\n \n", "prefixes": [ "libcamera-devel", "1/2" ] }