mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 15:27:29 +00:00
media: v4l2-common: Add an helper to apply frmsize constraints
The rockchip VPU driver is open-coding this logic which seems pretty generic. Let's provide an helper to apply the min/max and alignment constraints on width/height. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
parent
ce57a82f8a
commit
32cddf9c94
2 changed files with 29 additions and 0 deletions
|
@ -420,6 +420,8 @@ struct v4l2_format_info {
|
|||
|
||||
const struct v4l2_format_info *v4l2_format_info(u32 format);
|
||||
|
||||
void v4l2_apply_frmsize_constraints(u32 *width, u32 *height,
|
||||
const struct v4l2_frmsize_stepwise *frmsize);
|
||||
int v4l2_fill_pixfmt(struct v4l2_pix_format *pixfmt, u32 pixelformat,
|
||||
u32 width, u32 height);
|
||||
int v4l2_fill_pixfmt_mp(struct v4l2_pix_format_mplane *pixfmt, u32 pixelformat,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue