{"id":18443,"url":"https://patchwork.libcamera.org/api/1.1/covers/18443/?format=json","web_url":"https://patchwork.libcamera.org/cover/18443/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20230324142908.64224-1-dse@thaumatec.com>","date":"2023-03-24T14:28:58","name":"[libcamera-devel,v5,00/10] ipa: rkisp1: Add autofocus algorithm","submitter":{"id":126,"url":"https://patchwork.libcamera.org/api/1.1/people/126/?format=json","name":"Daniel Semkowicz","email":"dse@thaumatec.com"},"mbox":"https://patchwork.libcamera.org/cover/18443/mbox/","series":[{"id":3813,"url":"https://patchwork.libcamera.org/api/1.1/series/3813/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3813","date":"2023-03-24T14:28:58","name":"ipa: rkisp1: Add autofocus algorithm","version":5,"mbox":"https://patchwork.libcamera.org/series/3813/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/18443/comments/","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 8DA24C0F2A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 24 Mar 2023 14:29:27 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CDEC262711;\n\tFri, 24 Mar 2023 15:29:26 +0100 (CET)","from mail-lj1-x234.google.com (mail-lj1-x234.google.com\n\t[IPv6:2a00:1450:4864:20::234])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 37AE261ECF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 24 Mar 2023 15:29:25 +0100 (CET)","by mail-lj1-x234.google.com with SMTP id x20so1898627ljq.9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 24 Mar 2023 07:29:25 -0700 (PDT)","from localhost.localdomain ([91.90.166.178])\n\tby smtp.gmail.com with ESMTPSA id\n\tj21-20020a2e8515000000b002a10b2ea089sm981714lji.16.2023.03.24.07.29.23\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 24 Mar 2023 07:29:23 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1679668166;\n\tbh=01tRbLHWCPl0sLDF77eNH/RnW2NKrPigNlq1E61mMR0=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:Cc:From;\n\tb=SZKZ7DwkSqpYm0Y0SfaTbUI74LVrK6zx0lY0igv9xp3ZLGdx+BL7HZKZh4r2aoD22\n\t1BORSEEiI1dB5ClnBYHtNbqBYEdLieequNXVgbljY8HZmbHi2CFktmDjL1erLdnIIP\n\tJeSUG0PbSv20OEFP4o9ZcVUueQoYfurmxKyn4hVKkvpFe9RDgw2EkpzOzz8q4GIKof\n\tTN/IPkk6jo3P+tAJ+/Pp/ifLkYCkMB8oUbVMRKH0Ld+RSlxsDecU570SDs+JR45lz+\n\t2hHVlP81ZIg87cSda/op8ndu/IHSqEdWl+GqldsVhZEpGDF9CVWfeXze1OAU5Y8EgP\n\tkTx6q5ha+719w==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=thaumatec-com.20210112.gappssmtp.com; s=20210112; t=1679668164;\n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:from:to:cc:subject:date:message-id:reply-to;\n\tbh=DRcR9kxvFPodrS9nN+D9pr9tkWVi5EotvdBbbiybXc0=;\n\tb=brizhEejqo6G+Q5HMufS4EyzGPh7sacL3i9VbZ8j8TPIMkshCmc+azqfBU1/kdR39x\n\t5uxuu5eIPeZiYsqewlgOM6/qkIHTmMYS5cDaWeVqypx/vgUo0vsgnuoYKYIttLiHx064\n\tRRKNFd2zoXfCuuu/y7E22xBjJDnicayMgl17aY0fMwIusn9eIQK2W6+nu6HTHnQEriva\n\tlp6pp7RZ4RP9LDSC2LF0B6bg8tBJlhA+Y+0C53iaq4djjAdFmKPRvi4nVeYvD23s9v2y\n\t17yO6mqxp/RwRaKLiEr85bx/A3sRAwkXArAN6jLVkXNbzwsIZSvrdPZGwD9t/XtNfpPN\n\tIJfQ=="],"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=\"brizhEej\"; \n\tdkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112; t=1679668164;\n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=DRcR9kxvFPodrS9nN+D9pr9tkWVi5EotvdBbbiybXc0=;\n\tb=ZnPBKNm8/lrug8UWOvNdbudJvxTXQoBRhcTBjmPn0X2NQJfplLtBIzgahZcR2qeRsg\n\tsGdaFPsJxqycvUIuwFrIJeFNyQ9YPi/NcQIML5N5Jr8/jgZoCq3S/EzaEuva0ojIEz6g\n\tAD2kbPax0Q9BonLMleDfSp1KSCBaoplp+vy/06Ooa8qL2FQJHjCDspKzFZlL8H+6tmL4\n\tiFNOwwXwHNt0J23WPOTatOV2Cmi6uin00ERKxx4JOGBB3u5VN/5c7zz5CX9+xxpBoPGU\n\tHfKL0zQb1iRBPG6zGwh8AfKHW7lPVuFlNftrk8uAeoU7zLnFmLzJn5q0A/eifZ+AlGNA\n\tECAg==","X-Gm-Message-State":"AAQBX9dmzaz3C2ZPqVVYGIwo8SB0uKav9B6JhL3R67T1HYa00eSRp/eh\n\tBI51lpIiLot3ci2sb+OHRmBRZiszAerOzDuTWcA=","X-Google-Smtp-Source":"AKy350Y/5ROn2Eugzh7qC+C5o8EJV+NRCxy+CJsYtmtmSdhiyBXXZvQKP1hiEGllATmhtCoPg4Ibzw==","X-Received":"by 2002:a2e:a418:0:b0:298:9e7b:d07b with SMTP id\n\tp24-20020a2ea418000000b002989e7bd07bmr940922ljn.30.1679668164243; \n\tFri, 24 Mar 2023 07:29:24 -0700 (PDT)","To":"libcamera-devel@lists.libcamera.org","Date":"Fri, 24 Mar 2023 15:28:58 +0100","Message-Id":"<20230324142908.64224-1-dse@thaumatec.com>","X-Mailer":"git-send-email 2.39.2","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v5 00/10] ipa: rkisp1: Add autofocus\n\talgorithm","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>","Cc":"jacopo.mondi@ideasonboard.com","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"This is the updated version of the common contrast based Auto Focus\nalgorithm implementation and it's usage for RkISP1 AF implementation.\n\nMain changes in v5:\n- Improve documentation\n- Fix language errors in the documentation\n- Remove default branches in some of the switch cases\n- Remove unused fineCompleted_ and previousContrast_ variables\n  in AfHillClimbing\n- Fix incorrect multiline comments indention\n- Add \"to do\" lists to the AfHillClimbing and rkisp1::Af\n- Add static_cast in additional places pointed by clang-tidy\n- Change \"fine-search-range\" tuning parameter to be expressed\n  in percents\n- Connect setLensControls() slot in PH, only if lens is available\n- Rework setLensControls() to iterate through the control list, instead\n  of calling contains() and get().\n\nDaniel Semkowicz (10):\n  rkisp1: Add camera lens to PH and expose it to the IPA\n  ipa: rkisp1: Add lens limits to the session config\n  ipa: Add base class defining AF algorithm interface\n  ipa: Add common contrast based AF implementation\n  ipa: af_hill_climbing: Add \"Windows\" metering mode\n  ipa: rkisp1: Add AF algorithm based on AfHillClimbing\n  ipa: rkisp1: af: Add \"Windows\" Metering mode\n  ipa: rkisp1: Add AF controls to the RkISP1 IPA\n  rkisp1: Control camera lens position from IPA\n  ipa: rkisp1: Add OV5675 tuning file\n\n include/libcamera/ipa/rkisp1.mojom            |   2 +\n src/ipa/libipa/algorithms/af.cpp              | 159 +++++++\n src/ipa/libipa/algorithms/af.h                |  45 ++\n .../libipa/algorithms/af_hill_climbing.cpp    | 418 ++++++++++++++++++\n src/ipa/libipa/algorithms/af_hill_climbing.h  | 101 +++++\n src/ipa/libipa/algorithms/meson.build         |  11 +\n src/ipa/libipa/meson.build                    |   6 +\n src/ipa/rkisp1/algorithms/af.cpp              | 179 ++++++++\n src/ipa/rkisp1/algorithms/af.h                |  54 +++\n src/ipa/rkisp1/algorithms/meson.build         |   1 +\n src/ipa/rkisp1/data/meson.build               |   1 +\n src/ipa/rkisp1/data/ov5675.yaml               |  18 +\n src/ipa/rkisp1/ipa_context.cpp                |  25 ++\n src/ipa/rkisp1/ipa_context.h                  |  10 +\n src/ipa/rkisp1/rkisp1.cpp                     |  30 ++\n src/libcamera/pipeline/rkisp1/rkisp1.cpp      |  18 +\n 16 files changed, 1078 insertions(+)\n create mode 100644 src/ipa/libipa/algorithms/af.cpp\n create mode 100644 src/ipa/libipa/algorithms/af.h\n create mode 100644 src/ipa/libipa/algorithms/af_hill_climbing.cpp\n create mode 100644 src/ipa/libipa/algorithms/af_hill_climbing.h\n create mode 100644 src/ipa/libipa/algorithms/meson.build\n create mode 100644 src/ipa/rkisp1/algorithms/af.cpp\n create mode 100644 src/ipa/rkisp1/algorithms/af.h\n create mode 100644 src/ipa/rkisp1/data/ov5675.yaml"}