From patchwork Wed Jul 22 11:57:13 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 27447 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 856FEBDE4C for ; Wed, 22 Jul 2026 11:57:35 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 2CC4E67EA3; Wed, 22 Jul 2026 13:57:35 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="LjxeJPZd"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 0B94A67E92 for ; Wed, 22 Jul 2026 13:57:31 +0200 (CEST) Received: from [192.168.1.101] (mob-5-90-61-61.net.vodafone.it [5.90.61.61]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id AA6B4227; Wed, 22 Jul 2026 13:56:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1784721390; bh=3o78LDDRDsoKEkZXREMxj8MnmDDLXixSUBcXzhVXGY8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=LjxeJPZdUBzahg0aViu9UPwxNrYCAL1SwhU5xN2/ddfSVDOubCVB/iZODbm5HvwY0 qEtZQZWgV/13+i3nsXJ+pp3w38R5PNQzQfdNvMXXlM+Wq4dxlcJF9/TU4bx2n5Yp7r a5B95+BVrYJje6S74k0xzBa5hG2Pd0BqVhg9J0Xg= From: Jacopo Mondi Date: Wed, 22 Jul 2026 13:57:13 +0200 Subject: [PATCH 3/3] ipa: rpi: vc4: Add Mira220 tuning file MIME-Version: 1.0 Message-Id: <20260722-mira220-v1-3-1006a4cbd2a8@ideasonboard.com> References: <20260722-mira220-v1-0-1006a4cbd2a8@ideasonboard.com> In-Reply-To: <20260722-mira220-v1-0-1006a4cbd2a8@ideasonboard.com> To: libcamera-devel@lists.libcamera.org Cc: Philippe Baetens , Jacopo Mondi X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=16781; i=jacopo.mondi@ideasonboard.com; h=from:subject:message-id; bh=3o78LDDRDsoKEkZXREMxj8MnmDDLXixSUBcXzhVXGY8=; b=owEBbQKS/ZANAwAKAXI0Bo8WoVY8AcsmYgBqYLAo9pDFokKQ2osOVs0g2K+fcrOUHYDfqwrZT o8Y4flvmKuJAjMEAAEKAB0WIQS1xD1IgJogio9YOMByNAaPFqFWPAUCamCwKAAKCRByNAaPFqFW PH8PD/0fZh/BF/ydICdMQC08JF5dBlel4UZSWCmRvbuzPHZdMDfrlxIJBGcIrLEpC3HzKmXcKEX c1dPP46PTY1E+DdkJvBDxupJzskZdY1CDbN89o6DFypq7clbi02ndnaCIN/THhsiC4q4Q1GWW79 niZmyZajHmLz3bbUhIAjG52Iwb25CdBy+pw77vI+e5rl3J81+klrl/e1mHtrEM957sKVWFMVz62 vH0aoaYHtNXKL0ReI5gzjIVvOBo4Yv6F9bnhLKafFE55bS7ncVLvojjTdN7+ZKBXN1Z6wphN2M9 8SnwDtvZ1D5I8IsdClI23akvhcwJyUAh8lgao9yMwgaRm2QFHyVW2EsVpOPtE5ZuUEZYVY8L8zK SrWG93XqxK+AsfOBKOtyPNzgcZENN4XhYxIwXI0s+/wzRhrPo/t2E/Hgn255HoUPhfumv7laC3w FeRxMoqb3zwLcM6j6u2E/bz0jzMavePKmM1HF2j780Mw6o1VbaWMi9DAlscVWqci+CQQUVHoa85 r2gFdpLHAtmeHnXFk2KcIJXF29BK/zBh9UZASvk9a169hjSdpUbhlQptNdiqSmDyWU/VdzNYZzG O+ODXSGsOW3k4HCKVp1Sj6jZVuqKElh99EUmjODT28+hPxepkQVI39XMp9jjgwNYUOcxH1Iddv1 IbdpjfnridgRaLg== X-Developer-Key: i=jacopo.mondi@ideasonboard.com; a=openpgp; fpr=72392EDC88144A65C701EA9BA5826A2587AD026B 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" Add tuning file for the Mira220 RGB version to the RaspberryPi VC4 IPA. This patch upports the Mira220 support available at https://github.com/ams-OSRAM/libcamera.git at revision d7d5e17ec961 ("update json files so they are truly mono"). Signed-off-by: Jacopo Mondi --- src/ipa/rpi/vc4/data/meson.build | 1 + src/ipa/rpi/vc4/data/mira220.json | 370 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 371 insertions(+) diff --git a/src/ipa/rpi/vc4/data/meson.build b/src/ipa/rpi/vc4/data/meson.build index 6efa53cb3873..763c7a0e8a58 100644 --- a/src/ipa/rpi/vc4/data/meson.build +++ b/src/ipa/rpi/vc4/data/meson.build @@ -21,6 +21,7 @@ conf_files = files([ 'imx708_noir.json', 'imx708_wide.json', 'imx708_wide_noir.json', + 'mira220.json', 'ov5647.json', 'ov5647_noir.json', 'ov64a40.json', diff --git a/src/ipa/rpi/vc4/data/mira220.json b/src/ipa/rpi/vc4/data/mira220.json new file mode 100644 index 000000000000..1b47c13d9463 --- /dev/null +++ b/src/ipa/rpi/vc4/data/mira220.json @@ -0,0 +1,370 @@ +{ + "version": 2.0, + "target": "bcm2835", + "algorithms": [ + { + "rpi.black_level": + { + "black_level": 2500 + } + }, + { + "rpi.dpc": { } + }, + { + "rpi.lux": + { + "reference_shutter_speed": 33316, + "reference_gain": 1.0, + "reference_aperture": 1.0, + "reference_lux": 530, + "reference_Y": 9873 + } + }, + { + "rpi.noise": + { + "reference_constant": 0, + "reference_slope": 1.449 + } + }, + { + "rpi.geq": + { + "offset": 271, + "slope": 0.00179 + } + }, + { + "rpi.sdn": { } + }, + { + "rpi.awb": + { + "priors": [ + { + "lux": 0, + "prior": + [ + 2000, 1.0, + 3000, 0.0, + 13000, 0.0 + ] + }, + { + "lux": 800, + "prior": + [ + 2000, 0.0, + 6000, 2.0, + 13000, 2.0 + ] + }, + { + "lux": 1500, + "prior": + [ + 2000, 0.0, + 4000, 1.0, + 6000, 6.0, + 6500, 7.0, + 7000, 1.0, + 13000, 1.0 + ] + } + ], + "modes": + { + "auto": + { + "lo": 2500, + "hi": 8000 + }, + "incandescent": + { + "lo": 2500, + "hi": 3000 + }, + "tungsten": + { + "lo": 3000, + "hi": 3500 + }, + "fluorescent": + { + "lo": 4000, + "hi": 4700 + }, + "indoor": + { + "lo": 3000, + "hi": 5000 + }, + "daylight": + { + "lo": 5500, + "hi": 6500 + }, + "cloudy": + { + "lo": 7000, + "hi": 8600 + } + }, + "bayes": 1, + "ct_curve": + [ + 3200.0, 0.8663, 0.5414, + 5000.0, 0.7241, 0.6964, + 6420.0, 0.6597, 0.7718, + 7900.0, 0.6173, 0.8232, + 8800.0, 0.5982, 0.8468 + ], + "sensitivity_r": 1.0, + "sensitivity_b": 1.0, + "transverse_pos": 0.03, + "transverse_neg": 0.03 + } + }, + { + "rpi.agc": + { + "metering_modes": + { + "centre-weighted": + { + "weights": [ 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 ] + }, + "spot": + { + "weights": [ 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] + }, + "matrix": + { + "weights": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ] + } + }, + "exposure_modes": + { + "normal": + { + "shutter": [ 100, 10000, 30000, 60000, 120000 ], + "gain": [ 1.0, 2.0, 4.0, 6.0, 6.0 ] + }, + "short": + { + "shutter": [ 100, 5000, 10000, 20000, 120000 ], + "gain": [ 1.0, 2.0, 4.0, 6.0, 6.0 ] + } + }, + "constraint_modes": + { + "normal": [ + { + "bound": "LOWER", + "q_lo": 0.98, + "q_hi": 1.0, + "y_target": + [ + 0, 0.5, + 1000, 0.5 + ] + } + ], + "highlight": [ + { + "bound": "LOWER", + "q_lo": 0.98, + "q_hi": 1.0, + "y_target": + [ + 0, 0.5, + 1000, 0.5 + ] + }, + { + "bound": "UPPER", + "q_lo": 0.98, + "q_hi": 1.0, + "y_target": + [ + 0, 0.8, + 1000, 0.8 + ] + } + ] + }, + "y_target": + [ + 0, 0.16, + 1000, 0.165, + 10000, 0.17 + ] + } + }, + { + "rpi.alsc": + { + "omega": 1.3, + "n_iter": 100, + "luminance_strength": 0.5, + "calibrations_Cr": [ + { + "ct": 5440, + "table": + [ + 1.785, 1.781, 1.763, 1.751, 1.739, 1.737, 1.735, 1.735, 1.733, 1.734, 1.735, 1.739, 1.747, 1.758, 1.781, 1.784, + 1.781, 1.763, 1.751, 1.736, 1.725, 1.721, 1.717, 1.716, 1.717, 1.719, 1.719, 1.728, 1.735, 1.745, 1.763, 1.781, + 1.761, 1.748, 1.734, 1.723, 1.713, 1.707, 1.701, 1.699, 1.699, 1.703, 1.706, 1.711, 1.718, 1.729, 1.745, 1.758, + 1.748, 1.734, 1.722, 1.711, 1.702, 1.694, 1.689, 1.688, 1.688, 1.689, 1.694, 1.701, 1.709, 1.718, 1.729, 1.743, + 1.735, 1.723, 1.713, 1.702, 1.694, 1.688, 1.684, 1.681, 1.682, 1.686, 1.689, 1.694, 1.701, 1.709, 1.724, 1.739, + 1.735, 1.721, 1.711, 1.699, 1.691, 1.685, 1.681, 1.679, 1.679, 1.682, 1.686, 1.691, 1.699, 1.708, 1.721, 1.739, + 1.735, 1.721, 1.711, 1.699, 1.692, 1.685, 1.683, 1.679, 1.679, 1.681, 1.687, 1.691, 1.699, 1.709, 1.723, 1.741, + 1.738, 1.727, 1.716, 1.703, 1.696, 1.689, 1.685, 1.683, 1.683, 1.686, 1.689, 1.695, 1.702, 1.714, 1.726, 1.741, + 1.746, 1.734, 1.723, 1.712, 1.702, 1.696, 1.691, 1.688, 1.688, 1.689, 1.695, 1.702, 1.708, 1.719, 1.734, 1.745, + 1.758, 1.746, 1.731, 1.722, 1.712, 1.704, 1.699, 1.697, 1.697, 1.699, 1.702, 1.708, 1.718, 1.729, 1.744, 1.758, + 1.775, 1.759, 1.746, 1.732, 1.724, 1.717, 1.713, 1.709, 1.708, 1.709, 1.714, 1.721, 1.729, 1.743, 1.759, 1.775, + 1.777, 1.775, 1.758, 1.742, 1.735, 1.729, 1.727, 1.725, 1.724, 1.724, 1.726, 1.732, 1.741, 1.758, 1.775, 1.777 + ] + } + ], + "calibrations_Cb": [ + { + "ct": 5440, + "table": + [ + 1.547, 1.551, 1.558, 1.571, 1.579, 1.586, 1.587, 1.585, 1.587, 1.588, 1.588, 1.586, 1.578, 1.566, 1.558, 1.555, + 1.551, 1.554, 1.565, 1.582, 1.589, 1.597, 1.599, 1.596, 1.595, 1.596, 1.598, 1.597, 1.586, 1.576, 1.566, 1.558, + 1.561, 1.565, 1.577, 1.592, 1.602, 1.608, 1.612, 1.613, 1.613, 1.612, 1.613, 1.611, 1.601, 1.588, 1.575, 1.572, + 1.569, 1.575, 1.589, 1.605, 1.619, 1.623, 1.625, 1.626, 1.626, 1.626, 1.626, 1.623, 1.609, 1.595, 1.584, 1.584, + 1.581, 1.582, 1.596, 1.611, 1.623, 1.628, 1.629, 1.632, 1.633, 1.633, 1.633, 1.625, 1.617, 1.601, 1.589, 1.587, + 1.579, 1.584, 1.597, 1.614, 1.624, 1.631, 1.631, 1.632, 1.632, 1.633, 1.631, 1.629, 1.621, 1.605, 1.592, 1.587, + 1.577, 1.582, 1.599, 1.616, 1.626, 1.631, 1.631, 1.633, 1.633, 1.633, 1.633, 1.629, 1.622, 1.608, 1.592, 1.589, + 1.577, 1.581, 1.596, 1.614, 1.624, 1.627, 1.629, 1.631, 1.633, 1.634, 1.633, 1.628, 1.622, 1.605, 1.593, 1.591, + 1.575, 1.577, 1.592, 1.606, 1.619, 1.625, 1.627, 1.628, 1.629, 1.629, 1.631, 1.626, 1.613, 1.599, 1.591, 1.588, + 1.567, 1.569, 1.579, 1.597, 1.606, 1.615, 1.617, 1.616, 1.616, 1.621, 1.621, 1.617, 1.608, 1.592, 1.579, 1.573, + 1.549, 1.554, 1.563, 1.578, 1.589, 1.594, 1.597, 1.596, 1.597, 1.601, 1.599, 1.597, 1.584, 1.572, 1.562, 1.558, + 1.539, 1.548, 1.553, 1.566, 1.575, 1.578, 1.578, 1.579, 1.582, 1.584, 1.584, 1.583, 1.572, 1.562, 1.553, 1.546 + ] + } + ], + "luminance_lut": + [ + 1.317, 1.282, 1.245, 1.211, 1.191, 1.178, 1.164, 1.149, 1.149, 1.146, 1.171, 1.174, 1.201, 1.235, 1.269, 1.287, + 1.316, 1.259, 1.219, 1.191, 1.169, 1.147, 1.133, 1.121, 1.114, 1.123, 1.145, 1.157, 1.183, 1.212, 1.257, 1.285, + 1.285, 1.231, 1.196, 1.165, 1.139, 1.115, 1.103, 1.092, 1.085, 1.096, 1.115, 1.131, 1.161, 1.187, 1.227, 1.257, + 1.249, 1.213, 1.171, 1.141, 1.111, 1.091, 1.078, 1.068, 1.065, 1.069, 1.089, 1.128, 1.138, 1.174, 1.213, 1.244, + 1.234, 1.197, 1.151, 1.129, 1.096, 1.077, 1.066, 1.057, 1.049, 1.052, 1.074, 1.103, 1.123, 1.162, 1.199, 1.229, + 1.218, 1.179, 1.154, 1.116, 1.094, 1.071, 1.061, 1.054, 1.044, 1.049, 1.068, 1.085, 1.119, 1.145, 1.183, 1.218, + 1.222, 1.198, 1.151, 1.124, 1.099, 1.075, 1.058, 1.049, 1.048, 1.053, 1.064, 1.088, 1.109, 1.145, 1.176, 1.209, + 1.243, 1.203, 1.172, 1.139, 1.104, 1.094, 1.068, 1.056, 1.058, 1.062, 1.077, 1.088, 1.121, 1.155, 1.191, 1.227, + 1.264, 1.231, 1.185, 1.165, 1.131, 1.108, 1.091, 1.075, 1.075, 1.081, 1.096, 1.107, 1.135, 1.172, 1.209, 1.248, + 1.292, 1.251, 1.221, 1.184, 1.156, 1.143, 1.117, 1.104, 1.097, 1.107, 1.121, 1.138, 1.156, 1.197, 1.231, 1.275, + 1.336, 1.287, 1.251, 1.214, 1.186, 1.175, 1.151, 1.136, 1.133, 1.135, 1.148, 1.168, 1.184, 1.225, 1.265, 1.309, + 1.339, 1.323, 1.272, 1.239, 1.205, 1.184, 1.177, 1.166, 1.163, 1.172, 1.187, 1.199, 1.223, 1.246, 1.294, 1.321 + ], + "sigma": 0.005, + "sigma_Cb": 0.005 + } + }, + { + "rpi.contrast": + { + "ce_enable": 1, + "gamma_curve": + [ + 0,0, + 1024,5432.589474, + 2048,10065.38105, + 3072,13318.46737, + 4096,16504.72421, + 5120,19457.07789, + 6144,22409.43158, + 7168,24999.61263, + 8192,27749.32211, + 9216,30118.53474, + 10240,32374.56842, + 11264,34498.02105, + 12288,36621.47368, + 13312,38604.8, + 14336,40528.84211, + 15360,42218.98105, + 16384,43807.79789, + 18432,46757.99579, + 20480,49312.60632, + 22528,51472.70737, + 24576,53486.21474, + 26624,55245.33895, + 28672,56802.89684, + 30720,57986.42526, + 32768,59150.55158, + 36864,61452.93474, + 40960,63224.99368, + 45056,64624.10105, + 49152,65535, + 53248,65535, + 57344,65535, + 61440,65535, + 65535,65535 + ] + } + }, + { + "rpi.ccm": + { + "saturation": [0,0,100,0.6,1000,1,10000,1], + "ccms": [ + { + "ct": 3200, + "ccm": + [ + 1.58652, 0.12247, -0.70899, + -0.88406, 2.29465, -0.41059, + -0.56176, 0.41247, 1.14928 + ] + }, + { + "ct": 5000, + "ccm": + [ + 1.95623, 0.41006, -1.36629, + -0.78719, 2.27844, -0.49125, + -0.72722, 0.10062, 1.62659 + ] + }, + { + "ct": 6420, + "ccm": + [ + 1.81505, 0.31616, -1.13121, + -0.63029, 2.05535, -0.42506, + -0.50025, -0.11887, 1.61912 + ] + }, + { + "ct": 7900, + "ccm": + [ + 1.77947, 0.24161, -1.02108, + -0.55019, 1.96917, -0.41898, + -0.40238, -0.17695, 1.57932 + ] + }, + { + "ct": 8800, + "ccm": + [ + 1.77695, 0.21166, -0.98861, + -0.51589, 1.93469, -0.41881, + -0.36973, -0.19069, 1.56043 + ] + } + + ] + } + }, + { + "rpi.sharpen": { } + } + ] +}