[libcamera-devel] [PATCH] libcamera: raspberry: Fix format validation

Naushir Patuck naush at raspberrypi.com
Fri Jul 15 16:07:16 CEST 2022


Hi Jacopo,

Thank you for your patch.

On Fri, 15 Jul 2022 at 14:56, Jacopo Mondi <jacopo at jmondi.org> wrote:

> If the pixel format gets adjusted to the default NV12 format during
> validation, it gets currently ignored and the user-supplied format is
> used nonetheless.
>
> Fix it by using the adjusted pixel format.
>
> Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
>

Looks right to me.

Reviewed-by: Naushir Patuck <naush at raspberrypi.com>


> ---
>  src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> index fdc24cd530c2..8c8813038483 100644
> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> @@ -523,7 +523,7 @@ CameraConfiguration::Status
> RPiCameraConfiguration::validate()
>                 }
>
>                 V4L2DeviceFormat format;
> -               format.fourcc =
> V4L2PixelFormat::fromPixelFormat(cfg.pixelFormat);
> +               format.fourcc =
> V4L2PixelFormat::fromPixelFormat(cfgPixFmt);
>                 format.size = cfg.size;
>                 format.colorSpace = cfg.colorSpace;
>
> --
> 2.36.1
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20220715/a8c3fb03/attachment.htm>


More information about the libcamera-devel mailing list