summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-09-01 21:00:24 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-09-07 19:18:13 +0300
commit6d98fe5b683a38748d708c810d52d5f96e312bda (patch)
tree9cc09d873e9caafd22944125ed60f18621ae5605 /include
parent81a38f43738440490e9fcc1ce96b22783f541942 (diff)
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 <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/internal/v4l2_videodevice.h1
1 files changed, 1 insertions, 0 deletions
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_;