[libcamera-devel] [PATCH v3 0/4] libcamera: rkisp1: Fix generateConfiguration

Jacopo Mondi jacopo.mondi at ideasonboard.com
Tue Mar 7 12:48:00 CET 2023


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

v2->v3:
- Add review tags
- Improve 3/4 as suggested by Paul

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      | 30 ++++++++++++-------
 src/libcamera/pipeline/rkisp1/rkisp1_path.cpp | 29 +++++++++++++++---
 src/libcamera/pipeline/rkisp1/rkisp1_path.h   |  1 +
 3 files changed, 46 insertions(+), 14 deletions(-)

--
2.39.0



More information about the libcamera-devel mailing list