[libcamera-devel] [PATCH 0/6] libcamera: Add support for color spaces to rkisp1 pipeline handler

Laurent Pinchart laurent.pinchart at ideasonboard.com
Tue Aug 23 19:43:08 CEST 2022


Hello,

This patch series adds support for color spaces to the rkisp1 pipeline
handler.

The series starts in 1/6 with an improvement to the
StringSplitter::iterator class that makes it usable as arguments to
constructors of various containers (to be used in patch 3/6). Patch 2/6
reorders the members of the ColorSpace class in color_space.cpp to
prepare for 3/6, which adds a ColorSpace::fromString() function. Patch
4/6 then adds a missing unit test for the ColorSpace class.

Patch 5/6 then adds color space support to the rkisp1 pipeline handler.
This is currently limited to configuring the YCbCr encoding and
quantization range. The color primaries and transfer functions need
to be configured through the ISP parameters buffers, which needs to
involve the IPA module. I would have included the necessary code here,
if it wasn't for the fact that the tone mapping configuration isn't
supported by the rkisp1 driver yet.

Finally, patch 6/6 adds support for setting color spaces to the cam
application, as I needed a test tool.

Laurent Pinchart (6):
  utils: Satisfy LegacyInputIterator with StringSplitter::iterator
  libcamera: color_space: Reorder members in the same order as the
    header
  libcamera: color_space: Add fromString() function
  test: Add a ColorSpace test
  libcamera: pipeline: rkisp1: Implement color space support
  cam: Add color space support

 include/libcamera/base/utils.h           |   6 +
 include/libcamera/color_space.h          |   2 +
 src/cam/stream_options.cpp               |   7 +
 src/libcamera/color_space.cpp            | 293 +++++++++++++++--------
 src/libcamera/pipeline/rkisp1/rkisp1.cpp |  38 ++-
 test/color-space.cpp                     | 105 ++++++++
 test/meson.build                         |   1 +
 test/utils.cpp                           |   8 +
 8 files changed, 353 insertions(+), 107 deletions(-)
 create mode 100644 test/color-space.cpp

-- 
Regards,

Laurent Pinchart



More information about the libcamera-devel mailing list