[libcamera-devel] ipa: raspberrypi: imx477: Update tuning file for the latest camera modules
diff mbox series

Message ID 20221130125840.2719-1-david.plowman@raspberrypi.com
State Accepted
Commit ea8ae5afff226f9373c82c1a3185e532d5d6eda0
Headers show
Series
  • [libcamera-devel] ipa: raspberrypi: imx477: Update tuning file for the latest camera modules
Related show

Commit Message

David Plowman Nov. 30, 2022, 12:58 p.m. UTC
The latest camera modules have a very slightly different IR filter, so
the tuning file is slightly revised to give best results with both old
and new camera modules.

The original tuning file is retained as imx477_v1.json in case anyone
should wish to continue using it.

Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
---
 src/ipa/raspberrypi/data/imx477.json    |  20 +-
 src/ipa/raspberrypi/data/imx477_v1.json | 519 ++++++++++++++++++++++++
 2 files changed, 530 insertions(+), 9 deletions(-)
 create mode 100644 src/ipa/raspberrypi/data/imx477_v1.json

Comments

Kieran Bingham Nov. 30, 2022, 1:13 p.m. UTC | #1
Quoting David Plowman via libcamera-devel (2022-11-30 12:58:40)
> The latest camera modules have a very slightly different IR filter, so
> the tuning file is slightly revised to give best results with both old
> and new camera modules.
> 
> The original tuning file is retained as imx477_v1.json in case anyone
> should wish to continue using it.

Sounds ok to me.

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

