media: Introduce helpers to fill pixel format structs
authorEzequiel Garcia <ezequiel@collabora.com>
Thu, 28 Mar 2019 18:07:04 +0000 (14:07 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 22 Apr 2019 14:33:06 +0000 (10:33 -0400)
commitf44b969aa3cddabe86e9aff411889643298e8d59
tree681cea20e3e60f1b1f89e94455d955ebfac86ace
parent9fb10beb8a57f6fa9fdb592652f213df6b98600a
media: Introduce helpers to fill pixel format structs

Add two new API helpers, v4l2_fill_pixfmt and v4l2_fill_pixfmt_mp,
to be used by drivers to calculate plane sizes and bytes per lines.

Note that driver-specific padding and alignment are not
taken into account, and must be done by drivers using this API.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/v4l2-core/v4l2-common.c
include/media/v4l2-common.h