qv4l2: allow '-d1' option

The v4l2-ctl utility supports -d1 to select /dev/video1. qv4l2 requires
you to write '-d 1'. I do that wrong all the time, so now qv4l2 supports both
versions.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
v4l2-ctl/qv4l2: fix movement counter calculation

The calculation that determines the 'scrolling' of the test pattern
could 'jump': the counters could become negative and taking the
modulus of a negative number doesn't always do what you expect.

Ensure that the step values are always positive to prevent this issue.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
qv4l2: fix broken SDR support

Commit fb1334e60cf2541c630e15c4883cd0eabf0581b5 broke the SDR support.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
qv4l2: reset bytesperline when changing pixelformat.

When changing the width or the pixelformat, make sure to zero bytesperline
when setting the format to force the driver to recalculate bytesperline.

This was done for the width, but not the pixelformat.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>