metadata_properties.xml revision 11aee3ec0cf071bea2424c435457b5575c751c80
1<?xml version="1.0" encoding="utf-8"?> 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<metadata xmlns="http://schemas.android.com/service/camera/metadata/" 17xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 18xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata_properties.xsd"> 19 20 <tags> 21 <tag id="BC"> 22 Needed for backwards compatibility with old Java API 23 </tag> 24 <tag id="V1"> 25 New features for first camera 2 release (API1) 26 </tag> 27 <tag id="RAW"> 28 Needed for useful RAW image processing and DNG file support 29 </tag> 30 <tag id="HAL2"> 31 Entry is only used by camera device HAL 2.x 32 </tag> 33 <tag id="FULL"> 34 Entry is required for full hardware level devices, and optional for other hardware levels 35 </tag> 36 <tag id="DEPTH"> 37 Entry is required for the depth capability. 38 </tag> 39 <tag id="REPROC"> 40 Entry is required for the YUV or PRIVATE reprocessing capability. 41 </tag> 42 <tag id="FUTURE"> 43 Entry is under-specified and is not required for now. This is for book-keeping purpose, 44 do not implement or use it, it may be revised for future. 45 </tag> 46 </tags> 47 48 <types> 49 <typedef name="pairFloatFloat"> 50 <language name="java">android.util.Pair<Float,Float></language> 51 </typedef> 52 <typedef name="pairDoubleDouble"> 53 <language name="java">android.util.Pair<Double,Double></language> 54 </typedef> 55 <typedef name="rectangle"> 56 <language name="java">android.graphics.Rect</language> 57 </typedef> 58 <typedef name="size"> 59 <language name="java">android.util.Size</language> 60 </typedef> 61 <typedef name="string"> 62 <language name="java">String</language> 63 </typedef> 64 <typedef name="boolean"> 65 <language name="java">boolean</language> 66 </typedef> 67 <typedef name="imageFormat"> 68 <language name="java">int</language> 69 </typedef> 70 <typedef name="streamConfigurationMap"> 71 <language name="java">android.hardware.camera2.params.StreamConfigurationMap</language> 72 </typedef> 73 <typedef name="streamConfiguration"> 74 <language name="java">android.hardware.camera2.params.StreamConfiguration</language> 75 </typedef> 76 <typedef name="streamConfigurationDuration"> 77 <language name="java">android.hardware.camera2.params.StreamConfigurationDuration</language> 78 </typedef> 79 <typedef name="face"> 80 <language name="java">android.hardware.camera2.params.Face</language> 81 </typedef> 82 <typedef name="meteringRectangle"> 83 <language name="java">android.hardware.camera2.params.MeteringRectangle</language> 84 </typedef> 85 <typedef name="rangeFloat"> 86 <language name="java">android.util.Range<Float></language> 87 </typedef> 88 <typedef name="rangeInt"> 89 <language name="java">android.util.Range<Integer></language> 90 </typedef> 91 <typedef name="rangeLong"> 92 <language name="java">android.util.Range<Long></language> 93 </typedef> 94 <typedef name="colorSpaceTransform"> 95 <language name="java">android.hardware.camera2.params.ColorSpaceTransform</language> 96 </typedef> 97 <typedef name="rggbChannelVector"> 98 <language name="java">android.hardware.camera2.params.RggbChannelVector</language> 99 </typedef> 100 <typedef name="blackLevelPattern"> 101 <language name="java">android.hardware.camera2.params.BlackLevelPattern</language> 102 </typedef> 103 <typedef name="enumList"> 104 <language name="java">int</language> 105 </typedef> 106 <typedef name="sizeF"> 107 <language name="java">android.util.SizeF</language> 108 </typedef> 109 <typedef name="point"> 110 <language name="java">android.graphics.Point</language> 111 </typedef> 112 <typedef name="tonemapCurve"> 113 <language name="java">android.hardware.camera2.params.TonemapCurve</language> 114 </typedef> 115 <typedef name="lensShadingMap"> 116 <language name="java">android.hardware.camera2.params.LensShadingMap</language> 117 </typedef> 118 <typedef name="location"> 119 <language name="java">android.location.Location</language> 120 </typedef> 121 <typedef name="highSpeedVideoConfiguration"> 122 <language name="java">android.hardware.camera2.params.HighSpeedVideoConfiguration</language> 123 </typedef> 124 <typedef name="reprocessFormatsMap"> 125 <language name="java">android.hardware.camera2.params.ReprocessFormatsMap</language> 126 </typedef> 127 </types> 128 129 <namespace name="android"> 130 <section name="colorCorrection"> 131 <controls> 132 <entry name="mode" type="byte" visibility="public" enum="true" hwlevel="full"> 133 <enum> 134 <value>TRANSFORM_MATRIX 135 <notes>Use the android.colorCorrection.transform matrix 136 and android.colorCorrection.gains to do color conversion. 137 138 All advanced white balance adjustments (not specified 139 by our white balance pipeline) must be disabled. 140 141 If AWB is enabled with `android.control.awbMode != OFF`, then 142 TRANSFORM_MATRIX is ignored. The camera device will override 143 this value to either FAST or HIGH_QUALITY. 144 </notes> 145 </value> 146 <value>FAST 147 <notes>Color correction processing must not slow down 148 capture rate relative to sensor raw output. 149 150 Advanced white balance adjustments above and beyond 151 the specified white balance pipeline may be applied. 152 153 If AWB is enabled with `android.control.awbMode != OFF`, then 154 the camera device uses the last frame's AWB values 155 (or defaults if AWB has never been run). 156 </notes> 157 </value> 158 <value>HIGH_QUALITY 159 <notes>Color correction processing operates at improved 160 quality but the capture rate might be reduced (relative to sensor 161 raw output rate) 162 163 Advanced white balance adjustments above and beyond 164 the specified white balance pipeline may be applied. 165 166 If AWB is enabled with `android.control.awbMode != OFF`, then 167 the camera device uses the last frame's AWB values 168 (or defaults if AWB has never been run). 169 </notes> 170 </value> 171 </enum> 172 173 <description> 174 The mode control selects how the image data is converted from the 175 sensor's native color into linear sRGB color. 176 </description> 177 <details> 178 When auto-white balance (AWB) is enabled with android.control.awbMode, this 179 control is overridden by the AWB routine. When AWB is disabled, the 180 application controls how the color mapping is performed. 181 182 We define the expected processing pipeline below. For consistency 183 across devices, this is always the case with TRANSFORM_MATRIX. 184 185 When either FULL or HIGH_QUALITY is used, the camera device may 186 do additional processing but android.colorCorrection.gains and 187 android.colorCorrection.transform will still be provided by the 188 camera device (in the results) and be roughly correct. 189 190 Switching to TRANSFORM_MATRIX and using the data provided from 191 FAST or HIGH_QUALITY will yield a picture with the same white point 192 as what was produced by the camera device in the earlier frame. 193 194 The expected processing pipeline is as follows: 195 196 ![White balance processing pipeline](android.colorCorrection.mode/processing_pipeline.png) 197 198 The white balance is encoded by two values, a 4-channel white-balance 199 gain vector (applied in the Bayer domain), and a 3x3 color transform 200 matrix (applied after demosaic). 201 202 The 4-channel white-balance gains are defined as: 203 204 android.colorCorrection.gains = [ R G_even G_odd B ] 205 206 where `G_even` is the gain for green pixels on even rows of the 207 output, and `G_odd` is the gain for green pixels on the odd rows. 208 These may be identical for a given camera device implementation; if 209 the camera device does not support a separate gain for even/odd green 210 channels, it will use the `G_even` value, and write `G_odd` equal to 211 `G_even` in the output result metadata. 212 213 The matrices for color transforms are defined as a 9-entry vector: 214 215 android.colorCorrection.transform = [ I0 I1 I2 I3 I4 I5 I6 I7 I8 ] 216 217 which define a transform from input sensor colors, `P_in = [ r g b ]`, 218 to output linear sRGB, `P_out = [ r' g' b' ]`, 219 220 with colors as follows: 221 222 r' = I0r + I1g + I2b 223 g' = I3r + I4g + I5b 224 b' = I6r + I7g + I8b 225 226 Both the input and output value ranges must match. Overflow/underflow 227 values are clipped to fit within the range. 228 </details> 229 <hal_details> 230 HAL must support both FAST and HIGH_QUALITY if color correction control is available 231 on the camera device, but the underlying implementation can be the same for both modes. 232 That is, if the highest quality implementation on the camera device does not slow down 233 capture rate, then FAST and HIGH_QUALITY should generate the same output. 234 </hal_details> 235 </entry> 236 <entry name="transform" type="rational" visibility="public" 237 type_notes="3x3 rational matrix in row-major order" 238 container="array" typedef="colorSpaceTransform" hwlevel="full"> 239 <array> 240 <size>3</size> 241 <size>3</size> 242 </array> 243 <description>A color transform matrix to use to transform 244 from sensor RGB color space to output linear sRGB color space. 245 </description> 246 <units>Unitless scale factors</units> 247 <details>This matrix is either set by the camera device when the request 248 android.colorCorrection.mode is not TRANSFORM_MATRIX, or 249 directly by the application in the request when the 250 android.colorCorrection.mode is TRANSFORM_MATRIX. 251 252 In the latter case, the camera device may round the matrix to account 253 for precision issues; the final rounded matrix should be reported back 254 in this matrix result metadata. The transform should keep the magnitude 255 of the output color values within `[0, 1.0]` (assuming input color 256 values is within the normalized range `[0, 1.0]`), or clipping may occur. 257 258 The valid range of each matrix element varies on different devices, but 259 values within [-1.5, 3.0] are guaranteed not to be clipped. 260 </details> 261 </entry> 262 <entry name="gains" type="float" visibility="public" 263 type_notes="A 1D array of floats for 4 color channel gains" 264 container="array" typedef="rggbChannelVector" hwlevel="full"> 265 <array> 266 <size>4</size> 267 </array> 268 <description>Gains applying to Bayer raw color channels for 269 white-balance.</description> 270 <units>Unitless gain factors</units> 271 <details> 272 These per-channel gains are either set by the camera device 273 when the request android.colorCorrection.mode is not 274 TRANSFORM_MATRIX, or directly by the application in the 275 request when the android.colorCorrection.mode is 276 TRANSFORM_MATRIX. 277 278 The gains in the result metadata are the gains actually 279 applied by the camera device to the current frame. 280 281 The valid range of gains varies on different devices, but gains 282 between [1.0, 3.0] are guaranteed not to be clipped. Even if a given 283 device allows gains below 1.0, this is usually not recommended because 284 this can create color artifacts. 285 </details> 286 <hal_details> 287 The 4-channel white-balance gains are defined in 288 the order of `[R G_even G_odd B]`, where `G_even` is the gain 289 for green pixels on even rows of the output, and `G_odd` 290 is the gain for green pixels on the odd rows. 291 292 If a HAL does not support a separate gain for even/odd green 293 channels, it must use the `G_even` value, and write 294 `G_odd` equal to `G_even` in the output result metadata. 295 </hal_details> 296 </entry> 297 <entry name="aberrationMode" type="byte" visibility="public" enum="true" hwlevel="legacy"> 298 <enum> 299 <value>OFF 300 <notes> 301 No aberration correction is applied. 302 </notes> 303 </value> 304 <value>FAST 305 <notes> 306 Aberration correction will not slow down capture rate 307 relative to sensor raw output. 308 </notes> 309 </value> 310 <value>HIGH_QUALITY 311 <notes> 312 Aberration correction operates at improved quality but the capture rate might be 313 reduced (relative to sensor raw output rate) 314 </notes> 315 </value> 316 </enum> 317 <description> 318 Mode of operation for the chromatic aberration correction algorithm. 319 </description> 320 <range>android.colorCorrection.availableAberrationModes</range> 321 <details> 322 Chromatic (color) aberration is caused by the fact that different wavelengths of light 323 can not focus on the same point after exiting from the lens. This metadata defines 324 the high level control of chromatic aberration correction algorithm, which aims to 325 minimize the chromatic artifacts that may occur along the object boundaries in an 326 image. 327 328 FAST/HIGH_QUALITY both mean that camera device determined aberration 329 correction will be applied. HIGH_QUALITY mode indicates that the camera device will 330 use the highest-quality aberration correction algorithms, even if it slows down 331 capture rate. FAST means the camera device will not slow down capture rate when 332 applying aberration correction. 333 334 LEGACY devices will always be in FAST mode. 335 </details> 336 </entry> 337 </controls> 338 <dynamic> 339 <clone entry="android.colorCorrection.mode" kind="controls"> 340 </clone> 341 <clone entry="android.colorCorrection.transform" kind="controls"> 342 </clone> 343 <clone entry="android.colorCorrection.gains" kind="controls"> 344 </clone> 345 <clone entry="android.colorCorrection.aberrationMode" kind="controls"> 346 </clone> 347 </dynamic> 348 <static> 349 <entry name="availableAberrationModes" type="byte" visibility="public" 350 type_notes="list of enums" container="array" typedef="enumList" hwlevel="legacy"> 351 <array> 352 <size>n</size> 353 </array> 354 <description> 355 List of aberration correction modes for android.colorCorrection.aberrationMode that are 356 supported by this camera device. 357 </description> 358 <range>Any value listed in android.colorCorrection.aberrationMode</range> 359 <details> 360 This key lists the valid modes for android.colorCorrection.aberrationMode. If no 361 aberration correction modes are available for a device, this list will solely include 362 OFF mode. All camera devices will support either OFF or FAST mode. 363 364 Camera devices that support the MANUAL_POST_PROCESSING capability will always list 365 OFF mode. This includes all FULL level devices. 366 367 LEGACY devices will always only support FAST mode. 368 </details> 369 <hal_details> 370 HAL must support both FAST and HIGH_QUALITY if chromatic aberration control is available 371 on the camera device, but the underlying implementation can be the same for both modes. 372 That is, if the highest quality implementation on the camera device does not slow down 373 capture rate, then FAST and HIGH_QUALITY will generate the same output. 374 </hal_details> 375 <tag id="V1" /> 376 </entry> 377 </static> 378 </section> 379 <section name="control"> 380 <controls> 381 <entry name="aeAntibandingMode" type="byte" visibility="public" 382 enum="true" hwlevel="legacy"> 383 <enum> 384 <value>OFF 385 <notes> 386 The camera device will not adjust exposure duration to 387 avoid banding problems. 388 </notes> 389 </value> 390 <value>50HZ 391 <notes> 392 The camera device will adjust exposure duration to 393 avoid banding problems with 50Hz illumination sources. 394 </notes> 395 </value> 396 <value>60HZ 397 <notes> 398 The camera device will adjust exposure duration to 399 avoid banding problems with 60Hz illumination 400 sources. 401 </notes> 402 </value> 403 <value>AUTO 404 <notes> 405 The camera device will automatically adapt its 406 antibanding routine to the current illumination 407 condition. This is the default mode if AUTO is 408 available on given camera device. 409 </notes> 410 </value> 411 </enum> 412 <description> 413 The desired setting for the camera device's auto-exposure 414 algorithm's antibanding compensation. 415 </description> 416 <range> 417 android.control.aeAvailableAntibandingModes 418 </range> 419 <details> 420 Some kinds of lighting fixtures, such as some fluorescent 421 lights, flicker at the rate of the power supply frequency 422 (60Hz or 50Hz, depending on country). While this is 423 typically not noticeable to a person, it can be visible to 424 a camera device. If a camera sets its exposure time to the 425 wrong value, the flicker may become visible in the 426 viewfinder as flicker or in a final captured image, as a 427 set of variable-brightness bands across the image. 428 429 Therefore, the auto-exposure routines of camera devices 430 include antibanding routines that ensure that the chosen 431 exposure value will not cause such banding. The choice of 432 exposure time depends on the rate of flicker, which the 433 camera device can detect automatically, or the expected 434 rate can be selected by the application using this 435 control. 436 437 A given camera device may not support all of the possible 438 options for the antibanding mode. The 439 android.control.aeAvailableAntibandingModes key contains 440 the available modes for a given camera device. 441 442 AUTO mode is the default if it is available on given 443 camera device. When AUTO mode is not available, the 444 default will be either 50HZ or 60HZ, and both 50HZ 445 and 60HZ will be available. 446 447 If manual exposure control is enabled (by setting 448 android.control.aeMode or android.control.mode to OFF), 449 then this setting has no effect, and the application must 450 ensure it selects exposure times that do not cause banding 451 issues. The android.statistics.sceneFlicker key can assist 452 the application in this. 453 </details> 454 <hal_details> 455 For all capture request templates, this field must be set 456 to AUTO if AUTO mode is available. If AUTO is not available, 457 the default must be either 50HZ or 60HZ, and both 50HZ and 458 60HZ must be available. 459 460 If manual exposure control is enabled (by setting 461 android.control.aeMode or android.control.mode to OFF), 462 then the exposure values provided by the application must not be 463 adjusted for antibanding. 464 </hal_details> 465 <tag id="BC" /> 466 </entry> 467 <entry name="aeExposureCompensation" type="int32" visibility="public" hwlevel="legacy"> 468 <description>Adjustment to auto-exposure (AE) target image 469 brightness.</description> 470 <units>Compensation steps</units> 471 <range>android.control.aeCompensationRange</range> 472 <details> 473 The adjustment is measured as a count of steps, with the 474 step size defined by android.control.aeCompensationStep and the 475 allowed range by android.control.aeCompensationRange. 476 477 For example, if the exposure value (EV) step is 0.333, '6' 478 will mean an exposure compensation of +2 EV; -3 will mean an 479 exposure compensation of -1 EV. One EV represents a doubling 480 of image brightness. Note that this control will only be 481 effective if android.control.aeMode `!=` OFF. This control 482 will take effect even when android.control.aeLock `== true`. 483 484 In the event of exposure compensation value being changed, camera device 485 may take several frames to reach the newly requested exposure target. 486 During that time, android.control.aeState field will be in the SEARCHING 487 state. Once the new exposure target is reached, android.control.aeState will 488 change from SEARCHING to either CONVERGED, LOCKED (if AE lock is enabled), or 489 FLASH_REQUIRED (if the scene is too dark for still capture). 490 </details> 491 <tag id="BC" /> 492 </entry> 493 <entry name="aeLock" type="byte" visibility="public" enum="true" 494 typedef="boolean" hwlevel="legacy"> 495 <enum> 496 <value>OFF 497 <notes>Auto-exposure lock is disabled; the AE algorithm 498 is free to update its parameters.</notes></value> 499 <value>ON 500 <notes>Auto-exposure lock is enabled; the AE algorithm 501 must not update the exposure and sensitivity parameters 502 while the lock is active. 503 504 android.control.aeExposureCompensation setting changes 505 will still take effect while auto-exposure is locked. 506 507 Some rare LEGACY devices may not support 508 this, in which case the value will always be overridden to OFF. 509 </notes></value> 510 </enum> 511 <description>Whether auto-exposure (AE) is currently locked to its latest 512 calculated values.</description> 513 <details> 514 When set to `true` (ON), the AE algorithm is locked to its latest parameters, 515 and will not change exposure settings until the lock is set to `false` (OFF). 516 517 Note that even when AE is locked, the flash may be fired if 518 the android.control.aeMode is ON_AUTO_FLASH / 519 ON_ALWAYS_FLASH / ON_AUTO_FLASH_REDEYE. 520 521 When android.control.aeExposureCompensation is changed, even if the AE lock 522 is ON, the camera device will still adjust its exposure value. 523 524 If AE precapture is triggered (see android.control.aePrecaptureTrigger) 525 when AE is already locked, the camera device will not change the exposure time 526 (android.sensor.exposureTime) and sensitivity (android.sensor.sensitivity) 527 parameters. The flash may be fired if the android.control.aeMode 528 is ON_AUTO_FLASH/ON_AUTO_FLASH_REDEYE and the scene is too dark. If the 529 android.control.aeMode is ON_ALWAYS_FLASH, the scene may become overexposed. 530 Similarly, AE precapture trigger CANCEL has no effect when AE is already locked. 531 532 When an AE precapture sequence is triggered, AE unlock will not be able to unlock 533 the AE if AE is locked by the camera device internally during precapture metering 534 sequence In other words, submitting requests with AE unlock has no effect for an 535 ongoing precapture metering sequence. Otherwise, the precapture metering sequence 536 will never succeed in a sequence of preview requests where AE lock is always set 537 to `false`. 538 539 Since the camera device has a pipeline of in-flight requests, the settings that 540 get locked do not necessarily correspond to the settings that were present in the 541 latest capture result received from the camera device, since additional captures 542 and AE updates may have occurred even before the result was sent out. If an 543 application is switching between automatic and manual control and wishes to eliminate 544 any flicker during the switch, the following procedure is recommended: 545 546 1. Starting in auto-AE mode: 547 2. Lock AE 548 3. Wait for the first result to be output that has the AE locked 549 4. Copy exposure settings from that result into a request, set the request to manual AE 550 5. Submit the capture request, proceed to run manual AE as desired. 551 552 See android.control.aeState for AE lock related state transition details. 553 </details> 554 <tag id="BC" /> 555 </entry> 556 <entry name="aeMode" type="byte" visibility="public" enum="true" hwlevel="legacy"> 557 <enum> 558 <value>OFF 559 <notes> 560 The camera device's autoexposure routine is disabled. 561 562 The application-selected android.sensor.exposureTime, 563 android.sensor.sensitivity and 564 android.sensor.frameDuration are used by the camera 565 device, along with android.flash.* fields, if there's 566 a flash unit for this camera device. 567 568 Note that auto-white balance (AWB) and auto-focus (AF) 569 behavior is device dependent when AE is in OFF mode. 570 To have consistent behavior across different devices, 571 it is recommended to either set AWB and AF to OFF mode 572 or lock AWB and AF before setting AE to OFF. 573 See android.control.awbMode, android.control.afMode, 574 android.control.awbLock, and android.control.afTrigger 575 for more details. 576 577 LEGACY devices do not support the OFF mode and will 578 override attempts to use this value to ON. 579 </notes> 580 </value> 581 <value>ON 582 <notes> 583 The camera device's autoexposure routine is active, 584 with no flash control. 585 586 The application's values for 587 android.sensor.exposureTime, 588 android.sensor.sensitivity, and 589 android.sensor.frameDuration are ignored. The 590 application has control over the various 591 android.flash.* fields. 592 </notes> 593 </value> 594 <value>ON_AUTO_FLASH 595 <notes> 596 Like ON, except that the camera device also controls 597 the camera's flash unit, firing it in low-light 598 conditions. 599 600 The flash may be fired during a precapture sequence 601 (triggered by android.control.aePrecaptureTrigger) and 602 may be fired for captures for which the 603 android.control.captureIntent field is set to 604 STILL_CAPTURE 605 </notes> 606 </value> 607 <value>ON_ALWAYS_FLASH 608 <notes> 609 Like ON, except that the camera device also controls 610 the camera's flash unit, always firing it for still 611 captures. 612 613 The flash may be fired during a precapture sequence 614 (triggered by android.control.aePrecaptureTrigger) and 615 will always be fired for captures for which the 616 android.control.captureIntent field is set to 617 STILL_CAPTURE 618 </notes> 619 </value> 620 <value>ON_AUTO_FLASH_REDEYE 621 <notes> 622 Like ON_AUTO_FLASH, but with automatic red eye 623 reduction. 624 625 If deemed necessary by the camera device, a red eye 626 reduction flash will fire during the precapture 627 sequence. 628 </notes> 629 </value> 630 </enum> 631 <description>The desired mode for the camera device's 632 auto-exposure routine.</description> 633 <range>android.control.aeAvailableModes</range> 634 <details> 635 This control is only effective if android.control.mode is 636 AUTO. 637 638 When set to any of the ON modes, the camera device's 639 auto-exposure routine is enabled, overriding the 640 application's selected exposure time, sensor sensitivity, 641 and frame duration (android.sensor.exposureTime, 642 android.sensor.sensitivity, and 643 android.sensor.frameDuration). If one of the FLASH modes 644 is selected, the camera device's flash unit controls are 645 also overridden. 646 647 The FLASH modes are only available if the camera device 648 has a flash unit (android.flash.info.available is `true`). 649 650 If flash TORCH mode is desired, this field must be set to 651 ON or OFF, and android.flash.mode set to TORCH. 652 653 When set to any of the ON modes, the values chosen by the 654 camera device auto-exposure routine for the overridden 655 fields for a given capture will be available in its 656 CaptureResult. 657 </details> 658 <tag id="BC" /> 659 </entry> 660 <entry name="aeRegions" type="int32" visibility="public" 661 optional="true" container="array" typedef="meteringRectangle"> 662 <array> 663 <size>5</size> 664 <size>area_count</size> 665 </array> 666 <description>List of metering areas to use for auto-exposure adjustment.</description> 667 <units>Pixel coordinates within android.sensor.info.activeArraySize</units> 668 <range>Coordinates must be between `[(0,0), (width, height))` of 669 android.sensor.info.activeArraySize</range> 670 <details> 671 Not available if android.control.maxRegionsAe is 0. 672 Otherwise will always be present. 673 674 The maximum number of regions supported by the device is determined by the value 675 of android.control.maxRegionsAe. 676 677 The coordinate system is based on the active pixel array, 678 with (0,0) being the top-left pixel in the active pixel array, and 679 (android.sensor.info.activeArraySize.width - 1, 680 android.sensor.info.activeArraySize.height - 1) being the 681 bottom-right pixel in the active pixel array. 682 683 The weight must be within `[0, 1000]`, and represents a weight 684 for every pixel in the area. This means that a large metering area 685 with the same weight as a smaller area will have more effect in 686 the metering result. Metering areas can partially overlap and the 687 camera device will add the weights in the overlap region. 688 689 The weights are relative to weights of other exposure metering regions, so if only one 690 region is used, all non-zero weights will have the same effect. A region with 0 691 weight is ignored. 692 693 If all regions have 0 weight, then no specific metering area needs to be used by the 694 camera device. 695 696 If the metering region is outside the used android.scaler.cropRegion returned in 697 capture result metadata, the camera device will ignore the sections outside the crop 698 region and output only the intersection rectangle as the metering region in the result 699 metadata. If the region is entirely outside the crop region, it will be ignored and 700 not reported in the result metadata. 701 </details> 702 <hal_details> 703 The HAL level representation of MeteringRectangle[] is a 704 int[5 * area_count]. 705 Every five elements represent a metering region of 706 (xmin, ymin, xmax, ymax, weight). 707 The rectangle is defined to be inclusive on xmin and ymin, but 708 exclusive on xmax and ymax. 709 </hal_details> 710 <tag id="BC" /> 711 </entry> 712 <entry name="aeTargetFpsRange" type="int32" visibility="public" 713 container="array" typedef="rangeInt" hwlevel="legacy"> 714 <array> 715 <size>2</size> 716 </array> 717 <description>Range over which the auto-exposure routine can 718 adjust the capture frame rate to maintain good 719 exposure.</description> 720 <units>Frames per second (FPS)</units> 721 <range>Any of the entries in android.control.aeAvailableTargetFpsRanges</range> 722 <details>Only constrains auto-exposure (AE) algorithm, not 723 manual control of android.sensor.exposureTime and 724 android.sensor.frameDuration.</details> 725 <tag id="BC" /> 726 </entry> 727 <entry name="aePrecaptureTrigger" type="byte" visibility="public" 728 enum="true" hwlevel="limited"> 729 <enum> 730 <value>IDLE 731 <notes>The trigger is idle.</notes> 732 </value> 733 <value>START 734 <notes>The precapture metering sequence will be started 735 by the camera device. 736 737 The exact effect of the precapture trigger depends on 738 the current AE mode and state.</notes> 739 </value> 740 <value>CANCEL 741 <notes>The camera device will cancel any currently active or completed 742 precapture metering sequence, the auto-exposure routine will return to its 743 initial state.</notes> 744 </value> 745 </enum> 746 <description>Whether the camera device will trigger a precapture 747 metering sequence when it processes this request.</description> 748 <details>This entry is normally set to IDLE, or is not 749 included at all in the request settings. When included and 750 set to START, the camera device will trigger the auto-exposure (AE) 751 precapture metering sequence. 752 753 When set to CANCEL, the camera device will cancel any active 754 precapture metering trigger, and return to its initial AE state. 755 If a precapture metering sequence is already completed, and the camera 756 device has implicitly locked the AE for subsequent still capture, the 757 CANCEL trigger will unlock the AE and return to its initial AE state. 758 759 The precapture sequence should be triggered before starting a 760 high-quality still capture for final metering decisions to 761 be made, and for firing pre-capture flash pulses to estimate 762 scene brightness and required final capture flash power, when 763 the flash is enabled. 764 765 Normally, this entry should be set to START for only a 766 single request, and the application should wait until the 767 sequence completes before starting a new one. 768 769 When a precapture metering sequence is finished, the camera device 770 may lock the auto-exposure routine internally to be able to accurately expose the 771 subsequent still capture image (`android.control.captureIntent == STILL_CAPTURE`). 772 For this case, the AE may not resume normal scan if no subsequent still capture is 773 submitted. To ensure that the AE routine restarts normal scan, the application should 774 submit a request with `android.control.aeLock == true`, followed by a request 775 with `android.control.aeLock == false`, if the application decides not to submit a 776 still capture request after the precapture sequence completes. Alternatively, for 777 API level 23 or newer devices, the CANCEL can be used to unlock the camera device 778 internally locked AE if the application doesn't submit a still capture request after 779 the AE precapture trigger. Note that, the CANCEL was added in API level 23, and must not 780 be used in devices that have earlier API levels. 781 782 The exact effect of auto-exposure (AE) precapture trigger 783 depends on the current AE mode and state; see 784 android.control.aeState for AE precapture state transition 785 details. 786 787 On LEGACY-level devices, the precapture trigger is not supported; 788 capturing a high-resolution JPEG image will automatically trigger a 789 precapture sequence before the high-resolution capture, including 790 potentially firing a pre-capture flash. 791 </details> 792 <tag id="BC" /> 793 </entry> 794 <entry name="afMode" type="byte" visibility="public" enum="true" 795 hwlevel="legacy"> 796 <enum> 797 <value>OFF 798 <notes>The auto-focus routine does not control the lens; 799 android.lens.focusDistance is controlled by the 800 application.</notes></value> 801 <value>AUTO 802 <notes>Basic automatic focus mode. 803 804 In this mode, the lens does not move unless 805 the autofocus trigger action is called. When that trigger 806 is activated, AF will transition to ACTIVE_SCAN, then to 807 the outcome of the scan (FOCUSED or NOT_FOCUSED). 808 809 Always supported if lens is not fixed focus. 810 811 Use android.lens.info.minimumFocusDistance to determine if lens 812 is fixed-focus. 813 814 Triggering AF_CANCEL resets the lens position to default, 815 and sets the AF state to INACTIVE.</notes></value> 816 <value>MACRO 817 <notes>Close-up focusing mode. 818 819 In this mode, the lens does not move unless the 820 autofocus trigger action is called. When that trigger is 821 activated, AF will transition to ACTIVE_SCAN, then to 822 the outcome of the scan (FOCUSED or NOT_FOCUSED). This 823 mode is optimized for focusing on objects very close to 824 the camera. 825 826 When that trigger is activated, AF will transition to 827 ACTIVE_SCAN, then to the outcome of the scan (FOCUSED or 828 NOT_FOCUSED). Triggering cancel AF resets the lens 829 position to default, and sets the AF state to 830 INACTIVE.</notes></value> 831 <value>CONTINUOUS_VIDEO 832 <notes>In this mode, the AF algorithm modifies the lens 833 position continually to attempt to provide a 834 constantly-in-focus image stream. 835 836 The focusing behavior should be suitable for good quality 837 video recording; typically this means slower focus 838 movement and no overshoots. When the AF trigger is not 839 involved, the AF algorithm should start in INACTIVE state, 840 and then transition into PASSIVE_SCAN and PASSIVE_FOCUSED 841 states as appropriate. When the AF trigger is activated, 842 the algorithm should immediately transition into 843 AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the 844 lens position until a cancel AF trigger is received. 845 846 Once cancel is received, the algorithm should transition 847 back to INACTIVE and resume passive scan. Note that this 848 behavior is not identical to CONTINUOUS_PICTURE, since an 849 ongoing PASSIVE_SCAN must immediately be 850 canceled.</notes></value> 851 <value>CONTINUOUS_PICTURE 852 <notes>In this mode, the AF algorithm modifies the lens 853 position continually to attempt to provide a 854 constantly-in-focus image stream. 855 856 The focusing behavior should be suitable for still image 857 capture; typically this means focusing as fast as 858 possible. When the AF trigger is not involved, the AF 859 algorithm should start in INACTIVE state, and then 860 transition into PASSIVE_SCAN and PASSIVE_FOCUSED states as 861 appropriate as it attempts to maintain focus. When the AF 862 trigger is activated, the algorithm should finish its 863 PASSIVE_SCAN if active, and then transition into 864 AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the 865 lens position until a cancel AF trigger is received. 866 867 When the AF cancel trigger is activated, the algorithm 868 should transition back to INACTIVE and then act as if it 869 has just been started.</notes></value> 870 <value>EDOF 871 <notes>Extended depth of field (digital focus) mode. 872 873 The camera device will produce images with an extended 874 depth of field automatically; no special focusing 875 operations need to be done before taking a picture. 876 877 AF triggers are ignored, and the AF state will always be 878 INACTIVE.</notes></value> 879 </enum> 880 <description>Whether auto-focus (AF) is currently enabled, and what 881 mode it is set to.</description> 882 <range>android.control.afAvailableModes</range> 883 <details>Only effective if android.control.mode = AUTO and the lens is not fixed focus 884 (i.e. `android.lens.info.minimumFocusDistance > 0`). Also note that 885 when android.control.aeMode is OFF, the behavior of AF is device 886 dependent. It is recommended to lock AF by using android.control.afTrigger before 887 setting android.control.aeMode to OFF, or set AF mode to OFF when AE is OFF. 888 889 If the lens is controlled by the camera device auto-focus algorithm, 890 the camera device will report the current AF status in android.control.afState 891 in result metadata.</details> 892 <hal_details> 893 When afMode is AUTO or MACRO, the lens must not move until an AF trigger is sent in a 894 request (android.control.afTrigger `==` START). After an AF trigger, the afState will end 895 up with either FOCUSED_LOCKED or NOT_FOCUSED_LOCKED state (see 896 android.control.afState for detailed state transitions), which indicates that the lens is 897 locked and will not move. If camera movement (e.g. tilting camera) causes the lens to move 898 after the lens is locked, the HAL must compensate this movement appropriately such that 899 the same focal plane remains in focus. 900 901 When afMode is one of the continuous auto focus modes, the HAL is free to start a AF 902 scan whenever it's not locked. When the lens is locked after an AF trigger 903 (see android.control.afState for detailed state transitions), the HAL should maintain the 904 same lock behavior as above. 905 906 When afMode is OFF, the application controls focus manually. The accuracy of the 907 focus distance control depends on the android.lens.info.focusDistanceCalibration. 908 However, the lens must not move regardless of the camera movement for any focus distance 909 manual control. 910 911 To put this in concrete terms, if the camera has lens elements which may move based on 912 camera orientation or motion (e.g. due to gravity), then the HAL must drive the lens to 913 remain in a fixed position invariant to the camera's orientation or motion, for example, 914 by using accelerometer measurements in the lens control logic. This is a typical issue 915 that will arise on camera modules with open-loop VCMs. 916 </hal_details> 917 <tag id="BC" /> 918 </entry> 919 <entry name="afRegions" type="int32" visibility="public" 920 optional="true" container="array" typedef="meteringRectangle"> 921 <array> 922 <size>5</size> 923 <size>area_count</size> 924 </array> 925 <description>List of metering areas to use for auto-focus.</description> 926 <units>Pixel coordinates within android.sensor.info.activeArraySize</units> 927 <range>Coordinates must be between `[(0,0), (width, height))` of 928 android.sensor.info.activeArraySize</range> 929 <details> 930 Not available if android.control.maxRegionsAf is 0. 931 Otherwise will always be present. 932 933 The maximum number of focus areas supported by the device is determined by the value 934 of android.control.maxRegionsAf. 935 936 The coordinate system is based on the active pixel array, 937 with (0,0) being the top-left pixel in the active pixel array, and 938 (android.sensor.info.activeArraySize.width - 1, 939 android.sensor.info.activeArraySize.height - 1) being the 940 bottom-right pixel in the active pixel array. 941 942 The weight must be within `[0, 1000]`, and represents a weight 943 for every pixel in the area. This means that a large metering area 944 with the same weight as a smaller area will have more effect in 945 the metering result. Metering areas can partially overlap and the 946 camera device will add the weights in the overlap region. 947 948 The weights are relative to weights of other metering regions, so if only one region 949 is used, all non-zero weights will have the same effect. A region with 0 weight is 950 ignored. 951 952 If all regions have 0 weight, then no specific metering area needs to be used by the 953 camera device. 954 955 If the metering region is outside the used android.scaler.cropRegion returned in 956 capture result metadata, the camera device will ignore the sections outside the crop 957 region and output only the intersection rectangle as the metering region in the result 958 metadata. If the region is entirely outside the crop region, it will be ignored and 959 not reported in the result metadata. 960 </details> 961 <hal_details> 962 The HAL level representation of MeteringRectangle[] is a 963 int[5 * area_count]. 964 Every five elements represent a metering region of 965 (xmin, ymin, xmax, ymax, weight). 966 The rectangle is defined to be inclusive on xmin and ymin, but 967 exclusive on xmax and ymax. 968 </hal_details> 969 <tag id="BC" /> 970 </entry> 971 <entry name="afTrigger" type="byte" visibility="public" enum="true" 972 hwlevel="legacy"> 973 <enum> 974 <value>IDLE 975 <notes>The trigger is idle.</notes> 976 </value> 977 <value>START 978 <notes>Autofocus will trigger now.</notes> 979 </value> 980 <value>CANCEL 981 <notes>Autofocus will return to its initial 982 state, and cancel any currently active trigger.</notes> 983 </value> 984 </enum> 985 <description> 986 Whether the camera device will trigger autofocus for this request. 987 </description> 988 <details>This entry is normally set to IDLE, or is not 989 included at all in the request settings. 990 991 When included and set to START, the camera device will trigger the 992 autofocus algorithm. If autofocus is disabled, this trigger has no effect. 993 994 When set to CANCEL, the camera device will cancel any active trigger, 995 and return to its initial AF state. 996 997 Generally, applications should set this entry to START or CANCEL for only a 998 single capture, and then return it to IDLE (or not set at all). Specifying 999 START for multiple captures in a row means restarting the AF operation over 1000 and over again. 1001 1002 See android.control.afState for what the trigger means for each AF mode. 1003 </details> 1004 <tag id="BC" /> 1005 </entry> 1006 <entry name="awbLock" type="byte" visibility="public" enum="true" 1007 typedef="boolean" hwlevel="legacy"> 1008 <enum> 1009 <value>OFF 1010 <notes>Auto-white balance lock is disabled; the AWB 1011 algorithm is free to update its parameters if in AUTO 1012 mode.</notes></value> 1013 <value>ON 1014 <notes>Auto-white balance lock is enabled; the AWB 1015 algorithm will not update its parameters while the lock 1016 is active.</notes></value> 1017 </enum> 1018 <description>Whether auto-white balance (AWB) is currently locked to its 1019 latest calculated values.</description> 1020 <details> 1021 When set to `true` (ON), the AWB algorithm is locked to its latest parameters, 1022 and will not change color balance settings until the lock is set to `false` (OFF). 1023 1024 Since the camera device has a pipeline of in-flight requests, the settings that 1025 get locked do not necessarily correspond to the settings that were present in the 1026 latest capture result received from the camera device, since additional captures 1027 and AWB updates may have occurred even before the result was sent out. If an 1028 application is switching between automatic and manual control and wishes to eliminate 1029 any flicker during the switch, the following procedure is recommended: 1030 1031 1. Starting in auto-AWB mode: 1032 2. Lock AWB 1033 3. Wait for the first result to be output that has the AWB locked 1034 4. Copy AWB settings from that result into a request, set the request to manual AWB 1035 5. Submit the capture request, proceed to run manual AWB as desired. 1036 1037 Note that AWB lock is only meaningful when 1038 android.control.awbMode is in the AUTO mode; in other modes, 1039 AWB is already fixed to a specific setting. 1040 1041 Some LEGACY devices may not support ON; the value is then overridden to OFF. 1042 </details> 1043 <tag id="BC" /> 1044 </entry> 1045 <entry name="awbMode" type="byte" visibility="public" enum="true" 1046 hwlevel="legacy"> 1047 <enum> 1048 <value>OFF 1049 <notes> 1050 The camera device's auto-white balance routine is disabled. 1051 1052 The application-selected color transform matrix 1053 (android.colorCorrection.transform) and gains 1054 (android.colorCorrection.gains) are used by the camera 1055 device for manual white balance control. 1056 </notes> 1057 </value> 1058 <value>AUTO 1059 <notes> 1060 The camera device's auto-white balance routine is active. 1061 1062 The application's values for android.colorCorrection.transform 1063 and android.colorCorrection.gains are ignored. 1064 For devices that support the MANUAL_POST_PROCESSING capability, the 1065 values used by the camera device for the transform and gains 1066 will be available in the capture result for this request. 1067 </notes> 1068 </value> 1069 <value>INCANDESCENT 1070 <notes> 1071 The camera device's auto-white balance routine is disabled; 1072 the camera device uses incandescent light as the assumed scene 1073 illumination for white balance. 1074 1075 While the exact white balance transforms are up to the 1076 camera device, they will approximately match the CIE 1077 standard illuminant A. 1078 1079 The application's values for android.colorCorrection.transform 1080 and android.colorCorrection.gains are ignored. 1081 For devices that support the MANUAL_POST_PROCESSING capability, the 1082 values used by the camera device for the transform and gains 1083 will be available in the capture result for this request. 1084 </notes> 1085 </value> 1086 <value>FLUORESCENT 1087 <notes> 1088 The camera device's auto-white balance routine is disabled; 1089 the camera device uses fluorescent light as the assumed scene 1090 illumination for white balance. 1091 1092 While the exact white balance transforms are up to the 1093 camera device, they will approximately match the CIE 1094 standard illuminant F2. 1095 1096 The application's values for android.colorCorrection.transform 1097 and android.colorCorrection.gains are ignored. 1098 For devices that support the MANUAL_POST_PROCESSING capability, the 1099 values used by the camera device for the transform and gains 1100 will be available in the capture result for this request. 1101 </notes> 1102 </value> 1103 <value>WARM_FLUORESCENT 1104 <notes> 1105 The camera device's auto-white balance routine is disabled; 1106 the camera device uses warm fluorescent light as the assumed scene 1107 illumination for white balance. 1108 1109 While the exact white balance transforms are up to the 1110 camera device, they will approximately match the CIE 1111 standard illuminant F4. 1112 1113 The application's values for android.colorCorrection.transform 1114 and android.colorCorrection.gains are ignored. 1115 For devices that support the MANUAL_POST_PROCESSING capability, the 1116 values used by the camera device for the transform and gains 1117 will be available in the capture result for this request. 1118 </notes> 1119 </value> 1120 <value>DAYLIGHT 1121 <notes> 1122 The camera device's auto-white balance routine is disabled; 1123 the camera device uses daylight light as the assumed scene 1124 illumination for white balance. 1125 1126 While the exact white balance transforms are up to the 1127 camera device, they will approximately match the CIE 1128 standard illuminant D65. 1129 1130 The application's values for android.colorCorrection.transform 1131 and android.colorCorrection.gains are ignored. 1132 For devices that support the MANUAL_POST_PROCESSING capability, the 1133 values used by the camera device for the transform and gains 1134 will be available in the capture result for this request. 1135 </notes> 1136 </value> 1137 <value>CLOUDY_DAYLIGHT 1138 <notes> 1139 The camera device's auto-white balance routine is disabled; 1140 the camera device uses cloudy daylight light as the assumed scene 1141 illumination for white balance. 1142 1143 The application's values for android.colorCorrection.transform 1144 and android.colorCorrection.gains are ignored. 1145 For devices that support the MANUAL_POST_PROCESSING capability, the 1146 values used by the camera device for the transform and gains 1147 will be available in the capture result for this request. 1148 </notes> 1149 </value> 1150 <value>TWILIGHT 1151 <notes> 1152 The camera device's auto-white balance routine is disabled; 1153 the camera device uses twilight light as the assumed scene 1154 illumination for white balance. 1155 1156 The application's values for android.colorCorrection.transform 1157 and android.colorCorrection.gains are ignored. 1158 For devices that support the MANUAL_POST_PROCESSING capability, the 1159 values used by the camera device for the transform and gains 1160 will be available in the capture result for this request. 1161 </notes> 1162 </value> 1163 <value>SHADE 1164 <notes> 1165 The camera device's auto-white balance routine is disabled; 1166 the camera device uses shade light as the assumed scene 1167 illumination for white balance. 1168 1169 The application's values for android.colorCorrection.transform 1170 and android.colorCorrection.gains are ignored. 1171 For devices that support the MANUAL_POST_PROCESSING capability, the 1172 values used by the camera device for the transform and gains 1173 will be available in the capture result for this request. 1174 </notes> 1175 </value> 1176 </enum> 1177 <description>Whether auto-white balance (AWB) is currently setting the color 1178 transform fields, and what its illumination target 1179 is.</description> 1180 <range>android.control.awbAvailableModes</range> 1181 <details> 1182 This control is only effective if android.control.mode is AUTO. 1183 1184 When set to the ON mode, the camera device's auto-white balance 1185 routine is enabled, overriding the application's selected 1186 android.colorCorrection.transform, android.colorCorrection.gains and 1187 android.colorCorrection.mode. Note that when android.control.aeMode 1188 is OFF, the behavior of AWB is device dependent. It is recommened to 1189 also set AWB mode to OFF or lock AWB by using android.control.awbLock before 1190 setting AE mode to OFF. 1191 1192 When set to the OFF mode, the camera device's auto-white balance 1193 routine is disabled. The application manually controls the white 1194 balance by android.colorCorrection.transform, android.colorCorrection.gains 1195 and android.colorCorrection.mode. 1196 1197 When set to any other modes, the camera device's auto-white 1198 balance routine is disabled. The camera device uses each 1199 particular illumination target for white balance 1200 adjustment. The application's values for 1201 android.colorCorrection.transform, 1202 android.colorCorrection.gains and 1203 android.colorCorrection.mode are ignored. 1204 </details> 1205 <tag id="BC" /> 1206 </entry> 1207 <entry name="awbRegions" type="int32" visibility="public" 1208 optional="true" container="array" typedef="meteringRectangle"> 1209 <array> 1210 <size>5</size> 1211 <size>area_count</size> 1212 </array> 1213 <description>List of metering areas to use for auto-white-balance illuminant 1214 estimation.</description> 1215 <units>Pixel coordinates within android.sensor.info.activeArraySize</units> 1216 <range>Coordinates must be between `[(0,0), (width, height))` of 1217 android.sensor.info.activeArraySize</range> 1218 <details> 1219 Not available if android.control.maxRegionsAwb is 0. 1220 Otherwise will always be present. 1221 1222 The maximum number of regions supported by the device is determined by the value 1223 of android.control.maxRegionsAwb. 1224 1225 The coordinate system is based on the active pixel array, 1226 with (0,0) being the top-left pixel in the active pixel array, and 1227 (android.sensor.info.activeArraySize.width - 1, 1228 android.sensor.info.activeArraySize.height - 1) being the 1229 bottom-right pixel in the active pixel array. 1230 1231 The weight must range from 0 to 1000, and represents a weight 1232 for every pixel in the area. This means that a large metering area 1233 with the same weight as a smaller area will have more effect in 1234 the metering result. Metering areas can partially overlap and the 1235 camera device will add the weights in the overlap region. 1236 1237 The weights are relative to weights of other white balance metering regions, so if 1238 only one region is used, all non-zero weights will have the same effect. A region with 1239 0 weight is ignored. 1240 1241 If all regions have 0 weight, then no specific metering area needs to be used by the 1242 camera device. 1243 1244 If the metering region is outside the used android.scaler.cropRegion returned in 1245 capture result metadata, the camera device will ignore the sections outside the crop 1246 region and output only the intersection rectangle as the metering region in the result 1247 metadata. If the region is entirely outside the crop region, it will be ignored and 1248 not reported in the result metadata. 1249 </details> 1250 <hal_details> 1251 The HAL level representation of MeteringRectangle[] is a 1252 int[5 * area_count]. 1253 Every five elements represent a metering region of 1254 (xmin, ymin, xmax, ymax, weight). 1255 The rectangle is defined to be inclusive on xmin and ymin, but 1256 exclusive on xmax and ymax. 1257 </hal_details> 1258 <tag id="BC" /> 1259 </entry> 1260 <entry name="captureIntent" type="byte" visibility="public" enum="true" 1261 hwlevel="legacy"> 1262 <enum> 1263 <value>CUSTOM 1264 <notes>The goal of this request doesn't fall into the other 1265 categories. The camera device will default to preview-like 1266 behavior.</notes></value> 1267 <value>PREVIEW 1268 <notes>This request is for a preview-like use case. 1269 1270 The precapture trigger may be used to start off a metering 1271 w/flash sequence. 1272 </notes></value> 1273 <value>STILL_CAPTURE 1274 <notes>This request is for a still capture-type 1275 use case. 1276 1277 If the flash unit is under automatic control, it may fire as needed. 1278 </notes></value> 1279 <value>VIDEO_RECORD 1280 <notes>This request is for a video recording 1281 use case.</notes></value> 1282 <value>VIDEO_SNAPSHOT 1283 <notes>This request is for a video snapshot (still 1284 image while recording video) use case. 1285 1286 The camera device should take the highest-quality image 1287 possible (given the other settings) without disrupting the 1288 frame rate of video recording. </notes></value> 1289 <value>ZERO_SHUTTER_LAG 1290 <notes>This request is for a ZSL usecase; the 1291 application will stream full-resolution images and 1292 reprocess one or several later for a final 1293 capture. 1294 </notes></value> 1295 <value>MANUAL 1296 <notes>This request is for manual capture use case where 1297 the applications want to directly control the capture parameters. 1298 1299 For example, the application may wish to manually control 1300 android.sensor.exposureTime, android.sensor.sensitivity, etc. 1301 </notes></value> 1302 </enum> 1303 <description>Information to the camera device 3A (auto-exposure, 1304 auto-focus, auto-white balance) routines about the purpose 1305 of this capture, to help the camera device to decide optimal 3A 1306 strategy.</description> 1307 <details>This control (except for MANUAL) is only effective if 1308 `android.control.mode != OFF` and any 3A routine is active. 1309 1310 ZERO_SHUTTER_LAG will be supported if android.request.availableCapabilities 1311 contains PRIVATE_REPROCESSING or YUV_REPROCESSING. MANUAL will be supported if 1312 android.request.availableCapabilities contains MANUAL_SENSOR. Other intent values are 1313 always supported. 1314 </details> 1315 <tag id="BC" /> 1316 </entry> 1317 <entry name="effectMode" type="byte" visibility="public" enum="true" 1318 hwlevel="legacy"> 1319 <enum> 1320 <value>OFF 1321 <notes> 1322 No color effect will be applied. 1323 </notes> 1324 </value> 1325 <value optional="true">MONO 1326 <notes> 1327 A "monocolor" effect where the image is mapped into 1328 a single color. 1329 1330 This will typically be grayscale. 1331 </notes> 1332 </value> 1333 <value optional="true">NEGATIVE 1334 <notes> 1335 A "photo-negative" effect where the image's colors 1336 are inverted. 1337 </notes> 1338 </value> 1339 <value optional="true">SOLARIZE 1340 <notes> 1341 A "solarisation" effect (Sabattier effect) where the 1342 image is wholly or partially reversed in 1343 tone. 1344 </notes> 1345 </value> 1346 <value optional="true">SEPIA 1347 <notes> 1348 A "sepia" effect where the image is mapped into warm 1349 gray, red, and brown tones. 1350 </notes> 1351 </value> 1352 <value optional="true">POSTERIZE 1353 <notes> 1354 A "posterization" effect where the image uses 1355 discrete regions of tone rather than a continuous 1356 gradient of tones. 1357 </notes> 1358 </value> 1359 <value optional="true">WHITEBOARD 1360 <notes> 1361 A "whiteboard" effect where the image is typically displayed 1362 as regions of white, with black or grey details. 1363 </notes> 1364 </value> 1365 <value optional="true">BLACKBOARD 1366 <notes> 1367 A "blackboard" effect where the image is typically displayed 1368 as regions of black, with white or grey details. 1369 </notes> 1370 </value> 1371 <value optional="true">AQUA 1372 <notes> 1373 An "aqua" effect where a blue hue is added to the image. 1374 </notes> 1375 </value> 1376 </enum> 1377 <description>A special color effect to apply.</description> 1378 <range>android.control.availableEffects</range> 1379 <details> 1380 When this mode is set, a color effect will be applied 1381 to images produced by the camera device. The interpretation 1382 and implementation of these color effects is left to the 1383 implementor of the camera device, and should not be 1384 depended on to be consistent (or present) across all 1385 devices. 1386 </details> 1387 <tag id="BC" /> 1388 </entry> 1389 <entry name="mode" type="byte" visibility="public" enum="true" 1390 hwlevel="legacy"> 1391 <enum> 1392 <value>OFF 1393 <notes>Full application control of pipeline. 1394 1395 All control by the device's metering and focusing (3A) 1396 routines is disabled, and no other settings in 1397 android.control.* have any effect, except that 1398 android.control.captureIntent may be used by the camera 1399 device to select post-processing values for processing 1400 blocks that do not allow for manual control, or are not 1401 exposed by the camera API. 1402 1403 However, the camera device's 3A routines may continue to 1404 collect statistics and update their internal state so that 1405 when control is switched to AUTO mode, good control values 1406 can be immediately applied. 1407 </notes></value> 1408 <value>AUTO 1409 <notes>Use settings for each individual 3A routine. 1410 1411 Manual control of capture parameters is disabled. All 1412 controls in android.control.* besides sceneMode take 1413 effect.</notes></value> 1414 <value optional="true">USE_SCENE_MODE 1415 <notes>Use a specific scene mode. 1416 1417 Enabling this disables control.aeMode, control.awbMode and 1418 control.afMode controls; the camera device will ignore 1419 those settings while USE_SCENE_MODE is active (except for 1420 FACE_PRIORITY scene mode). Other control entries are still 1421 active. This setting can only be used if scene mode is 1422 supported (i.e. android.control.availableSceneModes 1423 contain some modes other than DISABLED).</notes></value> 1424 <value optional="true">OFF_KEEP_STATE 1425 <notes>Same as OFF mode, except that this capture will not be 1426 used by camera device background auto-exposure, auto-white balance and 1427 auto-focus algorithms (3A) to update their statistics. 1428 1429 Specifically, the 3A routines are locked to the last 1430 values set from a request with AUTO, OFF, or 1431 USE_SCENE_MODE, and any statistics or state updates 1432 collected from manual captures with OFF_KEEP_STATE will be 1433 discarded by the camera device. 1434 </notes></value> 1435 </enum> 1436 <description>Overall mode of 3A (auto-exposure, auto-white-balance, auto-focus) control 1437 routines.</description> 1438 <range>android.control.availableModes</range> 1439 <details> 1440 This is a top-level 3A control switch. When set to OFF, all 3A control 1441 by the camera device is disabled. The application must set the fields for 1442 capture parameters itself. 1443 1444 When set to AUTO, the individual algorithm controls in 1445 android.control.* are in effect, such as android.control.afMode. 1446 1447 When set to USE_SCENE_MODE, the individual controls in 1448 android.control.* are mostly disabled, and the camera device implements 1449 one of the scene mode settings (such as ACTION, SUNSET, or PARTY) 1450 as it wishes. The camera device scene mode 3A settings are provided by 1451 {@link android.hardware.camera2.CaptureResult capture results}. 1452 1453 When set to OFF_KEEP_STATE, it is similar to OFF mode, the only difference 1454 is that this frame will not be used by camera device background 3A statistics 1455 update, as if this frame is never captured. This mode can be used in the scenario 1456 where the application doesn't want a 3A manual control capture to affect 1457 the subsequent auto 3A capture results. 1458 </details> 1459 <tag id="BC" /> 1460 </entry> 1461 <entry name="sceneMode" type="byte" visibility="public" enum="true" 1462 hwlevel="legacy"> 1463 <enum> 1464 <value id="0">DISABLED 1465 <notes> 1466 Indicates that no scene modes are set for a given capture request. 1467 </notes> 1468 </value> 1469 <value>FACE_PRIORITY 1470 <notes>If face detection support exists, use face 1471 detection data for auto-focus, auto-white balance, and 1472 auto-exposure routines. 1473 1474 If face detection statistics are disabled 1475 (i.e. android.statistics.faceDetectMode is set to OFF), 1476 this should still operate correctly (but will not return 1477 face detection statistics to the framework). 1478 1479 Unlike the other scene modes, android.control.aeMode, 1480 android.control.awbMode, and android.control.afMode 1481 remain active when FACE_PRIORITY is set. 1482 </notes> 1483 </value> 1484 <value optional="true">ACTION 1485 <notes> 1486 Optimized for photos of quickly moving objects. 1487 1488 Similar to SPORTS. 1489 </notes> 1490 </value> 1491 <value optional="true">PORTRAIT 1492 <notes> 1493 Optimized for still photos of people. 1494 </notes> 1495 </value> 1496 <value optional="true">LANDSCAPE 1497 <notes> 1498 Optimized for photos of distant macroscopic objects. 1499 </notes> 1500 </value> 1501 <value optional="true">NIGHT 1502 <notes> 1503 Optimized for low-light settings. 1504 </notes> 1505 </value> 1506 <value optional="true">NIGHT_PORTRAIT 1507 <notes> 1508 Optimized for still photos of people in low-light 1509 settings. 1510 </notes> 1511 </value> 1512 <value optional="true">THEATRE 1513 <notes> 1514 Optimized for dim, indoor settings where flash must 1515 remain off. 1516 </notes> 1517 </value> 1518 <value optional="true">BEACH 1519 <notes> 1520 Optimized for bright, outdoor beach settings. 1521 </notes> 1522 </value> 1523 <value optional="true">SNOW 1524 <notes> 1525 Optimized for bright, outdoor settings containing snow. 1526 </notes> 1527 </value> 1528 <value optional="true">SUNSET 1529 <notes> 1530 Optimized for scenes of the setting sun. 1531 </notes> 1532 </value> 1533 <value optional="true">STEADYPHOTO 1534 <notes> 1535 Optimized to avoid blurry photos due to small amounts of 1536 device motion (for example: due to hand shake). 1537 </notes> 1538 </value> 1539 <value optional="true">FIREWORKS 1540 <notes> 1541 Optimized for nighttime photos of fireworks. 1542 </notes> 1543 </value> 1544 <value optional="true">SPORTS 1545 <notes> 1546 Optimized for photos of quickly moving people. 1547 1548 Similar to ACTION. 1549 </notes> 1550 </value> 1551 <value optional="true">PARTY 1552 <notes> 1553 Optimized for dim, indoor settings with multiple moving 1554 people. 1555 </notes> 1556 </value> 1557 <value optional="true">CANDLELIGHT 1558 <notes> 1559 Optimized for dim settings where the main light source 1560 is a flame. 1561 </notes> 1562 </value> 1563 <value optional="true">BARCODE 1564 <notes> 1565 Optimized for accurately capturing a photo of barcode 1566 for use by camera applications that wish to read the 1567 barcode value. 1568 </notes> 1569 </value> 1570 <value optional="true">HIGH_SPEED_VIDEO 1571 <notes> 1572 Optimized for high speed video recording (frame rate >=60fps) use case. 1573 1574 The supported high speed video sizes and fps ranges are specified in 1575 android.control.availableHighSpeedVideoConfigurations. To get desired 1576 output frame rates, the application is only allowed to select video size 1577 and fps range combinations listed in this static metadata. The fps range 1578 can be control via android.control.aeTargetFpsRange. 1579 1580 In this mode, the camera device will override aeMode, awbMode, and afMode to 1581 ON, ON, and CONTINUOUS_VIDEO, respectively. All post-processing block mode 1582 controls will be overridden to be FAST. Therefore, no manual control of capture 1583 and post-processing parameters is possible. All other controls operate the 1584 same as when android.control.mode == AUTO. This means that all other 1585 android.control.* fields continue to work, such as 1586 1587 * android.control.aeTargetFpsRange 1588 * android.control.aeExposureCompensation 1589 * android.control.aeLock 1590 * android.control.awbLock 1591 * android.control.effectMode 1592 * android.control.aeRegions 1593 * android.control.afRegions 1594 * android.control.awbRegions 1595 * android.control.afTrigger 1596 * android.control.aePrecaptureTrigger 1597 1598 Outside of android.control.*, the following controls will work: 1599 1600 * android.flash.mode (automatic flash for still capture will not work since aeMode is ON) 1601 * android.lens.opticalStabilizationMode (if it is supported) 1602 * android.scaler.cropRegion 1603 * android.statistics.faceDetectMode 1604 1605 For high speed recording use case, the actual maximum supported frame rate may 1606 be lower than what camera can output, depending on the destination Surfaces for 1607 the image data. For example, if the destination surface is from video encoder, 1608 the application need check if the video encoder is capable of supporting the 1609 high frame rate for a given video size, or it will end up with lower recording 1610 frame rate. If the destination surface is from preview window, the preview frame 1611 rate will be bounded by the screen refresh rate. 1612 1613 The camera device will only support up to 2 output high speed streams 1614 (processed non-stalling format defined in android.request.maxNumOutputStreams) 1615 in this mode. This control will be effective only if all of below conditions are true: 1616 1617 * The application created no more than maxNumHighSpeedStreams processed non-stalling 1618 format output streams, where maxNumHighSpeedStreams is calculated as 1619 min(2, android.request.maxNumOutputStreams[Processed (but not-stalling)]). 1620 * The stream sizes are selected from the sizes reported by 1621 android.control.availableHighSpeedVideoConfigurations. 1622 * No processed non-stalling or raw streams are configured. 1623 1624 When above conditions are NOT satistied, the controls of this mode and 1625 android.control.aeTargetFpsRange will be ignored by the camera device, 1626 the camera device will fall back to android.control.mode `==` AUTO, 1627 and the returned capture result metadata will give the fps range choosen 1628 by the camera device. 1629 1630 Switching into or out of this mode may trigger some camera ISP/sensor 1631 reconfigurations, which may introduce extra latency. It is recommended that 1632 the application avoids unnecessary scene mode switch as much as possible. 1633 </notes> 1634 </value> 1635 <value optional="true">HDR 1636 <notes> 1637 Turn on a device-specific high dynamic range (HDR) mode. 1638 1639 In this scene mode, the camera device captures images 1640 that keep a larger range of scene illumination levels 1641 visible in the final image. For example, when taking a 1642 picture of a object in front of a bright window, both 1643 the object and the scene through the window may be 1644 visible when using HDR mode, while in normal AUTO mode, 1645 one or the other may be poorly exposed. As a tradeoff, 1646 HDR mode generally takes much longer to capture a single 1647 image, has no user control, and may have other artifacts 1648 depending on the HDR method used. 1649 1650 Therefore, HDR captures operate at a much slower rate 1651 than regular captures. 1652 1653 In this mode, on LIMITED or FULL devices, when a request 1654 is made with a android.control.captureIntent of 1655 STILL_CAPTURE, the camera device will capture an image 1656 using a high dynamic range capture technique. On LEGACY 1657 devices, captures that target a JPEG-format output will 1658 be captured with HDR, and the capture intent is not 1659 relevant. 1660 1661 The HDR capture may involve the device capturing a burst 1662 of images internally and combining them into one, or it 1663 may involve the device using specialized high dynamic 1664 range capture hardware. In all cases, a single image is 1665 produced in response to a capture request submitted 1666 while in HDR mode. 1667 1668 Since substantial post-processing is generally needed to 1669 produce an HDR image, only YUV and JPEG outputs are 1670 supported for LIMITED/FULL device HDR captures, and only 1671 JPEG outputs are supported for LEGACY HDR 1672 captures. Using a RAW output for HDR capture is not 1673 supported. 1674 </notes> 1675 </value> 1676 </enum> 1677 <description> 1678 Control for which scene mode is currently active. 1679 </description> 1680 <range>android.control.availableSceneModes</range> 1681 <details> 1682 Scene modes are custom camera modes optimized for a certain set of conditions and 1683 capture settings. 1684 1685 This is the mode that that is active when 1686 `android.control.mode == USE_SCENE_MODE`. Aside from FACE_PRIORITY, 1687 these modes will disable android.control.aeMode, 1688 android.control.awbMode, and android.control.afMode while in use. 1689 1690 The interpretation and implementation of these scene modes is left 1691 to the implementor of the camera device. Their behavior will not be 1692 consistent across all devices, and any given device may only implement 1693 a subset of these modes. 1694 </details> 1695 <hal_details> 1696 HAL implementations that include scene modes are expected to provide 1697 the per-scene settings to use for android.control.aeMode, 1698 android.control.awbMode, and android.control.afMode in 1699 android.control.sceneModeOverrides. 1700 1701 For HIGH_SPEED_VIDEO mode, if it is included in android.control.availableSceneModes, 1702 the HAL must list supported video size and fps range in 1703 android.control.availableHighSpeedVideoConfigurations. For a given size, e.g. 1704 1280x720, if the HAL has two different sensor configurations for normal streaming 1705 mode and high speed streaming, when this scene mode is set/reset in a sequence of capture 1706 requests, the HAL may have to switch between different sensor modes. 1707 </hal_details> 1708 <tag id="BC" /> 1709 </entry> 1710 <entry name="videoStabilizationMode" type="byte" visibility="public" 1711 enum="true" hwlevel="legacy"> 1712 <enum> 1713 <value>OFF 1714 <notes> 1715 Video stabilization is disabled. 1716 </notes></value> 1717 <value>ON 1718 <notes> 1719 Video stabilization is enabled. 1720 </notes></value> 1721 </enum> 1722 <description>Whether video stabilization is 1723 active.</description> 1724 <details> 1725 Video stabilization automatically translates and scales images from 1726 the camera in order to stabilize motion between consecutive frames. 1727 1728 If enabled, video stabilization can modify the 1729 android.scaler.cropRegion to keep the video stream stabilized. 1730 1731 Switching between different video stabilization modes may take several 1732 frames to initialize, the camera device will report the current mode 1733 in capture result metadata. For example, When "ON" mode is requested, 1734 the video stabilization modes in the first several capture results may 1735 still be "OFF", and it will become "ON" when the initialization is 1736 done. 1737 1738 If a camera device supports both this mode and OIS 1739 (android.lens.opticalStabilizationMode), turning both modes on may 1740 produce undesirable interaction, so it is recommended not to enable 1741 both at the same time. 1742 </details> 1743 <tag id="BC" /> 1744 </entry> 1745 </controls> 1746 <static> 1747 <entry name="aeAvailableAntibandingModes" type="byte" visibility="public" 1748 type_notes="list of enums" container="array" typedef="enumList" 1749 hwlevel="legacy"> 1750 <array> 1751 <size>n</size> 1752 </array> 1753 <description> 1754 List of auto-exposure antibanding modes for android.control.aeAntibandingMode that are 1755 supported by this camera device. 1756 </description> 1757 <range>Any value listed in android.control.aeAntibandingMode</range> 1758 <details> 1759 Not all of the auto-exposure anti-banding modes may be 1760 supported by a given camera device. This field lists the 1761 valid anti-banding modes that the application may request 1762 for this camera device with the 1763 android.control.aeAntibandingMode control. 1764 </details> 1765 <tag id="BC" /> 1766 </entry> 1767 <entry name="aeAvailableModes" type="byte" visibility="public" 1768 type_notes="list of enums" container="array" typedef="enumList" 1769 hwlevel="legacy"> 1770 <array> 1771 <size>n</size> 1772 </array> 1773 <description> 1774 List of auto-exposure modes for android.control.aeMode that are supported by this camera 1775 device. 1776 </description> 1777 <range>Any value listed in android.control.aeMode</range> 1778 <details> 1779 Not all the auto-exposure modes may be supported by a 1780 given camera device, especially if no flash unit is 1781 available. This entry lists the valid modes for 1782 android.control.aeMode for this camera device. 1783 1784 All camera devices support ON, and all camera devices with flash 1785 units support ON_AUTO_FLASH and ON_ALWAYS_FLASH. 1786 1787 FULL mode camera devices always support OFF mode, 1788 which enables application control of camera exposure time, 1789 sensitivity, and frame duration. 1790 1791 LEGACY mode camera devices never support OFF mode. 1792 LIMITED mode devices support OFF if they support the MANUAL_SENSOR 1793 capability. 1794 </details> 1795 <tag id="BC" /> 1796 </entry> 1797 <entry name="aeAvailableTargetFpsRanges" type="int32" visibility="public" 1798 type_notes="list of pairs of frame rates" 1799 container="array" typedef="rangeInt" 1800 hwlevel="legacy"> 1801 <array> 1802 <size>2</size> 1803 <size>n</size> 1804 </array> 1805 <description>List of frame rate ranges for android.control.aeTargetFpsRange supported by 1806 this camera device.</description> 1807 <units>Frames per second (FPS)</units> 1808 <details> 1809 For devices at the LEGACY level or above: 1810 1811 * This list will always include (30, 30). 1812 * Also, for constant-framerate recording, for each normal 1813 {@link android.media.CamcorderProfile CamcorderProfile} that has 1814 {@link android.media.CamcorderProfile#quality quality} in 1815 the range [{@link android.media.CamcorderProfile#QUALITY_LOW QUALITY_LOW}, 1816 {@link android.media.CamcorderProfile#QUALITY_2160P QUALITY_2160P}], if the profile is 1817 supported by the device and has 1818 {@link android.media.CamcorderProfile#videoFrameRate videoFrameRate} `x`, this list will 1819 always include (`x`,`x`). 1820 * For preview streaming use case, this list will always include (`min`, `max`) where 1821 `min` <= 15 and `max` >= 30. 1822 1823 For devices at the LIMITED level or above: 1824 1825 * For YUV_420_888 burst capture use case, this list will always include (`min`, `max`) 1826 and (`max`, `max`) where `min` <= 15 and `max` = the maximum output frame rate of the 1827 maximum YUV_420_888 output size. 1828 </details> 1829 <tag id="BC" /> 1830 </entry> 1831 <entry name="aeCompensationRange" type="int32" visibility="public" 1832 container="array" typedef="rangeInt" 1833 hwlevel="legacy"> 1834 <array> 1835 <size>2</size> 1836 </array> 1837 <description>Maximum and minimum exposure compensation values for 1838 android.control.aeExposureCompensation, in counts of android.control.aeCompensationStep, 1839 that are supported by this camera device.</description> 1840 <range> 1841 Range [0,0] indicates that exposure compensation is not supported. 1842 1843 For LIMITED and FULL devices, range must follow below requirements if exposure 1844 compensation is supported (`range != [0, 0]`): 1845 1846 `Min.exposure compensation * android.control.aeCompensationStep <= -2 EV` 1847 1848 `Max.exposure compensation * android.control.aeCompensationStep >= 2 EV` 1849 1850 LEGACY devices may support a smaller range than this. 1851 </range> 1852 <tag id="BC" /> 1853 </entry> 1854 <entry name="aeCompensationStep" type="rational" visibility="public" 1855 hwlevel="legacy"> 1856 <description>Smallest step by which the exposure compensation 1857 can be changed.</description> 1858 <units>Exposure Value (EV)</units> 1859 <details> 1860 This is the unit for android.control.aeExposureCompensation. For example, if this key has 1861 a value of `1/2`, then a setting of `-2` for android.control.aeExposureCompensation means 1862 that the target EV offset for the auto-exposure routine is -1 EV. 1863 1864 One unit of EV compensation changes the brightness of the captured image by a factor 1865 of two. +1 EV doubles the image brightness, while -1 EV halves the image brightness. 1866 </details> 1867 <hal_details> 1868 This must be less than or equal to 1/2. 1869 </hal_details> 1870 <tag id="BC" /> 1871 </entry> 1872 <entry name="afAvailableModes" type="byte" visibility="public" 1873 type_notes="List of enums" container="array" typedef="enumList" 1874 hwlevel="legacy"> 1875 <array> 1876 <size>n</size> 1877 </array> 1878 <description> 1879 List of auto-focus (AF) modes for android.control.afMode that are 1880 supported by this camera device. 1881 </description> 1882 <range>Any value listed in android.control.afMode</range> 1883 <details> 1884 Not all the auto-focus modes may be supported by a 1885 given camera device. This entry lists the valid modes for 1886 android.control.afMode for this camera device. 1887 1888 All LIMITED and FULL mode camera devices will support OFF mode, and all 1889 camera devices with adjustable focuser units 1890 (`android.lens.info.minimumFocusDistance > 0`) will support AUTO mode. 1891 1892 LEGACY devices will support OFF mode only if they support 1893 focusing to infinity (by also setting android.lens.focusDistance to 1894 `0.0f`). 1895 </details> 1896 <tag id="BC" /> 1897 </entry> 1898 <entry name="availableEffects" type="byte" visibility="public" 1899 type_notes="List of enums (android.control.effectMode)." container="array" 1900 typedef="enumList" hwlevel="legacy"> 1901 <array> 1902 <size>n</size> 1903 </array> 1904 <description> 1905 List of color effects for android.control.effectMode that are supported by this camera 1906 device. 1907 </description> 1908 <range>Any value listed in android.control.effectMode</range> 1909 <details> 1910 This list contains the color effect modes that can be applied to 1911 images produced by the camera device. 1912 Implementations are not expected to be consistent across all devices. 1913 If no color effect modes are available for a device, this will only list 1914 OFF. 1915 1916 A color effect will only be applied if 1917 android.control.mode != OFF. OFF is always included in this list. 1918 1919 This control has no effect on the operation of other control routines such 1920 as auto-exposure, white balance, or focus. 1921 </details> 1922 <tag id="BC" /> 1923 </entry> 1924 <entry name="availableSceneModes" type="byte" visibility="public" 1925 type_notes="List of enums (android.control.sceneMode)." 1926 container="array" typedef="enumList" hwlevel="legacy"> 1927 <array> 1928 <size>n</size> 1929 </array> 1930 <description> 1931 List of scene modes for android.control.sceneMode that are supported by this camera 1932 device. 1933 </description> 1934 <range>Any value listed in android.control.sceneMode</range> 1935 <details> 1936 This list contains scene modes that can be set for the camera device. 1937 Only scene modes that have been fully implemented for the 1938 camera device may be included here. Implementations are not expected 1939 to be consistent across all devices. 1940 1941 If no scene modes are supported by the camera device, this 1942 will be set to DISABLED. Otherwise DISABLED will not be listed. 1943 1944 FACE_PRIORITY is always listed if face detection is 1945 supported (i.e.`android.statistics.info.maxFaceCount > 1946 0`). 1947 </details> 1948 <tag id="BC" /> 1949 </entry> 1950 <entry name="availableVideoStabilizationModes" type="byte" 1951 visibility="public" type_notes="List of enums." container="array" 1952 typedef="enumList" hwlevel="legacy"> 1953 <array> 1954 <size>n</size> 1955 </array> 1956 <description> 1957 List of video stabilization modes for android.control.videoStabilizationMode 1958 that are supported by this camera device. 1959 </description> 1960 <range>Any value listed in android.control.videoStabilizationMode</range> 1961 <details> 1962 OFF will always be listed. 1963 </details> 1964 <tag id="BC" /> 1965 </entry> 1966 <entry name="awbAvailableModes" type="byte" visibility="public" 1967 type_notes="List of enums" 1968 container="array" typedef="enumList" hwlevel="legacy"> 1969 <array> 1970 <size>n</size> 1971 </array> 1972 <description> 1973 List of auto-white-balance modes for android.control.awbMode that are supported by this 1974 camera device. 1975 </description> 1976 <range>Any value listed in android.control.awbMode</range> 1977 <details> 1978 Not all the auto-white-balance modes may be supported by a 1979 given camera device. This entry lists the valid modes for 1980 android.control.awbMode for this camera device. 1981 1982 All camera devices will support ON mode. 1983 1984 Camera devices that support the MANUAL_POST_PROCESSING capability will always support OFF 1985 mode, which enables application control of white balance, by using 1986 android.colorCorrection.transform and android.colorCorrection.gains 1987 (android.colorCorrection.mode must be set to TRANSFORM_MATRIX). This includes all FULL 1988 mode camera devices. 1989 </details> 1990 <tag id="BC" /> 1991 </entry> 1992 <entry name="maxRegions" type="int32" visibility="hidden" 1993 container="array" hwlevel="legacy"> 1994 <array> 1995 <size>3</size> 1996 </array> 1997 <description> 1998 List of the maximum number of regions that can be used for metering in 1999 auto-exposure (AE), auto-white balance (AWB), and auto-focus (AF); 2000 this corresponds to the the maximum number of elements in 2001 android.control.aeRegions, android.control.awbRegions, 2002 and android.control.afRegions. 2003 </description> 2004 <range> 2005 Value must be &gt;= 0 for each element. For full-capability devices 2006 this value must be &gt;= 1 for AE and AF. The order of the elements is: 2007 `(AE, AWB, AF)`.</range> 2008 <tag id="BC" /> 2009 </entry> 2010 <entry name="maxRegionsAe" type="int32" visibility="public" 2011 synthetic="true" hwlevel="legacy"> 2012 <description> 2013 The maximum number of metering regions that can be used by the auto-exposure (AE) 2014 routine. 2015 </description> 2016 <range>Value will be &gt;= 0. For FULL-capability devices, this 2017 value will be &gt;= 1. 2018 </range> 2019 <details> 2020 This corresponds to the the maximum allowed number of elements in 2021 android.control.aeRegions. 2022 </details> 2023 <hal_details>This entry is private to the framework. Fill in 2024 maxRegions to have this entry be automatically populated. 2025 </hal_details> 2026 </entry> 2027 <entry name="maxRegionsAwb" type="int32" visibility="public" 2028 synthetic="true" hwlevel="legacy"> 2029 <description> 2030 The maximum number of metering regions that can be used by the auto-white balance (AWB) 2031 routine. 2032 </description> 2033 <range>Value will be &gt;= 0. 2034 </range> 2035 <details> 2036 This corresponds to the the maximum allowed number of elements in 2037 android.control.awbRegions. 2038 </details> 2039 <hal_details>This entry is private to the framework. Fill in 2040 maxRegions to have this entry be automatically populated. 2041 </hal_details> 2042 </entry> 2043 <entry name="maxRegionsAf" type="int32" visibility="public" 2044 synthetic="true" hwlevel="legacy"> 2045 <description> 2046 The maximum number of metering regions that can be used by the auto-focus (AF) routine. 2047 </description> 2048 <range>Value will be &gt;= 0. For FULL-capability devices, this 2049 value will be &gt;= 1. 2050 </range> 2051 <details> 2052 This corresponds to the the maximum allowed number of elements in 2053 android.control.afRegions. 2054 </details> 2055 <hal_details>This entry is private to the framework. Fill in 2056 maxRegions to have this entry be automatically populated. 2057 </hal_details> 2058 </entry> 2059 <entry name="sceneModeOverrides" type="byte" visibility="system" 2060 container="array" hwlevel="limited"> 2061 <array> 2062 <size>3</size> 2063 <size>length(availableSceneModes)</size> 2064 </array> 2065 <description> 2066 Ordered list of auto-exposure, auto-white balance, and auto-focus 2067 settings to use with each available scene mode. 2068 </description> 2069 <range> 2070 For each available scene mode, the list must contain three 2071 entries containing the android.control.aeMode, 2072 android.control.awbMode, and android.control.afMode values used 2073 by the camera device. The entry order is `(aeMode, awbMode, afMode)` 2074 where aeMode has the lowest index position. 2075 </range> 2076 <details> 2077 When a scene mode is enabled, the camera device is expected 2078 to override android.control.aeMode, android.control.awbMode, 2079 and android.control.afMode with its preferred settings for 2080 that scene mode. 2081 2082 The order of this list matches that of availableSceneModes, 2083 with 3 entries for each mode. The overrides listed 2084 for FACE_PRIORITY are ignored, since for that 2085 mode the application-set android.control.aeMode, 2086 android.control.awbMode, and android.control.afMode values are 2087 used instead, matching the behavior when android.control.mode 2088 is set to AUTO. It is recommended that the FACE_PRIORITY 2089 overrides should be set to 0. 2090 2091 For example, if availableSceneModes contains 2092 `(FACE_PRIORITY, ACTION, NIGHT)`, then the camera framework 2093 expects sceneModeOverrides to have 9 entries formatted like: 2094 `(0, 0, 0, ON_AUTO_FLASH, AUTO, CONTINUOUS_PICTURE, 2095 ON_AUTO_FLASH, INCANDESCENT, AUTO)`. 2096 </details> 2097 <hal_details> 2098 To maintain backward compatibility, this list will be made available 2099 in the static metadata of the camera service. The camera service will 2100 use these values to set android.control.aeMode, 2101 android.control.awbMode, and android.control.afMode when using a scene 2102 mode other than FACE_PRIORITY. 2103 </hal_details> 2104 <tag id="BC" /> 2105 </entry> 2106 </static> 2107 <dynamic> 2108 <entry name="aePrecaptureId" type="int32" visibility="system" deprecated="true"> 2109 <description>The ID sent with the latest 2110 CAMERA2_TRIGGER_PRECAPTURE_METERING call</description> 2111 <details>Must be 0 if no 2112 CAMERA2_TRIGGER_PRECAPTURE_METERING trigger received yet 2113 by HAL. Always updated even if AE algorithm ignores the 2114 trigger</details> 2115 </entry> 2116 <clone entry="android.control.aeAntibandingMode" kind="controls"> 2117 </clone> 2118 <clone entry="android.control.aeExposureCompensation" kind="controls"> 2119 </clone> 2120 <clone entry="android.control.aeLock" kind="controls"> 2121 </clone> 2122 <clone entry="android.control.aeMode" kind="controls"> 2123 </clone> 2124 <clone entry="android.control.aeRegions" kind="controls"> 2125 </clone> 2126 <clone entry="android.control.aeTargetFpsRange" kind="controls"> 2127 </clone> 2128 <clone entry="android.control.aePrecaptureTrigger" kind="controls"> 2129 </clone> 2130 <entry name="aeState" type="byte" visibility="public" enum="true" 2131 hwlevel="limited"> 2132 <enum> 2133 <value>INACTIVE 2134 <notes>AE is off or recently reset. 2135 2136 When a camera device is opened, it starts in 2137 this state. This is a transient state, the camera device may skip reporting 2138 this state in capture result.</notes></value> 2139 <value>SEARCHING 2140 <notes>AE doesn't yet have a good set of control values 2141 for the current scene. 2142 2143 This is a transient state, the camera device may skip 2144 reporting this state in capture result.</notes></value> 2145 <value>CONVERGED 2146 <notes>AE has a good set of control values for the 2147 current scene.</notes></value> 2148 <value>LOCKED 2149 <notes>AE has been locked.</notes></value> 2150 <value>FLASH_REQUIRED 2151 <notes>AE has a good set of control values, but flash 2152 needs to be fired for good quality still 2153 capture.</notes></value> 2154 <value>PRECAPTURE 2155 <notes>AE has been asked to do a precapture sequence 2156 and is currently executing it. 2157 2158 Precapture can be triggered through setting 2159 android.control.aePrecaptureTrigger to START. Currently 2160 active and completed (if it causes camera device internal AE lock) precapture 2161 metering sequence can be canceled through setting 2162 android.control.aePrecaptureTrigger to CANCEL. 2163 2164 Once PRECAPTURE completes, AE will transition to CONVERGED 2165 or FLASH_REQUIRED as appropriate. This is a transient 2166 state, the camera device may skip reporting this state in 2167 capture result.</notes></value> 2168 </enum> 2169 <description>Current state of the auto-exposure (AE) algorithm.</description> 2170 <details>Switching between or enabling AE modes (android.control.aeMode) always 2171 resets the AE state to INACTIVE. Similarly, switching between android.control.mode, 2172 or android.control.sceneMode if `android.control.mode == USE_SCENE_MODE` resets all 2173 the algorithm states to INACTIVE. 2174 2175 The camera device can do several state transitions between two results, if it is 2176 allowed by the state transition table. For example: INACTIVE may never actually be 2177 seen in a result. 2178 2179 The state in the result is the state for this image (in sync with this image): if 2180 AE state becomes CONVERGED, then the image data associated with this result should 2181 be good to use. 2182 2183 Below are state transition tables for different AE modes. 2184 2185 State | Transition Cause | New State | Notes 2186 :------------:|:----------------:|:---------:|:-----------------------: 2187 INACTIVE | | INACTIVE | Camera device auto exposure algorithm is disabled 2188 2189 When android.control.aeMode is AE_MODE_ON_*: 2190 2191 State | Transition Cause | New State | Notes 2192 :-------------:|:--------------------------------------------:|:--------------:|:-----------------: 2193 INACTIVE | Camera device initiates AE scan | SEARCHING | Values changing 2194 INACTIVE | android.control.aeLock is ON | LOCKED | Values locked 2195 SEARCHING | Camera device finishes AE scan | CONVERGED | Good values, not changing 2196 SEARCHING | Camera device finishes AE scan | FLASH_REQUIRED | Converged but too dark w/o flash 2197 SEARCHING | android.control.aeLock is ON | LOCKED | Values locked 2198 CONVERGED | Camera device initiates AE scan | SEARCHING | Values changing 2199 CONVERGED | android.control.aeLock is ON | LOCKED | Values locked 2200 FLASH_REQUIRED | Camera device initiates AE scan | SEARCHING | Values changing 2201 FLASH_REQUIRED | android.control.aeLock is ON | LOCKED | Values locked 2202 LOCKED | android.control.aeLock is OFF | SEARCHING | Values not good after unlock 2203 LOCKED | android.control.aeLock is OFF | CONVERGED | Values good after unlock 2204 LOCKED | android.control.aeLock is OFF | FLASH_REQUIRED | Exposure good, but too dark 2205 PRECAPTURE | Sequence done. android.control.aeLock is OFF | CONVERGED | Ready for high-quality capture 2206 PRECAPTURE | Sequence done. android.control.aeLock is ON | LOCKED | Ready for high-quality capture 2207 LOCKED | aeLock is ON and aePrecaptureTrigger is START | LOCKED | Precapture trigger is ignored when AE is already locked 2208 LOCKED | aeLock is ON and aePrecaptureTrigger is CANCEL| LOCKED | Precapture trigger is ignored when AE is already locked 2209 Any state (excluding LOCKED) | android.control.aePrecaptureTrigger is START | PRECAPTURE | Start AE precapture metering sequence 2210 Any state (excluding LOCKED) | android.control.aePrecaptureTrigger is CANCEL| INACTIVE | Currently active precapture metering sequence is canceled 2211 2212 For the above table, the camera device may skip reporting any state changes that happen 2213 without application intervention (i.e. mode switch, trigger, locking). Any state that 2214 can be skipped in that manner is called a transient state. 2215 2216 For example, for above AE modes (AE_MODE_ON_*), in addition to the state transitions 2217 listed in above table, it is also legal for the camera device to skip one or more 2218 transient states between two results. See below table for examples: 2219 2220 State | Transition Cause | New State | Notes 2221 :-------------:|:-----------------------------------------------------------:|:--------------:|:-----------------: 2222 INACTIVE | Camera device finished AE scan | CONVERGED | Values are already good, transient states are skipped by camera device. 2223 Any state (excluding LOCKED) | android.control.aePrecaptureTrigger is START, sequence done | FLASH_REQUIRED | Converged but too dark w/o flash after a precapture sequence, transient states are skipped by camera device. 2224 Any state (excluding LOCKED) | android.control.aePrecaptureTrigger is START, sequence done | CONVERGED | Converged after a precapture sequence, transient states are skipped by camera device. 2225 Any state (excluding LOCKED) | android.control.aePrecaptureTrigger is CANCEL, converged | FLASH_REQUIRED | Converged but too dark w/o flash after a precapture sequence is canceled, transient states are skipped by camera device. 2226 Any state (excluding LOCKED) | android.control.aePrecaptureTrigger is CANCEL, converged | CONVERGED | Converged after a precapture sequenceis canceled, transient states are skipped by camera device. 2227 CONVERGED | Camera device finished AE scan | FLASH_REQUIRED | Converged but too dark w/o flash after a new scan, transient states are skipped by camera device. 2228 FLASH_REQUIRED | Camera device finished AE scan | CONVERGED | Converged after a new scan, transient states are skipped by camera device. 2229 </details> 2230 </entry> 2231 <clone entry="android.control.afMode" kind="controls"> 2232 </clone> 2233 <clone entry="android.control.afRegions" kind="controls"> 2234 </clone> 2235 <clone entry="android.control.afTrigger" kind="controls"> 2236 </clone> 2237 <entry name="afState" type="byte" visibility="public" enum="true" 2238 hwlevel="legacy"> 2239 <enum> 2240 <value>INACTIVE 2241 <notes>AF is off or has not yet tried to scan/been asked 2242 to scan. 2243 2244 When a camera device is opened, it starts in this 2245 state. This is a transient state, the camera device may 2246 skip reporting this state in capture 2247 result.</notes></value> 2248 <value>PASSIVE_SCAN 2249 <notes>AF is currently performing an AF scan initiated the 2250 camera device in a continuous autofocus mode. 2251 2252 Only used by CONTINUOUS_* AF modes. This is a transient 2253 state, the camera device may skip reporting this state in 2254 capture result.</notes></value> 2255 <value>PASSIVE_FOCUSED 2256 <notes>AF currently believes it is in focus, but may 2257 restart scanning at any time. 2258 2259 Only used by CONTINUOUS_* AF modes. This is a transient 2260 state, the camera device may skip reporting this state in 2261 capture result.</notes></value> 2262 <value>ACTIVE_SCAN 2263 <notes>AF is performing an AF scan because it was 2264 triggered by AF trigger. 2265 2266 Only used by AUTO or MACRO AF modes. This is a transient 2267 state, the camera device may skip reporting this state in 2268 capture result.</notes></value> 2269 <value>FOCUSED_LOCKED 2270 <notes>AF believes it is focused correctly and has locked 2271 focus. 2272 2273 This state is reached only after an explicit START AF trigger has been 2274 sent (android.control.afTrigger), when good focus has been obtained. 2275 2276 The lens will remain stationary until the AF mode (android.control.afMode) is changed or 2277 a new AF trigger is sent to the camera device (android.control.afTrigger). 2278 </notes></value> 2279 <value>NOT_FOCUSED_LOCKED 2280 <notes>AF has failed to focus successfully and has locked 2281 focus. 2282 2283 This state is reached only after an explicit START AF trigger has been 2284 sent (android.control.afTrigger), when good focus cannot be obtained. 2285 2286 The lens will remain stationary until the AF mode (android.control.afMode) is changed or 2287 a new AF trigger is sent to the camera device (android.control.afTrigger). 2288 </notes></value> 2289 <value>PASSIVE_UNFOCUSED 2290 <notes>AF finished a passive scan without finding focus, 2291 and may restart scanning at any time. 2292 2293 Only used by CONTINUOUS_* AF modes. This is a transient state, the camera 2294 device may skip reporting this state in capture result. 2295 2296 LEGACY camera devices do not support this state. When a passive 2297 scan has finished, it will always go to PASSIVE_FOCUSED. 2298 </notes></value> 2299 </enum> 2300 <description>Current state of auto-focus (AF) algorithm.</description> 2301 <details> 2302 Switching between or enabling AF modes (android.control.afMode) always 2303 resets the AF state to INACTIVE. Similarly, switching between android.control.mode, 2304 or android.control.sceneMode if `android.control.mode == USE_SCENE_MODE` resets all 2305 the algorithm states to INACTIVE. 2306 2307 The camera device can do several state transitions between two results, if it is 2308 allowed by the state transition table. For example: INACTIVE may never actually be 2309 seen in a result. 2310 2311 The state in the result is the state for this image (in sync with this image): if 2312 AF state becomes FOCUSED, then the image data associated with this result should 2313 be sharp. 2314 2315 Below are state transition tables for different AF modes. 2316 2317 When android.control.afMode is AF_MODE_OFF or AF_MODE_EDOF: 2318 2319 State | Transition Cause | New State | Notes 2320 :------------:|:----------------:|:---------:|:-----------: 2321 INACTIVE | | INACTIVE | Never changes 2322 2323 When android.control.afMode is AF_MODE_AUTO or AF_MODE_MACRO: 2324 2325 State | Transition Cause | New State | Notes 2326 :-----------------:|:----------------:|:------------------:|:--------------: 2327 INACTIVE | AF_TRIGGER | ACTIVE_SCAN | Start AF sweep, Lens now moving 2328 ACTIVE_SCAN | AF sweep done | FOCUSED_LOCKED | Focused, Lens now locked 2329 ACTIVE_SCAN | AF sweep done | NOT_FOCUSED_LOCKED | Not focused, Lens now locked 2330 ACTIVE_SCAN | AF_CANCEL | INACTIVE | Cancel/reset AF, Lens now locked 2331 FOCUSED_LOCKED | AF_CANCEL | INACTIVE | Cancel/reset AF 2332 FOCUSED_LOCKED | AF_TRIGGER | ACTIVE_SCAN | Start new sweep, Lens now moving 2333 NOT_FOCUSED_LOCKED | AF_CANCEL | INACTIVE | Cancel/reset AF 2334 NOT_FOCUSED_LOCKED | AF_TRIGGER | ACTIVE_SCAN | Start new sweep, Lens now moving 2335 Any state | Mode change | INACTIVE | 2336 2337 For the above table, the camera device may skip reporting any state changes that happen 2338 without application intervention (i.e. mode switch, trigger, locking). Any state that 2339 can be skipped in that manner is called a transient state. 2340 2341 For example, for these AF modes (AF_MODE_AUTO and AF_MODE_MACRO), in addition to the 2342 state transitions listed in above table, it is also legal for the camera device to skip 2343 one or more transient states between two results. See below table for examples: 2344 2345 State | Transition Cause | New State | Notes 2346 :-----------------:|:----------------:|:------------------:|:--------------: 2347 INACTIVE | AF_TRIGGER | FOCUSED_LOCKED | Focus is already good or good after a scan, lens is now locked. 2348 INACTIVE | AF_TRIGGER | NOT_FOCUSED_LOCKED | Focus failed after a scan, lens is now locked. 2349 FOCUSED_LOCKED | AF_TRIGGER | FOCUSED_LOCKED | Focus is already good or good after a scan, lens is now locked. 2350 NOT_FOCUSED_LOCKED | AF_TRIGGER | FOCUSED_LOCKED | Focus is good after a scan, lens is not locked. 2351 2352 2353 When android.control.afMode is AF_MODE_CONTINUOUS_VIDEO: 2354 2355 State | Transition Cause | New State | Notes 2356 :-----------------:|:-----------------------------------:|:------------------:|:--------------: 2357 INACTIVE | Camera device initiates new scan | PASSIVE_SCAN | Start AF scan, Lens now moving 2358 INACTIVE | AF_TRIGGER | NOT_FOCUSED_LOCKED | AF state query, Lens now locked 2359 PASSIVE_SCAN | Camera device completes current scan| PASSIVE_FOCUSED | End AF scan, Lens now locked 2360 PASSIVE_SCAN | Camera device fails current scan | PASSIVE_UNFOCUSED | End AF scan, Lens now locked 2361 PASSIVE_SCAN | AF_TRIGGER | FOCUSED_LOCKED | Immediate transition, if focus is good. Lens now locked 2362 PASSIVE_SCAN | AF_TRIGGER | NOT_FOCUSED_LOCKED | Immediate transition, if focus is bad. Lens now locked 2363 PASSIVE_SCAN | AF_CANCEL | INACTIVE | Reset lens position, Lens now locked 2364 PASSIVE_FOCUSED | Camera device initiates new scan | PASSIVE_SCAN | Start AF scan, Lens now moving 2365 PASSIVE_UNFOCUSED | Camera device initiates new scan | PASSIVE_SCAN | Start AF scan, Lens now moving 2366 PASSIVE_FOCUSED | AF_TRIGGER | FOCUSED_LOCKED | Immediate transition, lens now locked 2367 PASSIVE_UNFOCUSED | AF_TRIGGER | NOT_FOCUSED_LOCKED | Immediate transition, lens now locked 2368 FOCUSED_LOCKED | AF_TRIGGER | FOCUSED_LOCKED | No effect 2369 FOCUSED_LOCKED | AF_CANCEL | INACTIVE | Restart AF scan 2370 NOT_FOCUSED_LOCKED | AF_TRIGGER | NOT_FOCUSED_LOCKED | No effect 2371 NOT_FOCUSED_LOCKED | AF_CANCEL | INACTIVE | Restart AF scan 2372 2373 When android.control.afMode is AF_MODE_CONTINUOUS_PICTURE: 2374 2375 State | Transition Cause | New State | Notes 2376 :-----------------:|:------------------------------------:|:------------------:|:--------------: 2377 INACTIVE | Camera device initiates new scan | PASSIVE_SCAN | Start AF scan, Lens now moving 2378 INACTIVE | AF_TRIGGER | NOT_FOCUSED_LOCKED | AF state query, Lens now locked 2379 PASSIVE_SCAN | Camera device completes current scan | PASSIVE_FOCUSED | End AF scan, Lens now locked 2380 PASSIVE_SCAN | Camera device fails current scan | PASSIVE_UNFOCUSED | End AF scan, Lens now locked 2381 PASSIVE_SCAN | AF_TRIGGER | FOCUSED_LOCKED | Eventual transition once the focus is good. Lens now locked 2382 PASSIVE_SCAN | AF_TRIGGER | NOT_FOCUSED_LOCKED | Eventual transition if cannot find focus. Lens now locked 2383 PASSIVE_SCAN | AF_CANCEL | INACTIVE | Reset lens position, Lens now locked 2384 PASSIVE_FOCUSED | Camera device initiates new scan | PASSIVE_SCAN | Start AF scan, Lens now moving 2385 PASSIVE_UNFOCUSED | Camera device initiates new scan | PASSIVE_SCAN | Start AF scan, Lens now moving 2386 PASSIVE_FOCUSED | AF_TRIGGER | FOCUSED_LOCKED | Immediate trans. Lens now locked 2387 PASSIVE_UNFOCUSED | AF_TRIGGER | NOT_FOCUSED_LOCKED | Immediate trans. Lens now locked 2388 FOCUSED_LOCKED | AF_TRIGGER | FOCUSED_LOCKED | No effect 2389 FOCUSED_LOCKED | AF_CANCEL | INACTIVE | Restart AF scan 2390 NOT_FOCUSED_LOCKED | AF_TRIGGER | NOT_FOCUSED_LOCKED | No effect 2391 NOT_FOCUSED_LOCKED | AF_CANCEL | INACTIVE | Restart AF scan 2392 2393 When switch between AF_MODE_CONTINUOUS_* (CAF modes) and AF_MODE_AUTO/AF_MODE_MACRO 2394 (AUTO modes), the initial INACTIVE or PASSIVE_SCAN states may be skipped by the 2395 camera device. When a trigger is included in a mode switch request, the trigger 2396 will be evaluated in the context of the new mode in the request. 2397 See below table for examples: 2398 2399 State | Transition Cause | New State | Notes 2400 :-----------:|:--------------------------------------:|:----------------------------------------:|:--------------: 2401 any state | CAF-->AUTO mode switch | INACTIVE | Mode switch without trigger, initial state must be INACTIVE 2402 any state | CAF-->AUTO mode switch with AF_TRIGGER | trigger-reachable states from INACTIVE | Mode switch with trigger, INACTIVE is skipped 2403 any state | AUTO-->CAF mode switch | passively reachable states from INACTIVE | Mode switch without trigger, passive transient state is skipped 2404 </details> 2405 </entry> 2406 <entry name="afTriggerId" type="int32" visibility="system" deprecated="true"> 2407 <description>The ID sent with the latest 2408 CAMERA2_TRIGGER_AUTOFOCUS call</description> 2409 <details>Must be 0 if no CAMERA2_TRIGGER_AUTOFOCUS trigger 2410 received yet by HAL. Always updated even if AF algorithm 2411 ignores the trigger</details> 2412 </entry> 2413 <clone entry="android.control.awbLock" kind="controls"> 2414 </clone> 2415 <clone entry="android.control.awbMode" kind="controls"> 2416 </clone> 2417 <clone entry="android.control.awbRegions" kind="controls"> 2418 </clone> 2419 <clone entry="android.control.captureIntent" kind="controls"> 2420 </clone> 2421 <entry name="awbState" type="byte" visibility="public" enum="true" 2422 hwlevel="limited"> 2423 <enum> 2424 <value>INACTIVE 2425 <notes>AWB is not in auto mode, or has not yet started metering. 2426 2427 When a camera device is opened, it starts in this 2428 state. This is a transient state, the camera device may 2429 skip reporting this state in capture 2430 result.</notes></value> 2431 <value>SEARCHING 2432 <notes>AWB doesn't yet have a good set of control 2433 values for the current scene. 2434 2435 This is a transient state, the camera device 2436 may skip reporting this state in capture result.</notes></value> 2437 <value>CONVERGED 2438 <notes>AWB has a good set of control values for the 2439 current scene.</notes></value> 2440 <value>LOCKED 2441 <notes>AWB has been locked. 2442 </notes></value> 2443 </enum> 2444 <description>Current state of auto-white balance (AWB) algorithm.</description> 2445 <details>Switching between or enabling AWB modes (android.control.awbMode) always 2446 resets the AWB state to INACTIVE. Similarly, switching between android.control.mode, 2447 or android.control.sceneMode if `android.control.mode == USE_SCENE_MODE` resets all 2448 the algorithm states to INACTIVE. 2449 2450 The camera device can do several state transitions between two results, if it is 2451 allowed by the state transition table. So INACTIVE may never actually be seen in 2452 a result. 2453 2454 The state in the result is the state for this image (in sync with this image): if 2455 AWB state becomes CONVERGED, then the image data associated with this result should 2456 be good to use. 2457 2458 Below are state transition tables for different AWB modes. 2459 2460 When `android.control.awbMode != AWB_MODE_AUTO`: 2461 2462 State | Transition Cause | New State | Notes 2463 :------------:|:----------------:|:---------:|:-----------------------: 2464 INACTIVE | |INACTIVE |Camera device auto white balance algorithm is disabled 2465 2466 When android.control.awbMode is AWB_MODE_AUTO: 2467 2468 State | Transition Cause | New State | Notes 2469 :-------------:|:--------------------------------:|:-------------:|:-----------------: 2470 INACTIVE | Camera device initiates AWB scan | SEARCHING | Values changing 2471 INACTIVE | android.control.awbLock is ON | LOCKED | Values locked 2472 SEARCHING | Camera device finishes AWB scan | CONVERGED | Good values, not changing 2473 SEARCHING | android.control.awbLock is ON | LOCKED | Values locked 2474 CONVERGED | Camera device initiates AWB scan | SEARCHING | Values changing 2475 CONVERGED | android.control.awbLock is ON | LOCKED | Values locked 2476 LOCKED | android.control.awbLock is OFF | SEARCHING | Values not good after unlock 2477 2478 For the above table, the camera device may skip reporting any state changes that happen 2479 without application intervention (i.e. mode switch, trigger, locking). Any state that 2480 can be skipped in that manner is called a transient state. 2481 2482 For example, for this AWB mode (AWB_MODE_AUTO), in addition to the state transitions 2483 listed in above table, it is also legal for the camera device to skip one or more 2484 transient states between two results. See below table for examples: 2485 2486 State | Transition Cause | New State | Notes 2487 :-------------:|:--------------------------------:|:-------------:|:-----------------: 2488 INACTIVE | Camera device finished AWB scan | CONVERGED | Values are already good, transient states are skipped by camera device. 2489 LOCKED | android.control.awbLock is OFF | CONVERGED | Values good after unlock, transient states are skipped by camera device. 2490 </details> 2491 </entry> 2492 <clone entry="android.control.effectMode" kind="controls"> 2493 </clone> 2494 <clone entry="android.control.mode" kind="controls"> 2495 </clone> 2496 <clone entry="android.control.sceneMode" kind="controls"> 2497 </clone> 2498 <clone entry="android.control.videoStabilizationMode" kind="controls"> 2499 </clone> 2500 </dynamic> 2501 <static> 2502 <entry name="availableHighSpeedVideoConfigurations" type="int32" visibility="hidden" 2503 container="array" typedef="highSpeedVideoConfiguration" hwlevel="limited"> 2504 <array> 2505 <size>4</size> 2506 <size>n</size> 2507 </array> 2508 <description> 2509 List of available high speed video size and fps range configurations 2510 supported by the camera device, in the format of (width, height, fps_min, fps_max). 2511 </description> 2512 <range> 2513 For each configuration, the fps_max &gt;= 60fps. 2514 </range> 2515 <details> 2516 When HIGH_SPEED_VIDEO is supported in android.control.availableSceneModes, this metadata 2517 will list the supported high speed video size and fps range configurations. All the sizes 2518 listed in this configuration will be a subset of the sizes reported by {@link 2519 android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes} for processed 2520 non-stalling formats. 2521 2522 For the high speed video use case, where the application will set 2523 android.control.sceneMode to HIGH_SPEED_VIDEO in capture requests, the application must 2524 select the video size and fps range from this metadata to configure the recording and 2525 preview streams and setup the recording requests. For example, if the application intends 2526 to do high speed recording, it can select the maximum size reported by this metadata to 2527 configure output streams. Once the size is selected, application can filter this metadata 2528 by selected size and get the supported fps ranges, and use these fps ranges to setup the 2529 recording requests. Note that for the use case of multiple output streams, application 2530 must select one unique size from this metadata to use. Otherwise a request error might 2531 occur. 2532 2533 For normal video recording use case, where some application will NOT set 2534 android.control.sceneMode to HIGH_SPEED_VIDEO in capture requests, the fps ranges 2535 reported in this metadata must not be used to setup capture requests, or it will cause 2536 request error. 2537 </details> 2538 <hal_details> 2539 All the sizes listed in this configuration will be a subset of the sizes reported by 2540 android.scaler.availableStreamConfigurations for processed non-stalling output formats. 2541 Note that for all high speed video configurations, HAL must be able to support a minimum 2542 of two streams, though the application might choose to configure just one stream. 2543 2544 Since the HIGH_SPEED_VIDEO mode may be turned on for preview view only case, the preview 2545 fps is bounded by device refresh rate (e.g. 60fps). For a given resolution, it is 2546 recommended that this list includes some fps ranges (e.g. [30, 60]) that is suitable 2547 for preview only streaming case. 2548 </hal_details> 2549 <tag id="V1" /> 2550 </entry> 2551 <entry name="aeLockAvailable" type="byte" visibility="public" enum="true" 2552 typedef="boolean" hwlevel="legacy"> 2553 <enum> 2554 <value>FALSE</value> 2555 <value>TRUE</value> 2556 </enum> 2557 <description>Whether the camera device supports android.control.aeLock</description> 2558 <details> 2559 Devices with MANUAL_SENSOR capability or BURST_CAPTURE capability will always 2560 list `true`. This includes FULL devices. 2561 </details> 2562 <tag id="BC"/> 2563 </entry> 2564 <entry name="awbLockAvailable" type="byte" visibility="public" enum="true" 2565 typedef="boolean" hwlevel="legacy"> 2566 <enum> 2567 <value>FALSE</value> 2568 <value>TRUE</value> 2569 </enum> 2570 <description>Whether the camera device supports android.control.awbLock</description> 2571 <details> 2572 Devices with MANUAL_POST_PROCESSING capability or BURST_CAPTURE capability will 2573 always list `true`. This includes FULL devices. 2574 </details> 2575 <tag id="BC"/> 2576 </entry> 2577 <entry name="availableModes" type="byte" visibility="public" 2578 type_notes="List of enums (android.control.mode)." container="array" 2579 typedef="enumList" hwlevel="legacy"> 2580 <array> 2581 <size>n</size> 2582 </array> 2583 <description> 2584 List of control modes for android.control.mode that are supported by this camera 2585 device. 2586 </description> 2587 <range>Any value listed in android.control.mode</range> 2588 <details> 2589 This list contains control modes that can be set for the camera device. 2590 LEGACY mode devices will always support AUTO mode. LIMITED and FULL 2591 devices will always support OFF, AUTO modes. 2592 </details> 2593 </entry> 2594 </static> 2595 </section> 2596 <section name="demosaic"> 2597 <controls> 2598 <entry name="mode" type="byte" enum="true"> 2599 <enum> 2600 <value>FAST 2601 <notes>Minimal or no slowdown of frame rate compared to 2602 Bayer RAW output.</notes></value> 2603 <value>HIGH_QUALITY 2604 <notes>Improved processing quality but the frame rate might be slowed down 2605 relative to raw output.</notes></value> 2606 </enum> 2607 <description>Controls the quality of the demosaicing 2608 processing.</description> 2609 <tag id="FUTURE" /> 2610 </entry> 2611 </controls> 2612 </section> 2613 <section name="edge"> 2614 <controls> 2615 <entry name="mode" type="byte" visibility="public" enum="true" hwlevel="full"> 2616 <enum> 2617 <value>OFF 2618 <notes>No edge enhancement is applied.</notes></value> 2619 <value>FAST 2620 <notes>Apply edge enhancement at a quality level that does not slow down frame rate relative to sensor 2621 output</notes></value> 2622 <value>HIGH_QUALITY 2623 <notes>Apply high-quality edge enhancement, at a cost of possibly reduced output frame rate. 2624 </notes></value> 2625 </enum> 2626 <description>Operation mode for edge 2627 enhancement.</description> 2628 <range>android.edge.availableEdgeModes</range> 2629 <details>Edge enhancement improves sharpness and details in the captured image. OFF means 2630 no enhancement will be applied by the camera device. 2631 2632 FAST/HIGH_QUALITY both mean camera device determined enhancement 2633 will be applied. HIGH_QUALITY mode indicates that the 2634 camera device will use the highest-quality enhancement algorithms, 2635 even if it slows down capture rate. FAST means the camera device will 2636 not slow down capture rate when applying edge enhancement. 2637 2638 For YUV_REPROCESSING, these FAST/HIGH_QUALITY modes both mean that the camera 2639 device will apply FAST/HIGH_QUALITY YUV-domain edge enhancement, respectively. 2640 The camera device may adjust its internal noise reduction parameters for best 2641 image quality based on the android.reprocess.effectiveExposureFactor, if it is set. 2642 </details> 2643 <hal_details> 2644 For YUV_REPROCESSING The HAL can use android.reprocess.effectiveExposureFactor to 2645 adjust the internal edge enhancement reduction parameters appropriately to get the best 2646 quality images. 2647 </hal_details> 2648 <tag id="V1" /> 2649 <tag id="REPROC" /> 2650 </entry> 2651 <entry name="strength" type="byte"> 2652 <description>Control the amount of edge enhancement 2653 applied to the images</description> 2654 <units>1-10; 10 is maximum sharpening</units> 2655 <tag id="FUTURE" /> 2656 </entry> 2657 </controls> 2658 <static> 2659 <entry name="availableEdgeModes" type="byte" visibility="public" 2660 type_notes="list of enums" container="array" typedef="enumList" 2661 hwlevel="full"> 2662 <array> 2663 <size>n</size> 2664 </array> 2665 <description> 2666 List of edge enhancement modes for android.edge.mode that are supported by this camera 2667 device. 2668 </description> 2669 <range>Any value listed in android.edge.mode</range> 2670 <details> 2671 Full-capability camera devices must always support OFF; all devices will list FAST. 2672 </details> 2673 <hal_details> 2674 HAL must support both FAST and HIGH_QUALITY if edge enhancement control is available 2675 on the camera device, but the underlying implementation can be the same for both modes. 2676 That is, if the highest quality implementation on the camera device does not slow down 2677 capture rate, then FAST and HIGH_QUALITY will generate the same output. 2678 </hal_details> 2679 <tag id="V1" /> 2680 <tag id="REPROC" /> 2681 </entry> 2682 </static> 2683 <dynamic> 2684 <clone entry="android.edge.mode" kind="controls"> 2685 <tag id="V1" /> 2686 <tag id="REPROC" /> 2687 </clone> 2688 </dynamic> 2689 </section> 2690 <section name="flash"> 2691 <controls> 2692 <entry name="firingPower" type="byte"> 2693 <description>Power for flash firing/torch</description> 2694 <units>10 is max power; 0 is no flash. Linear</units> 2695 <range>0 - 10</range> 2696 <details>Power for snapshot may use a different scale than 2697 for torch mode. Only one entry for torch mode will be 2698 used</details> 2699 <tag id="FUTURE" /> 2700 </entry> 2701 <entry name="firingTime" type="int64"> 2702 <description>Firing time of flash relative to start of 2703 exposure</description> 2704 <units>nanoseconds</units> 2705 <range>0-(exposure time-flash duration)</range> 2706 <details>Clamped to (0, exposure time - flash 2707 duration).</details> 2708 <tag id="FUTURE" /> 2709 </entry> 2710 <entry name="mode" type="byte" visibility="public" enum="true" hwlevel="legacy"> 2711 <enum> 2712 <value>OFF 2713 <notes> 2714 Do not fire the flash for this capture. 2715 </notes> 2716 </value> 2717 <value>SINGLE 2718 <notes> 2719 If the flash is available and charged, fire flash 2720 for this capture. 2721 </notes> 2722 </value> 2723 <value>TORCH 2724 <notes> 2725 Transition flash to continuously on. 2726 </notes> 2727 </value> 2728 </enum> 2729 <description>The desired mode for for the camera device's flash control.</description> 2730 <details> 2731 This control is only effective when flash unit is available 2732 (`android.flash.info.available == true`). 2733 2734 When this control is used, the android.control.aeMode must be set to ON or OFF. 2735 Otherwise, the camera device auto-exposure related flash control (ON_AUTO_FLASH, 2736 ON_ALWAYS_FLASH, or ON_AUTO_FLASH_REDEYE) will override this control. 2737 2738 When set to OFF, the camera device will not fire flash for this capture. 2739 2740 When set to SINGLE, the camera device will fire flash regardless of the camera 2741 device's auto-exposure routine's result. When used in still capture case, this 2742 control should be used along with auto-exposure (AE) precapture metering sequence 2743 (android.control.aePrecaptureTrigger), otherwise, the image may be incorrectly exposed. 2744 2745 When set to TORCH, the flash will be on continuously. This mode can be used 2746 for use cases such as preview, auto-focus assist, still capture, or video recording. 2747 2748 The flash status will be reported by android.flash.state in the capture result metadata. 2749 </details> 2750 <tag id="BC" /> 2751 </entry> 2752 </controls> 2753 <static> 2754 <namespace name="info"> 2755 <entry name="available" type="byte" visibility="public" enum="true" 2756 typedef="boolean" hwlevel="legacy"> 2757 <enum> 2758 <value>FALSE</value> 2759 <value>TRUE</value> 2760 </enum> 2761 <description>Whether this camera device has a 2762 flash unit.</description> 2763 <details> 2764 Will be `false` if no flash is available. 2765 2766 If there is no flash unit, none of the flash controls do 2767 anything.</details> 2768 <tag id="BC" /> 2769 </entry> 2770 <entry name="chargeDuration" type="int64"> 2771 <description>Time taken before flash can fire 2772 again</description> 2773 <units>nanoseconds</units> 2774 <range>0-1e9</range> 2775 <details>1 second too long/too short for recharge? Should 2776 this be power-dependent?</details> 2777 <tag id="FUTURE" /> 2778 </entry> 2779 </namespace> 2780 <entry name="colorTemperature" type="byte"> 2781 <description>The x,y whitepoint of the 2782 flash</description> 2783 <units>pair of floats</units> 2784 <range>0-1 for both</range> 2785 <tag id="FUTURE" /> 2786 </entry> 2787 <entry name="maxEnergy" type="byte"> 2788 <description>Max energy output of the flash for a full 2789 power single flash</description> 2790 <units>lumen-seconds</units> 2791 <range>&gt;= 0</range> 2792 <tag id="FUTURE" /> 2793 </entry> 2794 </static> 2795 <dynamic> 2796 <clone entry="android.flash.firingPower" kind="controls"> 2797 </clone> 2798 <clone entry="android.flash.firingTime" kind="controls"> 2799 </clone> 2800 <clone entry="android.flash.mode" kind="controls"></clone> 2801 <entry name="state" type="byte" visibility="public" enum="true" 2802 hwlevel="limited"> 2803 <enum> 2804 <value>UNAVAILABLE 2805 <notes>No flash on camera.</notes></value> 2806 <value>CHARGING 2807 <notes>Flash is charging and cannot be fired.</notes></value> 2808 <value>READY 2809 <notes>Flash is ready to fire.</notes></value> 2810 <value>FIRED 2811 <notes>Flash fired for this capture.</notes></value> 2812 <value>PARTIAL 2813 <notes>Flash partially illuminated this frame. 2814 2815 This is usually due to the next or previous frame having 2816 the flash fire, and the flash spilling into this capture 2817 due to hardware limitations.</notes></value> 2818 </enum> 2819 <description>Current state of the flash 2820 unit.</description> 2821 <details> 2822 When the camera device doesn't have flash unit 2823 (i.e. `android.flash.info.available == false`), this state will always be UNAVAILABLE. 2824 Other states indicate the current flash status. 2825 2826 In certain conditions, this will be available on LEGACY devices: 2827 2828 * Flash-less cameras always return UNAVAILABLE. 2829 * Using android.control.aeMode `==` ON_ALWAYS_FLASH 2830 will always return FIRED. 2831 * Using android.flash.mode `==` TORCH 2832 will always return FIRED. 2833 2834 In all other conditions the state will not be available on 2835 LEGACY devices (i.e. it will be `null`). 2836 </details> 2837 </entry> 2838 </dynamic> 2839 </section> 2840 <section name="hotPixel"> 2841 <controls> 2842 <entry name="mode" type="byte" visibility="public" enum="true"> 2843 <enum> 2844 <value>OFF 2845 <notes> 2846 No hot pixel correction is applied. 2847 2848 The frame rate must not be reduced relative to sensor raw output 2849 for this option. 2850 2851 The hotpixel map may be returned in android.statistics.hotPixelMap. 2852 </notes> 2853 </value> 2854 <value>FAST 2855 <notes> 2856 Hot pixel correction is applied, without reducing frame 2857 rate relative to sensor raw output. 2858 2859 The hotpixel map may be returned in android.statistics.hotPixelMap. 2860 </notes> 2861 </value> 2862 <value>HIGH_QUALITY 2863 <notes> 2864 High-quality hot pixel correction is applied, at a cost 2865 of possibly reduced frame rate relative to sensor raw output. 2866 2867 The hotpixel map may be returned in android.statistics.hotPixelMap. 2868 </notes> 2869 </value> 2870 </enum> 2871 <description> 2872 Operational mode for hot pixel correction. 2873 </description> 2874 <range>android.hotPixel.availableHotPixelModes</range> 2875 <details> 2876 Hotpixel correction interpolates out, or otherwise removes, pixels 2877 that do not accurately measure the incoming light (i.e. pixels that 2878 are stuck at an arbitrary value or are oversensitive). 2879 </details> 2880 <tag id="V1" /> 2881 <tag id="RAW" /> 2882 </entry> 2883 </controls> 2884 <static> 2885 <entry name="availableHotPixelModes" type="byte" visibility="public" 2886 type_notes="list of enums" container="array" typedef="enumList"> 2887 <array> 2888 <size>n</size> 2889 </array> 2890 <description> 2891 List of hot pixel correction modes for android.hotPixel.mode that are supported by this 2892 camera device. 2893 </description> 2894 <range>Any value listed in android.hotPixel.mode</range> 2895 <details> 2896 FULL mode camera devices will always support FAST. 2897 </details> 2898 <hal_details> 2899 To avoid performance issues, there will be significantly fewer hot 2900 pixels than actual pixels on the camera sensor. 2901 HAL must support both FAST and HIGH_QUALITY if hot pixel correction control is available 2902 on the camera device, but the underlying implementation can be the same for both modes. 2903 That is, if the highest quality implementation on the camera device does not slow down 2904 capture rate, then FAST and HIGH_QUALITY will generate the same output. 2905 </hal_details> 2906 <tag id="V1" /> 2907 <tag id="RAW" /> 2908 </entry> 2909 </static> 2910 <dynamic> 2911 <clone entry="android.hotPixel.mode" kind="controls"> 2912 <tag id="V1" /> 2913 <tag id="RAW" /> 2914 </clone> 2915 </dynamic> 2916 </section> 2917 <section name="jpeg"> 2918 <controls> 2919 <entry name="gpsLocation" type="byte" visibility="public" synthetic="true" 2920 typedef="location" hwlevel="legacy"> 2921 <description> 2922 A location object to use when generating image GPS metadata. 2923 </description> 2924 <details> 2925 Setting a location object in a request will include the GPS coordinates of the location 2926 into any JPEG images captured based on the request. These coordinates can then be 2927 viewed by anyone who receives the JPEG image. 2928 </details> 2929 </entry> 2930 <entry name="gpsCoordinates" type="double" visibility="hidden" 2931 type_notes="latitude, longitude, altitude. First two in degrees, the third in meters" 2932 container="array" hwlevel="legacy"> 2933 <array> 2934 <size>3</size> 2935 </array> 2936 <description>GPS coordinates to include in output JPEG 2937 EXIF.</description> 2938 <range>(-180 - 180], [-90,90], [-inf, inf]</range> 2939 <tag id="BC" /> 2940 </entry> 2941 <entry name="gpsProcessingMethod" type="byte" visibility="hidden" 2942 typedef="string" hwlevel="legacy"> 2943 <description>32 characters describing GPS algorithm to 2944 include in EXIF.</description> 2945 <units>UTF-8 null-terminated string</units> 2946 <tag id="BC" /> 2947 </entry> 2948 <entry name="gpsTimestamp" type="int64" visibility="hidden" hwlevel="legacy"> 2949 <description>Time GPS fix was made to include in 2950 EXIF.</description> 2951 <units>UTC in seconds since January 1, 1970</units> 2952 <tag id="BC" /> 2953 </entry> 2954 <entry name="orientation" type="int32" visibility="public" hwlevel="legacy"> 2955 <description>The orientation for a JPEG image.</description> 2956 <units>Degrees in multiples of 90</units> 2957 <range>0, 90, 180, 270</range> 2958 <details> 2959 The clockwise rotation angle in degrees, relative to the orientation 2960 to the camera, that the JPEG picture needs to be rotated by, to be viewed 2961 upright. 2962 2963 Camera devices may either encode this value into the JPEG EXIF header, or 2964 rotate the image data to match this orientation. When the image data is rotated, 2965 the thumbnail data will also be rotated. 2966 2967 Note that this orientation is relative to the orientation of the camera sensor, given 2968 by android.sensor.orientation. 2969 2970 To translate from the device orientation given by the Android sensor APIs, the following 2971 sample code may be used: 2972 2973 private int getJpegOrientation(CameraCharacteristics c, int deviceOrientation) { 2974 if (deviceOrientation == android.view.OrientationEventListener.ORIENTATION_UNKNOWN) return 0; 2975 int sensorOrientation = c.get(CameraCharacteristics.SENSOR_ORIENTATION); 2976 2977 // Round device orientation to a multiple of 90 2978 deviceOrientation = (deviceOrientation + 45) / 90 * 90; 2979 2980 // Reverse device orientation for front-facing cameras 2981 boolean facingFront = c.get(CameraCharacteristics.LENS_FACING) == CameraCharacteristics.LENS_FACING_FRONT; 2982 if (facingFront) deviceOrientation = -deviceOrientation; 2983 2984 // Calculate desired JPEG orientation relative to camera orientation to make 2985 // the image upright relative to the device orientation 2986 int jpegOrientation = (sensorOrientation + deviceOrientation + 360) % 360; 2987 2988 return jpegOrientation; 2989 } 2990 </details> 2991 <tag id="BC" /> 2992 </entry> 2993 <entry name="quality" type="byte" visibility="public" hwlevel="legacy"> 2994 <description>Compression quality of the final JPEG 2995 image.</description> 2996 <range>1-100; larger is higher quality</range> 2997 <details>85-95 is typical usage range.</details> 2998 <tag id="BC" /> 2999 </entry> 3000 <entry name="thumbnailQuality" type="byte" visibility="public" hwlevel="legacy"> 3001 <description>Compression quality of JPEG 3002 thumbnail.</description> 3003 <range>1-100; larger is higher quality</range> 3004 <tag id="BC" /> 3005 </entry> 3006 <entry name="thumbnailSize" type="int32" visibility="public" 3007 container="array" typedef="size" hwlevel="legacy"> 3008 <array> 3009 <size>2</size> 3010 </array> 3011 <description>Resolution of embedded JPEG thumbnail.</description> 3012 <range>android.jpeg.availableThumbnailSizes</range> 3013 <details>When set to (0, 0) value, the JPEG EXIF will not contain thumbnail, 3014 but the captured JPEG will still be a valid image. 3015 3016 For best results, when issuing a request for a JPEG image, the thumbnail size selected 3017 should have the same aspect ratio as the main JPEG output. 3018 3019 If the thumbnail image aspect ratio differs from the JPEG primary image aspect 3020 ratio, the camera device creates the thumbnail by cropping it from the primary image. 3021 For example, if the primary image has 4:3 aspect ratio, the thumbnail image has 3022 16:9 aspect ratio, the primary image will be cropped vertically (letterbox) to 3023 generate the thumbnail image. The thumbnail image will always have a smaller Field 3024 Of View (FOV) than the primary image when aspect ratios differ. 3025 </details> 3026 <hal_details> 3027 The HAL must not squeeze or stretch the downscaled primary image to generate thumbnail. 3028 The cropping must be done on the primary jpeg image rather than the sensor active array. 3029 The stream cropping rule specified by "S5. Cropping" in camera3.h doesn't apply to the 3030 thumbnail image cropping. 3031 </hal_details> 3032 <tag id="BC" /> 3033 </entry> 3034 </controls> 3035 <static> 3036 <entry name="availableThumbnailSizes" type="int32" visibility="public" 3037 container="array" typedef="size" hwlevel="legacy"> 3038 <array> 3039 <size>2</size> 3040 <size>n</size> 3041 </array> 3042 <description>List of JPEG thumbnail sizes for android.jpeg.thumbnailSize supported by this 3043 camera device.</description> 3044 <details> 3045 This list will include at least one non-zero resolution, plus `(0,0)` for indicating no 3046 thumbnail should be generated. 3047 3048 Below condiditions will be satisfied for this size list: 3049 3050 * The sizes will be sorted by increasing pixel area (width x height). 3051 If several resolutions have the same area, they will be sorted by increasing width. 3052 * The aspect ratio of the largest thumbnail size will be same as the 3053 aspect ratio of largest JPEG output size in android.scaler.availableStreamConfigurations. 3054 The largest size is defined as the size that has the largest pixel area 3055 in a given size list. 3056 * Each output JPEG size in android.scaler.availableStreamConfigurations will have at least 3057 one corresponding size that has the same aspect ratio in availableThumbnailSizes, 3058 and vice versa. 3059 * All non-`(0, 0)` sizes will have non-zero widths and heights.</details> 3060 <tag id="BC" /> 3061 </entry> 3062 <entry name="maxSize" type="int32" visibility="system"> 3063 <description>Maximum size in bytes for the compressed 3064 JPEG buffer</description> 3065 <range>Must be large enough to fit any JPEG produced by 3066 the camera</range> 3067 <details>This is used for sizing the gralloc buffers for 3068 JPEG</details> 3069 </entry> 3070 </static> 3071 <dynamic> 3072 <clone entry="android.jpeg.gpsLocation" kind="controls"> 3073 </clone> 3074 <clone entry="android.jpeg.gpsCoordinates" kind="controls"> 3075 </clone> 3076 <clone entry="android.jpeg.gpsProcessingMethod" 3077 kind="controls"></clone> 3078 <clone entry="android.jpeg.gpsTimestamp" kind="controls"> 3079 </clone> 3080 <clone entry="android.jpeg.orientation" kind="controls"> 3081 </clone> 3082 <clone entry="android.jpeg.quality" kind="controls"> 3083 </clone> 3084 <entry name="size" type="int32"> 3085 <description>The size of the compressed JPEG image, in 3086 bytes</description> 3087 <range>&gt;= 0</range> 3088 <details>If no JPEG output is produced for the request, 3089 this must be 0. 3090 3091 Otherwise, this describes the real size of the compressed 3092 JPEG image placed in the output stream. More specifically, 3093 if android.jpeg.maxSize = 1000000, and a specific capture 3094 has android.jpeg.size = 500000, then the output buffer from 3095 the JPEG stream will be 1000000 bytes, of which the first 3096 500000 make up the real data.</details> 3097 <tag id="FUTURE" /> 3098 </entry> 3099 <clone entry="android.jpeg.thumbnailQuality" 3100 kind="controls"></clone> 3101 <clone entry="android.jpeg.thumbnailSize" kind="controls"> 3102 </clone> 3103 </dynamic> 3104 </section> 3105 <section name="lens"> 3106 <controls> 3107 <entry name="aperture" type="float" visibility="public" hwlevel="full"> 3108 <description>The desired lens aperture size, as a ratio of lens focal length to the 3109 effective aperture diameter.</description> 3110 <units>The f-number (f/N)</units> 3111 <range>android.lens.info.availableApertures</range> 3112 <details>Setting this value is only supported on the camera devices that have a variable 3113 aperture lens. 3114 3115 When this is supported and android.control.aeMode is OFF, 3116 this can be set along with android.sensor.exposureTime, 3117 android.sensor.sensitivity, and android.sensor.frameDuration 3118 to achieve manual exposure control. 3119 3120 The requested aperture value may take several frames to reach the 3121 requested value; the camera device will report the current (intermediate) 3122 aperture size in capture result metadata while the aperture is changing. 3123 While the aperture is still changing, android.lens.state will be set to MOVING. 3124 3125 When this is supported and android.control.aeMode is one of 3126 the ON modes, this will be overridden by the camera device 3127 auto-exposure algorithm, the overridden values are then provided 3128 back to the user in the corresponding result.</details> 3129 <tag id="V1" /> 3130 </entry> 3131 <entry name="filterDensity" type="float" visibility="public" hwlevel="full"> 3132 <description> 3133 The desired setting for the lens neutral density filter(s). 3134 </description> 3135 <units>Exposure Value (EV)</units> 3136 <range>android.lens.info.availableFilterDensities</range> 3137 <details> 3138 This control will not be supported on most camera devices. 3139 3140 Lens filters are typically used to lower the amount of light the 3141 sensor is exposed to (measured in steps of EV). As used here, an EV 3142 step is the standard logarithmic representation, which are 3143 non-negative, and inversely proportional to the amount of light 3144 hitting the sensor. For example, setting this to 0 would result 3145 in no reduction of the incoming light, and setting this to 2 would 3146 mean that the filter is set to reduce incoming light by two stops 3147 (allowing 1/4 of the prior amount of light to the sensor). 3148 3149 It may take several frames before the lens filter density changes 3150 to the requested value. While the filter density is still changing, 3151 android.lens.state will be set to MOVING. 3152 </details> 3153 <tag id="V1" /> 3154 </entry> 3155 <entry name="focalLength" type="float" visibility="public" hwlevel="legacy"> 3156 <description> 3157 The desired lens focal length; used for optical zoom. 3158 </description> 3159 <units>Millimeters</units> 3160 <range>android.lens.info.availableFocalLengths</range> 3161 <details> 3162 This setting controls the physical focal length of the camera 3163 device's lens. Changing the focal length changes the field of 3164 view of the camera device, and is usually used for optical zoom. 3165 3166 Like android.lens.focusDistance and android.lens.aperture, this 3167 setting won't be applied instantaneously, and it may take several 3168 frames before the lens can change to the requested focal length. 3169 While the focal length is still changing, android.lens.state will 3170 be set to MOVING. 3171 3172 Optical zoom will not be supported on most devices. 3173 </details> 3174 <tag id="V1" /> 3175 </entry> 3176 <entry name="focusDistance" type="float" visibility="public" hwlevel="full"> 3177 <description>Desired distance to plane of sharpest focus, 3178 measured from frontmost surface of the lens.</description> 3179 <units>See android.lens.info.focusDistanceCalibration for details</units> 3180 <range>&gt;= 0</range> 3181 <details> 3182 This control can be used for setting manual focus, on devices that support 3183 the MANUAL_SENSOR capability and have a variable-focus lens (see 3184 android.lens.info.minimumFocusDistance). 3185 3186 A value of `0.0f` means infinity focus. The value set will be clamped to 3187 `[0.0f, android.lens.info.minimumFocusDistance]`. 3188 3189 Like android.lens.focalLength, this setting won't be applied 3190 instantaneously, and it may take several frames before the lens 3191 can move to the requested focus distance. While the lens is still moving, 3192 android.lens.state will be set to MOVING. 3193 3194 LEGACY devices support at most setting this to `0.0f` 3195 for infinity focus. 3196 </details> 3197 <tag id="BC" /> 3198 <tag id="V1" /> 3199 </entry> 3200 <entry name="opticalStabilizationMode" type="byte" visibility="public" 3201 enum="true" hwlevel="limited"> 3202 <enum> 3203 <value>OFF 3204 <notes>Optical stabilization is unavailable.</notes> 3205 </value> 3206 <value optional="true">ON 3207 <notes>Optical stabilization is enabled.</notes> 3208 </value> 3209 </enum> 3210 <description> 3211 Sets whether the camera device uses optical image stabilization (OIS) 3212 when capturing images. 3213 </description> 3214 <range>android.lens.info.availableOpticalStabilization</range> 3215 <details> 3216 OIS is used to compensate for motion blur due to small 3217 movements of the camera during capture. Unlike digital image 3218 stabilization (android.control.videoStabilizationMode), OIS 3219 makes use of mechanical elements to stabilize the camera 3220 sensor, and thus allows for longer exposure times before 3221 camera shake becomes apparent. 3222 3223 Switching between different optical stabilization modes may take several 3224 frames to initialize, the camera device will report the current mode in 3225 capture result metadata. For example, When "ON" mode is requested, the 3226 optical stabilization modes in the first several capture results may still 3227 be "OFF", and it will become "ON" when the initialization is done. 3228 3229 If a camera device supports both OIS and digital image stabilization 3230 (android.control.videoStabilizationMode), turning both modes on may produce undesirable 3231 interaction, so it is recommended not to enable both at the same time. 3232 3233 Not all devices will support OIS; see 3234 android.lens.info.availableOpticalStabilization for 3235 available controls. 3236 </details> 3237 <tag id="V1" /> 3238 </entry> 3239 </controls> 3240 <static> 3241 <namespace name="info"> 3242 <entry name="availableApertures" type="float" visibility="public" 3243 container="array" hwlevel="full"> 3244 <array> 3245 <size>n</size> 3246 </array> 3247 <description>List of aperture size values for android.lens.aperture that are 3248 supported by this camera device.</description> 3249 <units>The aperture f-number</units> 3250 <details>If the camera device doesn't support a variable lens aperture, 3251 this list will contain only one value, which is the fixed aperture size. 3252 3253 If the camera device supports a variable aperture, the aperture values 3254 in this list will be sorted in ascending order.</details> 3255 <tag id="V1" /> 3256 </entry> 3257 <entry name="availableFilterDensities" type="float" visibility="public" 3258 container="array" hwlevel="full"> 3259 <array> 3260 <size>n</size> 3261 </array> 3262 <description> 3263 List of neutral density filter values for 3264 android.lens.filterDensity that are supported by this camera device. 3265 </description> 3266 <units>Exposure value (EV)</units> 3267 <range> 3268 Values are &gt;= 0 3269 </range> 3270 <details> 3271 If a neutral density filter is not supported by this camera device, 3272 this list will contain only 0. Otherwise, this list will include every 3273 filter density supported by the camera device, in ascending order. 3274 </details> 3275 <tag id="V1" /> 3276 </entry> 3277 <entry name="availableFocalLengths" type="float" visibility="public" 3278 type_notes="The list of available focal lengths" 3279 container="array" hwlevel="legacy"> 3280 <array> 3281 <size>n</size> 3282 </array> 3283 <description> 3284 List of focal lengths for android.lens.focalLength that are supported by this camera 3285 device. 3286 </description> 3287 <units>Millimeters</units> 3288 <range> 3289 Values are &gt; 0 3290 </range> 3291 <details> 3292 If optical zoom is not supported, this list will only contain 3293 a single value corresponding to the fixed focal length of the 3294 device. Otherwise, this list will include every focal length supported 3295 by the camera device, in ascending order. 3296 </details> 3297 <tag id="BC" /> 3298 <tag id="V1" /> 3299 </entry> 3300 <entry name="availableOpticalStabilization" type="byte" 3301 visibility="public" type_notes="list of enums" container="array" 3302 typedef="enumList" hwlevel="limited"> 3303 <array> 3304 <size>n</size> 3305 </array> 3306 <description> 3307 List of optical image stabilization (OIS) modes for 3308 android.lens.opticalStabilizationMode that are supported by this camera device. 3309 </description> 3310 <range>Any value listed in android.lens.opticalStabilizationMode</range> 3311 <details> 3312 If OIS is not supported by a given camera device, this list will 3313 contain only OFF. 3314 </details> 3315 <tag id="V1" /> 3316 </entry> 3317 <entry name="hyperfocalDistance" type="float" visibility="public" optional="true" 3318 hwlevel="limited"> 3319 <description>Hyperfocal distance for this lens.</description> 3320 <units>See android.lens.info.focusDistanceCalibration for details</units> 3321 <range>If lens is fixed focus, &gt;= 0. If lens has focuser unit, the value is 3322 within `(0.0f, android.lens.info.minimumFocusDistance]`</range> 3323 <details> 3324 If the lens is not fixed focus, the camera device will report this 3325 field when android.lens.info.focusDistanceCalibration is APPROXIMATE or CALIBRATED. 3326 </details> 3327 </entry> 3328 <entry name="minimumFocusDistance" type="float" visibility="public" optional="true" 3329 hwlevel="limited"> 3330 <description>Shortest distance from frontmost surface 3331 of the lens that can be brought into sharp focus.</description> 3332 <units>See android.lens.info.focusDistanceCalibration for details</units> 3333 <range>&gt;= 0</range> 3334 <details>If the lens is fixed-focus, this will be 3335 0.</details> 3336 <hal_details>Mandatory for FULL devices; LIMITED devices 3337 must always set this value to 0 for fixed-focus; and may omit 3338 the minimum focus distance otherwise. 3339 3340 This field is also mandatory for all devices advertising 3341 the MANUAL_SENSOR capability.</hal_details> 3342 <tag id="V1" /> 3343 </entry> 3344 <entry name="shadingMapSize" type="int32" visibility="hidden" 3345 type_notes="width and height (N, M) of lens shading map provided by the camera device." 3346 container="array" typedef="size" hwlevel="full"> 3347 <array> 3348 <size>2</size> 3349 </array> 3350 <description>Dimensions of lens shading map.</description> 3351 <range>Both values &gt;= 1</range> 3352 <details> 3353 The map should be on the order of 30-40 rows and columns, and 3354 must be smaller than 64x64. 3355 </details> 3356 <tag id="V1" /> 3357 </entry> 3358 <entry name="focusDistanceCalibration" type="byte" visibility="public" 3359 enum="true" hwlevel="limited"> 3360 <enum> 3361 <value>UNCALIBRATED 3362 <notes> 3363 The lens focus distance is not accurate, and the units used for 3364 android.lens.focusDistance do not correspond to any physical units. 3365 3366 Setting the lens to the same focus distance on separate occasions may 3367 result in a different real focus distance, depending on factors such 3368 as the orientation of the device, the age of the focusing mechanism, 3369 and the device temperature. The focus distance value will still be 3370 in the range of `[0, android.lens.info.minimumFocusDistance]`, where 0 3371 represents the farthest focus. 3372 </notes> 3373 </value> 3374 <value>APPROXIMATE 3375 <notes> 3376 The lens focus distance is measured in diopters. 3377 3378 However, setting the lens to the same focus distance 3379 on separate occasions may result in a different real 3380 focus distance, depending on factors such as the 3381 orientation of the device, the age of the focusing 3382 mechanism, and the device temperature. 3383 </notes> 3384 </value> 3385 <value>CALIBRATED 3386 <notes> 3387 The lens focus distance is measured in diopters, and 3388 is calibrated. 3389 3390 The lens mechanism is calibrated so that setting the 3391 same focus distance is repeatable on multiple 3392 occasions with good accuracy, and the focus distance 3393 corresponds to the real physical distance to the plane 3394 of best focus. 3395 </notes> 3396 </value> 3397 </enum> 3398 <description>The lens focus distance calibration quality.</description> 3399 <details> 3400 The lens focus distance calibration quality determines the reliability of 3401 focus related metadata entries, i.e. android.lens.focusDistance, 3402 android.lens.focusRange, android.lens.info.hyperfocalDistance, and 3403 android.lens.info.minimumFocusDistance. 3404 3405 APPROXIMATE and CALIBRATED devices report the focus metadata in 3406 units of diopters (1/meter), so `0.0f` represents focusing at infinity, 3407 and increasing positive numbers represent focusing closer and closer 3408 to the camera device. The focus distance control also uses diopters 3409 on these devices. 3410 3411 UNCALIBRATED devices do not use units that are directly comparable 3412 to any real physical measurement, but `0.0f` still represents farthest 3413 focus, and android.lens.info.minimumFocusDistance represents the 3414 nearest focus the device can achieve. 3415 </details> 3416 <hal_details> 3417 For devices advertise APPROXIMATE quality or higher, diopters 0 (infinity 3418 focus) must work. When autofocus is disabled (android.control.afMode == OFF) 3419 and the lens focus distance is set to 0 diopters 3420 (android.lens.focusDistance == 0), the lens will move to focus at infinity 3421 and is stably focused at infinity even if the device tilts. It may take the 3422 lens some time to move; during the move the lens state should be MOVING and 3423 the output diopter value should be changing toward 0. 3424 </hal_details> 3425 <tag id="V1" /> 3426 </entry> 3427 </namespace> 3428 <entry name="facing" type="byte" visibility="public" enum="true" hwlevel="legacy"> 3429 <enum> 3430 <value>FRONT 3431 <notes> 3432 The camera device faces the same direction as the device's screen. 3433 </notes></value> 3434 <value>BACK 3435 <notes> 3436 The camera device faces the opposite direction as the device's screen. 3437 </notes></value> 3438 <value>EXTERNAL 3439 <notes> 3440 The camera device is an external camera, and has no fixed facing relative to the 3441 device's screen. 3442 </notes></value> 3443 </enum> 3444 <description>Direction the camera faces relative to 3445 device screen.</description> 3446 </entry> 3447 <entry name="poseRotation" type="float" visibility="public" 3448 container="array"> 3449 <array> 3450 <size>4</size> 3451 </array> 3452 <description> 3453 The orientation of the camera relative to the sensor 3454 coordinate system. 3455 </description> 3456 <units> 3457 Quarternion coefficients 3458 </units> 3459 <details> 3460 The four coefficients that describe the quarternion 3461 rotation from the Android sensor coordinate system to a 3462 camera-aligned coordinate system where the X-axis is 3463 aligned with the long side of the image sensor, the Y-axis 3464 is aligned with the short side of the image sensor, and 3465 the Z-axis is aligned with the optical axis of the sensor. 3466 3467 To convert from the quarternion coefficients `(x,y,z,w)` 3468 to the axis of rotation `(a_x, a_y, a_z)` and rotation 3469 amount `theta`, the following formulas can be used: 3470 3471 theta = 2 * acos(w) 3472 a_x = x / sin(theta/2) 3473 a_y = y / sin(theta/2) 3474 a_z = z / sin(theta/2) 3475 3476 To create a 3x3 rotation matrix that applies the rotation 3477 defined by this quarternion, the following matrix can be 3478 used: 3479 3480 R = [ 1 - 2y^2 - 2z^2, 2xy - 2zw, 2xz + 2yw, 3481 2xy + 2zw, 1 - 2x^2 - 2z^2, 2yz - 2xw, 3482 2xz - 2yw, 2yz + 2xw, 1 - 2x^2 - 2y^2 ] 3483 3484 This matrix can then be used to apply the rotation to a 3485 column vector point with 3486 3487 `p' = Rp` 3488 3489 where `p` is in the device sensor coordinate system, and 3490 `p'` is in the camera-oriented coordinate system. 3491 </details> 3492 <tag id="DEPTH" /> 3493 </entry> 3494 <entry name="poseTranslation" type="float" visibility="public" 3495 container="array"> 3496 <array> 3497 <size>3</size> 3498 </array> 3499 <description>Position of the camera optical center.</description> 3500 <units>Meters</units> 3501 <details> 3502 As measured in the device sensor coordinate system, the 3503 position of the camera device's optical center, as a 3504 three-dimensional vector `(x,y,z)`. 3505 3506 To transform a world position to a camera-device centered 3507 coordinate system, the position must be translated by this 3508 vector and then rotated by android.lens.poseRotation. 3509 </details> 3510 <tag id="DEPTH" /> 3511 </entry> 3512 </static> 3513 <dynamic> 3514 <clone entry="android.lens.aperture" kind="controls"> 3515 <tag id="V1" /> 3516 </clone> 3517 <clone entry="android.lens.filterDensity" kind="controls"> 3518 <tag id="V1" /> 3519 </clone> 3520 <clone entry="android.lens.focalLength" kind="controls"> 3521 <tag id="BC" /> 3522 </clone> 3523 <clone entry="android.lens.focusDistance" kind="controls"> 3524 <details>Should be zero for fixed-focus cameras</details> 3525 <tag id="BC" /> 3526 </clone> 3527 <entry name="focusRange" type="float" visibility="public" 3528 type_notes="Range of scene distances that are in focus" 3529 container="array" typedef="pairFloatFloat" hwlevel="limited"> 3530 <array> 3531 <size>2</size> 3532 </array> 3533 <description>The range of scene distances that are in 3534 sharp focus (depth of field).</description> 3535 <units>A pair of focus distances in diopters: (near, 3536 far); see android.lens.info.focusDistanceCalibration for details.</units> 3537 <range>&gt;=0</range> 3538 <details>If variable focus not supported, can still report 3539 fixed depth of field range</details> 3540 <tag id="BC" /> 3541 </entry> 3542 <clone entry="android.lens.opticalStabilizationMode" 3543 kind="controls"> 3544 <tag id="V1" /> 3545 </clone> 3546 <entry name="state" type="byte" visibility="public" enum="true" hwlevel="limited"> 3547 <enum> 3548 <value>STATIONARY 3549 <notes> 3550 The lens parameters (android.lens.focalLength, android.lens.focusDistance, 3551 android.lens.filterDensity and android.lens.aperture) are not changing. 3552 </notes> 3553 </value> 3554 <value>MOVING 3555 <notes> 3556 One or several of the lens parameters 3557 (android.lens.focalLength, android.lens.focusDistance, 3558 android.lens.filterDensity or android.lens.aperture) is 3559 currently changing. 3560 </notes> 3561 </value> 3562 </enum> 3563 <description>Current lens status.</description> 3564 <details> 3565 For lens parameters android.lens.focalLength, android.lens.focusDistance, 3566 android.lens.filterDensity and android.lens.aperture, when changes are requested, 3567 they may take several frames to reach the requested values. This state indicates 3568 the current status of the lens parameters. 3569 3570 When the state is STATIONARY, the lens parameters are not changing. This could be 3571 either because the parameters are all fixed, or because the lens has had enough 3572 time to reach the most recently-requested values. 3573 If all these lens parameters are not changable for a camera device, as listed below: 3574 3575 * Fixed focus (`android.lens.info.minimumFocusDistance == 0`), which means 3576 android.lens.focusDistance parameter will always be 0. 3577 * Fixed focal length (android.lens.info.availableFocalLengths contains single value), 3578 which means the optical zoom is not supported. 3579 * No ND filter (android.lens.info.availableFilterDensities contains only 0). 3580 * Fixed aperture (android.lens.info.availableApertures contains single value). 3581 3582 Then this state will always be STATIONARY. 3583 3584 When the state is MOVING, it indicates that at least one of the lens parameters 3585 is changing. 3586 </details> 3587 <tag id="V1" /> 3588 </entry> 3589 <clone entry="android.lens.poseRotation" kind="static"> 3590 </clone> 3591 <clone entry="android.lens.poseTranslation" kind="static"> 3592 </clone> 3593 <clone entry="android.lens.intrinsicCalibration" kind="static"> 3594 </clone> 3595 <clone entry="android.lens.radialDistortion" kind="static"> 3596 </clone> 3597 </dynamic> 3598 <static> 3599 <entry name="intrinsicCalibration" type="float" visibility="public" 3600 container="array"> 3601 <array> 3602 <size>5</size> 3603 </array> 3604 <description> 3605 The parameters for this camera device's intrinsic 3606 calibration. 3607 </description> 3608 <units> 3609 Pixels in the android.sensor.info.activeArraySize coordinate 3610 system. 3611 </units> 3612 <details> 3613 The five calibration parameters that describe the 3614 transform from camera-centric 3D coordinates to sensor 3615 pixel coordinates: 3616 3617 [f_x, f_y, c_x, c_y, s] 3618 3619 Where `f_x` and `f_y` are the horizontal and vertical 3620 focal lengths, `[c_x, c_y]` is the position of the optical 3621 axis, and `s` is a skew parameter for the sensor plane not 3622 being aligned with the lens plane. 3623 3624 These are typically used within a transformation matrix K: 3625 3626 K = [ f_x, s, c_x, 3627 0, f_y, c_y, 3628 0 0, 1 ] 3629 3630 which can then be combined with the camera pose rotation 3631 `R` and translation `t` (android.lens.poseRotation and 3632 android.lens.poseTranslation, respective) to calculate the 3633 complete transform from world coordinates to pixel 3634 coordinates: 3635 3636 P = [ K 0 * [ R t 3637 0 1 ] 0 1 ] 3638 3639 and with `p_w` being a point in the world coordinate system 3640 and `p_s` being a point in the camera active pixel array 3641 coordinate system, and with the mapping including the 3642 homogeneous division by z: 3643 3644 p_h = (x_h, y_h, z_h) = P p_w 3645 p_s = p_h / z_h 3646 3647 so `[x_s, y_s]` is the pixel coordinates of the world 3648 point, `z_s = 1`, and `w_s` is a measurement of disparity 3649 (depth) in pixel coordinates. 3650 </details> 3651 <tag id="DEPTH" /> 3652 </entry> 3653 <entry name="radialDistortion" type="float" visibility="public" 3654 container="array"> 3655 <array> 3656 <size>3</size> 3657 </array> 3658 <description> 3659 The correction coefficients to correct for this camera device's 3660 radial lens distortion. 3661 </description> 3662 <units> 3663 Coefficients for a 6th-degree even radial polynomial. 3664 </units> 3665 <details> 3666 Three cofficients `[kappa_1, kappa_2, kappa_3]` that 3667 can be used to correct the lens's radial geometric 3668 distortion with the mapping equations: 3669 3670 x_c = x_i * ( 1 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) 3671 y_c = y_i * ( 1 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) 3672 3673 where `[x_i, y_i]` are normalized coordinates with `(0,0)` 3674 at the lens optical center, and `[-1, 1]` are the edges of 3675 the active pixel array; and where `[x_c, y_c]` are the 3676 corrected normalized coordinates with radial distortion 3677 removed; and `r^2 = x_i^2 + y_i^2`. 3678 </details> 3679 <tag id="DEPTH" /> 3680 </entry> 3681 </static> 3682 </section> 3683 <section name="noiseReduction"> 3684 <controls> 3685 <entry name="mode" type="byte" visibility="public" enum="true" hwlevel="full"> 3686 <enum> 3687 <value>OFF 3688 <notes>No noise reduction is applied.</notes></value> 3689 <value>FAST 3690 <notes>Noise reduction is applied without reducing frame rate relative to sensor 3691 output.</notes></value> 3692 <value>HIGH_QUALITY 3693 <notes>High-quality noise reduction is applied, at the cost of possibly reduced frame 3694 rate relative to sensor output.</notes></value> 3695 <value optional="true">MINIMAL 3696 <notes>MINIMAL noise reduction is applied without reducing frame rate relative to 3697 sensor output. </notes></value> 3698 </enum> 3699 <description>Mode of operation for the noise reduction algorithm.</description> 3700 <range>android.noiseReduction.availableNoiseReductionModes</range> 3701 <details>The noise reduction algorithm attempts to improve image quality by removing 3702 excessive noise added by the capture process, especially in dark conditions. 3703 3704 OFF means no noise reduction will be applied by the camera device, for both raw and 3705 YUV domain. 3706 3707 MINIMAL means that only sensor raw domain basic noise reduction is enabled ,to remove 3708 demosaicing or other processing artifacts. For YUV_REPROCESSING, MINIMAL is same as OFF. 3709 This mode is optional, may not be support by all devices. The application should check 3710 android.noiseReduction.availableNoiseReductionModes before using it. 3711 3712 FAST/HIGH_QUALITY both mean camera device determined noise filtering 3713 will be applied. HIGH_QUALITY mode indicates that the camera device 3714 will use the highest-quality noise filtering algorithms, 3715 even if it slows down capture rate. FAST means the camera device will not 3716 slow down capture rate when applying noise filtering. 3717 3718 For YUV_REPROCESSING, these FAST/HIGH_QUALITY modes both mean that the camera device 3719 will apply FAST/HIGH_QUALITY YUV domain noise reduction, respectively. The camera device 3720 may adjust the noise reduction parameters for best image quality based on the 3721 android.reprocess.effectiveExposureFactor if it is set. 3722 </details> 3723 <hal_details> 3724 For YUV_REPROCESSING The HAL can use android.reprocess.effectiveExposureFactor to 3725 adjust the internal noise reduction parameters appropriately to get the best quality 3726 images. 3727 </hal_details> 3728 <tag id="V1" /> 3729 <tag id="REPROC" /> 3730 </entry> 3731 <entry name="strength" type="byte"> 3732 <description>Control the amount of noise reduction 3733 applied to the images</description> 3734 <units>1-10; 10 is max noise reduction</units> 3735 <range>1 - 10</range> 3736 <tag id="FUTURE" /> 3737 </entry> 3738 </controls> 3739 <static> 3740 <entry name="availableNoiseReductionModes" type="byte" visibility="public" 3741 type_notes="list of enums" container="array" typedef="enumList" hwlevel="limited"> 3742 <array> 3743 <size>n</size> 3744 </array> 3745 <description> 3746 List of noise reduction modes for android.noiseReduction.mode that are supported 3747 by this camera device. 3748 </description> 3749 <range>Any value listed in android.noiseReduction.mode</range> 3750 <details> 3751 Full-capability camera devices will always support OFF and FAST. 3752 3753 Legacy-capability camera devices will only support FAST mode. 3754 </details> 3755 <hal_details> 3756 HAL must support both FAST and HIGH_QUALITY if noise reduction control is available 3757 on the camera device, but the underlying implementation can be the same for both modes. 3758 That is, if the highest quality implementation on the camera device does not slow down 3759 capture rate, then FAST and HIGH_QUALITY will generate the same output. 3760 </hal_details> 3761 <tag id="V1" /> 3762 <tag id="REPROC" /> 3763 </entry> 3764 </static> 3765 <dynamic> 3766 <clone entry="android.noiseReduction.mode" kind="controls"> 3767 <tag id="V1" /> 3768 <tag id="REPROC" /> 3769 </clone> 3770 </dynamic> 3771 </section> 3772 <section name="quirks"> 3773 <static> 3774 <entry name="meteringCropRegion" type="byte" visibility="system" deprecated="true" optional="true"> 3775 <description>If set to 1, the camera service does not 3776 scale 'normalized' coordinates with respect to the crop 3777 region. This applies to metering input (a{e,f,wb}Region 3778 and output (face rectangles).</description> 3779 <details>Normalized coordinates refer to those in the 3780 (-1000,1000) range mentioned in the 3781 android.hardware.Camera API. 3782 3783 HAL implementations should instead always use and emit 3784 sensor array-relative coordinates for all region data. Does 3785 not need to be listed in static metadata. Support will be 3786 removed in future versions of camera service.</details> 3787 </entry> 3788 <entry name="triggerAfWithAuto" type="byte" visibility="system" deprecated="true" optional="true"> 3789 <description>If set to 1, then the camera service always 3790 switches to FOCUS_MODE_AUTO before issuing a AF 3791 trigger.</description> 3792 <details>HAL implementations should implement AF trigger 3793 modes for AUTO, MACRO, CONTINUOUS_FOCUS, and 3794 CONTINUOUS_PICTURE modes instead of using this flag. Does 3795 not need to be listed in static metadata. Support will be 3796 removed in future versions of camera service</details> 3797 </entry> 3798 <entry name="useZslFormat" type="byte" visibility="system" deprecated="true" optional="true"> 3799 <description>If set to 1, the camera service uses 3800 CAMERA2_PIXEL_FORMAT_ZSL instead of 3801 HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED for the zero 3802 shutter lag stream</description> 3803 <details>HAL implementations should use gralloc usage flags 3804 to determine that a stream will be used for 3805 zero-shutter-lag, instead of relying on an explicit 3806 format setting. Does not need to be listed in static 3807 metadata. Support will be removed in future versions of 3808 camera service.</details> 3809 </entry> 3810 <entry name="usePartialResult" type="byte" visibility="hidden" deprecated="true" optional="true"> 3811 <description> 3812 If set to 1, the HAL will always split result 3813 metadata for a single capture into multiple buffers, 3814 returned using multiple process_capture_result calls. 3815 </description> 3816 <details> 3817 Does not need to be listed in static 3818 metadata. Support for partial results will be reworked in 3819 future versions of camera service. This quirk will stop 3820 working at that point; DO NOT USE without careful 3821 consideration of future support. 3822 </details> 3823 <hal_details> 3824 Refer to `camera3_capture_result::partial_result` 3825 for information on how to implement partial results. 3826 </hal_details> 3827 </entry> 3828 </static> 3829 <dynamic> 3830 <entry name="partialResult" type="byte" visibility="hidden" deprecated="true" optional="true" enum="true" typedef="boolean"> 3831 <enum> 3832 <value>FINAL 3833 <notes>The last or only metadata result buffer 3834 for this capture.</notes> 3835 </value> 3836 <value>PARTIAL 3837 <notes>A partial buffer of result metadata for this 3838 capture. More result buffers for this capture will be sent 3839 by the camera device, the last of which will be marked 3840 FINAL.</notes> 3841 </value> 3842 </enum> 3843 <description> 3844 Whether a result given to the framework is the 3845 final one for the capture, or only a partial that contains a 3846 subset of the full set of dynamic metadata 3847 values.</description> 3848 <range>Optional. Default value is FINAL.</range> 3849 <details> 3850 The entries in the result metadata buffers for a 3851 single capture may not overlap, except for this entry. The 3852 FINAL buffers must retain FIFO ordering relative to the 3853 requests that generate them, so the FINAL buffer for frame 3 must 3854 always be sent to the framework after the FINAL buffer for frame 2, and 3855 before the FINAL buffer for frame 4. PARTIAL buffers may be returned 3856 in any order relative to other frames, but all PARTIAL buffers for a given 3857 capture must arrive before the FINAL buffer for that capture. This entry may 3858 only be used by the camera device if quirks.usePartialResult is set to 1. 3859 </details> 3860 <hal_details> 3861 Refer to `camera3_capture_result::partial_result` 3862 for information on how to implement partial results. 3863 </hal_details> 3864 </entry> 3865 </dynamic> 3866 </section> 3867 <section name="request"> 3868 <controls> 3869 <entry name="frameCount" type="int32" visibility="system" deprecated="true"> 3870 <description>A frame counter set by the framework. Must 3871 be maintained unchanged in output frame. This value monotonically 3872 increases with every new result (that is, each new result has a unique 3873 frameCount value). 3874 </description> 3875 <units>incrementing integer</units> 3876 <range>Any int.</range> 3877 </entry> 3878 <entry name="id" type="int32" visibility="hidden"> 3879 <description>An application-specified ID for the current 3880 request. Must be maintained unchanged in output 3881 frame</description> 3882 <units>arbitrary integer assigned by application</units> 3883 <range>Any int</range> 3884 <tag id="V1" /> 3885 </entry> 3886 <entry name="inputStreams" type="int32" visibility="system" deprecated="true" 3887 container="array"> 3888 <array> 3889 <size>n</size> 3890 </array> 3891 <description>List which camera reprocess stream is used 3892 for the source of reprocessing data.</description> 3893 <units>List of camera reprocess stream IDs</units> 3894 <range> 3895 Typically, only one entry allowed, must be a valid reprocess stream ID. 3896 </range> 3897 <details>Only meaningful when android.request.type == 3898 REPROCESS. Ignored otherwise</details> 3899 <tag id="HAL2" /> 3900 </entry> 3901 <entry name="metadataMode" type="byte" visibility="system" 3902 enum="true"> 3903 <enum> 3904 <value>NONE 3905 <notes>No metadata should be produced on output, except 3906 for application-bound buffer data. If no 3907 application-bound streams exist, no frame should be 3908 placed in the output frame queue. If such streams 3909 exist, a frame should be placed on the output queue 3910 with null metadata but with the necessary output buffer 3911 information. Timestamp information should still be 3912 included with any output stream buffers</notes></value> 3913 <value>FULL 3914 <notes>All metadata should be produced. Statistics will 3915 only be produced if they are separately 3916 enabled</notes></value> 3917 </enum> 3918 <description>How much metadata to produce on 3919 output</description> 3920 <tag id="FUTURE" /> 3921 </entry> 3922 <entry name="outputStreams" type="int32" visibility="system" deprecated="true" 3923 container="array"> 3924 <array> 3925 <size>n</size> 3926 </array> 3927 <description>Lists which camera output streams image data 3928 from this capture must be sent to</description> 3929 <units>List of camera stream IDs</units> 3930 <range>List must only include streams that have been 3931 created</range> 3932 <details>If no output streams are listed, then the image 3933 data should simply be discarded. The image data must 3934 still be captured for metadata and statistics production, 3935 and the lens and flash must operate as requested.</details> 3936 <tag id="HAL2" /> 3937 </entry> 3938 <entry name="type" type="byte" visibility="system" deprecated="true" enum="true"> 3939 <enum> 3940 <value>CAPTURE 3941 <notes>Capture a new image from the imaging hardware, 3942 and process it according to the 3943 settings</notes></value> 3944 <value>REPROCESS 3945 <notes>Process previously captured data; the 3946 android.request.inputStreams parameter determines the 3947 source reprocessing stream. TODO: Mark dynamic metadata 3948 needed for reprocessing with [RP]</notes></value> 3949 </enum> 3950 <description>The type of the request; either CAPTURE or 3951 REPROCESS. For HAL3, this tag is redundant. 3952 </description> 3953 <tag id="HAL2" /> 3954 </entry> 3955 </controls> 3956 <static> 3957 <entry name="maxNumOutputStreams" type="int32" visibility="hidden" 3958 container="array" hwlevel="legacy"> 3959 <array> 3960 <size>3</size> 3961 </array> 3962 <description>The maximum numbers of different types of output streams 3963 that can be configured and used simultaneously by a camera device. 3964 </description> 3965 <range> 3966 For processed (and stalling) format streams, &gt;= 1. 3967 3968 For Raw format (either stalling or non-stalling) streams, &gt;= 0. 3969 3970 For processed (but not stalling) format streams, &gt;= 3 3971 for FULL mode devices (`android.info.supportedHardwareLevel == FULL`); 3972 &gt;= 2 for LIMITED mode devices (`android.info.supportedHardwareLevel == LIMITED`). 3973 </range> 3974 <details> 3975 This is a 3 element tuple that contains the max number of output simultaneous 3976 streams for raw sensor, processed (but not stalling), and processed (and stalling) 3977 formats respectively. For example, assuming that JPEG is typically a processed and 3978 stalling stream, if max raw sensor format output stream number is 1, max YUV streams 3979 number is 3, and max JPEG stream number is 2, then this tuple should be `(1, 3, 2)`. 3980 3981 This lists the upper bound of the number of output streams supported by 3982 the camera device. Using more streams simultaneously may require more hardware and 3983 CPU resources that will consume more power. The image format for an output stream can 3984 be any supported format provided by android.scaler.availableStreamConfigurations. 3985 The formats defined in android.scaler.availableStreamConfigurations can be catergorized 3986 into the 3 stream types as below: 3987 3988 * Processed (but stalling): any non-RAW format with a stallDurations &gt; 0. 3989 Typically {@link android.graphics.ImageFormat#JPEG JPEG format}. 3990 * Raw formats: {@link android.graphics.ImageFormat#RAW_SENSOR RAW_SENSOR}, {@link 3991 android.graphics.ImageFormat#RAW10 RAW10}, or {@link android.graphics.ImageFormat#RAW12 3992 RAW12}. 3993 * Processed (but not-stalling): any non-RAW format without a stall duration. 3994 Typically {@link android.graphics.ImageFormat#YUV_420_888 YUV_420_888}, 3995 {@link android.graphics.ImageFormat#NV21 NV21}, or 3996 {@link android.graphics.ImageFormat#YV12 YV12}. 3997 </details> 3998 <tag id="BC" /> 3999 </entry> 4000 <entry name="maxNumOutputRaw" type="int32" visibility="public" synthetic="true" hwlevel="legacy"> 4001 <description>The maximum numbers of different types of output streams 4002 that can be configured and used simultaneously by a camera device 4003 for any `RAW` formats. 4004 </description> 4005 <range> 4006 &gt;= 0 4007 </range> 4008 <details> 4009 This value contains the max number of output simultaneous 4010 streams from the raw sensor. 4011 4012 This lists the upper bound of the number of output streams supported by 4013 the camera device. Using more streams simultaneously may require more hardware and 4014 CPU resources that will consume more power. The image format for this kind of an output stream can 4015 be any `RAW` and supported format provided by android.scaler.streamConfigurationMap. 4016 4017 In particular, a `RAW` format is typically one of: 4018 4019 * {@link android.graphics.ImageFormat#RAW_SENSOR RAW_SENSOR} 4020 * {@link android.graphics.ImageFormat#RAW10 RAW10} 4021 * {@link android.graphics.ImageFormat#RAW12 RAW12} 4022 4023 LEGACY mode devices (android.info.supportedHardwareLevel `==` LEGACY) 4024 never support raw streams. 4025 </details> 4026 </entry> 4027 <entry name="maxNumOutputProc" type="int32" visibility="public" synthetic="true" hwlevel="legacy"> 4028 <description>The maximum numbers of different types of output streams 4029 that can be configured and used simultaneously by a camera device 4030 for any processed (but not-stalling) formats. 4031 </description> 4032 <range> 4033 &gt;= 3 4034 for FULL mode devices (`android.info.supportedHardwareLevel == FULL`); 4035 &gt;= 2 for LIMITED mode devices (`android.info.supportedHardwareLevel == LIMITED`). 4036 </range> 4037 <details> 4038 This value contains the max number of output simultaneous 4039 streams for any processed (but not-stalling) formats. 4040 4041 This lists the upper bound of the number of output streams supported by 4042 the camera device. Using more streams simultaneously may require more hardware and 4043 CPU resources that will consume more power. The image format for this kind of an output stream can 4044 be any non-`RAW` and supported format provided by android.scaler.streamConfigurationMap. 4045 4046 Processed (but not-stalling) is defined as any non-RAW format without a stall duration. 4047 Typically: 4048 4049 * {@link android.graphics.ImageFormat#YUV_420_888 YUV_420_888} 4050 * {@link android.graphics.ImageFormat#NV21 NV21} 4051 * {@link android.graphics.ImageFormat#YV12 YV12} 4052 * Implementation-defined formats, i.e. {@link 4053 android.hardware.camera2.params.StreamConfigurationMap#isOutputSupportedFor(Class)} 4054 4055 For full guarantees, query {@link 4056 android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration} with a 4057 processed format -- it will return 0 for a non-stalling stream. 4058 4059 LEGACY devices will support at least 2 processing/non-stalling streams. 4060 </details> 4061 </entry> 4062 <entry name="maxNumOutputProcStalling" type="int32" visibility="public" synthetic="true" hwlevel="legacy"> 4063 <description>The maximum numbers of different types of output streams 4064 that can be configured and used simultaneously by a camera device 4065 for any processed (and stalling) formats. 4066 </description> 4067 <range> 4068 &gt;= 1 4069 </range> 4070 <details> 4071 This value contains the max number of output simultaneous 4072 streams for any processed (but not-stalling) formats. 4073 4074 This lists the upper bound of the number of output streams supported by 4075 the camera device. Using more streams simultaneously may require more hardware and 4076 CPU resources that will consume more power. The image format for this kind of an output stream can 4077 be any non-`RAW` and supported format provided by android.scaler.streamConfigurationMap. 4078 4079 A processed and stalling format is defined as any non-RAW format with a stallDurations 4080 &gt; 0. Typically only the {@link android.graphics.ImageFormat#JPEG JPEG format} is a 4081 stalling format. 4082 4083 For full guarantees, query {@link 4084 android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration} with a 4085 processed format -- it will return a non-0 value for a stalling stream. 4086 4087 LEGACY devices will support up to 1 processing/stalling stream. 4088 </details> 4089 </entry> 4090 <entry name="maxNumReprocessStreams" type="int32" visibility="system" 4091 deprecated="true" container="array"> 4092 <array> 4093 <size>1</size> 4094 </array> 4095 <description>How many reprocessing streams of any type 4096 can be allocated at the same time.</description> 4097 <range>&gt;= 0</range> 4098 <details> 4099 Only used by HAL2.x. 4100 4101 When set to 0, it means no reprocess stream is supported. 4102 </details> 4103 <tag id="HAL2" /> 4104 </entry> 4105 <entry name="maxNumInputStreams" type="int32" visibility="public" hwlevel="full"> 4106 <description> 4107 The maximum numbers of any type of input streams 4108 that can be configured and used simultaneously by a camera device. 4109 </description> 4110 <range> 4111 0 or 1. 4112 </range> 4113 <details>When set to 0, it means no input stream is supported. 4114 4115 The image format for a input stream can be any supported format returned by {@link 4116 android.hardware.camera2.params.StreamConfigurationMap#getInputFormats}. When using an 4117 input stream, there must be at least one output stream configured to to receive the 4118 reprocessed images. 4119 4120 When an input stream and some output streams are used in a reprocessing request, 4121 only the input buffer will be used to produce these output stream buffers, and a 4122 new sensor image will not be captured. 4123 4124 For example, for Zero Shutter Lag (ZSL) still capture use case, the input 4125 stream image format will be PRIVATE, the associated output stream image format 4126 should be JPEG. 4127 </details> 4128 <hal_details> 4129 For the reprocessing flow and controls, see 4130 hardware/libhardware/include/hardware/camera3.h Section 10 for more details. 4131 </hal_details> 4132 <tag id="REPROC" /> 4133 </entry> 4134 </static> 4135 <dynamic> 4136 <entry name="frameCount" type="int32" visibility="hidden" deprecated="true"> 4137 <description>A frame counter set by the framework. This value monotonically 4138 increases with every new result (that is, each new result has a unique 4139 frameCount value).</description> 4140 <units>count of frames</units> 4141 <range>&gt; 0</range> 4142 <details>Reset on release()</details> 4143 </entry> 4144 <clone entry="android.request.id" kind="controls"></clone> 4145 <clone entry="android.request.metadataMode" 4146 kind="controls"></clone> 4147 <clone entry="android.request.outputStreams" 4148 kind="controls"></clone> 4149 <entry name="pipelineDepth" type="byte" visibility="public" hwlevel="legacy"> 4150 <description>Specifies the number of pipeline stages the frame went 4151 through from when it was exposed to when the final completed result 4152 was available to the framework.</description> 4153 <range>&lt;= android.request.pipelineMaxDepth</range> 4154 <details>Depending on what settings are used in the request, and 4155 what streams are configured, the data may undergo less processing, 4156 and some pipeline stages skipped. 4157 4158 See android.request.pipelineMaxDepth for more details. 4159 </details> 4160 <hal_details> 4161 This value must always represent the accurate count of how many 4162 pipeline stages were actually used. 4163 </hal_details> 4164 </entry> 4165 </dynamic> 4166 <static> 4167 <entry name="pipelineMaxDepth" type="byte" visibility="public" hwlevel="legacy"> 4168 <description>Specifies the number of maximum pipeline stages a frame 4169 has to go through from when it's exposed to when it's available 4170 to the framework.</description> 4171 <details>A typical minimum value for this is 2 (one stage to expose, 4172 one stage to readout) from the sensor. The ISP then usually adds 4173 its own stages to do custom HW processing. Further stages may be 4174 added by SW processing. 4175 4176 Depending on what settings are used (e.g. YUV, JPEG) and what 4177 processing is enabled (e.g. face detection), the actual pipeline 4178 depth (specified by android.request.pipelineDepth) may be less than 4179 the max pipeline depth. 4180 4181 A pipeline depth of X stages is equivalent to a pipeline latency of 4182 X frame intervals. 4183 4184 This value will be 8 or less. 4185 </details> 4186 <hal_details> 4187 This value should be 4 or less. 4188 </hal_details> 4189 </entry> 4190 <entry name="partialResultCount" type="int32" visibility="public" optional="true"> 4191 <description>Defines how many sub-components 4192 a result will be composed of. 4193 </description> 4194 <range>&gt;= 1</range> 4195 <details>In order to combat the pipeline latency, partial results 4196 may be delivered to the application layer from the camera device as 4197 soon as they are available. 4198 4199 Optional; defaults to 1. A value of 1 means that partial 4200 results are not supported, and only the final TotalCaptureResult will 4201 be produced by the camera device. 4202 4203 A typical use case for this might be: after requesting an 4204 auto-focus (AF) lock the new AF state might be available 50% 4205 of the way through the pipeline. The camera device could 4206 then immediately dispatch this state via a partial result to 4207 the application, and the rest of the metadata via later 4208 partial results. 4209 </details> 4210 </entry> 4211 <entry name="availableCapabilities" type="byte" visibility="public" 4212 enum="true" container="array" hwlevel="legacy"> 4213 <array> 4214 <size>n</size> 4215 </array> 4216 <enum> 4217 <value>BACKWARD_COMPATIBLE 4218 <notes>The minimal set of capabilities that every camera 4219 device (regardless of android.info.supportedHardwareLevel) 4220 supports. 4221 4222 This capability is listed by all normal devices, and 4223 indicates that the camera device has a feature set 4224 that's comparable to the baseline requirements for the 4225 older android.hardware.Camera API. 4226 4227 Devices with the DEPTH_OUTPUT capability might not list this 4228 capability, indicating that they support only depth measurement, 4229 not standard color output. 4230 </notes> 4231 </value> 4232 <value optional="true">MANUAL_SENSOR 4233 <notes> 4234 The camera device can be manually controlled (3A algorithms such 4235 as auto-exposure, and auto-focus can be bypassed). 4236 The camera device supports basic manual control of the sensor image 4237 acquisition related stages. This means the following controls are 4238 guaranteed to be supported: 4239 4240 * Manual frame duration control 4241 * android.sensor.frameDuration 4242 * android.sensor.info.maxFrameDuration 4243 * Manual exposure control 4244 * android.sensor.exposureTime 4245 * android.sensor.info.exposureTimeRange 4246 * Manual sensitivity control 4247 * android.sensor.sensitivity 4248 * android.sensor.info.sensitivityRange 4249 * Manual lens control (if the lens is adjustable) 4250 * android.lens.* 4251 * Manual flash control (if a flash unit is present) 4252 * android.flash.* 4253 * Manual black level locking 4254 * android.blackLevel.lock 4255 * Auto exposure lock 4256 * android.control.aeLock 4257 4258 If any of the above 3A algorithms are enabled, then the camera 4259 device will accurately report the values applied by 3A in the 4260 result. 4261 4262 A given camera device may also support additional manual sensor controls, 4263 but this capability only covers the above list of controls. 4264 4265 If this is supported, android.scaler.streamConfigurationMap will 4266 additionally return a min frame duration that is greater than 4267 zero for each supported size-format combination. 4268 </notes> 4269 </value> 4270 <value optional="true">MANUAL_POST_PROCESSING 4271 <notes> 4272 The camera device post-processing stages can be manually controlled. 4273 The camera device supports basic manual control of the image post-processing 4274 stages. This means the following controls are guaranteed to be supported: 4275 4276 * Manual tonemap control 4277 * android.tonemap.curve 4278 * android.tonemap.mode 4279 * android.tonemap.maxCurvePoints 4280 * android.tonemap.gamma 4281 * android.tonemap.presetCurve 4282 4283 * Manual white balance control 4284 * android.colorCorrection.transform 4285 * android.colorCorrection.gains 4286 * Manual lens shading map control 4287 * android.shading.mode 4288 * android.statistics.lensShadingMapMode 4289 * android.statistics.lensShadingMap 4290 * android.lens.info.shadingMapSize 4291 * Manual aberration correction control (if aberration correction is supported) 4292 * android.colorCorrection.aberrationMode 4293 * android.colorCorrection.availableAberrationModes 4294 * Auto white balance lock 4295 * android.control.awbLock 4296 4297 If auto white balance is enabled, then the camera device 4298 will accurately report the values applied by AWB in the result. 4299 4300 A given camera device may also support additional post-processing 4301 controls, but this capability only covers the above list of controls. 4302 </notes> 4303 </value> 4304 <value optional="true">RAW 4305 <notes> 4306 The camera device supports outputting RAW buffers and 4307 metadata for interpreting them. 4308 4309 Devices supporting the RAW capability allow both for 4310 saving DNG files, and for direct application processing of 4311 raw sensor images. 4312 4313 * RAW_SENSOR is supported as an output format. 4314 * The maximum available resolution for RAW_SENSOR streams 4315 will match either the value in 4316 android.sensor.info.pixelArraySize or 4317 android.sensor.info.activeArraySize. 4318 * All DNG-related optional metadata entries are provided 4319 by the camera device. 4320 </notes> 4321 </value> 4322 <value optional="true">PRIVATE_REPROCESSING 4323 <notes> 4324 The camera device supports the Zero Shutter Lag reprocessing use case. 4325 4326 * One input stream is supported, that is, `android.request.maxNumInputStreams == 1`. 4327 * {@link android.graphics.ImageFormat#PRIVATE} is supported as an output/input format, 4328 that is, {@link android.graphics.ImageFormat#PRIVATE} is included in the lists of 4329 formats returned by {@link 4330 android.hardware.camera2.params.StreamConfigurationMap#getInputFormats} and {@link 4331 android.hardware.camera2.params.StreamConfigurationMap#getOutputFormats}. 4332 * {@link android.hardware.camera2.params.StreamConfigurationMap#getValidOutputFormatsForInput} 4333 returns non empty int[] for each supported input format returned by {@link 4334 android.hardware.camera2.params.StreamConfigurationMap#getInputFormats}. 4335 * Each size returned by {@link 4336 android.hardware.camera2.params.StreamConfigurationMap#getInputSizes 4337 getInputSizes(ImageFormat.PRIVATE)} is also included in {@link 4338 android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes 4339 getOutputSizes(ImageFormat.PRIVATE)} 4340 * Using {@link android.graphics.ImageFormat#PRIVATE} does not cause a frame rate drop 4341 relative to the sensor's maximum capture rate (at that resolution). 4342 * {@link android.graphics.ImageFormat#PRIVATE} will be reprocessable into both 4343 {@link android.graphics.ImageFormat#YUV_420_888} and 4344 {@link android.graphics.ImageFormat#JPEG} formats. 4345 * The maximum available resolution for PRIVATE streams 4346 (both input/output) will match the maximum available 4347 resolution of JPEG streams. 4348 * Static metadata android.reprocess.maxCaptureStall. 4349 * Only below controls are effective for reprocessing requests and 4350 will be present in capture results, other controls in reprocess 4351 requests will be ignored by the camera device. 4352 * android.jpeg.* 4353 * android.noiseReduction.mode 4354 * android.edge.mode 4355 </notes> 4356 </value> 4357 <value optional="true">READ_SENSOR_SETTINGS 4358 <notes> 4359 The camera device supports accurately reporting the sensor settings for many of 4360 the sensor controls while the built-in 3A algorithm is running. This allows 4361 reporting of sensor settings even when these settings cannot be manually changed. 4362 4363 The values reported for the following controls are guaranteed to be available 4364 in the CaptureResult, including when 3A is enabled: 4365 4366 * Exposure control 4367 * android.sensor.exposureTime 4368 * Sensitivity control 4369 * android.sensor.sensitivity 4370 * Lens controls (if the lens is adjustable) 4371 * android.lens.focusDistance 4372 * android.lens.aperture 4373 4374 This capability is a subset of the MANUAL_SENSOR control capability, and will 4375 always be included if the MANUAL_SENSOR capability is available. 4376 </notes> 4377 </value> 4378 <value optional="true">BURST_CAPTURE 4379 <notes> 4380 The camera device supports capturing maximum-resolution 4381 images at >= 20 frames per second, in at least the 4382 uncompressed YUV format, when post-processing settings 4383 are set to FAST. 4384 4385 More specifically, this means that a size matching the 4386 camera device's active array size is listed as a 4387 supported size for the YUV_420_888 format in 4388 android.scaler.streamConfigurationMap, the minimum frame 4389 duration for that format and size is <= 1/20 s, and 4390 the android.control.aeAvailableTargetFpsRanges entry 4391 lists at least one FPS range where the minimum FPS is 4392 >= 1 / minimumFrameDuration for the maximum-size 4393 YUV_420_888 format. 4394 4395 In addition, the android.sync.maxLatency field is 4396 guaranted to have a value between 0 and 4, inclusive. 4397 android.control.aeLockAvailable and 4398 android.control.awbLockAvailable are also guaranteed 4399 to be `true` so burst capture with these two locks ON 4400 yields consistent image output. 4401 4402 On a camera device that reports the HIGH_RESOLUTION hardware 4403 level, meaning the device supports very large capture sizes, 4404 BURST_CAPTURE means that at least 8-megapixel images can be 4405 captured at `>=` 20 fps, and maximum-resolution images can be 4406 captured at `>=` 10 fps. 4407 </notes> 4408 </value> 4409 <value optional="true">YUV_REPROCESSING 4410 <notes> 4411 The camera device supports the YUV_420_888 reprocessing use case, similar as 4412 PRIVATE_REPROCESSING, This capability requires the camera device to support the 4413 following: 4414 4415 * One input stream is supported, that is, `android.request.maxNumInputStreams == 1`. 4416 * {@link android.graphics.ImageFormat#YUV_420_888} is supported as an output/input format, that is, 4417 YUV_420_888 is included in the lists of formats returned by 4418 {@link android.hardware.camera2.params.StreamConfigurationMap#getInputFormats} and 4419 {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputFormats}. 4420 * {@link 4421 android.hardware.camera2.params.StreamConfigurationMap#getValidOutputFormatsForInput} 4422 returns non-empty int[] for each supported input format returned by {@link 4423 android.hardware.camera2.params.StreamConfigurationMap#getInputFormats}. 4424 * Each size returned by {@link 4425 android.hardware.camera2.params.StreamConfigurationMap#getInputSizes 4426 getInputSizes(YUV_420_888)} is also included in {@link 4427 android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes 4428 getOutputSizes(YUV_420_888)} 4429 * Using {@link android.graphics.ImageFormat#YUV_420_888} does not cause a frame rate drop 4430 relative to the sensor's maximum capture rate (at that resolution). 4431 * {@link android.graphics.ImageFormat#YUV_420_888} will be reprocessable into both 4432 {@link android.graphics.ImageFormat#YUV_420_888} and {@link 4433 android.graphics.ImageFormat#JPEG} formats. 4434 * The maximum available resolution for {@link 4435 android.graphics.ImageFormat#YUV_420_888} streams (both input/output) will match the 4436 maximum available resolution of {@link android.graphics.ImageFormat#JPEG} streams. 4437 * Static metadata android.reprocess.maxCaptureStall. 4438 * Only the below controls are effective for reprocessing requests and will be present 4439 in capture results. The reprocess requests are from the original capture results that 4440 are associated with the intermediate {@link android.graphics.ImageFormat#YUV_420_888} 4441 output buffers. All other controls in the reprocess requests will be ignored by the 4442 camera device. 4443 * android.jpeg.* 4444 * android.noiseReduction.mode 4445 * android.edge.mode 4446 * android.reprocess.effectiveExposureFactor 4447 </notes> 4448 </value> 4449 <value optional="true">DEPTH_OUTPUT 4450 <notes> 4451 The camera device can produce depth measurements from its field of view. 4452 4453 This capability requires the camera device to support the following: 4454 4455 * {@link android.graphics.ImageFormat#DEPTH16} is supported as an output format. 4456 * {@link android.graphics.ImageFormat#DEPTH_POINT_CLOUD} is optionally supported as an 4457 output format. 4458 * This camera device, and all camera devices with the same android.lens.facing, 4459 will list the following calibration entries in both 4460 {@link android.hardware.camera2.CameraCharacteristics} and 4461 {@link android.hardware.camera2.CaptureResult}: 4462 - android.lens.poseTranslation 4463 - android.lens.poseRotation 4464 - android.lens.intrinsicCalibration 4465 - android.lens.radialDistortion 4466 * The android.depth.depthIsExclusive entry is listed by this device. 4467 * A LIMITED camera with only the DEPTH_OUTPUT capability does not have to support 4468 normal YUV_420_888, JPEG, and PRIV-format outputs. It only has to support the DEPTH16 4469 format. 4470 4471 Generally, depth output operates at a slower frame rate than standard color capture, 4472 so the DEPTH16 and DEPTH_POINT_CLOUD formats will commonly have a stall duration that 4473 should be accounted for (see 4474 {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration}). 4475 On a device that supports both depth and color-based output, to enable smooth preview, 4476 using a repeating burst is recommended, where a depth-output target is only included 4477 once every N frames, where N is the ratio between preview output rate and depth output 4478 rate, including depth stall time. 4479 </notes> 4480 </value> 4481 </enum> 4482 <description>List of capabilities that this camera device 4483 advertises as fully supporting.</description> 4484 <details> 4485 A capability is a contract that the camera device makes in order 4486 to be able to satisfy one or more use cases. 4487 4488 Listing a capability guarantees that the whole set of features 4489 required to support a common use will all be available. 4490 4491 Using a subset of the functionality provided by an unsupported 4492 capability may be possible on a specific camera device implementation; 4493 to do this query each of android.request.availableRequestKeys, 4494 android.request.availableResultKeys, 4495 android.request.availableCharacteristicsKeys. 4496 4497 The following capabilities are guaranteed to be available on 4498 android.info.supportedHardwareLevel `==` FULL devices: 4499 4500 * MANUAL_SENSOR 4501 * MANUAL_POST_PROCESSING 4502 4503 Other capabilities may be available on either FULL or LIMITED 4504 devices, but the application should query this key to be sure. 4505 </details> 4506 <hal_details> 4507 Additional constraint details per-capability will be available 4508 in the Compatibility Test Suite. 4509 4510 Minimum baseline requirements required for the 4511 BACKWARD_COMPATIBLE capability are not explicitly listed. 4512 Instead refer to "BC" tags and the camera CTS tests in the 4513 android.hardware.camera2.cts package. 4514 4515 Listed controls that can be either request or result (e.g. 4516 android.sensor.exposureTime) must be available both in the 4517 request and the result in order to be considered to be 4518 capability-compliant. 4519 4520 For example, if the HAL claims to support MANUAL control, 4521 then exposure time must be configurable via the request _and_ 4522 the actual exposure applied must be available via 4523 the result. 4524 4525 If MANUAL_SENSOR is omitted, the HAL may choose to omit the 4526 android.scaler.availableMinFrameDurations static property entirely. 4527 4528 For PRIVATE_REPROCESSING and YUV_REPROCESSING capabilities, see 4529 hardware/libhardware/include/hardware/camera3.h Section 10 for more information. 4530 4531 Devices that support the MANUAL_SENSOR capability must support the 4532 CAMERA3_TEMPLATE_MANUAL template defined in camera3.h. 4533 4534 Devices that support the PRIVATE_REPROCESSING capability or the 4535 YUV_REPROCESSING capability must support the 4536 CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template defined in camera3.h. 4537 4538 For DEPTH_OUTPUT, the depth-format keys 4539 android.depth.availableDepthStreamConfigurations, 4540 android.depth.availableDepthMinFrameDurations, 4541 android.depth.availableDepthStallDurations must be available, in 4542 addition to the other keys explicitly mentioned in the DEPTH_OUTPUT 4543 enum notes. The entry android.depth.maxDepthSamples must be available 4544 if the DEPTH_POINT_CLOUD format is supported (HAL pixel format BLOB, dataspace 4545 DEPTH). 4546 </hal_details> 4547 </entry> 4548 <entry name="availableRequestKeys" type="int32" visibility="hidden" 4549 container="array" hwlevel="legacy"> 4550 <array> 4551 <size>n</size> 4552 </array> 4553 <description>A list of all keys that the camera device has available 4554 to use with {@link android.hardware.camera2.CaptureRequest}.</description> 4555 4556 <details>Attempting to set a key into a CaptureRequest that is not 4557 listed here will result in an invalid request and will be rejected 4558 by the camera device. 4559 4560 This field can be used to query the feature set of a camera device 4561 at a more granular level than capabilities. This is especially 4562 important for optional keys that are not listed under any capability 4563 in android.request.availableCapabilities. 4564 </details> 4565 <hal_details> 4566 Vendor tags must not be listed here. Use the vendor tag metadata 4567 extensions C api instead (refer to camera3.h for more details). 4568 4569 Setting/getting vendor tags will be checked against the metadata 4570 vendor extensions API and not against this field. 4571 4572 The HAL must not consume any request tags that are not listed either 4573 here or in the vendor tag list. 4574 4575 The public camera2 API will always make the vendor tags visible 4576 via 4577 {@link android.hardware.camera2.CameraCharacteristics#getAvailableCaptureRequestKeys}. 4578 </hal_details> 4579 </entry> 4580 <entry name="availableResultKeys" type="int32" visibility="hidden" 4581 container="array" hwlevel="legacy"> 4582 <array> 4583 <size>n</size> 4584 </array> 4585 <description>A list of all keys that the camera device has available 4586 to use with {@link android.hardware.camera2.CaptureResult}.</description> 4587 4588 <details>Attempting to get a key from a CaptureResult that is not 4589 listed here will always return a `null` value. Getting a key from 4590 a CaptureResult that is listed here will generally never return a `null` 4591 value. 4592 4593 The following keys may return `null` unless they are enabled: 4594 4595 * android.statistics.lensShadingMap (non-null iff android.statistics.lensShadingMapMode == ON) 4596 4597 (Those sometimes-null keys will nevertheless be listed here 4598 if they are available.) 4599 4600 This field can be used to query the feature set of a camera device 4601 at a more granular level than capabilities. This is especially 4602 important for optional keys that are not listed under any capability 4603 in android.request.availableCapabilities. 4604 </details> 4605 <hal_details> 4606 Tags listed here must always have an entry in the result metadata, 4607 even if that size is 0 elements. Only array-type tags (e.g. lists, 4608 matrices, strings) are allowed to have 0 elements. 4609 4610 Vendor tags must not be listed here. Use the vendor tag metadata 4611 extensions C api instead (refer to camera3.h for more details). 4612 4613 Setting/getting vendor tags will be checked against the metadata 4614 vendor extensions API and not against this field. 4615 4616 The HAL must not produce any result tags that are not listed either 4617 here or in the vendor tag list. 4618 4619 The public camera2 API will always make the vendor tags visible via {@link 4620 android.hardware.camera2.CameraCharacteristics#getAvailableCaptureResultKeys}. 4621 </hal_details> 4622 </entry> 4623 <entry name="availableCharacteristicsKeys" type="int32" visibility="hidden" 4624 container="array" hwlevel="legacy"> 4625 <array> 4626 <size>n</size> 4627 </array> 4628 <description>A list of all keys that the camera device has available 4629 to use with {@link android.hardware.camera2.CameraCharacteristics}.</description> 4630 <details>This entry follows the same rules as 4631 android.request.availableResultKeys (except that it applies for 4632 CameraCharacteristics instead of CaptureResult). See above for more 4633 details. 4634 </details> 4635 <hal_details> 4636 Keys listed here must always have an entry in the static info metadata, 4637 even if that size is 0 elements. Only array-type tags (e.g. lists, 4638 matrices, strings) are allowed to have 0 elements. 4639 4640 Vendor tags must not be listed here. Use the vendor tag metadata 4641 extensions C api instead (refer to camera3.h for more details). 4642 4643 Setting/getting vendor tags will be checked against the metadata 4644 vendor extensions API and not against this field. 4645 4646 The HAL must not have any tags in its static info that are not listed 4647 either here or in the vendor tag list. 4648 4649 The public camera2 API will always make the vendor tags visible 4650 via {@link android.hardware.camera2.CameraCharacteristics#getKeys}. 4651 </hal_details> 4652 </entry> 4653 </static> 4654 </section> 4655 <section name="scaler"> 4656 <controls> 4657 <entry name="cropRegion" type="int32" visibility="public" 4658 container="array" typedef="rectangle" hwlevel="legacy"> 4659 <array> 4660 <size>4</size> 4661 </array> 4662 <description>The desired region of the sensor to read out for this capture.</description> 4663 <units>Pixel coordinates relative to 4664 android.sensor.info.activeArraySize</units> 4665 <details> 4666 This control can be used to implement digital zoom. 4667 4668 The crop region coordinate system is based off 4669 android.sensor.info.activeArraySize, with `(0, 0)` being the 4670 top-left corner of the sensor active array. 4671 4672 Output streams use this rectangle to produce their output, 4673 cropping to a smaller region if necessary to maintain the 4674 stream's aspect ratio, then scaling the sensor input to 4675 match the output's configured resolution. 4676 4677 The crop region is applied after the RAW to other color 4678 space (e.g. YUV) conversion. Since raw streams 4679 (e.g. RAW16) don't have the conversion stage, they are not 4680 croppable. The crop region will be ignored by raw streams. 4681 4682 For non-raw streams, any additional per-stream cropping will 4683 be done to maximize the final pixel area of the stream. 4684 4685 For example, if the crop region is set to a 4:3 aspect 4686 ratio, then 4:3 streams will use the exact crop 4687 region. 16:9 streams will further crop vertically 4688 (letterbox). 4689 4690 Conversely, if the crop region is set to a 16:9, then 4:3 4691 outputs will crop horizontally (pillarbox), and 16:9 4692 streams will match exactly. These additional crops will 4693 be centered within the crop region. 4694 4695 The width and height of the crop region cannot 4696 be set to be smaller than 4697 `floor( activeArraySize.width / android.scaler.availableMaxDigitalZoom )` and 4698 `floor( activeArraySize.height / android.scaler.availableMaxDigitalZoom )`, respectively. 4699 4700 The camera device may adjust the crop region to account 4701 for rounding and other hardware requirements; the final 4702 crop region used will be included in the output capture 4703 result. 4704 </details> 4705 <hal_details> 4706 The output streams must maintain square pixels at all 4707 times, no matter what the relative aspect ratios of the 4708 crop region and the stream are. Negative values for 4709 corner are allowed for raw output if full pixel array is 4710 larger than active pixel array. Width and height may be 4711 rounded to nearest larger supportable width, especially 4712 for raw output, where only a few fixed scales may be 4713 possible. 4714 4715 HAL2.x uses only (x, y, width) 4716 </hal_details> 4717 <tag id="BC" /> 4718 </entry> 4719 </controls> 4720 <static> 4721 <entry name="availableFormats" type="int32" 4722 visibility="hidden" deprecated="true" enum="true" 4723 container="array" typedef="imageFormat"> 4724 <array> 4725 <size>n</size> 4726 </array> 4727 <enum> 4728 <value optional="true" id="0x20">RAW16 4729 <notes> 4730 RAW16 is a standard, cross-platform format for raw image 4731 buffers with 16-bit pixels. 4732 4733 Buffers of this format are typically expected to have a 4734 Bayer Color Filter Array (CFA) layout, which is given in 4735 android.sensor.info.colorFilterArrangement. Sensors with 4736 CFAs that are not representable by a format in 4737 android.sensor.info.colorFilterArrangement should not 4738 use this format. 4739 4740 Buffers of this format will also follow the constraints given for 4741 RAW_OPAQUE buffers, but with relaxed performance constraints. 4742 4743 See android.scaler.availableInputOutputFormatsMap for 4744 the full set of performance guarantees. 4745 </notes> 4746 </value> 4747 <value optional="true" id="0x24">RAW_OPAQUE 4748 <notes> 4749 RAW_OPAQUE is a format for raw image buffers coming from an 4750 image sensor. 4751 4752 The actual structure of buffers of this format is 4753 platform-specific, but must follow several constraints: 4754 4755 1. No image post-processing operations may have been applied to 4756 buffers of this type. These buffers contain raw image data coming 4757 directly from the image sensor. 4758 1. If a buffer of this format is passed to the camera device for 4759 reprocessing, the resulting images will be identical to the images 4760 produced if the buffer had come directly from the sensor and was 4761 processed with the same settings. 4762 4763 The intended use for this format is to allow access to the native 4764 raw format buffers coming directly from the camera sensor without 4765 any additional conversions or decrease in framerate. 4766 4767 See android.scaler.availableInputOutputFormatsMap for the full set of 4768 performance guarantees. 4769 </notes> 4770 </value> 4771 <value optional="true" id="0x32315659">YV12 4772 <notes>YCrCb 4:2:0 Planar</notes> 4773 </value> 4774 <value optional="true" id="0x11">YCrCb_420_SP 4775 <notes>NV21</notes> 4776 </value> 4777 <value id="0x22">IMPLEMENTATION_DEFINED 4778 <notes>System internal format, not application-accessible</notes> 4779 </value> 4780 <value id="0x23">YCbCr_420_888 4781 <notes>Flexible YUV420 Format</notes> 4782 </value> 4783 <value id="0x21">BLOB 4784 <notes>JPEG format</notes> 4785 </value> 4786 </enum> 4787 <description>The list of image formats that are supported by this 4788 camera device for output streams.</description> 4789 <details> 4790 All camera devices will support JPEG and YUV_420_888 formats. 4791 4792 When set to YUV_420_888, application can access the YUV420 data directly. 4793 </details> 4794 <hal_details> 4795 These format values are from HAL_PIXEL_FORMAT_* in 4796 system/core/include/system/graphics.h. 4797 4798 When IMPLEMENTATION_DEFINED is used, the platform 4799 gralloc module will select a format based on the usage flags provided 4800 by the camera HAL device and the other endpoint of the stream. It is 4801 usually used by preview and recording streams, where the application doesn't 4802 need access the image data. 4803 4804 YCbCr_420_888 format must be supported by the HAL. When an image stream 4805 needs CPU/application direct access, this format will be used. 4806 4807 The BLOB format must be supported by the HAL. This is used for the JPEG stream. 4808 4809 A RAW_OPAQUE buffer should contain only pixel data. It is strongly 4810 recommended that any information used by the camera device when 4811 processing images is fully expressed by the result metadata 4812 for that image buffer. 4813 </hal_details> 4814 <tag id="BC" /> 4815 </entry> 4816 <entry name="availableJpegMinDurations" type="int64" visibility="hidden" deprecated="true" 4817 container="array"> 4818 <array> 4819 <size>n</size> 4820 </array> 4821 <description>The minimum frame duration that is supported 4822 for each resolution in android.scaler.availableJpegSizes. 4823 </description> 4824 <units>Nanoseconds</units> 4825 <range>TODO: Remove property.</range> 4826 <details> 4827 This corresponds to the minimum steady-state frame duration when only 4828 that JPEG stream is active and captured in a burst, with all 4829 processing (typically in android.*.mode) set to FAST. 4830 4831 When multiple streams are configured, the minimum 4832 frame duration will be &gt;= max(individual stream min 4833 durations)</details> 4834 <tag id="BC" /> 4835 </entry> 4836 <entry name="availableJpegSizes" type="int32" visibility="hidden" 4837 deprecated="true" container="array" typedef="size"> 4838 <array> 4839 <size>n</size> 4840 <size>2</size> 4841 </array> 4842 <description>The JPEG resolutions that are supported by this camera device.</description> 4843 <range>TODO: Remove property.</range> 4844 <details> 4845 The resolutions are listed as `(width, height)` pairs. All camera devices will support 4846 sensor maximum resolution (defined by android.sensor.info.activeArraySize). 4847 </details> 4848 <hal_details> 4849 The HAL must include sensor maximum resolution 4850 (defined by android.sensor.info.activeArraySize), 4851 and should include half/quarter of sensor maximum resolution. 4852 </hal_details> 4853 <tag id="BC" /> 4854 </entry> 4855 <entry name="availableMaxDigitalZoom" type="float" visibility="public" 4856 hwlevel="legacy"> 4857 <description>The maximum ratio between both active area width 4858 and crop region width, and active area height and 4859 crop region height, for android.scaler.cropRegion. 4860 </description> 4861 <units>Zoom scale factor</units> 4862 <range>&gt;=1</range> 4863 <details> 4864 This represents the maximum amount of zooming possible by 4865 the camera device, or equivalently, the minimum cropping 4866 window size. 4867 4868 Crop regions that have a width or height that is smaller 4869 than this ratio allows will be rounded up to the minimum 4870 allowed size by the camera device. 4871 </details> 4872 <tag id="BC" /> 4873 </entry> 4874 <entry name="availableProcessedMinDurations" type="int64" visibility="hidden" deprecated="true" 4875 container="array"> 4876 <array> 4877 <size>n</size> 4878 </array> 4879 <description>For each available processed output size (defined in 4880 android.scaler.availableProcessedSizes), this property lists the 4881 minimum supportable frame duration for that size. 4882 </description> 4883 <units>Nanoseconds</units> 4884 <details> 4885 This should correspond to the frame duration when only that processed 4886 stream is active, with all processing (typically in android.*.mode) 4887 set to FAST. 4888 4889 When multiple streams are configured, the minimum frame duration will 4890 be &gt;= max(individual stream min durations). 4891 </details> 4892 <tag id="BC" /> 4893 </entry> 4894 <entry name="availableProcessedSizes" type="int32" visibility="hidden" 4895 deprecated="true" container="array" typedef="size"> 4896 <array> 4897 <size>n</size> 4898 <size>2</size> 4899 </array> 4900 <description>The resolutions available for use with 4901 processed output streams, such as YV12, NV12, and 4902 platform opaque YUV/RGB streams to the GPU or video 4903 encoders.</description> 4904 <details> 4905 The resolutions are listed as `(width, height)` pairs. 4906 4907 For a given use case, the actual maximum supported resolution 4908 may be lower than what is listed here, depending on the destination 4909 Surface for the image data. For example, for recording video, 4910 the video encoder chosen may have a maximum size limit (e.g. 1080p) 4911 smaller than what the camera (e.g. maximum resolution is 3264x2448) 4912 can provide. 4913 4914 Please reference the documentation for the image data destination to 4915 check if it limits the maximum size for image data. 4916 </details> 4917 <hal_details> 4918 For FULL capability devices (`android.info.supportedHardwareLevel == FULL`), 4919 the HAL must include all JPEG sizes listed in android.scaler.availableJpegSizes 4920 and each below resolution if it is smaller than or equal to the sensor 4921 maximum resolution (if they are not listed in JPEG sizes already): 4922 4923 * 240p (320 x 240) 4924 * 480p (640 x 480) 4925 * 720p (1280 x 720) 4926 * 1080p (1920 x 1080) 4927 4928 For LIMITED capability devices (`android.info.supportedHardwareLevel == LIMITED`), 4929 the HAL only has to list up to the maximum video size supported by the devices. 4930 </hal_details> 4931 <tag id="BC" /> 4932 </entry> 4933 <entry name="availableRawMinDurations" type="int64" deprecated="true" 4934 container="array"> 4935 <array> 4936 <size>n</size> 4937 </array> 4938 <description> 4939 For each available raw output size (defined in 4940 android.scaler.availableRawSizes), this property lists the minimum 4941 supportable frame duration for that size. 4942 </description> 4943 <units>Nanoseconds</units> 4944 <details> 4945 Should correspond to the frame duration when only the raw stream is 4946 active. 4947 4948 When multiple streams are configured, the minimum 4949 frame duration will be &gt;= max(individual stream min 4950 durations)</details> 4951 <tag id="BC" /> 4952 </entry> 4953 <entry name="availableRawSizes" type="int32" deprecated="true" 4954 container="array" typedef="size"> 4955 <array> 4956 <size>n</size> 4957 <size>2</size> 4958 </array> 4959 <description>The resolutions available for use with raw 4960 sensor output streams, listed as width, 4961 height</description> 4962 </entry> 4963 </static> 4964 <dynamic> 4965 <clone entry="android.scaler.cropRegion" kind="controls"> 4966 </clone> 4967 </dynamic> 4968 <static> 4969 <entry name="availableInputOutputFormatsMap" type="int32" visibility="hidden" 4970 typedef="reprocessFormatsMap"> 4971 <description>The mapping of image formats that are supported by this 4972 camera device for input streams, to their corresponding output formats. 4973 </description> 4974 <details> 4975 All camera devices with at least 1 4976 android.request.maxNumInputStreams will have at least one 4977 available input format. 4978 4979 The camera device will support the following map of formats, 4980 if its dependent capability (android.request.availableCapabilities) is supported: 4981 4982 Input Format | Output Format | Capability 4983 :-------------------------------------------------|:--------------------------------------------------|:---------- 4984 {@link android.graphics.ImageFormat#PRIVATE} | {@link android.graphics.ImageFormat#JPEG} | PRIVATE_REPROCESSING 4985 {@link android.graphics.ImageFormat#PRIVATE} | {@link android.graphics.ImageFormat#YUV_420_888} | PRIVATE_REPROCESSING 4986 {@link android.graphics.ImageFormat#YUV_420_888} | {@link android.graphics.ImageFormat#JPEG} | YUV_REPROCESSING 4987 {@link android.graphics.ImageFormat#YUV_420_888} | {@link android.graphics.ImageFormat#YUV_420_888} | YUV_REPROCESSING 4988 4989 PRIVATE refers to a device-internal format that is not directly application-visible. A 4990 PRIVATE input surface can be acquired by {@link android.media.ImageReader#newInstance} 4991 with {@link android.graphics.ImageFormat#PRIVATE} as the format. 4992 4993 For a PRIVATE_REPROCESSING-capable camera device, using the PRIVATE format as either input 4994 or output will never hurt maximum frame rate (i.e. {@link 4995 android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration 4996 getOutputStallDuration(ImageFormat.PRIVATE, size)} is always 0), 4997 4998 Attempting to configure an input stream with output streams not 4999 listed as available in this map is not valid. 5000 </details> 5001 <hal_details> 5002 For the formats, see `system/core/include/system/graphics.h` for a definition 5003 of the image format enumerations. The PRIVATE format refers to the 5004 HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED format. The HAL could determine 5005 the actual format by using the gralloc usage flags. 5006 For ZSL use case in particular, the HAL could choose appropriate format (partially 5007 processed YUV or RAW based format) by checking the format and GRALLOC_USAGE_HW_CAMERA_ZSL. 5008 See camera3.h for more details. 5009 5010 This value is encoded as a variable-size array-of-arrays. 5011 The inner array always contains `[format, length, ...]` where 5012 `...` has `length` elements. An inner array is followed by another 5013 inner array if the total metadata entry size hasn't yet been exceeded. 5014 5015 A code sample to read/write this encoding (with a device that 5016 supports reprocessing IMPLEMENTATION_DEFINED to YUV_420_888, and JPEG, 5017 and reprocessing YUV_420_888 to YUV_420_888 and JPEG): 5018 5019 // reading 5020 int32_t* contents = &entry.i32[0]; 5021 for (size_t i = 0; i < entry.count; ) { 5022 int32_t format = contents[i++]; 5023 int32_t length = contents[i++]; 5024 int32_t output_formats[length]; 5025 memcpy(&output_formats[0], &contents[i], 5026 length * sizeof(int32_t)); 5027 i += length; 5028 } 5029 5030 // writing (static example, PRIVATE_REPROCESSING + YUV_REPROCESSING) 5031 int32_t[] contents = { 5032 IMPLEMENTATION_DEFINED, 2, YUV_420_888, BLOB, 5033 YUV_420_888, 2, YUV_420_888, BLOB, 5034 }; 5035 update_camera_metadata_entry(metadata, index, &contents[0], 5036 sizeof(contents)/sizeof(contents[0]), &updated_entry); 5037 5038 If the HAL claims to support any of the capabilities listed in the 5039 above details, then it must also support all the input-output 5040 combinations listed for that capability. It can optionally support 5041 additional formats if it so chooses. 5042 </hal_details> 5043 <tag id="REPROC" /> 5044 </entry> 5045 <entry name="availableStreamConfigurations" type="int32" visibility="hidden" 5046 enum="true" container="array" 5047 typedef="streamConfiguration" hwlevel="legacy"> 5048 <array> 5049 <size>n</size> 5050 <size>4</size> 5051 </array> 5052 <enum> 5053 <value>OUTPUT</value> 5054 <value>INPUT</value> 5055 </enum> 5056 <description>The available stream configurations that this 5057 camera device supports 5058 (i.e. format, width, height, output/input stream). 5059 </description> 5060 <details> 5061 The configurations are listed as `(format, width, height, input?)` 5062 tuples. 5063 5064 For a given use case, the actual maximum supported resolution 5065 may be lower than what is listed here, depending on the destination 5066 Surface for the image data. For example, for recording video, 5067 the video encoder chosen may have a maximum size limit (e.g. 1080p) 5068 smaller than what the camera (e.g. maximum resolution is 3264x2448) 5069 can provide. 5070 5071 Please reference the documentation for the image data destination to 5072 check if it limits the maximum size for image data. 5073 5074 Not all output formats may be supported in a configuration with 5075 an input stream of a particular format. For more details, see 5076 android.scaler.availableInputOutputFormatsMap. 5077 5078 The following table describes the minimum required output stream 5079 configurations based on the hardware level 5080 (android.info.supportedHardwareLevel): 5081 5082 Format | Size | Hardware Level | Notes 5083 :-------------:|:--------------------------------------------:|:--------------:|:--------------: 5084 JPEG | android.sensor.info.activeArraySize | Any | 5085 JPEG | 1920x1080 (1080p) | Any | if 1080p <= activeArraySize 5086 JPEG | 1280x720 (720) | Any | if 720p <= activeArraySize 5087 JPEG | 640x480 (480p) | Any | if 480p <= activeArraySize 5088 JPEG | 320x240 (240p) | Any | if 240p <= activeArraySize 5089 YUV_420_888 | all output sizes available for JPEG | FULL | 5090 YUV_420_888 | all output sizes available for JPEG, up to the maximum video size | LIMITED | 5091 IMPLEMENTATION_DEFINED | same as YUV_420_888 | Any | 5092 5093 Refer to android.request.availableCapabilities for additional 5094 mandatory stream configurations on a per-capability basis. 5095 </details> 5096 <hal_details> 5097 It is recommended (but not mandatory) to also include half/quarter 5098 of sensor maximum resolution for JPEG formats (regardless of hardware 5099 level). 5100 5101 (The following is a rewording of the above required table): 5102 5103 For JPEG format, the sizes may be restricted by below conditions: 5104 5105 * The HAL may choose the aspect ratio of each Jpeg size to be one of well known ones 5106 (e.g. 4:3, 16:9, 3:2 etc.). If the sensor maximum resolution 5107 (defined by android.sensor.info.activeArraySize) has an aspect ratio other than these, 5108 it does not have to be included in the supported JPEG sizes. 5109 * Some hardware JPEG encoders may have pixel boundary alignment requirements, such as 5110 the dimensions being a multiple of 16. 5111 5112 Therefore, the maximum JPEG size may be smaller than sensor maximum resolution. 5113 However, the largest JPEG size must be as close as possible to the sensor maximum 5114 resolution given above constraints. It is required that after aspect ratio adjustments, 5115 additional size reduction due to other issues must be less than 3% in area. For example, 5116 if the sensor maximum resolution is 3280x2464, if the maximum JPEG size has aspect 5117 ratio 4:3, the JPEG encoder alignment requirement is 16, the maximum JPEG size will be 5118 3264x2448. 5119 5120 For FULL capability devices (`android.info.supportedHardwareLevel == FULL`), 5121 the HAL must include all YUV_420_888 sizes that have JPEG sizes listed 5122 here as output streams. 5123 5124 It must also include each below resolution if it is smaller than or 5125 equal to the sensor maximum resolution (for both YUV_420_888 and JPEG 5126 formats), as output streams: 5127 5128 * 240p (320 x 240) 5129 * 480p (640 x 480) 5130 * 720p (1280 x 720) 5131 * 1080p (1920 x 1080) 5132 5133 For LIMITED capability devices 5134 (`android.info.supportedHardwareLevel == LIMITED`), 5135 the HAL only has to list up to the maximum video size 5136 supported by the device. 5137 5138 Regardless of hardware level, every output resolution available for 5139 YUV_420_888 must also be available for IMPLEMENTATION_DEFINED. 5140 5141 This supercedes the following fields, which are now deprecated: 5142 5143 * availableFormats 5144 * available[Processed,Raw,Jpeg]Sizes 5145 </hal_details> 5146 </entry> 5147 <entry name="availableMinFrameDurations" type="int64" visibility="hidden" 5148 container="array" 5149 typedef="streamConfigurationDuration" hwlevel="legacy"> 5150 <array> 5151 <size>4</size> 5152 <size>n</size> 5153 </array> 5154 <description>This lists the minimum frame duration for each 5155 format/size combination. 5156 </description> 5157 <units>(format, width, height, ns) x n</units> 5158 <details> 5159 This should correspond to the frame duration when only that 5160 stream is active, with all processing (typically in android.*.mode) 5161 set to either OFF or FAST. 5162 5163 When multiple streams are used in a request, the minimum frame 5164 duration will be max(individual stream min durations). 5165 5166 The minimum frame duration of a stream (of a particular format, size) 5167 is the same regardless of whether the stream is input or output. 5168 5169 See android.sensor.frameDuration and 5170 android.scaler.availableStallDurations for more details about 5171 calculating the max frame rate. 5172 5173 (Keep in sync with 5174 {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration}) 5175 </details> 5176 <tag id="V1" /> 5177 </entry> 5178 <entry name="availableStallDurations" type="int64" visibility="hidden" 5179 container="array" typedef="streamConfigurationDuration" hwlevel="legacy"> 5180 <array> 5181 <size>4</size> 5182 <size>n</size> 5183 </array> 5184 <description>This lists the maximum stall duration for each 5185 output format/size combination. 5186 </description> 5187 <units>(format, width, height, ns) x n</units> 5188 <details> 5189 A stall duration is how much extra time would get added 5190 to the normal minimum frame duration for a repeating request 5191 that has streams with non-zero stall. 5192 5193 For example, consider JPEG captures which have the following 5194 characteristics: 5195 5196 * JPEG streams act like processed YUV streams in requests for which 5197 they are not included; in requests in which they are directly 5198 referenced, they act as JPEG streams. This is because supporting a 5199 JPEG stream requires the underlying YUV data to always be ready for 5200 use by a JPEG encoder, but the encoder will only be used (and impact 5201 frame duration) on requests that actually reference a JPEG stream. 5202 * The JPEG processor can run concurrently to the rest of the camera 5203 pipeline, but cannot process more than 1 capture at a time. 5204 5205 In other words, using a repeating YUV request would result 5206 in a steady frame rate (let's say it's 30 FPS). If a single 5207 JPEG request is submitted periodically, the frame rate will stay 5208 at 30 FPS (as long as we wait for the previous JPEG to return each 5209 time). If we try to submit a repeating YUV + JPEG request, then 5210 the frame rate will drop from 30 FPS. 5211 5212 In general, submitting a new request with a non-0 stall time 5213 stream will _not_ cause a frame rate drop unless there are still 5214 outstanding buffers for that stream from previous requests. 5215 5216 Submitting a repeating request with streams (call this `S`) 5217 is the same as setting the minimum frame duration from 5218 the normal minimum frame duration corresponding to `S`, added with 5219 the maximum stall duration for `S`. 5220 5221 If interleaving requests with and without a stall duration, 5222 a request will stall by the maximum of the remaining times 5223 for each can-stall stream with outstanding buffers. 5224 5225 This means that a stalling request will not have an exposure start 5226 until the stall has completed. 5227 5228 This should correspond to the stall duration when only that stream is 5229 active, with all processing (typically in android.*.mode) set to FAST 5230 or OFF. Setting any of the processing modes to HIGH_QUALITY 5231 effectively results in an indeterminate stall duration for all 5232 streams in a request (the regular stall calculation rules are 5233 ignored). 5234 5235 The following formats may always have a stall duration: 5236 5237 * {@link android.graphics.ImageFormat#JPEG} 5238 * {@link android.graphics.ImageFormat#RAW_SENSOR} 5239 5240 The following formats will never have a stall duration: 5241 5242 * {@link android.graphics.ImageFormat#YUV_420_888} 5243 * {@link android.graphics.ImageFormat#RAW10} 5244 5245 All other formats may or may not have an allowed stall duration on 5246 a per-capability basis; refer to android.request.availableCapabilities 5247 for more details. 5248 5249 See android.sensor.frameDuration for more information about 5250 calculating the max frame rate (absent stalls). 5251 5252 (Keep up to date with 5253 {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration} ) 5254 </details> 5255 <hal_details> 5256 If possible, it is recommended that all non-JPEG formats 5257 (such as RAW16) should not have a stall duration. RAW10, RAW12, RAW_OPAQUE 5258 and IMPLEMENTATION_DEFINED must not have stall durations. 5259 </hal_details> 5260 <tag id="V1" /> 5261 </entry> 5262 <entry name="streamConfigurationMap" type="int32" visibility="public" 5263 synthetic="true" typedef="streamConfigurationMap" 5264 hwlevel="legacy"> 5265 <description>The available stream configurations that this 5266 camera device supports; also includes the minimum frame durations 5267 and the stall durations for each format/size combination. 5268 </description> 5269 <details> 5270 All camera devices will support sensor maximum resolution (defined by 5271 android.sensor.info.activeArraySize) for the JPEG format. 5272 5273 For a given use case, the actual maximum supported resolution 5274 may be lower than what is listed here, depending on the destination 5275 Surface for the image data. For example, for recording video, 5276 the video encoder chosen may have a maximum size limit (e.g. 1080p) 5277 smaller than what the camera (e.g. maximum resolution is 3264x2448) 5278 can provide. 5279 5280 Please reference the documentation for the image data destination to 5281 check if it limits the maximum size for image data. 5282 5283 The following table describes the minimum required output stream 5284 configurations based on the hardware level 5285 (android.info.supportedHardwareLevel): 5286 5287 Format | Size | Hardware Level | Notes 5288 :-------------------------------------------------:|:--------------------------------------------:|:--------------:|:--------------: 5289 {@link android.graphics.ImageFormat#JPEG} | android.sensor.info.activeArraySize | Any | 5290 {@link android.graphics.ImageFormat#JPEG} | 1920x1080 (1080p) | Any | if 1080p <= activeArraySize 5291 {@link android.graphics.ImageFormat#JPEG} | 1280x720 (720) | Any | if 720p <= activeArraySize 5292 {@link android.graphics.ImageFormat#JPEG} | 640x480 (480p) | Any | if 480p <= activeArraySize 5293 {@link android.graphics.ImageFormat#JPEG} | 320x240 (240p) | Any | if 240p <= activeArraySize 5294 {@link android.graphics.ImageFormat#YUV_420_888} | all output sizes available for JPEG | FULL | 5295 {@link android.graphics.ImageFormat#YUV_420_888} | all output sizes available for JPEG, up to the maximum video size | LIMITED | 5296 {@link android.graphics.ImageFormat#PRIVATE} | same as YUV_420_888 | Any | 5297 5298 Refer to android.request.availableCapabilities and {@link 5299 android.hardware.camera2.CameraDevice#createCaptureSession} for additional mandatory 5300 stream configurations on a per-capability basis. 5301 </details> 5302 <hal_details> 5303 Do not set this property directly 5304 (it is synthetic and will not be available at the HAL layer); 5305 set the android.scaler.availableStreamConfigurations instead. 5306 5307 Not all output formats may be supported in a configuration with 5308 an input stream of a particular format. For more details, see 5309 android.scaler.availableInputOutputFormatsMap. 5310 5311 It is recommended (but not mandatory) to also include half/quarter 5312 of sensor maximum resolution for JPEG formats (regardless of hardware 5313 level). 5314 5315 (The following is a rewording of the above required table): 5316 5317 The HAL must include sensor maximum resolution (defined by 5318 android.sensor.info.activeArraySize). 5319 5320 For FULL capability devices (`android.info.supportedHardwareLevel == FULL`), 5321 the HAL must include all YUV_420_888 sizes that have JPEG sizes listed 5322 here as output streams. 5323 5324 It must also include each below resolution if it is smaller than or 5325 equal to the sensor maximum resolution (for both YUV_420_888 and JPEG 5326 formats), as output streams: 5327 5328 * 240p (320 x 240) 5329 * 480p (640 x 480) 5330 * 720p (1280 x 720) 5331 * 1080p (1920 x 1080) 5332 5333 For LIMITED capability devices 5334 (`android.info.supportedHardwareLevel == LIMITED`), 5335 the HAL only has to list up to the maximum video size 5336 supported by the device. 5337 5338 Regardless of hardware level, every output resolution available for 5339 YUV_420_888 must also be available for IMPLEMENTATION_DEFINED. 5340 5341 This supercedes the following fields, which are now deprecated: 5342 5343 * availableFormats 5344 * available[Processed,Raw,Jpeg]Sizes 5345 </hal_details> 5346 </entry> 5347 <entry name="croppingType" type="byte" visibility="public" enum="true" 5348 hwlevel="legacy"> 5349 <enum> 5350 <value>CENTER_ONLY 5351 <notes> 5352 The camera device only supports centered crop regions. 5353 </notes> 5354 </value> 5355 <value>FREEFORM 5356 <notes> 5357 The camera device supports arbitrarily chosen crop regions. 5358 </notes> 5359 </value> 5360 </enum> 5361 <description>The crop type that this camera device supports.</description> 5362 <details> 5363 When passing a non-centered crop region (android.scaler.cropRegion) to a camera 5364 device that only supports CENTER_ONLY cropping, the camera device will move the 5365 crop region to the center of the sensor active array (android.sensor.info.activeArraySize) 5366 and keep the crop region width and height unchanged. The camera device will return the 5367 final used crop region in metadata result android.scaler.cropRegion. 5368 5369 Camera devices that support FREEFORM cropping will support any crop region that 5370 is inside of the active array. The camera device will apply the same crop region and 5371 return the final used crop region in capture result metadata android.scaler.cropRegion. 5372 5373 FULL capability devices (android.info.supportedHardwareLevel `==` FULL) will support 5374 FREEFORM cropping. LEGACY capability devices will only support CENTER_ONLY cropping. 5375 </details> 5376 </entry> 5377 </static> 5378 </section> 5379 <section name="sensor"> 5380 <controls> 5381 <entry name="exposureTime" type="int64" visibility="public" hwlevel="full"> 5382 <description>Duration each pixel is exposed to 5383 light.</description> 5384 <units>Nanoseconds</units> 5385 <range>android.sensor.info.exposureTimeRange</range> 5386 <details>If the sensor can't expose this exact duration, it will shorten the 5387 duration exposed to the nearest possible value (rather than expose longer). 5388 The final exposure time used will be available in the output capture result. 5389 5390 This control is only effective if android.control.aeMode or android.control.mode is set to 5391 OFF; otherwise the auto-exposure algorithm will override this value. 5392 </details> 5393 <tag id="V1" /> 5394 </entry> 5395 <entry name="frameDuration" type="int64" visibility="public" hwlevel="full"> 5396 <description>Duration from start of frame exposure to 5397 start of next frame exposure.</description> 5398 <units>Nanoseconds</units> 5399 <range>See android.sensor.info.maxFrameDuration, 5400 android.scaler.streamConfigurationMap. The duration 5401 is capped to `max(duration, exposureTime + overhead)`.</range> 5402 <details> 5403 The maximum frame rate that can be supported by a camera subsystem is 5404 a function of many factors: 5405 5406 * Requested resolutions of output image streams 5407 * Availability of binning / skipping modes on the imager 5408 * The bandwidth of the imager interface 5409 * The bandwidth of the various ISP processing blocks 5410 5411 Since these factors can vary greatly between different ISPs and 5412 sensors, the camera abstraction tries to represent the bandwidth 5413 restrictions with as simple a model as possible. 5414 5415 The model presented has the following characteristics: 5416 5417 * The image sensor is always configured to output the smallest 5418 resolution possible given the application's requested output stream 5419 sizes. The smallest resolution is defined as being at least as large 5420 as the largest requested output stream size; the camera pipeline must 5421 never digitally upsample sensor data when the crop region covers the 5422 whole sensor. In general, this means that if only small output stream 5423 resolutions are configured, the sensor can provide a higher frame 5424 rate. 5425 * Since any request may use any or all the currently configured 5426 output streams, the sensor and ISP must be configured to support 5427 scaling a single capture to all the streams at the same time. This 5428 means the camera pipeline must be ready to produce the largest 5429 requested output size without any delay. Therefore, the overall 5430 frame rate of a given configured stream set is governed only by the 5431 largest requested stream resolution. 5432 * Using more than one output stream in a request does not affect the 5433 frame duration. 5434 * Certain format-streams may need to do additional background processing 5435 before data is consumed/produced by that stream. These processors 5436 can run concurrently to the rest of the camera pipeline, but 5437 cannot process more than 1 capture at a time. 5438 5439 The necessary information for the application, given the model above, 5440 is provided via the android.scaler.streamConfigurationMap field using 5441 {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration}. 5442 These are used to determine the maximum frame rate / minimum frame 5443 duration that is possible for a given stream configuration. 5444 5445 Specifically, the application can use the following rules to 5446 determine the minimum frame duration it can request from the camera 5447 device: 5448 5449 1. Let the set of currently configured input/output streams 5450 be called `S`. 5451 1. Find the minimum frame durations for each stream in `S`, by looking 5452 it up in android.scaler.streamConfigurationMap using {@link 5453 android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration} 5454 (with its respective size/format). Let this set of frame durations be 5455 called `F`. 5456 1. For any given request `R`, the minimum frame duration allowed 5457 for `R` is the maximum out of all values in `F`. Let the streams 5458 used in `R` be called `S_r`. 5459 5460 If none of the streams in `S_r` have a stall time (listed in {@link 5461 android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration} 5462 using its respective size/format), then the frame duration in `F` 5463 determines the steady state frame rate that the application will get 5464 if it uses `R` as a repeating request. Let this special kind of 5465 request be called `Rsimple`. 5466 5467 A repeating request `Rsimple` can be _occasionally_ interleaved 5468 by a single capture of a new request `Rstall` (which has at least 5469 one in-use stream with a non-0 stall time) and if `Rstall` has the 5470 same minimum frame duration this will not cause a frame rate loss 5471 if all buffers from the previous `Rstall` have already been 5472 delivered. 5473 5474 For more details about stalling, see 5475 {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration}. 5476 5477 This control is only effective if android.control.aeMode or android.control.mode is set to 5478 OFF; otherwise the auto-exposure algorithm will override this value. 5479 </details> 5480 <hal_details> 5481 For more details about stalling, see 5482 android.scaler.availableStallDurations. 5483 </hal_details> 5484 <tag id="V1" /> 5485 </entry> 5486 <entry name="sensitivity" type="int32" visibility="public" hwlevel="full"> 5487 <description>The amount of gain applied to sensor data 5488 before processing.</description> 5489 <units>ISO arithmetic units</units> 5490 <range>android.sensor.info.sensitivityRange</range> 5491 <details> 5492 The sensitivity is the standard ISO sensitivity value, 5493 as defined in ISO 12232:2006. 5494 5495 The sensitivity must be within android.sensor.info.sensitivityRange, and 5496 if if it less than android.sensor.maxAnalogSensitivity, the camera device 5497 is guaranteed to use only analog amplification for applying the gain. 5498 5499 If the camera device cannot apply the exact sensitivity 5500 requested, it will reduce the gain to the nearest supported 5501 value. The final sensitivity used will be available in the 5502 output capture result. 5503 </details> 5504 <hal_details>ISO 12232:2006 REI method is acceptable.</hal_details> 5505 <tag id="V1" /> 5506 </entry> 5507 </controls> 5508 <static> 5509 <namespace name="info"> 5510 <entry name="activeArraySize" type="int32" visibility="public" 5511 type_notes="Four ints defining the active pixel rectangle" 5512 container="array" 5513 typedef="rectangle" 5514 hwlevel="legacy"> 5515 <array> 5516 <size>4</size> 5517 </array> 5518 <description>The area of the image sensor which corresponds to 5519 active pixels.</description> 5520 <units>Pixel coordinates on the image sensor</units> 5521 <range> 5522 </range> 5523 <details> 5524 This is the region of the sensor that actually receives light from the scene. 5525 Therefore, the size of this region determines the maximum field of view and the maximum 5526 number of pixels that an image from this sensor can contain. 5527 5528 The rectangle is defined in terms of the full pixel array; (0,0) is the top-left of the 5529 full pixel array, and the size of the full pixel array is given by 5530 android.sensor.info.pixelArraySize. 5531 5532 Most other keys listing pixel coordinates have their coordinate systems based on the 5533 active array, with `(0, 0)` being the top-left of the active array rectangle. 5534 5535 The active array may be smaller than the full pixel array, since the full array may 5536 include black calibration pixels or other inactive regions. 5537 </details> 5538 <hal_details> 5539 This array contains `(xmin, ymin, width, height)`. The `(xmin, ymin)` must be 5540 &gt;= `(0,0)`. 5541 The `(width, height)` must be &lt;= `android.sensor.info.pixelArraySize`. 5542 </hal_details> 5543 <tag id="RAW" /> 5544 </entry> 5545 <entry name="sensitivityRange" type="int32" visibility="public" 5546 type_notes="Range of supported sensitivities" 5547 container="array" typedef="rangeInt" 5548 hwlevel="full"> 5549 <array> 5550 <size>2</size> 5551 </array> 5552 <description>Range of sensitivities for android.sensor.sensitivity supported by this 5553 camera device.</description> 5554 <range>Min <= 100, Max &gt;= 800</range> 5555 <details> 5556 The values are the standard ISO sensitivity values, 5557 as defined in ISO 12232:2006. 5558 </details> 5559 5560 <tag id="BC" /> 5561 <tag id="V1" /> 5562 </entry> 5563 <entry name="colorFilterArrangement" type="byte" visibility="public" enum="true" 5564 hwlevel="full"> 5565 <enum> 5566 <value>RGGB</value> 5567 <value>GRBG</value> 5568 <value>GBRG</value> 5569 <value>BGGR</value> 5570 <value>RGB 5571 <notes>Sensor is not Bayer; output has 3 16-bit 5572 values for each pixel, instead of just 1 16-bit value 5573 per pixel.</notes></value> 5574 </enum> 5575 <description>The arrangement of color filters on sensor; 5576 represents the colors in the top-left 2x2 section of 5577 the sensor, in reading order.</description> 5578 <tag id="RAW" /> 5579 </entry> 5580 <entry name="exposureTimeRange" type="int64" visibility="public" 5581 type_notes="nanoseconds" container="array" typedef="rangeLong" 5582 hwlevel="full"> 5583 <array> 5584 <size>2</size> 5585 </array> 5586 <description>The range of image exposure times for android.sensor.exposureTime supported 5587 by this camera device. 5588 </description> 5589 <units>Nanoseconds</units> 5590 <range>The minimum exposure time will be less than 100 us. For FULL 5591 capability devices (android.info.supportedHardwareLevel == FULL), 5592 the maximum exposure time will be greater than 100ms.</range> 5593 <hal_details>For FULL capability devices (android.info.supportedHardwareLevel == FULL), 5594 The maximum of the range SHOULD be at least 1 second (1e9), MUST be at least 5595 100ms. 5596 </hal_details> 5597 <tag id="V1" /> 5598 </entry> 5599 <entry name="maxFrameDuration" type="int64" visibility="public" 5600 hwlevel="full"> 5601 <description>The maximum possible frame duration (minimum frame rate) for 5602 android.sensor.frameDuration that is supported this camera device.</description> 5603 <units>Nanoseconds</units> 5604 <range>For FULL capability devices 5605 (android.info.supportedHardwareLevel == FULL), at least 100ms. 5606 </range> 5607 <details>Attempting to use frame durations beyond the maximum will result in the frame 5608 duration being clipped to the maximum. See that control for a full definition of frame 5609 durations. 5610 5611 Refer to {@link 5612 android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration} 5613 for the minimum frame duration values. 5614 </details> 5615 <hal_details> 5616 For FULL capability devices (android.info.supportedHardwareLevel == FULL), 5617 The maximum of the range SHOULD be at least 5618 1 second (1e9), MUST be at least 100ms (100e6). 5619 5620 android.sensor.info.maxFrameDuration must be greater or 5621 equal to the android.sensor.info.exposureTimeRange max 5622 value (since exposure time overrides frame duration). 5623 5624 Available minimum frame durations for JPEG must be no greater 5625 than that of the YUV_420_888/IMPLEMENTATION_DEFINED 5626 minimum frame durations (for that respective size). 5627 5628 Since JPEG processing is considered offline and can take longer than 5629 a single uncompressed capture, refer to 5630 android.scaler.availableStallDurations 5631 for details about encoding this scenario. 5632 </hal_details> 5633 <tag id="V1" /> 5634 </entry> 5635 <entry name="physicalSize" type="float" visibility="public" 5636 type_notes="width x height" 5637 container="array" typedef="sizeF" hwlevel="legacy"> 5638 <array> 5639 <size>2</size> 5640 </array> 5641 <description>The physical dimensions of the full pixel 5642 array.</description> 5643 <units>Millimeters</units> 5644 <details>This is the physical size of the sensor pixel 5645 array defined by android.sensor.info.pixelArraySize. 5646 </details> 5647 <hal_details>Needed for FOV calculation for old API</hal_details> 5648 <tag id="V1" /> 5649 <tag id="BC" /> 5650 </entry> 5651 <entry name="pixelArraySize" type="int32" visibility="public" 5652 container="array" typedef="size" hwlevel="legacy"> 5653 <array> 5654 <size>2</size> 5655 </array> 5656 <description>Dimensions of the full pixel array, possibly 5657 including black calibration pixels.</description> 5658 <units>Pixels</units> 5659 <details>The pixel count of the full pixel array, 5660 which covers android.sensor.info.physicalSize area. 5661 5662 If a camera device supports raw sensor formats, either this 5663 or android.sensor.info.activeArraySize is the maximum output 5664 raw size listed in android.scaler.streamConfigurationMap. 5665 If a size corresponding to pixelArraySize is listed, the resulting 5666 raw sensor image will include black pixels. 5667 5668 Some parts of the full pixel array may not receive light from the scene, 5669 or are otherwise inactive. The android.sensor.info.activeArraySize key 5670 defines the rectangle of active pixels that actually forms an image. 5671 </details> 5672 <tag id="RAW" /> 5673 <tag id="BC" /> 5674 </entry> 5675 <entry name="whiteLevel" type="int32" visibility="public"> 5676 <description> 5677 Maximum raw value output by sensor. 5678 </description> 5679 <range>&gt; 255 (8-bit output)</range> 5680 <details> 5681 This specifies the fully-saturated encoding level for the raw 5682 sample values from the sensor. This is typically caused by the 5683 sensor becoming highly non-linear or clipping. The minimum for 5684 each channel is specified by the offset in the 5685 android.sensor.blackLevelPattern key. 5686 5687 The white level is typically determined either by sensor bit depth 5688 (8-14 bits is expected), or by the point where the sensor response 5689 becomes too non-linear to be useful. The default value for this is 5690 maximum representable value for a 16-bit raw sample (2^16 - 1). 5691 </details> 5692 <hal_details> 5693 The full bit depth of the sensor must be available in the raw data, 5694 so the value for linear sensors should not be significantly lower 5695 than maximum raw value supported, i.e. 2^(sensor bits per pixel). 5696 </hal_details> 5697 <tag id="RAW" /> 5698 </entry> 5699 <entry name="timestampSource" type="byte" visibility="public" 5700 enum="true" hwlevel="legacy"> 5701 <enum> 5702 <value>UNKNOWN 5703 <notes> 5704 Timestamps from android.sensor.timestamp are in nanoseconds and monotonic, 5705 but can not be compared to timestamps from other subsystems 5706 (e.g. accelerometer, gyro etc.), or other instances of the same or different 5707 camera devices in the same system. Timestamps between streams and results for 5708 a single camera instance are comparable, and the timestamps for all buffers 5709 and the result metadata generated by a single capture are identical. 5710 </notes> 5711 </value> 5712 <value>REALTIME 5713 <notes> 5714 Timestamps from android.sensor.timestamp are in the same timebase as 5715 {@link android.os.SystemClock#elapsedRealtimeNanos}, 5716 and they can be compared to other timestamps using that base. 5717 </notes> 5718 </value> 5719 </enum> 5720 <description>The time base source for sensor capture start timestamps.</description> 5721 <details> 5722 The timestamps provided for captures are always in nanoseconds and monotonic, but 5723 may not based on a time source that can be compared to other system time sources. 5724 5725 This characteristic defines the source for the timestamps, and therefore whether they 5726 can be compared against other system time sources/timestamps. 5727 </details> 5728 <tag id="V1" /> 5729 </entry> 5730 <entry name="lensShadingApplied" type="byte" visibility="public" enum="true" 5731 typedef="boolean"> 5732 <enum> 5733 <value>FALSE</value> 5734 <value>TRUE</value> 5735 </enum> 5736 <description>Whether the RAW images output from this camera device are subject to 5737 lens shading correction.</description> 5738 <details> 5739 If TRUE, all images produced by the camera device in the RAW image formats will 5740 have lens shading correction already applied to it. If FALSE, the images will 5741 not be adjusted for lens shading correction. 5742 See android.request.maxNumOutputRaw for a list of RAW image formats. 5743 5744 This key will be `null` for all devices do not report this information. 5745 Devices with RAW capability will always report this information in this key. 5746 </details> 5747 </entry> 5748 </namespace> 5749 <entry name="referenceIlluminant1" type="byte" visibility="public" 5750 enum="true"> 5751 <enum> 5752 <value id="1">DAYLIGHT</value> 5753 <value id="2">FLUORESCENT</value> 5754 <value id="3">TUNGSTEN 5755 <notes>Incandescent light</notes> 5756 </value> 5757 <value id="4">FLASH</value> 5758 <value id="9">FINE_WEATHER</value> 5759 <value id="10">CLOUDY_WEATHER</value> 5760 <value id="11">SHADE</value> 5761 <value id="12">DAYLIGHT_FLUORESCENT 5762 <notes>D 5700 - 7100K</notes> 5763 </value> 5764 <value id="13">DAY_WHITE_FLUORESCENT 5765 <notes>N 4600 - 5400K</notes> 5766 </value> 5767 <value id="14">COOL_WHITE_FLUORESCENT 5768 <notes>W 3900 - 4500K</notes> 5769 </value> 5770 <value id="15">WHITE_FLUORESCENT 5771 <notes>WW 3200 - 3700K</notes> 5772 </value> 5773 <value id="17">STANDARD_A</value> 5774 <value id="18">STANDARD_B</value> 5775 <value id="19">STANDARD_C</value> 5776 <value id="20">D55</value> 5777 <value id="21">D65</value> 5778 <value id="22">D75</value> 5779 <value id="23">D50</value> 5780 <value id="24">ISO_STUDIO_TUNGSTEN</value> 5781 </enum> 5782 <description> 5783 The standard reference illuminant used as the scene light source when 5784 calculating the android.sensor.colorTransform1, 5785 android.sensor.calibrationTransform1, and 5786 android.sensor.forwardMatrix1 matrices. 5787 </description> 5788 <details> 5789 The values in this key correspond to the values defined for the 5790 EXIF LightSource tag. These illuminants are standard light sources 5791 that are often used calibrating camera devices. 5792 5793 If this key is present, then android.sensor.colorTransform1, 5794 android.sensor.calibrationTransform1, and 5795 android.sensor.forwardMatrix1 will also be present. 5796 5797 Some devices may choose to provide a second set of calibration 5798 information for improved quality, including 5799 android.sensor.referenceIlluminant2 and its corresponding matrices. 5800 </details> 5801 <hal_details> 5802 The first reference illuminant (android.sensor.referenceIlluminant1) 5803 and corresponding matrices must be present to support the RAW capability 5804 and DNG output. 5805 5806 When producing raw images with a color profile that has only been 5807 calibrated against a single light source, it is valid to omit 5808 android.sensor.referenceIlluminant2 along with the 5809 android.sensor.colorTransform2, android.sensor.calibrationTransform2, 5810 and android.sensor.forwardMatrix2 matrices. 5811 5812 If only android.sensor.referenceIlluminant1 is included, it should be 5813 chosen so that it is representative of typical scene lighting. In 5814 general, D50 or DAYLIGHT will be chosen for this case. 5815 5816 If both android.sensor.referenceIlluminant1 and 5817 android.sensor.referenceIlluminant2 are included, they should be 5818 chosen to represent the typical range of scene lighting conditions. 5819 In general, low color temperature illuminant such as Standard-A will 5820 be chosen for the first reference illuminant and a higher color 5821 temperature illuminant such as D65 will be chosen for the second 5822 reference illuminant. 5823 </hal_details> 5824 <tag id="RAW" /> 5825 </entry> 5826 <entry name="referenceIlluminant2" type="byte" visibility="public"> 5827 <description> 5828 The standard reference illuminant used as the scene light source when 5829 calculating the android.sensor.colorTransform2, 5830 android.sensor.calibrationTransform2, and 5831 android.sensor.forwardMatrix2 matrices. 5832 </description> 5833 <range>Any value listed in android.sensor.referenceIlluminant1</range> 5834 <details> 5835 See android.sensor.referenceIlluminant1 for more details. 5836 5837 If this key is present, then android.sensor.colorTransform2, 5838 android.sensor.calibrationTransform2, and 5839 android.sensor.forwardMatrix2 will also be present. 5840 </details> 5841 <tag id="RAW" /> 5842 </entry> 5843 <entry name="calibrationTransform1" type="rational" 5844 visibility="public" optional="true" 5845 type_notes="3x3 matrix in row-major-order" container="array" 5846 typedef="colorSpaceTransform"> 5847 <array> 5848 <size>3</size> 5849 <size>3</size> 5850 </array> 5851 <description> 5852 A per-device calibration transform matrix that maps from the 5853 reference sensor colorspace to the actual device sensor colorspace. 5854 </description> 5855 <details> 5856 This matrix is used to correct for per-device variations in the 5857 sensor colorspace, and is used for processing raw buffer data. 5858 5859 The matrix is expressed as a 3x3 matrix in row-major-order, and 5860 contains a per-device calibration transform that maps colors 5861 from reference sensor color space (i.e. the "golden module" 5862 colorspace) into this camera device's native sensor color 5863 space under the first reference illuminant 5864 (android.sensor.referenceIlluminant1). 5865 </details> 5866 <tag id="RAW" /> 5867 </entry> 5868 <entry name="calibrationTransform2" type="rational" 5869 visibility="public" optional="true" 5870 type_notes="3x3 matrix in row-major-order" container="array" 5871 typedef="colorSpaceTransform"> 5872 <array> 5873 <size>3</size> 5874 <size>3</size> 5875 </array> 5876 <description> 5877 A per-device calibration transform matrix that maps from the 5878 reference sensor colorspace to the actual device sensor colorspace 5879 (this is the colorspace of the raw buffer data). 5880 </description> 5881 <details> 5882 This matrix is used to correct for per-device variations in the 5883 sensor colorspace, and is used for processing raw buffer data. 5884 5885 The matrix is expressed as a 3x3 matrix in row-major-order, and 5886 contains a per-device calibration transform that maps colors 5887 from reference sensor color space (i.e. the "golden module" 5888 colorspace) into this camera device's native sensor color 5889 space under the second reference illuminant 5890 (android.sensor.referenceIlluminant2). 5891 5892 This matrix will only be present if the second reference 5893 illuminant is present. 5894 </details> 5895 <tag id="RAW" /> 5896 </entry> 5897 <entry name="colorTransform1" type="rational" 5898 visibility="public" optional="true" 5899 type_notes="3x3 matrix in row-major-order" container="array" 5900 typedef="colorSpaceTransform"> 5901 <array> 5902 <size>3</size> 5903 <size>3</size> 5904 </array> 5905 <description> 5906 A matrix that transforms color values from CIE XYZ color space to 5907 reference sensor color space. 5908 </description> 5909 <details> 5910 This matrix is used to convert from the standard CIE XYZ color 5911 space to the reference sensor colorspace, and is used when processing 5912 raw buffer data. 5913 5914 The matrix is expressed as a 3x3 matrix in row-major-order, and 5915 contains a color transform matrix that maps colors from the CIE 5916 XYZ color space to the reference sensor color space (i.e. the 5917 "golden module" colorspace) under the first reference illuminant 5918 (android.sensor.referenceIlluminant1). 5919 5920 The white points chosen in both the reference sensor color space 5921 and the CIE XYZ colorspace when calculating this transform will 5922 match the standard white point for the first reference illuminant 5923 (i.e. no chromatic adaptation will be applied by this transform). 5924 </details> 5925 <tag id="RAW" /> 5926 </entry> 5927 <entry name="colorTransform2" type="rational" 5928 visibility="public" optional="true" 5929 type_notes="3x3 matrix in row-major-order" container="array" 5930 typedef="colorSpaceTransform"> 5931 <array> 5932 <size>3</size> 5933 <size>3</size> 5934 </array> 5935 <description> 5936 A matrix that transforms color values from CIE XYZ color space to 5937 reference sensor color space. 5938 </description> 5939 <details> 5940 This matrix is used to convert from the standard CIE XYZ color 5941 space to the reference sensor colorspace, and is used when processing 5942 raw buffer data. 5943 5944 The matrix is expressed as a 3x3 matrix in row-major-order, and 5945 contains a color transform matrix that maps colors from the CIE 5946 XYZ color space to the reference sensor color space (i.e. the 5947 "golden module" colorspace) under the second reference illuminant 5948 (android.sensor.referenceIlluminant2). 5949 5950 The white points chosen in both the reference sensor color space 5951 and the CIE XYZ colorspace when calculating this transform will 5952 match the standard white point for the second reference illuminant 5953 (i.e. no chromatic adaptation will be applied by this transform). 5954 5955 This matrix will only be present if the second reference 5956 illuminant is present. 5957 </details> 5958 <tag id="RAW" /> 5959 </entry> 5960 <entry name="forwardMatrix1" type="rational" 5961 visibility="public" optional="true" 5962 type_notes="3x3 matrix in row-major-order" container="array" 5963 typedef="colorSpaceTransform"> 5964 <array> 5965 <size>3</size> 5966 <size>3</size> 5967 </array> 5968 <description> 5969 A matrix that transforms white balanced camera colors from the reference 5970 sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint. 5971 </description> 5972 <details> 5973 This matrix is used to convert to the standard CIE XYZ colorspace, and 5974 is used when processing raw buffer data. 5975 5976 This matrix is expressed as a 3x3 matrix in row-major-order, and contains 5977 a color transform matrix that maps white balanced colors from the 5978 reference sensor color space to the CIE XYZ color space with a D50 white 5979 point. 5980 5981 Under the first reference illuminant (android.sensor.referenceIlluminant1) 5982 this matrix is chosen so that the standard white point for this reference 5983 illuminant in the reference sensor colorspace is mapped to D50 in the 5984 CIE XYZ colorspace. 5985 </details> 5986 <tag id="RAW" /> 5987 </entry> 5988 <entry name="forwardMatrix2" type="rational" 5989 visibility="public" optional="true" 5990 type_notes="3x3 matrix in row-major-order" container="array" 5991 typedef="colorSpaceTransform"> 5992 <array> 5993 <size>3</size> 5994 <size>3</size> 5995 </array> 5996 <description> 5997 A matrix that transforms white balanced camera colors from the reference 5998 sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint. 5999 </description> 6000 <details> 6001 This matrix is used to convert to the standard CIE XYZ colorspace, and 6002 is used when processing raw buffer data. 6003 6004 This matrix is expressed as a 3x3 matrix in row-major-order, and contains 6005 a color transform matrix that maps white balanced colors from the 6006 reference sensor color space to the CIE XYZ color space with a D50 white 6007 point. 6008 6009 Under the second reference illuminant (android.sensor.referenceIlluminant2) 6010 this matrix is chosen so that the standard white point for this reference 6011 illuminant in the reference sensor colorspace is mapped to D50 in the 6012 CIE XYZ colorspace. 6013 6014 This matrix will only be present if the second reference 6015 illuminant is present. 6016 </details> 6017 <tag id="RAW" /> 6018 </entry> 6019 <entry name="baseGainFactor" type="rational" 6020 optional="true"> 6021 <description>Gain factor from electrons to raw units when 6022 ISO=100</description> 6023 <tag id="FUTURE" /> 6024 </entry> 6025 <entry name="blackLevelPattern" type="int32" visibility="public" 6026 optional="true" type_notes="2x2 raw count block" container="array" 6027 typedef="blackLevelPattern"> 6028 <array> 6029 <size>4</size> 6030 </array> 6031 <description> 6032 A fixed black level offset for each of the color filter arrangement 6033 (CFA) mosaic channels. 6034 </description> 6035 <range>&gt;= 0 for each.</range> 6036 <details> 6037 This key specifies the zero light value for each of the CFA mosaic 6038 channels in the camera sensor. The maximal value output by the 6039 sensor is represented by the value in android.sensor.info.whiteLevel. 6040 6041 The values are given in the same order as channels listed for the CFA 6042 layout key (see android.sensor.info.colorFilterArrangement), i.e. the 6043 nth value given corresponds to the black level offset for the nth 6044 color channel listed in the CFA. 6045 </details> 6046 <hal_details> 6047 The values are given in row-column scan order, with the first value 6048 corresponding to the element of the CFA in row=0, column=0. 6049 </hal_details> 6050 <tag id="RAW" /> 6051 </entry> 6052 <entry name="maxAnalogSensitivity" type="int32" visibility="public" 6053 optional="true" hwlevel="full"> 6054 <description>Maximum sensitivity that is implemented 6055 purely through analog gain.</description> 6056 <details>For android.sensor.sensitivity values less than or 6057 equal to this, all applied gain must be analog. For 6058 values above this, the gain applied can be a mix of analog and 6059 digital.</details> 6060 <tag id="V1" /> 6061 <tag id="FULL" /> 6062 </entry> 6063 <entry name="orientation" type="int32" visibility="public" 6064 hwlevel="legacy"> 6065 <description>Clockwise angle through which the output image needs to be rotated to be 6066 upright on the device screen in its native orientation. 6067 </description> 6068 <units>Degrees of clockwise rotation; always a multiple of 6069 90</units> 6070 <range>0, 90, 180, 270</range> 6071 <details> 6072 Also defines the direction of rolling shutter readout, which is from top to bottom in 6073 the sensor's coordinate system. 6074 </details> 6075 <tag id="BC" /> 6076 </entry> 6077 <entry name="profileHueSatMapDimensions" type="int32" 6078 visibility="system" optional="true" 6079 type_notes="Number of samples for hue, saturation, and value" 6080 container="array"> 6081 <array> 6082 <size>3</size> 6083 </array> 6084 <description> 6085 The number of input samples for each dimension of 6086 android.sensor.profileHueSatMap. 6087 </description> 6088 <range> 6089 Hue &gt;= 1, 6090 Saturation &gt;= 2, 6091 Value &gt;= 1 6092 </range> 6093 <details> 6094 The number of input samples for the hue, saturation, and value 6095 dimension of android.sensor.profileHueSatMap. The order of the 6096 dimensions given is hue, saturation, value; where hue is the 0th 6097 element. 6098 </details> 6099 <tag id="RAW" /> 6100 </entry> 6101 </static> 6102 <dynamic> 6103 <clone entry="android.sensor.exposureTime" kind="controls"> 6104 </clone> 6105 <clone entry="android.sensor.frameDuration" 6106 kind="controls"></clone> 6107 <clone entry="android.sensor.sensitivity" kind="controls"> 6108 </clone> 6109 <entry name="timestamp" type="int64" visibility="public" 6110 hwlevel="legacy"> 6111 <description>Time at start of exposure of first 6112 row of the image sensor active array, in nanoseconds.</description> 6113 <units>Nanoseconds</units> 6114 <range>&gt; 0</range> 6115 <details>The timestamps are also included in all image 6116 buffers produced for the same capture, and will be identical 6117 on all the outputs. 6118 6119 When android.sensor.info.timestampSource `==` UNKNOWN, 6120 the timestamps measure time since an unspecified starting point, 6121 and are monotonically increasing. They can be compared with the 6122 timestamps for other captures from the same camera device, but are 6123 not guaranteed to be comparable to any other time source. 6124 6125 When android.sensor.info.timestampSource `==` REALTIME, the 6126 timestamps measure time in the same timebase as {@link 6127 android.os.SystemClock#elapsedRealtimeNanos}, and they can 6128 be compared to other timestamps from other subsystems that 6129 are using that base. 6130 </details> 6131 <hal_details> 6132 All timestamps must be in reference to the kernel's 6133 CLOCK_BOOTTIME monotonic clock, which properly accounts for 6134 time spent asleep. This allows for synchronization with 6135 sensors that continue to operate while the system is 6136 otherwise asleep. 6137 6138 If android.sensor.info.timestampSource `==` REALTIME, 6139 The timestamp must be synchronized with the timestamps from other 6140 sensor subsystems that are using the same timebase. 6141 </hal_details> 6142 <tag id="BC" /> 6143 </entry> 6144 <entry name="temperature" type="float" 6145 optional="true"> 6146 <description>The temperature of the sensor, sampled at the time 6147 exposure began for this frame. 6148 6149 The thermal diode being queried should be inside the sensor PCB, or 6150 somewhere close to it. 6151 </description> 6152 6153 <units>Celsius</units> 6154 <range>Optional. This value is missing if no temperature is available.</range> 6155 <tag id="FUTURE" /> 6156 </entry> 6157 <entry name="neutralColorPoint" type="rational" visibility="public" 6158 optional="true" container="array"> 6159 <array> 6160 <size>3</size> 6161 </array> 6162 <description> 6163 The estimated camera neutral color in the native sensor colorspace at 6164 the time of capture. 6165 </description> 6166 <details> 6167 This value gives the neutral color point encoded as an RGB value in the 6168 native sensor color space. The neutral color point indicates the 6169 currently estimated white point of the scene illumination. It can be 6170 used to interpolate between the provided color transforms when 6171 processing raw sensor data. 6172 6173 The order of the values is R, G, B; where R is in the lowest index. 6174 </details> 6175 <tag id="RAW" /> 6176 </entry> 6177 <entry name="noiseProfile" type="double" visibility="public" 6178 optional="true" type_notes="Pairs of noise model coefficients" 6179 container="array" typedef="pairDoubleDouble"> 6180 <array> 6181 <size>2</size> 6182 <size>CFA Channels</size> 6183 </array> 6184 <description> 6185 Noise model coefficients for each CFA mosaic channel. 6186 </description> 6187 <details> 6188 This key contains two noise model coefficients for each CFA channel 6189 corresponding to the sensor amplification (S) and sensor readout 6190 noise (O). These are given as pairs of coefficients for each channel 6191 in the same order as channels listed for the CFA layout key 6192 (see android.sensor.info.colorFilterArrangement). This is 6193 represented as an array of Pair&lt;Double, Double&gt;, where 6194 the first member of the Pair at index n is the S coefficient and the 6195 second member is the O coefficient for the nth color channel in the CFA. 6196 6197 These coefficients are used in a two parameter noise model to describe 6198 the amount of noise present in the image for each CFA channel. The 6199 noise model used here is: 6200 6201 N(x) = sqrt(Sx + O) 6202 6203 Where x represents the recorded signal of a CFA channel normalized to 6204 the range [0, 1], and S and O are the noise model coeffiecients for 6205 that channel. 6206 6207 A more detailed description of the noise model can be found in the 6208 Adobe DNG specification for the NoiseProfile tag. 6209 </details> 6210 <hal_details> 6211 For a CFA layout of RGGB, the list of coefficients would be given as 6212 an array of doubles S0,O0,S1,O1,..., where S0 and O0 are the coefficients 6213 for the red channel, S1 and O1 are the coefficients for the first green 6214 channel, etc. 6215 </hal_details> 6216 <tag id="RAW" /> 6217 </entry> 6218 <entry name="profileHueSatMap" type="float" 6219 visibility="system" optional="true" 6220 type_notes="Mapping for hue, saturation, and value" 6221 container="array"> 6222 <array> 6223 <size>hue_samples</size> 6224 <size>saturation_samples</size> 6225 <size>value_samples</size> 6226 <size>3</size> 6227 </array> 6228 <description> 6229 A mapping containing a hue shift, saturation scale, and value scale 6230 for each pixel. 6231 </description> 6232 <units> 6233 The hue shift is given in degrees; saturation and value scale factors are 6234 unitless and are between 0 and 1 inclusive 6235 </units> 6236 <details> 6237 hue_samples, saturation_samples, and value_samples are given in 6238 android.sensor.profileHueSatMapDimensions. 6239 6240 Each entry of this map contains three floats corresponding to the 6241 hue shift, saturation scale, and value scale, respectively; where the 6242 hue shift has the lowest index. The map entries are stored in the key 6243 in nested loop order, with the value divisions in the outer loop, the 6244 hue divisions in the middle loop, and the saturation divisions in the 6245 inner loop. All zero input saturation entries are required to have a 6246 value scale factor of 1.0. 6247 </details> 6248 <tag id="RAW" /> 6249 </entry> 6250 <entry name="profileToneCurve" type="float" 6251 visibility="system" optional="true" 6252 type_notes="Samples defining a spline for a tone-mapping curve" 6253 container="array"> 6254 <array> 6255 <size>samples</size> 6256 <size>2</size> 6257 </array> 6258 <description> 6259 A list of x,y samples defining a tone-mapping curve for gamma adjustment. 6260 </description> 6261 <range> 6262 Each sample has an input range of `[0, 1]` and an output range of 6263 `[0, 1]`. The first sample is required to be `(0, 0)`, and the last 6264 sample is required to be `(1, 1)`. 6265 </range> 6266 <details> 6267 This key contains a default tone curve that can be applied while 6268 processing the image as a starting point for user adjustments. 6269 The curve is specified as a list of value pairs in linear gamma. 6270 The curve is interpolated using a cubic spline. 6271 </details> 6272 <tag id="RAW" /> 6273 </entry> 6274 <entry name="greenSplit" type="float" visibility="public" optional="true"> 6275 <description> 6276 The worst-case divergence between Bayer green channels. 6277 </description> 6278 <range> 6279 &gt;= 0 6280 </range> 6281 <details> 6282 This value is an estimate of the worst case split between the 6283 Bayer green channels in the red and blue rows in the sensor color 6284 filter array. 6285 6286 The green split is calculated as follows: 6287 6288 1. A 5x5 pixel (or larger) window W within the active sensor array is 6289 chosen. The term 'pixel' here is taken to mean a group of 4 Bayer 6290 mosaic channels (R, Gr, Gb, B). The location and size of the window 6291 chosen is implementation defined, and should be chosen to provide a 6292 green split estimate that is both representative of the entire image 6293 for this camera sensor, and can be calculated quickly. 6294 1. The arithmetic mean of the green channels from the red 6295 rows (mean_Gr) within W is computed. 6296 1. The arithmetic mean of the green channels from the blue 6297 rows (mean_Gb) within W is computed. 6298 1. The maximum ratio R of the two means is computed as follows: 6299 `R = max((mean_Gr + 1)/(mean_Gb + 1), (mean_Gb + 1)/(mean_Gr + 1))` 6300 6301 The ratio R is the green split divergence reported for this property, 6302 which represents how much the green channels differ in the mosaic 6303 pattern. This value is typically used to determine the treatment of 6304 the green mosaic channels when demosaicing. 6305 6306 The green split value can be roughly interpreted as follows: 6307 6308 * R &lt; 1.03 is a negligible split (&lt;3% divergence). 6309 * 1.20 &lt;= R &gt;= 1.03 will require some software 6310 correction to avoid demosaic errors (3-20% divergence). 6311 * R &gt; 1.20 will require strong software correction to produce 6312 a usuable image (&gt;20% divergence). 6313 </details> 6314 <hal_details> 6315 The green split given may be a static value based on prior 6316 characterization of the camera sensor using the green split 6317 calculation method given here over a large, representative, sample 6318 set of images. Other methods of calculation that produce equivalent 6319 results, and can be interpreted in the same manner, may be used. 6320 </hal_details> 6321 <tag id="RAW" /> 6322 </entry> 6323 </dynamic> 6324 <controls> 6325 <entry name="testPatternData" type="int32" visibility="public" optional="true" container="array"> 6326 <array> 6327 <size>4</size> 6328 </array> 6329 <description> 6330 A pixel `[R, G_even, G_odd, B]` that supplies the test pattern 6331 when android.sensor.testPatternMode is SOLID_COLOR. 6332 </description> 6333 <details> 6334 Each color channel is treated as an unsigned 32-bit integer. 6335 The camera device then uses the most significant X bits 6336 that correspond to how many bits are in its Bayer raw sensor 6337 output. 6338 6339 For example, a sensor with RAW10 Bayer output would use the 6340 10 most significant bits from each color channel. 6341 </details> 6342 <hal_details> 6343 </hal_details> 6344 </entry> 6345 <entry name="testPatternMode" type="int32" visibility="public" optional="true" 6346 enum="true"> 6347 <enum> 6348 <value>OFF 6349 <notes>No test pattern mode is used, and the camera 6350 device returns captures from the image sensor. 6351 6352 This is the default if the key is not set.</notes> 6353 </value> 6354 <value>SOLID_COLOR 6355 <notes> 6356 Each pixel in `[R, G_even, G_odd, B]` is replaced by its 6357 respective color channel provided in 6358 android.sensor.testPatternData. 6359 6360 For example: 6361 6362 android.testPatternData = [0, 0xFFFFFFFF, 0xFFFFFFFF, 0] 6363 6364 All green pixels are 100% green. All red/blue pixels are black. 6365 6366 android.testPatternData = [0xFFFFFFFF, 0, 0xFFFFFFFF, 0] 6367 6368 All red pixels are 100% red. Only the odd green pixels 6369 are 100% green. All blue pixels are 100% black. 6370 </notes> 6371 </value> 6372 <value>COLOR_BARS 6373 <notes> 6374 All pixel data is replaced with an 8-bar color pattern. 6375 6376 The vertical bars (left-to-right) are as follows: 6377 6378 * 100% white 6379 * yellow 6380 * cyan 6381 * green 6382 * magenta 6383 * red 6384 * blue 6385 * black 6386 6387 In general the image would look like the following: 6388 6389 W Y C G M R B K 6390 W Y C G M R B K 6391 W Y C G M R B K 6392 W Y C G M R B K 6393 W Y C G M R B K 6394 . . . . . . . . 6395 . . . . . . . . 6396 . . . . . . . . 6397 6398 (B = Blue, K = Black) 6399 6400 Each bar should take up 1/8 of the sensor pixel array width. 6401 When this is not possible, the bar size should be rounded 6402 down to the nearest integer and the pattern can repeat 6403 on the right side. 6404 6405 Each bar's height must always take up the full sensor 6406 pixel array height. 6407 6408 Each pixel in this test pattern must be set to either 6409 0% intensity or 100% intensity. 6410 </notes> 6411 </value> 6412 <value>COLOR_BARS_FADE_TO_GRAY 6413 <notes> 6414 The test pattern is similar to COLOR_BARS, except that 6415 each bar should start at its specified color at the top, 6416 and fade to gray at the bottom. 6417 6418 Furthermore each bar is further subdivided into a left and 6419 right half. The left half should have a smooth gradient, 6420 and the right half should have a quantized gradient. 6421 6422 In particular, the right half's should consist of blocks of the 6423 same color for 1/16th active sensor pixel array width. 6424 6425 The least significant bits in the quantized gradient should 6426 be copied from the most significant bits of the smooth gradient. 6427 6428 The height of each bar should always be a multiple of 128. 6429 When this is not the case, the pattern should repeat at the bottom 6430 of the image. 6431 </notes> 6432 </value> 6433 <value>PN9 6434 <notes> 6435 All pixel data is replaced by a pseudo-random sequence 6436 generated from a PN9 512-bit sequence (typically implemented 6437 in hardware with a linear feedback shift register). 6438 6439 The generator should be reset at the beginning of each frame, 6440 and thus each subsequent raw frame with this test pattern should 6441 be exactly the same as the last. 6442 </notes> 6443 </value> 6444 <value id="256">CUSTOM1 6445 <notes>The first custom test pattern. All custom patterns that are 6446 available only on this camera device are at least this numeric 6447 value. 6448 6449 All of the custom test patterns will be static 6450 (that is the raw image must not vary from frame to frame). 6451 </notes> 6452 </value> 6453 </enum> 6454 <description>When enabled, the sensor sends a test pattern instead of 6455 doing a real exposure from the camera. 6456 </description> 6457 <range>android.sensor.availableTestPatternModes</range> 6458 <details> 6459 When a test pattern is enabled, all manual sensor controls specified 6460 by android.sensor.* will be ignored. All other controls should 6461 work as normal. 6462 6463 For example, if manual flash is enabled, flash firing should still 6464 occur (and that the test pattern remain unmodified, since the flash 6465 would not actually affect it). 6466 6467 Defaults to OFF. 6468 </details> 6469 <hal_details> 6470 All test patterns are specified in the Bayer domain. 6471 6472 The HAL may choose to substitute test patterns from the sensor 6473 with test patterns from on-device memory. In that case, it should be 6474 indistinguishable to the ISP whether the data came from the 6475 sensor interconnect bus (such as CSI2) or memory. 6476 </hal_details> 6477 </entry> 6478 </controls> 6479 <dynamic> 6480 <clone entry="android.sensor.testPatternData" kind="controls"> 6481 </clone> 6482 <clone entry="android.sensor.testPatternMode" kind="controls"> 6483 </clone> 6484 </dynamic> 6485 <static> 6486 <entry name="availableTestPatternModes" type="int32" visibility="public" optional="true" 6487 type_notes="list of enums" container="array"> 6488 <array> 6489 <size>n</size> 6490 </array> 6491 <description>List of sensor test pattern modes for android.sensor.testPatternMode 6492 supported by this camera device. 6493 </description> 6494 <range>Any value listed in android.sensor.testPatternMode</range> 6495 <details> 6496 Defaults to OFF, and always includes OFF if defined. 6497 </details> 6498 <hal_details> 6499 All custom modes must be >= CUSTOM1. 6500 </hal_details> 6501 </entry> 6502 </static> 6503 <dynamic> 6504 <entry name="rollingShutterSkew" type="int64" visibility="public" hwlevel="limited"> 6505 <description>Duration between the start of first row exposure 6506 and the start of last row exposure.</description> 6507 <units>Nanoseconds</units> 6508 <range> &gt;= 0 and &lt; 6509 {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration}.</range> 6510 <details> 6511 This is the exposure time skew between the first and last 6512 row exposure start times. The first row and the last row are 6513 the first and last rows inside of the 6514 android.sensor.info.activeArraySize. 6515 6516 For typical camera sensors that use rolling shutters, this is also equivalent 6517 to the frame readout time. 6518 </details> 6519 <hal_details> 6520 The HAL must report `0` if the sensor is using global shutter, where all pixels begin 6521 exposure at the same time. 6522 </hal_details> 6523 <tag id="V1" /> 6524 </entry> 6525 </dynamic> 6526 </section> 6527 <section name="shading"> 6528 <controls> 6529 <entry name="mode" type="byte" visibility="public" enum="true" hwlevel="full"> 6530 <enum> 6531 <value>OFF 6532 <notes>No lens shading correction is applied.</notes></value> 6533 <value>FAST 6534 <notes>Apply lens shading corrections, without slowing 6535 frame rate relative to sensor raw output</notes></value> 6536 <value>HIGH_QUALITY 6537 <notes>Apply high-quality lens shading correction, at the 6538 cost of possibly reduced frame rate.</notes></value> 6539 </enum> 6540 <description>Quality of lens shading correction applied 6541 to the image data.</description> 6542 <range>android.shading.availableModes</range> 6543 <details> 6544 When set to OFF mode, no lens shading correction will be applied by the 6545 camera device, and an identity lens shading map data will be provided 6546 if `android.statistics.lensShadingMapMode == ON`. For example, for lens 6547 shading map with size of `[ 4, 3 ]`, 6548 the output android.statistics.lensShadingCorrectionMap for this case will be an identity 6549 map shown below: 6550 6551 [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 6552 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 6553 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 6554 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 6555 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 6556 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] 6557 6558 When set to other modes, lens shading correction will be applied by the camera 6559 device. Applications can request lens shading map data by setting 6560 android.statistics.lensShadingMapMode to ON, and then the camera device will provide lens 6561 shading map data in android.statistics.lensShadingCorrectionMap; the returned shading map 6562 data will be the one applied by the camera device for this capture request. 6563 6564 The shading map data may depend on the auto-exposure (AE) and AWB statistics, therefore 6565 the reliability of the map data may be affected by the AE and AWB algorithms. When AE and 6566 AWB are in AUTO modes(android.control.aeMode `!=` OFF and android.control.awbMode `!=` 6567 OFF), to get best results, it is recommended that the applications wait for the AE and AWB 6568 to be converged before using the returned shading map data. 6569 </details> 6570 </entry> 6571 <entry name="strength" type="byte"> 6572 <description>Control the amount of shading correction 6573 applied to the images</description> 6574 <units>unitless: 1-10; 10 is full shading 6575 compensation</units> 6576 <tag id="FUTURE" /> 6577 </entry> 6578 </controls> 6579 <dynamic> 6580 <clone entry="android.shading.mode" kind="controls"> 6581 </clone> 6582 </dynamic> 6583 <static> 6584 <entry name="availableModes" type="byte" visibility="public" 6585 type_notes="List of enums (android.shading.mode)." container="array" 6586 typedef="enumList" hwlevel="legacy"> 6587 <array> 6588 <size>n</size> 6589 </array> 6590 <description> 6591 List of lens shading modes for android.shading.mode that are supported by this camera device. 6592 </description> 6593 <range>Any value listed in android.shading.mode</range> 6594 <details> 6595 This list contains lens shading modes that can be set for the camera device. 6596 Camera devices that support the MANUAL_POST_PROCESSING capability will always 6597 list OFF and FAST mode. This includes all FULL level devices. 6598 LEGACY devices will always only support FAST mode. 6599 </details> 6600 <hal_details> 6601 HAL must support both FAST and HIGH_QUALITY if lens shading correction control is 6602 available on the camera device, but the underlying implementation can be the same for 6603 both modes. That is, if the highest quality implementation on the camera device does not 6604 slow down capture rate, then FAST and HIGH_QUALITY will generate the same output. 6605 </hal_details> 6606 </entry> 6607 </static> 6608 </section> 6609 <section name="statistics"> 6610 <controls> 6611 <entry name="faceDetectMode" type="byte" visibility="public" enum="true" 6612 hwlevel="legacy"> 6613 <enum> 6614 <value>OFF 6615 <notes>Do not include face detection statistics in capture 6616 results.</notes></value> 6617 <value optional="true">SIMPLE 6618 <notes>Return face rectangle and confidence values only. 6619 </notes></value> 6620 <value optional="true">FULL 6621 <notes>Return all face 6622 metadata. 6623 6624 In this mode, face rectangles, scores, landmarks, and face IDs are all valid. 6625 </notes></value> 6626 </enum> 6627 <description>Operating mode for the face detector 6628 unit.</description> 6629 <range>android.statistics.info.availableFaceDetectModes</range> 6630 <details>Whether face detection is enabled, and whether it 6631 should output just the basic fields or the full set of 6632 fields.</details> 6633 <hal_details> 6634 SIMPLE mode must fill in android.statistics.faceRectangles and 6635 android.statistics.faceScores. 6636 FULL mode must also fill in android.statistics.faceIds, and 6637 android.statistics.faceLandmarks. 6638 </hal_details> 6639 <tag id="BC" /> 6640 </entry> 6641 <entry name="histogramMode" type="byte" enum="true" typedef="boolean"> 6642 <enum> 6643 <value>OFF</value> 6644 <value>ON</value> 6645 </enum> 6646 <description>Operating mode for histogram 6647 generation</description> 6648 <tag id="FUTURE" /> 6649 </entry> 6650 <entry name="sharpnessMapMode" type="byte" enum="true" typedef="boolean"> 6651 <enum> 6652 <value>OFF</value> 6653 <value>ON</value> 6654 </enum> 6655 <description>Operating mode for sharpness map 6656 generation</description> 6657 <tag id="FUTURE" /> 6658 </entry> 6659 <entry name="hotPixelMapMode" type="byte" visibility="public" enum="true" 6660 typedef="boolean"> 6661 <enum> 6662 <value>OFF 6663 <notes>Hot pixel map production is disabled. 6664 </notes></value> 6665 <value>ON 6666 <notes>Hot pixel map production is enabled. 6667 </notes></value> 6668 </enum> 6669 <description> 6670 Operating mode for hot pixel map generation. 6671 </description> 6672 <range>android.statistics.info.availableHotPixelMapModes</range> 6673 <details> 6674 If set to `true`, a hot pixel map is returned in android.statistics.hotPixelMap. 6675 If set to `false`, no hot pixel map will be returned. 6676 </details> 6677 <tag id="V1" /> 6678 <tag id="RAW" /> 6679 </entry> 6680 </controls> 6681 <static> 6682 <namespace name="info"> 6683 <entry name="availableFaceDetectModes" type="byte" 6684 visibility="public" 6685 type_notes="List of enums from android.statistics.faceDetectMode" 6686 container="array" 6687 typedef="enumList" 6688 hwlevel="legacy"> 6689 <array> 6690 <size>n</size> 6691 </array> 6692 <description>List of face detection modes for android.statistics.faceDetectMode that are 6693 supported by this camera device. 6694 </description> 6695 <range>Any value listed in android.statistics.faceDetectMode</range> 6696 <details>OFF is always supported. 6697 </details> 6698 </entry> 6699 <entry name="histogramBucketCount" type="int32"> 6700 <description>Number of histogram buckets 6701 supported</description> 6702 <range>&gt;= 64</range> 6703 <tag id="FUTURE" /> 6704 </entry> 6705 <entry name="maxFaceCount" type="int32" visibility="public" hwlevel="legacy"> 6706 <description>The maximum number of simultaneously detectable 6707 faces.</description> 6708 <range>0 for cameras without available face detection; otherwise: 6709 `>=4` for LIMITED or FULL hwlevel devices or 6710 `>0` for LEGACY devices.</range> 6711 <tag id="BC" /> 6712 </entry> 6713 <entry name="maxHistogramCount" type="int32"> 6714 <description>Maximum value possible for a histogram 6715 bucket</description> 6716 <tag id="FUTURE" /> 6717 </entry> 6718 <entry name="maxSharpnessMapValue" type="int32"> 6719 <description>Maximum value possible for a sharpness map 6720 region.</description> 6721 <tag id="FUTURE" /> 6722 </entry> 6723 <entry name="sharpnessMapSize" type="int32" 6724 type_notes="width x height" container="array" typedef="size"> 6725 <array> 6726 <size>2</size> 6727 </array> 6728 <description>Dimensions of the sharpness 6729 map</description> 6730 <range>Must be at least 32 x 32</range> 6731 <tag id="FUTURE" /> 6732 </entry> 6733 <entry name="availableHotPixelMapModes" type="byte" visibility="public" 6734 type_notes="list of enums" container="array" typedef="boolean"> 6735 <array> 6736 <size>n</size> 6737 </array> 6738 <description> 6739 List of hot pixel map output modes for android.statistics.hotPixelMapMode that are 6740 supported by this camera device. 6741 </description> 6742 <range>Any value listed in android.statistics.hotPixelMapMode</range> 6743 <details> 6744 If no hotpixel map output is available for this camera device, this will contain only 6745 `false`. 6746 6747 ON is always supported on devices with the RAW capability. 6748 </details> 6749 <tag id="V1" /> 6750 <tag id="RAW" /> 6751 </entry> 6752 <entry name="availableLensShadingMapModes" type="byte" visibility="public" 6753 type_notes="list of enums" container="array"> 6754 <array> 6755 <size>n</size> 6756 </array> 6757 <description> 6758 List of lens shading map output modes for android.statistics.lensShadingMapMode that 6759 are supported by this camera device. 6760 </description> 6761 <range>Any value listed in android.statistics.lensShadingMapMode</range> 6762 <details> 6763 If no lens shading map output is available for this camera device, this key will 6764 contain only OFF. 6765 6766 ON is always supported on devices with the RAW capability. 6767 LEGACY mode devices will always only support OFF. 6768 </details> 6769 </entry> 6770 </namespace> 6771 </static> 6772 <dynamic> 6773 <clone entry="android.statistics.faceDetectMode" 6774 kind="controls"></clone> 6775 <entry name="faceIds" type="int32" visibility="hidden" container="array" 6776 hwlevel="legacy"> 6777 <array> 6778 <size>n</size> 6779 </array> 6780 <description>List of unique IDs for detected faces.</description> 6781 <details> 6782 Each detected face is given a unique ID that is valid for as long as the face is visible 6783 to the camera device. A face that leaves the field of view and later returns may be 6784 assigned a new ID. 6785 6786 Only available if android.statistics.faceDetectMode == FULL</details> 6787 <tag id="BC" /> 6788 </entry> 6789 <entry name="faceLandmarks" type="int32" visibility="hidden" 6790 type_notes="(leftEyeX, leftEyeY, rightEyeX, rightEyeY, mouthX, mouthY)" 6791 container="array" hwlevel="legacy"> 6792 <array> 6793 <size>n</size> 6794 <size>6</size> 6795 </array> 6796 <description>List of landmarks for detected 6797 faces.</description> 6798 <details> 6799 The coordinate system is that of android.sensor.info.activeArraySize, with 6800 `(0, 0)` being the top-left pixel of the active array. 6801 6802 Only available if android.statistics.faceDetectMode == FULL</details> 6803 <tag id="BC" /> 6804 </entry> 6805 <entry name="faceRectangles" type="int32" visibility="hidden" 6806 type_notes="(xmin, ymin, xmax, ymax). (0,0) is top-left of active pixel area" 6807 container="array" typedef="rectangle" hwlevel="legacy"> 6808 <array> 6809 <size>n</size> 6810 <size>4</size> 6811 </array> 6812 <description>List of the bounding rectangles for detected 6813 faces.</description> 6814 <details> 6815 The coordinate system is that of android.sensor.info.activeArraySize, with 6816 `(0, 0)` being the top-left pixel of the active array. 6817 6818 Only available if android.statistics.faceDetectMode != OFF</details> 6819 <tag id="BC" /> 6820 </entry> 6821 <entry name="faceScores" type="byte" visibility="hidden" container="array" 6822 hwlevel="legacy"> 6823 <array> 6824 <size>n</size> 6825 </array> 6826 <description>List of the face confidence scores for 6827 detected faces</description> 6828 <range>1-100</range> 6829 <details>Only available if android.statistics.faceDetectMode != OFF. 6830 </details> 6831 <hal_details> 6832 The value should be meaningful (for example, setting 100 at 6833 all times is illegal).</hal_details> 6834 <tag id="BC" /> 6835 </entry> 6836 <entry name="faces" type="int32" visibility="public" synthetic="true" 6837 container="array" typedef="face" hwlevel="legacy"> 6838 <array> 6839 <size>n</size> 6840 </array> 6841 <description>List of the faces detected through camera face detection 6842 in this capture.</description> 6843 <details> 6844 Only available if android.statistics.faceDetectMode `!=` OFF. 6845 </details> 6846 </entry> 6847 <entry name="histogram" type="int32" 6848 type_notes="count of pixels for each color channel that fall into each histogram bucket, scaled to be between 0 and maxHistogramCount" 6849 container="array"> 6850 <array> 6851 <size>n</size> 6852 <size>3</size> 6853 </array> 6854 <description>A 3-channel histogram based on the raw 6855 sensor data</description> 6856 <details>The k'th bucket (0-based) covers the input range 6857 (with w = android.sensor.info.whiteLevel) of [ k * w/N, 6858 (k + 1) * w / N ). If only a monochrome sharpness map is 6859 supported, all channels should have the same data</details> 6860 <tag id="FUTURE" /> 6861 </entry> 6862 <clone entry="android.statistics.histogramMode" 6863 kind="controls"></clone> 6864 <entry name="sharpnessMap" type="int32" 6865 type_notes="estimated sharpness for each region of the input image. Normalized to be between 0 and maxSharpnessMapValue. Higher values mean sharper (better focused)" 6866 container="array"> 6867 <array> 6868 <size>n</size> 6869 <size>m</size> 6870 <size>3</size> 6871 </array> 6872 <description>A 3-channel sharpness map, based on the raw 6873 sensor data</description> 6874 <details>If only a monochrome sharpness map is supported, 6875 all channels should have the same data</details> 6876 <tag id="FUTURE" /> 6877 </entry> 6878 <clone entry="android.statistics.sharpnessMapMode" 6879 kind="controls"></clone> 6880 <entry name="lensShadingCorrectionMap" type="byte" visibility="public" 6881 typedef="lensShadingMap" hwlevel="full"> 6882 <description>The shading map is a low-resolution floating-point map 6883 that lists the coefficients used to correct for vignetting, for each 6884 Bayer color channel.</description> 6885 <range>Each gain factor is &gt;= 1</range> 6886 <details>The least shaded section of the image should have a gain factor 6887 of 1; all other sections should have gains above 1. 6888 6889 When android.colorCorrection.mode = TRANSFORM_MATRIX, the map 6890 must take into account the colorCorrection settings. 6891 6892 The shading map is for the entire active pixel array, and is not 6893 affected by the crop region specified in the request. Each shading map 6894 entry is the value of the shading compensation map over a specific 6895 pixel on the sensor. Specifically, with a (N x M) resolution shading 6896 map, and an active pixel array size (W x H), shading map entry 6897 (x,y) ϵ (0 ... N-1, 0 ... M-1) is the value of the shading map at 6898 pixel ( ((W-1)/(N-1)) * x, ((H-1)/(M-1)) * y) for the four color channels. 6899 The map is assumed to be bilinearly interpolated between the sample points. 6900 6901 The channel order is [R, Geven, Godd, B], where Geven is the green 6902 channel for the even rows of a Bayer pattern, and Godd is the odd rows. 6903 The shading map is stored in a fully interleaved format. 6904 6905 The shading map should have on the order of 30-40 rows and columns, 6906 and must be smaller than 64x64. 6907 6908 As an example, given a very small map defined as: 6909 6910 width,height = [ 4, 3 ] 6911 values = 6912 [ 1.3, 1.2, 1.15, 1.2, 1.2, 1.2, 1.15, 1.2, 6913 1.1, 1.2, 1.2, 1.2, 1.3, 1.2, 1.3, 1.3, 6914 1.2, 1.2, 1.25, 1.1, 1.1, 1.1, 1.1, 1.0, 6915 1.0, 1.0, 1.0, 1.0, 1.2, 1.3, 1.25, 1.2, 6916 1.3, 1.2, 1.2, 1.3, 1.2, 1.15, 1.1, 1.2, 6917 1.2, 1.1, 1.0, 1.2, 1.3, 1.15, 1.2, 1.3 ] 6918 6919 The low-resolution scaling map images for each channel are 6920 (displayed using nearest-neighbor interpolation): 6921 6922 ![Red lens shading map](android.statistics.lensShadingMap/red_shading.png) 6923 ![Green (even rows) lens shading map](android.statistics.lensShadingMap/green_e_shading.png) 6924 ![Green (odd rows) lens shading map](android.statistics.lensShadingMap/green_o_shading.png) 6925 ![Blue lens shading map](android.statistics.lensShadingMap/blue_shading.png) 6926 6927 As a visualization only, inverting the full-color map to recover an 6928 image of a gray wall (using bicubic interpolation for visual quality) as captured by the sensor gives: 6929 6930 ![Image of a uniform white wall (inverse shading map)](android.statistics.lensShadingMap/inv_shading.png) 6931 </details> 6932 </entry> 6933 <entry name="lensShadingMap" type="float" visibility="hidden" 6934 type_notes="2D array of float gain factors per channel to correct lens shading" 6935 container="array" hwlevel="full"> 6936 <array> 6937 <size>4</size> 6938 <size>n</size> 6939 <size>m</size> 6940 </array> 6941 <description>The shading map is a low-resolution floating-point map 6942 that lists the coefficients used to correct for vignetting, for each 6943 Bayer color channel of RAW image data.</description> 6944 <range>Each gain factor is &gt;= 1</range> 6945 <details>The least shaded section of the image should have a gain factor 6946 of 1; all other sections should have gains above 1. 6947 6948 When android.colorCorrection.mode = TRANSFORM_MATRIX, the map 6949 must take into account the colorCorrection settings. 6950 6951 The shading map is for the entire active pixel array, and is not 6952 affected by the crop region specified in the request. Each shading map 6953 entry is the value of the shading compensation map over a specific 6954 pixel on the sensor. Specifically, with a (N x M) resolution shading 6955 map, and an active pixel array size (W x H), shading map entry 6956 (x,y) ϵ (0 ... N-1, 0 ... M-1) is the value of the shading map at 6957 pixel ( ((W-1)/(N-1)) * x, ((H-1)/(M-1)) * y) for the four color channels. 6958 The map is assumed to be bilinearly interpolated between the sample points. 6959 6960 The channel order is [R, Geven, Godd, B], where Geven is the green 6961 channel for the even rows of a Bayer pattern, and Godd is the odd rows. 6962 The shading map is stored in a fully interleaved format, and its size 6963 is provided in the camera static metadata by android.lens.info.shadingMapSize. 6964 6965 The shading map should have on the order of 30-40 rows and columns, 6966 and must be smaller than 64x64. 6967 6968 As an example, given a very small map defined as: 6969 6970 android.lens.info.shadingMapSize = [ 4, 3 ] 6971 android.statistics.lensShadingMap = 6972 [ 1.3, 1.2, 1.15, 1.2, 1.2, 1.2, 1.15, 1.2, 6973 1.1, 1.2, 1.2, 1.2, 1.3, 1.2, 1.3, 1.3, 6974 1.2, 1.2, 1.25, 1.1, 1.1, 1.1, 1.1, 1.0, 6975 1.0, 1.0, 1.0, 1.0, 1.2, 1.3, 1.25, 1.2, 6976 1.3, 1.2, 1.2, 1.3, 1.2, 1.15, 1.1, 1.2, 6977 1.2, 1.1, 1.0, 1.2, 1.3, 1.15, 1.2, 1.3 ] 6978 6979 The low-resolution scaling map images for each channel are 6980 (displayed using nearest-neighbor interpolation): 6981 6982 ![Red lens shading map](android.statistics.lensShadingMap/red_shading.png) 6983 ![Green (even rows) lens shading map](android.statistics.lensShadingMap/green_e_shading.png) 6984 ![Green (odd rows) lens shading map](android.statistics.lensShadingMap/green_o_shading.png) 6985 ![Blue lens shading map](android.statistics.lensShadingMap/blue_shading.png) 6986 6987 As a visualization only, inverting the full-color map to recover an 6988 image of a gray wall (using bicubic interpolation for visual quality) 6989 as captured by the sensor gives: 6990 6991 ![Image of a uniform white wall (inverse shading map)](android.statistics.lensShadingMap/inv_shading.png) 6992 6993 Note that the RAW image data might be subject to lens shading 6994 correction not reported on this map. Query 6995 android.sensor.info.lensShadingApplied to see if RAW image data has subject 6996 to lens shading correction. If android.sensor.info.lensShadingApplied 6997 is TRUE, the RAW image data is subject to partial or full lens shading 6998 correction. In the case full lens shading correction is applied to RAW 6999 images, the gain factor map reported in this key will contain all 1.0 gains. 7000 In other words, the map reported in this key is the remaining lens shading 7001 that needs to be applied on the RAW image to get images without lens shading 7002 artifacts. See android.request.maxNumOutputRaw for a list of RAW image 7003 formats. 7004 </details> 7005 <hal_details> 7006 The lens shading map calculation may depend on exposure and white balance statistics. 7007 When AE and AWB are in AUTO modes 7008 (android.control.aeMode `!=` OFF and android.control.awbMode `!=` OFF), the HAL 7009 may have all the information it need to generate most accurate lens shading map. When 7010 AE or AWB are in manual mode 7011 (android.control.aeMode `==` OFF or android.control.awbMode `==` OFF), the shading map 7012 may be adversely impacted by manual exposure or white balance parameters. To avoid 7013 generating unreliable shading map data, the HAL may choose to lock the shading map with 7014 the latest known good map generated when the AE and AWB are in AUTO modes. 7015 </hal_details> 7016 </entry> 7017 <entry name="predictedColorGains" type="float" 7018 visibility="hidden" 7019 deprecated="true" 7020 optional="true" 7021 type_notes="A 1D array of floats for 4 color channel gains" 7022 container="array"> 7023 <array> 7024 <size>4</size> 7025 </array> 7026 <description>The best-fit color channel gains calculated 7027 by the camera device's statistics units for the current output frame. 7028 </description> 7029 <details> 7030 This may be different than the gains used for this frame, 7031 since statistics processing on data from a new frame 7032 typically completes after the transform has already been 7033 applied to that frame. 7034 7035 The 4 channel gains are defined in Bayer domain, 7036 see android.colorCorrection.gains for details. 7037 7038 This value should always be calculated by the auto-white balance (AWB) block, 7039 regardless of the android.control.* current values. 7040 </details> 7041 </entry> 7042 <entry name="predictedColorTransform" type="rational" 7043 visibility="hidden" 7044 deprecated="true" 7045 optional="true" 7046 type_notes="3x3 rational matrix in row-major order" 7047 container="array"> 7048 <array> 7049 <size>3</size> 7050 <size>3</size> 7051 </array> 7052 <description>The best-fit color transform matrix estimate 7053 calculated by the camera device's statistics units for the current 7054 output frame.</description> 7055 <details>The camera device will provide the estimate from its 7056 statistics unit on the white balance transforms to use 7057 for the next frame. These are the values the camera device believes 7058 are the best fit for the current output frame. This may 7059 be different than the transform used for this frame, since 7060 statistics processing on data from a new frame typically 7061 completes after the transform has already been applied to 7062 that frame. 7063 7064 These estimates must be provided for all frames, even if 7065 capture settings and color transforms are set by the application. 7066 7067 This value should always be calculated by the auto-white balance (AWB) block, 7068 regardless of the android.control.* current values. 7069 </details> 7070 </entry> 7071 <entry name="sceneFlicker" type="byte" visibility="public" enum="true" 7072 hwlevel="full"> 7073 <enum> 7074 <value>NONE 7075 <notes>The camera device does not detect any flickering illumination 7076 in the current scene.</notes></value> 7077 <value>50HZ 7078 <notes>The camera device detects illumination flickering at 50Hz 7079 in the current scene.</notes></value> 7080 <value>60HZ 7081 <notes>The camera device detects illumination flickering at 60Hz 7082 in the current scene.</notes></value> 7083 </enum> 7084 <description>The camera device estimated scene illumination lighting 7085 frequency.</description> 7086 <details> 7087 Many light sources, such as most fluorescent lights, flicker at a rate 7088 that depends on the local utility power standards. This flicker must be 7089 accounted for by auto-exposure routines to avoid artifacts in captured images. 7090 The camera device uses this entry to tell the application what the scene 7091 illuminant frequency is. 7092 7093 When manual exposure control is enabled 7094 (`android.control.aeMode == OFF` or `android.control.mode == 7095 OFF`), the android.control.aeAntibandingMode doesn't perform 7096 antibanding, and the application can ensure it selects 7097 exposure times that do not cause banding issues by looking 7098 into this metadata field. See 7099 android.control.aeAntibandingMode for more details. 7100 7101 Reports NONE if there doesn't appear to be flickering illumination. 7102 </details> 7103 </entry> 7104 <clone entry="android.statistics.hotPixelMapMode" kind="controls"> 7105 </clone> 7106 <entry name="hotPixelMap" type="int32" visibility="public" 7107 type_notes="list of coordinates based on android.sensor.pixelArraySize" 7108 container="array" typedef="point"> 7109 <array> 7110 <size>2</size> 7111 <size>n</size> 7112 </array> 7113 <description> 7114 List of `(x, y)` coordinates of hot/defective pixels on the sensor. 7115 </description> 7116 <range> 7117 n <= number of pixels on the sensor. 7118 The `(x, y)` coordinates must be bounded by 7119 android.sensor.info.pixelArraySize. 7120 </range> 7121 <details> 7122 A coordinate `(x, y)` must lie between `(0, 0)`, and 7123 `(width - 1, height - 1)` (inclusive), which are the top-left and 7124 bottom-right of the pixel array, respectively. The width and 7125 height dimensions are given in android.sensor.info.pixelArraySize. 7126 This may include hot pixels that lie outside of the active array 7127 bounds given by android.sensor.info.activeArraySize. 7128 </details> 7129 <hal_details> 7130 A hotpixel map contains the coordinates of pixels on the camera 7131 sensor that do report valid values (usually due to defects in 7132 the camera sensor). This includes pixels that are stuck at certain 7133 values, or have a response that does not accuractly encode the 7134 incoming light from the scene. 7135 7136 To avoid performance issues, there should be significantly fewer hot 7137 pixels than actual pixels on the camera sensor. 7138 </hal_details> 7139 <tag id="V1" /> 7140 <tag id="RAW" /> 7141 </entry> 7142 </dynamic> 7143 <controls> 7144 <entry name="lensShadingMapMode" type="byte" visibility="public" enum="true" hwlevel="full"> 7145 <enum> 7146 <value>OFF 7147 <notes>Do not include a lens shading map in the capture result.</notes></value> 7148 <value>ON 7149 <notes>Include a lens shading map in the capture result.</notes></value> 7150 </enum> 7151 <description>Whether the camera device will output the lens 7152 shading map in output result metadata.</description> 7153 <range>android.statistics.info.availableLensShadingMapModes</range> 7154 <details>When set to ON, 7155 android.statistics.lensShadingMap will be provided in 7156 the output result metadata. 7157 7158 ON is always supported on devices with the RAW capability. 7159 </details> 7160 <tag id="RAW" /> 7161 </entry> 7162 </controls> 7163 <dynamic> 7164 <clone entry="android.statistics.lensShadingMapMode" kind="controls"> 7165 </clone> 7166 </dynamic> 7167 </section> 7168 <section name="tonemap"> 7169 <controls> 7170 <entry name="curveBlue" type="float" visibility="hidden" 7171 type_notes="1D array of float pairs (P_IN, P_OUT). The maximum number of pairs is specified by android.tonemap.maxCurvePoints." 7172 container="array" hwlevel="full"> 7173 <array> 7174 <size>n</size> 7175 <size>2</size> 7176 </array> 7177 <description>Tonemapping / contrast / gamma curve for the blue 7178 channel, to use when android.tonemap.mode is 7179 CONTRAST_CURVE.</description> 7180 <details>See android.tonemap.curveRed for more details.</details> 7181 </entry> 7182 <entry name="curveGreen" type="float" visibility="hidden" 7183 type_notes="1D array of float pairs (P_IN, P_OUT). The maximum number of pairs is specified by android.tonemap.maxCurvePoints." 7184 container="array" hwlevel="full"> 7185 <array> 7186 <size>n</size> 7187 <size>2</size> 7188 </array> 7189 <description>Tonemapping / contrast / gamma curve for the green 7190 channel, to use when android.tonemap.mode is 7191 CONTRAST_CURVE.</description> 7192 <details>See android.tonemap.curveRed for more details.</details> 7193 </entry> 7194 <entry name="curveRed" type="float" visibility="hidden" 7195 type_notes="1D array of float pairs (P_IN, P_OUT). The maximum number of pairs is specified by android.tonemap.maxCurvePoints." 7196 container="array" hwlevel="full"> 7197 <array> 7198 <size>n</size> 7199 <size>2</size> 7200 </array> 7201 <description>Tonemapping / contrast / gamma curve for the red 7202 channel, to use when android.tonemap.mode is 7203 CONTRAST_CURVE.</description> 7204 <range>0-1 on both input and output coordinates, normalized 7205 as a floating-point value such that 0 == black and 1 == white. 7206 </range> 7207 <details> 7208 Each channel's curve is defined by an array of control points: 7209 7210 android.tonemap.curveRed = 7211 [ P0in, P0out, P1in, P1out, P2in, P2out, P3in, P3out, ..., PNin, PNout ] 7212 2 <= N <= android.tonemap.maxCurvePoints 7213 7214 These are sorted in order of increasing `Pin`; it is 7215 required that input values 0.0 and 1.0 are included in the list to 7216 define a complete mapping. For input values between control points, 7217 the camera device must linearly interpolate between the control 7218 points. 7219 7220 Each curve can have an independent number of points, and the number 7221 of points can be less than max (that is, the request doesn't have to 7222 always provide a curve with number of points equivalent to 7223 android.tonemap.maxCurvePoints). 7224 7225 A few examples, and their corresponding graphical mappings; these 7226 only specify the red channel and the precision is limited to 4 7227 digits, for conciseness. 7228 7229 Linear mapping: 7230 7231 android.tonemap.curveRed = [ 0, 0, 1.0, 1.0 ] 7232 7233 ![Linear mapping curve](android.tonemap.curveRed/linear_tonemap.png) 7234 7235 Invert mapping: 7236 7237 android.tonemap.curveRed = [ 0, 1.0, 1.0, 0 ] 7238 7239 ![Inverting mapping curve](android.tonemap.curveRed/inverse_tonemap.png) 7240 7241 Gamma 1/2.2 mapping, with 16 control points: 7242 7243 android.tonemap.curveRed = [ 7244 0.0000, 0.0000, 0.0667, 0.2920, 0.1333, 0.4002, 0.2000, 0.4812, 7245 0.2667, 0.5484, 0.3333, 0.6069, 0.4000, 0.6594, 0.4667, 0.7072, 7246 0.5333, 0.7515, 0.6000, 0.7928, 0.6667, 0.8317, 0.7333, 0.8685, 7247 0.8000, 0.9035, 0.8667, 0.9370, 0.9333, 0.9691, 1.0000, 1.0000 ] 7248 7249 ![Gamma = 1/2.2 tonemapping curve](android.tonemap.curveRed/gamma_tonemap.png) 7250 7251 Standard sRGB gamma mapping, per IEC 61966-2-1:1999, with 16 control points: 7252 7253 android.tonemap.curveRed = [ 7254 0.0000, 0.0000, 0.0667, 0.2864, 0.1333, 0.4007, 0.2000, 0.4845, 7255 0.2667, 0.5532, 0.3333, 0.6125, 0.4000, 0.6652, 0.4667, 0.7130, 7256 0.5333, 0.7569, 0.6000, 0.7977, 0.6667, 0.8360, 0.7333, 0.8721, 7257 0.8000, 0.9063, 0.8667, 0.9389, 0.9333, 0.9701, 1.0000, 1.0000 ] 7258 7259 ![sRGB tonemapping curve](android.tonemap.curveRed/srgb_tonemap.png) 7260 </details> 7261 <hal_details> 7262 For good quality of mapping, at least 128 control points are 7263 preferred. 7264 7265 A typical use case of this would be a gamma-1/2.2 curve, with as many 7266 control points used as are available. 7267 </hal_details> 7268 </entry> 7269 <entry name="curve" type="float" visibility="public" synthetic="true" 7270 typedef="tonemapCurve" 7271 hwlevel="full"> 7272 <description>Tonemapping / contrast / gamma curve to use when android.tonemap.mode 7273 is CONTRAST_CURVE.</description> 7274 <details> 7275 The tonemapCurve consist of three curves for each of red, green, and blue 7276 channels respectively. The following example uses the red channel as an 7277 example. The same logic applies to green and blue channel. 7278 Each channel's curve is defined by an array of control points: 7279 7280 curveRed = 7281 [ P0(in, out), P1(in, out), P2(in, out), P3(in, out), ..., PN(in, out) ] 7282 2 <= N <= android.tonemap.maxCurvePoints 7283 7284 These are sorted in order of increasing `Pin`; it is always 7285 guaranteed that input values 0.0 and 1.0 are included in the list to 7286 define a complete mapping. For input values between control points, 7287 the camera device must linearly interpolate between the control 7288 points. 7289 7290 Each curve can have an independent number of points, and the number 7291 of points can be less than max (that is, the request doesn't have to 7292 always provide a curve with number of points equivalent to 7293 android.tonemap.maxCurvePoints). 7294 7295 A few examples, and their corresponding graphical mappings; these 7296 only specify the red channel and the precision is limited to 4 7297 digits, for conciseness. 7298 7299 Linear mapping: 7300 7301 curveRed = [ (0, 0), (1.0, 1.0) ] 7302 7303 ![Linear mapping curve](android.tonemap.curveRed/linear_tonemap.png) 7304 7305 Invert mapping: 7306 7307 curveRed = [ (0, 1.0), (1.0, 0) ] 7308 7309 ![Inverting mapping curve](android.tonemap.curveRed/inverse_tonemap.png) 7310 7311 Gamma 1/2.2 mapping, with 16 control points: 7312 7313 curveRed = [ 7314 (0.0000, 0.0000), (0.0667, 0.2920), (0.1333, 0.4002), (0.2000, 0.4812), 7315 (0.2667, 0.5484), (0.3333, 0.6069), (0.4000, 0.6594), (0.4667, 0.7072), 7316 (0.5333, 0.7515), (0.6000, 0.7928), (0.6667, 0.8317), (0.7333, 0.8685), 7317 (0.8000, 0.9035), (0.8667, 0.9370), (0.9333, 0.9691), (1.0000, 1.0000) ] 7318 7319 ![Gamma = 1/2.2 tonemapping curve](android.tonemap.curveRed/gamma_tonemap.png) 7320 7321 Standard sRGB gamma mapping, per IEC 61966-2-1:1999, with 16 control points: 7322 7323 curveRed = [ 7324 (0.0000, 0.0000), (0.0667, 0.2864), (0.1333, 0.4007), (0.2000, 0.4845), 7325 (0.2667, 0.5532), (0.3333, 0.6125), (0.4000, 0.6652), (0.4667, 0.7130), 7326 (0.5333, 0.7569), (0.6000, 0.7977), (0.6667, 0.8360), (0.7333, 0.8721), 7327 (0.8000, 0.9063), (0.8667, 0.9389), (0.9333, 0.9701), (1.0000, 1.0000) ] 7328 7329 ![sRGB tonemapping curve](android.tonemap.curveRed/srgb_tonemap.png) 7330 </details> 7331 <hal_details> 7332 This entry is created by the framework from the curveRed, curveGreen and 7333 curveBlue entries. 7334 </hal_details> 7335 </entry> 7336 <entry name="mode" type="byte" visibility="public" enum="true" 7337 hwlevel="full"> 7338 <enum> 7339 <value>CONTRAST_CURVE 7340 <notes>Use the tone mapping curve specified in 7341 the android.tonemap.curve* entries. 7342 7343 All color enhancement and tonemapping must be disabled, except 7344 for applying the tonemapping curve specified by 7345 android.tonemap.curve. 7346 7347 Must not slow down frame rate relative to raw 7348 sensor output. 7349 </notes> 7350 </value> 7351 <value>FAST 7352 <notes> 7353 Advanced gamma mapping and color enhancement may be applied, without 7354 reducing frame rate compared to raw sensor output. 7355 </notes> 7356 </value> 7357 <value>HIGH_QUALITY 7358 <notes> 7359 High-quality gamma mapping and color enhancement will be applied, at 7360 the cost of possibly reduced frame rate compared to raw sensor output. 7361 </notes> 7362 </value> 7363 <value>GAMMA_VALUE 7364 <notes> 7365 Use the gamma value specified in android.tonemap.gamma to peform 7366 tonemapping. 7367 7368 All color enhancement and tonemapping must be disabled, except 7369 for applying the tonemapping curve specified by android.tonemap.gamma. 7370 7371 Must not slow down frame rate relative to raw sensor output. 7372 </notes> 7373 </value> 7374 <value>PRESET_CURVE 7375 <notes> 7376 Use the preset tonemapping curve specified in 7377 android.tonemap.presetCurve to peform tonemapping. 7378 7379 All color enhancement and tonemapping must be disabled, except 7380 for applying the tonemapping curve specified by 7381 android.tonemap.presetCurve. 7382 7383 Must not slow down frame rate relative to raw sensor output. 7384 </notes> 7385 </value> 7386 </enum> 7387 <description>High-level global contrast/gamma/tonemapping control. 7388 </description> 7389 <range>android.tonemap.availableToneMapModes</range> 7390 <details> 7391 When switching to an application-defined contrast curve by setting 7392 android.tonemap.mode to CONTRAST_CURVE, the curve is defined 7393 per-channel with a set of `(in, out)` points that specify the 7394 mapping from input high-bit-depth pixel value to the output 7395 low-bit-depth value. Since the actual pixel ranges of both input 7396 and output may change depending on the camera pipeline, the values 7397 are specified by normalized floating-point numbers. 7398 7399 More-complex color mapping operations such as 3D color look-up 7400 tables, selective chroma enhancement, or other non-linear color 7401 transforms will be disabled when android.tonemap.mode is 7402 CONTRAST_CURVE. 7403 7404 When using either FAST or HIGH_QUALITY, the camera device will 7405 emit its own tonemap curve in android.tonemap.curve. 7406 These values are always available, and as close as possible to the 7407 actually used nonlinear/nonglobal transforms. 7408 7409 If a request is sent with CONTRAST_CURVE with the camera device's 7410 provided curve in FAST or HIGH_QUALITY, the image's tonemap will be 7411 roughly the same.</details> 7412 </entry> 7413 </controls> 7414 <static> 7415 <entry name="maxCurvePoints" type="int32" visibility="public" 7416 hwlevel="full"> 7417 <description>Maximum number of supported points in the 7418 tonemap curve that can be used for android.tonemap.curve. 7419 </description> 7420 <details> 7421 If the actual number of points provided by the application (in android.tonemap.curve*) is 7422 less than this maximum, the camera device will resample the curve to its internal 7423 representation, using linear interpolation. 7424 7425 The output curves in the result metadata may have a different number 7426 of points than the input curves, and will represent the actual 7427 hardware curves used as closely as possible when linearly interpolated. 7428 </details> 7429 <hal_details> 7430 This value must be at least 64. This should be at least 128. 7431 </hal_details> 7432 </entry> 7433 <entry name="availableToneMapModes" type="byte" visibility="public" 7434 type_notes="list of enums" container="array" typedef="enumList" hwlevel="full"> 7435 <array> 7436 <size>n</size> 7437 </array> 7438 <description> 7439 List of tonemapping modes for android.tonemap.mode that are supported by this camera 7440 device. 7441 </description> 7442 <range>Any value listed in android.tonemap.mode</range> 7443 <details> 7444 Camera devices that support the MANUAL_POST_PROCESSING capability will always contain 7445 at least one of below mode combinations: 7446 7447 * CONTRAST_CURVE, FAST and HIGH_QUALITY 7448 * GAMMA_VALUE, PRESET_CURVE, FAST and HIGH_QUALITY 7449 7450 This includes all FULL level devices. 7451 </details> 7452 <hal_details> 7453 HAL must support both FAST and HIGH_QUALITY if automatic tonemap control is available 7454 on the camera device, but the underlying implementation can be the same for both modes. 7455 That is, if the highest quality implementation on the camera device does not slow down 7456 capture rate, then FAST and HIGH_QUALITY will generate the same output. 7457 </hal_details> 7458 </entry> 7459 </static> 7460 <dynamic> 7461 <clone entry="android.tonemap.curveBlue" kind="controls"> 7462 </clone> 7463 <clone entry="android.tonemap.curveGreen" kind="controls"> 7464 </clone> 7465 <clone entry="android.tonemap.curveRed" kind="controls"> 7466 </clone> 7467 <clone entry="android.tonemap.curve" kind="controls"> 7468 </clone> 7469 <clone entry="android.tonemap.mode" kind="controls"> 7470 </clone> 7471 </dynamic> 7472 <controls> 7473 <entry name="gamma" type="float" visibility="public"> 7474 <description> Tonemapping curve to use when android.tonemap.mode is 7475 GAMMA_VALUE 7476 </description> 7477 <details> 7478 The tonemap curve will be defined the following formula: 7479 * OUT = pow(IN, 1.0 / gamma) 7480 where IN and OUT is the input pixel value scaled to range [0.0, 1.0], 7481 pow is the power function and gamma is the gamma value specified by this 7482 key. 7483 7484 The same curve will be applied to all color channels. The camera device 7485 may clip the input gamma value to its supported range. The actual applied 7486 value will be returned in capture result. 7487 7488 The valid range of gamma value varies on different devices, but values 7489 within [1.0, 5.0] are guaranteed not to be clipped. 7490 </details> 7491 </entry> 7492 <entry name="presetCurve" type="byte" visibility="public" enum="true"> 7493 <enum> 7494 <value>SRGB 7495 <notes>Tonemapping curve is defined by sRGB</notes> 7496 </value> 7497 <value>REC709 7498 <notes>Tonemapping curve is defined by ITU-R BT.709</notes> 7499 </value> 7500 </enum> 7501 <description> Tonemapping curve to use when android.tonemap.mode is 7502 PRESET_CURVE 7503 </description> 7504 <details> 7505 The tonemap curve will be defined by specified standard. 7506 7507 sRGB (approximated by 16 control points): 7508 7509 ![sRGB tonemapping curve](android.tonemap.curveRed/srgb_tonemap.png) 7510 7511 Rec. 709 (approximated by 16 control points): 7512 7513 ![Rec. 709 tonemapping curve](android.tonemap.curveRed/rec709_tonemap.png) 7514 7515 Note that above figures show a 16 control points approximation of preset 7516 curves. Camera devices may apply a different approximation to the curve. 7517 </details> 7518 </entry> 7519 </controls> 7520 <dynamic> 7521 <clone entry="android.tonemap.gamma" kind="controls"> 7522 </clone> 7523 <clone entry="android.tonemap.presetCurve" kind="controls"> 7524 </clone> 7525 </dynamic> 7526 </section> 7527 <section name="led"> 7528 <controls> 7529 <entry name="transmit" type="byte" visibility="hidden" optional="true" 7530 enum="true" typedef="boolean"> 7531 <enum> 7532 <value>OFF</value> 7533 <value>ON</value> 7534 </enum> 7535 <description>This LED is nominally used to indicate to the user 7536 that the camera is powered on and may be streaming images back to the 7537 Application Processor. In certain rare circumstances, the OS may 7538 disable this when video is processed locally and not transmitted to 7539 any untrusted applications. 7540 7541 In particular, the LED *must* always be on when the data could be 7542 transmitted off the device. The LED *should* always be on whenever 7543 data is stored locally on the device. 7544 7545 The LED *may* be off if a trusted application is using the data that 7546 doesn't violate the above rules. 7547 </description> 7548 </entry> 7549 </controls> 7550 <dynamic> 7551 <clone entry="android.led.transmit" kind="controls"></clone> 7552 </dynamic> 7553 <static> 7554 <entry name="availableLeds" type="byte" visibility="hidden" optional="true" 7555 enum="true" 7556 container="array"> 7557 <array> 7558 <size>n</size> 7559 </array> 7560 <enum> 7561 <value>TRANSMIT 7562 <notes>android.led.transmit control is used.</notes> 7563 </value> 7564 </enum> 7565 <description>A list of camera LEDs that are available on this system. 7566 </description> 7567 </entry> 7568 </static> 7569 </section> 7570 <section name="info"> 7571 <static> 7572 <entry name="supportedHardwareLevel" type="byte" visibility="public" 7573 enum="true" hwlevel="legacy"> 7574 <enum> 7575 <value> 7576 LIMITED 7577 <notes> 7578 This camera device has only limited capabilities. 7579 </notes> 7580 </value> 7581 <value> 7582 FULL 7583 <notes> 7584 This camera device is capable of supporting advanced imaging applications. 7585 </notes> 7586 </value> 7587 <value> 7588 LEGACY 7589 <notes> 7590 This camera device is running in backward compatibility mode. 7591 </notes> 7592 </value> 7593 <value> 7594 HIGH_RESOLUTION 7595 <notes> 7596 This camera device is capable of supporting advanced imaging applications at full rate, 7597 and additional high-resolution outputs at lower rates. 7598 </notes> 7599 </value> 7600 </enum> 7601 <description> 7602 Generally classifies the overall set of the camera device functionality. 7603 </description> 7604 <details> 7605 Camera devices will come in three flavors: LEGACY, LIMITED and FULL. 7606 7607 A FULL device will support below capabilities: 7608 7609 * 30fps operation at maximum resolution (== sensor resolution) is preferred, more than 7610 20fps is required, for at least uncompressed YUV 7611 output. (android.request.availableCapabilities contains BURST_CAPTURE) 7612 * Per frame control (android.sync.maxLatency `==` PER_FRAME_CONTROL) 7613 * Manual sensor control (android.request.availableCapabilities contains MANUAL_SENSOR) 7614 * Manual post-processing control (android.request.availableCapabilities contains 7615 MANUAL_POST_PROCESSING) 7616 * Arbitrary cropping region (android.scaler.croppingType `==` FREEFORM) 7617 * At least 3 processed (but not stalling) format output streams 7618 (android.request.maxNumOutputProc `>=` 3) 7619 * The required stream configuration defined in android.scaler.availableStreamConfigurations 7620 * The required exposure time range defined in android.sensor.info.exposureTimeRange 7621 * The required maxFrameDuration defined in android.sensor.info.maxFrameDuration 7622 7623 A LIMITED device may have some or none of the above characteristics. 7624 To find out more refer to android.request.availableCapabilities. 7625 7626 Some features are not part of any particular hardware level or capability and must be 7627 queried separately. These include: 7628 7629 * Calibrated timestamps (android.sensor.info.timestampSource `==` REALTIME) 7630 * Precision lens control (android.lens.info.focusDistanceCalibration `==` CALIBRATED) 7631 * Face detection (android.statistics.info.availableFaceDetectModes) 7632 * Optical or electrical image stabilization 7633 (android.lens.info.availableOpticalStabilization, 7634 android.control.availableVideoStabilizationModes) 7635 7636 A LEGACY device does not support per-frame control, manual sensor control, manual 7637 post-processing, arbitrary cropping regions, and has relaxed performance constraints. 7638 7639 Each higher level supports everything the lower level supports 7640 in this order: FULL `>` LIMITED `>` LEGACY. 7641 7642 A HIGH_RESOLUTION device is equivalent to a FULL device, except that: 7643 7644 * At least one output resolution of 8 megapixels or higher in uncompressed YUV is 7645 supported at `>=` 20 fps. 7646 * Maximum-size (sensor resolution) uncompressed YUV is supported at `>=` 10 7647 fps. 7648 * For devices that list the RAW capability and support either RAW10 or RAW12 output, 7649 maximum-resolution RAW10 or RAW12 capture will operate at least at the rate of 7650 maximum-resolution YUV capture, and at least one supported output resolution of 7651 8 megapixels or higher in RAW10 or RAW12 is supported `>=` 20 fps. 7652 </details> 7653 <hal_details> 7654 The camera 3 HAL device can implement one of two possible 7655 operational modes; limited and full. Full support is 7656 expected from new higher-end devices. Limited mode has 7657 hardware requirements roughly in line with those for a 7658 camera HAL device v1 implementation, and is expected from 7659 older or inexpensive devices. Full is a strict superset of 7660 limited, and they share the same essential operational flow. 7661 7662 For full details refer to "S3. Operational Modes" in camera3.h 7663 7664 Camera HAL3+ must not implement LEGACY mode. It is there 7665 for backwards compatibility in the `android.hardware.camera2` 7666 user-facing API only. 7667 </hal_details> 7668 </entry> 7669 </static> 7670 </section> 7671 <section name="blackLevel"> 7672 <controls> 7673 <entry name="lock" type="byte" visibility="public" enum="true" 7674 typedef="boolean" hwlevel="full"> 7675 <enum> 7676 <value>OFF</value> 7677 <value>ON</value> 7678 </enum> 7679 <description> Whether black-level compensation is locked 7680 to its current values, or is free to vary.</description> 7681 <details>When set to `true` (ON), the values used for black-level 7682 compensation will not change until the lock is set to 7683 `false` (OFF). 7684 7685 Since changes to certain capture parameters (such as 7686 exposure time) may require resetting of black level 7687 compensation, the camera device must report whether setting 7688 the black level lock was successful in the output result 7689 metadata. 7690 7691 For example, if a sequence of requests is as follows: 7692 7693 * Request 1: Exposure = 10ms, Black level lock = OFF 7694 * Request 2: Exposure = 10ms, Black level lock = ON 7695 * Request 3: Exposure = 10ms, Black level lock = ON 7696 * Request 4: Exposure = 20ms, Black level lock = ON 7697 * Request 5: Exposure = 20ms, Black level lock = ON 7698 * Request 6: Exposure = 20ms, Black level lock = ON 7699 7700 And the exposure change in Request 4 requires the camera 7701 device to reset the black level offsets, then the output 7702 result metadata is expected to be: 7703 7704 * Result 1: Exposure = 10ms, Black level lock = OFF 7705 * Result 2: Exposure = 10ms, Black level lock = ON 7706 * Result 3: Exposure = 10ms, Black level lock = ON 7707 * Result 4: Exposure = 20ms, Black level lock = OFF 7708 * Result 5: Exposure = 20ms, Black level lock = ON 7709 * Result 6: Exposure = 20ms, Black level lock = ON 7710 7711 This indicates to the application that on frame 4, black 7712 levels were reset due to exposure value changes, and pixel 7713 values may not be consistent across captures. 7714 7715 The camera device will maintain the lock to the extent 7716 possible, only overriding the lock to OFF when changes to 7717 other request parameters require a black level recalculation 7718 or reset. 7719 </details> 7720 <hal_details> 7721 If for some reason black level locking is no longer possible 7722 (for example, the analog gain has changed, which forces 7723 black level offsets to be recalculated), then the HAL must 7724 override this request (and it must report 'OFF' when this 7725 does happen) until the next capture for which locking is 7726 possible again.</hal_details> 7727 <tag id="HAL2" /> 7728 </entry> 7729 </controls> 7730 <dynamic> 7731 <clone entry="android.blackLevel.lock" 7732 kind="controls"> 7733 <details> 7734 Whether the black level offset was locked for this frame. Should be 7735 ON if android.blackLevel.lock was ON in the capture request, unless 7736 a change in other capture settings forced the camera device to 7737 perform a black level reset. 7738 </details> 7739 </clone> 7740 </dynamic> 7741 </section> 7742 <section name="sync"> 7743 <dynamic> 7744 <entry name="frameNumber" type="int64" visibility="hidden" enum="true" 7745 hwlevel="legacy"> 7746 <enum> 7747 <value id="-1">CONVERGING 7748 <notes> 7749 The current result is not yet fully synchronized to any request. 7750 7751 Synchronization is in progress, and reading metadata from this 7752 result may include a mix of data that have taken effect since the 7753 last synchronization time. 7754 7755 In some future result, within android.sync.maxLatency frames, 7756 this value will update to the actual frame number frame number 7757 the result is guaranteed to be synchronized to (as long as the 7758 request settings remain constant). 7759 </notes> 7760 </value> 7761 <value id="-2">UNKNOWN 7762 <notes> 7763 The current result's synchronization status is unknown. 7764 7765 The result may have already converged, or it may be in 7766 progress. Reading from this result may include some mix 7767 of settings from past requests. 7768 7769 After a settings change, the new settings will eventually all 7770 take effect for the output buffers and results. However, this 7771 value will not change when that happens. Altering settings 7772 rapidly may provide outcomes using mixes of settings from recent 7773 requests. 7774 7775 This value is intended primarily for backwards compatibility with 7776 the older camera implementations (for android.hardware.Camera). 7777 </notes> 7778 </value> 7779 </enum> 7780 <description>The frame number corresponding to the last request 7781 with which the output result (metadata + buffers) has been fully 7782 synchronized.</description> 7783 <range>Either a non-negative value corresponding to a 7784 `frame_number`, or one of the two enums (CONVERGING / UNKNOWN). 7785 </range> 7786 <details> 7787 When a request is submitted to the camera device, there is usually a 7788 delay of several frames before the controls get applied. A camera 7789 device may either choose to account for this delay by implementing a 7790 pipeline and carefully submit well-timed atomic control updates, or 7791 it may start streaming control changes that span over several frame 7792 boundaries. 7793 7794 In the latter case, whenever a request's settings change relative to 7795 the previous submitted request, the full set of changes may take 7796 multiple frame durations to fully take effect. Some settings may 7797 take effect sooner (in less frame durations) than others. 7798 7799 While a set of control changes are being propagated, this value 7800 will be CONVERGING. 7801 7802 Once it is fully known that a set of control changes have been 7803 finished propagating, and the resulting updated control settings 7804 have been read back by the camera device, this value will be set 7805 to a non-negative frame number (corresponding to the request to 7806 which the results have synchronized to). 7807 7808 Older camera device implementations may not have a way to detect 7809 when all camera controls have been applied, and will always set this 7810 value to UNKNOWN. 7811 7812 FULL capability devices will always have this value set to the 7813 frame number of the request corresponding to this result. 7814 7815 _Further details_: 7816 7817 * Whenever a request differs from the last request, any future 7818 results not yet returned may have this value set to CONVERGING (this 7819 could include any in-progress captures not yet returned by the camera 7820 device, for more details see pipeline considerations below). 7821 * Submitting a series of multiple requests that differ from the 7822 previous request (e.g. r1, r2, r3 s.t. r1 != r2 != r3) 7823 moves the new synchronization frame to the last non-repeating 7824 request (using the smallest frame number from the contiguous list of 7825 repeating requests). 7826 * Submitting the same request repeatedly will not change this value 7827 to CONVERGING, if it was already a non-negative value. 7828 * When this value changes to non-negative, that means that all of the 7829 metadata controls from the request have been applied, all of the 7830 metadata controls from the camera device have been read to the 7831 updated values (into the result), and all of the graphics buffers 7832 corresponding to this result are also synchronized to the request. 7833 7834 _Pipeline considerations_: 7835 7836 Submitting a request with updated controls relative to the previously 7837 submitted requests may also invalidate the synchronization state 7838 of all the results corresponding to currently in-flight requests. 7839 7840 In other words, results for this current request and up to 7841 android.request.pipelineMaxDepth prior requests may have their 7842 android.sync.frameNumber change to CONVERGING. 7843 </details> 7844 <hal_details> 7845 Using UNKNOWN here is illegal unless android.sync.maxLatency 7846 is also UNKNOWN. 7847 7848 FULL capability devices should simply set this value to the 7849 `frame_number` of the request this result corresponds to. 7850 </hal_details> 7851 <tag id="V1" /> 7852 </entry> 7853 </dynamic> 7854 <static> 7855 <entry name="maxLatency" type="int32" visibility="public" enum="true" 7856 hwlevel="legacy"> 7857 <enum> 7858 <value id="0">PER_FRAME_CONTROL 7859 <notes> 7860 Every frame has the requests immediately applied. 7861 7862 Furthermore for all results, 7863 `android.sync.frameNumber == {@link android.hardware.camera2.CaptureResult#getFrameNumber}` 7864 7865 Changing controls over multiple requests one after another will 7866 produce results that have those controls applied atomically 7867 each frame. 7868 7869 All FULL capability devices will have this as their maxLatency. 7870 </notes> 7871 </value> 7872 <value id="-1">UNKNOWN 7873 <notes> 7874 Each new frame has some subset (potentially the entire set) 7875 of the past requests applied to the camera settings. 7876 7877 By submitting a series of identical requests, the camera device 7878 will eventually have the camera settings applied, but it is 7879 unknown when that exact point will be. 7880 7881 All LEGACY capability devices will have this as their maxLatency. 7882 </notes> 7883 </value> 7884 </enum> 7885 <description> 7886 The maximum number of frames that can occur after a request 7887 (different than the previous) has been submitted, and before the 7888 result's state becomes synchronized (by setting 7889 android.sync.frameNumber to a non-negative value). 7890 </description> 7891 <units>Frame counts</units> 7892 <range>A positive value, PER_FRAME_CONTROL, or UNKNOWN.</range> 7893 <details> 7894 This defines the maximum distance (in number of metadata results), 7895 between android.sync.frameNumber and the equivalent 7896 frame number for that result. 7897 7898 In other words this acts as an upper boundary for how many frames 7899 must occur before the camera device knows for a fact that the new 7900 submitted camera settings have been applied in outgoing frames. 7901 7902 For example if the distance was 2, 7903 7904 initial request = X (repeating) 7905 request1 = X 7906 request2 = Y 7907 request3 = Y 7908 request4 = Y 7909 7910 where requestN has frameNumber N, and the first of the repeating 7911 initial request's has frameNumber F (and F < 1). 7912 7913 initial result = X' + { android.sync.frameNumber == F } 7914 result1 = X' + { android.sync.frameNumber == F } 7915 result2 = X' + { android.sync.frameNumber == CONVERGING } 7916 result3 = X' + { android.sync.frameNumber == CONVERGING } 7917 result4 = X' + { android.sync.frameNumber == 2 } 7918 7919 where resultN has frameNumber N. 7920 7921 Since `result4` has a `frameNumber == 4` and 7922 `android.sync.frameNumber == 2`, the distance is clearly 7923 `4 - 2 = 2`. 7924 </details> 7925 <hal_details> 7926 Use `frame_count` from camera3_request_t instead of 7927 android.request.frameCount or 7928 `@link{android.hardware.camera2.CaptureResult#getFrameNumber}`. 7929 7930 LIMITED devices are strongly encouraged to use a non-negative 7931 value. If UNKNOWN is used here then app developers do not have a way 7932 to know when sensor settings have been applied. 7933 </hal_details> 7934 <tag id="V1" /> 7935 </entry> 7936 </static> 7937 </section> 7938 <section name="reprocess"> 7939 <controls> 7940 <entry name="effectiveExposureFactor" type="float" visibility="public" hwlevel="limited"> 7941 <description> 7942 The amount of exposure time increase factor applied to the original output 7943 frame by the application processing before sending for reprocessing. 7944 </description> 7945 <units>Relative exposure time increase factor.</units> 7946 <range> &gt;= 1.0</range> 7947 <details> 7948 This is optional, and will be supported if the camera device supports YUV_REPROCESSING 7949 capability (android.request.availableCapabilities contains YUV_REPROCESSING). 7950 7951 For some YUV reprocessing use cases, the application may choose to filter the original 7952 output frames to effectively reduce the noise to the same level as a frame that was 7953 captured with longer exposure time. To be more specific, assuming the original captured 7954 images were captured with a sensitivity of S and an exposure time of T, the model in 7955 the camera device is that the amount of noise in the image would be approximately what 7956 would be expected if the original capture parameters had been a sensitivity of 7957 S/effectiveExposureFactor and an exposure time of T*effectiveExposureFactor, rather 7958 than S and T respectively. If the captured images were processed by the application 7959 before being sent for reprocessing, then the application may have used image processing 7960 algorithms and/or multi-frame image fusion to reduce the noise in the 7961 application-processed images (input images). By using the effectiveExposureFactor 7962 control, the application can communicate to the camera device the actual noise level 7963 improvement in the application-processed image. With this information, the camera 7964 device can select appropriate noise reduction and edge enhancement parameters to avoid 7965 excessive noise reduction (android.noiseReduction.mode) and insufficient edge 7966 enhancement (android.edge.mode) being applied to the reprocessed frames. 7967 7968 For example, for multi-frame image fusion use case, the application may fuse 7969 multiple output frames together to a final frame for reprocessing. When N image are 7970 fused into 1 image for reprocessing, the exposure time increase factor could be up to 7971 square root of N (based on a simple photon shot noise model). The camera device will 7972 adjust the reprocessing noise reduction and edge enhancement parameters accordingly to 7973 produce the best quality images. 7974 7975 This is relative factor, 1.0 indicates the application hasn't processed the input 7976 buffer in a way that affects its effective exposure time. 7977 7978 This control is only effective for YUV reprocessing capture request. For noise 7979 reduction reprocessing, it is only effective when `android.noiseReduction.mode != OFF`. 7980 Similarly, for edge enhancement reprocessing, it is only effective when 7981 `android.edge.mode != OFF`. 7982 </details> 7983 <tag id="REPROC" /> 7984 </entry> 7985 </controls> 7986 <dynamic> 7987 <clone entry="android.reprocess.effectiveExposureFactor" kind="controls"> 7988 </clone> 7989 </dynamic> 7990 <static> 7991 <entry name="maxCaptureStall" type="int32" visibility="public" hwlevel="limited"> 7992 <description> 7993 The maximal camera capture pipeline stall (in unit of frame count) introduced by a 7994 reprocess capture request. 7995 </description> 7996 <units>Number of frames.</units> 7997 <range> &lt;= 4</range> 7998 <details> 7999 The key describes the maximal interference that one reprocess (input) request 8000 can introduce to the camera simultaneous streaming of regular (output) capture 8001 requests, including repeating requests. 8002 8003 When a reprocessing capture request is submitted while a camera output repeating request 8004 (e.g. preview) is being served by the camera device, it may preempt the camera capture 8005 pipeline for at least one frame duration so that the camera device is unable to process 8006 the following capture request in time for the next sensor start of exposure boundary. 8007 When this happens, the application may observe a capture time gap (longer than one frame 8008 duration) between adjacent capture output frames, which usually exhibits as preview 8009 glitch if the repeating request output targets include a preview surface. This key gives 8010 the worst-case number of frame stall introduced by one reprocess request with any kind of 8011 formats/sizes combination. 8012 8013 If this key reports 0, it means a reprocess request doesn't introduce any glitch to the 8014 ongoing camera repeating request outputs, as if this reprocess request is never issued. 8015 8016 This key is supported if the camera device supports PRIVATE or YUV reprocessing ( 8017 i.e. android.request.availableCapabilities contains PRIVATE_REPROCESSING or 8018 YUV_REPROCESSING). 8019 </details> 8020 <tag id="REPROC" /> 8021 </entry> 8022 </static> 8023 </section> 8024 <section name="depth"> 8025 <static> 8026 <entry name="maxDepthSamples" type="int32" visibility="system" hwlevel="limited"> 8027 <description>Maximum number of points that a depth point cloud may contain. 8028 </description> 8029 <details> 8030 If a camera device supports outputting depth range data in the form of a depth point 8031 cloud ({@link android.graphics.ImageFormat#DEPTH_POINT_CLOUD}), this is the maximum 8032 number of points an output buffer may contain. 8033 8034 Any given buffer may contain between 0 and maxDepthSamples points, inclusive. 8035 If output in the depth point cloud format is not supported, this entry will 8036 not be defined. 8037 </details> 8038 <tag id="DEPTH" /> 8039 </entry> 8040 <entry name="availableDepthStreamConfigurations" type="int32" visibility="hidden" 8041 enum="true" container="array" 8042 typedef="streamConfiguration" hwlevel="limited"> 8043 <array> 8044 <size>n</size> 8045 <size>4</size> 8046 </array> 8047 <enum> 8048 <value>OUTPUT</value> 8049 <value>INPUT</value> 8050 </enum> 8051 <description>The available depth dataspace stream 8052 configurations that this camera device supports 8053 (i.e. format, width, height, output/input stream). 8054 </description> 8055 <details> 8056 These are output stream configurations for use with 8057 dataSpace HAL_DATASPACE_DEPTH. The configurations are 8058 listed as `(format, width, height, input?)` tuples. 8059 8060 Only devices that support depth output for at least 8061 the HAL_PIXEL_FORMAT_Y16 dense depth map may include 8062 this entry. 8063 8064 A device that also supports the HAL_PIXEL_FORMAT_BLOB 8065 sparse depth point cloud must report a single entry for 8066 the format in this list as `(HAL_PIXEL_FORMAT_BLOB, 8067 android.depth.maxDepthSamples, 1, OUTPUT)` in addition to 8068 the entries for HAL_PIXEL_FORMAT_Y16. 8069 </details> 8070 <tag id="DEPTH" /> 8071 </entry> 8072 <entry name="availableDepthMinFrameDurations" type="int64" visibility="hidden" 8073 container="array" 8074 typedef="streamConfigurationDuration" hwlevel="limited"> 8075 <array> 8076 <size>4</size> 8077 <size>n</size> 8078 </array> 8079 <description>This lists the minimum frame duration for each 8080 format/size combination for depth output formats. 8081 </description> 8082 <units>(format, width, height, ns) x n</units> 8083 <details> 8084 This should correspond to the frame duration when only that 8085 stream is active, with all processing (typically in android.*.mode) 8086 set to either OFF or FAST. 8087 8088 When multiple streams are used in a request, the minimum frame 8089 duration will be max(individual stream min durations). 8090 8091 The minimum frame duration of a stream (of a particular format, size) 8092 is the same regardless of whether the stream is input or output. 8093 8094 See android.sensor.frameDuration and 8095 android.scaler.availableStallDurations for more details about 8096 calculating the max frame rate. 8097 8098 (Keep in sync with {@link 8099 android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration}) 8100 </details> 8101 <tag id="DEPTH" /> 8102 </entry> 8103 <entry name="availableDepthStallDurations" type="int64" visibility="hidden" 8104 container="array" typedef="streamConfigurationDuration" hwlevel="limited"> 8105 <array> 8106 <size>4</size> 8107 <size>n</size> 8108 </array> 8109 <description>This lists the maximum stall duration for each 8110 output format/size combination for depth streams. 8111 </description> 8112 <units>(format, width, height, ns) x n</units> 8113 <details> 8114 A stall duration is how much extra time would get added 8115 to the normal minimum frame duration for a repeating request 8116 that has streams with non-zero stall. 8117 8118 This functions similarly to 8119 android.scaler.availableStallDurations for depth 8120 streams. 8121 8122 All depth output stream formats may have a nonzero stall 8123 duration. 8124 </details> 8125 <tag id="DEPTH" /> 8126 </entry> 8127 <entry name="depthIsExclusive" type="byte" visibility="public" 8128 enum="true" typedef="boolean" hwlevel="limited"> 8129 <enum> 8130 <value>FALSE</value> 8131 <value>TRUE</value> 8132 </enum> 8133 <description>Indicates whether a capture request may target both a 8134 DEPTH16 / DEPTH_POINT_CLOUD output, and normal color outputs (such as 8135 YUV_420_888, JPEG, or RAW) simultaneously. 8136 </description> 8137 <details> 8138 If TRUE, including both depth and color outputs in a single 8139 capture request is not supported. An application must interleave color 8140 and depth requests. If FALSE, a single request can target both types 8141 of output. 8142 8143 Typically, this restriction exists on camera devices that 8144 need to emit a specific pattern or wavelength of light to 8145 measure depth values, which causes the color image to be 8146 corrupted during depth measurement. 8147 </details> 8148 </entry> 8149 </static> 8150 </section> 8151 </namespace> 8152</metadata> 8153