media: rkisp1: resizer: Fix resizer disable check when starting stream
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Sat, 23 Sep 2023 19:49:06 +0000 (22:49 +0300)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Thu, 12 Oct 2023 07:46:38 +0000 (09:46 +0200)
commitd13fabf08d7cf4439d8f2f477458c7c353aebe87
treec6af4e0e532231029692fb918501b8e3f0218a85
parente09b03627643e1f40bfaacf29be0de7df1c8c05d
media: rkisp1: resizer: Fix resizer disable check when starting stream

The resizer is used to scale the image, but also to change the
subsampling of YUV formats. Both the luma and chroma dimensions need to
be taken into account to decide whether or not to enable the resizer.
The current implementation disables the resizer if the chroma vertical
size isn't changed, which would be the case when scaling up by a factor
of 2 vertically while at the same time converting from YUV 4:2:2 to
4:2:0. Fix it by checking the luma sizes too.

While at it, reflow and clarify comments in the function.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c