v4l2-isp.rst 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
  2. .. _v4l2-isp:
  3. ************************
  4. Generic V4L2 ISP formats
  5. ************************
  6. Generic ISP formats are metadata formats that define a mechanism to pass ISP
  7. parameters and statistics between userspace and drivers in V4L2 buffers. They
  8. are designed to allow extending them in a backward-compatible way.
  9. ISP parameters
  10. ==============
  11. The generic ISP configuration parameters format is realized by a defining a
  12. single C structure that contains a header, followed by a binary buffer where
  13. userspace programs a variable number of ISP configuration data block, one for
  14. each supported ISP feature.
  15. The :c:type:`v4l2_isp_params_buffer` structure defines the buffer header which
  16. is followed by a binary buffer of ISP configuration data. Userspace shall
  17. correctly populate the buffer header with the generic parameters format version
  18. and with the size (in bytes) of the binary data buffer where it will store the
  19. ISP blocks configuration.
  20. Each *ISP configuration block* is preceded by an header implemented by the
  21. :c:type:`v4l2_isp_params_block_header` structure, followed by the configuration
  22. parameters for that specific block, defined by the ISP driver specific data
  23. types.
  24. Userspace applications are responsible for correctly populating each block's
  25. header fields (type, flags and size) and the block-specific parameters.
  26. ISP block enabling, disabling and configuration
  27. -----------------------------------------------
  28. When userspace wants to configure and enable an ISP block it shall fully
  29. populate the block configuration and set the V4L2_ISP_PARAMS_FL_BLOCK_ENABLE
  30. bit in the block header's `flags` field.
  31. When userspace simply wants to disable an ISP block the
  32. V4L2_ISP_PARAMS_FL_BLOCK_DISABLE bit should be set in block header's `flags`
  33. field. Drivers accept a configuration parameters block with no additional
  34. data after the header in this case.
  35. If the configuration of an already active ISP block has to be updated,
  36. userspace shall fully populate the ISP block parameters and omit setting the
  37. V4L2_ISP_PARAMS_FL_BLOCK_ENABLE and V4L2_ISP_PARAMS_FL_BLOCK_DISABLE bits in the
  38. header's `flags` field.
  39. Setting both the V4L2_ISP_PARAMS_FL_BLOCK_ENABLE and
  40. V4L2_ISP_PARAMS_FL_BLOCK_DISABLE bits in the flags field is not allowed and
  41. returns an error.
  42. Extension to the parameters format can be implemented by adding new blocks
  43. definition without invalidating the existing ones.
  44. ISP statistics
  45. ==============
  46. Support for generic statistics format is not yet implemented in Video4Linux2.
  47. V4L2 ISP uAPI data types
  48. ========================
  49. .. kernel-doc:: include/uapi/linux/media/v4l2-isp.h