mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-24 17:15:07 +03:00
pipeline: rpi: vc4: Allocate more embedded data buffers
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@raspberrypi.com> Reviewed-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
d2094a0185
commit
d477ee97bc
1 changed files with 14 additions and 3 deletions
|
@ -258,10 +258,21 @@ 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.
|
||||
* Embedded data buffers are (currently) for internal use, and
|
||||
* are small enough (typically 1-2KB) that we can
|
||||
* allocate them generously to avoid causing problems in the
|
||||
* IPA when we cannot supply the metadata.
|
||||
*
|
||||
* 12 are allocated as a typical application will have 8-10
|
||||
* input buffers, so allocating more embedded buffers than that
|
||||
* is a sensible choice.
|
||||
*
|
||||
* The lifetimes of these buffers are smaller than those of the
|
||||
* raw buffers, so allocating a fixed number will still suffice
|
||||
* if the application requests a greater number of raw
|
||||
* buffers, as these will be recycled quicker.
|
||||
*/
|
||||
numBuffers = minBuffers;
|
||||
numBuffers = 12;
|
||||
} else {
|
||||
/*
|
||||
* Since the ISP runs synchronous with the IPA and requests,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue