Show a patch.

GET /api/1.1/patches/18198/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 18198,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/18198/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/18198/",
    "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": "<20230126134559.3323-2-david.plowman@raspberrypi.com>",
    "date": "2023-01-26T13:45:58",
    "name": "[libcamera-devel,v2,1/2] libcamera: controls: Add controls for AEC/AGC flicker avoidance",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "4f797dadd457eadca363e7fbd765556cfb269bc8",
    "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/18198/mbox/",
    "series": [
        {
            "id": 3727,
            "url": "https://patchwork.libcamera.org/api/1.1/series/3727/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3727",
            "date": "2023-01-26T13:45:57",
            "name": "Add flicker avoidance controls",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/3727/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/18198/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/18198/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 5C4F2C3242\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 26 Jan 2023 13:46:08 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D8A56625E6;\n\tThu, 26 Jan 2023 14:46:07 +0100 (CET)",
            "from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com\n\t[IPv6:2a00:1450:4864:20::32d])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DEF5661EFB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 Jan 2023 14:46:04 +0100 (CET)",
            "by mail-wm1-x32d.google.com with SMTP id\n\to17-20020a05600c511100b003db021ef437so1138149wms.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 Jan 2023 05:46:04 -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\tm2-20020a056000180200b002bfb5618ee7sm1370567wrh.91.2023.01.26.05.46.03\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 26 Jan 2023 05:46:03 -0800 (PST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1674740767;\n\tbh=RKcH0YAhfSyo/V95nouLl+95faYvYp3ElcdEXCr9GuQ=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=GewIuTy6o1yB1fmJC1dKqwmSmZhJFKeHqhD0dhQiu6daWdL/X96C0lKK6iLFAOl0f\n\tAbCWut9zH58YrzT1aLqiI6VS11M+MO2dWr0g53DjXsMnnksTBWsf0y9Y0UcxahGs19\n\tzvsXrQDNbbV8yRrugHEzw26yqB1NuDqbJiYgNhNTzGzOkHCBVUte/s9MRWbxv7OpSc\n\tJWB4eiAji30YEpg78xDDfZfGw2hGsDpoQ/T/Yjlc3NG152rIhLZTRgApp7Jsu1SoRS\n\tqywgJFHsYbtukAX6z3H3W9IO3JcBMnUkAxX6Aq13Gi0bGPGZ+Yi7DLcufU3ckLWzUq\n\tgkyR/iLIOjhUg==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=aJca/RVkc3lNXZ6N3PB60KX1Xz4s8woT2pulzG8SZxU=;\n\tb=qL3bdzmIJTh+41Jayuv82B4WN9rrvejh0on4moT3EQT4rEsCj6QTpq04/BtcKJ5xd1\n\tzi3LHTNLZ5fqhlRsuc/8Qmn8fRHeuhKfnU/G4SkEMV9Dy2nUuGLOCfVlnAo5yTHmfZM5\n\tXiuqll+YsM8+mstEe0PIbGZVhOE/caRKZw2uCqI0cnfdyF+CrkO40FE8hDI+SXexwza8\n\t1aVY9n5bsKMXL/JYzrxO/BzG2WqtE4TkUAna93atouzNkcu9KSeK7XLl8YtAHiVjiETm\n\tbfst9NRd45n52+CncqWPRFnGQpV/HdBoWEXg3zv7WYd/+HPDbRQmRwT4rELelZoCzk81\n\tnOmQ=="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"qL3bdzmI\"; dkim-atps=neutral",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=aJca/RVkc3lNXZ6N3PB60KX1Xz4s8woT2pulzG8SZxU=;\n\tb=zr3ckAEmVKn3d9YE5IdLk7izziqDkDZKdx2GHkIR8tTq1ZQIcxZMZvlRrsyx5WCtXM\n\txyZXTa6QsYLLEaKghVSPdRa/THgTIff/IsrsxDbDFgX+LjCYY/g3R6YdjqQyGM5IM6b1\n\tISuqQtE52FI195ePGGVmEACTUw9DN+mXW7LNHhWXFbuVLSMBS1ytfshImrqChKOZTVYc\n\tlaLBbyuQfH3J+8Md1IeWgHHEgS9VZekrpJiGqb1cirTFE8mC/jIUYON4+cZ5TQW3SiKG\n\thjkhq1MbGdSO7n4hhmjT2KbpZqCI4wKmxmJzucrB0FOVLWYQetzhBdeBmojYWnwR0Toh\n\twskA==",
        "X-Gm-Message-State": "AFqh2krL8QpdhCeqk8r/D+qS3eLFNIv8TeWoB7mHWxs9rpdZit+DHBDN\n\tL6Ux6QSXguTCnkysX5R+6/2kNpSrWty4ed9F",
        "X-Google-Smtp-Source": "AMrXdXulyimo8rAb5ESaxhfzEvsqInA4WoPrj75MepZgPGzj+bnhP/Y3K3GYRY2GSbH532u9wmDeIg==",
        "X-Received": "by 2002:a05:600c:a11:b0:3db:f1f:bc31 with SMTP id\n\tz17-20020a05600c0a1100b003db0f1fbc31mr32800989wmp.16.1674740764294; \n\tThu, 26 Jan 2023 05:46:04 -0800 (PST)",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu, 26 Jan 2023 13:45:58 +0000",
        "Message-Id": "<20230126134559.3323-2-david.plowman@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.30.2",
        "In-Reply-To": "<20230126134559.3323-1-david.plowman@raspberrypi.com>",
        "References": "<20230126134559.3323-1-david.plowman@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v2 1/2] libcamera: controls: Add controls\n\tfor AEC/AGC flicker avoidance",
        "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>",
        "From": "David Plowman via libcamera-devel <libcamera-devel@lists.libcamera.org>",
        "Reply-To": "David Plowman <david.plowman@raspberrypi.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Flicker is the term used to describe brightness banding or oscillation\nof images caused typically by artificial lighting driven by a 50 or\n60Hz mains supply. We add two controls intended to be used by AEC/AGC\nalgorithms:\n\nAeFlickerMode to determine whether flicker avoidance is active or not.\n\nAeFlickerPeriod to specify a custom flicker period when the period is\nother than 50 or 60Hz.\n\nSigned-off-by: David Plowman <david.plowman@raspberrypi.com>\n---\n src/libcamera/control_ids.yaml | 69 +++++++++++++++++++++++++---------\n 1 file changed, 52 insertions(+), 17 deletions(-)",
    "diff": "diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\nindex adea5f90..8093ab75 100644\n--- a/src/libcamera/control_ids.yaml\n+++ b/src/libcamera/control_ids.yaml\n@@ -14,6 +14,58 @@ controls:\n \n         \\sa ExposureTime AnalogueGain\n \n+  - AeFlickerMode:\n+      type: int32_t\n+      description: |\n+        Set the flicker mode, which determines whether, and how, the AGC/AEC\n+        algorithm attempts to hide flicker effects caused by the duty cycle of\n+        artificial lighting.\n+\n+        Although implementation dependent, many algorithms for \"flicker\n+        avoidance\" work by restricting the exposure time to integer multiples\n+        of this cycle period, wherever possible.\n+\n+        Implementations may not support all of the flicker modes listed below.\n+\n+      enum:\n+        - name: FlickerOff\n+          value: 0\n+          description: No flicker avoidance is performed.\n+        - name: FlickerFreq50Hz\n+          value: 1\n+          description: 50Hz flicker avoidance.\n+            Suppress flicker effects caused by lighting runing with a\n+            100Hz period (such as produced by 50Hz mains electricity).\n+        - name: FlickerFreq60Hz\n+          value: 2\n+          description: 60Hz flicker avoidance.\n+            Suppress flicker effects caused by lighting running with a\n+            120Hz period (such as produced by 60Hz mains electricity).\n+        - name: FlickerCustom\n+          value: 3\n+          description: Custom flicker avoidance.\n+            Suppress flicker effects caused by lighting running with a\n+            period specified by AeFlickerPeriod.\n+\n+            \\sa AeFlickerPeriod\n+        - name: FlickerAuto\n+          value: 4\n+          description: Automatic flicker period detection and avoidance.\n+            The system will automatically determine the most likely value\n+            of the flicker period, and avoid flicker of this frequency.\n+        \n+  - AeFlickerPeriod:\n+      type: int32_t\n+      description: Custom flicker period in microseconds.\n+        This value is taken as the current flicker period to avoid. It\n+        is used when the AeFlickerMode is set to FlickerCustom.\n+\n+        For example, to avoid 50Hz mains flicker, you could set the period\n+        to 10000, corresponding to 10ms (twice the mains frequency), and\n+        AeFlickerMode to FlickerCustom.\n+\n+        \\sa AeFlickerMode\n+\n   - AeLocked:\n       type: bool\n       description: |\n@@ -843,23 +895,6 @@ controls:\n           value: 1\n           description: The lens shading map mode is available.\n \n-  - SceneFlicker:\n-      type: int32_t\n-      draft: true\n-      description: |\n-       Control to report the detected scene light frequency. Currently\n-       identical to ANDROID_STATISTICS_SCENE_FLICKER.\n-      enum:\n-        - name: SceneFickerOff\n-          value: 0\n-          description: No flickering detected.\n-        - name: SceneFicker50Hz\n-          value: 1\n-          description: 50Hz flickering detected.\n-        - name: SceneFicker60Hz\n-          value: 2\n-          description: 60Hz flickering detected.\n-\n   - PipelineDepth:\n       type: int32_t\n       draft: true\n",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "1/2"
    ]
}