OSDN Git Service

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