Skip to content

gk7205v500: an SC401AI tuning profile, its own colour on sc2336's - #2789

Merged
widgetii merged 1 commit into
masterfrom
gk7205v500-sc401ai-profile
Nov 7, 2026
Merged

widgetii merged 1 commit into
masterfrom
gk7205v500-sc401ai-profile

Conversation

@widgetii

@widgetii widgetii commented Nov 7, 2026

Copy link
Copy Markdown
Member

An SC401AI board had no IQ profile and ran default.ini, which is sc2232's.

sc401ai.ini is sc2336.ini plus three sections for this sensor, taken from the stock XiongMai firmware's own SC401AI tuning on the IVG-G4SF:

  • [static_awb]: the white-balance calibration
  • [static_ccm]
  • [dynamic_blc]: black level 264, where the SDK reference tuning carries 256

Measured side by side with that stock camera, same scene and light, against a 24-patch chart:

sc2232 (today) sc2336 this stock XiongMai
ΔE2000, full light — 12.1–12.7 7.1–8.2 11.5–12.3
ΔE2000, low light — 14.5–22.9 10.9–16.5 11.7–17.8
white balance at the lowest light — drifts to 4.6k K 2.8k K 2.3–2.5k K
detail vs stock ~0.4x ≥1x ≥1x 1x
chroma noise vs stock 3–4x ~1.3x ~1.3x 1x

Texture noise is about 40% lower than sc2336's at full light and the same in low light. Chroma noise on flat grey rises a little in low light.

XiongMai's noise reduction, sharpening and 3DNR were measured too and are not taken: on top of sc2336's they doubled the temporal noise.

Built gk7205v500_lite:

  • the image carries /etc/sensors/iq/sc401ai.ini
  • the profile costs 12 KB of squashfs; the image is 5104/5120 KB
  • the headroom warning is already there on master, at 28 KB

An SC401AI board had no IQ profile and ran default.ini, which is
sc2232's. This one is sc2336.ini with three sections added for the
sensor: [static_awb] (the white-balance calibration), [static_ccm] and
[dynamic_blc] (black level 264), taken from the stock XiongMai
firmware's own SC401AI tuning on the IVG-G4SF, where the SDK reference
tuning carries 256 and a much stronger matrix.

Measured side by side with that stock camera, same scene and light,
against a 24-patch chart, mean ΔE2000:

  full light   7.1-8.2 against sc2336.ini's 12.1-12.7 (stock 11.5-12.3)
  low light    10.9-16.5 against 14.5-22.9 (stock 11.7-17.8)

White balance no longer drifts in the dark (2.8k K at the lowest light,
where sc2336.ini wandered to 4.6k K), and temporal noise on texture is
about 40% lower at full light, the same in low light. Chroma noise on
flat grey rises a little in low light. sc2232's tune, today's fallback,
kept half the detail with three to four times the chroma noise.
XiongMai's noise reduction, sharpening and 3DNR were measured too and
are not taken: on top of sc2336's they doubled the temporal noise.

12 KB of squashfs on gk7205v500_lite, which leaves 16 KB of its cap.
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Add SC401AI IQ tuning and wire it into GK7205V500 images

🐞 Bug fix ⚙️ Configuration changes 🕐 20-40 Minutes

Grey Divider

AI Description

• Adds SC401AI white-balance, color-matrix, and black-level tuning to improve color accuracy over
 the fallback profile.
• Adds a GK7205V500 install rule, but the profile is in a different package path and cannot be
 installed as written.
Diagram

