[libcamera-devel] [RFC PATCH 0/1] IPU3 AWB gains correction

Jean-Michel Hautbois jeanmichel.hautbois at ideasonboard.com
Fri Jun 17 16:39:37 CEST 2022


Thank you.
FYI, I tested the patch I sent with this fixed [1], and I obtain [2] 
while it is [3] on master.

[1]: https://patchwork.libcamera.org/patch/16256/
[2]: https://pasteboard.co/sPXz45GjbpAg.png
[3]: https://pasteboard.co/DLfD69BzsFuu.png

Waiting for your confirmation ;-).
JM

On 17/06/2022 15:30, Cao, Bingbu via libcamera-devel wrote:
> Laurent and JM,
> 
> Give me some time, let me confirm with our algo team.
> 
> ________________________
> BRs,
> Bingbu Cao
> 
>> -----Original Message-----
>> From: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
>> Sent: Friday, June 17, 2022 4:08 PM
>> To: Cao, Bingbu <bingbu.cao at intel.com>
>> Cc: Jean-Michel Hautbois <jeanmichel.hautbois at ideasonboard.com>;
>> libcamera-devel at lists.libcamera.org; sakari.ailus at linux.intel.com
>> Subject: Re: [libcamera-devel] [RFC PATCH 0/1] IPU3 AWB gains correction
>>
>> Hi Bingbu,
>>
>> Thank you very much for your quick reply.
>>
>> On Fri, Jun 17, 2022 at 06:58:36AM +0000, Cao, Bingbu via libcamera-devel
>> wrote:
>>> Hi, JM,
>>>
>>> For BNR parameters WB gain factor for the three channels [Ggr, Ggb, Gb,
>> Gr].
>>> Their precision is U3.13 and the range is (0, 8) and the actual gain
>>> is Gx + 1, it is typically Gx = 1.
>>>
>>> Pout = {Pin * (1 + Gx)}.
>>>
>>> So that means for wb_gains.Ggr/gb/g/r = 0.5, the actual gain is 1.5.
>>
>> Just to make sure my understanding is correct, does this mean the
>> following ?
>>
>> wb_gains.gr = 0    -> actual gain = 1.0
>> wb_gains.gr = 4096 -> actual gain = 1.5
>> wb_gains.gr = 8192 -> actual gain = 2.0
>>
>>> It seems not correct to changing ratio from 8192 to 4096 as its
>>> precision is U3.13.  I am not familiar with ipa implementation in
>>> libcamera, not sure other details.
>>>
>>>> -----Original Message-----
>>>> From: Jean-Michel Hautbois <jeanmichel.hautbois at ideasonboard.com>
>>>> Sent: Thursday, June 16, 2022 5:12 PM
>>>> To: libcamera-devel at lists.libcamera.org
>>>> Cc: Cao, Bingbu <bingbu.cao at intel.com>;
>>>> sakari.ailus at linux.intel.com; Jean-Michel Hautbois
>>>> <jeanmichel.hautbois at ideasonboard.com>
>>>> Subject: [RFC PATCH 0/1] IPU3 AWB gains correction
>>>>
>>>> Hi there,
>>>>
>>>> Bingbu, Sakari, I cc'ed you because this patch is not aligned with
>>>> the current documentation in the intel-ipu3.h file, could you have a
>>>> look please ?
>>>>
>>>> The part which worries me is that the green gains should be 0 for
>>>> the white balance to be correct which is not stated in the
>>>> documentation at all.
>>>>
>>>> In order to demonstrate it I captured two frames, [1] is the actual
>>>> SGo2 image quality, and [2] with this patch applied.
>>>>
>>>> [1]: https://pasteboard.co/hUcL4U6eyyAH.png
>>>> [2]: https://pasteboard.co/2XIbkkL8kitl.png
>>>>
>>>> There is a very clear benefit, that's why I submit this RFC as I
>>>> think it needs to be clarified :-).
>>>>
>>>> Thanks !
>>>> JM
>>>>
>>>> Jean-Michel Hautbois (1):
>>>>    ipa: ipu3: awb: Correct the coefficient factor
>>>>
>>>>   src/ipa/ipu3/algorithms/awb.cpp | 8 ++++----
>>>>   1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> --
>> Regards,
>>
>> Laurent Pinchart


More information about the libcamera-devel mailing list