Commit 118f3e15 authored by Ezequiel Garcia's avatar Ezequiel Garcia Committed by Mauro Carvalho Chehab
Browse files

media: uapi: mpeg2: Rename "quantization" to "quantisation"



The MPEG-2 specification refers to the quantisation matrices
using the word "quantisation". Make the V4L2 interface more
ergonomic by matching the MPEG-2 spec.

Signed-off-by: default avatarEzequiel Garcia <ezequiel@collabora.com>
Tested-by: default avatarJernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: default avatarJernej Skrabec <jernej.skrabec@siol.net>
Tested-by: default avatarDaniel Almeida <daniel.almeida@collabora.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent c680ed46
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -1755,8 +1755,8 @@ enum v4l2_mpeg_video_h264_hierarchical_coding_type -

    \normalsize

``V4L2_CID_MPEG_VIDEO_MPEG2_QUANTIZATION (struct)``
    Specifies quantization matrices (as extracted from the bitstream) for the
``V4L2_CID_MPEG_VIDEO_MPEG2_QUANTISATION (struct)``
    Specifies quantisation matrices (as extracted from the bitstream) for the
    associated MPEG-2 slice data.

    .. note::
@@ -1764,7 +1764,7 @@ enum v4l2_mpeg_video_h264_hierarchical_coding_type -
       This compound control is not yet part of the public kernel API and
       it is expected to change.

.. c:type:: v4l2_ctrl_mpeg2_quantization
.. c:type:: v4l2_ctrl_mpeg2_quantisation

.. tabularcolumns:: |p{0.8cm}|p{8.0cm}|p{8.5cm}|

@@ -1774,7 +1774,7 @@ enum v4l2_mpeg_video_h264_hierarchical_coding_type -

    \small

.. flat-table:: struct v4l2_ctrl_mpeg2_quantization
.. flat-table:: struct v4l2_ctrl_mpeg2_quantisation
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2
@@ -1798,24 +1798,24 @@ enum v4l2_mpeg_video_h264_hierarchical_coding_type -
	YUV formats.
    * - __u8
      - ``intra_quantiser_matrix[64]``
      - The quantization matrix coefficients for intra-coded frames, in zigzag
      - The quantisation matrix coefficients for intra-coded frames, in zigzag
	scanning order. It is relevant for both luma and chroma components,
	although it can be superseded by the chroma-specific matrix for
	non-4:2:0 YUV formats.
    * - __u8
      - ``non_intra_quantiser_matrix[64]``
      - The quantization matrix coefficients for non-intra-coded frames, in
      - The quantisation matrix coefficients for non-intra-coded frames, in
	zigzag scanning order. It is relevant for both luma and chroma
	components, although it can be superseded by the chroma-specific matrix
	for non-4:2:0 YUV formats.
    * - __u8
      - ``chroma_intra_quantiser_matrix[64]``
      - The quantization matrix coefficients for the chominance component of
      - The quantisation matrix coefficients for the chominance component of
	intra-coded frames, in zigzag scanning order. Only relevant for
	non-4:2:0 YUV formats.
    * - __u8
      - ``chroma_non_intra_quantiser_matrix[64]``
      - The quantization matrix coefficients for the chrominance component of
      - The quantisation matrix coefficients for the chrominance component of
	non-intra-coded frames, in zigzag scanning order. Only relevant for
	non-4:2:0 YUV formats.

+2 −2
Original line number Diff line number Diff line
@@ -115,8 +115,8 @@ Compressed Formats
	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_SLICE_PARAMS`` control and
	quantization matrices can optionally be specified through the
	``V4L2_CID_MPEG_VIDEO_MPEG2_QUANTIZATION`` control.
	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
	this pixel format. The output buffer must contain the appropriate number
