[libcamera-devel] [PATCH/RFC 09/11] test: Replace explicit DRM FourCCs with libcamera formats

Kieran Bingham kieran.bingham at ideasonboard.com
Thu May 28 12:12:48 CEST 2020


Hi Laurent,
On 22/05/2020 15:54, Laurent Pinchart wrote:
> Use the new pixel format constants to replace usage of macros from
> drm_fourcc.h.
> 

The only other changes I have (locally) in test/ for DRM_FORMAT_ are
from Kaaira's pixel-format test, which will need updating depending on
who gets in first.

Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>

> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> ---
>  test/v4l2_videodevice/buffer_cache.cpp | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/test/v4l2_videodevice/buffer_cache.cpp b/test/v4l2_videodevice/buffer_cache.cpp
> index d730e7550377..b22de88e214c 100644
> --- a/test/v4l2_videodevice/buffer_cache.cpp
> +++ b/test/v4l2_videodevice/buffer_cache.cpp
> @@ -9,6 +9,7 @@
>  #include <random>
>  #include <vector>
>  
> +#include <libcamera/formats.h>
>  #include <libcamera/stream.h>
>  
>  #include "buffer_source.h"
> @@ -142,7 +143,7 @@ public:
>  		const unsigned int numBuffers = 8;
>  
>  		StreamConfiguration cfg;
> -		cfg.pixelFormat = PixelFormat(DRM_FORMAT_YUYV);
> +		cfg.pixelFormat = formats::YUYV;
>  		cfg.size = Size(600, 800);
>  		cfg.bufferCount = numBuffers;
>  
> 

-- 
Regards
--
Kieran


More information about the libcamera-devel mailing list