> 
> Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
> ---
>  src/ipa/raspberrypi/data/imx477.json    |  20 +-
>  src/ipa/raspberrypi/data/imx477_v1.json | 519 ++++++++++++++++++++++++
>  2 files changed, 530 insertions(+), 9 deletions(-)
>  create mode 100644 src/ipa/raspberrypi/data/imx477_v1.json
> 
> diff --git a/src/ipa/raspberrypi/data/imx477.json b/src/ipa/raspberrypi/data/imx477.json
> index 5bcaac67..bfc0774f 100644
> --- a/src/ipa/raspberrypi/data/imx477.json
> +++ b/src/ipa/raspberrypi/data/imx477.json
> @@ -115,15 +115,17 @@
>                  "ct_curve":
>                  [
>                      2360.0, 0.6009, 0.3093,
> -                    2870.0, 0.5047, 0.3936,
> -                    2970.0, 0.4782, 0.4221,
> -                    3700.0, 0.4212, 0.4923,
> -                    3870.0, 0.4037, 0.5166,
> -                    4000.0, 0.3965, 0.5271,
> -                    4400.0, 0.3703, 0.5666,
> -                    4715.0, 0.3411, 0.6147,
> -                    5920.0, 0.3108, 0.6687,
> -                    9050.0, 0.2524, 0.7856
> +                    2848.0, 0.5071, 0.4000,
> +                    2903.0, 0.4905, 0.4392,
> +                    3628.0, 0.4261, 0.5564,
> +                    3643.0, 0.4228, 0.5623,
> +                    4660.0, 0.3529, 0.6800,
> +                    5579.0, 0.3227, 0.7000,
> +                    6125.0, 0.3129, 0.7100,
> +                    6671.0, 0.3065, 0.7200,
> +                    7217.0, 0.3014, 0.7300,
> +                    7763.0, 0.2950, 0.7400,
> +                    9505.0, 0.2524, 0.7856
>                  ],
>                  "sensitivity_r": 1.05,
>                  "sensitivity_b": 1.05,
> diff --git a/src/ipa/raspberrypi/data/imx477_v1.json b/src/ipa/raspberrypi/data/imx477_v1.json
> new file mode 100644
> index 00000000..5bcaac67
> --- /dev/null
> +++ b/src/ipa/raspberrypi/data/imx477_v1.json
> @@ -0,0 +1,519 @@
> +{
> +    "version": 2.0,
> +    "target": "bcm2835",
> +    "algorithms": [
> +        {
> +            "rpi.black_level":
> +            {
> +                "black_level": 4096
> +            }
> +        },
> +        {
> +            "rpi.dpc": { }
> +        },
> +        {
> +            "rpi.lux":
> +            {
> +                "reference_shutter_speed": 27242,
> +                "reference_gain": 1.0,
> +                "reference_aperture": 1.0,
> +                "reference_lux": 830,
> +                "reference_Y": 17755
> +            }
> +        },
> +        {
> +            "rpi.noise":
> +            {
> +                "reference_constant": 0,
> +                "reference_slope": 2.767
> +            }
> +        },
> +        {
> +            "rpi.geq":
> +            {
> +                "offset": 204,
> +                "slope": 0.01078
> +            }
> +        },
> +        {
> +            "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":
> +                [
> +                    2360.0, 0.6009, 0.3093,
> +                    2870.0, 0.5047, 0.3936,
> +                    2970.0, 0.4782, 0.4221,
> +                    3700.0, 0.4212, 0.4923,
> +                    3870.0, 0.4037, 0.5166,
> +                    4000.0, 0.3965, 0.5271,
> +                    4400.0, 0.3703, 0.5666,
> +                    4715.0, 0.3411, 0.6147,
> +                    5920.0, 0.3108, 0.6687,
> +                    9050.0, 0.2524, 0.7856
> +                ],
> +                "sensitivity_r": 1.05,
> +                "sensitivity_b": 1.05,
> +                "transverse_pos": 0.0238,
> +                "transverse_neg": 0.04429
> +            }
> +        },
> +        {
> +            "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, 66666 ],
> +                        "gain": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]
> +                    },
> +                    "short":
> +                    {
> +                        "shutter": [ 100, 5000, 10000, 20000, 33333 ],
> +                        "gain": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]
> +                    },
> +                    "long":
> +                    {
> +                        "shutter": [ 100, 10000, 30000, 60000, 120000 ],
> +                        "gain": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]
> +                    }
> +                },
> +                "constraint_modes":
> +                {
> +                    "normal": [
> +                        {
> +                            "bound": "LOWER",
> +                            "q_lo": 0.98,
> +                            "q_hi": 1.0,
> +                            "y_target":
> +                            [
> +                                0, 0.3,
> +                                1000, 0.3
> +                            ]
> +                        }
> +                    ],
> +                    "highlight": [
> +                        {
> +                            "bound": "LOWER",
> +                            "q_lo": 0.98,
> +                            "q_hi": 1.0,
> +                            "y_target":
> +                            [
> +                                0, 0.3,
> +                                1000, 0.3
> +                            ]
> +                        },
> +                        {
> +                            "bound": "UPPER",
> +                            "q_lo": 0.98,
> +                            "q_hi": 1.0,
> +                            "y_target":
> +                            [
> +                                0, 0.8,
> +                                1000, 0.8
> +                            ]
> +                        }
> +                    ],
> +                    "shadows": [
> +                        {
> +                            "bound": "LOWER",
> +                            "q_lo": 0.0,
> +                            "q_hi": 0.5,
> +                            "y_target":
> +                            [
> +                                0, 0.17,
> +                                1000, 0.17
> +                            ]
> +                        }
> +                    ]
> +                },
> +                "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": 2960,
> +                        "table":
> +                        [
> +                            2.088, 2.086, 2.082, 2.081, 2.077, 2.071, 2.068, 2.068, 2.072, 2.073, 2.075, 2.078, 2.084, 2.092, 2.095, 2.098,
> +                            2.086, 2.084, 2.079, 2.078, 2.075, 2.068, 2.064, 2.063, 2.068, 2.071, 2.072, 2.075, 2.081, 2.089, 2.092, 2.094,
> +                            2.083, 2.081, 2.077, 2.072, 2.069, 2.062, 2.059, 2.059, 2.063, 2.067, 2.069, 2.072, 2.079, 2.088, 2.089, 2.089,
> +                            2.081, 2.077, 2.072, 2.068, 2.065, 2.058, 2.055, 2.054, 2.057, 2.062, 2.066, 2.069, 2.077, 2.084, 2.086, 2.086,
> +                            2.078, 2.075, 2.069, 2.065, 2.061, 2.055, 2.052, 2.049, 2.051, 2.056, 2.062, 2.065, 2.072, 2.079, 2.081, 2.079,
> +                            2.079, 2.075, 2.069, 2.064, 2.061, 2.053, 2.049, 2.046, 2.049, 2.051, 2.057, 2.062, 2.069, 2.075, 2.077, 2.075,
> +                            2.082, 2.079, 2.072, 2.065, 2.061, 2.054, 2.049, 2.047, 2.049, 2.051, 2.056, 2.061, 2.066, 2.073, 2.073, 2.069,
> +                            2.086, 2.082, 2.075, 2.068, 2.062, 2.054, 2.051, 2.049, 2.051, 2.052, 2.056, 2.061, 2.066, 2.073, 2.073, 2.072,
> +                            2.088, 2.086, 2.079, 2.074, 2.066, 2.057, 2.051, 2.051, 2.054, 2.055, 2.056, 2.061, 2.067, 2.072, 2.073, 2.072,
> +                            2.091, 2.087, 2.079, 2.075, 2.068, 2.057, 2.052, 2.052, 2.056, 2.055, 2.055, 2.059, 2.066, 2.072, 2.072, 2.072,
> +                            2.093, 2.088, 2.081, 2.077, 2.069, 2.059, 2.054, 2.054, 2.057, 2.056, 2.056, 2.058, 2.066, 2.072, 2.073, 2.073,
> +                            2.095, 2.091, 2.084, 2.078, 2.075, 2.067, 2.057, 2.057, 2.059, 2.059, 2.058, 2.059, 2.068, 2.073, 2.075, 2.078
> +                        ]
> +                    },
> +                    {
> +                        "ct": 4850,
> +                        "table":
> +                        [
> +                            2.973, 2.968, 2.956, 2.943, 2.941, 2.932, 2.923, 2.921, 2.924, 2.929, 2.931, 2.939, 2.953, 2.965, 2.966, 2.976,
> +                            2.969, 2.962, 2.951, 2.941, 2.934, 2.928, 2.919, 2.918, 2.919, 2.923, 2.927, 2.933, 2.945, 2.957, 2.962, 2.962,
> +                            2.964, 2.956, 2.944, 2.932, 2.929, 2.924, 2.915, 2.914, 2.915, 2.919, 2.924, 2.928, 2.941, 2.952, 2.958, 2.959,
> +                            2.957, 2.951, 2.939, 2.928, 2.924, 2.919, 2.913, 2.911, 2.911, 2.915, 2.919, 2.925, 2.936, 2.947, 2.952, 2.953,
> +                            2.954, 2.947, 2.935, 2.924, 2.919, 2.915, 2.908, 2.906, 2.906, 2.907, 2.914, 2.921, 2.932, 2.941, 2.943, 2.942,
> +                            2.953, 2.946, 2.932, 2.921, 2.916, 2.911, 2.904, 2.902, 2.901, 2.904, 2.909, 2.919, 2.926, 2.937, 2.939, 2.939,
> +                            2.953, 2.947, 2.932, 2.918, 2.915, 2.909, 2.903, 2.901, 2.901, 2.906, 2.911, 2.918, 2.924, 2.936, 2.936, 2.932,
> +                            2.956, 2.948, 2.934, 2.919, 2.916, 2.908, 2.903, 2.901, 2.902, 2.907, 2.909, 2.917, 2.926, 2.936, 2.939, 2.939,
> +                            2.957, 2.951, 2.936, 2.923, 2.917, 2.907, 2.904, 2.901, 2.902, 2.908, 2.911, 2.919, 2.929, 2.939, 2.942, 2.942,
> +                            2.961, 2.951, 2.936, 2.922, 2.918, 2.906, 2.904, 2.901, 2.901, 2.907, 2.911, 2.921, 2.931, 2.941, 2.942, 2.944,
> +                            2.964, 2.954, 2.936, 2.924, 2.918, 2.909, 2.905, 2.905, 2.905, 2.907, 2.912, 2.923, 2.933, 2.942, 2.944, 2.944,
> +                            2.964, 2.958, 2.943, 2.927, 2.921, 2.914, 2.909, 2.907, 2.907, 2.912, 2.916, 2.928, 2.936, 2.944, 2.947, 2.952
> +                        ]
> +                    },
> +                    {
> +                        "ct": 5930,
> +                        "table":
> +                        [
> +                            3.312, 3.308, 3.301, 3.294, 3.288, 3.277, 3.268, 3.261, 3.259, 3.261, 3.267, 3.273, 3.285, 3.301, 3.303, 3.312,
> +                            3.308, 3.304, 3.294, 3.291, 3.283, 3.271, 3.263, 3.259, 3.257, 3.258, 3.261, 3.268, 3.278, 3.293, 3.299, 3.299,
> +                            3.302, 3.296, 3.288, 3.282, 3.276, 3.267, 3.259, 3.254, 3.252, 3.253, 3.256, 3.261, 3.273, 3.289, 3.292, 3.292,
> +                            3.296, 3.289, 3.282, 3.276, 3.269, 3.263, 3.256, 3.251, 3.248, 3.249, 3.251, 3.257, 3.268, 3.279, 3.284, 3.284,
> +                            3.292, 3.285, 3.279, 3.271, 3.264, 3.257, 3.249, 3.243, 3.241, 3.241, 3.246, 3.252, 3.261, 3.274, 3.275, 3.273,
> +                            3.291, 3.285, 3.276, 3.268, 3.259, 3.251, 3.242, 3.239, 3.236, 3.238, 3.244, 3.248, 3.258, 3.268, 3.269, 3.265,
> +                            3.294, 3.288, 3.275, 3.266, 3.257, 3.248, 3.239, 3.238, 3.237, 3.238, 3.243, 3.246, 3.255, 3.264, 3.264, 3.257,
> +                            3.297, 3.293, 3.279, 3.268, 3.258, 3.249, 3.238, 3.237, 3.239, 3.239, 3.243, 3.245, 3.255, 3.264, 3.264, 3.263,
> +                            3.301, 3.295, 3.281, 3.271, 3.259, 3.248, 3.237, 3.237, 3.239, 3.241, 3.243, 3.246, 3.257, 3.265, 3.266, 3.264,
> +                            3.306, 3.295, 3.279, 3.271, 3.261, 3.247, 3.235, 3.234, 3.239, 3.239, 3.243, 3.247, 3.258, 3.265, 3.265, 3.264,
> +                            3.308, 3.297, 3.279, 3.272, 3.261, 3.249, 3.239, 3.239, 3.241, 3.243, 3.245, 3.248, 3.261, 3.265, 3.266, 3.265,
> +                            3.309, 3.301, 3.286, 3.276, 3.267, 3.256, 3.246, 3.242, 3.244, 3.244, 3.249, 3.253, 3.263, 3.267, 3.271, 3.274
> +                        ]
> +                    }
> +                ],
> +                "calibrations_Cb": [
> +                    {
> +                        "ct": 2960,
> +                        "table":
> +                        [
> +                            2.133, 2.134, 2.139, 2.143, 2.148, 2.155, 2.158, 2.158, 2.158, 2.161, 2.161, 2.162, 2.159, 2.156, 2.152, 2.151,
> +                            2.132, 2.133, 2.135, 2.142, 2.147, 2.153, 2.158, 2.158, 2.158, 2.158, 2.159, 2.159, 2.157, 2.154, 2.151, 2.148,
> +                            2.133, 2.133, 2.135, 2.142, 2.149, 2.154, 2.158, 2.158, 2.157, 2.156, 2.158, 2.157, 2.155, 2.153, 2.148, 2.146,
> +                            2.133, 2.133, 2.138, 2.145, 2.149, 2.154, 2.158, 2.159, 2.158, 2.155, 2.157, 2.156, 2.153, 2.149, 2.146, 2.144,
> +                            2.133, 2.134, 2.139, 2.146, 2.149, 2.154, 2.158, 2.159, 2.159, 2.156, 2.154, 2.154, 2.149, 2.145, 2.143, 2.139,
> +                            2.135, 2.135, 2.139, 2.146, 2.151, 2.155, 2.158, 2.159, 2.158, 2.156, 2.153, 2.151, 2.146, 2.143, 2.139, 2.136,
> +                            2.135, 2.135, 2.138, 2.145, 2.151, 2.154, 2.157, 2.158, 2.157, 2.156, 2.153, 2.151, 2.147, 2.143, 2.141, 2.137,
> +                            2.135, 2.134, 2.135, 2.141, 2.149, 2.154, 2.157, 2.157, 2.157, 2.157, 2.157, 2.153, 2.149, 2.146, 2.142, 2.139,
> +                            2.132, 2.133, 2.135, 2.139, 2.148, 2.153, 2.158, 2.159, 2.159, 2.161, 2.161, 2.157, 2.154, 2.149, 2.144, 2.141,
> +                            2.132, 2.133, 2.135, 2.141, 2.149, 2.155, 2.161, 2.161, 2.162, 2.162, 2.163, 2.159, 2.154, 2.149, 2.144, 2.138,
> +                            2.136, 2.136, 2.137, 2.143, 2.149, 2.156, 2.162, 2.163, 2.162, 2.163, 2.164, 2.161, 2.157, 2.152, 2.146, 2.138,
> +                            2.137, 2.137, 2.141, 2.147, 2.152, 2.157, 2.162, 2.162, 2.159, 2.161, 2.162, 2.162, 2.157, 2.152, 2.148, 2.148
> +                        ]
> +                    },
> +                    {
> +                        "ct": 4850,
> +                        "table":
> +                        [
> +                            1.463, 1.464, 1.471, 1.478, 1.479, 1.483, 1.484, 1.486, 1.486, 1.484, 1.483, 1.481, 1.478, 1.475, 1.471, 1.468,
> +                            1.463, 1.463, 1.468, 1.476, 1.479, 1.482, 1.484, 1.487, 1.486, 1.484, 1.483, 1.482, 1.478, 1.473, 1.469, 1.468,
> +                            1.463, 1.464, 1.468, 1.476, 1.479, 1.483, 1.484, 1.486, 1.486, 1.485, 1.484, 1.482, 1.477, 1.473, 1.469, 1.468,
> +                            1.463, 1.464, 1.469, 1.477, 1.481, 1.483, 1.485, 1.487, 1.487, 1.485, 1.485, 1.482, 1.478, 1.474, 1.469, 1.468,
> +                            1.465, 1.465, 1.471, 1.478, 1.481, 1.484, 1.486, 1.488, 1.488, 1.487, 1.485, 1.482, 1.477, 1.472, 1.468, 1.467,
> +                            1.465, 1.466, 1.472, 1.479, 1.482, 1.485, 1.486, 1.488, 1.488, 1.486, 1.484, 1.479, 1.475, 1.472, 1.468, 1.466,
> +                            1.466, 1.466, 1.472, 1.478, 1.482, 1.484, 1.485, 1.488, 1.487, 1.485, 1.483, 1.479, 1.475, 1.472, 1.469, 1.468,
> +                            1.465, 1.466, 1.469, 1.476, 1.481, 1.485, 1.485, 1.486, 1.486, 1.485, 1.483, 1.479, 1.477, 1.474, 1.471, 1.469,
> +                            1.464, 1.465, 1.469, 1.476, 1.481, 1.484, 1.485, 1.487, 1.487, 1.486, 1.485, 1.481, 1.478, 1.475, 1.471, 1.469,
> +                            1.463, 1.464, 1.469, 1.477, 1.481, 1.485, 1.485, 1.488, 1.488, 1.487, 1.486, 1.481, 1.478, 1.475, 1.471, 1.468,
> +                            1.464, 1.465, 1.471, 1.478, 1.482, 1.486, 1.486, 1.488, 1.488, 1.487, 1.486, 1.481, 1.478, 1.475, 1.472, 1.468,
> +                            1.465, 1.466, 1.472, 1.481, 1.483, 1.487, 1.487, 1.488, 1.488, 1.486, 1.485, 1.481, 1.479, 1.476, 1.473, 1.472
> +                        ]
> +                    },
> +                    {
> +                        "ct": 5930,
> +                        "table":
> +                        [
> +                            1.443, 1.444, 1.448, 1.453, 1.459, 1.463, 1.465, 1.467, 1.469, 1.469, 1.467, 1.466, 1.462, 1.457, 1.454, 1.451,
> +                            1.443, 1.444, 1.445, 1.451, 1.459, 1.463, 1.465, 1.467, 1.469, 1.469, 1.467, 1.465, 1.461, 1.456, 1.452, 1.451,
> +                            1.444, 1.444, 1.445, 1.451, 1.459, 1.463, 1.466, 1.468, 1.469, 1.469, 1.467, 1.465, 1.461, 1.456, 1.452, 1.449,
> +                            1.444, 1.444, 1.447, 1.452, 1.459, 1.464, 1.467, 1.469, 1.471, 1.469, 1.467, 1.466, 1.461, 1.456, 1.452, 1.449,
> +                            1.444, 1.445, 1.448, 1.452, 1.459, 1.465, 1.469, 1.471, 1.471, 1.471, 1.468, 1.465, 1.461, 1.455, 1.451, 1.449,
> +                            1.445, 1.446, 1.449, 1.453, 1.461, 1.466, 1.469, 1.471, 1.472, 1.469, 1.467, 1.465, 1.459, 1.455, 1.451, 1.447,
> +                            1.446, 1.446, 1.449, 1.453, 1.461, 1.466, 1.469, 1.469, 1.469, 1.469, 1.467, 1.465, 1.459, 1.455, 1.452, 1.449,
> +                            1.446, 1.446, 1.447, 1.451, 1.459, 1.466, 1.469, 1.469, 1.469, 1.469, 1.467, 1.465, 1.461, 1.457, 1.454, 1.451,
> +                            1.444, 1.444, 1.447, 1.451, 1.459, 1.466, 1.469, 1.469, 1.471, 1.471, 1.468, 1.466, 1.462, 1.458, 1.454, 1.452,
> +                            1.444, 1.444, 1.448, 1.453, 1.459, 1.466, 1.469, 1.471, 1.472, 1.472, 1.468, 1.466, 1.462, 1.458, 1.454, 1.449,
> +                            1.446, 1.447, 1.449, 1.454, 1.461, 1.466, 1.471, 1.471, 1.471, 1.471, 1.468, 1.466, 1.462, 1.459, 1.455, 1.449,
> +                            1.447, 1.447, 1.452, 1.457, 1.462, 1.468, 1.472, 1.472, 1.471, 1.471, 1.468, 1.466, 1.462, 1.459, 1.456, 1.455
> +                        ]
> +                    }
> +                ],
> +                "luminance_lut":
> +                [
> +                    1.548, 1.499, 1.387, 1.289, 1.223, 1.183, 1.164, 1.154, 1.153, 1.169, 1.211, 1.265, 1.345, 1.448, 1.581, 1.619,
> +                    1.513, 1.412, 1.307, 1.228, 1.169, 1.129, 1.105, 1.098, 1.103, 1.127, 1.157, 1.209, 1.272, 1.361, 1.481, 1.583,
> +                    1.449, 1.365, 1.257, 1.175, 1.124, 1.085, 1.062, 1.054, 1.059, 1.079, 1.113, 1.151, 1.211, 1.293, 1.407, 1.488,
> +                    1.424, 1.324, 1.222, 1.139, 1.089, 1.056, 1.034, 1.031, 1.034, 1.049, 1.075, 1.115, 1.164, 1.241, 1.351, 1.446,
> +                    1.412, 1.297, 1.203, 1.119, 1.069, 1.039, 1.021, 1.016, 1.022, 1.032, 1.052, 1.086, 1.135, 1.212, 1.321, 1.439,
> +                    1.406, 1.287, 1.195, 1.115, 1.059, 1.028, 1.014, 1.012, 1.015, 1.026, 1.041, 1.074, 1.125, 1.201, 1.302, 1.425,
> +                    1.406, 1.294, 1.205, 1.126, 1.062, 1.031, 1.013, 1.009, 1.011, 1.019, 1.042, 1.079, 1.129, 1.203, 1.302, 1.435,
> +                    1.415, 1.318, 1.229, 1.146, 1.076, 1.039, 1.019, 1.014, 1.017, 1.031, 1.053, 1.093, 1.144, 1.219, 1.314, 1.436,
> +                    1.435, 1.348, 1.246, 1.164, 1.094, 1.059, 1.036, 1.032, 1.037, 1.049, 1.072, 1.114, 1.167, 1.257, 1.343, 1.462,
> +                    1.471, 1.385, 1.278, 1.189, 1.124, 1.084, 1.064, 1.061, 1.069, 1.078, 1.101, 1.146, 1.207, 1.298, 1.415, 1.496,
> +                    1.522, 1.436, 1.323, 1.228, 1.169, 1.118, 1.101, 1.094, 1.099, 1.113, 1.146, 1.194, 1.265, 1.353, 1.474, 1.571,
> +                    1.578, 1.506, 1.378, 1.281, 1.211, 1.156, 1.135, 1.134, 1.139, 1.158, 1.194, 1.251, 1.327, 1.427, 1.559, 1.611
> +                ],
> +                "sigma": 0.00121,
> +                "sigma_Cb": 0.00115
> +            }
> +        },
> +        {
> +            "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": 2360,
> +                        "ccm":
> +                        [
> +                            1.66078, -0.23588, -0.42491,
> +                            -0.47456, 1.82763, -0.35307,
> +                            -0.00545, -1.44729, 2.45273
> +                        ]
> +                    },
> +                    {
> +                        "ct": 2870,
> +                        "ccm":
> +                        [
> +                            1.78373, -0.55344, -0.23029,
> +                            -0.39951, 1.69701, -0.29751,
> +                            0.01986, -1.06525, 2.04539
> +                        ]
> +                    },
> +                    {
> +                        "ct": 2970,
> +                        "ccm":
> +                        [
> +                            1.73511, -0.56973, -0.16537,
> +                            -0.36338, 1.69878, -0.33539,
> +                            -0.02354, -0.76813, 1.79168
> +                        ]
> +                    },
> +                    {
> +                        "ct": 3000,
> +                        "ccm":
> +                        [
> +                            2.06374, -0.92218, -0.14156,
> +                            -0.41721, 1.69289, -0.27568,
> +                            -0.00554, -0.92741, 1.93295
> +                        ]
> +                    },
> +                    {
> +                        "ct": 3700,
> +                        "ccm":
> +                        [
> +                            2.13792, -1.08136, -0.05655,
> +                            -0.34739, 1.58989, -0.24249,
> +                            -0.00349, -0.76789, 1.77138
> +                        ]
> +                    },
> +                    {
> +                        "ct": 3870,
> +                        "ccm":
> +                        [
> +                            1.83834, -0.70528, -0.13307,
> +                            -0.30499, 1.60523, -0.30024,
> +                            -0.05701, -0.58313, 1.64014
> +                        ]
> +                    },
> +                    {
> +                        "ct": 4000,
> +                        "ccm":
> +                        [
> +                            2.15741, -1.10295, -0.05447,
> +                            -0.34631, 1.61158, -0.26528,
> +                            -0.02723, -0.70288, 1.73011
> +                        ]
> +                    },
> +                    {
> +                        "ct": 4400,
> +                        "ccm":
> +                        [
> +                            2.05729, -0.95007, -0.10723,
> +                            -0.41712, 1.78606, -0.36894,
> +                            -0.11899, -0.55727, 1.67626
> +                        ]
> +                    },
> +                    {
> +                        "ct": 4715,
> +                        "ccm":
> +                        [
> +                            1.90255, -0.77478, -0.12777,
> +                            -0.31338, 1.88197, -0.56858,
> +                            -0.06001, -0.61785, 1.67786
> +                        ]
> +                    },
> +                    {
> +                        "ct": 5920,
> +                        "ccm":
> +                        [
> +                            1.98691, -0.84671, -0.14019,
> +                            -0.26581, 1.70615, -0.44035,
> +                            -0.09532, -0.47332, 1.56864
> +                        ]
> +                    },
> +                    {
> +                        "ct": 9050,
> +                        "ccm":
> +                        [
> +                            2.09255, -0.76541, -0.32714,
> +                            -0.28973, 2.27462, -0.98489,
> +                            -0.17299, -0.61275, 1.78574
> +                        ]
> +                    }
> +                ]
> +            }
> +        },
> +        {
> +            "rpi.sharpen": { }
> +        },
> +        {
> +            "rpi.focus": { }
> +        }
> +    ]
> +}
> \ No newline at end of file
> -- 
> 2.30.2
>
Naushir Patuck Nov. 30, 2022, 1:39 p.m. UTC | #2
Hi David,

