diff options
author | Kalpesh Patil <kalpeshpatil@ti.com> | 2011-08-12 09:27:52 +0530 |
---|---|---|
committer | Iliyan Malchev <malchev@google.com> | 2011-08-12 16:04:50 -0700 |
commit | cdeb4bffa1685907cbdd64cfbf372409c3b20b36 (patch) | |
tree | 83cc128cf3081759348b0ea718eb2df4ed97637e /camera/CameraHal.cpp | |
parent | ba9c1504171d4455f0616c317a1bc42e38f1feb9 (diff) | |
download | hardware_ti_omap4xxx-cdeb4bffa1685907cbdd64cfbf372409c3b20b36.zip hardware_ti_omap4xxx-cdeb4bffa1685907cbdd64cfbf372409c3b20b36.tar.gz hardware_ti_omap4xxx-cdeb4bffa1685907cbdd64cfbf372409c3b20b36.tar.bz2 |
Camera Hal : Enable VSTAB & VNF for Front Camera
This patch enables of VSTAB & VNF for Front Camera.
The issue with VSTAB & VNF for Front Camera for 720p resolution
has been resolved on Ducati side.
So patch-I28a81696 is being reverted by this patch.
Change-Id: Ie723b2e2a59d0dec7aefd5c9362e24b0dd2f5562
Signed-Off-By: Kalpesh Patil <kalpeshpatil@ti.com>
Diffstat (limited to 'camera/CameraHal.cpp')
-rwxr-xr-x | camera/CameraHal.cpp | 67 |
1 files changed, 31 insertions, 36 deletions
diff --git a/camera/CameraHal.cpp b/camera/CameraHal.cpp index 53bc377..84a52a6 100755 --- a/camera/CameraHal.cpp +++ b/camera/CameraHal.cpp @@ -1654,44 +1654,39 @@ status_t CameraHal::setVideoModeParameters() restartPreviewRequired = true; } - // FIXME: This check is put since currently VSTAB and VNF are functional only for Primary Camera. - // Remove this check once VSTAB and VNF are functional for Secondary Camera as well. - if(mCameraIndex == 0) - { - // Check if CAPTURE_MODE is VIDEO_MODE, since VSTAB & VNF work only in VIDEO_MODE. - valstr = mParameters.get(TICameraParameters::KEY_CAP_MODE); - if (strcmp(valstr, (const char *) TICameraParameters::VIDEO_MODE) == 0) - { - // Enable VSTAB, if not enabled already - valstr = mParameters.get(TICameraParameters::KEY_VSTAB); - if ( (valstr == NULL) || - ( (valstr != NULL) && (strcmp(valstr, "1") != 0) ) ) - { - CAMHAL_LOGDA("Enable VSTAB"); - mParameters.set(TICameraParameters::KEY_VSTAB, "1"); - restartPreviewRequired = true; - } + // Check if CAPTURE_MODE is VIDEO_MODE, since VSTAB & VNF work only in VIDEO_MODE. + valstr = mParameters.get(TICameraParameters::KEY_CAP_MODE); + if (strcmp(valstr, (const char *) TICameraParameters::VIDEO_MODE) == 0) + { + // Enable VSTAB, if not enabled already + valstr = mParameters.get(TICameraParameters::KEY_VSTAB); + if ( (valstr == NULL) || + ( (valstr != NULL) && (strcmp(valstr, "1") != 0) ) ) + { + CAMHAL_LOGDA("Enable VSTAB"); + mParameters.set(TICameraParameters::KEY_VSTAB, "1"); + restartPreviewRequired = true; + } - // Enable VNF, if not enabled already - valstr = mParameters.get(TICameraParameters::KEY_VNF); - if ( (valstr == NULL) || - ( (valstr != NULL) && (strcmp(valstr, "1") != 0) ) ) - { - CAMHAL_LOGDA("Enable VNF"); - mParameters.set(TICameraParameters::KEY_VNF, "1"); - restartPreviewRequired = true; - } + // Enable VNF, if not enabled already + valstr = mParameters.get(TICameraParameters::KEY_VNF); + if ( (valstr == NULL) || + ( (valstr != NULL) && (strcmp(valstr, "1") != 0) ) ) + { + CAMHAL_LOGDA("Enable VNF"); + mParameters.set(TICameraParameters::KEY_VNF, "1"); + restartPreviewRequired = true; + } - // For VSTAB alone for 1080p resolution, padded width goes > 2048, which cannot be rendered by GPU. - // In such case, there is support in Ducati for combination of VSTAB & VNF requiring padded width < 2048. - // So we are forcefully enabling VNF, if VSTAB is enabled for 1080p resolution. - valstr = mParameters.get(TICameraParameters::KEY_VSTAB); - if ((valstr != NULL) && (strcmp(valstr, "1") == 0) && (mPreviewWidth == 1920)) - { - CAMHAL_LOGDA("Force Enable VNF for 1080p"); - mParameters.set(TICameraParameters::KEY_VNF, "1"); - restartPreviewRequired = true; - } + // For VSTAB alone for 1080p resolution, padded width goes > 2048, which cannot be rendered by GPU. + // In such case, there is support in Ducati for combination of VSTAB & VNF requiring padded width < 2048. + // So we are forcefully enabling VNF, if VSTAB is enabled for 1080p resolution. + valstr = mParameters.get(TICameraParameters::KEY_VSTAB); + if ((valstr != NULL) && (strcmp(valstr, "1") == 0) && (mPreviewWidth == 1920)) + { + CAMHAL_LOGDA("Force Enable VNF for 1080p"); + mParameters.set(TICameraParameters::KEY_VNF, "1"); + restartPreviewRequired = true; } } |