mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-19 02:15:05 +03:00
ipa: raspberrypi: AWB: Fix race condition setting manual gains
Applying the manual_r_ and manual_b_ values is entirely removed from the asynchronous thread where their use constituted a race hazard. The main thread now deals with them entirely, involving the following changes. 1. SetManualGains() applies the new values directly to the "sync_results", meaning that Prepare() will jump to the new values immediately (which is a better behaviour). 2. Process() does not restart the asynchronous thread when manual gains are in force. 3. The asynchronous thread might be running when manual gains are set, so we ignore the results produced in this case. Signed-off-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Naushir Patuck <naush@raspberrypi.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
e36a6f4043
commit
db55e09b42
2 changed files with 44 additions and 43 deletions
|
@ -108,6 +108,7 @@ public:
|
|||
};
|
||||
|
||||
private:
|
||||
bool isAutoEnabled() const;
|
||||
// configuration is read-only, and available to both threads
|
||||
AwbConfig config_;
|
||||
std::thread async_thread_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue