diff options
author | Tyler Luu <tluu@ti.com> | 2011-10-13 12:29:59 -0500 |
---|---|---|
committer | Iliyan Malchev <malchev@google.com> | 2011-10-15 13:44:35 -0700 |
commit | 517107e1d948fe9268ed51b3baff64891d9b0c20 (patch) | |
tree | 89e74d79c83aef67bd5e4fd8257532966366911e /camera/OMXCameraAdapter | |
parent | e552120201f0e53a6e5c9f816e91739dc4ec1e0b (diff) | |
download | hardware_ti_omap4xxx-517107e1d948fe9268ed51b3baff64891d9b0c20.zip hardware_ti_omap4xxx-517107e1d948fe9268ed51b3baff64891d9b0c20.tar.gz hardware_ti_omap4xxx-517107e1d948fe9268ed51b3baff64891d9b0c20.tar.bz2 |
CameraHal: Allow EV compensation w/ preset scene
CameraHal was previously ignoring EV compensation when a scene mode
was set.
Change-Id: I15023a5c6019ca333a4ce40f178a8e4ef53be387
Signed-off-by: Tyler Luu <tluu@ti.com>
Diffstat (limited to 'camera/OMXCameraAdapter')
-rw-r--r-- | camera/OMXCameraAdapter/OMX3A.cpp | 26 | ||||
-rw-r--r-- | camera/OMXCameraAdapter/OMXCameraAdapter.cpp | 2 |
2 files changed, 16 insertions, 12 deletions
diff --git a/camera/OMXCameraAdapter/OMX3A.cpp b/camera/OMXCameraAdapter/OMX3A.cpp index 17cd43c..b5416ca 100644 --- a/camera/OMXCameraAdapter/OMX3A.cpp +++ b/camera/OMXCameraAdapter/OMX3A.cpp @@ -63,7 +63,12 @@ status_t OMXCameraAdapter::setParameters3A(const CameraParameters ¶ms, // set preset scene mode immediately instead of in next FBD // for feedback params to work properly since they need to be read // by application in subsequent getParameters() - return setScene(mParameters3A); + ret |= setScene(mParameters3A); + // re-apply EV compensation after setting scene mode since it probably reset it + if(mParameters3A.EVCompensation) { + setEVCompensation(mParameters3A); + } + return ret; } else { mPending3Asettings |= SetSceneMode; } @@ -681,7 +686,6 @@ status_t OMXCameraAdapter::setScene(Gen3A_settings& Gen3A) // Get preset scene mode feedback getFocusMode(Gen3A); getFlashMode(Gen3A); - getEVCompensation(Gen3A); getWBMode(Gen3A); // TODO(XXX): Re-enable these for mainline @@ -1534,16 +1538,18 @@ status_t OMXCameraAdapter::apply3Asettings( Gen3A_settings& Gen3A ) * There is only one exception to this rule, * the manual a.k.a. auto scene. */ - if ( ( SetSceneMode & mPending3Asettings ) ) - { + if (SetSceneMode & mPending3Asettings) { mPending3Asettings &= ~SetSceneMode; - return setScene(Gen3A); - } - else if ( OMX_Manual != Gen3A.SceneMode ) - { - mPending3Asettings = 0; - return NO_ERROR; + ret |= setScene(Gen3A); + // re-apply EV compensation after setting scene mode since it probably reset it + if(Gen3A.EVCompensation) { + setEVCompensation(Gen3A); } + return ret; + } else if (OMX_Manual != Gen3A.SceneMode) { + // only certain settings are allowed when scene mode is set + mPending3Asettings &= SetEVCompensation; + } for( currSett = 1; currSett < E3aSettingMax; currSett <<= 1) { diff --git a/camera/OMXCameraAdapter/OMXCameraAdapter.cpp b/camera/OMXCameraAdapter/OMXCameraAdapter.cpp index 3730bc2..00212d5 100644 --- a/camera/OMXCameraAdapter/OMXCameraAdapter.cpp +++ b/camera/OMXCameraAdapter/OMXCameraAdapter.cpp @@ -621,8 +621,6 @@ void OMXCameraAdapter::getParameters(CameraParameters& params) const char *valstr = NULL; LOG_FUNCTION_NAME; - params.set(CameraParameters::KEY_EXPOSURE_COMPENSATION, mParameters3A.EVCompensation); - valstr = getLUTvalue_OMXtoHAL(mParameters3A.WhiteBallance, WBalLUT); if (valstr) params.set(CameraParameters::KEY_WHITE_BALANCE , valstr); |