summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2022-12-08 09:22:00 +0100
committerJacopo Mondi <jacopo@jmondi.org>2022-12-09 08:57:41 +0100
commitbc76e199dd93f6c3d94a56184d831bac6261153a (patch)
treeeb88250dd4c234403b2edd0b8ffa9cd00905e9e7
parent35f925b9dff8887f833ea880b336caecf855eba8 (diff)
[HACK] camera_sensor: Do not prefer modes with the same ratio
The CameraSensor::getFormat() function prefers modes with the same FOV ratio of the requested image size. This has for some sensors, like imx258, the undesirable effect of mapping low-res modes (320x240) to the largest sensor mode (4032x3024) compromising the frame rate. This impacts the Android HAL layer, which requires low-res modes to be 30FPS capable. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
-rw-r--r--src/libcamera/camera_sensor.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp
index d6e055c7..017381a4 100644
--- a/src/libcamera/camera_sensor.cpp
+++ b/src/libcamera/camera_sensor.cpp
@@ -755,9 +755,6 @@ V4L2SubdeviceFormat CameraSensor::getFormat(const std::vector<unsigned int> &mbu
unsigned int area = sz.width * sz.height;
unsigned int areaDiff = area - desiredArea;
- if (ratioDiff > bestRatio)
- continue;
-
if (ratioDiff < bestRatio || areaDiff < bestArea) {
bestRatio = ratioDiff;
bestArea = areaDiff;