[libcamera-devel] [PATCH RFC 5/7] android: camera_stream: add add explicit input configuration

Jacopo Mondi jacopo.mondi at ideasonboard.com
Fri Sep 22 15:45:16 CEST 2023


Hi Mattijs

On Fri, Sep 15, 2023 at 09:57:29AM +0200, Mattijs Korpershoek via libcamera-devel wrote:
> PostProcessors are configured using and input StreamConfigurations.
> Right now, we use configuration() for the input StreamConfiguration.
>
> Use an intermediate variable instead, to prepare for software conversion using libyuv.

Try to stay < 70 cols in commit messages ;)

>
> Signed-off-by: Mattijs Korpershoek <mkorpershoek at baylibre.com>

Reviewed-by: Jacopo Mondi <jacopo.mondi at ideasonboard.com>

Thanks
  j
> ---
>  src/android/camera_stream.cpp | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/android/camera_stream.cpp b/src/android/camera_stream.cpp
> index 045e60061a20..4fd05dda5ed3 100644
> --- a/src/android/camera_stream.cpp
> +++ b/src/android/camera_stream.cpp
> @@ -87,6 +87,7 @@ int CameraStream::configure()
>  	if (type_ == Type::Internal || type_ == Type::Mapped) {
>  		const PixelFormat outFormat =
>  			cameraDevice_->capabilities()->toPixelFormat(camera3Stream_->format);
> +		StreamConfiguration input = configuration();
>  		StreamConfiguration output = configuration();
>  		output.pixelFormat = outFormat;
>  		output.size.width = camera3Stream_->width;
> @@ -106,7 +107,7 @@ int CameraStream::configure()
>  			return -EINVAL;
>  		}
>
> -		int ret = postProcessor_->configure(configuration(), output);
> +		int ret = postProcessor_->configure(input, output);
>  		if (ret)
>  			return ret;
>
>
> --
> 2.41.0
>


More information about the libcamera-devel mailing list