[{"id":39851,"web_url":"https://patchwork.libcamera.org/comment/39851/","msgid":"<178490903803.1671930.8526572904747632943@ping.linuxembedded.co.uk>","date":"2026-07-24T16:03:58","subject":"Re: [PATCH v2 3/5] ipa: rpi: vc4: Add Mira220 tuning file","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Jacopo Mondi (2026-07-24 16:47:42)\n> From: Philippe Baetens <philippebaetens@gmail.com>\n> \n> Add tuning file for the Mira220 RGB version to the RaspberryPi VC4 IPA.\n> \n> This patch upports the Mira220 support available at\n> https://github.com/ams-OSRAM/libcamera.git at revision d7d5e17ec961\n> (\"update json files so they are truly mono\").\n\nAnd also here.\n\n\nAcked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> \n> Signed-off-by: Philippe Baetens <philippebaetens@gmail.com>\n> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n> Acked-by: Naushir Patuck <naush@raspberrypi.com>\n> ---\n>  src/ipa/rpi/vc4/data/meson.build  |   1 +\n>  src/ipa/rpi/vc4/data/mira220.json | 370 ++++++++++++++++++++++++++++++++++++++\n>  2 files changed, 371 insertions(+)\n> \n> diff --git a/src/ipa/rpi/vc4/data/meson.build b/src/ipa/rpi/vc4/data/meson.build\n> index 6efa53cb3873..763c7a0e8a58 100644\n> --- a/src/ipa/rpi/vc4/data/meson.build\n> +++ b/src/ipa/rpi/vc4/data/meson.build\n> @@ -21,6 +21,7 @@ conf_files = files([\n>      'imx708_noir.json',\n>      'imx708_wide.json',\n>      'imx708_wide_noir.json',\n> +    'mira220.json',\n>      'ov5647.json',\n>      'ov5647_noir.json',\n>      'ov64a40.json',\n> diff --git a/src/ipa/rpi/vc4/data/mira220.json b/src/ipa/rpi/vc4/data/mira220.json\n> new file mode 100644\n> index 000000000000..1b47c13d9463\n> --- /dev/null\n> +++ b/src/ipa/rpi/vc4/data/mira220.json\n> @@ -0,0 +1,370 @@\n> +{\n> +    \"version\": 2.0,\n> +    \"target\": \"bcm2835\",\n> +    \"algorithms\": [\n> +        {\n> +            \"rpi.black_level\":\n> +            {\n> +                \"black_level\": 2500\n> +            }\n> +        },\n> +        {\n> +            \"rpi.dpc\": { }\n> +        },\n> +        {\n> +            \"rpi.lux\":\n> +            {\n> +                \"reference_shutter_speed\": 33316,\n> +                \"reference_gain\": 1.0,\n> +                \"reference_aperture\": 1.0,\n> +                \"reference_lux\": 530,\n> +                \"reference_Y\": 9873\n> +            }\n> +        },\n> +        {\n> +            \"rpi.noise\":\n> +            {\n> +                \"reference_constant\": 0,\n> +                \"reference_slope\": 1.449\n> +            }\n> +        },\n> +        {\n> +            \"rpi.geq\":\n> +            {\n> +                \"offset\": 271,\n> +                \"slope\": 0.00179\n> +            }\n> +        },\n> +        {\n> +            \"rpi.sdn\": { }\n> +        },\n> +        {\n> +            \"rpi.awb\":\n> +            {\n> +                \"priors\": [\n> +                    {\n> +                        \"lux\": 0,\n> +                        \"prior\":\n> +                        [\n> +                            2000, 1.0,\n> +                            3000, 0.0,\n> +                            13000, 0.0\n> +                        ]\n> +                    },\n> +                    {\n> +                        \"lux\": 800,\n> +                        \"prior\":\n> +                        [\n> +                            2000, 0.0,\n> +                            6000, 2.0,\n> +                            13000, 2.0\n> +                        ]\n> +                    },\n> +                    {\n> +                        \"lux\": 1500,\n> +                        \"prior\":\n> +                        [\n> +                            2000, 0.0,\n> +                            4000, 1.0,\n> +                            6000, 6.0,\n> +                            6500, 7.0,\n> +                            7000, 1.0,\n> +                            13000, 1.0\n> +                        ]\n> +                    }\n> +                ],\n> +                \"modes\":\n> +                {\n> +                    \"auto\":\n> +                    {\n> +                        \"lo\": 2500,\n> +                        \"hi\": 8000\n> +                    },\n> +                    \"incandescent\":\n> +                    {\n> +                        \"lo\": 2500,\n> +                        \"hi\": 3000\n> +                    },\n> +                    \"tungsten\":\n> +                    {\n> +                        \"lo\": 3000,\n> +                        \"hi\": 3500\n> +                    },\n> +                    \"fluorescent\":\n> +                    {\n> +                        \"lo\": 4000,\n> +                        \"hi\": 4700\n> +                    },\n> +                    \"indoor\":\n> +                    {\n> +                        \"lo\": 3000,\n> +                        \"hi\": 5000\n> +                    },\n> +                    \"daylight\":\n> +                    {\n> +                        \"lo\": 5500,\n> +                        \"hi\": 6500\n> +                    },\n> +                    \"cloudy\":\n> +                    {\n> +                        \"lo\": 7000,\n> +                        \"hi\": 8600\n> +                    }\n> +                },\n> +                \"bayes\": 1,\n> +                \"ct_curve\":\n> +                [\n> +                    3200.0, 0.8663, 0.5414,\n> +                    5000.0, 0.7241, 0.6964,\n> +                    6420.0, 0.6597, 0.7718,\n> +                    7900.0, 0.6173, 0.8232,\n> +                    8800.0, 0.5982, 0.8468\n> +                ],\n> +                \"sensitivity_r\": 1.0,\n> +                \"sensitivity_b\": 1.0,\n> +                \"transverse_pos\": 0.03,\n> +                \"transverse_neg\": 0.03\n> +            }\n> +        },\n> +        {\n> +            \"rpi.agc\":\n> +            {\n> +                \"metering_modes\":\n> +                {\n> +                    \"centre-weighted\":\n> +                    {\n> +                        \"weights\": [ 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 ]\n> +                    },\n> +                    \"spot\":\n> +                    {\n> +                        \"weights\": [ 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]\n> +                    },\n> +                    \"matrix\":\n> +                    {\n> +                        \"weights\": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]\n> +                    }\n> +                },\n> +                \"exposure_modes\":\n> +                {\n> +                    \"normal\":\n> +                    {\n> +                        \"shutter\": [ 100, 10000, 30000, 60000, 120000 ],\n> +                        \"gain\": [ 1.0, 2.0, 4.0, 6.0, 6.0 ]\n> +                    },\n> +                    \"short\":\n> +                    {\n> +                        \"shutter\": [ 100, 5000, 10000, 20000, 120000 ],\n> +                        \"gain\": [ 1.0, 2.0, 4.0, 6.0, 6.0 ]\n> +                    }\n> +                },\n> +                \"constraint_modes\":\n> +                {\n> +                    \"normal\": [\n> +                        {\n> +                            \"bound\": \"LOWER\",\n> +                            \"q_lo\": 0.98,\n> +                            \"q_hi\": 1.0,\n> +                            \"y_target\":\n> +                            [\n> +                                0, 0.5,\n> +                                1000, 0.5\n> +                            ]\n> +                        }\n> +                    ],\n> +                    \"highlight\": [\n> +                        {\n> +                            \"bound\": \"LOWER\",\n> +                            \"q_lo\": 0.98,\n> +                            \"q_hi\": 1.0,\n> +                            \"y_target\":\n> +                            [\n> +                                0, 0.5,\n> +                                1000, 0.5\n> +                            ]\n> +                        },\n> +                        {\n> +                            \"bound\": \"UPPER\",\n> +                            \"q_lo\": 0.98,\n> +                            \"q_hi\": 1.0,\n> +                            \"y_target\":\n> +                            [\n> +                                0, 0.8,\n> +                                1000, 0.8\n> +                            ]\n> +                        }\n> +                    ]\n> +                },\n> +                \"y_target\":\n> +                [\n> +                    0, 0.16,\n> +                    1000, 0.165,\n> +                    10000, 0.17\n> +                ]\n> +            }\n> +        },\n> +        {\n> +            \"rpi.alsc\":\n> +            {\n> +                \"omega\": 1.3,\n> +                \"n_iter\": 100,\n> +                \"luminance_strength\": 0.5,\n> +                \"calibrations_Cr\": [\n> +                    {\n> +                        \"ct\": 5440,\n> +                        \"table\":\n> +                        [\n> +                            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,\n> +                            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,\n> +                            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,\n> +                            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,\n> +                            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,\n> +                            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,\n> +                            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,\n> +                            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,\n> +                            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,\n> +                            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,\n> +                            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,\n> +                            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\n> +                        ]\n> +                    }\n> +                ],\n> +                \"calibrations_Cb\": [\n> +                    {\n> +                        \"ct\": 5440,\n> +                        \"table\":\n> +                        [\n> +                            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,\n> +                            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,\n> +                            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,\n> +                            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,\n> +                            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,\n> +                            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,\n> +                            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,\n> +                            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,\n> +                            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,\n> +                            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,\n> +                            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,\n> +                            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\n> +                        ]\n> +                    }\n> +                ],\n> +                \"luminance_lut\":\n> +                [\n> +                    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,\n> +                    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,\n> +                    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,\n> +                    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,\n> +                    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,\n> +                    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,\n> +                    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,\n> +                    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,\n> +                    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,\n> +                    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,\n> +                    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,\n> +                    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\n> +                ],\n> +                \"sigma\": 0.005,\n> +                \"sigma_Cb\": 0.005\n> +            }\n> +        },\n> +        {\n> +            \"rpi.contrast\":\n> +            {\n> +                \"ce_enable\": 1,\n> +                \"gamma_curve\":\n> +                [\n> +                0,0,\n> +                1024,5432.589474,\n> +                2048,10065.38105,\n> +                3072,13318.46737,\n> +                4096,16504.72421,\n> +                5120,19457.07789,\n> +                6144,22409.43158,\n> +                7168,24999.61263,\n> +                8192,27749.32211,\n> +                9216,30118.53474,\n> +                10240,32374.56842,\n> +                11264,34498.02105,\n> +                12288,36621.47368,\n> +                13312,38604.8,\n> +                14336,40528.84211,\n> +                15360,42218.98105,\n> +                16384,43807.79789,\n> +                18432,46757.99579,\n> +                20480,49312.60632,\n> +                22528,51472.70737,\n> +                24576,53486.21474,\n> +                26624,55245.33895,\n> +                28672,56802.89684,\n> +                30720,57986.42526,\n> +                32768,59150.55158,\n> +                36864,61452.93474,\n> +                40960,63224.99368,\n> +                45056,64624.10105,\n> +                49152,65535,\n> +                53248,65535,\n> +                57344,65535,\n> +                61440,65535,\n> +                65535,65535\n> +                ]\n> +            }\n> +        },\n> +        {\n> +            \"rpi.ccm\":\n> +            {\n> +            \"saturation\": [0,0,100,0.6,1000,1,10000,1],\n> +                \"ccms\": [\n> +                    {\n> +                        \"ct\": 3200,\n> +                        \"ccm\":\n> +                        [\n> +                            1.58652, 0.12247, -0.70899,\n> +                            -0.88406, 2.29465, -0.41059,\n> +                            -0.56176, 0.41247, 1.14928\n> +                        ]\n> +                    },\n> +                    {\n> +                        \"ct\": 5000,\n> +                        \"ccm\":\n> +                        [\n> +                            1.95623, 0.41006, -1.36629,\n> +                            -0.78719, 2.27844, -0.49125,\n> +                            -0.72722, 0.10062, 1.62659\n> +                        ]\n> +                    },\n> +                    {\n> +                        \"ct\": 6420,\n> +                        \"ccm\":\n> +                        [\n> +                            1.81505, 0.31616, -1.13121,\n> +                            -0.63029, 2.05535, -0.42506,\n> +                            -0.50025, -0.11887, 1.61912\n> +                        ]\n> +                    },\n> +                    {\n> +                        \"ct\": 7900,\n> +                        \"ccm\":\n> +                        [\n> +                            1.77947, 0.24161, -1.02108,\n> +                            -0.55019, 1.96917, -0.41898,\n> +                            -0.40238, -0.17695, 1.57932\n> +                        ]\n> +                    },\n> +                    {\n> +                        \"ct\": 8800,\n> +                        \"ccm\":\n> +                        [\n> +                            1.77695, 0.21166, -0.98861,\n> +                            -0.51589, 1.93469, -0.41881,\n> +                            -0.36973, -0.19069, 1.56043\n> +                        ]\n> +                    }\n> +                    \n> +                ]\n> +            }\n> +        },\n> +        {\n> +            \"rpi.sharpen\": { }\n> +        }\n> +    ]\n> +}\n> \n> -- \n> 2.54.0\n>","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 6D156BDE17\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 24 Jul 2026 16:04:03 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1637A67F42;\n\tFri, 24 Jul 2026 18:04:03 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2CE1967F22\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 24 Jul 2026 18:04:01 +0200 (CEST)","from monstersaurus.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 85E4B73B;\n\tFri, 24 Jul 2026 18:02:59 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"AuF2A0iA\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1784908979;\n\tbh=KYse3vOtL6PumQib6yRWwAKONyCf6tXXNgJSkA8fu7g=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=AuF2A0iAj0e3pCjHB/mV2Q0GnLtzHgccPTWijYAXB6cuHdb2nmFleAhumDxsrjoC2\n\tTC5SlWJv3U8avmIWFlGEQXOqvnoH/NiqeK5qmW08aSKsj54bKSmyVhclUYPz5Ah5L3\n\toHtIoveeqjBdywwX5tYN5NCSm2ypaNECnsk4+qIc=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20260724-mira220-v2-3-240003749dd0@ideasonboard.com>","References":"<20260724-mira220-v2-0-240003749dd0@ideasonboard.com>\n\t<20260724-mira220-v2-3-240003749dd0@ideasonboard.com>","Subject":"Re: [PATCH v2 3/5] ipa: rpi: vc4: Add Mira220 tuning file","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Philippe Baetens <philippebaetens@gmail.com>,\n\tJacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tNaushir Patuck <naush@raspberrypi.com>","To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Fri, 24 Jul 2026 17:03:58 +0100","Message-ID":"<178490903803.1671930.8526572904747632943@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","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>"}}]