提交 95634238 编写于 作者: N Naushir Patuck 提交者: Zheng Zengkai

media: uapi: v4l2-core: Add ISP statistics output V4L2 fourcc type

raspberrypi inclusion
category: feature
bugzilla: 50432

--------------------------------

Add V4L2_META_FMT_BCM2835_ISP_STATS V4L2 format type.

This new format will be used by the BCM2835 ISP device to return
out ISP statistics for 3A.
Signed-off-by: NNaushir Patuck <naush@raspberrypi.com>
Signed-off-by: NFang Yafen <yafen@iscas.ac.cn>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 5715cc54
...@@ -12,6 +12,7 @@ These formats are used for the :ref:`metadata` interface only. ...@@ -12,6 +12,7 @@ These formats are used for the :ref:`metadata` interface only.
.. toctree:: .. toctree::
:maxdepth: 1 :maxdepth: 1
pixfmt-meta-bcm2835-isp-stats
pixfmt-meta-d4xx pixfmt-meta-d4xx
pixfmt-meta-intel-ipu3 pixfmt-meta-intel-ipu3
pixfmt-meta-rkisp1 pixfmt-meta-rkisp1
......
.. Permission is granted to copy, distribute and/or modify this
.. document under the terms of the GNU Free Documentation License,
.. Version 1.1 or any later version published by the Free Software
.. Foundation, with no Invariant Sections, no Front-Cover Texts
.. and no Back-Cover Texts. A copy of the license is included at
.. Documentation/media/uapi/fdl-appendix.rst.
..
.. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
.. _v4l2-meta-fmt-bcm2835-isp-stats:
*****************************************
V4L2_META_FMT_BCM2835_ISP_STATS ('BSTA')
*****************************************
BCM2835 ISP Statistics
Description
===========
The BCM2835 ISP hardware calculate image statistics for an input Bayer frame.
These statistics are obtained from the "bcm2835-isp0-capture3" device node
using the :c:type:`v4l2_meta_format` interface. They are formatted as described
by the :c:type:`bcm2835_isp_stats` structure below.
.. code-block:: c
#define DEFAULT_AWB_REGIONS_X 16
#define DEFAULT_AWB_REGIONS_Y 12
#define NUM_HISTOGRAMS 2
#define NUM_HISTOGRAM_BINS 128
#define AWB_REGIONS (DEFAULT_AWB_REGIONS_X * DEFAULT_AWB_REGIONS_Y)
#define FLOATING_REGIONS 16
#define AGC_REGIONS 16
#define FOCUS_REGIONS 12
.. kernel-doc:: include/uapi/linux/bcm2835-isp.h
:functions: bcm2835_isp_stats_hist bcm2835_isp_stats_region
bcm2835_isp_stats_focus bcm2835_isp_stats
...@@ -1405,6 +1405,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt) ...@@ -1405,6 +1405,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
case V4L2_META_FMT_D4XX: descr = "Intel D4xx UVC Metadata"; break; case V4L2_META_FMT_D4XX: descr = "Intel D4xx UVC Metadata"; break;
case V4L2_META_FMT_VIVID: descr = "Vivid Metadata"; break; case V4L2_META_FMT_VIVID: descr = "Vivid Metadata"; break;
case V4L2_META_FMT_SENSOR_DATA: descr = "Sensor Ancillary Metadata"; break; case V4L2_META_FMT_SENSOR_DATA: descr = "Sensor Ancillary Metadata"; break;
case V4L2_META_FMT_BCM2835_ISP_STATS: descr = "BCM2835 ISP Image Statistics"; break;
default: default:
/* Compressed formats */ /* Compressed formats */
......
...@@ -779,6 +779,7 @@ struct v4l2_pix_format { ...@@ -779,6 +779,7 @@ struct v4l2_pix_format {
#define V4L2_META_FMT_D4XX v4l2_fourcc('D', '4', 'X', 'X') /* D4XX Payload Header metadata */ #define V4L2_META_FMT_D4XX v4l2_fourcc('D', '4', 'X', 'X') /* D4XX Payload Header metadata */
#define V4L2_META_FMT_VIVID v4l2_fourcc('V', 'I', 'V', 'D') /* Vivid Metadata */ #define V4L2_META_FMT_VIVID v4l2_fourcc('V', 'I', 'V', 'D') /* Vivid Metadata */
#define V4L2_META_FMT_SENSOR_DATA v4l2_fourcc('S', 'E', 'N', 'S') /* Sensor Ancillary metadata */ #define V4L2_META_FMT_SENSOR_DATA v4l2_fourcc('S', 'E', 'N', 'S') /* Sensor Ancillary metadata */
#define V4L2_META_FMT_BCM2835_ISP_STATS v4l2_fourcc('B', 'S', 'T', 'A') /* BCM2835 ISP image statistics output */
/* priv field value to indicates that subsequent fields are valid. */ /* priv field value to indicates that subsequent fields are valid. */
#define V4L2_PIX_FMT_PRIV_MAGIC 0xfeedcafe #define V4L2_PIX_FMT_PRIV_MAGIC 0xfeedcafe
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册