summaryrefslogtreecommitdiff
path: root/src/ipa/rkisp1/algorithms/af.h
AgeCommit message (Collapse)Author
2022-07-14ipa: algorithms: af: Do not inherit from Algorithmjmondi/rockpi/af/imx519Jacopo Mondi
The AfAlgorithm class defines the pure virtual interface for the Auto-focus algorithms and it is not meant to be instantiated. In the same way the AfHillClimbing class cannot be directly instantiated as it contains two pure virtual members. The platform-specific implementation is instead the class that will be registered to the AlgorithmFactory, and it's the only one that needs to inherit from Algorithm for this reason. Remove the Module template argument from the class hierarchy and have the platform specific class inherit from Algorithm. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2022-07-14ipa: rkisp1: af: Skip one frame after changing the AF windowDaniel Semkowicz via libcamera-devel
Drop the first frame after the window change was requested to guarantee that sharpness level was calculated for the new window. Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>
2022-07-14ipa: rkisp1: af: Skip few frames after changing lens positionDaniel Semkowicz via libcamera-devel
With 30fps stream, lens movement takes more time than one frame. Skip few frames to allow lens to stabilize before calculating next contrast value. Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>
2022-07-14ipa: rkisp1: Add "Windows" Metering mode to auto focus algorithmDaniel Semkowicz via libcamera-devel
Allow manually setting auto focus window. Currently only one window is enabled, but ISP allows up to three of them. Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>
2022-07-14ipa: rkisp1: Add AF algorithm basing on common AfHillClimbing classDaniel Semkowicz via libcamera-devel
Rockchip ISP AF block allows calculation of sharpness and luminance in up to three user defined windows. If no windows are set, there are some default settings applied for the first window and exposed through the driver. For each frame, use the sharpness value calculated for this default window and feed the hill climbing algorithm with them. Then set the lens position to value calculated by the algorithm. Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>