summaryrefslogtreecommitdiffstats
path: root/libcamera
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2011-11-15 15:40:57 -0800
committerJames Dong <jdong@google.com>2011-11-15 15:40:57 -0800
commit392e1b8bfad0f58bc8643716643bdd7d806129fd (patch)
tree9ecf8e9ed2f7da3ced502fa136f19ab303dc3e11 /libcamera
parentb49137aad4a13d6b56374c7eec2e942765dbdc02 (diff)
parentc62dbe3e7f110f2d5790ff09f74eb002460aa5da (diff)
downloaddevice_samsung_crespo-392e1b8bfad0f58bc8643716643bdd7d806129fd.zip
device_samsung_crespo-392e1b8bfad0f58bc8643716643bdd7d806129fd.tar.gz
device_samsung_crespo-392e1b8bfad0f58bc8643716643bdd7d806129fd.tar.bz2
resolved conflicts for merge of c62dbe3e to master
Change-Id: Id9e1b41c46f26f3926a52834f4643898f6bafaa4
Diffstat (limited to 'libcamera')
-rwxr-xr-xlibcamera/SecCameraHWInterface.cpp19
-rw-r--r--libcamera/SecCameraHWInterface.h1
2 files changed, 4 insertions, 16 deletions
diff --git a/libcamera/SecCameraHWInterface.cpp b/libcamera/SecCameraHWInterface.cpp
index 560bdbd..0c320e2 100755
--- a/libcamera/SecCameraHWInterface.cpp
+++ b/libcamera/SecCameraHWInterface.cpp
@@ -77,7 +77,6 @@ CameraHardwareSec::CameraHardwareSec(int cameraId, camera_device_t *dev)
:
mCaptureInProgress(false),
mParameters(),
- mFrameSizeDelta(0),
mCameraSensorName(NULL),
mSkipFrame(0),
mNotifyCb(0),
@@ -181,7 +180,7 @@ void CameraHardwareSec::initDefaultParameters(int cameraId)
previewColorString = CameraParameters::PIXEL_FORMAT_YUV420SP;
previewColorString.append(",");
previewColorString.append(CameraParameters::PIXEL_FORMAT_YUV420P);
- p.setPreviewFormat(CameraParameters::PIXEL_FORMAT_YUV420SP); mFrameSizeDelta = 16;
+ p.setPreviewFormat(CameraParameters::PIXEL_FORMAT_YUV420SP);
p.set(CameraParameters::KEY_SUPPORTED_PREVIEW_FORMATS, previewColorString.string());
p.set(CameraParameters::KEY_VIDEO_FRAME_FORMAT, CameraParameters::PIXEL_FORMAT_YUV420P);
p.setPreviewSize(preview_max_width, preview_max_height);
@@ -403,8 +402,7 @@ status_t CameraHardwareSec::setPreviewWindow(preview_stream_ops *w)
int hal_pixel_format = HAL_PIXEL_FORMAT_YV12;
const char *str_preview_format = mParameters.getPreviewFormat();
- ALOGV("%s: preview format %s", __func__, str_preview_format);
- mFrameSizeDelta = 16;
+ LOGV("%s: preview format %s", __func__, str_preview_format);
if (w->set_usage(w, GRALLOC_USAGE_SW_WRITE_OFTEN)) {
LOGE("%s: could not set usage on gralloc buffer", __func__);
@@ -541,14 +539,7 @@ int CameraHardwareSec::previewThread()
mSecCamera->getPreviewSize(&width, &height, &frame_size);
- offset = (frame_size + mFrameSizeDelta) * index;
-
-#if 0 // FIXME: this does not seem to be necessary. Is it?
- memcpy((char *)mPreviewHeap->data + offset + frame_size,
- &phyYAddr, 4);
- memcpy((char *)mPreviewHeap->data + offset + frame_size + 4,
- &phyCAddr, 4);
-#endif
+ offset = frame_size * index;
if (mPreviewWindow && mGrallocHal) {
buffer_handle_t *buf_handle;
@@ -564,7 +555,6 @@ int CameraHardwareSec::previewThread()
GRALLOC_USAGE_SW_WRITE_OFTEN,
0, 0, width, height, &vaddr)) {
char *frame = ((char *)mPreviewHeap->data) + offset;
- int total = frame_size + mFrameSizeDelta;
// the code below assumes YUV, not RGB
{
@@ -723,7 +713,7 @@ status_t CameraHardwareSec::startPreviewInternal()
mSecCamera->getPreviewSize(&width, &height, &frame_size);
LOGD("mPreviewHeap(fd(%d), size(%d), width(%d), height(%d))",
- mSecCamera->getCameraFd(), frame_size + mFrameSizeDelta, width, height);
+ mSecCamera->getCameraFd(), frame_size, width, height);
if (mPreviewHeap) {
mPreviewHeap->release(mPreviewHeap);
mPreviewHeap = 0;
@@ -1582,7 +1572,6 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
new_str_preview_format != NULL &&
isSupportedPreviewSize(new_preview_width, new_preview_height)) {
int new_preview_format = V4L2_PIX_FMT_YUV420;
- mFrameSizeDelta = 16;
int current_preview_width, current_preview_height, current_frame_size;
mSecCamera->getPreviewSize(&current_preview_width,
diff --git a/libcamera/SecCameraHWInterface.h b/libcamera/SecCameraHWInterface.h
index 3254b7b..e99aff6 100644
--- a/libcamera/SecCameraHWInterface.h
+++ b/libcamera/SecCameraHWInterface.h
@@ -179,7 +179,6 @@ private:
CameraParameters mParameters;
CameraParameters mInternalParameters;
- int mFrameSizeDelta;
camera_memory_t *mPreviewHeap;
camera_memory_t *mRawHeap;
camera_memory_t *mRecordHeap;