Show a patch.

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

{
    "id": 18899,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/18899/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/18899/",
    "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": "<20230728133700.3713-2-david.plowman@raspberrypi.com>",
    "date": "2023-07-28T13:36:58",
    "name": "[libcamera-devel,1/3] ipa: rpi: agc: Fetch AWB status in process method, not prepare",
    "commit_ref": "2ea57d0b7702efb6e290f7ec2ef35b5646f91a6c",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "a4acad78bca2adf54691e572a984f87edda0fccb",
    "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/18899/mbox/",
    "series": [
        {
            "id": 3993,
            "url": "https://patchwork.libcamera.org/api/1.1/series/3993/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3993",
            "date": "2023-07-28T13:36:57",
            "name": "Raspberry Pi AGC tidying",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/3993/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/18899/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/18899/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 12B78C324E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 28 Jul 2023 13:37:07 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6FD13627F2;\n\tFri, 28 Jul 2023 15:37:05 +0200 (CEST)",
            "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 6E3BC627E7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 28 Jul 2023 15:37:03 +0200 (CEST)",
            "by mail-wr1-x42a.google.com with SMTP id\n\tffacd0b85a97d-31758eb5db8so2142231f8f.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 28 Jul 2023 06:37:03 -0700 (PDT)",
            "from pi4-davidp.pitowers.org\n\t([2a00:1098:3142:14:2bce:64d6:1a5c:49a2])\n\tby smtp.gmail.com with ESMTPSA id\n\ti15-20020adffdcf000000b003145559a691sm4847758wrs.41.2023.07.28.06.37.02\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 28 Jul 2023 06:37:02 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1690551425;\n\tbh=jf0XneDQIHxvSGeB7vZhsr5MqzxjdQTmkwsv3mfzPcA=;\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=pOqyNjHR3kFqRXBnL544mclW749szywdFaiz/sVCY88inxAHviSwQiYTLqIlIn+jl\n\t+oQ21exYRs+H4At9t5OxoyEYKxzzSA3+pr0NM3WAbP2fn7xP7wKQ77okySaW7HkOc4\n\tlsqxDyIYAxzB3GTmBUyNz98+fnTgQk1x9LRKdQOCl2rKt1tX5uWwy0LExOLum7hSC9\n\tbJgRn4e39DgAAoe0gAlhHwegbHl8TFSC1FyQZxrb+RI7zfYW1EiXBYZkY80APGUETw\n\tHx5vtOGf3HuNg4PFnKLeOZq4FFeJ4iCSKDJN3g+K2qdJefIW9kcneIdpAJU+GMGAfT\n\t0vz8UzMWJ04FQ==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1690551423; x=1691156223;\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=Tj69fHEclvNZTLPcEmYzqTGANaDAaLoaGmsi0RnW56I=;\n\tb=kv8I9GsqZY5bN/wFieQB/fdNwdJwfuqSrLoAg8Dc5PBsFwQVCV9+QBtNCfKIbWDGSm\n\twF920YQZDA4tRLO5TXXrkL/g1aiVFrFQrKohVqDPTKTRpfkHcdU7lXw37M4JYk5Huwx6\n\tP1ZwyBR6DOITE/SjXPoCHMQlB/FOnufNcpj7PppEAUrXQ0ssKhK3OJLKfSXVpTRsAT2C\n\tB4XUqTL+68tvWcAx9FbeuMgEjAl5zqoVMmvFh+yqLDBSy5tNIH5q5u1NQ8JZdJEXp5/O\n\tOtKlpKlIrW00D6Gy8DLig35mR8FLaHSSvnW2Mihpj/c+QSnRzQikX0228gLHAJf3o+Mp\n\tHBPw=="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"kv8I9Gsq\"; dkim-atps=neutral",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20221208; t=1690551423; x=1691156223;\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=Tj69fHEclvNZTLPcEmYzqTGANaDAaLoaGmsi0RnW56I=;\n\tb=i9Iy4vpdWDOKC25xGwJB+mFynvtvB2VqFQIUuxuodc1PRfBnu7tDCT1978Pr7zTOyS\n\tgA8DkAsz9hIXY1ZRDFOvcuowp7jwwYd5oA5xEXhk3UdWEB1ySS4BHWskUKBpnd8JOnj4\n\tdM3rRfxgGz3O0ooXmqug4Vd/o3t2HC6MGQZAwxsR8iY8NzOW77d/r82pJ6oeC2sK6YXx\n\t91fncZ9iM+l87RRcUJpCUu99bnsNIR2xu1P48/FeeakLkyesOqRnAfKD8d+pfP/i0DSS\n\tYwgOkulUgDEr8RbuorZOKolS1YbzcupQgcbAs5lduCLt8Im8oIFFQJ1WWNA3LksIOtuF\n\taQdQ==",
        "X-Gm-Message-State": "ABy/qLaV83DTs79WTU9bRWcUXshwgrU1KcvDiFcHza+Ehe48o/mrvN0q\n\tqBlLy/jchH8+kTf0k/z7zSjlt4umsBUfU94S+hk=",
        "X-Google-Smtp-Source": "APBJJlFZ09uYyRpUzs6+kvEJxCoKTGCTaG5mdmtqtL2bmECSN//MNvhZ49fcZe9AJuGCtODnlOYEtQ==",
        "X-Received": "by 2002:a5d:60cb:0:b0:313:fbd0:9813 with SMTP id\n\tx11-20020a5d60cb000000b00313fbd09813mr1560792wrt.28.1690551422903; \n\tFri, 28 Jul 2023 06:37:02 -0700 (PDT)",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Fri, 28 Jul 2023 14:36:58 +0100",
        "Message-Id": "<20230728133700.3713-2-david.plowman@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.30.2",
        "In-Reply-To": "<20230728133700.3713-1-david.plowman@raspberrypi.com>",
        "References": "<20230728133700.3713-1-david.plowman@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 1/3] ipa: rpi: agc: Fetch AWB status in\n\tprocess method, not prepare",
        "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": "prepare() doesn't use the AWB status, so fetching it in process() is\nprobably better. This change is preparatory to other changes, where we\nmay find ourselves calling process() without having called prepare()\npreviously.\n\nSigned-off-by: David Plowman <david.plowman@raspberrypi.com>\n---\n src/ipa/rpi/controller/rpi/agc.cpp | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/src/ipa/rpi/controller/rpi/agc.cpp b/src/ipa/rpi/controller/rpi/agc.cpp\nindex ae9ff219..e8526355 100644\n--- a/src/ipa/rpi/controller/rpi/agc.cpp\n+++ b/src/ipa/rpi/controller/rpi/agc.cpp\n@@ -424,7 +424,6 @@ void Agc::prepare(Metadata *imageMetadata)\n \t\ttotalExposureValue = delayedStatus.totalExposureValue;\n \n \tstatus_.digitalGain = 1.0;\n-\tfetchAwbStatus(imageMetadata); /* always fetch it so that Process knows it's been done */\n \n \tif (status_.totalExposureValue) {\n \t\t/* Process has run, so we have meaningful values. */\n@@ -461,6 +460,8 @@ void Agc::process(StatisticsPtr &stats, Metadata *imageMetadata)\n \t * configuration, that kind of thing.\n \t */\n \thousekeepConfig();\n+\t/* Fetch the AWB status immediately, so that we can assume it's there. */\n+\tfetchAwbStatus(imageMetadata);\n \t/* Get the current exposure values for the frame that's just arrived. */\n \tfetchCurrentExposure(imageMetadata);\n \t/* Compute the total gain we require relative to the current exposure. */\n",
    "prefixes": [
        "libcamera-devel",
        "1/3"
    ]
}