[libcamera-devel] [PATCH v3 16/22] libcamera: ipu3: Fill stride and frameSize at config validation
Paul Elder
paul.elder at ideasonboard.com
Sat Jul 4 15:31:34 CEST 2020
Fill the stride and frameSize fields of the StreamConfiguration at
configuration validation time instead of at camera configuration time.
Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
---
New in v3
---
src/libcamera/pipeline/ipu3/ipu3.cpp | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index 00559ce..f116c93 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -278,6 +278,10 @@ CameraConfiguration::Status IPU3CameraConfiguration::validate()
<< cfg.toString();
status = Adjusted;
}
+
+ const PixelFormatInfo &info = PixelFormatInfo::info(cfg.pixelFormat);
+ cfg.stride = info.stride(cfg.size.width, 0);
+ cfg.frameSize = info.frameSize(cfg.size);
}
return status;
@@ -495,21 +499,13 @@ int PipelineHandlerIPU3::configure(Camera *camera, CameraConfiguration *c)
if (ret)
return ret;
- cfg.stride = outputFormat.planes[0].bpl;
outActive = true;
} else if (stream == vfStream) {
ret = imgu->configureViewfinder(cfg, &outputFormat);
if (ret)
return ret;
- cfg.stride = outputFormat.planes[0].bpl;
vfActive = true;
- } else {
- /*
- * The RAW stream is configured as part of the CIO2 and
- * no configuration is needed for the ImgU.
- */
- cfg.stride = cio2Format.planes[0].bpl;
}
}
--
2.27.0
More information about the libcamera-devel
mailing list