Thanks for the changes.


On Wed, 30 Nov 2022 at 12:58, David Plowman via libcamera-devel <
libcamera-devel@lists.libcamera.org> wrote:

> The latest camera modules have a very slightly different IR filter, so
> the tuning file is slightly revised to give best results with both old
> and new camera modules.
>
> The original tuning file is retained as imx477_v1.json in case anyone
> should wish to continue using it.
>
> Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
>

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


> ---
>  src/ipa/raspberrypi/data/imx477.json    |  20 +-
>  src/ipa/raspberrypi/data/imx477_v1.json | 519 ++++++++++++++++++++++++
>  2 files changed, 530 insertions(+), 9 deletions(-)
>  create mode 100644 src/ipa/raspberrypi/data/imx477_v1.json
>
> diff --git a/src/ipa/raspberrypi/data/imx477.json
> b/src/ipa/raspberrypi/data/imx477.json
> index 5bcaac67..bfc0774f 100644
> --- a/src/ipa/raspberrypi/data/imx477.json
> +++ b/src/ipa/raspberrypi/data/imx477.json
> @@ -115,15 +115,17 @@
>                  "ct_curve":
>                  [
>                      2360.0, 0.6009, 0.3093,
> -                    2870.0, 0.5047, 0.3936,
> -                    2970.0, 0.4782, 0.4221,
> -                    3700.0, 0.4212, 0.4923,
> -                    3870.0, 0.4037, 0.5166,
> -                    4000.0, 0.3965, 0.5271,
> -                    4400.0, 0.3703, 0.5666,
> -                    4715.0, 0.3411, 0.6147,
> -                    5920.0, 0.3108, 0.6687,
> -                    9050.0, 0.2524, 0.7856
> +                    2848.0, 0.5071, 0.4000,
> +                    2903.0, 0.4905, 0.4392,
> +                    3628.0, 0.4261, 0.5564,
> +                    3643.0, 0.4228, 0.5623,
> +                    4660.0, 0.3529, 0.6800,
> +                    5579.0, 0.3227, 0.7000,
> +                    6125.0, 0.3129, 0.7100,
> +                    6671.0, 0.3065, 0.7200,
> +                    7217.0, 0.3014, 0.7300,
> +                    7763.0, 0.2950, 0.7400,
> +                    9505.0, 0.2524, 0.7856
>                  ],
>                  "sensitivity_r": 1.05,
>                  "sensitivity_b": 1.05,
> diff --git a/src/ipa/raspberrypi/data/imx477_v1.json
> b/src/ipa/raspberrypi/data/imx477_v1.json
> new file mode 100644
> index 00000000..5bcaac67
> --- /dev/null
> +++ b/src/ipa/raspberrypi/data/imx477_v1.json
> @@ -0,0 +1,519 @@
> +{
> +    "version": 2.0,
> +    "target": "bcm2835",
> +    "algorithms": [
> +        {
> +            "rpi.black_level":
> +            {
> +                "black_level": 4096
> +            }
> +        },
> +        {
> +            "rpi.dpc": { }
> +        },
> +        {
> +            "rpi.lux":
> +            {
> +                "reference_shutter_speed": 27242,
> +                "reference_gain": 1.0,
> +                "reference_aperture": 1.0,
> +                "reference_lux": 830,
> +                "reference_Y": 17755
> +            }
> +        },
> +        {
> +            "rpi.noise":
> +            {
> +                "reference_constant": 0,
> +                "reference_slope": 2.767
> +            }
> +        },
> +        {
> +            "rpi.geq":
> +            {
> +                "offset": 204,
> +                "slope": 0.01078
> +            }
> +        },
> +        {
> +            "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":
> +                [
> +                    2360.0, 0.6009, 0.3093,
> +                    2870.0, 0.5047, 0.3936,
> +                    2970.0, 0.4782, 0.4221,
> +                    3700.0, 0.4212, 0.4923,
> +                    3870.0, 0.4037, 0.5166,
> +                    4000.0, 0.3965, 0.5271,
> +                    4400.0, 0.3703, 0.5666,
> +                    4715.0, 0.3411, 0.6147,
> +                    5920.0, 0.3108, 0.6687,
> +                    9050.0, 0.2524, 0.7856
> +                ],
> +                "sensitivity_r": 1.05,
> +                "sensitivity_b": 1.05,
> +                "transverse_pos": 0.0238,
> +                "transverse_neg": 0.04429
> +            }
> +        },
> +        {
> +            "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, 66666 ],
> +                        "gain": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]
> +                    },
> +                    "short":
> +                    {
> +                        "shutter": [ 100, 5000, 10000, 20000, 33333 ],
> +                        "gain": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]
> +                    },
> +                    "long":
> +                    {
> +                        "shutter": [ 100, 10000, 30000, 60000, 120000 ],
> +                        "gain": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]
> +                    }
> +                },
> +                "constraint_modes":
> +                {
> +                    "normal": [
> +                        {
> +                            "bound": "LOWER",
> +                            "q_lo": 0.98,
> +                            "q_hi": 1.0,
> +                            "y_target":
> +                            [
> +                                0, 0.3,
> +                                1000, 0.3
> +                            ]
> +                        }
> +                    ],
> +                    "highlight": [
> +                        {
> +                            "bound": "LOWER",
> +                            "q_lo": 0.98,
> +                            "q_hi": 1.0,
> +                            "y_target":
> +                            [
> +                                0, 0.3,
> +                                1000, 0.3
> +                            ]
> +                        },
> +                        {
> +                            "bound": "UPPER",
> +                            "q_lo": 0.98,
> +                            "q_hi": 1.0,
> +                            "y_target":
> +                            [
> +                                0, 0.8,
> +                                1000, 0.8
> +                            ]
> +                        }
> +                    ],
> +                    "shadows": [
> +                        {
> +                            "bound": "LOWER",
> +                            "q_lo": 0.0,
> +                            "q_hi": 0.5,
> +                            "y_target":
> +                            [
> +                                0, 0.17,
> +                                1000, 0.17
> +                            ]
> +                        }
> +                    ]
> +                },
> +                "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": 2960,
> +                        "table":
> +                        [
> +                            2.088, 2.086, 2.082, 2.081, 2.077, 2.071,
> 2.068, 2.068, 2.072, 2.073, 2.075, 2.078, 2.084, 2.092, 2.095, 2.098,
> +                            2.086, 2.084, 2.079, 2.078, 2.075, 2.068,
> 2.064, 2.063, 2.068, 2.071, 2.072, 2.075, 2.081, 2.089, 2.092, 2.094,
> +                            2.083, 2.081, 2.077, 2.072, 2.069, 2.062,
> 2.059, 2.059, 2.063, 2.067, 2.069, 2.072, 2.079, 2.088, 2.089, 2.089,
> +                            2.081, 2.077, 2.072, 2.068, 2.065, 2.058,
> 2.055, 2.054, 2.057, 2.062, 2.066, 2.069, 2.077, 2.084, 2.086, 2.086,
> +                            2.078, 2.075, 2.069, 2.065, 2.061, 2.055,
> 2.052, 2.049, 2.051, 2.056, 2.062, 2.065, 2.072, 2.079, 2.081, 2.079,
> +                            2.079, 2.075, 2.069, 2.064, 2.061, 2.053,
> 2.049, 2.046, 2.049, 2.051, 2.057, 2.062, 2.069, 2.075, 2.077, 2.075,
> +                            2.082, 2.079, 2.072, 2.065, 2.061, 2.054,
> 2.049, 2.047, 2.049, 2.051, 2.056, 2.061, 2.066, 2.073, 2.073, 2.069,
> +                            2.086, 2.082, 2.075, 2.068, 2.062, 2.054,
> 2.051, 2.049, 2.051, 2.052, 2.056, 2.061, 2.066, 2.073, 2.073, 2.072,
> +                            2.088, 2.086, 2.079, 2.074, 2.066, 2.057,
> 2.051, 2.051, 2.054, 2.055, 2.056, 2.061, 2.067, 2.072, 2.073, 2.072,
> +                            2.091, 2.087, 2.079, 2.075, 2.068, 2.057,
> 2.052, 2.052, 2.056, 2.055, 2.055, 2.059, 2.066, 2.072, 2.072, 2.072,
> +                            2.093, 2.088, 2.081, 2.077, 2.069, 2.059,
> 2.054, 2.054, 2.057, 2.056, 2.056, 2.058, 2.066, 2.072, 2.073, 2.073,
> +                            2.095, 2.091, 2.084, 2.078, 2.075, 2.067,
> 2.057, 2.057, 2.059, 2.059, 2.058, 2.059, 2.068, 2.073, 2.075, 2.078
> +                        ]
> +                    },
> +                    {
> +                        "ct": 4850,
> +                        "table":
> +                        [
> +                            2.973, 2.968, 2.956, 2.943, 2.941, 2.932,
> 2.923, 2.921, 2.924, 2.929, 2.931, 2.939, 2.953, 2.965, 2.966, 2.976,
> +                            2.969, 2.962, 2.951, 2.941, 2.934, 2.928,
> 2.919, 2.918, 2.919, 2.923, 2.927, 2.933, 2.945, 2.957, 2.962, 2.962,
> +                            2.964, 2.956, 2.944, 2.932, 2.929, 2.924,
> 2.915, 2.914, 2.915, 2.919, 2.924, 2.928, 2.941, 2.952, 2.958, 2.959,
> +                            2.957, 2.951, 2.939, 2.928, 2.924, 2.919,
> 2.913, 2.911, 2.911, 2.915, 2.919, 2.925, 2.936, 2.947, 2.952, 2.953,
> +                            2.954, 2.947, 2.935, 2.924, 2.919, 2.915,
> 2.908, 2.906, 2.906, 2.907, 2.914, 2.921, 2.932, 2.941, 2.943, 2.942,
> +                            2.953, 2.946, 2.932, 2.921, 2.916, 2.911,
> 2.904, 2.902, 2.901, 2.904, 2.909, 2.919, 2.926, 2.937, 2.939, 2.939,
> +                            2.953, 2.947, 2.932, 2.918, 2.915, 2.909,
> 2.903, 2.901, 2.901, 2.906, 2.911, 2.918, 2.924, 2.936, 2.936, 2.932,
> +                            2.956, 2.948, 2.934, 2.919, 2.916, 2.908,
> 2.903, 2.901, 2.902, 2.907, 2.909, 2.917, 2.926, 2.936, 2.939, 2.939,
> +                            2.957, 2.951, 2.936, 2.923, 2.917, 2.907,
> 2.904, 2.901, 2.902, 2.908, 2.911, 2.919, 2.929, 2.939, 2.942, 2.942,
> +                            2.961, 2.951, 2.936, 2.922, 2.918, 2.906,
> 2.904, 2.901, 2.901, 2.907, 2.911, 2.921, 2.931, 2.941, 2.942, 2.944,
> +                            2.964, 2.954, 2.936, 2.924, 2.918, 2.909,
> 2.905, 2.905, 2.905, 2.907, 2.912, 2.923, 2.933, 2.942, 2.944, 2.944,
> +                            2.964, 2.958, 2.943, 2.927, 2.921, 2.914,
> 2.909, 2.907, 2.907, 2.912, 2.916, 2.928, 2.936, 2.944, 2.947, 2.952
> +                        ]
> +                    },
> +                    {
> +                        "ct": 5930,
> +                        "table":
> +                        [
> +                            3.312, 3.308, 3.301, 3.294, 3.288, 3.277,
> 3.268, 3.261, 3.259, 3.261, 3.267, 3.273, 3.285, 3.301, 3.303, 3.312,
> +                            3.308, 3.304, 3.294, 3.291, 3.283, 3.271,
> 3.263, 3.259, 3.257, 3.258, 3.261, 3.268, 3.278, 3.293, 3.299, 3.299,
> +                            3.302, 3.296, 3.288, 3.282, 3.276, 3.267,
> 3.259, 3.254, 3.252, 3.253, 3.256, 3.261, 3.273, 3.289, 3.292, 3.292,
> +                            3.296, 3.289, 3.282, 3.276, 3.269, 3.263,
> 3.256, 3.251, 3.248, 3.249, 3.251, 3.257, 3.268, 3.279, 3.284, 3.284,
> +                            3.292, 3.285, 3.279, 3.271, 3.264, 3.257,
> 3.249, 3.243, 3.241, 3.241, 3.246, 3.252, 3.261, 3.274, 3.275, 3.273,
> +                            3.291, 3.285, 3.276, 3.268, 3.259, 3.251,
> 3.242, 3.239, 3.236, 3.238, 3.244, 3.248, 3.258, 3.268, 3.269, 3.265,
> +                            3.294, 3.288, 3.275, 3.266, 3.257, 3.248,
> 3.239, 3.238, 3.237, 3.238, 3.243, 3.246, 3.255, 3.264, 3.264, 3.257,
> +                            3.297, 3.293, 3.279, 3.268, 3.258, 3.249,
> 3.238, 3.237, 3.239, 3.239, 3.243, 3.245, 3.255, 3.264, 3.264, 3.263,
> +                            3.301, 3.295, 3.281, 3.271, 3.259, 3.248,
> 3.237, 3.237, 3.239, 3.241, 3.243, 3.246, 3.257, 3.265, 3.266, 3.264,
> +                            3.306, 3.295, 3.279, 3.271, 3.261, 3.247,
> 3.235, 3.234, 3.239, 3.239, 3.243, 3.247, 3.258, 3.265, 3.265, 3.264,
> +                            3.308, 3.297, 3.279, 3.272, 3.261, 3.249,
> 3.239, 3.239, 3.241, 3.243, 3.245, 3.248, 3.261, 3.265, 3.266, 3.265,
> +                            3.309, 3.301, 3.286, 3.276, 3.267, 3.256,
> 3.246, 3.242, 3.244, 3.244, 3.249, 3.253, 3.263, 3.267, 3.271, 3.274
> +                        ]
> +                    }
> +                ],
> +                "calibrations_Cb": [
> +                    {
> +                        "ct": 2960,
> +                        "table":
> +                        [
> +                            2.133, 2.134, 2.139, 2.143, 2.148, 2.155,
> 2.158, 2.158, 2.158, 2.161, 2.161, 2.162, 2.159, 2.156, 2.152, 2.151,
> +                            2.132, 2.133, 2.135, 2.142, 2.147, 2.153,
> 2.158, 2.158, 2.158, 2.158, 2.159, 2.159, 2.157, 2.154, 2.151, 2.148,
> +                            2.133, 2.133, 2.135, 2.142, 2.149, 2.154,
> 2.158, 2.158, 2.157, 2.156, 2.158, 2.157, 2.155, 2.153, 2.148, 2.146,
> +                            2.133, 2.133, 2.138, 2.145, 2.149, 2.154,
> 2.158, 2.159, 2.158, 2.155, 2.157, 2.156, 2.153, 2.149, 2.146, 2.144,
> +                            2.133, 2.134, 2.139, 2.146, 2.149, 2.154,
> 2.158, 2.159, 2.159, 2.156, 2.154, 2.154, 2.149, 2.145, 2.143, 2.139,
> +                            2.135, 2.135, 2.139, 2.146, 2.151, 2.155,
> 2.158, 2.159, 2.158, 2.156, 2.153, 2.151, 2.146, 2.143, 2.139, 2.136,
> +                            2.135, 2.135, 2.138, 2.145, 2.151, 2.154,
> 2.157, 2.158, 2.157, 2.156, 2.153, 2.151, 2.147, 2.143, 2.141, 2.137,
> +                            2.135, 2.134, 2.135, 2.141, 2.149, 2.154,
> 2.157, 2.157, 2.157, 2.157, 2.157, 2.153, 2.149, 2.146, 2.142, 2.139,
> +                            2.132, 2.133, 2.135, 2.139, 2.148, 2.153,
> 2.158, 2.159, 2.159, 2.161, 2.161, 2.157, 2.154, 2.149, 2.144, 2.141,
> +                            2.132, 2.133, 2.135, 2.141, 2.149, 2.155,
> 2.161, 2.161, 2.162, 2.162, 2.163, 2.159, 2.154, 2.149, 2.144, 2.138,
> +                            2.136, 2.136, 2.137, 2.143, 2.149, 2.156,
> 2.162, 2.163, 2.162, 2.163, 2.164, 2.161, 2.157, 2.152, 2.146, 2.138,
> +                            2.137, 2.137, 2.141, 2.147, 2.152, 2.157,
> 2.162, 2.162, 2.159, 2.161, 2.162, 2.162, 2.157, 2.152, 2.148, 2.148
> +                        ]
> +                    },
> +                    {
> +                        "ct": 4850,
> +                        "table":
> +                        [
> +                            1.463, 1.464, 1.471, 1.478, 1.479, 1.483,
> 1.484, 1.486, 1.486, 1.484, 1.483, 1.481, 1.478, 1.475, 1.471, 1.468,
> +                            1.463, 1.463, 1.468, 1.476, 1.479, 1.482,
> 1.484, 1.487, 1.486, 1.484, 1.483, 1.482, 1.478, 1.473, 1.469, 1.468,
> +                            1.463, 1.464, 1.468, 1.476, 1.479, 1.483,
> 1.484, 1.486, 1.486, 1.485, 1.484, 1.482, 1.477, 1.473, 1.469, 1.468,
> +                            1.463, 1.464, 1.469, 1.477, 1.481, 1.483,
> 1.485, 1.487, 1.487, 1.485, 1.485, 1.482, 1.478, 1.474, 1.469, 1.468,
> +                            1.465, 1.465, 1.471, 1.478, 1.481, 1.484,
> 1.486, 1.488, 1.488, 1.487, 1.485, 1.482, 1.477, 1.472, 1.468, 1.467,
> +                            1.465, 1.466, 1.472, 1.479, 1.482, 1.485,
> 1.486, 1.488, 1.488, 1.486, 1.484, 1.479, 1.475, 1.472, 1.468, 1.466,
> +                            1.466, 1.466, 1.472, 1.478, 1.482, 1.484,
> 1.485, 1.488, 1.487, 1.485, 1.483, 1.479, 1.475, 1.472, 1.469, 1.468,
> +                            1.465, 1.466, 1.469, 1.476, 1.481, 1.485,
> 1.485, 1.486, 1.486, 1.485, 1.483, 1.479, 1.477, 1.474, 1.471, 1.469,
> +                            1.464, 1.465, 1.469, 1.476, 1.481, 1.484,
> 1.485, 1.487, 1.487, 1.486, 1.485, 1.481, 1.478, 1.475, 1.471, 1.469,
> +                            1.463, 1.464, 1.469, 1.477, 1.481, 1.485,
> 1.485, 1.488, 1.488, 1.487, 1.486, 1.481, 1.478, 1.475, 1.471, 1.468,
> +                            1.464, 1.465, 1.471, 1.478, 1.482, 1.486,
> 1.486, 1.488, 1.488, 1.487, 1.486, 1.481, 1.478, 1.475, 1.472, 1.468,
> +                            1.465, 1.466, 1.472, 1.481, 1.483, 1.487,
> 1.487, 1.488, 1.488, 1.486, 1.485, 1.481, 1.479, 1.476, 1.473, 1.472
> +                        ]
> +                    },
> +                    {
> +                        "ct": 5930,
> +                        "table":
> +                        [
> +                            1.443, 1.444, 1.448, 1.453, 1.459, 1.463,
> 1.465, 1.467, 1.469, 1.469, 1.467, 1.466, 1.462, 1.457, 1.454, 1.451,
> +                            1.443, 1.444, 1.445, 1.451, 1.459, 1.463,
> 1.465, 1.467, 1.469, 1.469, 1.467, 1.465, 1.461, 1.456, 1.452, 1.451,
> +                            1.444, 1.444, 1.445, 1.451, 1.459, 1.463,
> 1.466, 1.468, 1.469, 1.469, 1.467, 1.465, 1.461, 1.456, 1.452, 1.449,
> +                            1.444, 1.444, 1.447, 1.452, 1.459, 1.464,
> 1.467, 1.469, 1.471, 1.469, 1.467, 1.466, 1.461, 1.456, 1.452, 1.449,
> +                            1.444, 1.445, 1.448, 1.452, 1.459, 1.465,
> 1.469, 1.471, 1.471, 1.471, 1.468, 1.465, 1.461, 1.455, 1.451, 1.449,
> +                            1.445, 1.446, 1.449, 1.453, 1.461, 1.466,
> 1.469, 1.471, 1.472, 1.469, 1.467, 1.465, 1.459, 1.455, 1.451, 1.447,
> +                            1.446, 1.446, 1.449, 1.453, 1.461, 1.466,
> 1.469, 1.469, 1.469, 1.469, 1.467, 1.465, 1.459, 1.455, 1.452, 1.449,
> +                            1.446, 1.446, 1.447, 1.451, 1.459, 1.466,
> 1.469, 1.469, 1.469, 1.469, 1.467, 1.465, 1.461, 1.457, 1.454, 1.451,
> +                            1.444, 1.444, 1.447, 1.451, 1.459, 1.466,
> 1.469, 1.469, 1.471, 1.471, 1.468, 1.466, 1.462, 1.458, 1.454, 1.452,
> +                            1.444, 1.444, 1.448, 1.453, 1.459, 1.466,
> 1.469, 1.471, 1.472, 1.472, 1.468, 1.466, 1.462, 1.458, 1.454, 1.449,
> +                            1.446, 1.447, 1.449, 1.454, 1.461, 1.466,
> 1.471, 1.471, 1.471, 1.471, 1.468, 1.466, 1.462, 1.459, 1.455, 1.449,
> +                            1.447, 1.447, 1.452, 1.457, 1.462, 1.468,
> 1.472, 1.472, 1.471, 1.471, 1.468, 1.466, 1.462, 1.459, 1.456, 1.455
> +                        ]
> +                    }
> +                ],
> +                "luminance_lut":
> +                [
> +                    1.548, 1.499, 1.387, 1.289, 1.223, 1.183, 1.164,
> 1.154, 1.153, 1.169, 1.211, 1.265, 1.345, 1.448, 1.581, 1.619,
> +                    1.513, 1.412, 1.307, 1.228, 1.169, 1.129, 1.105,
> 1.098, 1.103, 1.127, 1.157, 1.209, 1.272, 1.361, 1.481, 1.583,
> +                    1.449, 1.365, 1.257, 1.175, 1.124, 1.085, 1.062,
> 1.054, 1.059, 1.079, 1.113, 1.151, 1.211, 1.293, 1.407, 1.488,
> +                    1.424, 1.324, 1.222, 1.139, 1.089, 1.056, 1.034,
> 1.031, 1.034, 1.049, 1.075, 1.115, 1.164, 1.241, 1.351, 1.446,
> +                    1.412, 1.297, 1.203, 1.119, 1.069, 1.039, 1.021,
> 1.016, 1.022, 1.032, 1.052, 1.086, 1.135, 1.212, 1.321, 1.439,
> +                    1.406, 1.287, 1.195, 1.115, 1.059, 1.028, 1.014,
> 1.012, 1.015, 1.026, 1.041, 1.074, 1.125, 1.201, 1.302, 1.425,
> +                    1.406, 1.294, 1.205, 1.126, 1.062, 1.031, 1.013,
> 1.009, 1.011, 1.019, 1.042, 1.079, 1.129, 1.203, 1.302, 1.435,
> +                    1.415, 1.318, 1.229, 1.146, 1.076, 1.039, 1.019,
> 1.014, 1.017, 1.031, 1.053, 1.093, 1.144, 1.219, 1.314, 1.436,
> +                    1.435, 1.348, 1.246, 1.164, 1.094, 1.059, 1.036,
> 1.032, 1.037, 1.049, 1.072, 1.114, 1.167, 1.257, 1.343, 1.462,
> +                    1.471, 1.385, 1.278, 1.189, 1.124, 1.084, 1.064,
> 1.061, 1.069, 1.078, 1.101, 1.146, 1.207, 1.298, 1.415, 1.496,
> +                    1.522, 1.436, 1.323, 1.228, 1.169, 1.118, 1.101,
> 1.094, 1.099, 1.113, 1.146, 1.194, 1.265, 1.353, 1.474, 1.571,
> +                    1.578, 1.506, 1.378, 1.281, 1.211, 1.156, 1.135,
> 1.134, 1.139, 1.158, 1.194, 1.251, 1.327, 1.427, 1.559, 1.611
> +                ],
> +                "sigma": 0.00121,
> +                "sigma_Cb": 0.00115
> +            }
> +        },
> +        {
> +            "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": 2360,
> +                        "ccm":
> +                        [
> +                            1.66078, -0.23588, -0.42491,
> +                            -0.47456, 1.82763, -0.35307,
> +                            -0.00545, -1.44729, 2.45273
> +                        ]
> +                    },
> +                    {
> +                        "ct": 2870,
> +                        "ccm":
> +                        [
> +                            1.78373, -0.55344, -0.23029,
> +                            -0.39951, 1.69701, -0.29751,
> +                            0.01986, -1.06525, 2.04539
> +                        ]
> +                    },
> +                    {
> +                        "ct": 2970,
> +                        "ccm":
> +                        [
> +                            1.73511, -0.56973, -0.16537,
> +                            -0.36338, 1.69878, -0.33539,
> +                            -0.02354, -0.76813, 1.79168
> +                        ]
> +                    },
> +                    {
> +                        "ct": 3000,
> +                        "ccm":
> +                        [
> +                            2.06374, -0.92218, -0.14156,
> +                            -0.41721, 1.69289, -0.27568,
> +                            -0.00554, -0.92741, 1.93295
> +                        ]
> +                    },
> +                    {
> +                        "ct": 3700,
> +                        "ccm":
> +                        [
> +                            2.13792, -1.08136, -0.05655,
> +                            -0.34739, 1.58989, -0.24249,
> +                            -0.00349, -0.76789, 1.77138
> +                        ]
> +                    },
> +                    {
> +                        "ct": 3870,
> +                        "ccm":
> +                        [
> +                            1.83834, -0.70528, -0.13307,
> +                            -0.30499, 1.60523, -0.30024,
> +                            -0.05701, -0.58313, 1.64014
> +                        ]
> +                    },
> +                    {
> +                        "ct": 4000,
> +                        "ccm":
> +                        [
> +                            2.15741, -1.10295, -0.05447,
> +                            -0.34631, 1.61158, -0.26528,
> +                            -0.02723, -0.70288, 1.73011
> +                        ]
> +                    },
> +                    {
> +                        "ct": 4400,
> +                        "ccm":
> +                        [
> +                            2.05729, -0.95007, -0.10723,
> +                            -0.41712, 1.78606, -0.36894,
> +                            -0.11899, -0.55727, 1.67626
> +                        ]
> +                    },
> +                    {
> +                        "ct": 4715,
> +                        "ccm":
> +                        [
> +                            1.90255, -0.77478, -0.12777,
> +                            -0.31338, 1.88197, -0.56858,
> +                            -0.06001, -0.61785, 1.67786
> +                        ]
> +                    },
> +                    {
> +                        "ct": 5920,
> +                        "ccm":
> +                        [
> +                            1.98691, -0.84671, -0.14019,
> +                            -0.26581, 1.70615, -0.44035,
> +                            -0.09532, -0.47332, 1.56864
> +                        ]
> +                    },
> +                    {
> +                        "ct": 9050,
> +                        "ccm":
> +                        [
> +                            2.09255, -0.76541, -0.32714,
> +                            -0.28973, 2.27462, -0.98489,
> +                            -0.17299, -0.61275, 1.78574
> +                        ]
> +                    }
> +                ]
> +            }
> +        },
> +        {
> +            "rpi.sharpen": { }
> +        },
> +        {
> +            "rpi.focus": { }
> +        }
> +    ]
> +}
> \ No newline at end of file
> --
> 2.30.2
>
>

