[libcamera-devel] Colour space adjustment

Naushir Patuck naush at raspberrypi.com
Mon Sep 5 14:37:00 CEST 2022


Hi,

On a related note, we are also getting this warning on the Raspberry Pi
platform with commit e297673e7686:

WARN V4L2 v4l2_subdevice.cpp:512 'imx477 10-001a': Unknown subdev format
0x7002, defaulting to RGB encoding

This is because the embedded buffer stream format (i.e. a non-image data
format) does not map to a libcamera PixelFormat* at present.  In the past,
we've had similar issues and decided not to use WARN level to flag this.
Can we do the same here please?

Not directly related to the logging message, but I suppose the same
question should also be asked here - should we be overwriting the
colorEncoding in these circumstances?

Regards,
Naush




On Mon, 5 Sept 2022 at 13:25, David Plowman via libcamera-devel <
libcamera-devel at lists.libcamera.org> wrote:

> 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/7562824a/attachment.htm>


More information about the libcamera-devel mailing list