Commit 536f0f55 authored by Koji Matsuoka's avatar Koji Matsuoka Committed by Mauro Carvalho Chehab

media: rcar-vin: Fix image alignment for setting pre clipping

In Video Pixel/Line Pre-Clip Register, the setting value can be
set in 1 line unit, but it can only be specified as a multiple of
4 by v4l_bound_align_image function().
So correct that it can be specified in 1 line unit with this patch.
Signed-off-by: default avatarKoji Matsuoka <koji.matsuoka.xm@renesas.com>
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: default avatarNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: default avatarHans Verkuil <hansverk@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 0fd6e121
......@@ -405,8 +405,8 @@ static int rvin_s_selection(struct file *file, void *fh,
max_rect.height = vin->source.height;
v4l2_rect_map_inside(&r, &max_rect);
v4l_bound_align_image(&r.width, 2, vin->source.width, 1,
&r.height, 4, vin->source.height, 2, 0);
v4l_bound_align_image(&r.width, 6, vin->source.width, 0,
&r.height, 2, vin->source.height, 0, 0);
r.top = clamp_t(s32, r.top, 0, vin->source.height - r.height);
r.left = clamp_t(s32, r.left, 0, vin->source.width - r.width);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment