[libcamera-devel] [PATCH v2 12/14] libcamera: ipu3: Use NV12 as default image format
Jacopo Mondi
jacopo at jmondi.org
Tue Mar 12 13:12:40 CET 2019
Now that images come from the ImgU output, hardcode NV12 as default
output format.
Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
---
src/libcamera/pipeline/ipu3/ipu3.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index 4d08383291ea..f998f900b219 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -190,6 +190,7 @@ PipelineHandlerIPU3::streamConfiguration(Camera *camera,
IPU3CameraData *data = cameraData(camera);
V4L2Subdevice *sensor = data->cio2.sensor;
StreamConfiguration *config = &configs[&data->stream_];
+ bool found = false;
/*
* Make sure the sensor produces a raw format compatible with the
@@ -208,17 +209,18 @@ PipelineHandlerIPU3::streamConfiguration(Camera *camera,
config->width = range.maxWidth;
config->height = range.maxHeight;
- config->pixelFormat = cio2Code;
+ found = true;
}
}
/* If not suitable format has been found, return an empty config. */
- if (!config->pixelFormat) {
+ if (!found) {
LOG(IPU3, Error) << "Sensor image format not supported";
return configs;
}
+ config->pixelFormat = V4L2_PIX_FMT_NV12;
config->bufferCount = IPU3_BUFFER_COUNT;
LOG(IPU3, Debug)
--
2.20.1
More information about the libcamera-devel
mailing list