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

Message ID 20210330165743.4924-1-david.plowman@raspberrypi.com
Headers show
Series
  • Fix CameraSensor::sensorInfo by updating VBLANK ControlInfo
Related show

Message

David Plowman March 30, 2021, 4:57 p.m. UTC
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(+)