libcamera: camera_sensor: Cache rotationTransform_

The rotationTransform_ depends on a V4L2 control whose value does not
change for the whole lifetime of the camera.

Instead of re-calculating it everytime the camera is configured, cache
it at properties initialization time.

Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@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-19 16:01:22 +02:00 committed by Laurent Pinchart
parent b5f5a89bc3
commit 042649f044
2 changed files with 33 additions and 24 deletions

View file

@ -112,6 +112,7 @@ private:
Rectangle activeArea_;
const BayerFormat *bayerFormat_;
bool supportFlips_;
Transform rotationTransform_;
ControlList properties_;