Patch
diff mbox series

diff --git a/src/ipa/raspberrypi/data/imx477.json b/src/ipa/raspberrypi/data/imx477.json
index 5bcaac67..bfc0774f 100644
--- a/src/ipa/raspberrypi/data/imx477.json
+++ b/src/ipa/raspberrypi/data/imx477.json
@@ -115,15 +115,17 @@ 
                 "ct_curve":
                 [
                     2360.0, 0.6009, 0.3093,
-                    2870.0, 0.5047, 0.3936,
-                    2970.0, 0.4782, 0.4221,
-                    3700.0, 0.4212, 0.4923,
-                    3870.0, 0.4037, 0.5166,
-                    4000.0, 0.3965, 0.5271,
-                    4400.0, 0.3703, 0.5666,
-                    4715.0, 0.3411, 0.6147,
-                    5920.0, 0.3108, 0.6687,
-                    9050.0, 0.2524, 0.7856
+                    2848.0, 0.5071, 0.4000,
+                    2903.0, 0.4905, 0.4392,
+                    3628.0, 0.4261, 0.5564,
+                    3643.0, 0.4228, 0.5623,
+                    4660.0, 0.3529, 0.6800,
+                    5579.0, 0.3227, 0.7000,
+                    6125.0, 0.3129, 0.7100,
+                    6671.0, 0.3065, 0.7200,
+                    7217.0, 0.3014, 0.7300,
+                    7763.0, 0.2950, 0.7400,
+                    9505.0, 0.2524, 0.7856
                 ],
                 "sensitivity_r": 1.05,
                 "sensitivity_b": 1.05,
