diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-02-01 15:01:45 +0100 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-05-01 12:13:56 +0200 |
commit | 394b4755f7951c7c598b3162a98772677ee9dace (patch) | |
tree | f76679f6efa5268285815f4fd24b82f252fcbe27 /isp/omap3isp.c | |
parent | eb895a988d1531c7ede0f7b983db61f38770d929 (diff) |
stats: Add support for the AEWB statistics engine
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'isp/omap3isp.c')
-rw-r--r-- | isp/omap3isp.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/isp/omap3isp.c b/isp/omap3isp.c index d1c74c1..f100254 100644 --- a/isp/omap3isp.c +++ b/isp/omap3isp.c @@ -947,6 +947,12 @@ struct omap3_isp_device *omap3_isp_open(const char *devname, goto error; } + ret = omap3_isp_stats_init(isp); + if (ret < 0) { + printf("error: unable to initialize statistics engine.\n"); + goto error; + } + ret = omap3_isp_preview_setup(isp); if (ret < 0) { printf("error: unable to setup preview engine.\n"); @@ -965,6 +971,7 @@ void omap3_isp_close(struct omap3_isp_device *isp) if (isp == NULL) return; + omap3_isp_stats_cleanup(isp); omap3_isp_pipeline_destroy(&isp->viewfinder); omap3_isp_pipeline_destroy(&isp->snapshot); media_close(isp->mdev); @@ -1030,6 +1037,9 @@ static int __omap3_isp_viewfinder_start(struct omap3_isp_device *isp) OMAP3_ISP_EVENT_READ, omap3_isp_viewfinder_event, isp); + /* Start the statistics engine. */ + omap3_isp_stats_start(isp); + ret = omap3_isp_video_start(isp->viewfinder.output); if (ret < 0) { printf("error: streamon failed for viewfinder (%d)\n", ret); @@ -1046,6 +1056,8 @@ static int __omap3_isp_viewfinder_stop(struct omap3_isp_device *isp) isp->ops->unwatch_fd(isp->viewfinder.output->video->fd); + omap3_isp_stats_stop(isp); + ret = omap3_isp_video_stop(isp->viewfinder.output); if (ret < 0) { printf("error: streamoff failed for viewfinder\n"); |