Patch Detail
Show a patch.
GET /api/patches/16604/?format=api
{ "id": 16604, "url": "https://patchwork.libcamera.org/api/patches/16604/?format=api", "web_url": "https://patchwork.libcamera.org/patch/16604/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/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": "<20220713084317.24268-7-dse@thaumatec.com>", "date": "2022-07-13T08:43:12", "name": "[libcamera-devel,v2,06/11] ipa: rkisp1: Pass requests setting AF controls to the AF algorithm", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "3638d38d5d8dfb6ae62f2c96ac00136a51a04b6a", "submitter": { "id": 126, "url": "https://patchwork.libcamera.org/api/people/126/?format=api", "name": "Daniel Semkowicz", "email": "dse@thaumatec.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/16604/mbox/", "series": [ { "id": 3276, "url": "https://patchwork.libcamera.org/api/series/3276/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3276", "date": "2022-07-13T08:43:06", "name": "ipa: rkisp1: Add autofocus algorithm", "version": 2, "mbox": "https://patchwork.libcamera.org/series/3276/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/16604/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/16604/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 1E749BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 13 Jul 2022 08:43:46 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E03E963323;\n\tWed, 13 Jul 2022 10:43:45 +0200 (CEST)", "from mail-wr1-x435.google.com (mail-wr1-x435.google.com\n\t[IPv6:2a00:1450:4864:20::435])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A33B563318\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 13 Jul 2022 10:43:43 +0200 (CEST)", "by mail-wr1-x435.google.com with SMTP id q9so14475108wrd.8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 13 Jul 2022 01:43:43 -0700 (PDT)", "from localhost.localdomain (ip092042140082.rev.nessus.at.\n\t[92.42.140.82]) by smtp.gmail.com with ESMTPSA id\n\tbg32-20020a05600c3ca000b003a04d19dab3sm5667468wmb.3.2022.07.13.01.43.42\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 13 Jul 2022 01:43:43 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1657701825;\n\tbh=8AicMXYKV9hDctL83gvVRZlocz4NCdSpDdvYqi6X+ME=;\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=dklFeEKztKqrOdBJHuRuecmQwQmKdWNueGdmOJUf2p4NEAqqoc07vue+aE6wI4aIf\n\t0ecEJFXpfgMbrVNRParB+V0y8h4BFj0IvFM/4N8MQw08aYkh0LiJ7YxrbfpHidreEi\n\to8oHO4/xw+fwcJAzm4Qj3ysN1LhQmTRDCGPfopfLqOTLZW/xfVBSWo7gGCxcLYxdMC\n\tHVaRxxy457aHWlDqFKCdYsa/zQmAOQK7cCl1D0R2gBekky6WFmmQkk5tZr7plu5Pli\n\t5kVOAwV/jGEk9OzJuQehglqj1bb0zXKsnPq+pkNjf6QFgD3ytHMRghov61Mq0NJkrz\n\tvj/76yMeOfysA==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=thaumatec-com.20210112.gappssmtp.com; s=20210112;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=WLYgX0MOK5dxYWvj13HoLuJzqbo6TzjvgYk9MSezfsA=;\n\tb=Tu2QM8lym7p8bbY1fZl1QbWNKiUPncK9+P5Q1GKAcIIAsnIMs1B5DIyDviN0MuniEP\n\tvgEg0z6pLH2I/BnXftvMGVD3gcRqgOuhi/jBo8R2EMQyfIulXXeL3HmBr0WVf8HwhsBX\n\tho/aJK53aE4Xi7OrXPNwwJYUYOG3+4nvM97GrjFcudRthxz1gqJunjo43jNBu/EDUcQY\n\tzE49KrdM7j1JORXTTT9OqFXUGhf6BtNGM90Gyp+tHrzCXX/CnfK+7inSJ232StK9nBxq\n\thfGnGXCrBZLhNGs9aarsU1bnhxuWGgrQ63pZhqq1Vu6mJNu+jOW8EP8FFEVn+uxXUBtI\n\tSdaQ==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected)\n\theader.d=thaumatec-com.20210112.gappssmtp.com\n\theader.i=@thaumatec-com.20210112.gappssmtp.com header.b=\"Tu2QM8ly\"; \n\tdkim-atps=neutral", "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=WLYgX0MOK5dxYWvj13HoLuJzqbo6TzjvgYk9MSezfsA=;\n\tb=3Yc5zqNVhrRWDVCPvCqkoFWU9TFAukcygFYFKhIZwDiTDqDX1qKvcLYoGBYdlyGbp7\n\t4C8O2JMj/ONwH/IUULqDiyh7/oAjK3Kxw8YdxWRo3n5vTk1FFMOEAtKN7RfiVOBy1nLY\n\tNAwqSe2JCcEF3z68dc+cJCp8pJblv4uYcBuUFf1DXxKdrMgfPl70LAf46nDaD9fSUgs3\n\tum3bLvOo4hedlEVhC6YM/2tXTqbZfl5vcH+WeFCkkBJvLNhJj1t/uWWqk0Zd954ibfT4\n\tgyDaVJShB0ooWknDGLeeTO1BW14WSJU+ycXAKtTxZ5Q+YibsmWet5KiSypFZrFaKCi66\n\tvInw==", "X-Gm-Message-State": "AJIora8xuSgl/jX6i3jDUrqgcb81/s032pYEAL0OeFD1Pp1BYnvMG+7b\n\toX44LiU7TX+Z5R/PVeec446Fl6Tm5mSFFw==", "X-Google-Smtp-Source": "AGRyM1teV2f4ICFHFEN5c8mXZ4BHPjYXCTYkO76ISZ3YHD5sQpTe8NBe0Mp8bEAMuOUf62RsHvihkQ==", "X-Received": "by 2002:a5d:5984:0:b0:21d:7f3a:a153 with SMTP id\n\tn4-20020a5d5984000000b0021d7f3aa153mr2022311wri.568.1657701823480; \n\tWed, 13 Jul 2022 01:43:43 -0700 (PDT)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Wed, 13 Jul 2022 10:43:12 +0200", "Message-Id": "<20220713084317.24268-7-dse@thaumatec.com>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20220713084317.24268-1-dse@thaumatec.com>", "References": "<20220713084317.24268-1-dse@thaumatec.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v2 06/11] ipa: rkisp1: Pass requests\n\tsetting AF controls to the AF algorithm", "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": "Daniel Semkowicz via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>", "Reply-To": "Daniel Semkowicz <dse@thaumatec.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Pass the controls set by top level API to the AF algorithm if it\nwas enabled.\n\nSigned-off-by: Daniel Semkowicz <dse@thaumatec.com>\n---\n src/ipa/rkisp1/rkisp1.cpp | 52 +++++++++++++++++++++++++++++++++++++--\n 1 file changed, 50 insertions(+), 2 deletions(-)", "diff": "diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\nindex 01bb54fb..53b53f12 100644\n--- a/src/ipa/rkisp1/rkisp1.cpp\n+++ b/src/ipa/rkisp1/rkisp1.cpp\n@@ -28,6 +28,7 @@\n #include \"libcamera/internal/mapped_framebuffer.h\"\n #include \"libcamera/internal/yaml_parser.h\"\n \n+#include \"algorithms/af.h\"\n #include \"algorithms/agc.h\"\n #include \"algorithms/algorithm.h\"\n #include \"algorithms/awb.h\"\n@@ -295,9 +296,56 @@ void IPARkISP1::unmapBuffers(const std::vector<unsigned int> &ids)\n }\n \n void IPARkISP1::queueRequest([[maybe_unused]] const uint32_t frame,\n-\t\t\t [[maybe_unused]] const ControlList &controls)\n+\t\t\t const ControlList &controls)\n {\n-\t/* \\todo Start processing for 'frame' based on 'controls'. */\n+\tusing namespace algorithms;\n+\n+\tfor (auto const &ctrl : controls) {\n+\t\tunsigned int ctrlEnum = ctrl.first;\n+\t\tconst ControlValue &ctrlValue = ctrl.second;\n+\n+\t\tLOG(IPARkISP1, Debug) << \"Request ctrl: \"\n+\t\t\t\t << controls::controls.at(ctrlEnum)->name()\n+\t\t\t\t << \" = \" << ctrlValue.toString();\n+\n+\t\tswitch (ctrlEnum) {\n+\t\tcase controls::AF_MODE: {\n+\t\t\tAf *af = getAlgorithm<Af>();\n+\t\t\tif (!af) {\n+\t\t\t\tLOG(IPARkISP1, Warning) << \"Could not set AF_MODE - no AF algorithm\";\n+\t\t\t\tbreak;\n+\t\t\t}\n+\n+\t\t\taf->setMode(static_cast<controls::AfModeEnum>(ctrlValue.get<int32_t>()));\n+\t\t\tbreak;\n+\t\t}\n+\t\tcase controls::AF_TRIGGER: {\n+\t\t\tAf *af = getAlgorithm<Af>();\n+\t\t\tif (!af) {\n+\t\t\t\tLOG(IPARkISP1, Warning) << \"Could not set AF_TRIGGER - no AF algorithm\";\n+\t\t\t\tbreak;\n+\t\t\t}\n+\n+\t\t\taf->setTrigger(static_cast<controls::AfTriggerEnum>(ctrlValue.get<int32_t>()));\n+\t\t\tbreak;\n+\t\t}\n+\t\tcase controls::AF_PAUSE: {\n+\t\t\tAf *af = getAlgorithm<Af>();\n+\t\t\tif (!af) {\n+\t\t\t\tLOG(IPARkISP1, Warning) << \"Could not set AF_TRIGGER - no AF algorithm\";\n+\t\t\t\tbreak;\n+\t\t\t}\n+\n+\t\t\taf->setPause(static_cast<controls::AfPauseEnum>(ctrlValue.get<int32_t>()));\n+\t\t\tbreak;\n+\t\t}\n+\t\tdefault:\n+\t\t\tLOG(IPARkISP1, Warning)\n+\t\t\t\t<< \"Ctrl \" << controls::controls.at(ctrlEnum)->name()\n+\t\t\t\t<< \" is not handled.\";\n+\t\t\tbreak;\n+\t\t}\n+\t}\n }\n \n void IPARkISP1::fillParamsBuffer(const uint32_t frame, const uint32_t bufferId)\n", "prefixes": [ "libcamera-devel", "v2", "06/11" ] }