diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-10-23 04:08:15 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2013-02-11 00:21:25 +0100 |
commit | b2da4996582313c07f63922f634c9f4fdc3bd342 (patch) | |
tree | 93f1177ff79fd92ab48ec0b0555d27bb0d501dca | |
parent | cbd64859e6c1509b0f2ee7728cb66b120d52c45e (diff) |
isp: Support raw viewfinder formats
Capture at the CCDC output if the requested viewfinder format is not a
YUV format, and at the resizer output otherwise.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rw-r--r-- | isp/omap3isp.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/isp/omap3isp.c b/isp/omap3isp.c index ef6350a..7da0bf2 100644 --- a/isp/omap3isp.c +++ b/isp/omap3isp.c @@ -1125,9 +1125,21 @@ int omap3_isp_viewfinder_setup(struct omap3_isp_device *isp, struct omap3_isp_pool *pool; int ret; - ret = omap3_isp_pipeline_build(isp, &isp->viewfinder, ":SENSOR", - ENTITY_CCDC, ENTITY_PREVIEW, ENTITY_RESIZER, - ENTITY_RESIZER_OUTPUT, NULL); + /* Build the pipeline. Capture on the CCDC output for raw formats and on + * on the resizer output for YUV formats. + */ + switch (ofmt->code) { + case V4L2_MBUS_FMT_UYVY8_1X16: + case V4L2_MBUS_FMT_YUYV8_1X16: + ret = omap3_isp_pipeline_build(isp, &isp->viewfinder, ":SENSOR", + ENTITY_CCDC, ENTITY_PREVIEW, ENTITY_RESIZER, + ENTITY_RESIZER_OUTPUT, NULL); + break; + default: + ret = omap3_isp_pipeline_build(isp, &isp->viewfinder, ":SENSOR", + ENTITY_CCDC, ENTITY_CCDC_OUTPUT, NULL); + break; + } if (ret < 0) { printf("error: unable to build viewfinder pipeline (%d)\n", ret); return ret; |