libcamera: Use CameraConfiguration::orientation

Replace the usage of CameraConfiguration::transform with the newly
introduced CameraConfiguration::orientation.

Rework and rename the CameraSensor::validateTransform(transform) to
CameraSensor::computeTransform(orientation), that given the desired
image orientation computes the Transform that pipeline handlers should
apply to the sensor to obtain it.

Port all pipeline handlers to use the newly introduced function.

This commit breaks existing applications as it removes the public
CameraConfiguration::transform in favour of
CameraConfiguration::orientation.

Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Jacopo Mondi
2023-10-23 16:06:09 +03:00
committed by Laurent Pinchart
parent a28f871836
commit c65e40b848
11 changed files with 67 additions and 87 deletions
+1 -15
View File
@@ -291,8 +291,7 @@ bool SensorConfiguration::isValid() const
* \brief Create an empty camera configuration
*/
CameraConfiguration::CameraConfiguration()
: transform(Transform::Identity), orientation(Orientation::Rotate0),
config_({})
: orientation(Orientation::Rotate0), config_({})
{
}
@@ -540,19 +539,6 @@ CameraConfiguration::Status CameraConfiguration::validateColorSpaces(ColorSpaceF
* from the same image source.
*/
/**
* \var CameraConfiguration::transform
* \brief User-specified transform to be applied to the image
*
* The transform is a user-specified 2D plane transform that will be applied
* to the camera images by the processing pipeline before being handed to
* the application.
*
* The usual 2D plane transforms are allowed here (horizontal/vertical
* flips, multiple of 90-degree rotations etc.), but the validate() function
* may adjust this field at its discretion if the selection is not supported.
*/
/**
* \var CameraConfiguration::orientation
* \brief The desired orientation of the images produced by the camera