From ba2ce0b94e405922c4c4d6ad6b5cdf4ba302ee2f Mon Sep 17 00:00:00 2001 From: Dmitry Ilyin <6576495+widgetii@users.noreply.github.com> Date: Sat, 14 Nov 2026 12:41:32 +0300 Subject: [PATCH 1/2] xm-n51813l: [static_awb] CorrectionStrength 100 The 80 % was tuned while majestic programmed an ISP image height of 0, and the white-balance statistics counted one line per zone (fixed in majestic #1256). On the real statistics, 80 % leaves every scene yellow (grey b* +18..+23); 100 % beats the stock firmware's ColorChecker colour error in every scene measured -- daylight and the room's bulbs at 3000-6000 K: dE 6.9-9.1 against 8.3-9.6. --- .../general/overlay/etc/sensors/iq/ar0130.ini | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/devices/hi3518cv100_lite_xm-n51813l/general/overlay/etc/sensors/iq/ar0130.ini b/devices/hi3518cv100_lite_xm-n51813l/general/overlay/etc/sensors/iq/ar0130.ini index 45e93eeba..1333a3363 100644 --- a/devices/hi3518cv100_lite_xm-n51813l/general/overlay/etc/sensors/iq/ar0130.ini +++ b/devices/hi3518cv100_lite_xm-n51813l/general/overlay/etc/sensors/iq/ar0130.ini @@ -51,14 +51,15 @@ AutoCurvePara = 90, -14, -180, 209650, 128, -162566; AutoStaticWb = 352, 256, 256, 420; AutoRefColorTemp = 4800 StatisticsLoop = 1 -CorrectionStrength = 80 +CorrectionStrength = 100 ; White only from the zones the vendor AWB would call grey, in place of grey ; world, which this room's orange and wood pulled green. ColorChecker colour -; error at 3000-6000 K, against stock: within 1.3 dE in full light (8.4-15.4 -; vs 7.1-15.4), better at 25 % (8.9-14.3 vs 14.2-17.5) and 5 % (11.8-14.9 vs -; 16.2-17.8). A majestic that predates StatisticsZones ignores the key and -; stays on grey world; one that has it leaves the grey patches neutral -; rather than green-cyan. +; error against stock in the same minutes, daylight and 3000-6000 K bulbs: +; 6.9-9.1 vs 8.3-9.6, better in every scene. Measured with majestic's ISP +; image height fixed (majestic #1256); before that the statistics counted one +; line per zone, and the 80 % strength tuned on them left every scene yellow +; (grey b* +18..+23). A majestic that predates StatisticsZones ignores the +; key and stays on grey world. StatisticsZones = 1 [static_ccm] From 5df2f69012d87413e04301137bdeab33cb9602ee Mon Sep 17 00:00:00 2001 From: Dmitry Ilyin <6576495+widgetii@users.noreply.github.com> Date: Sat, 14 Nov 2026 12:48:56 +0300 Subject: [PATCH 2/2] xm-n51813l: ar0130.ini comments -- paired dE figures, the majestic the tuning needs Review: the header still said the V1 AWB ignores its statistics and that CorrectionStrength keeps some of the light's colour; both described the camera before majestic's ISP image height fix. The dE figures are now the per-scene pairs against stock in the same minute, and the header names the majestic commit (and the reboot) the tuning depends on. --- .../general/overlay/etc/sensors/iq/ar0130.ini | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/devices/hi3518cv100_lite_xm-n51813l/general/overlay/etc/sensors/iq/ar0130.ini b/devices/hi3518cv100_lite_xm-n51813l/general/overlay/etc/sensors/iq/ar0130.ini index 1333a3363..017a78f5c 100644 --- a/devices/hi3518cv100_lite_xm-n51813l/general/overlay/etc/sensors/iq/ar0130.ini +++ b/devices/hi3518cv100_lite_xm-n51813l/general/overlay/etc/sensors/iq/ar0130.ini @@ -15,10 +15,12 @@ ; CR_M is the chroma range, which stock runs at SF. ; ; Black level, AWB calibration and colour matrices are the stock firmware's -; (Sofia's AR0130 entry, matching its live ISP registers). The V1 AWB does not -; follow its statistics on this sensor, so white balance comes from them -; directly (StatisticsLoop); CorrectionStrength keeps some of the light's -; colour, as stock does. +; (Sofia's AR0130 entry, matching its live ISP registers). White balance +; comes from the ISP's grey zones directly (StatisticsLoop, StatisticsZones) +; at full strength: on this camera it beats both the vendor AWB and stock. +; This needs a majestic with the gen 1 ISP image height fix (cf4a1d2, +; widgetii/majestic#1256, 2026-11-14) and a reboot after the update: an older +; one leaves the statistics at one line per zone, and the colour drifts. ; ; Sharpening and the ISP's 2D denoise are the stock board library's ; (LIBISP:AR0130_N51813 in Sofia), which sharpen and denoise far harder than @@ -54,12 +56,11 @@ StatisticsLoop = 1 CorrectionStrength = 100 ; White only from the zones the vendor AWB would call grey, in place of grey ; world, which this room's orange and wood pulled green. ColorChecker colour -; error against stock in the same minutes, daylight and 3000-6000 K bulbs: -; 6.9-9.1 vs 8.3-9.6, better in every scene. Measured with majestic's ISP -; image height fixed (majestic #1256); before that the statistics counted one -; line per zone, and the 80 % strength tuned on them left every scene yellow -; (grey b* +18..+23). A majestic that predates StatisticsZones ignores the -; key and stays on grey world. +; error, each sample against stock's in the same minute: daylight 7.03 vs +; 8.27, bulbs 3000 K 6.94 vs 8.60, 4000 K 8.12 vs 8.64, 5000 K 6.87 vs 8.43, +; 5990 K 9.13 vs 9.62. The 80 % tuned before majestic #1256, on one line per +; zone, left every scene yellow (grey b* +18..+23). A majestic that predates +; StatisticsZones ignores the key and stays on grey world. StatisticsZones = 1 [static_ccm]