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