[libcamera-devel] Colour space adjustment

David Plowman david.plowman at raspberrypi.com
Mon Sep 5 14:25:19 CEST 2022


Hi everyone

We've recently checked out the latest version of libcamera and are having a
few colour space issues. Obviously I'm sorry to be raising this at a stage
where the commits have already been applied, but maybe we can think of some
kind of acceptable workaround.

The problems come with commit 4aa71c ("libcamera: color_space: Move color
space adjustment to ColorSpace class"). The specific behaviour that causes
us grief is where it overwrites the YCbCr encoding matrix to "None" when
the pixel format is an RGB one.

In the Pi's pipeline, pixels fundamentally end up as YUV and there's an
extra conversion that happens if you want RGB. So this means we do need to
know that YCbCr matrix.

More generally, I'm not sure how I feel about taking "standard colour
spaces" and  then overwriting some parts of them, so that afterwards
something that is equivalent to (for example) sYCC is then no longer ==
Sycc(). Possibly I'm being a bit paranoid here, I'm not sure.

Anyway, I'm not quite sure what to do about this. Is this behaviour now
important to other platforms? I guess we have the option to override the
validateColorSpaces method for the RPiCameraConfiguration. Or add another
flag "don't-touch-my-colour-spaces". But I'm not sensing great elegance
here...

Any suggestions?

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20220905/7c772417/attachment.htm>


More information about the libcamera-devel mailing list