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.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
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
- Atlas domain: Support Tooling And Documentation / Documentation.
- Implementation status: atlas-only.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.