[libcamera-devel,v2,0/4] libcamera: rkisp1: Fix generateConfiguration
mbox series

Message ID 20230222151917.669526-1-jacopo.mondi@ideasonboard.com
Headers show
Series
  • libcamera: rkisp1: Fix generateConfiguration
Related show

Message

Jacopo Mondi Feb. 22, 2023, 3:19 p.m. UTC
The series started with bug 180:
https://bugs.libcamera.org/show_bug.cgi?id=180

which reports how using the self-path for generating a configuration
for a single stream results in only StreamFormats up to 1920x1920
to be produced.

I have then noticed how the current implementation of
RkISP1Path::generateConfiguration() could produce unusual sizes, such as
1920x1432 in case the sensor's resolution is larger than the maximum supported
1920x1920 output.

Finally, if StillCapture is requested, make sure it is assigned to the main
path in RkISP1::generateConfiguration() to make sure it can produce images
in full resolution.

Tested on Pinephone Pro with imx258 camera.

Updated branch jmondi/pinephonepro-af on
https://git.libcamera.org/libcamera/jmondi/libcamera.git

v1->v2:
- Enumerate StreamFormats for all the available size and not limited to the
  current output size. This allows to enumerate higher resolutions even if the
  desired role has a smaller resolution.

  In example:
  gst-launch-1.0 libcamerasrc camera-name="/base/i2c\@ff110000/camera\@1a" ! 'video/x-raw,format=NV12,width=4208,height=3120' ! glimagesink

  which used to fail now works correctly

- Enumerate all the RAW sizes the sensor can produce but only if the requested
  role is StreamRole::Raw

Jacopo Mondi (4):
  libcamera: rkisp1: Generate config using main path
  libcamera: rkisp1: Assign sizes to roles
  libcamera: rkisp1: Reserve main path for StillCapture
  libcamera: rkisp1: Fix enumeration of RAW formats

 src/libcamera/pipeline/rkisp1/rkisp1.cpp      | 36 +++++++++++++------
 src/libcamera/pipeline/rkisp1/rkisp1_path.cpp | 29 ++++++++++++---
 src/libcamera/pipeline/rkisp1/rkisp1_path.h   |  1 +
 3 files changed, 52 insertions(+), 14 deletions(-)

--
2.39.0