]> git.baikalelectronics.ru Git - kernel.git/commit
media: hantro: Use post processor scaling capacities
authorBenjamin Gaignard <benjamin.gaignard@collabora.com>
Mon, 4 Apr 2022 16:06:40 +0000 (18:06 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 13 May 2022 09:02:22 +0000 (11:02 +0200)
commitfc27735b96f9ea488fc5e905434ee102b7f9cbf8
treece6c53b3bb1d609b6ca4d912b681b6cfd3ea72cf
parenta13e58b54da8ea1e711288d1d3ad2c9883fdb707
media: hantro: Use post processor scaling capacities

Hantro G2 post processor is able to down scale decoded frames
by a factor of 2, 4 or 8.
Add enum_framesizes() ops to postproc_ops structure to enumerate the
possible output sizes for a given input resolution.
For G2 post-processor use fsize->index (from 0 to 3) as power of 2
divisor. As described in v4l2 documentation return -EINVAL when scaling
down isn't possible.

fluster scores:
77/147 for HEVC
143/303 for VP9

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/staging/media/hantro/hantro.h
drivers/staging/media/hantro/hantro_g2_regs.h
drivers/staging/media/hantro/hantro_hw.h
drivers/staging/media/hantro/hantro_postproc.c
drivers/staging/media/hantro/hantro_v4l2.c