diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2015-03-08 14:35:31 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2015-03-08 23:26:42 +0200 |
commit | 857d32bce873cc0a467e60f7f462c84594330730 (patch) | |
tree | 6126114f5549cd72d9b5e042a428552c6f9905d8 /isp/stats.h | |
parent | cbd64859e6c1509b0f2ee7728cb66b120d52c45e (diff) |
isp: Add histogram supporthistogram
Support enabling the histogram statistics engine and retrieving
histogram data. Histogram data is currently ignored in the image quality
tuning implementation.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'isp/stats.h')
-rw-r--r-- | isp/stats.h | 37 |
1 files changed, 32 insertions, 5 deletions
diff --git a/isp/stats.h b/isp/stats.h index fb6c26a..f68d4fa 100644 --- a/isp/stats.h +++ b/isp/stats.h @@ -27,6 +27,11 @@ struct omap3_isp_device; +enum omap3_isp_stat_engine { + OMAP3_ISP_STAT_AEWB = 1 << 0, + OMAP3_ISP_STAT_HIST = 1 << 1, +}; + /* * struct omap3_isp_aewb_stats - OMAP3 ISP AEWB statistics * @npix: Total number of accumulated pixels @@ -52,15 +57,28 @@ struct omap3_isp_aewb_stats { }; /* + * struct omap3_isp_histogram_stats - OMAP3 ISP histogram statistics + * @nbins: Number of bins in the histogram + * @bins: Array of histogram frequency data + * + * Each bin entry is stored on 32 bits but limited to 20 bits. + */ +struct omap3_isp_histogram_stats { + unsigned int nbins; + uint32_t *bins; +}; + +/* * omap3_isp_stats_enable - Enable or disable the statistics engine * @isp: The ISP device - * @enable: Whether to enable to disable the statistics engine + * @which: The statistics engine(s) to enable * - * The statistics engine must be enabled prior to starting the video stream. - * When enabled, it statistics will be computed for every frame and delivered - * through the ISP aewb_ready() callback. + * The statistics engines must be enabled prior to starting the video stream. + * When enabled, statistics will be computed for every frame and delivered + * through the ISP aewb_ready() and histogram_ready() callbacks. */ -void omap3_isp_stats_enable(struct omap3_isp_device *isp, bool enable); +void omap3_isp_stats_enable(struct omap3_isp_device *isp, + enum omap3_isp_stat_engine which); /* * omap3_isp_stats_get_format - Get frame format at the statistics engine input @@ -72,6 +90,7 @@ void omap3_isp_stats_enable(struct omap3_isp_device *isp, bool enable); */ int omap3_isp_stats_get_format(struct omap3_isp_device *isp, struct v4l2_mbus_framefmt *format); + /* * omap3_isp_aewb_configure - Configure the AEWB statistics engine * @isp: The ISP device @@ -81,4 +100,12 @@ int omap3_isp_stats_get_format(struct omap3_isp_device *isp, int omap3_isp_aewb_configure(struct omap3_isp_device *isp, struct v4l2_rect *rect, unsigned int saturation); +/* + * omap3_isp_histogram_configure - Configure the histogram statistics engine + * @isp: The ISP device + * @rect: The region of interest, relative to the sensor output frame size + */ +int omap3_isp_histogram_configure(struct omap3_isp_device *isp, + struct v4l2_rect *rect); + #endif |