[libcamera-devel,3/3] ipa: raspberrypi: Add support for imx378 sensor
diff mbox series

Message ID 20210721115220.5090-4-david.plowman@raspberrypi.com
State Accepted
Headers show
Series
  • Raspberry Pi: support imx378 sensor
Related show

Commit Message

David Plowman July 21, 2021, 11:52 a.m. UTC
This commit adds a tuning file for the 12MP imx378 sensor. The sensor
actually shares the same driver (and CamHelper) as the imx477 so only
a new tuning file is required. The default choice of imx477.json can
be overridden by pointing LIBCAMERA_RPI_TUNING_FILE at a version of
the new imx378.json file.

Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
---
 src/ipa/raspberrypi/data/imx378.json | 338 +++++++++++++++++++++++++++
 src/ipa/raspberrypi/data/meson.build |   1 +
 2 files changed, 339 insertions(+)
 create mode 100644 src/ipa/raspberrypi/data/imx378.json

Comments

Naushir Patuck July 21, 2021, 1:10 p.m. UTC | #1
Hi David,

Thank you for your patch.

On Wed, 21 Jul 2021 at 12:52, David Plowman <david.plowman@raspberrypi.com>
wrote:

> This commit adds a tuning file for the 12MP imx378 sensor. The sensor
> actually shares the same driver (and CamHelper) as the imx477 so only
> a new tuning file is required. The default choice of imx477.json can
> be overridden by pointing LIBCAMERA_RPI_TUNING_FILE at a version of
> the new imx378.json file.
>
> Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
>

Reviewed-by: Naushir Patuck <naush@raspberrypi.com>


