From e2f0eb0417d31e691c24b7434f30b755963c349c Mon Sep 17 00:00:00 2001 From: Kyle Repinski Date: Fri, 9 Jan 2015 15:02:10 -0600 Subject: camera: Remove a lot of cruft tuna doesn't need/support. Looks kinda messy, but runtime results are better. Signed-off-by: Kyle Repinski --- camera/CameraHal.cpp | 27 ++++++++++++++-------- camera/CameraParameters.cpp | 6 +++++ camera/OMXCameraAdapter/OMX3A.cpp | 6 +++++ camera/OMXCameraAdapter/OMXCameraAdapter.cpp | 4 ++-- camera/OMXCameraAdapter/OMXCapabilities.cpp | 32 ++++++++++++++++++++++++++ camera/OMXCameraAdapter/OMXDefaults.cpp | 16 +++++++------ camera/TICameraParameters.cpp | 8 +++++++ camera/inc/CameraProperties.h | 6 +++++ camera/inc/OMXCameraAdapter/OMXCameraAdapter.h | 18 +++++++++++++++ camera/inc/TICameraParameters.h | 8 +++++++ 10 files changed, 112 insertions(+), 19 deletions(-) (limited to 'camera') diff --git a/camera/CameraHal.cpp b/camera/CameraHal.cpp index 1c1cc6f..a1920c5 100644 --- a/camera/CameraHal.cpp +++ b/camera/CameraHal.cpp @@ -528,9 +528,12 @@ int CameraHal::setParameters(const android::CameraParameters& params) } if ( (!isResolutionValid(w, h, mCameraProperties->get(CameraProperties::SUPPORTED_PREVIEW_SIZES))) +#ifndef OMAP_TUNA && (!isResolutionValid(w, h, mCameraProperties->get(CameraProperties::SUPPORTED_PREVIEW_SUBSAMPLED_SIZES))) && (!isResolutionValid(w, h, mCameraProperties->get(CameraProperties::SUPPORTED_PREVIEW_SIDEBYSIDE_SIZES))) - && (!isResolutionValid(w, h, mCameraProperties->get(CameraProperties::SUPPORTED_PREVIEW_TOPBOTTOM_SIZES))) ) { + && (!isResolutionValid(w, h, mCameraProperties->get(CameraProperties::SUPPORTED_PREVIEW_TOPBOTTOM_SIZES))) +#endif + ) { CAMHAL_LOGEB("Invalid preview resolution %d x %d", w, h); return BAD_VALUE; } @@ -584,9 +587,12 @@ int CameraHal::setParameters(const android::CameraParameters& params) params.getPictureSize(&w, &h); if ( (isResolutionValid(w, h, mCameraProperties->get(CameraProperties::SUPPORTED_PICTURE_SIZES))) +#ifndef OMAP_TUNA || (isResolutionValid(w, h, mCameraProperties->get(CameraProperties::SUPPORTED_PICTURE_SUBSAMPLED_SIZES))) || (isResolutionValid(w, h, mCameraProperties->get(CameraProperties::SUPPORTED_PICTURE_TOPBOTTOM_SIZES))) - || (isResolutionValid(w, h, mCameraProperties->get(CameraProperties::SUPPORTED_PICTURE_SIDEBYSIDE_SIZES))) ) { + || (isResolutionValid(w, h, mCameraProperties->get(CameraProperties::SUPPORTED_PICTURE_SIDEBYSIDE_SIZES))) +#endif + ) { mParameters.setPictureSize(w, h); } else { CAMHAL_LOGEB("ERROR: Invalid picture resolution %d x %d", w, h); @@ -726,6 +732,7 @@ int CameraHal::setParameters(const android::CameraParameters& params) } } +#ifndef OMAP_TUNA if((valstr = params.get(TICameraParameters::KEY_MECHANICAL_MISALIGNMENT_CORRECTION)) != NULL) { if ( strcmp(mCameraProperties->get(CameraProperties::MECHANICAL_MISALIGNMENT_CORRECTION_SUPPORTED), android::CameraParameters::TRUE) == 0 ) { @@ -735,6 +742,7 @@ int CameraHal::setParameters(const android::CameraParameters& params) mParameters.remove(TICameraParameters::KEY_MECHANICAL_MISALIGNMENT_CORRECTION); } } +#endif if ((valstr = params.get(TICameraParameters::KEY_EXPOSURE_MODE)) != NULL) { if (isParameterValid(valstr, mCameraProperties->get(CameraProperties::SUPPORTED_EXPOSURE_MODES))) { @@ -4005,12 +4013,14 @@ void CameraHal::insertSupportedParams() p.set(android::CameraParameters::KEY_SUPPORTED_PICTURE_FORMATS, mCameraProperties->get(CameraProperties::SUPPORTED_PICTURE_FORMATS)); p.set(android::CameraParameters::KEY_SUPPORTED_PREVIEW_SIZES, mCameraProperties->get(CameraProperties::SUPPORTED_PREVIEW_SIZES)); p.set(android::CameraParameters::KEY_SUPPORTED_PREVIEW_FORMATS, mCameraProperties->get(CameraProperties::SUPPORTED_PREVIEW_FORMATS)); +#ifndef OMAP_TUNA p.set(TICameraParameters::KEY_SUPPORTED_PICTURE_SUBSAMPLED_SIZES, mCameraProperties->get(CameraProperties::SUPPORTED_PICTURE_SUBSAMPLED_SIZES)); p.set(TICameraParameters::KEY_SUPPORTED_PICTURE_SIDEBYSIDE_SIZES, mCameraProperties->get(CameraProperties::SUPPORTED_PICTURE_SIDEBYSIDE_SIZES)); p.set(TICameraParameters::KEY_SUPPORTED_PICTURE_TOPBOTTOM_SIZES, mCameraProperties->get(CameraProperties::SUPPORTED_PICTURE_TOPBOTTOM_SIZES)); p.set(TICameraParameters::KEY_SUPPORTED_PREVIEW_SUBSAMPLED_SIZES, mCameraProperties->get(CameraProperties::SUPPORTED_PREVIEW_SUBSAMPLED_SIZES)); p.set(TICameraParameters::KEY_SUPPORTED_PREVIEW_SIDEBYSIDE_SIZES, mCameraProperties->get(CameraProperties::SUPPORTED_PREVIEW_SIDEBYSIDE_SIZES)); p.set(TICameraParameters::KEY_SUPPORTED_PREVIEW_TOPBOTTOM_SIZES, mCameraProperties->get(CameraProperties::SUPPORTED_PREVIEW_TOPBOTTOM_SIZES)); +#endif p.set(android::CameraParameters::KEY_SUPPORTED_PREVIEW_FRAME_RATES, mCameraProperties->get(CameraProperties::SUPPORTED_PREVIEW_FRAME_RATES)); p.set(TICameraParameters::KEY_FRAMERATES_EXT_SUPPORTED, mCameraProperties->get(CameraProperties::SUPPORTED_PREVIEW_FRAME_RATES_EXT)); p.set(android::CameraParameters::KEY_SUPPORTED_PREVIEW_FPS_RANGE, mCameraProperties->get(CameraProperties::FRAMERATE_RANGE_SUPPORTED)); @@ -4051,7 +4061,9 @@ void CameraHal::insertSupportedParams() p.set(android::CameraParameters::KEY_AUTO_EXPOSURE_LOCK_SUPPORTED, mCameraProperties->get(CameraProperties::AUTO_EXPOSURE_LOCK_SUPPORTED)); p.set(android::CameraParameters::KEY_AUTO_WHITEBALANCE_LOCK_SUPPORTED, mCameraProperties->get(CameraProperties::AUTO_WHITEBALANCE_LOCK_SUPPORTED)); p.set(android::CameraParameters::KEY_VIDEO_SNAPSHOT_SUPPORTED, mCameraProperties->get(CameraProperties::VIDEO_SNAPSHOT_SUPPORTED)); +#ifndef OMAP_TUNA p.set(TICameraParameters::KEY_MECHANICAL_MISALIGNMENT_CORRECTION_SUPPORTED, mCameraProperties->get(CameraProperties::MECHANICAL_MISALIGNMENT_CORRECTION_SUPPORTED)); +#endif p.set(TICameraParameters::KEY_CAP_MODE_VALUES, mCameraProperties->get(CameraProperties::CAP_MODE_VALUES)); LOG_FUNCTION_NAME_EXIT; @@ -4155,7 +4167,9 @@ void CameraHal::initDefaultParameters() p.set(android::CameraParameters::KEY_VIDEO_FRAME_FORMAT, "OMX_TI_COLOR_FormatYUV420PackedSemiPlanar"); p.set(android::CameraParameters::KEY_MAX_NUM_DETECTED_FACES_HW, mCameraProperties->get(CameraProperties::MAX_FD_HW_FACES)); p.set(android::CameraParameters::KEY_MAX_NUM_DETECTED_FACES_SW, mCameraProperties->get(CameraProperties::MAX_FD_SW_FACES)); +#ifndef OMAP_TUNA p.set(TICameraParameters::KEY_MECHANICAL_MISALIGNMENT_CORRECTION, mCameraProperties->get(CameraProperties::MECHANICAL_MISALIGNMENT_CORRECTION)); +#endif // Only one area a.k.a Touch AF for now. // TODO: Add support for multiple focus areas. p.set(android::CameraParameters::KEY_MAX_NUM_FOCUS_AREAS, mCameraProperties->get(CameraProperties::MAX_FOCUS_AREAS)); @@ -4165,16 +4179,9 @@ void CameraHal::initDefaultParameters() p.set(TICameraParameters::RAW_WIDTH, mCameraProperties->get(CameraProperties::RAW_WIDTH)); p.set(TICameraParameters::RAW_HEIGHT,mCameraProperties->get(CameraProperties::RAW_HEIGHT)); +#ifndef OMAP_TUNA // TI extensions for enable/disable algos // Hadcoded for now -#ifdef OMAP_TUNA - p.set(TICameraParameters::KEY_ALGO_FIXED_GAMMA, android::CameraParameters::FALSE); - p.set(TICameraParameters::KEY_ALGO_NSF1, android::CameraParameters::FALSE); - p.set(TICameraParameters::KEY_ALGO_NSF2, android::CameraParameters::FALSE); - p.set(TICameraParameters::KEY_ALGO_SHARPENING, android::CameraParameters::FALSE); - p.set(TICameraParameters::KEY_ALGO_THREELINCOLORMAP, android::CameraParameters::FALSE); - p.set(TICameraParameters::KEY_ALGO_GIC, android::CameraParameters::FALSE); -#else p.set(TICameraParameters::KEY_ALGO_FIXED_GAMMA, android::CameraParameters::TRUE); p.set(TICameraParameters::KEY_ALGO_NSF1, android::CameraParameters::TRUE); p.set(TICameraParameters::KEY_ALGO_NSF2, android::CameraParameters::TRUE); diff --git a/camera/CameraParameters.cpp b/camera/CameraParameters.cpp index 31b148d..2c008e7 100644 --- a/camera/CameraParameters.cpp +++ b/camera/CameraParameters.cpp @@ -33,16 +33,20 @@ const char CameraProperties::CAMERA_SENSOR_ID[] = "prop-sensor-id"; const char CameraProperties::ORIENTATION_INDEX[]="prop-orientation"; const char CameraProperties::FACING_INDEX[]="prop-facing"; const char CameraProperties::SUPPORTED_PREVIEW_SIZES[] = "prop-preview-size-values"; +#ifndef OMAP_TUNA const char CameraProperties::SUPPORTED_PREVIEW_SUBSAMPLED_SIZES[] = "prop-preview-subsampled-size-values"; const char CameraProperties::SUPPORTED_PREVIEW_TOPBOTTOM_SIZES[] = "prop-preview-topbottom-size-values"; const char CameraProperties::SUPPORTED_PREVIEW_SIDEBYSIDE_SIZES[] = "prop-preview-sidebyside-size-values"; +#endif const char CameraProperties::SUPPORTED_PREVIEW_FORMATS[] = "prop-preview-format-values"; const char CameraProperties::SUPPORTED_PREVIEW_FRAME_RATES[] = "prop-preview-frame-rate-values"; const char CameraProperties::SUPPORTED_PREVIEW_FRAME_RATES_EXT[] = "prop-preview-frame-rate-ext-values"; const char CameraProperties::SUPPORTED_PICTURE_SIZES[] = "prop-picture-size-values"; +#ifndef OMAP_TUNA const char CameraProperties::SUPPORTED_PICTURE_SUBSAMPLED_SIZES[] = "prop-picture-subsampled-size-values"; const char CameraProperties::SUPPORTED_PICTURE_TOPBOTTOM_SIZES[] = "prop-picture-topbottom-size-values"; const char CameraProperties::SUPPORTED_PICTURE_SIDEBYSIDE_SIZES[] = "prop-picture-sidebyside-size-values"; +#endif const char CameraProperties::SUPPORTED_PICTURE_FORMATS[] = "prop-picture-format-values"; const char CameraProperties::SUPPORTED_THUMBNAIL_SIZES[] = "prop-jpeg-thumbnail-size-values"; const char CameraProperties::SUPPORTED_WHITE_BALANCE[] = "prop-whitebalance-values"; @@ -135,8 +139,10 @@ const char CameraProperties::METERING_AREAS[] = "prop-metering-areas"; const char CameraProperties::VIDEO_SNAPSHOT_SUPPORTED[] = "prop-video-snapshot-supported"; const char CameraProperties::VIDEO_SIZE[] = "video-size"; const char CameraProperties::SUPPORTED_VIDEO_SIZES[] = "video-size-values"; +#ifndef OMAP_TUNA const char CameraProperties::MECHANICAL_MISALIGNMENT_CORRECTION_SUPPORTED[] = "prop-mechanical-misalignment-correction-supported"; const char CameraProperties::MECHANICAL_MISALIGNMENT_CORRECTION[] = "prop-mechanical-misalignment-correction"; +#endif const char CameraProperties::CAP_MODE_VALUES[] = "prop-mode-values"; const char CameraProperties::RAW_WIDTH[] = "prop-raw-width-values"; const char CameraProperties::RAW_HEIGHT[] = "prop-raw-height-values"; diff --git a/camera/OMXCameraAdapter/OMX3A.cpp b/camera/OMXCameraAdapter/OMX3A.cpp index fbef828..040d816 100644 --- a/camera/OMXCameraAdapter/OMX3A.cpp +++ b/camera/OMXCameraAdapter/OMX3A.cpp @@ -505,6 +505,7 @@ status_t OMXCameraAdapter::setExposureMode(Gen3A_settings& Gen3A) return Utils::ErrorUtils::omxToAndroidError(eError); } +#ifndef OMAP_TUNA static bool isFlashDisabled() { #if (PROPERTY_VALUE_MAX < 5) #error "PROPERTY_VALUE_MAX must be at least 5" @@ -526,6 +527,7 @@ static bool isFlashDisabled() { return false; } +#endif status_t OMXCameraAdapter::setManualExposureVal(Gen3A_settings& Gen3A) { OMX_ERRORTYPE eError = OMX_ErrorNone; @@ -611,11 +613,15 @@ status_t OMXCameraAdapter::setFlashMode(Gen3A_settings& Gen3A) OMX_INIT_STRUCT_PTR (&flash, OMX_IMAGE_PARAM_FLASHCONTROLTYPE); flash.nPortIndex = OMX_ALL; +#ifndef OMAP_TUNA if (isFlashDisabled()) { flash.eFlashControl = ( OMX_IMAGE_FLASHCONTROLTYPE ) OMX_IMAGE_FlashControlOff; } else { +#endif flash.eFlashControl = ( OMX_IMAGE_FLASHCONTROLTYPE ) Gen3A.FlashMode; +#ifndef OMAP_TUNA } +#endif CAMHAL_LOGDB("Configuring flash mode 0x%x", flash.eFlashControl); eError = OMX_SetConfig(mCameraAdapterParameters.mHandleComp, diff --git a/camera/OMXCameraAdapter/OMXCameraAdapter.cpp b/camera/OMXCameraAdapter/OMXCameraAdapter.cpp index f7c67cf..2a9254c 100644 --- a/camera/OMXCameraAdapter/OMXCameraAdapter.cpp +++ b/camera/OMXCameraAdapter/OMXCameraAdapter.cpp @@ -4362,10 +4362,10 @@ public: status_t switchToState(OMX_STATETYPE state) { - CAMHAL_LOGD("."); + CAMHAL_LOGSV("."); android::AutoMutex locker(mLock); CAMHAL_UNUSED(locker); - CAMHAL_LOGD("."); + CAMHAL_LOGSV("."); mState = state; mIsOk = false; diff --git a/camera/OMXCameraAdapter/OMXCapabilities.cpp b/camera/OMXCameraAdapter/OMXCapabilities.cpp index 8ac46fa..20e366a 100644 --- a/camera/OMXCameraAdapter/OMXCapabilities.cpp +++ b/camera/OMXCameraAdapter/OMXCapabilities.cpp @@ -86,6 +86,7 @@ const CapResolution OMXCameraAdapter::mImageCapRes [] = { { 320, 240, "320x240" }, }; +#ifndef OMAP_TUNA const CapResolution OMXCameraAdapter::mImageCapResSS [] = { { 4032*2, 3024, "8064x3024" }, { 3648*2, 2736, "7296x2736" }, @@ -111,6 +112,7 @@ const CapResolution OMXCameraAdapter::mImageCapResTB [] = { { 640, 480*2, "640x960" }, { 320, 240*2, "320x480" }, }; +#endif const CapResolution OMXCameraAdapter::mPreviewRes [] = { { 1920, 1080, "1920x1080" }, @@ -146,6 +148,7 @@ const CapResolution OMXCameraAdapter::mPreviewPortraitRes [] = { { 96, 128, "96x128" } }; +#ifndef OMAP_TUNA const CapResolution OMXCameraAdapter::mPreviewResSS [] = { { 1920*2, 1080, "3840x1080" }, { 1280*2, 720, "2560x720" }, @@ -175,6 +178,7 @@ const CapResolution OMXCameraAdapter::mPreviewResTB [] = { { 176, 144*2, "176x288" }, { 128, 96*2, "128x192" }, }; +#endif const CapResolution OMXCameraAdapter::mThumbRes [] = { { 640, 480, "640x480" }, @@ -201,6 +205,7 @@ const CapPixelformat OMXCameraAdapter::mPixelformats [] = { #endif }; +#ifndef OMAP_TUNA const userToOMX_LUT OMXCameraAdapter::mFrameLayout [] = { { TICameraParameters::S3D_NONE, OMX_TI_StereoFrameLayout2D }, { TICameraParameters::S3D_TB_FULL, OMX_TI_StereoFrameLayoutTopBottom }, @@ -215,6 +220,7 @@ const LUTtype OMXCameraAdapter::mLayoutLUT = { ARRAY_SIZE(mFrameLayout), mFrameLayout }; +#endif const CapCodingFormat OMXCameraAdapter::mImageCodingFormat [] = { { OMX_IMAGE_CodingJPEG, android::CameraParameters::PIXEL_FORMAT_JPEG }, @@ -569,6 +575,7 @@ status_t OMXCameraAdapter::encodeSizeCap(OMX_TI_CAPRESTYPE &res, return ret; } +#ifndef OMAP_TUNA status_t OMXCameraAdapter::encodeSizeCap3D(OMX_TI_CAPRESTYPE &res, const CapResolution *cap, size_t capCount, @@ -604,14 +611,17 @@ status_t OMXCameraAdapter::encodeSizeCap3D(OMX_TI_CAPRESTYPE &res, return ret; } +#endif status_t OMXCameraAdapter::insertImageSizes(CameraProperties::Properties* params, OMX_TI_CAPTYPE &caps) { status_t ret = NO_ERROR; char supported[MAX_PROP_VALUE_LENGTH]; +#ifndef OMAP_TUNA int s3d_detected = 0; int s3d_ss_detected = 0; int s3d_tb_detected = 0; +#endif LOG_FUNCTION_NAME; @@ -635,9 +645,11 @@ status_t OMXCameraAdapter::insertImageSizes(CameraProperties::Properties* params memset(supported, '\0', MAX_PROP_VALUE_LENGTH); +#ifndef OMAP_TUNA // Check if we are in 2d mode if (!s3d_ss_detected && !s3d_tb_detected && !s3d_detected) { +#endif ret = encodeSizeCap(caps.tImageResRange, mImageCapRes, ARRAY_SIZE(mImageCapRes), @@ -651,6 +663,7 @@ status_t OMXCameraAdapter::insertImageSizes(CameraProperties::Properties* params } params->set(CameraProperties::MAX_PICTURE_WIDTH, caps.tImageResRange.nWidthMax); params->set(CameraProperties::MAX_PICTURE_HEIGHT, caps.tImageResRange.nHeightMax); +#ifndef OMAP_TUNA } else // 3d mode { @@ -713,6 +726,7 @@ status_t OMXCameraAdapter::insertImageSizes(CameraProperties::Properties* params params->set(CameraProperties::SUPPORTED_PICTURE_SUBSAMPLED_SIZES, supported); } } +#endif LOG_FUNCTION_NAME_EXIT; @@ -723,9 +737,11 @@ status_t OMXCameraAdapter::insertPreviewSizes(CameraProperties::Properties* para { status_t ret = NO_ERROR; char supported[MAX_PROP_VALUE_LENGTH]; +#ifndef OMAP_TUNA int s3d_detected = 0; int s3d_ss_detected = 0; int s3d_tb_detected = 0; +#endif LOG_FUNCTION_NAME; @@ -749,9 +765,11 @@ status_t OMXCameraAdapter::insertPreviewSizes(CameraProperties::Properties* para memset(supported, '\0', MAX_PROP_VALUE_LENGTH); +#ifndef OMAP_TUNA // Check if we are in 2d mode if (!s3d_ss_detected && !s3d_tb_detected && !s3d_detected) { +#endif ret = encodeSizeCap(caps.tPreviewResRange, mPreviewRes, ARRAY_SIZE(mPreviewRes), @@ -777,6 +795,7 @@ status_t OMXCameraAdapter::insertPreviewSizes(CameraProperties::Properties* para } else { params->set(CameraProperties::SUPPORTED_PREVIEW_SIZES, supported); } +#ifndef OMAP_TUNA } else // 3d mode { @@ -842,6 +861,7 @@ status_t OMXCameraAdapter::insertPreviewSizes(CameraProperties::Properties* para params->set(CameraProperties::SUPPORTED_PREVIEW_SUBSAMPLED_SIZES, supported); } } +#endif LOG_FUNCTION_NAME_EXIT; @@ -1960,6 +1980,7 @@ status_t OMXCameraAdapter::insertDefaults(CameraProperties::Properties* params, params->set(CameraProperties::S3D_PRV_FRAME_LAYOUT, temp); #endif +#ifndef OMAP_TUNA if (!strcmp(TICameraParameters::S3D_TB_FULL, temp)) { params->set(CameraProperties::SUPPORTED_PREVIEW_SIZES, params->get(CameraProperties::SUPPORTED_PREVIEW_TOPBOTTOM_SIZES)); } else if (!strcmp(TICameraParameters::S3D_SS_FULL, temp)) { @@ -1968,6 +1989,7 @@ status_t OMXCameraAdapter::insertDefaults(CameraProperties::Properties* params, || (!strcmp(TICameraParameters::S3D_SS_SUBSAMPLED, temp))) { params->set(CameraProperties::SUPPORTED_PREVIEW_SIZES, params->get(CameraProperties::SUPPORTED_PREVIEW_SUBSAMPLED_SIZES)); } +#endif #ifndef OMAP_TUNA /* If default is supported - set it, else - set first supported */ @@ -1983,6 +2005,7 @@ status_t OMXCameraAdapter::insertDefaults(CameraProperties::Properties* params, params->set(CameraProperties::S3D_CAP_FRAME_LAYOUT, temp); #endif +#ifndef OMAP_TUNA if (!strcmp(TICameraParameters::S3D_TB_FULL, temp)) { params->set(CameraProperties::SUPPORTED_PICTURE_SIZES, params->get(CameraProperties::SUPPORTED_PICTURE_TOPBOTTOM_SIZES)); } else if (!strcmp(TICameraParameters::S3D_SS_FULL, temp)) { @@ -1991,6 +2014,7 @@ status_t OMXCameraAdapter::insertDefaults(CameraProperties::Properties* params, || (!strcmp(TICameraParameters::S3D_SS_SUBSAMPLED, temp))) { params->set(CameraProperties::SUPPORTED_PICTURE_SIZES, params->get(CameraProperties::SUPPORTED_PICTURE_SUBSAMPLED_SIZES)); } +#endif params->set(CameraProperties::ANTIBANDING, DEFAULT_ANTIBANDING); params->set(CameraProperties::BRIGHTNESS, DEFAULT_BRIGHTNESS); @@ -2026,9 +2050,13 @@ status_t OMXCameraAdapter::insertDefaults(CameraProperties::Properties* params, TICameraParameters::S3D_SS_FULL)) { params->set(CameraProperties::PICTURE_SIZE, DEFAULT_PICTURE_SS_SIZE); } else { +#endif params->set(CameraProperties::PICTURE_SIZE, DEFAULT_PICTURE_SIZE); +#ifndef OMAP_TUNA } +#endif +#ifndef OMAP_TUNA if (!strcmp(params->get(CameraProperties::S3D_PRV_FRAME_LAYOUT), TICameraParameters::S3D_TB_FULL)) { params->set(CameraProperties::PREVIEW_SIZE, DEFAULT_PREVIEW_TB_SIZE); @@ -2036,7 +2064,9 @@ status_t OMXCameraAdapter::insertDefaults(CameraProperties::Properties* params, TICameraParameters::S3D_SS_FULL)) { params->set(CameraProperties::PREVIEW_SIZE, DEFAULT_PREVIEW_SS_SIZE); } else { +#endif params->set(CameraProperties::PREVIEW_SIZE, DEFAULT_PREVIEW_SIZE); +#ifndef OMAP_TUNA } #endif @@ -2090,7 +2120,9 @@ status_t OMXCameraAdapter::insertDefaults(CameraProperties::Properties* params, params->set(CameraProperties::SENSOR_ORIENTATION, DEFAULT_SENSOR_ORIENTATION); params->set(CameraProperties::AUTOCONVERGENCE_MODE, DEFAULT_AUTOCONVERGENCE_MODE); params->set(CameraProperties::MANUAL_CONVERGENCE, DEFAULT_MANUAL_CONVERGENCE); +#ifndef OMAP_TUNA params->set(CameraProperties::MECHANICAL_MISALIGNMENT_CORRECTION, DEFAULT_MECHANICAL_MISALIGNMENT_CORRECTION_MODE); +#endif char property[PROPERTY_VALUE_MAX]; property_get("ro.product.manufacturer", diff --git a/camera/OMXCameraAdapter/OMXDefaults.cpp b/camera/OMXCameraAdapter/OMXDefaults.cpp index 99e2d0f..fd3b5aa 100644 --- a/camera/OMXCameraAdapter/OMXDefaults.cpp +++ b/camera/OMXCameraAdapter/OMXDefaults.cpp @@ -46,20 +46,24 @@ const char OMXCameraAdapter::DEFAULT_JPEG_QUALITY[] = "95"; const char OMXCameraAdapter::DEFAULT_THUMBNAIL_QUALITY[] = "60"; const char OMXCameraAdapter::DEFAULT_THUMBNAIL_SIZE[] = "160x120"; const char OMXCameraAdapter::DEFAULT_PICTURE_FORMAT[] = "jpeg"; +#ifndef OMAP_TUNA const char OMXCameraAdapter::DEFAULT_S3D_PICTURE_LAYOUT[] = "tb-full"; -#if 0 /*def OMAP_TUNA*/ -const char OMXCameraAdapter::DEFAULT_PICTURE_SIZE[] = "2592x1944"; -#else -const char OMXCameraAdapter::DEFAULT_PICTURE_SIZE[] = "320x240"; #endif +const char OMXCameraAdapter::DEFAULT_PICTURE_SIZE[] = "320x240"; +#ifndef OMAP_TUNA const char OMXCameraAdapter::DEFAULT_PICTURE_SS_SIZE[] = "640x240"; const char OMXCameraAdapter::DEFAULT_PICTURE_TB_SIZE[] = "320x480"; +#endif const char OMXCameraAdapter::DEFAULT_PREVIEW_FORMAT[] = "yuv420sp"; const char OMXCameraAdapter::DEFAULT_FRAMERATE[] = "30"; +#ifndef OMAP_TUNA const char OMXCameraAdapter::DEFAULT_S3D_PREVIEW_LAYOUT[] = "tb-subsampled"; +#endif const char OMXCameraAdapter::DEFAULT_PREVIEW_SIZE[] = "640x480"; +#ifndef OMAP_TUNA const char OMXCameraAdapter::DEFAULT_PREVIEW_SS_SIZE[] = "1280x480"; const char OMXCameraAdapter::DEFAULT_PREVIEW_TB_SIZE[] = "640x960"; +#endif const char OMXCameraAdapter::DEFAULT_NUM_PREV_BUFS[] = "6"; const char OMXCameraAdapter::DEFAULT_NUM_PIC_BUFS[] = "1"; const char OMXCameraAdapter::DEFAULT_SATURATION[] = "100"; @@ -83,9 +87,7 @@ const char OMXCameraAdapter::DEFAULT_VIDEO_SIZE[] = "1920x1080"; const char OMXCameraAdapter::DEFAULT_SENSOR_ORIENTATION[] = "0"; const char OMXCameraAdapter::DEFAULT_AUTOCONVERGENCE_MODE[] = "frame"; const char OMXCameraAdapter::DEFAULT_MANUAL_CONVERGENCE[] = "0"; -#ifdef OMAP_TUNA -const char * OMXCameraAdapter::DEFAULT_MECHANICAL_MISALIGNMENT_CORRECTION_MODE = android::CameraParameters::FALSE; -#else +#ifndef OMAP_TUNA const char * OMXCameraAdapter::DEFAULT_MECHANICAL_MISALIGNMENT_CORRECTION_MODE = android::CameraParameters::TRUE; #endif const char OMXCameraAdapter::DEFAULT_EXIF_MAKE[] = "default_make"; diff --git a/camera/TICameraParameters.cpp b/camera/TICameraParameters.cpp index 04a3536..1e2ec20 100644 --- a/camera/TICameraParameters.cpp +++ b/camera/TICameraParameters.cpp @@ -96,6 +96,7 @@ const char TICameraParameters::KEY_S3D_CAP_FRAME_LAYOUT[] = "s3d-cap-frame-layou const char TICameraParameters::KEY_S3D_CAP_FRAME_LAYOUT_VALUES[] = "s3d-cap-frame-layout-values"; #endif +#ifndef OMAP_TUNA //TI extentions fo 3D resolutions const char TICameraParameters::KEY_SUPPORTED_PICTURE_SUBSAMPLED_SIZES[] = "supported-picture-subsampled-size-values"; const char TICameraParameters::KEY_SUPPORTED_PICTURE_TOPBOTTOM_SIZES[] = "supported-picture-topbottom-size-values"; @@ -103,6 +104,7 @@ const char TICameraParameters::KEY_SUPPORTED_PICTURE_SIDEBYSIDE_SIZES[] = "suppo const char TICameraParameters::KEY_SUPPORTED_PREVIEW_SUBSAMPLED_SIZES[] = "supported-preview-subsampled-size-values"; const char TICameraParameters::KEY_SUPPORTED_PREVIEW_TOPBOTTOM_SIZES[] = "supported-preview-topbottom-size-values"; const char TICameraParameters::KEY_SUPPORTED_PREVIEW_SIDEBYSIDE_SIZES[] = "supported-preview-sidebyside-size-values"; +#endif //TI extensions for SAC/SMC const char TICameraParameters::KEY_AUTOCONVERGENCE_MODE[] = "auto-convergence-mode"; @@ -191,12 +193,14 @@ const char TICameraParameters::ISO_MODE_1000[] = "1000"; const char TICameraParameters::ISO_MODE_1200[] = "1200"; const char TICameraParameters::ISO_MODE_1600[] = "1600"; +#ifndef OMAP_TUNA //TI extensions for stereo frame layouts const char TICameraParameters::S3D_NONE[] = "none"; const char TICameraParameters::S3D_TB_FULL[] = "tb-full"; const char TICameraParameters::S3D_SS_FULL[] = "ss-full"; const char TICameraParameters::S3D_TB_SUBSAMPLED[] = "tb-subsampled"; const char TICameraParameters::S3D_SS_SUBSAMPLED[] = "ss-subsampled"; +#endif // TI extensions to add auto convergence values const char TICameraParameters::AUTOCONVERGENCE_MODE_DISABLE[] = "disable"; @@ -218,9 +222,12 @@ const char TICameraParameters::ORIENTATION_SENSOR_90[] = "90"; const char TICameraParameters::ORIENTATION_SENSOR_180[] = "180"; const char TICameraParameters::ORIENTATION_SENSOR_270[] = "270"; +#ifndef OMAP_TUNA const char TICameraParameters::KEY_MECHANICAL_MISALIGNMENT_CORRECTION_SUPPORTED[] = "mechanical-misalignment-correction-supported"; const char TICameraParameters::KEY_MECHANICAL_MISALIGNMENT_CORRECTION[] = "mechanical-misalignment-correction"; +#endif +#ifndef OMAP_TUNA //TI extensions for enable/disable algos const char TICameraParameters::KEY_ALGO_FIXED_GAMMA[] = TI_KEY_ALGO_PREFIX "fixed-gamma"; const char TICameraParameters::KEY_ALGO_NSF1[] = TI_KEY_ALGO_PREFIX "nsf1"; @@ -228,6 +235,7 @@ const char TICameraParameters::KEY_ALGO_NSF2[] = TI_KEY_ALGO_PREFIX "nsf2"; const char TICameraParameters::KEY_ALGO_SHARPENING[] = TI_KEY_ALGO_PREFIX "sharpening"; const char TICameraParameters::KEY_ALGO_THREELINCOLORMAP[] = TI_KEY_ALGO_PREFIX "threelinecolormap"; const char TICameraParameters::KEY_ALGO_GIC[] = TI_KEY_ALGO_PREFIX "gic"; +#endif } // namespace Camera } // namespace Ti diff --git a/camera/inc/CameraProperties.h b/camera/inc/CameraProperties.h index 0b61210..e20d18d 100644 --- a/camera/inc/CameraProperties.h +++ b/camera/inc/CameraProperties.h @@ -69,16 +69,20 @@ public: static const char ORIENTATION_INDEX[]; static const char FACING_INDEX[]; static const char SUPPORTED_PREVIEW_SIZES[]; +#ifndef OMAP_TUNA static const char SUPPORTED_PREVIEW_SUBSAMPLED_SIZES[]; static const char SUPPORTED_PREVIEW_TOPBOTTOM_SIZES[]; static const char SUPPORTED_PREVIEW_SIDEBYSIDE_SIZES[]; +#endif static const char SUPPORTED_PREVIEW_FORMATS[]; static const char SUPPORTED_PREVIEW_FRAME_RATES[]; static const char SUPPORTED_PREVIEW_FRAME_RATES_EXT[]; static const char SUPPORTED_PICTURE_SIZES[]; +#ifndef OMAP_TUNA static const char SUPPORTED_PICTURE_SUBSAMPLED_SIZES[]; static const char SUPPORTED_PICTURE_TOPBOTTOM_SIZES[]; static const char SUPPORTED_PICTURE_SIDEBYSIDE_SIZES[]; +#endif static const char SUPPORTED_PICTURE_FORMATS[]; static const char SUPPORTED_THUMBNAIL_SIZES[]; static const char SUPPORTED_WHITE_BALANCE[]; @@ -184,8 +188,10 @@ public: static const char VIDEO_SIZE[]; static const char SUPPORTED_VIDEO_SIZES[]; +#ifndef OMAP_TUNA static const char MECHANICAL_MISALIGNMENT_CORRECTION_SUPPORTED[]; static const char MECHANICAL_MISALIGNMENT_CORRECTION[]; +#endif static const char RAW_WIDTH[]; static const char RAW_HEIGHT[]; diff --git a/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h b/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h index ba192db..8182c9c 100644 --- a/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h +++ b/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h @@ -669,11 +669,13 @@ private: size_t, char*, size_t); +#ifndef OMAP_TUNA static status_t encodeSizeCap3D(OMX_TI_CAPRESTYPE&, const CapResolution*, size_t , char * , size_t); +#endif static status_t insertImageSizes(CameraProperties::Properties*, OMX_TI_CAPTYPE&); static status_t insertPreviewSizes(CameraProperties::Properties*, OMX_TI_CAPTYPE&); static status_t insertThumbSizes(CameraProperties::Properties*, OMX_TI_CAPTYPE&); @@ -902,16 +904,22 @@ private: //OMX Capabilities data static const CapResolution mImageCapRes []; +#ifndef OMAP_TUNA static const CapResolution mImageCapResSS []; static const CapResolution mImageCapResTB []; +#endif static const CapResolution mPreviewRes []; +#ifndef OMAP_TUNA static const CapResolution mPreviewResSS []; static const CapResolution mPreviewResTB []; +#endif static const CapResolution mPreviewPortraitRes []; static const CapResolution mThumbRes []; static const CapPixelformat mPixelformats []; +#ifndef OMAP_TUNA static const userToOMX_LUT mFrameLayout []; static const LUTtype mLayoutLUT; +#endif static const CapCodingFormat mImageCodingFormat[]; static const CapFramerate mFramerates []; static const CapU32 mSensorNames[] ; @@ -950,16 +958,24 @@ private: static const char DEFAULT_THUMBNAIL_QUALITY[]; static const char DEFAULT_THUMBNAIL_SIZE[]; static const char DEFAULT_PICTURE_FORMAT[]; +#ifndef OMAP_TUNA static const char DEFAULT_S3D_PICTURE_LAYOUT[]; +#endif static const char DEFAULT_PICTURE_SIZE[]; +#ifndef OMAP_TUNA static const char DEFAULT_PICTURE_SS_SIZE[]; static const char DEFAULT_PICTURE_TB_SIZE[]; +#endif static const char DEFAULT_PREVIEW_FORMAT[]; static const char DEFAULT_FRAMERATE[]; +#ifndef OMAP_TUNA static const char DEFAULT_S3D_PREVIEW_LAYOUT[]; +#endif static const char DEFAULT_PREVIEW_SIZE[]; +#ifndef OMAP_TUNA static const char DEFAULT_PREVIEW_SS_SIZE[]; static const char DEFAULT_PREVIEW_TB_SIZE[]; +#endif static const char DEFAULT_NUM_PREV_BUFS[]; static const char DEFAULT_NUM_PIC_BUFS[]; static const char DEFAULT_SATURATION[]; @@ -983,7 +999,9 @@ private: static const char DEFAULT_SENSOR_ORIENTATION[]; static const char DEFAULT_AUTOCONVERGENCE_MODE[]; static const char DEFAULT_MANUAL_CONVERGENCE[]; +#ifndef OMAP_TUNA static const char * DEFAULT_MECHANICAL_MISALIGNMENT_CORRECTION_MODE; +#endif static const char DEFAULT_EXIF_MODEL[]; static const char DEFAULT_EXIF_MAKE[]; diff --git a/camera/inc/TICameraParameters.h b/camera/inc/TICameraParameters.h index 75e4812..95690f8 100644 --- a/camera/inc/TICameraParameters.h +++ b/camera/inc/TICameraParameters.h @@ -206,13 +206,16 @@ static const char KEY_S3D_CAP_FRAME_LAYOUT[]; static const char KEY_S3D_CAP_FRAME_LAYOUT_VALUES[]; #endif +#ifndef OMAP_TUNA //TI extensions for stereo frame layouts static const char S3D_NONE[]; static const char S3D_TB_FULL[]; static const char S3D_SS_FULL[]; static const char S3D_TB_SUBSAMPLED[]; static const char S3D_SS_SUBSAMPLED[]; +#endif +#ifndef OMAP_TUNA //TI extentions fo 3D resolutions static const char KEY_SUPPORTED_PICTURE_SUBSAMPLED_SIZES[]; static const char KEY_SUPPORTED_PICTURE_TOPBOTTOM_SIZES[]; @@ -220,6 +223,7 @@ static const char KEY_SUPPORTED_PICTURE_SIDEBYSIDE_SIZES[]; static const char KEY_SUPPORTED_PREVIEW_SUBSAMPLED_SIZES[]; static const char KEY_SUPPORTED_PREVIEW_TOPBOTTOM_SIZES[]; static const char KEY_SUPPORTED_PREVIEW_SIDEBYSIDE_SIZES[]; +#endif // TI extensions to add values for AutoConvergence settings. static const char AUTOCONVERGENCE_MODE_DISABLE[]; @@ -242,9 +246,12 @@ static const char ORIENTATION_SENSOR_270[]; static const char FACING_FRONT[]; static const char FACING_BACK[]; +#ifndef OMAP_TUNA static const char KEY_MECHANICAL_MISALIGNMENT_CORRECTION_SUPPORTED[]; static const char KEY_MECHANICAL_MISALIGNMENT_CORRECTION[]; +#endif +#ifndef OMAP_TUNA //TI extensions for enable/disable algos static const char KEY_ALGO_FIXED_GAMMA[]; static const char KEY_ALGO_NSF1[]; @@ -252,6 +259,7 @@ static const char KEY_ALGO_NSF2[]; static const char KEY_ALGO_SHARPENING[]; static const char KEY_ALGO_THREELINCOLORMAP[]; static const char KEY_ALGO_GIC[]; +#endif }; -- cgit v1.1