[libcamera-devel] [PATCH v11 0/8] Colour spaces

Laurent Pinchart laurent.pinchart at ideasonboard.com
Fri Dec 10 13:36:43 CET 2021


Hi David,

On Fri, Dec 10, 2021 at 11:21:34AM +0000, David Plowman wrote:
> Hi again
> 
> So here now is v11, which has just hoovered up those mostly minor
> items from Laurent, so thank you very much for those.
> 
> The only point of note is that I made the to/fromColorSpace methods
> protected, only to discover that I then couldn't move the logging
> messages in there because they're static member functions. Is there
> some cunning workaround for this?

I haven't been able to find a good way to handle logging in static
functions of a class that the inherits from Loggable completely
transparently. It can be worked around by using libcamera::LOG() instead
of LOG().

> Other than that, I think we're getting pretty close!
> 
> Thanks again and best regards
> 
> David
> 
> David Plowman (8):
>   libcamera: Add ColorSpace class
>   libcamera: stream: Add ColorSpace fields to StreamConfiguration
>   libcamera: video_device: Convert between ColorSpace class and V4L2
>     formats
>   libcamera: video_device: Support passing ColorSpaces to V4L2 video
>     devices
>   libcamera: v4l2_subdevice: Add colorSpace field to V4L2SubdeviceFormat
>   libcamera: v4l2_subdevice: Support passing ColorSpaces to V4L2
>     subdevices
>   libcamera: Add validateColorSpaces to CameraConfiguration class
>   libcamera: pipeline: raspberrypi: Support color spaces
> 
>  include/libcamera/camera.h                    |  10 +
>  include/libcamera/color_space.h               |  70 ++++
>  include/libcamera/internal/v4l2_device.h      |   8 +
>  include/libcamera/internal/v4l2_subdevice.h   |   3 +
>  include/libcamera/internal/v4l2_videodevice.h |   3 +
>  include/libcamera/meson.build                 |   1 +
>  include/libcamera/stream.h                    |   3 +
>  src/libcamera/camera.cpp                      |  80 +++++
>  src/libcamera/camera_sensor.cpp               |   1 +
>  src/libcamera/color_space.cpp                 | 317 ++++++++++++++++++
>  src/libcamera/meson.build                     |   1 +
>  src/libcamera/pipeline/ipu3/cio2.cpp          |   7 +-
>  .../pipeline/raspberrypi/raspberrypi.cpp      |  40 +++
>  src/libcamera/pipeline/simple/simple.cpp      |   8 +-
>  src/libcamera/stream.cpp                      |  20 ++
>  src/libcamera/v4l2_device.cpp                 | 194 +++++++++++
>  src/libcamera/v4l2_subdevice.cpp              |  25 +-
>  src/libcamera/v4l2_videodevice.cpp            |  32 ++
>  18 files changed, 816 insertions(+), 7 deletions(-)
>  create mode 100644 include/libcamera/color_space.h
>  create mode 100644 src/libcamera/color_space.cpp

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list