summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunita Nadampalli <sunitan@ti.com>2014-07-09 12:15:26 -0500
committerSunita Nadampalli <sunitan@ti.com>2014-07-09 12:15:26 -0500
commita9d10a01194ab30f74597be54b9d5e3846df0e6a (patch)
treee25caca908b058c61425f70c8df69da9a6c014b3
parentff89602659d12af0d1cced2962494b306c230980 (diff)
downloadomap4xxx-omapzoom-d-kitkat-mr1-release.tar.gz
cameraHAL: enable LI (OV10633) camera preview with VIP dmabuf moded-kitkat-mr1-release
This patch enables LI (OV10633) camera preview with VIP dma buf mode. Change-Id: I16d2890af93819c39c249a7169e90fb85261900f Signed-off-by: Sunita Nadampalli <sunitan@ti.com> Signed-off-by: Rakesh Movva <r-movva@ti.com> Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
-rwxr-xr-xcamera/V4LCameraAdapter/V4LCameraAdapter.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/camera/V4LCameraAdapter/V4LCameraAdapter.cpp b/camera/V4LCameraAdapter/V4LCameraAdapter.cpp
index 9d8a1159..70021162 100755
--- a/camera/V4LCameraAdapter/V4LCameraAdapter.cpp
+++ b/camera/V4LCameraAdapter/V4LCameraAdapter.cpp
@@ -1589,8 +1589,10 @@ int V4LCameraAdapter::previewThread()
if (mPixelFormat == V4L2_PIX_FMT_YUYV) {
if (mDeinterlaceEnabled)
retVal = processFrame(fp, width, height, width, "yuyv", (void*)(*(buffer_handle_t*)(buffer->opaque)), width, height, PAGE_SIZE, "nv12", mDeinterlaceEnabled, 1, index, &in_index, &out_index);
- else
- convertYUV422ToNV12Tiler(reinterpret_cast<unsigned char*>(fp), &(buffer->ycbcr), width, height);
+ else {
+ convertYUV422ToNV12Tiler(reinterpret_cast<unsigned char*>(((CameraBuffer*)fp)->mapped), &(buffer->ycbcr), width, height);
+ out_index = index;
+ }
if (retVal || mDeinterlaceEnabled) {
if (out_index == -1 || in_index == -1)
return 0;
@@ -1609,7 +1611,7 @@ int V4LCameraAdapter::previewThread()
android::Mutex::Autolock lock(mSubscriberLock);
frame.mFrameType = CameraFrame::PREVIEW_FRAME_SYNC;
- frame.mBuffer = mPreviewBufs[out_index];;
+ frame.mBuffer = mPreviewBufs[out_index];
frame.mLength = width*height*3/2;
frame.mAlignment = stride;
frame.mOffset = 0;