To implement a rudimentary video settings control loop, I’ve employed the general techniques described by the
userAutoExposure sample code. The exposure time range and frame duration range APIs seem to work as expected, but I’m having problems with the gain range API.
The control loop I’ve implemented first adjusts the exposure time and the frame duration to darken or lighten an image as appropriate. However, when those settings reach their endpoints (in particular, when trying to brighten a dark image), the control loop resorts to changing the gain range.
What I’ve observed is that when changing the gain range (either by adding a constant delta, or using the technique employed by the
userAutoExposure sample code), there is a very long lag time between setting the gain range, and when the video output actually changes (my control loop uses the mode of the video frame histogram as its feedback signal).
Is there some sort of filter in the ISP code that causes the gain range to be applied very slowly over time? That is, it seems that changing the gain range on a frame-by-frame basis does not yield the expected results.