media: hantro: Support cropping visible area for encoders
authorChen-Yu Tsai <wenst@chromium.org>
Fri, 7 Jan 2022 09:34:50 +0000 (10:34 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 28 Jan 2022 12:23:48 +0000 (13:23 +0100)
commit0ce575d432910374f7abd4748da0a1f5483c15ec
treeded5b5867d9d5bf5804ac8deebc9de510a2b6052
parent89d78e0133e71ba324fb67ca776223fba4353418
media: hantro: Support cropping visible area for encoders

Encoders typically operate on macroblocks. Thus their output or coded
resolution is constrained to multiples of macroblocks. For frame sizes
not aligned to macroblocks, cropping is needed to limit the visible
area of the frame.

Add support for cropping on the output (source) side for encoders,
using the selection API.

Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/staging/media/hantro/TODO
drivers/staging/media/hantro/hantro_h1_jpeg_enc.c
drivers/staging/media/hantro/hantro_v4l2.c
drivers/staging/media/hantro/rockchip_vpu2_hw_jpeg_enc.c