Skip to content

xm-n51813l: [static_awb] CorrectionStrength 100 - #246

Merged
widgetii merged 2 commits into
masterfrom
xm-n51813l-awb-strength100
Nov 14, 2026
Merged

widgetii merged 2 commits into
masterfrom
xm-n51813l-awb-strength100

Conversation

@widgetii

@widgetii widgetii commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

The 80 % strength was tuned while majestic programmed an ISP image height of 0. The white-balance statistics then counted one line per zone; this is fixed in widgetii/majestic#1256 (cf4a1d2, merged, in the published master build). The tuning needs that majestic, plus a reboot after updating.

Measured on an N51813L against the stock firmware on a twin unit. Each OpenIPC sample is paired with stock's ColorChecker dE2000 from the same minute:

Scene strength 80: stock / OpenIPC strength 100: stock / OpenIPC
daylight 7.64 / 11.94 (grey b* +22) 8.27 / 7.03
3000 K bulbs 8.19 / 11.93 8.60 / 6.94
4000 K 7.78 / 10.81 8.64 / 8.12
5000 K 7.67 / 11.28 8.43 / 6.87
5990 K 8.54 / 10.97 9.62 / 9.13

At strength 100, OpenIPC beats stock in all five pairs (mean 7.62 against 8.71). At 80 it is yellow everywhere: it holds the blue gain near 2.1, where stock uses 2.5–2.7.

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.
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Correct AR0130 white balance strength on XM-N51813L

🐞 Bug fix ⚙️ Configuration changes 🕐 Less than 10 minutes

Grey Divider

AI Description

• Raise AR0130 white-balance correction strength from 80% to 100% to eliminate a yellow cast.
• Document calibration against corrected ISP statistics and stock firmware across daylight and bulb
 scenes.
Diagram

graph TD
  S["ISP statistics"] --> A["Majestic AWB"] --> G["ISP gains"] --> O["Image colors"]
  C["AR0130 IQ config"] --> A
Loading
High-Level Assessment

Use the device-specific strength adjustment: measurements with corrected ISP statistics show 100% outperforming both 80% and stock firmware in all five tested scenes. Keeping 80% would retain the yellow cast; a broader AWB redesign is not warranted by this change.

Files changed (1) +7 / -6

Other (1) +7 / -6
ar0130.iniIncrease AR0130 AWB correction strength to 100% +7/-6

Increase AR0130 AWB correction strength to 100%

• Changes CorrectionStrength from 80 to 100 to address the yellow cast observed after ISP statistics were fixed upstream. Replaces the prior calibration comment with measurements against stock firmware and explains why the earlier 80% tuning was misleading.

devices/hi3518cv100_lite_xm-n51813l/general/overlay/etc/sensors/iq/ar0130.ini

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Header comment says strength keeps some light colour ✓ Resolved
Description
The file header at lines 20-21 says CorrectionStrength keeps some of the light's colour, as stock
does, but the value of 100 removes the full colour cast, so the documented design intent no longer
matches the setting. Anyone reading the INI will take the 100 setting as a deliberate deviation from
stock, and the comment is now misleading for future tuning.

2. Claimed 'better in every scene' is not supported ✓ Resolved
Description
The added comment says strength 100 is better than stock in every scene, with stock quoted as
8.3-9.6, but the PR's own table gives stock ranges of 7.6-8.3 for daylight, 7.8-8.6 at 4000 K and
7.7-8.4 at 5000 K, and the 4000 K result of 8.12 falls inside the stock range. The comment therefore
overstates the measured gain and misquotes the stock band.


Informational

3. Strength 100 depends on an unmerged majestic fix ✓ Resolved
Description
The new value of 100 was tuned on statistics that are only correct once majestic #1256 fixes the ISP
image height, and the comment only records this in prose. A majestic build without that fix, paired
with this INI, would apply the full correction on the one-line-per-zone statistics that the 80
setting was tuned against, so the tuning would silently be wrong.

Grey Divider

Tip of the day
💡 Did you know, you can ask Qodo to dismiss a finding you disagree with, with your reason on record

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

…e 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.
@widgetii

Copy link
Copy Markdown
Member Author

Review addressed in 5df2f69:

  1. Header comment: fixed. It described the camera before the majestic fix: "the V1 AWB does not follow its statistics" and a strength that "keeps some of the light's colour". It now says white balance comes from the grey zones at full strength.
  2. "Better in every scene": the claim holds, but the PR table was misleading. Its stock column mixed in stock readings from the other strength's minutes. Each OpenIPC sample is compared with stock from the same minute, and strength 100 wins all five pairs (8.12 vs 8.64 at 4000 K, 9.13 vs 9.62 at 5990 K). The ini comment and the PR table now list the pairs.
  3. Majestic dependency: widgetii/majestic#1256 is merged (cf4a1d2), and the published hi3516cv100 lite master build includes it. That is the binary the builder downloads. The header now names the commit, and the reboot it needs.

@widgetii
widgetii merged commit 1f524ef into master Nov 14, 2026
7 checks passed
@widgetii
widgetii deleted the xm-n51813l-awb-strength100 branch November 14, 2026 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant