qv4l2: crop: take pixel aspect ratio into account.
authorHans Verkuil <hans.verkuil@cisco.com>
Fri, 4 Oct 2013 08:43:27 +0000 (10:43 +0200)
committerHans Verkuil <hans.verkuil@cisco.com>
Fri, 4 Oct 2013 08:43:27 +0000 (10:43 +0200)
commit5a526ea4a25a0f9e009b8f8636a84ffc31f01ed1
treeb47a292538513b8d162474e82a73aa214ea71ff6
parent3ee63e4f90fb459addcae994ab2fbb3e4830a7ac
qv4l2: crop: take pixel aspect ratio into account.

When cropping to a desired letterboxed/pillarboxed picture ratio you
need to take the pixel aspect ratio into account as well.

Also use 4.0/3.0 instead of 1.33 due to rounding errors (ditto for 1.57
and 1.78).

Finally the pillarbox ratio was calculated the wrong way around.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
utils/qv4l2/capture-win.cpp
utils/qv4l2/general-tab.cpp