From patchwork Fri Sep 4 06:28:37 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "D. Manresa" X-Patchwork-Id: 28189 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 070FBC3257 for ; Fri, 4 Sep 2026 06:28:42 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 76F07685EC; Fri, 4 Sep 2026 08:28:40 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="IGrVDqSW"; dkim-atps=neutral Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id D28FB683E4 for ; Fri, 4 Sep 2026 08:28:38 +0200 (CEST) Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-4957eefd361so4899835e9.1 for ; Thu, 03 Sep 2026 23:28:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1788503318; x=1789108118; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=1247mfuA6LsZJrVQPwIHHV05O/3pqV5P9mtFHOcMhOc=; b=IGrVDqSWnX0JUyPjVx4mjdQy5bensd5ad/j6ebnSnxMg7ld5uT2mWpJ5xBmL+tAg1L ePhqLp99GCpp5hwr3vqzHD1dp2hsRL+iU+SgaV5JEQplKuSvpVGMJJv57oQRXpNDhe+X mKO3twM2xkkL0mHEPI6N0tr2gb6f4Ellg1r9sK9SumXL9WJWBQ3+Hw8EmZrow8CAUrrd XpaWHAuvlxmTJ9ZDPqNVRmBgMR7j8o2VNWL4tOj9v73QxLS+VND10z6H9KJ5EtF/HaO5 RCppE+g/y5ARRUmps/RRyfIbN3iem2WmvCaflzrFVW7KXSx95/Jc1ekholAxIKVJaCAo T7rA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788503318; x=1789108118; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=1247mfuA6LsZJrVQPwIHHV05O/3pqV5P9mtFHOcMhOc=; b=alvQ1AzGO0/0uWO1q7uA/40O8+6iZ/Gth1IB4QI4CpIAJjs2UuPoCT4X2M78tszc/Z 2c/lRmPOwcNi7T42hE0oPVXkgTw0AcLjxbm1bzacCx2MaMciedFUj5Zn8eliMSwfoUKR zNT2y4B3mtYRCog18WM/0Ba5P2DDias1DKaDmDBeKrEwFVyWJQP+BKHW+5gvd5fAbis/ 7e+9E+k9mrpfXc/sSUrdyWbLpcAmL+M/mOuBTjlk/rfSQ/buCknNcuboAOS2FHsaL8HU 0ziLrqEK6v5ByvI6UC2jOkSmb8OKmSaMJYJ8xAutAjbsjsfzoEOoE0qMyOEFXOOUdk31 /UXA== X-Gm-Message-State: AFuF++kTc4hezE1xWXdYdIV+g3iuKYVTjeMeqvKcJcfaaXZw3d6VRn3T 5fpR2Q2GndRvc0GXA82o/I0x9lAplOSTvSUDUyS6tBHc7wXjMf/gpDWNdrvJvvsEKg== X-Gm-Gg: AYBFou2BcWLb1pVeGyh5m7Vdbhv94BtBMVrbhyctHKvib53sH+ec1FBw0NPW6aLUp+E q49gRN3Yxvl6UsOvT3o1D7k8jh8kUAVQZCo2MQ29TnROu2fBG7qHKMCYUX5I7OjX+KD1s02Mgvl pqeO0Ntwjawx6xb+NVArEDGwnJOU+NtS9ghdcx/JC1HqzX9zr1m/xRIrb5HZAQvmBMIaEjo1L2/ DYRjGuW8jH+Qic4qdj0ogrf4UGpWKjWyTs445nW421ZeQusFHe2DgnqQUJ+zYtQ0b/6HEWJcfV5 Bi0QU8cw4IHVG/W1fdunUHhK88JWP2yWb1fC9kO3o67NOX06bKWH5L5mzUVvvzSPR2eUTI1qzOf 3WcufzsRMMPFbMXebM616QmvMYNu2J1VIz0GwKb6PXEOpBZu9AT10hwv/g8Ie01UbuLv1AU12uL 0Zs+rGc3UOwo+S1oD13tJ41zB4pVPZVjimlJMJo86CiDDDE/2UP4ThninX3Koy3u3IZOp0GOGGL tbnXdc0Z1yPaJQWKTTXKrxbkcJr0fketxHNBfAoYpkORgN/iD9RJpHWW0U= X-Received: by 2002:a05:600c:3546:b0:49c:fc6e:a3db with SMTP id 5b1f17b1804b1-49cfc6ea79emr9288585e9.26.1788503318012; Thu, 03 Sep 2026 23:28:38 -0700 (PDT) Received: from latitude7275 (84.124.213.91.dyn.user.ono.com. [84.124.213.91]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49cee5f9114sm125681225e9.5.2026.09.03.23.28.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Sep 2026 23:28:37 -0700 (PDT) From: "D. Manresa" To: libcamera-devel@lists.libcamera.org Cc: "D. Manresa" Subject: [PATCH 0/3] ipa: ipu3: black level, gamma and AGC fixes from a Dell Latitude 7275 Date: Fri, 4 Sep 2026 08:28:37 +0200 Message-ID: <20260904062840.46739-1-dmanresa@gmail.com> X-Mailer: git-send-email 2.55.0 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" This series collects three small fixes for the IPU3 IPA found while bringing up the OV5670 front camera of a Dell Latitude 7275 (Skylake, IPU3 8086:1919): - The AGC luminance estimate receives the AWB gains as { red, blue, green } while an RGB vector is expected. - The black level is hard-coded to 64. The ImgU obgrid unit turns out to be half a 10-bit LSB, so with 64 an OV5670 keeps a ~9/255 pedestal in the statistics and the image, which the colour gains amplify. Make it a tuning parameter, keeping the default. - The tone mapping gamma is hard-coded to 1.1. Make it a tuning parameter and document that the video pipe of the current firmware ignores the LUT contents. All measurements were made with synthetic parameter tables and by reading the NV12 output statistics; details and tools are available at the project repository: https://github.com/dmanresa-saes/latitude-7275-camera Follow-up series will add a Ccm algorithm ported from rkisp1, lens shading through the SHD block, and controls for the TCC chroma gain and IEFD sharpening. D. Manresa (3): ipa: ipu3: agc: Fix swapped green and blue gains in luminance estimate ipa: ipu3: blc: Make the black level configurable ipa: ipu3: tone_mapping: Make the gamma configurable src/ipa/ipu3/algorithms/agc.cpp | 2 +- src/ipa/ipu3/algorithms/blc.cpp | 42 +++++++++++++++++++++--- src/ipa/ipu3/algorithms/blc.h | 5 +++ src/ipa/ipu3/algorithms/tone_mapping.cpp | 37 ++++++++++++++++++++- src/ipa/ipu3/algorithms/tone_mapping.h | 3 ++ 5 files changed, 83 insertions(+), 6 deletions(-)