[media] media: rcar-vin: fix bug in scaling
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Fri, 2 Sep 2016 16:44:59 +0000 (13:44 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Mon, 19 Sep 2016 19:32:43 +0000 (16:32 -0300)
commitd6482537f666ab024925e5a126cfaeede34a3801
tree1d443ee3e3e56d6c4395967b4711f7a81741fdae
parent52a1b4e93518c7625fa9756637e54400637ad7ec
[media] media: rcar-vin: fix bug in scaling

It was not possible to scale beyond the image size of the video source
limitation. The output frame would be bigger but the captured image was
limited to the size of the video source.

The error was that the crop boundary was set after the requested frame
size and not the video source size. This patch breaks out the resetting
of the crop, compose and format to separate functions so the error wont
creep back.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/rcar-vin/rcar-v4l2.c