From: Sakari Ailus Date: Wed, 26 Apr 2023 09:50:39 +0000 (+0300) Subject: media: Documentation: Rename meta format files X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=e6a4702394383888961fc6cae7b99f387db03de4;p=linux.git media: Documentation: Rename meta format files Rename meta format files, using "metafmt" prefix instead of "pixfmt-meta". These are metadata formats, not pixel formats. Signed-off-by: Sakari Ailus Cc: Bingbu Cao Cc: Dafna Hirschfeld Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil --- diff --git a/Documentation/userspace-api/media/v4l/meta-formats.rst b/Documentation/userspace-api/media/v4l/meta-formats.rst index fff25357fe860..0bb61fc5bc008 100644 --- a/Documentation/userspace-api/media/v4l/meta-formats.rst +++ b/Documentation/userspace-api/media/v4l/meta-formats.rst @@ -12,10 +12,10 @@ These formats are used for the :ref:`metadata` interface only. .. toctree:: :maxdepth: 1 - pixfmt-meta-d4xx - pixfmt-meta-intel-ipu3 - pixfmt-meta-rkisp1 - pixfmt-meta-uvc - pixfmt-meta-vsp1-hgo - pixfmt-meta-vsp1-hgt - pixfmt-meta-vivid + metafmt-d4xx + metafmt-intel-ipu3 + metafmt-rkisp1 + metafmt-uvc + metafmt-vsp1-hgo + metafmt-vsp1-hgt + metafmt-vivid diff --git a/Documentation/userspace-api/media/v4l/metafmt-d4xx.rst b/Documentation/userspace-api/media/v4l/metafmt-d4xx.rst new file mode 100644 index 0000000000000..4e437ba97a0ec --- /dev/null +++ b/Documentation/userspace-api/media/v4l/metafmt-d4xx.rst @@ -0,0 +1,213 @@ +.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later + +.. _v4l2-meta-fmt-d4xx: + +******************************* +V4L2_META_FMT_D4XX ('D4XX') +******************************* + +Intel D4xx UVC Cameras Metadata + + +Description +=========== + +Intel D4xx (D435 and other) cameras include per-frame metadata in their UVC +payload headers, following the Microsoft(R) UVC extension proposal [1_]. That +means, that the private D4XX metadata, following the standard UVC header, is +organised in blocks. D4XX cameras implement several standard block types, +proposed by Microsoft, and several proprietary ones. Supported standard metadata +types are MetadataId_CaptureStats (ID 3), MetadataId_CameraExtrinsics (ID 4), +and MetadataId_CameraIntrinsics (ID 5). For their description see [1_]. This +document describes proprietary metadata types, used by D4xx cameras. + +V4L2_META_FMT_D4XX buffers follow the metadata buffer layout of +V4L2_META_FMT_UVC with the only difference, that it also includes proprietary +payload header data. D4xx cameras use bulk transfers and only send one payload +per frame, therefore their headers cannot be larger than 255 bytes. + +Below are proprietary Microsoft style metadata types, used by D4xx cameras, +where all fields are in little endian order: + +.. tabularcolumns:: |p{5.0cm}|p{12.5cm}| + + +.. flat-table:: D4xx metadata + :widths: 1 2 + :header-rows: 1 + :stub-columns: 0 + + * - **Field** + - **Description** + * - :cspan:`1` *Depth Control* + * - __u32 ID + - 0x80000000 + * - __u32 Size + - Size in bytes (currently 56) + * - __u32 Version + - Version of this structure. The documentation herein corresponds to + version xxx. The version number will be incremented when new fields are + added. + * - __u32 Flags + - A bitmask of flags: see [2_] below + * - __u32 Gain + - Gain value in internal units, same as the V4L2_CID_GAIN control, used to + capture the frame + * - __u32 Exposure + - Exposure time (in microseconds) used to capture the frame + * - __u32 Laser power + - Power of the laser LED 0-360, used for depth measurement + * - __u32 AE mode + - 0: manual; 1: automatic exposure + * - __u32 Exposure priority + - Exposure priority value: 0 - constant frame rate + * - __u32 AE ROI left + - Left border of the AE Region of Interest (all ROI values are in pixels + and lie between 0 and maximum width or height respectively) + * - __u32 AE ROI right + - Right border of the AE Region of Interest + * - __u32 AE ROI top + - Top border of the AE Region of Interest + * - __u32 AE ROI bottom + - Bottom border of the AE Region of Interest + * - __u32 Preset + - Preset selector value, default: 0, unless changed by the user + * - __u32 Laser mode + - 0: off, 1: on + * - :cspan:`1` *Capture Timing* + * - __u32 ID + - 0x80000001 + * - __u32 Size + - Size in bytes (currently 40) + * - __u32 Version + - Version of this structure. The documentation herein corresponds to + version xxx. The version number will be incremented when new fields are + added. + * - __u32 Flags + - A bitmask of flags: see [3_] below + * - __u32 Frame counter + - Monotonically increasing counter + * - __u32 Optical time + - Time in microseconds from the beginning of a frame till its middle + * - __u32 Readout time + - Time, used to read out a frame in microseconds + * - __u32 Exposure time + - Frame exposure time in microseconds + * - __u32 Frame interval + - In microseconds = 1000000 / framerate + * - __u32 Pipe latency + - Time in microseconds from start of frame to data in USB buffer + * - :cspan:`1` *Configuration* + * - __u32 ID + - 0x80000002 + * - __u32 Size + - Size in bytes (currently 40) + * - __u32 Version + - Version of this structure. The documentation herein corresponds to + version xxx. The version number will be incremented when new fields are + added. + * - __u32 Flags + - A bitmask of flags: see [4_] below + * - __u8 Hardware type + - Camera hardware version [5_] + * - __u8 SKU ID + - Camera hardware configuration [6_] + * - __u32 Cookie + - Internal synchronisation + * - __u16 Format + - Image format code [7_] + * - __u16 Width + - Width in pixels + * - __u16 Height + - Height in pixels + * - __u16 Framerate + - Requested frame rate per second + * - __u16 Trigger + - Byte 0: bit 0: depth and RGB are synchronised, bit 1: external trigger + +.. _1: + +[1] https://docs.microsoft.com/en-us/windows-hardware/drivers/stream/uvc-extensions-1-5 + +.. _2: + +[2] Depth Control flags specify which fields are valid: :: + + 0x00000001 Gain + 0x00000002 Exposure + 0x00000004 Laser power + 0x00000008 AE mode + 0x00000010 Exposure priority + 0x00000020 AE ROI + 0x00000040 Preset + +.. _3: + +[3] Capture Timing flags specify which fields are valid: :: + + 0x00000001 Frame counter + 0x00000002 Optical time + 0x00000004 Readout time + 0x00000008 Exposure time + 0x00000010 Frame interval + 0x00000020 Pipe latency + +.. _4: + +[4] Configuration flags specify which fields are valid: :: + + 0x00000001 Hardware type + 0x00000002 SKU ID + 0x00000004 Cookie + 0x00000008 Format + 0x00000010 Width + 0x00000020 Height + 0x00000040 Framerate + 0x00000080 Trigger + 0x00000100 Cal count + +.. _5: + +[5] Camera model: :: + + 0 DS5 + 1 IVCAM2 + +.. _6: + +[6] 8-bit camera hardware configuration bitfield: :: + + [1:0] depthCamera + 00: no depth + 01: standard depth + 10: wide depth + 11: reserved + [2] depthIsActive - has a laser projector + [3] RGB presence + [4] Inertial Measurement Unit (IMU) presence + [5] projectorType + 0: HPTG + 1: Princeton + [6] 0: a projector, 1: an LED + [7] reserved + +.. _7: + +[7] Image format codes per video streaming interface: + +Depth: :: + + 1 Z16 + 2 Z + +Left sensor: :: + + 1 Y8 + 2 UYVY + 3 R8L8 + 4 Calibration + 5 W10 + +Fish Eye sensor: :: + + 1 RAW8 diff --git a/Documentation/userspace-api/media/v4l/metafmt-intel-ipu3.rst b/Documentation/userspace-api/media/v4l/metafmt-intel-ipu3.rst new file mode 100644 index 0000000000000..84d81dd7a7b5e --- /dev/null +++ b/Documentation/userspace-api/media/v4l/metafmt-intel-ipu3.rst @@ -0,0 +1,81 @@ +.. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later + +.. _v4l2-meta-fmt-params: +.. _v4l2-meta-fmt-stat-3a: + +****************************************************************** +V4L2_META_FMT_IPU3_PARAMS ('ip3p'), V4L2_META_FMT_IPU3_3A ('ip3s') +****************************************************************** + +.. ipu3_uapi_stats_3a + +3A statistics +============= + +The IPU3 ImgU 3A statistics accelerators collect different statistics over +an input Bayer frame. Those statistics are obtained from the "ipu3-imgu [01] 3a +stat" metadata capture video nodes, using the :c:type:`v4l2_meta_format` +interface. They are formatted as described by the :c:type:`ipu3_uapi_stats_3a` +structure. + +The statistics collected are AWB (Auto-white balance) RGBS (Red, Green, Blue and +Saturation measure) cells, AWB filter response, AF (Auto-focus) filter response, +and AE (Auto-exposure) histogram. + +The struct :c:type:`ipu3_uapi_4a_config` saves all configurable parameters. + +.. code-block:: c + + struct ipu3_uapi_stats_3a { + struct ipu3_uapi_awb_raw_buffer awb_raw_buffer; + struct ipu3_uapi_ae_raw_buffer_aligned ae_raw_buffer[IPU3_UAPI_MAX_STRIPES]; + struct ipu3_uapi_af_raw_buffer af_raw_buffer; + struct ipu3_uapi_awb_fr_raw_buffer awb_fr_raw_buffer; + struct ipu3_uapi_4a_config stats_4a_config; + __u32 ae_join_buffers; + __u8 padding[28]; + struct ipu3_uapi_stats_3a_bubble_info_per_stripe stats_3a_bubble_per_stripe; + struct ipu3_uapi_ff_status stats_3a_status; + }; + +.. ipu3_uapi_params + +Pipeline parameters +=================== + +The pipeline parameters are passed to the "ipu3-imgu [01] parameters" metadata +output video nodes, using the :c:type:`v4l2_meta_format` interface. They are +formatted as described by the :c:type:`ipu3_uapi_params` structure. + +Both 3A statistics and pipeline parameters described here are closely tied to +the underlying camera sub-system (CSS) APIs. They are usually consumed and +produced by dedicated user space libraries that comprise the important tuning +tools, thus freeing the developers from being bothered with the low level +hardware and algorithm details. + +.. code-block:: c + + struct ipu3_uapi_params { + /* Flags which of the settings below are to be applied */ + struct ipu3_uapi_flags use; + + /* Accelerator cluster parameters */ + struct ipu3_uapi_acc_param acc_param; + + /* ISP vector address space parameters */ + struct ipu3_uapi_isp_lin_vmem_params lin_vmem_params; + struct ipu3_uapi_isp_tnr3_vmem_params tnr3_vmem_params; + struct ipu3_uapi_isp_xnr3_vmem_params xnr3_vmem_params; + + /* ISP data memory (DMEM) parameters */ + struct ipu3_uapi_isp_tnr3_params tnr3_dmem_params; + struct ipu3_uapi_isp_xnr3_params xnr3_dmem_params; + + /* Optical black level compensation */ + struct ipu3_uapi_obgrid_param obgrid_param; + }; + +Intel IPU3 ImgU uAPI data types +=============================== + +.. kernel-doc:: drivers/staging/media/ipu3/include/uapi/intel-ipu3.h diff --git a/Documentation/userspace-api/media/v4l/metafmt-rkisp1.rst b/Documentation/userspace-api/media/v4l/metafmt-rkisp1.rst new file mode 100644 index 0000000000000..fa04f00bcd2ed --- /dev/null +++ b/Documentation/userspace-api/media/v4l/metafmt-rkisp1.rst @@ -0,0 +1,50 @@ +.. SPDX-License-Identifier: GPL-2.0 + +.. _v4l2-meta-fmt-rk-isp1-params: + +.. _v4l2-meta-fmt-rk-isp1-stat-3a: + +***************************************************************************** +V4L2_META_FMT_RK_ISP1_PARAMS ('rk1p'), V4L2_META_FMT_RK_ISP1_STAT_3A ('rk1s') +***************************************************************************** + +Configuration parameters +======================== + +The configuration parameters are passed to the +:ref:`rkisp1_params ` metadata output video node, using +the :c:type:`v4l2_meta_format` interface. The buffer contains +a single instance of the C structure :c:type:`rkisp1_params_cfg` defined in +``rkisp1-config.h``. So the structure can be obtained from the buffer by: + +.. code-block:: c + + struct rkisp1_params_cfg *params = (struct rkisp1_params_cfg*) buffer; + +.. rkisp1_stat_buffer + +3A and histogram statistics +=========================== + +The ISP1 device collects different statistics over an input Bayer frame. +Those statistics are obtained from the :ref:`rkisp1_stats ` +metadata capture video node, +using the :c:type:`v4l2_meta_format` interface. The buffer contains a single +instance of the C structure :c:type:`rkisp1_stat_buffer` defined in +``rkisp1-config.h``. So the structure can be obtained from the buffer by: + +.. code-block:: c + + struct rkisp1_stat_buffer *stats = (struct rkisp1_stat_buffer*) buffer; + +The statistics collected are Exposure, AWB (Auto-white balance), Histogram and +AF (Auto-focus). See :c:type:`rkisp1_stat_buffer` for details of the statistics. + +The 3A statistics and configuration parameters described here are usually +consumed and produced by dedicated user space libraries that comprise the +important tuning tools using software control loop. + +rkisp1 uAPI data types +====================== + +.. kernel-doc:: include/uapi/linux/rkisp1-config.h diff --git a/Documentation/userspace-api/media/v4l/metafmt-uvc.rst b/Documentation/userspace-api/media/v4l/metafmt-uvc.rst new file mode 100644 index 0000000000000..784346d14bbdb --- /dev/null +++ b/Documentation/userspace-api/media/v4l/metafmt-uvc.rst @@ -0,0 +1,51 @@ +.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later + +.. _v4l2-meta-fmt-uvc: + +******************************* +V4L2_META_FMT_UVC ('UVCH') +******************************* + +UVC Payload Header Data + + +Description +=========== + +This format describes standard UVC metadata, extracted from UVC packet headers +and provided by the UVC driver through metadata video nodes. That data includes +exact copies of the standard part of UVC Payload Header contents and auxiliary +timing information, required for precise interpretation of timestamps, contained +in those headers. See section "2.4.3.3 Video and Still Image Payload Headers" of +the "UVC 1.5 Class specification" for details. + +Each UVC payload header can be between 2 and 12 bytes large. Buffers can +contain multiple headers, if multiple such headers have been transmitted by the +camera for the respective frame. However, the driver may drop headers when the +buffer is full, when they contain no useful information (e.g. those without the +SCR field or with that field identical to the previous header), or generally to +perform rate limiting when the device sends a large number of headers. + +Each individual block contains the following fields: + +.. flat-table:: UVC Metadata Block + :widths: 1 4 + :header-rows: 1 + :stub-columns: 0 + + * - Field + - Description + * - __u64 ts; + - system timestamp in host byte order, measured by the driver upon + reception of the payload + * - __u16 sof; + - USB Frame Number in host byte order, also obtained by the driver as + close as possible to the above timestamp to enable correlation between + them + * - :cspan:`1` *The rest is an exact copy of the UVC payload header:* + * - __u8 length; + - length of the rest of the block, including this field + * - __u8 flags; + - Flags, indicating presence of other standard UVC fields + * - __u8 buf[]; + - The rest of the header, possibly including UVC PTS and SCR fields diff --git a/Documentation/userspace-api/media/v4l/metafmt-vivid.rst b/Documentation/userspace-api/media/v4l/metafmt-vivid.rst new file mode 100644 index 0000000000000..7173e2c3e245c --- /dev/null +++ b/Documentation/userspace-api/media/v4l/metafmt-vivid.rst @@ -0,0 +1,36 @@ +.. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later + +.. _v4l2-meta-fmt-vivid: + +******************************* +V4L2_META_FMT_VIVID ('VIVD') +******************************* + +VIVID Metadata Format + + +Description +=========== + +This describes metadata format used by the vivid driver. + +It sets Brightness, Saturation, Contrast and Hue, each of which maps to +corresponding controls of the vivid driver with respect to the range and default values. + +It contains the following fields: + +.. flat-table:: VIVID Metadata + :widths: 1 4 + :header-rows: 1 + :stub-columns: 0 + + * - Field + - Description + * - u16 brightness; + - Image brightness, the value is in the range 0 to 255, with the default value as 128. + * - u16 contrast; + - Image contrast, the value is in the range 0 to 255, with the default value as 128. + * - u16 saturation; + - Image color saturation, the value is in the range 0 to 255, with the default value as 128. + * - s16 hue; + - Image color balance, the value is in the range -128 to 128, with the default value as 0. diff --git a/Documentation/userspace-api/media/v4l/metafmt-vsp1-hgo.rst b/Documentation/userspace-api/media/v4l/metafmt-vsp1-hgo.rst new file mode 100644 index 0000000000000..8d886feb180ca --- /dev/null +++ b/Documentation/userspace-api/media/v4l/metafmt-vsp1-hgo.rst @@ -0,0 +1,168 @@ +.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later + +.. _v4l2-meta-fmt-vsp1-hgo: + +******************************* +V4L2_META_FMT_VSP1_HGO ('VSPH') +******************************* + +Renesas R-Car VSP1 1-D Histogram Data + + +Description +=========== + +This format describes histogram data generated by the Renesas R-Car VSP1 1-D +Histogram (HGO) engine. + +The VSP1 HGO is a histogram computation engine that can operate on RGB, YCrCb +or HSV data. It operates on a possibly cropped and subsampled input image and +computes the minimum, maximum and sum of all pixels as well as per-channel +histograms. + +The HGO can compute histograms independently per channel, on the maximum of the +three channels (RGB data only) or on the Y channel only (YCbCr only). It can +additionally output the histogram with 64 or 256 bins, resulting in four +possible modes of operation. + +- In *64 bins normal mode*, the HGO operates on the three channels independently + to compute three 64-bins histograms. RGB, YCbCr and HSV image formats are + supported. +- In *64 bins maximum mode*, the HGO operates on the maximum of the (R, G, B) + channels to compute a single 64-bins histogram. Only the RGB image format is + supported. +- In *256 bins normal mode*, the HGO operates on the Y channel to compute a + single 256-bins histogram. Only the YCbCr image format is supported. +- In *256 bins maximum mode*, the HGO operates on the maximum of the (R, G, B) + channels to compute a single 256-bins histogram. Only the RGB image format is + supported. + +**Byte Order.** +All data is stored in memory in little endian format. Each cell in the tables +contains one byte. + +.. flat-table:: VSP1 HGO Data - 64 Bins, Normal Mode (792 bytes) + :header-rows: 2 + :stub-columns: 0 + + * - Offset + - :cspan:`4` Memory + * - + - [31:24] + - [23:16] + - [15:8] + - [7:0] + * - 0 + - + - R/Cr/H max [7:0] + - + - R/Cr/H min [7:0] + * - 4 + - + - G/Y/S max [7:0] + - + - G/Y/S min [7:0] + * - 8 + - + - B/Cb/V max [7:0] + - + - B/Cb/V min [7:0] + * - 12 + - :cspan:`4` R/Cr/H sum [31:0] + * - 16 + - :cspan:`4` G/Y/S sum [31:0] + * - 20 + - :cspan:`4` B/Cb/V sum [31:0] + * - 24 + - :cspan:`4` R/Cr/H bin 0 [31:0] + * - + - :cspan:`4` ... + * - 276 + - :cspan:`4` R/Cr/H bin 63 [31:0] + * - 280 + - :cspan:`4` G/Y/S bin 0 [31:0] + * - + - :cspan:`4` ... + * - 532 + - :cspan:`4` G/Y/S bin 63 [31:0] + * - 536 + - :cspan:`4` B/Cb/V bin 0 [31:0] + * - + - :cspan:`4` ... + * - 788 + - :cspan:`4` B/Cb/V bin 63 [31:0] + +.. flat-table:: VSP1 HGO Data - 64 Bins, Max Mode (264 bytes) + :header-rows: 2 + :stub-columns: 0 + + * - Offset + - :cspan:`4` Memory + * - + - [31:24] + - [23:16] + - [15:8] + - [7:0] + * - 0 + - + - max(R,G,B) max [7:0] + - + - max(R,G,B) min [7:0] + * - 4 + - :cspan:`4` max(R,G,B) sum [31:0] + * - 8 + - :cspan:`4` max(R,G,B) bin 0 [31:0] + * - + - :cspan:`4` ... + * - 260 + - :cspan:`4` max(R,G,B) bin 63 [31:0] + +.. flat-table:: VSP1 HGO Data - 256 Bins, Normal Mode (1032 bytes) + :header-rows: 2 + :stub-columns: 0 + + * - Offset + - :cspan:`4` Memory + * - + - [31:24] + - [23:16] + - [15:8] + - [7:0] + * - 0 + - + - Y max [7:0] + - + - Y min [7:0] + * - 4 + - :cspan:`4` Y sum [31:0] + * - 8 + - :cspan:`4` Y bin 0 [31:0] + * - + - :cspan:`4` ... + * - 1028 + - :cspan:`4` Y bin 255 [31:0] + +.. flat-table:: VSP1 HGO Data - 256 Bins, Max Mode (1032 bytes) + :header-rows: 2 + :stub-columns: 0 + + * - Offset + - :cspan:`4` Memory + * - + - [31:24] + - [23:16] + - [15:8] + - [7:0] + * - 0 + - + - max(R,G,B) max [7:0] + - + - max(R,G,B) min [7:0] + * - 4 + - :cspan:`4` max(R,G,B) sum [31:0] + * - 8 + - :cspan:`4` max(R,G,B) bin 0 [31:0] + * - + - :cspan:`4` ... + * - 1028 + - :cspan:`4` max(R,G,B) bin 255 [31:0] diff --git a/Documentation/userspace-api/media/v4l/metafmt-vsp1-hgt.rst b/Documentation/userspace-api/media/v4l/metafmt-vsp1-hgt.rst new file mode 100644 index 0000000000000..d8830ff605de4 --- /dev/null +++ b/Documentation/userspace-api/media/v4l/metafmt-vsp1-hgt.rst @@ -0,0 +1,129 @@ +.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later + +.. _v4l2-meta-fmt-vsp1-hgt: + +******************************* +V4L2_META_FMT_VSP1_HGT ('VSPT') +******************************* + +Renesas R-Car VSP1 2-D Histogram Data + + +Description +=========== + +This format describes histogram data generated by the Renesas R-Car VSP1 +2-D Histogram (HGT) engine. + +The VSP1 HGT is a histogram computation engine that operates on HSV +data. It operates on a possibly cropped and subsampled input image and +computes the sum, maximum and minimum of the S component as well as a +weighted frequency histogram based on the H and S components. + +The histogram is a matrix of 6 Hue and 32 Saturation buckets, 192 in +total. Each HSV value is added to one or more buckets with a weight +between 1 and 16 depending on the Hue areas configuration. Finding the +corresponding buckets is done by inspecting the H and S value independently. + +The Saturation position **n** (0 - 31) of the bucket in the matrix is +found by the expression: + + n = S / 8 + +The Hue position **m** (0 - 5) of the bucket in the matrix depends on +how the HGT Hue areas are configured. There are 6 user configurable Hue +Areas which can be configured to cover overlapping Hue values: + +.. raw:: latex + + \small + +:: + + Area 0 Area 1 Area 2 Area 3 Area 4 Area 5 + ________ ________ ________ ________ ________ ________ + \ /| |\ /| |\ /| |\ /| |\ /| |\ /| |\ / + \ / | | \ / | | \ / | | \ / | | \ / | | \ / | | \ / + X | | X | | X | | X | | X | | X | | X + / \ | | / \ | | / \ | | / \ | | / \ | | / \ | | / \ + / \| |/ \| |/ \| |/ \| |/ \| |/ \| |/ \ + 5U 0L 0U 1L 1U 2L 2U 3L 3U 4L 4U 5L 5U 0L + <0..............................Hue Value............................255> + + +.. raw:: latex + + \normalsize + +When two consecutive areas don't overlap (n+1L is equal to nU) the boundary +value is considered as part of the lower area. + +Pixels with a hue value included in the centre of an area (between nL and nU +included) are attributed to that single area and given a weight of 16. Pixels +with a hue value included in the overlapping region between two areas (between +n+1L and nU excluded) are attributed to both areas and given a weight for each +of these areas proportional to their position along the diagonal lines +(rounded down). + +The Hue area setup must match one of the following constrains: + +:: + + 0L <= 0U <= 1L <= 1U <= 2L <= 2U <= 3L <= 3U <= 4L <= 4U <= 5L <= 5U + +:: + + 0U <= 1L <= 1U <= 2L <= 2U <= 3L <= 3U <= 4L <= 4U <= 5L <= 5U <= 0L + +**Byte Order.** +All data is stored in memory in little endian format. Each cell in the tables +contains one byte. + +.. flat-table:: VSP1 HGT Data - (776 bytes) + :header-rows: 2 + :stub-columns: 0 + + * - Offset + - :cspan:`4` Memory + * - + - [31:24] + - [23:16] + - [15:8] + - [7:0] + * - 0 + - - + - S max [7:0] + - - + - S min [7:0] + * - 4 + - :cspan:`4` S sum [31:0] + * - 8 + - :cspan:`4` Histogram bucket (m=0, n=0) [31:0] + * - 12 + - :cspan:`4` Histogram bucket (m=0, n=1) [31:0] + * - + - :cspan:`4` ... + * - 132 + - :cspan:`4` Histogram bucket (m=0, n=31) [31:0] + * - 136 + - :cspan:`4` Histogram bucket (m=1, n=0) [31:0] + * - + - :cspan:`4` ... + * - 264 + - :cspan:`4` Histogram bucket (m=2, n=0) [31:0] + * - + - :cspan:`4` ... + * - 392 + - :cspan:`4` Histogram bucket (m=3, n=0) [31:0] + * - + - :cspan:`4` ... + * - 520 + - :cspan:`4` Histogram bucket (m=4, n=0) [31:0] + * - + - :cspan:`4` ... + * - 648 + - :cspan:`4` Histogram bucket (m=5, n=0) [31:0] + * - + - :cspan:`4` ... + * - 772 + - :cspan:`4` Histogram bucket (m=5, n=31) [31:0] diff --git a/Documentation/userspace-api/media/v4l/pixfmt-meta-d4xx.rst b/Documentation/userspace-api/media/v4l/pixfmt-meta-d4xx.rst deleted file mode 100644 index 4e437ba97a0ec..0000000000000 --- a/Documentation/userspace-api/media/v4l/pixfmt-meta-d4xx.rst +++ /dev/null @@ -1,213 +0,0 @@ -.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later - -.. _v4l2-meta-fmt-d4xx: - -******************************* -V4L2_META_FMT_D4XX ('D4XX') -******************************* - -Intel D4xx UVC Cameras Metadata - - -Description -=========== - -Intel D4xx (D435 and other) cameras include per-frame metadata in their UVC -payload headers, following the Microsoft(R) UVC extension proposal [1_]. That -means, that the private D4XX metadata, following the standard UVC header, is -organised in blocks. D4XX cameras implement several standard block types, -proposed by Microsoft, and several proprietary ones. Supported standard metadata -types are MetadataId_CaptureStats (ID 3), MetadataId_CameraExtrinsics (ID 4), -and MetadataId_CameraIntrinsics (ID 5). For their description see [1_]. This -document describes proprietary metadata types, used by D4xx cameras. - -V4L2_META_FMT_D4XX buffers follow the metadata buffer layout of -V4L2_META_FMT_UVC with the only difference, that it also includes proprietary -payload header data. D4xx cameras use bulk transfers and only send one payload -per frame, therefore their headers cannot be larger than 255 bytes. - -Below are proprietary Microsoft style metadata types, used by D4xx cameras, -where all fields are in little endian order: - -.. tabularcolumns:: |p{5.0cm}|p{12.5cm}| - - -.. flat-table:: D4xx metadata - :widths: 1 2 - :header-rows: 1 - :stub-columns: 0 - - * - **Field** - - **Description** - * - :cspan:`1` *Depth Control* - * - __u32 ID - - 0x80000000 - * - __u32 Size - - Size in bytes (currently 56) - * - __u32 Version - - Version of this structure. The documentation herein corresponds to - version xxx. The version number will be incremented when new fields are - added. - * - __u32 Flags - - A bitmask of flags: see [2_] below - * - __u32 Gain - - Gain value in internal units, same as the V4L2_CID_GAIN control, used to - capture the frame - * - __u32 Exposure - - Exposure time (in microseconds) used to capture the frame - * - __u32 Laser power - - Power of the laser LED 0-360, used for depth measurement - * - __u32 AE mode - - 0: manual; 1: automatic exposure - * - __u32 Exposure priority - - Exposure priority value: 0 - constant frame rate - * - __u32 AE ROI left - - Left border of the AE Region of Interest (all ROI values are in pixels - and lie between 0 and maximum width or height respectively) - * - __u32 AE ROI right - - Right border of the AE Region of Interest - * - __u32 AE ROI top - - Top border of the AE Region of Interest - * - __u32 AE ROI bottom - - Bottom border of the AE Region of Interest - * - __u32 Preset - - Preset selector value, default: 0, unless changed by the user - * - __u32 Laser mode - - 0: off, 1: on - * - :cspan:`1` *Capture Timing* - * - __u32 ID - - 0x80000001 - * - __u32 Size - - Size in bytes (currently 40) - * - __u32 Version - - Version of this structure. The documentation herein corresponds to - version xxx. The version number will be incremented when new fields are - added. - * - __u32 Flags - - A bitmask of flags: see [3_] below - * - __u32 Frame counter - - Monotonically increasing counter - * - __u32 Optical time - - Time in microseconds from the beginning of a frame till its middle - * - __u32 Readout time - - Time, used to read out a frame in microseconds - * - __u32 Exposure time - - Frame exposure time in microseconds - * - __u32 Frame interval - - In microseconds = 1000000 / framerate - * - __u32 Pipe latency - - Time in microseconds from start of frame to data in USB buffer - * - :cspan:`1` *Configuration* - * - __u32 ID - - 0x80000002 - * - __u32 Size - - Size in bytes (currently 40) - * - __u32 Version - - Version of this structure. The documentation herein corresponds to - version xxx. The version number will be incremented when new fields are - added. - * - __u32 Flags - - A bitmask of flags: see [4_] below - * - __u8 Hardware type - - Camera hardware version [5_] - * - __u8 SKU ID - - Camera hardware configuration [6_] - * - __u32 Cookie - - Internal synchronisation - * - __u16 Format - - Image format code [7_] - * - __u16 Width - - Width in pixels - * - __u16 Height - - Height in pixels - * - __u16 Framerate - - Requested frame rate per second - * - __u16 Trigger - - Byte 0: bit 0: depth and RGB are synchronised, bit 1: external trigger - -.. _1: - -[1] https://docs.microsoft.com/en-us/windows-hardware/drivers/stream/uvc-extensions-1-5 - -.. _2: - -[2] Depth Control flags specify which fields are valid: :: - - 0x00000001 Gain - 0x00000002 Exposure - 0x00000004 Laser power - 0x00000008 AE mode - 0x00000010 Exposure priority - 0x00000020 AE ROI - 0x00000040 Preset - -.. _3: - -[3] Capture Timing flags specify which fields are valid: :: - - 0x00000001 Frame counter - 0x00000002 Optical time - 0x00000004 Readout time - 0x00000008 Exposure time - 0x00000010 Frame interval - 0x00000020 Pipe latency - -.. _4: - -[4] Configuration flags specify which fields are valid: :: - - 0x00000001 Hardware type - 0x00000002 SKU ID - 0x00000004 Cookie - 0x00000008 Format - 0x00000010 Width - 0x00000020 Height - 0x00000040 Framerate - 0x00000080 Trigger - 0x00000100 Cal count - -.. _5: - -[5] Camera model: :: - - 0 DS5 - 1 IVCAM2 - -.. _6: - -[6] 8-bit camera hardware configuration bitfield: :: - - [1:0] depthCamera - 00: no depth - 01: standard depth - 10: wide depth - 11: reserved - [2] depthIsActive - has a laser projector - [3] RGB presence - [4] Inertial Measurement Unit (IMU) presence - [5] projectorType - 0: HPTG - 1: Princeton - [6] 0: a projector, 1: an LED - [7] reserved - -.. _7: - -[7] Image format codes per video streaming interface: - -Depth: :: - - 1 Z16 - 2 Z - -Left sensor: :: - - 1 Y8 - 2 UYVY - 3 R8L8 - 4 Calibration - 5 W10 - -Fish Eye sensor: :: - - 1 RAW8 diff --git a/Documentation/userspace-api/media/v4l/pixfmt-meta-intel-ipu3.rst b/Documentation/userspace-api/media/v4l/pixfmt-meta-intel-ipu3.rst deleted file mode 100644 index 84d81dd7a7b5e..0000000000000 --- a/Documentation/userspace-api/media/v4l/pixfmt-meta-intel-ipu3.rst +++ /dev/null @@ -1,81 +0,0 @@ -.. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later - -.. _v4l2-meta-fmt-params: -.. _v4l2-meta-fmt-stat-3a: - -****************************************************************** -V4L2_META_FMT_IPU3_PARAMS ('ip3p'), V4L2_META_FMT_IPU3_3A ('ip3s') -****************************************************************** - -.. ipu3_uapi_stats_3a - -3A statistics -============= - -The IPU3 ImgU 3A statistics accelerators collect different statistics over -an input Bayer frame. Those statistics are obtained from the "ipu3-imgu [01] 3a -stat" metadata capture video nodes, using the :c:type:`v4l2_meta_format` -interface. They are formatted as described by the :c:type:`ipu3_uapi_stats_3a` -structure. - -The statistics collected are AWB (Auto-white balance) RGBS (Red, Green, Blue and -Saturation measure) cells, AWB filter response, AF (Auto-focus) filter response, -and AE (Auto-exposure) histogram. - -The struct :c:type:`ipu3_uapi_4a_config` saves all configurable parameters. - -.. code-block:: c - - struct ipu3_uapi_stats_3a { - struct ipu3_uapi_awb_raw_buffer awb_raw_buffer; - struct ipu3_uapi_ae_raw_buffer_aligned ae_raw_buffer[IPU3_UAPI_MAX_STRIPES]; - struct ipu3_uapi_af_raw_buffer af_raw_buffer; - struct ipu3_uapi_awb_fr_raw_buffer awb_fr_raw_buffer; - struct ipu3_uapi_4a_config stats_4a_config; - __u32 ae_join_buffers; - __u8 padding[28]; - struct ipu3_uapi_stats_3a_bubble_info_per_stripe stats_3a_bubble_per_stripe; - struct ipu3_uapi_ff_status stats_3a_status; - }; - -.. ipu3_uapi_params - -Pipeline parameters -=================== - -The pipeline parameters are passed to the "ipu3-imgu [01] parameters" metadata -output video nodes, using the :c:type:`v4l2_meta_format` interface. They are -formatted as described by the :c:type:`ipu3_uapi_params` structure. - -Both 3A statistics and pipeline parameters described here are closely tied to -the underlying camera sub-system (CSS) APIs. They are usually consumed and -produced by dedicated user space libraries that comprise the important tuning -tools, thus freeing the developers from being bothered with the low level -hardware and algorithm details. - -.. code-block:: c - - struct ipu3_uapi_params { - /* Flags which of the settings below are to be applied */ - struct ipu3_uapi_flags use; - - /* Accelerator cluster parameters */ - struct ipu3_uapi_acc_param acc_param; - - /* ISP vector address space parameters */ - struct ipu3_uapi_isp_lin_vmem_params lin_vmem_params; - struct ipu3_uapi_isp_tnr3_vmem_params tnr3_vmem_params; - struct ipu3_uapi_isp_xnr3_vmem_params xnr3_vmem_params; - - /* ISP data memory (DMEM) parameters */ - struct ipu3_uapi_isp_tnr3_params tnr3_dmem_params; - struct ipu3_uapi_isp_xnr3_params xnr3_dmem_params; - - /* Optical black level compensation */ - struct ipu3_uapi_obgrid_param obgrid_param; - }; - -Intel IPU3 ImgU uAPI data types -=============================== - -.. kernel-doc:: drivers/staging/media/ipu3/include/uapi/intel-ipu3.h diff --git a/Documentation/userspace-api/media/v4l/pixfmt-meta-rkisp1.rst b/Documentation/userspace-api/media/v4l/pixfmt-meta-rkisp1.rst deleted file mode 100644 index fa04f00bcd2ed..0000000000000 --- a/Documentation/userspace-api/media/v4l/pixfmt-meta-rkisp1.rst +++ /dev/null @@ -1,50 +0,0 @@ -.. SPDX-License-Identifier: GPL-2.0 - -.. _v4l2-meta-fmt-rk-isp1-params: - -.. _v4l2-meta-fmt-rk-isp1-stat-3a: - -***************************************************************************** -V4L2_META_FMT_RK_ISP1_PARAMS ('rk1p'), V4L2_META_FMT_RK_ISP1_STAT_3A ('rk1s') -***************************************************************************** - -Configuration parameters -======================== - -The configuration parameters are passed to the -:ref:`rkisp1_params ` metadata output video node, using -the :c:type:`v4l2_meta_format` interface. The buffer contains -a single instance of the C structure :c:type:`rkisp1_params_cfg` defined in -``rkisp1-config.h``. So the structure can be obtained from the buffer by: - -.. code-block:: c - - struct rkisp1_params_cfg *params = (struct rkisp1_params_cfg*) buffer; - -.. rkisp1_stat_buffer - -3A and histogram statistics -=========================== - -The ISP1 device collects different statistics over an input Bayer frame. -Those statistics are obtained from the :ref:`rkisp1_stats ` -metadata capture video node, -using the :c:type:`v4l2_meta_format` interface. The buffer contains a single -instance of the C structure :c:type:`rkisp1_stat_buffer` defined in -``rkisp1-config.h``. So the structure can be obtained from the buffer by: - -.. code-block:: c - - struct rkisp1_stat_buffer *stats = (struct rkisp1_stat_buffer*) buffer; - -The statistics collected are Exposure, AWB (Auto-white balance), Histogram and -AF (Auto-focus). See :c:type:`rkisp1_stat_buffer` for details of the statistics. - -The 3A statistics and configuration parameters described here are usually -consumed and produced by dedicated user space libraries that comprise the -important tuning tools using software control loop. - -rkisp1 uAPI data types -====================== - -.. kernel-doc:: include/uapi/linux/rkisp1-config.h diff --git a/Documentation/userspace-api/media/v4l/pixfmt-meta-uvc.rst b/Documentation/userspace-api/media/v4l/pixfmt-meta-uvc.rst deleted file mode 100644 index 784346d14bbdb..0000000000000 --- a/Documentation/userspace-api/media/v4l/pixfmt-meta-uvc.rst +++ /dev/null @@ -1,51 +0,0 @@ -.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later - -.. _v4l2-meta-fmt-uvc: - -******************************* -V4L2_META_FMT_UVC ('UVCH') -******************************* - -UVC Payload Header Data - - -Description -=========== - -This format describes standard UVC metadata, extracted from UVC packet headers -and provided by the UVC driver through metadata video nodes. That data includes -exact copies of the standard part of UVC Payload Header contents and auxiliary -timing information, required for precise interpretation of timestamps, contained -in those headers. See section "2.4.3.3 Video and Still Image Payload Headers" of -the "UVC 1.5 Class specification" for details. - -Each UVC payload header can be between 2 and 12 bytes large. Buffers can -contain multiple headers, if multiple such headers have been transmitted by the -camera for the respective frame. However, the driver may drop headers when the -buffer is full, when they contain no useful information (e.g. those without the -SCR field or with that field identical to the previous header), or generally to -perform rate limiting when the device sends a large number of headers. - -Each individual block contains the following fields: - -.. flat-table:: UVC Metadata Block - :widths: 1 4 - :header-rows: 1 - :stub-columns: 0 - - * - Field - - Description - * - __u64 ts; - - system timestamp in host byte order, measured by the driver upon - reception of the payload - * - __u16 sof; - - USB Frame Number in host byte order, also obtained by the driver as - close as possible to the above timestamp to enable correlation between - them - * - :cspan:`1` *The rest is an exact copy of the UVC payload header:* - * - __u8 length; - - length of the rest of the block, including this field - * - __u8 flags; - - Flags, indicating presence of other standard UVC fields - * - __u8 buf[]; - - The rest of the header, possibly including UVC PTS and SCR fields diff --git a/Documentation/userspace-api/media/v4l/pixfmt-meta-vivid.rst b/Documentation/userspace-api/media/v4l/pixfmt-meta-vivid.rst deleted file mode 100644 index 7173e2c3e245c..0000000000000 --- a/Documentation/userspace-api/media/v4l/pixfmt-meta-vivid.rst +++ /dev/null @@ -1,36 +0,0 @@ -.. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later - -.. _v4l2-meta-fmt-vivid: - -******************************* -V4L2_META_FMT_VIVID ('VIVD') -******************************* - -VIVID Metadata Format - - -Description -=========== - -This describes metadata format used by the vivid driver. - -It sets Brightness, Saturation, Contrast and Hue, each of which maps to -corresponding controls of the vivid driver with respect to the range and default values. - -It contains the following fields: - -.. flat-table:: VIVID Metadata - :widths: 1 4 - :header-rows: 1 - :stub-columns: 0 - - * - Field - - Description - * - u16 brightness; - - Image brightness, the value is in the range 0 to 255, with the default value as 128. - * - u16 contrast; - - Image contrast, the value is in the range 0 to 255, with the default value as 128. - * - u16 saturation; - - Image color saturation, the value is in the range 0 to 255, with the default value as 128. - * - s16 hue; - - Image color balance, the value is in the range -128 to 128, with the default value as 0. diff --git a/Documentation/userspace-api/media/v4l/pixfmt-meta-vsp1-hgo.rst b/Documentation/userspace-api/media/v4l/pixfmt-meta-vsp1-hgo.rst deleted file mode 100644 index 8d886feb180ca..0000000000000 --- a/Documentation/userspace-api/media/v4l/pixfmt-meta-vsp1-hgo.rst +++ /dev/null @@ -1,168 +0,0 @@ -.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later - -.. _v4l2-meta-fmt-vsp1-hgo: - -******************************* -V4L2_META_FMT_VSP1_HGO ('VSPH') -******************************* - -Renesas R-Car VSP1 1-D Histogram Data - - -Description -=========== - -This format describes histogram data generated by the Renesas R-Car VSP1 1-D -Histogram (HGO) engine. - -The VSP1 HGO is a histogram computation engine that can operate on RGB, YCrCb -or HSV data. It operates on a possibly cropped and subsampled input image and -computes the minimum, maximum and sum of all pixels as well as per-channel -histograms. - -The HGO can compute histograms independently per channel, on the maximum of the -three channels (RGB data only) or on the Y channel only (YCbCr only). It can -additionally output the histogram with 64 or 256 bins, resulting in four -possible modes of operation. - -- In *64 bins normal mode*, the HGO operates on the three channels independently - to compute three 64-bins histograms. RGB, YCbCr and HSV image formats are - supported. -- In *64 bins maximum mode*, the HGO operates on the maximum of the (R, G, B) - channels to compute a single 64-bins histogram. Only the RGB image format is - supported. -- In *256 bins normal mode*, the HGO operates on the Y channel to compute a - single 256-bins histogram. Only the YCbCr image format is supported. -- In *256 bins maximum mode*, the HGO operates on the maximum of the (R, G, B) - channels to compute a single 256-bins histogram. Only the RGB image format is - supported. - -**Byte Order.** -All data is stored in memory in little endian format. Each cell in the tables -contains one byte. - -.. flat-table:: VSP1 HGO Data - 64 Bins, Normal Mode (792 bytes) - :header-rows: 2 - :stub-columns: 0 - - * - Offset - - :cspan:`4` Memory - * - - - [31:24] - - [23:16] - - [15:8] - - [7:0] - * - 0 - - - - R/Cr/H max [7:0] - - - - R/Cr/H min [7:0] - * - 4 - - - - G/Y/S max [7:0] - - - - G/Y/S min [7:0] - * - 8 - - - - B/Cb/V max [7:0] - - - - B/Cb/V min [7:0] - * - 12 - - :cspan:`4` R/Cr/H sum [31:0] - * - 16 - - :cspan:`4` G/Y/S sum [31:0] - * - 20 - - :cspan:`4` B/Cb/V sum [31:0] - * - 24 - - :cspan:`4` R/Cr/H bin 0 [31:0] - * - - - :cspan:`4` ... - * - 276 - - :cspan:`4` R/Cr/H bin 63 [31:0] - * - 280 - - :cspan:`4` G/Y/S bin 0 [31:0] - * - - - :cspan:`4` ... - * - 532 - - :cspan:`4` G/Y/S bin 63 [31:0] - * - 536 - - :cspan:`4` B/Cb/V bin 0 [31:0] - * - - - :cspan:`4` ... - * - 788 - - :cspan:`4` B/Cb/V bin 63 [31:0] - -.. flat-table:: VSP1 HGO Data - 64 Bins, Max Mode (264 bytes) - :header-rows: 2 - :stub-columns: 0 - - * - Offset - - :cspan:`4` Memory - * - - - [31:24] - - [23:16] - - [15:8] - - [7:0] - * - 0 - - - - max(R,G,B) max [7:0] - - - - max(R,G,B) min [7:0] - * - 4 - - :cspan:`4` max(R,G,B) sum [31:0] - * - 8 - - :cspan:`4` max(R,G,B) bin 0 [31:0] - * - - - :cspan:`4` ... - * - 260 - - :cspan:`4` max(R,G,B) bin 63 [31:0] - -.. flat-table:: VSP1 HGO Data - 256 Bins, Normal Mode (1032 bytes) - :header-rows: 2 - :stub-columns: 0 - - * - Offset - - :cspan:`4` Memory - * - - - [31:24] - - [23:16] - - [15:8] - - [7:0] - * - 0 - - - - Y max [7:0] - - - - Y min [7:0] - * - 4 - - :cspan:`4` Y sum [31:0] - * - 8 - - :cspan:`4` Y bin 0 [31:0] - * - - - :cspan:`4` ... - * - 1028 - - :cspan:`4` Y bin 255 [31:0] - -.. flat-table:: VSP1 HGO Data - 256 Bins, Max Mode (1032 bytes) - :header-rows: 2 - :stub-columns: 0 - - * - Offset - - :cspan:`4` Memory - * - - - [31:24] - - [23:16] - - [15:8] - - [7:0] - * - 0 - - - - max(R,G,B) max [7:0] - - - - max(R,G,B) min [7:0] - * - 4 - - :cspan:`4` max(R,G,B) sum [31:0] - * - 8 - - :cspan:`4` max(R,G,B) bin 0 [31:0] - * - - - :cspan:`4` ... - * - 1028 - - :cspan:`4` max(R,G,B) bin 255 [31:0] diff --git a/Documentation/userspace-api/media/v4l/pixfmt-meta-vsp1-hgt.rst b/Documentation/userspace-api/media/v4l/pixfmt-meta-vsp1-hgt.rst deleted file mode 100644 index d8830ff605de4..0000000000000 --- a/Documentation/userspace-api/media/v4l/pixfmt-meta-vsp1-hgt.rst +++ /dev/null @@ -1,129 +0,0 @@ -.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later - -.. _v4l2-meta-fmt-vsp1-hgt: - -******************************* -V4L2_META_FMT_VSP1_HGT ('VSPT') -******************************* - -Renesas R-Car VSP1 2-D Histogram Data - - -Description -=========== - -This format describes histogram data generated by the Renesas R-Car VSP1 -2-D Histogram (HGT) engine. - -The VSP1 HGT is a histogram computation engine that operates on HSV -data. It operates on a possibly cropped and subsampled input image and -computes the sum, maximum and minimum of the S component as well as a -weighted frequency histogram based on the H and S components. - -The histogram is a matrix of 6 Hue and 32 Saturation buckets, 192 in -total. Each HSV value is added to one or more buckets with a weight -between 1 and 16 depending on the Hue areas configuration. Finding the -corresponding buckets is done by inspecting the H and S value independently. - -The Saturation position **n** (0 - 31) of the bucket in the matrix is -found by the expression: - - n = S / 8 - -The Hue position **m** (0 - 5) of the bucket in the matrix depends on -how the HGT Hue areas are configured. There are 6 user configurable Hue -Areas which can be configured to cover overlapping Hue values: - -.. raw:: latex - - \small - -:: - - Area 0 Area 1 Area 2 Area 3 Area 4 Area 5 - ________ ________ ________ ________ ________ ________ - \ /| |\ /| |\ /| |\ /| |\ /| |\ /| |\ / - \ / | | \ / | | \ / | | \ / | | \ / | | \ / | | \ / - X | | X | | X | | X | | X | | X | | X - / \ | | / \ | | / \ | | / \ | | / \ | | / \ | | / \ - / \| |/ \| |/ \| |/ \| |/ \| |/ \| |/ \ - 5U 0L 0U 1L 1U 2L 2U 3L 3U 4L 4U 5L 5U 0L - <0..............................Hue Value............................255> - - -.. raw:: latex - - \normalsize - -When two consecutive areas don't overlap (n+1L is equal to nU) the boundary -value is considered as part of the lower area. - -Pixels with a hue value included in the centre of an area (between nL and nU -included) are attributed to that single area and given a weight of 16. Pixels -with a hue value included in the overlapping region between two areas (between -n+1L and nU excluded) are attributed to both areas and given a weight for each -of these areas proportional to their position along the diagonal lines -(rounded down). - -The Hue area setup must match one of the following constrains: - -:: - - 0L <= 0U <= 1L <= 1U <= 2L <= 2U <= 3L <= 3U <= 4L <= 4U <= 5L <= 5U - -:: - - 0U <= 1L <= 1U <= 2L <= 2U <= 3L <= 3U <= 4L <= 4U <= 5L <= 5U <= 0L - -**Byte Order.** -All data is stored in memory in little endian format. Each cell in the tables -contains one byte. - -.. flat-table:: VSP1 HGT Data - (776 bytes) - :header-rows: 2 - :stub-columns: 0 - - * - Offset - - :cspan:`4` Memory - * - - - [31:24] - - [23:16] - - [15:8] - - [7:0] - * - 0 - - - - - S max [7:0] - - - - - S min [7:0] - * - 4 - - :cspan:`4` S sum [31:0] - * - 8 - - :cspan:`4` Histogram bucket (m=0, n=0) [31:0] - * - 12 - - :cspan:`4` Histogram bucket (m=0, n=1) [31:0] - * - - - :cspan:`4` ... - * - 132 - - :cspan:`4` Histogram bucket (m=0, n=31) [31:0] - * - 136 - - :cspan:`4` Histogram bucket (m=1, n=0) [31:0] - * - - - :cspan:`4` ... - * - 264 - - :cspan:`4` Histogram bucket (m=2, n=0) [31:0] - * - - - :cspan:`4` ... - * - 392 - - :cspan:`4` Histogram bucket (m=3, n=0) [31:0] - * - - - :cspan:`4` ... - * - 520 - - :cspan:`4` Histogram bucket (m=4, n=0) [31:0] - * - - - :cspan:`4` ... - * - 648 - - :cspan:`4` Histogram bucket (m=5, n=0) [31:0] - * - - - :cspan:`4` ... - * - 772 - - :cspan:`4` Histogram bucket (m=5, n=31) [31:0] diff --git a/MAINTAINERS b/MAINTAINERS index a2878f5f59f33..517ce68c6102c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -10454,7 +10454,7 @@ L: linux-media@vger.kernel.org S: Maintained F: Documentation/admin-guide/media/ipu3.rst F: Documentation/admin-guide/media/ipu3_rcb.svg -F: Documentation/userspace-api/media/v4l/pixfmt-meta-intel-ipu3.rst +F: Documentation/userspace-api/media/v4l/metafmt-intel-ipu3.rst F: drivers/staging/media/ipu3/ INTEL ISHTP ECLITE DRIVER @@ -18199,7 +18199,7 @@ L: linux-rockchip@lists.infradead.org S: Maintained F: Documentation/admin-guide/media/rkisp1.rst F: Documentation/devicetree/bindings/media/rockchip-isp1.yaml -F: Documentation/userspace-api/media/v4l/pixfmt-meta-rkisp1.rst +F: Documentation/userspace-api/media/v4l/metafmt-rkisp1.rst F: drivers/media/platform/rockchip/rkisp1 F: include/uapi/linux/rkisp1-config.h