> ---
>  src/ipa/raspberrypi/data/imx378.json | 338 +++++++++++++++++++++++++++
>  src/ipa/raspberrypi/data/meson.build |   1 +
>  2 files changed, 339 insertions(+)
>  create mode 100644 src/ipa/raspberrypi/data/imx378.json
>
> diff --git a/src/ipa/raspberrypi/data/imx378.json
> b/src/ipa/raspberrypi/data/imx378.json
> new file mode 100644
> index 00000000..3c2164e2
> --- /dev/null
> +++ b/src/ipa/raspberrypi/data/imx378.json
> @@ -0,0 +1,338 @@
> +{
> +    "rpi.black_level":
> +    {
> +        "black_level": 4096
> +    },
> +    "rpi.dpc":
> +    {
> +    },
> +    "rpi.lux":
> +    {
> +        "reference_shutter_speed": 9999,
> +        "reference_gain": 1.95,
> +        "reference_aperture": 1.0,
> +        "reference_lux": 1000,
> +        "reference_Y": 12996
> +    },
> +    "rpi.noise":
> +    {
> +        "reference_constant": 0,
> +        "reference_slope": 2.641
> +    },
> +    "rpi.geq":
> +    {
> +        "offset": 235,
> +        "slope": 0.00902
> +    },
> +    "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": 8100
> +            }
> +        },
> +        "bayes": 1,
> +        "ct_curve":
> +        [
> +            2850.0, 0.6361, 0.3911, 3550.0, 0.5386, 0.5077, 4500.0,
> 0.4472, 0.6171, 5600.0, 0.3906, 0.6848, 8000.0, 0.3412, 0.7441
> +        ],
> +        "sensitivity_r": 1.0,
> +        "sensitivity_b": 1.0,
> +        "transverse_pos": 0.01667,
> +        "transverse_neg": 0.01195
> +    },
> +    "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": 2800, "table":
> +                [
> +                    1.604, 1.601, 1.593, 1.581, 1.568, 1.561, 1.561,
> 1.561, 1.561, 1.567, 1.582, 1.596, 1.609, 1.622, 1.632, 1.636,
> +                    1.601, 1.594, 1.586, 1.571, 1.555, 1.546, 1.543,
> 1.543, 1.547, 1.555, 1.572, 1.584, 1.599, 1.614, 1.625, 1.632,
> +                    1.599, 1.586, 1.571, 1.555, 1.542, 1.528, 1.518,
> 1.518, 1.523, 1.537, 1.555, 1.572, 1.589, 1.607, 1.622, 1.629,
> +                    1.597, 1.579, 1.561, 1.542, 1.528, 1.512, 1.493,
> 1.493, 1.499, 1.523, 1.537, 1.563, 1.582, 1.601, 1.619, 1.629,
> +                    1.597, 1.577, 1.557, 1.535, 1.512, 1.493, 1.481,
> 1.479, 1.492, 1.499, 1.524, 1.555, 1.578, 1.599, 1.619, 1.629,
> +                    1.597, 1.577, 1.557, 1.534, 1.508, 1.483, 1.476,
> 1.476, 1.481, 1.496, 1.522, 1.554, 1.578, 1.599, 1.619, 1.629,
> +                    1.597, 1.578, 1.557, 1.534, 1.508, 1.483, 1.481,
> 1.479, 1.481, 1.496, 1.522, 1.554, 1.579, 1.601, 1.619, 1.631,
> +                    1.597, 1.581, 1.562, 1.539, 1.517, 1.504, 1.483,
> 1.481, 1.496, 1.511, 1.531, 1.561, 1.585, 1.607, 1.623, 1.632,
> +                    1.601, 1.589, 1.569, 1.554, 1.539, 1.517, 1.504,
> 1.504, 1.511, 1.531, 1.553, 1.573, 1.596, 1.614, 1.629, 1.636,
> +                    1.609, 1.601, 1.586, 1.569, 1.554, 1.542, 1.535,
> 1.535, 1.541, 1.553, 1.573, 1.592, 1.608, 1.625, 1.637, 1.645,
> +                    1.617, 1.611, 1.601, 1.586, 1.574, 1.565, 1.564,
> 1.564, 1.571, 1.579, 1.592, 1.608, 1.622, 1.637, 1.646, 1.654,
> +                    1.619, 1.617, 1.611, 1.601, 1.588, 1.585, 1.585,
> 1.585, 1.588, 1.592, 1.607, 1.622, 1.637, 1.645, 1.654, 1.655
> +                ]
> +            },
> +            {
> +                "ct": 5500, "table":
> +                [
> +                    2.664, 2.658, 2.645, 2.629, 2.602, 2.602, 2.602,
> 2.606, 2.617, 2.628, 2.649, 2.677, 2.699, 2.722, 2.736, 2.747,
> +                    2.658, 2.653, 2.629, 2.605, 2.576, 2.575, 2.577,
> 2.592, 2.606, 2.618, 2.629, 2.651, 2.678, 2.707, 2.727, 2.741,
> +                    2.649, 2.631, 2.605, 2.576, 2.563, 2.552, 2.552,
> 2.557, 2.577, 2.604, 2.619, 2.641, 2.669, 2.698, 2.721, 2.741,
> +                    2.643, 2.613, 2.583, 2.563, 2.552, 2.531, 2.527,
> 2.527, 2.551, 2.577, 2.604, 2.638, 2.665, 2.694, 2.721, 2.741,
> +                    2.643, 2.606, 2.575, 2.558, 2.531, 2.516, 2.504,
> 2.516, 2.527, 2.551, 2.596, 2.635, 2.665, 2.694, 2.721, 2.741,
> +                    2.643, 2.606, 2.575, 2.558, 2.531, 2.503, 2.501,
> 2.502, 2.522, 2.551, 2.592, 2.635, 2.669, 2.696, 2.727, 2.744,
> +                    2.648, 2.611, 2.579, 2.558, 2.532, 2.511, 2.502,
> 2.511, 2.522, 2.552, 2.592, 2.642, 2.673, 2.702, 2.731, 2.752,
> +                    2.648, 2.619, 2.589, 2.571, 2.556, 2.532, 2.519,
> 2.522, 2.552, 2.568, 2.605, 2.648, 2.683, 2.715, 2.743, 2.758,
> +                    2.659, 2.637, 2.613, 2.589, 2.571, 2.556, 2.555,
> 2.555, 2.568, 2.605, 2.641, 2.671, 2.699, 2.729, 2.758, 2.776,
> +                    2.679, 2.665, 2.637, 2.613, 2.602, 2.599, 2.599,
> 2.606, 2.619, 2.641, 2.671, 2.698, 2.723, 2.754, 2.776, 2.787,
> +                    2.695, 2.684, 2.671, 2.646, 2.636, 2.636, 2.641,
> 2.648, 2.661, 2.681, 2.698, 2.723, 2.751, 2.776, 2.788, 2.803,
> +                    2.702, 2.699, 2.684, 2.671, 2.664, 2.664, 2.664,
> 2.668, 2.681, 2.698, 2.723, 2.751, 2.773, 2.788, 2.803, 2.805
> +                ]
> +            }
> +        ],
> +        "calibrations_Cb":
> +        [
> +            {
> +                "ct": 2800, "table":
> +                [
> +                    2.876, 2.868, 2.863, 2.851, 2.846, 2.846, 2.847,
> 2.851, 2.851, 2.857, 2.867, 2.875, 2.889, 2.899, 2.913, 2.926,
> +                    2.863, 2.861, 2.856, 2.846, 2.846, 2.847, 2.848,
> 2.851, 2.857, 2.859, 2.875, 2.882, 2.886, 2.896, 2.909, 2.917,
> +                    2.861, 2.856, 2.846, 2.841, 2.841, 2.855, 2.867,
> 2.875, 2.888, 2.888, 2.885, 2.883, 2.886, 2.889, 2.901, 2.913,
> +                    2.858, 2.851, 2.846, 2.846, 2.855, 2.867, 2.884,
> 2.895, 2.902, 2.902, 2.901, 2.891, 2.891, 2.894, 2.901, 2.909,
> +                    2.858, 2.851, 2.846, 2.846, 2.867, 2.884, 2.895,
> 2.902, 2.909, 2.915, 2.911, 2.901, 2.895, 2.898, 2.904, 2.909,
> +                    2.858, 2.851, 2.849, 2.853, 2.874, 2.888, 2.901,
> 2.909, 2.917, 2.922, 2.917, 2.911, 2.901, 2.899, 2.905, 2.908,
> +                    2.861, 2.855, 2.853, 2.855, 2.874, 2.888, 2.901,
> 2.913, 2.918, 2.922, 2.921, 2.911, 2.901, 2.901, 2.907, 2.908,
> +                    2.862, 2.859, 2.855, 2.856, 2.872, 2.885, 2.899,
> 2.906, 2.915, 2.917, 2.911, 2.907, 2.907, 2.907, 2.908, 2.909,
> +                    2.863, 2.863, 2.859, 2.864, 2.871, 2.881, 2.885,
> 2.899, 2.905, 2.905, 2.904, 2.904, 2.907, 2.909, 2.913, 2.913,
> +                    2.866, 2.865, 2.865, 2.867, 2.868, 2.872, 2.881,
> 2.885, 2.889, 2.894, 2.895, 2.902, 2.906, 2.913, 2.914, 2.917,
> +                    2.875, 2.875, 2.871, 2.871, 2.871, 2.871, 2.869,
> 2.869, 2.878, 2.889, 2.894, 2.895, 2.906, 2.914, 2.917, 2.921,
> +                    2.882, 2.879, 2.876, 2.874, 2.871, 2.871, 2.869,
> 2.869, 2.869, 2.878, 2.891, 2.894, 2.905, 2.914, 2.919, 2.921
> +                ]
> +            },
> +            {
> +                "ct": 5500, "table":
> +                [
> +                    1.488, 1.488, 1.488, 1.488, 1.491, 1.492, 1.492,
> 1.491, 1.491, 1.491, 1.492, 1.495, 1.497, 1.499, 1.499, 1.503,
> +                    1.482, 1.485, 1.485, 1.487, 1.489, 1.492, 1.492,
> 1.492, 1.492, 1.492, 1.494, 1.494, 1.492, 1.491, 1.493, 1.494,
> +                    1.482, 1.482, 1.484, 1.485, 1.487, 1.492, 1.496,
> 1.498, 1.499, 1.498, 1.494, 1.492, 1.491, 1.491, 1.491, 1.491,
> +                    1.481, 1.481, 1.482, 1.485, 1.491, 1.496, 1.498,
> 1.499, 1.501, 1.499, 1.498, 1.493, 1.491, 1.488, 1.488, 1.488,
> +                    1.481, 1.481, 1.481, 1.483, 1.491, 1.497, 1.498,
> 1.499, 1.501, 1.499, 1.498, 1.492, 1.488, 1.485, 1.483, 1.483,
> +                    1.479, 1.479, 1.481, 1.482, 1.489, 1.495, 1.497,
> 1.498, 1.499, 1.499, 1.495, 1.492, 1.485, 1.482, 1.482, 1.481,
> +                    1.479, 1.479, 1.479, 1.481, 1.489, 1.494, 1.496,
> 1.497, 1.497, 1.496, 1.495, 1.489, 1.482, 1.481, 1.479, 1.477,
> +                    1.478, 1.478, 1.479, 1.481, 1.487, 1.491, 1.494,
> 1.496, 1.496, 1.495, 1.492, 1.487, 1.482, 1.479, 1.478, 1.476,
> +                    1.478, 1.478, 1.479, 1.482, 1.486, 1.488, 1.491,
> 1.493, 1.493, 1.492, 1.487, 1.484, 1.481, 1.479, 1.476, 1.476,
> +                    1.477, 1.479, 1.481, 1.483, 1.485, 1.486, 1.488,
> 1.488, 1.487, 1.487, 1.484, 1.483, 1.481, 1.479, 1.476, 1.476,
> +                    1.477, 1.479, 1.482, 1.483, 1.484, 1.485, 1.484,
> 1.482, 1.482, 1.484, 1.483, 1.482, 1.481, 1.479, 1.477, 1.476,
> +                    1.477, 1.479, 1.482, 1.483, 1.484, 1.484, 1.482,
> 1.482, 1.482, 1.482, 1.482, 1.481, 1.479, 1.479, 1.479, 1.479
> +                ]
> +            }
> +        ],
> +        "luminance_lut":
> +        [
> +            2.764, 2.654, 2.321, 2.043, 1.768, 1.594, 1.558, 1.558,
> 1.558, 1.568, 1.661, 1.904, 2.193, 2.497, 2.888, 3.043,
> +            2.654, 2.373, 2.049, 1.819, 1.569, 1.446, 1.381, 1.356,
> 1.356, 1.403, 1.501, 1.679, 1.939, 2.218, 2.586, 2.888,
> +            2.376, 2.154, 1.819, 1.569, 1.438, 1.301, 1.246, 1.224,
> 1.224, 1.263, 1.349, 1.501, 1.679, 1.985, 2.359, 2.609,
> +            2.267, 1.987, 1.662, 1.438, 1.301, 1.235, 1.132, 1.105,
> 1.105, 1.164, 1.263, 1.349, 1.528, 1.808, 2.184, 2.491,
> +            2.218, 1.876, 1.568, 1.367, 1.235, 1.132, 1.087, 1.022,
> 1.023, 1.104, 1.164, 1.278, 1.439, 1.695, 2.066, 2.429,
> +            2.218, 1.832, 1.533, 1.341, 1.206, 1.089, 1.013, 1.002,
> 1.013, 1.026, 1.122, 1.246, 1.399, 1.642, 2.004, 2.426,
> +            2.218, 1.832, 1.533, 1.341, 1.206, 1.089, 1.011, 1.001,
> 1.009, 1.026, 1.122, 1.246, 1.399, 1.642, 2.004, 2.426,
> +            2.224, 1.896, 1.584, 1.382, 1.248, 1.147, 1.088, 1.016,
> 1.026, 1.118, 1.168, 1.283, 1.444, 1.697, 2.066, 2.428,
> +            2.292, 2.019, 1.689, 1.462, 1.322, 1.247, 1.147, 1.118,
> 1.118, 1.168, 1.275, 1.358, 1.532, 1.809, 2.189, 2.491,
> +            2.444, 2.204, 1.856, 1.606, 1.462, 1.322, 1.257, 1.234,
> 1.234, 1.275, 1.358, 1.516, 1.686, 1.993, 2.371, 2.622,
> +            2.748, 2.444, 2.108, 1.856, 1.606, 1.476, 1.399, 1.376,
> 1.376, 1.422, 1.516, 1.686, 1.968, 2.238, 2.611, 2.935,
> +            2.862, 2.748, 2.395, 2.099, 1.811, 1.621, 1.582, 1.582,
> 1.582, 1.592, 1.677, 1.919, 2.223, 2.534, 2.935, 3.078
> +        ],
> +        "sigma": 0.00428,
> +        "sigma_Cb": 0.00363
> +    },
> +    "rpi.contrast":
> +    {
> +        "ce_enable": 1,
> +        "gamma_curve":
> +        [
> +            0, 0, 1024, 5040, 2048, 9338, 3072, 12356, 4096, 15312, 5120,
> 18051, 6144, 20790, 7168, 23193,
> +            8192, 25744, 9216, 27942, 10240, 30035, 11264, 32005, 12288,
> 33975, 13312, 35815, 14336, 37600, 15360, 39168,
> +            16384, 40642, 18432, 43379, 20480, 45749, 22528, 47753,
> 24576, 49621, 26624, 51253, 28672, 52698, 30720, 53796,
> +            32768, 54876, 36864, 57012, 40960, 58656, 45056, 59954,
> 49152, 61183, 53248, 62355, 57344, 63419, 61440, 64476,
> +            65535, 65535
> +        ]
> +    },
> +    "rpi.ccm":
> +    {
> +        "ccms":
> +        [
> +            {
> +                "ct": 2850, "ccm":
> +                [
> +                    1.42601, -0.20537, -0.22063, -0.47682, 1.81987,
> -0.34305, 0.01854, -0.86036, 1.84181
> +                ]
> +            },
> +            {
> +                "ct": 2900, "ccm":
> +                [
> +                    1.29755, 0.04602, -0.34356, -0.41491, 1.73477,
> -0.31987, -0.01345, -0.97115, 1.98459
> +                ]
> +            },
> +            {
> +                "ct": 3550, "ccm":
> +                [
> +                    1.49811, -0.33412, -0.16398, -0.40869, 1.72995,
> -0.32127, -0.01924, -0.62181, 1.64105
> +                ]
> +            },
> +            {
> +                "ct": 4500, "ccm":
> +                [
> +                    1.47015, -0.29229, -0.17786, -0.36561, 1.88919,
> -0.52358, -0.03552, -0.56717, 1.60269
> +                ]
> +            },
> +            {
> +                "ct": 5600, "ccm":
> +                [
> +                    1.60962, -0.47434, -0.13528, -0.32701, 1.73797,
> -0.41096, -0.07626, -0.40171, 1.47796
> +                ]
> +            },
> +            {
> +                "ct": 8000, "ccm":
> +                [
> +                    1.54642, -0.20396, -0.34246, -0.31748, 2.22559,
> -0.90811, -0.10035, -0.65877, 1.75912
> +                ]
> +            }
> +        ]
> +    },
> +    "rpi.sharpen":
> +    {
> +    }
> +}
> diff --git a/src/ipa/raspberrypi/data/meson.build
> b/src/ipa/raspberrypi/data/meson.build
> index abb1f928..68433fc2 100644
> --- a/src/ipa/raspberrypi/data/meson.build
> +++ b/src/ipa/raspberrypi/data/meson.build
> @@ -3,6 +3,7 @@
>  conf_files = files([
>      'imx219.json',
>      'imx290.json',
> +    'imx378.json',
>      'imx477.json',
>      'ov5647.json',
>      'ov9281.json',
> --
> 2.20.1
>
>
Kieran Bingham July 26, 2021, 10:35 a.m. UTC | #2
Hi David,

On 21/07/2021 12:52, David Plowman wrote:
> This commit adds a tuning file for the 12MP imx378 sensor. The sensor
> actually shares the same driver (and CamHelper) as the imx477 so only
> a new tuning file is required. The default choice of imx477.json can
> be overridden by pointing LIBCAMERA_RPI_TUNING_FILE at a version of
> the new imx378.json file.
> 
> Signed-off-by: David Plowman <david.plowman@raspberrypi.com>

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> ---
>  src/ipa/raspberrypi/data/imx378.json | 338 +++++++++++++++++++++++++++
>  src/ipa/raspberrypi/data/meson.build |   1 +
>  2 files changed, 339 insertions(+)
>  create mode 100644 src/ipa/raspberrypi/data/imx378.json
> 
> diff --git a/src/ipa/raspberrypi/data/imx378.json b/src/ipa/raspberrypi/data/imx378.json
> new file mode 100644
> index 00000000..3c2164e2
> --- /dev/null
> +++ b/src/ipa/raspberrypi/data/imx378.json
> @@ -0,0 +1,338 @@
> +{
> +    "rpi.black_level":
> +    {
> +        "black_level": 4096
> +    },
> +    "rpi.dpc":
> +    {
> +    },
> +    "rpi.lux":
> +    {
> +        "reference_shutter_speed": 9999,
> +        "reference_gain": 1.95,
> +        "reference_aperture": 1.0,
> +        "reference_lux": 1000,
> +        "reference_Y": 12996
> +    },
> +    "rpi.noise":
> +    {
> +        "reference_constant": 0,
> +        "reference_slope": 2.641
> +    },
> +    "rpi.geq":
> +    {
> +        "offset": 235,
> +        "slope": 0.00902
> +    },
> +    "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": 8100
> +            }
> +        },
> +        "bayes": 1,
> +        "ct_curve":
> +        [
> +            2850.0, 0.6361, 0.3911, 3550.0, 0.5386, 0.5077, 4500.0, 0.4472, 0.6171, 5600.0, 0.3906, 0.6848, 8000.0, 0.3412, 0.7441
> +        ],
> +        "sensitivity_r": 1.0,
> +        "sensitivity_b": 1.0,
> +        "transverse_pos": 0.01667,
> +        "transverse_neg": 0.01195
> +    },
> +    "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": 2800, "table":
> +                [
> +                    1.604, 1.601, 1.593, 1.581, 1.568, 1.561, 1.561, 1.561, 1.561, 1.567, 1.582, 1.596, 1.609, 1.622, 1.632, 1.636,
> +                    1.601, 1.594, 1.586, 1.571, 1.555, 1.546, 1.543, 1.543, 1.547, 1.555, 1.572, 1.584, 1.599, 1.614, 1.625, 1.632,
> +                    1.599, 1.586, 1.571, 1.555, 1.542, 1.528, 1.518, 1.518, 1.523, 1.537, 1.555, 1.572, 1.589, 1.607, 1.622, 1.629,
> +                    1.597, 1.579, 1.561, 1.542, 1.528, 1.512, 1.493, 1.493, 1.499, 1.523, 1.537, 1.563, 1.582, 1.601, 1.619, 1.629,
> +                    1.597, 1.577, 1.557, 1.535, 1.512, 1.493, 1.481, 1.479, 1.492, 1.499, 1.524, 1.555, 1.578, 1.599, 1.619, 1.629,
> +                    1.597, 1.577, 1.557, 1.534, 1.508, 1.483, 1.476, 1.476, 1.481, 1.496, 1.522, 1.554, 1.578, 1.599, 1.619, 1.629,
> +                    1.597, 1.578, 1.557, 1.534, 1.508, 1.483, 1.481, 1.479, 1.481, 1.496, 1.522, 1.554, 1.579, 1.601, 1.619, 1.631,
> +                    1.597, 1.581, 1.562, 1.539, 1.517, 1.504, 1.483, 1.481, 1.496, 1.511, 1.531, 1.561, 1.585, 1.607, 1.623, 1.632,
> +                    1.601, 1.589, 1.569, 1.554, 1.539, 1.517, 1.504, 1.504, 1.511, 1.531, 1.553, 1.573, 1.596, 1.614, 1.629, 1.636,
> +                    1.609, 1.601, 1.586, 1.569, 1.554, 1.542, 1.535, 1.535, 1.541, 1.553, 1.573, 1.592, 1.608, 1.625, 1.637, 1.645,
> +                    1.617, 1.611, 1.601, 1.586, 1.574, 1.565, 1.564, 1.564, 1.571, 1.579, 1.592, 1.608, 1.622, 1.637, 1.646, 1.654,
> +                    1.619, 1.617, 1.611, 1.601, 1.588, 1.585, 1.585, 1.585, 1.588, 1.592, 1.607, 1.622, 1.637, 1.645, 1.654, 1.655
> +                ]
> +            },
> +            {
> +                "ct": 5500, "table":
> +                [
> +                    2.664, 2.658, 2.645, 2.629, 2.602, 2.602, 2.602, 2.606, 2.617, 2.628, 2.649, 2.677, 2.699, 2.722, 2.736, 2.747,
> +                    2.658, 2.653, 2.629, 2.605, 2.576, 2.575, 2.577, 2.592, 2.606, 2.618, 2.629, 2.651, 2.678, 2.707, 2.727, 2.741,
> +                    2.649, 2.631, 2.605, 2.576, 2.563, 2.552, 2.552, 2.557, 2.577, 2.604, 2.619, 2.641, 2.669, 2.698, 2.721, 2.741,
> +                    2.643, 2.613, 2.583, 2.563, 2.552, 2.531, 2.527, 2.527, 2.551, 2.577, 2.604, 2.638, 2.665, 2.694, 2.721, 2.741,
> +                    2.643, 2.606, 2.575, 2.558, 2.531, 2.516, 2.504, 2.516, 2.527, 2.551, 2.596, 2.635, 2.665, 2.694, 2.721, 2.741,
> +                    2.643, 2.606, 2.575, 2.558, 2.531, 2.503, 2.501, 2.502, 2.522, 2.551, 2.592, 2.635, 2.669, 2.696, 2.727, 2.744,
> +                    2.648, 2.611, 2.579, 2.558, 2.532, 2.511, 2.502, 2.511, 2.522, 2.552, 2.592, 2.642, 2.673, 2.702, 2.731, 2.752,
> +                    2.648, 2.619, 2.589, 2.571, 2.556, 2.532, 2.519, 2.522, 2.552, 2.568, 2.605, 2.648, 2.683, 2.715, 2.743, 2.758,
> +                    2.659, 2.637, 2.613, 2.589, 2.571, 2.556, 2.555, 2.555, 2.568, 2.605, 2.641, 2.671, 2.699, 2.729, 2.758, 2.776,
> +                    2.679, 2.665, 2.637, 2.613, 2.602, 2.599, 2.599, 2.606, 2.619, 2.641, 2.671, 2.698, 2.723, 2.754, 2.776, 2.787,
> +                    2.695, 2.684, 2.671, 2.646, 2.636, 2.636, 2.641, 2.648, 2.661, 2.681, 2.698, 2.723, 2.751, 2.776, 2.788, 2.803,
> +                    2.702, 2.699, 2.684, 2.671, 2.664, 2.664, 2.664, 2.668, 2.681, 2.698, 2.723, 2.751, 2.773, 2.788, 2.803, 2.805
> +                ]
> +            }
> +        ],
> +        "calibrations_Cb":
> +        [
> +            {
> +                "ct": 2800, "table":
> +                [
> +                    2.876, 2.868, 2.863, 2.851, 2.846, 2.846, 2.847, 2.851, 2.851, 2.857, 2.867, 2.875, 2.889, 2.899, 2.913, 2.926,
> +                    2.863, 2.861, 2.856, 2.846, 2.846, 2.847, 2.848, 2.851, 2.857, 2.859, 2.875, 2.882, 2.886, 2.896, 2.909, 2.917,
> +                    2.861, 2.856, 2.846, 2.841, 2.841, 2.855, 2.867, 2.875, 2.888, 2.888, 2.885, 2.883, 2.886, 2.889, 2.901, 2.913,
> +                    2.858, 2.851, 2.846, 2.846, 2.855, 2.867, 2.884, 2.895, 2.902, 2.902, 2.901, 2.891, 2.891, 2.894, 2.901, 2.909,
> +                    2.858, 2.851, 2.846, 2.846, 2.867, 2.884, 2.895, 2.902, 2.909, 2.915, 2.911, 2.901, 2.895, 2.898, 2.904, 2.909,
> +                    2.858, 2.851, 2.849, 2.853, 2.874, 2.888, 2.901, 2.909, 2.917, 2.922, 2.917, 2.911, 2.901, 2.899, 2.905, 2.908,
> +                    2.861, 2.855, 2.853, 2.855, 2.874, 2.888, 2.901, 2.913, 2.918, 2.922, 2.921, 2.911, 2.901, 2.901, 2.907, 2.908,
> +                    2.862, 2.859, 2.855, 2.856, 2.872, 2.885, 2.899, 2.906, 2.915, 2.917, 2.911, 2.907, 2.907, 2.907, 2.908, 2.909,
> +                    2.863, 2.863, 2.859, 2.864, 2.871, 2.881, 2.885, 2.899, 2.905, 2.905, 2.904, 2.904, 2.907, 2.909, 2.913, 2.913,
> +                    2.866, 2.865, 2.865, 2.867, 2.868, 2.872, 2.881, 2.885, 2.889, 2.894, 2.895, 2.902, 2.906, 2.913, 2.914, 2.917,
> +                    2.875, 2.875, 2.871, 2.871, 2.871, 2.871, 2.869, 2.869, 2.878, 2.889, 2.894, 2.895, 2.906, 2.914, 2.917, 2.921,
> +                    2.882, 2.879, 2.876, 2.874, 2.871, 2.871, 2.869, 2.869, 2.869, 2.878, 2.891, 2.894, 2.905, 2.914, 2.919, 2.921
> +                ]
> +            },
> +            {
> +                "ct": 5500, "table":
> +                [
> +                    1.488, 1.488, 1.488, 1.488, 1.491, 1.492, 1.492, 1.491, 1.491, 1.491, 1.492, 1.495, 1.497, 1.499, 1.499, 1.503,
> +                    1.482, 1.485, 1.485, 1.487, 1.489, 1.492, 1.492, 1.492, 1.492, 1.492, 1.494, 1.494, 1.492, 1.491, 1.493, 1.494,
> +                    1.482, 1.482, 1.484, 1.485, 1.487, 1.492, 1.496, 1.498, 1.499, 1.498, 1.494, 1.492, 1.491, 1.491, 1.491, 1.491,
> +                    1.481, 1.481, 1.482, 1.485, 1.491, 1.496, 1.498, 1.499, 1.501, 1.499, 1.498, 1.493, 1.491, 1.488, 1.488, 1.488,
> +                    1.481, 1.481, 1.481, 1.483, 1.491, 1.497, 1.498, 1.499, 1.501, 1.499, 1.498, 1.492, 1.488, 1.485, 1.483, 1.483,
> +                    1.479, 1.479, 1.481, 1.482, 1.489, 1.495, 1.497, 1.498, 1.499, 1.499, 1.495, 1.492, 1.485, 1.482, 1.482, 1.481,
> +                    1.479, 1.479, 1.479, 1.481, 1.489, 1.494, 1.496, 1.497, 1.497, 1.496, 1.495, 1.489, 1.482, 1.481, 1.479, 1.477,
> +                    1.478, 1.478, 1.479, 1.481, 1.487, 1.491, 1.494, 1.496, 1.496, 1.495, 1.492, 1.487, 1.482, 1.479, 1.478, 1.476,
> +                    1.478, 1.478, 1.479, 1.482, 1.486, 1.488, 1.491, 1.493, 1.493, 1.492, 1.487, 1.484, 1.481, 1.479, 1.476, 1.476,
> +                    1.477, 1.479, 1.481, 1.483, 1.485, 1.486, 1.488, 1.488, 1.487, 1.487, 1.484, 1.483, 1.481, 1.479, 1.476, 1.476,
> +                    1.477, 1.479, 1.482, 1.483, 1.484, 1.485, 1.484, 1.482, 1.482, 1.484, 1.483, 1.482, 1.481, 1.479, 1.477, 1.476,
> +                    1.477, 1.479, 1.482, 1.483, 1.484, 1.484, 1.482, 1.482, 1.482, 1.482, 1.482, 1.481, 1.479, 1.479, 1.479, 1.479
> +                ]
> +            }
> +        ],
> +        "luminance_lut":
> +        [
> +            2.764, 2.654, 2.321, 2.043, 1.768, 1.594, 1.558, 1.558, 1.558, 1.568, 1.661, 1.904, 2.193, 2.497, 2.888, 3.043,
> +            2.654, 2.373, 2.049, 1.819, 1.569, 1.446, 1.381, 1.356, 1.356, 1.403, 1.501, 1.679, 1.939, 2.218, 2.586, 2.888,
> +            2.376, 2.154, 1.819, 1.569, 1.438, 1.301, 1.246, 1.224, 1.224, 1.263, 1.349, 1.501, 1.679, 1.985, 2.359, 2.609,
> +            2.267, 1.987, 1.662, 1.438, 1.301, 1.235, 1.132, 1.105, 1.105, 1.164, 1.263, 1.349, 1.528, 1.808, 2.184, 2.491,
> +            2.218, 1.876, 1.568, 1.367, 1.235, 1.132, 1.087, 1.022, 1.023, 1.104, 1.164, 1.278, 1.439, 1.695, 2.066, 2.429,
> +            2.218, 1.832, 1.533, 1.341, 1.206, 1.089, 1.013, 1.002, 1.013, 1.026, 1.122, 1.246, 1.399, 1.642, 2.004, 2.426,
> +            2.218, 1.832, 1.533, 1.341, 1.206, 1.089, 1.011, 1.001, 1.009, 1.026, 1.122, 1.246, 1.399, 1.642, 2.004, 2.426,
> +            2.224, 1.896, 1.584, 1.382, 1.248, 1.147, 1.088, 1.016, 1.026, 1.118, 1.168, 1.283, 1.444, 1.697, 2.066, 2.428,
> +            2.292, 2.019, 1.689, 1.462, 1.322, 1.247, 1.147, 1.118, 1.118, 1.168, 1.275, 1.358, 1.532, 1.809, 2.189, 2.491,
> +            2.444, 2.204, 1.856, 1.606, 1.462, 1.322, 1.257, 1.234, 1.234, 1.275, 1.358, 1.516, 1.686, 1.993, 2.371, 2.622,
> +            2.748, 2.444, 2.108, 1.856, 1.606, 1.476, 1.399, 1.376, 1.376, 1.422, 1.516, 1.686, 1.968, 2.238, 2.611, 2.935,
> +            2.862, 2.748, 2.395, 2.099, 1.811, 1.621, 1.582, 1.582, 1.582, 1.592, 1.677, 1.919, 2.223, 2.534, 2.935, 3.078
> +        ],
> +        "sigma": 0.00428,
> +        "sigma_Cb": 0.00363
> +    },
> +    "rpi.contrast":
> +    {
> +        "ce_enable": 1,
> +        "gamma_curve":
> +        [
> +            0, 0, 1024, 5040, 2048, 9338, 3072, 12356, 4096, 15312, 5120, 18051, 6144, 20790, 7168, 23193,
> +            8192, 25744, 9216, 27942, 10240, 30035, 11264, 32005, 12288, 33975, 13312, 35815, 14336, 37600, 15360, 39168,
> +            16384, 40642, 18432, 43379, 20480, 45749, 22528, 47753, 24576, 49621, 26624, 51253, 28672, 52698, 30720, 53796,
> +            32768, 54876, 36864, 57012, 40960, 58656, 45056, 59954, 49152, 61183, 53248, 62355, 57344, 63419, 61440, 64476,
> +            65535, 65535
> +        ]
> +    },
> +    "rpi.ccm":
> +    {
> +        "ccms":
> +        [
> +            {
> +                "ct": 2850, "ccm":
> +                [
> +                    1.42601, -0.20537, -0.22063, -0.47682, 1.81987, -0.34305, 0.01854, -0.86036, 1.84181
> +                ]
> +            },
> +            {
> +                "ct": 2900, "ccm":
> +                [
> +                    1.29755, 0.04602, -0.34356, -0.41491, 1.73477, -0.31987, -0.01345, -0.97115, 1.98459
> +                ]
> +            },
> +            {
> +                "ct": 3550, "ccm":
> +                [
> +                    1.49811, -0.33412, -0.16398, -0.40869, 1.72995, -0.32127, -0.01924, -0.62181, 1.64105
> +                ]
> +            },
> +            {
> +                "ct": 4500, "ccm":
> +                [
> +                    1.47015, -0.29229, -0.17786, -0.36561, 1.88919, -0.52358, -0.03552, -0.56717, 1.60269
> +                ]
> +            },
> +            {
> +                "ct": 5600, "ccm":
> +                [
> +                    1.60962, -0.47434, -0.13528, -0.32701, 1.73797, -0.41096, -0.07626, -0.40171, 1.47796
> +                ]
> +            },
> +            {
> +                "ct": 8000, "ccm":
> +                [
> +                    1.54642, -0.20396, -0.34246, -0.31748, 2.22559, -0.90811, -0.10035, -0.65877, 1.75912
> +                ]
> +            }
> +        ]
> +    },
> +    "rpi.sharpen":
> +    {
> +    }
> +}
> diff --git a/src/ipa/raspberrypi/data/meson.build b/src/ipa/raspberrypi/data/meson.build
> index abb1f928..68433fc2 100644
> --- a/src/ipa/raspberrypi/data/meson.build
> +++ b/src/ipa/raspberrypi/data/meson.build
> @@ -3,6 +3,7 @@
>  conf_files = files([
>      'imx219.json',
>      'imx290.json',
> +    'imx378.json',
>      'imx477.json',
>      'ov5647.json',
>      'ov9281.json',
>
Laurent Pinchart Aug. 2, 2021, 12:43 a.m. UTC | #3
Hi David,

Thank you for the patch.

On Wed, Jul 21, 2021 at 12:52:20PM +0100, David Plowman wrote:
> This commit adds a tuning file for the 12MP imx378 sensor. The sensor
> actually shares the same driver (and CamHelper) as the imx477 so only
> a new tuning file is required. The default choice of imx477.json can
> be overridden by pointing LIBCAMERA_RPI_TUNING_FILE at a version of
> the new imx378.json file.

The IMX378 and IMX477 should ideally have different compatible string in
DT, and the driver should set the subdev name accordingly. This will
allow selection of the right tuning file. The drawback is that the
sensor helper selection would need to be updated.

> Signed-off-by: David Plowman <david.plowman@raspberrypi.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  src/ipa/raspberrypi/data/imx378.json | 338 +++++++++++++++++++++++++++
>  src/ipa/raspberrypi/data/meson.build |   1 +
>  2 files changed, 339 insertions(+)
>  create mode 100644 src/ipa/raspberrypi/data/imx378.json
> 
> diff --git a/src/ipa/raspberrypi/data/imx378.json b/src/ipa/raspberrypi/data/imx378.json
> new file mode 100644
> index 00000000..3c2164e2
> --- /dev/null
> +++ b/src/ipa/raspberrypi/data/imx378.json
> @@ -0,0 +1,338 @@
> +{
> +    "rpi.black_level":
> +    {
> +        "black_level": 4096
> +    },
> +    "rpi.dpc":
> +    {
> +    },
> +    "rpi.lux":
> +    {
> +        "reference_shutter_speed": 9999,
> +        "reference_gain": 1.95,
> +        "reference_aperture": 1.0,
> +        "reference_lux": 1000,
> +        "reference_Y": 12996
> +    },
> +    "rpi.noise":
> +    {
> +        "reference_constant": 0,
> +        "reference_slope": 2.641
> +    },
> +    "rpi.geq":
> +    {
> +        "offset": 235,
> +        "slope": 0.00902
> +    },
> +    "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": 8100
> +            }
> +        },
> +        "bayes": 1,
> +        "ct_curve":
> +        [
> +            2850.0, 0.6361, 0.3911, 3550.0, 0.5386, 0.5077, 4500.0, 0.4472, 0.6171, 5600.0, 0.3906, 0.6848, 8000.0, 0.3412, 0.7441
> +        ],
> +        "sensitivity_r": 1.0,
> +        "sensitivity_b": 1.0,
> +        "transverse_pos": 0.01667,
> +        "transverse_neg": 0.01195
> +    },
> +    "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": 2800, "table":
> +                [
> +                    1.604, 1.601, 1.593, 1.581, 1.568, 1.561, 1.561, 1.561, 1.561, 1.567, 1.582, 1.596, 1.609, 1.622, 1.632, 1.636,
> +                    1.601, 1.594, 1.586, 1.571, 1.555, 1.546, 1.543, 1.543, 1.547, 1.555, 1.572, 1.584, 1.599, 1.614, 1.625, 1.632,
> +                    1.599, 1.586, 1.571, 1.555, 1.542, 1.528, 1.518, 1.518, 1.523, 1.537, 1.555, 1.572, 1.589, 1.607, 1.622, 1.629,
> +                    1.597, 1.579, 1.561, 1.542, 1.528, 1.512, 1.493, 1.493, 1.499, 1.523, 1.537, 1.563, 1.582, 1.601, 1.619, 1.629,
> +                    1.597, 1.577, 1.557, 1.535, 1.512, 1.493, 1.481, 1.479, 1.492, 1.499, 1.524, 1.555, 1.578, 1.599, 1.619, 1.629,
> +                    1.597, 1.577, 1.557, 1.534, 1.508, 1.483, 1.476, 1.476, 1.481, 1.496, 1.522, 1.554, 1.578, 1.599, 1.619, 1.629,
> +                    1.597, 1.578, 1.557, 1.534, 1.508, 1.483, 1.481, 1.479, 1.481, 1.496, 1.522, 1.554, 1.579, 1.601, 1.619, 1.631,
> +                    1.597, 1.581, 1.562, 1.539, 1.517, 1.504, 1.483, 1.481, 1.496, 1.511, 1.531, 1.561, 1.585, 1.607, 1.623, 1.632,
> +                    1.601, 1.589, 1.569, 1.554, 1.539, 1.517, 1.504, 1.504, 1.511, 1.531, 1.553, 1.573, 1.596, 1.614, 1.629, 1.636,
> +                    1.609, 1.601, 1.586, 1.569, 1.554, 1.542, 1.535, 1.535, 1.541, 1.553, 1.573, 1.592, 1.608, 1.625, 1.637, 1.645,
> +                    1.617, 1.611, 1.601, 1.586, 1.574, 1.565, 1.564, 1.564, 1.571, 1.579, 1.592, 1.608, 1.622, 1.637, 1.646, 1.654,
> +                    1.619, 1.617, 1.611, 1.601, 1.588, 1.585, 1.585, 1.585, 1.588, 1.592, 1.607, 1.622, 1.637, 1.645, 1.654, 1.655
> +                ]
> +            },
> +            {
> +                "ct": 5500, "table":
> +                [
> +                    2.664, 2.658, 2.645, 2.629, 2.602, 2.602, 2.602, 2.606, 2.617, 2.628, 2.649, 2.677, 2.699, 2.722, 2.736, 2.747,
> +                    2.658, 2.653, 2.629, 2.605, 2.576, 2.575, 2.577, 2.592, 2.606, 2.618, 2.629, 2.651, 2.678, 2.707, 2.727, 2.741,
> +                    2.649, 2.631, 2.605, 2.576, 2.563, 2.552, 2.552, 2.557, 2.577, 2.604, 2.619, 2.641, 2.669, 2.698, 2.721, 2.741,
> +                    2.643, 2.613, 2.583, 2.563, 2.552, 2.531, 2.527, 2.527, 2.551, 2.577, 2.604, 2.638, 2.665, 2.694, 2.721, 2.741,
> +                    2.643, 2.606, 2.575, 2.558, 2.531, 2.516, 2.504, 2.516, 2.527, 2.551, 2.596, 2.635, 2.665, 2.694, 2.721, 2.741,
> +                    2.643, 2.606, 2.575, 2.558, 2.531, 2.503, 2.501, 2.502, 2.522, 2.551, 2.592, 2.635, 2.669, 2.696, 2.727, 2.744,
> +                    2.648, 2.611, 2.579, 2.558, 2.532, 2.511, 2.502, 2.511, 2.522, 2.552, 2.592, 2.642, 2.673, 2.702, 2.731, 2.752,
> +                    2.648, 2.619, 2.589, 2.571, 2.556, 2.532, 2.519, 2.522, 2.552, 2.568, 2.605, 2.648, 2.683, 2.715, 2.743, 2.758,
> +                    2.659, 2.637, 2.613, 2.589, 2.571, 2.556, 2.555, 2.555, 2.568, 2.605, 2.641, 2.671, 2.699, 2.729, 2.758, 2.776,
> +                    2.679, 2.665, 2.637, 2.613, 2.602, 2.599, 2.599, 2.606, 2.619, 2.641, 2.671, 2.698, 2.723, 2.754, 2.776, 2.787,
> +                    2.695, 2.684, 2.671, 2.646, 2.636, 2.636, 2.641, 2.648, 2.661, 2.681, 2.698, 2.723, 2.751, 2.776, 2.788, 2.803,
> +                    2.702, 2.699, 2.684, 2.671, 2.664, 2.664, 2.664, 2.668, 2.681, 2.698, 2.723, 2.751, 2.773, 2.788, 2.803, 2.805
> +                ]
> +            }
> +        ],
> +        "calibrations_Cb":
> +        [
> +            {
> +                "ct": 2800, "table":
> +                [
> +                    2.876, 2.868, 2.863, 2.851, 2.846, 2.846, 2.847, 2.851, 2.851, 2.857, 2.867, 2.875, 2.889, 2.899, 2.913, 2.926,
> +                    2.863, 2.861, 2.856, 2.846, 2.846, 2.847, 2.848, 2.851, 2.857, 2.859, 2.875, 2.882, 2.886, 2.896, 2.909, 2.917,
> +                    2.861, 2.856, 2.846, 2.841, 2.841, 2.855, 2.867, 2.875, 2.888, 2.888, 2.885, 2.883, 2.886, 2.889, 2.901, 2.913,
> +                    2.858, 2.851, 2.846, 2.846, 2.855, 2.867, 2.884, 2.895, 2.902, 2.902, 2.901, 2.891, 2.891, 2.894, 2.901, 2.909,
> +                    2.858, 2.851, 2.846, 2.846, 2.867, 2.884, 2.895, 2.902, 2.909, 2.915, 2.911, 2.901, 2.895, 2.898, 2.904, 2.909,
> +                    2.858, 2.851, 2.849, 2.853, 2.874, 2.888, 2.901, 2.909, 2.917, 2.922, 2.917, 2.911, 2.901, 2.899, 2.905, 2.908,
> +                    2.861, 2.855, 2.853, 2.855, 2.874, 2.888, 2.901, 2.913, 2.918, 2.922, 2.921, 2.911, 2.901, 2.901, 2.907, 2.908,
> +                    2.862, 2.859, 2.855, 2.856, 2.872, 2.885, 2.899, 2.906, 2.915, 2.917, 2.911, 2.907, 2.907, 2.907, 2.908, 2.909,
> +                    2.863, 2.863, 2.859, 2.864, 2.871, 2.881, 2.885, 2.899, 2.905, 2.905, 2.904, 2.904, 2.907, 2.909, 2.913, 2.913,
> +                    2.866, 2.865, 2.865, 2.867, 2.868, 2.872, 2.881, 2.885, 2.889, 2.894, 2.895, 2.902, 2.906, 2.913, 2.914, 2.917,
> +                    2.875, 2.875, 2.871, 2.871, 2.871, 2.871, 2.869, 2.869, 2.878, 2.889, 2.894, 2.895, 2.906, 2.914, 2.917, 2.921,
> +                    2.882, 2.879, 2.876, 2.874, 2.871, 2.871, 2.869, 2.869, 2.869, 2.878, 2.891, 2.894, 2.905, 2.914, 2.919, 2.921
> +                ]
> +            },
> +            {
> +                "ct": 5500, "table":
> +                [
> +                    1.488, 1.488, 1.488, 1.488, 1.491, 1.492, 1.492, 1.491, 1.491, 1.491, 1.492, 1.495, 1.497, 1.499, 1.499, 1.503,
> +                    1.482, 1.485, 1.485, 1.487, 1.489, 1.492, 1.492, 1.492, 1.492, 1.492, 1.494, 1.494, 1.492, 1.491, 1.493, 1.494,
> +                    1.482, 1.482, 1.484, 1.485, 1.487, 1.492, 1.496, 1.498, 1.499, 1.498, 1.494, 1.492, 1.491, 1.491, 1.491, 1.491,
> +                    1.481, 1.481, 1.482, 1.485, 1.491, 1.496, 1.498, 1.499, 1.501, 1.499, 1.498, 1.493, 1.491, 1.488, 1.488, 1.488,
> +                    1.481, 1.481, 1.481, 1.483, 1.491, 1.497, 1.498, 1.499, 1.501, 1.499, 1.498, 1.492, 1.488, 1.485, 1.483, 1.483,
> +                    1.479, 1.479, 1.481, 1.482, 1.489, 1.495, 1.497, 1.498, 1.499, 1.499, 1.495, 1.492, 1.485, 1.482, 1.482, 1.481,
> +                    1.479, 1.479, 1.479, 1.481, 1.489, 1.494, 1.496, 1.497, 1.497, 1.496, 1.495, 1.489, 1.482, 1.481, 1.479, 1.477,
> +                    1.478, 1.478, 1.479, 1.481, 1.487, 1.491, 1.494, 1.496, 1.496, 1.495, 1.492, 1.487, 1.482, 1.479, 1.478, 1.476,
> +                    1.478, 1.478, 1.479, 1.482, 1.486, 1.488, 1.491, 1.493, 1.493, 1.492, 1.487, 1.484, 1.481, 1.479, 1.476, 1.476,
> +                    1.477, 1.479, 1.481, 1.483, 1.485, 1.486, 1.488, 1.488, 1.487, 1.487, 1.484, 1.483, 1.481, 1.479, 1.476, 1.476,
> +                    1.477, 1.479, 1.482, 1.483, 1.484, 1.485, 1.484, 1.482, 1.482, 1.484, 1.483, 1.482, 1.481, 1.479, 1.477, 1.476,
> +                    1.477, 1.479, 1.482, 1.483, 1.484, 1.484, 1.482, 1.482, 1.482, 1.482, 1.482, 1.481, 1.479, 1.479, 1.479, 1.479
> +                ]
> +            }
> +        ],
> +        "luminance_lut":
> +        [
> +            2.764, 2.654, 2.321, 2.043, 1.768, 1.594, 1.558, 1.558, 1.558, 1.568, 1.661, 1.904, 2.193, 2.497, 2.888, 3.043,
> +            2.654, 2.373, 2.049, 1.819, 1.569, 1.446, 1.381, 1.356, 1.356, 1.403, 1.501, 1.679, 1.939, 2.218, 2.586, 2.888,
> +            2.376, 2.154, 1.819, 1.569, 1.438, 1.301, 1.246, 1.224, 1.224, 1.263, 1.349, 1.501, 1.679, 1.985, 2.359, 2.609,
> +            2.267, 1.987, 1.662, 1.438, 1.301, 1.235, 1.132, 1.105, 1.105, 1.164, 1.263, 1.349, 1.528, 1.808, 2.184, 2.491,
> +            2.218, 1.876, 1.568, 1.367, 1.235, 1.132, 1.087, 1.022, 1.023, 1.104, 1.164, 1.278, 1.439, 1.695, 2.066, 2.429,
> +            2.218, 1.832, 1.533, 1.341, 1.206, 1.089, 1.013, 1.002, 1.013, 1.026, 1.122, 1.246, 1.399, 1.642, 2.004, 2.426,
> +            2.218, 1.832, 1.533, 1.341, 1.206, 1.089, 1.011, 1.001, 1.009, 1.026, 1.122, 1.246, 1.399, 1.642, 2.004, 2.426,
> +            2.224, 1.896, 1.584, 1.382, 1.248, 1.147, 1.088, 1.016, 1.026, 1.118, 1.168, 1.283, 1.444, 1.697, 2.066, 2.428,
> +            2.292, 2.019, 1.689, 1.462, 1.322, 1.247, 1.147, 1.118, 1.118, 1.168, 1.275, 1.358, 1.532, 1.809, 2.189, 2.491,
> +            2.444, 2.204, 1.856, 1.606, 1.462, 1.322, 1.257, 1.234, 1.234, 1.275, 1.358, 1.516, 1.686, 1.993, 2.371, 2.622,
> +            2.748, 2.444, 2.108, 1.856, 1.606, 1.476, 1.399, 1.376, 1.376, 1.422, 1.516, 1.686, 1.968, 2.238, 2.611, 2.935,
> +            2.862, 2.748, 2.395, 2.099, 1.811, 1.621, 1.582, 1.582, 1.582, 1.592, 1.677, 1.919, 2.223, 2.534, 2.935, 3.078
> +        ],
> +        "sigma": 0.00428,
> +        "sigma_Cb": 0.00363
> +    },
> +    "rpi.contrast":
> +    {
> +        "ce_enable": 1,
> +        "gamma_curve":
> +        [
> +            0, 0, 1024, 5040, 2048, 9338, 3072, 12356, 4096, 15312, 5120, 18051, 6144, 20790, 7168, 23193,
> +            8192, 25744, 9216, 27942, 10240, 30035, 11264, 32005, 12288, 33975, 13312, 35815, 14336, 37600, 15360, 39168,
> +            16384, 40642, 18432, 43379, 20480, 45749, 22528, 47753, 24576, 49621, 26624, 51253, 28672, 52698, 30720, 53796,
> +            32768, 54876, 36864, 57012, 40960, 58656, 45056, 59954, 49152, 61183, 53248, 62355, 57344, 63419, 61440, 64476,
> +            65535, 65535
> +        ]
> +    },
> +    "rpi.ccm":
> +    {
> +        "ccms":
> +        [
> +            {
> +                "ct": 2850, "ccm":
> +                [
> +                    1.42601, -0.20537, -0.22063, -0.47682, 1.81987, -0.34305, 0.01854, -0.86036, 1.84181
> +                ]
> +            },
> +            {
> +                "ct": 2900, "ccm":
> +                [
> +                    1.29755, 0.04602, -0.34356, -0.41491, 1.73477, -0.31987, -0.01345, -0.97115, 1.98459
> +                ]
> +            },
> +            {
> +                "ct": 3550, "ccm":
> +                [
> +                    1.49811, -0.33412, -0.16398, -0.40869, 1.72995, -0.32127, -0.01924, -0.62181, 1.64105
> +                ]
> +            },
> +            {
> +                "ct": 4500, "ccm":
> +                [
> +                    1.47015, -0.29229, -0.17786, -0.36561, 1.88919, -0.52358, -0.03552, -0.56717, 1.60269
> +                ]
> +            },
> +            {
> +                "ct": 5600, "ccm":
> +                [
> +                    1.60962, -0.47434, -0.13528, -0.32701, 1.73797, -0.41096, -0.07626, -0.40171, 1.47796
> +                ]
> +            },
> +            {
> +                "ct": 8000, "ccm":
> +                [
> +                    1.54642, -0.20396, -0.34246, -0.31748, 2.22559, -0.90811, -0.10035, -0.65877, 1.75912
> +                ]
> +            }
> +        ]
> +    },
> +    "rpi.sharpen":
> +    {
> +    }
> +}
> diff --git a/src/ipa/raspberrypi/data/meson.build b/src/ipa/raspberrypi/data/meson.build
> index abb1f928..68433fc2 100644
> --- a/src/ipa/raspberrypi/data/meson.build
> +++ b/src/ipa/raspberrypi/data/meson.build
> @@ -3,6 +3,7 @@
>  conf_files = files([
>      'imx219.json',
>      'imx290.json',
> +    'imx378.json',
>      'imx477.json',
>      'ov5647.json',
>      'ov9281.json',

Patch
diff mbox series

diff --git a/src/ipa/raspberrypi/data/imx378.json b/src/ipa/raspberrypi/data/imx378.json
new file mode 100644
index 00000000..3c2164e2
--- /dev/null
+++ b/src/ipa/raspberrypi/data/imx378.json
@@ -0,0 +1,338 @@ 
+{
+    "rpi.black_level":
+    {
+        "black_level": 4096
+    },
+    "rpi.dpc":
+    {
+    },
+    "rpi.lux":
+    {
+        "reference_shutter_speed": 9999,
+        "reference_gain": 1.95,
+        "reference_aperture": 1.0,
+        "reference_lux": 1000,
+        "reference_Y": 12996
+    },
+    "rpi.noise":
+    {
+        "reference_constant": 0,
+        "reference_slope": 2.641
+    },
+    "rpi.geq":
+    {
+        "offset": 235,
+        "slope": 0.00902
+    },
+    "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": 8100
+            }
+        },
+        "bayes": 1,
+        "ct_curve":
+        [
+            2850.0, 0.6361, 0.3911, 3550.0, 0.5386, 0.5077, 4500.0, 0.4472, 0.6171, 5600.0, 0.3906, 0.6848, 8000.0, 0.3412, 0.7441
+        ],
+        "sensitivity_r": 1.0,
+        "sensitivity_b": 1.0,
+        "transverse_pos": 0.01667,
+        "transverse_neg": 0.01195
+    },
+    "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": 2800, "table":
+                [
+                    1.604, 1.601, 1.593, 1.581, 1.568, 1.561, 1.561, 1.561, 1.561, 1.567, 1.582, 1.596, 1.609, 1.622, 1.632, 1.636,
+                    1.601, 1.594, 1.586, 1.571, 1.555, 1.546, 1.543, 1.543, 1.547, 1.555, 1.572, 1.584, 1.599, 1.614, 1.625, 1.632,
+                    1.599, 1.586, 1.571, 1.555, 1.542, 1.528, 1.518, 1.518, 1.523, 1.537, 1.555, 1.572, 1.589, 1.607, 1.622, 1.629,
+                    1.597, 1.579, 1.561, 1.542, 1.528, 1.512, 1.493, 1.493, 1.499, 1.523, 1.537, 1.563, 1.582, 1.601, 1.619, 1.629,
+                    1.597, 1.577, 1.557, 1.535, 1.512, 1.493, 1.481, 1.479, 1.492, 1.499, 1.524, 1.555, 1.578, 1.599, 1.619, 1.629,
+                    1.597, 1.577, 1.557, 1.534, 1.508, 1.483, 1.476, 1.476, 1.481, 1.496, 1.522, 1.554, 1.578, 1.599, 1.619, 1.629,
+                    1.597, 1.578, 1.557, 1.534, 1.508, 1.483, 1.481, 1.479, 1.481, 1.496, 1.522, 1.554, 1.579, 1.601, 1.619, 1.631,
+                    1.597, 1.581, 1.562, 1.539, 1.517, 1.504, 1.483, 1.481, 1.496, 1.511, 1.531, 1.561, 1.585, 1.607, 1.623, 1.632,
+                    1.601, 1.589, 1.569, 1.554, 1.539, 1.517, 1.504, 1.504, 1.511, 1.531, 1.553, 1.573, 1.596, 1.614, 1.629, 1.636,
+                    1.609, 1.601, 1.586, 1.569, 1.554, 1.542, 1.535, 1.535, 1.541, 1.553, 1.573, 1.592, 1.608, 1.625, 1.637, 1.645,
+                    1.617, 1.611, 1.601, 1.586, 1.574, 1.565, 1.564, 1.564, 1.571, 1.579, 1.592, 1.608, 1.622, 1.637, 1.646, 1.654,
+                    1.619, 1.617, 1.611, 1.601, 1.588, 1.585, 1.585, 1.585, 1.588, 1.592, 1.607, 1.622, 1.637, 1.645, 1.654, 1.655
+                ]
+            },
+            {
+                "ct": 5500, "table":
+                [
+                    2.664, 2.658, 2.645, 2.629, 2.602, 2.602, 2.602, 2.606, 2.617, 2.628, 2.649, 2.677, 2.699, 2.722, 2.736, 2.747,
+                    2.658, 2.653, 2.629, 2.605, 2.576, 2.575, 2.577, 2.592, 2.606, 2.618, 2.629, 2.651, 2.678, 2.707, 2.727, 2.741,
+                    2.649, 2.631, 2.605, 2.576, 2.563, 2.552, 2.552, 2.557, 2.577, 2.604, 2.619, 2.641, 2.669, 2.698, 2.721, 2.741,
+                    2.643, 2.613, 2.583, 2.563, 2.552, 2.531, 2.527, 2.527, 2.551, 2.577, 2.604, 2.638, 2.665, 2.694, 2.721, 2.741,
+                    2.643, 2.606, 2.575, 2.558, 2.531, 2.516, 2.504, 2.516, 2.527, 2.551, 2.596, 2.635, 2.665, 2.694, 2.721, 2.741,
+                    2.643, 2.606, 2.575, 2.558, 2.531, 2.503, 2.501, 2.502, 2.522, 2.551, 2.592, 2.635, 2.669, 2.696, 2.727, 2.744,
+                    2.648, 2.611, 2.579, 2.558, 2.532, 2.511, 2.502, 2.511, 2.522, 2.552, 2.592, 2.642, 2.673, 2.702, 2.731, 2.752,
+                    2.648, 2.619, 2.589, 2.571, 2.556, 2.532, 2.519, 2.522, 2.552, 2.568, 2.605, 2.648, 2.683, 2.715, 2.743, 2.758,
+                    2.659, 2.637, 2.613, 2.589, 2.571, 2.556, 2.555, 2.555, 2.568, 2.605, 2.641, 2.671, 2.699, 2.729, 2.758, 2.776,
+                    2.679, 2.665, 2.637, 2.613, 2.602, 2.599, 2.599, 2.606, 2.619, 2.641, 2.671, 2.698, 2.723, 2.754, 2.776, 2.787,
+                    2.695, 2.684, 2.671, 2.646, 2.636, 2.636, 2.641, 2.648, 2.661, 2.681, 2.698, 2.723, 2.751, 2.776, 2.788, 2.803,
+                    2.702, 2.699, 2.684, 2.671, 2.664, 2.664, 2.664, 2.668, 2.681, 2.698, 2.723, 2.751, 2.773, 2.788, 2.803, 2.805
+                ]
+            }
+        ],
+        "calibrations_Cb":
+        [
+            {
+                "ct": 2800, "table":
+                [
+                    2.876, 2.868, 2.863, 2.851, 2.846, 2.846, 2.847, 2.851, 2.851, 2.857, 2.867, 2.875, 2.889, 2.899, 2.913, 2.926,
+                    2.863, 2.861, 2.856, 2.846, 2.846, 2.847, 2.848, 2.851, 2.857, 2.859, 2.875, 2.882, 2.886, 2.896, 2.909, 2.917,
+                    2.861, 2.856, 2.846, 2.841, 2.841, 2.855, 2.867, 2.875, 2.888, 2.888, 2.885, 2.883, 2.886, 2.889, 2.901, 2.913,
+                    2.858, 2.851, 2.846, 2.846, 2.855, 2.867, 2.884, 2.895, 2.902, 2.902, 2.901, 2.891, 2.891, 2.894, 2.901, 2.909,
+                    2.858, 2.851, 2.846, 2.846, 2.867, 2.884, 2.895, 2.902, 2.909, 2.915, 2.911, 2.901, 2.895, 2.898, 2.904, 2.909,
+                    2.858, 2.851, 2.849, 2.853, 2.874, 2.888, 2.901, 2.909, 2.917, 2.922, 2.917, 2.911, 2.901, 2.899, 2.905, 2.908,
+                    2.861, 2.855, 2.853, 2.855, 2.874, 2.888, 2.901, 2.913, 2.918, 2.922, 2.921, 2.911, 2.901, 2.901, 2.907, 2.908,
+                    2.862, 2.859, 2.855, 2.856, 2.872, 2.885, 2.899, 2.906, 2.915, 2.917, 2.911, 2.907, 2.907, 2.907, 2.908, 2.909,
+                    2.863, 2.863, 2.859, 2.864, 2.871, 2.881, 2.885, 2.899, 2.905, 2.905, 2.904, 2.904, 2.907, 2.909, 2.913, 2.913,
+                    2.866, 2.865, 2.865, 2.867, 2.868, 2.872, 2.881, 2.885, 2.889, 2.894, 2.895, 2.902, 2.906, 2.913, 2.914, 2.917,
+                    2.875, 2.875, 2.871, 2.871, 2.871, 2.871, 2.869, 2.869, 2.878, 2.889, 2.894, 2.895, 2.906, 2.914, 2.917, 2.921,
+                    2.882, 2.879, 2.876, 2.874, 2.871, 2.871, 2.869, 2.869, 2.869, 2.878, 2.891, 2.894, 2.905, 2.914, 2.919, 2.921
+                ]
+            },
+            {
+                "ct": 5500, "table":
+                [
+                    1.488, 1.488, 1.488, 1.488, 1.491, 1.492, 1.492, 1.491, 1.491, 1.491, 1.492, 1.495, 1.497, 1.499, 1.499, 1.503,
+                    1.482, 1.485, 1.485, 1.487, 1.489, 1.492, 1.492, 1.492, 1.492, 1.492, 1.494, 1.494, 1.492, 1.491, 1.493, 1.494,
+                    1.482, 1.482, 1.484, 1.485, 1.487, 1.492, 1.496, 1.498, 1.499, 1.498, 1.494, 1.492, 1.491, 1.491, 1.491, 1.491,
+                    1.481, 1.481, 1.482, 1.485, 1.491, 1.496, 1.498, 1.499, 1.501, 1.499, 1.498, 1.493, 1.491, 1.488, 1.488, 1.488,
+                    1.481, 1.481, 1.481, 1.483, 1.491, 1.497, 1.498, 1.499, 1.501, 1.499, 1.498, 1.492, 1.488, 1.485, 1.483, 1.483,
+                    1.479, 1.479, 1.481, 1.482, 1.489, 1.495, 1.497, 1.498, 1.499, 1.499, 1.495, 1.492, 1.485, 1.482, 1.482, 1.481,
+                    1.479, 1.479, 1.479, 1.481, 1.489, 1.494, 1.496, 1.497, 1.497, 1.496, 1.495, 1.489, 1.482, 1.481, 1.479, 1.477,
+                    1.478, 1.478, 1.479, 1.481, 1.487, 1.491, 1.494, 1.496, 1.496, 1.495, 1.492, 1.487, 1.482, 1.479, 1.478, 1.476,
+                    1.478, 1.478, 1.479, 1.482, 1.486, 1.488, 1.491, 1.493, 1.493, 1.492, 1.487, 1.484, 1.481, 1.479, 1.476, 1.476,
+                    1.477, 1.479, 1.481, 1.483, 1.485, 1.486, 1.488, 1.488, 1.487, 1.487, 1.484, 1.483, 1.481, 1.479, 1.476, 1.476,
+                    1.477, 1.479, 1.482, 1.483, 1.484, 1.485, 1.484, 1.482, 1.482, 1.484, 1.483, 1.482, 1.481, 1.479, 1.477, 1.476,
+                    1.477, 1.479, 1.482, 1.483, 1.484, 1.484, 1.482, 1.482, 1.482, 1.482, 1.482, 1.481, 1.479, 1.479, 1.479, 1.479
+                ]
+            }
+        ],
+        "luminance_lut":
+        [
+            2.764, 2.654, 2.321, 2.043, 1.768, 1.594, 1.558, 1.558, 1.558, 1.568, 1.661, 1.904, 2.193, 2.497, 2.888, 3.043,
+            2.654, 2.373, 2.049, 1.819, 1.569, 1.446, 1.381, 1.356, 1.356, 1.403, 1.501, 1.679, 1.939, 2.218, 2.586, 2.888,
+            2.376, 2.154, 1.819, 1.569, 1.438, 1.301, 1.246, 1.224, 1.224, 1.263, 1.349, 1.501, 1.679, 1.985, 2.359, 2.609,
+            2.267, 1.987, 1.662, 1.438, 1.301, 1.235, 1.132, 1.105, 1.105, 1.164, 1.263, 1.349, 1.528, 1.808, 2.184, 2.491,
+            2.218, 1.876, 1.568, 1.367, 1.235, 1.132, 1.087, 1.022, 1.023, 1.104, 1.164, 1.278, 1.439, 1.695, 2.066, 2.429,
+            2.218, 1.832, 1.533, 1.341, 1.206, 1.089, 1.013, 1.002, 1.013, 1.026, 1.122, 1.246, 1.399, 1.642, 2.004, 2.426,
+            2.218, 1.832, 1.533, 1.341, 1.206, 1.089, 1.011, 1.001, 1.009, 1.026, 1.122, 1.246, 1.399, 1.642, 2.004, 2.426,
+            2.224, 1.896, 1.584, 1.382, 1.248, 1.147, 1.088, 1.016, 1.026, 1.118, 1.168, 1.283, 1.444, 1.697, 2.066, 2.428,
+            2.292, 2.019, 1.689, 1.462, 1.322, 1.247, 1.147, 1.118, 1.118, 1.168, 1.275, 1.358, 1.532, 1.809, 2.189, 2.491,
+            2.444, 2.204, 1.856, 1.606, 1.462, 1.322, 1.257, 1.234, 1.234, 1.275, 1.358, 1.516, 1.686, 1.993, 2.371, 2.622,
+            2.748, 2.444, 2.108, 1.856, 1.606, 1.476, 1.399, 1.376, 1.376, 1.422, 1.516, 1.686, 1.968, 2.238, 2.611, 2.935,
+            2.862, 2.748, 2.395, 2.099, 1.811, 1.621, 1.582, 1.582, 1.582, 1.592, 1.677, 1.919, 2.223, 2.534, 2.935, 3.078
+        ],
+        "sigma": 0.00428,
+        "sigma_Cb": 0.00363
+    },
+    "rpi.contrast":
+    {
+        "ce_enable": 1,
+        "gamma_curve":
+        [
+            0, 0, 1024, 5040, 2048, 9338, 3072, 12356, 4096, 15312, 5120, 18051, 6144, 20790, 7168, 23193,
+            8192, 25744, 9216, 27942, 10240, 30035, 11264, 32005, 12288, 33975, 13312, 35815, 14336, 37600, 15360, 39168,
+            16384, 40642, 18432, 43379, 20480, 45749, 22528, 47753, 24576, 49621, 26624, 51253, 28672, 52698, 30720, 53796,
+            32768, 54876, 36864, 57012, 40960, 58656, 45056, 59954, 49152, 61183, 53248, 62355, 57344, 63419, 61440, 64476,
+            65535, 65535
+        ]
+    },
+    "rpi.ccm":
+    {
+        "ccms":
+        [
+            {
+                "ct": 2850, "ccm":
+                [
+                    1.42601, -0.20537, -0.22063, -0.47682, 1.81987, -0.34305, 0.01854, -0.86036, 1.84181
+                ]
+            },
+            {
+                "ct": 2900, "ccm":
+                [
+                    1.29755, 0.04602, -0.34356, -0.41491, 1.73477, -0.31987, -0.01345, -0.97115, 1.98459
+                ]
+            },
+            {
+                "ct": 3550, "ccm":
+                [
+                    1.49811, -0.33412, -0.16398, -0.40869, 1.72995, -0.32127, -0.01924, -0.62181, 1.64105
+                ]
+            },
+            {
+                "ct": 4500, "ccm":
+                [
+                    1.47015, -0.29229, -0.17786, -0.36561, 1.88919, -0.52358, -0.03552, -0.56717, 1.60269
+                ]
+            },
+            {
+                "ct": 5600, "ccm":
+                [
+                    1.60962, -0.47434, -0.13528, -0.32701, 1.73797, -0.41096, -0.07626, -0.40171, 1.47796
+                ]
+            },
+            {
+                "ct": 8000, "ccm":
+                [
+                    1.54642, -0.20396, -0.34246, -0.31748, 2.22559, -0.90811, -0.10035, -0.65877, 1.75912
+                ]
+            }
+        ]
+    },
+    "rpi.sharpen":
+    {
+    }
+}
diff --git a/src/ipa/raspberrypi/data/meson.build b/src/ipa/raspberrypi/data/meson.build
index abb1f928..68433fc2 100644
--- a/src/ipa/raspberrypi/data/meson.build
+++ b/src/ipa/raspberrypi/data/meson.build
@@ -3,6 +3,7 @@ 
 conf_files = files([
     'imx219.json',
     'imx290.json',
+    'imx378.json',
     'imx477.json',
     'ov5647.json',
     'ov9281.json',