[libcamera-devel] [PATCH v6 18/12] fixup! libcamera: Use CameraConfiguration::orientation

Jacopo Mondi jacopo.mondi at ideasonboard.com
Mon Oct 23 10:54:52 CEST 2023


Hi

On Mon, Oct 23, 2023 at 01:41:56AM +0300, Laurent Pinchart via libcamera-devel wrote:
> - Use division operator in rpi pipeline handler
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> ---
>  src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp
> index da52d7fafcee..ee222d060e4a 100644
> --- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp
> +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp
> @@ -1234,8 +1234,8 @@ int CameraData::configureIPA(const CameraConfiguration *config, ipa::RPi::Config
>  	}
>
>  	/* Always send the user transform to the IPA. */
> -	params.transform =
> -		static_cast<unsigned int>(transformFromOrientation(config->orientation));
> +	Transform transform = config->orientation / Orientation::Rotate0;
> +	params.transform = static_cast<unsigned int>(transform);

I wonder if this was correct in first place.

config->orientation could be adjusted to report the sensor's mounting
orientation if the user requested orientation cannot be obtained, in
which case the "user transform" will be set to Identity (see
CameraSensor::computeTransform()).

Wouldn't it be better to send to the IPA 'combinedTransform_' ?

>
>  	/* Ready the IPA - it must know about the sensor resolution. */
>  	ret = ipa_->configure(sensorInfo_, params, result);
> --
> Regards,
>
> Laurent Pinchart
>


More information about the libcamera-devel mailing list