@@ -444,10 +444,14 @@ PipelineHandlerIPU3::generateConfiguration(Camera *camera, std::span<const Strea
case StreamRole::VideoRecording: {
/*
* Default viewfinder and videorecording to 1280x720,
- * capped to the maximum sensor resolution and aligned
+ * capped to the largest output strictly smaller than
+ * the sensor resolution (see validate()) and aligned
* to the ImgU output constraints.
*/
- size = sensorResolution.boundedTo(kViewfinderSize)
+ size = sensorResolution.shrunkBy({ 1, 1 })
+ .alignedDownTo(ImgUDevice::kOutputMarginWidth,
+ ImgUDevice::kOutputMarginHeight)
+ .boundedTo(kViewfinderSize)
.alignedDownTo(ImgUDevice::kOutputAlignWidth,
ImgUDevice::kOutputAlignHeight);
pixelFormat = formats::NV12;
The default size of the Viewfinder and VideoRecording streams is 1280x720, bounded by the sensor resolution. It is also used as the maximum size of the StreamFormats ranges reported for these roles. validate() requires the ImgU outputs to be strictly smaller than the CIO2 output, aligned down to 64x32. For a sensor no wider than 1280 pixels or no taller than 736 lines, the default size is then larger than what validate() accepts. With the OV9734 (1296x734) on a Surface Laptop 2, 1280x720 is reported while validate() adjusts it to 1280x704. Applications that pick sizes from StreamFormats, such as PipeWire, get configurations adjusted behind their back, which made WirePlumber abort. Apply the same margin to the sensor resolution as validate() and as the StillCapture role already does, before bounding it to 1280x720. Larger sensors are not affected. Signed-off-by: GuyliandeJong <guyliandejong@proton.me> --- src/libcamera/pipeline/ipu3/ipu3.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)