[libcamera-devel] [PATCH v3 0/3] Raspberry Pi: Configuration simplifications
Jacopo Mondi
jacopo.mondi at ideasonboard.com
Mon Jul 24 11:59:22 CEST 2023
Naush, I have simplified a bit 2/3 and removed a few leftovers.
If no objections I plan to push this soon, is it fine ?
The overall diff between v2 and v3 is very minor, but 2/3 now looks more
logical.
--- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp
+++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp
@@ -207,7 +207,7 @@ CameraConfiguration::Status RPiCameraConfiguration::validate()
std::sort(outStreams.begin(), outStreams.end(),
[](auto &l, auto &r) { return l.cfg->size > r.cfg->size; });
- /* Do any platform specific fixups. */
+ /* Compute the sensor configuration. */
unsigned int bitDepth = defaultRawBitDepth;
if (!rawStreams.empty()) {
BayerFormat bayerFormat = BayerFormat::fromPixelFormat(rawStreams[0].cfg->pixelFormat);
@@ -218,6 +218,7 @@ CameraConfiguration::Status RPiCameraConfiguration::validate()
: rawStreams[0].cfg->size,
bitDepth);
+ /* Do any platform specific fixups. */
status = data_->platformValidate(rawStreams, outStreams);
if (status == Invalid)
return Invalid;
@@ -227,9 +228,6 @@ CameraConfiguration::Status RPiCameraConfiguration::validate()
StreamConfiguration &cfg = config_.at(raw.index);
V4L2DeviceFormat rawFormat;
- const PixelFormatInfo &info = PixelFormatInfo::info(cfg.pixelFormat);
- bitDepth = info.isValid() ? info.bitsPerPixel : defaultRawBitDepth;
-
BayerFormat::Packing packing = BayerFormat::fromPixelFormat(cfg.pixelFormat).packing;
rawFormat = PipelineHandlerBase::toV4L2DeviceFormat(raw.dev, sensorFormat_, packing);
Thanks
j
Jacopo Mondi (3):
libcamera: rpi: pipeline_base: Remove populateSensorFormats()
libcamera: rpi: pipeline_base: Move findBestFormat to CameraData
libcamera: rpi: pipeline_base: Cache sensor format
.../pipeline/rpi/common/pipeline_base.cpp | 182 +++++++++---------
.../pipeline/rpi/common/pipeline_base.h | 5 +
2 files changed, 91 insertions(+), 96 deletions(-)
--
2.40.1
More information about the libcamera-devel
mailing list