summaryrefslogtreecommitdiff
path: root/camera
diff options
context:
space:
mode:
authorMilen Mitkov <mmitkov@mm-sol.com>2011-10-12 11:35:08 +0300
committerIliyan Malchev <malchev@google.com>2011-10-19 10:10:54 -0700
commit61db8718454958a21d5b31282027db01a5c0de63 (patch)
treef7a853994c6582a7cee3a3389022a7ff3d85c653 /camera
parent11be32ce333557c09434611f69830e19aca55e72 (diff)
downloadomap4xxx-omapzoom-61db8718454958a21d5b31282027db01a5c0de63.tar.gz
CameraHAL: Set face prio when starting face detection
We don't need to set the exposure mode when starting face detection, just enable face priority. Previously, this caused the exposure mode for a given scene to be overwritten. Change-Id: I4bad4c9846b7d225f8f1bf346fdc3dac1b16ca1b Signed-off-by: Milen Mitkov <mmitkov@mm-sol.com>
Diffstat (limited to 'camera')
-rw-r--r--camera/OMXCameraAdapter/OMX3A.cpp14
-rw-r--r--camera/OMXCameraAdapter/OMXFD.cpp24
2 files changed, 10 insertions, 28 deletions
diff --git a/camera/OMXCameraAdapter/OMX3A.cpp b/camera/OMXCameraAdapter/OMX3A.cpp
index 3e2325bc..59b30778 100644
--- a/camera/OMXCameraAdapter/OMX3A.cpp
+++ b/camera/OMXCameraAdapter/OMX3A.cpp
@@ -415,20 +415,6 @@ status_t OMXCameraAdapter::setExposureMode(Gen3A_settings& Gen3A)
exp.nPortIndex = OMX_ALL;
exp.eExposureControl = (OMX_EXPOSURECONTROLTYPE)Gen3A.Exposure;
- if ( mFaceDetectionRunning )
- {
- //Disable Region priority and enable Face priority
- setAlgoPriority(REGION_PRIORITY, EXPOSURE_ALGO, false);
- setAlgoPriority(FACE_PRIORITY, EXPOSURE_ALGO, true);
- }
- else
-
- {
- //Disable Region priority and Face priority
- setAlgoPriority(REGION_PRIORITY, EXPOSURE_ALGO, false);
- setAlgoPriority(FACE_PRIORITY, EXPOSURE_ALGO, false);
- }
-
eError = OMX_SetConfig(mCameraAdapterParameters.mHandleComp,
OMX_IndexConfigCommonExposure,
&exp);
diff --git a/camera/OMXCameraAdapter/OMXFD.cpp b/camera/OMXCameraAdapter/OMXFD.cpp
index 245e24c8..92b9af45 100644
--- a/camera/OMXCameraAdapter/OMXFD.cpp
+++ b/camera/OMXCameraAdapter/OMXFD.cpp
@@ -62,11 +62,16 @@ status_t OMXCameraAdapter::startFaceDetection()
goto out;
}
- // Set 3A modes to face priority
- ret = setExposureMode(mParameters3A);
- if (ret != NO_ERROR) {
- goto out;
- }
+ if ( mFaceDetectionRunning )
+ {
+ //Disable region priority and enable face priority for AF
+ setAlgoPriority(REGION_PRIORITY, FOCUS_ALGO, false);
+ setAlgoPriority(FACE_PRIORITY, FOCUS_ALGO , true);
+
+ //Disable Region priority and enable Face priority
+ setAlgoPriority(REGION_PRIORITY, EXPOSURE_ALGO, false);
+ setAlgoPriority(FACE_PRIORITY, EXPOSURE_ALGO, true);
+ }
// Note: White balance will not be face prioritized, since
// the algorithm needs full frame statistics, and not face
@@ -199,15 +204,6 @@ status_t OMXCameraAdapter::setFaceDetection(bool enable, OMX_U32 orientation)
mFaceDetectionPaused = !enable;
}
- if ( enable )
- {
- //Disable region priority first
- setAlgoPriority(REGION_PRIORITY, FOCUS_ALGO, false);
-
- //Enable face algorithm priority for focus
- setAlgoPriority(FACE_PRIORITY, FOCUS_ALGO , true);
- }
-
LOG_FUNCTION_NAME_EXIT;
return ret;