ext-ctrls-image-source.rst 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
  2. .. c:namespace:: V4L
  3. .. _image-source-controls:
  4. ******************************
  5. Image Source Control Reference
  6. ******************************
  7. The Image Source control class is intended for low-level control of
  8. image source devices such as image sensors. The devices feature an
  9. analogue to digital converter and a bus transmitter to transmit the
  10. image data out of the device.
  11. .. _image-source-control-id:
  12. Image Source Control IDs
  13. ========================
  14. ``V4L2_CID_IMAGE_SOURCE_CLASS (class)``
  15. The IMAGE_SOURCE class descriptor.
  16. ``V4L2_CID_VBLANK (integer)``
  17. Vertical blanking. The idle period after every frame during which no
  18. image data is produced. The unit of vertical blanking is a line.
  19. Every line has length of the image width plus horizontal blanking at
  20. the pixel rate defined by ``V4L2_CID_PIXEL_RATE`` control in the
  21. same sub-device.
  22. ``V4L2_CID_HBLANK (integer)``
  23. Horizontal blanking. The idle period after every line of image data
  24. during which no image data is produced. The unit of horizontal
  25. blanking is pixels.
  26. ``V4L2_CID_ANALOGUE_GAIN (integer)``
  27. Analogue gain is gain affecting all colour components in the pixel
  28. matrix. The gain operation is performed in the analogue domain
  29. before A/D conversion.
  30. ``V4L2_CID_TEST_PATTERN_RED (integer)``
  31. Test pattern red colour component.
  32. ``V4L2_CID_TEST_PATTERN_GREENR (integer)``
  33. Test pattern green (next to red) colour component.
  34. ``V4L2_CID_TEST_PATTERN_BLUE (integer)``
  35. Test pattern blue colour component.
  36. ``V4L2_CID_TEST_PATTERN_GREENB (integer)``
  37. Test pattern green (next to blue) colour component.
  38. ``V4L2_CID_UNIT_CELL_SIZE (struct)``
  39. This control returns the unit cell size in nanometers. The struct
  40. :c:type:`v4l2_area` provides the width and the height in separate
  41. fields to take into consideration asymmetric pixels.
  42. This control does not take into consideration any possible hardware
  43. binning.
  44. The unit cell consists of the whole area of the pixel, sensitive and
  45. non-sensitive.
  46. This control is required for automatic calibration of sensors/cameras.
  47. .. c:type:: v4l2_area
  48. .. flat-table:: struct v4l2_area
  49. :header-rows: 0
  50. :stub-columns: 0
  51. :widths: 1 1 2
  52. * - __u32
  53. - ``width``
  54. - Width of the area.
  55. * - __u32
  56. - ``height``
  57. - Height of the area.
  58. ``V4L2_CID_NOTIFY_GAINS (integer array)``
  59. The sensor is notified what gains will be applied to the different
  60. colour channels by subsequent processing (such as by an ISP). The
  61. sensor is merely informed of these values in case it performs
  62. processing that requires them, but it does not apply them itself to
  63. the output pixels.
  64. Currently it is defined only for Bayer sensors, and is an array
  65. control taking 4 gain values, being the gains for each of the
  66. Bayer channels. The gains are always in the order B, Gb, Gr and R,
  67. irrespective of the exact Bayer order of the sensor itself.
  68. The use of an array allows this control to be extended to sensors
  69. with, for example, non-Bayer CFAs (colour filter arrays).
  70. The units for the gain values are linear, with the default value
  71. representing a gain of exactly 1.0. For example, if this default value
  72. is reported as being (say) 128, then a value of 192 would represent
  73. a gain of exactly 1.5.