From patchwork Tue Mar 4 23:12:52 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Scally X-Patchwork-Id: 22922 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 12EB6C3257 for ; Tue, 4 Mar 2025 23:13:33 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 78B6868823; Wed, 5 Mar 2025 00:13:29 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="wg02JsXh"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 708CD68777 for ; Wed, 5 Mar 2025 00:13:26 +0100 (CET) Received: from mail.ideasonboard.com (cpc141996-chfd3-2-0-cust928.12-3.cable.virginm.net [86.13.91.161]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id DD423352; Wed, 5 Mar 2025 00:11:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1741129914; bh=t1p53joINf2QMEOBIMMMy3TjxPipXNBLGG2RbAVI2cI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wg02JsXh3e3cYW4IPT0bjns6Jv5nDF9xg1thoTwcQWB6DyBjr6L1FILiKMJGI45v6 RwX6TXGGe6QDG2fleZZY6KSLuXBD6NWkC4cHZ+8e5SbASszHZE9M7cjLlpRG2vYmze iSmt2JXcTG3oCHVDXQ0DabYkmlGSkY7vlk7dwl5o= From: Daniel Scally To: libcamera-devel@lists.libcamera.org Cc: Daniel Scally Subject: [PATCH 1/3] utils: tuning: Add tuning scripts for mali-c55 Date: Tue, 4 Mar 2025 23:12:52 +0000 Message-Id: <20250304231254.10588-2-dan.scally@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250304231254.10588-1-dan.scally@ideasonboard.com> References: <20250304231254.10588-1-dan.scally@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Add tuning scripts for the mali-c55 IPA. At present the only module that is available is for lens shading correction. Signed-off-by: Daniel Scally --- .../tuning/libtuning/modules/lsc/__init__.py | 1 + .../tuning/libtuning/modules/lsc/mali_c55.py | 173 ++++++++++++++++++ utils/tuning/mali-c55.py | 40 ++++ 3 files changed, 214 insertions(+) create mode 100644 utils/tuning/libtuning/modules/lsc/mali_c55.py create mode 100755 utils/tuning/mali-c55.py diff --git a/utils/tuning/libtuning/modules/lsc/__init__.py b/utils/tuning/libtuning/modules/lsc/__init__.py index 0ba4411b..edd5ce7f 100644 --- a/utils/tuning/libtuning/modules/lsc/__init__.py +++ b/utils/tuning/libtuning/modules/lsc/__init__.py @@ -3,5 +3,6 @@ # Copyright (C) 2022, Paul Elder from libtuning.modules.lsc.lsc import LSC +from libtuning.modules.lsc.mali_c55 import LSCMaliC55 from libtuning.modules.lsc.raspberrypi import ALSCRaspberryPi from libtuning.modules.lsc.rkisp1 import LSCRkISP1 diff --git a/utils/tuning/libtuning/modules/lsc/mali_c55.py b/utils/tuning/libtuning/modules/lsc/mali_c55.py new file mode 100644 index 00000000..7d85aee9 --- /dev/null +++ b/utils/tuning/libtuning/modules/lsc/mali_c55.py @@ -0,0 +1,173 @@ +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (C) 2019, Raspberry Pi Ltd +# Copyright (C) 2024, Ideas on Board oy +# +# mali-c55.py - LSC module for tuning mali-c55 + +from .lsc import LSC + +import libtuning as lt + +import numpy as np + +class LSCMaliC55(LSC): + out_name = 'Lsc' + name = "LSCMaliC55" + + def __init__(self, *args, **kwargs): + super().__init__(**kwargs) + + def validate_config(self, config: dict) -> bool: + # There's nothing we need in config + return True + + def _do_single_lsc(self, image: lt.Image): + """ + Generate lens shading tables of gain values for a single image + + This function generates a set of lens shading tables - one for + each colour channel. The table values are gain values, expressed + generically (I.E. not in the IPA module's format) + + Returns a tuple of colour temperature, array of red gain values, + array of blue gain values, array of red's green gain values and + array of blue's green gain values. + """ + cgr, _ = self._lsc_single_channel(image.channels[lt.Color.GR], + image) + cgb, _ = self._lsc_single_channel(image.channels[lt.Color.GB], + image) + cr, _ = self._lsc_single_channel(image.channels[lt.Color.R], + image) + cb, _ = self._lsc_single_channel(image.channels[lt.Color.B], + image) + + return ( + image.color, + cr.flatten(), + cb.flatten(), + cgr.flatten(), + cgb.flatten() + ) + + def _do_all_lsc(self, images: list) -> dict: + """ + Generate lens shading tables in the IPA's format + + This function generates lens shading tables from the list of + images. A set (one per colour channel) of tables is generated + for each image, and then the sets from all images which were + generated from the same colour temperature are averaged together + and transformed into the format required by the IPA module. + + Returns a list of dictionaries containing colour temperature, + red lens shading table, green lens shading table and blue lens + shading table. + """ + + output_map_func = lt.gradient.Linear().map + + list_ct = [] + + list_cr = [] + list_cb = [] + list_cgr = [] + list_cgb = [] + + for image in images: + ct, cr, cg, cgr, cgb = self._do_single_lsc(image) + + list_ct.append(ct) + list_cr.append(cr) + list_cb.append(cg) + list_cgr.append(cgr) + list_cgb.append(cgb) + + list_ct = np.array(list_ct) + list_cr = np.array(list_cr) + list_cb = np.array(list_cb) + list_cgr = np.array(list_cgr) + list_cgb = np.array(list_cgb) + list_cg = (list_cgr + list_cgb) / 2 + + # We need to map the gains into the IPA-specific values to pass + # to the ISP. For the mali-c55 the values are always in the + # range [0..255] but the min/max that those values represent + # depend on the mesh scale parameter, so we'll need to choose + # what that should be and use the gain-range it represents as + # the domain for output_map_func(). + # + # For convenient reference, the possible mesh scale values are + # as follows (taken from include/linux/mali-c55-config.h) + # + # - 0 = 0-2x gain + # - 1 = 0-4x gain + # - 2 = 0-8x gain + # - 3 = 0-16x gain + # - 4 = 1-2x gain + # - 5 = 1-3x gain + # - 6 = 1-5x gain + # - 7 = 1-9x gain + # + # We want to use the scale with the smallest range that still + # covers the minimum and maximum value we want to set...but this + # process at present hard-codes a minimum gain of 1.0, so the + # first 4 scales are out right away. We'll just consider the + # minimum as 1.0 for now and if we ever need more than 9.0 gain + # we'll have to fix this - shout about that if so. + + max_gain = np.max([list_cr, list_cgr, list_cgb, list_cb]) + if (max_gain > 9.0): + print("WARNING: Maximum gain restricted artificially to 9.0") + + mesh_scales = { + 4: (1.0, 2.0), + 5: (1.0, 3.0), + 6: (1.0, 5.0), + 7: (1.0, 9.0) + } + + for i in mesh_scales.keys(): + if max_gain <= mesh_scales[i][1]: + break + + mesh_scale = i + + output_list = [] + for ct in sorted(set(list_ct)): + indices = np.where(list_ct == ct) + ct = int(ct) + + tables = [] + for lists in [list_cr, list_cg, list_cb]: + table = np.mean(lists[indices], axis=0) + + table = output_map_func( + ( + mesh_scales[mesh_scale][0], + mesh_scales[mesh_scale][1] - 0.001 + ), + (0, 255), + table + ) + table = np.round(table).astype('uint8').tolist() + tables.append(table) + + entry = { + 'ct': ct, + 'r': tables[0], + 'g': tables[1], + 'b': tables[2], + } + + output_list.append(entry) + + return { + 'meshScale': mesh_scale, + 'sets': output_list + } + + def process(self, config: dict, images: list, outputs: dict) -> dict: + return self._do_all_lsc(images) + diff --git a/utils/tuning/mali-c55.py b/utils/tuning/mali-c55.py new file mode 100755 index 00000000..01535366 --- /dev/null +++ b/utils/tuning/mali-c55.py @@ -0,0 +1,40 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright (C) 2024, Ideas on Board oy +# +# mali-c55.py - Tuning script for mali-c55 + +import sys + +import libtuning as lt +from libtuning.parsers import YamlParser +from libtuning.generators import YamlOutput +from libtuning.modules.lsc import LSCMaliC55 + +tuner = lt.Tuner('MaliC55') +tuner.add(LSCMaliC55( + debug=[lt.Debug.Plot], + # This is for the actual LSC tuning, and is part of the base LSC + # module. rkisp1's table sector sizes (16x16 programmed as mirrored + # 8x8) are separate, and is hardcoded in its specific LSC tuning + # module. + sector_shape=(32, 32), + + sector_x_gradient=lt.gradient.Linear(lt.Remainder.DistributeFront), + sector_y_gradient=lt.gradient.Linear(lt.Remainder.DistributeFront), + + # This is the function that will be used to average the pixels in + # each sector. This can also be a custom function. + sector_average_function=lt.average.Mean(), + + # This is the function that will be used to smooth the color ratio + # values. This can also be a custom function. + smoothing_function=lt.smoothing.MedianBlur(3), + )) +tuner.set_input_parser(YamlParser()) +tuner.set_output_formatter(YamlOutput()) +tuner.set_output_order([LSCMaliC55]) + +if __name__ == '__main__': + sys.exit(tuner.run(sys.argv)) From patchwork Tue Mar 4 23:12:53 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Scally X-Patchwork-Id: 22923 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id B5C95C32DD for ; Tue, 4 Mar 2025 23:13:34 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8BE8E68822; Wed, 5 Mar 2025 00:13:30 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="r/s3Za8x"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 9D36868779 for ; Wed, 5 Mar 2025 00:13:26 +0100 (CET) Received: from mail.ideasonboard.com (cpc141996-chfd3-2-0-cust928.12-3.cable.virginm.net [86.13.91.161]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 2DCB18BF; Wed, 5 Mar 2025 00:11:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1741129914; bh=M4g1KD9fiAFPc9xaV9pfUdioKxsL21IDwnRxjN/imlk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r/s3Za8x94pjet9VVb+CPXBRRJucvRoYXkqrVL486dZ5n6V4Lnp5Y9PIF5v0RoMIt Zlm73CDL3qG8rB/i0y3hOrhtlQx9HnpaRRGPhQseCW9zUHveuxpIMPP8xvCnZxa+qg sRh0kbtXthQ3wmhuC/Lw++oqQRXc9Ozw06vK2VhU= From: Daniel Scally To: libcamera-devel@lists.libcamera.org Cc: Daniel Scally Subject: [PATCH 2/3] libtuning: Gradient: Correct Linear distribution Date: Tue, 4 Mar 2025 23:12:53 +0000 Message-Id: <20250304231254.10588-3-dan.scally@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250304231254.10588-1-dan.scally@ideasonboard.com> References: <20250304231254.10588-1-dan.scally@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The Linear distributor attempts to distribute pixels into sectors of even size. Where the image width doesn't allow this it attempts to create all but one sector of full size, and allows the caller to choose to have the stunted sector at the front or the back. The implicit assumption is that domain == (sector_size * (n_sectors - 1)) + remainder which does not necessarily hold true. For example with 32 sectors and a domain of 648 the calculated sector size will be 21 pixels, which leads to 31 * 21 = 651 which is larger than the domain size. Correct the issue by checking if there's more one stunted sector to be filled. If there is, rather than following the remainder hint for distribution place one of the stunted sectors at the front and one at the back. Signed-off-by: Daniel Scally --- utils/tuning/libtuning/gradient.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/utils/tuning/libtuning/gradient.py b/utils/tuning/libtuning/gradient.py index b643f502..bb2edef2 100644 --- a/utils/tuning/libtuning/gradient.py +++ b/utils/tuning/libtuning/gradient.py @@ -55,17 +55,23 @@ class Linear(Gradient): size = math.ceil(size) rem = domain % size - output_sectors = [int(size)] * (sectors - 1) + n_full_sectors = math.floor(domain / size) + output_sectors = [int(size)] * n_full_sectors if self.remainder == lt.Remainder.Float: size = domain / sectors output_sectors = [size] * sectors - elif self.remainder == lt.Remainder.DistributeFront: + elif ((sectors - n_full_sectors) == 1): + if self.remainder == lt.Remainder.DistributeFront: + output_sectors.append(int(rem)) + elif self.remainder == lt.Remainder.DistributeBack: + output_sectors.insert(0, int(rem)) + else: + raise ValueError + else: + rem = rem / 2 output_sectors.append(int(rem)) - elif self.remainder == lt.Remainder.DistributeBack: output_sectors.insert(0, int(rem)) - else: - raise ValueError return output_sectors From patchwork Tue Mar 4 23:12:54 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Scally X-Patchwork-Id: 22924 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id C13C0C3257 for ; Tue, 4 Mar 2025 23:13:35 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 96FFC6882A; Wed, 5 Mar 2025 00:13:31 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="IBefmK4t"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id E62F0687F0 for ; Wed, 5 Mar 2025 00:13:26 +0100 (CET) Received: from mail.ideasonboard.com (cpc141996-chfd3-2-0-cust928.12-3.cable.virginm.net [86.13.91.161]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 750D22C5; Wed, 5 Mar 2025 00:11:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1741129914; bh=AUEgIAUg2AtSWbL58mtg1T8xnjKWIwoSiUvN7ZpcqBs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IBefmK4taz/BWqIBQFRrhmw2nYAuLHCeXCj3lpM3cxPAt9T8MuioGK4NIUY/hZel5 rmgPI4tdt963qRUx3JeNcUxlLDpd0E6EiGOvHYUWg6Ee3zLd2E4g7nWgS8gy2HyNhz CHe7xTdGOucHLlMS+kSVEWUPcen/qWYil/rfQLN4= From: Daniel Scally To: libcamera-devel@lists.libcamera.org Cc: Daniel Scally Subject: [PATCH 3/3] ipa: mali-c55: Add imx708 tuning file Date: Tue, 4 Mar 2025 23:12:54 +0000 Message-Id: <20250304231254.10588-4-dan.scally@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250304231254.10588-1-dan.scally@ideasonboard.com> References: <20250304231254.10588-1-dan.scally@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Add a tuning file for the imx708 with black level offsets and lens shading table data. Signed-off-by: Daniel Scally --- src/ipa/mali-c55/data/imx708.yaml | 325 ++++++++++++++++++++++++++++++ src/ipa/mali-c55/data/meson.build | 1 + 2 files changed, 326 insertions(+) create mode 100644 src/ipa/mali-c55/data/imx708.yaml diff --git a/src/ipa/mali-c55/data/imx708.yaml b/src/ipa/mali-c55/data/imx708.yaml new file mode 100644 index 00000000..75b8398a --- /dev/null +++ b/src/ipa/mali-c55/data/imx708.yaml @@ -0,0 +1,325 @@ +# SPDX-License-Identifier: CC0-1.0 +%YAML 1.1 +--- +version: 1 +algorithms: + - Agc: + - Awb: + - BlackLevelCorrection: + offset00: 65536 + offset01: 65536 + offset10: 65536 + offset11: 65536 + - Lsc: + meshScale: 6 + sets: + - ct: 2500 + r: [ + 227, 209, 187, 167, 150, 134, 120, 109, 99, 89, 81, 73, 67, 61, 57, 57, 57, 57, 61, 67, 73, 80, 89, 98, 109, 120, 134, 150, 168, 188, 209, 227, + 218, 202, 181, 161, 143, 128, 115, 104, 93, 84, 75, 67, 61, 56, 53, 51, 51, 53, 56, 61, 67, 75, 83, 93, 103, 115, 128, 143, 161, 181, 202, 219, + 210, 194, 173, 153, 136, 121, 109, 97, 87, 76, 67, 60, 53, 48, 45, 44, 44, 45, 48, 53, 60, 67, 76, 86, 97, 108, 121, 136, 154, 173, 194, 211, + 204, 187, 166, 146, 130, 115, 103, 91, 80, 69, 60, 53, 46, 41, 38, 37, 37, 38, 41, 46, 53, 60, 69, 79, 91, 102, 115, 130, 147, 166, 188, 205, + 197, 180, 159, 140, 124, 110, 97, 85, 73, 63, 53, 46, 40, 35, 32, 31, 31, 32, 35, 40, 46, 53, 62, 73, 85, 97, 110, 124, 140, 160, 181, 199, + 192, 174, 154, 134, 119, 105, 92, 80, 67, 57, 47, 40, 34, 29, 27, 25, 25, 27, 29, 34, 40, 47, 56, 67, 79, 92, 105, 119, 135, 154, 175, 193, + 187, 169, 148, 130, 114, 100, 87, 74, 62, 51, 42, 34, 29, 24, 22, 20, 20, 22, 24, 29, 34, 42, 51, 62, 74, 87, 100, 114, 130, 148, 170, 188, + 182, 164, 143, 125, 110, 96, 83, 69, 57, 46, 37, 30, 24, 20, 17, 16, 16, 17, 20, 24, 30, 37, 46, 57, 69, 82, 96, 110, 125, 143, 164, 183, + 178, 159, 139, 121, 106, 92, 78, 65, 52, 42, 33, 26, 20, 17, 14, 12, 12, 14, 17, 20, 26, 33, 42, 52, 65, 78, 92, 106, 121, 139, 160, 179, + 175, 156, 135, 118, 103, 89, 75, 61, 49, 38, 29, 22, 17, 14, 10, 9, 9, 10, 14, 17, 22, 29, 38, 48, 61, 74, 89, 103, 118, 135, 156, 176, + 172, 152, 132, 115, 100, 86, 71, 57, 45, 35, 26, 19, 14, 10, 8, 6, 6, 8, 10, 14, 19, 26, 34, 45, 57, 71, 85, 100, 115, 132, 152, 173, + 170, 149, 129, 113, 98, 83, 68, 55, 42, 32, 24, 17, 12, 8, 6, 4, 4, 6, 8, 11, 17, 23, 32, 42, 54, 68, 83, 97, 112, 129, 150, 170, + 168, 147, 127, 111, 96, 81, 66, 52, 40, 30, 22, 15, 10, 6, 4, 2, 2, 4, 6, 10, 15, 21, 30, 40, 52, 66, 80, 95, 110, 127, 147, 168, + 167, 145, 126, 109, 94, 79, 64, 50, 38, 28, 20, 13, 8, 5, 2, 1, 1, 2, 4, 8, 13, 20, 28, 38, 50, 64, 79, 94, 109, 126, 145, 167, + 166, 144, 125, 108, 93, 78, 63, 49, 37, 27, 19, 12, 7, 4, 1, 1, 1, 1, 4, 7, 12, 19, 27, 37, 49, 62, 77, 93, 108, 124, 144, 166, + 166, 144, 124, 108, 92, 77, 62, 48, 36, 26, 18, 12, 7, 3, 1, 0, 0, 1, 3, 6, 11, 18, 26, 36, 48, 62, 77, 92, 107, 124, 143, 166, + 166, 143, 124, 108, 92, 77, 62, 48, 36, 26, 18, 12, 7, 3, 1, 0, 0, 1, 3, 6, 11, 18, 26, 36, 48, 62, 77, 92, 107, 123, 143, 166, + 166, 143, 124, 108, 92, 77, 62, 48, 36, 26, 18, 12, 7, 3, 1, 1, 1, 1, 3, 6, 11, 18, 26, 36, 48, 62, 77, 92, 107, 123, 143, 166, + 166, 144, 125, 108, 93, 78, 63, 49, 37, 27, 19, 12, 7, 4, 2, 1, 1, 2, 4, 7, 12, 19, 27, 37, 49, 62, 77, 92, 107, 124, 144, 166, + 167, 145, 126, 109, 94, 79, 64, 51, 39, 28, 20, 14, 8, 5, 3, 2, 2, 3, 5, 8, 13, 20, 28, 38, 50, 64, 78, 93, 108, 125, 145, 167, + 168, 147, 127, 111, 96, 81, 66, 52, 40, 30, 22, 15, 10, 6, 4, 3, 3, 4, 6, 10, 15, 21, 30, 40, 52, 65, 80, 95, 110, 127, 146, 168, + 169, 149, 129, 112, 98, 83, 69, 55, 43, 32, 24, 17, 12, 8, 6, 4, 4, 6, 8, 12, 17, 23, 32, 42, 54, 68, 82, 97, 112, 128, 148, 169, + 172, 152, 132, 115, 100, 86, 71, 58, 46, 35, 26, 20, 14, 11, 8, 7, 7, 8, 11, 14, 19, 26, 35, 45, 57, 71, 85, 99, 114, 131, 151, 171, + 175, 155, 135, 118, 103, 89, 75, 61, 49, 38, 30, 23, 17, 14, 11, 9, 9, 11, 14, 17, 22, 29, 38, 48, 60, 74, 88, 102, 117, 134, 154, 174, + 178, 159, 139, 121, 106, 92, 79, 65, 53, 42, 33, 26, 21, 17, 14, 13, 13, 14, 17, 20, 26, 33, 42, 52, 64, 78, 91, 105, 120, 137, 158, 177, + 181, 163, 143, 125, 110, 96, 83, 70, 57, 47, 38, 30, 25, 21, 18, 16, 16, 18, 20, 25, 30, 37, 46, 57, 69, 82, 95, 108, 124, 142, 162, 181, + 185, 168, 147, 129, 114, 100, 87, 75, 62, 52, 42, 35, 30, 25, 22, 21, 21, 22, 25, 30, 35, 42, 51, 62, 73, 86, 99, 113, 128, 146, 167, 185, + 190, 173, 153, 134, 118, 105, 92, 80, 68, 57, 48, 40, 35, 30, 27, 26, 26, 27, 30, 35, 40, 47, 56, 67, 79, 91, 103, 117, 133, 152, 172, 190, + 196, 179, 159, 139, 123, 109, 97, 85, 74, 63, 54, 47, 40, 36, 33, 31, 31, 33, 36, 40, 46, 53, 62, 73, 84, 96, 108, 122, 138, 157, 178, 195, + 202, 185, 165, 146, 129, 115, 103, 91, 80, 70, 61, 54, 47, 42, 39, 38, 38, 39, 42, 46, 53, 60, 69, 79, 90, 101, 113, 128, 144, 163, 184, 201, + 209, 192, 172, 153, 135, 121, 108, 97, 87, 77, 68, 60, 54, 49, 46, 45, 45, 46, 49, 54, 60, 67, 76, 86, 96, 107, 119, 134, 151, 170, 191, 207, + 216, 199, 178, 159, 141, 126, 114, 103, 92, 82, 74, 66, 60, 54, 51, 50, 50, 51, 54, 60, 66, 73, 82, 91, 101, 112, 125, 140, 158, 177, 197, 215, + ] + g: [ + 179, 163, 144, 128, 112, 99, 88, 79, 71, 64, 58, 52, 48, 43, 41, 41, 41, 41, 43, 48, 52, 58, 64, 71, 79, 88, 99, 113, 128, 145, 164, 180, + 171, 157, 139, 122, 107, 94, 84, 75, 67, 60, 53, 48, 43, 40, 38, 37, 37, 38, 40, 43, 48, 53, 60, 67, 74, 84, 94, 107, 123, 139, 158, 173, + 165, 150, 132, 116, 101, 89, 79, 70, 62, 54, 48, 43, 38, 35, 32, 31, 31, 33, 35, 38, 43, 48, 54, 61, 69, 79, 89, 101, 116, 133, 151, 166, + 158, 144, 127, 110, 96, 84, 74, 65, 57, 50, 43, 38, 33, 30, 28, 27, 27, 28, 30, 33, 38, 43, 49, 57, 65, 74, 84, 96, 111, 127, 145, 160, + 153, 139, 121, 105, 91, 80, 70, 61, 53, 45, 38, 33, 29, 25, 23, 22, 22, 23, 25, 29, 33, 38, 45, 52, 61, 70, 80, 91, 105, 122, 140, 155, + 149, 134, 116, 100, 87, 76, 66, 57, 48, 41, 34, 29, 25, 21, 19, 18, 18, 19, 21, 25, 29, 34, 41, 48, 57, 66, 76, 87, 101, 117, 135, 150, + 144, 129, 112, 96, 84, 73, 63, 53, 44, 37, 30, 25, 21, 18, 16, 15, 15, 16, 18, 21, 25, 30, 37, 44, 53, 63, 73, 83, 96, 112, 130, 146, + 140, 125, 108, 93, 80, 69, 59, 50, 41, 33, 27, 22, 18, 15, 13, 12, 12, 13, 15, 18, 22, 27, 33, 41, 50, 59, 69, 80, 93, 108, 126, 142, + 137, 121, 104, 89, 77, 67, 56, 47, 38, 30, 24, 19, 15, 12, 10, 9, 9, 10, 12, 15, 19, 24, 30, 38, 47, 56, 66, 77, 90, 104, 122, 139, + 134, 118, 101, 87, 75, 64, 54, 44, 35, 28, 21, 16, 12, 10, 8, 7, 7, 8, 10, 12, 16, 21, 27, 35, 44, 54, 64, 75, 87, 101, 119, 136, + 132, 115, 98, 85, 73, 62, 51, 41, 33, 25, 19, 14, 10, 8, 6, 5, 5, 6, 8, 10, 14, 19, 25, 32, 41, 51, 62, 72, 84, 99, 116, 133, + 130, 113, 96, 83, 71, 60, 49, 39, 31, 23, 17, 12, 9, 6, 4, 3, 3, 4, 6, 8, 12, 17, 23, 30, 39, 49, 60, 71, 83, 96, 114, 131, + 128, 111, 95, 81, 69, 58, 48, 38, 29, 22, 16, 11, 7, 4, 3, 2, 2, 3, 4, 7, 11, 16, 22, 29, 38, 47, 58, 69, 81, 95, 112, 130, + 127, 110, 93, 80, 68, 57, 46, 36, 28, 21, 15, 10, 6, 3, 2, 1, 1, 2, 3, 6, 10, 15, 20, 28, 36, 46, 57, 68, 80, 93, 110, 129, + 127, 109, 92, 79, 67, 56, 45, 36, 27, 20, 14, 9, 5, 3, 1, 1, 1, 1, 3, 5, 9, 14, 20, 27, 35, 45, 56, 67, 79, 93, 109, 128, + 127, 108, 92, 79, 67, 56, 45, 35, 26, 19, 13, 9, 5, 2, 1, 0, 0, 1, 2, 5, 9, 13, 19, 26, 35, 45, 55, 67, 79, 92, 109, 128, + 127, 108, 92, 78, 67, 56, 45, 35, 26, 19, 13, 9, 5, 2, 1, 0, 0, 1, 2, 5, 8, 13, 19, 26, 35, 45, 55, 67, 78, 92, 108, 128, + 127, 108, 92, 78, 67, 56, 45, 35, 26, 19, 13, 9, 5, 2, 1, 0, 0, 1, 2, 5, 9, 13, 19, 26, 35, 45, 55, 67, 78, 92, 108, 128, + 127, 109, 92, 79, 67, 56, 45, 36, 27, 20, 14, 9, 5, 3, 1, 1, 1, 1, 3, 5, 9, 14, 20, 27, 35, 45, 56, 67, 79, 92, 109, 128, + 127, 110, 93, 80, 68, 57, 46, 36, 28, 21, 15, 10, 6, 3, 2, 1, 1, 2, 3, 6, 10, 15, 20, 28, 36, 46, 57, 68, 80, 93, 110, 129, + 128, 111, 95, 81, 69, 58, 48, 38, 29, 22, 16, 11, 7, 4, 3, 2, 2, 3, 4, 7, 11, 16, 22, 29, 38, 47, 58, 69, 81, 95, 112, 129, + 130, 113, 96, 82, 71, 60, 49, 39, 31, 23, 17, 12, 9, 6, 4, 3, 3, 4, 6, 8, 12, 17, 23, 31, 39, 49, 60, 70, 82, 96, 113, 131, + 132, 116, 99, 84, 73, 62, 51, 41, 33, 25, 19, 14, 10, 8, 6, 5, 5, 6, 8, 10, 14, 19, 25, 33, 41, 51, 61, 72, 84, 98, 115, 133, + 134, 118, 101, 87, 75, 64, 54, 44, 35, 28, 21, 16, 12, 10, 8, 7, 7, 8, 10, 12, 16, 21, 27, 35, 44, 53, 64, 74, 87, 101, 118, 135, + 137, 121, 104, 90, 77, 67, 56, 47, 38, 30, 24, 19, 15, 12, 10, 9, 9, 10, 12, 15, 19, 24, 30, 38, 46, 56, 66, 77, 89, 104, 122, 138, + 140, 125, 108, 93, 80, 69, 59, 50, 41, 33, 27, 22, 18, 15, 13, 12, 12, 13, 15, 18, 22, 27, 33, 41, 50, 59, 69, 80, 92, 108, 125, 141, + 143, 129, 112, 96, 83, 72, 63, 53, 45, 37, 30, 25, 22, 18, 16, 15, 15, 16, 18, 22, 25, 30, 37, 44, 53, 62, 72, 83, 96, 111, 129, 145, + 148, 133, 116, 100, 87, 76, 66, 57, 49, 41, 34, 29, 25, 22, 20, 19, 19, 20, 22, 25, 29, 34, 41, 48, 57, 66, 75, 87, 100, 116, 133, 149, + 152, 138, 121, 105, 91, 80, 70, 61, 53, 45, 39, 33, 29, 26, 24, 23, 23, 24, 26, 29, 33, 38, 45, 52, 61, 70, 79, 91, 105, 121, 138, 153, + 157, 143, 126, 110, 96, 84, 74, 65, 57, 50, 43, 38, 33, 30, 28, 27, 27, 28, 30, 33, 38, 43, 50, 57, 65, 74, 83, 95, 110, 126, 143, 158, + 163, 149, 132, 116, 101, 89, 79, 70, 62, 55, 48, 43, 38, 35, 33, 32, 32, 33, 35, 38, 43, 48, 54, 62, 69, 78, 88, 101, 116, 132, 149, 164, + 170, 155, 137, 121, 106, 94, 83, 74, 66, 59, 53, 47, 43, 38, 36, 36, 36, 36, 38, 43, 47, 53, 59, 66, 74, 82, 93, 106, 121, 137, 155, 171, + ] + b: [ + 192, 178, 158, 140, 124, 110, 98, 88, 79, 72, 65, 59, 53, 48, 47, 47, 47, 47, 48, 53, 59, 65, 72, 79, 88, 98, 110, 124, 141, 159, 176, 191, + 184, 170, 150, 133, 117, 103, 92, 82, 74, 66, 59, 53, 48, 44, 42, 41, 41, 42, 45, 48, 53, 59, 66, 73, 82, 92, 103, 117, 133, 151, 168, 184, + 177, 162, 143, 126, 110, 97, 86, 77, 68, 60, 53, 47, 42, 38, 36, 35, 35, 36, 38, 42, 47, 53, 60, 67, 76, 86, 96, 110, 126, 144, 162, 178, + 171, 156, 138, 120, 105, 92, 82, 72, 63, 55, 47, 42, 36, 33, 31, 30, 30, 31, 33, 36, 42, 47, 54, 62, 72, 82, 92, 105, 120, 138, 156, 171, + 166, 151, 132, 115, 100, 88, 77, 68, 58, 50, 42, 36, 32, 28, 26, 25, 25, 26, 28, 32, 36, 42, 49, 58, 67, 77, 88, 100, 115, 133, 150, 166, + 160, 146, 128, 110, 96, 84, 74, 63, 54, 45, 38, 32, 27, 24, 21, 20, 20, 21, 24, 28, 32, 38, 45, 53, 63, 73, 84, 96, 110, 127, 146, 161, + 156, 141, 123, 106, 92, 80, 69, 59, 49, 41, 33, 27, 24, 20, 17, 16, 16, 18, 20, 24, 28, 34, 41, 49, 59, 69, 80, 92, 105, 122, 141, 157, + 151, 137, 118, 102, 88, 77, 66, 55, 45, 37, 29, 24, 20, 16, 14, 13, 13, 14, 16, 20, 24, 30, 37, 45, 55, 66, 77, 89, 102, 119, 136, 153, + 148, 132, 114, 98, 85, 74, 63, 52, 42, 33, 27, 21, 16, 14, 11, 10, 10, 11, 14, 16, 21, 26, 33, 42, 52, 62, 74, 86, 98, 115, 133, 150, + 145, 129, 111, 96, 83, 71, 60, 49, 39, 31, 24, 18, 14, 11, 8, 7, 7, 8, 11, 14, 18, 23, 30, 39, 49, 60, 71, 83, 96, 112, 130, 146, + 143, 127, 108, 93, 81, 69, 57, 46, 37, 28, 21, 16, 11, 8, 6, 5, 5, 6, 8, 11, 16, 21, 28, 36, 46, 57, 69, 81, 94, 109, 127, 144, + 141, 124, 106, 91, 79, 67, 55, 44, 34, 26, 19, 14, 9, 6, 5, 3, 3, 5, 6, 10, 14, 19, 26, 34, 44, 55, 67, 79, 92, 107, 124, 142, + 139, 122, 104, 90, 77, 65, 53, 42, 33, 25, 18, 12, 8, 5, 3, 2, 2, 3, 5, 8, 12, 18, 24, 33, 42, 53, 65, 77, 90, 105, 122, 140, + 138, 120, 102, 88, 76, 64, 52, 41, 31, 23, 17, 11, 7, 4, 2, 1, 1, 2, 4, 7, 11, 16, 23, 31, 41, 52, 64, 76, 88, 103, 120, 139, + 137, 119, 102, 87, 75, 63, 51, 40, 30, 22, 16, 10, 6, 3, 1, 1, 1, 1, 3, 6, 10, 15, 22, 30, 40, 51, 63, 75, 88, 103, 119, 139, + 137, 118, 101, 87, 75, 62, 50, 39, 30, 22, 15, 10, 6, 3, 1, 0, 0, 1, 3, 5, 10, 15, 22, 30, 39, 50, 62, 75, 87, 102, 119, 138, + 137, 118, 101, 87, 74, 62, 50, 39, 30, 22, 15, 10, 6, 3, 1, 0, 0, 1, 3, 5, 10, 15, 21, 30, 39, 50, 62, 75, 87, 102, 118, 138, + 137, 118, 101, 87, 74, 62, 50, 39, 30, 22, 15, 10, 6, 3, 1, 0, 0, 1, 3, 6, 10, 15, 22, 30, 39, 50, 62, 75, 87, 102, 118, 138, + 137, 119, 101, 87, 75, 62, 51, 40, 30, 22, 16, 10, 6, 3, 1, 1, 1, 2, 3, 6, 10, 15, 22, 30, 40, 51, 63, 75, 87, 102, 119, 138, + 138, 119, 102, 88, 75, 63, 52, 41, 31, 23, 16, 11, 7, 4, 2, 1, 2, 2, 4, 7, 11, 16, 23, 31, 41, 52, 63, 75, 88, 103, 120, 139, + 138, 121, 104, 89, 77, 65, 53, 42, 32, 24, 18, 12, 8, 5, 3, 2, 2, 3, 5, 8, 12, 18, 24, 32, 42, 53, 65, 77, 89, 105, 121, 139, + 140, 123, 105, 91, 78, 66, 55, 44, 34, 26, 19, 14, 9, 6, 5, 3, 3, 5, 6, 10, 14, 19, 26, 34, 44, 55, 66, 78, 91, 106, 123, 141, + 142, 125, 107, 93, 80, 68, 57, 46, 36, 28, 21, 16, 11, 8, 6, 5, 5, 6, 8, 11, 16, 21, 28, 36, 46, 57, 68, 80, 93, 108, 125, 143, + 144, 128, 110, 95, 82, 71, 59, 49, 39, 30, 23, 18, 13, 11, 8, 7, 7, 8, 11, 14, 18, 24, 30, 39, 49, 59, 71, 83, 95, 111, 128, 146, + 147, 131, 113, 98, 85, 73, 62, 52, 42, 33, 26, 20, 16, 13, 11, 10, 10, 11, 14, 16, 21, 27, 34, 42, 52, 62, 73, 85, 98, 114, 131, 148, + 150, 135, 117, 101, 88, 76, 65, 55, 45, 37, 30, 24, 20, 16, 14, 13, 13, 14, 16, 20, 24, 30, 37, 45, 55, 65, 76, 88, 101, 117, 135, 151, + 154, 140, 121, 105, 91, 79, 69, 59, 49, 40, 33, 27, 23, 20, 17, 16, 16, 18, 20, 24, 28, 34, 41, 49, 58, 69, 79, 91, 105, 121, 139, 154, + 158, 144, 125, 109, 94, 83, 72, 63, 53, 45, 38, 32, 27, 23, 21, 20, 20, 22, 24, 28, 32, 38, 45, 53, 62, 72, 83, 94, 109, 126, 143, 159, + 162, 148, 130, 113, 98, 86, 76, 67, 58, 49, 42, 36, 32, 28, 26, 25, 25, 26, 28, 32, 36, 42, 49, 57, 66, 76, 86, 98, 113, 130, 148, 164, + 167, 153, 135, 118, 103, 91, 80, 71, 62, 54, 47, 42, 36, 32, 30, 29, 29, 30, 33, 36, 42, 47, 54, 62, 71, 80, 90, 103, 118, 135, 153, 168, + 173, 161, 142, 125, 109, 96, 85, 76, 68, 59, 53, 47, 42, 38, 36, 35, 35, 36, 38, 42, 47, 53, 59, 67, 76, 85, 96, 109, 125, 142, 159, 174, + 181, 168, 149, 132, 116, 102, 91, 82, 73, 65, 58, 52, 47, 42, 40, 40, 40, 40, 42, 47, 52, 58, 65, 73, 81, 91, 102, 116, 132, 149, 167, 181, + ] + - ct: 5500 + r: [ + 210, 192, 171, 153, 135, 121, 108, 98, 88, 79, 72, 65, 59, 54, 51, 51, 51, 51, 55, 60, 66, 73, 81, 90, 100, 111, 124, 139, 157, 176, 197, 215, + 201, 186, 166, 147, 130, 116, 104, 93, 84, 74, 66, 59, 54, 49, 47, 46, 46, 47, 50, 55, 61, 68, 76, 85, 95, 106, 119, 134, 151, 170, 191, 207, + 194, 179, 158, 140, 124, 110, 98, 87, 77, 68, 59, 53, 47, 43, 40, 39, 39, 41, 44, 48, 55, 61, 70, 79, 89, 100, 112, 127, 144, 163, 183, 200, + 188, 172, 152, 133, 118, 104, 93, 82, 71, 61, 53, 47, 40, 36, 34, 33, 33, 34, 37, 42, 48, 55, 63, 73, 84, 95, 107, 121, 137, 156, 177, 194, + 182, 166, 146, 127, 112, 99, 88, 76, 65, 56, 47, 40, 35, 31, 28, 27, 27, 29, 32, 36, 42, 49, 57, 67, 78, 90, 102, 115, 131, 150, 171, 188, + 177, 160, 140, 122, 108, 95, 83, 71, 60, 50, 42, 35, 30, 26, 23, 22, 22, 24, 27, 31, 36, 43, 52, 62, 73, 85, 98, 111, 126, 145, 165, 183, + 172, 155, 135, 118, 104, 91, 78, 66, 55, 45, 37, 30, 26, 21, 19, 18, 18, 19, 22, 27, 31, 39, 47, 57, 69, 81, 93, 107, 122, 140, 160, 178, + 168, 150, 131, 114, 100, 87, 74, 62, 50, 41, 33, 26, 21, 18, 15, 14, 14, 15, 18, 22, 27, 34, 43, 53, 64, 77, 90, 103, 118, 135, 155, 174, + 164, 146, 127, 111, 97, 83, 70, 58, 46, 37, 29, 22, 18, 14, 12, 11, 11, 12, 15, 18, 24, 30, 39, 49, 60, 73, 86, 99, 114, 131, 151, 170, + 162, 143, 124, 108, 94, 80, 67, 54, 43, 34, 26, 19, 14, 12, 9, 8, 8, 9, 12, 15, 20, 27, 35, 45, 57, 70, 83, 96, 111, 128, 148, 167, + 159, 140, 121, 105, 91, 77, 64, 51, 40, 31, 23, 17, 12, 9, 7, 5, 5, 7, 9, 13, 18, 24, 32, 42, 54, 67, 80, 94, 108, 125, 145, 164, + 156, 137, 118, 103, 89, 75, 61, 49, 38, 28, 21, 15, 10, 7, 5, 3, 3, 5, 7, 11, 16, 22, 30, 40, 51, 64, 78, 92, 106, 122, 142, 162, + 155, 135, 117, 101, 87, 73, 59, 47, 36, 26, 19, 13, 8, 5, 3, 2, 2, 3, 5, 9, 14, 20, 28, 38, 49, 62, 76, 90, 104, 120, 140, 161, + 154, 134, 115, 100, 86, 72, 58, 45, 34, 25, 18, 12, 7, 4, 2, 1, 1, 2, 4, 8, 13, 19, 27, 36, 48, 61, 75, 89, 103, 119, 138, 160, + 153, 133, 114, 99, 85, 71, 57, 44, 33, 24, 17, 11, 6, 3, 1, 0, 1, 1, 3, 7, 12, 18, 26, 35, 47, 60, 74, 88, 102, 118, 137, 158, + 153, 132, 114, 99, 84, 70, 56, 44, 33, 24, 16, 10, 6, 2, 1, 0, 0, 1, 3, 6, 11, 17, 25, 35, 46, 59, 73, 87, 102, 118, 137, 158, + 153, 132, 114, 98, 84, 70, 56, 44, 33, 24, 16, 10, 6, 2, 1, 0, 0, 1, 3, 6, 11, 17, 25, 35, 46, 59, 73, 87, 101, 117, 136, 158, + 153, 132, 114, 99, 84, 70, 56, 44, 33, 24, 16, 10, 6, 3, 1, 0, 1, 1, 3, 7, 11, 18, 25, 35, 46, 59, 73, 87, 101, 118, 137, 158, + 154, 133, 115, 99, 85, 71, 57, 45, 34, 25, 17, 11, 7, 3, 2, 1, 1, 2, 4, 7, 12, 18, 26, 36, 47, 60, 74, 88, 102, 118, 138, 159, + 155, 134, 116, 100, 86, 72, 59, 46, 35, 26, 18, 12, 8, 4, 3, 2, 2, 3, 5, 8, 13, 20, 27, 37, 48, 61, 75, 89, 103, 119, 138, 160, + 156, 136, 117, 102, 88, 74, 61, 48, 37, 27, 20, 14, 9, 6, 4, 3, 3, 5, 6, 10, 15, 21, 29, 39, 50, 63, 76, 90, 104, 121, 140, 161, + 157, 138, 119, 104, 90, 76, 63, 50, 39, 30, 22, 16, 11, 8, 6, 5, 5, 6, 8, 12, 17, 23, 31, 41, 52, 65, 79, 92, 106, 123, 142, 162, + 160, 141, 122, 106, 92, 79, 66, 53, 42, 32, 24, 18, 13, 10, 8, 7, 7, 8, 11, 14, 19, 26, 34, 44, 55, 68, 81, 94, 109, 125, 145, 164, + 163, 145, 125, 109, 95, 82, 69, 56, 45, 36, 27, 21, 16, 13, 10, 10, 10, 11, 14, 17, 22, 29, 37, 47, 58, 71, 84, 97, 112, 128, 148, 167, + 166, 148, 129, 112, 98, 85, 72, 60, 49, 39, 31, 25, 20, 16, 14, 13, 13, 14, 17, 20, 26, 32, 41, 51, 62, 74, 87, 100, 115, 132, 152, 170, + 169, 152, 133, 116, 101, 89, 76, 64, 53, 43, 35, 28, 24, 20, 17, 16, 16, 18, 20, 25, 30, 36, 45, 55, 66, 78, 90, 103, 118, 136, 156, 174, + 173, 157, 137, 120, 106, 93, 81, 69, 58, 48, 40, 33, 28, 24, 22, 21, 21, 22, 25, 29, 34, 41, 50, 60, 71, 82, 95, 108, 123, 141, 161, 178, + 178, 162, 143, 125, 110, 97, 85, 74, 63, 53, 45, 38, 33, 29, 26, 25, 25, 27, 30, 34, 39, 46, 55, 65, 76, 87, 99, 112, 128, 146, 166, 183, + 184, 168, 148, 130, 115, 102, 90, 79, 69, 59, 51, 44, 38, 34, 32, 31, 31, 32, 35, 39, 45, 52, 60, 70, 81, 92, 103, 117, 133, 151, 171, 188, + 189, 174, 154, 136, 120, 107, 95, 85, 75, 65, 57, 51, 44, 40, 38, 37, 37, 38, 41, 45, 52, 58, 67, 76, 86, 97, 108, 123, 139, 157, 177, 194, + 196, 181, 161, 143, 126, 113, 101, 91, 81, 72, 64, 57, 51, 47, 44, 43, 43, 45, 48, 52, 58, 65, 73, 82, 92, 102, 114, 129, 146, 164, 184, 201, + 204, 188, 168, 149, 133, 118, 106, 96, 86, 77, 69, 63, 56, 51, 49, 49, 49, 49, 52, 57, 63, 71, 79, 87, 97, 107, 120, 135, 153, 171, 191, 208, + ] + g: [ + 166, 151, 133, 117, 103, 90, 80, 72, 64, 58, 52, 47, 42, 39, 37, 37, 37, 37, 39, 43, 48, 53, 59, 66, 73, 82, 93, 106, 121, 138, 156, 172, + 159, 145, 128, 112, 98, 86, 76, 68, 60, 54, 48, 43, 38, 36, 34, 33, 33, 34, 36, 39, 44, 49, 55, 62, 69, 78, 89, 101, 116, 132, 150, 165, + 153, 139, 122, 106, 93, 81, 72, 63, 56, 49, 43, 38, 33, 31, 29, 28, 28, 29, 31, 34, 39, 44, 50, 57, 65, 74, 83, 96, 110, 126, 144, 159, + 147, 134, 117, 101, 88, 77, 68, 59, 51, 44, 38, 33, 29, 26, 24, 24, 24, 25, 27, 30, 34, 39, 46, 53, 61, 69, 79, 91, 105, 121, 138, 153, + 142, 129, 112, 96, 84, 73, 64, 55, 47, 40, 34, 29, 25, 22, 20, 20, 20, 21, 23, 26, 30, 35, 41, 49, 57, 66, 75, 86, 100, 116, 133, 148, + 138, 124, 107, 92, 80, 69, 60, 51, 43, 36, 30, 25, 22, 19, 17, 16, 16, 17, 19, 22, 26, 31, 38, 45, 53, 62, 71, 82, 95, 111, 129, 144, + 134, 120, 103, 88, 76, 66, 57, 48, 39, 32, 26, 22, 18, 15, 14, 13, 13, 14, 16, 19, 23, 28, 34, 41, 50, 59, 68, 79, 91, 107, 124, 140, + 131, 116, 99, 85, 73, 63, 54, 44, 36, 29, 23, 19, 15, 13, 11, 10, 10, 11, 13, 16, 20, 25, 31, 38, 47, 56, 65, 76, 88, 103, 120, 136, + 127, 112, 96, 82, 71, 60, 51, 42, 33, 26, 21, 16, 13, 10, 8, 8, 8, 9, 11, 13, 17, 22, 28, 35, 44, 53, 63, 73, 85, 100, 117, 133, + 125, 109, 93, 80, 68, 58, 48, 39, 31, 24, 18, 14, 10, 8, 6, 6, 6, 7, 9, 11, 15, 20, 25, 33, 41, 50, 60, 71, 82, 97, 114, 130, + 123, 107, 91, 78, 67, 56, 46, 37, 29, 22, 16, 12, 9, 6, 5, 4, 4, 5, 7, 9, 13, 18, 23, 31, 39, 48, 58, 69, 80, 94, 111, 128, + 121, 105, 89, 76, 65, 54, 44, 35, 27, 20, 15, 10, 7, 5, 3, 2, 2, 4, 5, 8, 11, 16, 22, 29, 37, 46, 57, 67, 79, 92, 109, 126, + 120, 103, 87, 75, 63, 53, 43, 34, 26, 19, 14, 9, 6, 3, 2, 1, 1, 2, 4, 6, 10, 15, 20, 27, 36, 45, 55, 66, 77, 91, 107, 125, + 119, 102, 86, 74, 62, 52, 42, 32, 25, 18, 13, 8, 5, 3, 1, 1, 1, 1, 3, 6, 9, 14, 19, 26, 34, 44, 54, 65, 76, 90, 106, 124, + 118, 101, 86, 73, 62, 51, 41, 32, 24, 17, 12, 8, 4, 2, 1, 0, 0, 1, 2, 5, 9, 13, 19, 26, 34, 43, 53, 64, 76, 89, 105, 123, + 118, 100, 85, 72, 61, 51, 41, 31, 23, 17, 12, 7, 4, 2, 0, 0, 0, 1, 2, 5, 8, 13, 18, 25, 33, 43, 53, 64, 75, 88, 105, 123, + 118, 100, 85, 72, 61, 51, 40, 31, 23, 17, 12, 7, 4, 2, 0, 0, 0, 1, 2, 5, 8, 13, 18, 25, 33, 43, 53, 64, 75, 88, 105, 123, + 118, 101, 85, 73, 62, 51, 41, 32, 24, 17, 12, 7, 4, 2, 1, 0, 0, 1, 2, 5, 8, 13, 18, 25, 34, 43, 53, 64, 75, 89, 105, 123, + 118, 101, 86, 73, 62, 51, 41, 32, 24, 18, 12, 8, 5, 2, 1, 1, 1, 1, 3, 5, 9, 13, 19, 26, 34, 44, 54, 64, 76, 89, 106, 124, + 119, 102, 87, 74, 63, 52, 42, 33, 25, 18, 13, 9, 5, 3, 2, 1, 1, 2, 3, 6, 10, 14, 20, 27, 35, 44, 55, 65, 77, 90, 107, 124, + 120, 104, 88, 75, 64, 54, 44, 34, 26, 20, 14, 10, 6, 4, 3, 2, 2, 3, 4, 7, 11, 15, 21, 28, 36, 46, 56, 66, 78, 91, 108, 125, + 122, 106, 90, 77, 65, 55, 45, 36, 28, 21, 16, 11, 8, 5, 4, 3, 3, 4, 6, 8, 12, 17, 23, 30, 38, 47, 57, 68, 79, 93, 110, 127, + 124, 108, 92, 79, 67, 57, 47, 38, 30, 23, 17, 13, 9, 7, 5, 5, 5, 6, 8, 10, 14, 19, 25, 32, 40, 49, 59, 70, 81, 95, 112, 129, + 126, 111, 95, 81, 70, 59, 50, 40, 32, 25, 20, 15, 12, 9, 7, 7, 7, 8, 10, 12, 16, 21, 27, 34, 42, 52, 61, 72, 84, 98, 115, 131, + 129, 114, 98, 84, 72, 62, 52, 43, 35, 28, 22, 17, 14, 12, 10, 9, 9, 10, 12, 15, 18, 23, 30, 37, 45, 54, 64, 74, 86, 101, 118, 134, + 132, 118, 101, 87, 75, 65, 55, 46, 38, 31, 25, 20, 17, 14, 12, 12, 12, 13, 15, 18, 21, 26, 33, 40, 48, 57, 67, 77, 90, 105, 122, 137, + 136, 122, 105, 90, 78, 68, 59, 50, 41, 34, 28, 24, 20, 17, 15, 15, 15, 16, 18, 21, 25, 30, 36, 43, 51, 60, 70, 80, 93, 109, 126, 141, + 139, 126, 109, 94, 82, 71, 62, 53, 45, 38, 32, 27, 24, 21, 19, 18, 18, 19, 21, 25, 28, 33, 40, 47, 55, 64, 73, 84, 97, 113, 130, 145, + 144, 131, 114, 99, 85, 75, 66, 57, 49, 42, 36, 32, 27, 24, 23, 22, 22, 23, 25, 28, 32, 38, 44, 51, 59, 67, 77, 88, 102, 118, 135, 150, + 149, 136, 119, 104, 90, 79, 70, 61, 54, 47, 41, 36, 32, 29, 27, 26, 26, 27, 29, 32, 37, 42, 48, 55, 63, 71, 81, 93, 107, 123, 140, 155, + 155, 142, 125, 109, 95, 84, 74, 66, 58, 52, 46, 41, 36, 34, 32, 31, 31, 32, 34, 37, 42, 47, 53, 60, 67, 76, 86, 98, 113, 129, 146, 161, + 162, 148, 130, 115, 100, 88, 78, 70, 63, 56, 50, 45, 40, 37, 35, 35, 35, 35, 37, 41, 46, 51, 57, 64, 71, 80, 91, 103, 118, 134, 152, 167, + ] + b: [ + 163, 150, 132, 116, 102, 90, 80, 71, 64, 57, 51, 46, 42, 38, 37, 37, 37, 37, 39, 43, 48, 53, 59, 66, 73, 82, 92, 105, 120, 136, 154, 168, + 156, 143, 126, 110, 96, 85, 75, 67, 59, 53, 47, 42, 38, 35, 33, 32, 32, 34, 36, 39, 43, 49, 54, 61, 68, 77, 87, 100, 114, 130, 147, 161, + 150, 137, 120, 105, 91, 80, 71, 62, 55, 48, 42, 37, 33, 30, 28, 27, 27, 29, 31, 34, 39, 43, 49, 56, 64, 72, 82, 94, 108, 124, 141, 155, + 145, 132, 115, 100, 86, 76, 67, 58, 50, 43, 37, 33, 28, 26, 24, 23, 23, 24, 26, 29, 34, 39, 45, 52, 60, 68, 78, 89, 103, 119, 136, 150, + 140, 127, 110, 95, 82, 72, 63, 54, 46, 39, 33, 28, 25, 22, 20, 19, 19, 20, 22, 26, 29, 34, 41, 48, 56, 65, 74, 85, 98, 114, 131, 145, + 135, 122, 106, 91, 79, 68, 59, 51, 42, 35, 29, 25, 21, 18, 16, 16, 16, 17, 19, 22, 26, 31, 37, 44, 52, 61, 71, 81, 94, 109, 126, 140, + 132, 118, 102, 87, 75, 65, 56, 47, 39, 32, 26, 21, 18, 15, 13, 13, 13, 14, 16, 19, 22, 27, 33, 41, 49, 58, 67, 78, 90, 105, 122, 137, + 128, 114, 98, 84, 73, 62, 53, 44, 36, 29, 23, 18, 15, 12, 11, 10, 10, 11, 13, 16, 19, 24, 30, 38, 46, 55, 65, 75, 87, 102, 118, 133, + 125, 111, 95, 81, 70, 60, 50, 41, 33, 26, 20, 16, 12, 10, 8, 8, 8, 9, 11, 13, 17, 22, 27, 35, 43, 52, 62, 72, 84, 98, 115, 130, + 123, 108, 92, 79, 68, 58, 48, 39, 30, 24, 18, 14, 10, 8, 6, 5, 5, 7, 9, 11, 14, 19, 25, 32, 41, 50, 60, 70, 81, 96, 112, 127, + 121, 106, 90, 77, 66, 55, 46, 36, 28, 22, 16, 12, 8, 6, 5, 4, 4, 5, 7, 9, 13, 17, 23, 30, 38, 48, 58, 68, 79, 93, 109, 125, + 119, 104, 88, 75, 64, 54, 44, 35, 27, 20, 15, 10, 7, 5, 3, 2, 2, 4, 5, 8, 11, 16, 21, 28, 37, 46, 56, 67, 78, 91, 107, 124, + 117, 102, 86, 74, 63, 53, 42, 33, 25, 19, 13, 9, 6, 3, 2, 1, 1, 2, 4, 6, 10, 14, 20, 27, 35, 45, 55, 65, 76, 90, 106, 122, + 117, 100, 85, 73, 62, 51, 41, 32, 24, 18, 12, 8, 5, 3, 1, 1, 1, 1, 3, 5, 9, 13, 19, 26, 34, 43, 54, 64, 75, 89, 104, 121, + 116, 100, 84, 72, 61, 51, 40, 31, 23, 17, 12, 7, 4, 2, 1, 0, 0, 1, 2, 5, 8, 13, 18, 25, 33, 43, 53, 64, 75, 88, 103, 121, + 116, 99, 84, 72, 61, 50, 40, 31, 23, 17, 11, 7, 4, 2, 0, 0, 0, 1, 2, 5, 8, 12, 18, 25, 33, 42, 53, 63, 74, 88, 103, 121, + 116, 99, 84, 72, 61, 50, 40, 31, 23, 17, 11, 7, 4, 2, 0, 0, 0, 1, 2, 5, 8, 12, 18, 25, 33, 42, 53, 63, 74, 87, 103, 121, + 116, 99, 84, 72, 61, 50, 40, 31, 23, 17, 11, 7, 4, 2, 0, 0, 0, 1, 2, 5, 8, 13, 18, 25, 33, 43, 53, 63, 74, 88, 103, 121, + 116, 100, 85, 72, 61, 51, 41, 32, 24, 17, 12, 8, 4, 2, 1, 1, 1, 1, 3, 5, 9, 13, 19, 25, 34, 43, 53, 64, 75, 88, 104, 121, + 117, 101, 86, 73, 62, 52, 42, 33, 25, 18, 13, 8, 5, 3, 2, 1, 1, 2, 3, 6, 9, 14, 20, 26, 35, 44, 54, 64, 76, 89, 105, 121, + 118, 103, 87, 74, 63, 53, 43, 34, 26, 19, 14, 10, 6, 4, 3, 2, 2, 3, 4, 7, 11, 15, 21, 28, 36, 45, 55, 66, 77, 91, 106, 123, + 120, 104, 89, 76, 65, 54, 45, 35, 27, 21, 15, 11, 8, 5, 4, 3, 3, 4, 6, 8, 12, 16, 22, 29, 38, 47, 57, 67, 78, 92, 108, 124, + 121, 107, 91, 78, 67, 56, 47, 37, 29, 22, 17, 13, 9, 7, 5, 4, 4, 6, 7, 10, 14, 18, 24, 31, 39, 49, 59, 69, 80, 94, 110, 126, + 124, 109, 93, 80, 69, 59, 49, 40, 32, 25, 19, 14, 11, 9, 7, 6, 6, 7, 10, 12, 16, 20, 26, 34, 42, 51, 61, 71, 83, 97, 113, 128, + 126, 112, 96, 83, 71, 61, 52, 43, 34, 27, 22, 17, 14, 11, 9, 9, 9, 10, 12, 14, 18, 23, 29, 36, 45, 54, 63, 73, 85, 100, 116, 131, + 130, 116, 99, 85, 74, 64, 54, 45, 37, 30, 24, 20, 17, 14, 12, 11, 11, 12, 14, 17, 21, 26, 32, 39, 48, 56, 66, 76, 88, 103, 119, 134, + 133, 120, 103, 89, 77, 66, 57, 49, 41, 34, 28, 23, 20, 17, 15, 14, 14, 15, 17, 21, 24, 29, 35, 42, 51, 59, 68, 79, 92, 107, 123, 137, + 137, 124, 107, 93, 80, 70, 61, 52, 44, 37, 31, 27, 23, 20, 18, 18, 18, 19, 21, 24, 28, 33, 39, 46, 54, 63, 72, 83, 96, 111, 127, 141, + 141, 128, 112, 97, 84, 73, 65, 56, 48, 42, 36, 31, 27, 24, 22, 21, 21, 22, 25, 28, 32, 37, 43, 50, 58, 66, 76, 87, 100, 116, 132, 146, + 146, 133, 117, 102, 88, 77, 68, 60, 53, 46, 40, 35, 31, 28, 26, 25, 25, 27, 29, 32, 37, 41, 47, 54, 62, 70, 79, 91, 105, 121, 137, 151, + 151, 139, 123, 107, 94, 82, 73, 65, 57, 51, 45, 40, 36, 33, 31, 30, 30, 32, 34, 37, 41, 46, 52, 59, 66, 74, 84, 97, 111, 126, 143, 157, + 158, 145, 128, 113, 99, 87, 77, 69, 61, 55, 49, 44, 39, 36, 34, 34, 34, 35, 37, 41, 45, 50, 56, 63, 70, 79, 89, 102, 116, 131, 148, 163, + ] + - ct: 8500 + r: [ + 216, 198, 176, 157, 140, 124, 111, 100, 90, 82, 74, 67, 61, 55, 52, 52, 52, 52, 53, 58, 64, 70, 77, 85, 94, 104, 116, 131, 147, 166, 185, 201, + 207, 191, 170, 151, 133, 118, 106, 95, 86, 77, 69, 62, 55, 51, 48, 47, 47, 47, 50, 53, 58, 65, 72, 80, 89, 100, 111, 125, 141, 159, 178, 193, + 199, 183, 162, 144, 127, 112, 100, 89, 80, 70, 62, 55, 49, 44, 42, 40, 40, 41, 43, 47, 52, 59, 66, 74, 84, 94, 105, 118, 134, 152, 171, 187, + 193, 176, 156, 137, 121, 107, 95, 84, 74, 64, 56, 49, 43, 38, 35, 34, 34, 35, 37, 40, 46, 52, 60, 68, 78, 89, 100, 113, 128, 145, 165, 180, + 186, 170, 150, 131, 115, 101, 90, 79, 68, 58, 50, 43, 37, 33, 30, 28, 28, 29, 31, 35, 40, 46, 54, 63, 73, 83, 95, 107, 122, 139, 159, 174, + 181, 164, 144, 125, 110, 97, 85, 74, 63, 53, 44, 37, 32, 28, 25, 23, 23, 24, 26, 30, 35, 41, 48, 58, 68, 79, 90, 103, 117, 134, 153, 169, + 176, 159, 139, 121, 106, 92, 81, 69, 58, 48, 40, 33, 28, 23, 20, 19, 19, 20, 22, 26, 30, 36, 44, 53, 63, 75, 86, 98, 112, 129, 148, 165, + 171, 154, 134, 116, 102, 89, 77, 65, 53, 44, 35, 29, 23, 20, 17, 15, 15, 16, 18, 22, 26, 32, 39, 48, 59, 71, 82, 95, 108, 125, 144, 160, + 167, 150, 130, 113, 98, 85, 73, 61, 49, 40, 31, 25, 20, 16, 13, 12, 12, 12, 14, 18, 22, 28, 36, 45, 55, 67, 79, 91, 105, 120, 139, 156, + 164, 146, 126, 109, 95, 82, 70, 57, 46, 36, 28, 22, 16, 13, 10, 9, 9, 9, 12, 14, 19, 25, 32, 41, 51, 63, 76, 88, 101, 117, 135, 153, + 162, 143, 123, 107, 93, 80, 67, 54, 43, 33, 25, 19, 14, 10, 8, 6, 6, 7, 9, 12, 16, 22, 29, 38, 48, 60, 73, 85, 99, 114, 132, 151, + 159, 140, 121, 105, 91, 77, 64, 52, 41, 31, 23, 17, 12, 8, 6, 4, 4, 5, 7, 10, 14, 20, 27, 35, 46, 58, 70, 83, 97, 111, 130, 148, + 157, 138, 119, 103, 89, 75, 62, 50, 38, 29, 21, 15, 10, 6, 4, 3, 3, 4, 5, 8, 12, 18, 25, 33, 44, 55, 68, 81, 95, 109, 127, 146, + 156, 136, 117, 101, 87, 74, 60, 48, 37, 27, 20, 13, 9, 5, 3, 2, 1, 2, 4, 6, 11, 16, 23, 32, 42, 54, 67, 80, 93, 108, 125, 145, + 155, 135, 116, 100, 86, 72, 59, 47, 36, 26, 19, 12, 8, 4, 2, 1, 1, 1, 3, 6, 10, 15, 22, 31, 41, 52, 65, 79, 92, 107, 124, 144, + 155, 134, 115, 99, 86, 72, 58, 46, 35, 26, 18, 12, 7, 3, 1, 0, 0, 1, 2, 5, 9, 15, 21, 30, 40, 52, 65, 78, 92, 106, 124, 144, + 155, 134, 115, 99, 85, 72, 58, 46, 35, 25, 18, 12, 7, 3, 1, 0, 0, 0, 2, 5, 9, 14, 21, 30, 40, 51, 64, 78, 91, 106, 123, 143, + 155, 134, 115, 99, 85, 72, 58, 46, 35, 26, 18, 12, 7, 3, 1, 0, 0, 1, 2, 5, 9, 14, 21, 30, 40, 51, 64, 78, 91, 106, 123, 143, + 155, 135, 115, 100, 86, 72, 59, 46, 35, 26, 18, 12, 7, 4, 2, 1, 1, 1, 3, 5, 9, 15, 22, 30, 40, 52, 65, 78, 92, 106, 124, 144, + 156, 136, 116, 100, 87, 73, 60, 47, 36, 27, 19, 13, 8, 5, 2, 2, 1, 2, 3, 6, 10, 16, 23, 31, 41, 53, 66, 79, 92, 107, 124, 144, + 157, 137, 118, 102, 88, 75, 61, 49, 38, 28, 21, 14, 10, 6, 4, 2, 2, 3, 4, 7, 12, 17, 24, 33, 43, 54, 67, 80, 93, 108, 126, 145, + 158, 139, 120, 103, 89, 76, 63, 51, 40, 30, 22, 16, 11, 7, 6, 4, 4, 4, 6, 9, 13, 19, 26, 34, 45, 56, 69, 82, 95, 110, 128, 147, + 160, 141, 122, 106, 92, 79, 66, 53, 42, 33, 25, 18, 13, 10, 7, 6, 6, 6, 9, 11, 15, 21, 28, 37, 47, 59, 71, 84, 97, 112, 130, 148, + 163, 144, 125, 108, 94, 81, 69, 56, 45, 35, 27, 21, 16, 12, 10, 8, 8, 9, 11, 14, 18, 24, 31, 40, 50, 62, 74, 86, 99, 114, 133, 151, + 165, 148, 128, 111, 97, 84, 72, 60, 49, 39, 31, 24, 19, 15, 12, 11, 11, 11, 14, 17, 21, 27, 34, 43, 53, 65, 77, 89, 102, 118, 136, 153, + 169, 152, 132, 114, 100, 87, 75, 63, 52, 42, 34, 27, 22, 19, 16, 14, 14, 15, 17, 21, 24, 30, 38, 47, 57, 68, 80, 92, 105, 121, 140, 157, + 173, 156, 136, 118, 104, 91, 79, 68, 57, 47, 38, 32, 26, 22, 19, 18, 18, 19, 21, 24, 28, 34, 42, 51, 61, 72, 83, 95, 109, 125, 144, 160, + 177, 161, 141, 123, 108, 95, 83, 72, 61, 52, 43, 36, 31, 26, 24, 22, 22, 23, 25, 28, 33, 39, 47, 56, 66, 76, 87, 99, 113, 130, 149, 165, + 182, 166, 147, 128, 112, 99, 88, 77, 67, 57, 48, 41, 36, 31, 29, 27, 27, 28, 30, 33, 39, 44, 52, 61, 71, 81, 92, 104, 118, 135, 154, 169, + 188, 172, 152, 134, 118, 104, 93, 82, 72, 62, 54, 47, 41, 37, 34, 33, 33, 33, 35, 39, 44, 50, 57, 66, 76, 85, 96, 109, 124, 141, 160, 175, + 194, 178, 159, 140, 123, 110, 98, 87, 78, 68, 60, 53, 47, 43, 40, 38, 38, 39, 41, 45, 50, 56, 64, 72, 81, 91, 102, 115, 130, 147, 166, 181, + 202, 185, 165, 146, 129, 115, 103, 92, 83, 73, 66, 59, 53, 47, 44, 43, 43, 43, 45, 50, 55, 61, 69, 77, 86, 95, 107, 120, 136, 153, 172, 187, + ] + g: [ + 177, 160, 141, 125, 110, 96, 85, 76, 68, 61, 55, 50, 45, 41, 39, 39, 39, 39, 40, 43, 47, 52, 58, 64, 71, 80, 90, 102, 117, 132, 150, 165, + 169, 154, 135, 119, 104, 91, 81, 72, 64, 57, 51, 46, 41, 38, 36, 35, 35, 35, 37, 40, 43, 48, 54, 60, 67, 76, 85, 97, 111, 127, 144, 157, + 162, 147, 129, 113, 98, 86, 76, 67, 59, 52, 46, 41, 36, 33, 31, 30, 30, 30, 32, 35, 39, 43, 49, 55, 63, 71, 80, 92, 105, 121, 138, 151, + 156, 141, 124, 107, 93, 81, 72, 63, 55, 48, 41, 36, 32, 28, 26, 25, 25, 26, 27, 30, 34, 39, 44, 51, 58, 67, 76, 87, 100, 115, 132, 146, + 150, 136, 119, 102, 89, 77, 68, 59, 51, 43, 37, 32, 28, 24, 22, 21, 21, 21, 23, 26, 30, 34, 40, 47, 54, 63, 72, 82, 95, 110, 127, 141, + 146, 131, 114, 98, 84, 73, 64, 55, 47, 39, 33, 28, 24, 20, 18, 17, 17, 18, 19, 22, 26, 30, 36, 43, 51, 59, 68, 78, 90, 105, 122, 136, + 141, 127, 109, 94, 81, 70, 60, 51, 43, 36, 29, 24, 20, 17, 15, 14, 14, 15, 16, 19, 22, 27, 32, 39, 47, 56, 65, 75, 86, 101, 118, 132, + 137, 123, 105, 90, 78, 67, 57, 48, 40, 32, 26, 21, 17, 14, 12, 11, 11, 12, 13, 16, 19, 24, 29, 36, 44, 52, 62, 72, 83, 97, 114, 128, + 134, 119, 102, 87, 75, 64, 54, 45, 37, 29, 23, 18, 14, 12, 10, 9, 9, 9, 11, 13, 16, 21, 26, 33, 41, 50, 59, 69, 80, 93, 110, 125, + 131, 116, 99, 84, 72, 62, 52, 42, 34, 27, 21, 16, 12, 10, 8, 6, 6, 7, 9, 11, 14, 18, 24, 30, 38, 47, 56, 66, 77, 91, 107, 122, + 129, 113, 96, 82, 70, 59, 50, 40, 32, 25, 19, 14, 10, 8, 6, 5, 5, 5, 7, 9, 12, 16, 21, 28, 36, 45, 54, 64, 75, 88, 104, 120, + 127, 111, 94, 80, 68, 58, 48, 38, 30, 23, 17, 12, 9, 6, 4, 3, 3, 4, 5, 7, 10, 14, 20, 26, 34, 43, 52, 62, 73, 86, 102, 118, + 125, 109, 92, 78, 67, 56, 46, 37, 28, 21, 15, 11, 7, 5, 3, 2, 2, 3, 4, 6, 9, 13, 18, 25, 32, 41, 51, 61, 72, 84, 100, 116, + 124, 107, 91, 77, 66, 55, 45, 35, 27, 20, 14, 10, 6, 4, 2, 1, 1, 2, 3, 5, 8, 12, 17, 23, 31, 40, 50, 60, 71, 83, 98, 115, + 124, 106, 90, 76, 65, 54, 44, 34, 26, 19, 14, 9, 6, 3, 1, 1, 0, 1, 2, 4, 7, 11, 16, 23, 30, 39, 49, 59, 70, 82, 97, 114, + 123, 105, 89, 76, 64, 54, 43, 34, 26, 19, 13, 9, 5, 2, 1, 0, 0, 0, 1, 4, 7, 11, 16, 22, 30, 38, 48, 59, 69, 82, 97, 114, + 123, 105, 89, 75, 64, 53, 43, 34, 25, 19, 13, 8, 5, 2, 1, 0, 0, 0, 1, 3, 7, 11, 16, 22, 29, 38, 48, 58, 69, 81, 96, 114, + 123, 105, 89, 75, 64, 53, 43, 34, 26, 19, 13, 9, 5, 2, 1, 0, 0, 0, 1, 4, 7, 11, 16, 22, 29, 38, 48, 58, 69, 81, 96, 114, + 123, 106, 89, 76, 65, 54, 44, 34, 26, 19, 13, 9, 5, 3, 1, 1, 0, 1, 2, 4, 7, 11, 16, 22, 30, 39, 48, 59, 69, 82, 97, 114, + 124, 107, 90, 77, 65, 55, 44, 35, 27, 20, 14, 10, 6, 3, 2, 1, 1, 1, 2, 4, 8, 12, 17, 23, 31, 39, 49, 59, 70, 82, 98, 115, + 125, 108, 91, 78, 66, 56, 46, 36, 28, 21, 15, 10, 7, 4, 2, 2, 1, 2, 3, 5, 8, 13, 18, 24, 32, 41, 50, 60, 71, 84, 99, 116, + 126, 110, 93, 79, 67, 57, 47, 38, 29, 22, 16, 12, 8, 5, 4, 2, 2, 3, 4, 7, 10, 14, 19, 26, 33, 42, 52, 62, 72, 85, 100, 117, + 128, 112, 95, 81, 69, 59, 49, 39, 31, 24, 18, 13, 10, 7, 5, 4, 4, 4, 6, 8, 11, 15, 21, 27, 35, 44, 53, 63, 74, 87, 103, 119, + 130, 114, 97, 83, 71, 61, 51, 42, 33, 26, 20, 15, 11, 9, 7, 6, 6, 6, 8, 10, 13, 17, 23, 29, 37, 46, 55, 65, 76, 89, 105, 121, + 132, 117, 100, 86, 74, 63, 53, 44, 36, 28, 22, 17, 14, 11, 9, 8, 8, 8, 10, 12, 15, 20, 25, 32, 40, 48, 58, 67, 79, 92, 108, 123, + 135, 121, 103, 89, 76, 66, 56, 47, 39, 31, 25, 20, 16, 14, 11, 10, 10, 11, 12, 15, 18, 22, 28, 35, 42, 51, 60, 70, 81, 95, 111, 126, + 139, 124, 107, 92, 79, 68, 59, 50, 42, 34, 28, 23, 19, 16, 14, 13, 13, 13, 15, 18, 21, 25, 31, 38, 46, 54, 63, 73, 85, 99, 115, 130, + 143, 128, 111, 96, 83, 72, 62, 54, 45, 38, 32, 26, 23, 19, 17, 16, 16, 17, 18, 21, 24, 29, 35, 41, 49, 57, 66, 76, 88, 103, 119, 133, + 147, 133, 116, 100, 86, 75, 66, 57, 49, 42, 36, 30, 26, 23, 21, 20, 20, 20, 22, 24, 28, 33, 38, 45, 53, 61, 70, 80, 92, 107, 124, 137, + 152, 138, 121, 105, 91, 79, 70, 61, 53, 46, 40, 35, 30, 27, 25, 24, 24, 24, 26, 28, 33, 37, 43, 49, 57, 65, 73, 84, 97, 112, 128, 142, + 158, 144, 126, 110, 96, 84, 74, 65, 58, 51, 44, 39, 35, 31, 29, 28, 28, 29, 30, 33, 37, 42, 47, 54, 61, 69, 78, 89, 102, 118, 134, 147, + 165, 149, 131, 115, 101, 88, 78, 69, 61, 54, 48, 43, 38, 35, 32, 32, 32, 32, 33, 36, 41, 45, 51, 57, 64, 72, 82, 94, 107, 122, 139, 153, + ] + b: [ + 174, 159, 139, 123, 109, 95, 84, 75, 68, 61, 55, 50, 45, 41, 39, 39, 39, 39, 40, 43, 47, 52, 58, 64, 71, 80, 90, 102, 116, 131, 148, 161, + 166, 152, 134, 118, 103, 90, 80, 71, 63, 56, 51, 45, 41, 38, 35, 34, 34, 35, 37, 39, 43, 48, 54, 60, 67, 75, 84, 96, 110, 125, 141, 154, + 159, 145, 127, 111, 97, 85, 75, 66, 59, 52, 45, 41, 36, 32, 30, 29, 29, 30, 31, 34, 38, 43, 48, 55, 62, 70, 79, 90, 104, 119, 135, 148, + 153, 139, 122, 106, 92, 80, 71, 62, 54, 47, 41, 36, 31, 28, 26, 25, 25, 25, 27, 30, 34, 38, 44, 50, 58, 66, 75, 86, 99, 114, 130, 143, + 148, 134, 117, 101, 88, 76, 67, 58, 50, 43, 36, 31, 27, 24, 22, 21, 21, 21, 23, 25, 30, 34, 40, 46, 54, 62, 71, 81, 94, 109, 125, 138, + 143, 129, 113, 97, 84, 73, 63, 55, 46, 39, 32, 27, 23, 20, 18, 17, 17, 17, 19, 22, 25, 30, 36, 42, 50, 59, 68, 78, 89, 104, 120, 133, + 139, 125, 108, 93, 80, 69, 60, 51, 42, 35, 29, 24, 20, 17, 15, 14, 14, 14, 16, 19, 22, 26, 32, 39, 47, 55, 64, 74, 85, 100, 116, 130, + 135, 121, 104, 89, 77, 66, 57, 48, 39, 32, 25, 21, 17, 14, 12, 11, 11, 11, 13, 16, 19, 23, 29, 36, 43, 52, 61, 71, 82, 96, 112, 126, + 132, 117, 101, 86, 74, 64, 54, 45, 36, 29, 23, 18, 14, 12, 9, 8, 8, 9, 11, 13, 16, 20, 26, 33, 40, 49, 59, 68, 79, 93, 108, 123, + 129, 114, 98, 83, 72, 61, 52, 42, 34, 26, 20, 16, 12, 9, 7, 6, 6, 7, 9, 11, 14, 18, 23, 30, 38, 47, 56, 66, 77, 90, 105, 120, + 127, 112, 95, 81, 70, 59, 49, 40, 31, 24, 18, 14, 10, 7, 6, 4, 4, 5, 7, 9, 12, 16, 21, 28, 36, 44, 54, 64, 75, 87, 103, 118, + 125, 109, 93, 79, 68, 57, 47, 38, 29, 22, 17, 12, 8, 6, 4, 3, 3, 4, 5, 7, 10, 14, 19, 26, 34, 42, 52, 62, 73, 85, 100, 116, + 124, 108, 91, 78, 66, 56, 46, 36, 28, 21, 15, 11, 7, 4, 3, 2, 2, 3, 4, 6, 9, 13, 18, 24, 32, 41, 51, 61, 71, 84, 98, 114, + 123, 106, 90, 76, 65, 55, 44, 35, 27, 20, 14, 10, 6, 4, 2, 1, 1, 2, 3, 5, 8, 12, 17, 23, 31, 40, 49, 60, 70, 83, 97, 113, + 122, 105, 89, 76, 64, 54, 44, 34, 26, 19, 13, 9, 5, 3, 1, 1, 0, 1, 2, 4, 7, 11, 16, 22, 30, 39, 49, 59, 70, 82, 96, 112, + 121, 104, 88, 75, 64, 53, 43, 33, 25, 18, 13, 8, 5, 2, 1, 0, 0, 0, 1, 4, 7, 11, 16, 22, 29, 38, 48, 58, 69, 81, 96, 112, + 121, 104, 88, 75, 64, 53, 43, 33, 25, 18, 13, 8, 5, 2, 1, 0, 0, 0, 1, 3, 6, 10, 15, 22, 29, 38, 48, 58, 69, 81, 95, 112, + 121, 104, 88, 75, 64, 53, 43, 33, 25, 18, 13, 8, 5, 2, 1, 0, 0, 0, 1, 3, 7, 10, 15, 22, 29, 38, 48, 58, 69, 81, 95, 112, + 122, 105, 88, 75, 64, 53, 43, 34, 25, 19, 13, 9, 5, 3, 1, 1, 0, 1, 2, 4, 7, 11, 16, 22, 30, 38, 48, 58, 69, 81, 96, 112, + 122, 105, 89, 76, 65, 54, 44, 34, 26, 19, 14, 9, 6, 3, 2, 1, 1, 1, 2, 4, 7, 11, 17, 23, 30, 39, 49, 59, 70, 82, 96, 113, + 123, 107, 90, 77, 66, 55, 45, 36, 27, 20, 15, 10, 7, 4, 2, 2, 1, 2, 3, 5, 8, 12, 18, 24, 32, 40, 50, 60, 71, 83, 98, 114, + 124, 108, 92, 78, 67, 57, 47, 37, 29, 22, 16, 11, 8, 5, 4, 2, 2, 3, 4, 6, 10, 14, 19, 25, 33, 42, 51, 61, 72, 85, 99, 115, + 126, 110, 94, 80, 69, 58, 48, 39, 31, 23, 18, 13, 9, 7, 5, 4, 4, 4, 6, 8, 11, 15, 21, 27, 35, 44, 53, 63, 74, 86, 101, 117, + 128, 113, 96, 82, 71, 60, 50, 41, 33, 25, 19, 15, 11, 8, 7, 5, 5, 6, 8, 10, 13, 17, 23, 29, 37, 46, 55, 65, 76, 89, 104, 119, + 130, 116, 99, 85, 73, 62, 53, 44, 35, 28, 22, 17, 13, 11, 8, 7, 7, 8, 10, 12, 15, 20, 25, 32, 39, 48, 57, 67, 78, 91, 107, 121, + 133, 119, 102, 88, 75, 65, 55, 46, 38, 31, 25, 20, 16, 13, 11, 10, 10, 10, 12, 15, 18, 22, 28, 34, 42, 51, 60, 70, 81, 94, 110, 124, + 137, 123, 106, 91, 78, 68, 58, 50, 41, 34, 28, 23, 19, 16, 14, 13, 13, 13, 15, 18, 21, 25, 31, 38, 45, 54, 63, 72, 84, 98, 113, 127, + 140, 126, 110, 95, 81, 71, 62, 53, 45, 37, 31, 26, 22, 19, 17, 16, 16, 16, 18, 21, 24, 29, 34, 41, 49, 57, 66, 75, 87, 102, 117, 131, + 144, 131, 114, 99, 85, 74, 65, 57, 49, 41, 35, 30, 26, 22, 20, 19, 19, 20, 21, 24, 28, 32, 38, 45, 52, 60, 69, 79, 91, 106, 121, 135, + 149, 136, 119, 103, 89, 78, 69, 60, 52, 45, 39, 34, 30, 26, 24, 23, 23, 24, 25, 28, 32, 37, 42, 49, 56, 64, 72, 83, 96, 110, 126, 139, + 155, 142, 124, 109, 95, 83, 73, 65, 57, 50, 44, 39, 34, 31, 29, 28, 28, 28, 30, 33, 36, 41, 47, 53, 60, 68, 77, 88, 101, 116, 132, 144, + 162, 147, 129, 114, 99, 87, 77, 68, 61, 54, 48, 42, 38, 34, 32, 31, 31, 31, 33, 36, 40, 45, 51, 57, 64, 72, 81, 93, 106, 121, 137, 150, + ] +... diff --git a/src/ipa/mali-c55/data/meson.build b/src/ipa/mali-c55/data/meson.build index 8a5fdd36..d4d331b0 100644 --- a/src/ipa/mali-c55/data/meson.build +++ b/src/ipa/mali-c55/data/meson.build @@ -2,6 +2,7 @@ conf_files = files([ 'imx415.yaml', + 'imx708.yaml', 'uncalibrated.yaml' ])