Repository navigation
sensor: imx662 on hi3516cv6xx runs the stock firmware's day white balance - #298
Merged
Merged
Conversation
…ance The driver carried the AWB calibration and colour matrices of the stock firmware's cmos defaults. Those are never what the SIP-K662C6S module runs: once its ISP is up, the stock firmware's day scene (IMX662_ISP_SetAWBAttr, scene 0) writes its own AWB curve, reference gains and a four-temperature colour matrix table over them. On the module the defaults gave a green picture and a cyan sky. The driver now carries the day scene's values: curve -86, 342, 0, 199146, 128, -148048, reference gains 418/545 at 4950 K, and matrices at 7500, 6500, 4800 and 2600 K. The matrix table is written out as values rather than a byte image. Measured on the module, with the same host program and IQ profile: - Overcast: grey pavement went from R/G 0.62, B/G 0.55-0.59 to 0.78-0.80 and 0.89; the sky went from B/G 0.88 to 1.03. - Sun: a white fascia reads R/G 1.01-1.03, B/G 0.94-0.97. Against raw frames AWB lands within 0-5% of the neutral red gain and 4-7% short of the blue. An overcast sky still leaves the picture slightly cool. That has not been measured against raw.
PR Summary by QodoUse stock day-scene white balance for hi3516cv6xx IMX662
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can open the rule or relationship behind a finding in one click |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The IMX662 driver on hi3516cv6xx (#296) carries the AWB calibration and colour matrices from the stock firmware's cmos defaults. The SIP-K662C6S module never runs those: once its ISP is up, the stock firmware's day scene (
IMX662_ISP_SetAWBAttr, scene 0) writes its own AWB curve, reference gains and colour-matrix table over them. With the defaults, the picture on the module was green and the sky cyan (OpenIPC/majestic#370).The driver now carries the day scene's values:
Measured on the module, with the same majestic and IQ profile, on the delivered JPEG (R/G / B/G of neutral surfaces):
The overcast rows are an A/B/A/B swap of the sensor library at about 11:25 UTC. In sun, raw frames show AWB landing within 0–5% of the neutral red gain and 4–7% short of the neutral blue gain.
The matrix bytes of this build match the library tested on the camera.
Not covered:
The camera owner has seen the result on their camera and agreed to make it the default.