1/* 2 * Copyright (C) Texas Instruments - http://www.ti.com/ 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17#include <utils/Log.h> 18 19#include <string.h> 20#include <stdlib.h> 21#include <TICameraParameters.h> 22 23#define TI_KEY_ALGO_PREFIX "ti-algo-" 24 25namespace Ti { 26namespace Camera { 27 28//TI extensions to camera mode 29const char TICameraParameters::HIGH_PERFORMANCE_MODE[] = "high-performance"; 30const char TICameraParameters::HIGH_QUALITY_MODE[] = "high-quality"; 31const char TICameraParameters::HIGH_QUALITY_ZSL_MODE[] = "high-quality-zsl"; 32const char TICameraParameters::CP_CAM_MODE[] = "cp-cam"; 33const char TICameraParameters::VIDEO_MODE[] = "video-mode"; 34const char TICameraParameters::VIDEO_MODE_HQ[] = "video-mode-hq"; 35const char TICameraParameters::EXPOSURE_BRACKETING[] = "exposure-bracketing"; 36const char TICameraParameters::ZOOM_BRACKETING[] = "zoom-bracketing"; 37const char TICameraParameters::TEMP_BRACKETING[] = "temporal-bracketing"; 38 39// TI extensions to standard android Parameters 40const char TICameraParameters::KEY_SUPPORTED_CAMERAS[] = "camera-indexes"; 41const char TICameraParameters::KEY_CAMERA[] = "camera-index"; 42const char TICameraParameters::KEY_SHUTTER_ENABLE[] = "shutter-enable"; 43const char TICameraParameters::KEY_CAMERA_NAME[] = "camera-name"; 44const char TICameraParameters::KEY_BURST[] = "burst-capture"; 45const char TICameraParameters::KEY_CAP_MODE[] = "mode"; 46const char TICameraParameters::KEY_CAP_MODE_VALUES[] = "mode-values"; 47const char TICameraParameters::KEY_VNF[] = "vnf"; 48const char TICameraParameters::KEY_VNF_SUPPORTED[] = "vnf-supported"; 49const char TICameraParameters::KEY_SATURATION[] = "saturation"; 50const char TICameraParameters::KEY_BRIGHTNESS[] = "brightness"; 51const char TICameraParameters::KEY_SUPPORTED_EXPOSURE[] = "exposure-mode-values"; 52const char TICameraParameters::KEY_EXPOSURE_MODE[] = "exposure"; 53const char TICameraParameters::KEY_SUPPORTED_MANUAL_EXPOSURE_MIN[] = "supported-manual-exposure-min"; 54const char TICameraParameters::KEY_SUPPORTED_MANUAL_EXPOSURE_MAX[] = "supported-manual-exposure-max"; 55const char TICameraParameters::KEY_SUPPORTED_MANUAL_EXPOSURE_STEP[] = "supported-manual-exposure-step"; 56const char TICameraParameters::KEY_SUPPORTED_MANUAL_GAIN_ISO_MIN[] = "supported-manual-gain-iso-min"; 57const char TICameraParameters::KEY_SUPPORTED_MANUAL_GAIN_ISO_MAX[] = "supported-manual-gain-iso-max"; 58const char TICameraParameters::KEY_SUPPORTED_MANUAL_GAIN_ISO_STEP[] = "supported-manual-gain-iso-step"; 59const char TICameraParameters::KEY_MANUAL_EXPOSURE[] = "manual-exposure"; 60const char TICameraParameters::KEY_MANUAL_EXPOSURE_RIGHT[] = "manual-exposure-right"; 61const char TICameraParameters::KEY_MANUAL_GAIN_ISO[] = "manual-gain-iso"; 62const char TICameraParameters::KEY_MANUAL_GAIN_ISO_RIGHT[] = "manual-gain-iso-right"; 63const char TICameraParameters::KEY_CONTRAST[] = "contrast"; 64const char TICameraParameters::KEY_SHARPNESS[] = "sharpness"; 65const char TICameraParameters::KEY_ISO[] = "iso"; 66const char TICameraParameters::KEY_SUPPORTED_ISO_VALUES[] = "iso-mode-values"; 67const char TICameraParameters::KEY_SUPPORTED_IPP[] = "ipp-values"; 68const char TICameraParameters::KEY_IPP[] = "ipp"; 69const char TICameraParameters::KEY_METERING_MODE[] = "meter-mode"; 70const char TICameraParameters::KEY_EXP_BRACKETING_RANGE[] = "exp-bracketing-range"; 71const char TICameraParameters::KEY_EXP_GAIN_BRACKETING_RANGE[] = "exp-gain-bracketing-range"; 72const char TICameraParameters::KEY_ZOOM_BRACKETING_RANGE[] = "zoom-bracketing-range"; 73const char TICameraParameters::KEY_TEMP_BRACKETING[] = "temporal-bracketing"; 74const char TICameraParameters::KEY_TEMP_BRACKETING_RANGE_POS[] = "temporal-bracketing-range-positive"; 75const char TICameraParameters::KEY_TEMP_BRACKETING_RANGE_NEG[] = "temporal-bracketing-range-negative"; 76const char TICameraParameters::KEY_FLUSH_SHOT_CONFIG_QUEUE[] = "flush-shot-config-queue"; 77const char TICameraParameters::KEY_MEASUREMENT_ENABLE[] = "measurement"; 78const char TICameraParameters::KEY_GBCE[] = "gbce"; 79const char TICameraParameters::KEY_GBCE_SUPPORTED[] = "gbce-supported"; 80const char TICameraParameters::KEY_GLBCE[] = "glbce"; 81const char TICameraParameters::KEY_GLBCE_SUPPORTED[] = "glbce-supported"; 82const char TICameraParameters::KEY_CURRENT_ISO[] = "current-iso"; 83const char TICameraParameters::KEY_SENSOR_ORIENTATION[] = "sensor-orientation"; 84const char TICameraParameters::KEY_RECORDING_HINT[] = "internal-recording-hint"; 85const char TICameraParameters::KEY_AUTO_FOCUS_LOCK[] = "auto-focus-lock"; 86const char TICameraParameters::KEY_FRAMERATE_RANGES_EXT_SUPPORTED[] = "preview-fps-range-ext-values"; 87const char TICameraParameters::KEY_FRAMERATES_EXT_SUPPORTED[] = "preview-fps-ext-values"; 88 89const char TICameraParameters::RAW_WIDTH[] = "raw-width"; 90const char TICameraParameters::RAW_HEIGHT[] = "raw-height"; 91 92// TI extensions for Stereo Mode 93const char TICameraParameters::KEY_S3D_PRV_FRAME_LAYOUT[] = "s3d-prv-frame-layout"; 94const char TICameraParameters::KEY_S3D_PRV_FRAME_LAYOUT_VALUES[] = "s3d-prv-frame-layout-values"; 95const char TICameraParameters::KEY_S3D_CAP_FRAME_LAYOUT[] = "s3d-cap-frame-layout"; 96const char TICameraParameters::KEY_S3D_CAP_FRAME_LAYOUT_VALUES[] = "s3d-cap-frame-layout-values"; 97 98//TI extentions fo 3D resolutions 99const char TICameraParameters::KEY_SUPPORTED_PICTURE_SUBSAMPLED_SIZES[] = "supported-picture-subsampled-size-values"; 100const char TICameraParameters::KEY_SUPPORTED_PICTURE_TOPBOTTOM_SIZES[] = "supported-picture-topbottom-size-values"; 101const char TICameraParameters::KEY_SUPPORTED_PICTURE_SIDEBYSIDE_SIZES[] = "supported-picture-sidebyside-size-values"; 102const char TICameraParameters::KEY_SUPPORTED_PREVIEW_SUBSAMPLED_SIZES[] = "supported-preview-subsampled-size-values"; 103const char TICameraParameters::KEY_SUPPORTED_PREVIEW_TOPBOTTOM_SIZES[] = "supported-preview-topbottom-size-values"; 104const char TICameraParameters::KEY_SUPPORTED_PREVIEW_SIDEBYSIDE_SIZES[] = "supported-preview-sidebyside-size-values"; 105 106//TI extensions for SAC/SMC 107const char TICameraParameters::KEY_AUTOCONVERGENCE_MODE[] = "auto-convergence-mode"; 108const char TICameraParameters::KEY_AUTOCONVERGENCE_MODE_VALUES[] = "auto-convergence-mode-values"; 109const char TICameraParameters::KEY_MANUAL_CONVERGENCE[] = "manual-convergence"; 110const char TICameraParameters::KEY_SUPPORTED_MANUAL_CONVERGENCE_MIN[] = "supported-manual-convergence-min"; 111const char TICameraParameters::KEY_SUPPORTED_MANUAL_CONVERGENCE_MAX[] = "supported-manual-convergence-max"; 112const char TICameraParameters::KEY_SUPPORTED_MANUAL_CONVERGENCE_STEP[] = "supported-manual-convergence-step"; 113 114//TI extensions for setting EXIF tags 115const char TICameraParameters::KEY_EXIF_MODEL[] = "exif-model"; 116const char TICameraParameters::KEY_EXIF_MAKE[] = "exif-make"; 117 118//TI extensions for additiona GPS data 119const char TICameraParameters::KEY_GPS_MAPDATUM[] = "gps-mapdatum"; 120const char TICameraParameters::KEY_GPS_VERSION[] = "gps-version"; 121const char TICameraParameters::KEY_GPS_DATESTAMP[] = "gps-datestamp"; 122 123// TI extensions for slice mode implementation for VTC 124const char TICameraParameters::KEY_VTC_HINT[] = "internal-vtc-hint"; 125const char TICameraParameters::KEY_VIDEO_ENCODER_HANDLE[] = "encoder_handle"; 126const char TICameraParameters::KEY_VIDEO_ENCODER_SLICE_HEIGHT[] = "encoder_slice_height"; 127 128//TI extensions to Image post-processing 129const char TICameraParameters::IPP_LDCNSF[] = "ldc-nsf"; 130const char TICameraParameters::IPP_LDC[] = "ldc"; 131const char TICameraParameters::IPP_NSF[] = "nsf"; 132const char TICameraParameters::IPP_NONE[] = "off"; 133 134// TI extensions to standard android pixel formats 135const char TICameraParameters::PIXEL_FORMAT_UNUSED[] = "unused"; 136const char TICameraParameters::PIXEL_FORMAT_JPS[] = "jps"; 137const char TICameraParameters::PIXEL_FORMAT_MPO[] = "mpo"; 138const char TICameraParameters::PIXEL_FORMAT_YUV422I_UYVY[] = "yuv422i-uyvy"; 139 140// TI extensions to standard android scene mode settings 141const char TICameraParameters::SCENE_MODE_CLOSEUP[] = "closeup"; 142const char TICameraParameters::SCENE_MODE_AQUA[] = "aqua"; 143const char TICameraParameters::SCENE_MODE_SNOWBEACH[] = "snow-beach"; 144const char TICameraParameters::SCENE_MODE_MOOD[] = "mood"; 145const char TICameraParameters::SCENE_MODE_NIGHT_INDOOR[] = "night-indoor"; 146const char TICameraParameters::SCENE_MODE_DOCUMENT[] = "document"; 147const char TICameraParameters::SCENE_MODE_BARCODE[] = "barcode"; 148const char TICameraParameters::SCENE_MODE_VIDEO_SUPER_NIGHT[] = "super-night"; 149const char TICameraParameters::SCENE_MODE_VIDEO_CINE[] = "cine"; 150const char TICameraParameters::SCENE_MODE_VIDEO_OLD_FILM[] = "old-film"; 151 152// TI extensions to standard android white balance values. 153const char TICameraParameters::WHITE_BALANCE_TUNGSTEN[] = "tungsten"; 154const char TICameraParameters::WHITE_BALANCE_HORIZON[] = "horizon"; 155const char TICameraParameters::WHITE_BALANCE_SUNSET[] = "sunset"; 156const char TICameraParameters::WHITE_BALANCE_FACE[] = "face-priority"; 157 158// TI extensions to standard android focus modes. 159const char TICameraParameters::FOCUS_MODE_PORTRAIT[] = "portrait"; 160const char TICameraParameters::FOCUS_MODE_EXTENDED[] = "extended"; 161const char TICameraParameters::FOCUS_MODE_FACE[] = "face-priority"; 162const char TICameraParameters::FOCUS_MODE_OFF[] = "off"; 163 164// TI extensions to add values for effect settings. 165const char TICameraParameters::EFFECT_NATURAL[] = "natural"; 166const char TICameraParameters::EFFECT_VIVID[] = "vivid"; 167const char TICameraParameters::EFFECT_COLOR_SWAP[] = "color-swap"; 168const char TICameraParameters::EFFECT_BLACKWHITE[] = "blackwhite"; 169 170// TI extensions to add exposure preset modes 171const char TICameraParameters::EXPOSURE_MODE_MANUAL[] = "manual"; 172const char TICameraParameters::EXPOSURE_MODE_AUTO[] = "auto"; 173const char TICameraParameters::EXPOSURE_MODE_NIGHT[] = "night"; 174const char TICameraParameters::EXPOSURE_MODE_BACKLIGHT[] = "backlighting"; 175const char TICameraParameters::EXPOSURE_MODE_SPOTLIGHT[] = "spotlight"; 176const char TICameraParameters::EXPOSURE_MODE_SPORTS[] = "sports"; 177const char TICameraParameters::EXPOSURE_MODE_SNOW[] = "snow"; 178const char TICameraParameters::EXPOSURE_MODE_BEACH[] = "beach"; 179const char TICameraParameters::EXPOSURE_MODE_APERTURE[] = "aperture"; 180const char TICameraParameters::EXPOSURE_MODE_SMALL_APERTURE[] = "small-aperture"; 181const char TICameraParameters::EXPOSURE_MODE_FACE[] = "face-priority"; 182 183// TI extensions to add iso values 184const char TICameraParameters::ISO_MODE_AUTO[] = "auto"; 185const char TICameraParameters::ISO_MODE_100[] = "100"; 186const char TICameraParameters::ISO_MODE_200[] = "200"; 187const char TICameraParameters::ISO_MODE_400[] = "400"; 188const char TICameraParameters::ISO_MODE_800[] = "800"; 189const char TICameraParameters::ISO_MODE_1000[] = "1000"; 190const char TICameraParameters::ISO_MODE_1200[] = "1200"; 191const char TICameraParameters::ISO_MODE_1600[] = "1600"; 192 193//TI extensions for stereo frame layouts 194const char TICameraParameters::S3D_NONE[] = "none"; 195const char TICameraParameters::S3D_TB_FULL[] = "tb-full"; 196const char TICameraParameters::S3D_SS_FULL[] = "ss-full"; 197const char TICameraParameters::S3D_TB_SUBSAMPLED[] = "tb-subsampled"; 198const char TICameraParameters::S3D_SS_SUBSAMPLED[] = "ss-subsampled"; 199 200// TI extensions to add auto convergence values 201const char TICameraParameters::AUTOCONVERGENCE_MODE_DISABLE[] = "disable"; 202const char TICameraParameters::AUTOCONVERGENCE_MODE_FRAME[] = "frame"; 203const char TICameraParameters::AUTOCONVERGENCE_MODE_CENTER[] = "center"; 204const char TICameraParameters::AUTOCONVERGENCE_MODE_TOUCH[] = "touch"; 205const char TICameraParameters::AUTOCONVERGENCE_MODE_MANUAL[] = "manual"; 206 207//TI values for camera direction 208const char TICameraParameters::FACING_FRONT[]="front"; 209const char TICameraParameters::FACING_BACK[]="back"; 210 211//TI extensions to flash settings 212const char TICameraParameters::FLASH_MODE_FILL_IN[] = "fill-in"; 213 214//TI extensions to add sensor orientation parameters 215const char TICameraParameters::ORIENTATION_SENSOR_NONE[] = "0"; 216const char TICameraParameters::ORIENTATION_SENSOR_90[] = "90"; 217const char TICameraParameters::ORIENTATION_SENSOR_180[] = "180"; 218const char TICameraParameters::ORIENTATION_SENSOR_270[] = "270"; 219 220const char TICameraParameters::KEY_MECHANICAL_MISALIGNMENT_CORRECTION_SUPPORTED[] = "mechanical-misalignment-correction-supported"; 221const char TICameraParameters::KEY_MECHANICAL_MISALIGNMENT_CORRECTION[] = "mechanical-misalignment-correction"; 222 223//TI extensions for enable/disable algos 224const char TICameraParameters::KEY_ALGO_EXTERNAL_GAMMA[] = TI_KEY_ALGO_PREFIX "external-gamma"; 225const char TICameraParameters::KEY_ALGO_NSF1[] = TI_KEY_ALGO_PREFIX "nsf1"; 226const char TICameraParameters::KEY_ALGO_NSF2[] = TI_KEY_ALGO_PREFIX "nsf2"; 227const char TICameraParameters::KEY_ALGO_SHARPENING[] = TI_KEY_ALGO_PREFIX "sharpening"; 228const char TICameraParameters::KEY_ALGO_THREELINCOLORMAP[] = TI_KEY_ALGO_PREFIX "threelinecolormap"; 229const char TICameraParameters::KEY_ALGO_GIC[] = TI_KEY_ALGO_PREFIX "gic"; 230 231const char TICameraParameters::KEY_GAMMA_TABLE[] = "gamma-table"; 232 233} // namespace Camera 234} // namespace Ti 235