[libcamera-devel] [PATCH] ipa: raspberrypi: Reset embedded data parser on configure

Laurent Pinchart laurent.pinchart at ideasonboard.com
Tue Aug 2 12:47:49 CEST 2022


Hi David,

Thank you for the patch.

On Tue, Aug 02, 2022 at 09:45:26AM +0100, David Plowman via libcamera-devel wrote:
> When we switch camera mode following a pipeline reconfiguration, the
> embedded data parser should be "reset" to discard any data that it may
> have cached and that might now be invalid.
> 
> Signed-off-by: David Plowman <david.plowman at raspberrypi.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>

> ---
>  src/ipa/raspberrypi/cam_helper.cpp | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/ipa/raspberrypi/cam_helper.cpp b/src/ipa/raspberrypi/cam_helper.cpp
> index 37b66198..cac8f39e 100644
> --- a/src/ipa/raspberrypi/cam_helper.cpp
> +++ b/src/ipa/raspberrypi/cam_helper.cpp
> @@ -106,6 +106,7 @@ void CamHelper::setCameraMode(const CameraMode &mode)
>  {
>  	mode_ = mode;
>  	if (parser_) {
> +		parser_->reset();
>  		parser_->setBitsPerPixel(mode.bitdepth);
>  		parser_->setLineLengthBytes(0); /* We use SetBufferSize. */
>  	}

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list