{"id":18508,"url":"https://patchwork.libcamera.org/api/covers/18508/?format=json","web_url":"https://patchwork.libcamera.org/cover/18508/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/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":"<20230331081930.19289-1-dse@thaumatec.com>","date":"2023-03-31T08:19:20","name":"[libcamera-devel,v6,00/10] ipa: rkisp1: Add autofocus algorithm","submitter":{"id":126,"url":"https://patchwork.libcamera.org/api/people/126/?format=json","name":"Daniel Semkowicz","email":"dse@thaumatec.com"},"mbox":"https://patchwork.libcamera.org/cover/18508/mbox/","series":[{"id":3831,"url":"https://patchwork.libcamera.org/api/series/3831/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3831","date":"2023-03-31T08:19:21","name":"ipa: rkisp1: Add autofocus algorithm","version":6,"mbox":"https://patchwork.libcamera.org/series/3831/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/18508/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 ABF5BC329C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 31 Mar 2023 08:19:53 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 010A662756;\n\tFri, 31 Mar 2023 10:19:52 +0200 (CEST)","from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com\n\t[IPv6:2a00:1450:4864:20::12f])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 043CE61ECB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 31 Mar 2023 10:19:48 +0200 (CEST)","by mail-lf1-x12f.google.com with SMTP id g19so14771055lfr.9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 31 Mar 2023 01:19:47 -0700 (PDT)","from localhost.localdomain ([91.90.166.178])\n\tby smtp.gmail.com with ESMTPSA id\n\tt1-20020ac24c01000000b004e84a8c3d86sm281459lfq.42.2023.03.31.01.19.46\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 31 Mar 2023 01:19:46 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1680250793;\n\tbh=qu3WqscAGEA8x3Eue5ZsJHxdhKOiF3mX4z9hhAtIJcE=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:From;\n\tb=23qrss6IB7pPEmwcBKdyb1ISYHKPZAqjAIIe3pDo52R5Ejf41UbABjLGbIdxCpbfq\n\tf9FFJ60W+wrHul2mw/RNS7i36IPgE31JDhjoDZOuoH815upvW273HB4+voowHf3Kf7\n\ttWgeaIDgLzFuwMSszzrWKUJ1lvZcdeLQhPzU8ObTFUcIHUEm0YPnQH80+dU7J9+LvE\n\t6lRAXcJPVIOHLcdcjce30okOBgKAsBOsGvJDidZf1W5TQKczQzWOpdQwNFJa9jQagT\n\tVAV6YvwMxHJQHf9b8ufeDyJFTZbb/RiWu79W1Jbp+Tm/pmmniRDFTMhJ72HqHa8sLg\n\t5rwiFZTvy94zg==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=thaumatec-com.20210112.gappssmtp.com; s=20210112; t=1680250787;\n\tx=1682842787; \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=5gQdqnNIe5J7HwQ8RinSnUJvXkshjJSln7wU6DfWjWc=;\n\tb=2NR3qQyqYdOsKx6lkKsDlRBAMatAE89BvZ4I1OMuTsFePJ5xo0GQj31ftizzUgSHzJ\n\tfIrl+zIt5PZktOW2HU305jMyVvFrQC9Cgqvl4eLbYGtzMRgY4iQu6p7XYApJpyU7riBT\n\tj97JnUBghroYr/eKMnpXGISR6R421DWd89gI5yy+7tnsm1t5oc0Lt4e1HmK311iKz+NE\n\tVRp3k9kHuJyA/szPRuwUJaDJ3WjoRA9XX56x8hUuzuxok7ZQ7YGlGyIzlIJb9eZnaTRe\n\tdY4zaLacoEf/DtATz9/BwTg38oO2kMKeGKxCsipnSP/mpsCImEngRkOEqh4zxFD49+9x\n\t8c9w=="],"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=\"2NR3qQyq\"; \n\tdkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112; t=1680250787; x=1682842787;\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=5gQdqnNIe5J7HwQ8RinSnUJvXkshjJSln7wU6DfWjWc=;\n\tb=uZhzFnCTPtk7OCbQVRnYgz0P7LSuU2iVTOa6SB+D7H7hs+eIczWC7t8snH0KlfaThk\n\tH7Fdeex7zi8sbtIwRWpO5b5EZOilkPbR/aWyyAYpzyUdCnBOV9zKKiLQtnmRhQ5qN05m\n\tIWELCQkdatcrrcHL3vVdiPz94D2IfyM5KX5o0nm6rLJFT/WU5q0CHj11SMkSDqNbNCmg\n\tkhH6rrY8/RtdM6MEFogKaTYp7lOuh2d269jWReAmapAlOe2w4t7b3LhBy3dEzNwR63RF\n\tzilwmZgZIlym71Vbfj+ItX+PPmmU4MPK7uppLeFn2VOT5b65swN95uBuAUKi96vqCJ9z\n\tbEbg==","X-Gm-Message-State":"AAQBX9eCpGouV0dzvdkfUeUt1xh+yvzW9BBb5ySKYUOjWq7Fllg1GzPB\n\t6DyGi5bDiy4uu5Cf1jidv3r7u/qqqto7cJ58zGJCxA==","X-Google-Smtp-Source":"AKy350ZJz8fBye4B/CAMiwoRTKhXgvjGLYL1skoSxUuFWs8mcBbTPvH5pwuSi/Hr5hcZ8QfCQtv2nA==","X-Received":"by 2002:a05:6512:6f:b0:4dd:9f4d:7459 with SMTP id\n\ti15-20020a056512006f00b004dd9f4d7459mr8167061lfo.67.1680250787108; \n\tFri, 31 Mar 2023 01:19:47 -0700 (PDT)","To":"libcamera-devel@lists.libcamera.org","Date":"Fri, 31 Mar 2023 10:19:20 +0200","Message-Id":"<20230331081930.19289-1-dse@thaumatec.com>","X-Mailer":"git-send-email 2.39.2","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v6 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>","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 v6:\n- Pass lens controls to IPA in init() instead of configure()\n- Make IPASessionConfiguration::lens optional and set the values\n  only if lens was detected\n- Add AF controls in IPARkISP1::updateControls() only if lens\n  was detected\n- Replace __FUNCTION__ with inline text\n- Change if..else to switch() in requested places\n- Remove final specifiers from AfHillClimbing functions\n- Rename AfHillClimbing::setFramesToSkip() to skipFrames()\n\nBest regards\nDaniel Semkowicz\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            |   4 +-\n src/ipa/libipa/algorithms/af.cpp              | 159 +++++++\n src/ipa/libipa/algorithms/af.h                |  46 ++\n .../libipa/algorithms/af_hill_climbing.cpp    | 424 ++++++++++++++++++\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              | 183 ++++++++\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                |  30 ++\n src/ipa/rkisp1/ipa_context.h                  |  14 +\n src/ipa/rkisp1/rkisp1.cpp                     |  58 +++\n src/libcamera/pipeline/rkisp1/rkisp1.cpp      |  22 +-\n 16 files changed, 1130 insertions(+), 2 deletions(-)\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"}