[libcamera-devel] [PATCH v3 18/22] libcamera: rkisp1: Fill stride and frameSize at config validation
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Sat Jul 4 23:51:03 CEST 2020
Hi Paul,
Thank you for the patch.
On Sat, Jul 04, 2020 at 10:31:36PM +0900, Paul Elder wrote:
> Fill the stride and frameSize fields of the StreamConfiguration at
> configuration validation time instead of at camera configuration time.
>
> Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
>
> ---
> New in v3
> ---
> src/libcamera/pipeline/rkisp1/rkisp1.cpp | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> index 3c3f3f3..3ac7b3c 100644
> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> @@ -535,6 +535,10 @@ CameraConfiguration::Status RkISP1CameraConfiguration::validate()
>
> cfg.bufferCount = RKISP1_BUFFER_COUNT;
>
> + const PixelFormatInfo &info = PixelFormatInfo::info(cfg.pixelFormat);
> + cfg.stride = info.stride(cfg.size.width, 0);
> + cfg.frameSize = info.frameSize(cfg.size);
Same comment as for patches 16/22 and 17/22.
The alternative is to use V4L2VideoDevice::tryFormat() in here. Jacopo,
any opinion on that ?
> +
> return status;
> }
>
> @@ -683,7 +687,6 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)
> return ret;
>
> cfg.setStream(&data->stream_);
> - cfg.stride = outputFormat.planes[0].bpl;
>
> return 0;
> }
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list