0001 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
0002
0003 .. _image-source-controls:
0004
0005 ******************************
0006 Image Source Control Reference
0007 ******************************
0008
0009 The Image Source control class is intended for low-level control of
0010 image source devices such as image sensors. The devices feature an
0011 analogue to digital converter and a bus transmitter to transmit the
0012 image data out of the device.
0013
0014
0015 .. _image-source-control-id:
0016
0017 Image Source Control IDs
0018 ========================
0019
0020 ``V4L2_CID_IMAGE_SOURCE_CLASS (class)``
0021 The IMAGE_SOURCE class descriptor.
0022
0023 ``V4L2_CID_VBLANK (integer)``
0024 Vertical blanking. The idle period after every frame during which no
0025 image data is produced. The unit of vertical blanking is a line.
0026 Every line has length of the image width plus horizontal blanking at
0027 the pixel rate defined by ``V4L2_CID_PIXEL_RATE`` control in the
0028 same sub-device.
0029
0030 ``V4L2_CID_HBLANK (integer)``
0031 Horizontal blanking. The idle period after every line of image data
0032 during which no image data is produced. The unit of horizontal
0033 blanking is pixels.
0034
0035 ``V4L2_CID_ANALOGUE_GAIN (integer)``
0036 Analogue gain is gain affecting all colour components in the pixel
0037 matrix. The gain operation is performed in the analogue domain
0038 before A/D conversion.
0039
0040 ``V4L2_CID_TEST_PATTERN_RED (integer)``
0041 Test pattern red colour component.
0042
0043 ``V4L2_CID_TEST_PATTERN_GREENR (integer)``
0044 Test pattern green (next to red) colour component.
0045
0046 ``V4L2_CID_TEST_PATTERN_BLUE (integer)``
0047 Test pattern blue colour component.
0048
0049 ``V4L2_CID_TEST_PATTERN_GREENB (integer)``
0050 Test pattern green (next to blue) colour component.
0051
0052 ``V4L2_CID_UNIT_CELL_SIZE (struct)``
0053 This control returns the unit cell size in nanometers. The struct
0054 :c:type:`v4l2_area` provides the width and the height in separate
0055 fields to take into consideration asymmetric pixels.
0056 This control does not take into consideration any possible hardware
0057 binning.
0058 The unit cell consists of the whole area of the pixel, sensitive and
0059 non-sensitive.
0060 This control is required for automatic calibration of sensors/cameras.
0061
0062 .. c:type:: v4l2_area
0063
0064 .. flat-table:: struct v4l2_area
0065 :header-rows: 0
0066 :stub-columns: 0
0067 :widths: 1 1 2
0068
0069 * - __u32
0070 - ``width``
0071 - Width of the area.
0072 * - __u32
0073 - ``height``
0074 - Height of the area.
0075
0076 ``V4L2_CID_NOTIFY_GAINS (integer array)``
0077 The sensor is notified what gains will be applied to the different
0078 colour channels by subsequent processing (such as by an ISP). The
0079 sensor is merely informed of these values in case it performs
0080 processing that requires them, but it does not apply them itself to
0081 the output pixels.
0082
0083 Currently it is defined only for Bayer sensors, and is an array
0084 control taking 4 gain values, being the gains for each of the
0085 Bayer channels. The gains are always in the order B, Gb, Gr and R,
0086 irrespective of the exact Bayer order of the sensor itself.
0087
0088 The use of an array allows this control to be extended to sensors
0089 with, for example, non-Bayer CFAs (colour filter arrays).
0090
0091 The units for the gain values are linear, with the default value
0092 representing a gain of exactly 1.0. For example, if this default value
0093 is reported as being (say) 128, then a value of 192 would represent
0094 a gain of exactly 1.5.