[libcamera-devel,v2,0/5] libcamera: camera_sensor: Centralize flips handling
mbox series

Message ID 20230114194712.23272-1-jacopo.mondi@ideasonboard.com
Headers show
Series
  • libcamera: camera_sensor: Centralize flips handling
Related show

Message

Jacopo Mondi Jan. 14, 2023, 7:47 p.m. UTC
As the previous series
[PATCH 0/9] libcamera: camera_sensor: Centralize flips handling

as still some pending issue on the semantic of the rotation handling, I decided
to centralize the sensor's flips handling, so whatever decision is made, it will
have to be implemented in one place only (at least initially).

As a bonus point (which is where I actually started from) add support for
Transform to the RkISP1 pipeline handler.

An extrac from the previous cover letter

The CameraSensor class is extended with:

1) Validate Transform:
   The same logic as implemented in the IPU3/RPi PH is moved in the CameraSensor
   class.

2) Apply flips at CameraSensor::setFormat() time
   Before applying a format, flips are operated according to the requested
   Transform. Applying flips before setting a format is crucial to obtain an
   up to data Bayer pattern order. In order to simplify setting a Transform
   on the camera sensor, a new "transform" member is added to
   V4L2SubdeviceFormat.

No functional changes intended for the RPi and the IPU3 pipeline handlers.

Jacopo Mondi (5):
  libcamera: camera_sensor: Verify flips support
  libcamera: camera_sensor: Validate Transform
  libcamera: camera_sensor: Apply flips at setFormat()
  libcamera: rkisp1: Add support for Transform
  documentation: sensor_drivers: Document H/V flip

 Documentation/sensor_driver_requirements.rst  |  12 ++
 include/libcamera/internal/camera_sensor.h    |   5 +
 include/libcamera/internal/v4l2_subdevice.h   |   2 +
 src/libcamera/camera_sensor.cpp               | 106 +++++++++++++++++-
 src/libcamera/pipeline/ipu3/cio2.cpp          |   6 +-
 src/libcamera/pipeline/ipu3/cio2.h            |   4 +-
 src/libcamera/pipeline/ipu3/ipu3.cpp          |  73 ++----------
 .../pipeline/raspberrypi/raspberrypi.cpp      |  86 +++-----------
 src/libcamera/pipeline/rkisp1/rkisp1.cpp      |  16 ++-
 src/libcamera/v4l2_subdevice.cpp              |   7 ++
 10 files changed, 172 insertions(+), 145 deletions(-)

--
2.39.0