diff mbox series

[v4,17/21] media: vicodec: add documentation to V4L2_CID_MPEG_VIDEO_FWHT_PARAMS

Message ID 20190225222210.121713-8-dafna3@gmail.com (mailing list archive)
State New, archived
Headers show
Series add support to stateless decoder | expand

Commit Message

Dafna Hirschfeld Feb. 25, 2019, 10:22 p.m. UTC
add documentation to V4L2_CID_MPEG_VIDEO_FWHT_PARAMS
control and it's related 'v4l2_ctrl_fwht_params' struct

Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
---
 .../media/uapi/v4l/ext-ctrls-codec.rst        | 54 +++++++++++++++++++
 1 file changed, 54 insertions(+)

Comments

Hans Verkuil Feb. 26, 2019, 9:06 a.m. UTC | #1
On 2/25/19 11:22 PM, Dafna Hirschfeld wrote:
> add documentation to V4L2_CID_MPEG_VIDEO_FWHT_PARAMS
> control and it's related 'v4l2_ctrl_fwht_params' struct

it's -> its

> 
> Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
> ---
>  .../media/uapi/v4l/ext-ctrls-codec.rst        | 54 +++++++++++++++++++
>  1 file changed, 54 insertions(+)
> 
> diff --git a/Documentation/media/uapi/v4l/ext-ctrls-codec.rst b/Documentation/media/uapi/v4l/ext-ctrls-codec.rst
> index a30ce4fd2ea1..280f1386d5a9 100644
> --- a/Documentation/media/uapi/v4l/ext-ctrls-codec.rst
> +++ b/Documentation/media/uapi/v4l/ext-ctrls-codec.rst
> @@ -1541,6 +1541,60 @@ enum v4l2_mpeg_video_h264_hierarchical_coding_type -
>  
>  .. _v4l2-mpeg-fwht:
>  
> +``V4L2_CID_MPEG_VIDEO_FWHT_PARAMS (struct)``
> +    Specifies the fwht parameters (as extracted from the bitstream) for the
> +    associated FWHT data. This includes the necessary parameters for
> +    configuring a stateless hardware decoding pipeline for FWHT.
> +
> +    .. note::
> +
> +       This compound control is not yet part of the public kernel API and
> +       it is expected to change.
> +
> +.. c:type:: v4l2_ctrl_fwht_params
> +
> +.. cssclass:: longtable
> +
> +.. flat-table:: struct v4l2_ctrl_fwht_params
> +    :header-rows:  0
> +    :stub-columns: 0
> +    :widths:       1 1 2
> +
> +    * - __u64
> +      - ``backward_ref_ts``
> +      - Timestamp of the V4L2 capture buffer to use as backward reference, used
> +        with P-coded frames. The timestamp refers to the
> +	``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the
> +	:c:func:`v4l2_timeval_to_ns()` function to convert the struct
> +	:c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
> +    * - __u32
> +      - ``version``
> +      - The version of the codec
> +    * - __u32
> +      - ``width``
> +      - The width of the frame
> +    * - __u32
> +      - ``height``
> +      - The height of the frame
> +    * - __u32
> +      - ``flags``
> +      - The flags of the frame

You need to add a table documenting the flags.

> +    * - __u32
> +      - ``colorspace``
> +      - The colorspace of the frame, from enum :c:type:`v4l2_colorspace`.
> +    * - __u32
> +      - ``xfer_func``
> +      - The transfer function, from enum :c:type:`v4l2_xfer_func`.
> +    * - __u32
> +      - ``ycbcr_enc``
> +      - The Y'CbCr encoding, from enum :c:type:`v4l2_ycbcr_encoding`.
> +    * - __u32
> +      - ``quantization``
> +      - The quantization range, from enum :c:type:`v4l2_quantization`.
> +    * - __u32
> +      - ``comp_frame_size``
> +      - The size of the compressed frame.

Why do we need this? Isn't this set via the 'bytesused' field when we queue
the buffer containing the compressed frame?

I think this field should be dropped.

> +
>  ``V4L2_CID_FWHT_I_FRAME_QP (integer)``
>      Quantization parameter for an I frame for FWHT. Valid range: from 1
>      to 31.
> 

Regards,

	Hans
diff mbox series

Patch

diff --git a/Documentation/media/uapi/v4l/ext-ctrls-codec.rst b/Documentation/media/uapi/v4l/ext-ctrls-codec.rst
index a30ce4fd2ea1..280f1386d5a9 100644
--- a/Documentation/media/uapi/v4l/ext-ctrls-codec.rst
+++ b/Documentation/media/uapi/v4l/ext-ctrls-codec.rst
@@ -1541,6 +1541,60 @@  enum v4l2_mpeg_video_h264_hierarchical_coding_type -
 
 .. _v4l2-mpeg-fwht:
 
+``V4L2_CID_MPEG_VIDEO_FWHT_PARAMS (struct)``
+    Specifies the fwht parameters (as extracted from the bitstream) for the
+    associated FWHT data. This includes the necessary parameters for
+    configuring a stateless hardware decoding pipeline for FWHT.
+
+    .. note::
+
+       This compound control is not yet part of the public kernel API and
+       it is expected to change.
+
+.. c:type:: v4l2_ctrl_fwht_params
+
+.. cssclass:: longtable
+
+.. flat-table:: struct v4l2_ctrl_fwht_params
+    :header-rows:  0
+    :stub-columns: 0
+    :widths:       1 1 2
+
+    * - __u64
+      - ``backward_ref_ts``
+      - Timestamp of the V4L2 capture buffer to use as backward reference, used
+        with P-coded frames. The timestamp refers to the
+	``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the
+	:c:func:`v4l2_timeval_to_ns()` function to convert the struct
+	:c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
+    * - __u32
+      - ``version``
+      - The version of the codec
+    * - __u32
+      - ``width``
+      - The width of the frame
+    * - __u32
+      - ``height``
+      - The height of the frame
+    * - __u32
+      - ``flags``
+      - The flags of the frame
+    * - __u32
+      - ``colorspace``
+      - The colorspace of the frame, from enum :c:type:`v4l2_colorspace`.
+    * - __u32
+      - ``xfer_func``
+      - The transfer function, from enum :c:type:`v4l2_xfer_func`.
+    * - __u32
+      - ``ycbcr_enc``
+      - The Y'CbCr encoding, from enum :c:type:`v4l2_ycbcr_encoding`.
+    * - __u32
+      - ``quantization``
+      - The quantization range, from enum :c:type:`v4l2_quantization`.
+    * - __u32
+      - ``comp_frame_size``
+      - The size of the compressed frame.
+
 ``V4L2_CID_FWHT_I_FRAME_QP (integer)``
     Quantization parameter for an I frame for FWHT. Valid range: from 1
     to 31.