diff options
author | Kate Hsuan <hpa@redhat.com> | 2022-02-14 17:51:36 +0800 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2022-03-15 17:20:50 +0000 |
commit | b608984e78824f8738a089136721b1fe54016248 (patch) | |
tree | d24e8665930783f9a90be20274a880412c565d05 /src/ipa/ipu3/ipa_context.cpp | |
parent | e41854a4e6fde2dd9e2a2a7290670943235776cd (diff) |
ipa: ipu3: af: Auto focus for dw9719 Surface Go2 VCM
Since VCM for surface Go 2 (dw9719) had been successfully driven, this
Af module can be used to control the VCM and determine the focus value
based on the IPU3 AF state.
Based on the values from the IPU3 AF buffer, the variance of each focus
step is determined and a greedy approach is used to find the maximum
variance of the AF state and an appropriate focus value.
The grid configuration is implemented as a context. Also, the grid
parameter- AF_MIN_BLOCK_WIDTH is set to 4 (default is 3) since if the
default value is used, x_start (x_start > 640) will be at an incorrect
location of the image (rightmost of the sensor).
Signed-off-by: Kate Hsuan <hpa@redhat.com>
Tested-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/ipa/ipu3/ipa_context.cpp')
-rw-r--r-- | src/ipa/ipu3/ipa_context.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/ipa/ipu3/ipa_context.cpp b/src/ipa/ipu3/ipa_context.cpp index 9c4ec936..1b59c918 100644 --- a/src/ipa/ipu3/ipa_context.cpp +++ b/src/ipa/ipu3/ipa_context.cpp @@ -70,6 +70,29 @@ namespace libcamera::ipa::ipu3 { */ /** + * \var IPASessionConfiguration::af + * \brief AF grid configuration of the IPA + * + * \var IPASessionConfiguration::af.afGrid + * \brief AF scene grid configuration. + */ + +/** + * \var IPAFrameContext::af + * \brief Context for the Automatic Focus algorithm + * + * \struct IPAFrameContext::af + * \var IPAFrameContext::af.focus + * \brief Current position of the lens + * + * \var IPAFrameContext::af.maxVariance + * \brief The maximum variance of the current image. + * + * \var IPAFrameContext::af.stable + * \brief It is set to true, if the best focus is found. + */ + +/** * \var IPASessionConfiguration::agc * \brief AGC parameters configuration of the IPA * |