v4l2: fix probing and enumeration of stepwise frame sizes
authorTim-Philipp Müller <tim@centricular.com>
Mon, 30 Jun 2014 09:29:54 +0000 (10:29 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Tue, 1 Jul 2014 19:23:58 +0000 (20:23 +0100)
commita016f19de8ffb758c87db46be2c636d4ac4bfa44
tree086ecc5a6c9bed74a6acbb6617bb92d7f14a3fc0
parentf9eb4dd2063c0fd843a2ee08ba23f9535bc636ed
v4l2: fix probing and enumeration of stepwise frame sizes

The code enumerating STEPWISE framesizes would start from
(min_w, min_h) and then add (step_w, step_h) to get the
next framesize. However, it should really allow any width
from min_w to max_w with step_w and same for heights.
Secondly, we would add and probe each individual stepped
frame size to the caps as separate structure, which would
lead to hundreds if not thousands of structs ending up in
the probed caps. Use integer ranges with steps instead.

This was particularly noticable with the Raspberry Pi Cam.

https://bugzilla.gnome.org/show_bug.cgi?id=724521
https://bugzilla.gnome.org/show_bug.cgi?id=732458
https://bugzilla.gnome.org/show_bug.cgi?id=726521
sys/v4l2/gstv4l2object.c