diff options
author | Simon Wilson <simonwilson@google.com> | 2010-10-28 19:01:28 -0700 |
---|---|---|
committer | Simon Wilson <simonwilson@google.com> | 2010-10-28 19:04:33 -0700 |
commit | 256aeac7371b52c1914fac874e4d2f303068ed93 (patch) | |
tree | cc63a06cec70303c756025ddf0276ec12cc9c9f4 /libcamera | |
parent | f0c73eb5ea617aa4f95da1bd583fef280220a304 (diff) | |
download | device_samsung_crespo-256aeac7371b52c1914fac874e4d2f303068ed93.zip device_samsung_crespo-256aeac7371b52c1914fac874e4d2f303068ed93.tar.gz device_samsung_crespo-256aeac7371b52c1914fac874e4d2f303068ed93.tar.bz2 |
libcamera: only show postview if preview size is VGA
The camera sensors do not support postview sizes any other
than VGA, so if preview size is not VGA, skip showing the
postview.
Change-Id: Iae984e214a80f33e58fa4b8ec42bcdb1c33fae74
Diffstat (limited to 'libcamera')
-rw-r--r-- | libcamera/SecCameraHWInterface.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libcamera/SecCameraHWInterface.cpp b/libcamera/SecCameraHWInterface.cpp index cb871d2..b0dedb5 100644 --- a/libcamera/SecCameraHWInterface.cpp +++ b/libcamera/SecCameraHWInterface.cpp @@ -1150,6 +1150,14 @@ int CameraHardwareSec::pictureThread() unsigned int index = 0; unsigned int offset = ((mPostViewWidth*mPostViewHeight*3/2) + 16) * index; unsigned int overlay_header[4]; + + // Only show postview image if size is VGA since sensor cannot deliver + // any other sizes. + int previewWidth, previewHeight, previewSize; + mSecCamera->getPreviewSize(&previewWidth, &previewHeight, &previewSize); + if ((previewWidth != 640) || (previewHeight != 480)) + goto PostviewOverlayEnd; + mOverlayBufferIdx ^= 1; overlay_header[0]= mSecCamera->getPhyAddrY(index); overlay_header[1]= overlay_header[0] + mPostViewWidth*mPostViewHeight; |