{"id":23608,"url":"https://patchwork.libcamera.org/api/1.1/covers/23608/?format=json","web_url":"https://patchwork.libcamera.org/cover/23608/","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":"<20250620124452.557855-1-naush@raspberrypi.com>","date":"2025-06-20T12:42:21","name":"[v1,0/8] Raspberry Pi: AF improvements","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/1.1/people/34/?format=json","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"mbox":"https://patchwork.libcamera.org/cover/23608/mbox/","series":[{"id":5235,"url":"https://patchwork.libcamera.org/api/1.1/series/5235/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5235","date":"2025-06-20T12:42:21","name":"Raspberry Pi: AF improvements","version":1,"mbox":"https://patchwork.libcamera.org/series/5235/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/23608/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 8405EBDE6B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 20 Jun 2025 12:45:01 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5319168DE2;\n\tFri, 20 Jun 2025 14:44:59 +0200 (CEST)","from mail-wr1-x432.google.com (mail-wr1-x432.google.com\n\t[IPv6:2a00:1450:4864:20::432])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 201BE61535\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 20 Jun 2025 14:44:58 +0200 (CEST)","by mail-wr1-x432.google.com with SMTP id\n\tffacd0b85a97d-3a577ab8c34so275214f8f.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 20 Jun 2025 05:44:58 -0700 (PDT)","from NAUSH-P-DELL.pitowers.org ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-45361461375sm41561525e9.14.2025.06.20.05.44.56\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 20 Jun 2025 05:44:56 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"fWKesL70\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1750423497; x=1751028297;\n\tdarn=lists.libcamera.org; \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=zGAcD6vT+M6/L1iTEcnvkQnL4E6uY7FMIpgwC3sh99I=;\n\tb=fWKesL70uG4UE47YT/TJ1nz9VAT93a5Kyw927dU7R9GxULW49oKPSZr7zqaZsNRQBb\n\tD6qOL1xnJl/R6nZALdk/VGEceOuU1CHdO7wGwbZEkSuGNAun3O+8r3ek4qah32triwTW\n\tVtTQeF+6Bci2Y5FoDWFTN4ybcrJMyE9UnTwhgg/YSjK5yFVru1wr18T5dDjBx3nUSg4E\n\tUpJGKyweDBoV342SJwtHOc5iUS8HaA/feRhboU7Y+4vTs++/LhU0XdjqaEulAuRMWDnb\n\tV/OqLxUFAYD1t1ZM8GXb8chIWiYaIh5pMwqxQrsiGuVToLmh8wCJ9iU20sQzNSpCKVx9\n\tH9TA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1750423497; x=1751028297;\n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\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yOAkrTKjyt3FA2YZrh9829CN+b8xUyrpTdyZcVOVqFK1tbY5zytz+A==","X-Received":"by 2002:a05:6000:2010:b0:3a4:dd00:9ac3 with SMTP id\n\tffacd0b85a97d-3a6d12e428amr799673f8f.12.1750423497246; \n\tFri, 20 Jun 2025 05:44:57 -0700 (PDT)","From":"Naushir Patuck <naush@raspberrypi.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Naushir Patuck <naush@raspberrypi.com>","Subject":"[PATCH v1 0/8] Raspberry Pi: AF improvements","Date":"Fri, 20 Jun 2025 13:42:21 +0100","Message-ID":"<20250620124452.557855-1-naush@raspberrypi.com>","X-Mailer":"git-send-email 2.43.0","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Hi,\n\n(submitting on behalf of Nick)\n\nThe following patch series improves our AF algorithm in a number of ways:\n\n1. Treat low-confidence PDAF values more linearly, which may improve reliability\nand reduce wobble a little.\n\n2. Check for IR lighting and suppress PDAF when it's detected (only when a new\nflag is set in the tuning file).\n\n3. Allow CDAF-based scan to be re-triggered multiple times in Continuous AF mode\n(when there's no PDAF).\n\n4. Allow subsequent scans to start from the current lens position, rather than\nalways from 0 (infinity).\n\n5. Skip the \"fine\" search altogether (when the tuning file has \"step_fine\": 0).\n\n6. Read the default lens position from the tuning file, rather than hard-coding\nit to 1.0 in source code as now.\n\n7. Not send the default position to the lens driver, when it would be\nimmediately overridden by a user-specified manual setting.\n\nThanks,\nNaush\n\nNick Hollinghurst (8):\n  ipa: rpi: Defer initialising AF LensPosition ControlInfo and value\n  ipa: rpi: controller: Improve findPeak() function in AF algorithm\n  ipa: rpi: controller: AutoFocus weighting tweak\n  ipa: rpi: controller: Autofocus CAF/PDAF stability tweak\n  ipa: rpi: controller: AutoFocus tweak earlyTerminationByPhase()\n  ipa: rpi: controller: Autofocus to use AWB statistics; re-trigger\n  ipa: rpi: controller: AutoFocus bidirectional scanning\n  ipa: rpi: Update IMX708 camera tuning files for AutoFocus changes\n\n src/ipa/rpi/common/ipa_base.cpp             |  53 ++--\n src/ipa/rpi/controller/af_algorithm.h       |   8 +-\n src/ipa/rpi/controller/rpi/af.cpp           | 305 +++++++++++++++-----\n src/ipa/rpi/controller/rpi/af.h             |  52 +++-\n src/ipa/rpi/pisp/data/imx708.json           |  23 +-\n src/ipa/rpi/pisp/data/imx708_noir.json      |  23 +-\n src/ipa/rpi/pisp/data/imx708_wide.json      |  19 +-\n src/ipa/rpi/pisp/data/imx708_wide_noir.json |  19 +-\n src/ipa/rpi/vc4/data/imx708.json            |  23 +-\n src/ipa/rpi/vc4/data/imx708_noir.json       |  23 +-\n src/ipa/rpi/vc4/data/imx708_wide.json       |  19 +-\n src/ipa/rpi/vc4/data/imx708_wide_noir.json  |  19 +-\n 12 files changed, 442 insertions(+), 144 deletions(-)"}