graph TD
  H["Hisilicon profile"] -.->|not copied| G["Goke source path"] --> I["Goke install rule"] --> T["Target IQ directory"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Place the profile in the Goke package
  • ➕ Makes the new install rule reference the file actually added.
  • ➕ Keeps the sensor profile with the package that ships it.
  • ➖ Duplicates tuning data if the Hisilicon package also needs this profile.
2. Create an explicitly shared IQ asset
  • ➕ Allows both packages to use one maintained profile.
  • ➖ Adds packaging coordination for a profile currently installed by only one package.

Recommendation: Keep the dedicated SC401AI tuning approach, but place sc401ai.ini at the Goke path used by the install rule before merging. A shared asset is worthwhile only if another package will install the same profile.

Files changed (2) +1574 / -0

Bug fix (1) +1573 / -0
sc401ai.iniDefine an SC401AI sensor tuning profile +1573/-0

Define an SC401AI sensor tuning profile

• Adds a full IQ profile with SC401AI-specific static AWB, color-matrix, and dynamic black-level sections; the black-level entries are 264. The profile resides in the Hisilicon package and is not the file referenced by the Goke install command.

general/package/hisilicon-osdrv-hi3516ev200/files/sensor/iq/sc401ai.ini

Other (1) +1 / -0
goke-osdrv-gk7205v500.mkAdd SC401AI to the Goke IQ-profile install list +1/-0

Add SC401AI to the Goke IQ-profile install list

• Adds an install command intended to ship sc401ai.ini under /etc/sensors/iq. Its source is the Goke package directory, whereas the new file in this diff is under the Hisilicon package directory.

general/package/goke-osdrv-gk7205v500/goke-osdrv-gk7205v500.mk

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

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

Copy link
Copy Markdown

Code Review by Qodo

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

Grey Divider


Action required

1. Camera builds cannot ship the new profile 🐞 Bug ≡ Correctness
Description
The new install command references a SC401AI file under the Goke package, but the profile was added
only under the HiSilicon package. If installation reaches this command, it fails because the source
file is absent; the HiSilicon recipe does not install its copy either.
Code

general/package/goke-osdrv-gk7205v500/goke-osdrv-gk7205v500.mk[137]

+	$(INSTALL) -m 644 -t $(TARGET_DIR)/etc/sensors/iq $(GOKE_OSDRV_GK7205V500_PKGDIR)/files/sensor/iq/sc401ai.ini
Evidence
The added command uses the Goke package directory. That package's sensor directory contains no
iq/sc401ai.ini; the added file is in the distinct HiSilicon package, whose explicit IQ install
list omits it.

general/package/goke-osdrv-gk7205v500/goke-osdrv-gk7205v500.mk[134-138]
general/package/hisilicon-osdrv-hi3516ev200/files/sensor/iq/sc401ai.ini[1550-1573]
general/package/hisilicon-osdrv-hi3516ev200/hisilicon-osdrv-hi3516ev200.mk[82-90]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The new Goke install command cannot find `sc401ai.ini` at its package-local source path. The profile is instead in the HiSilicon package, whose recipe does not install it.
## Fix Focus Areas
- general/package/goke-osdrv-gk7205v500/goke-osdrv-gk7205v500.mk[134-138]
- general/package/hisilicon-osdrv-hi3516ev200/files/sensor/iq/sc401ai.ini[1550-1573]
## Recommended Fix
Put the profile at the Goke package path used by the install command, rather than leaving it solely under HiSilicon. Verify that a clean Goke build installs it into `/etc/sensors/iq/`; also check that the two existing IQ-file sources referenced immediately before this command are available in that clean build.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Tip of the day
💡 Did you know, you can hide the parts of a finding you never read, like the evidence or the agent prompt

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@widgetii

widgetii commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

On the review finding ("Camera builds cannot ship the new profile"): the source path does resolve. general/package/goke-osdrv-gk7205v500/files/sensor/iq is committed as a symlink (mode 120000) to ../../../hisilicon-osdrv-hi3516ev200/files/sensor/iq. That is how the two lines above it already install sc2232.ini and sc2336.ini into every gk7205v500 image, and the directory it points to now holds sc401ai.ini. A gk7205v500_lite build from this branch carries /etc/sensors/iq/sc401ai.ini, byte-identical to the file in the tree, at 5104/5120 KB. No change needed.

@widgetii
widgetii merged commit 119ad2f into master Nov 7, 2026
44 of 45 checks passed
@widgetii
widgetii deleted the gk7205v500-sc401ai-profile branch November 7, 2026 17:50
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