Documentation/userspace-api/media/v4l/subdev-formats.rst

Source file repositories/reference/linux-study-clean/Documentation/userspace-api/media/v4l/subdev-formats.rst

File Facts

System
Linux kernel
Corpus path
Documentation/userspace-api/media/v4l/subdev-formats.rst
Extension
.rst
Size
140080 bytes
Lines
9137
Domain
Support Tooling And Documentation
Bucket
Documentation
Inferred role
Support Tooling And Documentation: documentation
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L

.. _v4l2-mbus-format:

Media Bus Formats
=================

.. c:type:: v4l2_mbus_framefmt

.. tabularcolumns:: |p{2.0cm}|p{4.0cm}|p{11.3cm}|

.. cssclass:: longtable

.. flat-table:: struct v4l2_mbus_framefmt
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - __u32
      - ``width``
      - Image width in pixels.
    * - __u32
      - ``height``
      - Image height in pixels. If ``field`` is one of ``V4L2_FIELD_TOP``,
	``V4L2_FIELD_BOTTOM`` or ``V4L2_FIELD_ALTERNATE`` then height
	refers to the number of lines in the field, otherwise it refers to
	the number of lines in the frame (which is twice the field height
	for interlaced formats).
    * - __u32
      - ``code``
      - Format code, from enum
	:ref:`v4l2_mbus_pixelcode <v4l2-mbus-pixelcode>`.
    * - __u32
      - ``field``
      - Field order, from enum :c:type:`v4l2_field`. See
	:ref:`field-order` for details. Zero for metadata mbus codes.
    * - __u32
      - ``colorspace``
      - Image colorspace, from enum :c:type:`v4l2_colorspace`.
        Must be set by the driver for subdevices. If the application sets the
	flag ``V4L2_MBUS_FRAMEFMT_SET_CSC`` then the application can set this
	field on the source pad to request a specific colorspace for the media
	bus data. If the driver cannot handle the requested conversion, it will
	return another supported colorspace. The driver indicates that colorspace
	conversion is supported by setting the flag
	V4L2_SUBDEV_MBUS_CODE_CSC_COLORSPACE in the corresponding struct
	:c:type:`v4l2_subdev_mbus_code_enum` during enumeration.
	See :ref:`v4l2-subdev-mbus-code-flags`. Zero for metadata mbus codes.
    * - union {
      - (anonymous)
    * - __u16
      - ``ycbcr_enc``
      - Y'CbCr encoding, from enum :c:type:`v4l2_ycbcr_encoding`.
        This information supplements the ``colorspace`` and must be set by
	the driver for subdevices, see :ref:`colorspaces`. If the application
	sets the flag ``V4L2_MBUS_FRAMEFMT_SET_CSC`` then the application can set
	this field on a source pad to request a specific Y'CbCr encoding
	for the media bus data. If the driver cannot handle the requested
	conversion, it will return another supported encoding.
	This field is ignored for HSV media bus formats. The driver indicates
	that ycbcr_enc conversion is supported by setting the flag
	V4L2_SUBDEV_MBUS_CODE_CSC_YCBCR_ENC in the corresponding struct
	:c:type:`v4l2_subdev_mbus_code_enum` during enumeration.
	See :ref:`v4l2-subdev-mbus-code-flags`. Zero for metadata mbus codes.
    * - __u16
      - ``hsv_enc``
      - HSV encoding, from enum :c:type:`v4l2_hsv_encoding`.
        This information supplements the ``colorspace`` and must be set by
	the driver for subdevices, see :ref:`colorspaces`. If the application

Annotation

Implementation Notes