Skip to content
Commit 5f25abec authored by Michael Rodin's avatar Michael Rodin Committed by Mauro Carvalho Chehab
Browse files

media: vsp1: Fix offset calculation for plane cropping



The vertical subsampling factor is currently not considered in the
offset calculation for plane cropping done in rpf_configure_partition.
This causes a distortion (shift of the color plane) when formats with
the vsub factor larger than 1 are used (e.g. NV12, see
vsp1_video_formats in vsp1_pipe.c). This commit considers vsub factor
for all planes except plane 0 (luminance).

Drop generalization of the offset calculation to reduce the binary size.

Fixes: e5ad37b6 ("[media] v4l: vsp1: Add cropping support")
Signed-off-by: default avatarMichael Rodin <mrodin@de.adit-jv.com>
Signed-off-by: default avatarLUU HOAI <hoai.luu.ub@renesas.com>
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: default avatarKieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent bf7d5ee1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment