media: uapi: mpeg2: Split sequence and picture parameters
authorEzequiel Garcia <ezequiel@collabora.com>
Thu, 29 Apr 2021 14:48:12 +0000 (16:48 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sun, 23 May 2021 17:21:31 +0000 (19:21 +0200)
commitf329e21e9dadc5c8ee37c781b30fe63bf7217201
tree34db63bf2ecfa482b87a92cdecd3fb7bc084536c
parent88e78409a83a579fde7f150be7ebeefab0e1f774
media: uapi: mpeg2: Split sequence and picture parameters

Typically, bitstreams are composed of a sequence header,
followed by a number of picture header and picture coding extension
headers. Each picture can be composed of a number of slices.

Let's split the MPEG-2 uAPI to follow these semantics more closely,
allowing more usage flexibility. Having these controls split up
allows applications to set a sequence control at the beginning
of a sequence, and then set a picture control for each frame.

While here add padding fields where needed, and document
the uAPI header thoroughly.

Note that the V4L2_CTRL_TYPE_{} defines had to be moved because
it clashes with existing ones. This is not really an issue
since they will be re-defined when the controls are moved
out of staging.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Tested-by: Jonas Karlman <jonas@kwiboo.se>
Tested-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Jernej Skrabec <jernej.skrabec@siol.net>
Tested-by: Daniel Almeida <daniel.almeida@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
14 files changed:
Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst
Documentation/userspace-api/media/v4l/pixfmt-compressed.rst
Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst
Documentation/userspace-api/media/videodev2.h.rst.exceptions
drivers/media/v4l2-core/v4l2-ctrls.c
drivers/staging/media/hantro/hantro_drv.c
drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c
drivers/staging/media/hantro/rk3399_vpu_hw_mpeg2_dec.c
drivers/staging/media/sunxi/cedrus/cedrus.c
drivers/staging/media/sunxi/cedrus/cedrus.h
drivers/staging/media/sunxi/cedrus/cedrus_dec.c
drivers/staging/media/sunxi/cedrus/cedrus_mpeg2.c
include/media/mpeg2-ctrls.h
include/media/v4l2-ctrls.h