summaryrefslogtreecommitdiff
path: root/src/libcamera/v4l2_pixelformat.cpp
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2022-07-15 14:23:59 +0200
committerJacopo Mondi <jacopo@jmondi.org>2022-08-03 15:07:20 +0200
commitac54f2ac6dede6a4d8ed761660c3f74b42a497a3 (patch)
tree3267859ee9ca3b46e572a1cc89eab8091dd29816 /src/libcamera/v4l2_pixelformat.cpp
parentd1abe2bdc88393da7bee3f80451636754d572567 (diff)
libcamera: formats: Map V4L2_PIX_FMT_JPEG to formats::MJPEG
The V4L2_PIX_FMT_JPEG and V4L2_PIX_FMT_MJPEG formats are under-specified and are used interchangeably by kernel drivers. Map both of them to formats::MJPEG and use the newly re-introduced V4L2VideoDevice::toV4L2PixelFormat() to map to the one actually used by the video device. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Paul Elder <paul.elder@ideasonboard.com>
Diffstat (limited to 'src/libcamera/v4l2_pixelformat.cpp')
-rw-r--r--src/libcamera/v4l2_pixelformat.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libcamera/v4l2_pixelformat.cpp b/src/libcamera/v4l2_pixelformat.cpp
index 90c8fa8d..ca05de6c 100644
--- a/src/libcamera/v4l2_pixelformat.cpp
+++ b/src/libcamera/v4l2_pixelformat.cpp
@@ -183,6 +183,8 @@ const std::map<V4L2PixelFormat, V4L2PixelFormat::Info> vpf2pf{
/* Compressed formats. */
{ V4L2PixelFormat(V4L2_PIX_FMT_MJPEG),
{ formats::MJPEG, "Motion-JPEG" } },
+ { V4L2PixelFormat(V4L2_PIX_FMT_JPEG),
+ { formats::MJPEG, "JPEG JFIF" } },
};
} /* namespace */