Patch Detail
Show a patch.
GET /api/patches/16599/?format=api
{ "id": 16599, "url": "https://patchwork.libcamera.org/api/patches/16599/?format=api", "web_url": "https://patchwork.libcamera.org/patch/16599/", "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-2-dse@thaumatec.com>", "date": "2022-07-13T08:43:07", "name": "[libcamera-devel,v2,01/11] ipa: Add base class defining AF algorithm interface", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "0ed23db5c7677d919edd911daceac4ba56849dd8", "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/16599/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/16599/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/16599/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 1EAACBD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 13 Jul 2022 08:43:35 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C007D63316;\n\tWed, 13 Jul 2022 10:43:34 +0200 (CEST)", "from mail-wr1-x429.google.com (mail-wr1-x429.google.com\n\t[IPv6:2a00:1450:4864:20::429])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A85E26330F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 13 Jul 2022 10:43:31 +0200 (CEST)", "by mail-wr1-x429.google.com with SMTP id r10so8317737wrv.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 13 Jul 2022 01:43:31 -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.30\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 13 Jul 2022 01:43:30 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1657701814;\n\tbh=Z6UIHygHBeusnTkcZzxnyW6sRJdbI//0YB+aVUn9bIc=;\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=XzSkzyvpLBj7ojBmwo1vnRmzY+PIgOqA+PcnVyo7HYBeajv0fIg3qxb6nmtmvKW4u\n\t4cmTW70chUiRzw1LvdV4OPRQUDa3R2/zrWgeTNGh5gmJ7ZVN13zx9On4R0n5ylDPX1\n\t1FC1s34P0bApo1WifW08vI7KbOvQJJNQL/rmRFQ9+fOqkGv/gWNbFxTUKZ/sFHccLT\n\tyUENodR/EPlHMNpQMu014zZr0DnRa1h4ddV09dWhr2FF5FnPPU73Njl0osNCCj+psy\n\tvnu+NF4M4LOPXSVP0fIt22he+5YMJI/LEdC11oMFPfGTeVSvNfscziAndJ8y3C//Np\n\tYodm1yr7RoJLw==", "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=rBAG5bRUFgIM+iLZJ9vSxX+TnEQEJKU6Yr47fYtwcvc=;\n\tb=Io0YScVotfbPuNL7+h3sy4cBhkEouAHEp6ObhC5H70jmxb48yY7baebtf6Z7srKx1A\n\tuKy3Y4OaneLBDro1gcih14FtfAcI998ogqWzp4c3sbyO/aV3EoWy+1Wtsjxhwf9ddXgC\n\tKM7ebJMoQwuYHVAIaWgmak7Vyr3PqeK/crxywFcSbhZiObIDUJ+udxLjez9loU8f/UY2\n\t9YZN4SX4ADOud/JPesB/zNLgnIhMv962LV/Y7a8Y6qUqY7Uc7CmlbECbpsIqH9g07iTz\n\t4XD7N2112VJS28GfgFQt9cCYpftrd0ofAJiECqrMHc8PnTU6zhXxnCJ7thY7mqxydddd\n\taDFw==" ], "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=\"Io0YScVo\"; \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=rBAG5bRUFgIM+iLZJ9vSxX+TnEQEJKU6Yr47fYtwcvc=;\n\tb=Qr2hDNimUlLELg/ZHE0egYmj8PACswloIJHSXDSEUbC3KoSGNZh21LQ5MZ0jUP89N0\n\tEu5Fln/EpuMQh5bHnn8rnqNJ5xZkIEu97/Qb1JLHFAqu85ArLwLX1KrGaNXC/1eufas2\n\tP6ZqKSxUx/ORrLwk226yDKsSnfW1bczm7vl7LUsid3/fHCTb5oJH2+atcl7GunnaWUsA\n\tj04Gaknvp7XbOBatyWoz4deEoYFDJjRVGVx3EwIMS//OL0DwLrNZBocpYqL9Ww48vQtZ\n\toHJFr+yxE0+v/5cz+Gh0jTwKHiuEqJcWkMEAHnm9xefpKLmq71mQfQSNkNCWKTKbfDqc\n\to6EQ==", "X-Gm-Message-State": "AJIora86FYSwjEuQ1eB4gzU2U8igIDx5yo3UsDhGlitLSnNNCsTQnj1D\n\tS9gMJtCcSZg+4RqkZf0KvrDKywrOHaS9gg==", "X-Google-Smtp-Source": "AGRyM1uZ7KAb+4IFsd1hKhYMEpE6/EWY9RwObZ/KihdSWM8XA2A/w56fHVb4OQ7CU8vjZys2LXveKw==", "X-Received": "by 2002:adf:f9ce:0:b0:21d:68b7:e7af with SMTP id\n\tw14-20020adff9ce000000b0021d68b7e7afmr2065190wrr.236.1657701811409; \n\tWed, 13 Jul 2022 01:43:31 -0700 (PDT)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Wed, 13 Jul 2022 10:43:07 +0200", "Message-Id": "<20220713084317.24268-2-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 01/11] ipa: Add base class defining AF\n\talgorithm interface", "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": "Define common interface with basic functions that should be supported\nby Auto Focus algorithms.\n\nSigned-off-by: Daniel Semkowicz <dse@thaumatec.com>\n---\n src/ipa/libipa/algorithms/af_algorithm.cpp | 78 ++++++++++++++++++++++\n src/ipa/libipa/algorithms/af_algorithm.h | 41 ++++++++++++\n src/ipa/libipa/algorithms/meson.build | 9 +++\n src/ipa/libipa/meson.build | 6 ++\n 4 files changed, 134 insertions(+)\n create mode 100644 src/ipa/libipa/algorithms/af_algorithm.cpp\n create mode 100644 src/ipa/libipa/algorithms/af_algorithm.h\n create mode 100644 src/ipa/libipa/algorithms/meson.build", "diff": "diff --git a/src/ipa/libipa/algorithms/af_algorithm.cpp b/src/ipa/libipa/algorithms/af_algorithm.cpp\nnew file mode 100644\nindex 00000000..47e54d5a\n--- /dev/null\n+++ b/src/ipa/libipa/algorithms/af_algorithm.cpp\n@@ -0,0 +1,78 @@\n+/* SPDX-License-Identifier: BSD-2-Clause */\n+/*\n+ * Copyright (C) 2022, Raspberry Pi (Trading) Limited\n+ * Copyright (C) 2022, Theobroma Systems\n+ *\n+ * af_algorithm.cpp - Autofocus control algorithm interface\n+ */\n+\n+#include \"af_algorithm.h\"\n+\n+/**\n+ * \\file af_algorithm.h\n+ * \\brief AF algorithm common interface\n+ */\n+\n+namespace libcamera::ipa::common::algorithms {\n+\n+/**\n+ * \\class AfAlgorithm\n+ * \\brief Common interface for auto-focus algorithms\n+ * \\tparam Module The IPA module type for this class of algorithms\n+ *\n+ * The AfAlgorithm class defines a standard interface for IPA auto focus\n+ * algorithms.\n+ */\n+\n+/**\n+ * \\fn AfAlgorithm::setMode()\n+ * \\brief Set auto focus mode\n+ * \\param[in] mode AF mode\n+ */\n+\n+/**\n+ * \\fn AfAlgorithm::setRange()\n+ * \\brief set the range of focus distances that is scanned\n+ * \\param[in] range AF range\n+ */\n+\n+/**\n+ * \\fn AfAlgorithm::setSpeed()\n+ * \\brief Set how fast algorithm should move the lens\n+ * \\param[in] speed Lens move speed\n+ */\n+\n+/**\n+ * \\fn AfAlgorithm::setMetering()\n+ * \\brief Set AF metering mode\n+ * \\param[in] metering AF metering mode\n+ */\n+\n+/**\n+ * \\fn AfAlgorithm::setWindows()\n+ * \\brief Set AF windows\n+ * \\param[in] windows AF windows\n+ *\n+ * Sets the focus windows used by the AF algorithm when AfMetering is set\n+ * to AfMeteringWindows.\n+ */\n+\n+/**\n+ * \\fn AfAlgorithm::setTrigger()\n+ * \\brief Starts or cancels the autofocus scan\n+ * \\param[in] trigger Trigger mode\n+ */\n+\n+/**\n+ * \\fn AfAlgorithm::setPause()\n+ * \\brief Pause the autofocus while in AfModeContinuous mode.\n+ * \\param[in] pause Pause mode\n+ */\n+\n+/**\n+ * \\fn AfAlgorithm::setLensPosition()\n+ * \\brief Set the lens position while in AfModeManual\n+ * \\param[in] lensPosition Lens position\n+ */\n+\n+} /* namespace libcamera::ipa::common::algorithms */\ndiff --git a/src/ipa/libipa/algorithms/af_algorithm.h b/src/ipa/libipa/algorithms/af_algorithm.h\nnew file mode 100644\nindex 00000000..2862042b\n--- /dev/null\n+++ b/src/ipa/libipa/algorithms/af_algorithm.h\n@@ -0,0 +1,41 @@\n+/* SPDX-License-Identifier: BSD-2-Clause */\n+/*\n+ * Copyright (C) 2022, Raspberry Pi (Trading) Limited\n+ * Copyright (C) 2022, Theobroma Systems\n+ *\n+ * af_algorithm.h - Autofocus control algorithm interface\n+ */\n+#pragma once\n+\n+#include <libcamera/control_ids.h>\n+\n+#include \"../algorithm.h\"\n+\n+namespace libcamera::ipa::common::algorithms {\n+\n+template<typename Module>\n+class AfAlgorithm : public Algorithm<Module>\n+{\n+public:\n+\tAfAlgorithm() = default;\n+\n+\tvirtual ~AfAlgorithm() {}\n+\n+\tvirtual void setMode(controls::AfModeEnum mode) = 0;\n+\n+\tvirtual void setRange(controls::AfRangeEnum range) = 0;\n+\n+\tvirtual void setSpeed(controls::AfSpeedEnum speed) = 0;\n+\n+\tvirtual void setMetering(controls::AfMeteringEnum metering) = 0;\n+\n+\tvirtual void setWindows(Span<const Rectangle> windows) = 0;\n+\n+\tvirtual void setTrigger(controls::AfTriggerEnum trigger) = 0;\n+\n+\tvirtual void setPause(controls::AfPauseEnum pause) = 0;\n+\n+\tvirtual void setLensPosition(float lensPosition) = 0;\n+};\n+\n+} /* namespace libcamera::ipa::common::algorithms */\ndiff --git a/src/ipa/libipa/algorithms/meson.build b/src/ipa/libipa/algorithms/meson.build\nnew file mode 100644\nindex 00000000..ab8da13a\n--- /dev/null\n+++ b/src/ipa/libipa/algorithms/meson.build\n@@ -0,0 +1,9 @@\n+# SPDX-License-Identifier: CC0-1.0\n+\n+common_ipa_algorithms_headers = files([\n+ 'af_algorithm.h',\n+])\n+\n+common_ipa_algorithms_sources = files([\n+ 'af_algorithm.cpp',\n+])\ndiff --git a/src/ipa/libipa/meson.build b/src/ipa/libipa/meson.build\nindex fb894bc6..1fc3fd56 100644\n--- a/src/ipa/libipa/meson.build\n+++ b/src/ipa/libipa/meson.build\n@@ -1,5 +1,7 @@\n # SPDX-License-Identifier: CC0-1.0\n \n+subdir('algorithms')\n+\n libipa_headers = files([\n 'algorithm.h',\n 'camera_sensor_helper.h',\n@@ -7,6 +9,8 @@ libipa_headers = files([\n 'module.h',\n ])\n \n+libipa_headers += common_ipa_algorithms_headers\n+\n libipa_sources = files([\n 'algorithm.cpp',\n 'camera_sensor_helper.cpp',\n@@ -14,6 +18,8 @@ libipa_sources = files([\n 'module.cpp',\n ])\n \n+libipa_sources += common_ipa_algorithms_sources\n+\n libipa_includes = include_directories('..')\n \n libipa = static_library('ipa', [libipa_sources, libipa_headers],\n", "prefixes": [ "libcamera-devel", "v2", "01/11" ] }