[libcamera-devel] [PATCH] pipeline: rpi: vc4: Allocate more embedded data buffers
Naushir Patuck
naush at raspberrypi.com
Mon Sep 18 11:37:22 CEST 2023
Hi William,
Thank you for this patch.
On Mon, 18 Sept 2023 at 10:31, William Vinnicombe via libcamera-devel
<libcamera-devel at lists.libcamera.org> wrote:
>
> If the pipeline runs out of embedded data buffers, then it will pass
> the frame to the IPA without the metadata. The IPA then has to use the
> delayed controls as inputs to the algorithms. This can cause problems
> with the subsequent algorithms if the sensor did not action the
> controls, especially with the autofocus as that doesn't have controls
> which can be passed in lieu of the metadata.
>
> Reduce the likelihood of this by increasing the number of embedded data
> buffers, as they are small so a generous number can be allocated.
>
> Signed-off-by: William Vinnicombe <william.vinnicombe at raspberrypi.com>
Makes sense!
Reviewed-by: Naushir Patuck <naush at raspberrypi.com>
> ---
> src/libcamera/pipeline/rpi/vc4/vc4.cpp | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/libcamera/pipeline/rpi/vc4/vc4.cpp b/src/libcamera/pipeline/rpi/vc4/vc4.cpp
> index 018cf488..6777c697 100644
> --- a/src/libcamera/pipeline/rpi/vc4/vc4.cpp
> +++ b/src/libcamera/pipeline/rpi/vc4/vc4.cpp
> @@ -262,9 +262,9 @@ int PipelineHandlerVc4::prepareBuffers(Camera *camera)
> } else if (stream == &data->unicam_[Unicam::Embedded]) {
> /*
> * Embedded data buffers are (currently) for internal use,
> - * so allocate the minimum required to avoid frame drops.
> + * so allocate a generous number as they are small.
> */
> - numBuffers = minBuffers;
> + numBuffers = 12;
> } else {
> /*
> * Since the ISP runs synchronous with the IPA and requests,
> --
> 2.39.2
>
More information about the libcamera-devel
mailing list