1 /* 2 ** Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. 3 ** Not a Contribution. Apache license notifications and license are 4 ** retained for attribution purposes only. 5 ** 6 ** Copyright 2008, The Android Open Source Project 7 ** Licensed under the Apache License, Version 2.0 (the "License"); 8 ** you may not use this file except in compliance with the License. 9 ** You may obtain a copy of the License at 10 ** 11 ** http://www.apache.org/licenses/LICENSE-2.0 12 ** 13 ** Unless required by applicable law or agreed to in writing, software 14 ** distributed under the License is distributed on an "AS IS" BASIS, 15 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 ** See the License for the specific language governing permissions and 17 ** limitations under the License. 18 */ 19 20 #ifndef ANDROID_HARDWARE_QCAMERA_PARAMETERS_H 21 #define ANDROID_HARDWARE_QCAMERA_PARAMETERS_H 22 23 // To remove 24 #include <cutils/properties.h> 25 26 // System dependencies 27 #include <CameraParameters.h> 28 #include <utils/Errors.h> 29 30 // Camera dependencies 31 #include "camera.h" 32 #include "QCameraMem.h" 33 #include "QCameraParametersIntf.h" 34 #include "QCameraThermalAdapter.h" 35 #include "QCameraCommon.h" 36 #include "QCameraFOVControl.h" 37 38 extern "C" { 39 #include "mm_jpeg_interface.h" 40 } 41 42 using ::android::hardware::camera::common::V1_0::helper::CameraParameters; 43 using ::android::hardware::camera::common::V1_0::helper::Size; 44 using namespace android; 45 46 namespace qcamera { 47 48 //EXIF globals 49 static const char ExifAsciiPrefix[] = { 0x41, 0x53, 0x43, 0x49, 0x49, 0x0, 0x0, 0x0 }; // "ASCII\0\0\0" 50 static const char ExifUndefinedPrefix[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; // "\0\0\0\0\0\0\0\0" 51 52 #define FOCAL_LENGTH_DECIMAL_PRECISION 100 53 54 #define CAMERA_MIN_BATCH_COUNT 4 55 56 #define QCAMERA_MAX_EXP_TIME_LEVEL1 100 57 #define QCAMERA_MAX_EXP_TIME_LEVEL2 500 58 #define QCAMERA_MAX_EXP_TIME_LEVEL3 1000 59 #define QCAMERA_MAX_EXP_TIME_LEVEL4 10000 60 61 class QCameraParameters: private CameraParameters 62 { 63 64 private: 65 66 class QCameraReprocScaleParam{ 67 public: 68 69 QCameraReprocScaleParam(); 70 ~QCameraReprocScaleParam(); 71 72 void setScaleEnable(bool enabled); 73 int32_t setScaleSizeTbl(size_t scale_cnt, 74 cam_dimension_t *scale_tbl, size_t org_cnt, 75 cam_dimension_t *org_tbl); 76 int32_t setValidatePicSize(int &width, int &height); 77 78 bool isScaleEnabled(); 79 bool isUnderScaling(); 80 81 size_t getScaleSizeTblCnt(); 82 cam_dimension_t *getScaledSizeTbl(); 83 size_t getTotalSizeTblCnt(); 84 cam_dimension_t *getTotalSizeTbl(); 85 int32_t getPicSizeFromAPK(int &width, int &height); 86 int32_t getPicSizeSetted(int &width, int &height); 87 88 private: 89 bool isScalePicSize(int width, int height); 90 bool isValidatePicSize(int width, int height); 91 int32_t setSensorSupportedPicSize(); 92 size_t checkScaleSizeTable(size_t scale_cnt, cam_dimension_t *scale_tbl, 93 size_t org_cnt, cam_dimension_t *org_tbl); 94 95 bool mScaleEnabled; 96 bool mIsUnderScaling; //if in scale status 97 98 // picture size cnt that need scale operation 99 size_t mNeedScaleCnt; 100 cam_dimension_t mNeedScaledSizeTbl[MAX_SCALE_SIZES_CNT]; 101 102 // sensor supported size cnt and table 103 size_t mSensorSizeTblCnt; 104 cam_dimension_t *mSensorSizeTbl; 105 106 // Total size cnt (sensor supported + need scale cnt) 107 size_t mTotalSizeTblCnt; 108 cam_dimension_t mTotalSizeTbl[MAX_SIZES_CNT]; 109 110 cam_dimension_t mPicSizeFromAPK; // dimension that APK is expected 111 cam_dimension_t mPicSizeSetted; // dimension that config vfe 112 }; 113 114 // Supported PREVIEW/RECORDING SIZES IN HIGH FRAME RATE recording, sizes in pixels. 115 // Example value: "800x480,432x320". Read only. 116 static const char KEY_QC_SUPPORTED_HFR_SIZES[]; 117 // The mode of preview frame rate. 118 // Example value: "frame-rate-auto, frame-rate-fixed". 119 static const char KEY_QC_PREVIEW_FRAME_RATE_MODE[]; 120 static const char KEY_QC_SUPPORTED_PREVIEW_FRAME_RATE_MODES[]; 121 static const char KEY_QC_PREVIEW_FRAME_RATE_AUTO_MODE[]; 122 static const char KEY_QC_PREVIEW_FRAME_RATE_FIXED_MODE[]; 123 static const char KEY_QC_SUPPORTED_SKIN_TONE_ENHANCEMENT_MODES[] ; 124 125 // Supported live snapshot sizes 126 static const char KEY_QC_SUPPORTED_LIVESNAPSHOT_SIZES[]; 127 128 // Supported Raw formats 129 static const char KEY_QC_SUPPORTED_RAW_FORMATS[]; 130 static const char KEY_QC_RAW_FORMAT[]; 131 132 //Touch Af/AEC settings. 133 static const char KEY_QC_TOUCH_AF_AEC[]; 134 static const char KEY_QC_SUPPORTED_TOUCH_AF_AEC[]; 135 //Touch Index for AEC. 136 static const char KEY_QC_TOUCH_INDEX_AEC[]; 137 //Touch Index for AF. 138 static const char KEY_QC_TOUCH_INDEX_AF[]; 139 // Current auto scene detection mode. 140 // Example value: "off" or "on" constants. Read/write. 141 static const char KEY_QC_SCENE_DETECT[]; 142 // Supported auto scene detection settings. 143 // Example value: "off,on". Read only. 144 static const char KEY_QC_SUPPORTED_SCENE_DETECT[]; 145 static const char KEY_QC_SELECTABLE_ZONE_AF[]; 146 147 static const char KEY_QC_ISO_MODE[]; 148 static const char KEY_QC_CONTINUOUS_ISO[]; 149 static const char KEY_QC_MIN_ISO[]; 150 static const char KEY_QC_MAX_ISO[]; 151 static const char KEY_QC_SUPPORTED_ISO_MODES[]; 152 static const char KEY_QC_EXPOSURE_TIME[]; 153 static const char KEY_QC_MIN_EXPOSURE_TIME[]; 154 static const char KEY_QC_MAX_EXPOSURE_TIME[]; 155 static const char KEY_QC_LENSSHADE[] ; 156 static const char KEY_QC_SUPPORTED_LENSSHADE_MODES[] ; 157 static const char KEY_QC_AUTO_EXPOSURE[]; 158 static const char KEY_QC_SUPPORTED_AUTO_EXPOSURE[]; 159 160 static const char KEY_QC_GPS_LATITUDE_REF[]; 161 static const char KEY_QC_GPS_LONGITUDE_REF[]; 162 static const char KEY_QC_GPS_ALTITUDE_REF[]; 163 static const char KEY_QC_GPS_STATUS[]; 164 static const char KEY_QC_MEMORY_COLOR_ENHANCEMENT[]; 165 static const char KEY_QC_SUPPORTED_MEM_COLOR_ENHANCE_MODES[]; 166 static const char KEY_QC_DIS[]; 167 static const char KEY_QC_OIS[]; 168 static const char KEY_QC_SUPPORTED_DIS_MODES[]; 169 static const char KEY_QC_SUPPORTED_OIS_MODES[]; 170 171 static const char KEY_QC_ZSL[]; 172 static const char KEY_QC_SUPPORTED_ZSL_MODES[]; 173 static const char KEY_QC_ZSL_BURST_INTERVAL[]; 174 static const char KEY_QC_ZSL_BURST_LOOKBACK[]; 175 static const char KEY_QC_ZSL_QUEUE_DEPTH[]; 176 177 static const char KEY_QC_CAMERA_MODE[]; 178 static const char KEY_QC_ORIENTATION[]; 179 180 static const char KEY_QC_VIDEO_HIGH_FRAME_RATE[]; 181 static const char KEY_QC_VIDEO_HIGH_SPEED_RECORDING[]; 182 static const char KEY_QC_SUPPORTED_VIDEO_HIGH_FRAME_RATE_MODES[]; 183 static const char KEY_QC_HIGH_DYNAMIC_RANGE_IMAGING[]; 184 static const char KEY_QC_SUPPORTED_HDR_IMAGING_MODES[]; 185 static const char KEY_QC_AE_BRACKET_HDR[]; 186 static const char KEY_QC_SUPPORTED_AE_BRACKET_MODES[]; 187 static const char KEY_QC_CAPTURE_BURST_EXPOSURE[]; 188 static const char KEY_QC_NUM_SNAPSHOT_PER_SHUTTER[]; 189 static const char KEY_QC_NUM_RETRO_BURST_PER_SHUTTER[]; 190 static const char KEY_QC_SNAPSHOT_BURST_LED_ON_PERIOD[]; 191 static const char KEY_QC_SNAPSHOT_BURST_NUM[]; 192 static const char KEY_QC_NO_DISPLAY_MODE[]; 193 static const char KEY_QC_RAW_PICUTRE_SIZE[]; 194 static const char KEY_QC_TINTLESS_ENABLE[]; 195 static const char KEY_QC_SCENE_SELECTION[]; 196 static const char KEY_QC_CDS_MODE[]; 197 static const char KEY_QC_VIDEO_CDS_MODE[]; 198 static const char KEY_QC_SUPPORTED_CDS_MODES[]; 199 static const char KEY_QC_SUPPORTED_VIDEO_CDS_MODES[]; 200 static const char KEY_QC_TNR_MODE[]; 201 static const char KEY_QC_VIDEO_TNR_MODE[]; 202 static const char KEY_QC_SUPPORTED_TNR_MODES[]; 203 static const char KEY_QC_SUPPORTED_VIDEO_TNR_MODES[]; 204 205 static const char KEY_INTERNAL_PERVIEW_RESTART[]; 206 static const char KEY_QC_WB_MANUAL_CCT[]; 207 static const char KEY_QC_MIN_WB_CCT[]; 208 static const char KEY_QC_MAX_WB_CCT[]; 209 static const char KEY_QC_MANUAL_WB_GAINS[]; 210 static const char KEY_QC_MIN_WB_GAIN[]; 211 static const char KEY_QC_MAX_WB_GAIN[]; 212 static const char WHITE_BALANCE_MANUAL[]; 213 static const char FOCUS_MODE_MANUAL_POSITION[]; 214 static const char KEY_QC_LONG_SHOT[]; 215 static const char KEY_QC_INITIAL_EXPOSURE_INDEX[]; 216 static const char KEY_QC_INSTANT_AEC[]; 217 static const char KEY_QC_INSTANT_CAPTURE[]; 218 static const char KEY_QC_INSTANT_AEC_SUPPORTED_MODES[]; 219 static const char KEY_QC_INSTANT_CAPTURE_SUPPORTED_MODES[]; 220 221 static const char KEY_QC_MANUAL_FOCUS_POSITION[]; 222 static const char KEY_QC_MANUAL_FOCUS_POS_TYPE[]; 223 static const char KEY_QC_MIN_FOCUS_POS_INDEX[]; 224 static const char KEY_QC_MAX_FOCUS_POS_INDEX[]; 225 static const char KEY_QC_MIN_FOCUS_POS_DAC[]; 226 static const char KEY_QC_MAX_FOCUS_POS_DAC[]; 227 static const char KEY_QC_MIN_FOCUS_POS_RATIO[]; 228 static const char KEY_QC_MAX_FOCUS_POS_RATIO[]; 229 static const char KEY_QC_MIN_FOCUS_POS_DIOPTER[]; 230 static const char KEY_QC_MAX_FOCUS_POS_DIOPTER[]; 231 static const char KEY_QC_FOCUS_POSITION_SCALE[]; 232 static const char KEY_QC_FOCUS_POSITION_DIOPTER[]; 233 234 static const char KEY_QC_SUPPORTED_MANUAL_FOCUS_MODES[]; 235 static const char KEY_QC_SUPPORTED_MANUAL_EXPOSURE_MODES[]; 236 static const char KEY_QC_SUPPORTED_MANUAL_WB_MODES[]; 237 static const char KEY_QC_FOCUS_SCALE_MODE[]; 238 static const char KEY_QC_FOCUS_DIOPTER_MODE[]; 239 static const char KEY_QC_ISO_PRIORITY[]; 240 static const char KEY_QC_EXP_TIME_PRIORITY[]; 241 static const char KEY_QC_USER_SETTING[]; 242 static const char KEY_QC_WB_CCT_MODE[]; 243 static const char KEY_QC_WB_GAIN_MODE[]; 244 static const char KEY_QC_MANUAL_WB_TYPE[]; 245 static const char KEY_QC_MANUAL_WB_VALUE[]; 246 static const char KEY_QC_CURRENT_EXPOSURE_TIME[]; 247 static const char KEY_QC_CURRENT_ISO[]; 248 static const char KEY_QC_CACHE_VIDEO_BUFFERS[]; 249 250 // DENOISE 251 static const char KEY_QC_DENOISE[]; 252 static const char KEY_QC_SUPPORTED_DENOISE[]; 253 254 //Selectable zone AF. 255 static const char KEY_QC_FOCUS_ALGO[]; 256 static const char KEY_QC_SUPPORTED_FOCUS_ALGOS[]; 257 258 //Face Detection 259 static const char KEY_QC_FACE_DETECTION[]; 260 static const char KEY_QC_SUPPORTED_FACE_DETECTION[]; 261 262 //Face Recognition 263 static const char KEY_QC_FACE_RECOGNITION[]; 264 static const char KEY_QC_SUPPORTED_FACE_RECOGNITION[]; 265 266 //Indicates number of faces requested by the application. 267 //This value will be rejected if the requested faces 268 //greater than supported by hardware. 269 //Write only. 270 static const char KEY_QC_MAX_NUM_REQUESTED_FACES[]; 271 272 //preview flip 273 static const char KEY_QC_PREVIEW_FLIP[]; 274 //video flip 275 static const char KEY_QC_VIDEO_FLIP[]; 276 //snapshot picture flip 277 static const char KEY_QC_SNAPSHOT_PICTURE_FLIP[]; 278 279 static const char KEY_QC_SUPPORTED_FLIP_MODES[]; 280 281 //Face Detection, Facial processing requirement 282 static const char KEY_QC_SNAPSHOT_FD_DATA[]; 283 284 //Auto HDR enable 285 static const char KEY_QC_AUTO_HDR_ENABLE[]; 286 // video rotation 287 static const char KEY_QC_VIDEO_ROTATION[]; 288 static const char KEY_QC_SUPPORTED_VIDEO_ROTATION_VALUES[]; 289 290 //Redeye Reduction 291 static const char KEY_QC_REDEYE_REDUCTION[]; 292 static const char KEY_QC_SUPPORTED_REDEYE_REDUCTION[]; 293 static const char EFFECT_EMBOSS[]; 294 static const char EFFECT_SKETCH[]; 295 static const char EFFECT_NEON[]; 296 static const char EFFECT_BEAUTY[]; 297 298 //AF Bracketing 299 static const char KEY_QC_AF_BRACKET[]; 300 static const char KEY_QC_SUPPORTED_AF_BRACKET_MODES[]; 301 302 //Refocus 303 static const char KEY_QC_RE_FOCUS[]; 304 static const char KEY_QC_SUPPORTED_RE_FOCUS_MODES[]; 305 306 //Chroma Flash 307 static const char KEY_QC_CHROMA_FLASH[]; 308 static const char KEY_QC_SUPPORTED_CHROMA_FLASH_MODES[]; 309 310 //Opti Zoom 311 static const char KEY_QC_OPTI_ZOOM[]; 312 static const char KEY_QC_SUPPORTED_OPTI_ZOOM_MODES[]; 313 314 // Auto HDR supported 315 static const char KEY_QC_AUTO_HDR_SUPPORTED[]; 316 317 // HDR modes 318 static const char KEY_QC_HDR_MODE[]; 319 static const char KEY_QC_SUPPORTED_KEY_QC_HDR_MODES[]; 320 321 //True Portrait 322 static const char KEY_QC_TRUE_PORTRAIT[]; 323 static const char KEY_QC_SUPPORTED_TRUE_PORTRAIT_MODES[]; 324 325 //See more 326 static const char KEY_QC_SEE_MORE[]; 327 static const char KEY_QC_SUPPORTED_SEE_MORE_MODES[]; 328 329 //Still more 330 static const char KEY_QC_STILL_MORE[]; 331 static const char KEY_QC_SUPPORTED_STILL_MORE_MODES[]; 332 333 //Noise reduction mode 334 static const char KEY_QC_NOISE_REDUCTION_MODE[]; 335 static const char KEY_QC_NOISE_REDUCTION_MODE_VALUES[]; 336 337 //Longshot 338 static const char KEY_QC_LONGSHOT_SUPPORTED[]; 339 340 //ZSL+HDR 341 static const char KEY_QC_ZSL_HDR_SUPPORTED[]; 342 343 // Values for Touch AF/AEC 344 static const char TOUCH_AF_AEC_OFF[]; 345 static const char TOUCH_AF_AEC_ON[]; 346 347 // Values for Scene mode 348 static const char SCENE_MODE_ASD[]; 349 static const char SCENE_MODE_BACKLIGHT[]; 350 static const char SCENE_MODE_FLOWERS[]; 351 static const char SCENE_MODE_AR[]; 352 static const char SCENE_MODE_HDR[]; 353 static const char PIXEL_FORMAT_YUV420SP_ADRENO[]; // ADRENO 354 static const char PIXEL_FORMAT_YV12[]; // NV12 355 static const char PIXEL_FORMAT_NV12[]; //NV12 356 static const char QC_PIXEL_FORMAT_NV12_VENUS[]; //NV12 VENUS 357 358 // Values for raw picture format 359 static const char QC_PIXEL_FORMAT_YUV_RAW_8BIT_YUYV[]; 360 static const char QC_PIXEL_FORMAT_YUV_RAW_8BIT_YVYU[]; 361 static const char QC_PIXEL_FORMAT_YUV_RAW_8BIT_UYVY[]; 362 static const char QC_PIXEL_FORMAT_YUV_RAW_8BIT_VYUY[]; 363 static const char QC_PIXEL_FORMAT_BAYER_QCOM_RAW_8GBRG[]; 364 static const char QC_PIXEL_FORMAT_BAYER_QCOM_RAW_8GRBG[]; 365 static const char QC_PIXEL_FORMAT_BAYER_QCOM_RAW_8RGGB[]; 366 static const char QC_PIXEL_FORMAT_BAYER_QCOM_RAW_8BGGR[]; 367 static const char QC_PIXEL_FORMAT_BAYER_QCOM_RAW_10GBRG[]; 368 static const char QC_PIXEL_FORMAT_BAYER_QCOM_RAW_10GRBG[]; 369 static const char QC_PIXEL_FORMAT_BAYER_QCOM_RAW_10RGGB[]; 370 static const char QC_PIXEL_FORMAT_BAYER_QCOM_RAW_10BGGR[]; 371 static const char QC_PIXEL_FORMAT_BAYER_QCOM_RAW_12GBRG[]; 372 static const char QC_PIXEL_FORMAT_BAYER_QCOM_RAW_12GRBG[]; 373 static const char QC_PIXEL_FORMAT_BAYER_QCOM_RAW_12RGGB[]; 374 static const char QC_PIXEL_FORMAT_BAYER_QCOM_RAW_12BGGR[]; 375 static const char QC_PIXEL_FORMAT_BAYER_QCOM_RAW_14GBRG[]; 376 static const char QC_PIXEL_FORMAT_BAYER_QCOM_RAW_14GRBG[]; 377 static const char QC_PIXEL_FORMAT_BAYER_QCOM_RAW_14RGGB[]; 378 static const char QC_PIXEL_FORMAT_BAYER_QCOM_RAW_14BGGR[]; 379 static const char QC_PIXEL_FORMAT_BAYER_MIPI_RAW_8GBRG[]; 380 static const char QC_PIXEL_FORMAT_BAYER_MIPI_RAW_8GRBG[]; 381 static const char QC_PIXEL_FORMAT_BAYER_MIPI_RAW_8RGGB[]; 382 static const char QC_PIXEL_FORMAT_BAYER_MIPI_RAW_8BGGR[]; 383 static const char QC_PIXEL_FORMAT_BAYER_MIPI_RAW_10GBRG[]; 384 static const char QC_PIXEL_FORMAT_BAYER_MIPI_RAW_10GRBG[]; 385 static const char QC_PIXEL_FORMAT_BAYER_MIPI_RAW_10RGGB[]; 386 static const char QC_PIXEL_FORMAT_BAYER_MIPI_RAW_10BGGR[]; 387 static const char QC_PIXEL_FORMAT_BAYER_MIPI_RAW_12GBRG[]; 388 static const char QC_PIXEL_FORMAT_BAYER_MIPI_RAW_12GRBG[]; 389 static const char QC_PIXEL_FORMAT_BAYER_MIPI_RAW_12RGGB[]; 390 static const char QC_PIXEL_FORMAT_BAYER_MIPI_RAW_12BGGR[]; 391 static const char QC_PIXEL_FORMAT_BAYER_MIPI_RAW_14GBRG[]; 392 static const char QC_PIXEL_FORMAT_BAYER_MIPI_RAW_14GRBG[]; 393 static const char QC_PIXEL_FORMAT_BAYER_MIPI_RAW_14RGGB[]; 394 static const char QC_PIXEL_FORMAT_BAYER_MIPI_RAW_14BGGR[]; 395 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_QCOM_8GBRG[]; 396 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_QCOM_8GRBG[]; 397 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_QCOM_8RGGB[]; 398 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_QCOM_8BGGR[]; 399 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_QCOM_10GBRG[]; 400 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_QCOM_10GRBG[]; 401 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_QCOM_10RGGB[]; 402 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_QCOM_10BGGR[]; 403 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_QCOM_12GBRG[]; 404 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_QCOM_12GRBG[]; 405 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_QCOM_12RGGB[]; 406 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_QCOM_12BGGR[]; 407 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_QCOM_14GBRG[]; 408 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_QCOM_14GRBG[]; 409 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_QCOM_14RGGB[]; 410 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_QCOM_14BGGR[]; 411 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_MIPI_8GBRG[]; 412 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_MIPI_8GRBG[]; 413 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_MIPI_8RGGB[]; 414 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_MIPI_8BGGR[]; 415 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_MIPI_10GBRG[]; 416 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_MIPI_10GRBG[]; 417 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_MIPI_10RGGB[]; 418 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_MIPI_10BGGR[]; 419 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_MIPI_12GBRG[]; 420 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_MIPI_12GRBG[]; 421 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_MIPI_12RGGB[]; 422 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_MIPI_12BGGR[]; 423 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_MIPI_14GBRG[]; 424 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_MIPI_14GRBG[]; 425 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_MIPI_14RGGB[]; 426 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_MIPI_14BGGR[]; 427 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_PLAIN8_8GBRG[]; 428 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_PLAIN8_8GRBG[]; 429 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_PLAIN8_8RGGB[]; 430 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_PLAIN8_8BGGR[]; 431 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_PLAIN16_8GBRG[]; 432 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_PLAIN16_8GRBG[]; 433 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_PLAIN16_8RGGB[]; 434 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_PLAIN16_8BGGR[]; 435 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_PLAIN16_10GBRG[]; 436 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_PLAIN16_10GRBG[]; 437 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_PLAIN16_10RGGB[]; 438 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_PLAIN16_10BGGR[]; 439 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_PLAIN16_12GBRG[]; 440 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_PLAIN16_12GRBG[]; 441 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_PLAIN16_12RGGB[]; 442 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_PLAIN16_12BGGR[]; 443 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_PLAIN16_14GBRG[]; 444 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_PLAIN16_14GRBG[]; 445 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_PLAIN16_14RGGB[]; 446 static const char QC_PIXEL_FORMAT_BAYER_IDEAL_PLAIN16_14BGGR[]; 447 448 // ISO values 449 static const char ISO_AUTO[]; 450 static const char ISO_HJR[]; 451 static const char ISO_100[]; 452 static const char ISO_200[]; 453 static const char ISO_400[]; 454 static const char ISO_800[]; 455 static const char ISO_1600[]; 456 static const char ISO_3200[]; 457 static const char ISO_MANUAL[]; 458 459 // Values for auto exposure settings. 460 static const char AUTO_EXPOSURE_FRAME_AVG[]; 461 static const char AUTO_EXPOSURE_CENTER_WEIGHTED[]; 462 static const char AUTO_EXPOSURE_SPOT_METERING[]; 463 static const char AUTO_EXPOSURE_SMART_METERING[]; 464 static const char AUTO_EXPOSURE_USER_METERING[]; 465 static const char AUTO_EXPOSURE_SPOT_METERING_ADV[]; 466 static const char AUTO_EXPOSURE_CENTER_WEIGHTED_ADV[]; 467 468 // Values for instant AEC modes 469 static const char KEY_QC_INSTANT_AEC_DISABLE[]; 470 static const char KEY_QC_INSTANT_AEC_AGGRESSIVE_AEC[]; 471 static const char KEY_QC_INSTANT_AEC_FAST_AEC[]; 472 473 // Values for instant capture modes 474 static const char KEY_QC_INSTANT_CAPTURE_DISABLE[]; 475 static const char KEY_QC_INSTANT_CAPTURE_AGGRESSIVE_AEC[]; 476 static const char KEY_QC_INSTANT_CAPTURE_FAST_AEC[]; 477 478 static const char KEY_QC_SHARPNESS[]; 479 static const char KEY_QC_MIN_SHARPNESS[]; 480 static const char KEY_QC_MAX_SHARPNESS[]; 481 static const char KEY_QC_SHARPNESS_STEP[]; 482 static const char KEY_QC_CONTRAST[]; 483 static const char KEY_QC_MIN_CONTRAST[]; 484 static const char KEY_QC_MAX_CONTRAST[]; 485 static const char KEY_QC_CONTRAST_STEP[]; 486 static const char KEY_QC_SATURATION[]; 487 static const char KEY_QC_MIN_SATURATION[]; 488 static const char KEY_QC_MAX_SATURATION[]; 489 static const char KEY_QC_SATURATION_STEP[]; 490 static const char KEY_QC_BRIGHTNESS[]; 491 static const char KEY_QC_MIN_BRIGHTNESS[]; 492 static const char KEY_QC_MAX_BRIGHTNESS[]; 493 static const char KEY_QC_BRIGHTNESS_STEP[]; 494 static const char KEY_QC_SCE_FACTOR[]; 495 static const char KEY_QC_MIN_SCE_FACTOR[]; 496 static const char KEY_QC_MAX_SCE_FACTOR[]; 497 static const char KEY_QC_SCE_FACTOR_STEP[]; 498 499 static const char KEY_QC_HISTOGRAM[] ; 500 static const char KEY_QC_SUPPORTED_HISTOGRAM_MODES[] ; 501 static const char KEY_QC_SUPPORTED_HDR_NEED_1X[]; 502 static const char KEY_QC_HDR_NEED_1X[]; 503 static const char KEY_QC_VIDEO_HDR[]; 504 static const char KEY_QC_VT_ENABLE[]; 505 static const char KEY_QC_SUPPORTED_VIDEO_HDR_MODES[]; 506 static const char KEY_QC_SENSOR_HDR[]; 507 static const char KEY_QC_SUPPORTED_SENSOR_HDR_MODES[]; 508 static const char KEY_QC_RDI_MODE[]; 509 static const char KEY_QC_SUPPORTED_RDI_MODES[]; 510 static const char KEY_QC_SECURE_MODE[]; 511 static const char KEY_QC_SUPPORTED_SECURE_MODES[]; 512 513 // Values for SKIN TONE ENHANCEMENT 514 static const char SKIN_TONE_ENHANCEMENT_ENABLE[] ; 515 static const char SKIN_TONE_ENHANCEMENT_DISABLE[] ; 516 517 // Values for Denoise 518 static const char DENOISE_OFF[] ; 519 static const char DENOISE_ON[] ; 520 521 // Values for auto exposure settings. 522 static const char FOCUS_ALGO_AUTO[]; 523 static const char FOCUS_ALGO_SPOT_METERING[]; 524 static const char FOCUS_ALGO_CENTER_WEIGHTED[]; 525 static const char FOCUS_ALGO_FRAME_AVERAGE[]; 526 527 // Values for AE Bracketing settings. 528 static const char AE_BRACKET_OFF[]; 529 static const char AE_BRACKET[]; 530 531 // Values for AF Bracketing settings. 532 static const char AF_BRACKET_OFF[]; 533 static const char AF_BRACKET_ON[]; 534 535 // Values for Refocus settings. 536 static const char RE_FOCUS_OFF[]; 537 static const char RE_FOCUS_ON[]; 538 539 // Values for Chroma Flash settings. 540 static const char CHROMA_FLASH_OFF[]; 541 static const char CHROMA_FLASH_ON[]; 542 543 // Values for Opti Zoom settings. 544 static const char OPTI_ZOOM_OFF[]; 545 static const char OPTI_ZOOM_ON[]; 546 547 // Values for Still More settings. 548 static const char STILL_MORE_OFF[]; 549 static const char STILL_MORE_ON[]; 550 551 // Values for HDR mode settings. 552 static const char HDR_MODE_SENSOR[]; 553 static const char HDR_MODE_MULTI_FRAME[]; 554 555 // Values for True Portrait settings. 556 static const char TRUE_PORTRAIT_OFF[]; 557 static const char TRUE_PORTRAIT_ON[]; 558 559 // Values for HFR settings. 560 static const char VIDEO_HFR_OFF[]; 561 static const char VIDEO_HFR_2X[]; 562 static const char VIDEO_HFR_3X[]; 563 static const char VIDEO_HFR_4X[]; 564 static const char VIDEO_HFR_5X[]; 565 static const char VIDEO_HFR_6X[]; 566 static const char VIDEO_HFR_7X[]; 567 static const char VIDEO_HFR_8X[]; 568 static const char VIDEO_HFR_9X[]; 569 570 // Values for feature on/off settings. 571 static const char VALUE_OFF[]; 572 static const char VALUE_ON[]; 573 574 // Values for feature enable/disable settings. 575 static const char VALUE_ENABLE[]; 576 static const char VALUE_DISABLE[]; 577 578 // Values for feature true/false settings. 579 static const char VALUE_FALSE[]; 580 static const char VALUE_TRUE[]; 581 582 //Values for flip settings 583 static const char FLIP_MODE_OFF[]; 584 static const char FLIP_MODE_V[]; 585 static const char FLIP_MODE_H[]; 586 static const char FLIP_MODE_VH[]; 587 588 //Values for CDS Mode 589 static const char CDS_MODE_OFF[]; 590 static const char CDS_MODE_ON[]; 591 static const char CDS_MODE_AUTO[]; 592 593 static const char VALUE_FAST[]; 594 static const char VALUE_HIGH_QUALITY[]; 595 596 static const char KEY_SELECTED_AUTO_SCENE[]; 597 598 // Values for Video rotation 599 static const char VIDEO_ROTATION_0[]; 600 static const char VIDEO_ROTATION_90[]; 601 static const char VIDEO_ROTATION_180[]; 602 static const char VIDEO_ROTATION_270[]; 603 604 #ifdef TARGET_TS_MAKEUP 605 static const char KEY_TS_MAKEUP[]; 606 static const char KEY_TS_MAKEUP_WHITEN[]; 607 static const char KEY_TS_MAKEUP_CLEAN[]; 608 #endif 609 //param key for HFR batch size 610 static const char KEY_QC_VIDEO_BATCH_SIZE[]; 611 612 static const char KEY_QC_SUPPORTED_METADATA_TYPES[]; 613 static const char QC_METADATA_ASD[]; 614 static const char QC_METADATA_FD[]; 615 static const char QC_METADATA_HDR[]; 616 static const char QC_METADATA_LED_CALIB[]; 617 618 //Key to enable dual LED calibration 619 static const char KEY_QC_LED_CALIBRATION[]; 620 621 enum { 622 CAMERA_ORIENTATION_UNKNOWN = 0, 623 CAMERA_ORIENTATION_PORTRAIT = 1, 624 CAMERA_ORIENTATION_LANDSCAPE = 2, 625 }; 626 627 template <typename valueType> struct QCameraMap { 628 const char *const desc; 629 valueType val; 630 }; 631 632 public: 633 QCameraParameters(); 634 QCameraParameters(const String8 ¶ms); 635 ~QCameraParameters(); 636 637 int32_t allocate(uint8_t bufCount); 638 int32_t init(cam_capability_t *, 639 mm_camera_vtbl_t *, 640 QCameraAdjustFPS *, 641 QCameraFOVControl *); 642 void deinit(); 643 int32_t initDefaultParameters(); 644 int32_t updateParameters(const String8& params, bool &needRestart); 645 int32_t commitParameters(); 646 647 char* getParameters(); getPreviewFpsRange(int * min_fps,int * max_fps)648 void getPreviewFpsRange(int *min_fps, int *max_fps) const { 649 CameraParameters::getPreviewFpsRange(min_fps, max_fps); 650 } 651 #ifdef TARGET_TS_MAKEUP 652 bool getTsMakeupInfo(int &whiteLevel, int &cleanLevel) const; 653 #endif 654 655 int getPreviewHalPixelFormat(); 656 cam_rotation_t getStreamRotation(cam_stream_type_t streamType); 657 int32_t getStreamRotation(cam_stream_type_t streamType, 658 cam_pp_feature_config_t &featureConfig, 659 cam_dimension_t &dim); 660 int32_t getStreamFormat(cam_stream_type_t streamType, 661 cam_format_t &format); 662 int32_t getStreamSubFormat(cam_stream_type_t streamType, 663 cam_sub_format_type_t &sub_format); 664 665 int32_t getStreamDimension(cam_stream_type_t streamType, 666 cam_dimension_t &dim, uint32_t cam_type = MM_CAMERA_TYPE_MAIN); 667 void getThumbnailSize(int *width, int *height) const; 668 669 670 uint8_t getZSLBurstInterval(); 671 uint8_t getZSLQueueDepth(); 672 uint8_t getZSLBackLookCount(); 673 uint8_t getMaxUnmatchedFramesInQueue(); isZSLMode()674 bool isZSLMode() {return m_bZslMode;}; isRdiMode()675 bool isRdiMode() {return m_bRdiMode;}; isSecureMode()676 bool isSecureMode() {return m_bSecureMode;}; getSecureStreamType()677 cam_stream_type_t getSecureStreamType() {return mSecureStraemType;}; isNoDisplayMode()678 bool isNoDisplayMode() {return m_bNoDisplayMode;}; isWNREnabled()679 bool isWNREnabled() {return m_bWNROn;}; isTNRSnapshotEnabled()680 bool isTNRSnapshotEnabled() {return m_bTNRSnapshotOn;}; getCDSMode()681 int32_t getCDSMode() {return mCds_mode;}; isLTMForSeeMoreEnabled()682 bool isLTMForSeeMoreEnabled() {return m_bLtmForSeeMoreEnabled;}; isHfrMode()683 bool isHfrMode() {return m_bHfrMode;}; getHfrFps(cam_fps_range_t & pFpsRange)684 void getHfrFps(cam_fps_range_t &pFpsRange) { pFpsRange = m_hfrFpsRange;}; 685 uint8_t getNumOfSnapshots(); 686 uint8_t getNumOfRetroSnapshots(); 687 uint8_t getNumOfExtraHDRInBufsIfNeeded(); 688 uint8_t getNumOfExtraHDROutBufsIfNeeded(); 689 getRecordingHintValue()690 bool getRecordingHintValue() {return m_bRecordingHint;}; // return local copy of video hint 691 uint32_t getJpegQuality(); 692 uint32_t getRotation(); 693 uint32_t getDeviceRotation(); 694 uint32_t getJpegExifRotation(); 695 bool useJpegExifRotation(); 696 int32_t getEffectValue(); isInstantAECEnabled()697 bool isInstantAECEnabled() {return m_bInstantAEC;}; isInstantCaptureEnabled()698 bool isInstantCaptureEnabled() {return m_bInstantCapture;}; getAecFrameBoundValue()699 uint8_t getAecFrameBoundValue() {return mAecFrameBound;}; getAecSkipDisplayFrameBound()700 uint8_t getAecSkipDisplayFrameBound() {return mAecSkipDisplayFrameBound;}; 701 702 int32_t getExifDateTime(String8 &dateTime, String8 &subsecTime); 703 int32_t getExifFocalLength(rat_t *focalLenght); 704 uint16_t getExifIsoSpeed(); 705 int32_t getExifGpsProcessingMethod(char *gpsProcessingMethod, uint32_t &count); 706 int32_t getExifLatitude(rat_t *latitude, char *latRef); 707 int32_t getExifLongitude(rat_t *longitude, char *lonRef); 708 int32_t getExifAltitude(rat_t *altitude, char *altRef); 709 int32_t getExifGpsDateTimeStamp(char *gpsDateStamp, uint32_t bufLen, rat_t *gpsTimeStamp); 710 bool isVideoBuffersCached(); 711 int32_t updateFocusDistances(cam_focus_distances_info_t *focusDistances); 712 713 bool isAEBracketEnabled(); 714 int32_t setAEBracketing(); isFpsDebugEnabled()715 bool isFpsDebugEnabled() {return m_bDebugFps;}; isHistogramEnabled()716 bool isHistogramEnabled() {return m_bHistogramEnabled;}; isSceneSelectionEnabled()717 bool isSceneSelectionEnabled() {return m_bSceneSelection;}; isSmallJpegSizeEnabled()718 bool isSmallJpegSizeEnabled() {return m_bSmallJpegSize;}; 719 int32_t setSelectedScene(cam_scene_mode_type scene); 720 cam_scene_mode_type getSelectedScene(); isFaceDetectionEnabled()721 bool isFaceDetectionEnabled() {return ((m_nFaceProcMask & 722 (CAM_FACE_PROCESS_MASK_DETECTION | CAM_FACE_PROCESS_MASK_FOCUS)) != 0);}; 723 int32_t setFaceDetectionOption(bool enabled); 724 int32_t setHistogram(bool enabled); 725 int32_t setFaceDetection(bool enabled, bool initCommit); 726 int32_t setFrameSkip(enum msm_vfe_frame_skip_pattern pattern); getThermalMode()727 qcamera_thermal_mode getThermalMode() {return m_ThermalMode;}; 728 int32_t updateRecordingHintValue(int32_t value); 729 int32_t setHDRAEBracket(cam_exp_bracketing_t hdrBracket); 730 bool isHDREnabled(); 731 bool isAutoHDREnabled(); 732 int32_t stopAEBracket(); 733 int32_t updateRAW(cam_dimension_t max_dim); 734 bool isAVTimerEnabled(); 735 bool isDISEnabled(); 736 int32_t setISType(); 737 void setSmallJpegSize(cam_dimension_t sensor_dim, cam_dimension_t snap_dim); 738 int32_t updateSnapshotPpMask(cam_stream_size_info_t &stream_config_info); 739 int32_t getSensorOutputSize(cam_dimension_t max_dim, cam_dimension_t &sensor_dim, 740 uint32_t cam_type = MM_CAMERA_TYPE_MAIN); 741 cam_is_type_t getVideoISType(); 742 cam_is_type_t getPreviewISType(); 743 uint8_t getMobicatMask(); 744 getFocusMode()745 cam_focus_mode_type getFocusMode() const {return mFocusMode;}; 746 int32_t setNumOfSnapshot(); 747 int32_t adjustPreviewFpsRange(cam_fps_range_t *fpsRange); isJpegPictureFormat()748 bool isJpegPictureFormat() {return (mPictureFormat == CAM_FORMAT_JPEG);}; isNV16PictureFormat()749 bool isNV16PictureFormat() {return (mPictureFormat == CAM_FORMAT_YUV_422_NV16);}; isNV21PictureFormat()750 bool isNV21PictureFormat() {return (mPictureFormat == CAM_FORMAT_YUV_420_NV21);}; 751 cam_denoise_process_type_t getDenoiseProcessPlate(cam_intf_parm_type_t type); getMaxPicSize(cam_dimension_t & dim)752 int32_t getMaxPicSize(cam_dimension_t &dim) { dim = m_maxPicSize; return NO_ERROR; }; 753 int getFlipMode(cam_stream_type_t streamType); 754 bool isSnapshotFDNeeded(); 755 isHDR1xFrameEnabled()756 bool isHDR1xFrameEnabled() {return m_bHDR1xFrameEnabled;} 757 bool isSupportedSensorHdrSize(const QCameraParameters& params); 758 bool isYUVFrameInfoNeeded(); 759 const char*getFrameFmtString(cam_format_t fmt); isHDR1xExtraBufferNeeded()760 bool isHDR1xExtraBufferNeeded() {return m_bHDR1xExtraBufferNeeded;} isHDROutputCropEnabled()761 bool isHDROutputCropEnabled() {return m_bHDROutputCropEnabled;} 762 isPreviewFlipChanged()763 bool isPreviewFlipChanged() { return m_bPreviewFlipChanged; }; isVideoFlipChanged()764 bool isVideoFlipChanged() { return m_bVideoFlipChanged; }; isSnapshotFlipChanged()765 bool isSnapshotFlipChanged() { return m_bSnapshotFlipChanged; }; isZoomChanged()766 bool isZoomChanged() { return m_bZoomChanged; }; 767 void setHDRSceneEnable(bool bflag); 768 int32_t updateAWBParams(cam_awb_params_t &awb_params); 769 770 const char *getASDStateString(cam_auto_scene_t scene); isHDRThumbnailProcessNeeded()771 bool isHDRThumbnailProcessNeeded() { return m_bHDRThumbnailProcessNeeded; }; setMinPpMask(cam_feature_mask_t min_pp_mask)772 void setMinPpMask(cam_feature_mask_t min_pp_mask) { m_nMinRequiredPpMask = min_pp_mask; }; 773 bool setStreamConfigure(bool isCapture, bool previewAsPostview, bool resetConfig); 774 int32_t addOnlineRotation(uint32_t rotation, uint32_t streamId, int32_t device_rotation); 775 uint8_t getNumOfExtraBuffersForImageProc(); 776 uint8_t getNumOfExtraBuffersForVideo(); 777 uint8_t getNumOfExtraBuffersForPreview(); 778 uint32_t getExifBufIndex(uint32_t captureIndex); 779 bool needThumbnailReprocess(cam_feature_mask_t *pFeatureMask); isUbiFocusEnabled()780 inline bool isUbiFocusEnabled() {return m_bAFBracketingOn && !m_bReFocusOn;}; isChromaFlashEnabled()781 inline bool isChromaFlashEnabled() {return m_bChromaFlashOn;}; isHighQualityNoiseReductionMode()782 inline bool isHighQualityNoiseReductionMode() {return m_bHighQualityNoiseReductionMode;}; isTruePortraitEnabled()783 inline bool isTruePortraitEnabled() {return m_bTruePortraitOn;}; getTPMaxMetaSize()784 inline size_t getTPMaxMetaSize() { 785 return m_pCapability->true_portrait_settings_need.meta_max_size;}; isSeeMoreEnabled()786 inline bool isSeeMoreEnabled() {return m_bSeeMoreOn;}; isStillMoreEnabled()787 inline bool isStillMoreEnabled() {return m_bStillMoreOn;}; 788 bool isOptiZoomEnabled(); 789 790 int32_t commitAFBracket(cam_af_bracketing_t afBracket); 791 int32_t set3ALock(bool lock3A); 792 int32_t setAndCommitZoom(int zoom_level); 793 uint8_t getBurstCountForAdvancedCapture(); 794 uint32_t getNumberInBufsForSingleShot(); 795 uint32_t getNumberOutBufsForSingleShot(); 796 int32_t setLongshotEnable(bool enable); 797 String8 dump(); isUbiRefocus()798 inline bool isUbiRefocus() {return m_bReFocusOn && 799 (m_pCapability->refocus_af_bracketing_need.output_count > 1);}; getRefocusMaxMetaSize()800 inline uint32_t getRefocusMaxMetaSize() { 801 return m_pCapability->refocus_af_bracketing_need.meta_max_size;}; getRefocusOutputCount()802 inline uint8_t getRefocusOutputCount() { 803 return m_pCapability->refocus_af_bracketing_need.output_count;}; generateThumbFromMain()804 inline bool generateThumbFromMain() {return isUbiFocusEnabled() || 805 isChromaFlashEnabled() || isOptiZoomEnabled() || isUbiRefocus() 806 || isHDREnabled() || isStillMoreEnabled() || isTruePortraitEnabled(); } 807 void updateCurrentFocusPosition(cam_focus_pos_info_t &cur_pos_info); 808 void updateAEInfo(cam_3a_params_t &ae_params); isAdvCamFeaturesEnabled()809 bool isAdvCamFeaturesEnabled() {return isUbiFocusEnabled() || 810 isChromaFlashEnabled() || m_bOptiZoomOn || isHDREnabled() || 811 isAEBracketEnabled() || isStillMoreEnabled() || isUbiRefocus();} 812 int32_t setAecLock(const char *aecStr); 813 int32_t updateDebugLevel(); 814 bool is4k2kVideoResolution(); 815 bool isUBWCEnabled(); 816 817 int getBrightness(); 818 int32_t updateOisValue(bool oisValue); 819 int32_t setIntEvent(cam_int_evt_params_t params); getofflineRAW()820 bool getofflineRAW() {return mOfflineRAW;} 821 bool getQuadraCfa(); 822 int32_t updatePpFeatureMask(cam_stream_type_t stream_type); 823 int32_t getStreamPpMask(cam_stream_type_t stream_type, cam_feature_mask_t &pp_mask); getSharpness()824 int32_t getSharpness() {return m_nSharpness;}; getEffect()825 int32_t getEffect() {return mParmEffect;}; 826 int32_t updateFlashMode(cam_flash_mode_t flash_mode); 827 int32_t configureAEBracketing(cam_capture_frame_config_t &frame_config); 828 int32_t configureHDRBracketing(cam_capture_frame_config_t &frame_config); 829 int32_t configFrameCapture(bool commitSettings); 830 int32_t resetFrameCapture(bool commitSettings, bool lowLightEnabled); getStillMoreSettings()831 cam_still_more_t getStillMoreSettings() {return m_stillmore_config;}; setStillMoreSettings(cam_still_more_t stillmore_config)832 void setStillMoreSettings(cam_still_more_t stillmore_config) 833 {m_stillmore_config = stillmore_config;}; getStillMoreCapability()834 cam_still_more_t getStillMoreCapability() 835 {return m_pCapability->stillmore_settings_need;}; getDynamicImgData()836 cam_dyn_img_data_t getDynamicImgData() { return m_DynamicImgData; } setDynamicImgData(cam_dyn_img_data_t d)837 void setDynamicImgData(cam_dyn_img_data_t d) { m_DynamicImgData = d; } 838 getParmZoomLevel()839 int32_t getParmZoomLevel(){return mParmZoomLevel;}; getReprocCount()840 int8_t getReprocCount(){return mTotalPPCount;}; 841 bool isMultiPassReprocessing(); getCurPPCount()842 int8_t getCurPPCount(){return mCurPPCount;}; 843 void setReprocCount(); 844 bool isPostProcScaling(); 845 bool isLLNoiseEnabled(); setCurPPCount(int8_t count)846 void setCurPPCount(int8_t count) {mCurPPCount = count;}; 847 int32_t setQuadraCfaMode(uint32_t value, bool initCommit); 848 int32_t setToneMapMode(uint32_t value, bool initCommit); 849 void setTintless(bool enable); 850 uint8_t getLongshotStages(); getBufBatchCount()851 int8_t getBufBatchCount() {return mBufBatchCnt;}; getVideoBatchSize()852 int8_t getVideoBatchSize() {return mVideoBatchSize;}; 853 854 int32_t setManualCaptureMode( 855 QCameraManualCaptureModes value = CAM_MANUAL_CAPTURE_TYPE_OFF); getManualCaptureMode()856 QCameraManualCaptureModes getManualCaptureMode() 857 {return m_ManualCaptureMode;}; getExposureTime()858 int64_t getExposureTime() {return m_expTime;}; 859 getCaptureFrameConfig()860 cam_capture_frame_config_t getCaptureFrameConfig() 861 { return m_captureFrameConfig; }; 862 void setJpegRotation(int rotation); getJpegRotation()863 uint32_t getJpegRotation() { return mJpegRotation;}; 864 setLowLightLevel(cam_low_light_mode_t value)865 void setLowLightLevel(cam_low_light_mode_t value) 866 { m_LowLightLevel = value; }; getLowLightLevel()867 cam_low_light_mode_t getLowLightLevel() {return m_LowLightLevel;}; getLowLightCapture()868 bool getLowLightCapture() { return m_LLCaptureEnabled; }; 869 870 /* Dual camera specific */ 871 int32_t sendDualCamCmd(cam_dual_camera_cmd_type type, 872 uint8_t num_cam, void *info); 873 int32_t setDualCamBundleInfo(bool enable_sync, 874 uint8_t bundle_cam_idx); getDcrf()875 bool getDcrf() { return m_bDcrfEnabled; } 876 int32_t setRelatedCamSyncInfo( 877 cam_sync_related_sensors_event_info_t* info); 878 const cam_sync_related_sensors_event_info_t* 879 getRelatedCamSyncInfo(void); 880 int32_t setFrameSyncEnabled(bool enable); 881 bool isFrameSyncEnabled(void); 882 int32_t getRelatedCamCalibration( 883 cam_related_system_calibration_data_t* calib); 884 int32_t bundleRelatedCameras(bool sync); 885 uint8_t fdModeInVideo(); isOEMFeatEnabled()886 bool isOEMFeatEnabled() { return m_bOEMFeatEnabled; } 887 uint8_t isOEMFeatFrameSkipEnabled(); 888 889 int32_t setZslMode(bool value); 890 int32_t updateZSLModeValue(bool value); 891 892 bool isReprocScaleEnabled(); 893 bool isUnderReprocScaling(); 894 int32_t getPicSizeFromAPK(int &width, int &height); 895 896 int32_t checkFeatureConcurrency(); 897 int32_t setInstantAEC(uint8_t enable, bool initCommit); 898 899 int32_t getAnalysisInfo( 900 bool fdVideoEnabled, 901 cam_feature_mask_t featureMask, 902 cam_analysis_info_t *pAnalysisInfo); 903 904 int32_t getMetaRawInfo(); 905 bool sendStreamConfigForPickRes(cam_stream_size_info_t &stream_config_info); 906 int32_t updateDtVc(int32_t *dt, int32_t *vc); 907 bool isLinkPreviewForLiveShot(); 908 909 int32_t SetDualCamera(bool value); isDualCamera()910 bool isDualCamera() {return m_bDualCamera;}; 911 int32_t setCameraControls(int32_t controls); 912 cam_dual_camera_perf_mode_t getLowPowerMode(cam_sync_type_t cam); 913 int32_t setSwitchCamera(uint32_t camMaster); 914 int32_t setDeferCamera(cam_dual_camera_defer_cmd_t type); setBundledSnapshot(bool value)915 void setBundledSnapshot(bool value) { mbundledSnapshot = value; } getDualLedCalibration()916 int32_t getDualLedCalibration() {return m_dualLedCalibration;}; isDCmAsymmetricSnapMode()917 bool isDCmAsymmetricSnapMode (){return mAsymmetricSnapMode;}; 918 private: 919 int32_t setPreviewSize(const QCameraParameters& ); 920 int32_t setVideoSize(const QCameraParameters& ); 921 int32_t setPictureSize(const QCameraParameters& ); 922 int32_t setLiveSnapshotSize(const QCameraParameters& ); 923 int32_t setPreviewFormat(const QCameraParameters& ); 924 int32_t setPictureFormat(const QCameraParameters& ); 925 int32_t setOrientation(const QCameraParameters& ); 926 int32_t setJpegThumbnailSize(const QCameraParameters& ); 927 int32_t setJpegQuality(const QCameraParameters& ); 928 int32_t setPreviewFpsRange(const QCameraParameters& ); 929 int32_t setPreviewFrameRate(const QCameraParameters& ); 930 int32_t setAutoExposure(const QCameraParameters& ); 931 int32_t setEffect(const QCameraParameters& ); 932 int32_t setBrightness(const QCameraParameters& ); 933 int32_t setFocusMode(const QCameraParameters& ); 934 int32_t setFocusPosition(const QCameraParameters& ); 935 int32_t setSharpness(const QCameraParameters& ); 936 int32_t setSaturation(const QCameraParameters& ); 937 int32_t setContrast(const QCameraParameters& ); 938 int32_t setSkinToneEnhancement(const QCameraParameters& ); 939 int32_t setSceneDetect(const QCameraParameters& ); 940 int32_t setVideoHDR(const QCameraParameters& ); 941 int32_t setVtEnable(const QCameraParameters& ); 942 int32_t setZoom(const QCameraParameters& ); 943 int32_t setISOValue(const QCameraParameters& ); 944 int32_t setContinuousISO(const QCameraParameters& ); 945 int32_t setExposureTime(const QCameraParameters& ); 946 int32_t setRotation(const QCameraParameters& ); 947 int32_t setVideoRotation(const QCameraParameters& ); 948 int32_t setFlash(const QCameraParameters& ); 949 int32_t setAecLock(const QCameraParameters& ); 950 int32_t setAwbLock(const QCameraParameters& ); 951 int32_t setMCEValue(const QCameraParameters& ); 952 int32_t setDISValue(const QCameraParameters& params); 953 int32_t setLensShadeValue(const QCameraParameters& ); 954 int32_t setExposureCompensation(const QCameraParameters& ); 955 int32_t setWhiteBalance(const QCameraParameters& ); 956 int32_t setManualWhiteBalance(const QCameraParameters& ); 957 int32_t setAntibanding(const QCameraParameters& ); 958 int32_t setFocusAreas(const QCameraParameters& ); 959 int32_t setMeteringAreas(const QCameraParameters& ); 960 int32_t setSceneMode(const QCameraParameters& ); 961 int32_t setSelectableZoneAf(const QCameraParameters& ); 962 int32_t setAEBracket(const QCameraParameters& ); 963 int32_t setAFBracket(const QCameraParameters& ); 964 int32_t setReFocus(const QCameraParameters& ); 965 int32_t setChromaFlash(const QCameraParameters& ); 966 int32_t setOptiZoom(const QCameraParameters& ); 967 int32_t setHDRMode(const QCameraParameters& ); 968 int32_t setHDRNeed1x(const QCameraParameters& ); 969 int32_t setTruePortrait(const QCameraParameters& ); 970 int32_t setSeeMore(const QCameraParameters& ); 971 int32_t setStillMore(const QCameraParameters& ); 972 #ifdef TARGET_TS_MAKEUP 973 int32_t setTsMakeup(const QCameraParameters& ); 974 #endif 975 int32_t setNoiseReductionMode(const QCameraParameters& ); 976 int32_t setRedeyeReduction(const QCameraParameters& ); 977 int32_t setGpsLocation(const QCameraParameters& ); 978 int32_t setRecordingHint(const QCameraParameters& ); 979 int32_t setNoDisplayMode(const QCameraParameters& ); 980 int32_t setWaveletDenoise(const QCameraParameters& ); 981 int32_t setTemporalDenoise(const QCameraParameters&); 982 int32_t setZslMode(const QCameraParameters& ); 983 int32_t setZslAttributes(const QCameraParameters& ); 984 int32_t setAutoHDR(const QCameraParameters& params); 985 int32_t setCameraMode(const QCameraParameters& ); 986 int32_t setSceneSelectionMode(const QCameraParameters& params); 987 int32_t setFaceRecognition(const QCameraParameters& ); 988 int32_t setFlip(const QCameraParameters& ); 989 int32_t setRetroActiveBurstNum(const QCameraParameters& params); 990 int32_t setBurstLEDOnPeriod(const QCameraParameters& params); 991 int32_t setSnapshotFDReq(const QCameraParameters& ); 992 int32_t setStatsDebugMask(); 993 int32_t setPAAF(); 994 int32_t setTintlessValue(const QCameraParameters& params); 995 int32_t setCDSMode(const QCameraParameters& params); 996 int32_t setInitialExposureIndex(const QCameraParameters& params); 997 int32_t setInstantCapture(const QCameraParameters& params); 998 int32_t setInstantAEC(const QCameraParameters& params); 999 int32_t setMobicat(const QCameraParameters& params); 1000 int32_t setRdiMode(const QCameraParameters& ); 1001 int32_t setSecureMode(const QCameraParameters& ); 1002 int32_t setCacheVideoBuffers(const QCameraParameters& params); 1003 int32_t setCustomParams(const QCameraParameters& params); 1004 int32_t setAutoExposure(const char *autoExp); 1005 int32_t setPreviewFpsRange(int min_fps,int max_fps, 1006 int vid_min_fps,int vid_max_fps); 1007 int32_t setEffect(const char *effect); 1008 int32_t setBrightness(int brightness); 1009 int32_t setFocusMode(const char *focusMode); 1010 int32_t setFocusPosition(const char *typeStr, const char *posStr); 1011 int32_t setSharpness(int sharpness); 1012 int32_t setSaturation(int saturation); 1013 int32_t setContrast(int contrast); 1014 int32_t setSkinToneEnhancement(int sceFactor); 1015 int32_t setSceneDetect(const char *scendDetect); 1016 int32_t setVideoHDR(const char *videoHDR); 1017 int32_t setSensorSnapshotHDR(const char *snapshotHDR); 1018 int32_t setVtEnable(const char *vtEnable); 1019 int32_t setZoom(int zoom_level); 1020 int32_t setISOValue(const char *isoValue); 1021 int32_t setContinuousISO(const char *isoValue); 1022 int32_t setExposureTime(const char *expTimeStr); 1023 int32_t setFlash(const char *flashStr); 1024 int32_t setAwbLock(const char *awbStr); 1025 int32_t setMCEValue(const char *mceStr); 1026 int32_t setDISValue(const char *disStr); 1027 int32_t setHighFrameRate(const int32_t hfrMode); 1028 int32_t setLensShadeValue(const char *lensShadeStr); 1029 int32_t setExposureCompensation(int expComp); 1030 int32_t setWhiteBalance(const char *wbStr); 1031 int32_t setWBManualCCT(const char *cctStr); 1032 int32_t setManualWBGains(const char *gainStr); 1033 int32_t setAntibanding(const char *antiBandingStr); 1034 int32_t setFocusAreas(const char *focusAreasStr); 1035 int32_t setMeteringAreas(const char *meteringAreasStr); 1036 int32_t setSceneMode(const char *sceneModeStr); 1037 int32_t setSelectableZoneAf(const char *selZoneAFStr); 1038 int32_t setAEBracket(const char *aecBracketStr); 1039 int32_t setAFBracket(const char *afBracketStr); 1040 int32_t setReFocus(const char *reFocusStr); 1041 int32_t setChromaFlash(const char *chromaFlashStr); 1042 int32_t setOptiZoom(const char *optiZoomStr); 1043 int32_t setHDRMode(const char *optiZoomStr); 1044 int32_t setHDRNeed1x(const char *optiZoomStr); 1045 int32_t setTruePortrait(const char *truePortraitStr); 1046 int32_t setSeeMore(const char *SeeMoreStr); 1047 int32_t setStillMore(const char *StillMoreStr); 1048 int32_t setNoiseReductionMode(const char *noiseReductionModeStr); 1049 int32_t setRedeyeReduction(const char *redeyeStr); 1050 int32_t setWaveletDenoise(const char *wnrStr); 1051 int32_t setFaceRecognition(const char *faceRecog, uint32_t maxFaces); 1052 int32_t setTintlessValue(const char *tintStr); 1053 bool UpdateHFRFrameRate(const QCameraParameters& params); 1054 int32_t setRdiMode(const char *str); 1055 int32_t setSecureMode(const char *str); 1056 int32_t setLongshotParam(const QCameraParameters& params); 1057 int32_t parseGains(const char *gainStr, double &r_gain, 1058 double &g_gain, double &b_gain); 1059 int32_t setCacheVideoBuffers(const char *cacheVideoBufStr); 1060 int32_t setCDSMode(int32_t cds_mode, bool initCommit); 1061 int32_t setEztune(); 1062 void setLowLightCapture(); 1063 int setRecordingHintValue(int32_t value); // set local copy of video hint and send to server 1064 // no change in parameters value 1065 int32_t updateFlash(bool commitSettings); 1066 int32_t setRawSize(cam_dimension_t &dim); setMaxPicSize(cam_dimension_t & dim)1067 int32_t setMaxPicSize(cam_dimension_t &dim) { m_maxPicSize = dim; return NO_ERROR; }; 1068 void setBufBatchCount(int8_t buf_cnt); 1069 void setVideoBatchSize(); 1070 void setDcrf(); 1071 int32_t setStreamPpMask(cam_stream_type_t stream_type, cam_feature_mask_t pp_mask); 1072 void setOfflineRAW(bool value = 0); 1073 int32_t setQuadraCfa(const QCameraParameters& params); 1074 int32_t configureFlash(cam_capture_frame_config_t &frame_config); 1075 int32_t configureLowLight(cam_capture_frame_config_t &frame_config); 1076 int32_t configureManualCapture(cam_capture_frame_config_t &frame_config); 1077 isTNRPreviewEnabled()1078 bool isTNRPreviewEnabled() {return m_bTNRPreviewOn;}; isTNRVideoEnabled()1079 bool isTNRVideoEnabled() {return m_bTNRVideoOn;}; getFaceDetectionOption()1080 bool getFaceDetectionOption() { return m_bFaceDetectionOn;} 1081 void getLiveSnapshotSize(cam_dimension_t &dim); getRawSize(cam_dimension_t & dim)1082 int32_t getRawSize(cam_dimension_t &dim) {dim = m_rawSize; return NO_ERROR;}; 1083 int getAutoFlickerMode(); 1084 bool sendStreamConfigInfo(cam_stream_size_info_t &stream_config_info); isLowMemoryDevice()1085 inline bool isLowMemoryDevice() {return m_bIsLowMemoryDevice;}; 1086 bool isPreviewSeeMoreRequired(); isEztuneEnabled()1087 bool isEztuneEnabled() { return m_bEztuneEnabled; }; getZoomLevel()1088 int32_t getZoomLevel(){return mZoomLevel;}; 1089 int32_t parse_pair(const char *str, int *first, int *second, 1090 char delim, char **endptr); 1091 void parseSizesList(const char *sizesStr, Vector<Size> &sizes); 1092 int32_t parseNDimVector(const char *str, int *num, int N, char delim); 1093 int32_t parseCameraAreaString(const char *str, int max_num_areas, 1094 cam_area_t *pAreas, int& num_areas_found); 1095 bool validateCameraAreas(cam_area_t *areas, int num_areas); 1096 int parseGPSCoordinate(const char *coord_str, rat_t *coord); 1097 int32_t getRational(rat_t *rat, int num, int denom); 1098 String8 createSizesString(const cam_dimension_t *sizes, size_t len); 1099 String8 createHfrValuesString(const cam_hfr_info_t *values, size_t len, 1100 const QCameraMap<cam_hfr_mode_t> *map, size_t map_len); 1101 String8 createHfrSizesString(const cam_hfr_info_t *values, size_t len); 1102 String8 createFpsRangeString(const cam_fps_range_t *fps, 1103 size_t len, int &default_fps_index); 1104 String8 createFpsString(cam_fps_range_t &fps); 1105 String8 createZoomRatioValuesString(uint32_t *zoomRatios, size_t length); 1106 int32_t setDualLedCalibration(const QCameraParameters& params); 1107 int32_t setDualLedCalibration(const char *str); 1108 int32_t setAdvancedCaptureMode(); 1109 1110 // ops for batch set/get params with server 1111 int32_t initBatchUpdate(); 1112 int32_t commitSetBatch(); 1113 int32_t commitGetBatch(); 1114 int32_t commitSetBatchAux(); 1115 int32_t commitGetBatchAux(); 1116 void setAuxParameters(); 1117 1118 // ops to tempororily update parameter entries and commit 1119 int32_t updateParamEntry(const char *key, const char *value); 1120 int32_t commitParamChanges(); 1121 void updateViewAngles(); 1122 1123 //Update Frame Number for super parameter 1124 int32_t updateFrameNumber(); 1125 int32_t SyncDCParams(); 1126 void setSyncDCParams(); 1127 void setAsymmetricSnapMode(); 1128 1129 // Map from strings to values 1130 static const cam_dimension_t THUMBNAIL_SIZES_MAP[]; 1131 static const QCameraMap<cam_auto_exposure_mode_type> AUTO_EXPOSURE_MAP[]; 1132 static const QCameraMap<cam_aec_convergence_type> INSTANT_CAPTURE_MODES_MAP[]; 1133 static const QCameraMap<cam_aec_convergence_type> INSTANT_AEC_MODES_MAP[]; 1134 static const QCameraMap<cam_format_t> PREVIEW_FORMATS_MAP[]; 1135 static const QCameraMap<cam_format_t> PICTURE_TYPES_MAP[]; 1136 static const QCameraMap<cam_focus_mode_type> FOCUS_MODES_MAP[]; 1137 static const QCameraMap<cam_effect_mode_type> EFFECT_MODES_MAP[]; 1138 static const QCameraMap<cam_scene_mode_type> SCENE_MODES_MAP[]; 1139 static const QCameraMap<cam_flash_mode_t> FLASH_MODES_MAP[]; 1140 static const QCameraMap<cam_focus_algorithm_type> FOCUS_ALGO_MAP[]; 1141 static const QCameraMap<cam_wb_mode_type> WHITE_BALANCE_MODES_MAP[]; 1142 static const QCameraMap<cam_antibanding_mode_type> ANTIBANDING_MODES_MAP[]; 1143 static const QCameraMap<cam_iso_mode_type> ISO_MODES_MAP[]; 1144 static const QCameraMap<cam_hfr_mode_t> HFR_MODES_MAP[]; 1145 static const QCameraMap<cam_bracket_mode> BRACKETING_MODES_MAP[]; 1146 static const QCameraMap<int> ON_OFF_MODES_MAP[]; 1147 static const QCameraMap<int> ENABLE_DISABLE_MODES_MAP[]; 1148 static const QCameraMap<int> DENOISE_ON_OFF_MODES_MAP[]; 1149 static const QCameraMap<int> TRUE_FALSE_MODES_MAP[]; 1150 static const QCameraMap<int> TOUCH_AF_AEC_MODES_MAP[]; 1151 static const QCameraMap<cam_flip_t> FLIP_MODES_MAP[]; 1152 static const QCameraMap<int> AF_BRACKETING_MODES_MAP[]; 1153 static const QCameraMap<int> RE_FOCUS_MODES_MAP[]; 1154 static const QCameraMap<int> CHROMA_FLASH_MODES_MAP[]; 1155 static const QCameraMap<int> OPTI_ZOOM_MODES_MAP[]; 1156 static const QCameraMap<int> TRUE_PORTRAIT_MODES_MAP[]; 1157 static const QCameraMap<cam_cds_mode_type_t> CDS_MODES_MAP[]; 1158 static const QCameraMap<int> HDR_MODES_MAP[]; 1159 static const QCameraMap<int> VIDEO_ROTATION_MODES_MAP[]; 1160 static const QCameraMap<int> SEE_MORE_MODES_MAP[]; 1161 static const QCameraMap<int> STILL_MORE_MODES_MAP[]; 1162 static const QCameraMap<int> NOISE_REDUCTION_MODES_MAP[]; 1163 static const QCameraMap<int> METADATA_TYPES_MAP[]; 1164 1165 /*Common for all objects*/ 1166 static uint32_t sessionId[MM_CAMERA_MAX_NUM_SENSORS]; 1167 1168 QCameraReprocScaleParam m_reprocScaleParam; 1169 QCameraCommon mCommon; 1170 1171 cam_capability_t *m_pCapability; 1172 mm_camera_vtbl_t *m_pCamOpsTbl; 1173 QCameraHeapMemory *m_pParamHeap; 1174 parm_buffer_t *m_pParamBuf; // ptr to param buf in m_pParamHeap 1175 parm_buffer_t *m_pParamBufAux; // ptr to Aux param buf in m_pParamHeap 1176 QCameraFOVControl *m_pFovControl; 1177 /* heap for mapping dual cam event info */ 1178 QCameraHeapMemory *m_pDualCamCmdHeap; 1179 cam_dual_camera_cmd_info_t *m_pDualCamCmdPtr[MM_CAMERA_MAX_CAM_CNT]; 1180 cam_sync_related_sensors_event_info_t m_relCamSyncInfo; 1181 bool m_bFrameSyncEnabled; 1182 cam_is_type_t mIsTypeVideo; 1183 cam_is_type_t mIsTypePreview; 1184 1185 bool m_bZslMode; // if ZSL is enabled 1186 bool m_bZslMode_new; 1187 bool m_bForceZslMode; 1188 bool m_bRecordingHint; // local copy of recording hint 1189 bool m_bRecordingHint_new; 1190 bool m_bHistogramEnabled; // if histogram is enabled 1191 bool m_bLongshotEnabled; // if longshot is enabled 1192 uint32_t m_nFaceProcMask; // face process mask 1193 bool m_bFaceDetectionOn; // if face Detection turned on by user 1194 bool m_bDebugFps; // if FPS need to be logged 1195 cam_focus_mode_type mFocusMode; 1196 cam_format_t mPreviewFormat; 1197 cam_format_t mAppPreviewFormat; 1198 int32_t mPictureFormat; // could be CAMERA_PICTURE_TYPE_JPEG or cam_format_t 1199 bool m_bNeedRestart; // if preview needs restart after parameters updated 1200 bool m_bNoDisplayMode; 1201 bool m_bWNROn; 1202 bool m_bTNRPreviewOn; 1203 bool m_bTNRVideoOn; 1204 bool m_bTNRSnapshotOn; 1205 bool m_bInited; 1206 int m_nRetroBurstNum; 1207 int m_nBurstLEDOnPeriod; 1208 cam_exp_bracketing_t m_AEBracketingClient; 1209 bool m_bUpdateEffects; // Cause reapplying of effects 1210 bool m_bSceneTransitionAuto; // Indicate that scene has changed to Auto 1211 bool m_bPreviewFlipChanged; // if flip setting for preview changed 1212 bool m_bVideoFlipChanged; // if flip setting for video changed 1213 bool m_bSnapshotFlipChanged; // if flip setting for snapshot changed 1214 bool m_bZoomChanged; // if zoom value changed 1215 bool m_bFixedFrameRateSet; // Indicates that a fixed frame rate is set 1216 qcamera_thermal_mode m_ThermalMode; // adjust fps vs adjust frameskip 1217 cam_dimension_t m_LiveSnapshotSize; // live snapshot size 1218 cam_dimension_t m_rawSize; // Raw size 1219 cam_dimension_t m_maxPicSize; 1220 bool m_bHDREnabled; // if HDR is enabled 1221 bool m_bLocalHDREnabled; // This flag tells whether HDR enabled or not regarless of APP mode 1222 bool m_bAVTimerEnabled; //if AVTimer is enabled 1223 bool m_bDISEnabled; 1224 bool m_bOISEnabled; 1225 cam_still_more_t m_stillmore_config; 1226 bool m_bMetaRawEnabled; 1227 1228 uint8_t m_MobiMask; 1229 QCameraAdjustFPS *m_AdjustFPS; 1230 bool m_bHDR1xFrameEnabled; // if frame with exposure compensation 0 during HDR is enabled 1231 bool m_HDRSceneEnabled; // Auto HDR indication 1232 bool m_bHDRThumbnailProcessNeeded; // if thumbnail need to be processed for HDR 1233 bool m_bHDR1xExtraBufferNeeded; // if extra frame with exposure compensation 0 during HDR is needed 1234 bool m_bHDROutputCropEnabled; // if HDR output frame need to be scaled to user resolution 1235 DefaultKeyedVector<String8,String8> m_tempMap; // map for temororily store parameters to be set 1236 cam_fps_range_t m_default_fps_range; 1237 bool m_bAFBracketingOn; 1238 bool m_bReFocusOn; 1239 bool m_bChromaFlashOn; 1240 bool m_bOptiZoomOn; 1241 bool m_bSceneSelection; 1242 Mutex m_SceneSelectLock; 1243 cam_scene_mode_type m_SelectedScene; 1244 bool m_bSeeMoreOn; 1245 bool m_bStillMoreOn; 1246 bool m_bHighQualityNoiseReductionMode; 1247 cam_fps_range_t m_hfrFpsRange; 1248 bool m_bHfrMode; 1249 bool m_bSensorHDREnabled; // if HDR is enabled 1250 bool m_bRdiMode; // if RDI mode 1251 bool m_bSecureMode; 1252 bool m_bAeBracketingEnabled; 1253 int32_t mFlashValue; 1254 int32_t mFlashDaemonValue; 1255 int32_t mHfrMode; 1256 bool m_bHDRModeSensor; 1257 bool mOfflineRAW; 1258 bool m_bTruePortraitOn; 1259 cam_feature_mask_t m_nMinRequiredPpMask; 1260 cam_feature_mask_t mStreamPpMask[CAM_STREAM_TYPE_MAX]; 1261 int32_t m_nSharpness; 1262 int8_t mTotalPPCount; 1263 int8_t mCurPPCount; 1264 int32_t mZoomLevel; 1265 int32_t mParmZoomLevel; 1266 bool m_bIsLowMemoryDevice; 1267 int32_t mCds_mode; 1268 int32_t mParmEffect; 1269 cam_capture_frame_config_t m_captureFrameConfig; 1270 int8_t mBufBatchCnt; 1271 bool m_bEztuneEnabled; 1272 bool m_bDcrfEnabled; 1273 uint32_t mRotation; 1274 uint32_t mJpegRotation; 1275 int8_t mVideoBatchSize; 1276 bool m_LLCaptureEnabled; 1277 cam_low_light_mode_t m_LowLightLevel; 1278 bool m_bLtmForSeeMoreEnabled; 1279 int64_t m_expTime; 1280 bool m_bOEMFeatEnabled; 1281 int32_t m_isoValue; 1282 QCameraManualCaptureModes m_ManualCaptureMode; 1283 cam_dyn_img_data_t m_DynamicImgData; 1284 int32_t m_dualLedCalibration; 1285 // Param to trigger instant AEC. 1286 bool m_bInstantAEC; 1287 // Param to trigger instant capture. 1288 bool m_bInstantCapture; 1289 // Number of frames, camera interface will wait for getting the instant capture frame. 1290 uint8_t mAecFrameBound; 1291 // Number of preview frames, that HAL will hold without displaying, for instant AEC mode. 1292 uint8_t mAecSkipDisplayFrameBound; 1293 bool m_bQuadraCfa; 1294 bool m_bDualCamera; 1295 uint32_t mActiveCameras; 1296 uint32_t mMasterCamera; 1297 bool m_bSmallJpegSize; 1298 cam_stream_type_t mSecureStraemType; 1299 //Frame number for super parameter 1300 uint32_t mFrameNumber; 1301 uint32_t mSyncDCParam; 1302 bool mbundledSnapshot; 1303 bool mAsymmetricSnapMode; 1304 }; 1305 1306 }; // namespace qcamera 1307 1308 #endif 1309