From 58f8c1ef79d081c40168d45ab37511373754dbeb Mon Sep 17 00:00:00 2001 From: "minjie.yu" Date: Fri, 1 Dec 2023 14:01:16 +0800 Subject: [PATCH] fix: clean up os08a10 calibration Signed-off-by: minjie.yu --- ...amera_calibrations_static_fs_lin_os08a10.c | 368 ----------------- ...a_calibrations_static_fs_lin_os08a10_ipc.c | 370 ------------------ ...a_calibrations_static_fs_lin_os08a10_slt.c | 369 ----------------- ...ra_calibrations_static_fs_lin_os08a10_tv.c | 366 ----------------- 4 files changed, 1473 deletions(-) delete mode 100644 unionpi_tiger/kernel/drivers/isp/drivers/subdev/iq/src/calibration/acamera_calibrations_static_fs_lin_os08a10.c delete mode 100644 unionpi_tiger/kernel/drivers/isp/drivers/subdev/iq/src/calibration/acamera_calibrations_static_fs_lin_os08a10_ipc.c delete mode 100644 unionpi_tiger/kernel/drivers/isp/drivers/subdev/iq/src/calibration/acamera_calibrations_static_fs_lin_os08a10_slt.c delete mode 100644 unionpi_tiger/kernel/drivers/isp/drivers/subdev/iq/src/calibration/acamera_calibrations_static_fs_lin_os08a10_tv.c diff --git a/unionpi_tiger/kernel/drivers/isp/drivers/subdev/iq/src/calibration/acamera_calibrations_static_fs_lin_os08a10.c b/unionpi_tiger/kernel/drivers/isp/drivers/subdev/iq/src/calibration/acamera_calibrations_static_fs_lin_os08a10.c deleted file mode 100644 index dc9ad74..0000000 --- a/unionpi_tiger/kernel/drivers/isp/drivers/subdev/iq/src/calibration/acamera_calibrations_static_fs_lin_os08a10.c +++ /dev/null @@ -1,368 +0,0 @@ -/* -* -* SPDX-License-Identifier: GPL-2.0 -* -* Copyright (C) 2011-2018 ARM or its affiliates -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; version 2. -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. -* You should have received a copy of the GNU General Public License along -* with this program; if not, write to the Free Software Foundation, Inc., -* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -* -*/ - -#include "acamera_command_api.h" -//#include "acamera_firmware_api.h" -#include "acamera_firmware_settings.h" -// created from 2016-10-19T16:42:58.865Z UTClinear.json - -// CALIBRATION_LIGHT_SRC -static uint16_t _calibration_light_src[][2] = { - {326, 158}}; - -// CALIBRATION_RG_POS -static uint16_t _calibration_rg_pos[] = {203, 218, 232, 247, 256, 276, 290, 305, 319, 334, 348, 363, 377, 392, 425}; - -// CALIBRATION_BG_POS -static uint16_t _calibration_bg_pos[] = {127, 147, 163, 178, 194, 210, 225, 241, 256, 273, 288, 304, 320, 335, 365}; - -// CALIBRATION_MESH_RGBG_WEIGHT -static uint16_t _calibration_mesh_rgbg_weight[][15] = { - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 9, 39, 256, 256, 217}, - {0, 0, 0, 0, 0, 0, 0, 1, 7, 42, 256, 246, 256, 137, 0}, - {0, 0, 0, 0, 0, 0, 2, 25, 100, 245, 256, 179, 70, 8, 0}, - {0, 0, 0, 0, 0, 4, 38, 188, 256, 256, 173, 34, 3, 0, 0}, - {0, 0, 0, 0, 2, 62, 235, 256, 256, 135, 25, 2, 0, 0, 0}, - {0, 0, 0, 10, 41, 256, 256, 256, 110, 17, 1, 0, 0, 0, 0}, - {0, 0, 12, 117, 250, 256, 256, 67, 9, 1, 0, 0, 0, 0, 0}, - {0, 6, 83, 256, 256, 204, 49, 5, 0, 0, 0, 0, 0, 0, 0}, - {3, 68, 256, 256, 253, 22, 2, 0, 0, 0, 0, 0, 0, 0, 0}, - {7, 166, 256, 182, 62, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {15, 256, 256, 37, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {20, 256, 111, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {4, 256, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {2, 169, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - -// CALIBRATION_MESH_LS_WEIGHT -static uint16_t _calibration_mesh_ls_weight[][15] = { - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 3, 4, 25, 42, 53, 57, 53, 42, 25, 4, 3, 0, 0}, - {0, 0, 4, 131, 157, 179, 193, 198, 193, 179, 157, 131, 4, 0, 0}, - {0, 0, 25, 157, 188, 214, 232, 238, 232, 214, 188, 157, 25, 0, 0}, - {0, 0, 42, 179, 214, 243, 255, 256, 255, 243, 214, 179, 42, 0, 0}, - {0, 0, 53, 193, 232, 255, 256, 256, 256, 255, 232, 193, 53, 0, 0}, - {0, 0, 57, 198, 238, 256, 256, 256, 256, 256, 238, 198, 57, 0, 0}, - {0, 0, 53, 193, 232, 255, 256, 256, 256, 255, 232, 193, 53, 0, 0}, - {0, 0, 42, 179, 214, 243, 255, 256, 255, 243, 214, 179, 42, 0, 0}, - {0, 0, 25, 157, 188, 214, 232, 238, 232, 214, 188, 157, 25, 0, 0}, - {0, 0, 4, 131, 157, 179, 193, 198, 193, 179, 157, 131, 4, 0, 0}, - {0, 0, 3, 4, 25, 42, 53, 57, 53, 42, 25, 4, 3, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - -// CALIBRATION_MESH_COLOR_TEMPERATURE -static uint16_t _calibration_mesh_color_temperature[][15] = { - {230, 239, 247, 255, 260, 263, 265, 267, 269, 272, 301, 332, 347, 364, 369}, - {220, 229, 237, 245, 250, 262, 263, 265, 267, 269, 277, 308, 337, 354, 369}, - {212, 220, 229, 237, 242, 254, 262, 263, 265, 267, 269, 289, 318, 346, 369}, - {204, 213, 221, 230, 235, 246, 254, 262, 263, 265, 267, 271, 300, 331, 369}, - {196, 205, 213, 222, 227, 238, 246, 255, 262, 264, 266, 268, 281, 312, 369}, - {196, 197, 205, 213, 219, 230, 238, 247, 255, 262, 264, 266, 268, 293, 369}, - {187, 196, 197, 206, 211, 223, 231, 239, 247, 256, 263, 265, 266, 269, 353}, - {174, 184, 192, 198, 203, 215, 223, 231, 239, 248, 256, 263, 265, 267, 324}, - {163, 172, 181, 190, 196, 207, 215, 224, 232, 240, 248, 257, 263, 265, 306}, - {158, 159, 168, 177, 182, 198, 206, 215, 223, 232, 240, 248, 256, 264, 268}, - {150, 153, 156, 165, 171, 183, 199, 208, 216, 224, 232, 241, 249, 257, 267}, - {140, 143, 146, 150, 152, 171, 179, 189, 208, 216, 224, 233, 241, 249, 265}, - {132, 133, 134, 139, 141, 146, 149, 176, 185, 208, 216, 225, 233, 241, 263}, - {121, 122, 123, 124, 124, 126, 127, 143, 146, 183, 209, 217, 225, 234, 253}, - {111, 111, 111, 111, 111, 111, 111, 111, 111, 160, 168, 137, 210, 219, 238}}; - -// RG, BG, MULT. final wb gain adjuster for a sky scene. devided by CALIBRATION_WB_STRENGTH_MULT in use -static uint16_t _calibration_wb_strength[] = {1000, 1000, 1000}; - -// lux threshold for sky -static uint16_t _calibration_sky_lux_th[] = {10000}; - -// 1D rg/bg readout from color_temp -static uint16_t _calibration_ct_rg_pos_calc[] = {218, 221, 232, 256, 322, 358, 384, 406}; - -// 1D rg/bg readout from color_temp -static uint16_t _calibration_ct_bg_pos_calc[] = {350, 317, 287, 256, 200, 171, 157, 148}; - -// CALIBRATION_COLOR_TEMP -static uint16_t _calibration_color_temp[] = {111, 136, 158, 196, 262, 270, 341, 369}; - -// CALIBRATION_CT65POS -static uint16_t _calibration_ct65pos[] = {2}; - -// CALIBRATION_CT40POS -static uint16_t _calibration_ct40pos[] = {7}; - -// CALIBRATION_CT30POS -static uint16_t _calibration_ct30pos[] = {6}; - -// CALIBRATION_EVTOLUX_EV_LUT -static uint32_t _calibration_evtolux_ev_lut[] //evlog2 - = {398775, 444491, 477818, 528405, 620780, 744998, 821797, 1051295, 1308509, 1373840, 1436952, 1573912, 1656816, 1918045, 2075972, 2322504, 2494615}; - -// CALIBRATION_EVTOLUX_LUX_LUT -static uint32_t _calibration_evtolux_lux_lut[] = {20000, 18000, 16000, 14000, 12000, 10100, 8900, 5120, 2560, 2080, 1800, 1200, 1000, 500, 320, 160, 100}; - - -// CALIBRATION_BLACK_LEVEL_R -static uint16_t _calibration_black_level_r[][2] = { - {0, 256}, - {32, 256}, - {64, 256}, - {96, 256}, - {128, 256}}; - -// CALIBRATION_BLACK_LEVEL_GR -static uint16_t _calibration_black_level_gr[][2] = { - {0, 256}, - {32, 256}, - {64, 256}, - {96, 256}, - {128, 256}}; - -// CALIBRATION_BLACK_LEVEL_GB -static uint16_t _calibration_black_level_gb[][2] = { - {0, 256}, - {32, 256}, - {64, 256}, - {96, 256}, - {128, 256}}; - -// CALIBRATION_BLACK_LEVEL_B -static uint16_t _calibration_black_level_b[][2] = { - {0, 256}, - {32, 256}, - {64, 256}, - {96, 256}, - {128, 256}}; - -// CALIBRATION_STATIC_WB -static uint16_t _calibration_static_wb[] = {501, 256, 256, 448}; -// RR RG RB GR GG GB BR BG BB -static uint16_t _calibration_mt_absolute_ls_a_ccm[] = {384, 32864, 32800, 32881, 377, 32776, 24, 33176, 640}; - -// RR RG RB GR GG GB BR BG BB -static uint16_t _calibration_mt_absolute_ls_d40_ccm[] = {419, 32901, 32798, 32869, 374, 32785, 34, 33040, 494}; - -// RR RG RB GR GG GB BR BG BB -static uint16_t _calibration_mt_absolute_ls_d50_ccm[] = {416, 32907, 32789, 32837, 392, 32835, 23, 32963, 428}; - -// CALIBRATION_SHADING_LS_A_R -static uint8_t _calibration_shading_ls_a_r[] = {168, 147, 132, 121, 114, 107, 102, 97, 93, 89, 86, 84, 82, 80, 80, 79, 80, 80, 81, 83, 85, 87, 91, 95, 99, 104, 111, 118, 128, 142, 163, 198, 161, 142, 128, 118, 111, 105, 99, 95, 91, 87, 84, 82, 80, 79, 78, 77, 78, 78, 79, 81, 83, 85, 89, 92, 97, 102, 108, 115, 125, 137, 158, 186, 154, 138, 125, 115, 108, 102, 97, 92, 88, 85, 82, 80, 78, 77, 76, 75, 76, 76, 77, 79, 81, 83, 86, 90, 94, 100, 106, 113, 121, 133, 151, 175, 148, 133, 122, 113, 106, 100, 95, 90, 86, 83, 80, 78, 76, 75, 74, 74, 74, 74, 75, 77, 79, 81, 84, 88, 93, 97, 103, 110, 118, 129, 145, 167, 143, 130, 119, 111, 104, 98, 93, 88, 85, 81, 78, 76, 74, 73, 72, 72, 72, 73, 74, 75, 77, 79, 83, 86, 91, 96, 101, 108, 116, 126, 141, 160, 140, 127, 116, 109, 102, 96, 91, 87, 83, 80, 77, 75, 73, 72, 71, 70, 71, 71, 72, 74, 76, 78, 81, 85, 89, 94, 99, 106, 113, 123, 137, 155, 137, 125, 115, 107, 100, 95, 90, 85, 82, 78, 75, 73, 72, 70, 70, 69, 69, 70, 71, 72, 74, 77, 80, 83, 88, 92, 98, 104, 112, 121, 134, 151, 134, 122, 113, 105, 99, 93, 88, 84, 80, 77, 74, 72, 70, 69, 68, 68, 68, 69, 70, 71, 73, 75, 78, 82, 86, 91, 96, 102, 110, 119, 131, 147, 132, 121, 111, 104, 98, 92, 87, 83, 79, 76, 73, 71, 69, 68, 67, 67, 67, 68, 69, 70, 72, 74, 77, 81, 85, 90, 95, 101, 108, 118, 129, 145, 131, 120, 110, 103, 97, 91, 86, 82, 78, 75, 72, 70, 68, 67, 66, 66, 66, 67, 68, 69, 71, 73, 76, 80, 84, 89, 94, 100, 107, 116, 128, 142, 129, 118, 109, 102, 96, 90, 85, 81, 77, 74, 71, 69, 68, 66, 66, 65, 66, 66, 67, 68, 70, 72, 75, 79, 83, 88, 93, 99, 106, 115, 126, 141, 128, 117, 108, 101, 95, 89, 85, 80, 76, 73, 71, 68, 67, 66, 65, 65, 65, 65, 66, 68, 69, 72, 75, 78, 82, 87, 92, 98, 106, 114, 125, 139, 127, 117, 108, 101, 95, 89, 84, 80, 76, 73, 70, 68, 66, 65, 65, 65, 65, 65, 66, 67, 69, 71, 74, 78, 82, 86, 92, 98, 105, 114, 125, 138, 127, 116, 108, 100, 94, 89, 84, 79, 76, 72, 70, 68, 66, 65, 65, 64, 64, 65, 66, 67, 69, 71, 74, 77, 81, 86, 91, 98, 105, 113, 124, 138, 126, 116, 107, 100, 94, 88, 83, 79, 75, 72, 70, 67, 66, 65, 64, 64, 64, 65, 65, 67, 68, 71, 73, 77, 81, 86, 91, 97, 104, 113, 124, 138, 126, 116, 107, 100, 94, 88, 83, 79, 75, 72, 70, 67, 66, 65, 64, 64, 64, 65, 65, 67, 68, 71, 73, 77, 81, 86, 91, 97, 104, 113, 124, 138, 126, 116, 107, 100, 94, 88, 84, 79, 75, 72, 70, 68, 66, 65, 64, 64, 64, 65, 66, 67, 68, 71, 74, 77, 81, 86, 91, 97, 105, 113, 124, 138, 127, 116, 108, 101, 94, 89, 84, 79, 76, 72, 70, 68, 66, 65, 64, 64, 64, 65, 66, 67, 69, 71, 74, 77, 81, 86, 91, 98, 105, 113, 125, 139, 127, 117, 108, 101, 95, 89, 84, 80, 76, 73, 70, 68, 67, 65, 65, 65, 65, 65, 66, 67, 69, 71, 74, 77, 81, 86, 92, 98, 105, 114, 125, 140, 128, 118, 109, 102, 95, 90, 85, 80, 77, 74, 71, 69, 67, 66, 65, 65, 65, 66, 66, 68, 70, 72, 75, 78, 82, 87, 92, 99, 106, 115, 126, 141, 129, 118, 110, 102, 96, 90, 85, 81, 77, 74, 72, 70, 68, 67, 66, 66, 66, 66, 67, 68, 70, 72, 75, 79, 83, 88, 93, 99, 107, 116, 128, 143, 131, 120, 111, 103, 97, 91, 86, 82, 78, 75, 73, 70, 69, 68, 67, 66, 67, 67, 68, 69, 71, 73, 76, 80, 84, 89, 94, 100, 108, 117, 129, 145, 133, 121, 112, 105, 98, 93, 88, 83, 79, 76, 74, 71, 70, 68, 68, 67, 68, 68, 69, 70, 72, 74, 77, 81, 85, 90, 95, 102, 109, 119, 131, 148, 135, 123, 114, 106, 99, 94, 89, 84, 81, 77, 75, 73, 71, 70, 69, 68, 69, 69, 70, 71, 73, 75, 78, 82, 86, 91, 96, 103, 111, 121, 134, 151, 138, 125, 115, 107, 101, 95, 90, 86, 82, 79, 76, 74, 72, 71, 70, 70, 70, 70, 71, 73, 74, 77, 80, 83, 87, 92, 98, 104, 112, 123, 136, 154, 141, 128, 117, 109, 102, 97, 91, 87, 83, 80, 77, 75, 74, 72, 71, 71, 71, 72, 73, 74, 76, 78, 81, 85, 89, 94, 100, 106, 115, 125, 140, 159, 145, 131, 119, 111, 104, 98, 93, 89, 85, 82, 79, 77, 75, 74, 73, 73, 73, 73, 74, 75, 77, 80, 83, 86, 91, 96, 101, 108, 117, 128, 143, 163, 149, 134, 122, 113, 106, 100, 95, 90, 87, 83, 80, 78, 77, 75, 74, 74, 74, 75, 76, 77, 79, 81, 84, 88, 92, 97, 103, 110, 119, 131, 147, 168, 155, 138, 125, 116, 108, 102, 97, 93, 88, 85, 82, 80, 78, 77, 76, 76, 76, 76, 77, 79, 81, 83, 86, 90, 94, 100, 106, 113, 123, 135, 152, 176, 161, 143, 130, 119, 111, 104, 99, 94, 90, 87, 84, 82, 80, 79, 78, 78, 78, 78, 79, 81, 82, 85, 88, 92, 97, 102, 108, 116, 126, 140, 159, 185, 171, 150, 134, 122, 114, 107, 101, 97, 93, 89, 86, 84, 82, 81, 80, 80, 80, 80, 81, 83, 85, 87, 90, 94, 99, 104, 111, 119, 130, 145, 169, 202, 182, 156, 137, 126, 117, 110, 104, 99, 95, 91, 88, 86, 84, 83, 82, 82, 82, 82, 83, 85, 87, 89, 93, 97, 102, 107, 114, 123, 134, 150, 177, 220}; - -// CALIBRATION_SHADING_LS_A_G -static uint8_t _calibration_shading_ls_a_g[] = {138, 122, 111, 103, 98, 93, 89, 86, 83, 80, 78, 77, 76, 75, 74, 74, 74, 74, 75, 76, 77, 79, 81, 83, 86, 90, 94, 99, 106, 116, 132, 156, 133, 120, 109, 102, 96, 91, 88, 84, 82, 79, 77, 76, 74, 74, 73, 73, 73, 73, 74, 75, 76, 78, 80, 82, 85, 88, 93, 98, 104, 113, 128, 148, 127, 116, 106, 100, 94, 90, 86, 83, 80, 78, 76, 74, 73, 72, 72, 71, 71, 72, 73, 73, 75, 76, 78, 81, 84, 87, 91, 96, 102, 110, 123, 140, 123, 113, 104, 98, 93, 88, 85, 81, 79, 76, 75, 73, 72, 71, 70, 70, 70, 71, 71, 72, 73, 75, 77, 80, 82, 85, 89, 94, 100, 107, 119, 134, 120, 110, 102, 96, 91, 87, 83, 80, 77, 75, 73, 72, 71, 70, 69, 69, 69, 70, 70, 71, 72, 74, 76, 78, 81, 84, 88, 92, 98, 105, 115, 129, 117, 108, 100, 95, 90, 86, 82, 79, 76, 74, 72, 71, 70, 69, 68, 68, 68, 69, 69, 70, 71, 73, 75, 77, 80, 83, 87, 91, 96, 103, 113, 125, 115, 106, 99, 93, 89, 85, 81, 78, 76, 73, 72, 70, 69, 68, 68, 67, 67, 68, 68, 69, 70, 72, 74, 76, 79, 82, 86, 90, 95, 101, 110, 122, 113, 105, 98, 92, 88, 84, 80, 77, 75, 72, 71, 69, 68, 67, 67, 67, 67, 67, 68, 68, 70, 71, 73, 75, 78, 81, 85, 89, 93, 100, 108, 119, 112, 103, 97, 91, 87, 83, 79, 76, 74, 72, 70, 69, 67, 67, 66, 66, 66, 66, 67, 68, 69, 70, 72, 75, 77, 80, 84, 88, 93, 98, 107, 117, 110, 103, 96, 91, 86, 82, 79, 76, 73, 71, 69, 68, 67, 66, 66, 65, 65, 66, 66, 67, 68, 70, 72, 74, 77, 80, 83, 87, 92, 98, 106, 116, 109, 102, 95, 90, 85, 81, 78, 75, 73, 71, 69, 67, 66, 65, 65, 65, 65, 65, 66, 67, 68, 69, 71, 73, 76, 79, 82, 86, 91, 97, 105, 114, 108, 101, 94, 89, 85, 81, 77, 75, 72, 70, 68, 67, 66, 65, 65, 64, 65, 65, 65, 66, 67, 69, 71, 73, 75, 78, 82, 86, 90, 96, 104, 113, 108, 100, 94, 89, 84, 81, 77, 74, 72, 70, 68, 67, 66, 65, 64, 64, 64, 65, 65, 66, 67, 68, 70, 73, 75, 78, 81, 85, 90, 96, 103, 112, 107, 100, 94, 89, 84, 80, 77, 74, 72, 70, 68, 66, 65, 65, 64, 64, 64, 65, 65, 66, 67, 68, 70, 72, 75, 78, 81, 85, 90, 96, 103, 112, 107, 100, 94, 88, 84, 80, 77, 74, 71, 69, 68, 66, 65, 65, 64, 64, 64, 64, 65, 65, 67, 68, 70, 72, 75, 78, 81, 85, 90, 95, 103, 112, 107, 100, 94, 88, 84, 80, 77, 74, 71, 69, 68, 66, 65, 65, 64, 64, 64, 64, 65, 65, 67, 68, 70, 72, 75, 78, 81, 85, 90, 95, 103, 112, 107, 100, 94, 88, 84, 80, 77, 74, 71, 69, 68, 66, 65, 65, 64, 64, 64, 64, 65, 65, 67, 68, 70, 72, 75, 78, 81, 85, 90, 95, 103, 112, 107, 100, 94, 89, 84, 80, 77, 74, 72, 70, 68, 66, 65, 65, 64, 64, 64, 64, 65, 66, 67, 68, 70, 72, 75, 78, 81, 85, 90, 96, 103, 113, 108, 100, 94, 89, 84, 81, 77, 74, 72, 70, 68, 67, 66, 65, 64, 64, 64, 65, 65, 66, 67, 68, 70, 72, 75, 78, 82, 86, 90, 96, 104, 113, 109, 101, 95, 89, 85, 81, 78, 75, 72, 70, 68, 67, 66, 65, 65, 65, 65, 65, 65, 66, 67, 69, 71, 73, 75, 79, 82, 86, 91, 97, 104, 114, 109, 102, 95, 90, 85, 81, 78, 75, 73, 71, 69, 68, 66, 66, 65, 65, 65, 65, 66, 67, 68, 69, 71, 73, 76, 79, 82, 86, 91, 97, 105, 115, 110, 102, 96, 91, 86, 82, 79, 76, 73, 71, 70, 68, 67, 66, 66, 65, 65, 66, 66, 67, 68, 70, 72, 74, 76, 80, 83, 87, 92, 98, 106, 117, 112, 104, 97, 91, 87, 83, 79, 77, 74, 72, 70, 69, 68, 67, 66, 66, 66, 66, 67, 68, 69, 71, 72, 75, 77, 80, 84, 88, 93, 99, 108, 119, 113, 105, 98, 92, 88, 84, 80, 77, 75, 73, 71, 70, 68, 68, 67, 67, 67, 67, 68, 69, 70, 71, 73, 75, 78, 81, 85, 89, 94, 100, 110, 121, 115, 106, 99, 93, 89, 85, 81, 78, 76, 74, 72, 70, 69, 68, 68, 68, 68, 68, 68, 69, 71, 72, 74, 76, 79, 82, 86, 90, 95, 102, 112, 124, 118, 109, 101, 95, 90, 86, 82, 79, 77, 75, 73, 71, 70, 69, 69, 69, 69, 69, 69, 70, 71, 73, 75, 77, 80, 83, 87, 91, 96, 104, 114, 127, 121, 111, 102, 96, 91, 87, 83, 80, 78, 76, 74, 72, 71, 70, 70, 70, 70, 70, 70, 71, 72, 74, 76, 78, 81, 84, 88, 92, 98, 106, 117, 131, 125, 114, 104, 98, 92, 88, 85, 82, 79, 77, 75, 73, 72, 71, 71, 71, 71, 71, 71, 72, 73, 75, 77, 79, 82, 85, 89, 94, 100, 108, 120, 135, 129, 117, 107, 100, 94, 90, 86, 83, 80, 78, 76, 75, 74, 73, 72, 72, 72, 72, 73, 74, 75, 76, 78, 81, 84, 87, 91, 96, 102, 112, 123, 140, 133, 120, 110, 102, 96, 91, 88, 84, 82, 79, 77, 76, 75, 74, 73, 73, 73, 73, 74, 75, 76, 78, 80, 82, 85, 89, 93, 98, 105, 115, 128, 146, 140, 125, 113, 104, 98, 93, 89, 86, 83, 81, 79, 77, 76, 75, 75, 74, 74, 75, 75, 76, 77, 79, 81, 84, 87, 90, 95, 100, 108, 118, 136, 158, 147, 129, 115, 107, 100, 95, 91, 88, 85, 82, 80, 79, 77, 77, 76, 76, 76, 76, 77, 77, 79, 80, 82, 85, 88, 92, 96, 102, 110, 122, 141, 171}; - -// CALIBRATION_SHADING_LS_A_B -static uint8_t _calibration_shading_ls_a_b[] = {123, 111, 101, 94, 89, 85, 82, 80, 77, 76, 74, 74, 73, 72, 72, 71, 72, 72, 72, 73, 74, 76, 77, 79, 82, 84, 88, 92, 98, 106, 120, 139, 119, 109, 100, 93, 89, 85, 82, 79, 77, 75, 74, 73, 72, 71, 71, 71, 71, 71, 72, 73, 74, 75, 77, 78, 81, 84, 87, 91, 96, 105, 117, 133, 115, 106, 98, 92, 87, 84, 81, 78, 76, 74, 73, 72, 71, 71, 70, 70, 70, 71, 71, 72, 73, 74, 76, 78, 80, 83, 86, 90, 95, 102, 113, 127, 112, 103, 96, 91, 86, 83, 80, 78, 76, 74, 72, 71, 71, 70, 70, 70, 70, 70, 71, 71, 72, 74, 75, 77, 79, 82, 85, 88, 93, 100, 110, 122, 109, 101, 94, 89, 85, 81, 79, 76, 75, 73, 72, 71, 70, 69, 69, 69, 69, 69, 70, 71, 72, 73, 74, 76, 78, 81, 84, 87, 91, 97, 107, 118, 106, 99, 93, 88, 84, 81, 78, 76, 74, 72, 71, 70, 69, 69, 68, 68, 68, 68, 69, 70, 71, 72, 74, 76, 78, 80, 83, 86, 90, 96, 104, 114, 104, 97, 92, 87, 83, 80, 77, 75, 73, 72, 70, 69, 68, 68, 67, 67, 67, 68, 68, 69, 70, 71, 73, 75, 77, 79, 82, 85, 89, 94, 102, 111, 102, 96, 91, 86, 82, 79, 76, 74, 72, 71, 70, 68, 68, 67, 67, 67, 67, 67, 68, 68, 69, 71, 72, 74, 76, 79, 81, 84, 88, 93, 100, 109, 101, 95, 90, 85, 81, 78, 76, 74, 72, 70, 69, 68, 67, 66, 66, 66, 66, 66, 67, 68, 69, 70, 72, 74, 76, 78, 81, 84, 87, 92, 99, 107, 100, 94, 89, 85, 81, 78, 75, 73, 71, 70, 68, 67, 67, 66, 66, 66, 66, 66, 66, 67, 68, 69, 71, 73, 75, 78, 80, 83, 87, 91, 98, 106, 99, 93, 88, 84, 80, 77, 75, 73, 71, 69, 68, 67, 66, 65, 65, 65, 65, 65, 66, 67, 67, 69, 70, 72, 75, 77, 80, 83, 86, 91, 97, 104, 98, 93, 88, 83, 80, 77, 74, 72, 70, 69, 67, 66, 66, 65, 65, 65, 65, 65, 65, 66, 67, 68, 70, 72, 74, 77, 79, 82, 86, 90, 96, 103, 98, 92, 87, 83, 80, 77, 74, 72, 70, 68, 67, 66, 65, 65, 65, 65, 65, 65, 65, 66, 67, 68, 70, 71, 74, 76, 79, 82, 86, 90, 96, 103, 98, 92, 87, 83, 80, 76, 74, 72, 70, 68, 67, 66, 65, 65, 64, 64, 64, 65, 65, 66, 67, 68, 69, 71, 73, 76, 79, 82, 85, 90, 96, 103, 97, 92, 87, 83, 79, 76, 74, 71, 69, 68, 67, 66, 65, 64, 64, 64, 64, 64, 65, 65, 66, 68, 69, 71, 73, 76, 79, 82, 85, 90, 95, 103, 97, 92, 87, 83, 79, 76, 74, 71, 70, 68, 67, 66, 65, 64, 64, 64, 64, 65, 65, 65, 66, 68, 69, 71, 73, 76, 79, 82, 85, 90, 96, 102, 97, 92, 87, 83, 79, 76, 74, 72, 70, 68, 67, 66, 65, 64, 64, 64, 64, 65, 65, 65, 66, 68, 69, 71, 73, 76, 79, 82, 85, 90, 96, 103, 97, 92, 87, 83, 79, 76, 74, 72, 70, 68, 67, 66, 65, 65, 64, 64, 64, 65, 65, 65, 66, 68, 69, 71, 73, 76, 79, 82, 85, 90, 96, 103, 98, 92, 87, 83, 80, 76, 74, 72, 70, 68, 67, 66, 65, 65, 64, 64, 65, 65, 65, 66, 67, 68, 69, 71, 74, 76, 79, 82, 86, 90, 96, 104, 98, 93, 88, 84, 80, 77, 74, 72, 70, 69, 68, 67, 66, 65, 65, 65, 65, 65, 65, 66, 67, 68, 70, 72, 74, 76, 79, 82, 86, 91, 97, 104, 99, 93, 88, 84, 80, 77, 75, 73, 71, 69, 68, 67, 66, 65, 65, 65, 65, 65, 66, 66, 67, 69, 70, 72, 74, 77, 79, 83, 86, 91, 97, 105, 100, 94, 89, 85, 81, 78, 75, 73, 71, 70, 68, 67, 67, 66, 65, 65, 65, 66, 66, 67, 68, 69, 71, 73, 75, 77, 80, 83, 87, 92, 98, 106, 101, 95, 90, 85, 82, 79, 76, 74, 72, 70, 69, 68, 67, 67, 66, 66, 66, 66, 67, 67, 69, 70, 71, 73, 75, 78, 81, 84, 88, 93, 100, 108, 103, 96, 91, 86, 82, 79, 77, 74, 73, 71, 70, 69, 68, 67, 67, 67, 67, 67, 68, 68, 69, 71, 72, 74, 76, 78, 81, 84, 88, 94, 101, 110, 105, 98, 92, 87, 83, 80, 77, 75, 73, 72, 71, 70, 69, 68, 68, 67, 67, 68, 68, 69, 70, 71, 73, 74, 77, 79, 82, 85, 89, 95, 103, 113, 107, 99, 93, 88, 84, 81, 78, 76, 74, 73, 71, 71, 70, 69, 68, 68, 68, 69, 69, 70, 71, 72, 74, 76, 78, 80, 83, 86, 90, 96, 105, 115, 110, 101, 94, 89, 85, 82, 79, 77, 75, 74, 72, 71, 70, 70, 69, 69, 69, 69, 70, 71, 71, 73, 74, 76, 79, 81, 84, 87, 92, 98, 107, 119, 113, 103, 96, 91, 86, 83, 80, 78, 76, 74, 73, 72, 71, 71, 70, 70, 70, 70, 71, 71, 72, 74, 75, 77, 79, 82, 85, 88, 93, 100, 110, 122, 116, 106, 98, 92, 87, 84, 81, 79, 77, 75, 74, 73, 72, 71, 71, 71, 71, 71, 71, 72, 73, 74, 76, 78, 80, 83, 86, 90, 95, 103, 113, 127, 119, 109, 101, 93, 89, 85, 82, 79, 78, 76, 74, 73, 73, 72, 72, 71, 72, 72, 72, 73, 74, 75, 77, 79, 81, 83, 87, 91, 97, 106, 117, 131, 125, 113, 103, 95, 90, 86, 83, 80, 78, 76, 75, 74, 73, 73, 72, 72, 72, 72, 73, 73, 74, 76, 77, 79, 82, 85, 88, 93, 99, 108, 122, 140, 130, 116, 104, 97, 91, 87, 83, 81, 79, 77, 76, 75, 74, 73, 73, 73, 73, 73, 73, 74, 75, 76, 78, 80, 82, 85, 89, 94, 101, 110, 126, 149}; - -// CALIBRATION_SHADING_LS_TL84_R -static uint8_t _calibration_shading_ls_tl84_r[] = {144, 127, 115, 107, 101, 96, 92, 89, 86, 83, 81, 79, 78, 76, 76, 76, 76, 76, 77, 78, 80, 82, 84, 87, 91, 95, 99, 105, 112, 123, 141, 167, 137, 123, 112, 105, 99, 94, 90, 87, 84, 81, 79, 77, 76, 75, 74, 74, 74, 75, 76, 77, 78, 80, 82, 85, 89, 93, 97, 103, 110, 120, 136, 158, 131, 119, 109, 102, 97, 92, 89, 85, 82, 80, 77, 76, 74, 73, 73, 73, 73, 73, 74, 75, 76, 78, 81, 84, 87, 91, 95, 100, 107, 116, 130, 149, 127, 116, 107, 100, 95, 91, 87, 84, 81, 78, 76, 74, 73, 72, 71, 71, 71, 72, 72, 74, 75, 77, 79, 82, 85, 89, 93, 98, 105, 113, 126, 142, 123, 113, 104, 98, 93, 89, 86, 82, 79, 77, 75, 73, 72, 71, 70, 70, 70, 71, 71, 72, 74, 76, 78, 81, 84, 88, 92, 97, 103, 111, 122, 137, 120, 111, 103, 97, 92, 88, 84, 81, 78, 76, 74, 72, 71, 70, 69, 69, 69, 69, 70, 71, 73, 74, 77, 80, 83, 86, 90, 95, 101, 109, 119, 133, 118, 109, 101, 96, 91, 87, 83, 80, 77, 75, 73, 71, 69, 69, 68, 68, 68, 68, 69, 70, 72, 73, 76, 78, 82, 85, 89, 94, 100, 107, 117, 130, 115, 107, 100, 94, 90, 86, 82, 79, 76, 74, 72, 70, 69, 68, 67, 67, 67, 67, 68, 69, 71, 72, 75, 77, 81, 84, 88, 93, 98, 105, 115, 127, 114, 106, 99, 93, 89, 85, 81, 78, 75, 73, 71, 69, 68, 67, 66, 66, 66, 67, 67, 68, 70, 72, 74, 76, 80, 83, 87, 92, 97, 104, 113, 125, 113, 105, 98, 93, 88, 84, 80, 77, 74, 72, 70, 68, 67, 66, 66, 65, 66, 66, 67, 68, 69, 71, 73, 76, 79, 83, 86, 91, 96, 103, 112, 123, 112, 104, 97, 92, 87, 83, 80, 76, 74, 71, 69, 68, 66, 66, 65, 65, 65, 65, 66, 67, 68, 70, 72, 75, 78, 82, 86, 90, 96, 102, 111, 122, 111, 103, 96, 91, 87, 83, 79, 76, 73, 71, 69, 67, 66, 65, 65, 65, 65, 65, 65, 66, 68, 70, 72, 74, 78, 81, 85, 90, 95, 102, 110, 121, 110, 102, 96, 91, 86, 82, 79, 75, 73, 70, 68, 67, 65, 65, 64, 64, 64, 65, 65, 66, 67, 69, 71, 74, 77, 81, 85, 89, 95, 101, 110, 120, 109, 102, 96, 91, 86, 82, 78, 75, 72, 70, 68, 66, 65, 65, 64, 64, 64, 64, 65, 66, 67, 69, 71, 74, 77, 80, 84, 89, 94, 101, 109, 120, 109, 102, 96, 90, 86, 82, 78, 75, 72, 70, 68, 66, 65, 64, 64, 64, 64, 64, 65, 66, 67, 69, 71, 73, 77, 80, 84, 89, 94, 101, 109, 119, 109, 102, 95, 90, 86, 82, 78, 75, 72, 70, 68, 66, 65, 64, 64, 64, 64, 64, 65, 66, 67, 69, 71, 73, 76, 80, 84, 89, 94, 101, 109, 119, 109, 102, 95, 90, 86, 82, 78, 75, 72, 70, 68, 66, 65, 64, 64, 64, 64, 64, 65, 66, 67, 69, 71, 73, 76, 80, 84, 89, 94, 101, 109, 120, 110, 102, 96, 91, 86, 82, 78, 75, 72, 70, 68, 66, 65, 64, 64, 64, 64, 64, 65, 66, 67, 69, 71, 74, 77, 80, 84, 89, 94, 101, 109, 120, 110, 102, 96, 91, 86, 82, 78, 75, 72, 70, 68, 67, 65, 65, 64, 64, 64, 65, 65, 66, 67, 69, 71, 74, 77, 81, 85, 89, 95, 101, 110, 121, 111, 103, 97, 91, 87, 82, 79, 76, 73, 70, 69, 67, 66, 65, 65, 65, 65, 65, 65, 66, 68, 70, 72, 74, 77, 81, 85, 90, 95, 102, 111, 122, 111, 104, 97, 92, 87, 83, 79, 76, 73, 71, 69, 68, 66, 66, 65, 65, 65, 65, 66, 67, 68, 70, 72, 75, 78, 82, 86, 90, 96, 103, 112, 123, 112, 104, 98, 92, 88, 84, 80, 77, 74, 72, 70, 68, 67, 66, 66, 65, 65, 66, 67, 68, 69, 71, 73, 75, 79, 82, 86, 91, 97, 104, 113, 125, 114, 106, 99, 93, 88, 84, 81, 78, 75, 72, 71, 69, 68, 67, 66, 66, 66, 67, 67, 68, 70, 71, 74, 76, 79, 83, 87, 92, 98, 105, 115, 127, 116, 107, 100, 94, 89, 85, 82, 78, 76, 73, 71, 70, 68, 68, 67, 67, 67, 67, 68, 69, 71, 72, 74, 77, 80, 84, 88, 93, 99, 106, 116, 129, 118, 108, 101, 95, 90, 86, 83, 79, 77, 74, 72, 71, 69, 69, 68, 68, 68, 68, 69, 70, 71, 73, 75, 78, 81, 85, 89, 94, 100, 108, 118, 132, 120, 110, 102, 96, 92, 87, 84, 80, 78, 75, 73, 72, 70, 69, 69, 69, 69, 69, 70, 71, 72, 74, 76, 79, 82, 86, 90, 95, 101, 110, 121, 135, 124, 113, 104, 98, 93, 88, 85, 81, 79, 76, 74, 73, 71, 70, 70, 70, 70, 70, 71, 72, 73, 75, 77, 80, 84, 87, 92, 97, 103, 112, 123, 139, 127, 115, 106, 99, 94, 90, 86, 83, 80, 77, 75, 74, 73, 72, 71, 71, 71, 71, 72, 73, 75, 76, 79, 81, 85, 88, 93, 98, 105, 114, 126, 142, 131, 119, 108, 101, 95, 91, 87, 84, 81, 79, 77, 75, 74, 73, 72, 72, 72, 72, 73, 74, 76, 78, 80, 83, 86, 90, 94, 100, 107, 117, 130, 148, 136, 122, 112, 103, 97, 93, 89, 85, 83, 80, 78, 76, 75, 74, 74, 73, 73, 74, 75, 76, 77, 79, 81, 84, 88, 92, 96, 102, 110, 121, 136, 155, 144, 128, 114, 106, 100, 94, 91, 87, 84, 82, 79, 78, 77, 76, 75, 75, 75, 75, 76, 77, 79, 81, 83, 86, 89, 94, 99, 105, 114, 124, 144, 169, 152, 132, 117, 108, 101, 96, 92, 89, 86, 83, 81, 79, 78, 77, 76, 76, 76, 77, 78, 79, 80, 82, 85, 88, 91, 96, 101, 107, 116, 129, 150, 184}; - -// CALIBRATION_SHADING_LS_TL84_G -static uint8_t _calibration_shading_ls_tl84_g[] = {134, 119, 109, 101, 96, 92, 88, 85, 82, 80, 78, 76, 75, 74, 73, 73, 73, 74, 74, 75, 76, 78, 80, 82, 85, 88, 92, 97, 103, 112, 127, 148, 129, 116, 106, 100, 94, 90, 86, 83, 81, 78, 76, 75, 74, 73, 72, 72, 72, 72, 73, 74, 75, 76, 78, 81, 83, 86, 90, 95, 101, 110, 123, 141, 124, 113, 104, 98, 92, 88, 85, 82, 79, 77, 75, 74, 72, 72, 71, 71, 71, 71, 72, 73, 74, 75, 77, 79, 82, 85, 89, 93, 99, 107, 118, 134, 120, 110, 102, 96, 91, 87, 83, 80, 78, 76, 74, 72, 71, 71, 70, 70, 70, 70, 71, 71, 73, 74, 76, 78, 81, 84, 87, 91, 97, 104, 115, 128, 117, 108, 100, 94, 89, 86, 82, 79, 77, 75, 73, 71, 70, 69, 69, 69, 69, 69, 70, 70, 72, 73, 75, 77, 80, 82, 86, 90, 95, 102, 111, 124, 114, 105, 98, 93, 88, 84, 81, 78, 76, 74, 72, 70, 69, 69, 68, 68, 68, 68, 69, 70, 71, 72, 74, 76, 79, 81, 85, 89, 93, 100, 109, 120, 112, 104, 97, 92, 87, 83, 80, 77, 75, 73, 71, 70, 69, 68, 67, 67, 67, 67, 68, 69, 70, 71, 73, 75, 78, 80, 84, 87, 92, 98, 107, 117, 110, 102, 96, 90, 86, 82, 79, 76, 74, 72, 70, 69, 68, 67, 67, 66, 66, 67, 67, 68, 69, 70, 72, 74, 77, 80, 83, 86, 91, 97, 105, 115, 109, 101, 95, 90, 85, 81, 78, 75, 73, 71, 70, 68, 67, 66, 66, 66, 66, 66, 66, 67, 68, 70, 71, 74, 76, 79, 82, 85, 90, 95, 103, 113, 107, 100, 94, 89, 84, 81, 78, 75, 73, 71, 69, 68, 67, 66, 65, 65, 65, 65, 66, 67, 68, 69, 71, 73, 75, 78, 81, 85, 89, 95, 102, 111, 106, 99, 93, 88, 84, 80, 77, 74, 72, 70, 68, 67, 66, 65, 65, 65, 65, 65, 65, 66, 67, 69, 70, 72, 75, 78, 81, 84, 89, 94, 101, 110, 105, 98, 93, 88, 83, 80, 77, 74, 72, 70, 68, 67, 66, 65, 65, 64, 65, 65, 65, 66, 67, 68, 70, 72, 74, 77, 80, 84, 88, 93, 100, 109, 105, 98, 92, 87, 83, 79, 76, 73, 71, 69, 68, 66, 65, 65, 64, 64, 64, 64, 65, 65, 66, 68, 70, 72, 74, 77, 80, 83, 88, 93, 100, 108, 104, 98, 92, 87, 83, 79, 76, 73, 71, 69, 67, 66, 65, 65, 64, 64, 64, 64, 65, 65, 66, 68, 69, 71, 74, 76, 79, 83, 87, 93, 100, 108, 104, 97, 92, 87, 83, 79, 76, 73, 71, 69, 67, 66, 65, 64, 64, 64, 64, 64, 65, 65, 66, 67, 69, 71, 73, 76, 79, 83, 87, 93, 99, 108, 104, 97, 91, 87, 82, 79, 76, 73, 71, 69, 67, 66, 65, 64, 64, 64, 64, 64, 65, 65, 66, 67, 69, 71, 73, 76, 79, 83, 87, 92, 99, 108, 104, 97, 92, 87, 83, 79, 76, 73, 71, 69, 67, 66, 65, 64, 64, 64, 64, 64, 65, 65, 66, 67, 69, 71, 73, 76, 79, 83, 87, 93, 100, 108, 104, 98, 92, 87, 83, 79, 76, 73, 71, 69, 67, 66, 65, 65, 64, 64, 64, 64, 65, 65, 66, 68, 69, 71, 74, 76, 80, 83, 87, 93, 100, 109, 105, 98, 92, 87, 83, 79, 76, 73, 71, 69, 68, 66, 65, 65, 64, 64, 64, 65, 65, 65, 66, 68, 69, 71, 74, 77, 80, 83, 88, 93, 100, 109, 105, 98, 92, 87, 83, 80, 76, 74, 71, 70, 68, 67, 66, 65, 65, 64, 64, 65, 65, 66, 67, 68, 70, 72, 74, 77, 80, 84, 88, 94, 101, 110, 106, 99, 93, 88, 84, 80, 77, 74, 72, 70, 68, 67, 66, 65, 65, 65, 65, 65, 65, 66, 67, 69, 70, 72, 75, 77, 81, 84, 89, 94, 102, 111, 107, 100, 94, 89, 84, 81, 77, 75, 72, 70, 69, 68, 67, 66, 65, 65, 65, 65, 66, 67, 68, 69, 71, 73, 75, 78, 81, 85, 89, 95, 103, 112, 108, 101, 94, 89, 85, 81, 78, 75, 73, 71, 70, 68, 67, 66, 66, 66, 66, 66, 66, 67, 68, 70, 71, 73, 76, 79, 82, 86, 90, 96, 104, 114, 110, 102, 95, 90, 86, 82, 79, 76, 74, 72, 70, 69, 68, 67, 67, 66, 66, 67, 67, 68, 69, 70, 72, 74, 76, 79, 83, 86, 91, 97, 106, 116, 112, 103, 97, 91, 87, 83, 80, 77, 75, 73, 71, 70, 69, 68, 67, 67, 67, 67, 68, 69, 70, 71, 73, 75, 77, 80, 83, 87, 92, 98, 107, 119, 114, 105, 98, 92, 88, 84, 81, 78, 75, 74, 72, 71, 69, 69, 68, 68, 68, 68, 69, 69, 70, 72, 74, 76, 78, 81, 84, 88, 93, 100, 110, 122, 117, 107, 99, 94, 89, 85, 82, 79, 76, 74, 73, 71, 70, 70, 69, 69, 69, 69, 70, 70, 71, 73, 75, 77, 79, 82, 86, 90, 95, 102, 112, 124, 120, 110, 101, 95, 90, 86, 83, 80, 78, 75, 74, 72, 71, 71, 70, 70, 70, 70, 71, 71, 72, 74, 76, 78, 80, 83, 87, 91, 97, 104, 115, 128, 123, 112, 104, 97, 92, 88, 84, 81, 79, 77, 75, 74, 72, 72, 71, 71, 71, 71, 72, 72, 73, 75, 77, 79, 82, 85, 88, 93, 99, 107, 118, 132, 127, 116, 107, 99, 93, 89, 85, 83, 80, 78, 76, 75, 74, 73, 72, 72, 72, 72, 73, 74, 75, 76, 78, 80, 83, 86, 90, 95, 101, 110, 122, 138, 133, 120, 109, 101, 95, 91, 87, 84, 81, 79, 77, 76, 75, 74, 73, 73, 73, 73, 74, 75, 76, 77, 79, 82, 84, 88, 92, 97, 104, 113, 129, 149, 140, 124, 112, 104, 97, 93, 89, 85, 83, 81, 79, 77, 76, 75, 75, 74, 74, 75, 75, 76, 77, 79, 81, 83, 86, 89, 93, 99, 106, 116, 134, 160}; - -// CALIBRATION_SHADING_LS_TL84_B -static uint8_t _calibration_shading_ls_tl84_b[] = {120, 108, 99, 93, 88, 84, 81, 79, 76, 75, 73, 72, 71, 71, 71, 71, 71, 71, 72, 72, 73, 74, 76, 77, 79, 82, 85, 89, 95, 103, 115, 132, 117, 106, 98, 92, 87, 83, 80, 78, 76, 74, 73, 72, 71, 70, 70, 70, 70, 70, 71, 72, 72, 74, 75, 77, 79, 81, 84, 88, 93, 101, 112, 127, 112, 103, 96, 90, 86, 82, 79, 77, 75, 73, 72, 71, 70, 70, 69, 69, 69, 70, 70, 71, 72, 73, 74, 76, 78, 80, 83, 87, 91, 98, 108, 122, 109, 101, 94, 89, 85, 81, 78, 76, 74, 73, 71, 70, 70, 69, 69, 69, 69, 69, 70, 70, 71, 72, 74, 75, 77, 80, 82, 86, 90, 96, 105, 117, 106, 99, 92, 87, 83, 80, 77, 75, 74, 72, 71, 70, 69, 68, 68, 68, 68, 68, 69, 70, 70, 71, 73, 75, 77, 79, 81, 85, 88, 94, 102, 113, 104, 97, 91, 86, 82, 79, 77, 74, 73, 71, 70, 69, 68, 68, 67, 67, 67, 68, 68, 69, 70, 71, 72, 74, 76, 78, 81, 83, 87, 92, 100, 110, 102, 95, 90, 85, 81, 78, 76, 74, 72, 71, 69, 68, 68, 67, 67, 67, 67, 67, 67, 68, 69, 70, 72, 74, 75, 77, 80, 82, 86, 91, 98, 107, 100, 94, 89, 84, 80, 78, 75, 73, 71, 70, 69, 68, 67, 67, 66, 66, 66, 66, 67, 67, 68, 70, 71, 73, 75, 77, 79, 82, 85, 90, 96, 105, 99, 93, 88, 83, 80, 77, 74, 73, 71, 69, 68, 67, 66, 66, 66, 65, 66, 66, 66, 67, 68, 69, 70, 72, 74, 76, 78, 81, 84, 89, 95, 103, 98, 92, 87, 83, 79, 76, 74, 72, 70, 69, 68, 67, 66, 65, 65, 65, 65, 65, 66, 66, 67, 68, 70, 71, 73, 76, 78, 81, 84, 88, 94, 101, 97, 91, 86, 82, 79, 76, 73, 72, 70, 68, 67, 66, 65, 65, 65, 65, 65, 65, 65, 66, 67, 68, 69, 71, 73, 75, 77, 80, 83, 88, 93, 100, 96, 90, 86, 82, 78, 75, 73, 71, 69, 68, 67, 66, 65, 65, 65, 64, 64, 65, 65, 65, 66, 67, 69, 70, 73, 75, 77, 80, 83, 87, 93, 99, 95, 90, 86, 81, 78, 75, 73, 71, 69, 68, 66, 66, 65, 64, 64, 64, 64, 64, 65, 65, 66, 67, 68, 70, 72, 74, 77, 80, 83, 87, 92, 98, 95, 90, 85, 81, 78, 75, 72, 71, 69, 67, 66, 65, 65, 64, 64, 64, 64, 64, 64, 65, 66, 67, 68, 70, 72, 74, 77, 79, 83, 87, 92, 98, 94, 89, 85, 81, 78, 75, 72, 70, 69, 67, 66, 65, 65, 64, 64, 64, 64, 64, 65, 65, 66, 67, 68, 70, 72, 74, 76, 79, 82, 87, 92, 98, 94, 89, 85, 81, 78, 75, 72, 70, 69, 67, 66, 65, 65, 64, 64, 64, 64, 64, 64, 65, 66, 67, 68, 70, 72, 74, 76, 79, 83, 86, 92, 98, 95, 89, 85, 81, 78, 75, 72, 70, 69, 67, 66, 65, 65, 64, 64, 64, 64, 64, 64, 65, 66, 67, 68, 70, 72, 74, 76, 79, 82, 87, 92, 98, 95, 89, 85, 81, 78, 75, 73, 71, 69, 67, 66, 65, 65, 64, 64, 64, 64, 64, 64, 65, 66, 67, 68, 70, 72, 74, 77, 79, 83, 87, 92, 98, 95, 90, 85, 81, 78, 75, 73, 71, 69, 68, 66, 66, 65, 64, 64, 64, 64, 64, 64, 65, 66, 67, 68, 70, 72, 74, 77, 80, 83, 87, 93, 99, 96, 90, 86, 82, 78, 75, 73, 71, 69, 68, 67, 66, 65, 64, 64, 64, 64, 64, 65, 65, 66, 67, 68, 70, 72, 74, 77, 80, 83, 87, 93, 100, 96, 91, 86, 82, 79, 76, 73, 71, 70, 68, 67, 66, 65, 65, 65, 64, 64, 65, 65, 66, 66, 67, 69, 71, 73, 75, 77, 80, 84, 88, 94, 101, 97, 92, 87, 83, 79, 76, 74, 72, 70, 69, 68, 67, 66, 65, 65, 65, 65, 65, 65, 66, 67, 68, 69, 71, 73, 75, 78, 81, 84, 88, 94, 102, 98, 92, 87, 83, 80, 77, 74, 72, 71, 69, 68, 67, 66, 66, 65, 65, 65, 66, 66, 66, 67, 68, 70, 72, 74, 76, 78, 81, 85, 89, 96, 103, 100, 94, 88, 84, 80, 77, 75, 73, 71, 70, 69, 68, 67, 66, 66, 66, 66, 66, 67, 67, 68, 69, 71, 72, 74, 76, 79, 82, 85, 90, 97, 105, 101, 95, 89, 85, 81, 78, 76, 74, 72, 71, 70, 69, 68, 67, 67, 67, 67, 67, 67, 68, 69, 70, 71, 73, 75, 77, 79, 82, 86, 91, 99, 107, 104, 96, 90, 86, 82, 79, 77, 75, 73, 72, 70, 69, 68, 68, 67, 67, 67, 68, 68, 68, 69, 70, 72, 74, 76, 78, 80, 83, 87, 93, 100, 110, 106, 98, 92, 87, 83, 80, 77, 75, 74, 72, 71, 70, 69, 69, 68, 68, 68, 68, 69, 69, 70, 71, 73, 74, 76, 79, 81, 84, 89, 94, 102, 112, 109, 100, 93, 88, 84, 81, 78, 76, 74, 73, 72, 71, 70, 69, 69, 69, 69, 69, 69, 70, 71, 72, 73, 75, 77, 79, 82, 85, 90, 96, 105, 116, 112, 103, 95, 89, 85, 82, 79, 77, 75, 74, 72, 71, 71, 70, 70, 69, 69, 70, 70, 71, 71, 73, 74, 76, 78, 80, 83, 86, 92, 99, 108, 120, 115, 105, 97, 91, 86, 83, 80, 78, 76, 74, 73, 72, 71, 71, 70, 70, 70, 70, 71, 71, 72, 73, 75, 76, 79, 81, 84, 88, 93, 101, 111, 124, 119, 108, 99, 92, 87, 84, 81, 78, 76, 75, 74, 73, 72, 71, 71, 71, 71, 71, 71, 72, 73, 74, 75, 77, 79, 82, 85, 89, 95, 103, 116, 131, 123, 111, 101, 94, 88, 85, 81, 79, 77, 75, 74, 73, 72, 72, 71, 71, 71, 71, 72, 72, 73, 74, 76, 78, 80, 83, 86, 91, 97, 105, 119, 139}; - -// CALIBRATION_SHADING_LS_D65_R -static uint8_t _calibration_shading_ls_d65_r[] = {156, 137, 123, 114, 107, 101, 97, 92, 88, 85, 83, 80, 78, 77, 76, 76, 76, 76, 77, 78, 80, 82, 85, 88, 92, 96, 102, 108, 116, 127, 145, 172, 149, 133, 120, 111, 105, 99, 94, 90, 87, 83, 81, 78, 77, 76, 75, 74, 74, 75, 75, 76, 78, 80, 83, 86, 90, 94, 99, 105, 113, 123, 140, 163, 142, 128, 117, 109, 102, 97, 93, 88, 85, 81, 79, 77, 75, 74, 73, 72, 72, 73, 74, 75, 76, 78, 81, 84, 88, 92, 97, 103, 110, 120, 134, 154, 138, 125, 114, 106, 101, 95, 91, 87, 83, 80, 77, 75, 74, 72, 71, 71, 71, 71, 72, 73, 75, 77, 79, 83, 86, 90, 95, 101, 108, 117, 130, 148, 134, 122, 112, 105, 99, 94, 89, 85, 82, 79, 76, 74, 72, 71, 70, 70, 70, 70, 71, 72, 73, 75, 78, 81, 85, 89, 94, 99, 105, 114, 126, 142, 130, 119, 110, 103, 97, 92, 88, 84, 80, 77, 75, 73, 71, 70, 69, 69, 69, 69, 70, 71, 72, 74, 77, 80, 83, 87, 92, 97, 104, 112, 124, 139, 128, 117, 109, 102, 96, 91, 87, 83, 79, 76, 74, 72, 70, 69, 68, 67, 67, 68, 68, 70, 71, 73, 76, 79, 82, 86, 91, 96, 102, 110, 121, 135, 126, 115, 107, 100, 95, 90, 85, 81, 78, 75, 73, 71, 69, 68, 67, 67, 67, 67, 68, 69, 70, 72, 75, 78, 81, 85, 90, 95, 101, 109, 119, 132, 124, 114, 106, 99, 94, 89, 85, 81, 77, 74, 72, 70, 68, 67, 66, 66, 66, 66, 67, 68, 69, 71, 74, 77, 80, 84, 89, 94, 100, 108, 117, 130, 122, 113, 105, 99, 93, 88, 84, 80, 76, 73, 71, 69, 68, 66, 66, 65, 65, 65, 66, 67, 69, 71, 73, 76, 80, 83, 88, 93, 99, 106, 116, 129, 121, 112, 104, 98, 92, 87, 83, 79, 76, 73, 70, 68, 67, 66, 65, 65, 65, 65, 65, 67, 68, 70, 72, 75, 79, 83, 87, 93, 98, 106, 116, 127, 121, 111, 103, 97, 92, 87, 82, 79, 75, 72, 70, 68, 66, 65, 65, 64, 64, 65, 65, 66, 68, 69, 72, 75, 78, 82, 87, 92, 98, 105, 115, 127, 120, 111, 103, 97, 92, 87, 82, 78, 75, 72, 69, 67, 66, 65, 64, 64, 64, 64, 65, 66, 67, 69, 72, 74, 78, 82, 87, 92, 98, 105, 114, 126, 120, 110, 103, 97, 91, 86, 82, 78, 74, 72, 69, 67, 66, 65, 64, 64, 64, 64, 65, 66, 67, 69, 71, 74, 78, 82, 86, 92, 98, 105, 114, 125, 119, 110, 103, 96, 91, 86, 82, 78, 74, 72, 69, 67, 66, 65, 64, 64, 64, 64, 65, 66, 67, 69, 71, 74, 78, 82, 86, 91, 98, 105, 114, 125, 120, 110, 103, 97, 91, 86, 82, 78, 74, 71, 69, 67, 66, 65, 64, 64, 64, 64, 65, 66, 67, 69, 71, 74, 78, 82, 86, 91, 98, 105, 114, 125, 120, 111, 103, 97, 91, 86, 82, 78, 75, 72, 69, 67, 66, 65, 64, 64, 64, 65, 65, 66, 67, 69, 71, 74, 78, 82, 87, 92, 98, 105, 114, 126, 121, 111, 103, 97, 92, 87, 82, 78, 75, 72, 70, 68, 66, 65, 65, 64, 65, 65, 65, 66, 68, 69, 72, 75, 78, 82, 87, 92, 98, 105, 115, 127, 121, 112, 104, 98, 92, 87, 83, 79, 75, 72, 70, 68, 67, 66, 65, 65, 65, 65, 66, 67, 68, 70, 72, 75, 79, 83, 87, 93, 99, 106, 116, 128, 122, 112, 105, 98, 93, 88, 83, 79, 76, 73, 71, 69, 67, 66, 65, 65, 65, 65, 66, 67, 69, 70, 73, 76, 79, 83, 88, 93, 99, 107, 117, 129, 123, 113, 105, 99, 93, 88, 84, 80, 77, 74, 71, 69, 68, 67, 66, 66, 66, 66, 67, 68, 69, 71, 74, 76, 80, 84, 89, 94, 100, 108, 118, 131, 124, 114, 107, 100, 94, 89, 85, 81, 77, 75, 72, 70, 69, 68, 67, 66, 66, 67, 68, 69, 70, 72, 74, 77, 81, 85, 90, 95, 102, 109, 120, 133, 126, 116, 108, 101, 95, 90, 86, 82, 78, 75, 73, 71, 70, 68, 68, 67, 67, 68, 68, 70, 71, 73, 75, 78, 82, 86, 91, 96, 103, 111, 121, 135, 128, 118, 109, 102, 96, 91, 87, 83, 80, 77, 74, 72, 71, 69, 69, 68, 68, 69, 70, 71, 72, 74, 76, 80, 83, 87, 92, 97, 104, 112, 124, 138, 131, 120, 110, 103, 98, 93, 88, 84, 81, 78, 75, 73, 72, 71, 70, 69, 69, 70, 71, 72, 73, 75, 78, 81, 84, 88, 93, 99, 106, 114, 126, 142, 134, 122, 112, 105, 99, 94, 89, 85, 82, 79, 77, 75, 73, 72, 71, 71, 71, 71, 72, 73, 74, 76, 79, 82, 86, 90, 95, 100, 107, 117, 129, 145, 138, 125, 114, 107, 100, 95, 91, 87, 83, 80, 78, 76, 74, 73, 72, 72, 72, 72, 73, 74, 76, 78, 80, 83, 87, 91, 96, 102, 109, 119, 132, 149, 142, 128, 117, 109, 102, 97, 92, 88, 85, 82, 79, 77, 76, 74, 74, 73, 73, 74, 74, 75, 77, 79, 82, 85, 89, 93, 98, 104, 112, 122, 135, 153, 148, 132, 120, 111, 104, 99, 94, 90, 86, 83, 81, 79, 77, 76, 75, 75, 75, 75, 76, 77, 79, 81, 83, 87, 90, 95, 100, 106, 115, 126, 140, 159, 154, 137, 124, 114, 106, 101, 96, 92, 88, 85, 83, 80, 79, 78, 77, 76, 76, 77, 78, 79, 80, 82, 85, 88, 92, 97, 102, 109, 118, 129, 146, 168, 163, 143, 127, 117, 109, 103, 98, 94, 90, 87, 84, 82, 81, 79, 79, 78, 78, 79, 79, 81, 82, 84, 87, 91, 95, 99, 105, 112, 122, 134, 155, 183, 173, 148, 131, 120, 112, 106, 101, 96, 92, 89, 86, 84, 83, 81, 80, 80, 80, 80, 81, 82, 84, 86, 89, 93, 97, 101, 107, 115, 125, 139, 163, 200}; - -// CALIBRATION_SHADING_LS_D65_G -static uint8_t _calibration_shading_ls_d65_g[] = {133, 118, 108, 100, 95, 90, 87, 83, 81, 78, 76, 75, 74, 73, 72, 72, 72, 72, 72, 73, 74, 76, 77, 79, 82, 85, 88, 93, 99, 107, 120, 138, 128, 116, 105, 99, 93, 89, 85, 82, 79, 77, 75, 74, 72, 72, 71, 71, 71, 71, 71, 72, 73, 74, 76, 78, 81, 84, 87, 91, 97, 105, 117, 132, 123, 112, 103, 97, 92, 87, 84, 81, 78, 76, 74, 73, 71, 71, 70, 70, 70, 70, 70, 71, 72, 73, 75, 77, 79, 82, 86, 90, 95, 102, 113, 127, 120, 109, 101, 95, 90, 86, 82, 80, 77, 75, 73, 72, 70, 70, 69, 69, 69, 69, 69, 70, 71, 72, 74, 76, 78, 81, 84, 88, 93, 100, 110, 122, 116, 107, 99, 93, 89, 85, 81, 78, 76, 74, 72, 71, 69, 69, 68, 68, 68, 68, 68, 69, 70, 71, 73, 75, 77, 80, 83, 87, 91, 98, 107, 118, 114, 105, 98, 92, 88, 84, 80, 77, 75, 73, 71, 70, 69, 68, 67, 67, 67, 67, 68, 68, 69, 71, 72, 74, 77, 79, 82, 86, 90, 96, 104, 115, 112, 103, 97, 91, 87, 83, 79, 77, 74, 72, 70, 69, 68, 67, 67, 66, 66, 66, 67, 68, 69, 70, 71, 73, 76, 78, 81, 85, 89, 95, 102, 112, 110, 102, 95, 90, 86, 82, 79, 76, 74, 71, 70, 68, 67, 67, 66, 66, 66, 66, 66, 67, 68, 69, 71, 73, 75, 78, 80, 84, 88, 93, 101, 110, 109, 101, 95, 89, 85, 81, 78, 75, 73, 71, 69, 68, 67, 66, 65, 65, 65, 65, 66, 66, 67, 69, 70, 72, 74, 77, 80, 83, 87, 92, 100, 108, 108, 100, 94, 89, 84, 81, 77, 75, 72, 70, 69, 67, 66, 66, 65, 65, 65, 65, 65, 66, 67, 68, 70, 72, 74, 76, 79, 83, 87, 92, 99, 107, 107, 99, 93, 88, 84, 80, 77, 74, 72, 70, 68, 67, 66, 65, 65, 64, 64, 64, 65, 66, 66, 68, 69, 71, 73, 76, 79, 82, 86, 91, 98, 106, 106, 99, 93, 88, 83, 80, 77, 74, 72, 70, 68, 67, 66, 65, 64, 64, 64, 64, 65, 65, 66, 67, 69, 71, 73, 76, 78, 82, 86, 91, 97, 105, 105, 98, 92, 87, 83, 79, 76, 74, 71, 69, 68, 66, 65, 65, 64, 64, 64, 64, 64, 65, 66, 67, 69, 71, 73, 75, 78, 82, 85, 90, 97, 105, 105, 98, 92, 87, 83, 79, 76, 73, 71, 69, 68, 66, 65, 65, 64, 64, 64, 64, 64, 65, 66, 67, 69, 70, 73, 75, 78, 81, 85, 90, 97, 104, 105, 98, 92, 87, 83, 79, 76, 73, 71, 69, 67, 66, 65, 65, 64, 64, 64, 64, 64, 65, 66, 67, 68, 70, 73, 75, 78, 81, 85, 90, 97, 104, 105, 98, 92, 87, 83, 79, 76, 73, 71, 69, 68, 66, 65, 65, 64, 64, 64, 64, 64, 65, 66, 67, 69, 70, 73, 75, 78, 81, 85, 90, 97, 105, 105, 98, 92, 87, 83, 79, 76, 73, 71, 69, 68, 66, 65, 65, 64, 64, 64, 64, 64, 65, 66, 67, 69, 70, 73, 75, 78, 82, 86, 90, 97, 105, 106, 98, 92, 87, 83, 79, 76, 74, 71, 69, 68, 66, 65, 65, 65, 64, 64, 64, 65, 65, 66, 67, 69, 71, 73, 75, 78, 82, 86, 91, 97, 105, 106, 99, 93, 88, 83, 80, 77, 74, 72, 70, 68, 67, 66, 65, 65, 65, 65, 65, 65, 65, 66, 68, 69, 71, 73, 76, 79, 82, 86, 91, 98, 106, 107, 99, 93, 88, 84, 80, 77, 74, 72, 70, 69, 67, 66, 65, 65, 65, 65, 65, 65, 66, 67, 68, 69, 71, 74, 76, 79, 83, 87, 92, 99, 107, 107, 100, 94, 89, 84, 81, 78, 75, 73, 71, 69, 68, 67, 66, 65, 65, 65, 65, 66, 66, 67, 68, 70, 72, 74, 77, 80, 83, 87, 92, 99, 108, 109, 101, 95, 89, 85, 81, 78, 75, 73, 71, 70, 68, 67, 66, 66, 66, 65, 66, 66, 67, 68, 69, 71, 72, 75, 77, 80, 84, 88, 93, 101, 110, 110, 102, 96, 90, 86, 82, 79, 76, 74, 72, 70, 69, 68, 67, 66, 66, 66, 66, 67, 67, 68, 70, 71, 73, 75, 78, 81, 85, 89, 94, 102, 112, 112, 104, 97, 91, 87, 83, 80, 77, 75, 73, 71, 70, 69, 68, 67, 67, 67, 67, 67, 68, 69, 70, 72, 74, 76, 79, 82, 85, 90, 96, 104, 114, 114, 105, 98, 92, 88, 84, 81, 78, 75, 73, 72, 71, 69, 69, 68, 68, 68, 68, 68, 69, 70, 71, 73, 75, 77, 80, 83, 87, 91, 97, 106, 116, 117, 107, 100, 94, 89, 85, 82, 79, 76, 74, 73, 71, 70, 69, 69, 68, 68, 69, 69, 70, 71, 72, 74, 76, 78, 81, 84, 88, 92, 99, 108, 119, 120, 110, 101, 95, 90, 86, 83, 80, 77, 75, 74, 72, 71, 70, 70, 69, 69, 70, 70, 71, 72, 73, 75, 77, 79, 82, 85, 89, 94, 101, 110, 122, 123, 112, 103, 97, 92, 88, 84, 81, 79, 76, 75, 73, 72, 71, 71, 70, 70, 71, 71, 72, 73, 74, 76, 78, 80, 83, 86, 90, 96, 103, 113, 126, 127, 115, 106, 99, 93, 89, 85, 82, 80, 78, 76, 75, 73, 73, 72, 72, 71, 72, 72, 73, 74, 75, 77, 79, 81, 84, 88, 92, 98, 106, 116, 130, 131, 119, 109, 101, 95, 91, 87, 84, 81, 79, 77, 76, 75, 74, 73, 73, 73, 73, 73, 74, 75, 76, 78, 80, 83, 86, 90, 94, 101, 109, 121, 136, 138, 124, 112, 103, 97, 93, 89, 85, 83, 80, 79, 77, 76, 75, 74, 74, 74, 74, 75, 75, 76, 78, 80, 82, 84, 88, 91, 97, 103, 112, 128, 147, 146, 128, 114, 106, 99, 94, 90, 87, 84, 82, 80, 78, 77, 76, 76, 75, 75, 75, 76, 77, 78, 79, 81, 83, 86, 89, 93, 99, 106, 116, 133, 158}; - -// CALIBRATION_SHADING_LS_D65_B -static uint8_t _calibration_shading_ls_d65_b[] = {122, 110, 100, 94, 88, 84, 81, 78, 76, 74, 73, 72, 71, 70, 70, 70, 70, 70, 71, 71, 72, 73, 74, 76, 78, 80, 83, 87, 92, 99, 110, 125, 118, 107, 99, 92, 87, 83, 80, 78, 75, 74, 72, 71, 70, 70, 69, 69, 69, 70, 70, 70, 71, 72, 74, 75, 77, 79, 82, 86, 90, 97, 107, 120, 114, 104, 97, 91, 86, 82, 79, 77, 75, 73, 72, 71, 70, 69, 69, 69, 69, 69, 69, 70, 70, 71, 73, 74, 76, 78, 81, 84, 89, 95, 104, 116, 111, 102, 95, 89, 85, 81, 78, 76, 74, 72, 71, 70, 69, 69, 68, 68, 68, 68, 69, 69, 70, 71, 72, 74, 76, 78, 80, 83, 87, 93, 102, 112, 108, 100, 93, 88, 83, 80, 77, 75, 73, 72, 70, 69, 68, 68, 67, 67, 67, 67, 68, 68, 69, 70, 72, 73, 75, 77, 79, 82, 86, 91, 99, 109, 106, 98, 92, 87, 83, 79, 77, 74, 73, 71, 70, 69, 68, 67, 67, 67, 67, 67, 67, 68, 69, 70, 71, 73, 74, 76, 79, 81, 85, 90, 97, 106, 104, 97, 91, 86, 82, 78, 76, 74, 72, 70, 69, 68, 67, 67, 66, 66, 66, 66, 67, 67, 68, 69, 70, 72, 74, 76, 78, 80, 84, 88, 95, 103, 102, 95, 89, 85, 81, 78, 75, 73, 71, 70, 69, 68, 67, 66, 66, 65, 65, 66, 66, 67, 67, 68, 70, 71, 73, 75, 77, 80, 83, 87, 94, 101, 101, 94, 89, 84, 80, 77, 75, 72, 71, 69, 68, 67, 66, 66, 65, 65, 65, 65, 66, 66, 67, 68, 69, 71, 73, 75, 77, 79, 83, 87, 93, 100, 100, 93, 88, 83, 80, 76, 74, 72, 70, 69, 68, 67, 66, 65, 65, 65, 65, 65, 65, 66, 66, 67, 69, 70, 72, 74, 76, 79, 82, 86, 92, 98, 99, 93, 87, 83, 79, 76, 74, 72, 70, 68, 67, 66, 65, 65, 65, 64, 64, 64, 65, 65, 66, 67, 68, 70, 72, 74, 76, 78, 82, 86, 91, 98, 98, 92, 87, 82, 79, 76, 73, 71, 70, 68, 67, 66, 65, 65, 64, 64, 64, 64, 64, 65, 66, 67, 68, 69, 71, 74, 76, 78, 81, 85, 91, 97, 98, 92, 86, 82, 78, 76, 73, 71, 69, 68, 67, 66, 65, 64, 64, 64, 64, 64, 64, 65, 65, 66, 68, 69, 71, 73, 75, 78, 81, 85, 90, 96, 97, 91, 86, 82, 78, 75, 73, 71, 69, 68, 67, 66, 65, 64, 64, 64, 64, 64, 64, 65, 65, 66, 68, 69, 71, 73, 75, 78, 81, 85, 90, 96, 97, 91, 86, 82, 78, 75, 73, 71, 69, 68, 67, 66, 65, 64, 64, 64, 64, 64, 64, 64, 65, 66, 67, 69, 71, 73, 75, 78, 81, 85, 90, 96, 97, 91, 86, 82, 78, 75, 73, 71, 69, 68, 67, 66, 65, 64, 64, 64, 64, 64, 64, 65, 65, 66, 67, 69, 71, 73, 75, 78, 81, 85, 90, 96, 97, 91, 86, 82, 78, 76, 73, 71, 69, 68, 67, 66, 65, 64, 64, 64, 64, 64, 64, 65, 65, 66, 68, 69, 71, 73, 75, 78, 81, 85, 90, 97, 97, 91, 86, 82, 79, 76, 73, 71, 69, 68, 67, 66, 65, 65, 64, 64, 64, 64, 64, 65, 65, 66, 68, 69, 71, 73, 76, 78, 82, 85, 91, 97, 98, 92, 87, 82, 79, 76, 74, 71, 70, 68, 67, 66, 65, 65, 64, 64, 64, 64, 65, 65, 66, 67, 68, 70, 71, 74, 76, 79, 82, 86, 91, 98, 99, 92, 87, 83, 79, 76, 74, 72, 70, 69, 67, 66, 65, 65, 65, 65, 65, 65, 65, 65, 66, 67, 68, 70, 72, 74, 76, 79, 82, 86, 92, 98, 99, 93, 88, 83, 80, 77, 74, 72, 70, 69, 68, 67, 66, 65, 65, 65, 65, 65, 65, 66, 66, 67, 69, 70, 72, 74, 77, 79, 83, 87, 92, 99, 100, 94, 89, 84, 80, 77, 75, 73, 71, 69, 68, 67, 66, 66, 65, 65, 65, 65, 65, 66, 67, 68, 69, 71, 73, 75, 77, 80, 83, 88, 93, 101, 101, 95, 89, 85, 81, 78, 75, 73, 72, 70, 69, 68, 67, 66, 66, 66, 66, 66, 66, 67, 67, 68, 70, 71, 73, 75, 78, 80, 84, 88, 95, 102, 103, 96, 90, 86, 82, 79, 76, 74, 72, 71, 70, 68, 68, 67, 66, 66, 66, 66, 67, 67, 68, 69, 70, 72, 74, 76, 78, 81, 85, 89, 96, 104, 105, 98, 92, 87, 83, 79, 77, 75, 73, 72, 70, 69, 68, 68, 67, 67, 67, 67, 67, 68, 69, 70, 71, 73, 75, 77, 79, 82, 86, 91, 98, 107, 107, 100, 93, 88, 84, 80, 78, 76, 74, 72, 71, 70, 69, 68, 68, 68, 68, 68, 68, 69, 69, 70, 72, 73, 75, 78, 80, 83, 87, 92, 100, 109, 110, 102, 94, 89, 85, 81, 79, 77, 75, 73, 72, 71, 70, 69, 69, 68, 68, 68, 69, 69, 70, 71, 73, 74, 76, 78, 81, 84, 88, 94, 102, 112, 113, 104, 96, 90, 86, 82, 80, 77, 76, 74, 73, 72, 71, 70, 70, 69, 69, 69, 70, 70, 71, 72, 73, 75, 77, 79, 82, 85, 90, 96, 105, 116, 117, 107, 98, 92, 87, 83, 81, 78, 76, 75, 73, 72, 71, 71, 70, 70, 70, 70, 70, 71, 72, 73, 74, 76, 78, 80, 83, 87, 91, 98, 108, 119, 120, 109, 101, 94, 89, 85, 82, 79, 77, 76, 74, 73, 72, 72, 71, 71, 71, 71, 71, 72, 73, 74, 75, 77, 79, 81, 84, 88, 93, 101, 111, 124, 125, 113, 103, 96, 90, 86, 83, 80, 78, 77, 75, 74, 73, 72, 72, 72, 72, 72, 72, 73, 73, 75, 76, 78, 80, 82, 85, 90, 96, 104, 116, 131, 131, 117, 105, 97, 91, 87, 84, 81, 79, 77, 76, 75, 74, 73, 73, 72, 72, 73, 73, 73, 74, 75, 77, 79, 81, 83, 87, 91, 97, 106, 120, 138}; - - -// R G B -static uint16_t _calibration_awb_warming_ls_a[] = {256, 256, 256}; - -// R G B -static uint16_t _calibration_awb_warming_ls_d75[] = {256, 256, 256}; - -// R G B -static uint16_t _calibration_awb_warming_ls_d50[] = {256, 256, 256}; - -// CALIBRATION_NOISE_PROFILE -static uint8_t _calibration_noise_profile[] = {0, 0, 0, 0, 0, 0, 0, 0, 5, 18, 23, 27, 30, 33, 34, 36, 37, 39, 40, 41, 42, 43, 43, 44, 45, 46, 46, 47, 47, 48, 48, 49, 49, 50, 50, 51, 51, 52, 52, 52, 53, 53, 53, 54, 54, 54, 55, 55, 55, 55, 56, 56, 56, 56, 57, 57, 57, 57, 58, 58, 58, 58, 59, 59, 59, 59, 59, 60, 60, 60, 60, 60, 60, 61, 61, 61, 61, 61, 62, 62, 62, 62, 62, 62, 62, 63, 63, 63, 63, 63, 63, 63, 64, 64, 64, 64, 64, 64, 64, 65, 65, 65, 65, 65, 65, 65, 65, 65, 66, 66, 66, 66, 66, 66, 66, 66, 66, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 68}; - -// CALIBRATION_DEMOSAIC -static uint8_t _calibration_demosaic[] = {7, 23, 29, 33, 36, 38, 40, 42, 43, 44, 46, 47, 48, 49, 50, 50, 51, 52, 52, 53, 53, 54, 55, 55, 55, 56, 56, 57, 57, 58, 58, 58, 59, 59, 59, 60, 60, 60, 61, 61, 61, 62, 62, 62, 62, 63, 63, 63, 63, 64, 64, 64, 64, 64, 65, 65, 65, 65, 65, 66, 66, 66, 66, 66, 67, 67, 67, 67, 67, 67, 68, 68, 68, 68, 68, 68, 69, 69, 69, 69, 69, 69, 69, 70, 70, 70, 70, 70, 70, 70, 71, 71, 71, 71, 71, 71, 71, 71, 71, 72, 72, 72, 72, 72, 72, 72, 72, 72, 73, 73, 73, 73, 73, 73, 73, 73, 73, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74}; - -// 8-bit normalised noise profile for WDR stitching -static uint8_t _calibration_wdr_np_lut[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - -// CALIBRATION_GAMMA -static uint16_t _calibration_gamma[] = {0, 198, 333, 441, 538, 631, 721, 808, 892, 972, 1050, 1125, 1197, 1267, 1334, 1398, 1461, 1522, 1580, 1636, 1691, 1743, 1794, 1844, 1891, 1937, 1982, 2024, 2065, 2105, 2143, 2181, 2218, 2254, 2290, 2325, 2360, 2394, 2428, 2460, 2493, 2525, 2558, 2588, 2620, 2650, 2680, 2710, 2739, 2767, 2795, 2823, 2850, 2877, 2903, 2931, 2955, 2981, 3006, 3031, 3055, 3079, 3101, 3124, 3147, 3170, 3191, 3212, 3233, 3255, 3275, 3295, 3314, 3334, 3352, 3371, 3390, 3408, 3425, 3442, 3460, 3477, 3494, 3511, 3527, 3544, 3560, 3575, 3592, 3607, 3623, 3638, 3653, 3667, 3682, 3697, 3711, 3725, 3739, 3753, 3767, 3780, 3793, 3806, 3820, 3833, 3846, 3859, 3871, 3884, 3896, 3907, 3920, 3932, 3943, 3955, 3967, 3978, 3989, 4000, 4011, 4022, 4033, 4043, 4054, 4065, 4075, 4085, 4095}; - -// CALIBRATION_IRIDIX_ASYMMETRY -static uint32_t _calibration_iridix_asymmetry[] = { - 0, 61184, 116961, 168002, 214899, 258115, 298084, 335172, 369653, 401797, 431862, 460022, 486454, 511335, 534791, 556919, 577880, 597720, 616568, 634473, 651529, 667785, 683305, 698153, 712346, 725978, 739050, 751610, 763706, 775355, 786587, 797451, 807931, 818091, 827947, 837499, 846780, 855820, 864604, 873180, 881532, 889708, 897708, 905532, 913213, 920733, 928141, 935421, 942589, 949645, 956621, 963501, 970317, 977053, 983742, 990366, 996942, 1003470, 1009982, 1016446, 1022894, 1029326, 1035742, 1042158, 1048575, -}; - -// CALIBRATION_CA_FILTER_MEM -static uint32_t _calibration_ca_filter_mem[] = {32768, 229629, 491259, 4278943225, 4279204855, 4262689525, 4246239220, 4229788915, 4213338610, 4196888050, 4197214450, 4180763890, 4164313330, 4147928050, 4131477235, 4115091955, 4098641140, 4082190325, 4082516470, 4066065655, 4066391800, 4066652665, 4066913530, 4067239930, 4067500795, 4084473340, 4101445885, 4118418430, 4152037375, 4185721855, 4219340544, 4253025024}; - -// calibration_awb_scene_presets in the following order AWB_DAY_LIGHT AWB_CLOUDY AWB_INCANDESCENT AWB_FLOURESCENT AWB_TWILIGHT AWB_SHADE AWB_WARM_FLOURESCENT -static uint16_t _calibration_awb_scene_presets[7][2] = { - {256, 256}, - {297, 207}, - {161, 443}, - {204, 328}, - {204, 328}, - {301, 187}, - {171, 417}}; - -// CALIBRATION_CA_CORRECTION: MIN_CORRECTION, MESH_WIDTH, MESH_HEIGHT -static uint16_t _calibration_ca_correction[] = {1, 64, 64}; - - -// CALIBRATION_CA_CORRECTION_MEM -static uint16_t _calibration_ca_correction_mem[][10] = { - {204, 65526, 81, 3, 65254, 65461, 65491, 141, 42, 65437}, - {65533, 109, 65531, 33, 65487, 65443, 65485, 44, 41, 65490}, - {65260, 65534, 65415, 65531, 384, 128, 68, 65523, 65470, 65321}, - {10, 65381, 65516, 65478, 61, 156, 97, 65472, 26, 65417}}; -static uint32_t _calibration_lut3d_mem[] = {0x00000C00, 0x01CFFBFE, 0x005043FF, 0x01F05001, 0x00100027, 0x019FFC25, 0x00304816, 0x02109020, 0x032033FE, 0x04A073FF, 0x03707BFF, 0x04F0C801, 0x022FF013, 0x034FF80E, 0x03606008, 0x04A093FF, 0x05C09800, 0x0700C402, 0x0630F401, 0x07712403, 0x0460100E, 0x05A0340E, 0x0600C403, 0x0750F408, 0x0810E405, 0x09011006, 0x08815405, 0x09617407, 0x06A04C10, 0x07605814, 0x0861180B, 0x09512C0D, 0x09C13807, 0x00000000, 0x0A119409, 0x00000000, 0x08407414, 0x00000000, 0x0A31600D, 0x00000000, 0x01206FFF, 0x029093FF, 0x01B0D3FF, 0x02E0FC00, 0x01607403, 0x0210A80A, 0x01C0D405, 0x0270E001, 0x03F0BFFF, 0x0540F001, 0x04812802, 0x05913003, 0x03C0C00A, 0x0510E801, 0x04411002, 0x05812C06, 0x06712002, 0x07B15406, 0x06B14C04, 0x07E17C08, 0x06812008, 0x07C1580B, 0x06C1540B, 0x0811880D, 0x08C17C07, 0x09A1A00A, 0x08F1A809, 0x09E1D00C, 0x08D17C0C, 0x09A19C0F, 0x0911B00F, 0x09E1D011, 0x0A51C00B, 0x00000000, 0x0A91F00E, 0x00000000, 0x0A61B810, 0x00000000, 0x0AA1EC13, 0x00000000, 0x02713800, 0x03716403, 0x0331B407, 0x0401D409, 0x0261340B, 0x03114C08, 0x0311AC13, 0x03D1CC10, 0x04F18406, 0x06219008, 0x0561F40C, 0x0691FC0D, 0x04B1780A, 0x06219C0E, 0x0531F011, 0x06920813, 0x06F19007, 0x0811A40A, 0x07C2080E, 0x0881FC0F, 0x07219C0D, 0x0841B40F, 0x07F21C16, 0x08D21415, 0x0931D00C, 0x0A21FC0E, 0x0982080F, 0x0A722C12, 0x0961E012, 0x0A320014, 0x09B21C16, 0x0A923417, 0x0AE21811, 0x00000000, 0x0B324814, 0x00000000, 0x0AF21C16, 0x00000000, 0x0B224C19, 0x00000000, 0x03C2200E, 0x04623811, 0x04226C13, 0x04A28415, 0x03D2241A, 0x04623817, 0x04227820, 0x04A2841B, 0x05B25013, 0x06F26013, 0x05C29417, 0x0702A818, 0x05725417, 0x06D2681A, 0x0562901B, 0x06E2A81E, 0x08326C15, 0x09728017, 0x0842B019, 0x0992C41B, 0x0832781C, 0x09928C1E, 0x0832B81F, 0x0992CC21, 0x0A126C17, 0x0AE27416, 0x0AC2D81E, 0x0B52C41D, 0x0A427C1D, 0x0AF2781C, 0x0AE2E424, 0x0B72D023, 0x0B728017, 0x00000000, 0x0BF2C41D, 0x00000000, 0x0B82841D, 0x00000000, 0x0C02C822, 0x00000000, 0x0492C017, 0x0512CC19, 0x00000000, 0x00000000, 0x0482C822, 0x04E2C81D, 0x00000000, 0x00000000, 0x05F2D819, 0x0762E81A, 0x00000000, 0x00000000, 0x0582D41E, 0x0712E821, 0x00000000, 0x00000000, 0x0882F01B, 0x09B3001E, 0x00000000, 0x00000000, 0x0842F021, 0x09930423, 0x00000000, 0x00000000, 0x0AE3141F, 0x0BD31C21, 0x00000000, 0x00000000, 0x0AD31425, 0x0BE32426, 0x00000000, 0x00000000, 0x0C430821, 0x00000000, 0x00000000, 0x00000000, 0x0C630C26, 0x00000000, 0x00000000, 0x00000000, 0x00101C54, 0x00E0145E, 0x00003045, 0x01505C43, 0x00203C70, 0x00B02473, 0x0020546A, 0x00B07469, 0x0240205C, 0x03301844, 0x02B05443, 0x03304028, 0x02403075, 0x03303874, 0x01D05C6A, 0x03006C69, 0x03F00C39, 0x04D01437, 0x04C05C1D, 0x06408415, 0x04303C62, 0x05003851, 0x04206052, 0x05205C42, 0x05A01C37, 0x06702C3E, 0x0750A013, 0x0810A816, 0x05D03C4F, 0x06904051, 0x0620643E, 0x06E0743F, 0x06F03840, 0x00000000, 0x08F0D416, 0x00000000, 0x07304855, 0x00000000, 0x07908841, 0x00000000, 0x0070883A, 0x0190C03D, 0x01911433, 0x02910C2B, 0x0020A866, 0x00B0B06B, 0x00D0F462, 0x01110065, 0x04611C48, 0x0520E423, 0x03E12C23, 0x0561381F, 0x0310E45C, 0x0440D85C, 0x0361405C, 0x06619468, 0x06610C0E, 0x07E1480F, 0x06A14C0C, 0x08219012, 0x04E0D440, 0x06A0E833, 0x06E15C40, 0x07E17826, 0x09017411, 0x09D18814, 0x0921B414, 0x0A11CC17, 0x07F10028, 0x08C11024, 0x0921A022, 0x09E1B422, 0x0A719C14, 0x00000000, 0x0AA1E417, 0x00000000, 0x09812823, 0x00000000, 0x0A81BC21, 0x00000000, 0x02816026, 0x03515C1E, 0x0361D022, 0x03F1D01F, 0x0201A067, 0x0281A062, 0x03221C65, 0x03B21459, 0x04516010, 0x05D18810, 0x04E1E01A, 0x0642081A, 0x0441904B, 0x05A1B43F, 0x05320041, 0x0611F82D, 0x07219C12, 0x0861C015, 0x07D2201B, 0x08F2201B, 0x0751B83B, 0x0861C422, 0x07A21426, 0x09022827, 0x0981E817, 0x0A52081A, 0x09D2281C, 0x0AA2441E, 0x09B1FC21, 0x0A921420, 0x0A023426, 0x0AD24C22, 0x0AF21C1C, 0x00000000, 0x0B32501F, 0x00000000, 0x0B122020, 0x00000000, 0x0B525424, 0x00000000, 0x0402442B, 0x04924429, 0x04329431, 0x04D2982F, 0x03E2886C, 0x04827C5B, 0x0452D46E, 0x04D2CC5D, 0x05525022, 0x0682641F, 0x05829C29, 0x0652A423, 0x05D27447, 0x06926C34, 0x0602C44E, 0x06C2C040, 0x08027C20, 0x09929824, 0x07E2BC25, 0x0972D027, 0x07C2802C, 0x0982A02A, 0x0792BC31, 0x0932D02C, 0x0A829024, 0x0B228C23, 0x0AE2EC2A, 0x0BA2E029, 0x0AA29C2B, 0x0B42942A, 0x0AE2F02D, 0x0BB2EC2E, 0x0BA28822, 0x00000000, 0x0C22D428, 0x00000000, 0x0BB29027, 0x00000000, 0x0C22DC2D, 0x00000000, 0x0492DC37, 0x0532D833, 0x00000000, 0x00000000, 0x04B30864, 0x05230059, 0x00000000, 0x00000000, 0x05C2D829, 0x0692E424, 0x00000000, 0x00000000, 0x0672FC4E, 0x0702F840, 0x00000000, 0x00000000, 0x07E2F026, 0x09630428, 0x00000000, 0x00000000, 0x07B2F433, 0x0913042E, 0x00000000, 0x00000000, 0x0AC3182A, 0x0BF32C2D, 0x00000000, 0x00000000, 0x0A93142E, 0x0C033031, 0x00000000, 0x00000000, 0x0C63142B, 0x00000000, 0x00000000, 0x00000000, 0x0C732031, 0x00000000, 0x00000000, 0x00000000, 0x0020588A, 0x0080348A, 0x0020788B, 0x00A0988D, 0x002074A0, 0x00A04C9D, 0x003098A6, 0x0090B8A9, 0x0200348E, 0x02F04C8D, 0x0180708A, 0x0300808A, 0x01803C9F, 0x02F050A1, 0x010084A3, 0x02C07CA3, 0x0410548D, 0x0520587E, 0x0410848B, 0x05207870, 0x03E068A1, 0x050070A3, 0x03D09CA5, 0x0510A0A7, 0x05D04C69, 0x06805064, 0x05F0705B, 0x06B0785A, 0x05F0789A, 0x06A07087, 0x06009C95, 0x06B0947D, 0x07205C66, 0x00000000, 0x0740845D, 0x00000000, 0x07306C80, 0x00000000, 0x07409877, 0x00000000, 0x0020C08D, 0x0090C092, 0x0061148C, 0x0081188F, 0x0020D8AB, 0x0080D8AE, 0x003140B0, 0x00812CB3, 0x0270FC84, 0x02E0D484, 0x02713487, 0x04915C7D, 0x02111CAA, 0x02B0F0A6, 0x01F13CAF, 0x039174A3, 0x0430DC81, 0x05A0DC61, 0x0611587B, 0x06A14859, 0x03F0F0A7, 0x0520F4A8, 0x04114CA3, 0x057158A2, 0x06A0D854, 0x0770DC51, 0x0811544D, 0x08E15842, 0x0620E88C, 0x0700E473, 0x06D14484, 0x07A13871, 0x07F0E053, 0x00000000, 0x0961583E, 0x00000000, 0x07A0E06F, 0x00000000, 0x08412C6D, 0x00000000, 0x00F1608B, 0x0121648B, 0x02B23497, 0x03023893, 0x009188B1, 0x00C18CB4, 0x0161E8B2, 0x0191E8B4, 0x02B18886, 0x0501CC7E, 0x04423C86, 0x0602306F, 0x01819CB2, 0x03D1BCAC, 0x0211F4B2, 0x047228AD, 0x08821487, 0x08D1E05B, 0x0782485F, 0x09424855, 0x0611DCA4, 0x07A1D8A0, 0x06C264A6, 0x0A928CA7, 0x0961F041, 0x0A41F83C, 0x0A32483C, 0x0B12643C, 0x07C1BC84, 0x08E1B476, 0x0A72748A, 0x0A926C6F, 0x0AB1F435, 0x00000000, 0x0B82602C, 0x00000000, 0x0961A46A, 0x00000000, 0x0B325061, 0x00000000, 0x03D2C09C, 0x0432B895, 0x0422F899, 0x0482F492, 0x02F2A0BD, 0x0372ACBD, 0x03E31CC0, 0x046320BD, 0x0512B088, 0x06E2A06E, 0x0562F489, 0x0712F078, 0x03F2C0B9, 0x0622DCB0, 0x04A324B9, 0x066320B0, 0x0802904F, 0x0992A03E, 0x0832E862, 0x0932E047, 0x07D2D8A0, 0x0972DC8D, 0x08031CA4, 0x0953108C, 0x0AC2B041, 0x0B82A842, 0x0AE2FC41, 0x0BF3003E, 0x0B22DC7E, 0x0BB2D064, 0x0AF30C69, 0x0C43145C, 0x0BE2A034, 0x00000000, 0x0C52EC3C, 0x00000000, 0x0C62C455, 0x00000000, 0x0CB3004F, 0x00000000, 0x04732089, 0x04D31C84, 0x00000000, 0x00000000, 0x046340AD, 0x04C340AA, 0x00000000, 0x00000000, 0x05F31C7B, 0x07431C70, 0x00000000, 0x00000000, 0x05333CA5, 0x06C33C9D, 0x00000000, 0x00000000, 0x08431861, 0x09030C4A, 0x00000000, 0x00000000, 0x07E33C97, 0x09333C8B, 0x00000000, 0x00000000, 0x0A63183D, 0x0BF33839, 0x00000000, 0x00000000, 0x0A632C67, 0x0C234051, 0x00000000, 0x00000000, 0x0C93283B, 0x00000000, 0x00000000, 0x00000000, 0x0CD33C52, 0x00000000, 0x00000000, 0x00000000, 0x002088B2, 0x00A05CAF, 0x0030B0B9, 0x0080CCBB, 0x0030A0C5, 0x00A084C1, 0x0030C4CC, 0x00A0E8CD, 0x01303CAD, 0x02D048B0, 0x00F0A0B5, 0x024070B2, 0x01304CBB, 0x02A058BF, 0x0100CCC8, 0x01B080C0, 0x03D070B2, 0x04D07CB3, 0x03B0A0B7, 0x04D0B0B9, 0x03C074C0, 0x04E08CC2, 0x0390A0C4, 0x04D0C4C7, 0x05D084B3, 0x06B08CB0, 0x05E0B0B8, 0x06C0B8B2, 0x05C08CC2, 0x06A098C2, 0x05C0C8C8, 0x06A0C8C8, 0x073090A6, 0x00000000, 0x0750BCA5, 0x00000000, 0x0750A8C2, 0x00000000, 0x0760D8C5, 0x00000000, 0x0020E8C0, 0x0070E8C2, 0x002144C5, 0x007128C8, 0x0020FCD0, 0x0080FCD2, 0x002148D6, 0x007134D7, 0x01B124C1, 0x02610CBC, 0x01713CC7, 0x03418CC1, 0x017134D1, 0x024128CC, 0x014154D7, 0x032190D3, 0x03A0ECBA, 0x04F100BD, 0x03C15CBD, 0x051154BF, 0x0340ECC7, 0x04E10CCB, 0x03A174CE, 0x04B14CCD, 0x05F0FCBE, 0x06C0F8B3, 0x060154C1, 0x06F144AF, 0x05D110CD, 0x06C108CC, 0x05F160D1, 0x06B150D0, 0x0750F8A2, 0x00000000, 0x07A1409C, 0x00000000, 0x076114C7, 0x00000000, 0x076150C9, 0x00000000, 0x00A1B8C9, 0x00C1ACCC, 0x014204CE, 0x016208D0, 0x00A1CCD9, 0x00B1B0DC, 0x016228DE, 0x01A238E2, 0x011194CD, 0x0341B4C9, 0x01C21CD1, 0x034238D0, 0x010198DD, 0x0301B8DB, 0x021244E4, 0x02E23CE4, 0x04F1F4C3, 0x0591C8BE, 0x058250CF, 0x08427CC2, 0x04B204D8, 0x0561D0D0, 0x051244E2, 0x06E27CDE, 0x0691C4C1, 0x0781ACAC, 0x09826CBF, 0x08E244AD, 0x0681C8D4, 0x0701B4D3, 0x07A25CD5, 0x081248D8, 0x0821989B, 0x00000000, 0x098218A1, 0x00000000, 0x0781A0CB, 0x00000000, 0x08921CCB, 0x00000000, 0x02226CCF, 0x027274D3, 0x0312D4D4, 0x0372E4D5, 0x01F270E2, 0x025280E5, 0x02A2B8E2, 0x0302C8E5, 0x02E280D3, 0x040294D2, 0x03F2F8D7, 0x04F314D6, 0x02E294E7, 0x0372B0E9, 0x0372D8E8, 0x03F2E8E9, 0x0652BCCF, 0x08F2F8C5, 0x077338D2, 0x092350C8, 0x05D2D0E9, 0x07B2ECE9, 0x064304E9, 0x08132CE8, 0x0C9308C4, 0x0C0304B6, 0x0AF358B7, 0x0CA360AF, 0x0A3308E0, 0x0B8300DD, 0x0AA370E2, 0x0ED38CE4, 0x0B72DC9F, 0x00000000, 0x0C933487, 0x00000000, 0x0A12C8CC, 0x00000000, 0x0DE37CD8, 0x00000000, 0x03F354D0, 0x046358CC, 0x00000000, 0x00000000, 0x035314E3, 0x03B324E5, 0x00000000, 0x00000000, 0x04D35CC9, 0x05935CC6, 0x00000000, 0x00000000, 0x042334E5, 0x04C344E5, 0x00000000, 0x00000000, 0x079364C1, 0x08E364BA, 0x00000000, 0x00000000, 0x06E360E5, 0x08937CE2, 0x00000000, 0x00000000, 0x09E358AE, 0x0B835083, 0x00000000, 0x00000000, 0x09A384DB, 0x0C43C4D6, 0x00000000, 0x00000000, 0x0D034057, 0x00000000, 0x00000000, 0x00000000, 0x0E33C0BF, 0x00000000, 0x00000000, 0x00000000, 0x0040C0D5, 0x00C0B8D2, 0x0030D8D9, 0x00B0FCDA, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x012070CA, 0x01F06CCB, 0x0110FCD8, 0x0150B0D0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x03B07CCE, 0x04C0A8D0, 0x033098CE, 0x0490D8D3, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x05C0B4D3, 0x0680B8D2, 0x05B0E4D6, 0x0690E8D6, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0750CCD4, 0x00000000, 0x0760F8D7, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x002108DC, 0x009114DD, 0x002150E0, 0x009144E0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x01313CDE, 0x02614CDA, 0x01015CE2, 0x02D194DF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02D108D3, 0x04610CD4, 0x03919CDB, 0x04214CD6, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x05B124D9, 0x06A128DA, 0x05D16CDB, 0x06B170DD, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x076130DA, 0x00000000, 0x077170DC, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0081C8E3, 0x0091A0E4, 0x017244E7, 0x019240EA, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x010190E5, 0x02B1B4E3, 0x01D230EB, 0x028218EA, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0441FCE3, 0x0511E8DD, 0x04922CE9, 0x068278E9, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0601BCDC, 0x0721D4E0, 0x073250DF, 0x085250E5, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x07C1C8DF, 0x00000000, 0x08B240E4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x021280E9, 0x027294EE, 0x02A2C0EB, 0x0312D4EE, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0302A8EF, 0x0372BCF1, 0x0392E4F0, 0x0412F8F1, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0552C8F0, 0x0742C8F0, 0x06131CF0, 0x085344F1, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x08C2F8EE, 0x0972E8E6, 0x09A35CF0, 0x0C537CF6, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0A12DCEA, 0x00000000, 0x0DB37CF6, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x031300EC, 0x03730CEF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x03F318F0, 0x045324F0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x05E340F1, 0x07E35CF1, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x091370F1, 0x0C23CCF7, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x11041107, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}; - -static uint32_t _calibration_decompander0_mem[] = {0, 32768, 65536, 98304, 131072, 163840, 196608, 229376, 262144, 294912, 327680, 360448, 393216, 425984, 458752, 491520, 524288, 557055, 589823, 622591, 655359, 688127, 720895, 753663, 786431, 819199, 851967, 884735, 917503, 950271, 983039, 1015807, 1048575}; -static uint32_t _calibration_decompander1_mem[] = {0, 4096, 8192, 12288, 16384, 20480, 24576, 28672, 32768, 36864, 40960, 45056, 49152, 53248, 57344, 61440, 65536, 69632, 73728, 77824, 81920, 86016, 90112, 94208, 98304, 102400, 106496, 110592, 114688, 118784, 122880, 126976, 131072, 135168, 139264, 143360, 147456, 151552, 155648, 159744, 163840, 167936, 172032, 176128, 180224, 184320, 188416, 192512, 196608, 200704, 204800, 208896, 212992, 217088, 221184, 225280, 229376, 233472, 237568, 241664, 245760, 249856, 253952, 258048, 262144, 266240, 270336, 274432, 278528, 282624, 286720, 290816, 294912, 299008, 303104, 307200, 311296, 315392, 319488, 323584, 327680, 331776, 335872, 339968, 344064, 348160, 352256, 356352, 360448, 364544, 368640, 372736, 376832, 380928, 385024, 389120, 393216, 397312, 401408, 405504, 409600, 413696, 417792, 421888, 425984, 430080, 434176, 438272, 442368, 446464, 450560, 454656, 458752, 462848, 466944, 471040, 475136, 479232, 483328, 487424, 491520, 495616, 499712, 503808, 507904, 512000, 516096, 520192, 524288, 528383, 532479, 536575, 540671, 544767, 548863, 552959, 557055, 561151, 565247, 569343, 573439, 577535, 581631, 585727, 589823, 593919, 598015, 602111, 606207, 610303, 614399, 618495, 622591, 626687, 630783, 634879, 638975, 643071, 647167, 651263, 655359, 659455, 663551, 667647, 671743, 675839, 679935, 684031, 688127, 692223, 696319, 700415, 704511, 708607, 712703, 716799, 720895, 724991, 729087, 733183, 737279, 741375, 745471, 749567, 753663, 757759, 761855, 765951, 770047, 774143, 778239, 782335, 786431, 790527, 794623, 798719, 802815, 806911, 811007, 815103, 819199, 823295, 827391, 831487, 835583, 839679, 843775, 847871, 851967, 856063, 860159, 864255, 868351, 872447, 876543, 880639, 884735, 888831, 892927, 897023, 901119, 905215, 909311, 913407, 917503, 921599, 925695, 929791, 933887, 937983, 942079, 946175, 950271, 954367, 958463, 962559, 966655, 970751, 974847, 978943, 983039, 987135, 991231, 995327, 999423, 1003519, 1007615, 1011711, 1015807, 1019903, 1023999, 1028095, 1032191, 1036287, 1040383, 1044479, 1048575}; - -// CALIBRATION_SHADING_RADIAL_R -static uint16_t _calibration_shading_radial_r[] = {4096, 4113, 4130, 4147, 4164, 4182, 4199, 4216, 4234, 4251, 4269, 4286, 4304, 4322, 4340, 4357, 4375, 4393, 4411, 4430, 4448, 4466, 4484, 4503, 4521, 4540, 4558, 4577, 4596, 4614, 4633, 4652, 4671, 4690, 4709, 4728, 4747, 4767, 4786, 4805, 4825, 4844, 4864, 4883, 4903, 4923, 4943, 4963, 4983, 5003, 5023, 5043, 5063, 5084, 5104, 5124, 5145, 5165, 5186, 5207, 5227, 5248, 5269, 5290, 5311, 5332, 5354, 5375, 5396, 5417, 5439, 5460, 5482, 5504, 5526, 5547, 5569, 5591, 5613, 5635, 5658, 5680, 5702, 5725, 5747, 5770, 5793, 5815, 5838, 5861, 5884, 5907, 5930, 5954, 5977, 6001, 6024, 6048, 6072, 6095, 6119, 6143, 6167, 6192, 6216, 6240, 6265, 6290, 6314, 6339, 6364, 6389, 6415, 6440, 6465, 6491, 6517, 6542, 6568, 6594, 6621, 6647, 6673, 6700, 6727, 6754, 6781, 6808, 6835}; - -// CALIBRATION_SHADING_RADIAL_G -static uint16_t _calibration_shading_radial_g[] = {4096, 4108, 4120, 4133, 4145, 4157, 4170, 4182, 4195, 4207, 4220, 4233, 4246, 4258, 4271, 4284, 4297, 4310, 4323, 4336, 4350, 4363, 4376, 4389, 4403, 4416, 4430, 4443, 4457, 4471, 4485, 4498, 4512, 4526, 4540, 4554, 4568, 4582, 4596, 4611, 4625, 4639, 4654, 4668, 4682, 4697, 4712, 4726, 4741, 4756, 4771, 4785, 4800, 4815, 4830, 4845, 4860, 4876, 4891, 4906, 4922, 4937, 4952, 4968, 4983, 4999, 5015, 5030, 5046, 5062, 5078, 5094, 5110, 5126, 5142, 5158, 5174, 5191, 5207, 5223, 5240, 5256, 5273, 5290, 5306, 5323, 5340, 5357, 5374, 5391, 5408, 5425, 5442, 5459, 5477, 5494, 5512, 5529, 5547, 5564, 5582, 5600, 5618, 5636, 5654, 5672, 5690, 5708, 5726, 5745, 5763, 5782, 5800, 5819, 5838, 5857, 5876, 5895, 5914, 5933, 5952, 5972, 5991, 6011, 6031, 6051, 6070, 6090, 6111}; - -// CALIBRATION_SHADING_RADIAL_B -static uint16_t _calibration_shading_radial_b[] = {4096, 4107, 4118, 4128, 4139, 4150, 4161, 4172, 4183, 4194, 4205, 4216, 4228, 4239, 4250, 4261, 4272, 4284, 4295, 4307, 4318, 4329, 4341, 4352, 4364, 4376, 4387, 4399, 4411, 4422, 4434, 4446, 4458, 4470, 4482, 4493, 4505, 4517, 4530, 4542, 4554, 4566, 4578, 4590, 4603, 4615, 4627, 4640, 4652, 4664, 4677, 4689, 4702, 4714, 4727, 4740, 4752, 4765, 4778, 4791, 4803, 4816, 4829, 4842, 4855, 4868, 4881, 4894, 4908, 4921, 4934, 4947, 4960, 4974, 4987, 5001, 5014, 5028, 5041, 5055, 5068, 5082, 5096, 5110, 5123, 5137, 5151, 5165, 5179, 5193, 5207, 5221, 5236, 5250, 5264, 5279, 5293, 5308, 5322, 5337, 5351, 5366, 5381, 5396, 5411, 5426, 5441, 5456, 5471, 5486, 5501, 5517, 5532, 5548, 5563, 5579, 5595, 5610, 5626, 5642, 5658, 5674, 5691, 5707, 5723, 5740, 5756, 5773, 5790}; - - -static LookupTable calibration_shading_radial_r = { .ptr = _calibration_shading_radial_r, .rows = 1, .cols = sizeof(_calibration_shading_radial_r) / sizeof(_calibration_shading_radial_r[0]), .width = sizeof(_calibration_shading_radial_r[0] ) }; -static LookupTable calibration_shading_radial_g = { .ptr = _calibration_shading_radial_g, .rows = 1, .cols = sizeof(_calibration_shading_radial_g) / sizeof(_calibration_shading_radial_g[0]), .width = sizeof(_calibration_shading_radial_g[0] ) }; -static LookupTable calibration_shading_radial_b = { .ptr = _calibration_shading_radial_b, .rows = 1, .cols = sizeof(_calibration_shading_radial_b) / sizeof(_calibration_shading_radial_b[0]), .width = sizeof(_calibration_shading_radial_b[0] ) }; -static LookupTable calibration_decompander0_mem = {.ptr = _calibration_decompander0_mem, .rows = 1, .cols = sizeof( _calibration_decompander0_mem ) / sizeof( _calibration_decompander0_mem[0] ), .width = sizeof( _calibration_decompander0_mem[0] )}; -static LookupTable calibration_decompander1_mem = {.ptr = _calibration_decompander1_mem, .rows = 1, .cols = sizeof( _calibration_decompander1_mem ) / sizeof( _calibration_decompander1_mem[0] ), .width = sizeof( _calibration_decompander1_mem[0] )}; - -static LookupTable calibration_awb_scene_presets = {.ptr = _calibration_awb_scene_presets, .cols = 2, .rows = sizeof( _calibration_awb_scene_presets ) / sizeof( _calibration_awb_scene_presets[0] ), .width = sizeof( _calibration_awb_scene_presets[0][0] )}; -static LookupTable calibration_light_src = {.ptr = _calibration_light_src, .cols = 2, .rows = sizeof( _calibration_light_src ) / sizeof( _calibration_light_src[0] ), .width = sizeof( _calibration_light_src[0][0] )}; -static LookupTable calibration_rg_pos = {.ptr = _calibration_rg_pos, .rows = 1, .cols = sizeof( _calibration_rg_pos ) / sizeof( _calibration_rg_pos[0] ), .width = sizeof( _calibration_rg_pos[0] )}; -static LookupTable calibration_bg_pos = {.ptr = _calibration_bg_pos, .rows = 1, .cols = sizeof( _calibration_bg_pos ) / sizeof( _calibration_bg_pos[0] ), .width = sizeof( _calibration_bg_pos[0] )}; -static LookupTable calibration_mesh_rgbg_weight = {.ptr = _calibration_mesh_rgbg_weight, .cols = 15, .rows = sizeof( _calibration_mesh_rgbg_weight ) / sizeof( _calibration_mesh_rgbg_weight[0] ), .width = sizeof( _calibration_mesh_rgbg_weight[0][0] )}; -static LookupTable calibration_mesh_ls_weight = {.ptr = _calibration_mesh_ls_weight, .cols = 15, .rows = sizeof( _calibration_mesh_ls_weight ) / sizeof( _calibration_mesh_ls_weight[0] ), .width = sizeof( _calibration_mesh_ls_weight[0][0] )}; -static LookupTable calibration_mesh_color_temperature = {.ptr = _calibration_mesh_color_temperature, .cols = 15, .rows = sizeof( _calibration_mesh_color_temperature ) / sizeof( _calibration_mesh_color_temperature[0] ), .width = sizeof( _calibration_mesh_color_temperature[0][0] )}; -static LookupTable calibration_wb_strength = {.ptr = _calibration_wb_strength, .rows = 1, .cols = sizeof( _calibration_wb_strength ) / sizeof( _calibration_wb_strength[0] ), .width = sizeof( _calibration_wb_strength[0] )}; -static LookupTable calibration_sky_lux_th = {.ptr = _calibration_sky_lux_th, .rows = 1, .cols = sizeof( _calibration_sky_lux_th ) / sizeof( _calibration_sky_lux_th[0] ), .width = sizeof( _calibration_sky_lux_th[0] )}; -static LookupTable calibration_ct_rg_pos_calc = {.ptr = _calibration_ct_rg_pos_calc, .rows = 1, .cols = sizeof( _calibration_ct_rg_pos_calc ) / sizeof( _calibration_ct_rg_pos_calc[0] ), .width = sizeof( _calibration_ct_rg_pos_calc[0] )}; -static LookupTable calibration_ct_bg_pos_calc = {.ptr = _calibration_ct_bg_pos_calc, .rows = 1, .cols = sizeof( _calibration_ct_bg_pos_calc ) / sizeof( _calibration_ct_bg_pos_calc[0] ), .width = sizeof( _calibration_ct_bg_pos_calc[0] )}; -static LookupTable calibration_color_temp = {.ptr = _calibration_color_temp, .rows = 1, .cols = sizeof( _calibration_color_temp ) / sizeof( _calibration_color_temp[0] ), .width = sizeof( _calibration_color_temp[0] )}; -static LookupTable calibration_ct65pos = {.ptr = _calibration_ct65pos, .rows = 1, .cols = sizeof( _calibration_ct65pos ) / sizeof( _calibration_ct65pos[0] ), .width = sizeof( _calibration_ct65pos[0] )}; -static LookupTable calibration_ct40pos = {.ptr = _calibration_ct40pos, .rows = 1, .cols = sizeof( _calibration_ct40pos ) / sizeof( _calibration_ct40pos[0] ), .width = sizeof( _calibration_ct40pos[0] )}; -static LookupTable calibration_ct30pos = {.ptr = _calibration_ct30pos, .rows = 1, .cols = sizeof( _calibration_ct30pos ) / sizeof( _calibration_ct30pos[0] ), .width = sizeof( _calibration_ct30pos[0] )}; -static LookupTable calibration_evtolux_ev_lut = {.ptr = _calibration_evtolux_ev_lut, .rows = 1, .cols = sizeof( _calibration_evtolux_ev_lut ) / sizeof( _calibration_evtolux_ev_lut[0] ), .width = sizeof( _calibration_evtolux_ev_lut[0] )}; -static LookupTable calibration_evtolux_lux_lut = {.ptr = _calibration_evtolux_lux_lut, .rows = 1, .cols = sizeof( _calibration_evtolux_lux_lut ) / sizeof( _calibration_evtolux_lux_lut[0] ), .width = sizeof( _calibration_evtolux_lux_lut[0] )}; -static LookupTable calibration_black_level_r = {.ptr = _calibration_black_level_r, .cols = 2, .rows = sizeof( _calibration_black_level_r ) / sizeof( _calibration_black_level_r[0] ), .width = sizeof( _calibration_black_level_r[0][0] )}; -static LookupTable calibration_black_level_gr = {.ptr = _calibration_black_level_gr, .cols = 2, .rows = sizeof( _calibration_black_level_gr ) / sizeof( _calibration_black_level_gr[0] ), .width = sizeof( _calibration_black_level_gr[0][0] )}; -static LookupTable calibration_black_level_gb = {.ptr = _calibration_black_level_gb, .cols = 2, .rows = sizeof( _calibration_black_level_gb ) / sizeof( _calibration_black_level_gb[0] ), .width = sizeof( _calibration_black_level_gb[0][0] )}; -static LookupTable calibration_black_level_b = {.ptr = _calibration_black_level_b, .cols = 2, .rows = sizeof( _calibration_black_level_b ) / sizeof( _calibration_black_level_b[0] ), .width = sizeof( _calibration_black_level_b[0][0] )}; -static LookupTable calibration_static_wb = {.ptr = _calibration_static_wb, .rows = 1, .cols = sizeof( _calibration_static_wb ) / sizeof( _calibration_static_wb[0] ), .width = sizeof( _calibration_static_wb[0] )}; -static LookupTable calibration_mt_absolute_ls_a_ccm = {.ptr = _calibration_mt_absolute_ls_a_ccm, .rows = 1, .cols = sizeof( _calibration_mt_absolute_ls_a_ccm ) / sizeof( _calibration_mt_absolute_ls_a_ccm[0] ), .width = sizeof( _calibration_mt_absolute_ls_a_ccm[0] )}; -static LookupTable calibration_mt_absolute_ls_d40_ccm = {.ptr = _calibration_mt_absolute_ls_d40_ccm, .rows = 1, .cols = sizeof( _calibration_mt_absolute_ls_d40_ccm ) / sizeof( _calibration_mt_absolute_ls_d40_ccm[0] ), .width = sizeof( _calibration_mt_absolute_ls_d40_ccm[0] )}; -static LookupTable calibration_mt_absolute_ls_d50_ccm = {.ptr = _calibration_mt_absolute_ls_d50_ccm, .rows = 1, .cols = sizeof( _calibration_mt_absolute_ls_d50_ccm ) / sizeof( _calibration_mt_absolute_ls_d50_ccm[0] ), .width = sizeof( _calibration_mt_absolute_ls_d50_ccm[0] )}; -static LookupTable calibration_shading_ls_a_r = {.ptr = _calibration_shading_ls_a_r, .rows = 1, .cols = sizeof( _calibration_shading_ls_a_r ) / sizeof( _calibration_shading_ls_a_r[0] ), .width = sizeof( _calibration_shading_ls_a_r[0] )}; -static LookupTable calibration_shading_ls_a_g = {.ptr = _calibration_shading_ls_a_g, .rows = 1, .cols = sizeof( _calibration_shading_ls_a_g ) / sizeof( _calibration_shading_ls_a_g[0] ), .width = sizeof( _calibration_shading_ls_a_g[0] )}; -static LookupTable calibration_shading_ls_a_b = {.ptr = _calibration_shading_ls_a_b, .rows = 1, .cols = sizeof( _calibration_shading_ls_a_b ) / sizeof( _calibration_shading_ls_a_b[0] ), .width = sizeof( _calibration_shading_ls_a_b[0] )}; -static LookupTable calibration_shading_ls_tl84_r = {.ptr = _calibration_shading_ls_tl84_r, .rows = 1, .cols = sizeof( _calibration_shading_ls_tl84_r ) / sizeof( _calibration_shading_ls_tl84_r[0] ), .width = sizeof( _calibration_shading_ls_tl84_r[0] )}; -static LookupTable calibration_shading_ls_tl84_g = {.ptr = _calibration_shading_ls_tl84_g, .rows = 1, .cols = sizeof( _calibration_shading_ls_tl84_g ) / sizeof( _calibration_shading_ls_tl84_g[0] ), .width = sizeof( _calibration_shading_ls_tl84_g[0] )}; -static LookupTable calibration_shading_ls_tl84_b = {.ptr = _calibration_shading_ls_tl84_b, .rows = 1, .cols = sizeof( _calibration_shading_ls_tl84_b ) / sizeof( _calibration_shading_ls_tl84_b[0] ), .width = sizeof( _calibration_shading_ls_tl84_b[0] )}; -static LookupTable calibration_shading_ls_d65_r = {.ptr = _calibration_shading_ls_d65_r, .rows = 1, .cols = sizeof( _calibration_shading_ls_d65_r ) / sizeof( _calibration_shading_ls_d65_r[0] ), .width = sizeof( _calibration_shading_ls_d65_r[0] )}; -static LookupTable calibration_shading_ls_d65_g = {.ptr = _calibration_shading_ls_d65_g, .rows = 1, .cols = sizeof( _calibration_shading_ls_d65_g ) / sizeof( _calibration_shading_ls_d65_g[0] ), .width = sizeof( _calibration_shading_ls_d65_g[0] )}; -static LookupTable calibration_shading_ls_d65_b = {.ptr = _calibration_shading_ls_d65_b, .rows = 1, .cols = sizeof( _calibration_shading_ls_d65_b ) / sizeof( _calibration_shading_ls_d65_b[0] ), .width = sizeof( _calibration_shading_ls_d65_b[0] )}; -static LookupTable calibration_awb_warming_ls_a = {.ptr = _calibration_awb_warming_ls_a, .rows = 1, .cols = sizeof( _calibration_awb_warming_ls_a ) / sizeof( _calibration_awb_warming_ls_a[0] ), .width = sizeof( _calibration_awb_warming_ls_a[0] )}; -static LookupTable calibration_awb_warming_ls_d50 = {.ptr = _calibration_awb_warming_ls_d50, .rows = 1, .cols = sizeof( _calibration_awb_warming_ls_d50 ) / sizeof( _calibration_awb_warming_ls_d50[0] ), .width = sizeof( _calibration_awb_warming_ls_d50[0] )}; -static LookupTable calibration_awb_warming_ls_d75 = {.ptr = _calibration_awb_warming_ls_d75, .rows = 1, .cols = sizeof( _calibration_awb_warming_ls_d75 ) / sizeof( _calibration_awb_warming_ls_d75[0] ), .width = sizeof( _calibration_awb_warming_ls_d75[0] )}; -static LookupTable calibration_noise_profile = {.ptr = _calibration_noise_profile, .rows = 1, .cols = sizeof( _calibration_noise_profile ) / sizeof( _calibration_noise_profile[0] ), .width = sizeof( _calibration_noise_profile[0] )}; -static LookupTable calibration_demosaic = {.ptr = _calibration_demosaic, .rows = 1, .cols = sizeof( _calibration_demosaic ) / sizeof( _calibration_demosaic[0] ), .width = sizeof( _calibration_demosaic[0] )}; -static LookupTable calibration_wdr_np_lut = {.ptr = _calibration_wdr_np_lut, .rows = 1, .cols = sizeof( _calibration_wdr_np_lut ) / sizeof( _calibration_wdr_np_lut[0] ), .width = sizeof( _calibration_wdr_np_lut[0] )}; -static LookupTable calibration_gamma = {.ptr = _calibration_gamma, .rows = 1, .cols = sizeof( _calibration_gamma ) / sizeof( _calibration_gamma[0] ), .width = sizeof( _calibration_gamma[0] )}; -static LookupTable calibration_iridix_asymmetry = {.ptr = _calibration_iridix_asymmetry, .rows = 1, .cols = sizeof( _calibration_iridix_asymmetry ) / sizeof( _calibration_iridix_asymmetry[0] ), .width = sizeof( _calibration_iridix_asymmetry[0] )}; -static LookupTable calibration_ca_filter_mem = {.ptr = _calibration_ca_filter_mem, .rows = 1, .cols = sizeof( _calibration_ca_filter_mem ) / sizeof( _calibration_ca_filter_mem[0] ), .width = sizeof( _calibration_ca_filter_mem[0] )}; -static LookupTable calibration_ca_correction = {.ptr = _calibration_ca_correction, .rows = 1, .cols = sizeof( _calibration_ca_correction ) / sizeof( _calibration_ca_correction[0] ), .width = sizeof( _calibration_ca_correction[0] )}; -static LookupTable calibration_ca_correction_mem = {.ptr = _calibration_ca_correction_mem, .cols = 10, .rows = sizeof( _calibration_ca_correction_mem ) / sizeof( _calibration_ca_correction_mem[0] ), .width = sizeof( _calibration_ca_correction_mem[0] )}; -static LookupTable calibration_lut3d_mem = {.ptr = _calibration_lut3d_mem, .rows = 1, .cols = sizeof( _calibration_lut3d_mem ) / sizeof( _calibration_lut3d_mem[0] ), .width = sizeof( _calibration_lut3d_mem[0] )}; - -uint32_t get_calibrations_static_fs_lin_os08a10( ACameraCalibrations *c ) -{ - uint32_t result = 0; - if ( c != 0 ) { - c->calibrations[CALIBRATION_SHADING_RADIAL_R] = &calibration_shading_radial_r; - c->calibrations[CALIBRATION_SHADING_RADIAL_G] = &calibration_shading_radial_g; - c->calibrations[CALIBRATION_SHADING_RADIAL_B] = &calibration_shading_radial_b; - c->calibrations[CALIBRATION_DECOMPANDER0_MEM] = &calibration_decompander0_mem; - c->calibrations[CALIBRATION_DECOMPANDER1_MEM] = &calibration_decompander1_mem; - c->calibrations[CALIBRATION_LIGHT_SRC] = &calibration_light_src; - c->calibrations[CALIBRATION_RG_POS] = &calibration_rg_pos; - c->calibrations[CALIBRATION_BG_POS] = &calibration_bg_pos; - c->calibrations[CALIBRATION_MESH_RGBG_WEIGHT] = &calibration_mesh_rgbg_weight; - c->calibrations[CALIBRATION_MESH_LS_WEIGHT] = &calibration_mesh_ls_weight; - c->calibrations[CALIBRATION_MESH_COLOR_TEMPERATURE] = &calibration_mesh_color_temperature; - c->calibrations[CALIBRATION_WB_STRENGTH] = &calibration_wb_strength; - c->calibrations[CALIBRATION_SKY_LUX_TH] = &calibration_sky_lux_th; - c->calibrations[CALIBRATION_CT_RG_POS_CALC] = &calibration_ct_rg_pos_calc; - c->calibrations[CALIBRATION_CT_BG_POS_CALC] = &calibration_ct_bg_pos_calc; - c->calibrations[CALIBRATION_COLOR_TEMP] = &calibration_color_temp; - c->calibrations[CALIBRATION_CT65POS] = &calibration_ct65pos; - c->calibrations[CALIBRATION_CT40POS] = &calibration_ct40pos; - c->calibrations[CALIBRATION_CT30POS] = &calibration_ct30pos; - c->calibrations[CALIBRATION_EVTOLUX_EV_LUT] = &calibration_evtolux_ev_lut; - c->calibrations[CALIBRATION_EVTOLUX_LUX_LUT] = &calibration_evtolux_lux_lut; - c->calibrations[CALIBRATION_BLACK_LEVEL_R] = &calibration_black_level_r; - c->calibrations[CALIBRATION_BLACK_LEVEL_GR] = &calibration_black_level_gr; - c->calibrations[CALIBRATION_BLACK_LEVEL_GB] = &calibration_black_level_gb; - c->calibrations[CALIBRATION_BLACK_LEVEL_B] = &calibration_black_level_b; - c->calibrations[CALIBRATION_STATIC_WB] = &calibration_static_wb; - c->calibrations[CALIBRATION_MT_ABSOLUTE_LS_A_CCM] = &calibration_mt_absolute_ls_a_ccm; - c->calibrations[CALIBRATION_MT_ABSOLUTE_LS_D40_CCM] = &calibration_mt_absolute_ls_d40_ccm; - c->calibrations[CALIBRATION_MT_ABSOLUTE_LS_D50_CCM] = &calibration_mt_absolute_ls_d50_ccm; - c->calibrations[CALIBRATION_SHADING_LS_A_R] = &calibration_shading_ls_a_r; - c->calibrations[CALIBRATION_SHADING_LS_A_G] = &calibration_shading_ls_a_g; - c->calibrations[CALIBRATION_SHADING_LS_A_B] = &calibration_shading_ls_a_b; - c->calibrations[CALIBRATION_SHADING_LS_TL84_R] = &calibration_shading_ls_tl84_r; - c->calibrations[CALIBRATION_SHADING_LS_TL84_G] = &calibration_shading_ls_tl84_g; - c->calibrations[CALIBRATION_SHADING_LS_TL84_B] = &calibration_shading_ls_tl84_b; - c->calibrations[CALIBRATION_SHADING_LS_D65_R] = &calibration_shading_ls_d65_r; - c->calibrations[CALIBRATION_SHADING_LS_D65_G] = &calibration_shading_ls_d65_g; - c->calibrations[CALIBRATION_SHADING_LS_D65_B] = &calibration_shading_ls_d65_b; - c->calibrations[CALIBRATION_AWB_WARMING_LS_A] = &calibration_awb_warming_ls_a; - c->calibrations[CALIBRATION_AWB_WARMING_LS_D50] = &calibration_awb_warming_ls_d50; - c->calibrations[CALIBRATION_AWB_WARMING_LS_D75] = &calibration_awb_warming_ls_d75; - c->calibrations[CALIBRATION_NOISE_PROFILE] = &calibration_noise_profile; - c->calibrations[CALIBRATION_DEMOSAIC] = &calibration_demosaic; - c->calibrations[CALIBRATION_WDR_NP_LUT] = &calibration_wdr_np_lut; - c->calibrations[CALIBRATION_GAMMA] = &calibration_gamma; - c->calibrations[CALIBRATION_IRIDIX_ASYMMETRY] = &calibration_iridix_asymmetry; - c->calibrations[CALIBRATION_AWB_SCENE_PRESETS] = &calibration_awb_scene_presets; - c->calibrations[CALIBRATION_CA_FILTER_MEM] = &calibration_ca_filter_mem; - c->calibrations[CALIBRATION_CA_CORRECTION] = &calibration_ca_correction; - c->calibrations[CALIBRATION_CA_CORRECTION_MEM] = &calibration_ca_correction_mem; - c->calibrations[CALIBRATION_LUT3D_MEM] = &calibration_lut3d_mem; - } else { - result = -1; - } - return result; -} diff --git a/unionpi_tiger/kernel/drivers/isp/drivers/subdev/iq/src/calibration/acamera_calibrations_static_fs_lin_os08a10_ipc.c b/unionpi_tiger/kernel/drivers/isp/drivers/subdev/iq/src/calibration/acamera_calibrations_static_fs_lin_os08a10_ipc.c deleted file mode 100644 index a00bc7f..0000000 --- a/unionpi_tiger/kernel/drivers/isp/drivers/subdev/iq/src/calibration/acamera_calibrations_static_fs_lin_os08a10_ipc.c +++ /dev/null @@ -1,370 +0,0 @@ -/* -* -* SPDX-License-Identifier: GPL-2.0 -* -* Copyright (C) 2011-2018 ARM or its affiliates -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; version 2. -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. -* You should have received a copy of the GNU General Public License along -* with this program; if not, write to the Free Software Foundation, Inc., -* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -* -*/ - -#include "acamera_command_api.h" -//#include "acamera_firmware_api.h" -#include "acamera_firmware_settings.h" -// created from 2016-10-19T16:42:58.865Z UTClinear.json - -// CALIBRATION_LIGHT_SRC -static uint16_t _calibration_light_src[][2] = { - {285,234}}; - -// CALIBRATION_RG_POS -static uint16_t _calibration_rg_pos[] = {164,179,195,212,228,245,256,278,294,311,327,344,360,377,412}; - -// CALIBRATION_BG_POS -static uint16_t _calibration_bg_pos[] = {128,148,162,177,191,206,220,235,256,264,278,293,307,322,350}; - -// CALIBRATION_MESH_RGBG_WEIGHT -static uint16_t _calibration_mesh_rgbg_weight[][15] = { - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 9, 61 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 25, 104, 256, 256 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 38, 152, 256, 256, 20 }, - { 0, 0, 0, 0, 0, 0, 0, 1, 8, 53, 189, 256, 256, 122, 0 }, - { 0, 0, 0, 0, 0, 0, 1, 11, 59, 210, 256, 256, 178, 15, 0 }, - { 0, 0, 0, 0, 0, 2, 9, 87, 233, 256, 256, 168, 29, 1, 0 }, - { 0, 0, 0, 0, 1, 17, 62, 256, 256, 256, 181, 31, 2, 0, 0 }, - { 0, 0, 0, 1, 14, 122, 256, 256, 256, 165, 33, 2, 0, 0, 0 }, - { 0, 0, 1, 29, 200, 256, 256, 256, 88, 12, 1, 0, 0, 0, 0 }, - { 0, 0, 5, 90, 256, 256, 256, 152, 30, 3, 0, 0, 0, 0, 0 }, - { 0, 0, 43, 256, 256, 256, 184, 22, 2, 0, 0, 0, 0, 0, 0 }, - { 0, 7, 256, 256, 244, 61, 18, 1, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 46, 256, 256, 37, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 1, 256, 256, 24, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 33, 256, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }}; - -// CALIBRATION_MESH_LS_WEIGHT -static uint16_t _calibration_mesh_ls_weight[][15] = { - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 3, 4, 25, 42, 53, 57, 53, 42, 25, 4, 3, 0, 0 }, - { 0, 0, 4, 131, 157, 179, 193, 198, 193, 179, 157, 131, 4, 0, 0 }, - { 0, 0, 25, 157, 188, 214, 232, 238, 232, 214, 188, 157, 25, 0, 0 }, - { 0, 0, 42, 179, 214, 243, 255, 256, 255, 243, 214, 179, 42, 0, 0 }, - { 0, 0, 53, 193, 232, 255, 256, 256, 256, 255, 232, 193, 53, 0, 0 }, - { 0, 0, 57, 198, 238, 256, 256, 256, 256, 256, 238, 198, 57, 0, 0 }, - { 0, 0, 53, 193, 232, 255, 256, 256, 256, 255, 232, 193, 53, 0, 0 }, - { 0, 0, 42, 179, 214, 243, 255, 256, 255, 243, 214, 179, 42, 0, 0 }, - { 0, 0, 25, 157, 188, 214, 232, 238, 232, 214, 188, 157, 25, 0, 0 }, - { 0, 0, 4, 131, 157, 179, 193, 198, 193, 179, 157, 131, 4, 0, 0 }, - { 0, 0, 3, 4, 25, 42, 53, 57, 53, 42, 25, 4, 3, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }}; - -// CALIBRATION_MESH_COLOR_TEMPERATURE -static uint16_t _calibration_mesh_color_temperature[][15] = { - { 211, 225, 240, 250, 266, 281, 291, 310, 324, 336, 346, 357, 370, 385, 385 }, - { 191, 210, 225, 241, 250, 267, 277, 296, 310, 325, 336, 347, 358, 372, 385 }, - { 183, 194, 214, 230, 245, 253, 267, 286, 300, 315, 328, 340, 350, 363, 385 }, - { 174, 186, 203, 219, 234, 250, 253, 275, 289, 304, 318, 333, 343, 354, 385 }, - { 166, 178, 190, 208, 223, 239, 249, 265, 279, 294, 308, 323, 336, 347, 385 }, - { 158, 169, 181, 194, 211, 227, 238, 254, 268, 283, 297, 312, 326, 339, 364 }, - { 154, 161, 174, 186, 199, 217, 227, 248, 258, 273, 287, 302, 316, 331, 355 }, - { 154, 154, 165, 178, 190, 205, 216, 236, 251, 262, 276, 291, 305, 320, 347 }, - { 140, 149, 154, 166, 178, 191, 200, 220, 235, 253, 261, 276, 290, 305, 336 }, - { 135, 144, 154, 162, 174, 187, 195, 214, 229, 245, 260, 270, 284, 299, 330 }, - { 132, 135, 145, 154, 166, 179, 187, 203, 218, 234, 253, 260, 274, 289, 320 }, - { 122, 129, 135, 145, 157, 170, 179, 195, 207, 223, 238, 257, 264, 278, 309 }, - { 112, 119, 126, 136, 146, 162, 171, 187, 200, 212, 227, 243, 260, 268, 299 }, - { 102, 109, 116, 124, 136, 147, 162, 179, 191, 201, 216, 232, 255, 260, 288 }, - { 100, 100, 100, 100, 112, 120, 125, 163, 175, 188, 200, 210, 225, 242, 268 }}; - -// RG, BG, MULT. final wb gain adjuster for a sky scene. devided by CALIBRATION_WB_STRENGTH_MULT in use -static uint16_t _calibration_wb_strength[] = {1000, 1000, 1000}; - -// lux threshold for sky -static uint16_t _calibration_sky_lux_th[] = {10000}; - -// 1D rg/bg readout from color_temp -static uint16_t _calibration_ct_rg_pos_calc[] = {179,202,218,256,289,298,349,371,393}; - -// 1D rg/bg readout from color_temp -static uint16_t _calibration_ct_bg_pos_calc[] = {335,302,286,256,230,223,183,165,148}; - -// CALIBRATION_COLOR_TEMP -static uint16_t _calibration_color_temp[] = {100,133,154,200,250,260,333,357,385}; - -// CALIBRATION_CT65POS -static uint16_t _calibration_ct65pos[] = {2}; - -// CALIBRATION_CT40POS -static uint16_t _calibration_ct40pos[] = {8}; - -// CALIBRATION_CT30POS -static uint16_t _calibration_ct30pos[] = {6}; - -// CALIBRATION_EVTOLUX_EV_LUT -static uint32_t _calibration_evtolux_ev_lut[] //evlog2 - = {398775, 444491, 477818, 528405, 620780, 744998, 821797, 1051295, 1308509, 1373840, 1436952, 1573912, 1656816, 1918045, 2075972, 2322504, 2494615}; - -// CALIBRATION_EVTOLUX_LUX_LUT -static uint32_t _calibration_evtolux_lux_lut[] = {20000, 18000, 16000, 14000, 12000, 10100, 8900, 5120, 2560, 2080, 1800, 1200, 1000, 500, 320, 160, 100}; - - -// CALIBRATION_BLACK_LEVEL_R -static uint16_t _calibration_black_level_r[][2] = { - {0, 256}, - {32, 256}, - {64, 256}, - {96, 256}, - {128, 256}}; - -// CALIBRATION_BLACK_LEVEL_GR -static uint16_t _calibration_black_level_gr[][2] = { - {0, 256}, - {32, 256}, - {64, 256}, - {96, 256}, - {128, 256}}; - -// CALIBRATION_BLACK_LEVEL_GB -static uint16_t _calibration_black_level_gb[][2] = { - {0, 256}, - {32, 256}, - {64, 256}, - {96, 256}, - {128, 256}}; - -// CALIBRATION_BLACK_LEVEL_B -static uint16_t _calibration_black_level_b[][2] = { - {0, 256}, - {32, 256}, - {64, 256}, - {96, 256}, - {128, 256}}; - -// CALIBRATION_STATIC_WB -static uint16_t _calibration_static_wb[] = {490,256,256,470}; -// RR RG RB GR GG GB BR BG BB -static uint16_t _calibration_mt_absolute_ls_a_ccm[] = {410, 32869, 32821, 32888, 458, 32850, 29, 33005, 464}; - -// RR RG RB GR GG GB BR BG BB -static uint16_t _calibration_mt_absolute_ls_d40_ccm[] = {410, 32881, 32809, 32868, 449, 32861, 23, 32963, 428}; - -// RR RG RB GR GG GB BR BG BB -static uint16_t _calibration_mt_absolute_ls_d50_ccm[] = {413, 32888, 32805, 32857, 443, 32866, 20, 32949, 417}; - -// CALIBRATION_SHADING_LS_A_R -static uint8_t _calibration_shading_ls_a_r[] = {117,72,53,46,42,41,39,38,37,37,36,36,36,35,35,35,35,36,36,36,37,37,38,38,39,40,42,45,47,51,59,74,97,67,53,45,42,40,39,38,37,36,36,36,35,35,35,35,35,35,36,36,36,37,37,38,39,40,42,44,46,50,58,68,83,61,49,43,41,39,38,37,37,36,36,35,35,35,35,35,35,35,35,36,36,37,37,38,38,40,41,43,45,48,54,61,74,57,47,42,40,39,38,37,36,36,35,35,35,34,34,34,35,35,35,35,36,36,37,38,38,39,40,42,45,47,52,58,66,53,45,42,40,38,37,37,36,35,35,35,34,34,34,34,34,35,35,35,36,36,37,37,38,39,40,42,44,47,50,55,61,51,43,41,39,38,37,36,36,35,35,34,34,34,34,34,34,34,34,35,35,36,36,37,38,38,39,41,43,46,49,53,56,48,43,41,39,38,37,36,35,35,34,34,34,34,34,34,34,34,34,35,35,36,36,37,37,38,39,41,43,45,49,53,52,47,42,40,39,38,37,36,35,35,34,34,34,33,33,33,34,34,34,34,35,35,36,36,37,38,39,40,42,45,48,51,50,45,42,40,38,37,37,36,35,34,34,34,33,33,33,33,33,34,34,34,34,35,36,36,37,38,38,40,42,44,47,51,48,44,41,40,38,37,36,36,35,34,34,33,33,33,33,33,33,33,33,34,34,35,35,36,37,37,38,40,41,44,47,50,47,44,41,39,38,37,36,35,35,34,34,33,33,33,33,33,33,33,33,34,34,35,35,36,36,37,38,39,41,43,46,50,46,43,41,39,38,37,36,35,35,34,34,33,33,33,32,33,33,33,33,34,34,35,35,36,36,37,38,39,41,43,46,49,46,43,41,39,38,37,36,35,35,34,33,33,33,32,32,32,32,33,33,33,34,34,35,36,36,37,38,39,41,43,46,49,45,43,41,39,38,37,36,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,37,38,39,41,43,46,49,45,43,40,39,38,37,36,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,37,38,39,41,43,45,49,45,43,41,39,38,37,36,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,37,38,39,40,43,46,49,45,43,41,39,38,37,36,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,37,38,39,40,43,46,49,45,43,41,39,38,37,36,35,34,34,34,33,33,32,32,32,32,33,33,33,34,34,35,35,37,37,38,39,41,43,46,49,45,43,41,39,38,37,36,35,35,34,33,33,33,32,32,32,32,33,33,33,34,34,35,36,36,37,38,39,41,43,46,49,45,43,41,39,38,37,36,35,35,34,34,33,33,33,32,32,33,33,33,33,34,34,35,36,37,37,38,39,41,43,46,50,46,43,41,39,38,37,36,35,35,34,34,33,33,33,33,33,33,33,33,34,34,35,35,36,37,37,38,39,41,44,47,50,46,44,42,40,38,37,36,36,35,34,34,34,33,33,33,33,33,33,33,34,34,35,35,36,37,37,38,40,42,44,47,51,47,44,42,40,39,37,37,36,35,35,34,34,33,33,33,33,33,33,34,34,34,35,36,36,37,38,39,40,42,44,48,51,48,45,42,40,39,38,37,36,35,35,34,34,34,33,33,33,33,34,34,34,35,35,36,36,37,38,39,40,43,45,48,52,49,46,43,41,39,38,37,36,36,35,35,34,34,34,34,34,34,34,34,34,35,35,36,37,37,38,39,41,43,46,49,53,51,47,43,41,40,38,37,37,36,35,35,34,34,34,34,34,34,34,34,35,35,35,36,37,37,38,40,41,44,46,50,54,53,48,44,42,40,39,38,37,36,36,35,35,34,34,34,34,34,35,35,35,35,36,36,37,38,39,40,42,44,47,51,55,57,50,45,43,41,39,38,37,36,36,36,35,35,35,34,34,35,35,35,35,36,36,37,37,38,39,41,43,45,48,52,56,61,52,46,43,41,40,38,38,37,36,36,35,35,35,35,35,35,35,35,35,36,37,37,38,39,40,42,43,46,49,53,58,68,56,47,44,42,40,39,38,37,37,36,36,36,35,35,35,35,35,36,36,36,37,38,38,39,40,42,44,47,50,55,60,77,60,49,45,43,41,40,39,38,37,37,36,36,36,36,36,36,36,36,36,37,37,38,39,40,41,43,45,48,52,57,64,86,61,51,46,44,42,40,39,38,38,37,37,36,36,36,36,36,36,36,37,37,38,38,39,40,42,44,47,49,53,59,68}; - -// CALIBRATION_SHADING_LS_A_G -static uint8_t _calibration_shading_ls_a_g[] = {100,66,50,43,40,39,38,37,36,36,36,35,35,35,35,35,35,35,35,36,36,36,37,37,38,39,41,43,45,48,55,68,86,62,49,42,40,38,37,37,36,36,35,35,35,35,35,35,35,35,35,35,36,36,37,37,38,39,40,42,44,47,54,63,75,57,46,41,39,38,37,36,36,35,35,35,35,34,34,34,35,35,35,35,36,36,36,37,37,38,40,41,43,46,51,56,67,53,44,40,39,38,37,36,36,35,35,35,34,34,34,34,34,34,35,35,35,36,36,37,37,38,39,41,43,45,49,54,61,50,43,40,38,37,36,36,35,35,35,34,34,34,34,34,34,34,34,35,35,36,36,36,37,38,39,40,42,45,48,51,56,48,41,39,38,37,36,36,35,35,34,34,34,34,34,34,34,34,34,35,35,35,36,36,37,37,38,40,41,44,47,50,52,46,41,39,38,37,36,35,35,34,34,34,34,33,33,33,34,34,34,34,35,35,36,36,37,37,38,39,41,43,46,49,49,44,40,39,37,37,36,35,35,34,34,34,33,33,33,33,33,33,34,34,34,35,35,36,36,37,38,39,41,43,45,48,47,43,40,38,37,36,36,35,34,34,34,33,33,33,33,33,33,33,33,34,34,35,35,36,36,37,38,39,40,42,45,48,46,42,40,38,37,36,36,35,34,34,34,33,33,33,33,33,33,33,33,34,34,35,35,36,36,37,37,39,40,42,45,47,45,42,39,38,37,36,35,35,34,34,33,33,33,33,33,33,33,33,33,34,34,34,35,35,36,37,37,38,40,42,44,47,44,41,39,38,37,36,35,35,34,34,33,33,33,33,32,32,33,33,33,33,34,34,35,35,36,36,37,38,40,41,44,47,43,41,39,38,37,36,35,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,36,37,38,39,41,44,46,43,41,39,38,37,36,35,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,36,37,38,39,41,44,46,43,41,39,38,37,36,35,35,34,34,33,33,33,32,32,32,32,32,33,33,34,34,35,35,36,36,37,38,39,41,44,46,43,41,39,38,37,36,35,35,34,34,33,33,32,32,32,32,32,32,33,33,34,34,34,35,36,36,37,38,39,41,44,46,43,41,39,38,37,36,35,35,34,34,33,33,33,32,32,32,32,32,33,33,34,34,34,35,36,36,37,38,39,41,44,46,43,41,39,38,37,36,35,35,34,34,33,33,33,32,32,32,32,32,33,33,34,34,35,35,36,36,37,38,40,41,44,46,43,41,39,38,37,36,35,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,36,37,38,40,41,44,47,43,41,39,38,37,36,35,35,34,34,33,33,33,33,32,32,33,33,33,33,34,34,35,35,36,37,37,38,40,42,44,47,44,42,40,38,37,36,36,35,34,34,34,33,33,33,33,33,33,33,33,33,34,34,35,35,36,37,37,39,40,42,44,47,44,42,40,38,37,36,36,35,35,34,34,33,33,33,33,33,33,33,33,34,34,35,35,36,36,37,38,39,40,42,45,48,45,42,40,39,37,37,36,35,35,34,34,34,33,33,33,33,33,33,34,34,34,35,35,36,36,37,38,39,41,43,45,48,46,43,41,39,38,37,36,35,35,35,34,34,34,33,33,33,33,34,34,34,34,35,35,36,36,37,38,39,41,43,46,49,47,44,41,39,38,37,36,36,35,35,35,34,34,34,34,34,34,34,34,34,35,35,35,36,37,37,38,40,42,44,46,50,48,44,41,40,38,37,37,36,35,35,35,34,34,34,34,34,34,34,34,34,35,35,36,36,37,38,39,40,42,44,47,51,50,46,42,40,39,38,37,36,36,35,35,35,34,34,34,34,34,35,34,35,35,36,36,37,37,38,39,41,43,45,48,52,53,47,43,41,39,38,37,37,36,36,35,35,35,34,34,34,35,34,35,35,35,36,36,37,37,38,40,41,43,46,49,53,57,50,44,41,40,39,38,37,36,36,36,35,35,35,35,35,35,35,35,35,36,36,37,37,38,39,40,42,44,47,50,55,62,52,45,42,40,39,38,37,37,36,36,36,35,35,35,35,35,35,35,36,36,36,37,38,38,39,41,43,45,48,52,57,70,56,46,43,41,40,39,38,37,37,36,36,36,35,35,35,35,36,36,36,36,37,37,38,39,40,42,44,46,49,54,60,77,57,47,43,42,40,39,38,37,37,37,36,36,36,36,36,36,36,36,36,37,37,38,38,39,41,42,44,47,50,55,63}; - -// CALIBRATION_SHADING_LS_A_B -static uint8_t _calibration_shading_ls_a_b[] = {97,65,50,43,40,38,37,36,36,35,35,35,35,35,34,35,35,35,35,35,36,36,37,37,38,39,41,42,44,47,55,66,83,61,49,42,40,38,37,36,36,35,35,35,35,34,34,35,35,35,35,35,36,36,37,37,38,39,40,42,44,47,54,61,74,57,46,41,39,38,37,36,36,35,35,35,34,34,34,34,34,35,35,35,36,36,36,37,37,39,40,41,43,46,50,55,66,53,44,40,39,38,37,36,35,35,35,34,34,34,34,34,34,34,35,35,36,36,36,37,37,38,39,41,43,45,48,53,60,50,42,40,38,37,37,36,35,35,34,34,34,34,34,34,34,34,34,35,35,36,36,37,37,38,39,40,42,44,47,51,55,47,41,39,38,37,36,35,35,35,34,34,34,33,34,34,34,34,34,35,35,35,36,37,37,38,39,40,42,44,47,49,51,45,41,39,38,37,36,35,35,34,34,34,33,33,33,33,34,34,34,35,35,35,36,36,37,38,38,39,41,43,46,49,49,44,40,39,37,37,36,35,35,34,34,34,33,33,33,33,34,34,34,34,35,35,36,36,37,37,38,39,41,43,45,48,46,43,40,38,38,37,36,35,34,34,34,33,33,33,33,33,33,33,34,34,35,35,35,36,37,37,38,39,40,42,45,47,45,42,40,38,37,36,36,35,34,34,33,33,33,33,33,33,33,33,34,34,34,35,35,36,37,37,38,39,40,42,44,47,44,41,39,38,37,36,35,35,34,34,33,33,33,33,33,33,33,33,33,34,34,35,35,36,36,37,38,38,40,42,44,46,43,41,39,38,37,36,35,35,34,34,33,33,33,33,32,32,33,33,33,34,34,34,35,36,36,37,38,38,40,41,44,46,43,41,39,38,37,36,35,35,34,34,33,33,33,33,32,32,33,33,33,34,34,34,35,35,36,37,37,38,40,41,43,46,42,41,39,38,37,36,35,35,34,34,33,33,33,32,32,32,33,33,33,34,34,34,35,36,36,37,37,38,39,41,43,46,42,40,39,37,37,36,35,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,37,37,38,39,41,43,45,42,41,39,38,37,36,35,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,37,37,38,39,41,43,45,42,40,39,37,37,36,35,35,34,34,33,33,32,32,32,32,32,33,33,33,34,34,35,35,36,37,37,38,39,41,43,45,42,40,39,38,37,36,35,35,34,34,33,33,33,32,32,32,33,33,33,34,34,34,35,35,36,37,37,38,40,41,43,45,42,40,39,38,37,36,35,35,34,34,33,33,33,32,32,32,33,33,33,33,34,34,35,36,36,37,37,38,40,42,43,46,42,41,39,38,37,36,35,35,34,34,33,33,33,33,33,33,33,33,33,34,34,34,35,36,37,37,38,38,40,42,44,46,43,41,39,38,37,36,36,35,34,34,33,33,33,33,33,33,33,33,33,34,34,35,35,36,37,37,38,39,40,42,44,46,43,41,40,38,37,36,36,35,35,34,34,33,33,33,33,33,33,33,34,34,34,35,35,36,37,37,38,39,40,42,44,47,44,42,40,39,37,36,36,35,35,34,34,33,33,33,33,33,33,34,34,34,34,35,35,36,37,37,38,39,41,42,45,48,45,42,40,39,38,37,36,35,35,34,34,34,33,33,33,33,34,34,34,34,35,35,36,36,37,37,38,40,41,43,45,48,46,43,41,39,38,37,36,36,35,35,34,34,34,34,34,34,34,34,34,34,35,35,36,36,37,37,38,40,41,43,46,49,47,44,41,40,38,37,36,36,35,35,35,34,34,34,34,34,34,34,34,35,35,35,36,36,37,38,39,40,42,44,47,50,49,45,42,40,39,38,37,36,36,35,35,35,34,34,34,34,34,35,35,35,35,36,36,37,37,38,39,41,42,45,47,51,52,47,42,41,39,38,37,36,36,36,35,35,35,34,34,35,35,35,35,35,36,36,36,37,38,38,40,41,43,45,48,52,56,49,44,41,40,38,37,37,36,36,35,35,35,35,35,35,35,35,35,36,36,36,37,37,38,39,40,42,44,46,49,53,61,52,45,42,41,39,38,37,36,36,36,35,35,35,35,35,35,35,36,36,36,37,37,38,38,39,41,43,45,47,51,55,68,55,46,43,41,40,38,37,37,36,36,36,35,35,35,35,35,36,36,36,36,37,37,38,39,40,41,43,46,48,53,58,75,56,47,43,41,40,39,38,37,37,36,36,36,35,35,35,36,36,36,36,37,37,37,38,39,41,42,44,46,49,54,61}; - -// CALIBRATION_SHADING_LS_TL84_R -static uint8_t _calibration_shading_ls_tl84_r[] = {113,72,53,46,42,40,39,38,37,37,36,36,36,35,35,35,36,36,36,36,37,37,38,38,39,40,42,44,47,51,59,73,94,66,52,44,41,40,39,37,37,36,36,36,35,35,35,35,35,35,36,36,36,37,37,38,39,40,41,44,46,49,57,67,81,60,49,43,41,39,38,37,37,36,35,35,35,35,35,35,35,35,35,36,36,36,37,38,38,40,41,43,45,48,54,60,72,56,46,42,40,39,38,37,36,36,35,35,35,34,34,34,35,35,35,35,36,36,37,37,38,39,40,42,44,47,51,57,65,53,44,41,40,38,37,37,36,35,35,34,34,34,34,34,34,34,35,35,35,36,36,37,38,38,40,41,44,46,50,54,60,50,43,41,39,38,37,36,36,35,35,34,34,34,34,34,34,34,34,35,35,36,36,37,38,38,39,41,43,46,49,53,55,48,42,41,39,38,37,36,35,35,34,34,34,33,33,33,34,34,34,35,35,35,36,36,37,38,39,40,42,45,48,52,52,46,42,40,39,37,37,36,35,35,34,34,33,33,33,33,33,34,34,34,35,35,36,36,37,38,39,40,42,44,48,51,49,45,41,40,38,37,36,36,35,34,34,34,33,33,33,33,33,33,34,34,35,35,36,36,37,37,38,40,42,44,47,51,48,44,41,40,38,37,36,36,35,34,34,33,33,33,33,33,33,33,33,34,34,35,35,36,37,37,38,39,41,43,46,50,47,44,41,39,38,37,36,35,35,34,34,33,33,33,33,33,33,33,33,34,34,35,35,36,36,37,38,39,41,43,46,49,46,43,41,39,38,37,36,35,35,34,33,33,33,33,32,32,33,33,33,34,34,35,35,36,36,37,38,39,41,43,46,49,45,43,41,39,38,37,36,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,37,38,39,41,43,45,49,45,43,40,39,38,37,36,35,35,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,37,38,39,40,43,45,49,45,42,40,39,37,37,36,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,37,38,39,40,42,45,49,45,42,40,39,38,37,36,35,34,34,33,33,33,32,32,32,32,32,33,33,34,34,35,35,36,37,38,39,40,42,45,48,45,42,40,39,38,37,36,35,34,34,33,33,32,32,32,32,32,32,33,33,34,34,35,35,36,37,37,39,40,42,45,48,45,42,41,39,38,37,36,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,37,38,39,41,42,45,48,45,43,41,39,38,37,36,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,37,38,39,41,43,45,49,45,43,41,39,38,37,36,35,35,34,34,33,33,32,32,32,33,33,33,33,34,34,35,36,36,37,38,39,41,43,46,49,46,43,41,39,38,37,36,35,35,34,34,33,33,33,33,33,33,33,33,33,34,34,35,36,37,37,38,39,41,43,46,49,46,44,41,39,38,37,36,35,35,34,34,34,33,33,33,33,33,33,33,34,34,35,35,36,37,37,38,39,41,44,47,50,47,44,42,40,38,37,37,36,35,35,34,34,33,33,33,33,33,33,34,34,34,35,35,36,37,37,38,40,42,44,47,50,47,45,42,40,39,38,37,36,35,35,34,34,34,33,33,33,33,33,34,34,35,35,36,36,37,38,39,40,42,45,48,51,49,45,43,41,39,38,37,36,35,35,35,34,34,34,33,34,34,34,34,34,35,35,36,36,37,38,39,41,43,45,48,52,51,47,43,41,39,38,37,36,36,35,35,34,34,34,34,34,34,34,34,35,35,35,36,37,37,38,39,41,43,46,49,53,53,48,44,42,40,39,38,37,36,36,35,35,34,34,34,34,34,34,34,35,35,36,36,37,38,39,40,42,44,47,50,54,56,50,45,42,41,39,38,37,36,36,36,35,35,35,34,34,35,34,35,35,36,36,37,37,38,39,41,42,45,48,51,56,61,52,46,43,41,40,38,37,37,36,36,35,35,35,35,35,35,35,35,35,36,36,37,38,38,40,41,43,45,49,52,57,67,55,47,44,42,40,39,38,37,37,36,36,36,35,35,35,35,35,36,36,36,37,37,38,39,40,42,44,47,50,54,59,76,60,49,45,43,41,40,39,38,37,37,36,36,36,36,36,36,36,36,36,37,37,38,39,40,41,43,45,48,51,57,63,85,61,50,45,43,42,40,39,38,38,37,37,36,36,36,36,36,36,36,37,37,38,38,39,40,42,44,46,49,53,59,67}; - -// CALIBRATION_SHADING_LS_TL84_G -static uint8_t _calibration_shading_ls_tl84_g[] = {100,65,50,43,40,39,38,37,36,36,36,35,35,35,35,35,35,35,35,36,36,36,37,37,38,39,41,43,45,48,55,67,85,62,49,42,40,38,37,37,36,36,35,35,35,35,35,35,35,35,35,35,36,36,37,37,38,39,40,42,44,47,54,62,75,57,46,41,39,38,37,36,36,35,35,35,35,34,34,35,35,35,35,35,36,36,36,37,37,38,40,41,43,46,51,56,67,53,44,40,39,38,37,36,36,35,35,35,34,34,34,34,34,34,35,35,35,36,36,37,37,38,39,41,43,45,49,54,61,50,42,40,38,37,36,36,35,35,35,34,34,34,34,34,34,34,34,35,35,36,36,36,37,38,39,40,42,44,47,51,56,47,41,39,38,37,36,36,35,35,34,34,34,34,34,34,34,34,34,35,35,35,36,36,37,38,38,40,41,44,47,50,52,46,41,39,38,37,36,35,35,34,34,34,34,33,33,33,34,34,34,34,35,35,36,36,37,37,38,39,41,43,46,49,49,44,40,39,37,37,36,35,35,34,34,34,33,33,33,33,33,33,34,34,34,35,35,36,37,37,38,39,41,43,45,48,47,43,40,38,37,36,36,35,35,34,34,33,33,33,33,33,33,33,34,34,34,35,35,36,36,37,38,39,40,42,45,48,45,42,40,38,37,36,36,35,34,34,34,33,33,33,33,33,33,33,33,34,34,34,35,36,36,37,37,39,40,42,44,47,44,42,39,38,37,36,35,35,34,34,33,33,33,33,33,33,33,33,33,34,34,34,35,35,36,37,37,38,40,42,44,47,44,41,39,38,37,36,35,35,34,34,33,33,33,33,32,32,33,33,33,33,34,34,35,35,36,36,37,38,39,41,44,47,43,41,39,38,37,36,35,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,36,37,38,39,41,44,46,43,41,39,37,37,36,35,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,36,37,38,39,41,43,46,43,41,39,37,37,36,35,35,34,34,33,33,33,32,32,32,32,32,33,33,34,34,34,35,36,36,37,38,39,41,43,46,43,41,39,37,37,36,35,35,34,34,33,33,33,32,32,32,32,32,33,33,33,34,34,35,36,36,37,38,39,41,43,46,43,41,39,38,37,36,35,35,34,34,33,33,33,32,32,32,32,32,33,33,33,34,34,35,36,36,37,38,39,41,43,46,43,41,39,38,37,36,35,35,34,34,33,33,33,32,32,32,32,32,33,33,34,34,34,35,36,36,37,38,39,41,43,46,43,41,39,38,37,36,35,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,34,35,36,36,37,38,39,41,44,46,43,41,39,38,37,36,35,35,34,34,33,33,33,33,32,32,33,33,33,33,34,34,35,35,36,36,37,38,40,42,44,47,44,42,40,38,37,36,36,35,34,34,34,33,33,33,33,33,33,33,33,33,34,34,35,35,36,37,37,38,40,42,44,47,44,42,40,38,37,36,36,35,35,34,34,33,33,33,33,33,33,33,33,34,34,34,35,35,36,37,37,39,40,42,45,47,45,42,40,39,37,37,36,35,35,34,34,34,33,33,33,33,33,33,33,34,34,35,35,36,36,37,38,39,40,43,45,48,46,43,41,39,38,37,36,35,35,35,34,34,34,33,33,33,33,33,34,34,34,35,35,36,36,37,38,39,41,43,46,49,47,44,41,39,38,37,36,36,35,35,35,34,34,34,34,34,34,34,34,34,35,35,35,36,37,37,38,40,41,43,46,50,48,45,42,40,38,37,37,36,35,35,35,34,34,34,34,34,34,34,34,34,35,35,36,36,37,37,39,40,42,44,47,50,50,46,42,40,39,38,37,36,36,35,35,35,34,34,34,34,34,35,34,35,35,35,36,36,37,38,39,41,42,45,48,52,53,47,43,41,39,38,37,37,36,36,36,35,35,35,35,35,35,35,35,35,35,36,36,37,37,38,39,41,43,46,49,53,57,50,44,42,40,39,38,37,36,36,36,35,35,35,35,35,35,35,35,35,36,36,37,37,38,39,40,42,44,46,50,54,62,52,45,42,40,39,38,37,37,36,36,36,35,35,35,35,35,35,35,36,36,36,37,37,38,39,41,43,45,47,52,56,70,56,47,43,41,40,39,38,37,37,36,36,36,36,35,36,36,36,36,36,36,37,37,38,39,40,41,43,46,49,54,59,77,57,48,43,42,40,39,38,37,37,37,36,36,36,36,36,36,36,36,36,37,37,38,38,39,40,42,44,46,50,55,62}; - -// CALIBRATION_SHADING_LS_TL84_B -static uint8_t _calibration_shading_ls_tl84_b[] = {97,65,49,43,40,38,37,37,36,36,35,35,35,35,35,35,35,35,35,36,36,36,37,37,38,39,40,42,44,47,54,65,83,61,49,42,40,38,37,36,36,35,35,35,35,35,34,35,35,35,35,35,36,36,37,37,38,39,40,42,44,46,53,61,73,56,46,41,39,38,37,36,36,35,35,35,34,34,34,34,34,35,35,35,36,36,36,37,37,38,40,41,43,45,50,55,65,52,44,40,39,37,37,36,35,35,35,34,34,34,34,34,34,34,35,35,36,36,36,37,37,38,39,41,42,45,48,53,59,49,42,40,38,37,36,36,35,35,34,34,34,34,34,34,34,34,35,35,35,36,36,37,37,38,39,40,42,44,47,50,55,47,41,39,38,37,36,36,35,35,34,34,34,34,34,34,34,34,34,35,35,35,36,36,37,38,38,40,41,44,46,49,51,45,41,39,38,37,36,35,35,34,34,34,34,33,33,33,34,34,34,34,35,35,36,36,37,38,38,39,41,43,45,48,48,44,40,39,37,37,36,35,35,34,34,34,33,33,33,33,33,34,34,34,35,35,36,36,37,37,38,39,40,42,45,47,46,43,40,38,37,36,36,35,35,34,34,34,33,33,33,33,33,33,34,34,34,35,35,36,37,37,38,39,40,42,44,47,45,42,40,38,37,36,35,35,34,34,34,33,33,33,33,33,33,33,34,34,34,35,35,36,37,37,38,38,40,42,44,46,44,41,39,38,37,36,35,35,34,34,33,33,33,33,33,33,33,33,33,34,34,35,35,35,36,37,37,38,40,41,44,46,43,41,39,38,37,36,35,35,34,34,33,33,33,33,32,33,33,33,33,34,34,34,35,35,36,36,37,38,39,41,43,45,43,41,39,37,37,36,35,35,34,34,33,33,33,33,32,32,33,33,33,33,34,34,35,35,36,36,37,38,39,41,43,45,42,40,39,38,37,36,35,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,36,37,38,39,41,43,45,42,40,39,37,37,36,35,35,34,34,33,33,32,32,32,32,32,33,33,33,34,34,35,35,36,36,37,38,39,41,43,45,42,40,39,37,37,36,35,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,36,37,38,39,41,43,45,42,40,39,37,37,36,35,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,36,37,38,39,41,43,45,42,40,39,37,37,36,35,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,36,37,38,39,41,43,45,42,40,39,38,37,36,35,35,34,34,33,33,33,32,32,32,33,33,33,33,34,34,35,35,36,36,37,38,39,41,43,45,42,41,39,38,37,36,35,35,34,34,33,33,33,33,33,32,33,33,33,33,34,34,35,35,36,37,37,38,40,41,43,46,43,41,39,38,37,36,35,35,34,34,33,33,33,33,33,33,33,33,33,33,34,34,35,36,36,37,37,38,40,41,44,46,44,41,40,38,37,36,36,35,34,34,34,33,33,33,33,33,33,33,33,34,34,35,35,36,36,37,37,38,40,42,44,46,44,42,40,38,37,37,36,35,35,34,34,34,33,33,33,33,33,33,34,34,34,35,35,36,36,37,38,39,40,42,44,47,45,42,40,39,37,37,36,35,35,34,34,34,33,33,33,33,33,33,34,34,34,35,35,36,36,37,38,39,41,42,45,48,46,43,41,39,38,37,36,36,35,35,34,34,34,34,33,33,34,34,34,34,35,35,35,36,36,37,38,39,41,43,45,48,47,44,41,40,38,37,36,36,35,35,34,34,34,34,34,34,34,34,34,34,35,35,36,36,37,37,38,40,41,44,46,49,49,45,42,40,38,38,37,36,36,35,35,34,34,34,34,34,34,35,34,35,35,36,36,36,37,38,39,40,42,44,47,50,53,47,42,41,39,38,37,36,36,36,35,35,35,34,34,34,35,35,35,35,35,36,36,37,37,38,39,41,43,45,48,51,57,49,43,41,40,38,37,37,36,36,35,35,35,35,35,35,35,35,35,35,36,36,37,37,38,38,40,41,43,46,49,53,61,52,44,42,40,39,38,37,37,36,36,35,35,35,35,35,35,35,35,36,36,36,37,37,38,39,40,42,44,47,50,54,68,55,46,42,41,39,38,37,37,36,36,36,35,35,35,35,35,36,36,36,36,37,37,38,38,40,41,43,45,48,52,57,76,56,47,43,41,40,39,38,37,37,36,36,36,36,35,36,36,36,36,36,37,37,37,38,39,40,42,43,46,49,54,60}; - -// CALIBRATION_SHADING_LS_D65_R -static uint8_t _calibration_shading_ls_d65_r[] = {110,70,53,45,42,40,39,38,37,37,36,36,36,35,35,35,35,36,36,36,37,37,38,38,39,40,42,44,47,50,59,73,93,66,52,44,41,40,39,38,37,36,36,36,35,35,35,35,35,35,36,36,36,37,37,38,39,40,41,43,46,49,57,67,81,60,49,43,41,39,38,37,37,36,35,35,35,35,35,35,35,35,35,35,36,36,37,38,38,39,41,43,45,48,53,60,72,56,46,42,40,39,38,37,36,36,35,35,35,34,34,34,35,35,35,35,36,36,37,37,38,39,40,42,44,47,51,57,65,52,44,41,40,38,37,37,36,35,35,35,34,34,34,34,34,34,35,35,35,36,36,37,38,38,40,41,44,46,50,54,59,50,43,41,39,38,37,36,36,35,35,34,34,34,34,34,34,34,34,35,35,36,36,37,37,38,39,41,43,46,49,53,55,48,43,40,39,38,37,36,35,35,34,34,34,33,34,34,34,34,34,34,35,36,36,37,37,38,39,40,42,45,48,52,52,46,42,40,39,38,37,36,35,35,34,34,33,33,33,33,33,34,34,34,35,35,36,36,37,38,39,40,42,44,47,51,49,45,42,40,38,37,36,36,35,34,34,34,33,33,33,33,33,33,34,34,35,35,36,36,37,38,38,40,41,44,47,50,48,44,41,40,38,37,36,36,35,34,34,34,33,33,33,33,33,33,33,34,34,35,35,36,37,37,38,39,41,43,46,50,46,43,41,39,38,37,36,35,35,34,34,33,33,33,33,33,33,33,33,34,34,35,35,36,36,37,38,39,41,43,46,49,45,43,41,39,38,37,36,35,35,34,34,33,33,33,33,32,33,33,33,34,34,35,35,36,36,37,38,39,41,43,45,49,45,43,41,39,38,37,36,35,35,34,33,33,33,33,32,32,33,33,33,33,34,34,35,36,36,37,38,39,40,43,45,49,45,42,40,39,38,37,36,35,35,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,37,37,38,40,42,45,48,44,42,40,39,38,37,36,35,34,34,34,33,33,32,32,32,32,32,33,33,34,34,35,35,36,37,37,38,40,42,45,48,44,42,40,39,38,37,36,35,34,34,33,33,33,32,32,32,32,32,33,33,34,34,35,35,36,37,37,39,40,42,45,48,44,42,40,39,38,37,36,35,34,34,34,33,33,32,32,32,32,32,33,33,34,34,35,35,36,37,37,38,40,42,45,48,45,42,40,39,38,37,36,35,34,34,34,33,33,32,32,32,32,33,33,33,34,34,35,35,36,37,37,39,40,42,45,48,45,43,41,39,38,37,36,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,37,38,39,40,42,45,48,45,43,41,39,38,37,36,35,35,34,34,33,33,33,32,32,33,33,33,33,34,34,35,36,36,37,38,39,40,43,45,49,45,43,41,39,38,37,36,35,35,34,34,33,33,33,33,33,33,33,33,33,34,34,35,36,36,37,38,39,41,43,46,49,46,43,41,39,38,37,36,36,35,34,34,34,33,33,33,33,33,33,33,34,34,35,35,36,36,37,38,39,41,43,46,49,47,44,42,40,39,37,37,36,35,35,34,34,33,33,33,33,33,33,34,34,34,35,35,36,37,37,38,40,42,44,47,50,47,44,42,40,39,38,37,36,35,35,34,34,34,33,33,33,33,33,34,34,34,35,35,36,37,38,39,40,42,44,47,51,48,45,43,41,39,38,37,36,35,35,35,34,34,34,34,33,34,34,34,34,35,35,36,36,37,38,39,40,43,45,48,52,50,46,43,41,39,38,37,36,36,35,35,34,34,34,34,34,34,34,34,34,35,35,36,36,37,38,39,41,43,45,49,53,53,48,44,42,40,39,38,37,36,36,35,35,34,34,34,34,34,35,34,35,35,36,36,37,37,38,40,41,44,46,50,54,56,49,44,42,41,39,38,37,37,36,36,35,35,35,34,34,35,35,35,35,36,36,36,37,38,39,40,42,44,47,51,55,61,52,45,43,41,40,38,37,37,36,36,35,35,35,35,35,35,35,35,35,36,36,37,37,38,39,41,43,45,48,52,57,66,55,47,44,42,40,39,38,37,37,36,36,36,35,35,35,35,35,36,36,36,37,37,38,39,40,42,44,46,50,54,59,76,60,49,45,43,41,40,39,38,37,37,36,36,36,36,36,36,36,36,36,37,37,38,38,40,41,43,45,47,51,56,63,84,61,50,46,44,42,40,39,38,38,37,37,36,36,36,36,36,36,36,37,37,38,38,39,40,42,44,46,49,52,58,66}; - -// CALIBRATION_SHADING_LS_D65_G -static uint8_t _calibration_shading_ls_d65_g[] = {99,65,50,43,40,39,38,37,36,36,36,35,35,35,35,35,35,35,35,36,36,36,37,37,38,39,41,42,44,48,55,67,85,61,49,42,40,38,37,37,36,36,35,35,35,35,35,35,35,35,35,35,36,36,37,37,38,39,40,42,44,47,54,62,74,57,46,41,39,38,37,36,36,35,35,35,35,35,34,35,35,35,35,35,36,36,36,37,37,38,40,41,43,46,51,56,67,53,44,40,39,38,37,36,36,35,35,35,34,34,34,34,34,34,35,35,35,36,36,37,37,38,39,41,43,45,49,54,61,50,42,40,38,37,36,36,35,35,35,34,34,34,34,34,34,34,34,35,35,35,36,36,37,38,39,40,42,44,47,51,56,47,41,39,38,37,36,36,35,35,34,34,34,34,34,34,34,34,34,34,35,35,36,36,37,37,38,40,41,44,47,50,52,45,41,39,38,37,36,35,35,35,34,34,34,33,33,33,34,34,34,34,35,35,35,36,37,37,38,39,41,43,46,49,49,44,40,39,37,37,36,35,35,34,34,34,33,33,33,33,33,33,34,34,34,35,35,36,36,37,38,39,41,43,45,48,47,43,40,38,37,36,36,35,35,34,34,33,33,33,33,33,33,33,33,34,34,35,35,36,36,37,38,39,40,42,45,48,45,42,40,38,37,36,36,35,34,34,34,33,33,33,33,33,33,33,33,34,34,34,35,35,36,37,37,38,40,42,44,47,44,42,39,38,37,36,35,35,34,34,34,33,33,33,33,33,33,33,33,33,34,34,35,35,36,36,37,38,40,42,44,47,44,41,39,38,37,36,35,35,34,34,33,33,33,33,32,32,33,33,33,33,34,34,35,35,36,36,37,38,39,41,44,46,43,41,39,38,37,36,35,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,36,37,38,39,41,43,46,43,41,39,37,37,36,35,35,34,34,33,33,33,32,32,32,32,32,33,33,34,34,34,35,36,36,37,38,39,41,43,46,43,41,39,37,37,36,35,35,34,34,33,33,33,32,32,32,32,32,33,33,33,34,34,35,36,36,37,38,39,41,43,46,43,41,39,37,37,36,35,35,34,34,33,33,33,32,32,32,32,32,33,33,33,34,34,35,35,36,37,38,39,41,43,46,43,41,39,38,37,36,35,35,34,34,33,33,33,32,32,32,32,32,33,33,33,34,34,35,35,36,37,38,39,41,43,46,43,41,39,38,37,36,35,35,34,34,33,33,33,32,32,32,32,32,33,33,33,34,34,35,36,36,37,38,39,41,43,46,43,41,39,38,37,36,35,35,34,34,33,33,33,33,32,32,32,33,33,33,34,34,34,35,36,36,37,38,39,41,43,46,43,41,39,38,37,36,35,35,34,34,34,33,33,33,33,32,33,33,33,33,34,34,34,35,36,36,37,38,39,41,44,46,44,42,40,38,37,36,36,35,34,34,34,33,33,33,33,33,33,33,33,33,34,34,35,35,36,36,37,38,40,42,44,47,44,42,40,38,37,36,36,35,35,34,34,33,33,33,33,33,33,33,33,34,34,34,35,35,36,36,37,38,40,42,44,47,45,42,40,39,37,37,36,35,35,34,34,34,33,33,33,33,33,33,33,34,34,34,35,35,36,37,37,39,40,42,45,48,46,43,41,39,38,37,36,36,35,35,34,34,34,33,33,33,33,33,34,34,34,35,35,36,36,37,38,39,41,43,45,48,47,44,41,39,38,37,36,36,35,35,35,34,34,34,34,34,34,34,34,34,35,35,35,36,36,37,38,39,41,43,46,49,48,44,42,40,38,37,37,36,36,35,35,34,34,34,34,34,34,34,34,34,35,35,36,36,37,37,38,40,42,44,47,50,50,46,42,40,39,38,37,36,36,35,35,35,34,34,34,34,34,35,34,35,35,35,36,36,37,38,39,40,42,44,48,51,53,47,43,41,39,38,37,37,36,36,36,35,35,35,35,35,35,35,35,35,35,36,36,37,37,38,39,41,43,45,49,52,58,50,44,42,40,39,38,37,36,36,36,35,35,35,35,35,35,35,35,35,36,36,36,37,38,39,40,42,44,46,50,54,62,52,45,42,41,39,38,37,37,36,36,36,35,35,35,35,35,35,35,36,36,36,37,37,38,39,41,42,44,47,51,56,70,56,47,43,41,40,39,38,37,37,36,36,36,36,36,36,36,36,36,36,36,37,37,38,39,40,41,43,45,48,53,59,77,57,47,43,42,40,39,38,38,37,37,36,36,36,36,36,36,36,36,36,37,37,37,38,39,40,42,44,46,49,55,62}; - -// CALIBRATION_SHADING_LS_D65_B -static uint8_t _calibration_shading_ls_d65_b[] = {97,65,49,43,40,38,37,37,36,36,35,35,35,35,35,35,35,35,35,35,36,36,37,37,38,39,40,42,44,47,54,65,83,61,49,42,39,38,37,36,36,35,35,35,35,34,35,35,35,35,35,35,36,36,37,37,38,39,40,42,44,46,53,61,73,56,46,41,39,38,37,36,36,35,35,35,34,34,34,34,34,35,35,35,36,36,36,37,37,38,39,41,43,45,50,55,65,52,44,40,39,37,37,36,35,35,35,35,34,34,34,34,34,34,35,35,35,36,36,37,37,38,39,41,42,44,48,53,59,49,42,40,38,37,36,36,35,35,35,34,34,34,34,34,34,34,35,35,35,36,36,36,37,38,39,40,42,44,47,50,55,47,41,39,38,37,36,35,35,35,34,34,34,34,34,34,34,34,34,35,35,35,36,36,37,38,38,39,41,43,46,49,51,45,41,39,38,37,36,35,35,34,34,34,34,33,33,33,34,34,34,34,35,35,36,36,37,37,38,39,41,43,45,48,48,44,40,39,37,37,36,35,35,34,34,34,33,33,33,33,33,34,34,34,35,35,36,36,37,37,38,39,40,42,45,47,46,43,40,38,37,36,36,35,35,34,34,33,33,33,33,33,33,33,34,34,34,35,35,36,37,37,38,39,40,42,44,47,45,42,40,38,37,36,36,35,34,34,34,33,33,33,33,33,33,33,33,34,34,35,35,36,37,37,38,38,40,42,44,46,44,41,39,38,37,36,35,35,34,34,34,33,33,33,33,33,33,33,33,34,34,34,35,35,36,37,37,38,40,41,43,46,43,41,39,38,37,36,35,35,34,34,33,33,33,33,33,33,33,33,33,33,34,34,35,35,36,36,37,38,39,41,43,45,42,41,39,37,37,36,35,35,34,34,33,33,33,32,32,32,33,33,33,33,34,34,35,35,36,36,37,38,39,41,43,45,42,40,39,37,37,36,35,34,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,36,37,38,39,41,43,45,42,40,39,37,36,36,35,35,34,34,33,33,32,32,32,32,32,33,33,33,34,34,35,35,36,36,37,38,39,41,43,45,42,40,39,37,37,36,35,35,34,34,33,33,33,32,32,32,32,32,33,33,34,34,35,35,36,36,37,38,39,41,43,45,42,40,39,37,36,36,35,34,34,34,33,33,33,32,32,32,32,33,33,33,34,34,34,35,36,36,37,38,39,41,43,45,42,40,39,37,37,36,35,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,34,35,36,36,37,38,39,41,43,45,42,40,39,38,37,36,35,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,36,37,38,39,41,43,45,43,41,39,38,37,36,35,35,34,34,33,33,33,33,32,32,33,33,33,33,34,34,35,35,36,36,37,38,39,41,43,45,43,41,39,38,37,36,35,35,34,34,33,33,33,33,33,33,33,33,33,33,34,34,35,35,36,37,37,38,40,41,43,46,43,41,39,38,37,36,36,35,34,34,34,33,33,33,33,33,33,33,33,34,34,34,35,35,36,37,37,38,40,42,44,46,44,42,40,38,37,36,36,35,35,34,34,33,33,33,33,33,33,33,33,34,34,35,35,35,36,37,37,39,40,42,44,47,45,42,40,39,37,37,36,35,35,34,34,34,33,33,33,33,33,33,34,34,34,35,35,36,36,37,38,39,40,42,45,47,46,43,41,39,38,37,36,35,35,35,34,34,34,33,33,33,34,34,34,34,34,35,35,36,36,37,38,39,41,43,45,48,47,44,41,39,38,37,36,36,35,35,34,34,34,34,34,34,34,34,34,34,35,35,35,36,37,37,38,40,41,43,46,49,49,45,42,40,38,37,37,36,36,35,35,34,34,34,34,34,34,35,34,35,35,35,36,36,37,38,39,40,42,44,47,50,52,47,42,40,39,38,37,36,36,35,35,35,35,34,34,34,35,35,35,35,35,36,36,37,37,38,39,41,42,45,48,51,57,49,43,41,40,38,37,37,36,36,35,35,35,35,35,35,35,35,35,35,36,36,36,37,37,38,40,41,43,46,49,53,61,52,44,42,40,39,38,37,36,36,36,35,35,35,35,35,35,35,35,36,36,36,37,37,38,39,40,42,44,46,50,54,69,55,46,43,41,39,38,37,37,36,36,36,35,35,35,35,35,35,36,36,36,36,37,37,38,39,41,43,45,48,52,57,76,56,47,43,41,40,38,37,37,37,36,36,36,36,35,35,36,36,36,36,36,37,37,38,39,40,42,43,46,49,53,60}; - - -// R G B -static uint16_t _calibration_awb_warming_ls_a[] = {268, 256, 271}; - -// R G B -static uint16_t _calibration_awb_warming_ls_d75[] = {268, 256, 271}; - -// R G B -static uint16_t _calibration_awb_warming_ls_d50[] = {268, 256, 271}; - -// CALIBRATION_NOISE_PROFILE -static uint8_t _calibration_noise_profile[] = {0, 0, 0, 0, 0, 0, 0, 0, 5, 18, 23, 27, 30, 33, 34, 36, 37, 39, 40, 41, 42, 43, 43, 44, 45, 46, 46, 47, 47, 48, 48, 49, 49, 50, 50, 51, 51, 52, 52, 52, 53, 53, 53, 54, 54, 54, 55, 55, 55, 55, 56, 56, 56, 56, 57, 57, 57, 57, 58, 58, 58, 58, 59, 59, 59, 59, 59, 60, 60, 60, 60, 60, 60, 61, 61, 61, 61, 61, 62, 62, 62, 62, 62, 62, 62, 63, 63, 63, 63, 63, 63, 63, 64, 64, 64, 64, 64, 64, 64, 65, 65, 65, 65, 65, 65, 65, 65, 65, 66, 66, 66, 66, 66, 66, 66, 66, 66, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 68}; - -// CALIBRATION_DEMOSAIC -static uint8_t _calibration_demosaic[] = {7, 23, 29, 33, 36, 38, 40, 42, 43, 44, 46, 47, 48, 49, 50, 50, 51, 52, 52, 53, 53, 54, 55, 55, 55, 56, 56, 57, 57, 58, 58, 58, 59, 59, 59, 60, 60, 60, 61, 61, 61, 62, 62, 62, 62, 63, 63, 63, 63, 64, 64, 64, 64, 64, 65, 65, 65, 65, 65, 66, 66, 66, 66, 66, 67, 67, 67, 67, 67, 67, 68, 68, 68, 68, 68, 68, 69, 69, 69, 69, 69, 69, 69, 70, 70, 70, 70, 70, 70, 70, 71, 71, 71, 71, 71, 71, 71, 71, 71, 72, 72, 72, 72, 72, 72, 72, 72, 72, 73, 73, 73, 73, 73, 73, 73, 73, 73, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74}; - -// 8-bit normalised noise profile for WDR stitching -static uint8_t _calibration_wdr_np_lut[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - -// CALIBRATION_GAMMA -//static uint16_t _calibration_gamma[] = {0, 347, 539, 679, 794, 894, 982, 1062, 1136, 1204, 1268, 1329, 1386, 1441, 1493, 1543, 1591, 1638, 1683, 1726, 1768, 1809, 1849, 1888, 1926, 1963, 1999, 2034, 2068, 2102, 2135, 2168, 2200, 2231, 2262, 2292, 2322, 2351, 2380, 2408, 2436, 2463, 2491, 2517, 2544, 2570, 2596, 2621, 2646, 2671, 2695, 2719, 2743, 2767, 2790, 2814, 2836, 2859, 2882, 2904, 2926, 2948, 2969, 2990, 3012, 3033, 3053, 3074, 3094, 3115, 3135, 3155, 3174, 3194, 3213, 3233, 3252, 3271, 3290, 3308, 3327, 3345, 3364, 3382, 3400, 3418, 3436, 3453, 3471, 3488, 3506, 3523, 3540, 3557, 3574, 3591, 3607, 3624, 3640, 3657, 3673, 3689, 3705, 3721, 3737, 3753, 3769, 3785, 3800, 3816, 3831, 3846, 3862, 3877, 3892, 3907, 3922, 3937, 3951, 3966, 3981, 3995, 4010, 4024, 4039, 4053, 4067, 4081, 4095}; -static uint16_t _calibration_gamma[] = {0, 474, 745, 941, 1097, 1227, 1338, 1433, 1516, 1589, 1653, 1711, 1763, 1811, 1854, 1896, 1934, 1971, 2006, 2039, 2072, 2103, 2134, 2164, 2194, 2223, 2252, 2279, 2305, 2331, 2356, 2380, 2405, 2428, 2451, 2474, 2497, 2519, 2541, 2563, 2585, 2607, 2629, 2650, 2672, 2693, 2714, 2734, 2754, 2774, 2794, 2814, 2833, 2853, 2872, 2892, 2910, 2929, 2949, 2967, 2985, 3004, 3022, 3040, 3058, 3076, 3094, 3112, 3129, 3147, 3165, 3182, 3199, 3217, 3234, 3251, 3268, 3285, 3303, 3319, 3336, 3353, 3370, 3387, 3403, 3420, 3437, 3453, 3470, 3486, 3503, 3519, 3535, 3551, 3568, 3584, 3600, 3616, 3632, 3648, 3664, 3680, 3696, 3712, 3727, 3743, 3759, 3775, 3791, 3807, 3822, 3837, 3853, 3869, 3884, 3899, 3915, 3930, 3945, 3960, 3976, 3990, 4006, 4020, 4036, 4051, 4065, 4080, 4095}; - -// CALIBRATION_IRIDIX_ASYMMETRY -static uint32_t _calibration_iridix_asymmetry[] = { - 0, 61184, 116961, 168002, 214899, 258115, 298084, 335172, 369653, 401797, 431862, 460022, 486454, 511335, 534791, 556919, 577880, 597720, 616568, 634473, 651529, 667785, 683305, 698153, 712346, 725978, 739050, 751610, 763706, 775355, 786587, 797451, 807931, 818091, 827947, 837499, 846780, 855820, 864604, 873180, 881532, 889708, 897708, 905532, 913213, 920733, 928141, 935421, 942589, 949645, 956621, 963501, 970317, 977053, 983742, 990366, 996942, 1003470, 1009982, 1016446, 1022894, 1029326, 1035742, 1042158, 1048575, -}; - -// CALIBRATION_CA_FILTER_MEM -static uint32_t _calibration_ca_filter_mem[] = {32768,229629,491259,4278943225,4279204855,4262689525,4246239220,4229788915,4213338610,4196888050,4197214450,4180763890,4164313330,4147928050,4131477235,4115091955,4098641140,4082190325,4082516470,4066065655,4066391800,4066652665,4066913530,4067239930,4067500795,4084473340,4101445885,4118418430,4152037375,4185721855,4219340544,4253025024}; - -// calibration_awb_scene_presets in the following order AWB_DAY_LIGHT AWB_CLOUDY AWB_INCANDESCENT AWB_FLOURESCENT AWB_TWILIGHT AWB_SHADE AWB_WARM_FLOURESCENT -static uint16_t _calibration_awb_scene_presets[7][2] = { - { 256, 256 }, - { 324, 217 }, - { 177, 397 }, - { 227, 285 }, - { 227, 285 }, - { 366, 196 }, - { 188, 358 }}; - -// CALIBRATION_CA_CORRECTION: MIN_CORRECTION, MESH_WIDTH, MESH_HEIGHT -static uint16_t _calibration_ca_correction[] = {1, 64, 64}; - - -// CALIBRATION_CA_CORRECTION_MEM -static uint16_t _calibration_ca_correction_mem[][10] = { - { 65490, 65535, 65533, 65533, 59, 0, 5, 65517, 65535, 5 }, - { 65535, 65509, 65532, 4, 14, 26, 65531, 65523, 65535, 20 }, - { 65496, 65532, 65506, 0, 71, 33, 18, 65534, 65518, 65483 }, - { 65531, 65521, 65531, 65523, 15, 25, 21, 65523, 6, 65492 }}; - -static uint32_t _calibration_lut3d_mem[] = {0}; - -static uint32_t _calibration_decompander0_mem[] = {0, 32768, 65536, 98304, 131072, 163840, 196608, 229376, 262144, 294912, 327680, 360448, 393216, 425984, 458752, 491520, 524288, 557055, 589823, 622591, 655359, 688127, 720895, 753663, 786431, 819199, 851967, 884735, 917503, 950271, 983039, 1015807, 1048575}; -static uint32_t _calibration_decompander1_mem[] = {0, 4096, 8192, 12288, 16384, 20480, 24576, 28672, 32768, 36864, 40960, 45056, 49152, 53248, 57344, 61440, 65536, 69632, 73728, 77824, 81920, 86016, 90112, 94208, 98304, 102400, 106496, 110592, 114688, 118784, 122880, 126976, 131072, 135168, 139264, 143360, 147456, 151552, 155648, 159744, 163840, 167936, 172032, 176128, 180224, 184320, 188416, 192512, 196608, 200704, 204800, 208896, 212992, 217088, 221184, 225280, 229376, 233472, 237568, 241664, 245760, 249856, 253952, 258048, 262144, 266240, 270336, 274432, 278528, 282624, 286720, 290816, 294912, 299008, 303104, 307200, 311296, 315392, 319488, 323584, 327680, 331776, 335872, 339968, 344064, 348160, 352256, 356352, 360448, 364544, 368640, 372736, 376832, 380928, 385024, 389120, 393216, 397312, 401408, 405504, 409600, 413696, 417792, 421888, 425984, 430080, 434176, 438272, 442368, 446464, 450560, 454656, 458752, 462848, 466944, 471040, 475136, 479232, 483328, 487424, 491520, 495616, 499712, 503808, 507904, 512000, 516096, 520192, 524288, 528383, 532479, 536575, 540671, 544767, 548863, 552959, 557055, 561151, 565247, 569343, 573439, 577535, 581631, 585727, 589823, 593919, 598015, 602111, 606207, 610303, 614399, 618495, 622591, 626687, 630783, 634879, 638975, 643071, 647167, 651263, 655359, 659455, 663551, 667647, 671743, 675839, 679935, 684031, 688127, 692223, 696319, 700415, 704511, 708607, 712703, 716799, 720895, 724991, 729087, 733183, 737279, 741375, 745471, 749567, 753663, 757759, 761855, 765951, 770047, 774143, 778239, 782335, 786431, 790527, 794623, 798719, 802815, 806911, 811007, 815103, 819199, 823295, 827391, 831487, 835583, 839679, 843775, 847871, 851967, 856063, 860159, 864255, 868351, 872447, 876543, 880639, 884735, 888831, 892927, 897023, 901119, 905215, 909311, 913407, 917503, 921599, 925695, 929791, 933887, 937983, 942079, 946175, 950271, 954367, 958463, 962559, 966655, 970751, 974847, 978943, 983039, 987135, 991231, 995327, 999423, 1003519, 1007615, 1011711, 1015807, 1019903, 1023999, 1028095, 1032191, 1036287, 1040383, 1044479, 1048575}; - -// CALIBRATION_SHADING_RADIAL_R -static uint16_t _calibration_shading_radial_r[] = {4096, 4113, 4130, 4147, 4164, 4182, 4199, 4216, 4234, 4251, 4269, 4286, 4304, 4322, 4340, 4357, 4375, 4393, 4411, 4430, 4448, 4466, 4484, 4503, 4521, 4540, 4558, 4577, 4596, 4614, 4633, 4652, 4671, 4690, 4709, 4728, 4747, 4767, 4786, 4805, 4825, 4844, 4864, 4883, 4903, 4923, 4943, 4963, 4983, 5003, 5023, 5043, 5063, 5084, 5104, 5124, 5145, 5165, 5186, 5207, 5227, 5248, 5269, 5290, 5311, 5332, 5354, 5375, 5396, 5417, 5439, 5460, 5482, 5504, 5526, 5547, 5569, 5591, 5613, 5635, 5658, 5680, 5702, 5725, 5747, 5770, 5793, 5815, 5838, 5861, 5884, 5907, 5930, 5954, 5977, 6001, 6024, 6048, 6072, 6095, 6119, 6143, 6167, 6192, 6216, 6240, 6265, 6290, 6314, 6339, 6364, 6389, 6415, 6440, 6465, 6491, 6517, 6542, 6568, 6594, 6621, 6647, 6673, 6700, 6727, 6754, 6781, 6808, 6835}; - -// CALIBRATION_SHADING_RADIAL_G -static uint16_t _calibration_shading_radial_g[] = {4096, 4108, 4120, 4133, 4145, 4157, 4170, 4182, 4195, 4207, 4220, 4233, 4246, 4258, 4271, 4284, 4297, 4310, 4323, 4336, 4350, 4363, 4376, 4389, 4403, 4416, 4430, 4443, 4457, 4471, 4485, 4498, 4512, 4526, 4540, 4554, 4568, 4582, 4596, 4611, 4625, 4639, 4654, 4668, 4682, 4697, 4712, 4726, 4741, 4756, 4771, 4785, 4800, 4815, 4830, 4845, 4860, 4876, 4891, 4906, 4922, 4937, 4952, 4968, 4983, 4999, 5015, 5030, 5046, 5062, 5078, 5094, 5110, 5126, 5142, 5158, 5174, 5191, 5207, 5223, 5240, 5256, 5273, 5290, 5306, 5323, 5340, 5357, 5374, 5391, 5408, 5425, 5442, 5459, 5477, 5494, 5512, 5529, 5547, 5564, 5582, 5600, 5618, 5636, 5654, 5672, 5690, 5708, 5726, 5745, 5763, 5782, 5800, 5819, 5838, 5857, 5876, 5895, 5914, 5933, 5952, 5972, 5991, 6011, 6031, 6051, 6070, 6090, 6111}; - -// CALIBRATION_SHADING_RADIAL_B -static uint16_t _calibration_shading_radial_b[] = {4096, 4107, 4118, 4128, 4139, 4150, 4161, 4172, 4183, 4194, 4205, 4216, 4228, 4239, 4250, 4261, 4272, 4284, 4295, 4307, 4318, 4329, 4341, 4352, 4364, 4376, 4387, 4399, 4411, 4422, 4434, 4446, 4458, 4470, 4482, 4493, 4505, 4517, 4530, 4542, 4554, 4566, 4578, 4590, 4603, 4615, 4627, 4640, 4652, 4664, 4677, 4689, 4702, 4714, 4727, 4740, 4752, 4765, 4778, 4791, 4803, 4816, 4829, 4842, 4855, 4868, 4881, 4894, 4908, 4921, 4934, 4947, 4960, 4974, 4987, 5001, 5014, 5028, 5041, 5055, 5068, 5082, 5096, 5110, 5123, 5137, 5151, 5165, 5179, 5193, 5207, 5221, 5236, 5250, 5264, 5279, 5293, 5308, 5322, 5337, 5351, 5366, 5381, 5396, 5411, 5426, 5441, 5456, 5471, 5486, 5501, 5517, 5532, 5548, 5563, 5579, 5595, 5610, 5626, 5642, 5658, 5674, 5691, 5707, 5723, 5740, 5756, 5773, 5790}; - - -static LookupTable calibration_shading_radial_r = {.ptr = _calibration_shading_radial_r, .rows = 1, .cols = sizeof( _calibration_shading_radial_r ) / sizeof( _calibration_shading_radial_r[0] ), .width = sizeof( _calibration_shading_radial_r[0] )}; -static LookupTable calibration_shading_radial_g = {.ptr = _calibration_shading_radial_g, .rows = 1, .cols = sizeof( _calibration_shading_radial_g ) / sizeof( _calibration_shading_radial_g[0] ), .width = sizeof( _calibration_shading_radial_g[0] )}; -static LookupTable calibration_shading_radial_b = {.ptr = _calibration_shading_radial_b, .rows = 1, .cols = sizeof( _calibration_shading_radial_b ) / sizeof( _calibration_shading_radial_b[0] ), .width = sizeof( _calibration_shading_radial_b[0] )}; -static LookupTable calibration_decompander0_mem = {.ptr = _calibration_decompander0_mem, .rows = 1, .cols = sizeof( _calibration_decompander0_mem ) / sizeof( _calibration_decompander0_mem[0] ), .width = sizeof( _calibration_decompander0_mem[0] )}; -static LookupTable calibration_decompander1_mem = {.ptr = _calibration_decompander1_mem, .rows = 1, .cols = sizeof( _calibration_decompander1_mem ) / sizeof( _calibration_decompander1_mem[0] ), .width = sizeof( _calibration_decompander1_mem[0] )}; - -static LookupTable calibration_awb_scene_presets = {.ptr = _calibration_awb_scene_presets, .cols = 2, .rows = sizeof( _calibration_awb_scene_presets ) / sizeof( _calibration_awb_scene_presets[0] ), .width = sizeof( _calibration_awb_scene_presets[0][0] )}; -static LookupTable calibration_light_src = {.ptr = _calibration_light_src, .cols = 2, .rows = sizeof( _calibration_light_src ) / sizeof( _calibration_light_src[0] ), .width = sizeof( _calibration_light_src[0][0] )}; -static LookupTable calibration_rg_pos = {.ptr = _calibration_rg_pos, .rows = 1, .cols = sizeof( _calibration_rg_pos ) / sizeof( _calibration_rg_pos[0] ), .width = sizeof( _calibration_rg_pos[0] )}; -static LookupTable calibration_bg_pos = {.ptr = _calibration_bg_pos, .rows = 1, .cols = sizeof( _calibration_bg_pos ) / sizeof( _calibration_bg_pos[0] ), .width = sizeof( _calibration_bg_pos[0] )}; -static LookupTable calibration_mesh_rgbg_weight = {.ptr = _calibration_mesh_rgbg_weight, .cols = 15, .rows = sizeof( _calibration_mesh_rgbg_weight ) / sizeof( _calibration_mesh_rgbg_weight[0] ), .width = sizeof( _calibration_mesh_rgbg_weight[0][0] )}; -static LookupTable calibration_mesh_ls_weight = {.ptr = _calibration_mesh_ls_weight, .cols = 15, .rows = sizeof( _calibration_mesh_ls_weight ) / sizeof( _calibration_mesh_ls_weight[0] ), .width = sizeof( _calibration_mesh_ls_weight[0][0] )}; -static LookupTable calibration_mesh_color_temperature = {.ptr = _calibration_mesh_color_temperature, .cols = 15, .rows = sizeof( _calibration_mesh_color_temperature ) / sizeof( _calibration_mesh_color_temperature[0] ), .width = sizeof( _calibration_mesh_color_temperature[0][0] )}; -static LookupTable calibration_wb_strength = {.ptr = _calibration_wb_strength, .rows = 1, .cols = sizeof( _calibration_wb_strength ) / sizeof( _calibration_wb_strength[0] ), .width = sizeof( _calibration_wb_strength[0] )}; -static LookupTable calibration_sky_lux_th = {.ptr = _calibration_sky_lux_th, .rows = 1, .cols = sizeof( _calibration_sky_lux_th ) / sizeof( _calibration_sky_lux_th[0] ), .width = sizeof( _calibration_sky_lux_th[0] )}; -static LookupTable calibration_ct_rg_pos_calc = {.ptr = _calibration_ct_rg_pos_calc, .rows = 1, .cols = sizeof( _calibration_ct_rg_pos_calc ) / sizeof( _calibration_ct_rg_pos_calc[0] ), .width = sizeof( _calibration_ct_rg_pos_calc[0] )}; -static LookupTable calibration_ct_bg_pos_calc = {.ptr = _calibration_ct_bg_pos_calc, .rows = 1, .cols = sizeof( _calibration_ct_bg_pos_calc ) / sizeof( _calibration_ct_bg_pos_calc[0] ), .width = sizeof( _calibration_ct_bg_pos_calc[0] )}; -static LookupTable calibration_color_temp = {.ptr = _calibration_color_temp, .rows = 1, .cols = sizeof( _calibration_color_temp ) / sizeof( _calibration_color_temp[0] ), .width = sizeof( _calibration_color_temp[0] )}; -static LookupTable calibration_ct65pos = {.ptr = _calibration_ct65pos, .rows = 1, .cols = sizeof( _calibration_ct65pos ) / sizeof( _calibration_ct65pos[0] ), .width = sizeof( _calibration_ct65pos[0] )}; -static LookupTable calibration_ct40pos = {.ptr = _calibration_ct40pos, .rows = 1, .cols = sizeof( _calibration_ct40pos ) / sizeof( _calibration_ct40pos[0] ), .width = sizeof( _calibration_ct40pos[0] )}; -static LookupTable calibration_ct30pos = {.ptr = _calibration_ct30pos, .rows = 1, .cols = sizeof( _calibration_ct30pos ) / sizeof( _calibration_ct30pos[0] ), .width = sizeof( _calibration_ct30pos[0] )}; -static LookupTable calibration_evtolux_ev_lut = {.ptr = _calibration_evtolux_ev_lut, .rows = 1, .cols = sizeof( _calibration_evtolux_ev_lut ) / sizeof( _calibration_evtolux_ev_lut[0] ), .width = sizeof( _calibration_evtolux_ev_lut[0] )}; -static LookupTable calibration_evtolux_lux_lut = {.ptr = _calibration_evtolux_lux_lut, .rows = 1, .cols = sizeof( _calibration_evtolux_lux_lut ) / sizeof( _calibration_evtolux_lux_lut[0] ), .width = sizeof( _calibration_evtolux_lux_lut[0] )}; -static LookupTable calibration_black_level_r = {.ptr = _calibration_black_level_r, .cols = 2, .rows = sizeof( _calibration_black_level_r ) / sizeof( _calibration_black_level_r[0] ), .width = sizeof( _calibration_black_level_r[0][0] )}; -static LookupTable calibration_black_level_gr = {.ptr = _calibration_black_level_gr, .cols = 2, .rows = sizeof( _calibration_black_level_gr ) / sizeof( _calibration_black_level_gr[0] ), .width = sizeof( _calibration_black_level_gr[0][0] )}; -static LookupTable calibration_black_level_gb = {.ptr = _calibration_black_level_gb, .cols = 2, .rows = sizeof( _calibration_black_level_gb ) / sizeof( _calibration_black_level_gb[0] ), .width = sizeof( _calibration_black_level_gb[0][0] )}; -static LookupTable calibration_black_level_b = {.ptr = _calibration_black_level_b, .cols = 2, .rows = sizeof( _calibration_black_level_b ) / sizeof( _calibration_black_level_b[0] ), .width = sizeof( _calibration_black_level_b[0][0] )}; -static LookupTable calibration_static_wb = {.ptr = _calibration_static_wb, .rows = 1, .cols = sizeof( _calibration_static_wb ) / sizeof( _calibration_static_wb[0] ), .width = sizeof( _calibration_static_wb[0] )}; -static LookupTable calibration_mt_absolute_ls_a_ccm = {.ptr = _calibration_mt_absolute_ls_a_ccm, .rows = 1, .cols = sizeof( _calibration_mt_absolute_ls_a_ccm ) / sizeof( _calibration_mt_absolute_ls_a_ccm[0] ), .width = sizeof( _calibration_mt_absolute_ls_a_ccm[0] )}; -static LookupTable calibration_mt_absolute_ls_d40_ccm = {.ptr = _calibration_mt_absolute_ls_d40_ccm, .rows = 1, .cols = sizeof( _calibration_mt_absolute_ls_d40_ccm ) / sizeof( _calibration_mt_absolute_ls_d40_ccm[0] ), .width = sizeof( _calibration_mt_absolute_ls_d40_ccm[0] )}; -static LookupTable calibration_mt_absolute_ls_d50_ccm = {.ptr = _calibration_mt_absolute_ls_d50_ccm, .rows = 1, .cols = sizeof( _calibration_mt_absolute_ls_d50_ccm ) / sizeof( _calibration_mt_absolute_ls_d50_ccm[0] ), .width = sizeof( _calibration_mt_absolute_ls_d50_ccm[0] )}; -static LookupTable calibration_shading_ls_a_r = {.ptr = _calibration_shading_ls_a_r, .rows = 1, .cols = sizeof( _calibration_shading_ls_a_r ) / sizeof( _calibration_shading_ls_a_r[0] ), .width = sizeof( _calibration_shading_ls_a_r[0] )}; -static LookupTable calibration_shading_ls_a_g = {.ptr = _calibration_shading_ls_a_g, .rows = 1, .cols = sizeof( _calibration_shading_ls_a_g ) / sizeof( _calibration_shading_ls_a_g[0] ), .width = sizeof( _calibration_shading_ls_a_g[0] )}; -static LookupTable calibration_shading_ls_a_b = {.ptr = _calibration_shading_ls_a_b, .rows = 1, .cols = sizeof( _calibration_shading_ls_a_b ) / sizeof( _calibration_shading_ls_a_b[0] ), .width = sizeof( _calibration_shading_ls_a_b[0] )}; -static LookupTable calibration_shading_ls_tl84_r = {.ptr = _calibration_shading_ls_tl84_r, .rows = 1, .cols = sizeof( _calibration_shading_ls_tl84_r ) / sizeof( _calibration_shading_ls_tl84_r[0] ), .width = sizeof( _calibration_shading_ls_tl84_r[0] )}; -static LookupTable calibration_shading_ls_tl84_g = {.ptr = _calibration_shading_ls_tl84_g, .rows = 1, .cols = sizeof( _calibration_shading_ls_tl84_g ) / sizeof( _calibration_shading_ls_tl84_g[0] ), .width = sizeof( _calibration_shading_ls_tl84_g[0] )}; -static LookupTable calibration_shading_ls_tl84_b = {.ptr = _calibration_shading_ls_tl84_b, .rows = 1, .cols = sizeof( _calibration_shading_ls_tl84_b ) / sizeof( _calibration_shading_ls_tl84_b[0] ), .width = sizeof( _calibration_shading_ls_tl84_b[0] )}; -static LookupTable calibration_shading_ls_d65_r = {.ptr = _calibration_shading_ls_d65_r, .rows = 1, .cols = sizeof( _calibration_shading_ls_d65_r ) / sizeof( _calibration_shading_ls_d65_r[0] ), .width = sizeof( _calibration_shading_ls_d65_r[0] )}; -static LookupTable calibration_shading_ls_d65_g = {.ptr = _calibration_shading_ls_d65_g, .rows = 1, .cols = sizeof( _calibration_shading_ls_d65_g ) / sizeof( _calibration_shading_ls_d65_g[0] ), .width = sizeof( _calibration_shading_ls_d65_g[0] )}; -static LookupTable calibration_shading_ls_d65_b = {.ptr = _calibration_shading_ls_d65_b, .rows = 1, .cols = sizeof( _calibration_shading_ls_d65_b ) / sizeof( _calibration_shading_ls_d65_b[0] ), .width = sizeof( _calibration_shading_ls_d65_b[0] )}; -static LookupTable calibration_awb_warming_ls_a = {.ptr = _calibration_awb_warming_ls_a, .rows = 1, .cols = sizeof( _calibration_awb_warming_ls_a ) / sizeof( _calibration_awb_warming_ls_a[0] ), .width = sizeof( _calibration_awb_warming_ls_a[0] )}; -static LookupTable calibration_awb_warming_ls_d50 = {.ptr = _calibration_awb_warming_ls_d50, .rows = 1, .cols = sizeof( _calibration_awb_warming_ls_d50 ) / sizeof( _calibration_awb_warming_ls_d50[0] ), .width = sizeof( _calibration_awb_warming_ls_d50[0] )}; -static LookupTable calibration_awb_warming_ls_d75 = {.ptr = _calibration_awb_warming_ls_d75, .rows = 1, .cols = sizeof( _calibration_awb_warming_ls_d75 ) / sizeof( _calibration_awb_warming_ls_d75[0] ), .width = sizeof( _calibration_awb_warming_ls_d75[0] )}; -static LookupTable calibration_noise_profile = {.ptr = _calibration_noise_profile, .rows = 1, .cols = sizeof( _calibration_noise_profile ) / sizeof( _calibration_noise_profile[0] ), .width = sizeof( _calibration_noise_profile[0] )}; -static LookupTable calibration_demosaic = {.ptr = _calibration_demosaic, .rows = 1, .cols = sizeof( _calibration_demosaic ) / sizeof( _calibration_demosaic[0] ), .width = sizeof( _calibration_demosaic[0] )}; -static LookupTable calibration_wdr_np_lut = {.ptr = _calibration_wdr_np_lut, .rows = 1, .cols = sizeof( _calibration_wdr_np_lut ) / sizeof( _calibration_wdr_np_lut[0] ), .width = sizeof( _calibration_wdr_np_lut[0] )}; -static LookupTable calibration_gamma = {.ptr = _calibration_gamma, .rows = 1, .cols = sizeof( _calibration_gamma ) / sizeof( _calibration_gamma[0] ), .width = sizeof( _calibration_gamma[0] )}; -static LookupTable calibration_iridix_asymmetry = {.ptr = _calibration_iridix_asymmetry, .rows = 1, .cols = sizeof( _calibration_iridix_asymmetry ) / sizeof( _calibration_iridix_asymmetry[0] ), .width = sizeof( _calibration_iridix_asymmetry[0] )}; -static LookupTable calibration_ca_filter_mem = {.ptr = _calibration_ca_filter_mem, .rows = 1, .cols = sizeof( _calibration_ca_filter_mem ) / sizeof( _calibration_ca_filter_mem[0] ), .width = sizeof( _calibration_ca_filter_mem[0] )}; -static LookupTable calibration_ca_correction = {.ptr = _calibration_ca_correction, .rows = 1, .cols = sizeof( _calibration_ca_correction ) / sizeof( _calibration_ca_correction[0] ), .width = sizeof( _calibration_ca_correction[0] )}; -static LookupTable calibration_ca_correction_mem = {.ptr = _calibration_ca_correction_mem, .cols = 10, .rows = sizeof( _calibration_ca_correction_mem ) / sizeof( _calibration_ca_correction_mem[0] ), .width = sizeof( _calibration_ca_correction_mem[0][0] )}; -static LookupTable calibration_lut3d_mem = {.ptr = _calibration_lut3d_mem, .rows = 1, .cols = sizeof( _calibration_lut3d_mem ) / sizeof( _calibration_lut3d_mem[0] ), .width = sizeof( _calibration_lut3d_mem[0] )}; - -uint32_t get_calibrations_static_fs_lin_os08a10_ipc( ACameraCalibrations *c ) -{ - uint32_t result = 0; - if ( c != 0 ) { - c->calibrations[CALIBRATION_SHADING_RADIAL_R] = &calibration_shading_radial_r; - c->calibrations[CALIBRATION_SHADING_RADIAL_G] = &calibration_shading_radial_g; - c->calibrations[CALIBRATION_SHADING_RADIAL_B] = &calibration_shading_radial_b; - c->calibrations[CALIBRATION_DECOMPANDER0_MEM] = &calibration_decompander0_mem; - c->calibrations[CALIBRATION_DECOMPANDER1_MEM] = &calibration_decompander1_mem; - c->calibrations[CALIBRATION_LIGHT_SRC] = &calibration_light_src; - c->calibrations[CALIBRATION_RG_POS] = &calibration_rg_pos; - c->calibrations[CALIBRATION_BG_POS] = &calibration_bg_pos; - c->calibrations[CALIBRATION_MESH_RGBG_WEIGHT] = &calibration_mesh_rgbg_weight; - c->calibrations[CALIBRATION_MESH_LS_WEIGHT] = &calibration_mesh_ls_weight; - c->calibrations[CALIBRATION_MESH_COLOR_TEMPERATURE] = &calibration_mesh_color_temperature; - c->calibrations[CALIBRATION_WB_STRENGTH] = &calibration_wb_strength; - c->calibrations[CALIBRATION_SKY_LUX_TH] = &calibration_sky_lux_th; - c->calibrations[CALIBRATION_CT_RG_POS_CALC] = &calibration_ct_rg_pos_calc; - c->calibrations[CALIBRATION_CT_BG_POS_CALC] = &calibration_ct_bg_pos_calc; - c->calibrations[CALIBRATION_COLOR_TEMP] = &calibration_color_temp; - c->calibrations[CALIBRATION_CT65POS] = &calibration_ct65pos; - c->calibrations[CALIBRATION_CT40POS] = &calibration_ct40pos; - c->calibrations[CALIBRATION_CT30POS] = &calibration_ct30pos; - c->calibrations[CALIBRATION_EVTOLUX_EV_LUT] = &calibration_evtolux_ev_lut; - c->calibrations[CALIBRATION_EVTOLUX_LUX_LUT] = &calibration_evtolux_lux_lut; - c->calibrations[CALIBRATION_BLACK_LEVEL_R] = &calibration_black_level_r; - c->calibrations[CALIBRATION_BLACK_LEVEL_GR] = &calibration_black_level_gr; - c->calibrations[CALIBRATION_BLACK_LEVEL_GB] = &calibration_black_level_gb; - c->calibrations[CALIBRATION_BLACK_LEVEL_B] = &calibration_black_level_b; - c->calibrations[CALIBRATION_STATIC_WB] = &calibration_static_wb; - c->calibrations[CALIBRATION_MT_ABSOLUTE_LS_A_CCM] = &calibration_mt_absolute_ls_a_ccm; - c->calibrations[CALIBRATION_MT_ABSOLUTE_LS_D40_CCM] = &calibration_mt_absolute_ls_d40_ccm; - c->calibrations[CALIBRATION_MT_ABSOLUTE_LS_D50_CCM] = &calibration_mt_absolute_ls_d50_ccm; - c->calibrations[CALIBRATION_SHADING_LS_A_R] = &calibration_shading_ls_a_r; - c->calibrations[CALIBRATION_SHADING_LS_A_G] = &calibration_shading_ls_a_g; - c->calibrations[CALIBRATION_SHADING_LS_A_B] = &calibration_shading_ls_a_b; - c->calibrations[CALIBRATION_SHADING_LS_TL84_R] = &calibration_shading_ls_tl84_r; - c->calibrations[CALIBRATION_SHADING_LS_TL84_G] = &calibration_shading_ls_tl84_g; - c->calibrations[CALIBRATION_SHADING_LS_TL84_B] = &calibration_shading_ls_tl84_b; - c->calibrations[CALIBRATION_SHADING_LS_D65_R] = &calibration_shading_ls_d65_r; - c->calibrations[CALIBRATION_SHADING_LS_D65_G] = &calibration_shading_ls_d65_g; - c->calibrations[CALIBRATION_SHADING_LS_D65_B] = &calibration_shading_ls_d65_b; - c->calibrations[CALIBRATION_AWB_WARMING_LS_A] = &calibration_awb_warming_ls_a; - c->calibrations[CALIBRATION_AWB_WARMING_LS_D50] = &calibration_awb_warming_ls_d50; - c->calibrations[CALIBRATION_AWB_WARMING_LS_D75] = &calibration_awb_warming_ls_d75; - c->calibrations[CALIBRATION_NOISE_PROFILE] = &calibration_noise_profile; - c->calibrations[CALIBRATION_DEMOSAIC] = &calibration_demosaic; - c->calibrations[CALIBRATION_WDR_NP_LUT] = &calibration_wdr_np_lut; - c->calibrations[CALIBRATION_GAMMA] = &calibration_gamma; - c->calibrations[CALIBRATION_IRIDIX_ASYMMETRY] = &calibration_iridix_asymmetry; - c->calibrations[CALIBRATION_AWB_SCENE_PRESETS] = &calibration_awb_scene_presets; - c->calibrations[CALIBRATION_CA_FILTER_MEM] = &calibration_ca_filter_mem; - c->calibrations[CALIBRATION_CA_CORRECTION] = &calibration_ca_correction; - c->calibrations[CALIBRATION_CA_CORRECTION_MEM] = &calibration_ca_correction_mem; - c->calibrations[CALIBRATION_LUT3D_MEM] = &calibration_lut3d_mem; - } else { - result = -1; - } - return result; -} diff --git a/unionpi_tiger/kernel/drivers/isp/drivers/subdev/iq/src/calibration/acamera_calibrations_static_fs_lin_os08a10_slt.c b/unionpi_tiger/kernel/drivers/isp/drivers/subdev/iq/src/calibration/acamera_calibrations_static_fs_lin_os08a10_slt.c deleted file mode 100644 index 3e23c25..0000000 --- a/unionpi_tiger/kernel/drivers/isp/drivers/subdev/iq/src/calibration/acamera_calibrations_static_fs_lin_os08a10_slt.c +++ /dev/null @@ -1,369 +0,0 @@ -/* -* -* SPDX-License-Identifier: GPL-2.0 -* -* Copyright (C) 2011-2018 ARM or its affiliates -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; version 2. -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. -* You should have received a copy of the GNU General Public License along -* with this program; if not, write to the Free Software Foundation, Inc., -* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -* -*/ - -#include "acamera_command_api.h" -//#include "acamera_firmware_api.h" -#include "acamera_firmware_settings.h" -// created from 2016-10-19T16:42:58.865Z UTClinear.json - -// CALIBRATION_LIGHT_SRC -static uint16_t _calibration_light_src[][2] = { - {285,234}}; - -// CALIBRATION_RG_POS -static uint16_t _calibration_rg_pos[] = {164,179,195,212,228,245,256,278,294,311,327,344,360,377,412}; - -// CALIBRATION_BG_POS -static uint16_t _calibration_bg_pos[] = {128,148,162,177,191,206,220,235,256,264,278,293,307,322,350}; - -// CALIBRATION_MESH_RGBG_WEIGHT -static uint16_t _calibration_mesh_rgbg_weight[][15] = { - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 9, 61 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 25, 104, 256, 256 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 38, 152, 256, 256, 20 }, - { 0, 0, 0, 0, 0, 0, 0, 1, 8, 53, 189, 256, 256, 122, 0 }, - { 0, 0, 0, 0, 0, 0, 1, 11, 59, 210, 256, 256, 178, 15, 0 }, - { 0, 0, 0, 0, 0, 2, 9, 87, 233, 256, 256, 168, 29, 1, 0 }, - { 0, 0, 0, 0, 1, 17, 62, 256, 256, 256, 181, 31, 2, 0, 0 }, - { 0, 0, 0, 1, 14, 122, 256, 256, 256, 165, 33, 2, 0, 0, 0 }, - { 0, 0, 1, 29, 200, 256, 256, 256, 88, 12, 1, 0, 0, 0, 0 }, - { 0, 0, 5, 90, 256, 256, 256, 152, 30, 3, 0, 0, 0, 0, 0 }, - { 0, 0, 43, 256, 256, 256, 184, 22, 2, 0, 0, 0, 0, 0, 0 }, - { 0, 7, 256, 256, 244, 61, 18, 1, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 46, 256, 256, 37, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 1, 256, 256, 24, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 33, 256, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }}; - -// CALIBRATION_MESH_LS_WEIGHT -static uint16_t _calibration_mesh_ls_weight[][15] = { - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 3, 4, 25, 42, 53, 57, 53, 42, 25, 4, 3, 0, 0 }, - { 0, 0, 4, 131, 157, 179, 193, 198, 193, 179, 157, 131, 4, 0, 0 }, - { 0, 0, 25, 157, 188, 214, 232, 238, 232, 214, 188, 157, 25, 0, 0 }, - { 0, 0, 42, 179, 214, 243, 255, 256, 255, 243, 214, 179, 42, 0, 0 }, - { 0, 0, 53, 193, 232, 255, 256, 256, 256, 255, 232, 193, 53, 0, 0 }, - { 0, 0, 57, 198, 238, 256, 256, 256, 256, 256, 238, 198, 57, 0, 0 }, - { 0, 0, 53, 193, 232, 255, 256, 256, 256, 255, 232, 193, 53, 0, 0 }, - { 0, 0, 42, 179, 214, 243, 255, 256, 255, 243, 214, 179, 42, 0, 0 }, - { 0, 0, 25, 157, 188, 214, 232, 238, 232, 214, 188, 157, 25, 0, 0 }, - { 0, 0, 4, 131, 157, 179, 193, 198, 193, 179, 157, 131, 4, 0, 0 }, - { 0, 0, 3, 4, 25, 42, 53, 57, 53, 42, 25, 4, 3, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }}; - -// CALIBRATION_MESH_COLOR_TEMPERATURE -static uint16_t _calibration_mesh_color_temperature[][15] = { - { 211, 225, 240, 250, 266, 281, 291, 310, 324, 336, 346, 357, 370, 385, 385 }, - { 191, 210, 225, 241, 250, 267, 277, 296, 310, 325, 336, 347, 358, 372, 385 }, - { 183, 194, 214, 230, 245, 253, 267, 286, 300, 315, 328, 340, 350, 363, 385 }, - { 174, 186, 203, 219, 234, 250, 253, 275, 289, 304, 318, 333, 343, 354, 385 }, - { 166, 178, 190, 208, 223, 239, 249, 265, 279, 294, 308, 323, 336, 347, 385 }, - { 158, 169, 181, 194, 211, 227, 238, 254, 268, 283, 297, 312, 326, 339, 364 }, - { 154, 161, 174, 186, 199, 217, 227, 248, 258, 273, 287, 302, 316, 331, 355 }, - { 154, 154, 165, 178, 190, 205, 216, 236, 251, 262, 276, 291, 305, 320, 347 }, - { 140, 149, 154, 166, 178, 191, 200, 220, 235, 253, 261, 276, 290, 305, 336 }, - { 135, 144, 154, 162, 174, 187, 195, 214, 229, 245, 260, 270, 284, 299, 330 }, - { 132, 135, 145, 154, 166, 179, 187, 203, 218, 234, 253, 260, 274, 289, 320 }, - { 122, 129, 135, 145, 157, 170, 179, 195, 207, 223, 238, 257, 264, 278, 309 }, - { 112, 119, 126, 136, 146, 162, 171, 187, 200, 212, 227, 243, 260, 268, 299 }, - { 102, 109, 116, 124, 136, 147, 162, 179, 191, 201, 216, 232, 255, 260, 288 }, - { 100, 100, 100, 100, 112, 120, 125, 163, 175, 188, 200, 210, 225, 242, 268 }}; - -// RG, BG, MULT. final wb gain adjuster for a sky scene. devided by CALIBRATION_WB_STRENGTH_MULT in use -static uint16_t _calibration_wb_strength[] = {1000, 1000, 1000}; - -// lux threshold for sky -static uint16_t _calibration_sky_lux_th[] = {10000}; - -// 1D rg/bg readout from color_temp -static uint16_t _calibration_ct_rg_pos_calc[] = {179,202,218,256,289,298,349,371,393}; - -// 1D rg/bg readout from color_temp -static uint16_t _calibration_ct_bg_pos_calc[] = {335,302,286,256,230,223,183,165,148}; - -// CALIBRATION_COLOR_TEMP -static uint16_t _calibration_color_temp[] = {100,133,154,200,250,260,333,357,385}; - -// CALIBRATION_CT65POS -static uint16_t _calibration_ct65pos[] = {2}; - -// CALIBRATION_CT40POS -static uint16_t _calibration_ct40pos[] = {8}; - -// CALIBRATION_CT30POS -static uint16_t _calibration_ct30pos[] = {6}; - -// CALIBRATION_EVTOLUX_EV_LUT -static uint32_t _calibration_evtolux_ev_lut[] //evlog2 - = {398775, 444491, 477818, 528405, 620780, 744998, 821797, 1051295, 1308509, 1373840, 1436952, 1573912, 1656816, 1918045, 2075972, 2322504, 2494615}; - -// CALIBRATION_EVTOLUX_LUX_LUT -static uint32_t _calibration_evtolux_lux_lut[] = {20000, 18000, 16000, 14000, 12000, 10100, 8900, 5120, 2560, 2080, 1800, 1200, 1000, 500, 320, 160, 100}; - - -// CALIBRATION_BLACK_LEVEL_R -static uint16_t _calibration_black_level_r[][2] = { - {0, 256}, - {32, 256}, - {64, 256}, - {96, 256}, - {128, 256}}; - -// CALIBRATION_BLACK_LEVEL_GR -static uint16_t _calibration_black_level_gr[][2] = { - {0, 256}, - {32, 256}, - {64, 256}, - {96, 256}, - {128, 256}}; - -// CALIBRATION_BLACK_LEVEL_GB -static uint16_t _calibration_black_level_gb[][2] = { - {0, 256}, - {32, 256}, - {64, 256}, - {96, 256}, - {128, 256}}; - -// CALIBRATION_BLACK_LEVEL_B -static uint16_t _calibration_black_level_b[][2] = { - {0, 256}, - {32, 256}, - {64, 256}, - {96, 256}, - {128, 256}}; - -// CALIBRATION_STATIC_WB -static uint16_t _calibration_static_wb[] = {490,256,256,470}; -// RR RG RB GR GG GB BR BG BB -static uint16_t _calibration_mt_absolute_ls_a_ccm[] = {410, 32869, 32821, 32888, 458, 32850, 29, 33005, 464}; - -// RR RG RB GR GG GB BR BG BB -static uint16_t _calibration_mt_absolute_ls_d40_ccm[] = {410, 32881, 32809, 32868, 449, 32861, 23, 32963, 428}; - -// RR RG RB GR GG GB BR BG BB -static uint16_t _calibration_mt_absolute_ls_d50_ccm[] = {413, 32888, 32805, 32857, 443, 32866, 20, 32949, 417}; - -// CALIBRATION_SHADING_LS_A_R -static uint8_t _calibration_shading_ls_a_r[] = {117,72,53,46,42,41,39,38,37,37,36,36,36,35,35,35,35,36,36,36,37,37,38,38,39,40,42,45,47,51,59,74,97,67,53,45,42,40,39,38,37,36,36,36,35,35,35,35,35,35,36,36,36,37,37,38,39,40,42,44,46,50,58,68,83,61,49,43,41,39,38,37,37,36,36,35,35,35,35,35,35,35,35,36,36,37,37,38,38,40,41,43,45,48,54,61,74,57,47,42,40,39,38,37,36,36,35,35,35,34,34,34,35,35,35,35,36,36,37,38,38,39,40,42,45,47,52,58,66,53,45,42,40,38,37,37,36,35,35,35,34,34,34,34,34,35,35,35,36,36,37,37,38,39,40,42,44,47,50,55,61,51,43,41,39,38,37,36,36,35,35,34,34,34,34,34,34,34,34,35,35,36,36,37,38,38,39,41,43,46,49,53,56,48,43,41,39,38,37,36,35,35,34,34,34,34,34,34,34,34,34,35,35,36,36,37,37,38,39,41,43,45,49,53,52,47,42,40,39,38,37,36,35,35,34,34,34,33,33,33,34,34,34,34,35,35,36,36,37,38,39,40,42,45,48,51,50,45,42,40,38,37,37,36,35,34,34,34,33,33,33,33,33,34,34,34,34,35,36,36,37,38,38,40,42,44,47,51,48,44,41,40,38,37,36,36,35,34,34,33,33,33,33,33,33,33,33,34,34,35,35,36,37,37,38,40,41,44,47,50,47,44,41,39,38,37,36,35,35,34,34,33,33,33,33,33,33,33,33,34,34,35,35,36,36,37,38,39,41,43,46,50,46,43,41,39,38,37,36,35,35,34,34,33,33,33,32,33,33,33,33,34,34,35,35,36,36,37,38,39,41,43,46,49,46,43,41,39,38,37,36,35,35,34,33,33,33,32,32,32,32,33,33,33,34,34,35,36,36,37,38,39,41,43,46,49,45,43,41,39,38,37,36,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,37,38,39,41,43,46,49,45,43,40,39,38,37,36,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,37,38,39,41,43,45,49,45,43,41,39,38,37,36,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,37,38,39,40,43,46,49,45,43,41,39,38,37,36,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,37,38,39,40,43,46,49,45,43,41,39,38,37,36,35,34,34,34,33,33,32,32,32,32,33,33,33,34,34,35,35,37,37,38,39,41,43,46,49,45,43,41,39,38,37,36,35,35,34,33,33,33,32,32,32,32,33,33,33,34,34,35,36,36,37,38,39,41,43,46,49,45,43,41,39,38,37,36,35,35,34,34,33,33,33,32,32,33,33,33,33,34,34,35,36,37,37,38,39,41,43,46,50,46,43,41,39,38,37,36,35,35,34,34,33,33,33,33,33,33,33,33,34,34,35,35,36,37,37,38,39,41,44,47,50,46,44,42,40,38,37,36,36,35,34,34,34,33,33,33,33,33,33,33,34,34,35,35,36,37,37,38,40,42,44,47,51,47,44,42,40,39,37,37,36,35,35,34,34,33,33,33,33,33,33,34,34,34,35,36,36,37,38,39,40,42,44,48,51,48,45,42,40,39,38,37,36,35,35,34,34,34,33,33,33,33,34,34,34,35,35,36,36,37,38,39,40,43,45,48,52,49,46,43,41,39,38,37,36,36,35,35,34,34,34,34,34,34,34,34,34,35,35,36,37,37,38,39,41,43,46,49,53,51,47,43,41,40,38,37,37,36,35,35,34,34,34,34,34,34,34,34,35,35,35,36,37,37,38,40,41,44,46,50,54,53,48,44,42,40,39,38,37,36,36,35,35,34,34,34,34,34,35,35,35,35,36,36,37,38,39,40,42,44,47,51,55,57,50,45,43,41,39,38,37,36,36,36,35,35,35,34,34,35,35,35,35,36,36,37,37,38,39,41,43,45,48,52,56,61,52,46,43,41,40,38,38,37,36,36,35,35,35,35,35,35,35,35,35,36,37,37,38,39,40,42,43,46,49,53,58,68,56,47,44,42,40,39,38,37,37,36,36,36,35,35,35,35,35,36,36,36,37,38,38,39,40,42,44,47,50,55,60,77,60,49,45,43,41,40,39,38,37,37,36,36,36,36,36,36,36,36,36,37,37,38,39,40,41,43,45,48,52,57,64,86,61,51,46,44,42,40,39,38,38,37,37,36,36,36,36,36,36,36,37,37,38,38,39,40,42,44,47,49,53,59,68}; - -// CALIBRATION_SHADING_LS_A_G -static uint8_t _calibration_shading_ls_a_g[] = {100,66,50,43,40,39,38,37,36,36,36,35,35,35,35,35,35,35,35,36,36,36,37,37,38,39,41,43,45,48,55,68,86,62,49,42,40,38,37,37,36,36,35,35,35,35,35,35,35,35,35,35,36,36,37,37,38,39,40,42,44,47,54,63,75,57,46,41,39,38,37,36,36,35,35,35,35,34,34,34,35,35,35,35,36,36,36,37,37,38,40,41,43,46,51,56,67,53,44,40,39,38,37,36,36,35,35,35,34,34,34,34,34,34,35,35,35,36,36,37,37,38,39,41,43,45,49,54,61,50,43,40,38,37,36,36,35,35,35,34,34,34,34,34,34,34,34,35,35,36,36,36,37,38,39,40,42,45,48,51,56,48,41,39,38,37,36,36,35,35,34,34,34,34,34,34,34,34,34,35,35,35,36,36,37,37,38,40,41,44,47,50,52,46,41,39,38,37,36,35,35,34,34,34,34,33,33,33,34,34,34,34,35,35,36,36,37,37,38,39,41,43,46,49,49,44,40,39,37,37,36,35,35,34,34,34,33,33,33,33,33,33,34,34,34,35,35,36,36,37,38,39,41,43,45,48,47,43,40,38,37,36,36,35,34,34,34,33,33,33,33,33,33,33,33,34,34,35,35,36,36,37,38,39,40,42,45,48,46,42,40,38,37,36,36,35,34,34,34,33,33,33,33,33,33,33,33,34,34,35,35,36,36,37,37,39,40,42,45,47,45,42,39,38,37,36,35,35,34,34,33,33,33,33,33,33,33,33,33,34,34,34,35,35,36,37,37,38,40,42,44,47,44,41,39,38,37,36,35,35,34,34,33,33,33,33,32,32,33,33,33,33,34,34,35,35,36,36,37,38,40,41,44,47,43,41,39,38,37,36,35,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,36,37,38,39,41,44,46,43,41,39,38,37,36,35,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,36,37,38,39,41,44,46,43,41,39,38,37,36,35,35,34,34,33,33,33,32,32,32,32,32,33,33,34,34,35,35,36,36,37,38,39,41,44,46,43,41,39,38,37,36,35,35,34,34,33,33,32,32,32,32,32,32,33,33,34,34,34,35,36,36,37,38,39,41,44,46,43,41,39,38,37,36,35,35,34,34,33,33,33,32,32,32,32,32,33,33,34,34,34,35,36,36,37,38,39,41,44,46,43,41,39,38,37,36,35,35,34,34,33,33,33,32,32,32,32,32,33,33,34,34,35,35,36,36,37,38,40,41,44,46,43,41,39,38,37,36,35,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,36,37,38,40,41,44,47,43,41,39,38,37,36,35,35,34,34,33,33,33,33,32,32,33,33,33,33,34,34,35,35,36,37,37,38,40,42,44,47,44,42,40,38,37,36,36,35,34,34,34,33,33,33,33,33,33,33,33,33,34,34,35,35,36,37,37,39,40,42,44,47,44,42,40,38,37,36,36,35,35,34,34,33,33,33,33,33,33,33,33,34,34,35,35,36,36,37,38,39,40,42,45,48,45,42,40,39,37,37,36,35,35,34,34,34,33,33,33,33,33,33,34,34,34,35,35,36,36,37,38,39,41,43,45,48,46,43,41,39,38,37,36,35,35,35,34,34,34,33,33,33,33,34,34,34,34,35,35,36,36,37,38,39,41,43,46,49,47,44,41,39,38,37,36,36,35,35,35,34,34,34,34,34,34,34,34,34,35,35,35,36,37,37,38,40,42,44,46,50,48,44,41,40,38,37,37,36,35,35,35,34,34,34,34,34,34,34,34,34,35,35,36,36,37,38,39,40,42,44,47,51,50,46,42,40,39,38,37,36,36,35,35,35,34,34,34,34,34,35,34,35,35,36,36,37,37,38,39,41,43,45,48,52,53,47,43,41,39,38,37,37,36,36,35,35,35,34,34,34,35,34,35,35,35,36,36,37,37,38,40,41,43,46,49,53,57,50,44,41,40,39,38,37,36,36,36,35,35,35,35,35,35,35,35,35,36,36,37,37,38,39,40,42,44,47,50,55,62,52,45,42,40,39,38,37,37,36,36,36,35,35,35,35,35,35,35,36,36,36,37,38,38,39,41,43,45,48,52,57,70,56,46,43,41,40,39,38,37,37,36,36,36,35,35,35,35,36,36,36,36,37,37,38,39,40,42,44,46,49,54,60,77,57,47,43,42,40,39,38,37,37,37,36,36,36,36,36,36,36,36,36,37,37,38,38,39,41,42,44,47,50,55,63}; - -// CALIBRATION_SHADING_LS_A_B -static uint8_t _calibration_shading_ls_a_b[] = {97,65,50,43,40,38,37,36,36,35,35,35,35,35,34,35,35,35,35,35,36,36,37,37,38,39,41,42,44,47,55,66,83,61,49,42,40,38,37,36,36,35,35,35,35,34,34,35,35,35,35,35,36,36,37,37,38,39,40,42,44,47,54,61,74,57,46,41,39,38,37,36,36,35,35,35,34,34,34,34,34,35,35,35,36,36,36,37,37,39,40,41,43,46,50,55,66,53,44,40,39,38,37,36,35,35,35,34,34,34,34,34,34,34,35,35,36,36,36,37,37,38,39,41,43,45,48,53,60,50,42,40,38,37,37,36,35,35,34,34,34,34,34,34,34,34,34,35,35,36,36,37,37,38,39,40,42,44,47,51,55,47,41,39,38,37,36,35,35,35,34,34,34,33,34,34,34,34,34,35,35,35,36,37,37,38,39,40,42,44,47,49,51,45,41,39,38,37,36,35,35,34,34,34,33,33,33,33,34,34,34,35,35,35,36,36,37,38,38,39,41,43,46,49,49,44,40,39,37,37,36,35,35,34,34,34,33,33,33,33,34,34,34,34,35,35,36,36,37,37,38,39,41,43,45,48,46,43,40,38,38,37,36,35,34,34,34,33,33,33,33,33,33,33,34,34,35,35,35,36,37,37,38,39,40,42,45,47,45,42,40,38,37,36,36,35,34,34,33,33,33,33,33,33,33,33,34,34,34,35,35,36,37,37,38,39,40,42,44,47,44,41,39,38,37,36,35,35,34,34,33,33,33,33,33,33,33,33,33,34,34,35,35,36,36,37,38,38,40,42,44,46,43,41,39,38,37,36,35,35,34,34,33,33,33,33,32,32,33,33,33,34,34,34,35,36,36,37,38,38,40,41,44,46,43,41,39,38,37,36,35,35,34,34,33,33,33,33,32,32,33,33,33,34,34,34,35,35,36,37,37,38,40,41,43,46,42,41,39,38,37,36,35,35,34,34,33,33,33,32,32,32,33,33,33,34,34,34,35,36,36,37,37,38,39,41,43,46,42,40,39,37,37,36,35,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,37,37,38,39,41,43,45,42,41,39,38,37,36,35,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,37,37,38,39,41,43,45,42,40,39,37,37,36,35,35,34,34,33,33,32,32,32,32,32,33,33,33,34,34,35,35,36,37,37,38,39,41,43,45,42,40,39,38,37,36,35,35,34,34,33,33,33,32,32,32,33,33,33,34,34,34,35,35,36,37,37,38,40,41,43,45,42,40,39,38,37,36,35,35,34,34,33,33,33,32,32,32,33,33,33,33,34,34,35,36,36,37,37,38,40,42,43,46,42,41,39,38,37,36,35,35,34,34,33,33,33,33,33,33,33,33,33,34,34,34,35,36,37,37,38,38,40,42,44,46,43,41,39,38,37,36,36,35,34,34,33,33,33,33,33,33,33,33,33,34,34,35,35,36,37,37,38,39,40,42,44,46,43,41,40,38,37,36,36,35,35,34,34,33,33,33,33,33,33,33,34,34,34,35,35,36,37,37,38,39,40,42,44,47,44,42,40,39,37,36,36,35,35,34,34,33,33,33,33,33,33,34,34,34,34,35,35,36,37,37,38,39,41,42,45,48,45,42,40,39,38,37,36,35,35,34,34,34,33,33,33,33,34,34,34,34,35,35,36,36,37,37,38,40,41,43,45,48,46,43,41,39,38,37,36,36,35,35,34,34,34,34,34,34,34,34,34,34,35,35,36,36,37,37,38,40,41,43,46,49,47,44,41,40,38,37,36,36,35,35,35,34,34,34,34,34,34,34,34,35,35,35,36,36,37,38,39,40,42,44,47,50,49,45,42,40,39,38,37,36,36,35,35,35,34,34,34,34,34,35,35,35,35,36,36,37,37,38,39,41,42,45,47,51,52,47,42,41,39,38,37,36,36,36,35,35,35,34,34,35,35,35,35,35,36,36,36,37,38,38,40,41,43,45,48,52,56,49,44,41,40,38,37,37,36,36,35,35,35,35,35,35,35,35,35,36,36,36,37,37,38,39,40,42,44,46,49,53,61,52,45,42,41,39,38,37,36,36,36,35,35,35,35,35,35,35,36,36,36,37,37,38,38,39,41,43,45,47,51,55,68,55,46,43,41,40,38,37,37,36,36,36,35,35,35,35,35,36,36,36,36,37,37,38,39,40,41,43,46,48,53,58,75,56,47,43,41,40,39,38,37,37,36,36,36,35,35,35,36,36,36,36,37,37,37,38,39,41,42,44,46,49,54,61}; - -// CALIBRATION_SHADING_LS_TL84_R -static uint8_t _calibration_shading_ls_tl84_r[] = {113,72,53,46,42,40,39,38,37,37,36,36,36,35,35,35,36,36,36,36,37,37,38,38,39,40,42,44,47,51,59,73,94,66,52,44,41,40,39,37,37,36,36,36,35,35,35,35,35,35,36,36,36,37,37,38,39,40,41,44,46,49,57,67,81,60,49,43,41,39,38,37,37,36,35,35,35,35,35,35,35,35,35,36,36,36,37,38,38,40,41,43,45,48,54,60,72,56,46,42,40,39,38,37,36,36,35,35,35,34,34,34,35,35,35,35,36,36,37,37,38,39,40,42,44,47,51,57,65,53,44,41,40,38,37,37,36,35,35,34,34,34,34,34,34,34,35,35,35,36,36,37,38,38,40,41,44,46,50,54,60,50,43,41,39,38,37,36,36,35,35,34,34,34,34,34,34,34,34,35,35,36,36,37,38,38,39,41,43,46,49,53,55,48,42,41,39,38,37,36,35,35,34,34,34,33,33,33,34,34,34,35,35,35,36,36,37,38,39,40,42,45,48,52,52,46,42,40,39,37,37,36,35,35,34,34,33,33,33,33,33,34,34,34,35,35,36,36,37,38,39,40,42,44,48,51,49,45,41,40,38,37,36,36,35,34,34,34,33,33,33,33,33,33,34,34,35,35,36,36,37,37,38,40,42,44,47,51,48,44,41,40,38,37,36,36,35,34,34,33,33,33,33,33,33,33,33,34,34,35,35,36,37,37,38,39,41,43,46,50,47,44,41,39,38,37,36,35,35,34,34,33,33,33,33,33,33,33,33,34,34,35,35,36,36,37,38,39,41,43,46,49,46,43,41,39,38,37,36,35,35,34,33,33,33,33,32,32,33,33,33,34,34,35,35,36,36,37,38,39,41,43,46,49,45,43,41,39,38,37,36,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,37,38,39,41,43,45,49,45,43,40,39,38,37,36,35,35,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,37,38,39,40,43,45,49,45,42,40,39,37,37,36,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,37,38,39,40,42,45,49,45,42,40,39,38,37,36,35,34,34,33,33,33,32,32,32,32,32,33,33,34,34,35,35,36,37,38,39,40,42,45,48,45,42,40,39,38,37,36,35,34,34,33,33,32,32,32,32,32,32,33,33,34,34,35,35,36,37,37,39,40,42,45,48,45,42,41,39,38,37,36,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,37,38,39,41,42,45,48,45,43,41,39,38,37,36,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,37,38,39,41,43,45,49,45,43,41,39,38,37,36,35,35,34,34,33,33,32,32,32,33,33,33,33,34,34,35,36,36,37,38,39,41,43,46,49,46,43,41,39,38,37,36,35,35,34,34,33,33,33,33,33,33,33,33,33,34,34,35,36,37,37,38,39,41,43,46,49,46,44,41,39,38,37,36,35,35,34,34,34,33,33,33,33,33,33,33,34,34,35,35,36,37,37,38,39,41,44,47,50,47,44,42,40,38,37,37,36,35,35,34,34,33,33,33,33,33,33,34,34,34,35,35,36,37,37,38,40,42,44,47,50,47,45,42,40,39,38,37,36,35,35,34,34,34,33,33,33,33,33,34,34,35,35,36,36,37,38,39,40,42,45,48,51,49,45,43,41,39,38,37,36,35,35,35,34,34,34,33,34,34,34,34,34,35,35,36,36,37,38,39,41,43,45,48,52,51,47,43,41,39,38,37,36,36,35,35,34,34,34,34,34,34,34,34,35,35,35,36,37,37,38,39,41,43,46,49,53,53,48,44,42,40,39,38,37,36,36,35,35,34,34,34,34,34,34,34,35,35,36,36,37,38,39,40,42,44,47,50,54,56,50,45,42,41,39,38,37,36,36,36,35,35,35,34,34,35,34,35,35,36,36,37,37,38,39,41,42,45,48,51,56,61,52,46,43,41,40,38,37,37,36,36,35,35,35,35,35,35,35,35,35,36,36,37,38,38,40,41,43,45,49,52,57,67,55,47,44,42,40,39,38,37,37,36,36,36,35,35,35,35,35,36,36,36,37,37,38,39,40,42,44,47,50,54,59,76,60,49,45,43,41,40,39,38,37,37,36,36,36,36,36,36,36,36,36,37,37,38,39,40,41,43,45,48,51,57,63,85,61,50,45,43,42,40,39,38,38,37,37,36,36,36,36,36,36,36,37,37,38,38,39,40,42,44,46,49,53,59,67}; - -// CALIBRATION_SHADING_LS_TL84_G -static uint8_t _calibration_shading_ls_tl84_g[] = {100,65,50,43,40,39,38,37,36,36,36,35,35,35,35,35,35,35,35,36,36,36,37,37,38,39,41,43,45,48,55,67,85,62,49,42,40,38,37,37,36,36,35,35,35,35,35,35,35,35,35,35,36,36,37,37,38,39,40,42,44,47,54,62,75,57,46,41,39,38,37,36,36,35,35,35,35,34,34,35,35,35,35,35,36,36,36,37,37,38,40,41,43,46,51,56,67,53,44,40,39,38,37,36,36,35,35,35,34,34,34,34,34,34,35,35,35,36,36,37,37,38,39,41,43,45,49,54,61,50,42,40,38,37,36,36,35,35,35,34,34,34,34,34,34,34,34,35,35,36,36,36,37,38,39,40,42,44,47,51,56,47,41,39,38,37,36,36,35,35,34,34,34,34,34,34,34,34,34,35,35,35,36,36,37,38,38,40,41,44,47,50,52,46,41,39,38,37,36,35,35,34,34,34,34,33,33,33,34,34,34,34,35,35,36,36,37,37,38,39,41,43,46,49,49,44,40,39,37,37,36,35,35,34,34,34,33,33,33,33,33,33,34,34,34,35,35,36,37,37,38,39,41,43,45,48,47,43,40,38,37,36,36,35,35,34,34,33,33,33,33,33,33,33,34,34,34,35,35,36,36,37,38,39,40,42,45,48,45,42,40,38,37,36,36,35,34,34,34,33,33,33,33,33,33,33,33,34,34,34,35,36,36,37,37,39,40,42,44,47,44,42,39,38,37,36,35,35,34,34,33,33,33,33,33,33,33,33,33,34,34,34,35,35,36,37,37,38,40,42,44,47,44,41,39,38,37,36,35,35,34,34,33,33,33,33,32,32,33,33,33,33,34,34,35,35,36,36,37,38,39,41,44,47,43,41,39,38,37,36,35,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,36,37,38,39,41,44,46,43,41,39,37,37,36,35,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,36,37,38,39,41,43,46,43,41,39,37,37,36,35,35,34,34,33,33,33,32,32,32,32,32,33,33,34,34,34,35,36,36,37,38,39,41,43,46,43,41,39,37,37,36,35,35,34,34,33,33,33,32,32,32,32,32,33,33,33,34,34,35,36,36,37,38,39,41,43,46,43,41,39,38,37,36,35,35,34,34,33,33,33,32,32,32,32,32,33,33,33,34,34,35,36,36,37,38,39,41,43,46,43,41,39,38,37,36,35,35,34,34,33,33,33,32,32,32,32,32,33,33,34,34,34,35,36,36,37,38,39,41,43,46,43,41,39,38,37,36,35,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,34,35,36,36,37,38,39,41,44,46,43,41,39,38,37,36,35,35,34,34,33,33,33,33,32,32,33,33,33,33,34,34,35,35,36,36,37,38,40,42,44,47,44,42,40,38,37,36,36,35,34,34,34,33,33,33,33,33,33,33,33,33,34,34,35,35,36,37,37,38,40,42,44,47,44,42,40,38,37,36,36,35,35,34,34,33,33,33,33,33,33,33,33,34,34,34,35,35,36,37,37,39,40,42,45,47,45,42,40,39,37,37,36,35,35,34,34,34,33,33,33,33,33,33,33,34,34,35,35,36,36,37,38,39,40,43,45,48,46,43,41,39,38,37,36,35,35,35,34,34,34,33,33,33,33,33,34,34,34,35,35,36,36,37,38,39,41,43,46,49,47,44,41,39,38,37,36,36,35,35,35,34,34,34,34,34,34,34,34,34,35,35,35,36,37,37,38,40,41,43,46,50,48,45,42,40,38,37,37,36,35,35,35,34,34,34,34,34,34,34,34,34,35,35,36,36,37,37,39,40,42,44,47,50,50,46,42,40,39,38,37,36,36,35,35,35,34,34,34,34,34,35,34,35,35,35,36,36,37,38,39,41,42,45,48,52,53,47,43,41,39,38,37,37,36,36,36,35,35,35,35,35,35,35,35,35,35,36,36,37,37,38,39,41,43,46,49,53,57,50,44,42,40,39,38,37,36,36,36,35,35,35,35,35,35,35,35,35,36,36,37,37,38,39,40,42,44,46,50,54,62,52,45,42,40,39,38,37,37,36,36,36,35,35,35,35,35,35,35,36,36,36,37,37,38,39,41,43,45,47,52,56,70,56,47,43,41,40,39,38,37,37,36,36,36,36,35,36,36,36,36,36,36,37,37,38,39,40,41,43,46,49,54,59,77,57,48,43,42,40,39,38,37,37,37,36,36,36,36,36,36,36,36,36,37,37,38,38,39,40,42,44,46,50,55,62}; - -// CALIBRATION_SHADING_LS_TL84_B -static uint8_t _calibration_shading_ls_tl84_b[] = {97,65,49,43,40,38,37,37,36,36,35,35,35,35,35,35,35,35,35,36,36,36,37,37,38,39,40,42,44,47,54,65,83,61,49,42,40,38,37,36,36,35,35,35,35,35,34,35,35,35,35,35,36,36,37,37,38,39,40,42,44,46,53,61,73,56,46,41,39,38,37,36,36,35,35,35,34,34,34,34,34,35,35,35,36,36,36,37,37,38,40,41,43,45,50,55,65,52,44,40,39,37,37,36,35,35,35,34,34,34,34,34,34,34,35,35,36,36,36,37,37,38,39,41,42,45,48,53,59,49,42,40,38,37,36,36,35,35,34,34,34,34,34,34,34,34,35,35,35,36,36,37,37,38,39,40,42,44,47,50,55,47,41,39,38,37,36,36,35,35,34,34,34,34,34,34,34,34,34,35,35,35,36,36,37,38,38,40,41,44,46,49,51,45,41,39,38,37,36,35,35,34,34,34,34,33,33,33,34,34,34,34,35,35,36,36,37,38,38,39,41,43,45,48,48,44,40,39,37,37,36,35,35,34,34,34,33,33,33,33,33,34,34,34,35,35,36,36,37,37,38,39,40,42,45,47,46,43,40,38,37,36,36,35,35,34,34,34,33,33,33,33,33,33,34,34,34,35,35,36,37,37,38,39,40,42,44,47,45,42,40,38,37,36,35,35,34,34,34,33,33,33,33,33,33,33,34,34,34,35,35,36,37,37,38,38,40,42,44,46,44,41,39,38,37,36,35,35,34,34,33,33,33,33,33,33,33,33,33,34,34,35,35,35,36,37,37,38,40,41,44,46,43,41,39,38,37,36,35,35,34,34,33,33,33,33,32,33,33,33,33,34,34,34,35,35,36,36,37,38,39,41,43,45,43,41,39,37,37,36,35,35,34,34,33,33,33,33,32,32,33,33,33,33,34,34,35,35,36,36,37,38,39,41,43,45,42,40,39,38,37,36,35,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,36,37,38,39,41,43,45,42,40,39,37,37,36,35,35,34,34,33,33,32,32,32,32,32,33,33,33,34,34,35,35,36,36,37,38,39,41,43,45,42,40,39,37,37,36,35,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,36,37,38,39,41,43,45,42,40,39,37,37,36,35,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,36,37,38,39,41,43,45,42,40,39,37,37,36,35,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,36,37,38,39,41,43,45,42,40,39,38,37,36,35,35,34,34,33,33,33,32,32,32,33,33,33,33,34,34,35,35,36,36,37,38,39,41,43,45,42,41,39,38,37,36,35,35,34,34,33,33,33,33,33,32,33,33,33,33,34,34,35,35,36,37,37,38,40,41,43,46,43,41,39,38,37,36,35,35,34,34,33,33,33,33,33,33,33,33,33,33,34,34,35,36,36,37,37,38,40,41,44,46,44,41,40,38,37,36,36,35,34,34,34,33,33,33,33,33,33,33,33,34,34,35,35,36,36,37,37,38,40,42,44,46,44,42,40,38,37,37,36,35,35,34,34,34,33,33,33,33,33,33,34,34,34,35,35,36,36,37,38,39,40,42,44,47,45,42,40,39,37,37,36,35,35,34,34,34,33,33,33,33,33,33,34,34,34,35,35,36,36,37,38,39,41,42,45,48,46,43,41,39,38,37,36,36,35,35,34,34,34,34,33,33,34,34,34,34,35,35,35,36,36,37,38,39,41,43,45,48,47,44,41,40,38,37,36,36,35,35,34,34,34,34,34,34,34,34,34,34,35,35,36,36,37,37,38,40,41,44,46,49,49,45,42,40,38,38,37,36,36,35,35,34,34,34,34,34,34,35,34,35,35,36,36,36,37,38,39,40,42,44,47,50,53,47,42,41,39,38,37,36,36,36,35,35,35,34,34,34,35,35,35,35,35,36,36,37,37,38,39,41,43,45,48,51,57,49,43,41,40,38,37,37,36,36,35,35,35,35,35,35,35,35,35,35,36,36,37,37,38,38,40,41,43,46,49,53,61,52,44,42,40,39,38,37,37,36,36,35,35,35,35,35,35,35,35,36,36,36,37,37,38,39,40,42,44,47,50,54,68,55,46,42,41,39,38,37,37,36,36,36,35,35,35,35,35,36,36,36,36,37,37,38,38,40,41,43,45,48,52,57,76,56,47,43,41,40,39,38,37,37,36,36,36,36,35,36,36,36,36,36,37,37,37,38,39,40,42,43,46,49,54,60}; - -// CALIBRATION_SHADING_LS_D65_R -static uint8_t _calibration_shading_ls_d65_r[] = {110,70,53,45,42,40,39,38,37,37,36,36,36,35,35,35,35,36,36,36,37,37,38,38,39,40,42,44,47,50,59,73,93,66,52,44,41,40,39,38,37,36,36,36,35,35,35,35,35,35,36,36,36,37,37,38,39,40,41,43,46,49,57,67,81,60,49,43,41,39,38,37,37,36,35,35,35,35,35,35,35,35,35,35,36,36,37,38,38,39,41,43,45,48,53,60,72,56,46,42,40,39,38,37,36,36,35,35,35,34,34,34,35,35,35,35,36,36,37,37,38,39,40,42,44,47,51,57,65,52,44,41,40,38,37,37,36,35,35,35,34,34,34,34,34,34,35,35,35,36,36,37,38,38,40,41,44,46,50,54,59,50,43,41,39,38,37,36,36,35,35,34,34,34,34,34,34,34,34,35,35,36,36,37,37,38,39,41,43,46,49,53,55,48,43,40,39,38,37,36,35,35,34,34,34,33,34,34,34,34,34,34,35,36,36,37,37,38,39,40,42,45,48,52,52,46,42,40,39,38,37,36,35,35,34,34,33,33,33,33,33,34,34,34,35,35,36,36,37,38,39,40,42,44,47,51,49,45,42,40,38,37,36,36,35,34,34,34,33,33,33,33,33,33,34,34,35,35,36,36,37,38,38,40,41,44,47,50,48,44,41,40,38,37,36,36,35,34,34,34,33,33,33,33,33,33,33,34,34,35,35,36,37,37,38,39,41,43,46,50,46,43,41,39,38,37,36,35,35,34,34,33,33,33,33,33,33,33,33,34,34,35,35,36,36,37,38,39,41,43,46,49,45,43,41,39,38,37,36,35,35,34,34,33,33,33,33,32,33,33,33,34,34,35,35,36,36,37,38,39,41,43,45,49,45,43,41,39,38,37,36,35,35,34,33,33,33,33,32,32,33,33,33,33,34,34,35,36,36,37,38,39,40,43,45,49,45,42,40,39,38,37,36,35,35,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,37,37,38,40,42,45,48,44,42,40,39,38,37,36,35,34,34,34,33,33,32,32,32,32,32,33,33,34,34,35,35,36,37,37,38,40,42,45,48,44,42,40,39,38,37,36,35,34,34,33,33,33,32,32,32,32,32,33,33,34,34,35,35,36,37,37,39,40,42,45,48,44,42,40,39,38,37,36,35,34,34,34,33,33,32,32,32,32,32,33,33,34,34,35,35,36,37,37,38,40,42,45,48,45,42,40,39,38,37,36,35,34,34,34,33,33,32,32,32,32,33,33,33,34,34,35,35,36,37,37,39,40,42,45,48,45,43,41,39,38,37,36,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,37,38,39,40,42,45,48,45,43,41,39,38,37,36,35,35,34,34,33,33,33,32,32,33,33,33,33,34,34,35,36,36,37,38,39,40,43,45,49,45,43,41,39,38,37,36,35,35,34,34,33,33,33,33,33,33,33,33,33,34,34,35,36,36,37,38,39,41,43,46,49,46,43,41,39,38,37,36,36,35,34,34,34,33,33,33,33,33,33,33,34,34,35,35,36,36,37,38,39,41,43,46,49,47,44,42,40,39,37,37,36,35,35,34,34,33,33,33,33,33,33,34,34,34,35,35,36,37,37,38,40,42,44,47,50,47,44,42,40,39,38,37,36,35,35,34,34,34,33,33,33,33,33,34,34,34,35,35,36,37,38,39,40,42,44,47,51,48,45,43,41,39,38,37,36,35,35,35,34,34,34,34,33,34,34,34,34,35,35,36,36,37,38,39,40,43,45,48,52,50,46,43,41,39,38,37,36,36,35,35,34,34,34,34,34,34,34,34,34,35,35,36,36,37,38,39,41,43,45,49,53,53,48,44,42,40,39,38,37,36,36,35,35,34,34,34,34,34,35,34,35,35,36,36,37,37,38,40,41,44,46,50,54,56,49,44,42,41,39,38,37,37,36,36,35,35,35,34,34,35,35,35,35,36,36,36,37,38,39,40,42,44,47,51,55,61,52,45,43,41,40,38,37,37,36,36,35,35,35,35,35,35,35,35,35,36,36,37,37,38,39,41,43,45,48,52,57,66,55,47,44,42,40,39,38,37,37,36,36,36,35,35,35,35,35,36,36,36,37,37,38,39,40,42,44,46,50,54,59,76,60,49,45,43,41,40,39,38,37,37,36,36,36,36,36,36,36,36,36,37,37,38,38,40,41,43,45,47,51,56,63,84,61,50,46,44,42,40,39,38,38,37,37,36,36,36,36,36,36,36,37,37,38,38,39,40,42,44,46,49,52,58,66}; - -// CALIBRATION_SHADING_LS_D65_G -static uint8_t _calibration_shading_ls_d65_g[] = {99,65,50,43,40,39,38,37,36,36,36,35,35,35,35,35,35,35,35,36,36,36,37,37,38,39,41,42,44,48,55,67,85,61,49,42,40,38,37,37,36,36,35,35,35,35,35,35,35,35,35,35,36,36,37,37,38,39,40,42,44,47,54,62,74,57,46,41,39,38,37,36,36,35,35,35,35,35,34,35,35,35,35,35,36,36,36,37,37,38,40,41,43,46,51,56,67,53,44,40,39,38,37,36,36,35,35,35,34,34,34,34,34,34,35,35,35,36,36,37,37,38,39,41,43,45,49,54,61,50,42,40,38,37,36,36,35,35,35,34,34,34,34,34,34,34,34,35,35,35,36,36,37,38,39,40,42,44,47,51,56,47,41,39,38,37,36,36,35,35,34,34,34,34,34,34,34,34,34,34,35,35,36,36,37,37,38,40,41,44,47,50,52,45,41,39,38,37,36,35,35,35,34,34,34,33,33,33,34,34,34,34,35,35,35,36,37,37,38,39,41,43,46,49,49,44,40,39,37,37,36,35,35,34,34,34,33,33,33,33,33,33,34,34,34,35,35,36,36,37,38,39,41,43,45,48,47,43,40,38,37,36,36,35,35,34,34,33,33,33,33,33,33,33,33,34,34,35,35,36,36,37,38,39,40,42,45,48,45,42,40,38,37,36,36,35,34,34,34,33,33,33,33,33,33,33,33,34,34,34,35,35,36,37,37,38,40,42,44,47,44,42,39,38,37,36,35,35,34,34,34,33,33,33,33,33,33,33,33,33,34,34,35,35,36,36,37,38,40,42,44,47,44,41,39,38,37,36,35,35,34,34,33,33,33,33,32,32,33,33,33,33,34,34,35,35,36,36,37,38,39,41,44,46,43,41,39,38,37,36,35,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,36,37,38,39,41,43,46,43,41,39,37,37,36,35,35,34,34,33,33,33,32,32,32,32,32,33,33,34,34,34,35,36,36,37,38,39,41,43,46,43,41,39,37,37,36,35,35,34,34,33,33,33,32,32,32,32,32,33,33,33,34,34,35,36,36,37,38,39,41,43,46,43,41,39,37,37,36,35,35,34,34,33,33,33,32,32,32,32,32,33,33,33,34,34,35,35,36,37,38,39,41,43,46,43,41,39,38,37,36,35,35,34,34,33,33,33,32,32,32,32,32,33,33,33,34,34,35,35,36,37,38,39,41,43,46,43,41,39,38,37,36,35,35,34,34,33,33,33,32,32,32,32,32,33,33,33,34,34,35,36,36,37,38,39,41,43,46,43,41,39,38,37,36,35,35,34,34,33,33,33,33,32,32,32,33,33,33,34,34,34,35,36,36,37,38,39,41,43,46,43,41,39,38,37,36,35,35,34,34,34,33,33,33,33,32,33,33,33,33,34,34,34,35,36,36,37,38,39,41,44,46,44,42,40,38,37,36,36,35,34,34,34,33,33,33,33,33,33,33,33,33,34,34,35,35,36,36,37,38,40,42,44,47,44,42,40,38,37,36,36,35,35,34,34,33,33,33,33,33,33,33,33,34,34,34,35,35,36,36,37,38,40,42,44,47,45,42,40,39,37,37,36,35,35,34,34,34,33,33,33,33,33,33,33,34,34,34,35,35,36,37,37,39,40,42,45,48,46,43,41,39,38,37,36,36,35,35,34,34,34,33,33,33,33,33,34,34,34,35,35,36,36,37,38,39,41,43,45,48,47,44,41,39,38,37,36,36,35,35,35,34,34,34,34,34,34,34,34,34,35,35,35,36,36,37,38,39,41,43,46,49,48,44,42,40,38,37,37,36,36,35,35,34,34,34,34,34,34,34,34,34,35,35,36,36,37,37,38,40,42,44,47,50,50,46,42,40,39,38,37,36,36,35,35,35,34,34,34,34,34,35,34,35,35,35,36,36,37,38,39,40,42,44,48,51,53,47,43,41,39,38,37,37,36,36,36,35,35,35,35,35,35,35,35,35,35,36,36,37,37,38,39,41,43,45,49,52,58,50,44,42,40,39,38,37,36,36,36,35,35,35,35,35,35,35,35,35,36,36,36,37,38,39,40,42,44,46,50,54,62,52,45,42,41,39,38,37,37,36,36,36,35,35,35,35,35,35,35,36,36,36,37,37,38,39,41,42,44,47,51,56,70,56,47,43,41,40,39,38,37,37,36,36,36,36,36,36,36,36,36,36,36,37,37,38,39,40,41,43,45,48,53,59,77,57,47,43,42,40,39,38,38,37,37,36,36,36,36,36,36,36,36,36,37,37,37,38,39,40,42,44,46,49,55,62}; - -// CALIBRATION_SHADING_LS_D65_B -static uint8_t _calibration_shading_ls_d65_b[] = {97,65,49,43,40,38,37,37,36,36,35,35,35,35,35,35,35,35,35,35,36,36,37,37,38,39,40,42,44,47,54,65,83,61,49,42,39,38,37,36,36,35,35,35,35,34,35,35,35,35,35,35,36,36,37,37,38,39,40,42,44,46,53,61,73,56,46,41,39,38,37,36,36,35,35,35,34,34,34,34,34,35,35,35,36,36,36,37,37,38,39,41,43,45,50,55,65,52,44,40,39,37,37,36,35,35,35,35,34,34,34,34,34,34,35,35,35,36,36,37,37,38,39,41,42,44,48,53,59,49,42,40,38,37,36,36,35,35,35,34,34,34,34,34,34,34,35,35,35,36,36,36,37,38,39,40,42,44,47,50,55,47,41,39,38,37,36,35,35,35,34,34,34,34,34,34,34,34,34,35,35,35,36,36,37,38,38,39,41,43,46,49,51,45,41,39,38,37,36,35,35,34,34,34,34,33,33,33,34,34,34,34,35,35,36,36,37,37,38,39,41,43,45,48,48,44,40,39,37,37,36,35,35,34,34,34,33,33,33,33,33,34,34,34,35,35,36,36,37,37,38,39,40,42,45,47,46,43,40,38,37,36,36,35,35,34,34,33,33,33,33,33,33,33,34,34,34,35,35,36,37,37,38,39,40,42,44,47,45,42,40,38,37,36,36,35,34,34,34,33,33,33,33,33,33,33,33,34,34,35,35,36,37,37,38,38,40,42,44,46,44,41,39,38,37,36,35,35,34,34,34,33,33,33,33,33,33,33,33,34,34,34,35,35,36,37,37,38,40,41,43,46,43,41,39,38,37,36,35,35,34,34,33,33,33,33,33,33,33,33,33,33,34,34,35,35,36,36,37,38,39,41,43,45,42,41,39,37,37,36,35,35,34,34,33,33,33,32,32,32,33,33,33,33,34,34,35,35,36,36,37,38,39,41,43,45,42,40,39,37,37,36,35,34,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,36,37,38,39,41,43,45,42,40,39,37,36,36,35,35,34,34,33,33,32,32,32,32,32,33,33,33,34,34,35,35,36,36,37,38,39,41,43,45,42,40,39,37,37,36,35,35,34,34,33,33,33,32,32,32,32,32,33,33,34,34,35,35,36,36,37,38,39,41,43,45,42,40,39,37,36,36,35,34,34,34,33,33,33,32,32,32,32,33,33,33,34,34,34,35,36,36,37,38,39,41,43,45,42,40,39,37,37,36,35,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,34,35,36,36,37,38,39,41,43,45,42,40,39,38,37,36,35,35,34,34,33,33,33,32,32,32,32,33,33,33,34,34,35,35,36,36,37,38,39,41,43,45,43,41,39,38,37,36,35,35,34,34,33,33,33,33,32,32,33,33,33,33,34,34,35,35,36,36,37,38,39,41,43,45,43,41,39,38,37,36,35,35,34,34,33,33,33,33,33,33,33,33,33,33,34,34,35,35,36,37,37,38,40,41,43,46,43,41,39,38,37,36,36,35,34,34,34,33,33,33,33,33,33,33,33,34,34,34,35,35,36,37,37,38,40,42,44,46,44,42,40,38,37,36,36,35,35,34,34,33,33,33,33,33,33,33,33,34,34,35,35,35,36,37,37,39,40,42,44,47,45,42,40,39,37,37,36,35,35,34,34,34,33,33,33,33,33,33,34,34,34,35,35,36,36,37,38,39,40,42,45,47,46,43,41,39,38,37,36,35,35,35,34,34,34,33,33,33,34,34,34,34,34,35,35,36,36,37,38,39,41,43,45,48,47,44,41,39,38,37,36,36,35,35,34,34,34,34,34,34,34,34,34,34,35,35,35,36,37,37,38,40,41,43,46,49,49,45,42,40,38,37,37,36,36,35,35,34,34,34,34,34,34,35,34,35,35,35,36,36,37,38,39,40,42,44,47,50,52,47,42,40,39,38,37,36,36,35,35,35,35,34,34,34,35,35,35,35,35,36,36,37,37,38,39,41,42,45,48,51,57,49,43,41,40,38,37,37,36,36,35,35,35,35,35,35,35,35,35,35,36,36,36,37,37,38,40,41,43,46,49,53,61,52,44,42,40,39,38,37,36,36,36,35,35,35,35,35,35,35,35,36,36,36,37,37,38,39,40,42,44,46,50,54,69,55,46,43,41,39,38,37,37,36,36,36,35,35,35,35,35,35,36,36,36,36,37,37,38,39,41,43,45,48,52,57,76,56,47,43,41,40,38,37,37,37,36,36,36,36,35,35,36,36,36,36,36,37,37,38,39,40,42,43,46,49,53,60}; - - -// R G B -static uint16_t _calibration_awb_warming_ls_a[] = {268, 256, 271}; - -// R G B -static uint16_t _calibration_awb_warming_ls_d75[] = {268, 256, 271}; - -// R G B -static uint16_t _calibration_awb_warming_ls_d50[] = {268, 256, 271}; - -// CALIBRATION_NOISE_PROFILE -static uint8_t _calibration_noise_profile[] = {0, 0, 0, 0, 0, 0, 0, 0, 5, 18, 23, 27, 30, 33, 34, 36, 37, 39, 40, 41, 42, 43, 43, 44, 45, 46, 46, 47, 47, 48, 48, 49, 49, 50, 50, 51, 51, 52, 52, 52, 53, 53, 53, 54, 54, 54, 55, 55, 55, 55, 56, 56, 56, 56, 57, 57, 57, 57, 58, 58, 58, 58, 59, 59, 59, 59, 59, 60, 60, 60, 60, 60, 60, 61, 61, 61, 61, 61, 62, 62, 62, 62, 62, 62, 62, 63, 63, 63, 63, 63, 63, 63, 64, 64, 64, 64, 64, 64, 64, 65, 65, 65, 65, 65, 65, 65, 65, 65, 66, 66, 66, 66, 66, 66, 66, 66, 66, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 68}; - -// CALIBRATION_DEMOSAIC -static uint8_t _calibration_demosaic[] = {7, 23, 29, 33, 36, 38, 40, 42, 43, 44, 46, 47, 48, 49, 50, 50, 51, 52, 52, 53, 53, 54, 55, 55, 55, 56, 56, 57, 57, 58, 58, 58, 59, 59, 59, 60, 60, 60, 61, 61, 61, 62, 62, 62, 62, 63, 63, 63, 63, 64, 64, 64, 64, 64, 65, 65, 65, 65, 65, 66, 66, 66, 66, 66, 67, 67, 67, 67, 67, 67, 68, 68, 68, 68, 68, 68, 69, 69, 69, 69, 69, 69, 69, 70, 70, 70, 70, 70, 70, 70, 71, 71, 71, 71, 71, 71, 71, 71, 71, 72, 72, 72, 72, 72, 72, 72, 72, 72, 73, 73, 73, 73, 73, 73, 73, 73, 73, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74}; - -// 8-bit normalised noise profile for WDR stitching -static uint8_t _calibration_wdr_np_lut[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - -// CALIBRATION_GAMMA -static uint16_t _calibration_gamma[] = {0, 347, 539, 679, 794, 894, 982, 1062, 1136, 1204, 1268, 1329, 1386, 1441, 1493, 1543, 1591, 1638, 1683, 1726, 1768, 1809, 1849, 1888, 1926, 1963, 1999, 2034, 2068, 2102, 2135, 2168, 2200, 2231, 2262, 2292, 2322, 2351, 2380, 2408, 2436, 2463, 2491, 2517, 2544, 2570, 2596, 2621, 2646, 2671, 2695, 2719, 2743, 2767, 2790, 2814, 2836, 2859, 2882, 2904, 2926, 2948, 2969, 2990, 3012, 3033, 3053, 3074, 3094, 3115, 3135, 3155, 3174, 3194, 3213, 3233, 3252, 3271, 3290, 3308, 3327, 3345, 3364, 3382, 3400, 3418, 3436, 3453, 3471, 3488, 3506, 3523, 3540, 3557, 3574, 3591, 3607, 3624, 3640, 3657, 3673, 3689, 3705, 3721, 3737, 3753, 3769, 3785, 3800, 3816, 3831, 3846, 3862, 3877, 3892, 3907, 3922, 3937, 3951, 3966, 3981, 3995, 4010, 4024, 4039, 4053, 4067, 4081, 4095}; - -// CALIBRATION_IRIDIX_ASYMMETRY -static uint32_t _calibration_iridix_asymmetry[] = { - 0, 61184, 116961, 168002, 214899, 258115, 298084, 335172, 369653, 401797, 431862, 460022, 486454, 511335, 534791, 556919, 577880, 597720, 616568, 634473, 651529, 667785, 683305, 698153, 712346, 725978, 739050, 751610, 763706, 775355, 786587, 797451, 807931, 818091, 827947, 837499, 846780, 855820, 864604, 873180, 881532, 889708, 897708, 905532, 913213, 920733, 928141, 935421, 942589, 949645, 956621, 963501, 970317, 977053, 983742, 990366, 996942, 1003470, 1009982, 1016446, 1022894, 1029326, 1035742, 1042158, 1048575, -}; - -// CALIBRATION_CA_FILTER_MEM -static uint32_t _calibration_ca_filter_mem[] = {32768,229629,491259,4278943225,4279204855,4262689525,4246239220,4229788915,4213338610,4196888050,4197214450,4180763890,4164313330,4147928050,4131477235,4115091955,4098641140,4082190325,4082516470,4066065655,4066391800,4066652665,4066913530,4067239930,4067500795,4084473340,4101445885,4118418430,4152037375,4185721855,4219340544,4253025024}; - -// calibration_awb_scene_presets in the following order AWB_DAY_LIGHT AWB_CLOUDY AWB_INCANDESCENT AWB_FLOURESCENT AWB_TWILIGHT AWB_SHADE AWB_WARM_FLOURESCENT -static uint16_t _calibration_awb_scene_presets[7][2] = { - { 256, 256 }, - { 324, 217 }, - { 177, 397 }, - { 227, 285 }, - { 227, 285 }, - { 366, 196 }, - { 188, 358 }}; - -// CALIBRATION_CA_CORRECTION: MIN_CORRECTION, MESH_WIDTH, MESH_HEIGHT -static uint16_t _calibration_ca_correction[] = {1, 64, 64}; - - -// CALIBRATION_CA_CORRECTION_MEM -static uint16_t _calibration_ca_correction_mem[][10] = { - { 65490, 65535, 65533, 65533, 59, 0, 5, 65517, 65535, 5 }, - { 65535, 65509, 65532, 4, 14, 26, 65531, 65523, 65535, 20 }, - { 65496, 65532, 65506, 0, 71, 33, 18, 65534, 65518, 65483 }, - { 65531, 65521, 65531, 65523, 15, 25, 21, 65523, 6, 65492 }}; - -static uint32_t _calibration_lut3d_mem[] = {0}; - -static uint32_t _calibration_decompander0_mem[] = {0, 32768, 65536, 98304, 131072, 163840, 196608, 229376, 262144, 294912, 327680, 360448, 393216, 425984, 458752, 491520, 524288, 557055, 589823, 622591, 655359, 688127, 720895, 753663, 786431, 819199, 851967, 884735, 917503, 950271, 983039, 1015807, 1048575}; -static uint32_t _calibration_decompander1_mem[] = {0, 4096, 8192, 12288, 16384, 20480, 24576, 28672, 32768, 36864, 40960, 45056, 49152, 53248, 57344, 61440, 65536, 69632, 73728, 77824, 81920, 86016, 90112, 94208, 98304, 102400, 106496, 110592, 114688, 118784, 122880, 126976, 131072, 135168, 139264, 143360, 147456, 151552, 155648, 159744, 163840, 167936, 172032, 176128, 180224, 184320, 188416, 192512, 196608, 200704, 204800, 208896, 212992, 217088, 221184, 225280, 229376, 233472, 237568, 241664, 245760, 249856, 253952, 258048, 262144, 266240, 270336, 274432, 278528, 282624, 286720, 290816, 294912, 299008, 303104, 307200, 311296, 315392, 319488, 323584, 327680, 331776, 335872, 339968, 344064, 348160, 352256, 356352, 360448, 364544, 368640, 372736, 376832, 380928, 385024, 389120, 393216, 397312, 401408, 405504, 409600, 413696, 417792, 421888, 425984, 430080, 434176, 438272, 442368, 446464, 450560, 454656, 458752, 462848, 466944, 471040, 475136, 479232, 483328, 487424, 491520, 495616, 499712, 503808, 507904, 512000, 516096, 520192, 524288, 528383, 532479, 536575, 540671, 544767, 548863, 552959, 557055, 561151, 565247, 569343, 573439, 577535, 581631, 585727, 589823, 593919, 598015, 602111, 606207, 610303, 614399, 618495, 622591, 626687, 630783, 634879, 638975, 643071, 647167, 651263, 655359, 659455, 663551, 667647, 671743, 675839, 679935, 684031, 688127, 692223, 696319, 700415, 704511, 708607, 712703, 716799, 720895, 724991, 729087, 733183, 737279, 741375, 745471, 749567, 753663, 757759, 761855, 765951, 770047, 774143, 778239, 782335, 786431, 790527, 794623, 798719, 802815, 806911, 811007, 815103, 819199, 823295, 827391, 831487, 835583, 839679, 843775, 847871, 851967, 856063, 860159, 864255, 868351, 872447, 876543, 880639, 884735, 888831, 892927, 897023, 901119, 905215, 909311, 913407, 917503, 921599, 925695, 929791, 933887, 937983, 942079, 946175, 950271, 954367, 958463, 962559, 966655, 970751, 974847, 978943, 983039, 987135, 991231, 995327, 999423, 1003519, 1007615, 1011711, 1015807, 1019903, 1023999, 1028095, 1032191, 1036287, 1040383, 1044479, 1048575}; - -// CALIBRATION_SHADING_RADIAL_R -static uint16_t _calibration_shading_radial_r[] = {4096, 4113, 4130, 4147, 4164, 4182, 4199, 4216, 4234, 4251, 4269, 4286, 4304, 4322, 4340, 4357, 4375, 4393, 4411, 4430, 4448, 4466, 4484, 4503, 4521, 4540, 4558, 4577, 4596, 4614, 4633, 4652, 4671, 4690, 4709, 4728, 4747, 4767, 4786, 4805, 4825, 4844, 4864, 4883, 4903, 4923, 4943, 4963, 4983, 5003, 5023, 5043, 5063, 5084, 5104, 5124, 5145, 5165, 5186, 5207, 5227, 5248, 5269, 5290, 5311, 5332, 5354, 5375, 5396, 5417, 5439, 5460, 5482, 5504, 5526, 5547, 5569, 5591, 5613, 5635, 5658, 5680, 5702, 5725, 5747, 5770, 5793, 5815, 5838, 5861, 5884, 5907, 5930, 5954, 5977, 6001, 6024, 6048, 6072, 6095, 6119, 6143, 6167, 6192, 6216, 6240, 6265, 6290, 6314, 6339, 6364, 6389, 6415, 6440, 6465, 6491, 6517, 6542, 6568, 6594, 6621, 6647, 6673, 6700, 6727, 6754, 6781, 6808, 6835}; - -// CALIBRATION_SHADING_RADIAL_G -static uint16_t _calibration_shading_radial_g[] = {4096, 4108, 4120, 4133, 4145, 4157, 4170, 4182, 4195, 4207, 4220, 4233, 4246, 4258, 4271, 4284, 4297, 4310, 4323, 4336, 4350, 4363, 4376, 4389, 4403, 4416, 4430, 4443, 4457, 4471, 4485, 4498, 4512, 4526, 4540, 4554, 4568, 4582, 4596, 4611, 4625, 4639, 4654, 4668, 4682, 4697, 4712, 4726, 4741, 4756, 4771, 4785, 4800, 4815, 4830, 4845, 4860, 4876, 4891, 4906, 4922, 4937, 4952, 4968, 4983, 4999, 5015, 5030, 5046, 5062, 5078, 5094, 5110, 5126, 5142, 5158, 5174, 5191, 5207, 5223, 5240, 5256, 5273, 5290, 5306, 5323, 5340, 5357, 5374, 5391, 5408, 5425, 5442, 5459, 5477, 5494, 5512, 5529, 5547, 5564, 5582, 5600, 5618, 5636, 5654, 5672, 5690, 5708, 5726, 5745, 5763, 5782, 5800, 5819, 5838, 5857, 5876, 5895, 5914, 5933, 5952, 5972, 5991, 6011, 6031, 6051, 6070, 6090, 6111}; - -// CALIBRATION_SHADING_RADIAL_B -static uint16_t _calibration_shading_radial_b[] = {4096, 4107, 4118, 4128, 4139, 4150, 4161, 4172, 4183, 4194, 4205, 4216, 4228, 4239, 4250, 4261, 4272, 4284, 4295, 4307, 4318, 4329, 4341, 4352, 4364, 4376, 4387, 4399, 4411, 4422, 4434, 4446, 4458, 4470, 4482, 4493, 4505, 4517, 4530, 4542, 4554, 4566, 4578, 4590, 4603, 4615, 4627, 4640, 4652, 4664, 4677, 4689, 4702, 4714, 4727, 4740, 4752, 4765, 4778, 4791, 4803, 4816, 4829, 4842, 4855, 4868, 4881, 4894, 4908, 4921, 4934, 4947, 4960, 4974, 4987, 5001, 5014, 5028, 5041, 5055, 5068, 5082, 5096, 5110, 5123, 5137, 5151, 5165, 5179, 5193, 5207, 5221, 5236, 5250, 5264, 5279, 5293, 5308, 5322, 5337, 5351, 5366, 5381, 5396, 5411, 5426, 5441, 5456, 5471, 5486, 5501, 5517, 5532, 5548, 5563, 5579, 5595, 5610, 5626, 5642, 5658, 5674, 5691, 5707, 5723, 5740, 5756, 5773, 5790}; - - -static LookupTable calibration_shading_radial_r = {.ptr = _calibration_shading_radial_r, .rows = 1, .cols = sizeof( _calibration_shading_radial_r ) / sizeof( _calibration_shading_radial_r[0] ), .width = sizeof( _calibration_shading_radial_r[0] )}; -static LookupTable calibration_shading_radial_g = {.ptr = _calibration_shading_radial_g, .rows = 1, .cols = sizeof( _calibration_shading_radial_g ) / sizeof( _calibration_shading_radial_g[0] ), .width = sizeof( _calibration_shading_radial_g[0] )}; -static LookupTable calibration_shading_radial_b = {.ptr = _calibration_shading_radial_b, .rows = 1, .cols = sizeof( _calibration_shading_radial_b ) / sizeof( _calibration_shading_radial_b[0] ), .width = sizeof( _calibration_shading_radial_b[0] )}; -static LookupTable calibration_decompander0_mem = {.ptr = _calibration_decompander0_mem, .rows = 1, .cols = sizeof( _calibration_decompander0_mem ) / sizeof( _calibration_decompander0_mem[0] ), .width = sizeof( _calibration_decompander0_mem[0] )}; -static LookupTable calibration_decompander1_mem = {.ptr = _calibration_decompander1_mem, .rows = 1, .cols = sizeof( _calibration_decompander1_mem ) / sizeof( _calibration_decompander1_mem[0] ), .width = sizeof( _calibration_decompander1_mem[0] )}; - -static LookupTable calibration_awb_scene_presets = {.ptr = _calibration_awb_scene_presets, .cols = 2, .rows = sizeof( _calibration_awb_scene_presets ) / sizeof( _calibration_awb_scene_presets[0] ), .width = sizeof( _calibration_awb_scene_presets[0][0] )}; -static LookupTable calibration_light_src = {.ptr = _calibration_light_src, .cols = 2, .rows = sizeof( _calibration_light_src ) / sizeof( _calibration_light_src[0] ), .width = sizeof( _calibration_light_src[0][0] )}; -static LookupTable calibration_rg_pos = {.ptr = _calibration_rg_pos, .rows = 1, .cols = sizeof( _calibration_rg_pos ) / sizeof( _calibration_rg_pos[0] ), .width = sizeof( _calibration_rg_pos[0] )}; -static LookupTable calibration_bg_pos = {.ptr = _calibration_bg_pos, .rows = 1, .cols = sizeof( _calibration_bg_pos ) / sizeof( _calibration_bg_pos[0] ), .width = sizeof( _calibration_bg_pos[0] )}; -static LookupTable calibration_mesh_rgbg_weight = {.ptr = _calibration_mesh_rgbg_weight, .cols = 15, .rows = sizeof( _calibration_mesh_rgbg_weight ) / sizeof( _calibration_mesh_rgbg_weight[0] ), .width = sizeof( _calibration_mesh_rgbg_weight[0][0] )}; -static LookupTable calibration_mesh_ls_weight = {.ptr = _calibration_mesh_ls_weight, .cols = 15, .rows = sizeof( _calibration_mesh_ls_weight ) / sizeof( _calibration_mesh_ls_weight[0] ), .width = sizeof( _calibration_mesh_ls_weight[0][0] )}; -static LookupTable calibration_mesh_color_temperature = {.ptr = _calibration_mesh_color_temperature, .cols = 15, .rows = sizeof( _calibration_mesh_color_temperature ) / sizeof( _calibration_mesh_color_temperature[0] ), .width = sizeof( _calibration_mesh_color_temperature[0][0] )}; -static LookupTable calibration_wb_strength = {.ptr = _calibration_wb_strength, .rows = 1, .cols = sizeof( _calibration_wb_strength ) / sizeof( _calibration_wb_strength[0] ), .width = sizeof( _calibration_wb_strength[0] )}; -static LookupTable calibration_sky_lux_th = {.ptr = _calibration_sky_lux_th, .rows = 1, .cols = sizeof( _calibration_sky_lux_th ) / sizeof( _calibration_sky_lux_th[0] ), .width = sizeof( _calibration_sky_lux_th[0] )}; -static LookupTable calibration_ct_rg_pos_calc = {.ptr = _calibration_ct_rg_pos_calc, .rows = 1, .cols = sizeof( _calibration_ct_rg_pos_calc ) / sizeof( _calibration_ct_rg_pos_calc[0] ), .width = sizeof( _calibration_ct_rg_pos_calc[0] )}; -static LookupTable calibration_ct_bg_pos_calc = {.ptr = _calibration_ct_bg_pos_calc, .rows = 1, .cols = sizeof( _calibration_ct_bg_pos_calc ) / sizeof( _calibration_ct_bg_pos_calc[0] ), .width = sizeof( _calibration_ct_bg_pos_calc[0] )}; -static LookupTable calibration_color_temp = {.ptr = _calibration_color_temp, .rows = 1, .cols = sizeof( _calibration_color_temp ) / sizeof( _calibration_color_temp[0] ), .width = sizeof( _calibration_color_temp[0] )}; -static LookupTable calibration_ct65pos = {.ptr = _calibration_ct65pos, .rows = 1, .cols = sizeof( _calibration_ct65pos ) / sizeof( _calibration_ct65pos[0] ), .width = sizeof( _calibration_ct65pos[0] )}; -static LookupTable calibration_ct40pos = {.ptr = _calibration_ct40pos, .rows = 1, .cols = sizeof( _calibration_ct40pos ) / sizeof( _calibration_ct40pos[0] ), .width = sizeof( _calibration_ct40pos[0] )}; -static LookupTable calibration_ct30pos = {.ptr = _calibration_ct30pos, .rows = 1, .cols = sizeof( _calibration_ct30pos ) / sizeof( _calibration_ct30pos[0] ), .width = sizeof( _calibration_ct30pos[0] )}; -static LookupTable calibration_evtolux_ev_lut = {.ptr = _calibration_evtolux_ev_lut, .rows = 1, .cols = sizeof( _calibration_evtolux_ev_lut ) / sizeof( _calibration_evtolux_ev_lut[0] ), .width = sizeof( _calibration_evtolux_ev_lut[0] )}; -static LookupTable calibration_evtolux_lux_lut = {.ptr = _calibration_evtolux_lux_lut, .rows = 1, .cols = sizeof( _calibration_evtolux_lux_lut ) / sizeof( _calibration_evtolux_lux_lut[0] ), .width = sizeof( _calibration_evtolux_lux_lut[0] )}; -static LookupTable calibration_black_level_r = {.ptr = _calibration_black_level_r, .cols = 2, .rows = sizeof( _calibration_black_level_r ) / sizeof( _calibration_black_level_r[0] ), .width = sizeof( _calibration_black_level_r[0][0] )}; -static LookupTable calibration_black_level_gr = {.ptr = _calibration_black_level_gr, .cols = 2, .rows = sizeof( _calibration_black_level_gr ) / sizeof( _calibration_black_level_gr[0] ), .width = sizeof( _calibration_black_level_gr[0][0] )}; -static LookupTable calibration_black_level_gb = {.ptr = _calibration_black_level_gb, .cols = 2, .rows = sizeof( _calibration_black_level_gb ) / sizeof( _calibration_black_level_gb[0] ), .width = sizeof( _calibration_black_level_gb[0][0] )}; -static LookupTable calibration_black_level_b = {.ptr = _calibration_black_level_b, .cols = 2, .rows = sizeof( _calibration_black_level_b ) / sizeof( _calibration_black_level_b[0] ), .width = sizeof( _calibration_black_level_b[0][0] )}; -static LookupTable calibration_static_wb = {.ptr = _calibration_static_wb, .rows = 1, .cols = sizeof( _calibration_static_wb ) / sizeof( _calibration_static_wb[0] ), .width = sizeof( _calibration_static_wb[0] )}; -static LookupTable calibration_mt_absolute_ls_a_ccm = {.ptr = _calibration_mt_absolute_ls_a_ccm, .rows = 1, .cols = sizeof( _calibration_mt_absolute_ls_a_ccm ) / sizeof( _calibration_mt_absolute_ls_a_ccm[0] ), .width = sizeof( _calibration_mt_absolute_ls_a_ccm[0] )}; -static LookupTable calibration_mt_absolute_ls_d40_ccm = {.ptr = _calibration_mt_absolute_ls_d40_ccm, .rows = 1, .cols = sizeof( _calibration_mt_absolute_ls_d40_ccm ) / sizeof( _calibration_mt_absolute_ls_d40_ccm[0] ), .width = sizeof( _calibration_mt_absolute_ls_d40_ccm[0] )}; -static LookupTable calibration_mt_absolute_ls_d50_ccm = {.ptr = _calibration_mt_absolute_ls_d50_ccm, .rows = 1, .cols = sizeof( _calibration_mt_absolute_ls_d50_ccm ) / sizeof( _calibration_mt_absolute_ls_d50_ccm[0] ), .width = sizeof( _calibration_mt_absolute_ls_d50_ccm[0] )}; -static LookupTable calibration_shading_ls_a_r = {.ptr = _calibration_shading_ls_a_r, .rows = 1, .cols = sizeof( _calibration_shading_ls_a_r ) / sizeof( _calibration_shading_ls_a_r[0] ), .width = sizeof( _calibration_shading_ls_a_r[0] )}; -static LookupTable calibration_shading_ls_a_g = {.ptr = _calibration_shading_ls_a_g, .rows = 1, .cols = sizeof( _calibration_shading_ls_a_g ) / sizeof( _calibration_shading_ls_a_g[0] ), .width = sizeof( _calibration_shading_ls_a_g[0] )}; -static LookupTable calibration_shading_ls_a_b = {.ptr = _calibration_shading_ls_a_b, .rows = 1, .cols = sizeof( _calibration_shading_ls_a_b ) / sizeof( _calibration_shading_ls_a_b[0] ), .width = sizeof( _calibration_shading_ls_a_b[0] )}; -static LookupTable calibration_shading_ls_tl84_r = {.ptr = _calibration_shading_ls_tl84_r, .rows = 1, .cols = sizeof( _calibration_shading_ls_tl84_r ) / sizeof( _calibration_shading_ls_tl84_r[0] ), .width = sizeof( _calibration_shading_ls_tl84_r[0] )}; -static LookupTable calibration_shading_ls_tl84_g = {.ptr = _calibration_shading_ls_tl84_g, .rows = 1, .cols = sizeof( _calibration_shading_ls_tl84_g ) / sizeof( _calibration_shading_ls_tl84_g[0] ), .width = sizeof( _calibration_shading_ls_tl84_g[0] )}; -static LookupTable calibration_shading_ls_tl84_b = {.ptr = _calibration_shading_ls_tl84_b, .rows = 1, .cols = sizeof( _calibration_shading_ls_tl84_b ) / sizeof( _calibration_shading_ls_tl84_b[0] ), .width = sizeof( _calibration_shading_ls_tl84_b[0] )}; -static LookupTable calibration_shading_ls_d65_r = {.ptr = _calibration_shading_ls_d65_r, .rows = 1, .cols = sizeof( _calibration_shading_ls_d65_r ) / sizeof( _calibration_shading_ls_d65_r[0] ), .width = sizeof( _calibration_shading_ls_d65_r[0] )}; -static LookupTable calibration_shading_ls_d65_g = {.ptr = _calibration_shading_ls_d65_g, .rows = 1, .cols = sizeof( _calibration_shading_ls_d65_g ) / sizeof( _calibration_shading_ls_d65_g[0] ), .width = sizeof( _calibration_shading_ls_d65_g[0] )}; -static LookupTable calibration_shading_ls_d65_b = {.ptr = _calibration_shading_ls_d65_b, .rows = 1, .cols = sizeof( _calibration_shading_ls_d65_b ) / sizeof( _calibration_shading_ls_d65_b[0] ), .width = sizeof( _calibration_shading_ls_d65_b[0] )}; -static LookupTable calibration_awb_warming_ls_a = {.ptr = _calibration_awb_warming_ls_a, .rows = 1, .cols = sizeof( _calibration_awb_warming_ls_a ) / sizeof( _calibration_awb_warming_ls_a[0] ), .width = sizeof( _calibration_awb_warming_ls_a[0] )}; -static LookupTable calibration_awb_warming_ls_d50 = {.ptr = _calibration_awb_warming_ls_d50, .rows = 1, .cols = sizeof( _calibration_awb_warming_ls_d50 ) / sizeof( _calibration_awb_warming_ls_d50[0] ), .width = sizeof( _calibration_awb_warming_ls_d50[0] )}; -static LookupTable calibration_awb_warming_ls_d75 = {.ptr = _calibration_awb_warming_ls_d75, .rows = 1, .cols = sizeof( _calibration_awb_warming_ls_d75 ) / sizeof( _calibration_awb_warming_ls_d75[0] ), .width = sizeof( _calibration_awb_warming_ls_d75[0] )}; -static LookupTable calibration_noise_profile = {.ptr = _calibration_noise_profile, .rows = 1, .cols = sizeof( _calibration_noise_profile ) / sizeof( _calibration_noise_profile[0] ), .width = sizeof( _calibration_noise_profile[0] )}; -static LookupTable calibration_demosaic = {.ptr = _calibration_demosaic, .rows = 1, .cols = sizeof( _calibration_demosaic ) / sizeof( _calibration_demosaic[0] ), .width = sizeof( _calibration_demosaic[0] )}; -static LookupTable calibration_wdr_np_lut = {.ptr = _calibration_wdr_np_lut, .rows = 1, .cols = sizeof( _calibration_wdr_np_lut ) / sizeof( _calibration_wdr_np_lut[0] ), .width = sizeof( _calibration_wdr_np_lut[0] )}; -static LookupTable calibration_gamma = {.ptr = _calibration_gamma, .rows = 1, .cols = sizeof( _calibration_gamma ) / sizeof( _calibration_gamma[0] ), .width = sizeof( _calibration_gamma[0] )}; -static LookupTable calibration_iridix_asymmetry = {.ptr = _calibration_iridix_asymmetry, .rows = 1, .cols = sizeof( _calibration_iridix_asymmetry ) / sizeof( _calibration_iridix_asymmetry[0] ), .width = sizeof( _calibration_iridix_asymmetry[0] )}; -static LookupTable calibration_ca_filter_mem = {.ptr = _calibration_ca_filter_mem, .rows = 1, .cols = sizeof( _calibration_ca_filter_mem ) / sizeof( _calibration_ca_filter_mem[0] ), .width = sizeof( _calibration_ca_filter_mem[0] )}; -static LookupTable calibration_ca_correction = {.ptr = _calibration_ca_correction, .rows = 1, .cols = sizeof( _calibration_ca_correction ) / sizeof( _calibration_ca_correction[0] ), .width = sizeof( _calibration_ca_correction[0] )}; -static LookupTable calibration_ca_correction_mem = {.ptr = _calibration_ca_correction_mem, .cols = 10, .rows = sizeof( _calibration_ca_correction_mem ) / sizeof( _calibration_ca_correction_mem[0] ), .width = sizeof( _calibration_ca_correction_mem[0][0] )}; -static LookupTable calibration_lut3d_mem = {.ptr = _calibration_lut3d_mem, .rows = 1, .cols = sizeof( _calibration_lut3d_mem ) / sizeof( _calibration_lut3d_mem[0] ), .width = sizeof( _calibration_lut3d_mem[0] )}; - -uint32_t get_calibrations_static_fs_lin_os08a10_slt( ACameraCalibrations *c ) -{ - uint32_t result = 0; - if ( c != 0 ) { - c->calibrations[CALIBRATION_SHADING_RADIAL_R] = &calibration_shading_radial_r; - c->calibrations[CALIBRATION_SHADING_RADIAL_G] = &calibration_shading_radial_g; - c->calibrations[CALIBRATION_SHADING_RADIAL_B] = &calibration_shading_radial_b; - c->calibrations[CALIBRATION_DECOMPANDER0_MEM] = &calibration_decompander0_mem; - c->calibrations[CALIBRATION_DECOMPANDER1_MEM] = &calibration_decompander1_mem; - c->calibrations[CALIBRATION_LIGHT_SRC] = &calibration_light_src; - c->calibrations[CALIBRATION_RG_POS] = &calibration_rg_pos; - c->calibrations[CALIBRATION_BG_POS] = &calibration_bg_pos; - c->calibrations[CALIBRATION_MESH_RGBG_WEIGHT] = &calibration_mesh_rgbg_weight; - c->calibrations[CALIBRATION_MESH_LS_WEIGHT] = &calibration_mesh_ls_weight; - c->calibrations[CALIBRATION_MESH_COLOR_TEMPERATURE] = &calibration_mesh_color_temperature; - c->calibrations[CALIBRATION_WB_STRENGTH] = &calibration_wb_strength; - c->calibrations[CALIBRATION_SKY_LUX_TH] = &calibration_sky_lux_th; - c->calibrations[CALIBRATION_CT_RG_POS_CALC] = &calibration_ct_rg_pos_calc; - c->calibrations[CALIBRATION_CT_BG_POS_CALC] = &calibration_ct_bg_pos_calc; - c->calibrations[CALIBRATION_COLOR_TEMP] = &calibration_color_temp; - c->calibrations[CALIBRATION_CT65POS] = &calibration_ct65pos; - c->calibrations[CALIBRATION_CT40POS] = &calibration_ct40pos; - c->calibrations[CALIBRATION_CT30POS] = &calibration_ct30pos; - c->calibrations[CALIBRATION_EVTOLUX_EV_LUT] = &calibration_evtolux_ev_lut; - c->calibrations[CALIBRATION_EVTOLUX_LUX_LUT] = &calibration_evtolux_lux_lut; - c->calibrations[CALIBRATION_BLACK_LEVEL_R] = &calibration_black_level_r; - c->calibrations[CALIBRATION_BLACK_LEVEL_GR] = &calibration_black_level_gr; - c->calibrations[CALIBRATION_BLACK_LEVEL_GB] = &calibration_black_level_gb; - c->calibrations[CALIBRATION_BLACK_LEVEL_B] = &calibration_black_level_b; - c->calibrations[CALIBRATION_STATIC_WB] = &calibration_static_wb; - c->calibrations[CALIBRATION_MT_ABSOLUTE_LS_A_CCM] = &calibration_mt_absolute_ls_a_ccm; - c->calibrations[CALIBRATION_MT_ABSOLUTE_LS_D40_CCM] = &calibration_mt_absolute_ls_d40_ccm; - c->calibrations[CALIBRATION_MT_ABSOLUTE_LS_D50_CCM] = &calibration_mt_absolute_ls_d50_ccm; - c->calibrations[CALIBRATION_SHADING_LS_A_R] = &calibration_shading_ls_a_r; - c->calibrations[CALIBRATION_SHADING_LS_A_G] = &calibration_shading_ls_a_g; - c->calibrations[CALIBRATION_SHADING_LS_A_B] = &calibration_shading_ls_a_b; - c->calibrations[CALIBRATION_SHADING_LS_TL84_R] = &calibration_shading_ls_tl84_r; - c->calibrations[CALIBRATION_SHADING_LS_TL84_G] = &calibration_shading_ls_tl84_g; - c->calibrations[CALIBRATION_SHADING_LS_TL84_B] = &calibration_shading_ls_tl84_b; - c->calibrations[CALIBRATION_SHADING_LS_D65_R] = &calibration_shading_ls_d65_r; - c->calibrations[CALIBRATION_SHADING_LS_D65_G] = &calibration_shading_ls_d65_g; - c->calibrations[CALIBRATION_SHADING_LS_D65_B] = &calibration_shading_ls_d65_b; - c->calibrations[CALIBRATION_AWB_WARMING_LS_A] = &calibration_awb_warming_ls_a; - c->calibrations[CALIBRATION_AWB_WARMING_LS_D50] = &calibration_awb_warming_ls_d50; - c->calibrations[CALIBRATION_AWB_WARMING_LS_D75] = &calibration_awb_warming_ls_d75; - c->calibrations[CALIBRATION_NOISE_PROFILE] = &calibration_noise_profile; - c->calibrations[CALIBRATION_DEMOSAIC] = &calibration_demosaic; - c->calibrations[CALIBRATION_WDR_NP_LUT] = &calibration_wdr_np_lut; - c->calibrations[CALIBRATION_GAMMA] = &calibration_gamma; - c->calibrations[CALIBRATION_IRIDIX_ASYMMETRY] = &calibration_iridix_asymmetry; - c->calibrations[CALIBRATION_AWB_SCENE_PRESETS] = &calibration_awb_scene_presets; - c->calibrations[CALIBRATION_CA_FILTER_MEM] = &calibration_ca_filter_mem; - c->calibrations[CALIBRATION_CA_CORRECTION] = &calibration_ca_correction; - c->calibrations[CALIBRATION_CA_CORRECTION_MEM] = &calibration_ca_correction_mem; - c->calibrations[CALIBRATION_LUT3D_MEM] = &calibration_lut3d_mem; - } else { - result = -1; - } - return result; -} diff --git a/unionpi_tiger/kernel/drivers/isp/drivers/subdev/iq/src/calibration/acamera_calibrations_static_fs_lin_os08a10_tv.c b/unionpi_tiger/kernel/drivers/isp/drivers/subdev/iq/src/calibration/acamera_calibrations_static_fs_lin_os08a10_tv.c deleted file mode 100644 index 56c7782..0000000 --- a/unionpi_tiger/kernel/drivers/isp/drivers/subdev/iq/src/calibration/acamera_calibrations_static_fs_lin_os08a10_tv.c +++ /dev/null @@ -1,366 +0,0 @@ -/* -* -* SPDX-License-Identifier: GPL-2.0 -* -* Copyright (C) 2011-2018 ARM or its affiliates -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; version 2. -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. -* You should have received a copy of the GNU General Public License along -* with this program; if not, write to the Free Software Foundation, Inc., -* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -* -*/ - -#include "acamera_command_api.h" -//#include "acamera_firmware_api.h" -#include "acamera_firmware_settings.h" -// created from 2016-10-19T16:42:58.865Z UTClinear.json - -// CALIBRATION_LIGHT_SRC -static uint16_t _calibration_light_src[][2] = { - {283,233}}; - -// CALIBRATION_RG_POS -static uint16_t _calibration_rg_pos[] = {165,180,197,214,231,256,265,282,298,315,332,349,366,383,419}; - -// CALIBRATION_BG_POS -static uint16_t _calibration_bg_pos[] = {139,159,173,186,200,213,227,240,256,267,281,294,308,321,349}; - -// CALIBRATION_MESH_RGBG_WEIGHT -static uint16_t _calibration_mesh_rgbg_weight[][15] = { - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 7, 10, 33 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 16, 85, 256, 256, 207 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 2, 24, 256, 256, 256, 90, 0 }, - { 0, 0, 0, 0, 0, 0, 0, 4, 28, 131, 256, 256, 96, 2, 0 }, - { 0, 0, 0, 0, 0, 2, 7, 45, 152, 256, 256, 113, 12, 0, 0 }, - { 0, 0, 0, 0, 0, 18, 52, 256, 256, 256, 138, 20, 1, 0, 0 }, - { 0, 0, 0, 0, 6, 117, 225, 256, 256, 152, 26, 1, 0, 0, 0 }, - { 0, 0, 0, 2, 41, 256, 256, 256, 191, 36, 3, 0, 0, 0, 0 }, - { 0, 0, 1, 34, 219, 256, 256, 180, 32, 2, 0, 0, 0, 0, 0 }, - { 0, 0, 12, 133, 256, 256, 256, 54, 5, 0, 0, 0, 0, 0, 0 }, - { 0, 2, 77, 256, 256, 130, 56, 6, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 14, 256, 256, 213, 20, 6, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 52, 256, 206, 34, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 256, 256, 23, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 11, 256, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }}; - -// CALIBRATION_MESH_LS_WEIGHT -static uint16_t _calibration_mesh_ls_weight[][15] = { - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 3, 4, 25, 42, 53, 57, 53, 42, 25, 4, 3, 0, 0 }, - { 0, 0, 4, 131, 157, 179, 193, 198, 193, 179, 157, 131, 4, 0, 0 }, - { 0, 0, 25, 157, 188, 214, 232, 238, 232, 214, 188, 157, 25, 0, 0 }, - { 0, 0, 42, 179, 214, 243, 255, 256, 255, 243, 214, 179, 42, 0, 0 }, - { 0, 0, 53, 193, 232, 255, 256, 256, 256, 255, 232, 193, 53, 0, 0 }, - { 0, 0, 57, 198, 238, 256, 256, 256, 256, 256, 238, 198, 57, 0, 0 }, - { 0, 0, 53, 193, 232, 255, 256, 256, 256, 255, 232, 193, 53, 0, 0 }, - { 0, 0, 42, 179, 214, 243, 255, 256, 255, 243, 214, 179, 42, 0, 0 }, - { 0, 0, 25, 157, 188, 214, 232, 238, 232, 214, 188, 157, 25, 0, 0 }, - { 0, 0, 4, 131, 157, 179, 193, 198, 193, 179, 157, 131, 4, 0, 0 }, - { 0, 0, 3, 4, 25, 42, 53, 57, 53, 42, 25, 4, 3, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }}; - -// CALIBRATION_MESH_COLOR_TEMPERATURE -static uint16_t _calibration_mesh_color_temperature[][15] = { - { 210, 222, 236, 250, 251, 281, 290, 305, 320, 334, 345, 356, 358, 373, 385 }, - { 189, 207, 221, 236, 250, 266, 275, 290, 305, 321, 335, 346, 357, 370, 385 }, - { 181, 192, 211, 225, 239, 252, 260, 280, 295, 311, 326, 339, 350, 368, 385 }, - { 173, 184, 197, 216, 230, 250, 252, 270, 285, 301, 317, 332, 343, 366, 385 }, - { 165, 176, 188, 206, 220, 240, 248, 258, 275, 290, 306, 322, 336, 347, 385 }, - { 157, 168, 181, 193, 210, 231, 238, 250, 265, 281, 297, 312, 328, 341, 385 }, - { 154, 160, 173, 185, 198, 221, 228, 242, 256, 270, 286, 302, 318, 334, 385 }, - { 151, 154, 165, 178, 190, 211, 219, 233, 246, 263, 276, 292, 308, 324, 385 }, - { 141, 150, 156, 168, 181, 200, 207, 221, 234, 253, 265, 280, 296, 312, 385 }, - { 134, 143, 153, 162, 174, 193, 200, 213, 226, 240, 261, 272, 288, 304, 385 }, - { 131, 134, 144, 154, 166, 185, 191, 203, 216, 230, 244, 263, 277, 293, 326 }, - { 121, 129, 136, 146, 158, 177, 184, 197, 207, 221, 235, 259, 268, 283, 317 }, - { 111, 119, 127, 138, 148, 169, 176, 188, 200, 210, 224, 238, 263, 273, 306 }, - { 101, 109, 118, 127, 139, 161, 168, 181, 193, 201, 215, 229, 258, 263, 297 }, - { 100, 100, 100, 100, 115, 128, 142, 164, 176, 189, 200, 209, 223, 237, 276 }}; - -// RG, BG, MULT. final wb gain adjuster for a sky scene. devided by CALIBRATION_WB_STRENGTH_MULT in use -static uint16_t _calibration_wb_strength[] = {1000, 1000, 1000}; - -// lux threshold for sky -static uint16_t _calibration_sky_lux_th[] = {10000}; - -// 1D rg/bg readout from color_temp -static uint16_t _calibration_ct_rg_pos_calc[] = {180,202,219,256,291,301,347,369,399}; - -// 1D rg/bg readout from color_temp -static uint16_t _calibration_ct_bg_pos_calc[] = {335,305,286,256,227,219,182,165,159}; - -// CALIBRATION_COLOR_TEMP -static uint16_t _calibration_color_temp[] = {100,133,154,200,250,263,333,357,385}; - -// CALIBRATION_CT65POS -static uint16_t _calibration_ct65pos[] = {2}; - -// CALIBRATION_CT40POS -static uint16_t _calibration_ct40pos[] = {8}; - -// CALIBRATION_CT30POS -static uint16_t _calibration_ct30pos[] = {6}; - -// CALIBRATION_EVTOLUX_EV_LUT -static uint32_t _calibration_evtolux_ev_lut[] = {398775, 444491, 477818, 528405, 620780, 744998, 821797, 1051295, 1308509, 1373840, 1436952, 1573912, 1656816, 1918045, 2075972, 2322504, 2494615}; - -// CALIBRATION_EVTOLUX_LUX_LUT -static uint32_t _calibration_evtolux_lux_lut[] = {20000, 18000, 16000, 14000, 12000, 10100, 8900, 5120, 2560, 2080, 1800, 1200, 1000, 500, 320, 160, 100}; - -// CALIBRATION_BLACK_LEVEL_R -static uint16_t _calibration_black_level_r[][2] = { - {0, 256}, - {32, 256}, - {64, 256}, - {96, 256}, - {128, 256}}; - -// CALIBRATION_BLACK_LEVEL_GR -static uint16_t _calibration_black_level_gr[][2] = { - {0, 256}, - {32, 256}, - {64, 256}, - {96, 256}, - {128, 256}}; - -// CALIBRATION_BLACK_LEVEL_GB -static uint16_t _calibration_black_level_gb[][2] = { - {0, 256}, - {32, 256}, - {64, 256}, - {96, 256}, - {128, 256}}; - -// CALIBRATION_BLACK_LEVEL_B -static uint16_t _calibration_black_level_b[][2] = { - {0, 256}, - {32, 256}, - {64, 256}, - {96, 256}, - {128, 256}}; - -// CALIBRATION_STATIC_WB -static uint16_t _calibration_static_wb[] = {510,256,256,453}; -// RR RG RB GR GG GB BR BG BB -static uint16_t _calibration_mt_absolute_ls_a_ccm[] = {424,32873,32831,32900,470,32850,34,33050,504}; - -// RR RG RB GR GG GB BR BG BB -static uint16_t _calibration_mt_absolute_ls_d40_ccm[] = {449,32916,32813,32884,470,32866,25,33011,474}; - -// RR RG RB GR GG GB BR BG BB -static uint16_t _calibration_mt_absolute_ls_d50_ccm[] = {459,32931,32808,32875,470,32875,20,32996,464}; - -// CALIBRATION_SHADING_LS_A_R -static uint8_t _calibration_shading_ls_a_r[] = {144,110,93,85,82,78,76,74,73,72,72,71,71,70,70,70,71,71,71,72,73,74,75,76,77,80,83,87,91,99,116,153,131,108,91,84,81,78,75,74,73,72,71,70,70,70,70,70,70,70,71,71,72,73,74,75,77,79,82,86,90,97,115,139,117,101,88,83,79,77,74,73,72,71,70,70,69,69,69,69,69,70,70,71,71,72,73,74,76,78,81,84,89,94,107,122,109,96,86,82,78,76,74,73,71,70,70,69,69,68,68,68,69,69,70,70,71,72,73,74,75,77,80,83,87,92,102,114,102,92,84,81,77,75,73,72,71,70,69,68,68,68,68,68,68,68,69,70,70,71,72,73,75,76,79,82,86,91,98,107,96,89,83,80,77,74,73,71,70,69,68,68,67,67,67,67,68,68,69,69,70,71,72,73,74,75,78,81,85,89,95,104,93,87,82,79,76,74,72,71,70,69,68,68,67,67,67,67,67,68,68,69,69,70,71,73,74,75,77,80,84,88,94,101,91,86,82,78,75,73,72,70,69,69,68,67,67,66,66,66,67,67,68,68,69,70,71,72,73,75,77,79,83,87,93,100,90,85,81,77,75,73,71,70,69,68,67,67,66,66,66,66,66,67,67,68,69,70,71,72,73,74,76,79,82,86,92,98,89,84,80,77,75,73,71,70,69,68,67,66,66,66,66,66,66,66,67,68,68,69,70,71,73,74,76,78,81,86,91,97,88,84,80,77,74,73,71,70,69,68,67,66,66,65,65,65,65,66,66,67,68,69,70,71,72,74,75,77,81,85,90,96,87,83,79,76,74,72,71,70,68,68,66,66,65,65,65,65,65,66,66,67,68,69,70,71,72,74,75,77,80,85,90,95,87,83,79,76,74,72,71,69,68,67,66,65,65,65,65,65,65,65,66,67,67,68,70,71,72,73,75,77,80,84,89,95,87,82,79,76,74,72,70,69,68,67,66,65,65,65,64,64,65,65,66,66,67,68,69,70,72,73,75,77,79,84,89,95,86,82,79,76,74,72,70,69,68,67,66,65,65,64,64,64,64,65,66,66,67,68,69,71,72,73,75,77,79,84,89,94,86,82,79,76,73,72,70,69,68,67,66,65,65,64,64,64,64,65,65,66,67,68,69,70,72,73,75,77,80,84,89,94,86,82,79,76,73,72,70,69,68,67,66,65,65,64,64,64,64,65,66,66,67,68,69,70,72,73,75,76,80,84,89,94,86,82,79,76,73,72,70,69,68,67,66,65,65,64,64,64,64,65,66,66,67,68,69,70,72,73,75,77,80,84,89,94,86,82,79,76,73,72,70,69,68,67,66,66,65,65,64,64,65,65,66,66,67,68,69,71,72,73,75,77,80,84,89,95,87,83,79,76,74,72,71,69,68,67,66,65,65,65,65,65,65,65,66,67,67,68,69,71,72,73,75,77,80,84,89,95,87,83,79,76,74,72,71,69,68,68,67,66,65,65,65,65,65,65,66,67,68,68,70,71,72,73,75,77,80,85,90,96,88,84,80,77,74,73,71,70,69,68,67,66,65,65,65,65,65,65,66,67,68,69,70,71,72,74,75,78,81,85,91,97,89,85,81,77,75,73,71,70,69,68,67,66,66,66,65,65,66,66,67,67,68,69,70,71,72,74,76,78,82,86,91,98,90,85,81,78,75,73,72,70,69,68,67,67,66,66,66,66,66,66,67,68,68,69,70,71,73,74,76,79,82,87,92,99,91,86,82,78,76,73,72,71,69,69,68,67,67,66,66,66,66,67,67,68,69,69,70,72,73,75,77,79,83,88,93,100,93,87,83,79,76,74,72,71,70,69,68,67,67,67,66,66,67,67,67,68,69,70,71,72,73,75,77,80,84,89,95,102,95,89,84,80,77,74,73,71,70,70,69,68,67,67,67,67,67,67,68,68,69,70,71,72,74,75,78,81,85,90,96,104,99,91,85,81,78,75,73,72,71,70,69,68,68,68,67,67,68,68,68,69,70,70,72,73,74,76,79,82,86,91,98,107,105,94,87,83,79,76,74,72,71,71,70,69,68,68,68,68,68,68,69,69,70,71,72,74,75,77,80,83,88,93,101,112,111,99,88,84,80,77,75,73,72,71,70,69,69,69,69,68,69,69,69,70,71,72,73,74,76,78,81,85,90,95,106,118,123,105,91,85,82,79,76,74,73,72,71,70,70,69,69,69,69,70,70,71,71,72,74,75,77,79,82,86,92,98,113,131,134,107,93,86,83,80,77,75,73,72,72,71,71,70,70,70,70,70,71,71,72,73,74,76,78,80,84,88,93,101,115,142}; - -// CALIBRATION_SHADING_LS_A_G -static uint8_t _calibration_shading_ls_a_g[] = {130,102,87,81,78,76,74,72,71,71,70,70,69,69,69,69,69,70,70,71,71,72,73,74,75,77,79,83,86,92,107,135,120,100,86,80,77,75,73,72,71,70,70,69,69,69,69,69,69,69,70,70,71,71,72,73,74,76,79,81,85,91,105,124,108,95,84,79,76,74,72,71,70,70,69,69,68,68,68,68,68,69,69,70,70,71,72,73,74,75,77,80,84,88,99,111,102,91,82,78,76,73,72,71,70,69,69,68,68,68,68,68,68,68,69,69,70,70,71,72,73,74,77,79,83,87,94,105,95,87,81,77,75,73,71,70,69,69,68,68,67,67,67,67,67,68,68,69,69,70,71,72,73,74,76,78,81,86,91,99,91,85,80,77,74,72,71,70,69,68,68,67,67,67,67,67,67,67,68,68,69,69,70,71,72,73,75,78,81,84,90,96,88,83,79,76,74,72,71,70,69,68,67,67,67,66,66,66,67,67,67,68,69,69,70,71,72,73,75,77,80,83,88,94,86,82,78,75,73,72,70,69,68,68,67,67,66,66,66,66,66,66,67,68,68,69,70,71,72,73,74,76,79,83,87,93,85,81,78,75,73,71,70,69,68,67,67,66,66,66,66,66,66,66,67,67,68,69,69,70,71,72,74,76,78,82,86,92,84,81,77,74,72,71,70,69,68,67,67,66,66,65,65,65,65,66,66,67,68,68,69,70,71,72,73,75,78,81,86,91,84,80,77,74,72,71,70,69,68,67,66,66,65,65,65,65,65,66,66,67,67,68,69,70,71,72,73,75,78,81,85,90,83,80,76,74,72,71,70,68,68,67,66,65,65,65,65,65,65,65,66,67,67,68,69,70,71,72,73,75,77,81,85,89,83,79,76,74,72,70,69,68,67,67,66,65,65,65,64,64,65,65,66,66,67,68,69,70,71,72,73,75,77,80,84,89,83,79,76,73,72,70,69,68,67,67,66,65,65,65,64,64,64,65,65,66,67,68,69,70,70,72,73,74,77,80,84,89,83,79,76,73,72,70,69,68,67,67,66,65,65,64,64,64,64,65,65,66,67,67,68,69,71,72,73,74,77,80,84,89,83,79,76,73,72,70,69,68,67,67,66,65,65,64,64,64,64,65,65,66,67,67,68,69,70,72,73,74,77,80,84,89,83,79,76,73,72,70,69,68,67,67,66,65,65,64,64,64,64,65,65,66,67,67,68,69,70,72,73,74,77,80,84,89,83,79,76,73,72,70,69,68,67,67,66,65,65,64,64,64,64,65,65,66,67,68,69,69,71,72,73,74,77,80,84,89,83,79,76,74,72,71,69,68,67,67,66,65,65,65,64,64,65,65,65,66,67,68,69,70,71,72,73,75,77,80,84,89,83,80,76,74,72,71,69,69,68,67,66,66,65,65,65,65,65,65,66,66,67,68,69,70,71,72,73,75,77,81,85,89,84,80,77,74,72,71,70,69,68,67,66,66,65,65,65,65,65,65,66,66,67,68,69,70,71,72,73,75,78,81,85,90,84,81,77,74,72,71,70,69,68,67,67,66,66,65,65,65,65,65,66,67,67,68,69,70,71,72,73,75,78,82,86,91,85,81,78,75,73,71,70,69,68,68,67,66,66,66,65,65,66,66,66,67,68,68,69,70,71,72,74,76,79,82,86,91,86,82,78,75,73,72,70,69,69,68,67,67,66,66,66,66,66,66,67,67,68,69,70,70,71,73,74,76,79,83,87,92,87,83,79,76,74,72,71,70,69,68,68,67,67,66,66,66,66,66,67,68,68,69,70,71,72,73,74,77,80,84,88,94,88,84,80,77,74,72,71,70,69,69,68,67,67,67,66,66,67,67,67,68,68,69,70,71,72,73,75,77,80,84,89,95,90,85,81,77,75,73,71,70,70,69,68,68,67,67,67,67,67,67,68,68,69,70,70,71,72,74,76,78,81,85,91,97,93,87,82,78,76,73,72,71,70,69,69,68,68,67,67,67,67,68,68,69,69,70,71,72,73,74,76,79,82,87,92,100,98,89,83,79,77,74,72,71,71,70,69,69,68,68,68,68,68,68,68,69,70,70,71,72,73,75,77,80,84,88,95,104,103,93,84,80,78,75,73,72,71,70,70,69,69,68,68,68,68,69,69,69,70,71,72,73,74,76,78,81,86,90,99,109,113,98,86,82,79,76,74,73,72,71,70,70,69,69,69,69,69,69,69,70,71,71,72,73,75,77,79,83,87,92,105,119,122,100,88,82,80,77,75,73,72,71,71,70,70,70,69,69,70,70,70,71,71,72,73,74,75,78,80,84,88,94,106,128}; - -// CALIBRATION_SHADING_LS_A_B -static uint8_t _calibration_shading_ls_a_b[] = {129,101,87,81,78,75,73,72,71,70,69,69,69,69,69,69,69,69,70,70,71,72,72,73,74,76,79,82,85,91,106,134,119,100,86,80,77,75,73,72,70,70,69,69,69,68,68,68,69,69,69,70,71,72,72,73,74,76,79,81,85,90,105,123,107,94,84,79,77,74,72,71,70,70,69,68,68,68,68,68,68,69,69,70,70,71,72,73,74,75,78,81,84,88,99,110,101,90,82,78,76,74,72,71,70,69,68,68,68,68,68,68,68,68,69,69,70,71,72,72,73,75,77,79,83,87,94,104,94,87,80,77,75,73,72,70,69,69,68,68,67,67,67,67,68,68,68,69,70,70,71,72,73,74,76,79,82,86,91,98,90,84,80,77,74,73,71,70,69,68,68,67,67,67,67,67,67,67,68,68,69,70,71,72,73,74,75,78,81,85,89,95,87,83,79,76,74,72,71,70,69,68,67,67,67,66,66,66,67,67,68,68,69,70,71,71,72,73,75,77,80,84,88,93,85,81,79,76,74,72,71,70,69,68,67,67,66,66,66,66,66,67,67,68,69,69,70,71,72,73,75,76,79,83,87,92,84,81,78,75,73,72,71,69,68,68,67,66,66,66,66,66,66,66,67,67,68,69,70,71,72,73,74,76,79,82,86,91,83,80,78,75,73,72,70,69,68,67,67,66,66,66,65,65,66,66,67,67,68,69,70,71,71,73,74,76,78,82,85,89,82,80,77,74,73,71,70,69,68,67,66,66,66,65,65,65,65,66,66,67,68,69,69,70,71,72,74,75,78,81,85,89,82,79,77,74,73,71,70,69,68,67,66,66,65,65,65,65,65,66,66,67,68,68,69,70,71,72,74,75,77,81,84,88,81,79,76,74,72,71,70,69,68,67,66,66,65,65,65,65,65,65,66,66,67,68,69,70,71,72,73,75,77,80,84,88,81,79,76,74,72,71,70,69,68,67,66,65,65,65,64,64,65,65,66,66,67,68,69,70,71,72,73,75,77,80,84,87,81,79,76,74,72,71,70,68,67,67,66,66,65,65,64,64,65,65,66,66,67,68,69,70,71,72,73,75,77,80,83,87,81,78,76,73,72,71,69,68,67,66,66,65,65,64,64,64,64,65,66,66,67,68,69,70,71,72,73,75,77,80,83,87,81,78,75,73,72,71,69,68,67,66,66,65,65,65,64,64,64,65,66,66,67,68,69,70,71,72,73,75,77,80,84,87,81,78,75,73,72,70,69,68,67,67,66,65,65,64,64,64,64,65,66,67,67,68,69,70,71,72,73,75,77,80,84,87,81,78,76,73,72,71,69,68,67,67,66,65,65,65,64,64,65,65,66,66,67,68,69,70,71,72,73,75,77,80,84,88,81,78,76,74,72,70,69,68,67,67,66,65,65,65,64,65,65,65,66,67,67,68,69,70,71,72,73,75,77,81,84,88,82,79,76,74,72,71,69,69,68,67,66,65,65,65,65,65,65,65,66,67,67,69,69,70,71,72,73,75,78,81,84,89,82,79,77,74,72,71,70,69,68,67,66,66,65,65,65,65,65,66,66,67,68,68,69,71,71,73,74,76,78,82,85,89,83,80,77,74,73,71,70,69,68,67,67,66,66,65,65,65,66,66,66,67,68,69,69,70,72,73,74,76,79,82,86,91,84,80,77,75,73,71,70,69,68,68,67,66,66,66,65,65,66,66,67,67,68,69,70,71,72,73,74,76,79,83,87,91,84,81,78,76,73,72,70,69,68,68,67,67,66,66,66,66,66,66,67,67,68,69,70,71,72,73,75,77,79,83,87,92,86,82,79,76,74,72,70,70,69,68,67,67,67,66,66,66,66,67,67,68,69,69,70,71,72,73,75,77,80,84,89,93,88,83,80,77,74,72,71,70,69,69,68,67,67,67,66,67,67,67,67,68,69,69,70,71,72,73,75,78,81,85,89,95,91,85,81,78,75,73,71,70,70,69,68,68,67,67,67,67,67,67,68,68,69,70,71,72,73,74,76,79,82,86,91,98,96,88,82,79,76,74,72,71,70,69,69,68,68,68,67,67,68,68,68,69,69,70,71,72,73,75,77,79,83,87,94,102,101,92,83,80,77,75,72,71,70,70,69,69,68,68,68,68,68,68,69,69,70,71,72,73,74,75,78,81,85,89,98,106,111,97,85,81,78,75,73,72,71,70,69,69,69,68,68,68,68,69,69,70,70,71,72,73,74,76,79,82,86,91,103,117,119,98,86,81,79,76,73,72,71,70,70,69,69,69,68,68,69,69,69,70,70,71,72,73,75,77,79,83,87,93,104,125}; - -// CALIBRATION_SHADING_LS_TL84_R -static uint8_t _calibration_shading_ls_tl84_r[] = {145,109,93,85,82,78,76,74,73,72,71,71,70,70,70,70,70,70,71,71,72,73,74,75,77,79,82,86,90,97,115,150,131,107,91,84,81,77,75,73,72,71,70,70,70,70,69,69,70,70,70,71,72,72,73,74,76,78,81,84,89,95,112,135,117,101,87,83,79,76,74,73,71,71,70,69,69,69,69,69,69,69,70,70,71,72,73,74,75,77,80,83,87,92,105,119,109,95,85,82,78,75,74,72,71,70,69,69,68,68,68,68,68,69,69,70,70,71,72,73,74,76,78,82,86,90,100,112,101,92,84,81,77,75,73,71,71,70,69,68,68,68,68,68,68,68,69,69,70,71,72,73,74,75,78,81,84,89,96,106,96,89,83,79,76,74,73,71,70,69,68,67,67,67,67,67,67,68,68,69,69,70,71,72,73,75,77,80,83,88,94,102,93,87,82,79,76,74,72,71,70,69,68,67,67,67,67,67,67,67,68,68,69,70,71,72,73,74,76,79,82,87,93,99,91,86,82,78,75,73,72,70,69,68,68,67,67,66,66,66,66,67,67,68,69,70,70,71,73,74,76,78,81,86,91,98,90,85,81,77,75,73,71,70,69,68,67,67,66,66,66,66,66,66,67,68,68,69,70,71,72,74,75,77,81,85,90,96,88,84,80,77,74,73,71,70,69,68,67,66,66,66,65,66,66,66,67,67,68,69,70,71,72,73,75,77,80,85,89,95,88,83,79,76,74,72,71,70,68,68,67,66,66,65,65,65,65,66,66,67,68,69,69,71,72,73,75,76,80,84,89,94,87,83,79,76,74,72,71,69,68,67,66,66,65,65,65,65,65,65,66,66,67,68,69,70,72,73,74,76,79,83,88,94,86,82,79,76,74,72,70,69,68,67,66,65,65,65,65,64,65,65,66,66,67,68,69,70,71,73,74,76,79,83,88,93,86,82,79,76,73,72,70,69,68,67,66,65,65,65,64,64,64,65,66,66,67,68,69,70,71,73,74,76,79,83,87,93,86,82,79,76,74,72,70,69,68,67,66,65,65,65,64,64,64,65,65,66,67,68,69,70,71,72,74,76,79,82,87,93,86,82,79,76,73,72,70,69,68,67,66,65,65,64,64,64,64,65,65,66,67,68,69,70,71,73,74,76,79,83,87,92,86,82,78,75,73,72,70,69,68,67,66,65,65,64,64,64,64,65,65,66,67,68,69,70,71,73,74,76,79,83,87,93,86,82,79,75,73,72,70,69,68,67,66,65,65,65,64,64,64,65,66,66,67,68,69,70,71,73,74,76,79,82,88,93,87,82,79,76,73,72,70,69,68,67,66,66,65,65,64,64,65,65,66,66,67,68,69,70,71,73,74,76,79,83,87,93,87,83,79,76,74,72,71,69,68,67,66,65,65,65,65,64,65,65,66,66,67,68,69,70,71,73,74,76,79,83,88,94,87,83,79,76,74,72,71,69,68,67,66,66,65,65,65,65,65,65,66,66,67,68,69,70,72,73,74,76,79,83,88,94,88,84,80,76,74,72,71,69,68,68,67,66,66,65,65,65,65,65,66,67,67,68,69,70,72,73,74,76,80,84,89,95,89,84,80,77,74,72,71,70,69,68,67,66,66,65,65,65,65,66,66,67,68,68,70,71,72,73,75,77,80,85,90,96,90,85,81,78,75,73,71,70,69,68,67,67,66,66,66,65,66,66,67,67,68,69,70,71,72,74,75,78,81,85,90,97,91,86,82,78,75,73,71,70,69,68,68,67,67,66,66,66,66,66,67,67,68,69,70,71,73,74,76,78,82,86,91,98,92,87,83,79,76,74,72,71,70,69,68,68,67,66,66,66,66,67,67,68,68,69,70,72,73,74,76,79,83,87,92,99,95,89,84,80,77,74,72,71,70,69,68,67,67,67,67,66,67,67,67,68,69,70,71,72,73,75,77,80,83,88,94,101,98,91,85,81,78,75,73,72,71,70,69,68,68,67,67,67,67,67,68,68,69,70,71,72,74,75,77,81,84,89,96,104,104,94,87,82,79,76,74,72,71,70,69,69,68,68,68,67,68,68,68,69,70,70,72,73,74,76,79,82,86,91,99,109,111,99,88,84,80,77,74,73,72,71,70,69,69,68,68,68,68,69,69,70,70,71,72,73,75,77,80,83,87,93,103,115,123,105,91,85,81,78,76,74,72,72,71,70,70,69,69,69,69,69,70,70,71,72,73,74,76,78,82,85,89,95,110,127,134,107,92,86,83,80,77,74,73,72,71,71,70,70,70,70,70,70,70,71,72,73,74,75,77,80,83,87,90,97,112,138}; - -// CALIBRATION_SHADING_LS_TL84_G -static uint8_t _calibration_shading_ls_tl84_g[] = {132,102,88,81,78,76,74,72,72,71,70,70,70,69,69,69,69,70,70,70,71,72,72,73,74,76,79,82,85,91,105,132,121,101,86,81,78,75,73,72,71,70,70,69,69,69,69,69,69,69,69,70,70,71,72,73,74,76,78,81,84,89,104,121,109,95,84,79,76,74,72,71,70,70,69,69,68,68,68,68,68,69,69,69,70,71,71,72,73,75,77,80,83,87,97,109,102,91,82,78,76,73,72,71,70,69,69,68,68,68,68,68,68,68,68,69,69,70,71,72,73,74,76,79,82,86,93,103,96,87,81,77,75,73,72,70,70,69,68,68,68,67,67,67,67,68,68,68,69,70,70,71,72,73,75,78,81,84,90,97,91,85,80,77,74,72,71,70,69,68,68,67,67,67,67,67,67,67,68,68,69,69,70,71,72,73,75,77,80,83,88,94,88,83,79,76,74,72,71,70,69,68,68,67,67,67,66,66,67,67,67,68,68,69,70,71,72,73,74,76,79,83,87,92,87,82,78,75,73,72,70,69,69,68,67,67,66,66,66,66,66,67,67,67,68,69,69,70,71,72,74,76,78,82,86,91,85,81,78,75,73,71,70,69,68,68,67,66,66,66,66,66,66,66,67,67,68,68,69,70,71,72,73,75,78,81,85,90,85,81,77,74,72,71,70,69,68,67,67,66,66,66,65,65,66,66,66,67,67,68,69,70,71,72,73,75,77,81,85,89,84,80,77,74,72,71,70,69,68,67,66,66,66,65,65,65,65,66,66,66,67,68,69,70,71,72,73,74,77,80,84,88,84,80,76,74,72,71,70,69,68,67,66,66,65,65,65,65,65,65,66,66,67,68,68,69,70,72,73,74,77,80,84,88,83,80,76,74,72,70,69,68,68,67,66,66,65,65,65,65,65,65,66,66,67,68,68,69,70,71,73,74,76,79,83,87,83,79,76,73,72,70,69,68,68,67,66,65,65,65,64,64,64,65,65,66,67,67,68,69,70,71,72,74,76,79,83,87,83,79,76,73,72,70,69,68,68,67,66,65,65,65,64,64,64,65,65,66,67,67,68,69,70,71,73,74,76,79,83,87,83,79,76,73,72,70,69,68,67,67,66,65,65,65,64,64,64,65,65,66,67,67,68,69,70,71,72,74,76,79,83,87,83,79,76,73,72,70,69,68,67,67,66,65,65,65,64,64,64,65,65,66,67,67,68,69,70,71,73,74,77,79,83,87,83,79,76,73,72,70,69,68,67,67,66,66,65,65,64,64,64,65,65,66,67,67,68,69,70,71,73,74,76,79,83,87,83,80,76,74,72,70,69,68,68,67,66,66,65,65,65,64,65,65,65,66,67,68,68,69,70,71,73,74,76,79,83,88,84,80,77,74,72,71,69,69,68,67,66,66,65,65,65,65,65,65,66,66,67,68,68,69,70,71,73,74,76,80,83,88,84,80,77,74,72,71,70,69,68,67,66,66,65,65,65,65,65,65,66,66,67,68,69,69,70,72,73,74,77,80,84,88,85,81,77,74,72,71,70,69,68,67,67,66,66,65,65,65,65,66,66,67,67,68,69,70,71,72,73,75,77,80,85,89,85,81,78,75,73,71,70,69,68,68,67,66,66,66,65,65,66,66,66,67,67,68,69,70,71,72,73,75,78,81,85,90,86,82,78,75,73,71,70,69,69,68,67,67,66,66,66,66,66,66,66,67,68,68,69,70,71,72,74,75,78,81,86,91,87,83,79,76,74,72,71,70,69,68,67,67,67,66,66,66,66,66,67,67,68,69,69,70,71,72,74,76,79,82,87,92,88,84,80,77,74,72,71,70,69,68,68,67,67,67,66,66,66,67,67,68,68,69,70,71,71,73,74,77,79,83,88,93,90,85,81,78,75,73,71,70,70,69,68,68,67,67,67,67,67,67,67,68,68,69,70,71,72,73,75,77,80,84,89,95,94,87,82,79,76,73,72,71,70,69,69,68,68,67,67,67,67,67,68,68,69,69,70,71,72,73,75,78,81,85,91,97,99,90,83,79,77,74,72,71,70,70,69,69,68,68,68,68,68,68,68,69,69,70,71,72,73,74,76,79,82,86,93,102,104,94,84,81,78,75,73,72,71,70,70,69,69,68,68,68,68,68,69,69,70,70,71,72,73,75,77,80,83,88,97,106,115,99,87,82,79,76,74,72,71,71,70,70,69,69,69,69,69,69,69,70,70,71,72,72,74,76,79,81,85,90,102,116,123,100,88,83,80,77,75,73,72,71,71,70,70,69,69,69,69,69,70,70,71,71,72,73,74,77,80,82,85,91,103,125}; - -// CALIBRATION_SHADING_LS_TL84_B -static uint8_t _calibration_shading_ls_tl84_b[] = {130,101,86,80,77,75,73,71,70,70,69,69,69,68,68,69,69,69,69,70,70,71,72,72,74,76,78,81,84,90,104,131,119,100,85,80,77,74,72,71,70,70,69,69,68,68,68,68,68,69,69,69,70,71,71,72,73,75,78,80,83,89,103,120,107,94,83,79,76,74,72,71,70,69,69,68,68,68,68,68,68,68,69,69,70,71,71,72,73,75,77,79,82,86,97,108,101,89,81,78,75,73,72,70,69,69,68,68,68,67,67,67,68,68,68,69,69,70,71,72,73,74,76,78,81,85,93,102,94,86,80,77,74,72,71,70,69,68,68,67,67,67,67,67,67,68,68,68,69,70,71,72,73,74,76,78,81,84,90,96,90,84,79,76,74,72,71,70,69,68,67,67,67,67,67,66,67,67,68,68,69,69,70,71,72,73,75,77,80,83,88,93,87,82,79,76,74,72,71,69,69,68,67,67,67,66,66,66,66,67,67,68,68,69,70,71,72,73,74,76,79,82,86,91,85,81,78,75,73,71,70,69,68,68,67,67,66,66,66,66,66,66,67,67,68,69,70,71,72,73,74,76,78,82,85,89,84,81,77,75,73,71,70,69,68,67,67,66,66,66,66,66,66,66,67,67,68,68,69,70,71,72,74,75,78,81,84,89,83,80,77,74,72,71,70,69,68,67,66,66,66,65,65,65,65,66,66,67,68,68,69,70,71,72,73,75,77,80,84,88,83,79,76,74,72,71,70,69,68,67,66,66,66,65,65,65,65,65,66,67,67,68,69,70,71,72,73,75,77,80,83,87,82,79,76,74,72,71,70,69,68,67,66,66,65,65,65,65,65,65,66,66,67,68,69,70,71,72,73,74,77,80,83,86,82,79,76,73,72,70,69,68,67,67,66,66,65,65,65,64,65,65,66,66,67,68,68,69,71,72,73,74,76,79,82,86,82,78,76,73,71,71,69,68,67,67,66,66,65,65,64,64,65,65,66,66,67,68,69,69,71,71,73,74,76,79,82,86,81,78,75,73,72,70,69,68,67,67,66,65,65,64,64,64,64,65,66,66,67,68,68,69,70,71,73,74,76,79,82,86,81,78,75,73,72,70,69,68,67,67,66,65,65,65,64,64,64,65,65,66,67,67,68,69,70,72,73,74,76,79,82,85,81,78,75,73,72,70,69,68,67,67,66,65,65,64,64,64,64,65,65,66,67,68,68,69,70,71,73,74,76,79,82,86,81,78,75,73,71,70,69,68,67,67,66,65,65,65,64,64,64,65,65,66,67,68,68,69,70,71,73,74,76,79,82,86,81,78,75,73,71,70,69,68,67,67,66,65,65,65,64,64,65,65,65,66,67,68,69,69,71,72,73,74,76,79,82,86,82,78,76,73,71,70,69,68,67,67,66,66,65,65,64,64,65,65,66,66,67,68,69,69,70,72,73,74,76,79,83,86,82,79,76,73,72,70,69,68,67,67,66,66,65,65,65,65,65,65,66,66,67,68,69,69,71,72,73,74,77,79,83,87,83,79,76,74,72,71,69,69,68,67,66,66,65,65,65,65,65,66,66,66,67,68,69,70,71,72,73,75,77,80,84,88,83,80,77,74,72,71,69,69,68,67,66,66,66,65,65,65,65,66,66,67,67,68,69,70,71,72,73,75,77,80,84,88,84,81,77,75,72,71,70,69,68,67,67,66,66,65,65,65,66,66,66,67,67,68,69,70,71,72,74,75,78,81,84,89,85,81,78,75,73,71,70,69,68,68,67,67,66,66,66,66,66,66,66,67,68,68,69,70,71,72,74,76,78,81,86,90,86,82,79,76,73,71,70,69,69,68,67,67,67,66,66,66,66,66,66,67,68,68,69,70,71,72,74,76,79,82,86,91,88,84,80,77,74,72,71,70,69,68,68,67,67,67,66,66,66,67,67,67,68,69,70,71,72,73,74,77,80,83,87,93,92,86,81,78,75,73,71,70,69,69,68,67,67,67,67,67,67,67,67,68,68,69,70,71,72,73,75,77,80,84,89,95,96,88,82,78,76,73,72,71,70,69,68,68,68,67,67,67,67,67,68,68,69,69,70,71,72,74,76,78,81,85,91,99,102,92,83,79,77,74,72,71,70,69,69,68,68,67,67,67,67,68,68,68,69,70,71,71,72,74,76,79,82,87,95,103,112,97,85,81,77,75,73,71,70,70,69,69,68,68,68,68,68,68,68,69,69,70,71,72,73,75,78,80,83,88,100,113,120,98,86,81,78,76,73,72,71,70,69,69,68,68,68,68,68,68,69,69,70,70,71,72,73,76,79,81,84,89,102,122}; - -// CALIBRATION_SHADING_LS_D65_R -static uint8_t _calibration_shading_ls_d65_r[] = {141,107,91,84,81,78,75,73,72,71,71,70,70,69,69,69,69,70,70,71,71,72,73,74,76,78,81,84,88,95,112,145,128,105,89,83,80,77,75,73,72,71,70,70,69,69,69,69,69,69,70,70,71,72,73,74,75,77,80,83,87,93,110,132,114,99,86,82,79,76,74,72,71,70,69,69,69,68,68,68,68,69,69,70,70,71,72,73,74,76,79,82,86,91,103,117,106,94,85,81,78,75,73,72,70,70,69,68,68,68,68,68,68,68,69,69,70,71,72,72,74,75,78,81,85,89,98,110,99,90,83,80,77,74,73,71,70,69,69,68,68,67,67,67,67,68,68,69,69,70,71,72,73,75,77,80,83,88,95,104,94,87,82,79,76,74,72,71,70,69,68,68,67,67,67,67,67,67,68,68,69,70,71,72,73,74,76,79,82,87,93,100,91,86,81,78,75,73,72,71,69,69,68,67,67,67,67,67,67,67,68,68,69,70,70,72,73,74,76,78,81,86,91,98,89,84,81,77,75,73,72,70,69,68,68,67,67,66,66,66,66,67,67,68,68,69,70,71,72,73,75,77,81,85,90,97,88,84,80,77,75,73,71,70,69,68,67,67,66,66,66,66,66,66,67,67,68,69,70,71,72,73,75,77,80,84,89,95,87,83,79,76,74,73,71,70,69,68,67,66,66,66,65,65,66,66,67,67,68,69,70,71,72,73,75,77,79,84,88,94,86,82,79,76,74,72,71,70,68,67,67,66,66,65,65,65,65,66,66,67,67,68,69,70,71,73,74,76,79,83,88,93,86,82,78,76,74,72,71,69,68,68,67,66,65,65,65,65,65,65,66,66,67,68,69,70,71,73,74,76,79,83,87,93,85,81,78,75,73,72,70,69,68,67,66,66,65,65,65,65,65,65,66,66,67,68,69,70,71,72,74,75,78,82,87,92,85,81,78,75,73,72,70,69,68,67,66,66,65,65,64,64,65,65,66,66,67,68,69,70,71,72,74,75,78,82,86,91,85,81,78,75,73,72,70,69,68,67,66,66,65,65,64,64,64,65,66,66,67,68,69,70,71,72,74,75,78,81,86,91,85,81,78,75,73,72,70,69,68,67,66,66,65,65,64,64,64,65,65,66,67,68,68,70,71,72,73,75,78,81,86,91,85,81,78,75,73,72,70,69,68,67,66,66,65,65,64,64,65,65,65,66,67,67,69,70,71,72,74,76,78,82,86,92,85,81,78,75,73,71,70,69,68,67,66,66,65,65,64,64,65,65,66,66,67,68,69,70,71,72,73,75,78,82,86,92,85,81,78,75,73,72,70,69,68,67,66,66,65,65,64,64,65,65,65,66,67,68,69,70,71,72,73,75,78,82,86,92,86,82,78,75,73,72,70,69,68,67,66,66,65,65,64,64,65,65,66,66,67,68,69,70,71,72,74,75,78,82,86,92,86,82,79,76,73,72,71,69,68,67,67,66,66,65,65,65,65,65,66,66,67,68,69,70,71,72,74,75,78,82,87,93,87,83,79,76,74,72,71,69,69,68,67,66,66,65,65,65,65,65,66,66,67,68,69,70,71,72,74,76,79,83,88,94,88,83,80,76,74,72,71,70,69,68,67,66,66,65,65,65,65,66,66,67,67,68,69,70,71,73,74,76,79,83,88,95,88,84,80,77,75,72,71,70,69,68,67,67,66,66,66,65,66,66,66,67,68,68,69,70,71,73,75,77,80,84,89,96,89,85,81,78,75,73,71,70,69,68,68,67,67,66,66,66,66,66,67,67,68,69,69,71,72,73,75,77,80,85,90,96,90,86,82,79,76,73,72,70,69,69,68,67,67,66,66,66,66,66,67,67,68,69,70,71,72,73,75,78,81,85,91,97,93,88,83,80,76,74,72,71,70,69,68,67,67,67,67,66,67,67,67,68,68,69,70,71,72,74,76,79,82,86,92,99,97,90,84,80,77,75,73,71,70,70,69,68,68,67,67,67,67,67,67,68,69,69,70,71,73,74,77,79,83,88,94,102,102,93,86,82,78,75,73,72,71,70,69,69,68,68,67,67,67,67,68,68,69,70,71,72,73,75,77,81,84,89,96,107,108,97,87,83,80,77,74,73,71,71,70,69,69,68,68,68,68,68,68,69,70,70,71,72,74,76,78,82,86,91,101,112,120,103,90,85,81,78,75,74,72,71,70,70,69,69,69,68,69,69,69,70,70,71,72,73,75,77,81,83,87,93,107,124,131,105,92,86,83,79,76,74,73,72,71,71,70,70,69,69,69,69,70,70,71,72,72,74,76,78,82,85,89,95,109,134}; - -// CALIBRATION_SHADING_LS_D65_G -static uint8_t _calibration_shading_ls_d65_g[] = {130,101,87,80,78,75,73,72,71,70,70,69,69,69,69,69,69,69,70,70,71,71,72,73,74,76,78,81,84,90,104,131,120,100,86,80,77,75,73,72,71,70,69,69,69,69,68,68,69,69,69,70,70,71,71,72,73,75,78,80,84,89,103,120,108,94,83,79,76,74,72,71,70,70,69,69,68,68,68,68,68,68,69,69,70,70,71,72,73,74,77,79,82,87,97,108,101,90,81,78,75,73,72,71,70,69,69,68,68,68,67,67,68,68,68,69,69,70,71,71,72,74,76,78,81,85,93,102,95,87,80,77,74,72,71,70,69,69,68,68,67,67,67,67,67,67,68,68,69,69,70,71,72,73,75,77,80,84,90,97,91,84,79,76,74,72,71,70,69,68,68,67,67,67,67,67,67,67,67,68,68,69,70,71,72,73,74,77,79,83,88,94,88,83,79,76,73,72,71,70,69,68,67,67,67,66,66,66,66,67,67,67,68,69,70,70,71,72,74,76,79,82,86,92,86,82,78,75,73,71,70,69,68,68,67,67,66,66,66,66,66,66,67,67,68,68,69,70,71,72,73,75,78,81,86,90,85,81,77,74,72,71,70,69,68,67,67,66,66,66,66,66,66,66,66,67,67,68,69,70,71,72,73,75,77,81,85,89,84,80,77,74,72,71,70,69,68,67,67,66,66,65,65,65,65,66,66,67,67,68,69,70,71,72,73,74,77,80,84,89,83,80,76,74,72,70,70,69,68,67,66,66,65,65,65,65,65,65,66,66,67,68,68,69,70,71,73,74,77,80,84,88,83,79,76,73,72,70,69,68,68,67,66,66,65,65,65,65,65,65,66,66,67,67,68,69,70,71,73,74,76,79,83,87,83,79,76,73,71,70,69,68,67,67,66,65,65,65,64,64,65,65,65,66,66,67,68,69,70,71,72,74,76,79,83,87,83,79,76,73,71,70,69,68,67,67,66,65,65,65,64,64,64,65,65,66,66,67,68,69,70,71,72,74,76,79,82,87,82,79,75,73,71,70,69,68,67,67,66,65,65,65,64,64,64,65,65,66,66,67,68,69,70,71,72,74,76,79,82,86,82,79,76,73,71,70,69,68,67,67,66,65,65,65,64,64,64,65,65,66,66,67,68,69,70,71,72,74,76,79,82,86,82,79,76,73,71,70,69,68,67,67,66,65,65,65,64,64,64,65,65,66,66,67,68,69,70,71,72,74,76,79,82,87,83,79,76,73,71,70,69,68,67,67,66,65,65,65,64,64,64,65,65,66,66,67,68,69,70,71,72,74,76,79,83,87,83,79,76,73,71,70,69,68,67,67,66,66,65,65,64,64,64,65,65,66,66,67,68,69,70,71,72,74,76,79,83,87,83,79,76,73,72,70,69,68,68,67,66,66,65,65,65,65,65,65,65,66,67,67,68,69,70,71,72,74,76,79,83,87,84,80,76,74,72,71,69,69,68,67,66,66,65,65,65,65,65,65,66,66,67,67,68,69,70,71,72,74,76,79,83,88,84,80,77,74,72,71,70,69,68,67,67,66,66,65,65,65,65,65,66,66,67,68,68,69,70,71,72,74,77,80,84,89,85,81,77,74,72,71,70,69,68,67,67,66,66,66,65,65,65,66,66,66,67,68,68,69,70,72,73,75,77,80,84,89,86,82,78,75,73,71,70,69,69,68,67,67,66,66,66,66,66,66,66,67,67,68,69,70,71,72,73,75,78,81,85,90,87,82,79,76,73,72,70,70,69,68,67,67,67,66,66,66,66,66,67,67,68,68,69,70,71,72,74,76,78,82,86,91,88,83,79,76,74,72,71,70,69,68,68,67,67,67,66,66,66,67,67,67,68,68,69,70,71,72,74,76,79,82,87,92,90,85,80,77,75,72,71,70,69,69,68,68,67,67,67,67,67,67,67,68,68,69,69,70,71,72,74,77,80,83,88,94,93,87,81,78,75,73,72,71,70,69,69,68,68,67,67,67,67,67,67,68,68,69,70,71,72,73,75,77,80,84,90,96,98,89,83,79,76,74,72,71,70,70,69,68,68,68,68,67,67,68,68,68,69,69,70,71,72,74,76,78,81,85,92,100,104,93,84,80,77,75,73,72,71,70,70,69,69,68,68,68,68,68,68,69,69,70,71,71,73,74,77,79,83,87,96,105,113,98,86,82,78,76,74,72,71,71,70,70,69,69,69,68,68,69,69,69,70,70,71,72,73,75,78,80,84,89,101,115,122,100,88,82,79,77,74,73,72,71,71,70,70,69,69,69,69,69,69,70,70,71,71,72,74,76,79,82,84,90,102,123}; - -// CALIBRATION_SHADING_LS_D65_B -static uint8_t _calibration_shading_ls_d65_b[] = {128,100,86,80,77,75,73,71,71,70,69,69,69,68,68,68,69,69,69,70,70,71,72,72,74,75,78,81,83,89,103,129,119,99,85,80,77,74,72,71,70,70,69,69,68,68,68,68,68,68,69,69,70,71,72,72,74,75,77,80,83,88,102,119,108,94,83,78,76,73,72,71,70,69,69,68,68,68,68,68,68,68,69,69,70,70,71,72,73,75,77,79,82,86,96,107,101,89,81,78,75,73,72,70,70,69,68,68,68,67,67,67,68,68,68,69,69,70,71,72,73,74,76,78,81,85,92,101,94,86,80,77,74,72,71,70,69,69,68,67,67,67,67,67,67,67,68,68,69,70,70,71,73,74,75,77,80,84,89,96,90,84,79,76,74,72,71,70,69,68,68,67,67,67,66,66,67,67,68,68,69,70,70,71,72,73,75,77,80,83,87,93,87,82,78,75,73,72,70,69,69,68,67,67,66,66,66,66,67,67,67,68,68,69,70,71,72,73,74,76,79,82,86,90,85,81,78,75,73,71,70,69,68,68,67,67,66,66,66,66,66,66,67,67,68,69,70,70,71,73,74,76,78,81,85,89,84,80,77,75,73,71,70,69,68,67,67,66,66,66,66,66,66,66,67,67,68,69,69,70,71,72,73,75,78,81,84,88,83,80,77,74,72,71,70,69,68,67,67,66,66,65,65,65,66,66,66,67,68,68,69,70,71,72,73,75,77,80,84,88,83,79,76,74,72,71,70,69,68,67,66,66,65,65,65,65,65,66,66,66,67,68,69,70,71,72,73,75,77,80,83,87,82,79,76,74,72,71,70,69,68,67,66,66,65,65,65,65,65,65,66,66,67,68,69,70,71,72,73,74,76,79,83,86,82,79,76,73,72,70,69,68,67,67,66,66,65,65,65,65,65,65,66,66,67,68,69,70,71,72,73,74,76,79,82,86,82,78,76,73,72,70,69,68,67,67,66,65,65,65,64,64,65,65,66,66,67,68,69,69,70,71,73,74,76,79,82,85,81,78,75,73,71,70,69,68,68,67,66,65,65,65,64,64,64,65,66,66,67,68,68,69,70,72,73,74,76,79,82,85,81,78,75,73,71,70,69,68,67,67,66,66,65,65,64,64,64,65,66,66,67,68,68,69,70,72,73,74,76,79,82,85,81,78,75,73,71,70,69,68,67,67,66,65,65,65,64,64,65,65,66,66,67,68,68,70,70,72,73,74,76,79,82,85,81,78,75,73,71,70,69,68,67,67,66,66,65,65,64,64,65,65,65,66,67,68,69,70,70,71,73,74,76,79,82,86,81,78,76,73,71,70,69,68,67,67,66,66,65,65,65,65,65,65,66,66,67,68,69,70,70,72,73,74,76,79,82,86,82,79,76,73,71,70,69,68,67,67,66,66,65,65,65,65,65,65,66,66,67,68,69,70,70,72,73,74,76,79,82,86,82,79,76,73,72,70,69,68,68,67,66,66,66,65,65,65,65,66,66,67,67,68,69,70,71,72,73,74,76,79,83,87,83,79,76,74,72,71,69,69,68,67,67,66,66,65,65,65,65,66,66,67,67,68,69,70,71,72,73,74,77,80,83,88,83,80,77,74,72,71,70,69,68,67,67,66,66,66,65,65,65,66,66,67,67,68,69,70,71,72,73,75,77,80,84,88,84,80,77,75,72,71,70,69,68,68,67,66,66,66,66,66,66,66,66,67,68,68,69,70,71,72,74,75,78,81,84,89,85,81,78,75,73,71,70,69,69,68,67,67,66,66,66,66,66,66,67,67,68,68,69,70,71,72,74,76,78,81,85,90,86,82,79,76,73,72,70,70,69,68,67,67,67,66,66,66,66,66,67,67,68,68,69,70,71,72,74,76,79,82,86,91,88,83,80,77,74,72,71,70,69,68,68,67,67,67,67,66,66,67,67,68,68,69,70,70,71,72,74,77,79,83,87,92,91,85,81,77,75,72,71,70,69,69,68,68,67,67,67,67,67,67,67,68,68,69,70,71,72,73,75,77,80,84,89,95,97,88,82,78,76,73,72,71,70,69,68,68,68,67,67,67,67,67,68,68,69,69,70,71,72,73,75,78,81,85,91,99,102,92,83,79,77,74,72,71,70,70,69,68,68,68,67,67,68,68,68,68,69,70,70,71,73,74,76,79,82,86,94,103,112,97,85,80,78,75,73,71,70,70,69,69,68,68,68,68,68,68,68,69,69,70,71,72,73,75,78,80,83,88,99,113,120,98,86,81,78,76,73,72,71,70,70,69,69,68,68,68,68,68,69,69,70,70,71,72,73,76,79,81,84,89,101,121}; - -// R G B -static uint16_t _calibration_awb_warming_ls_a[] = {260,256,268}; - -// R G B -static uint16_t _calibration_awb_warming_ls_d75[] = {260,256,268}; - -// R G B -static uint16_t _calibration_awb_warming_ls_d50[] = {260,256,260}; - -// CALIBRATION_NOISE_PROFILE -static uint8_t _calibration_noise_profile[] = {0,0,0,0,0,0,0,0,7,21,27,31,33,36,38,40,41,42,44,45,46,46,47,48,49,49,50,51,51,52,52,53,53,54,54,55,55,55,56,56,56,57,57,58,58,58,58,59,59,59,60,60,60,60,61,61,61,61,62,62,62,62,62,63,63,63,63,63,64,64,64,64,64,65,65,65,65,65,65,66,66,66,66,66,66,66,67,67,67,67,67,67,67,68,68,68,68,68,68,68,69,69,69,69,69,69,69,69,69,70,70,70,70,70,70,70,70,70,71,71,71,71,71,71,71,71,71,71}; - -// CALIBRATION_DEMOSAIC -static uint8_t _calibration_demosaic[] = {7,23,29,33,36,38,40,42,43,44,46,47,48,49,50,50,51,52,52,53,53,54,55,55,55,56,56,57,57,58,58,58,59,59,59,60,60,60,61,61,61,62,62,62,62,63,63,63,63,64,64,64,64,64,65,65,65,65,65,66,66,66,66,66,67,67,67,67,67,67,68,68,68,68,68,68,69,69,69,69,69,69,69,70,70,70,70,70,70,70,71,71,71,71,71,71,71,71,71,72,72,72,72,72,72,72,72,72,73,73,73,73,73,73,73,73,73,74,74,74,74,74,74,74,74,74,74,74}; - -// 8-bit normalised noise profile for WDR stitching -static uint8_t _calibration_wdr_np_lut[] = {15,28,36,42,48,53,58,62,66,70,73,77,80,83,86,89,92,94,97,100,102,105,107,109,112,114,116,118,121,123,125,127,129,131,133,135,136,138,140,142,144,145,147,149,151,152,154,156,157,159,160,162,164,165,167,168,170,171,173,174,176,177,179,180,181,183,184,186,187,188,190,191,192,194,195,196,197,199,200,201,203,204,205,206,208,209,210,211,212,214,215,216,217,218,220,221,222,223,224,225,226,227,229,230,231,232,233,234,235,236,237,238,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255}; - -// CALIBRATION_GAMMA -static uint16_t _calibration_gamma[] = {0, 347, 539, 679, 794, 894, 982, 1062, 1136, 1204, 1268, 1329, 1386, 1441, 1493, 1543, 1591, 1638, 1683, 1726, 1768, 1809, 1849, 1888, 1926, 1963, 1999, 2034, 2068, 2102, 2135, 2168, 2200, 2231, 2262, 2292, 2322, 2351, 2380, 2408, 2436, 2463, 2491, 2517, 2544, 2570, 2596, 2621, 2646, 2671, 2695, 2719, 2743, 2767, 2790, 2814, 2836, 2859, 2882, 2904, 2926, 2948, 2969, 2990, 3012, 3033, 3053, 3074, 3094, 3115, 3135, 3155, 3174, 3194, 3213, 3233, 3252, 3271, 3290, 3308, 3327, 3345, 3364, 3382, 3400, 3418, 3436, 3453, 3471, 3488, 3506, 3523, 3540, 3557, 3574, 3591, 3607, 3624, 3640, 3657, 3673, 3689, 3705, 3721, 3737, 3753, 3769, 3785, 3800, 3816, 3831, 3846, 3862, 3877, 3892, 3907, 3922, 3937, 3951, 3966, 3981, 3995, 4010, 4024, 4039, 4053, 4067, 4081, 4095}; - -// CALIBRATION_IRIDIX_ASYMMETRY -static uint32_t _calibration_iridix_asymmetry[] = { - 0, 61184, 116961, 168002, 214899, 258115, 298084, 335172, 369653, 401797, 431862, 460022, 486454, 511335, 534791, 556919, 577880, 597720, 616568, 634473, 651529, 667785, 683305, 698153, 712346, 725978, 739050, 751610, 763706, 775355, 786587, 797451, 807931, 818091, 827947, 837499, 846780, 855820, 864604, 873180, 881532, 889708, 897708, 905532, 913213, 920733, 928141, 935421, 942589, 949645, 956621, 963501, 970317, 977053, 983742, 990366, 996942, 1003470, 1009982, 1016446, 1022894, 1029326, 1035742, 1042158, 1048575, -}; - -// CALIBRATION_CA_FILTER_MEM -static uint32_t _calibration_ca_filter_mem[] = {32768,229629,491259,4278943225,4279204855,4262689525,4246239220,4229788915,4213338610,4196888050,4197214450,4180763890,4164313330,4147928050,4131477235,4115091955,4098641140,4082190325,4082516470,4066065655,4066391800,4066652665,4066913530,4067239930,4067500795,4084473340,4101445885,4118418430,4152037375,4185721855,4219340544,4253025024}; - -// calibration_awb_scene_presets in the following order AWB_DAY_LIGHT AWB_CLOUDY AWB_INCANDESCENT AWB_FLOURESCENT AWB_TWILIGHT AWB_SHADE AWB_WARM_FLOURESCENT -static uint16_t _calibration_awb_scene_presets[7][2] = { - { 256, 256 }, - { 324, 215 }, - { 178, 397 }, - { 225, 289 }, - { 225, 289 }, - { 364, 196 }, - { 189, 360 }}; - -// CALIBRATION_CA_CORRECTION: MIN_CORRECTION, MESH_WIDTH, MESH_HEIGHT -static uint16_t _calibration_ca_correction[] = {1, 64, 64}; - - -// CALIBRATION_CA_CORRECTION_MEM -static uint16_t _calibration_ca_correction_mem[][10] = { - { 65481, 4, 65532, 3, 68, 65533, 65533, 65521, 2, 0 }, - { 65533, 65504, 1, 65530, 21, 29, 8, 65519, 65534, 15 }, - { 65510, 65529, 65513, 5, 54, 25, 5, 6, 65527, 65471 }, - { 65535, 65532, 65528, 65528, 3, 13, 14, 65535, 11, 65489 }}; - -static uint32_t _calibration_lut3d_mem[] = {0}; - -static uint32_t _calibration_decompander0_mem[] = {0, 32768, 65536, 98304, 131072, 163840, 196608, 229376, 262144, 294912, 327680, 360448, 393216, 425984, 458752, 491520, 524288, 557055, 589823, 622591, 655359, 688127, 720895, 753663, 786431, 819199, 851967, 884735, 917503, 950271, 983039, 1015807, 1048575}; -static uint32_t _calibration_decompander1_mem[] = {0, 4096, 8192, 12288, 16384, 20480, 24576, 28672, 32768, 36864, 40960, 45056, 49152, 53248, 57344, 61440, 65536, 69632, 73728, 77824, 81920, 86016, 90112, 94208, 98304, 102400, 106496, 110592, 114688, 118784, 122880, 126976, 131072, 135168, 139264, 143360, 147456, 151552, 155648, 159744, 163840, 167936, 172032, 176128, 180224, 184320, 188416, 192512, 196608, 200704, 204800, 208896, 212992, 217088, 221184, 225280, 229376, 233472, 237568, 241664, 245760, 249856, 253952, 258048, 262144, 266240, 270336, 274432, 278528, 282624, 286720, 290816, 294912, 299008, 303104, 307200, 311296, 315392, 319488, 323584, 327680, 331776, 335872, 339968, 344064, 348160, 352256, 356352, 360448, 364544, 368640, 372736, 376832, 380928, 385024, 389120, 393216, 397312, 401408, 405504, 409600, 413696, 417792, 421888, 425984, 430080, 434176, 438272, 442368, 446464, 450560, 454656, 458752, 462848, 466944, 471040, 475136, 479232, 483328, 487424, 491520, 495616, 499712, 503808, 507904, 512000, 516096, 520192, 524288, 528383, 532479, 536575, 540671, 544767, 548863, 552959, 557055, 561151, 565247, 569343, 573439, 577535, 581631, 585727, 589823, 593919, 598015, 602111, 606207, 610303, 614399, 618495, 622591, 626687, 630783, 634879, 638975, 643071, 647167, 651263, 655359, 659455, 663551, 667647, 671743, 675839, 679935, 684031, 688127, 692223, 696319, 700415, 704511, 708607, 712703, 716799, 720895, 724991, 729087, 733183, 737279, 741375, 745471, 749567, 753663, 757759, 761855, 765951, 770047, 774143, 778239, 782335, 786431, 790527, 794623, 798719, 802815, 806911, 811007, 815103, 819199, 823295, 827391, 831487, 835583, 839679, 843775, 847871, 851967, 856063, 860159, 864255, 868351, 872447, 876543, 880639, 884735, 888831, 892927, 897023, 901119, 905215, 909311, 913407, 917503, 921599, 925695, 929791, 933887, 937983, 942079, 946175, 950271, 954367, 958463, 962559, 966655, 970751, 974847, 978943, 983039, 987135, 991231, 995327, 999423, 1003519, 1007615, 1011711, 1015807, 1019903, 1023999, 1028095, 1032191, 1036287, 1040383, 1044479, 1048575}; - -// CALIBRATION_SHADING_RADIAL_R -static uint16_t _calibration_shading_radial_r[] = {4096, 4113, 4130, 4147, 4164, 4182, 4199, 4216, 4234, 4251, 4269, 4286, 4304, 4322, 4340, 4357, 4375, 4393, 4411, 4430, 4448, 4466, 4484, 4503, 4521, 4540, 4558, 4577, 4596, 4614, 4633, 4652, 4671, 4690, 4709, 4728, 4747, 4767, 4786, 4805, 4825, 4844, 4864, 4883, 4903, 4923, 4943, 4963, 4983, 5003, 5023, 5043, 5063, 5084, 5104, 5124, 5145, 5165, 5186, 5207, 5227, 5248, 5269, 5290, 5311, 5332, 5354, 5375, 5396, 5417, 5439, 5460, 5482, 5504, 5526, 5547, 5569, 5591, 5613, 5635, 5658, 5680, 5702, 5725, 5747, 5770, 5793, 5815, 5838, 5861, 5884, 5907, 5930, 5954, 5977, 6001, 6024, 6048, 6072, 6095, 6119, 6143, 6167, 6192, 6216, 6240, 6265, 6290, 6314, 6339, 6364, 6389, 6415, 6440, 6465, 6491, 6517, 6542, 6568, 6594, 6621, 6647, 6673, 6700, 6727, 6754, 6781, 6808, 6835}; - -// CALIBRATION_SHADING_RADIAL_G -static uint16_t _calibration_shading_radial_g[] = {4096, 4108, 4120, 4133, 4145, 4157, 4170, 4182, 4195, 4207, 4220, 4233, 4246, 4258, 4271, 4284, 4297, 4310, 4323, 4336, 4350, 4363, 4376, 4389, 4403, 4416, 4430, 4443, 4457, 4471, 4485, 4498, 4512, 4526, 4540, 4554, 4568, 4582, 4596, 4611, 4625, 4639, 4654, 4668, 4682, 4697, 4712, 4726, 4741, 4756, 4771, 4785, 4800, 4815, 4830, 4845, 4860, 4876, 4891, 4906, 4922, 4937, 4952, 4968, 4983, 4999, 5015, 5030, 5046, 5062, 5078, 5094, 5110, 5126, 5142, 5158, 5174, 5191, 5207, 5223, 5240, 5256, 5273, 5290, 5306, 5323, 5340, 5357, 5374, 5391, 5408, 5425, 5442, 5459, 5477, 5494, 5512, 5529, 5547, 5564, 5582, 5600, 5618, 5636, 5654, 5672, 5690, 5708, 5726, 5745, 5763, 5782, 5800, 5819, 5838, 5857, 5876, 5895, 5914, 5933, 5952, 5972, 5991, 6011, 6031, 6051, 6070, 6090, 6111}; - -// CALIBRATION_SHADING_RADIAL_B -static uint16_t _calibration_shading_radial_b[] = {4096, 4107, 4118, 4128, 4139, 4150, 4161, 4172, 4183, 4194, 4205, 4216, 4228, 4239, 4250, 4261, 4272, 4284, 4295, 4307, 4318, 4329, 4341, 4352, 4364, 4376, 4387, 4399, 4411, 4422, 4434, 4446, 4458, 4470, 4482, 4493, 4505, 4517, 4530, 4542, 4554, 4566, 4578, 4590, 4603, 4615, 4627, 4640, 4652, 4664, 4677, 4689, 4702, 4714, 4727, 4740, 4752, 4765, 4778, 4791, 4803, 4816, 4829, 4842, 4855, 4868, 4881, 4894, 4908, 4921, 4934, 4947, 4960, 4974, 4987, 5001, 5014, 5028, 5041, 5055, 5068, 5082, 5096, 5110, 5123, 5137, 5151, 5165, 5179, 5193, 5207, 5221, 5236, 5250, 5264, 5279, 5293, 5308, 5322, 5337, 5351, 5366, 5381, 5396, 5411, 5426, 5441, 5456, 5471, 5486, 5501, 5517, 5532, 5548, 5563, 5579, 5595, 5610, 5626, 5642, 5658, 5674, 5691, 5707, 5723, 5740, 5756, 5773, 5790}; - - -static LookupTable calibration_shading_radial_r = {.ptr = _calibration_shading_radial_r, .rows = 1, .cols = sizeof( _calibration_shading_radial_r ) / sizeof( _calibration_shading_radial_r[0] ), .width = sizeof( _calibration_shading_radial_r[0] )}; -static LookupTable calibration_shading_radial_g = {.ptr = _calibration_shading_radial_g, .rows = 1, .cols = sizeof( _calibration_shading_radial_g ) / sizeof( _calibration_shading_radial_g[0] ), .width = sizeof( _calibration_shading_radial_g[0] )}; -static LookupTable calibration_shading_radial_b = {.ptr = _calibration_shading_radial_b, .rows = 1, .cols = sizeof( _calibration_shading_radial_b ) / sizeof( _calibration_shading_radial_b[0] ), .width = sizeof( _calibration_shading_radial_b[0] )}; -static LookupTable calibration_decompander0_mem = {.ptr = _calibration_decompander0_mem, .rows = 1, .cols = sizeof( _calibration_decompander0_mem ) / sizeof( _calibration_decompander0_mem[0] ), .width = sizeof( _calibration_decompander0_mem[0] )}; -static LookupTable calibration_decompander1_mem = {.ptr = _calibration_decompander1_mem, .rows = 1, .cols = sizeof( _calibration_decompander1_mem ) / sizeof( _calibration_decompander1_mem[0] ), .width = sizeof( _calibration_decompander1_mem[0] )}; - -static LookupTable calibration_awb_scene_presets = {.ptr = _calibration_awb_scene_presets, .cols = 2, .rows = sizeof( _calibration_awb_scene_presets ) / sizeof( _calibration_awb_scene_presets[0] ), .width = sizeof( _calibration_awb_scene_presets[0][0] )}; -static LookupTable calibration_light_src = {.ptr = _calibration_light_src, .cols = 2, .rows = sizeof( _calibration_light_src ) / sizeof( _calibration_light_src[0] ), .width = sizeof( _calibration_light_src[0][0] )}; -static LookupTable calibration_rg_pos = {.ptr = _calibration_rg_pos, .rows = 1, .cols = sizeof( _calibration_rg_pos ) / sizeof( _calibration_rg_pos[0] ), .width = sizeof( _calibration_rg_pos[0] )}; -static LookupTable calibration_bg_pos = {.ptr = _calibration_bg_pos, .rows = 1, .cols = sizeof( _calibration_bg_pos ) / sizeof( _calibration_bg_pos[0] ), .width = sizeof( _calibration_bg_pos[0] )}; -static LookupTable calibration_mesh_rgbg_weight = {.ptr = _calibration_mesh_rgbg_weight, .cols = 15, .rows = sizeof( _calibration_mesh_rgbg_weight ) / sizeof( _calibration_mesh_rgbg_weight[0] ), .width = sizeof( _calibration_mesh_rgbg_weight[0][0] )}; -static LookupTable calibration_mesh_ls_weight = {.ptr = _calibration_mesh_ls_weight, .cols = 15, .rows = sizeof( _calibration_mesh_ls_weight ) / sizeof( _calibration_mesh_ls_weight[0] ), .width = sizeof( _calibration_mesh_ls_weight[0][0] )}; -static LookupTable calibration_mesh_color_temperature = {.ptr = _calibration_mesh_color_temperature, .cols = 15, .rows = sizeof( _calibration_mesh_color_temperature ) / sizeof( _calibration_mesh_color_temperature[0] ), .width = sizeof( _calibration_mesh_color_temperature[0][0] )}; -static LookupTable calibration_wb_strength = {.ptr = _calibration_wb_strength, .rows = 1, .cols = sizeof( _calibration_wb_strength ) / sizeof( _calibration_wb_strength[0] ), .width = sizeof( _calibration_wb_strength[0] )}; -static LookupTable calibration_sky_lux_th = {.ptr = _calibration_sky_lux_th, .rows = 1, .cols = sizeof( _calibration_sky_lux_th ) / sizeof( _calibration_sky_lux_th[0] ), .width = sizeof( _calibration_sky_lux_th[0] )}; -static LookupTable calibration_ct_rg_pos_calc = {.ptr = _calibration_ct_rg_pos_calc, .rows = 1, .cols = sizeof( _calibration_ct_rg_pos_calc ) / sizeof( _calibration_ct_rg_pos_calc[0] ), .width = sizeof( _calibration_ct_rg_pos_calc[0] )}; -static LookupTable calibration_ct_bg_pos_calc = {.ptr = _calibration_ct_bg_pos_calc, .rows = 1, .cols = sizeof( _calibration_ct_bg_pos_calc ) / sizeof( _calibration_ct_bg_pos_calc[0] ), .width = sizeof( _calibration_ct_bg_pos_calc[0] )}; -static LookupTable calibration_color_temp = {.ptr = _calibration_color_temp, .rows = 1, .cols = sizeof( _calibration_color_temp ) / sizeof( _calibration_color_temp[0] ), .width = sizeof( _calibration_color_temp[0] )}; -static LookupTable calibration_ct65pos = {.ptr = _calibration_ct65pos, .rows = 1, .cols = sizeof( _calibration_ct65pos ) / sizeof( _calibration_ct65pos[0] ), .width = sizeof( _calibration_ct65pos[0] )}; -static LookupTable calibration_ct40pos = {.ptr = _calibration_ct40pos, .rows = 1, .cols = sizeof( _calibration_ct40pos ) / sizeof( _calibration_ct40pos[0] ), .width = sizeof( _calibration_ct40pos[0] )}; -static LookupTable calibration_ct30pos = {.ptr = _calibration_ct30pos, .rows = 1, .cols = sizeof( _calibration_ct30pos ) / sizeof( _calibration_ct30pos[0] ), .width = sizeof( _calibration_ct30pos[0] )}; -static LookupTable calibration_evtolux_ev_lut = {.ptr = _calibration_evtolux_ev_lut, .rows = 1, .cols = sizeof( _calibration_evtolux_ev_lut ) / sizeof( _calibration_evtolux_ev_lut[0] ), .width = sizeof( _calibration_evtolux_ev_lut[0] )}; -static LookupTable calibration_evtolux_lux_lut = {.ptr = _calibration_evtolux_lux_lut, .rows = 1, .cols = sizeof( _calibration_evtolux_lux_lut ) / sizeof( _calibration_evtolux_lux_lut[0] ), .width = sizeof( _calibration_evtolux_lux_lut[0] )}; -static LookupTable calibration_black_level_r = {.ptr = _calibration_black_level_r, .cols = 2, .rows = sizeof( _calibration_black_level_r ) / sizeof( _calibration_black_level_r[0] ), .width = sizeof( _calibration_black_level_r[0][0] )}; -static LookupTable calibration_black_level_gr = {.ptr = _calibration_black_level_gr, .cols = 2, .rows = sizeof( _calibration_black_level_gr ) / sizeof( _calibration_black_level_gr[0] ), .width = sizeof( _calibration_black_level_gr[0][0] )}; -static LookupTable calibration_black_level_gb = {.ptr = _calibration_black_level_gb, .cols = 2, .rows = sizeof( _calibration_black_level_gb ) / sizeof( _calibration_black_level_gb[0] ), .width = sizeof( _calibration_black_level_gb[0][0] )}; -static LookupTable calibration_black_level_b = {.ptr = _calibration_black_level_b, .cols = 2, .rows = sizeof( _calibration_black_level_b ) / sizeof( _calibration_black_level_b[0] ), .width = sizeof( _calibration_black_level_b[0][0] )}; -static LookupTable calibration_static_wb = {.ptr = _calibration_static_wb, .rows = 1, .cols = sizeof( _calibration_static_wb ) / sizeof( _calibration_static_wb[0] ), .width = sizeof( _calibration_static_wb[0] )}; -static LookupTable calibration_mt_absolute_ls_a_ccm = {.ptr = _calibration_mt_absolute_ls_a_ccm, .rows = 1, .cols = sizeof( _calibration_mt_absolute_ls_a_ccm ) / sizeof( _calibration_mt_absolute_ls_a_ccm[0] ), .width = sizeof( _calibration_mt_absolute_ls_a_ccm[0] )}; -static LookupTable calibration_mt_absolute_ls_d40_ccm = {.ptr = _calibration_mt_absolute_ls_d40_ccm, .rows = 1, .cols = sizeof( _calibration_mt_absolute_ls_d40_ccm ) / sizeof( _calibration_mt_absolute_ls_d40_ccm[0] ), .width = sizeof( _calibration_mt_absolute_ls_d40_ccm[0] )}; -static LookupTable calibration_mt_absolute_ls_d50_ccm = {.ptr = _calibration_mt_absolute_ls_d50_ccm, .rows = 1, .cols = sizeof( _calibration_mt_absolute_ls_d50_ccm ) / sizeof( _calibration_mt_absolute_ls_d50_ccm[0] ), .width = sizeof( _calibration_mt_absolute_ls_d50_ccm[0] )}; -static LookupTable calibration_shading_ls_a_r = {.ptr = _calibration_shading_ls_a_r, .rows = 1, .cols = sizeof( _calibration_shading_ls_a_r ) / sizeof( _calibration_shading_ls_a_r[0] ), .width = sizeof( _calibration_shading_ls_a_r[0] )}; -static LookupTable calibration_shading_ls_a_g = {.ptr = _calibration_shading_ls_a_g, .rows = 1, .cols = sizeof( _calibration_shading_ls_a_g ) / sizeof( _calibration_shading_ls_a_g[0] ), .width = sizeof( _calibration_shading_ls_a_g[0] )}; -static LookupTable calibration_shading_ls_a_b = {.ptr = _calibration_shading_ls_a_b, .rows = 1, .cols = sizeof( _calibration_shading_ls_a_b ) / sizeof( _calibration_shading_ls_a_b[0] ), .width = sizeof( _calibration_shading_ls_a_b[0] )}; -static LookupTable calibration_shading_ls_tl84_r = {.ptr = _calibration_shading_ls_tl84_r, .rows = 1, .cols = sizeof( _calibration_shading_ls_tl84_r ) / sizeof( _calibration_shading_ls_tl84_r[0] ), .width = sizeof( _calibration_shading_ls_tl84_r[0] )}; -static LookupTable calibration_shading_ls_tl84_g = {.ptr = _calibration_shading_ls_tl84_g, .rows = 1, .cols = sizeof( _calibration_shading_ls_tl84_g ) / sizeof( _calibration_shading_ls_tl84_g[0] ), .width = sizeof( _calibration_shading_ls_tl84_g[0] )}; -static LookupTable calibration_shading_ls_tl84_b = {.ptr = _calibration_shading_ls_tl84_b, .rows = 1, .cols = sizeof( _calibration_shading_ls_tl84_b ) / sizeof( _calibration_shading_ls_tl84_b[0] ), .width = sizeof( _calibration_shading_ls_tl84_b[0] )}; -static LookupTable calibration_shading_ls_d65_r = {.ptr = _calibration_shading_ls_d65_r, .rows = 1, .cols = sizeof( _calibration_shading_ls_d65_r ) / sizeof( _calibration_shading_ls_d65_r[0] ), .width = sizeof( _calibration_shading_ls_d65_r[0] )}; -static LookupTable calibration_shading_ls_d65_g = {.ptr = _calibration_shading_ls_d65_g, .rows = 1, .cols = sizeof( _calibration_shading_ls_d65_g ) / sizeof( _calibration_shading_ls_d65_g[0] ), .width = sizeof( _calibration_shading_ls_d65_g[0] )}; -static LookupTable calibration_shading_ls_d65_b = {.ptr = _calibration_shading_ls_d65_b, .rows = 1, .cols = sizeof( _calibration_shading_ls_d65_b ) / sizeof( _calibration_shading_ls_d65_b[0] ), .width = sizeof( _calibration_shading_ls_d65_b[0] )}; -static LookupTable calibration_awb_warming_ls_a = {.ptr = _calibration_awb_warming_ls_a, .rows = 1, .cols = sizeof( _calibration_awb_warming_ls_a ) / sizeof( _calibration_awb_warming_ls_a[0] ), .width = sizeof( _calibration_awb_warming_ls_a[0] )}; -static LookupTable calibration_awb_warming_ls_d50 = {.ptr = _calibration_awb_warming_ls_d50, .rows = 1, .cols = sizeof( _calibration_awb_warming_ls_d50 ) / sizeof( _calibration_awb_warming_ls_d50[0] ), .width = sizeof( _calibration_awb_warming_ls_d50[0] )}; -static LookupTable calibration_awb_warming_ls_d75 = {.ptr = _calibration_awb_warming_ls_d75, .rows = 1, .cols = sizeof( _calibration_awb_warming_ls_d75 ) / sizeof( _calibration_awb_warming_ls_d75[0] ), .width = sizeof( _calibration_awb_warming_ls_d75[0] )}; -static LookupTable calibration_noise_profile = {.ptr = _calibration_noise_profile, .rows = 1, .cols = sizeof( _calibration_noise_profile ) / sizeof( _calibration_noise_profile[0] ), .width = sizeof( _calibration_noise_profile[0] )}; -static LookupTable calibration_demosaic = {.ptr = _calibration_demosaic, .rows = 1, .cols = sizeof( _calibration_demosaic ) / sizeof( _calibration_demosaic[0] ), .width = sizeof( _calibration_demosaic[0] )}; -static LookupTable calibration_wdr_np_lut = {.ptr = _calibration_wdr_np_lut, .rows = 1, .cols = sizeof( _calibration_wdr_np_lut ) / sizeof( _calibration_wdr_np_lut[0] ), .width = sizeof( _calibration_wdr_np_lut[0] )}; -static LookupTable calibration_gamma = {.ptr = _calibration_gamma, .rows = 1, .cols = sizeof( _calibration_gamma ) / sizeof( _calibration_gamma[0] ), .width = sizeof( _calibration_gamma[0] )}; -static LookupTable calibration_iridix_asymmetry = {.ptr = _calibration_iridix_asymmetry, .rows = 1, .cols = sizeof( _calibration_iridix_asymmetry ) / sizeof( _calibration_iridix_asymmetry[0] ), .width = sizeof( _calibration_iridix_asymmetry[0] )}; -static LookupTable calibration_ca_filter_mem = {.ptr = _calibration_ca_filter_mem, .rows = 1, .cols = sizeof( _calibration_ca_filter_mem ) / sizeof( _calibration_ca_filter_mem[0] ), .width = sizeof( _calibration_ca_filter_mem[0] )}; -static LookupTable calibration_ca_correction = {.ptr = _calibration_ca_correction, .rows = 1, .cols = sizeof( _calibration_ca_correction ) / sizeof( _calibration_ca_correction[0] ), .width = sizeof( _calibration_ca_correction[0] )}; -static LookupTable calibration_ca_correction_mem = {.ptr = _calibration_ca_correction_mem, .cols = 10, .rows = sizeof( _calibration_ca_correction_mem ) / sizeof( _calibration_ca_correction_mem[0] ), .width = sizeof( _calibration_ca_correction_mem[0][0] )}; -static LookupTable calibration_lut3d_mem = {.ptr = _calibration_lut3d_mem, .rows = 1, .cols = sizeof( _calibration_lut3d_mem ) / sizeof( _calibration_lut3d_mem[0] ), .width = sizeof( _calibration_lut3d_mem[0] )}; - -uint32_t get_calibrations_static_fs_lin_os08a10_tv( ACameraCalibrations *c ) -{ - uint32_t result = 0; - if ( c != 0 ) { - c->calibrations[CALIBRATION_SHADING_RADIAL_R] = &calibration_shading_radial_r; - c->calibrations[CALIBRATION_SHADING_RADIAL_G] = &calibration_shading_radial_g; - c->calibrations[CALIBRATION_SHADING_RADIAL_B] = &calibration_shading_radial_b; - c->calibrations[CALIBRATION_DECOMPANDER0_MEM] = &calibration_decompander0_mem; - c->calibrations[CALIBRATION_DECOMPANDER1_MEM] = &calibration_decompander1_mem; - c->calibrations[CALIBRATION_LIGHT_SRC] = &calibration_light_src; - c->calibrations[CALIBRATION_RG_POS] = &calibration_rg_pos; - c->calibrations[CALIBRATION_BG_POS] = &calibration_bg_pos; - c->calibrations[CALIBRATION_MESH_RGBG_WEIGHT] = &calibration_mesh_rgbg_weight; - c->calibrations[CALIBRATION_MESH_LS_WEIGHT] = &calibration_mesh_ls_weight; - c->calibrations[CALIBRATION_MESH_COLOR_TEMPERATURE] = &calibration_mesh_color_temperature; - c->calibrations[CALIBRATION_WB_STRENGTH] = &calibration_wb_strength; - c->calibrations[CALIBRATION_SKY_LUX_TH] = &calibration_sky_lux_th; - c->calibrations[CALIBRATION_CT_RG_POS_CALC] = &calibration_ct_rg_pos_calc; - c->calibrations[CALIBRATION_CT_BG_POS_CALC] = &calibration_ct_bg_pos_calc; - c->calibrations[CALIBRATION_COLOR_TEMP] = &calibration_color_temp; - c->calibrations[CALIBRATION_CT65POS] = &calibration_ct65pos; - c->calibrations[CALIBRATION_CT40POS] = &calibration_ct40pos; - c->calibrations[CALIBRATION_CT30POS] = &calibration_ct30pos; - c->calibrations[CALIBRATION_EVTOLUX_EV_LUT] = &calibration_evtolux_ev_lut; - c->calibrations[CALIBRATION_EVTOLUX_LUX_LUT] = &calibration_evtolux_lux_lut; - c->calibrations[CALIBRATION_BLACK_LEVEL_R] = &calibration_black_level_r; - c->calibrations[CALIBRATION_BLACK_LEVEL_GR] = &calibration_black_level_gr; - c->calibrations[CALIBRATION_BLACK_LEVEL_GB] = &calibration_black_level_gb; - c->calibrations[CALIBRATION_BLACK_LEVEL_B] = &calibration_black_level_b; - c->calibrations[CALIBRATION_STATIC_WB] = &calibration_static_wb; - c->calibrations[CALIBRATION_MT_ABSOLUTE_LS_A_CCM] = &calibration_mt_absolute_ls_a_ccm; - c->calibrations[CALIBRATION_MT_ABSOLUTE_LS_D40_CCM] = &calibration_mt_absolute_ls_d40_ccm; - c->calibrations[CALIBRATION_MT_ABSOLUTE_LS_D50_CCM] = &calibration_mt_absolute_ls_d50_ccm; - c->calibrations[CALIBRATION_SHADING_LS_A_R] = &calibration_shading_ls_a_r; - c->calibrations[CALIBRATION_SHADING_LS_A_G] = &calibration_shading_ls_a_g; - c->calibrations[CALIBRATION_SHADING_LS_A_B] = &calibration_shading_ls_a_b; - c->calibrations[CALIBRATION_SHADING_LS_TL84_R] = &calibration_shading_ls_tl84_r; - c->calibrations[CALIBRATION_SHADING_LS_TL84_G] = &calibration_shading_ls_tl84_g; - c->calibrations[CALIBRATION_SHADING_LS_TL84_B] = &calibration_shading_ls_tl84_b; - c->calibrations[CALIBRATION_SHADING_LS_D65_R] = &calibration_shading_ls_d65_r; - c->calibrations[CALIBRATION_SHADING_LS_D65_G] = &calibration_shading_ls_d65_g; - c->calibrations[CALIBRATION_SHADING_LS_D65_B] = &calibration_shading_ls_d65_b; - c->calibrations[CALIBRATION_AWB_WARMING_LS_A] = &calibration_awb_warming_ls_a; - c->calibrations[CALIBRATION_AWB_WARMING_LS_D50] = &calibration_awb_warming_ls_d50; - c->calibrations[CALIBRATION_AWB_WARMING_LS_D75] = &calibration_awb_warming_ls_d75; - c->calibrations[CALIBRATION_NOISE_PROFILE] = &calibration_noise_profile; - c->calibrations[CALIBRATION_DEMOSAIC] = &calibration_demosaic; - c->calibrations[CALIBRATION_WDR_NP_LUT] = &calibration_wdr_np_lut; - c->calibrations[CALIBRATION_GAMMA] = &calibration_gamma; - c->calibrations[CALIBRATION_IRIDIX_ASYMMETRY] = &calibration_iridix_asymmetry; - c->calibrations[CALIBRATION_AWB_SCENE_PRESETS] = &calibration_awb_scene_presets; - c->calibrations[CALIBRATION_CA_FILTER_MEM] = &calibration_ca_filter_mem; - c->calibrations[CALIBRATION_CA_CORRECTION] = &calibration_ca_correction; - c->calibrations[CALIBRATION_CA_CORRECTION_MEM] = &calibration_ca_correction_mem; - c->calibrations[CALIBRATION_LUT3D_MEM] = &calibration_lut3d_mem; - } else { - result = -1; - } - return result; -} -- Gitee