From 6d98fe5b683a38748d708c810d52d5f96e312bda Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Wed, 1 Sep 2021 21:00:24 +0300 Subject: libcamera: v4l2_videodevice: Cache PixelFormatInfo Cache the PixelFormatInfo instead of looking it up in every call to createBuffer(). This prepares for usage of the info in queueBuffer(), to avoid a looking every time a buffer is queued. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Hirokazu Honda --- include/libcamera/internal/v4l2_videodevice.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/libcamera/internal/v4l2_videodevice.h b/include/libcamera/internal/v4l2_videodevice.h index 087ad067..efe34d47 100644 --- a/include/libcamera/internal/v4l2_videodevice.h +++ b/include/libcamera/internal/v4l2_videodevice.h @@ -241,6 +241,7 @@ private: V4L2Capability caps_; V4L2DeviceFormat format_; + const PixelFormatInfo *formatInfo_; enum v4l2_buf_type bufferType_; enum v4l2_memory memoryType_; -- cgit v1.2.1