summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWu-cheng Li <wuchengli@google.com>2012-03-13 03:18:08 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-03-13 03:18:08 -0700
commit0bd1733fe9cb887ce6d35bf7da99debd45401509 (patch)
treecf43b3dabd93d3d2143e6bc876e104d00f62eceb
parentcdaecc0a5b87f5a6bf508cbf583462445c4b8894 (diff)
parentda310a303b2b48404f31645cf660063517da3e8a (diff)
downloadhardware_ti_omap4xxx-0bd1733fe9cb887ce6d35bf7da99debd45401509.zip
hardware_ti_omap4xxx-0bd1733fe9cb887ce6d35bf7da99debd45401509.tar.gz
hardware_ti_omap4xxx-0bd1733fe9cb887ce6d35bf7da99debd45401509.tar.bz2
Merge "CameraHal: Omit 'apply3Adefaults()' during initialization"
-rw-r--r--camera/OMXCameraAdapter/OMX3A.cpp35
-rwxr-xr-xcamera/OMXCameraAdapter/OMXCameraAdapter.cpp4
-rw-r--r--camera/inc/OMXCameraAdapter/OMXCameraAdapter.h2
3 files changed, 4 insertions, 37 deletions
diff --git a/camera/OMXCameraAdapter/OMX3A.cpp b/camera/OMXCameraAdapter/OMX3A.cpp
index 3e26ac9..4cb4607 100644
--- a/camera/OMXCameraAdapter/OMX3A.cpp
+++ b/camera/OMXCameraAdapter/OMX3A.cpp
@@ -396,59 +396,26 @@ const char* OMXCameraAdapter::getLUTvalue_OMXtoHAL(int OMXValue, LUTtype LUT)
return NULL;
}
-status_t OMXCameraAdapter::apply3ADefaults(Gen3A_settings &Gen3A)
+status_t OMXCameraAdapter::init3AParams(Gen3A_settings &Gen3A)
{
- status_t ret = NO_ERROR;
-
LOG_FUNCTION_NAME;
Gen3A.Effect = getLUTvalue_HALtoOMX(OMXCameraAdapter::DEFAULT_EFFECT, EffLUT);
- ret |= setEffect(Gen3A);
-
Gen3A.FlashMode = getLUTvalue_HALtoOMX(OMXCameraAdapter::DEFAULT_FLASH_MODE, FlashLUT);
- ret |= setFlashMode(Gen3A);
-
Gen3A.SceneMode = getLUTvalue_HALtoOMX(OMXCameraAdapter::DEFAULT_SCENE_MODE, SceneLUT);
- ret |= setScene(Gen3A);
-
Gen3A.EVCompensation = atoi(OMXCameraAdapter::DEFAULT_EV_COMPENSATION);
- ret |= setEVCompensation(Gen3A);
-
Gen3A.Focus = getLUTvalue_HALtoOMX(OMXCameraAdapter::DEFAULT_FOCUS_MODE, FocusLUT);
- ret |= setFocusMode(Gen3A);
-
Gen3A.ISO = getLUTvalue_HALtoOMX(OMXCameraAdapter::DEFAULT_ISO_MODE, IsoLUT);
- ret |= setISO(Gen3A);
-
Gen3A.Flicker = getLUTvalue_HALtoOMX(OMXCameraAdapter::DEFAULT_ANTIBANDING, FlickerLUT);
- ret |= setFlicker(Gen3A);
-
Gen3A.Brightness = atoi(OMXCameraAdapter::DEFAULT_BRIGHTNESS);
- ret |= setBrightness(Gen3A);
-
Gen3A.Saturation = atoi(OMXCameraAdapter::DEFAULT_SATURATION) - SATURATION_OFFSET;
- ret |= setSaturation(Gen3A);
-
Gen3A.Sharpness = atoi(OMXCameraAdapter::DEFAULT_SHARPNESS) - SHARPNESS_OFFSET;
- ret |= setSharpness(Gen3A);
-
Gen3A.Contrast = atoi(OMXCameraAdapter::DEFAULT_CONTRAST) - CONTRAST_OFFSET;
- ret |= setContrast(Gen3A);
-
Gen3A.WhiteBallance = getLUTvalue_HALtoOMX(OMXCameraAdapter::DEFAULT_WB, WBalLUT);
- ret |= setWBMode(Gen3A);
-
Gen3A.Exposure = getLUTvalue_HALtoOMX(OMXCameraAdapter::DEFAULT_EXPOSURE_MODE, ExpLUT);
- ret |= setExposureMode(Gen3A);
-
Gen3A.ExposureLock = OMX_FALSE;
- ret |= setExposureLock(Gen3A);
-
Gen3A.FocusLock = OMX_FALSE;
- ret |= setFocusLock(Gen3A);
-
Gen3A.WhiteBalanceLock = OMX_FALSE;
- ret |= setWhiteBalanceLock(Gen3A);
LOG_FUNCTION_NAME_EXIT;
diff --git a/camera/OMXCameraAdapter/OMXCameraAdapter.cpp b/camera/OMXCameraAdapter/OMXCameraAdapter.cpp
index 8c4307c..12facc0 100755
--- a/camera/OMXCameraAdapter/OMXCameraAdapter.cpp
+++ b/camera/OMXCameraAdapter/OMXCameraAdapter.cpp
@@ -282,9 +282,9 @@ status_t OMXCameraAdapter::initialize(CameraProperties::Properties* caps)
memset(&mCameraAdapterParameters.mCameraPortParams[mCameraAdapterParameters.mPrevPortIndex], 0, sizeof(OMXCameraPortParameters));
//Initialize 3A defaults
- ret = apply3ADefaults(mParameters3A);
+ ret = init3AParams(mParameters3A);
if ( NO_ERROR != ret ) {
- CAMHAL_LOGEA("Couldn't apply 3A defaults!");
+ CAMHAL_LOGEA("Couldn't init 3A params!");
goto EXIT;
}
diff --git a/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h b/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h
index 2924b1c..6ab5ff1 100644
--- a/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h
+++ b/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h
@@ -636,7 +636,7 @@ private:
status_t sendCallBacks(CameraFrame frame, OMX_IN OMX_BUFFERHEADERTYPE *pBuffHeader, unsigned int mask, OMXCameraPortParameters *port);
status_t apply3Asettings( Gen3A_settings& Gen3A );
- status_t apply3ADefaults(Gen3A_settings &Gen3A);
+ status_t init3AParams(Gen3A_settings &Gen3A);
// AutoConvergence
status_t setAutoConvergence(OMX_TI_AUTOCONVERGENCEMODETYPE pACMode, OMX_S32 pManualConverence);