+3 −3
Original line number Diff line number Diff line
@@ -423,12 +423,12 @@ See also the examples in :ref:`control`.
      - n/a
      - A struct :c:type:`v4l2_ctrl_mpeg2_slice_params`, containing MPEG-2
	slice parameters for stateless video decoders.
    * - ``V4L2_CTRL_TYPE_MPEG2_QUANTIZATION``
    * - ``V4L2_CTRL_TYPE_MPEG2_QUANTISATION``
      - n/a
      - n/a
      - n/a
      - A struct :c:type:`v4l2_ctrl_mpeg2_quantization`, containing MPEG-2
	quantization matrices for stateless video decoders.
      - A struct :c:type:`v4l2_ctrl_mpeg2_quantisation`, containing MPEG-2
	quantisation matrices for stateless video decoders.
    * - ``V4L2_CTRL_TYPE_AREA``
      - n/a
      - n/a
+1 −1
Original line number Diff line number Diff line
@@ -135,7 +135,7 @@ replace symbol V4L2_CTRL_TYPE_U16 :c:type:`v4l2_ctrl_type`
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_SLICE_PARAMS :c:type:`v4l2_ctrl_type`
replace symbol V4L2_CTRL_TYPE_MPEG2_QUANTIZATION :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`
replace symbol V4L2_CTRL_TYPE_H264_SCALING_MATRIX :c:type:`v4l2_ctrl_type`
+6 −6
Original line number Diff line number Diff line
@@ -966,7 +966,7 @@ const char *v4l2_ctrl_get_name(u32 id)
	case V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX:		return "Frame LTR Index";
	case V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES:		return "Use LTR Frames";
	case V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS:		return "MPEG-2 Slice Parameters";
	case V4L2_CID_MPEG_VIDEO_MPEG2_QUANTIZATION:		return "MPEG-2 Quantization Matrices";
	case V4L2_CID_MPEG_VIDEO_MPEG2_QUANTISATION:		return "MPEG-2 Quantisation Matrices";
	case V4L2_CID_FWHT_I_FRAME_QP:				return "FWHT I-Frame QP Value";
	case V4L2_CID_FWHT_P_FRAME_QP:				return "FWHT P-Frame QP Value";

@@ -1490,8 +1490,8 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
	case V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS:
		*type = V4L2_CTRL_TYPE_MPEG2_SLICE_PARAMS;
		break;
	case V4L2_CID_MPEG_VIDEO_MPEG2_QUANTIZATION:
		*type = V4L2_CTRL_TYPE_MPEG2_QUANTIZATION;
	case V4L2_CID_MPEG_VIDEO_MPEG2_QUANTISATION:
		*type = V4L2_CTRL_TYPE_MPEG2_QUANTISATION;
		break;
	case V4L2_CID_STATELESS_FWHT_PARAMS:
		*type = V4L2_CTRL_TYPE_FWHT_PARAMS;
@@ -1942,7 +1942,7 @@ static int std_validate_compound(const struct v4l2_ctrl *ctrl, u32 idx,

		break;

	case V4L2_CTRL_TYPE_MPEG2_QUANTIZATION:
	case V4L2_CTRL_TYPE_MPEG2_QUANTISATION:
		break;

	case V4L2_CTRL_TYPE_FWHT_PARAMS:
@@ -2911,8 +2911,8 @@ static struct v4l2_ctrl *v4l2_ctrl_new(struct v4l2_ctrl_handler *hdl,
	case V4L2_CTRL_TYPE_MPEG2_SLICE_PARAMS:
		elem_size = sizeof(struct v4l2_ctrl_mpeg2_slice_params);
		break;
	case V4L2_CTRL_TYPE_MPEG2_QUANTIZATION:
		elem_size = sizeof(struct v4l2_ctrl_mpeg2_quantization);
	case V4L2_CTRL_TYPE_MPEG2_QUANTISATION:
		elem_size = sizeof(struct v4l2_ctrl_mpeg2_quantisation);
		break;
	case V4L2_CTRL_TYPE_FWHT_PARAMS:
		elem_size = sizeof(struct v4l2_ctrl_fwht_params);
Loading