Documentation/userspace-api/media/v4l/ext-ctrls-jpeg.rst
Source file repositories/reference/linux-study-clean/Documentation/userspace-api/media/v4l/ext-ctrls-jpeg.rst
File Facts
- System
- Linux kernel
- Corpus path
Documentation/userspace-api/media/v4l/ext-ctrls-jpeg.rst- Extension
.rst- Size
- 3832 bytes
- Lines
- 107
- 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.
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
.. _jpeg-controls:
**********************
JPEG Control Reference
**********************
The JPEG class includes controls for common features of JPEG encoders
and decoders. Currently it includes features for codecs implementing
progressive baseline DCT compression process with Huffman entropy
coding.
.. _jpeg-control-id:
JPEG Control IDs
================
``V4L2_CID_JPEG_CLASS (class)``
The JPEG class descriptor. Calling
:ref:`VIDIOC_QUERYCTRL` for this control will
return a description of this control class.
``V4L2_CID_JPEG_CHROMA_SUBSAMPLING (menu)``
The chroma subsampling factors describe how each component of an
input image is sampled, in respect to maximum sample rate in each
spatial dimension. See :ref:`itu-t81`, clause A.1.1. for more
details. The ``V4L2_CID_JPEG_CHROMA_SUBSAMPLING`` control determines
how Cb and Cr components are downsampled after converting an input
image from RGB to Y'CbCr color space.
.. tabularcolumns:: |p{7.5cm}|p{10.0cm}|
.. flat-table::
:header-rows: 0
:stub-columns: 0
* - ``V4L2_JPEG_CHROMA_SUBSAMPLING_444``
- No chroma subsampling, each pixel has Y, Cr and Cb values.
* - ``V4L2_JPEG_CHROMA_SUBSAMPLING_422``
- Horizontally subsample Cr, Cb components by a factor of 2.
* - ``V4L2_JPEG_CHROMA_SUBSAMPLING_420``
- Subsample Cr, Cb components horizontally and vertically by 2.
* - ``V4L2_JPEG_CHROMA_SUBSAMPLING_411``
- Horizontally subsample Cr, Cb components by a factor of 4.
* - ``V4L2_JPEG_CHROMA_SUBSAMPLING_410``
- Subsample Cr, Cb components horizontally by 4 and vertically by 2.
* - ``V4L2_JPEG_CHROMA_SUBSAMPLING_GRAY``
- Use only luminance component.
``V4L2_CID_JPEG_RESTART_INTERVAL (integer)``
The restart interval determines an interval of inserting RSTm
markers (m = 0..7). The purpose of these markers is to additionally
reinitialize the encoder process, in order to process blocks of an
image independently. For the lossy compression processes the restart
interval unit is MCU (Minimum Coded Unit) and its value is contained
in DRI (Define Restart Interval) marker. If
``V4L2_CID_JPEG_RESTART_INTERVAL`` control is set to 0, DRI and RSTm
markers will not be inserted.
.. _jpeg-quality-control:
``V4L2_CID_JPEG_COMPRESSION_QUALITY (integer)``
Determines trade-off between image quality and size.
It provides simpler method for applications to control image quality,
without a need for direct reconfiguration of luminance and chrominance
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.