diff --git a/src/libcamera/pipeline/ipu3/cio2.cpp b/src/libcamera/pipeline/ipu3/cio2.cpp
index be063613..9980b8bd 100644
--- a/src/libcamera/pipeline/ipu3/cio2.cpp
+++ b/src/libcamera/pipeline/ipu3/cio2.cpp
@@ -239,8 +239,8 @@ StreamConfiguration CIO2Device::generateConfiguration(Size size) const
  *
  * - The desired \a size shall fit in the sensor output size to avoid the need
  *   to up-scale.
- * - The sensor output size shall match the desired aspect ratio to avoid the
- *   need to crop the field of view.
+ * - The aspect ratio of sensor output size shall be as close as possible to
+ *   the sensor's native resolution field of view.
  * - The sensor output size shall be as small as possible to lower the required
  *   bandwidth.
  * - The desired \a size shall be supported by one of the media bus code listed
@@ -264,7 +264,9 @@ V4L2SubdeviceFormat CIO2Device::getSensorFormat(const std::vector<unsigned int>
 {
 	unsigned int desiredArea = size.width * size.height;
 	unsigned int bestArea = UINT_MAX;
-	float desiredRatio = static_cast<float>(size.width) / size.height;
+	const Size &resolution = sensor_->resolution();
+	float desiredRatio = static_cast<float>(resolution.width) /
+			     resolution.height;
 	float bestRatio = FLT_MAX;
 	Size bestSize;
 	uint32_t bestCode = 0;
