<div dir="ltr">Hi David,<div><br></div><div>Thank you for your patch. Review to follow shortly, but for the series:</div><div><br></div><div>Tested-by: Naushir Patuck <<a href="mailto:naush@raspberrypi.com">naush@raspberrypi.com</a>></div><div><br></div><div>Regards,</div><div>Naush</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 16 Nov 2020 at 16:49, David Plowman <<a href="mailto:david.plowman@raspberrypi.com">david.plowman@raspberrypi.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi everyone<br>
<br>
Some time ago I had said I was doing some maintanence on the Raspberry<br>
Pi AGC algorithm, so here it all is (finally). Some of the changes are<br>
just for tidying, but others do also make it work better (even<br>
correctly). Some of the changes are in particular designed to go with<br>
Naush's patch set that allows exposure/gain to be set before the<br>
camera starts, though they all function in their own right too.<br>
<br>
These are the last substantial set of changes I have before we can<br>
publish our libcamera apps, though I think Naush still has more. (I am<br>
doing work on some of the other algorithms, but these are not on the<br>
critical path and can be added later.)<br>
<br>
Let me summarise all the individual patches here:<br>
<br>
#1. Replace Raspberry Pi debug with libcamera debug.<br>
<br>
#2. Code simplification. A number of copies and mutexes are<br>
unnecessary on the libcamera/vc4 platform. Not really a functional<br>
change though it does happen to fix a bug (where the AeLocked status<br>
was never correctly passed out in the AgcStatus).<br>
<br>
#3. Function renamed to be clearer!<br>
<br>
#4. An improvement in the way average Y values are calculated. This<br>
does actually change the AGC behaviour, making it less fiercely<br>
centre-weighted.<br>
<br>
#5. Code that fetches the AwbStatus from the metadata is factored out,<br>
so that we don't keep doing it all over the place. No functional<br>
difference.<br>
<br>
#6. An update to the AWB so that it gives us its up-to-date values<br>
when a camera mode switch happens. There's actually quite a lot of<br>
tidying to do to the AWB, but I'd like to save that for when I have<br>
more substantial changes there (and don't worry, they will come!).<br>
<br>
#7. This passes out correct gain/exposure values when the camera<br>
changes mode (or starts). This is the one most important to Naush.<br>
<br>
#8. Clear up some uninitialised variables. This is Tomi's patch from a<br>
little while back.<br>
<br>
#9. A small improvement to the gain update calculation. It's worth<br>
working a little harder with the statistics that we have to save<br>
having to wait for more frames.<br>
<br>
#10. Improvements to the "AE locked" logic. Previously it could fail<br>
ever to "lock" in some circumstances; now it will always do so once<br>
the AGC is steady.<br>
<br>
Sorry there's quite such a lot of stuff here. Please let me know if it<br>
might be better broken up into a few smaller patch sets.<br>
<br>
Thanks and best regards<br>
David<br>
<br>
David Plowman (10):<br>
libcamera: ipa: raspberrypi: agc: Use libcamera debug<br>
libcamera: ipa: raspberrypi: agc: Remove unnecessary locking<br>
libcamera: ipa: raspberrypi: agc: Rename method to divideUpExposure<br>
libcamera: ipa: raspberrypi: agc: Improve centre-weighted luminance<br>
calucation<br>
libcamera: ipa: raspberrypi: agc: Fetch AWB status only once<br>
libcamera: ipa: raspberrypi: awb: Add SwitchMode method to output AWB<br>
status<br>
libcamera: ipa: raspberrypi: agc: Report fixed exposure/gain values<br>
during SwitchMode<br>
libcamera: src: ipa: raspberrypi: agc: Fix uninitialised members in<br>
status_<br>
libcamera: src: ipa: raspberrypi: agc: Improve gain update calculation<br>
for partly saturated images<br>
libcamera: src: ipa: raspberrypi: agc: Improve AE locked logic<br>
<br>
src/ipa/raspberrypi/controller/rpi/agc.cpp | 393 ++++++++++++---------<br>
src/ipa/raspberrypi/controller/rpi/agc.hpp | 17 +-<br>
src/ipa/raspberrypi/controller/rpi/awb.cpp | 14 +<br>
src/ipa/raspberrypi/controller/rpi/awb.hpp | 1 +<br>
4 files changed, 248 insertions(+), 177 deletions(-)<br>
<br>
-- <br>
2.20.1<br>
<br>
_______________________________________________<br>
libcamera-devel mailing list<br>
<a href="mailto:libcamera-devel@lists.libcamera.org" target="_blank">libcamera-devel@lists.libcamera.org</a><br>
<a href="https://lists.libcamera.org/listinfo/libcamera-devel" rel="noreferrer" target="_blank">https://lists.libcamera.org/listinfo/libcamera-devel</a><br>
</blockquote></div>