From patchwork Thu Jan 19 08:41:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Semkowicz X-Patchwork-Id: 18139 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id E37C7C3240 for ; Thu, 19 Jan 2023 08:41:54 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 3DF60625E4; Thu, 19 Jan 2023 09:41:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1674117714; bh=Deov6M1AAckK3qwXSizE8AZ7zPpvUeojeIRPTDTJMCU=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=qP0QvEVhIKx8Dsrg+Gz3Lw8oyo0RKZw7Eg8/+Rtdjd9HmnowO3EtH4DDs5f2/jBza 2EIvU0RMXCGEuGMYbpu4lhxKWAwirUKzy4ec1weF/nZqJSOPei8WTgxf+ZbkUoCBn0 HBIdcjUlWN3UX8olDa0KfMdjyYjz7tJKBUjLgmHQz6G7peqzwTaklMFH2UA7bnjip0 nOAQJkEvOWiNb/wuHt50DzXaGmM8pudcVJRt/BdRZ0LfnPNZryTP6bucQCm7WC6NRF w3uXySf5z1V1wZayArCgR37MBNHl7qvuaDpMypZ11jXMSMn3KhDkMpX06uLQLgwG0g PDCKRt3cVYaGA== Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id D30FE61EFC for ; Thu, 19 Jan 2023 09:41:51 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=thaumatec-com.20210112.gappssmtp.com header.i=@thaumatec-com.20210112.gappssmtp.com header.b="LPdhLwRd"; dkim-atps=neutral Received: by mail-wm1-x32f.google.com with SMTP id l8so902638wms.3 for ; Thu, 19 Jan 2023 00:41:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thaumatec-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=kyBKdZp2KZn3IjyFSnfJMpizFo1eFce2SxOLkd/aUOs=; b=LPdhLwRdlimVOWcAcWZKdzwRuVQivDv7J7b/JWTpji1yguN+/Ynya+hUQNDQXID8+H xIRvM9E95+MC8Y5SHpWqRbyxn6N2eVK2oAQqLiXeCO7BkUBCjZMbuT4kY1SRMRqGxUCJ wlymGHUHQ5m5G/dDI5wKaoeMDo54rkNowvTc3mBAZc5eVWWlpRg5a/FhjAELsbOomBl5 sUbWX0mQhpzBHz6iPmE3HUmY+pUUu4olhSsvB26Dmxcl0gcxHgLe33arPu0MIapnsGnw EPAgHvi3oUQnCz2KRfTToqWKHPq9pxyoPFLxTPUIIVTIRlJW775jevhSQqhiI4DNc9fi bMzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=kyBKdZp2KZn3IjyFSnfJMpizFo1eFce2SxOLkd/aUOs=; b=kWHHA2S7XCtduXR+BoW9IB7A5hVbWaEVfMM8hAIR5qJU2s1niaGR1blMDhC7tw0DAF o+9vvHOjTlqyZCQVqPllnCqqT1Z7s+NcFfoizfNazjU5ssaJNIwfrjr9GT5uhjOjFA6q W0lR6YddlTVLhCW3LemFi63l/aEUjXRRbxepevwtZZa/C7IQDUi+uZxsPGVCZvubtHRk NT8atiwQuPzP6S3zxdjxulF/3Bnln3slGqaHk2amkVRZn7ZMo4Rr5H3szVPKArk1s9Rw W6VA0uXENUh+HLZtQoTl00pIpUee3WdYBInNC4JWUxTMrAbn30H+nshkx8xXQXRzyJ7A PKaA== X-Gm-Message-State: AFqh2kqmuS4q76/ex87xoMKi700js58EpuZvbVYRqK1QmFJPR0sogxzI KnODBgSWgL62Bfbum2oCKfSbkTOBR+QbzXJ+54c= X-Google-Smtp-Source: AMrXdXthlcIhzX8f0RMnx8FTTEf4lH15VqzX2MNWNYPVl/HXYpLyzqxejpJlX0eyLuPSJDcr/5XGcA== X-Received: by 2002:a05:600c:1d85:b0:3db:1bc5:bbe7 with SMTP id p5-20020a05600c1d8500b003db1bc5bbe7mr2990657wms.0.1674117711400; Thu, 19 Jan 2023 00:41:51 -0800 (PST) Received: from localhost.localdomain (ip092042140082.rev.nessus.at. [92.42.140.82]) by smtp.gmail.com with ESMTPSA id j10-20020a05600c074a00b003db0ee277b2sm3935754wmn.5.2023.01.19.00.41.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Jan 2023 00:41:50 -0800 (PST) To: libcamera-devel@lists.libcamera.org Date: Thu, 19 Jan 2023 09:41:04 +0100 Message-Id: <20230119084112.20564-1-dse@thaumatec.com> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 0/8] ipa: rkisp1: Add autofocus algorithm X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Daniel Semkowicz via libcamera-devel From: Daniel Semkowicz Reply-To: Daniel Semkowicz Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hi! This is a patch series with a common AF algorithm implementation basing on the IPU3 AF version. The common part was then used to implement AF for the rkisp1 ISP. Early version of this serie was uploaded in the July, but there were some change in the IPA in the meantime. The current version was updated to the new IPA code and has most of the comments from the v2 review fixed. Best regards Daniel Semkowicz Daniel Semkowicz (8): rkisp1: Add camera lens to PH and expose it to the IPA rkisp1: Control camera lens position from IPA ipa: Add base class defining AF algorithm interface ipa: Add class that implements base AF control algorithm ipa: rkisp1: Add AF algorithm basing on common AfHillClimbing class pipeline: rkisp1: Add basic AF controls to the supported controls list ipa: rkisp1: Add "Windows" Metering mode to auto focus algorithm ipa: rkisp1: Add OV5675 tuning file include/libcamera/ipa/rkisp1.mojom | 2 + .../libipa/algorithms/af_hill_climbing.cpp | 374 ++++++++++++++++++ src/ipa/libipa/algorithms/af_hill_climbing.h | 102 +++++ src/ipa/libipa/algorithms/af_interface.cpp | 92 +++++ src/ipa/libipa/algorithms/af_interface.h | 41 ++ src/ipa/libipa/algorithms/meson.build | 11 + src/ipa/libipa/meson.build | 6 + src/ipa/rkisp1/algorithms/af.cpp | 182 +++++++++ src/ipa/rkisp1/algorithms/af.h | 51 +++ src/ipa/rkisp1/algorithms/meson.build | 1 + src/ipa/rkisp1/data/meson.build | 1 + src/ipa/rkisp1/data/ov5675.yaml | 20 + src/ipa/rkisp1/ipa_context.h | 5 + src/ipa/rkisp1/rkisp1.cpp | 23 ++ src/libcamera/pipeline/rkisp1/rkisp1.cpp | 21 + 15 files changed, 932 insertions(+) create mode 100644 src/ipa/libipa/algorithms/af_hill_climbing.cpp create mode 100644 src/ipa/libipa/algorithms/af_hill_climbing.h create mode 100644 src/ipa/libipa/algorithms/af_interface.cpp create mode 100644 src/ipa/libipa/algorithms/af_interface.h create mode 100644 src/ipa/libipa/algorithms/meson.build create mode 100644 src/ipa/rkisp1/algorithms/af.cpp create mode 100644 src/ipa/rkisp1/algorithms/af.h create mode 100644 src/ipa/rkisp1/data/ov5675.yaml