[libcamera-devel] [PATCH 1/5] src: ipa: raspberrypi: Distinguish the first camera start from others
Naushir Patuck
naush at raspberrypi.com
Fri Dec 4 16:51:32 CET 2020
Hi David,
Thank you for your patch.
On Wed, 2 Dec 2020 at 11:53, David Plowman <david.plowman at raspberrypi.com>
wrote:
> This makes it possible to tell whether we're starting the sensor for
> the first time, or whether it's happening because of a mode switch or
> because the camera has been paused and re-started. Depending on this,
> some sensors may require us to drop different numbers of frames.
>
> Signed-off-by: David Plowman <david.plowman at raspberrypi.com>
>
Reviewed-by: Naushir Patuck <naush at raspberrypi.com>
> ---
> src/ipa/raspberrypi/raspberrypi.cpp | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/src/ipa/raspberrypi/raspberrypi.cpp
> b/src/ipa/raspberrypi/raspberrypi.cpp
> index 69be5e4e..b8298768 100644
> --- a/src/ipa/raspberrypi/raspberrypi.cpp
> +++ b/src/ipa/raspberrypi/raspberrypi.cpp
> @@ -67,7 +67,7 @@ public:
> IPARPi()
> : lastMode_({}), controller_(), controllerInit_(false),
> frameCount_(0), checkCount_(0), mistrustCount_(0),
> - lsTable_(nullptr)
> + lsTable_(nullptr), firstStart_(true)
> {
> }
>
> @@ -145,6 +145,9 @@ private:
> /* LS table allocation passed in from the pipeline handler. */
> FileDescriptor lsTableHandle_;
> void *lsTable_;
> +
> + /* Distinguish the first camera start from others. */
> + bool firstStart_;
> };
>
> int IPARPi::init(const IPASettings &settings)
> @@ -179,6 +182,8 @@ int IPARPi::start(const IPAOperationData &ipaConfig,
> IPAOperationData *result)
> result->operation |= RPi::IPA_CONFIG_SENSOR;
> }
>
> + firstStart_ = false;
> +
> return 0;
> }
>
> --
> 2.20.1
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20201204/739b5c0c/attachment.htm>
More information about the libcamera-devel
mailing list