From patchwork Fri Jun 20 12:42:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 23616 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 67461BDE6B for ; Fri, 20 Jun 2025 12:45:19 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id AD83E68DF7; Fri, 20 Jun 2025 14:45:18 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="EASE5bnp"; dkim-atps=neutral Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id DA44B68DD0 for ; Fri, 20 Jun 2025 14:45:02 +0200 (CEST) Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-3a577f164c8so288304f8f.2 for ; Fri, 20 Jun 2025 05:45:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1750423502; x=1751028302; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UE9g7xzDCM3KeDeKQb1yKv5x19VC4Pck1UyFswYi0Zs=; b=EASE5bnpaRIiB7zleAvejiT7CiPCdODay0Tl7JV2ckzLEmBdlXhz7GZRjo/3gAeoN4 H0nEud7YlPwnzjyNM+KlLnwtqPhoFNdJYm41/ilVCnktLJexQIsvwtG8fuKGB9Nm2P+6 HbsyL1mu7asZNwWDrVHdFmBSYowr6HDnzY8VywcPGY0dHrFI1zvWW71jIOibgeuXtIyy cIgai2BdqGnlMQnEhPnuXD4auJOjY6AigekHQz8i3lBhy+Wz2QXhkAXMOTFuo+fWbBg2 LSZr28y+fajPdk63eX07hWINDiamrfe94SR8JuVm81eehKzmE3gj06eccITOgNsDw407 iHiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750423502; x=1751028302; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UE9g7xzDCM3KeDeKQb1yKv5x19VC4Pck1UyFswYi0Zs=; b=NkTiJD2+r+gKaP9VcGdyqG2n9RLCnp/TztJUf0Z6lvjnYdbmfMPdYPZ6O6XJRVeiyq yBupcoW25cWnNz6rtUp3iBghsjEgPGanRSRji2AIGSiMCCcp3qOm4Nn/cEpcypCO/y5x ElElh8Wi9qrMRwXyDqQRTogMZMrkBc1IuVZJ8onTK0u92UUc7lxRwd2XFgWMJZyrZt77 laj7HaqDpcSr3GlLlvYDMFtdCzXKRoERYiJooBEtY5tl2YTudkxfdpkLnBRv0qM9+io0 lsTUZFx3Lec9iw11A/AAjpEsv5oGeqK7FCJNoxaDo95gJGhDN9LqX+g+AxQ4g1P3TyPM kZ/g== X-Gm-Message-State: AOJu0YwW7AFGqjgw2xtykrLaReXuENh+/YtmzH1DNmS4SRU+JAiOERzF 8S/kBU+zcnz3VwB3/+HWcyXbMccV8zux8v2h0vFmV3/cZg5HpxntxwcetRiQKxDs6zvMeN9lAET sCQ0F X-Gm-Gg: ASbGncvUwRf8t8q1bqpfnl8YcqHrPuugKkcjrQd69unUSn/6P1+PH8p1RfEUna6SEKs 53CQK+qU4FECeLHZWkXqUW9jw36z7IV4N9FK6wi/ClETXmShbHAZNsWmD8T/AFvQZux4vpNZe9H 9D9A0Jyx1sjzF5y8x+rmXtZ4uuyHhQ3/sywybd/qSxLEmeAqiN4xfPRpEf1feZKAd7d9ti7xQ7M jx2sJ5SETuO2CzAZUwHxNGIIlL+y3UCI8Gys0noy+fKtCyrlW9bKHcHFVGYqlPDJvY6Hm5nDWtA 9Zq9g8C4GMBUFzhbuHDarZUvuza8plPsMzIP3tWzHxXkFA2tw2q8HCNF2EDaRmmukkGM1LO0EOc BX7K6mA== X-Google-Smtp-Source: AGHT+IH4aaN35RGrYO17rGe5UzPbLEfJcXK7eKeFRurH70TCfPW7MO7nd6PkIXr4+6YJWzXP4nUdGw== X-Received: by 2002:a05:6000:2906:b0:3a5:2208:41b6 with SMTP id ffacd0b85a97d-3a6d12dde9cmr940417f8f.11.1750423502010; Fri, 20 Jun 2025 05:45:02 -0700 (PDT) Received: from NAUSH-P-DELL.pitowers.org ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-45361461375sm41561525e9.14.2025.06.20.05.45.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Jun 2025 05:45:01 -0700 (PDT) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Cc: Nick Hollinghurst , Naushir Patuck Subject: [PATCH v1 8/8] ipa: rpi: Update IMX708 camera tuning files for AutoFocus changes Date: Fri, 20 Jun 2025 13:42:29 +0100 Message-ID: <20250620124452.557855-9-naush@raspberrypi.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250620124452.557855-1-naush@raspberrypi.com> References: <20250620124452.557855-1-naush@raspberrypi.com> MIME-Version: 1.0 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" From: Nick Hollinghurst Explicitly add new parameters: "retrigger_ratio", "retrigger_delay", "check_for_ir". Tweak other parameters to suit algorithm changes. (Though existing tuning files should still work acceptably.) Add AfSpeedFast parameters for the Raspberry Pi V3 standard lens. Signed-off-by: Nick Hollinghurst Signed-off-by: Naushir Patuck Reviewed-by: Naushir Patuck --- src/ipa/rpi/pisp/data/imx708.json | 23 ++++++++++++++++++--- src/ipa/rpi/pisp/data/imx708_noir.json | 23 ++++++++++++++++++--- src/ipa/rpi/pisp/data/imx708_wide.json | 19 ++++++++++------- src/ipa/rpi/pisp/data/imx708_wide_noir.json | 19 ++++++++++------- src/ipa/rpi/vc4/data/imx708.json | 23 ++++++++++++++++++--- src/ipa/rpi/vc4/data/imx708_noir.json | 23 ++++++++++++++++++--- src/ipa/rpi/vc4/data/imx708_wide.json | 19 ++++++++++------- src/ipa/rpi/vc4/data/imx708_wide_noir.json | 19 ++++++++++------- 8 files changed, 128 insertions(+), 40 deletions(-) diff --git a/src/ipa/rpi/pisp/data/imx708.json b/src/ipa/rpi/pisp/data/imx708.json index e8d25c216025..7f2e786550b8 100644 --- a/src/ipa/rpi/pisp/data/imx708.json +++ b/src/ipa/rpi/pisp/data/imx708.json @@ -1139,11 +1139,27 @@ "step_coarse": 1.0, "step_fine": 0.25, "contrast_ratio": 0.75, - "pdaf_gain": -0.02, + "retrigger_ratio": 0.8, + "retrigger_delay": 10, + "pdaf_gain": -0.016, "pdaf_squelch": 0.125, - "max_slew": 2.0, + "max_slew": 1.5, "pdaf_frames": 20, "dropout_frames": 6, + "step_frames": 5 + }, + "fast": + { + "step_coarse": 1.25, + "step_fine": 0.0, + "contrast_ratio": 0.75, + "retrigger_ratio": 0.8, + "retrigger_delay": 8, + "pdaf_gain": -0.02, + "pdaf_squelch": 0.125, + "max_slew": 2.0, + "pdaf_frames": 16, + "dropout_frames": 4, "step_frames": 4 } }, @@ -1151,6 +1167,7 @@ "conf_thresh": 16, "conf_clip": 512, "skip_frames": 5, + "check_for_ir": false, "map": [ 0.0, 445, 15.0, 925 ] } }, @@ -1267,4 +1284,4 @@ } } ] -} \ No newline at end of file +} diff --git a/src/ipa/rpi/pisp/data/imx708_noir.json b/src/ipa/rpi/pisp/data/imx708_noir.json index e69afb0c6d64..c5e6a2652727 100644 --- a/src/ipa/rpi/pisp/data/imx708_noir.json +++ b/src/ipa/rpi/pisp/data/imx708_noir.json @@ -1156,11 +1156,27 @@ "step_coarse": 1.0, "step_fine": 0.25, "contrast_ratio": 0.75, - "pdaf_gain": -0.02, + "retrigger_ratio": 0.8, + "retrigger_delay": 10, + "pdaf_gain": -0.016, "pdaf_squelch": 0.125, - "max_slew": 2.0, + "max_slew": 1.5, "pdaf_frames": 20, "dropout_frames": 6, + "step_frames": 5 + }, + "fast": + { + "step_coarse": 1.25, + "step_fine": 0.0, + "contrast_ratio": 0.75, + "retrigger_ratio": 0.8, + "retrigger_delay": 8, + "pdaf_gain": -0.02, + "pdaf_squelch": 0.125, + "max_slew": 2.0, + "pdaf_frames": 16, + "dropout_frames": 4, "step_frames": 4 } }, @@ -1168,6 +1184,7 @@ "conf_thresh": 16, "conf_clip": 512, "skip_frames": 5, + "check_for_ir": true, "map": [ 0.0, 445, 15.0, 925 ] } }, @@ -1230,4 +1247,4 @@ } } ] -} \ No newline at end of file +} diff --git a/src/ipa/rpi/pisp/data/imx708_wide.json b/src/ipa/rpi/pisp/data/imx708_wide.json index 9fff05d93efa..8550cdfc1db0 100644 --- a/src/ipa/rpi/pisp/data/imx708_wide.json +++ b/src/ipa/rpi/pisp/data/imx708_wide.json @@ -1148,23 +1148,27 @@ "step_coarse": 2.0, "step_fine": 0.5, "contrast_ratio": 0.75, + "retrigger_ratio" : 0.8, + "retrigger_delay" : 10, "pdaf_gain": -0.03, "pdaf_squelch": 0.2, - "max_slew": 4.0, + "max_slew": 3.0, "pdaf_frames": 20, "dropout_frames": 6, - "step_frames": 4 + "step_frames": 5 }, "fast": { - "step_coarse": 2.0, - "step_fine": 0.5, + "step_coarse": 2.5, + "step_fine": 0.0, "contrast_ratio": 0.75, + "retrigger_ratio" : 0.8, + "retrigger_delay" : 8, "pdaf_gain": -0.05, "pdaf_squelch": 0.2, - "max_slew": 5.0, + "max_slew": 4.0, "pdaf_frames": 16, - "dropout_frames": 6, + "dropout_frames": 4, "step_frames": 4 } }, @@ -1172,6 +1176,7 @@ "conf_thresh": 12, "conf_clip": 512, "skip_frames": 5, + "check_for_ir": false, "map": [ 0.0, 420, 35.0, 920 ] } }, @@ -1290,4 +1295,4 @@ } } ] -} \ No newline at end of file +} diff --git a/src/ipa/rpi/pisp/data/imx708_wide_noir.json b/src/ipa/rpi/pisp/data/imx708_wide_noir.json index 75d1149b6d3e..069a06180320 100644 --- a/src/ipa/rpi/pisp/data/imx708_wide_noir.json +++ b/src/ipa/rpi/pisp/data/imx708_wide_noir.json @@ -1057,23 +1057,27 @@ "step_coarse": 2.0, "step_fine": 0.5, "contrast_ratio": 0.75, + "retrigger_ratio" : 0.8, + "retrigger_delay" : 10, "pdaf_gain": -0.03, "pdaf_squelch": 0.2, - "max_slew": 4.0, + "max_slew": 3.0, "pdaf_frames": 20, "dropout_frames": 6, - "step_frames": 4 + "step_frames": 5 }, "fast": { - "step_coarse": 2.0, - "step_fine": 0.5, + "step_coarse": 2.5, + "step_fine": 0.0, "contrast_ratio": 0.75, + "retrigger_ratio" : 0.8, + "retrigger_delay" : 8, "pdaf_gain": -0.05, "pdaf_squelch": 0.2, - "max_slew": 5.0, + "max_slew": 4.0, "pdaf_frames": 16, - "dropout_frames": 6, + "dropout_frames": 4, "step_frames": 4 } }, @@ -1081,6 +1085,7 @@ "conf_thresh": 12, "conf_clip": 512, "skip_frames": 5, + "check_for_ir": true, "map": [ 0.0, 420, 35.0, 920 ] } }, @@ -1145,4 +1150,4 @@ } } ] -} \ No newline at end of file +} diff --git a/src/ipa/rpi/vc4/data/imx708.json b/src/ipa/rpi/vc4/data/imx708.json index 4de6f0796fd0..e54ceff494e5 100644 --- a/src/ipa/rpi/vc4/data/imx708.json +++ b/src/ipa/rpi/vc4/data/imx708.json @@ -638,11 +638,27 @@ "step_coarse": 1.0, "step_fine": 0.25, "contrast_ratio": 0.75, - "pdaf_gain": -0.02, + "retrigger_ratio": 0.8, + "retrigger_delay": 10, + "pdaf_gain": -0.016, "pdaf_squelch": 0.125, - "max_slew": 2.0, + "max_slew": 1.5, "pdaf_frames": 20, "dropout_frames": 6, + "step_frames": 5 + }, + "fast": + { + "step_coarse": 1.25, + "step_fine": 0.0, + "contrast_ratio": 0.75, + "retrigger_ratio": 0.8, + "retrigger_delay": 8, + "pdaf_gain": -0.02, + "pdaf_squelch": 0.125, + "max_slew": 2.0, + "pdaf_frames": 16, + "dropout_frames": 4, "step_frames": 4 } }, @@ -650,6 +666,7 @@ "conf_thresh": 16, "conf_clip": 512, "skip_frames": 5, + "check_for_ir": false, "map": [ 0.0, 445, 15.0, 925 ] } }, @@ -668,4 +685,4 @@ } } ] -} \ No newline at end of file +} diff --git a/src/ipa/rpi/vc4/data/imx708_noir.json b/src/ipa/rpi/vc4/data/imx708_noir.json index 7b7ee874f66a..f351a1800924 100644 --- a/src/ipa/rpi/vc4/data/imx708_noir.json +++ b/src/ipa/rpi/vc4/data/imx708_noir.json @@ -737,11 +737,27 @@ "step_coarse": 1.0, "step_fine": 0.25, "contrast_ratio": 0.75, - "pdaf_gain": -0.02, + "retrigger_ratio": 0.8, + "retrigger_delay": 10, + "pdaf_gain": -0.016, "pdaf_squelch": 0.125, - "max_slew": 2.0, + "max_slew": 1.5, "pdaf_frames": 20, "dropout_frames": 6, + "step_frames": 5 + }, + "fast": + { + "step_coarse": 1.25, + "step_fine": 0.0, + "contrast_ratio": 0.75, + "retrigger_ratio": 0.8, + "retrigger_delay": 8, + "pdaf_gain": -0.02, + "pdaf_squelch": 0.125, + "max_slew": 2.0, + "pdaf_frames": 16, + "dropout_frames": 4, "step_frames": 4 } }, @@ -749,6 +765,7 @@ "conf_thresh": 16, "conf_clip": 512, "skip_frames": 5, + "check_for_ir": true, "map": [ 0.0, 445, 15.0, 925 ] } }, @@ -767,4 +784,4 @@ } } ] -} \ No newline at end of file +} diff --git a/src/ipa/rpi/vc4/data/imx708_wide.json b/src/ipa/rpi/vc4/data/imx708_wide.json index 6f45aafc0997..bf1b122cd7e6 100644 --- a/src/ipa/rpi/vc4/data/imx708_wide.json +++ b/src/ipa/rpi/vc4/data/imx708_wide.json @@ -637,23 +637,27 @@ "step_coarse": 2.0, "step_fine": 0.5, "contrast_ratio": 0.75, + "retrigger_ratio": 0.8, + "retrigger_delay": 10, "pdaf_gain": -0.03, "pdaf_squelch": 0.2, - "max_slew": 4.0, + "max_slew": 3.0, "pdaf_frames": 20, "dropout_frames": 6, - "step_frames": 4 + "step_frames": 5 }, "fast": { - "step_coarse": 2.0, - "step_fine": 0.5, + "step_coarse": 2.5, + "step_fine": 0.0, "contrast_ratio": 0.75, + "retrigger_ratio": 0.8, + "retrigger_delay": 8, "pdaf_gain": -0.05, "pdaf_squelch": 0.2, - "max_slew": 5.0, + "max_slew": 4.0, "pdaf_frames": 16, - "dropout_frames": 6, + "dropout_frames": 4, "step_frames": 4 } }, @@ -661,6 +665,7 @@ "conf_thresh": 12, "conf_clip": 512, "skip_frames": 5, + "check_for_ir": false, "map": [ 0.0, 420, 35.0, 920 ] } }, @@ -679,4 +684,4 @@ } } ] -} \ No newline at end of file +} diff --git a/src/ipa/rpi/vc4/data/imx708_wide_noir.json b/src/ipa/rpi/vc4/data/imx708_wide_noir.json index b9a5227e1acc..ea1c8c690b5c 100644 --- a/src/ipa/rpi/vc4/data/imx708_wide_noir.json +++ b/src/ipa/rpi/vc4/data/imx708_wide_noir.json @@ -628,23 +628,27 @@ "step_coarse": 2.0, "step_fine": 0.5, "contrast_ratio": 0.75, + "retrigger_ratio": 0.8, + "retrigger_delay": 10, "pdaf_gain": -0.03, "pdaf_squelch": 0.2, - "max_slew": 4.0, + "max_slew": 3.0, "pdaf_frames": 20, "dropout_frames": 6, - "step_frames": 4 + "step_frames": 5 }, "fast": { - "step_coarse": 2.0, - "step_fine": 0.5, + "step_coarse": 2.5, + "step_fine": 0.0, "contrast_ratio": 0.75, + "retrigger_ratio": 0.8, + "retrigger_delay": 8, "pdaf_gain": -0.05, "pdaf_squelch": 0.2, - "max_slew": 5.0, + "max_slew": 4.0, "pdaf_frames": 16, - "dropout_frames": 6, + "dropout_frames": 4, "step_frames": 4 } }, @@ -652,6 +656,7 @@ "conf_thresh": 12, "conf_clip": 512, "skip_frames": 5, + "check_for_ir": true, "map": [ 0.0, 420, 35.0, 920 ] } }, @@ -670,4 +675,4 @@ } } ] -} \ No newline at end of file +}