summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2012-10-24 01:47:31 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2013-02-11 00:21:25 +0100
commit0048b16618a94c3c002bb620e5d5503039853a43 (patch)
treeb14380c93f2c52eca9b3bb593be7c50a6bd55d06
parentb2da4996582313c07f63922f634c9f4fdc3bd342 (diff)
isp: Add crop support for the viewfinder
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rw-r--r--isp/omap3isp.c3
-rw-r--r--isp/omap3isp.h1
-rw-r--r--live.c2
-rw-r--r--snapshot.c2
4 files changed, 5 insertions, 3 deletions
diff --git a/isp/omap3isp.c b/isp/omap3isp.c
index 7da0bf2..20ef13d 100644
--- a/isp/omap3isp.c
+++ b/isp/omap3isp.c
@@ -1120,6 +1120,7 @@ static int omap3_isp_viewfinder_setup_pipeline(struct omap3_isp_device *isp)
}
int omap3_isp_viewfinder_setup(struct omap3_isp_device *isp,
+ struct v4l2_rect *crop,
struct v4l2_mbus_framefmt *ofmt)
{
struct omap3_isp_pool *pool;
@@ -1149,7 +1150,7 @@ int omap3_isp_viewfinder_setup(struct omap3_isp_device *isp,
/* Try the format. */
ret = omap3_isp_pipeline_try_format(isp, &isp->viewfinder,
- &isp->sensor.format, ofmt, NULL);
+ &isp->sensor.format, ofmt, crop);
if (ret < 0)
return ret;
diff --git a/isp/omap3isp.h b/isp/omap3isp.h
index 491dcdb..26e5062 100644
--- a/isp/omap3isp.h
+++ b/isp/omap3isp.h
@@ -65,6 +65,7 @@ void omap3_isp_close(struct omap3_isp_device *isp);
/* Viewfinder */
int omap3_isp_viewfinder_setup(struct omap3_isp_device *isp,
+ struct v4l2_rect *crop,
struct v4l2_mbus_framefmt *ofmt);
int omap3_isp_viewfinder_set_pool(struct omap3_isp_device *isp,
struct v4l2_buffers_pool *pool);
diff --git a/live.c b/live.c
index 47e04d2..d1785da 100644
--- a/live.c
+++ b/live.c
@@ -300,7 +300,7 @@ static int viewfinder_init(struct omap3_isp_device *isp,
view_format.width = rect->width;
view_format.height = rect->height;
- ret = omap3_isp_viewfinder_setup(isp, &view_format);
+ ret = omap3_isp_viewfinder_setup(isp, NULL, &view_format);
if (ret < 0) {
printf("error: unable to setup viewfinder\n");
return ret;
diff --git a/snapshot.c b/snapshot.c
index 878d4bf..a2ab58e 100644
--- a/snapshot.c
+++ b/snapshot.c
@@ -316,7 +316,7 @@ static int viewfinder_init(struct omap3_isp_device *isp)
view_format.width = VIEWFINDER_WIDTH;
view_format.height = VIEWFINDER_HEIGHT;
- ret = omap3_isp_viewfinder_setup(isp, &view_format);
+ ret = omap3_isp_viewfinder_setup(isp, NULL, &view_format);
if (ret < 0) {
printf("error: unable to setup pipeline\n");
return ret;