diff --git a/src/ipa/raspberrypi/data/imx477_v1.json b/src/ipa/raspberrypi/data/imx477_v1.json
new file mode 100644
index 00000000..5bcaac67
--- /dev/null
+++ b/src/ipa/raspberrypi/data/imx477_v1.json
@@ -0,0 +1,519 @@ 
+{
+    "version": 2.0,
+    "target": "bcm2835",
+    "algorithms": [
+        {
+            "rpi.black_level":
+            {
+                "black_level": 4096
+            }
+        },
+        {
+            "rpi.dpc": { }
+        },
+        {
+            "rpi.lux":
+            {
+                "reference_shutter_speed": 27242,
+                "reference_gain": 1.0,
+                "reference_aperture": 1.0,
+                "reference_lux": 830,
+                "reference_Y": 17755
+            }
+        },
+        {
+            "rpi.noise":
+            {
+                "reference_constant": 0,
+                "reference_slope": 2.767
+            }
+        },
+        {
+            "rpi.geq":
+            {
+                "offset": 204,
+                "slope": 0.01078
+            }
+        },
+        {
+            "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":
+                [
+                    2360.0, 0.6009, 0.3093,
+                    2870.0, 0.5047, 0.3936,
+                    2970.0, 0.4782, 0.4221,
+                    3700.0, 0.4212, 0.4923,
+                    3870.0, 0.4037, 0.5166,
+                    4000.0, 0.3965, 0.5271,
+                    4400.0, 0.3703, 0.5666,
+                    4715.0, 0.3411, 0.6147,
+                    5920.0, 0.3108, 0.6687,
+                    9050.0, 0.2524, 0.7856
+                ],
+                "sensitivity_r": 1.05,
+                "sensitivity_b": 1.05,
+                "transverse_pos": 0.0238,
+                "transverse_neg": 0.04429
+            }
+        },
+        {
+            "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, 66666 ],
+                        "gain": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]
+                    },
+                    "short":
+                    {
+                        "shutter": [ 100, 5000, 10000, 20000, 33333 ],
+                        "gain": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]
+                    },
+                    "long":
+                    {
+                        "shutter": [ 100, 10000, 30000, 60000, 120000 ],
+                        "gain": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]
+                    }
+                },
+                "constraint_modes":
+                {
+                    "normal": [
+                        {
+                            "bound": "LOWER",
+                            "q_lo": 0.98,
+                            "q_hi": 1.0,
+                            "y_target":
+                            [
+                                0, 0.3,
+                                1000, 0.3
+                            ]
+                        }
+                    ],
+                    "highlight": [
+                        {
+                            "bound": "LOWER",
+                            "q_lo": 0.98,
+                            "q_hi": 1.0,
+                            "y_target":
+                            [
+                                0, 0.3,
+                                1000, 0.3
+                            ]
+                        },
+                        {
+                            "bound": "UPPER",
+                            "q_lo": 0.98,
+                            "q_hi": 1.0,
+                            "y_target":
+                            [
+                                0, 0.8,
+                                1000, 0.8
+                            ]
+                        }
+                    ],
+                    "shadows": [
+                        {
+                            "bound": "LOWER",
+                            "q_lo": 0.0,
+                            "q_hi": 0.5,
+                            "y_target":
+                            [
+                                0, 0.17,
+                                1000, 0.17
+                            ]
+                        }
+                    ]
+                },
+                "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": 2960,
+                        "table":
+                        [
+                            2.088, 2.086, 2.082, 2.081, 2.077, 2.071, 2.068, 2.068, 2.072, 2.073, 2.075, 2.078, 2.084, 2.092, 2.095, 2.098,
+                            2.086, 2.084, 2.079, 2.078, 2.075, 2.068, 2.064, 2.063, 2.068, 2.071, 2.072, 2.075, 2.081, 2.089, 2.092, 2.094,
+                            2.083, 2.081, 2.077, 2.072, 2.069, 2.062, 2.059, 2.059, 2.063, 2.067, 2.069, 2.072, 2.079, 2.088, 2.089, 2.089,
+                            2.081, 2.077, 2.072, 2.068, 2.065, 2.058, 2.055, 2.054, 2.057, 2.062, 2.066, 2.069, 2.077, 2.084, 2.086, 2.086,
+                            2.078, 2.075, 2.069, 2.065, 2.061, 2.055, 2.052, 2.049, 2.051, 2.056, 2.062, 2.065, 2.072, 2.079, 2.081, 2.079,
+                            2.079, 2.075, 2.069, 2.064, 2.061, 2.053, 2.049, 2.046, 2.049, 2.051, 2.057, 2.062, 2.069, 2.075, 2.077, 2.075,
+                            2.082, 2.079, 2.072, 2.065, 2.061, 2.054, 2.049, 2.047, 2.049, 2.051, 2.056, 2.061, 2.066, 2.073, 2.073, 2.069,
+                            2.086, 2.082, 2.075, 2.068, 2.062, 2.054, 2.051, 2.049, 2.051, 2.052, 2.056, 2.061, 2.066, 2.073, 2.073, 2.072,
+                            2.088, 2.086, 2.079, 2.074, 2.066, 2.057, 2.051, 2.051, 2.054, 2.055, 2.056, 2.061, 2.067, 2.072, 2.073, 2.072,
+                            2.091, 2.087, 2.079, 2.075, 2.068, 2.057, 2.052, 2.052, 2.056, 2.055, 2.055, 2.059, 2.066, 2.072, 2.072, 2.072,
+                            2.093, 2.088, 2.081, 2.077, 2.069, 2.059, 2.054, 2.054, 2.057, 2.056, 2.056, 2.058, 2.066, 2.072, 2.073, 2.073,
+                            2.095, 2.091, 2.084, 2.078, 2.075, 2.067, 2.057, 2.057, 2.059, 2.059, 2.058, 2.059, 2.068, 2.073, 2.075, 2.078
+                        ]
+                    },
+                    {
+                        "ct": 4850,
+                        "table":
+                        [
+                            2.973, 2.968, 2.956, 2.943, 2.941, 2.932, 2.923, 2.921, 2.924, 2.929, 2.931, 2.939, 2.953, 2.965, 2.966, 2.976,
+                            2.969, 2.962, 2.951, 2.941, 2.934, 2.928, 2.919, 2.918, 2.919, 2.923, 2.927, 2.933, 2.945, 2.957, 2.962, 2.962,
+                            2.964, 2.956, 2.944, 2.932, 2.929, 2.924, 2.915, 2.914, 2.915, 2.919, 2.924, 2.928, 2.941, 2.952, 2.958, 2.959,
+                            2.957, 2.951, 2.939, 2.928, 2.924, 2.919, 2.913, 2.911, 2.911, 2.915, 2.919, 2.925, 2.936, 2.947, 2.952, 2.953,
+                            2.954, 2.947, 2.935, 2.924, 2.919, 2.915, 2.908, 2.906, 2.906, 2.907, 2.914, 2.921, 2.932, 2.941, 2.943, 2.942,
+                            2.953, 2.946, 2.932, 2.921, 2.916, 2.911, 2.904, 2.902, 2.901, 2.904, 2.909, 2.919, 2.926, 2.937, 2.939, 2.939,
+                            2.953, 2.947, 2.932, 2.918, 2.915, 2.909, 2.903, 2.901, 2.901, 2.906, 2.911, 2.918, 2.924, 2.936, 2.936, 2.932,
+                            2.956, 2.948, 2.934, 2.919, 2.916, 2.908, 2.903, 2.901, 2.902, 2.907, 2.909, 2.917, 2.926, 2.936, 2.939, 2.939,
+                            2.957, 2.951, 2.936, 2.923, 2.917, 2.907, 2.904, 2.901, 2.902, 2.908, 2.911, 2.919, 2.929, 2.939, 2.942, 2.942,
+                            2.961, 2.951, 2.936, 2.922, 2.918, 2.906, 2.904, 2.901, 2.901, 2.907, 2.911, 2.921, 2.931, 2.941, 2.942, 2.944,
+                            2.964, 2.954, 2.936, 2.924, 2.918, 2.909, 2.905, 2.905, 2.905, 2.907, 2.912, 2.923, 2.933, 2.942, 2.944, 2.944,
+                            2.964, 2.958, 2.943, 2.927, 2.921, 2.914, 2.909, 2.907, 2.907, 2.912, 2.916, 2.928, 2.936, 2.944, 2.947, 2.952
+                        ]
+                    },
+                    {
+                        "ct": 5930,
+                        "table":
+                        [
+                            3.312, 3.308, 3.301, 3.294, 3.288, 3.277, 3.268, 3.261, 3.259, 3.261, 3.267, 3.273, 3.285, 3.301, 3.303, 3.312,
+                            3.308, 3.304, 3.294, 3.291, 3.283, 3.271, 3.263, 3.259, 3.257, 3.258, 3.261, 3.268, 3.278, 3.293, 3.299, 3.299,
+                            3.302, 3.296, 3.288, 3.282, 3.276, 3.267, 3.259, 3.254, 3.252, 3.253, 3.256, 3.261, 3.273, 3.289, 3.292, 3.292,
+                            3.296, 3.289, 3.282, 3.276, 3.269, 3.263, 3.256, 3.251, 3.248, 3.249, 3.251, 3.257, 3.268, 3.279, 3.284, 3.284,
+                            3.292, 3.285, 3.279, 3.271, 3.264, 3.257, 3.249, 3.243, 3.241, 3.241, 3.246, 3.252, 3.261, 3.274, 3.275, 3.273,
+                            3.291, 3.285, 3.276, 3.268, 3.259, 3.251, 3.242, 3.239, 3.236, 3.238, 3.244, 3.248, 3.258, 3.268, 3.269, 3.265,
+                            3.294, 3.288, 3.275, 3.266, 3.257, 3.248, 3.239, 3.238, 3.237, 3.238, 3.243, 3.246, 3.255, 3.264, 3.264, 3.257,
+                            3.297, 3.293, 3.279, 3.268, 3.258, 3.249, 3.238, 3.237, 3.239, 3.239, 3.243, 3.245, 3.255, 3.264, 3.264, 3.263,
+                            3.301, 3.295, 3.281, 3.271, 3.259, 3.248, 3.237, 3.237, 3.239, 3.241, 3.243, 3.246, 3.257, 3.265, 3.266, 3.264,
+                            3.306, 3.295, 3.279, 3.271, 3.261, 3.247, 3.235, 3.234, 3.239, 3.239, 3.243, 3.247, 3.258, 3.265, 3.265, 3.264,
+                            3.308, 3.297, 3.279, 3.272, 3.261, 3.249, 3.239, 3.239, 3.241, 3.243, 3.245, 3.248, 3.261, 3.265, 3.266, 3.265,
+                            3.309, 3.301, 3.286, 3.276, 3.267, 3.256, 3.246, 3.242, 3.244, 3.244, 3.249, 3.253, 3.263, 3.267, 3.271, 3.274
+                        ]
+                    }
+                ],
+                "calibrations_Cb": [
+                    {
+                        "ct": 2960,
+                        "table":
+                        [
+                            2.133, 2.134, 2.139, 2.143, 2.148, 2.155, 2.158, 2.158, 2.158, 2.161, 2.161, 2.162, 2.159, 2.156, 2.152, 2.151,
+                            2.132, 2.133, 2.135, 2.142, 2.147, 2.153, 2.158, 2.158, 2.158, 2.158, 2.159, 2.159, 2.157, 2.154, 2.151, 2.148,
+                            2.133, 2.133, 2.135, 2.142, 2.149, 2.154, 2.158, 2.158, 2.157, 2.156, 2.158, 2.157, 2.155, 2.153, 2.148, 2.146,
+                            2.133, 2.133, 2.138, 2.145, 2.149, 2.154, 2.158, 2.159, 2.158, 2.155, 2.157, 2.156, 2.153, 2.149, 2.146, 2.144,
+                            2.133, 2.134, 2.139, 2.146, 2.149, 2.154, 2.158, 2.159, 2.159, 2.156, 2.154, 2.154, 2.149, 2.145, 2.143, 2.139,
+                            2.135, 2.135, 2.139, 2.146, 2.151, 2.155, 2.158, 2.159, 2.158, 2.156, 2.153, 2.151, 2.146, 2.143, 2.139, 2.136,
+                            2.135, 2.135, 2.138, 2.145, 2.151, 2.154, 2.157, 2.158, 2.157, 2.156, 2.153, 2.151, 2.147, 2.143, 2.141, 2.137,
+                            2.135, 2.134, 2.135, 2.141, 2.149, 2.154, 2.157, 2.157, 2.157, 2.157, 2.157, 2.153, 2.149, 2.146, 2.142, 2.139,
+                            2.132, 2.133, 2.135, 2.139, 2.148, 2.153, 2.158, 2.159, 2.159, 2.161, 2.161, 2.157, 2.154, 2.149, 2.144, 2.141,
+                            2.132, 2.133, 2.135, 2.141, 2.149, 2.155, 2.161, 2.161, 2.162, 2.162, 2.163, 2.159, 2.154, 2.149, 2.144, 2.138,
+                            2.136, 2.136, 2.137, 2.143, 2.149, 2.156, 2.162, 2.163, 2.162, 2.163, 2.164, 2.161, 2.157, 2.152, 2.146, 2.138,
+                            2.137, 2.137, 2.141, 2.147, 2.152, 2.157, 2.162, 2.162, 2.159, 2.161, 2.162, 2.162, 2.157, 2.152, 2.148, 2.148
+                        ]
+                    },
+                    {
+                        "ct": 4850,
+                        "table":
+                        [
+                            1.463, 1.464, 1.471, 1.478, 1.479, 1.483, 1.484, 1.486, 1.486, 1.484, 1.483, 1.481, 1.478, 1.475, 1.471, 1.468,
+                            1.463, 1.463, 1.468, 1.476, 1.479, 1.482, 1.484, 1.487, 1.486, 1.484, 1.483, 1.482, 1.478, 1.473, 1.469, 1.468,
+                            1.463, 1.464, 1.468, 1.476, 1.479, 1.483, 1.484, 1.486, 1.486, 1.485, 1.484, 1.482, 1.477, 1.473, 1.469, 1.468,
+                            1.463, 1.464, 1.469, 1.477, 1.481, 1.483, 1.485, 1.487, 1.487, 1.485, 1.485, 1.482, 1.478, 1.474, 1.469, 1.468,
+                            1.465, 1.465, 1.471, 1.478, 1.481, 1.484, 1.486, 1.488, 1.488, 1.487, 1.485, 1.482, 1.477, 1.472, 1.468, 1.467,
+                            1.465, 1.466, 1.472, 1.479, 1.482, 1.485, 1.486, 1.488, 1.488, 1.486, 1.484, 1.479, 1.475, 1.472, 1.468, 1.466,
+                            1.466, 1.466, 1.472, 1.478, 1.482, 1.484, 1.485, 1.488, 1.487, 1.485, 1.483, 1.479, 1.475, 1.472, 1.469, 1.468,
+                            1.465, 1.466, 1.469, 1.476, 1.481, 1.485, 1.485, 1.486, 1.486, 1.485, 1.483, 1.479, 1.477, 1.474, 1.471, 1.469,
+                            1.464, 1.465, 1.469, 1.476, 1.481, 1.484, 1.485, 1.487, 1.487, 1.486, 1.485, 1.481, 1.478, 1.475, 1.471, 1.469,
+                            1.463, 1.464, 1.469, 1.477, 1.481, 1.485, 1.485, 1.488, 1.488, 1.487, 1.486, 1.481, 1.478, 1.475, 1.471, 1.468,
+                            1.464, 1.465, 1.471, 1.478, 1.482, 1.486, 1.486, 1.488, 1.488, 1.487, 1.486, 1.481, 1.478, 1.475, 1.472, 1.468,
+                            1.465, 1.466, 1.472, 1.481, 1.483, 1.487, 1.487, 1.488, 1.488, 1.486, 1.485, 1.481, 1.479, 1.476, 1.473, 1.472
+                        ]
+                    },
+                    {
+                        "ct": 5930,
+                        "table":
+                        [
+                            1.443, 1.444, 1.448, 1.453, 1.459, 1.463, 1.465, 1.467, 1.469, 1.469, 1.467, 1.466, 1.462, 1.457, 1.454, 1.451,
+                            1.443, 1.444, 1.445, 1.451, 1.459, 1.463, 1.465, 1.467, 1.469, 1.469, 1.467, 1.465, 1.461, 1.456, 1.452, 1.451,
+                            1.444, 1.444, 1.445, 1.451, 1.459, 1.463, 1.466, 1.468, 1.469, 1.469, 1.467, 1.465, 1.461, 1.456, 1.452, 1.449,
+                            1.444, 1.444, 1.447, 1.452, 1.459, 1.464, 1.467, 1.469, 1.471, 1.469, 1.467, 1.466, 1.461, 1.456, 1.452, 1.449,
+                            1.444, 1.445, 1.448, 1.452, 1.459, 1.465, 1.469, 1.471, 1.471, 1.471, 1.468, 1.465, 1.461, 1.455, 1.451, 1.449,
+                            1.445, 1.446, 1.449, 1.453, 1.461, 1.466, 1.469, 1.471, 1.472, 1.469, 1.467, 1.465, 1.459, 1.455, 1.451, 1.447,
+                            1.446, 1.446, 1.449, 1.453, 1.461, 1.466, 1.469, 1.469, 1.469, 1.469, 1.467, 1.465, 1.459, 1.455, 1.452, 1.449,
+                            1.446, 1.446, 1.447, 1.451, 1.459, 1.466, 1.469, 1.469, 1.469, 1.469, 1.467, 1.465, 1.461, 1.457, 1.454, 1.451,
+                            1.444, 1.444, 1.447, 1.451, 1.459, 1.466, 1.469, 1.469, 1.471, 1.471, 1.468, 1.466, 1.462, 1.458, 1.454, 1.452,
+                            1.444, 1.444, 1.448, 1.453, 1.459, 1.466, 1.469, 1.471, 1.472, 1.472, 1.468, 1.466, 1.462, 1.458, 1.454, 1.449,
+                            1.446, 1.447, 1.449, 1.454, 1.461, 1.466, 1.471, 1.471, 1.471, 1.471, 1.468, 1.466, 1.462, 1.459, 1.455, 1.449,
+                            1.447, 1.447, 1.452, 1.457, 1.462, 1.468, 1.472, 1.472, 1.471, 1.471, 1.468, 1.466, 1.462, 1.459, 1.456, 1.455
+                        ]
+                    }
+                ],
+                "luminance_lut":
+                [
+                    1.548, 1.499, 1.387, 1.289, 1.223, 1.183, 1.164, 1.154, 1.153, 1.169, 1.211, 1.265, 1.345, 1.448, 1.581, 1.619,
+                    1.513, 1.412, 1.307, 1.228, 1.169, 1.129, 1.105, 1.098, 1.103, 1.127, 1.157, 1.209, 1.272, 1.361, 1.481, 1.583,
+                    1.449, 1.365, 1.257, 1.175, 1.124, 1.085, 1.062, 1.054, 1.059, 1.079, 1.113, 1.151, 1.211, 1.293, 1.407, 1.488,
+                    1.424, 1.324, 1.222, 1.139, 1.089, 1.056, 1.034, 1.031, 1.034, 1.049, 1.075, 1.115, 1.164, 1.241, 1.351, 1.446,
+                    1.412, 1.297, 1.203, 1.119, 1.069, 1.039, 1.021, 1.016, 1.022, 1.032, 1.052, 1.086, 1.135, 1.212, 1.321, 1.439,
+                    1.406, 1.287, 1.195, 1.115, 1.059, 1.028, 1.014, 1.012, 1.015, 1.026, 1.041, 1.074, 1.125, 1.201, 1.302, 1.425,
+                    1.406, 1.294, 1.205, 1.126, 1.062, 1.031, 1.013, 1.009, 1.011, 1.019, 1.042, 1.079, 1.129, 1.203, 1.302, 1.435,
+                    1.415, 1.318, 1.229, 1.146, 1.076, 1.039, 1.019, 1.014, 1.017, 1.031, 1.053, 1.093, 1.144, 1.219, 1.314, 1.436,
+                    1.435, 1.348, 1.246, 1.164, 1.094, 1.059, 1.036, 1.032, 1.037, 1.049, 1.072, 1.114, 1.167, 1.257, 1.343, 1.462,
+                    1.471, 1.385, 1.278, 1.189, 1.124, 1.084, 1.064, 1.061, 1.069, 1.078, 1.101, 1.146, 1.207, 1.298, 1.415, 1.496,
+                    1.522, 1.436, 1.323, 1.228, 1.169, 1.118, 1.101, 1.094, 1.099, 1.113, 1.146, 1.194, 1.265, 1.353, 1.474, 1.571,
+                    1.578, 1.506, 1.378, 1.281, 1.211, 1.156, 1.135, 1.134, 1.139, 1.158, 1.194, 1.251, 1.327, 1.427, 1.559, 1.611
+                ],
+                "sigma": 0.00121,
+                "sigma_Cb": 0.00115
+            }
+        },
+        {
+            "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": 2360,
+                        "ccm":
+                        [
+                            1.66078, -0.23588, -0.42491,
+                            -0.47456, 1.82763, -0.35307,
+                            -0.00545, -1.44729, 2.45273
+                        ]
+                    },
+                    {
+                        "ct": 2870,
+                        "ccm":
+                        [
+                            1.78373, -0.55344, -0.23029,
+                            -0.39951, 1.69701, -0.29751,
+                            0.01986, -1.06525, 2.04539
+                        ]
+                    },
+                    {
+                        "ct": 2970,
+                        "ccm":
+                        [
+                            1.73511, -0.56973, -0.16537,
+                            -0.36338, 1.69878, -0.33539,
+                            -0.02354, -0.76813, 1.79168
+                        ]
+                    },
+                    {
+                        "ct": 3000,
+                        "ccm":
+                        [
+                            2.06374, -0.92218, -0.14156,
+                            -0.41721, 1.69289, -0.27568,
+                            -0.00554, -0.92741, 1.93295
+                        ]
+                    },
+                    {
+                        "ct": 3700,
+                        "ccm":
+                        [
+                            2.13792, -1.08136, -0.05655,
+                            -0.34739, 1.58989, -0.24249,
+                            -0.00349, -0.76789, 1.77138
+                        ]
+                    },
+                    {
+                        "ct": 3870,
+                        "ccm":
+                        [
+                            1.83834, -0.70528, -0.13307,
+                            -0.30499, 1.60523, -0.30024,
+                            -0.05701, -0.58313, 1.64014
+                        ]
+                    },
+                    {
+                        "ct": 4000,
+                        "ccm":
+                        [
+                            2.15741, -1.10295, -0.05447,
+                            -0.34631, 1.61158, -0.26528,
+                            -0.02723, -0.70288, 1.73011
+                        ]
+                    },
+                    {
+                        "ct": 4400,
+                        "ccm":
+                        [
+                            2.05729, -0.95007, -0.10723,
+                            -0.41712, 1.78606, -0.36894,
+                            -0.11899, -0.55727, 1.67626
+                        ]
+                    },
+                    {
+                        "ct": 4715,
+                        "ccm":
+                        [
+                            1.90255, -0.77478, -0.12777,
+                            -0.31338, 1.88197, -0.56858,
+                            -0.06001, -0.61785, 1.67786
+                        ]
+                    },
+                    {
+                        "ct": 5920,
+                        "ccm":
+                        [
+                            1.98691, -0.84671, -0.14019,
+                            -0.26581, 1.70615, -0.44035,
+                            -0.09532, -0.47332, 1.56864
+                        ]
+                    },
+                    {
+                        "ct": 9050,
+                        "ccm":
+                        [
+                            2.09255, -0.76541, -0.32714,
+                            -0.28973, 2.27462, -0.98489,
+                            -0.17299, -0.61275, 1.78574
+                        ]
+                    }
+                ]
+            }
+        },
+        {
+            "rpi.sharpen": { }
+        },
+        {
+            "rpi.focus": { }
+        }
+    ]
+}
\ No newline at end of file