media: uapi: mpeg2: Remove V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS

The Hantro and Cedrus drivers work in frame-mode,
meaning they expect all the slices in a picture (either frame
or field structure) to be passed in each OUTPUT buffer.

These two are the only V4L2 MPEG-2 stateless decoders currently
supported. Given the VA-API drivers also work per-frame,
coalescing all the MPEG-2 slices in a buffer before the decoding
operation, it makes sense to not expect slice-mode drivers and
therefore remove V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS.

This is done to avoid carrying an unused interface. If needed,
this control can be added without breaking backwards compatibility.
Note that this would mean introducing a enumerator control to
specify the decoding mode (see V4L2_CID_STATELESS_H264_DECODE_MODE).

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Co-developed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
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>
This commit is contained in:
Ezequiel Garcia
2021-04-29 16:48:15 +02:00
committed by Mauro Carvalho Chehab
parent 701a6a410c
commit 45f97ba1ce
14 changed files with 7 additions and 111 deletions

View File

@@ -1608,41 +1608,6 @@ enum v4l2_mpeg_video_h264_hierarchical_coding_type -
.. _v4l2-mpeg-mpeg2:
``V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS (struct)``
Specifies the slice parameters (as extracted from the bitstream) for the
associated MPEG-2 slice data. This includes the necessary parameters for
configuring a stateless hardware decoding pipeline for MPEG-2.
The bitstream parameters are defined according to :ref:`mpeg2part2`.
.. note::
This compound control is not yet part of the public kernel API and
it is expected to change.
.. c:type:: v4l2_ctrl_mpeg2_slice_params
.. tabularcolumns:: |p{5.6cm}|p{4.6cm}|p{7.1cm}|
.. cssclass:: longtable
.. flat-table:: struct v4l2_ctrl_mpeg2_slice_params
:header-rows: 0
:stub-columns: 0
:widths: 1 1 2
* - __u32
- ``bit_size``
- Size (in bits) of the current slice data.
* - __u32
- ``data_bit_offset``
- Offset (in bits) to the video data in the current slice data.
* - __u32
- ``quantiser_scale_code``
- Code used to determine the quantization scale to use for the IDCT.
* - __u8
- ``reserved``
- Applications and drivers must set this to zero.
``V4L2_CID_MPEG_VIDEO_MPEG2_SEQUENCE (struct)``
Specifies the sequence parameters (as extracted from the bitstream) for the
associated MPEG-2 slice data. This includes fields matching the syntax

View File

@@ -114,9 +114,9 @@ Compressed Formats
This format is adapted for stateless video decoders that implement a
MPEG-2 pipeline (using the :ref:`mem2mem` and :ref:`media-request-api`).
Metadata associated with the frame to decode is required to be passed
through the ``V4L2_CID_MPEG_VIDEO_MPEG2_SEQUENCE``,
``V4L2_CID_MPEG_VIDEO_MPEG2_PICTURE``, and ``V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS``
controls. Quantisation matrices can optionally be specified through the
through the ``V4L2_CID_MPEG_VIDEO_MPEG2_SEQUENCE`` and
``V4L2_CID_MPEG_VIDEO_MPEG2_PICTURE`` controls.
Quantisation matrices can optionally be specified through the
``V4L2_CID_MPEG_VIDEO_MPEG2_QUANTISATION`` control.
See the :ref:`associated Codec Control IDs <v4l2-mpeg-mpeg2>`.
Exactly one output and one capture buffer must be provided for use with

View File

@@ -417,12 +417,6 @@ See also the examples in :ref:`control`.
- any
- An unsigned 32-bit valued control ranging from minimum to maximum
inclusive. The step value indicates the increment between values.
* - ``V4L2_CTRL_TYPE_MPEG2_SLICE_PARAMS``
- n/a
- n/a
- n/a
- A struct :c:type:`v4l2_ctrl_mpeg2_slice_params`, containing MPEG-2
slice parameters for stateless video decoders.
* - ``V4L2_CTRL_TYPE_MPEG2_QUANTISATION``
- n/a
- n/a

View File

@@ -136,7 +136,6 @@ replace symbol V4L2_CTRL_TYPE_U32 :c:type:`v4l2_ctrl_type`
replace symbol V4L2_CTRL_TYPE_U8 :c:type:`v4l2_ctrl_type`
replace symbol V4L2_CTRL_TYPE_MPEG2_SEQUENCE :c:type:`v4l2_ctrl_type`
replace symbol V4L2_CTRL_TYPE_MPEG2_PICTURE :c:type:`v4l2_ctrl_type`
replace symbol V4L2_CTRL_TYPE_MPEG2_SLICE_PARAMS :c:type:`v4l2_ctrl_type`
replace symbol V4L2_CTRL_TYPE_MPEG2_QUANTISATION :c:type:`v4l2_ctrl_type`
replace symbol V4L2_CTRL_TYPE_H264_SPS :c:type:`v4l2_ctrl_type`
replace symbol V4L2_CTRL_TYPE_H264_PPS :c:type:`v4l2_ctrl_type`