~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/userspace-api/media/v4l/ext-ctrls-jpeg.rst

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
  2 
  3 .. _jpeg-controls:
  4 
  5 **********************
  6 JPEG Control Reference
  7 **********************
  8 
  9 The JPEG class includes controls for common features of JPEG encoders
 10 and decoders. Currently it includes features for codecs implementing
 11 progressive baseline DCT compression process with Huffman entropy
 12 coding.
 13 
 14 
 15 .. _jpeg-control-id:
 16 
 17 JPEG Control IDs
 18 ================
 19 
 20 ``V4L2_CID_JPEG_CLASS (class)``
 21     The JPEG class descriptor. Calling
 22     :ref:`VIDIOC_QUERYCTRL` for this control will
 23     return a description of this control class.
 24 
 25 ``V4L2_CID_JPEG_CHROMA_SUBSAMPLING (menu)``
 26     The chroma subsampling factors describe how each component of an
 27     input image is sampled, in respect to maximum sample rate in each
 28     spatial dimension. See :ref:`itu-t81`, clause A.1.1. for more
 29     details. The ``V4L2_CID_JPEG_CHROMA_SUBSAMPLING`` control determines
 30     how Cb and Cr components are downsampled after converting an input
 31     image from RGB to Y'CbCr color space.
 32 
 33 .. tabularcolumns:: |p{7.5cm}|p{10.0cm}|
 34 
 35 .. flat-table::
 36     :header-rows:  0
 37     :stub-columns: 0
 38 
 39     * - ``V4L2_JPEG_CHROMA_SUBSAMPLING_444``
 40       - No chroma subsampling, each pixel has Y, Cr and Cb values.
 41     * - ``V4L2_JPEG_CHROMA_SUBSAMPLING_422``
 42       - Horizontally subsample Cr, Cb components by a factor of 2.
 43     * - ``V4L2_JPEG_CHROMA_SUBSAMPLING_420``
 44       - Subsample Cr, Cb components horizontally and vertically by 2.
 45     * - ``V4L2_JPEG_CHROMA_SUBSAMPLING_411``
 46       - Horizontally subsample Cr, Cb components by a factor of 4.
 47     * - ``V4L2_JPEG_CHROMA_SUBSAMPLING_410``
 48       - Subsample Cr, Cb components horizontally by 4 and vertically by 2.
 49     * - ``V4L2_JPEG_CHROMA_SUBSAMPLING_GRAY``
 50       - Use only luminance component.
 51 
 52 
 53 
 54 ``V4L2_CID_JPEG_RESTART_INTERVAL (integer)``
 55     The restart interval determines an interval of inserting RSTm
 56     markers (m = 0..7). The purpose of these markers is to additionally
 57     reinitialize the encoder process, in order to process blocks of an
 58     image independently. For the lossy compression processes the restart
 59     interval unit is MCU (Minimum Coded Unit) and its value is contained
 60     in DRI (Define Restart Interval) marker. If
 61     ``V4L2_CID_JPEG_RESTART_INTERVAL`` control is set to 0, DRI and RSTm
 62     markers will not be inserted.
 63 
 64 .. _jpeg-quality-control:
 65 
 66 ``V4L2_CID_JPEG_COMPRESSION_QUALITY (integer)``
 67     Determines trade-off between image quality and size.
 68     It provides simpler method for applications to control image quality,
 69     without a need for direct reconfiguration of luminance and chrominance
 70     quantization tables. In cases where a driver uses quantization tables
 71     configured directly by an application, using interfaces defined
 72     elsewhere, ``V4L2_CID_JPEG_COMPRESSION_QUALITY`` control should be set by
 73     driver to 0.
 74 
 75     The value range of this control is driver-specific. Only positive,
 76     non-zero values are meaningful. The recommended range is 1 - 100,
 77     where larger values correspond to better image quality.
 78 
 79 .. _jpeg-active-marker-control:
 80 
 81 ``V4L2_CID_JPEG_ACTIVE_MARKER (bitmask)``
 82     Specify which JPEG markers are included in compressed stream. This
 83     control is valid only for encoders.
 84 
 85 
 86 
 87 .. flat-table::
 88     :header-rows:  0
 89     :stub-columns: 0
 90 
 91     * - ``V4L2_JPEG_ACTIVE_MARKER_APP0``
 92       - Application data segment APP\ :sub:`0`.
 93     * - ``V4L2_JPEG_ACTIVE_MARKER_APP1``
 94       - Application data segment APP\ :sub:`1`.
 95     * - ``V4L2_JPEG_ACTIVE_MARKER_COM``
 96       - Comment segment.
 97     * - ``V4L2_JPEG_ACTIVE_MARKER_DQT``
 98       - Quantization tables segment.
 99     * - ``V4L2_JPEG_ACTIVE_MARKER_DHT``
100       - Huffman tables segment.
101 
102 
103 
104 For more details about JPEG specification, refer to :ref:`itu-t81`,
105 :ref:`jfif`, :ref:`w3c-jpeg-jfif`.

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php