Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2012 The Android Open Source Project |
| 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 | |
Eino-Ville Talvala | 2f1a2e4 | 2013-07-25 17:12:05 -0700 | [diff] [blame] | 17 | package android.hardware.camera2; |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 18 | |
| 19 | import android.graphics.Point; |
| 20 | import android.graphics.Rect; |
Eino-Ville Talvala | 70c2207 | 2013-08-27 12:09:04 -0700 | [diff] [blame^] | 21 | import android.hardware.camera2.impl.CameraMetadataNative; |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 22 | |
| 23 | /** |
| 24 | * <p>The results of a single image capture from the image sensor.</p> |
| 25 | * |
| 26 | * <p>Contains the final configuration for the capture hardware (sensor, lens, |
| 27 | * flash), the processing pipeline, the control algorithms, and the output |
| 28 | * buffers.</p> |
| 29 | * |
| 30 | * <p>CaptureResults are produced by a {@link CameraDevice} after processing a |
| 31 | * {@link CaptureRequest}. All properties listed for capture requests can also |
| 32 | * be queried on the capture result, to determine the final values used for |
| 33 | * capture. The result also includes additional metadata about the state of the |
| 34 | * camera device during the capture.</p> |
| 35 | * |
| 36 | */ |
| 37 | public final class CaptureResult extends CameraMetadata { |
Eino-Ville Talvala | 70c2207 | 2013-08-27 12:09:04 -0700 | [diff] [blame^] | 38 | |
| 39 | private final CameraMetadataNative mResults; |
| 40 | |
Igor Murashkin | 7072550 | 2013-06-25 20:27:06 +0000 | [diff] [blame] | 41 | /** |
Eino-Ville Talvala | 70c2207 | 2013-08-27 12:09:04 -0700 | [diff] [blame^] | 42 | * Takes ownership of the passed-in properties object |
Igor Murashkin | 7072550 | 2013-06-25 20:27:06 +0000 | [diff] [blame] | 43 | * @hide |
| 44 | */ |
Eino-Ville Talvala | 70c2207 | 2013-08-27 12:09:04 -0700 | [diff] [blame^] | 45 | public CaptureResult(CameraMetadataNative results) { |
| 46 | mResults = results; |
| 47 | } |
| 48 | |
| 49 | @Override |
| 50 | public <T> T get(Key<T> key) { |
| 51 | return mResults.get(key); |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 52 | } |
| 53 | |
| 54 | /** |
| 55 | * Describes a face detected in an image. |
| 56 | */ |
| 57 | public static class Face { |
| 58 | |
| 59 | /** |
| 60 | * <p>Bounds of the face. A rectangle relative to the sensor's |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 61 | * {@link CameraProperties#SENSOR_INFO_ACTIVE_ARRAY_SIZE}, with (0,0) |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 62 | * representing the top-left corner of the active array rectangle.</p> |
| 63 | */ |
| 64 | public Rect getBounds() { |
| 65 | return mBounds; |
| 66 | } |
| 67 | |
Benjamin Hendricks | 24eb8a3 | 2013-08-15 12:46:22 -0700 | [diff] [blame] | 68 | /** <p>The confidence level for the detection of the face. The range is 1 to |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 69 | * 100. 100 is the highest confidence.</p> |
| 70 | * |
| 71 | * <p>Depending on the device, even very low-confidence faces may be |
| 72 | * listed, so applications should filter out faces with low confidence, |
| 73 | * depending on the use case. For a typical point-and-shoot camera |
| 74 | * application that wishes to display rectangles around detected faces, |
| 75 | * filtering out faces with confidence less than 50 is recommended.</p> |
| 76 | * |
| 77 | */ |
| 78 | public int getScore() { |
| 79 | return mScore; |
| 80 | } |
| 81 | |
| 82 | /** |
| 83 | * An unique id per face while the face is visible to the tracker. If |
| 84 | * the face leaves the field-of-view and comes back, it will get a new |
| 85 | * id. This is an optional field, may not be supported on all devices. |
| 86 | * If not supported, id will always be set to -1. The optional fields |
| 87 | * are supported as a set. Either they are all valid, or none of them |
| 88 | * are. |
| 89 | */ |
| 90 | public int getId() { |
| 91 | return mId; |
| 92 | } |
| 93 | |
| 94 | /** |
| 95 | * The coordinates of the center of the left eye. The coordinates are in |
| 96 | * the same space as the ones for {@link #getBounds}. This is an |
| 97 | * optional field, may not be supported on all devices. If not |
| 98 | * supported, the value will always be set to null. The optional fields |
| 99 | * are supported as a set. Either they are all valid, or none of them |
| 100 | * are. |
| 101 | */ |
| 102 | public Point getLeftEye() { |
| 103 | return mLeftEye; |
| 104 | } |
| 105 | |
| 106 | /** |
| 107 | * The coordinates of the center of the right eye. The coordinates are |
| 108 | * in the same space as the ones for {@link #getBounds}.This is an |
| 109 | * optional field, may not be supported on all devices. If not |
| 110 | * supported, the value will always be set to null. The optional fields |
| 111 | * are supported as a set. Either they are all valid, or none of them |
| 112 | * are. |
| 113 | */ |
| 114 | public Point getRightEye() { |
| 115 | return mRightEye; |
| 116 | } |
| 117 | |
| 118 | /** |
| 119 | * The coordinates of the center of the mouth. The coordinates are in |
| 120 | * the same space as the ones for {@link #getBounds}. This is an optional |
| 121 | * field, may not be supported on all devices. If not supported, the |
| 122 | * value will always be set to null. The optional fields are supported |
| 123 | * as a set. Either they are all valid, or none of them are. |
| 124 | */ |
| 125 | public Point getMouth() { |
| 126 | return mMouth; |
| 127 | } |
| 128 | |
| 129 | private Rect mBounds; |
| 130 | private int mScore; |
| 131 | private int mId; |
| 132 | private Point mLeftEye; |
| 133 | private Point mRightEye; |
| 134 | private Point mMouth; |
| 135 | } |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 136 | |
| 137 | /*@O~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~ |
| 138 | * The key entries below this point are generated from metadata |
| 139 | * definitions in /system/media/camera/docs. Do not modify by hand or |
| 140 | * modify the comment blocks at the start or end. |
| 141 | *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/ |
| 142 | |
| 143 | /** |
| 144 | * <p> |
| 145 | * A color transform matrix to use to transform |
| 146 | * from sensor RGB color space to output linear sRGB color space |
| 147 | * </p> |
| 148 | * <p> |
| 149 | * This matrix is either set by HAL when the request |
| 150 | * android.colorCorrection.mode is not TRANSFORM_MATRIX, or |
| 151 | * directly by the application in the request when the |
Igor Murashkin | d5ff06a | 2013-08-20 15:15:06 -0700 | [diff] [blame] | 152 | * android.colorCorrection.mode is TRANSFORM_MATRIX. |
| 153 | * </p><p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 154 | * In the latter case, the HAL may round the matrix to account |
| 155 | * for precision issues; the final rounded matrix should be |
| 156 | * reported back in this matrix result metadata. |
| 157 | * </p> |
| 158 | */ |
| 159 | public static final Key<Rational[]> COLOR_CORRECTION_TRANSFORM = |
| 160 | new Key<Rational[]>("android.colorCorrection.transform", Rational[].class); |
| 161 | |
| 162 | /** |
| 163 | * <p> |
| 164 | * Gains applying to Bayer color channels for |
| 165 | * white-balance |
| 166 | * </p> |
| 167 | * <p> |
| 168 | * The 4-channel white-balance gains are defined in |
| 169 | * the order of [R G_even G_odd B], where G_even is the gain |
| 170 | * for green pixels on even rows of the output, and G_odd |
| 171 | * is the gain for greenpixels on the odd rows. if a HAL |
| 172 | * does not support a separate gain for even/odd green channels, |
| 173 | * it should use the G_even value,and write G_odd equal to |
| 174 | * G_even in the output result metadata. |
| 175 | * </p><p> |
Igor Murashkin | d5ff06a | 2013-08-20 15:15:06 -0700 | [diff] [blame] | 176 | * This array is either set by HAL when the request |
| 177 | * android.colorCorrection.mode is not TRANSFORM_MATRIX, or |
| 178 | * directly by the application in the request when the |
| 179 | * android.colorCorrection.mode is TRANSFORM_MATRIX. |
| 180 | * </p><p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 181 | * The ouput should be the gains actually applied by the HAL to |
| 182 | * the current frame. |
| 183 | * </p> |
| 184 | */ |
| 185 | public static final Key<float[]> COLOR_CORRECTION_GAINS = |
| 186 | new Key<float[]>("android.colorCorrection.gains", float[].class); |
| 187 | |
| 188 | /** |
| 189 | * <p> |
| 190 | * The ID sent with the latest |
| 191 | * CAMERA2_TRIGGER_PRECAPTURE_METERING call |
| 192 | * </p> |
| 193 | * <p> |
| 194 | * Must be 0 if no |
| 195 | * CAMERA2_TRIGGER_PRECAPTURE_METERING trigger received yet |
| 196 | * by HAL. Always updated even if AE algorithm ignores the |
| 197 | * trigger |
| 198 | * </p> |
| 199 | * |
| 200 | * @hide |
| 201 | */ |
| 202 | public static final Key<Integer> CONTROL_AE_PRECAPTURE_ID = |
| 203 | new Key<Integer>("android.control.aePrecaptureId", int.class); |
| 204 | |
| 205 | /** |
| 206 | * <p> |
| 207 | * List of areas to use for |
| 208 | * metering |
| 209 | * </p> |
| 210 | * <p> |
| 211 | * Each area is a rectangle plus weight: xmin, ymin, |
Timothy Knight | 2629f27 | 2013-09-03 17:23:23 -0700 | [diff] [blame] | 212 | * xmax, ymax, weight. The rectangle is defined inclusive of the |
| 213 | * specified coordinates. |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 214 | * </p><p> |
| 215 | * The coordinate system is based on the active pixel array, |
Timothy Knight | 2629f27 | 2013-09-03 17:23:23 -0700 | [diff] [blame] | 216 | * with (0,0) being the top-left pixel in the active pixel array, and |
| 217 | * (android.sensor.info.activeArraySize.width - 1, |
| 218 | * android.sensor.info.activeArraySize.height - 1) being the |
| 219 | * bottom-right pixel in the active pixel array. The weight |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 220 | * should be nonnegative. |
| 221 | * </p><p> |
| 222 | * If all regions have 0 weight, then no specific metering area |
| 223 | * needs to be used by the HAL. If the metering region is |
| 224 | * outside the current android.scaler.cropRegion, the HAL |
| 225 | * should ignore the sections outside the region and output the |
| 226 | * used sections in the frame metadata |
| 227 | * </p> |
| 228 | */ |
| 229 | public static final Key<int[]> CONTROL_AE_REGIONS = |
| 230 | new Key<int[]>("android.control.aeRegions", int[].class); |
| 231 | |
| 232 | /** |
| 233 | * <p> |
| 234 | * Current state of AE algorithm |
| 235 | * </p> |
| 236 | * <p> |
| 237 | * Whenever the AE algorithm state changes, a |
| 238 | * MSG_AUTOEXPOSURE notification must be send if a |
| 239 | * notification callback is registered. |
| 240 | * </p> |
| 241 | * @see #CONTROL_AE_STATE_INACTIVE |
| 242 | * @see #CONTROL_AE_STATE_SEARCHING |
| 243 | * @see #CONTROL_AE_STATE_CONVERGED |
| 244 | * @see #CONTROL_AE_STATE_LOCKED |
| 245 | * @see #CONTROL_AE_STATE_FLASH_REQUIRED |
| 246 | * @see #CONTROL_AE_STATE_PRECAPTURE |
| 247 | */ |
| 248 | public static final Key<Integer> CONTROL_AE_STATE = |
| 249 | new Key<Integer>("android.control.aeState", int.class); |
| 250 | |
| 251 | /** |
| 252 | * <p> |
| 253 | * Whether AF is currently enabled, and what |
| 254 | * mode it is set to |
| 255 | * </p> |
| 256 | * @see #CONTROL_AF_MODE_OFF |
| 257 | * @see #CONTROL_AF_MODE_AUTO |
| 258 | * @see #CONTROL_AF_MODE_MACRO |
| 259 | * @see #CONTROL_AF_MODE_CONTINUOUS_VIDEO |
| 260 | * @see #CONTROL_AF_MODE_CONTINUOUS_PICTURE |
| 261 | * @see #CONTROL_AF_MODE_EDOF |
| 262 | */ |
| 263 | public static final Key<Integer> CONTROL_AF_MODE = |
| 264 | new Key<Integer>("android.control.afMode", int.class); |
| 265 | |
| 266 | /** |
| 267 | * <p> |
| 268 | * List of areas to use for focus |
| 269 | * estimation |
| 270 | * </p> |
| 271 | * <p> |
| 272 | * Each area is a rectangle plus weight: xmin, ymin, |
Timothy Knight | 2629f27 | 2013-09-03 17:23:23 -0700 | [diff] [blame] | 273 | * xmax, ymax, weight. The rectangle is defined inclusive of the |
| 274 | * specified coordinates. |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 275 | * </p><p> |
| 276 | * The coordinate system is based on the active pixel array, |
Timothy Knight | 2629f27 | 2013-09-03 17:23:23 -0700 | [diff] [blame] | 277 | * with (0,0) being the top-left pixel in the active pixel array, and |
| 278 | * (android.sensor.info.activeArraySize.width - 1, |
| 279 | * android.sensor.info.activeArraySize.height - 1) being the |
| 280 | * bottom-right pixel in the active pixel array. The weight |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 281 | * should be nonnegative. |
| 282 | * </p><p> |
| 283 | * If all regions have 0 weight, then no specific focus area |
| 284 | * needs to be used by the HAL. If the focusing region is |
| 285 | * outside the current android.scaler.cropRegion, the HAL |
| 286 | * should ignore the sections outside the region and output the |
| 287 | * used sections in the frame metadata |
| 288 | * </p> |
| 289 | */ |
| 290 | public static final Key<int[]> CONTROL_AF_REGIONS = |
| 291 | new Key<int[]>("android.control.afRegions", int[].class); |
| 292 | |
| 293 | /** |
| 294 | * <p> |
| 295 | * Current state of AF algorithm |
| 296 | * </p> |
| 297 | * <p> |
| 298 | * Whenever the AF algorithm state changes, a |
| 299 | * MSG_AUTOFOCUS notification must be send if a notification |
| 300 | * callback is registered. |
| 301 | * </p> |
| 302 | * @see #CONTROL_AF_STATE_INACTIVE |
| 303 | * @see #CONTROL_AF_STATE_PASSIVE_SCAN |
| 304 | * @see #CONTROL_AF_STATE_PASSIVE_FOCUSED |
| 305 | * @see #CONTROL_AF_STATE_ACTIVE_SCAN |
| 306 | * @see #CONTROL_AF_STATE_FOCUSED_LOCKED |
| 307 | * @see #CONTROL_AF_STATE_NOT_FOCUSED_LOCKED |
| 308 | */ |
| 309 | public static final Key<Integer> CONTROL_AF_STATE = |
| 310 | new Key<Integer>("android.control.afState", int.class); |
| 311 | |
| 312 | /** |
| 313 | * <p> |
| 314 | * The ID sent with the latest |
| 315 | * CAMERA2_TRIGGER_AUTOFOCUS call |
| 316 | * </p> |
| 317 | * <p> |
| 318 | * Must be 0 if no CAMERA2_TRIGGER_AUTOFOCUS trigger |
| 319 | * received yet by HAL. Always updated even if AF algorithm |
| 320 | * ignores the trigger |
| 321 | * </p> |
| 322 | * |
| 323 | * @hide |
| 324 | */ |
| 325 | public static final Key<Integer> CONTROL_AF_TRIGGER_ID = |
| 326 | new Key<Integer>("android.control.afTriggerId", int.class); |
| 327 | |
| 328 | /** |
| 329 | * <p> |
| 330 | * Whether AWB is currently setting the color |
| 331 | * transform fields, and what its illumination target |
| 332 | * is |
| 333 | * </p> |
| 334 | * <p> |
| 335 | * [BC - AWB lock,AWB modes] |
| 336 | * </p> |
| 337 | * @see #CONTROL_AWB_MODE_OFF |
| 338 | * @see #CONTROL_AWB_MODE_AUTO |
| 339 | * @see #CONTROL_AWB_MODE_INCANDESCENT |
| 340 | * @see #CONTROL_AWB_MODE_FLUORESCENT |
| 341 | * @see #CONTROL_AWB_MODE_WARM_FLUORESCENT |
| 342 | * @see #CONTROL_AWB_MODE_DAYLIGHT |
| 343 | * @see #CONTROL_AWB_MODE_CLOUDY_DAYLIGHT |
| 344 | * @see #CONTROL_AWB_MODE_TWILIGHT |
| 345 | * @see #CONTROL_AWB_MODE_SHADE |
| 346 | */ |
| 347 | public static final Key<Integer> CONTROL_AWB_MODE = |
| 348 | new Key<Integer>("android.control.awbMode", int.class); |
| 349 | |
| 350 | /** |
| 351 | * <p> |
| 352 | * List of areas to use for illuminant |
| 353 | * estimation |
| 354 | * </p> |
| 355 | * <p> |
| 356 | * Only used in AUTO mode. |
| 357 | * </p><p> |
Timothy Knight | 2629f27 | 2013-09-03 17:23:23 -0700 | [diff] [blame] | 358 | * Each area is a rectangle plus weight: xmin, ymin, |
| 359 | * xmax, ymax, weight. The rectangle is defined inclusive of the |
| 360 | * specified coordinates. |
| 361 | * </p><p> |
| 362 | * The coordinate system is based on the active pixel array, |
| 363 | * with (0,0) being the top-left pixel in the active pixel array, and |
| 364 | * (android.sensor.info.activeArraySize.width - 1, |
| 365 | * android.sensor.info.activeArraySize.height - 1) being the |
| 366 | * bottom-right pixel in the active pixel array. The weight |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 367 | * should be nonnegative. |
| 368 | * </p><p> |
| 369 | * If all regions have 0 weight, then no specific metering area |
| 370 | * needs to be used by the HAL. If the metering region is |
| 371 | * outside the current android.scaler.cropRegion, the HAL |
| 372 | * should ignore the sections outside the region and output the |
| 373 | * used sections in the frame metadata |
| 374 | * </p> |
| 375 | */ |
| 376 | public static final Key<int[]> CONTROL_AWB_REGIONS = |
| 377 | new Key<int[]>("android.control.awbRegions", int[].class); |
| 378 | |
| 379 | /** |
| 380 | * <p> |
| 381 | * Current state of AWB algorithm |
| 382 | * </p> |
| 383 | * <p> |
| 384 | * Whenever the AWB algorithm state changes, a |
| 385 | * MSG_AUTOWHITEBALANCE notification must be send if a |
| 386 | * notification callback is registered. |
| 387 | * </p> |
| 388 | * @see #CONTROL_AWB_STATE_INACTIVE |
| 389 | * @see #CONTROL_AWB_STATE_SEARCHING |
| 390 | * @see #CONTROL_AWB_STATE_CONVERGED |
| 391 | * @see #CONTROL_AWB_STATE_LOCKED |
| 392 | */ |
| 393 | public static final Key<Integer> CONTROL_AWB_STATE = |
| 394 | new Key<Integer>("android.control.awbState", int.class); |
| 395 | |
| 396 | /** |
| 397 | * <p> |
| 398 | * Overall mode of 3A control |
| 399 | * routines |
| 400 | * </p> |
| 401 | * @see #CONTROL_MODE_OFF |
| 402 | * @see #CONTROL_MODE_AUTO |
| 403 | * @see #CONTROL_MODE_USE_SCENE_MODE |
| 404 | */ |
| 405 | public static final Key<Integer> CONTROL_MODE = |
| 406 | new Key<Integer>("android.control.mode", int.class); |
| 407 | |
| 408 | /** |
| 409 | * <p> |
| 410 | * Operation mode for edge |
| 411 | * enhancement |
| 412 | * </p> |
| 413 | * @see #EDGE_MODE_OFF |
| 414 | * @see #EDGE_MODE_FAST |
| 415 | * @see #EDGE_MODE_HIGH_QUALITY |
| 416 | */ |
| 417 | public static final Key<Integer> EDGE_MODE = |
| 418 | new Key<Integer>("android.edge.mode", int.class); |
| 419 | |
| 420 | /** |
| 421 | * <p> |
| 422 | * Select flash operation mode |
| 423 | * </p> |
| 424 | * @see #FLASH_MODE_OFF |
| 425 | * @see #FLASH_MODE_SINGLE |
| 426 | * @see #FLASH_MODE_TORCH |
| 427 | */ |
| 428 | public static final Key<Integer> FLASH_MODE = |
| 429 | new Key<Integer>("android.flash.mode", int.class); |
| 430 | |
| 431 | /** |
| 432 | * <p> |
| 433 | * Current state of the flash |
| 434 | * unit |
| 435 | * </p> |
| 436 | * @see #FLASH_STATE_UNAVAILABLE |
| 437 | * @see #FLASH_STATE_CHARGING |
| 438 | * @see #FLASH_STATE_READY |
| 439 | * @see #FLASH_STATE_FIRED |
| 440 | */ |
| 441 | public static final Key<Integer> FLASH_STATE = |
| 442 | new Key<Integer>("android.flash.state", int.class); |
| 443 | |
| 444 | /** |
| 445 | * <p> |
| 446 | * GPS coordinates to include in output JPEG |
| 447 | * EXIF |
| 448 | * </p> |
| 449 | */ |
| 450 | public static final Key<double[]> JPEG_GPS_COORDINATES = |
| 451 | new Key<double[]>("android.jpeg.gpsCoordinates", double[].class); |
| 452 | |
| 453 | /** |
| 454 | * <p> |
| 455 | * 32 characters describing GPS algorithm to |
| 456 | * include in EXIF |
| 457 | * </p> |
| 458 | */ |
| 459 | public static final Key<String> JPEG_GPS_PROCESSING_METHOD = |
| 460 | new Key<String>("android.jpeg.gpsProcessingMethod", String.class); |
| 461 | |
| 462 | /** |
| 463 | * <p> |
| 464 | * Time GPS fix was made to include in |
| 465 | * EXIF |
| 466 | * </p> |
| 467 | */ |
| 468 | public static final Key<Long> JPEG_GPS_TIMESTAMP = |
| 469 | new Key<Long>("android.jpeg.gpsTimestamp", long.class); |
| 470 | |
| 471 | /** |
| 472 | * <p> |
| 473 | * Orientation of JPEG image to |
| 474 | * write |
| 475 | * </p> |
| 476 | */ |
| 477 | public static final Key<Integer> JPEG_ORIENTATION = |
| 478 | new Key<Integer>("android.jpeg.orientation", int.class); |
| 479 | |
| 480 | /** |
| 481 | * <p> |
| 482 | * Compression quality of the final JPEG |
| 483 | * image |
| 484 | * </p> |
| 485 | * <p> |
| 486 | * 85-95 is typical usage range |
| 487 | * </p> |
| 488 | */ |
| 489 | public static final Key<Byte> JPEG_QUALITY = |
| 490 | new Key<Byte>("android.jpeg.quality", byte.class); |
| 491 | |
| 492 | /** |
| 493 | * <p> |
| 494 | * Compression quality of JPEG |
| 495 | * thumbnail |
| 496 | * </p> |
| 497 | */ |
| 498 | public static final Key<Byte> JPEG_THUMBNAIL_QUALITY = |
| 499 | new Key<Byte>("android.jpeg.thumbnailQuality", byte.class); |
| 500 | |
| 501 | /** |
| 502 | * <p> |
| 503 | * Resolution of embedded JPEG |
| 504 | * thumbnail |
| 505 | * </p> |
| 506 | */ |
| 507 | public static final Key<android.hardware.camera2.Size> JPEG_THUMBNAIL_SIZE = |
| 508 | new Key<android.hardware.camera2.Size>("android.jpeg.thumbnailSize", android.hardware.camera2.Size.class); |
| 509 | |
| 510 | /** |
| 511 | * <p> |
| 512 | * Size of the lens aperture |
| 513 | * </p> |
| 514 | * <p> |
| 515 | * Will not be supported on most devices. Can only |
| 516 | * pick from supported list |
| 517 | * </p> |
| 518 | */ |
| 519 | public static final Key<Float> LENS_APERTURE = |
| 520 | new Key<Float>("android.lens.aperture", float.class); |
| 521 | |
| 522 | /** |
| 523 | * <p> |
| 524 | * State of lens neutral density |
| 525 | * filter(s) |
| 526 | * </p> |
| 527 | * <p> |
| 528 | * Will not be supported on most devices. Can only |
| 529 | * pick from supported list |
| 530 | * </p> |
| 531 | */ |
| 532 | public static final Key<Float> LENS_FILTER_DENSITY = |
| 533 | new Key<Float>("android.lens.filterDensity", float.class); |
| 534 | |
| 535 | /** |
| 536 | * <p> |
| 537 | * Lens optical zoom setting |
| 538 | * </p> |
| 539 | * <p> |
| 540 | * Will not be supported on most devices. |
| 541 | * </p> |
| 542 | */ |
| 543 | public static final Key<Float> LENS_FOCAL_LENGTH = |
| 544 | new Key<Float>("android.lens.focalLength", float.class); |
| 545 | |
| 546 | /** |
| 547 | * <p> |
| 548 | * Distance to plane of sharpest focus, |
| 549 | * measured from frontmost surface of the lens |
| 550 | * </p> |
| 551 | * <p> |
| 552 | * Should be zero for fixed-focus cameras |
| 553 | * </p> |
| 554 | */ |
| 555 | public static final Key<Float> LENS_FOCUS_DISTANCE = |
| 556 | new Key<Float>("android.lens.focusDistance", float.class); |
| 557 | |
| 558 | /** |
| 559 | * <p> |
| 560 | * The range of scene distances that are in |
| 561 | * sharp focus (depth of field) |
| 562 | * </p> |
| 563 | * <p> |
| 564 | * If variable focus not supported, can still report |
| 565 | * fixed depth of field range |
| 566 | * </p> |
| 567 | */ |
| 568 | public static final Key<Float> LENS_FOCUS_RANGE = |
| 569 | new Key<Float>("android.lens.focusRange", float.class); |
| 570 | |
| 571 | /** |
| 572 | * <p> |
| 573 | * Whether optical image stabilization is |
| 574 | * enabled. |
| 575 | * </p> |
| 576 | * <p> |
| 577 | * Will not be supported on most devices. |
| 578 | * </p> |
| 579 | * @see #LENS_OPTICAL_STABILIZATION_MODE_OFF |
| 580 | * @see #LENS_OPTICAL_STABILIZATION_MODE_ON |
| 581 | */ |
| 582 | public static final Key<Integer> LENS_OPTICAL_STABILIZATION_MODE = |
| 583 | new Key<Integer>("android.lens.opticalStabilizationMode", int.class); |
| 584 | |
| 585 | /** |
| 586 | * <p> |
| 587 | * Current lens status |
| 588 | * </p> |
| 589 | * @see #LENS_STATE_STATIONARY |
| 590 | */ |
| 591 | public static final Key<Integer> LENS_STATE = |
| 592 | new Key<Integer>("android.lens.state", int.class); |
| 593 | |
| 594 | /** |
| 595 | * <p> |
| 596 | * Mode of operation for the noise reduction |
| 597 | * algorithm |
| 598 | * </p> |
| 599 | * @see #NOISE_REDUCTION_MODE_OFF |
| 600 | * @see #NOISE_REDUCTION_MODE_FAST |
| 601 | * @see #NOISE_REDUCTION_MODE_HIGH_QUALITY |
| 602 | */ |
| 603 | public static final Key<Integer> NOISE_REDUCTION_MODE = |
| 604 | new Key<Integer>("android.noiseReduction.mode", int.class); |
| 605 | |
| 606 | /** |
| 607 | * <p> |
| 608 | * Number of frames captured since |
| 609 | * open() |
| 610 | * </p> |
| 611 | * <p> |
| 612 | * Reset on release() |
| 613 | * </p> |
| 614 | */ |
| 615 | public static final Key<Integer> REQUEST_FRAME_COUNT = |
| 616 | new Key<Integer>("android.request.frameCount", int.class); |
| 617 | |
| 618 | /** |
| 619 | * <p> |
| 620 | * An application-specified ID for the current |
| 621 | * request. Must be maintained unchanged in output |
| 622 | * frame |
| 623 | * </p> |
| 624 | * |
| 625 | * @hide |
| 626 | */ |
| 627 | public static final Key<Integer> REQUEST_ID = |
| 628 | new Key<Integer>("android.request.id", int.class); |
| 629 | |
| 630 | /** |
| 631 | * <p> |
| 632 | * (x, y, width, height). |
| 633 | * </p><p> |
| 634 | * A rectangle with the top-level corner of (x,y) and size |
| 635 | * (width, height). The region of the sensor that is used for |
| 636 | * output. Each stream must use this rectangle to produce its |
| 637 | * output, cropping to a smaller region if necessary to |
| 638 | * maintain the stream's aspect ratio. |
| 639 | * </p><p> |
| 640 | * HAL2.x uses only (x, y, width) |
| 641 | * </p> |
| 642 | * <p> |
| 643 | * Any additional per-stream cropping must be done to |
| 644 | * maximize the final pixel area of the stream. |
| 645 | * </p><p> |
| 646 | * For example, if the crop region is set to a 4:3 aspect |
| 647 | * ratio, then 4:3 streams should use the exact crop |
| 648 | * region. 16:9 streams should further crop vertically |
| 649 | * (letterbox). |
| 650 | * </p><p> |
| 651 | * Conversely, if the crop region is set to a 16:9, then 4:3 |
| 652 | * outputs should crop horizontally (pillarbox), and 16:9 |
| 653 | * streams should match exactly. These additional crops must |
| 654 | * be centered within the crop region. |
| 655 | * </p><p> |
| 656 | * The output streams must maintain square pixels at all |
| 657 | * times, no matter what the relative aspect ratios of the |
| 658 | * crop region and the stream are. Negative values for |
| 659 | * corner are allowed for raw output if full pixel array is |
| 660 | * larger than active pixel array. Width and height may be |
| 661 | * rounded to nearest larger supportable width, especially |
| 662 | * for raw output, where only a few fixed scales may be |
| 663 | * possible. The width and height of the crop region cannot |
| 664 | * be set to be smaller than floor( activeArraySize.width / |
| 665 | * android.scaler.maxDigitalZoom ) and floor( |
| 666 | * activeArraySize.height / android.scaler.maxDigitalZoom), |
| 667 | * respectively. |
| 668 | * </p> |
| 669 | */ |
| 670 | public static final Key<android.graphics.Rect> SCALER_CROP_REGION = |
| 671 | new Key<android.graphics.Rect>("android.scaler.cropRegion", android.graphics.Rect.class); |
| 672 | |
| 673 | /** |
| 674 | * <p> |
| 675 | * Duration each pixel is exposed to |
Igor Murashkin | d5ff06a | 2013-08-20 15:15:06 -0700 | [diff] [blame] | 676 | * light. |
| 677 | * </p><p> |
| 678 | * If the sensor can't expose this exact duration, it should shorten the |
| 679 | * duration exposed to the nearest possible value (rather than expose longer). |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 680 | * </p> |
| 681 | * <p> |
| 682 | * 1/10000 - 30 sec range. No bulb mode |
| 683 | * </p> |
| 684 | */ |
| 685 | public static final Key<Long> SENSOR_EXPOSURE_TIME = |
| 686 | new Key<Long>("android.sensor.exposureTime", long.class); |
| 687 | |
| 688 | /** |
| 689 | * <p> |
| 690 | * Duration from start of frame exposure to |
| 691 | * start of next frame exposure |
| 692 | * </p> |
| 693 | * <p> |
| 694 | * Exposure time has priority, so duration is set to |
| 695 | * max(duration, exposure time + overhead) |
| 696 | * </p> |
| 697 | */ |
| 698 | public static final Key<Long> SENSOR_FRAME_DURATION = |
| 699 | new Key<Long>("android.sensor.frameDuration", long.class); |
| 700 | |
| 701 | /** |
| 702 | * <p> |
| 703 | * Gain applied to image data. Must be |
| 704 | * implemented through analog gain only if set to values |
| 705 | * below 'maximum analog sensitivity'. |
Igor Murashkin | d5ff06a | 2013-08-20 15:15:06 -0700 | [diff] [blame] | 706 | * </p><p> |
| 707 | * If the sensor can't apply this exact gain, it should lessen the |
| 708 | * gain to the nearest possible value (rather than gain more). |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 709 | * </p> |
| 710 | * <p> |
| 711 | * ISO 12232:2006 REI method |
| 712 | * </p> |
| 713 | */ |
| 714 | public static final Key<Integer> SENSOR_SENSITIVITY = |
| 715 | new Key<Integer>("android.sensor.sensitivity", int.class); |
| 716 | |
| 717 | /** |
| 718 | * <p> |
| 719 | * Time at start of exposure of first |
| 720 | * row |
| 721 | * </p> |
| 722 | * <p> |
| 723 | * Monotonic, should be synced to other timestamps in |
| 724 | * system |
| 725 | * </p> |
| 726 | */ |
| 727 | public static final Key<Long> SENSOR_TIMESTAMP = |
| 728 | new Key<Long>("android.sensor.timestamp", long.class); |
| 729 | |
| 730 | /** |
| 731 | * <p> |
Igor Murashkin | d5ff06a | 2013-08-20 15:15:06 -0700 | [diff] [blame] | 732 | * The temperature of the sensor, sampled at the time |
| 733 | * exposure began for this frame. |
| 734 | * </p><p> |
| 735 | * The thermal diode being queried should be inside the sensor PCB, or |
| 736 | * somewhere close to it. |
| 737 | * </p> |
| 738 | */ |
| 739 | public static final Key<Float> SENSOR_TEMPERATURE = |
| 740 | new Key<Float>("android.sensor.temperature", float.class); |
| 741 | |
| 742 | /** |
| 743 | * <p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 744 | * State of the face detector |
| 745 | * unit |
| 746 | * </p> |
| 747 | * <p> |
| 748 | * Whether face detection is enabled, and whether it |
| 749 | * should output just the basic fields or the full set of |
| 750 | * fields. Value must be one of the |
| 751 | * android.statistics.info.availableFaceDetectModes. |
| 752 | * </p> |
| 753 | * @see #STATISTICS_FACE_DETECT_MODE_OFF |
| 754 | * @see #STATISTICS_FACE_DETECT_MODE_SIMPLE |
| 755 | * @see #STATISTICS_FACE_DETECT_MODE_FULL |
| 756 | */ |
| 757 | public static final Key<Integer> STATISTICS_FACE_DETECT_MODE = |
| 758 | new Key<Integer>("android.statistics.faceDetectMode", int.class); |
| 759 | |
| 760 | /** |
| 761 | * <p> |
| 762 | * List of unique IDs for detected |
| 763 | * faces |
| 764 | * </p> |
| 765 | * <p> |
| 766 | * Only available if faceDetectMode == FULL |
| 767 | * </p> |
| 768 | */ |
| 769 | public static final Key<int[]> STATISTICS_FACE_IDS = |
| 770 | new Key<int[]>("android.statistics.faceIds", int[].class); |
| 771 | |
| 772 | /** |
| 773 | * <p> |
| 774 | * List of landmarks for detected |
| 775 | * faces |
| 776 | * </p> |
| 777 | * <p> |
| 778 | * Only available if faceDetectMode == FULL |
| 779 | * </p> |
| 780 | */ |
| 781 | public static final Key<int[]> STATISTICS_FACE_LANDMARKS = |
| 782 | new Key<int[]>("android.statistics.faceLandmarks", int[].class); |
| 783 | |
| 784 | /** |
| 785 | * <p> |
| 786 | * List of the bounding rectangles for detected |
| 787 | * faces |
| 788 | * </p> |
| 789 | * <p> |
| 790 | * Only available if faceDetectMode != OFF |
| 791 | * </p> |
| 792 | */ |
| 793 | public static final Key<android.graphics.Rect[]> STATISTICS_FACE_RECTANGLES = |
| 794 | new Key<android.graphics.Rect[]>("android.statistics.faceRectangles", android.graphics.Rect[].class); |
| 795 | |
| 796 | /** |
| 797 | * <p> |
| 798 | * List of the face confidence scores for |
| 799 | * detected faces |
| 800 | * </p> |
| 801 | * <p> |
Igor Murashkin | d5ff06a | 2013-08-20 15:15:06 -0700 | [diff] [blame] | 802 | * Only available if faceDetectMode != OFF. The value should be |
| 803 | * meaningful (for example, setting 100 at all times is illegal). |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 804 | * </p> |
| 805 | */ |
| 806 | public static final Key<byte[]> STATISTICS_FACE_SCORES = |
| 807 | new Key<byte[]>("android.statistics.faceScores", byte[].class); |
| 808 | |
| 809 | /** |
| 810 | * <p> |
| 811 | * A low-resolution map of lens shading, per |
| 812 | * color channel |
| 813 | * </p> |
| 814 | * <p> |
| 815 | * Assume bilinear interpolation of map. The least |
| 816 | * shaded section of the image should have a gain factor |
| 817 | * of 1; all other sections should have gains above 1. |
| 818 | * the map should be on the order of 30-40 rows, and |
| 819 | * must be smaller than 64x64. |
Igor Murashkin | d5ff06a | 2013-08-20 15:15:06 -0700 | [diff] [blame] | 820 | * </p><p> |
| 821 | * When android.colorCorrection.mode = TRANSFORM_MATRIX, the map |
| 822 | * must take into account the colorCorrection settings. |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 823 | * </p> |
| 824 | */ |
| 825 | public static final Key<float[]> STATISTICS_LENS_SHADING_MAP = |
| 826 | new Key<float[]>("android.statistics.lensShadingMap", float[].class); |
| 827 | |
| 828 | /** |
| 829 | * <p> |
| 830 | * The best-fit color channel gains calculated |
| 831 | * by the HAL's statistics units for the current output frame |
| 832 | * </p> |
| 833 | * <p> |
| 834 | * This may be different than the gains used for this frame, |
| 835 | * since statistics processing on data from a new frame |
| 836 | * typically completes after the transform has already been |
| 837 | * applied to that frame. |
| 838 | * </p><p> |
| 839 | * The 4 channel gains are defined in Bayer domain, |
| 840 | * see android.colorCorrection.gains for details. |
Igor Murashkin | d5ff06a | 2013-08-20 15:15:06 -0700 | [diff] [blame] | 841 | * </p><p> |
| 842 | * This value should always be calculated by the AWB block, |
| 843 | * regardless of the android.control.* current values. |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 844 | * </p> |
| 845 | */ |
| 846 | public static final Key<float[]> STATISTICS_PREDICTED_COLOR_GAINS = |
| 847 | new Key<float[]>("android.statistics.predictedColorGains", float[].class); |
| 848 | |
| 849 | /** |
| 850 | * <p> |
| 851 | * The best-fit color transform matrix estimate |
| 852 | * calculated by the HAL's statistics units for the current |
| 853 | * output frame |
| 854 | * </p> |
| 855 | * <p> |
| 856 | * The HAL must provide the estimate from its |
| 857 | * statistics unit on the white balance transforms to use |
| 858 | * for the next frame. These are the values the HAL believes |
| 859 | * are the best fit for the current output frame. This may |
| 860 | * be different than the transform used for this frame, since |
| 861 | * statistics processing on data from a new frame typically |
| 862 | * completes after the transform has already been applied to |
| 863 | * that frame. |
| 864 | * </p><p> |
| 865 | * These estimates must be provided for all frames, even if |
| 866 | * capture settings and color transforms are set by the application. |
Igor Murashkin | d5ff06a | 2013-08-20 15:15:06 -0700 | [diff] [blame] | 867 | * </p><p> |
| 868 | * This value should always be calculated by the AWB block, |
| 869 | * regardless of the android.control.* current values. |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 870 | * </p> |
| 871 | */ |
| 872 | public static final Key<Rational[]> STATISTICS_PREDICTED_COLOR_TRANSFORM = |
| 873 | new Key<Rational[]>("android.statistics.predictedColorTransform", Rational[].class); |
| 874 | |
| 875 | /** |
| 876 | * <p> |
| 877 | * The HAL estimated scene illumination lighting |
| 878 | * frequency |
| 879 | * </p> |
| 880 | * <p> |
| 881 | * Report NONE if there doesn't appear to be flickering |
| 882 | * illumination |
| 883 | * </p> |
| 884 | * @see #STATISTICS_SCENE_FLICKER_NONE |
| 885 | * @see #STATISTICS_SCENE_FLICKER_50HZ |
| 886 | * @see #STATISTICS_SCENE_FLICKER_60HZ |
| 887 | */ |
| 888 | public static final Key<Integer> STATISTICS_SCENE_FLICKER = |
| 889 | new Key<Integer>("android.statistics.sceneFlicker", int.class); |
| 890 | |
| 891 | /** |
| 892 | * <p> |
| 893 | * Table mapping blue input values to output |
| 894 | * values |
| 895 | * </p> |
Zhijun He | 3ffd705 | 2013-08-19 15:45:08 -0700 | [diff] [blame] | 896 | * <p> |
| 897 | * Tonemapping / contrast / gamma curve for the blue |
| 898 | * channel, to use when android.tonemap.mode is CONTRAST_CURVE. |
| 899 | * </p><p> |
| 900 | * See android.tonemap.curveRed for more details. |
| 901 | * </p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 902 | */ |
Zhijun He | 3ffd705 | 2013-08-19 15:45:08 -0700 | [diff] [blame] | 903 | public static final Key<float[]> TONEMAP_CURVE_BLUE = |
| 904 | new Key<float[]>("android.tonemap.curveBlue", float[].class); |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 905 | |
| 906 | /** |
| 907 | * <p> |
| 908 | * Table mapping green input values to output |
| 909 | * values |
| 910 | * </p> |
Zhijun He | 3ffd705 | 2013-08-19 15:45:08 -0700 | [diff] [blame] | 911 | * <p> |
| 912 | * Tonemapping / contrast / gamma curve for the green |
| 913 | * channel, to use when android.tonemap.mode is CONTRAST_CURVE. |
| 914 | * </p><p> |
| 915 | * See android.tonemap.curveRed for more details. |
| 916 | * </p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 917 | */ |
Zhijun He | 3ffd705 | 2013-08-19 15:45:08 -0700 | [diff] [blame] | 918 | public static final Key<float[]> TONEMAP_CURVE_GREEN = |
| 919 | new Key<float[]>("android.tonemap.curveGreen", float[].class); |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 920 | |
| 921 | /** |
| 922 | * <p> |
| 923 | * Table mapping red input values to output |
| 924 | * values |
| 925 | * </p> |
| 926 | * <p> |
Zhijun He | 3ffd705 | 2013-08-19 15:45:08 -0700 | [diff] [blame] | 927 | * Tonemapping / contrast / gamma curve for the red |
| 928 | * channel, to use when android.tonemap.mode is CONTRAST_CURVE. |
| 929 | * </p><p> |
| 930 | * Since the input and output ranges may vary depending on |
| 931 | * the camera pipeline, the input and output pixel values |
| 932 | * are represented by normalized floating-point values |
| 933 | * between 0 and 1, with 0 == black and 1 == white. |
| 934 | * </p><p> |
| 935 | * The curve should be linearly interpolated between the |
| 936 | * defined points. The points will be listed in increasing |
| 937 | * order of P_IN. For example, if the array is: [0.0, 0.0, |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 938 | * 0.3, 0.5, 1.0, 1.0], then the input->output mapping |
| 939 | * for a few sample points would be: 0 -> 0, 0.15 -> |
| 940 | * 0.25, 0.3 -> 0.5, 0.5 -> 0.64 |
| 941 | * </p> |
| 942 | */ |
| 943 | public static final Key<float[]> TONEMAP_CURVE_RED = |
| 944 | new Key<float[]>("android.tonemap.curveRed", float[].class); |
| 945 | |
| 946 | /** |
| 947 | * @see #TONEMAP_MODE_CONTRAST_CURVE |
| 948 | * @see #TONEMAP_MODE_FAST |
| 949 | * @see #TONEMAP_MODE_HIGH_QUALITY |
| 950 | */ |
| 951 | public static final Key<Integer> TONEMAP_MODE = |
| 952 | new Key<Integer>("android.tonemap.mode", int.class); |
| 953 | |
| 954 | /** |
| 955 | * <p> |
| 956 | * This LED is nominally used to indicate to the user |
| 957 | * that the camera is powered on and may be streaming images back to the |
| 958 | * Application Processor. In certain rare circumstances, the OS may |
| 959 | * disable this when video is processed locally and not transmitted to |
| 960 | * any untrusted applications. |
| 961 | * </p><p> |
| 962 | * In particular, the LED *must* always be on when the data could be |
| 963 | * transmitted off the device. The LED *should* always be on whenever |
| 964 | * data is stored locally on the device. |
| 965 | * </p><p> |
| 966 | * The LED *may* be off if a trusted application is using the data that |
| 967 | * doesn't violate the above rules. |
| 968 | * </p> |
| 969 | * |
| 970 | * @hide |
| 971 | */ |
| 972 | public static final Key<Boolean> LED_TRANSMIT = |
| 973 | new Key<Boolean>("android.led.transmit", boolean.class); |
| 974 | |
| 975 | /** |
| 976 | * <p> |
| 977 | * Whether black-level compensation is locked |
| 978 | * to its current values, or is free to vary |
| 979 | * </p> |
| 980 | * <p> |
| 981 | * When set to ON, the values used for black-level |
| 982 | * compensation must not change until the lock is set to |
| 983 | * OFF |
| 984 | * </p><p> |
| 985 | * Since changes to certain capture parameters (such as |
| 986 | * exposure time) may require resetting of black level |
| 987 | * compensation, the HAL must report whether setting the |
| 988 | * black level lock was successful in the output result |
| 989 | * metadata. |
Igor Murashkin | d5ff06a | 2013-08-20 15:15:06 -0700 | [diff] [blame] | 990 | * </p><p> |
| 991 | * The black level locking must happen at the sensor, and not at the ISP. |
| 992 | * If for some reason black level locking is no longer legal (for example, |
| 993 | * the analog gain has changed, which forces black levels to be |
| 994 | * recalculated), then the HAL is free to override this request (and it |
| 995 | * must report 'OFF' when this does happen) until the next time locking |
| 996 | * is legal again. |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 997 | * </p> |
| 998 | */ |
| 999 | public static final Key<Boolean> BLACK_LEVEL_LOCK = |
| 1000 | new Key<Boolean>("android.blackLevel.lock", boolean.class); |
| 1001 | |
| 1002 | /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~ |
| 1003 | * End generated code |
| 1004 | *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/ |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 1005 | } |