brintos

brintos / linux-shallow public Read only

0
0
Text · 3.7 KiB · 522095c Raw
106 lines · plain
1.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later2 3.. _jpeg-controls:4 5**********************6JPEG Control Reference7**********************8 9The JPEG class includes controls for common features of JPEG encoders10and decoders. Currently it includes features for codecs implementing11progressive baseline DCT compression process with Huffman entropy12coding.13 14 15.. _jpeg-control-id:16 17JPEG Control IDs18================19 20``V4L2_CID_JPEG_CLASS (class)``21    The JPEG class descriptor. Calling22    :ref:`VIDIOC_QUERYCTRL` for this control will23    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 an27    input image is sampled, in respect to maximum sample rate in each28    spatial dimension. See :ref:`itu-t81`, clause A.1.1. for more29    details. The ``V4L2_CID_JPEG_CHROMA_SUBSAMPLING`` control determines30    how Cb and Cr components are downsampled after converting an input31    image from RGB to Y'CbCr color space.32 33.. tabularcolumns:: |p{7.5cm}|p{10.0cm}|34 35.. flat-table::36    :header-rows:  037    :stub-columns: 038 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 RSTm56    markers (m = 0..7). The purpose of these markers is to additionally57    reinitialize the encoder process, in order to process blocks of an58    image independently. For the lossy compression processes the restart59    interval unit is MCU (Minimum Coded Unit) and its value is contained60    in DRI (Define Restart Interval) marker. If61    ``V4L2_CID_JPEG_RESTART_INTERVAL`` control is set to 0, DRI and RSTm62    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 chrominance70    quantization tables. In cases where a driver uses quantization tables71    configured directly by an application, using interfaces defined72    elsewhere, ``V4L2_CID_JPEG_COMPRESSION_QUALITY`` control should be set by73    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. This83    control is valid only for encoders.84 85 86 87.. flat-table::88    :header-rows:  089    :stub-columns: 090 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 104For more details about JPEG specification, refer to :ref:`itu-t81`,105:ref:`jfif`, :ref:`w3c-jpeg-jfif`.106