Change burst length depending on gain
The burst_length is now calculated before taking the first picture by increasing the number of frames when the sensor gain is raised.
The gain from the autogain in the sensor seems to be always between 1/1024 and 248/1024 with these changes I get 2 frames when capturing bright scenes and 5 when capturing dark ones. When you disable the auto gain in the UI you can max out the gain and get a lot more noise, but also 11 frames to stack and denoise again.