summaryrefslogtreecommitdiff
path: root/src/libcamera/pipeline/ipu3
diff options
context:
space:
mode:
authorKaaira Gupta <kgupta@es.iitr.ac.in>2020-04-03 21:36:23 +0530
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-04-04 00:39:44 +0300
commit72278369b30af757c8ab756cc6c9cadcf15684d5 (patch)
tree3d6ae5dd03789af6aa83aeb9e2aa02275a5b6566 /src/libcamera/pipeline/ipu3
parent8f8992e4ee181f1efba3b8ab5eb680e425bf1b12 (diff)
libcamera: pixelformats: Replace set of modifiers with single value
DRM fourccs look like they have a per-plane modifier, but in fact each of them should be same. Hence instead of passing a set of modifiers for each fourcc in PixelFormat class, we can pass just a single modifier. So, replace the set with a single value. Signed-off-by: Kaaira Gupta <kgupta@es.iitr.ac.in> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> [Fix compilation error in src/libcamera/pipeline/ipu3/ipu3.cpp] Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/libcamera/pipeline/ipu3')
-rw-r--r--src/libcamera/pipeline/ipu3/ipu3.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index 1e114ca7..36ac571a 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -34,10 +34,10 @@ LOG_DEFINE_CATEGORY(IPU3)
class IPU3CameraData;
static const std::map<uint32_t, PixelFormat> sensorMbusToPixel = {
- { MEDIA_BUS_FMT_SBGGR10_1X10, PixelFormat(DRM_FORMAT_SBGGR10, { IPU3_FORMAT_MOD_PACKED }) },
- { MEDIA_BUS_FMT_SGBRG10_1X10, PixelFormat(DRM_FORMAT_SGBRG10, { IPU3_FORMAT_MOD_PACKED }) },
- { MEDIA_BUS_FMT_SGRBG10_1X10, PixelFormat(DRM_FORMAT_SGRBG10, { IPU3_FORMAT_MOD_PACKED }) },
- { MEDIA_BUS_FMT_SRGGB10_1X10, PixelFormat(DRM_FORMAT_SRGGB10, { IPU3_FORMAT_MOD_PACKED }) },
+ { MEDIA_BUS_FMT_SBGGR10_1X10, PixelFormat(DRM_FORMAT_SBGGR10, IPU3_FORMAT_MOD_PACKED) },
+ { MEDIA_BUS_FMT_SGBRG10_1X10, PixelFormat(DRM_FORMAT_SGBRG10, IPU3_FORMAT_MOD_PACKED) },
+ { MEDIA_BUS_FMT_SGRBG10_1X10, PixelFormat(DRM_FORMAT_SGRBG10, IPU3_FORMAT_MOD_PACKED) },
+ { MEDIA_BUS_FMT_SRGGB10_1X10, PixelFormat(DRM_FORMAT_SRGGB10, IPU3_FORMAT_MOD_PACKED) },
};
class ImgUDevice
@@ -365,7 +365,7 @@ CameraConfiguration::Status IPU3CameraConfiguration::validate()
const Size size = cfg.size;
const IPU3Stream *stream;
- if (cfg.pixelFormat.modifiers().count(IPU3_FORMAT_MOD_PACKED))
+ if (cfg.pixelFormat.modifier() == IPU3_FORMAT_MOD_PACKED)
stream = &data_->rawStream_;
else if (cfg.size == sensorFormat_.size)
stream = &data_->outStream_;