[libcamera-devel] [PATCH 0/1] Fix CameraSensor::sensorInfo by updating VBLANK ControlInfo

David Plowman david.plowman at raspberrypi.com
Tue Mar 30 18:57:42 CEST 2021


Hi everyone

You may recall a while back I raised a problem where
CameraSensor::sensorInfo() produces incorrect min and max frame
lengths, resulting in cameras running at incorrect framerates (and
sometimes causing AGC wobbles). The reason was that the sensor's min
and max vblanking can vary when the format is changed, and our
ControlInfo mechanism has no means of knowing that it needs to be
updated.

We discussed a number of alternatives - I think it's fair to say that
there weren't any obvious neat fixes at this time. Among the
alternatives was that of updating the ControlInfos directly, and this
has to be run at some point after a new format is set, and before
sensorInfo() uses the control ranges.

Anyway, here is an implenentation of that scheme for folks to have a
look at and consider. What do we think, does it fix the problem
sufficiently, or are there better alternatives? Opinions welcome!

Thanks

David

David Plowman (1):
  libcamera: camera_sensor: Fix frame lengths calculated by sensorInfo()

 include/libcamera/internal/v4l2_device.h |  2 ++
 src/libcamera/camera_sensor.cpp          |  7 +++++++
 src/libcamera/v4l2_device.cpp            | 26 ++++++++++++++++++++++++
 3 files changed, 35 insertions(+)

-- 
2.20.1



More information about the libcamera-devel mailing list