Message ID | 20210618103351.1642060-6-paul.elder@ideasonboard.com |
---|---|
State | Superseded |
Delegated to: | Paul Elder |
Headers | show |
Series |
|
Related | show |
Hi Paul, Thank you for the patch. On Fri, Jun 18, 2021 at 07:33:42PM +0900, Paul Elder wrote: > AwbLocked alone isn't sufficient for reporting the Awb state, so replace s/Awb state/AWB state/ > it with AwbState. Add an AwbLock control for instructing the camera to > lock the AWB values. The discussion of patch 03/14 applies to these controls too, so I'll skip the review for now. > Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> > --- > src/libcamera/control_ids.yaml | 82 ++++++++++++++++++++-------------- > 1 file changed, 49 insertions(+), 33 deletions(-) > > diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml > index 2e62f61b..3a4f07cf 100644 > --- a/src/libcamera/control_ids.yaml > +++ b/src/libcamera/control_ids.yaml > @@ -161,6 +161,55 @@ controls: > value: 3 > description: Custom exposure mode. > > + - AwbLock: > + type: bool > + description: | > + Control to lock the AWB values. > + When set to true, the AWB algorithm is locked to its latest parameters, > + and will not change exposure settings until set to false. > + \sa AwbState > + > + - AwbState: > + type: int32_t > + description: | > + Control to report the current AWB algorithm state. Switching between or > + enabling AWB modes (AwbMode) always resets the AwbState to > + AwbStateInactive. The camera device can do several state transitions > + between two results, if it is allowed by the state transition table. > + For example, AwbStateInactive may never actually be seen in a result. > + > + The state in the result is the state for this image (in sync with this > + image). If AWB state becomes AwbStateConverged, then the image data > + associated with the result should be good to use. > + > + The state transitions mentioned below assume that AwbMode is auto. > + > + \sa AwbLock > + enum: > + - name: AwbStateInactive > + value: 0 > + description: | > + The AWB algorithm is inactive. > + If the camera initiates an AWB scan, the state shall go to Searching. > + If AwbLock is on, the state shall go to Locked. > + - name: AwbStateSearching > + value: 1 > + description: | > + The AWB algorithm has not converged yet. > + If the camera finishes an AWB scan, the state shall go to Converged. > + If AwbLock is on, the state shall go to Locked. > + - name: AwbStateConverged > + value: 2 > + description: | > + The AWB algorithm has converged. > + If the camera initiates an AWB scan, the state shall go to Searching. > + If AwbLock is on, the state shall go to Locked. > + - name: AwbStateLocked > + value: 3 > + description: | > + The AWB algorithm is locked. > + If AwbLock is off, the state shall go to Searching. > + > - ExposureValue: > type: float > description: | > @@ -272,17 +321,6 @@ controls: > value: 10 > description: Custom AWB mode. > > - - AwbLocked: > - type: bool > - description: | > - Report the lock status of a running AWB algorithm. > - > - If the AWB algorithm is locked the value shall be set to true, if it's > - converging it shall be set to false. If the AWB algorithm is not > - running the control shall not be present in the metadata control list. > - > - \sa AwbEnable > - > - ColourGains: > type: float > description: | > @@ -572,28 +610,6 @@ controls: > description: | > AF has completed a passive scan without finding focus. > > - - AwbState: > - type: int32_t > - draft: true > - description: | > - Control to report the current AWB algorithm state. Currently identical > - to ANDROID_CONTROL_AWB_STATE. > - > - Current state of the AWB algorithm. > - enum: > - - name: AwbStateInactive > - value: 0 > - description: The AWB algorithm is inactive. > - - name: AwbStateSearching > - value: 1 > - description: The AWB algorithm has not converged yet. > - - name: AwbConverged > - value: 2 > - description: The AWB algorithm has converged. > - - name: AwbLocked > - value: 3 > - description: The AWB algorithm is locked. > - > - SensorRollingShutterSkew: > type: int64_t > draft: true
diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml index 2e62f61b..3a4f07cf 100644 --- a/src/libcamera/control_ids.yaml +++ b/src/libcamera/control_ids.yaml @@ -161,6 +161,55 @@ controls: value: 3 description: Custom exposure mode. + - AwbLock: + type: bool + description: | + Control to lock the AWB values. + When set to true, the AWB algorithm is locked to its latest parameters, + and will not change exposure settings until set to false. + \sa AwbState + + - AwbState: + type: int32_t + description: | + Control to report the current AWB algorithm state. Switching between or + enabling AWB modes (AwbMode) always resets the AwbState to + AwbStateInactive. The camera device can do several state transitions + between two results, if it is allowed by the state transition table. + For example, AwbStateInactive may never actually be seen in a result. + + The state in the result is the state for this image (in sync with this + image). If AWB state becomes AwbStateConverged, then the image data + associated with the result should be good to use. + + The state transitions mentioned below assume that AwbMode is auto. + + \sa AwbLock + enum: + - name: AwbStateInactive + value: 0 + description: | + The AWB algorithm is inactive. + If the camera initiates an AWB scan, the state shall go to Searching. + If AwbLock is on, the state shall go to Locked. + - name: AwbStateSearching + value: 1 + description: | + The AWB algorithm has not converged yet. + If the camera finishes an AWB scan, the state shall go to Converged. + If AwbLock is on, the state shall go to Locked. + - name: AwbStateConverged + value: 2 + description: | + The AWB algorithm has converged. + If the camera initiates an AWB scan, the state shall go to Searching. + If AwbLock is on, the state shall go to Locked. + - name: AwbStateLocked + value: 3 + description: | + The AWB algorithm is locked. + If AwbLock is off, the state shall go to Searching. + - ExposureValue: type: float description: | @@ -272,17 +321,6 @@ controls: value: 10 description: Custom AWB mode. - - AwbLocked: - type: bool - description: | - Report the lock status of a running AWB algorithm. - - If the AWB algorithm is locked the value shall be set to true, if it's - converging it shall be set to false. If the AWB algorithm is not - running the control shall not be present in the metadata control list. - - \sa AwbEnable - - ColourGains: type: float description: | @@ -572,28 +610,6 @@ controls: description: | AF has completed a passive scan without finding focus. - - AwbState: - type: int32_t - draft: true - description: | - Control to report the current AWB algorithm state. Currently identical - to ANDROID_CONTROL_AWB_STATE. - - Current state of the AWB algorithm. - enum: - - name: AwbStateInactive - value: 0 - description: The AWB algorithm is inactive. - - name: AwbStateSearching - value: 1 - description: The AWB algorithm has not converged yet. - - name: AwbConverged - value: 2 - description: The AWB algorithm has converged. - - name: AwbLocked - value: 3 - description: The AWB algorithm is locked. - - SensorRollingShutterSkew: type: int64_t draft: true
AwbLocked alone isn't sufficient for reporting the Awb state, so replace it with AwbState. Add an AwbLock control for instructing the camera to lock the AWB values. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> --- src/libcamera/control_ids.yaml | 82 ++++++++++++++++++++-------------- 1 file changed, 49 insertions(+), 33 deletions(-)